Files
traintracker/dist/assets/index-41469311.js
2023-02-17 11:45:10 +00:00

570 lines
1.8 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var j9=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var HOt=j9(Ci=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();function L1(r,e){const t=Object.create(null),n=r.split(",");for(let i=0;i<n.length;i++)t[n[i]]=!0;return e?i=>!!t[i.toLowerCase()]:i=>!!t[i]}const V9="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",K9=L1(V9);function Pg(r){if(Ee(r)){const e={};for(let t=0;t<r.length;t++){const n=r[t],i=Un(n)?W9(n):Pg(n);if(i)for(const a in i)e[a]=i[a]}return e}else{if(Un(r))return r;if(pn(r))return r}}const z9=/;(?![^(]*\))/g,X9=/:([^]+)/,Y9=/\/\*.*?\*\//gs;function W9(r){const e={};return r.replace(Y9,"").split(z9).forEach(t=>{if(t){const n=t.split(X9);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Ug(r){let e="";if(Un(r))e=r;else if(Ee(r))for(let t=0;t<r.length;t++){const n=Ug(r[t]);n&&(e+=n+" ")}else if(pn(r))for(const t in r)r[t]&&(e+=t+" ");return e.trim()}function q9(r){if(!r)return null;let{class:e,style:t}=r;return e&&!Un(e)&&(r.class=Ug(e)),t&&(r.style=Pg(t)),r}const Z9="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",J9=L1(Z9);function D2(r){return!!r||r===""}function t$(r,e){if(r.length!==e.length)return!1;let t=!0;for(let n=0;t&&n<r.length;n++)t=Ru(r[n],e[n]);return t}function Ru(r,e){if(r===e)return!0;let t=WO(r),n=WO(e);if(t||n)return t&&n?r.getTime()===e.getTime():!1;if(t=rg(r),n=rg(e),t||n)return r===e;if(t=Ee(r),n=Ee(e),t||n)return t&&n?t$(r,e):!1;if(t=pn(r),n=pn(e),t||n){if(!t||!n)return!1;const i=Object.keys(r).length,a=Object.keys(e).length;if(i!==a)return!1;for(const o in r){const s=r.hasOwnProperty(o),A=e.hasOwnProperty(o);if(s&&!A||!s&&A||!Ru(r[o],e[o]))return!1}}return String(r)===String(e)}function O1(r,e){return r.findIndex(t=>Ru(t,e))}const ou=r=>Un(r)?r:r==null?"":Ee(r)||pn(r)&&(r.toString===H2||!Ke(r.toString))?JSON.stringify(r,Q2,2):String(r),Q2=(r,e)=>e&&e.__v_isRef?Q2(r,e.value):ip(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,i])=>(t[`${n} =>`]=i,t),{})}:Bh(e)?{[`Set(${e.size})`]:[...e.values()]}:pn(e)&&!Ee(e)&&!G2(e)?String(e):e,on={},np=[],Ss=()=>{},e$=()=>!1,r$=/^on[^a-z]/,Dg=r=>r$.test(r),eF=r=>r.startsWith("onUpdate:"),zn=Object.assign,rF=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},n$=Object.prototype.hasOwnProperty,Fr=(r,e)=>n$.call(r,e),Ee=Array.isArray,ip=r=>Qg(r)==="[object Map]",Bh=r=>Qg(r)==="[object Set]",WO=r=>Qg(r)==="[object Date]",Ke=r=>typeof r=="function",Un=r=>typeof r=="string",rg=r=>typeof r=="symbol",pn=r=>r!==null&&typeof r=="object",nF=r=>pn(r)&&Ke(r.then)&&Ke(r.catch),H2=Object.prototype.toString,Qg=r=>H2.call(r),i$=r=>Qg(r).slice(8,-1),G2=r=>Qg(r)==="[object Object]",iF=r=>Un(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,Ov=L1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),R1=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},a$=/-(\w)/g,lo=R1(r=>r.replace(a$,(e,t)=>t?t.toUpperCase():"")),o$=/\B([A-Z])/g,Zo=R1(r=>r.replace(o$,"-$1").toLowerCase()),Hg=R1(r=>r.charAt(0).toUpperCase()+r.slice(1)),Rv=R1(r=>r?`on${Hg(r)}`:""),wp=(r,e)=>!Object.is(r,e),ap=(r,e)=>{for(let t=0;t<r.length;t++)r[t](e)},f_=(r,e,t)=>{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value:t})},hl=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let qO;const s$=()=>qO||(qO=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Fo;class aF{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Fo,!e&&Fo&&(this.index=(Fo.scopes||(Fo.scopes=[])).push(this)-1)}run(e){if(this.active){const t=Fo;try{return Fo=this,e()}finally{Fo=t}}}on(){Fo=this}off(){Fo=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this.active=!1}}}function A$(r){return new aF(r)}function k2(r,e=Fo){e&&e.active&&e.effects.push(r)}function l$(){return Fo}function u$(r){Fo&&Fo.cleanups.push(r)}const oF=r=>{const e=new Set(r);return e.w=0,e.n=0,e},$2=r=>(r.w&Mu)>0,j2=r=>(r.n&Mu)>0,c$=({deps:r})=>{if(r.length)for(let e=0;e<r.length;e++)r[e].w|=Mu},h$=r=>{const{deps:e}=r;if(e.length){let t=0;for(let n=0;n<e.length;n++){const i=e[n];$2(i)&&!j2(i)?i.delete(r):e[t++]=i,i.w&=~Mu,i.n&=~Mu}e.length=t}},BT=new WeakMap;let hv=0,Mu=1;const TT=30;let Bs;const zc=Symbol(""),xT=Symbol("");class Gg{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,k2(this,n)}run(){if(!this.active)return this.fn();let e=Bs,t=Tu;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=Bs,Bs=this,Tu=!0,Mu=1<<++hv,hv<=TT?c$(this):ZO(this),this.fn()}finally{hv<=TT&&h$(this),Mu=1<<--hv,Bs=this.parent,Tu=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Bs===this?this.deferStop=!0:this.active&&(ZO(this),this.onStop&&this.onStop(),this.active=!1)}}function ZO(r){const{deps:e}=r;if(e.length){for(let t=0;t<e.length;t++)e[t].delete(r);e.length=0}}function f$(r,e){r.effect&&(r=r.effect.fn);const t=new Gg(r);e&&(zn(t,e),e.scope&&k2(t,e.scope)),(!e||!e.lazy)&&t.run();const n=t.run.bind(t);return n.effect=t,n}function p$(r){r.effect.stop()}let Tu=!0;const V2=[];function Gp(){V2.push(Tu),Tu=!1}function kp(){const r=V2.pop();Tu=r===void 0?!0:r}function Po(r,e,t){if(Tu&&Bs){let n=BT.get(r);n||BT.set(r,n=new Map);let i=n.get(t);i||n.set(t,i=oF()),K2(i)}}function K2(r,e){let t=!1;hv<=TT?j2(r)||(r.n|=Mu,t=!$2(r)):t=!r.has(Bs),t&&(r.add(Bs),Bs.deps.push(r))}function fl(r,e,t,n,i,a){const o=BT.get(r);if(!o)return;let s=[];if(e==="clear")s=[...o.values()];else if(t==="length"&&Ee(r)){const A=hl(n);o.forEach((l,u)=>{(u==="length"||u>=A)&&s.push(l)})}else switch(t!==void 0&&s.push(o.get(t)),e){case"add":Ee(r)?iF(t)&&s.push(o.get("length")):(s.push(o.get(zc)),ip(r)&&s.push(o.get(xT)));break;case"delete":Ee(r)||(s.push(o.get(zc)),ip(r)&&s.push(o.get(xT)));break;case"set":ip(r)&&s.push(o.get(zc));break}if(s.length===1)s[0]&&ST(s[0]);else{const A=[];for(const l of s)l&&A.push(...l);ST(oF(A))}}function ST(r,e){const t=Ee(r)?r:[...r];for(const n of t)n.computed&&JO(n);for(const n of t)n.computed||JO(n)}function JO(r,e){(r!==Bs||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const d$=L1("__proto__,__v_isRef,__isVue"),z2=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(rg)),v$=M1(),g$=M1(!1,!0),y$=M1(!0),m$=M1(!0,!0),tR=_$();function _$(){const r={};return["includes","indexOf","lastIndexOf"].forEach(e=>{r[e]=function(...t){const n=Rr(this);for(let a=0,o=this.length;a<o;a++)Po(n,"get",a+"");const i=n[e](...t);return i===-1||i===!1?n[e](...t.map(Rr)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{r[e]=function(...t){Gp();const n=Rr(this)[e].apply(this,t);return kp(),n}}),r}function M1(r=!1,e=!1){return function(n,i,a){if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&a===(r?e?tD:J2:e?Z2:q2).get(n))return n;const o=Ee(n);if(!r&&o&&Fr(tR,i))return Reflect.get(tR,i,a);const s=Reflect.get(n,i,a);return(rg(i)?z2.has(i):d$(i))||(r||Po(n,"get",i),e)?s:Zi(s)?o&&iF(i)?s:s.value:pn(s)?r?AF(s):kg(s):s}}const w$=X2(),E$=X2(!0);function X2(r=!1){return function(t,n,i,a){let o=t[n];if(Ah(o)&&Zi(o)&&!Zi(i))return!1;if(!r&&(!ng(i)&&!Ah(i)&&(o=Rr(o),i=Rr(i)),!Ee(t)&&Zi(o)&&!Zi(i)))return o.value=i,!0;const s=Ee(t)&&iF(n)?Number(n)<t.length:Fr(t,n),A=Reflect.set(t,n,i,a);return t===Rr(a)&&(s?wp(i,o)&&fl(t,"set",n,i):fl(t,"add",n,i)),A}}function C$(r,e){const t=Fr(r,e);r[e];const n=Reflect.deleteProperty(r,e);return n&&t&&fl(r,"delete",e,void 0),n}function B$(r,e){const t=Reflect.has(r,e);return(!rg(e)||!z2.has(e))&&Po(r,"has",e),t}function T$(r){return Po(r,"iterate",Ee(r)?"length":zc),Reflect.ownKeys(r)}const Y2={get:v$,set:w$,deleteProperty:C$,has:B$,ownKeys:T$},W2={get:y$,set(r,e){return!0},deleteProperty(r,e){return!0}},x$=zn({},Y2,{get:g$,set:E$}),S$=zn({},W2,{get:m$}),sF=r=>r,N1=r=>Reflect.getPrototypeOf(r);function fm(r,e,t=!1,n=!1){r=r.__v_raw;const i=Rr(r),a=Rr(e);t||(e!==a&&Po(i,"get",e),Po(i,"get",a));const{has:o}=N1(i),s=n?sF:t?cF:ig;if(o.call(i,e))return s(r.get(e));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(e)}function pm(r,e=!1){const t=this.__v_raw,n=Rr(t),i=Rr(r);return e||(r!==i&&Po(n,"has",r),Po(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function dm(r,e=!1){return r=r.__v_raw,!e&&Po(Rr(r),"iterate",zc),Reflect.get(r,"size",r)}function eR(r){r=Rr(r);const e=Rr(this);return N1(e).has.call(e,r)||(e.add(r),fl(e,"add",r,r)),this}function rR(r,e){e=Rr(e);const t=Rr(this),{has:n,get:i}=N1(t);let a=n.call(t,r);a||(r=Rr(r),a=n.call(t,r));const o=i.call(t,r);return t.set(r,e),a?wp(e,o)&&fl(t,"set",r,e):fl(t,"add",r,e),this}function nR(r){const e=Rr(this),{has:t,get:n}=N1(e);let i=t.call(e,r);i||(r=Rr(r),i=t.call(e,r)),n&&n.call(e,r);const a=e.delete(r);return i&&fl(e,"delete",r,void 0),a}function iR(){const r=Rr(this),e=r.size!==0,t=r.clear();return e&&fl(r,"clear",void 0,void 0),t}function vm(r,e){return function(n,i){const a=this,o=a.__v_raw,s=Rr(o),A=e?sF:r?cF:ig;return!r&&Po(s,"iterate",zc),o.forEach((l,u)=>n.call(i,A(l),A(u),a))}}function gm(r,e,t){return function(...n){const i=this.__v_raw,a=Rr(i),o=ip(a),s=r==="entries"||r===Symbol.iterator&&o,A=r==="keys"&&o,l=i[r](...n),u=t?sF:e?cF:ig;return!e&&Po(a,"iterate",A?xT:zc),{next(){const{value:c,done:h}=l.next();return h?{value:c,done:h}:{value:s?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function Xl(r){return function(...e){return r==="delete"?!1:this}}function b$(){const r={get(a){return fm(this,a)},get size(){return dm(this)},has:pm,add:eR,set:rR,delete:nR,clear:iR,forEach:vm(!1,!1)},e={get(a){return fm(this,a,!1,!0)},get size(){return dm(this)},has:pm,add:eR,set:rR,delete:nR,clear:iR,forEach:vm(!1,!0)},t={get(a){return fm(this,a,!0)},get size(){return dm(this,!0)},has(a){return pm.call(this,a,!0)},add:Xl("add"),set:Xl("set"),delete:Xl("delete"),clear:Xl("clear"),forEach:vm(!0,!1)},n={get(a){return fm(this,a,!0,!0)},get size(){return dm(this,!0)},has(a){return pm.call(this,a,!0)},add:Xl("add"),set:Xl("set"),delete:Xl("delete"),clear:Xl("clear"),forEach:vm(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=gm(a,!1,!1),t[a]=gm(a,!0,!1),e[a]=gm(a,!1,!0),n[a]=gm(a,!0,!0)}),[r,t,e,n]}const[F$,I$,L$,O$]=b$();function P1(r,e){const t=e?r?O$:L$:r?I$:F$;return(n,i,a)=>i==="__v_isReactive"?!r:i==="__v_isReadonly"?r:i==="__v_raw"?n:Reflect.get(Fr(t,i)&&i in n?t:n,i,a)}const R$={get:P1(!1,!1)},M$={get:P1(!1,!0)},N$={get:P1(!0,!1)},P$={get:P1(!0,!0)},q2=new WeakMap,Z2=new WeakMap,J2=new WeakMap,tD=new WeakMap;function U$(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function D$(r){return r.__v_skip||!Object.isExtensible(r)?0:U$(i$(r))}function kg(r){return Ah(r)?r:U1(r,!1,Y2,R$,q2)}function eD(r){return U1(r,!1,x$,M$,Z2)}function AF(r){return U1(r,!0,W2,N$,J2)}function Q$(r){return U1(r,!0,S$,P$,tD)}function U1(r,e,t,n,i){if(!pn(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const a=i.get(r);if(a)return a;const o=D$(r);if(o===0)return r;const s=new Proxy(r,o===2?n:t);return i.set(r,s),s}function Xc(r){return Ah(r)?Xc(r.__v_raw):!!(r&&r.__v_isReactive)}function Ah(r){return!!(r&&r.__v_isReadonly)}function ng(r){return!!(r&&r.__v_isShallow)}function lF(r){return Xc(r)||Ah(r)}function Rr(r){const e=r&&r.__v_raw;return e?Rr(e):r}function uF(r){return f_(r,"__v_skip",!0),r}const ig=r=>pn(r)?kg(r):r,cF=r=>pn(r)?AF(r):r;function hF(r){Tu&&Bs&&(r=Rr(r),K2(r.dep||(r.dep=oF())))}function D1(r,e){r=Rr(r),r.dep&&ST(r.dep)}function Zi(r){return!!(r&&r.__v_isRef===!0)}function kn(r){return rD(r,!1)}function H$(r){return rD(r,!0)}function rD(r,e){return Zi(r)?r:new G$(r,e)}class G${constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Rr(e),this._value=t?e:ig(e)}get value(){return hF(this),this._value}set value(e){const t=this.__v_isShallow||ng(e)||Ah(e);e=t?e:Rr(e),wp(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:ig(e),D1(this))}}function k$(r){D1(r)}function nD(r){return Zi(r)?r.value:r}const $$={get:(r,e,t)=>nD(Reflect.get(r,e,t)),set:(r,e,t,n)=>{const i=r[e];return Zi(i)&&!Zi(t)?(i.value=t,!0):Reflect.set(r,e,t,n)}};function fF(r){return Xc(r)?r:new Proxy(r,$$)}class j${constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e(()=>hF(this),()=>D1(this));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function V$(r){return new j$(r)}function Nu(r){const e=Ee(r)?new Array(r.length):{};for(const t in r)e[t]=iD(r,t);return e}class K${constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}}function iD(r,e,t){const n=r[e];return Zi(n)?n:new K$(r,e,t)}var aD;class z${constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[aD]=!1,this._dirty=!0,this.effect=new Gg(e,()=>{this._dirty||(this._dirty=!0,D1(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Rr(this);return hF(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}aD="__v_isReadonly";function X$(r,e,t=!1){let n,i;const a=Ke(r);return a?(n=r,i=Ss):(n=r.get,i=r.set),new z$(n,i,a||!i,t)}function Y$(r,...e){}function rl(r,e,t,n){let i;try{i=n?r(...n):r()}catch(a){Th(a,e,t)}return i}function No(r,e,t,n){if(Ke(r)){const a=rl(r,e,t,n);return a&&nF(a)&&a.catch(o=>{Th(o,e,t)}),a}const i=[];for(let a=0;a<r.length;a++)i.push(No(r[a],e,t,n));return i}function Th(r,e,t,n=!0){const i=e?e.vnode:null;if(e){let a=e.parent;const o=e.proxy,s=t;for(;a;){const l=a.ec;if(l){for(let u=0;u<l.length;u++)if(l[u](r,o,s)===!1)return}a=a.parent}const A=e.appContext.config.errorHandler;if(A){rl(A,null,10,[r,o,s]);return}}W$(r,t,i,n)}function W$(r,e,t,n=!0){console.error(r)}let ag=!1,bT=!1;const Ba=[];let Ys=0;const op=[];let XA=null,Mc=0;const oD=Promise.resolve();let pF=null;function dF(r){const e=pF||oD;return r?e.then(this?r.bind(this):r):e}function q$(r){let e=Ys+1,t=Ba.length;for(;e<t;){const n=e+t>>>1;og(Ba[n])<r?e=n+1:t=n}return e}function Q1(r){(!Ba.length||!Ba.includes(r,ag&&r.allowRecurse?Ys+1:Ys))&&(r.id==null?Ba.push(r):Ba.splice(q$(r.id),0,r),sD())}function sD(){!ag&&!bT&&(bT=!0,pF=oD.then(AD))}function Z$(r){const e=Ba.indexOf(r);e>Ys&&Ba.splice(e,1)}function vF(r){Ee(r)?op.push(...r):(!XA||!XA.includes(r,r.allowRecurse?Mc+1:Mc))&&op.push(r),sD()}function aR(r,e=ag?Ys+1:0){for(;e<Ba.length;e++){const t=Ba[e];t&&t.pre&&(Ba.splice(e,1),e--,t())}}function p_(r){if(op.length){const e=[...new Set(op)];if(op.length=0,XA){XA.push(...e);return}for(XA=e,XA.sort((t,n)=>og(t)-og(n)),Mc=0;Mc<XA.length;Mc++)XA[Mc]();XA=null,Mc=0}}const og=r=>r.id==null?1/0:r.id,J$=(r,e)=>{const t=og(r)-og(e);if(t===0){if(r.pre&&!e.pre)return-1;if(e.pre&&!r.pre)return 1}return t};function AD(r){bT=!1,ag=!0,Ba.sort(J$);const e=Ss;try{for(Ys=0;Ys<Ba.length;Ys++){const t=Ba[Ys];t&&t.active!==!1&&rl(t,null,14)}}finally{Ys=0,Ba.length=0,p_(),ag=!1,pF=null,(Ba.length||op.length)&&AD()}}let Rf,ym=[];function lD(r,e){var t,n;Rf=r,Rf?(Rf.enabled=!0,ym.forEach(({event:i,args:a})=>Rf.emit(i,...a)),ym=[]):typeof window<"u"&&window.HTMLElement&&!(!((n=(t=window.navigator)===null||t===void 0?void 0:t.userAgent)===null||n===void 0)&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{lD(a,e)}),setTimeout(()=>{Rf||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ym=[])},3e3)):ym=[]}function tj(r,e,...t){if(r.isUnmounted)return;const n=r.vnode.props||on;let i=t;const a=e.startsWith("update:"),o=a&&e.slice(7);if(o&&o in n){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:c,trim:h}=n[u]||on;h&&(i=t.map(f=>Un(f)?f.trim():f)),c&&(i=t.map(hl))}let s,A=n[s=Rv(e)]||n[s=Rv(lo(e))];!A&&a&&(A=n[s=Rv(Zo(e))]),A&&No(A,r,6,i);const l=n[s+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[s])return;r.emitted[s]=!0,No(l,r,6,i)}}function uD(r,e,t=!1){const n=e.emitsCache,i=n.get(r);if(i!==void 0)return i;const a=r.emits;let o={},s=!1;if(!Ke(r)){const A=l=>{const u=uD(l,e,!0);u&&(s=!0,zn(o,u))};!t&&e.mixins.length&&e.mixins.forEach(A),r.extends&&A(r.extends),r.mixins&&r.mixins.forEach(A)}return!a&&!s?(pn(r)&&n.set(r,null),null):(Ee(a)?a.forEach(A=>o[A]=null):zn(o,a),pn(r)&&n.set(r,o),o)}function H1(r,e){return!r||!Dg(e)?!1:(e=e.slice(2).replace(/Once$/,""),Fr(r,e[0].toLowerCase()+e.slice(1))||Fr(r,Zo(e))||Fr(r,e))}let oa=null,G1=null;function sg(r){const e=oa;return oa=r,G1=r&&r.type.__scopeId||null,e}function cD(r){G1=r}function hD(){G1=null}const ej=r=>Qc;function Qc(r,e=oa,t){if(!e||r._n)return r;const n=(...i)=>{n._d&&NT(-1);const a=sg(e);let o;try{o=r(...i)}finally{sg(a),n._d&&NT(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function N0(r){const{type:e,vnode:t,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:A,emit:l,render:u,renderCache:c,data:h,setupState:f,ctx:p,inheritAttrs:v}=r;let m,g;const _=sg(r);try{if(t.shapeFlag&4){const B=i||n;m=Io(u.call(B,B,c,a,f,h,p)),g=A}else{const B=e;m=Io(B.length>1?B(a,{attrs:A,slots:s,emit:l}):B(a,null)),g=e.props?A:nj(A)}}catch(B){Pv.length=0,Th(B,r,1),m=Zr(xa)}let E=m;if(g&&v!==!1){const B=Object.keys(g),{shapeFlag:L}=E;B.length&&L&7&&(o&&B.some(eF)&&(g=ij(g,o)),E=uA(E,g))}return t.dirs&&(E=uA(E),E.dirs=E.dirs?E.dirs.concat(t.dirs):t.dirs),t.transition&&(E.transition=t.transition),m=E,sg(_),m}function rj(r){let e;for(let t=0;t<r.length;t++){const n=r[t];if(Pu(n)){if(n.type!==xa||n.children==="v-if"){if(e)return;e=n}}else return}return e}const nj=r=>{let e;for(const t in r)(t==="class"||t==="style"||Dg(t))&&((e||(e={}))[t]=r[t]);return e},ij=(r,e)=>{const t={};for(const n in r)(!eF(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function aj(r,e,t){const{props:n,children:i,component:a}=r,{props:o,children:s,patchFlag:A}=e,l=a.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&A>=0){if(A&1024)return!0;if(A&16)return n?oR(n,o,l):!!o;if(A&8){const u=e.dynamicProps;for(let c=0;c<u.length;c++){const h=u[c];if(o[h]!==n[h]&&!H1(l,h))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:n===o?!1:n?o?oR(n,o,l):!0:!!o;return!1}function oR(r,e,t){const n=Object.keys(e);if(n.length!==Object.keys(r).length)return!0;for(let i=0;i<n.length;i++){const a=n[i];if(e[a]!==r[a]&&!H1(t,a))return!0}return!1}function gF({vnode:r,parent:e},t){for(;e&&e.subTree===r;)(r=e.vnode).el=t,e=e.parent}const fD=r=>r.__isSuspense,oj={name:"Suspense",__isSuspense:!0,process(r,e,t,n,i,a,o,s,A,l){r==null?Aj(e,t,n,i,a,o,s,A,l):lj(r,e,t,n,i,o,s,A,l)},hydrate:uj,create:yF,normalize:cj},sj=oj;function Ag(r,e){const t=r.props&&r.props[e];Ke(t)&&t()}function Aj(r,e,t,n,i,a,o,s,A){const{p:l,o:{createElement:u}}=A,c=u("div"),h=r.suspense=yF(r,i,n,e,c,t,a,o,s,A);l(null,h.pendingBranch=r.ssContent,c,null,n,h,a,o),h.deps>0?(Ag(r,"onPending"),Ag(r,"onFallback"),l(null,r.ssFallback,e,t,n,null,a,o),sp(h,r.ssFallback)):h.resolve()}function lj(r,e,t,n,i,a,o,s,{p:A,um:l,o:{createElement:u}}){const c=e.suspense=r.suspense;c.vnode=e,e.el=r.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:p,pendingBranch:v,isInFallback:m,isHydrating:g}=c;if(v)c.pendingBranch=h,Ws(h,v)?(A(v,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():m&&(A(p,f,t,n,i,null,a,o,s),sp(c,f))):(c.pendingId++,g?(c.isHydrating=!1,c.activeBranch=v):l(v,i,c),c.deps=0,c.effects.length=0,c.hiddenContainer=u("div"),m?(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():(A(p,f,t,n,i,null,a,o,s),sp(c,f))):p&&Ws(h,p)?(A(p,h,t,n,i,c,a,o,s),c.resolve(!0)):(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0&&c.resolve()));else if(p&&Ws(h,p))A(p,h,t,n,i,c,a,o,s),sp(c,h);else if(Ag(e,"onPending"),c.pendingBranch=h,c.pendingId++,A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0)c.resolve();else{const{timeout:_,pendingId:E}=c;_>0?setTimeout(()=>{c.pendingId===E&&c.fallback(f)},_):_===0&&c.fallback(f)}}function yF(r,e,t,n,i,a,o,s,A,l,u=!1){const{p:c,m:h,um:f,n:p,o:{parentNode:v,remove:m}}=l,g=hl(r.props&&r.props.timeout),_={vnode:r,parent:e,parentComponent:t,isSVG:o,container:n,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof g=="number"?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(E=!1){const{vnode:B,activeBranch:L,pendingBranch:O,pendingId:b,effects:T,parentComponent:F,container:M}=_;if(_.isHydrating)_.isHydrating=!1;else if(!E){const N=L&&O.transition&&O.transition.mode==="out-in";N&&(L.transition.afterLeave=()=>{b===_.pendingId&&h(O,M,P,0)});let{anchor:P}=_;L&&(P=p(L),f(L,F,_,!0)),N||h(O,M,P,0)}sp(_,O),_.pendingBranch=null,_.isInFallback=!1;let S=_.parent,x=!1;for(;S;){if(S.pendingBranch){S.effects.push(...T),x=!0;break}S=S.parent}x||vF(T),_.effects=[],Ag(B,"onResolve")},fallback(E){if(!_.pendingBranch)return;const{vnode:B,activeBranch:L,parentComponent:O,container:b,isSVG:T}=_;Ag(B,"onFallback");const F=p(L),M=()=>{_.isInFallback&&(c(null,E,b,F,O,null,T,s,A),sp(_,E))},S=E.transition&&E.transition.mode==="out-in";S&&(L.transition.afterLeave=M),_.isInFallback=!0,f(L,O,null,!0),S||M()},move(E,B,L){_.activeBranch&&h(_.activeBranch,E,B,L),_.container=E},next(){return _.activeBranch&&p(_.activeBranch)},registerDep(E,B){const L=!!_.pendingBranch;L&&_.deps++;const O=E.vnode.el;E.asyncDep.catch(b=>{Th(b,E,0)}).then(b=>{if(E.isUnmounted||_.isUnmounted||_.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:T}=E;PT(E,b,!1),O&&(T.el=O);const F=!O&&E.subTree.el;B(E,T,v(O||E.subTree.el),O?null:p(E.subTree),_,o,A),F&&m(F),gF(E,T.el),L&&--_.deps===0&&_.resolve()})},unmount(E,B){_.isUnmounted=!0,_.activeBranch&&f(_.activeBranch,t,E,B),_.pendingBranch&&f(_.pendingBranch,t,E,B)}};return _}function uj(r,e,t,n,i,a,o,s,A){const l=e.suspense=yF(e,n,t,r.parentNode,document.createElement("div"),null,i,a,o,s,!0),u=A(r,l.pendingBranch=e.ssContent,t,l,a,o);return l.deps===0&&l.resolve(),u}function cj(r){const{shapeFlag:e,children:t}=r,n=e&32;r.ssContent=sR(n?t.default:t),r.ssFallback=n?sR(t.fallback):Zr(xa)}function sR(r){let e;if(Ke(r)){const t=ch&&r._c;t&&(r._d=!1,fn()),r=r(),t&&(r._d=!0,e=Ao,kD())}return Ee(r)&&(r=rj(r)),r=Io(r),e&&!r.dynamicChildren&&(r.dynamicChildren=e.filter(t=>t!==r)),r}function pD(r,e){e&&e.pendingBranch?Ee(r)?e.effects.push(...r):e.effects.push(r):vF(r)}function sp(r,e){r.activeBranch=e;const{vnode:t,parentComponent:n}=r,i=t.el=e.el;n&&n.subTree===t&&(n.vnode.el=i,gF(n,i))}function Pr(r,e){if(Pi){let t=Pi.provides;const n=Pi.parent&&Pi.parent.provides;n===t&&(t=Pi.provides=Object.create(n)),t[r]=e}}function Be(r,e,t=!1){const n=Pi||oa;if(n){const i=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&r in i)return i[r];if(arguments.length>1)return t&&Ke(e)?e.call(n.proxy):e}}function dD(r,e){return $g(r,null,e)}function vD(r,e){return $g(r,null,{flush:"post"})}function hj(r,e){return $g(r,null,{flush:"sync"})}const mm={};function fe(r,e,t){return $g(r,e,t)}function $g(r,e,{immediate:t,deep:n,flush:i,onTrack:a,onTrigger:o}=on){const s=Pi;let A,l=!1,u=!1;if(Zi(r)?(A=()=>r.value,l=ng(r)):Xc(r)?(A=()=>r,n=!0):Ee(r)?(u=!0,l=r.some(E=>Xc(E)||ng(E)),A=()=>r.map(E=>{if(Zi(E))return E.value;if(Xc(E))return Hc(E);if(Ke(E))return rl(E,s,2)})):Ke(r)?e?A=()=>rl(r,s,2):A=()=>{if(!(s&&s.isUnmounted))return c&&c(),No(r,s,3,[h])}:A=Ss,e&&n){const E=A;A=()=>Hc(E())}let c,h=E=>{c=g.onStop=()=>{rl(E,s,4)}},f;if(Cp)if(h=Ss,e?t&&No(e,s,3,[A(),u?[]:void 0,h]):A(),i==="sync"){const E=eQ();f=E.__watcherHandles||(E.__watcherHandles=[])}else return Ss;let p=u?new Array(r.length).fill(mm):mm;const v=()=>{if(g.active)if(e){const E=g.run();(n||l||(u?E.some((B,L)=>wp(B,p[L])):wp(E,p)))&&(c&&c(),No(e,s,3,[E,p===mm?void 0:u&&p[0]===mm?[]:p,h]),p=E)}else g.run()};v.allowRecurse=!!e;let m;i==="sync"?m=v:i==="post"?m=()=>na(v,s&&s.suspense):(v.pre=!0,s&&(v.id=s.uid),m=()=>Q1(v));const g=new Gg(A,m);e?t?v():p=g.run():i==="post"?na(g.run.bind(g),s&&s.suspense):g.run();const _=()=>{g.stop(),s&&s.scope&&rF(s.scope.effects,g)};return f&&f.push(_),_}function fj(r,e,t){const n=this.proxy,i=Un(r)?r.includes(".")?gD(n,r):()=>n[r]:r.bind(n,n);let a;Ke(e)?a=e:(a=e.handler,t=e);const o=Pi;Uu(this);const s=$g(i,a.bind(n),t);return o?Uu(o):xu(),s}function gD(r,e){const t=e.split(".");return()=>{let n=r;for(let i=0;i<t.length&&n;i++)n=n[t[i]];return n}}function Hc(r,e){if(!pn(r)||r.__v_skip||(e=e||new Set,e.has(r)))return r;if(e.add(r),Zi(r))Hc(r.value,e);else if(Ee(r))for(let t=0;t<r.length;t++)Hc(r[t],e);else if(Bh(r)||ip(r))r.forEach(t=>{Hc(t,e)});else if(G2(r))for(const t in r)Hc(r[t],e);return r}function mF(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Je(()=>{r.isMounted=!0}),V1(()=>{r.isUnmounting=!0}),r}const Ko=[Function,Array],pj={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ko,onEnter:Ko,onAfterEnter:Ko,onEnterCancelled:Ko,onBeforeLeave:Ko,onLeave:Ko,onAfterLeave:Ko,onLeaveCancelled:Ko,onBeforeAppear:Ko,onAppear:Ko,onAfterAppear:Ko,onAppearCancelled:Ko},setup(r,{slots:e}){const t=Ju(),n=mF();let i;return()=>{const a=e.default&&k1(e.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const v of a)if(v.type!==xa){o=v;break}}const s=Rr(r),{mode:A}=s;if(n.isLeaving)return AC(o);const l=AR(o);if(!l)return AC(o);const u=Ep(l,s,n,t);lh(l,u);const c=t.subTree,h=c&&AR(c);let f=!1;const{getTransitionKey:p}=l.type;if(p){const v=p();i===void 0?i=v:v!==i&&(i=v,f=!0)}if(h&&h.type!==xa&&(!Ws(l,h)||f)){const v=Ep(h,s,n,t);if(lh(h,v),A==="out-in")return n.isLeaving=!0,v.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},AC(o);A==="in-out"&&l.type!==xa&&(v.delayLeave=(m,g,_)=>{const E=yD(n,h);E[String(h.key)]=h,m._leaveCb=()=>{g(),m._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=_})}return o}}},_F=pj;function yD(r,e){const{leavingVNodes:t}=r;let n=t.get(e.type);return n||(n=Object.create(null),t.set(e.type,n)),n}function Ep(r,e,t,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:A,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:c,onLeave:h,onAfterLeave:f,onLeaveCancelled:p,onBeforeAppear:v,onAppear:m,onAfterAppear:g,onAppearCancelled:_}=e,E=String(r.key),B=yD(t,r),L=(T,F)=>{T&&No(T,n,9,F)},O=(T,F)=>{const M=F[1];L(T,F),Ee(T)?T.every(S=>S.length<=1)&&M():T.length<=1&&M()},b={mode:a,persisted:o,beforeEnter(T){let F=s;if(!t.isMounted)if(i)F=v||s;else return;T._leaveCb&&T._leaveCb(!0);const M=B[E];M&&Ws(r,M)&&M.el._leaveCb&&M.el._leaveCb(),L(F,[T])},enter(T){let F=A,M=l,S=u;if(!t.isMounted)if(i)F=m||A,M=g||l,S=_||u;else return;let x=!1;const N=T._enterCb=P=>{x||(x=!0,P?L(S,[T]):L(M,[T]),b.delayedLeave&&b.delayedLeave(),T._enterCb=void 0)};F?O(F,[T,N]):N()},leave(T,F){const M=String(r.key);if(T._enterCb&&T._enterCb(!0),t.isUnmounting)return F();L(c,[T]);let S=!1;const x=T._leaveCb=N=>{S||(S=!0,F(),N?L(p,[T]):L(f,[T]),T._leaveCb=void 0,B[M]===r&&delete B[M])};B[M]=r,h?O(h,[T,x]):x()},clone(T){return Ep(T,e,t,n)}};return b}function AC(r){if(jg(r))return r=uA(r),r.children=null,r}function AR(r){return jg(r)?r.children?r.children[0]:void 0:r}function lh(r,e){r.shapeFlag&6&&r.component?lh(r.component.subTree,e):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}function k1(r,e=!1,t){let n=[],i=0;for(let a=0;a<r.length;a++){let o=r[a];const s=t==null?o.key:String(t)+String(o.key!=null?o.key:a);o.type===Mi?(o.patchFlag&128&&i++,n=n.concat(k1(o.children,e,s))):(e||o.type!==xa)&&n.push(s!=null?uA(o,{key:s}):o)}if(i>1)for(let a=0;a<n.length;a++)n[a].patchFlag=-2;return n}function wF(r){return Ke(r)?{setup:r,name:r.name}:r}const Yc=r=>!!r.type.__asyncLoader;function dj(r){Ke(r)&&(r={loader:r});const{loader:e,loadingComponent:t,errorComponent:n,delay:i=200,timeout:a,suspensible:o=!0,onError:s}=r;let A=null,l,u=0;const c=()=>(u++,A=null,h()),h=()=>{let f;return A||(f=A=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),s)return new Promise((v,m)=>{s(p,()=>v(c()),()=>m(p),u+1)});throw p}).then(p=>f!==A&&A?A:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),l=p,p)))};return wF({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return l},setup(){const f=Pi;if(l)return()=>lC(l,f);const p=_=>{A=null,Th(_,f,13,!n)};if(o&&f.suspense||Cp)return h().then(_=>()=>lC(_,f)).catch(_=>(p(_),()=>n?Zr(n,{error:_}):null));const v=kn(!1),m=kn(),g=kn(!!i);return i&&setTimeout(()=>{g.value=!1},i),a!=null&&setTimeout(()=>{if(!v.value&&!m.value){const _=new Error(`Async component timed out after ${a}ms.`);p(_),m.value=_}},a),h().then(()=>{v.value=!0,f.parent&&jg(f.parent.vnode)&&Q1(f.parent.update)}).catch(_=>{p(_),m.value=_}),()=>{if(v.value&&l)return lC(l,f);if(m.value&&n)return Zr(n,{error:m.value});if(t&&!g.value)return Zr(t)}}})}function lC(r,e){const{ref:t,props:n,children:i,ce:a}=e.vnode,o=Zr(r,n,i);return o.ref=t,o.ce=a,delete e.vnode.ce,o}const jg=r=>r.type.__isKeepAlive,vj={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:e}){const t=Ju(),n=t.ctx;if(!n.renderer)return()=>{const _=e.default&&e.default();return _&&_.length===1?_[0]:_};const i=new Map,a=new Set;let o=null;const s=t.suspense,{renderer:{p:A,m:l,um:u,o:{createElement:c}}}=n,h=c("div");n.activate=(_,E,B,L,O)=>{const b=_.component;l(_,E,B,0,s),A(b.vnode,_,E,B,b,s,L,_.slotScopeIds,O),na(()=>{b.isDeactivated=!1,b.a&&ap(b.a);const T=_.props&&_.props.onVnodeMounted;T&&io(T,b.parent,_)},s)},n.deactivate=_=>{const E=_.component;l(_,h,null,1,s),na(()=>{E.da&&ap(E.da);const B=_.props&&_.props.onVnodeUnmounted;B&&io(B,E.parent,_),E.isDeactivated=!0},s)};function f(_){uC(_),u(_,t,s,!0)}function p(_){i.forEach((E,B)=>{const L=DT(E.type);L&&(!_||!_(L))&&v(B)})}function v(_){const E=i.get(_);!o||E.type!==o.type?f(E):o&&uC(o),i.delete(_),a.delete(_)}fe(()=>[r.include,r.exclude],([_,E])=>{_&&p(B=>fv(_,B)),E&&p(B=>!fv(E,B))},{flush:"post",deep:!0});let m=null;const g=()=>{m!=null&&i.set(m,cC(t.subTree))};return Je(g),j1(g),V1(()=>{i.forEach(_=>{const{subTree:E,suspense:B}=t,L=cC(E);if(_.type===L.type){uC(L);const O=L.component.da;O&&na(O,B);return}f(_)})}),()=>{if(m=null,!e.default)return null;const _=e.default(),E=_[0];if(_.length>1)return o=null,_;if(!Pu(E)||!(E.shapeFlag&4)&&!(E.shapeFlag&128))return o=null,E;let B=cC(E);const L=B.type,O=DT(Yc(B)?B.type.__asyncResolved||{}:L),{include:b,exclude:T,max:F}=r;if(b&&(!O||!fv(b,O))||T&&O&&fv(T,O))return o=B,E;const M=B.key==null?L:B.key,S=i.get(M);return B.el&&(B=uA(B),E.shapeFlag&128&&(E.ssContent=B)),m=M,S?(B.el=S.el,B.component=S.component,B.transition&&lh(B,B.transition),B.shapeFlag|=512,a.delete(M),a.add(M)):(a.add(M),F&&a.size>parseInt(F,10)&&v(a.values().next().value)),B.shapeFlag|=256,o=B,fD(E.type)?E:B}}},gj=vj;function fv(r,e){return Ee(r)?r.some(t=>fv(t,e)):Un(r)?r.split(",").includes(e):r.test?r.test(e):!1}function mD(r,e){wD(r,"a",e)}function _D(r,e){wD(r,"da",e)}function wD(r,e,t=Pi){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if($1(e,n,t),t){let i=t.parent;for(;i&&i.parent;)jg(i.parent.vnode)&&yj(n,e,t,i),i=i.parent}}function yj(r,e,t,n){const i=$1(e,r,n,!0);ar(()=>{rF(n[e],i)},t)}function uC(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function cC(r){return r.shapeFlag&128?r.ssContent:r}function $1(r,e,t=Pi,n=!1){if(t){const i=t[r]||(t[r]=[]),a=e.__weh||(e.__weh=(...o)=>{if(t.isUnmounted)return;Gp(),Uu(t);const s=No(e,t,r,o);return xu(),kp(),s});return n?i.unshift(a):i.push(a),a}}const wl=r=>(e,t=Pi)=>(!Cp||r==="sp")&&$1(r,(...n)=>e(...n),t),ED=wl("bm"),Je=wl("m"),CD=wl("bu"),j1=wl("u"),V1=wl("bum"),ar=wl("um"),BD=wl("sp"),TD=wl("rtg"),xD=wl("rtc");function SD(r,e=Pi){$1("ec",r,e)}function mj(r,e){const t=oa;if(t===null)return r;const n=z1(t)||t.proxy,i=r.dirs||(r.dirs=[]);for(let a=0;a<e.length;a++){let[o,s,A,l=on]=e[a];o&&(Ke(o)&&(o={mounted:o,updated:o}),o.deep&&Hc(s),i.push({dir:o,instance:n,value:s,oldValue:void 0,arg:A,modifiers:l}))}return r}function zs(r,e,t,n){const i=r.dirs,a=e&&e.dirs;for(let o=0;o<i.length;o++){const s=i[o];a&&(s.oldValue=a[o].value);let A=s.dir[n];A&&(Gp(),No(A,t,8,[r.el,s,r,e]),kp())}}const EF="components",_j="directives";function Mf(r,e){return CF(EF,r,!0,e)||r}const bD=Symbol();function wj(r){return Un(r)?CF(EF,r,!1)||r:r||bD}function Ej(r){return CF(_j,r)}function CF(r,e,t=!0,n=!1){const i=oa||Pi;if(i){const a=i.type;if(r===EF){const s=DT(a,!1);if(s&&(s===e||s===lo(e)||s===Hg(lo(e))))return a}const o=lR(i[r]||a[r],e)||lR(i.appContext[r],e);return!o&&n?a:o}}function lR(r,e){return r&&(r[e]||r[lo(e)]||r[Hg(lo(e))])}function FD(r,e,t,n){let i;const a=t&&t[n];if(Ee(r)||Un(r)){i=new Array(r.length);for(let o=0,s=r.length;o<s;o++)i[o]=e(r[o],o,void 0,a&&a[o])}else if(typeof r=="number"){i=new Array(r);for(let o=0;o<r;o++)i[o]=e(o+1,o,void 0,a&&a[o])}else if(pn(r))if(r[Symbol.iterator])i=Array.from(r,(o,s)=>e(o,s,void 0,a&&a[s]));else{const o=Object.keys(r);i=new Array(o.length);for(let s=0,A=o.length;s<A;s++){const l=o[s];i[s]=e(r[l],l,s,a&&a[s])}}else i=[];return t&&(t[n]=i),i}function Cj(r,e){for(let t=0;t<e.length;t++){const n=e[t];if(Ee(n))for(let i=0;i<n.length;i++)r[n[i].name]=n[i].fn;else n&&(r[n.name]=n.key?(...i)=>{const a=n.fn(...i);return a&&(a.key=n.key),a}:n.fn)}return r}function _r(r,e,t={},n,i){if(oa.isCE||oa.parent&&Yc(oa.parent)&&oa.parent.isCE)return e!=="default"&&(t.name=e),Zr("slot",t,n&&n());let a=r[e];a&&a._c&&(a._d=!1),fn();const o=a&&ID(a(t)),s=Vg(Mi,{key:t.key||o&&o.key||`_${e}`},o||(n?n():[]),o&&r._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),a&&a._c&&(a._d=!0),s}function ID(r){return r.some(e=>Pu(e)?!(e.type===xa||e.type===Mi&&!ID(e.children)):!0)?r:null}function Bj(r,e){const t={};for(const n in r)t[e&&/[A-Z]/.test(n)?`on:${n}`:Rv(n)]=r[n];return t}const FT=r=>r?XD(r)?z1(r)||r.proxy:FT(r.parent):null,Mv=zn(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>FT(r.parent),$root:r=>FT(r.root),$emit:r=>r.emit,$options:r=>BF(r),$forceUpdate:r=>r.f||(r.f=()=>Q1(r.update)),$nextTick:r=>r.n||(r.n=dF.bind(r.proxy)),$watch:r=>fj.bind(r)}),hC=(r,e)=>r!==on&&!r.__isScriptSetup&&Fr(r,e),IT={get({_:r},e){const{ctx:t,setupState:n,data:i,props:a,accessCache:o,type:s,appContext:A}=r;let l;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return n[e];case 2:return i[e];case 4:return t[e];case 3:return a[e]}else{if(hC(n,e))return o[e]=1,n[e];if(i!==on&&Fr(i,e))return o[e]=2,i[e];if((l=r.propsOptions[0])&&Fr(l,e))return o[e]=3,a[e];if(t!==on&&Fr(t,e))return o[e]=4,t[e];LT&&(o[e]=0)}}const u=Mv[e];let c,h;if(u)return e==="$attrs"&&Po(r,"get",e),u(r);if((c=s.__cssModules)&&(c=c[e]))return c;if(t!==on&&Fr(t,e))return o[e]=4,t[e];if(h=A.config.globalProperties,Fr(h,e))return h[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:a}=r;return hC(i,e)?(i[e]=t,!0):n!==on&&Fr(n,e)?(n[e]=t,!0):Fr(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(a[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:n,appContext:i,propsOptions:a}},o){let s;return!!t[o]||r!==on&&Fr(r,o)||hC(e,o)||(s=a[0])&&Fr(s,o)||Fr(n,o)||Fr(Mv,o)||Fr(i.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:Fr(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}},Tj=zn({},IT,{get(r,e){if(e!==Symbol.unscopables)return IT.get(r,e,r)},has(r,e){return e[0]!=="_"&&!K9(e)}});let LT=!0;function xj(r){const e=BF(r),t=r.proxy,n=r.ctx;LT=!1,e.beforeCreate&&uR(e.beforeCreate,r,"bc");const{data:i,computed:a,methods:o,watch:s,provide:A,inject:l,created:u,beforeMount:c,mounted:h,beforeUpdate:f,updated:p,activated:v,deactivated:m,beforeDestroy:g,beforeUnmount:_,destroyed:E,unmounted:B,render:L,renderTracked:O,renderTriggered:b,errorCaptured:T,serverPrefetch:F,expose:M,inheritAttrs:S,components:x,directives:N,filters:P}=e;if(l&&Sj(l,n,null,r.appContext.config.unwrapInjectedRef),o)for(const tt in o){const J=o[tt];Ke(J)&&(n[tt]=J.bind(t))}if(i){const tt=i.call(t,t);pn(tt)&&(r.data=kg(tt))}if(LT=!0,a)for(const tt in a){const J=a[tt],nt=Ke(J)?J.bind(t,t):Ke(J.get)?J.get.bind(t,t):Ss,it=!Ke(J)&&Ke(J.set)?J.set.bind(t):Ss,_t=fr({get:nt,set:it});Object.defineProperty(n,tt,{enumerable:!0,configurable:!0,get:()=>_t.value,set:R=>_t.value=R})}if(s)for(const tt in s)LD(s[tt],n,t,tt);if(A){const tt=Ke(A)?A.call(t):A;Reflect.ownKeys(tt).forEach(J=>{Pr(J,tt[J])})}u&&uR(u,r,"c");function z(tt,J){Ee(J)?J.forEach(nt=>tt(nt.bind(t))):J&&tt(J.bind(t))}if(z(ED,c),z(Je,h),z(CD,f),z(j1,p),z(mD,v),z(_D,m),z(SD,T),z(xD,O),z(TD,b),z(V1,_),z(ar,B),z(BD,F),Ee(M))if(M.length){const tt=r.exposed||(r.exposed={});M.forEach(J=>{Object.defineProperty(tt,J,{get:()=>t[J],set:nt=>t[J]=nt})})}else r.exposed||(r.exposed={});L&&r.render===Ss&&(r.render=L),S!=null&&(r.inheritAttrs=S),x&&(r.components=x),N&&(r.directives=N)}function Sj(r,e,t=Ss,n=!1){Ee(r)&&(r=OT(r));for(const i in r){const a=r[i];let o;pn(a)?"default"in a?o=Be(a.from||i,a.default,!0):o=Be(a.from||i):o=Be(a),Zi(o)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):e[i]=o}}function uR(r,e,t){No(Ee(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function LD(r,e,t,n){const i=n.includes(".")?gD(t,n):()=>t[n];if(Un(r)){const a=e[r];Ke(a)&&fe(i,a)}else if(Ke(r))fe(i,r.bind(t));else if(pn(r))if(Ee(r))r.forEach(a=>LD(a,e,t,n));else{const a=Ke(r.handler)?r.handler.bind(t):e[r.handler];Ke(a)&&fe(i,a,r)}}function BF(r){const e=r.type,{mixins:t,extends:n}=e,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=r.appContext,s=a.get(e);let A;return s?A=s:!i.length&&!t&&!n?A=e:(A={},i.length&&i.forEach(l=>d_(A,l,o,!0)),d_(A,e,o)),pn(e)&&a.set(e,A),A}function d_(r,e,t,n=!1){const{mixins:i,extends:a}=e;a&&d_(r,a,t,!0),i&&i.forEach(o=>d_(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const s=bj[o]||t&&t[o];r[o]=s?s(r[o],e[o]):e[o]}return r}const bj={data:cR,props:Ic,emits:Ic,methods:Ic,computed:Ic,beforeCreate:Na,created:Na,beforeMount:Na,mounted:Na,beforeUpdate:Na,updated:Na,beforeDestroy:Na,beforeUnmount:Na,destroyed:Na,unmounted:Na,activated:Na,deactivated:Na,errorCaptured:Na,serverPrefetch:Na,components:Ic,directives:Ic,watch:Ij,provide:cR,inject:Fj};function cR(r,e){return e?r?function(){return zn(Ke(r)?r.call(this,this):r,Ke(e)?e.call(this,this):e)}:e:r}function Fj(r,e){return Ic(OT(r),OT(e))}function OT(r){if(Ee(r)){const e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return r}function Na(r,e){return r?[...new Set([].concat(r,e))]:e}function Ic(r,e){return r?zn(zn(Object.create(null),r),e):e}function Ij(r,e){if(!r)return e;if(!e)return r;const t=zn(Object.create(null),r);for(const n in e)t[n]=Na(r[n],e[n]);return t}function Lj(r,e,t,n=!1){const i={},a={};f_(a,K1,1),r.propsDefaults=Object.create(null),OD(r,e,i,a);for(const o in r.propsOptions[0])o in i||(i[o]=void 0);t?r.props=n?i:eD(i):r.type.props?r.props=i:r.props=a,r.attrs=a}function Oj(r,e,t,n){const{props:i,attrs:a,vnode:{patchFlag:o}}=r,s=Rr(i),[A]=r.propsOptions;let l=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=r.vnode.dynamicProps;for(let c=0;c<u.length;c++){let h=u[c];if(H1(r.emitsOptions,h))continue;const f=e[h];if(A)if(Fr(a,h))f!==a[h]&&(a[h]=f,l=!0);else{const p=lo(h);i[p]=RT(A,s,p,f,r,!1)}else f!==a[h]&&(a[h]=f,l=!0)}}}else{OD(r,e,i,a)&&(l=!0);let u;for(const c in s)(!e||!Fr(e,c)&&((u=Zo(c))===c||!Fr(e,u)))&&(A?t&&(t[c]!==void 0||t[u]!==void 0)&&(i[c]=RT(A,s,c,void 0,r,!0)):delete i[c]);if(a!==s)for(const c in a)(!e||!Fr(e,c))&&(delete a[c],l=!0)}l&&fl(r,"set","$attrs")}function OD(r,e,t,n){const[i,a]=r.propsOptions;let o=!1,s;if(e)for(let A in e){if(Ov(A))continue;const l=e[A];let u;i&&Fr(i,u=lo(A))?!a||!a.includes(u)?t[u]=l:(s||(s={}))[u]=l:H1(r.emitsOptions,A)||(!(A in n)||l!==n[A])&&(n[A]=l,o=!0)}if(a){const A=Rr(t),l=s||on;for(let u=0;u<a.length;u++){const c=a[u];t[c]=RT(i,A,c,l[c],r,!Fr(l,c))}}return o}function RT(r,e,t,n,i,a){const o=r[t];if(o!=null){const s=Fr(o,"default");if(s&&n===void 0){const A=o.default;if(o.type!==Function&&Ke(A)){const{propsDefaults:l}=i;t in l?n=l[t]:(Uu(i),n=l[t]=A.call(null,e),xu())}else n=A}o[0]&&(a&&!s?n=!1:o[1]&&(n===""||n===Zo(t))&&(n=!0))}return n}function RD(r,e,t=!1){const n=e.propsCache,i=n.get(r);if(i)return i;const a=r.props,o={},s=[];let A=!1;if(!Ke(r)){const u=c=>{A=!0;const[h,f]=RD(c,e,!0);zn(o,h),f&&s.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}if(!a&&!A)return pn(r)&&n.set(r,np),np;if(Ee(a))for(let u=0;u<a.length;u++){const c=lo(a[u]);hR(c)&&(o[c]=on)}else if(a)for(const u in a){const c=lo(u);if(hR(c)){const h=a[u],f=o[c]=Ee(h)||Ke(h)?{type:h}:Object.assign({},h);if(f){const p=dR(Boolean,f.type),v=dR(String,f.type);f[0]=p>-1,f[1]=v<0||p<v,(p>-1||Fr(f,"default"))&&s.push(c)}}}const l=[o,s];return pn(r)&&n.set(r,l),l}function hR(r){return r[0]!=="$"}function fR(r){const e=r&&r.toString().match(/^\s*function (\w+)/);return e?e[1]:r===null?"null":""}function pR(r,e){return fR(r)===fR(e)}function dR(r,e){return Ee(e)?e.findIndex(t=>pR(t,r)):Ke(e)&&pR(e,r)?0:-1}const MD=r=>r[0]==="_"||r==="$stable",TF=r=>Ee(r)?r.map(Io):[Io(r)],Rj=(r,e,t)=>{if(e._n)return e;const n=Qc((...i)=>TF(e(...i)),t);return n._c=!1,n},ND=(r,e,t)=>{const n=r._ctx;for(const i in r){if(MD(i))continue;const a=r[i];if(Ke(a))e[i]=Rj(i,a,n);else if(a!=null){const o=TF(a);e[i]=()=>o}}},PD=(r,e)=>{const t=TF(e);r.slots.default=()=>t},Mj=(r,e)=>{if(r.vnode.shapeFlag&32){const t=e._;t?(r.slots=Rr(e),f_(e,"_",t)):ND(e,r.slots={})}else r.slots={},e&&PD(r,e);f_(r.slots,K1,1)},Nj=(r,e,t)=>{const{vnode:n,slots:i}=r;let a=!0,o=on;if(n.shapeFlag&32){const s=e._;s?t&&s===1?a=!1:(zn(i,e),!t&&s===1&&delete i._):(a=!e.$stable,ND(e,i)),o=e}else e&&(PD(r,e),o={default:1});if(a)for(const s in i)!MD(s)&&!(s in o)&&delete i[s]};function UD(){return{app:null,config:{isNativeTag:e$,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Pj=0;function Uj(r,e){return function(n,i=null){Ke(n)||(n=Object.assign({},n)),i!=null&&!pn(i)&&(i=null);const a=UD(),o=new Set;let s=!1;const A=a.app={_uid:Pj++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:nQ,get config(){return a.config},set config(l){},use(l,...u){return o.has(l)||(l&&Ke(l.install)?(o.add(l),l.install(A,...u)):Ke(l)&&(o.add(l),l(A,...u))),A},mixin(l){return a.mixins.includes(l)||a.mixins.push(l),A},component(l,u){return u?(a.components[l]=u,A):a.components[l]},directive(l,u){return u?(a.directives[l]=u,A):a.directives[l]},mount(l,u,c){if(!s){const h=Zr(n,i);return h.appContext=a,u&&e?e(h,l):r(h,l,c),s=!0,A._container=l,l.__vue_app__=A,z1(h.component)||h.component.proxy}},unmount(){s&&(r(null,A._container),delete A._container.__vue_app__)},provide(l,u){return a.provides[l]=u,A}};return A}}function v_(r,e,t,n,i=!1){if(Ee(r)){r.forEach((h,f)=>v_(h,e&&(Ee(e)?e[f]:e),t,n,i));return}if(Yc(n)&&!i)return;const a=n.shapeFlag&4?z1(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:A}=r,l=e&&e.r,u=s.refs===on?s.refs={}:s.refs,c=s.setupState;if(l!=null&&l!==A&&(Un(l)?(u[l]=null,Fr(c,l)&&(c[l]=null)):Zi(l)&&(l.value=null)),Ke(A))rl(A,s,12,[o,u]);else{const h=Un(A),f=Zi(A);if(h||f){const p=()=>{if(r.f){const v=h?Fr(c,A)?c[A]:u[A]:A.value;i?Ee(v)&&rF(v,a):Ee(v)?v.includes(a)||v.push(a):h?(u[A]=[a],Fr(c,A)&&(c[A]=u[A])):(A.value=[a],r.k&&(u[r.k]=A.value))}else h?(u[A]=o,Fr(c,A)&&(c[A]=o)):f&&(A.value=o,r.k&&(u[r.k]=o))};o?(p.id=-1,na(p,t)):p()}}}let Yl=!1;const _m=r=>/svg/.test(r.namespaceURI)&&r.tagName!=="foreignObject",wm=r=>r.nodeType===8;function Dj(r){const{mt:e,p:t,o:{patchProp:n,createText:i,nextSibling:a,parentNode:o,remove:s,insert:A,createComment:l}}=r,u=(g,_)=>{if(!_.hasChildNodes()){t(null,g,_),p_(),_._vnode=g;return}Yl=!1,c(_.firstChild,g,null,null,null),p_(),_._vnode=g,Yl&&console.error("Hydration completed but contains mismatches.")},c=(g,_,E,B,L,O=!1)=>{const b=wm(g)&&g.data==="[",T=()=>v(g,_,E,B,L,b),{type:F,ref:M,shapeFlag:S,patchFlag:x}=_;let N=g.nodeType;_.el=g,x===-2&&(O=!1,_.dynamicChildren=null);let P=null;switch(F){case uh:N!==3?_.children===""?(A(_.el=i(""),o(g),g),P=g):P=T():(g.data!==_.children&&(Yl=!0,g.data=_.children),P=a(g));break;case xa:N!==8||b?P=T():P=a(g);break;case Wc:if(b&&(g=a(g),N=g.nodeType),N===1||N===3){P=g;const Y=!_.children.length;for(let z=0;z<_.staticCount;z++)Y&&(_.children+=P.nodeType===1?P.outerHTML:P.data),z===_.staticCount-1&&(_.anchor=P),P=a(P);return b?a(P):P}else T();break;case Mi:b?P=p(g,_,E,B,L,O):P=T();break;default:if(S&1)N!==1||_.type.toLowerCase()!==g.tagName.toLowerCase()?P=T():P=h(g,_,E,B,L,O);else if(S&6){_.slotScopeIds=L;const Y=o(g);if(e(_,Y,null,E,B,_m(Y),O),P=b?m(g):a(g),P&&wm(P)&&P.data==="teleport end"&&(P=a(P)),Yc(_)){let z;b?(z=Zr(Mi),z.anchor=P?P.previousSibling:Y.lastChild):z=g.nodeType===3?SF(""):Zr("div"),z.el=g,_.component.subTree=z}}else S&64?N!==8?P=T():P=_.type.hydrate(g,_,E,B,L,O,r,f):S&128&&(P=_.type.hydrate(g,_,E,B,_m(o(g)),L,O,r,c))}return M!=null&&v_(M,null,B,_),P},h=(g,_,E,B,L,O)=>{O=O||!!_.dynamicChildren;const{type:b,props:T,patchFlag:F,shapeFlag:M,dirs:S}=_,x=b==="input"&&S||b==="option";if(x||F!==-1){if(S&&zs(_,null,E,"created"),T)if(x||!O||F&48)for(const P in T)(x&&P.endsWith("value")||Dg(P)&&!Ov(P))&&n(g,P,null,T[P],!1,void 0,E);else T.onClick&&n(g,"onClick",null,T.onClick,!1,void 0,E);let N;if((N=T&&T.onVnodeBeforeMount)&&io(N,E,_),S&&zs(_,null,E,"beforeMount"),((N=T&&T.onVnodeMounted)||S)&&pD(()=>{N&&io(N,E,_),S&&zs(_,null,E,"mounted")},B),M&16&&!(T&&(T.innerHTML||T.textContent))){let P=f(g.firstChild,_,g,E,B,L,O);for(;P;){Yl=!0;const Y=P;P=P.nextSibling,s(Y)}}else M&8&&g.textContent!==_.children&&(Yl=!0,g.textContent=_.children)}return g.nextSibling},f=(g,_,E,B,L,O,b)=>{b=b||!!_.dynamicChildren;const T=_.children,F=T.length;for(let M=0;M<F;M++){const S=b?T[M]:T[M]=Io(T[M]);if(g)g=c(g,S,B,L,O,b);else{if(S.type===uh&&!S.children)continue;Yl=!0,t(null,S,E,null,B,L,_m(E),O)}}return g},p=(g,_,E,B,L,O)=>{const{slotScopeIds:b}=_;b&&(L=L?L.concat(b):b);const T=o(g),F=f(a(g),_,T,E,B,L,O);return F&&wm(F)&&F.data==="]"?a(_.anchor=F):(Yl=!0,A(_.anchor=l("]"),T,F),F)},v=(g,_,E,B,L,O)=>{if(Yl=!0,_.el=null,O){const F=m(g);for(;;){const M=a(g);if(M&&M!==F)s(M);else break}}const b=a(g),T=o(g);return s(g),t(null,_,T,b,E,B,_m(T),L),b},m=g=>{let _=0;for(;g;)if(g=a(g),g&&wm(g)&&(g.data==="["&&_++,g.data==="]")){if(_===0)return a(g);_--}return g};return[u,c]}const na=pD;function DD(r){return HD(r)}function QD(r){return HD(r,Dj)}function HD(r,e){const t=s$();t.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:s,createComment:A,setText:l,setElementText:u,parentNode:c,nextSibling:h,setScopeId:f=Ss,insertStaticContent:p}=r,v=(V,Z,ut,rt=null,G=null,St=null,bt=!1,dt=null,Et=!!Z.dynamicChildren)=>{if(V===Z)return;V&&!Ws(V,Z)&&(rt=vt(V),R(V,G,St,!0),V=null),Z.patchFlag===-2&&(Et=!1,Z.dynamicChildren=null);const{type:yt,ref:xt,shapeFlag:It}=Z;switch(yt){case uh:m(V,Z,ut,rt);break;case xa:g(V,Z,ut,rt);break;case Wc:V==null&&_(Z,ut,rt,bt);break;case Mi:x(V,Z,ut,rt,G,St,bt,dt,Et);break;default:It&1?L(V,Z,ut,rt,G,St,bt,dt,Et):It&6?N(V,Z,ut,rt,G,St,bt,dt,Et):(It&64||It&128)&&yt.process(V,Z,ut,rt,G,St,bt,dt,Et,W)}xt!=null&&G&&v_(xt,V&&V.ref,St,Z||V,!Z)},m=(V,Z,ut,rt)=>{if(V==null)n(Z.el=s(Z.children),ut,rt);else{const G=Z.el=V.el;Z.children!==V.children&&l(G,Z.children)}},g=(V,Z,ut,rt)=>{V==null?n(Z.el=A(Z.children||""),ut,rt):Z.el=V.el},_=(V,Z,ut,rt)=>{[V.el,V.anchor]=p(V.children,Z,ut,rt,V.el,V.anchor)},E=({el:V,anchor:Z},ut,rt)=>{let G;for(;V&&V!==Z;)G=h(V),n(V,ut,rt),V=G;n(Z,ut,rt)},B=({el:V,anchor:Z})=>{let ut;for(;V&&V!==Z;)ut=h(V),i(V),V=ut;i(Z)},L=(V,Z,ut,rt,G,St,bt,dt,Et)=>{bt=bt||Z.type==="svg",V==null?O(Z,ut,rt,G,St,bt,dt,Et):F(V,Z,G,St,bt,dt,Et)},O=(V,Z,ut,rt,G,St,bt,dt)=>{let Et,yt;const{type:xt,props:It,shapeFlag:Mt,transition:Vt,dirs:Yt}=V;if(Et=V.el=o(V.type,St,It&&It.is,It),Mt&8?u(Et,V.children):Mt&16&&T(V.children,Et,null,rt,G,St&&xt!=="foreignObject",bt,dt),Yt&&zs(V,null,rt,"created"),It){for(const re in It)re!=="value"&&!Ov(re)&&a(Et,re,null,It[re],St,V.children,rt,G,at);"value"in It&&a(Et,"value",null,It.value),(yt=It.onVnodeBeforeMount)&&io(yt,rt,V)}b(Et,V,V.scopeId,bt,rt),Yt&&zs(V,null,rt,"beforeMount");const ae=(!G||G&&!G.pendingBranch)&&Vt&&!Vt.persisted;ae&&Vt.beforeEnter(Et),n(Et,Z,ut),((yt=It&&It.onVnodeMounted)||ae||Yt)&&na(()=>{yt&&io(yt,rt,V),ae&&Vt.enter(Et),Yt&&zs(V,null,rt,"mounted")},G)},b=(V,Z,ut,rt,G)=>{if(ut&&f(V,ut),rt)for(let St=0;St<rt.length;St++)f(V,rt[St]);if(G){let St=G.subTree;if(Z===St){const bt=G.vnode;b(V,bt,bt.scopeId,bt.slotScopeIds,G.parent)}}},T=(V,Z,ut,rt,G,St,bt,dt,Et=0)=>{for(let yt=Et;yt<V.length;yt++){const xt=V[yt]=dt?cu(V[yt]):Io(V[yt]);v(null,xt,Z,ut,rt,G,St,bt,dt)}},F=(V,Z,ut,rt,G,St,bt)=>{const dt=Z.el=V.el;let{patchFlag:Et,dynamicChildren:yt,dirs:xt}=Z;Et|=V.patchFlag&16;const It=V.props||on,Mt=Z.props||on;let Vt;ut&&gc(ut,!1),(Vt=Mt.onVnodeBeforeUpdate)&&io(Vt,ut,Z,V),xt&&zs(Z,V,ut,"beforeUpdate"),ut&&gc(ut,!0);const Yt=G&&Z.type!=="foreignObject";if(yt?M(V.dynamicChildren,yt,dt,ut,rt,Yt,St):bt||J(V,Z,dt,null,ut,rt,Yt,St,!1),Et>0){if(Et&16)S(dt,Z,It,Mt,ut,rt,G);else if(Et&2&&It.class!==Mt.class&&a(dt,"class",null,Mt.class,G),Et&4&&a(dt,"style",It.style,Mt.style,G),Et&8){const ae=Z.dynamicProps;for(let re=0;re<ae.length;re++){const Wt=ae[re],se=It[Wt],zt=Mt[Wt];(zt!==se||Wt==="value")&&a(dt,Wt,se,zt,G,V.children,ut,rt,at)}}Et&1&&V.children!==Z.children&&u(dt,Z.children)}else!bt&&yt==null&&S(dt,Z,It,Mt,ut,rt,G);((Vt=Mt.onVnodeUpdated)||xt)&&na(()=>{Vt&&io(Vt,ut,Z,V),xt&&zs(Z,V,ut,"updated")},rt)},M=(V,Z,ut,rt,G,St,bt)=>{for(let dt=0;dt<Z.length;dt++){const Et=V[dt],yt=Z[dt],xt=Et.el&&(Et.type===Mi||!Ws(Et,yt)||Et.shapeFlag&70)?c(Et.el):ut;v(Et,yt,xt,null,rt,G,St,bt,!0)}},S=(V,Z,ut,rt,G,St,bt)=>{if(ut!==rt){if(ut!==on)for(const dt in ut)!Ov(dt)&&!(dt in rt)&&a(V,dt,ut[dt],null,bt,Z.children,G,St,at);for(const dt in rt){if(Ov(dt))continue;const Et=rt[dt],yt=ut[dt];Et!==yt&&dt!=="value"&&a(V,dt,yt,Et,bt,Z.children,G,St,at)}"value"in rt&&a(V,"value",ut.value,rt.value)}},x=(V,Z,ut,rt,G,St,bt,dt,Et)=>{const yt=Z.el=V?V.el:s(""),xt=Z.anchor=V?V.anchor:s("");let{patchFlag:It,dynamicChildren:Mt,slotScopeIds:Vt}=Z;Vt&&(dt=dt?dt.concat(Vt):Vt),V==null?(n(yt,ut,rt),n(xt,ut,rt),T(Z.children,ut,xt,G,St,bt,dt,Et)):It>0&&It&64&&Mt&&V.dynamicChildren?(M(V.dynamicChildren,Mt,ut,G,St,bt,dt),(Z.key!=null||G&&Z===G.subTree)&&xF(V,Z,!0)):J(V,Z,ut,xt,G,St,bt,dt,Et)},N=(V,Z,ut,rt,G,St,bt,dt,Et)=>{Z.slotScopeIds=dt,V==null?Z.shapeFlag&512?G.ctx.activate(Z,ut,rt,bt,Et):P(Z,ut,rt,G,St,bt,Et):Y(V,Z,Et)},P=(V,Z,ut,rt,G,St,bt)=>{const dt=V.component=zD(V,rt,G);if(jg(V)&&(dt.ctx.renderer=W),YD(dt),dt.asyncDep){if(G&&G.registerDep(dt,z),!V.el){const Et=dt.subTree=Zr(xa);g(null,Et,Z,ut)}return}z(dt,V,Z,ut,G,St,bt)},Y=(V,Z,ut)=>{const rt=Z.component=V.component;if(aj(V,Z,ut))if(rt.asyncDep&&!rt.asyncResolved){tt(rt,Z,ut);return}else rt.next=Z,Z$(rt.update),rt.update();else Z.el=V.el,rt.vnode=Z},z=(V,Z,ut,rt,G,St,bt)=>{const dt=()=>{if(V.isMounted){let{next:xt,bu:It,u:Mt,parent:Vt,vnode:Yt}=V,ae=xt,re;gc(V,!1),xt?(xt.el=Yt.el,tt(V,xt,bt)):xt=Yt,It&&ap(It),(re=xt.props&&xt.props.onVnodeBeforeUpdate)&&io(re,Vt,xt,Yt),gc(V,!0);const Wt=N0(V),se=V.subTree;V.subTree=Wt,v(se,Wt,c(se.el),vt(se),V,G,St),xt.el=Wt.el,ae===null&&gF(V,Wt.el),Mt&&na(Mt,G),(re=xt.props&&xt.props.onVnodeUpdated)&&na(()=>io(re,Vt,xt,Yt),G)}else{let xt;const{el:It,props:Mt}=Z,{bm:Vt,m:Yt,parent:ae}=V,re=Yc(Z);if(gc(V,!1),Vt&&ap(Vt),!re&&(xt=Mt&&Mt.onVnodeBeforeMount)&&io(xt,ae,Z),gc(V,!0),It&&Ot){const Wt=()=>{V.subTree=N0(V),Ot(It,V.subTree,V,G,null)};re?Z.type.__asyncLoader().then(()=>!V.isUnmounted&&Wt()):Wt()}else{const Wt=V.subTree=N0(V);v(null,Wt,ut,rt,V,G,St),Z.el=Wt.el}if(Yt&&na(Yt,G),!re&&(xt=Mt&&Mt.onVnodeMounted)){const Wt=Z;na(()=>io(xt,ae,Wt),G)}(Z.shapeFlag&256||ae&&Yc(ae.vnode)&&ae.vnode.shapeFlag&256)&&V.a&&na(V.a,G),V.isMounted=!0,Z=ut=rt=null}},Et=V.effect=new Gg(dt,()=>Q1(yt),V.scope),yt=V.update=()=>Et.run();yt.id=V.uid,gc(V,!0),yt()},tt=(V,Z,ut)=>{Z.component=V;const rt=V.vnode.props;V.vnode=Z,V.next=null,Oj(V,Z.props,rt,ut),Nj(V,Z.children,ut),Gp(),aR(),kp()},J=(V,Z,ut,rt,G,St,bt,dt,Et=!1)=>{const yt=V&&V.children,xt=V?V.shapeFlag:0,It=Z.children,{patchFlag:Mt,shapeFlag:Vt}=Z;if(Mt>0){if(Mt&128){it(yt,It,ut,rt,G,St,bt,dt,Et);return}else if(Mt&256){nt(yt,It,ut,rt,G,St,bt,dt,Et);return}}Vt&8?(xt&16&&at(yt,G,St),It!==yt&&u(ut,It)):xt&16?Vt&16?it(yt,It,ut,rt,G,St,bt,dt,Et):at(yt,G,St,!0):(xt&8&&u(ut,""),Vt&16&&T(It,ut,rt,G,St,bt,dt,Et))},nt=(V,Z,ut,rt,G,St,bt,dt,Et)=>{V=V||np,Z=Z||np;const yt=V.length,xt=Z.length,It=Math.min(yt,xt);let Mt;for(Mt=0;Mt<It;Mt++){const Vt=Z[Mt]=Et?cu(Z[Mt]):Io(Z[Mt]);v(V[Mt],Vt,ut,null,G,St,bt,dt,Et)}yt>xt?at(V,G,St,!0,!1,It):T(Z,ut,rt,G,St,bt,dt,Et,It)},it=(V,Z,ut,rt,G,St,bt,dt,Et)=>{let yt=0;const xt=Z.length;let It=V.length-1,Mt=xt-1;for(;yt<=It&&yt<=Mt;){const Vt=V[yt],Yt=Z[yt]=Et?cu(Z[yt]):Io(Z[yt]);if(Ws(Vt,Yt))v(Vt,Yt,ut,null,G,St,bt,dt,Et);else break;yt++}for(;yt<=It&&yt<=Mt;){const Vt=V[It],Yt=Z[Mt]=Et?cu(Z[Mt]):Io(Z[Mt]);if(Ws(Vt,Yt))v(Vt,Yt,ut,null,G,St,bt,dt,Et);else break;It--,Mt--}if(yt>It){if(yt<=Mt){const Vt=Mt+1,Yt=Vt<xt?Z[Vt].el:rt;for(;yt<=Mt;)v(null,Z[yt]=Et?cu(Z[yt]):Io(Z[yt]),ut,Yt,G,St,bt,dt,Et),yt++}}else if(yt>Mt)for(;yt<=It;)R(V[yt],G,St,!0),yt++;else{const Vt=yt,Yt=yt,ae=new Map;for(yt=Yt;yt<=Mt;yt++){const Ie=Z[yt]=Et?cu(Z[yt]):Io(Z[yt]);Ie.key!=null&&ae.set(Ie.key,yt)}let re,Wt=0;const se=Mt-Yt+1;let zt=!1,We=0;const Me=new Array(se);for(yt=0;yt<se;yt++)Me[yt]=0;for(yt=Vt;yt<=It;yt++){const Ie=V[yt];if(Wt>=se){R(Ie,G,St,!0);continue}let be;if(Ie.key!=null)be=ae.get(Ie.key);else for(re=Yt;re<=Mt;re++)if(Me[re-Yt]===0&&Ws(Ie,Z[re])){be=re;break}be===void 0?R(Ie,G,St,!0):(Me[be-Yt]=yt+1,be>=We?We=be:zt=!0,v(Ie,Z[be],ut,null,G,St,bt,dt,Et),Wt++)}const dr=zt?Qj(Me):np;for(re=dr.length-1,yt=se-1;yt>=0;yt--){const Ie=Yt+yt,be=Z[Ie],An=Ie+1<xt?Z[Ie+1].el:rt;Me[yt]===0?v(null,be,ut,An,G,St,bt,dt,Et):zt&&(re<0||yt!==dr[re]?_t(be,ut,An,2):re--)}}},_t=(V,Z,ut,rt,G=null)=>{const{el:St,type:bt,transition:dt,children:Et,shapeFlag:yt}=V;if(yt&6){_t(V.component.subTree,Z,ut,rt);return}if(yt&128){V.suspense.move(Z,ut,rt);return}if(yt&64){bt.move(V,Z,ut,W);return}if(bt===Mi){n(St,Z,ut);for(let It=0;It<Et.length;It++)_t(Et[It],Z,ut,rt);n(V.anchor,Z,ut);return}if(bt===Wc){E(V,Z,ut);return}if(rt!==2&&yt&1&&dt)if(rt===0)dt.beforeEnter(St),n(St,Z,ut),na(()=>dt.enter(St),G);else{const{leave:It,delayLeave:Mt,afterLeave:Vt}=dt,Yt=()=>n(St,Z,ut),ae=()=>{It(St,()=>{Yt(),Vt&&Vt()})};Mt?Mt(St,Yt,ae):ae()}else n(St,Z,ut)},R=(V,Z,ut,rt=!1,G=!1)=>{const{type:St,props:bt,ref:dt,children:Et,dynamicChildren:yt,shapeFlag:xt,patchFlag:It,dirs:Mt}=V;if(dt!=null&&v_(dt,null,ut,V,!0),xt&256){Z.ctx.deactivate(V);return}const Vt=xt&1&&Mt,Yt=!Yc(V);let ae;if(Yt&&(ae=bt&&bt.onVnodeBeforeUnmount)&&io(ae,Z,V),xt&6)q(V.component,ut,rt);else{if(xt&128){V.suspense.unmount(ut,rt);return}Vt&&zs(V,null,Z,"beforeUnmount"),xt&64?V.type.remove(V,Z,ut,G,W,rt):yt&&(St!==Mi||It>0&&It&64)?at(yt,Z,ut,!1,!0):(St===Mi&&It&384||!G&&xt&16)&&at(Et,Z,ut),rt&&$(V)}(Yt&&(ae=bt&&bt.onVnodeUnmounted)||Vt)&&na(()=>{ae&&io(ae,Z,V),Vt&&zs(V,null,Z,"unmounted")},ut)},$=V=>{const{type:Z,el:ut,anchor:rt,transition:G}=V;if(Z===Mi){K(ut,rt);return}if(Z===Wc){B(V);return}const St=()=>{i(ut),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(V.shapeFlag&1&&G&&!G.persisted){const{leave:bt,delayLeave:dt}=G,Et=()=>bt(ut,St);dt?dt(V.el,St,Et):Et()}else St()},K=(V,Z)=>{let ut;for(;V!==Z;)ut=h(V),i(V),V=ut;i(Z)},q=(V,Z,ut)=>{const{bum:rt,scope:G,update:St,subTree:bt,um:dt}=V;rt&&ap(rt),G.stop(),St&&(St.active=!1,R(bt,V,Z,ut)),dt&&na(dt,Z),na(()=>{V.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&V.asyncDep&&!V.asyncResolved&&V.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},at=(V,Z,ut,rt=!1,G=!1,St=0)=>{for(let bt=St;bt<V.length;bt++)R(V[bt],Z,ut,rt,G)},vt=V=>V.shapeFlag&6?vt(V.component.subTree):V.shapeFlag&128?V.suspense.next():h(V.anchor||V.el),wt=(V,Z,ut)=>{V==null?Z._vnode&&R(Z._vnode,null,null,!0):v(Z._vnode||null,V,Z,null,null,null,ut),aR(),p_(),Z._vnode=V},W={p:v,um:R,m:_t,r:$,mt:P,mc:T,pc:J,pbc:M,n:vt,o:r};let Ft,Ot;return e&&([Ft,Ot]=e(W)),{render:wt,hydrate:Ft,createApp:Uj(wt,Ft)}}function gc({effect:r,update:e},t){r.allowRecurse=e.allowRecurse=t}function xF(r,e,t=!1){const n=r.children,i=e.children;if(Ee(n)&&Ee(i))for(let a=0;a<n.length;a++){const o=n[a];let s=i[a];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[a]=cu(i[a]),s.el=o.el),t||xF(o,s)),s.type===uh&&(s.el=o.el)}}function Qj(r){const e=r.slice(),t=[0];let n,i,a,o,s;const A=r.length;for(n=0;n<A;n++){const l=r[n];if(l!==0){if(i=t[t.length-1],r[i]<l){e[n]=i,t.push(n);continue}for(a=0,o=t.length-1;a<o;)s=a+o>>1,r[t[s]]<l?a=s+1:o=s;l<r[t[a]]&&(a>0&&(e[n]=t[a-1]),t[a]=n)}}for(a=t.length,o=t[a-1];a-- >0;)t[a]=o,o=e[o];return t}const Hj=r=>r.__isTeleport,Nv=r=>r&&(r.disabled||r.disabled===""),vR=r=>typeof SVGElement<"u"&&r instanceof SVGElement,MT=(r,e)=>{const t=r&&r.to;return Un(t)?e?e(t):null:t},Gj={__isTeleport:!0,process(r,e,t,n,i,a,o,s,A,l){const{mc:u,pc:c,pbc:h,o:{insert:f,querySelector:p,createText:v,createComment:m}}=l,g=Nv(e.props);let{shapeFlag:_,children:E,dynamicChildren:B}=e;if(r==null){const L=e.el=v(""),O=e.anchor=v("");f(L,t,n),f(O,t,n);const b=e.target=MT(e.props,p),T=e.targetAnchor=v("");b&&(f(T,b),o=o||vR(b));const F=(M,S)=>{_&16&&u(E,M,S,i,a,o,s,A)};g?F(t,O):b&&F(b,T)}else{e.el=r.el;const L=e.anchor=r.anchor,O=e.target=r.target,b=e.targetAnchor=r.targetAnchor,T=Nv(r.props),F=T?t:O,M=T?L:b;if(o=o||vR(O),B?(h(r.dynamicChildren,B,F,i,a,o,s),xF(r,e,!0)):A||c(r,e,F,M,i,a,o,s,!1),g)T||Em(e,t,L,l,1);else if((e.props&&e.props.to)!==(r.props&&r.props.to)){const S=e.target=MT(e.props,p);S&&Em(e,S,null,l,0)}else T&&Em(e,O,b,l,1)}GD(e)},remove(r,e,t,n,{um:i,o:{remove:a}},o){const{shapeFlag:s,children:A,anchor:l,targetAnchor:u,target:c,props:h}=r;if(c&&a(u),(o||!Nv(h))&&(a(l),s&16))for(let f=0;f<A.length;f++){const p=A[f];i(p,e,t,!0,!!p.dynamicChildren)}},move:Em,hydrate:kj};function Em(r,e,t,{o:{insert:n},m:i},a=2){a===0&&n(r.targetAnchor,e,t);const{el:o,anchor:s,shapeFlag:A,children:l,props:u}=r,c=a===2;if(c&&n(o,e,t),(!c||Nv(u))&&A&16)for(let h=0;h<l.length;h++)i(l[h],e,t,2);c&&n(s,e,t)}function kj(r,e,t,n,i,a,{o:{nextSibling:o,parentNode:s,querySelector:A}},l){const u=e.target=MT(e.props,A);if(u){const c=u._lpa||u.firstChild;if(e.shapeFlag&16)if(Nv(e.props))e.anchor=l(o(r),e,s(r),t,n,i,a),e.targetAnchor=c;else{e.anchor=o(r);let h=c;for(;h;)if(h=o(h),h&&h.nodeType===8&&h.data==="teleport anchor"){e.targetAnchor=h,u._lpa=e.targetAnchor&&o(e.targetAnchor);break}l(c,e,u,t,n,i,a)}GD(e)}return e.anchor&&o(e.anchor)}const $j=Gj;function GD(r){const e=r.ctx;if(e&&e.ut){let t=r.children[0].el;for(;t!==r.targetAnchor;)t.nodeType===1&&t.setAttribute("data-v-owner",e.uid),t=t.nextSibling;e.ut()}}const Mi=Symbol(void 0),uh=Symbol(void 0),xa=Symbol(void 0),Wc=Symbol(void 0),Pv=[];let Ao=null;function fn(r=!1){Pv.push(Ao=r?null:[])}function kD(){Pv.pop(),Ao=Pv[Pv.length-1]||null}let ch=1;function NT(r){ch+=r}function $D(r){return r.dynamicChildren=ch>0?Ao||np:null,kD(),ch>0&&Ao&&Ao.push(r),r}function Vn(r,e,t,n,i,a){return $D(Xi(r,e,t,n,i,a,!0))}function Vg(r,e,t,n,i){return $D(Zr(r,e,t,n,i,!0))}function Pu(r){return r?r.__v_isVNode===!0:!1}function Ws(r,e){return r.type===e.type&&r.key===e.key}function jj(r){}const K1="__vInternal",jD=({key:r})=>r??null,P0=({ref:r,ref_key:e,ref_for:t})=>r!=null?Un(r)||Zi(r)||Ke(r)?{i:oa,r,k:e,f:!!t}:r:null;function Xi(r,e=null,t=null,n=0,i=null,a=r===Mi?0:1,o=!1,s=!1){const A={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&jD(e),ref:e&&P0(e),scopeId:G1,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:oa};return s?(bF(A,t),a&128&&r.normalize(A)):t&&(A.shapeFlag|=Un(t)?8:16),ch>0&&!o&&Ao&&(A.patchFlag>0||a&6)&&A.patchFlag!==32&&Ao.push(A),A}const Zr=Vj;function Vj(r,e=null,t=null,n=0,i=null,a=!1){if((!r||r===bD)&&(r=xa),Pu(r)){const s=uA(r,e,!0);return t&&bF(s,t),ch>0&&!a&&Ao&&(s.shapeFlag&6?Ao[Ao.indexOf(r)]=s:Ao.push(s)),s.patchFlag|=-2,s}if(Jj(r)&&(r=r.__vccOpts),e){e=VD(e);let{class:s,style:A}=e;s&&!Un(s)&&(e.class=Ug(s)),pn(A)&&(lF(A)&&!Ee(A)&&(A=zn({},A)),e.style=Pg(A))}const o=Un(r)?1:fD(r)?128:Hj(r)?64:pn(r)?4:Ke(r)?2:0;return Xi(r,e,t,n,i,o,a,!0)}function VD(r){return r?lF(r)||K1 in r?zn({},r):r:null}function uA(r,e,t=!1){const{props:n,ref:i,patchFlag:a,children:o}=r,s=e?KD(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:s,key:s&&jD(s),ref:e&&e.ref?t&&i?Ee(i)?i.concat(P0(e)):[i,P0(e)]:P0(e):i,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:o,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==Mi?a===-1?16:a|16:a,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&uA(r.ssContent),ssFallback:r.ssFallback&&uA(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx}}function SF(r=" ",e=0){return Zr(uh,null,r,e)}function Kj(r,e){const t=Zr(Wc,null,r);return t.staticCount=e,t}function vr(r="",e=!1){return e?(fn(),Vg(xa,null,r)):Zr(xa,null,r)}function Io(r){return r==null||typeof r=="boolean"?Zr(xa):Ee(r)?Zr(Mi,null,r.slice()):typeof r=="object"?cu(r):Zr(uh,null,String(r))}function cu(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:uA(r)}function bF(r,e){let t=0;const{shapeFlag:n}=r;if(e==null)e=null;else if(Ee(e))t=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),bF(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!(K1 in e)?e._ctx=oa:i===3&&oa&&(oa.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else Ke(e)?(e={default:e,_ctx:oa},t=32):(e=String(e),n&64?(t=16,e=[SF(e)]):t=8);r.children=e,r.shapeFlag|=t}function KD(...r){const e={};for(let t=0;t<r.length;t++){const n=r[t];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=Ug([e.class,n.class]));else if(i==="style")e.style=Pg([e.style,n.style]);else if(Dg(i)){const a=e[i],o=n[i];o&&a!==o&&!(Ee(a)&&a.includes(o))&&(e[i]=a?[].concat(a,o):o)}else i!==""&&(e[i]=n[i])}return e}function io(r,e,t,n=null){No(r,e,7,[t,n])}const zj=UD();let Xj=0;function zD(r,e,t){const n=r.type,i=(e?e.appContext:r.appContext)||zj,a={uid:Xj++,vnode:r,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new aF(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:RD(n,i),emitsOptions:uD(n,i),emit:null,emitted:null,propsDefaults:on,inheritAttrs:n.inheritAttrs,ctx:on,data:on,props:on,attrs:on,slots:on,refs:on,setupState:on,setupContext:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=e?e.root:a,a.emit=tj.bind(null,a),r.ce&&r.ce(a),a}let Pi=null;const Ju=()=>Pi||oa,Uu=r=>{Pi=r,r.scope.on()},xu=()=>{Pi&&Pi.scope.off(),Pi=null};function XD(r){return r.vnode.shapeFlag&4}let Cp=!1;function YD(r,e=!1){Cp=e;const{props:t,children:n}=r.vnode,i=XD(r);Lj(r,t,i,e),Mj(r,n);const a=i?Yj(r,e):void 0;return Cp=!1,a}function Yj(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=uF(new Proxy(r.ctx,IT));const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?qD(r):null;Uu(r),Gp();const a=rl(n,r,0,[r.props,i]);if(kp(),xu(),nF(a)){if(a.then(xu,xu),e)return a.then(o=>{PT(r,o,e)}).catch(o=>{Th(o,r,0)});r.asyncDep=a}else PT(r,a,e)}else WD(r,e)}function PT(r,e,t){Ke(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:pn(e)&&(r.setupState=fF(e)),WD(r,t)}let g_,UT;function Wj(r){g_=r,UT=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Tj))}}const qj=()=>!g_;function WD(r,e,t){const n=r.type;if(!r.render){if(!e&&g_&&!n.render){const i=n.template||BF(r).template;if(i){const{isCustomElement:a,compilerOptions:o}=r.appContext.config,{delimiters:s,compilerOptions:A}=n,l=zn(zn({isCustomElement:a,delimiters:s},o),A);n.render=g_(i,l)}}r.render=n.render||Ss,UT&&UT(r)}Uu(r),Gp(),xj(r),kp(),xu()}function Zj(r){return new Proxy(r.attrs,{get(e,t){return Po(r,"get","$attrs"),e[t]}})}function qD(r){const e=n=>{r.exposed=n||{}};let t;return{get attrs(){return t||(t=Zj(r))},slots:r.slots,emit:r.emit,expose:e}}function z1(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(fF(uF(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in Mv)return Mv[t](r)},has(e,t){return t in e||t in Mv}}))}function DT(r,e=!0){return Ke(r)?r.displayName||r.name:r.name||e&&r.__name}function Jj(r){return Ke(r)&&"__vccOpts"in r}const fr=(r,e)=>X$(r,e,Cp);function tV(){return null}function eV(){return null}function rV(r){}function nV(r,e){return null}function iV(){return ZD().slots}function aV(){return ZD().attrs}function ZD(){const r=Ju();return r.setupContext||(r.setupContext=qD(r))}function oV(r,e){const t=Ee(r)?r.reduce((n,i)=>(n[i]={},n),{}):r;for(const n in e){const i=t[n];i?Ee(i)||Ke(i)?t[n]={type:i,default:e[n]}:i.default=e[n]:i===null&&(t[n]={default:e[n]})}return t}function sV(r,e){const t={};for(const n in r)e.includes(n)||Object.defineProperty(t,n,{enumerable:!0,get:()=>r[n]});return t}function AV(r){const e=Ju();let t=r();return xu(),nF(t)&&(t=t.catch(n=>{throw Uu(e),n})),[t,()=>Uu(e)]}function JD(r,e,t){const n=arguments.length;return n===2?pn(e)&&!Ee(e)?Pu(e)?Zr(r,null,[e]):Zr(r,e):Zr(r,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&Pu(t)&&(t=[t]),Zr(r,e,t))}const tQ=Symbol(""),eQ=()=>Be(tQ);function lV(){}function uV(r,e,t,n){const i=t[n];if(i&&rQ(i,r))return i;const a=e();return a.memo=r.slice(),t[n]=a}function rQ(r,e){const t=r.memo;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(wp(t[n],e[n]))return!1;return ch>0&&Ao&&Ao.push(r),!0}const nQ="3.2.45",cV={createComponentInstance:zD,setupComponent:YD,renderComponentRoot:N0,setCurrentRenderingInstance:sg,isVNode:Pu,normalizeVNode:Io},hV=cV,fV=null,pV=null,dV="http://www.w3.org/2000/svg",Nc=typeof document<"u"?document:null,gR=Nc&&Nc.createElement("template"),vV={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,n)=>{const i=e?Nc.createElementNS(dV,r):Nc.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>Nc.createTextNode(r),createComment:r=>Nc.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Nc.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,n,i,a){const o=t?t.previousSibling:e.lastChild;if(i&&(i===a||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),t),!(i===a||!(i=i.nextSibling)););else{gR.innerHTML=n?`<svg>${r}</svg>`:r;const s=gR.content;if(n){const A=s.firstChild;for(;A.firstChild;)s.appendChild(A.firstChild);s.removeChild(A)}e.insertBefore(s,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}};function gV(r,e,t){const n=r._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}function yV(r,e,t){const n=r.style,i=Un(t);if(t&&!i){for(const a in t)QT(n,a,t[a]);if(e&&!Un(e))for(const a in e)t[a]==null&&QT(n,a,"")}else{const a=n.display;i?e!==t&&(n.cssText=t):e&&r.removeAttribute("style"),"_vod"in r&&(n.display=a)}}const yR=/\s*!important$/;function QT(r,e,t){if(Ee(t))t.forEach(n=>QT(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=mV(r,e);yR.test(t)?r.setProperty(Zo(n),t.replace(yR,""),"important"):r[n]=t}}const mR=["Webkit","Moz","ms"],fC={};function mV(r,e){const t=fC[e];if(t)return t;let n=lo(e);if(n!=="filter"&&n in r)return fC[e]=n;n=Hg(n);for(let i=0;i<mR.length;i++){const a=mR[i]+n;if(a in r)return fC[e]=a}return e}const _R="http://www.w3.org/1999/xlink";function _V(r,e,t,n,i){if(n&&e.startsWith("xlink:"))t==null?r.removeAttributeNS(_R,e.slice(6,e.length)):r.setAttributeNS(_R,e,t);else{const a=J9(e);t==null||a&&!D2(t)?r.removeAttribute(e):r.setAttribute(e,a?"":t)}}function wV(r,e,t,n,i,a,o){if(e==="innerHTML"||e==="textContent"){n&&o(n,i,a),r[e]=t??"";return}if(e==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=t;const A=t??"";(r.value!==A||r.tagName==="OPTION")&&(r.value=A),t==null&&r.removeAttribute(e);return}let s=!1;if(t===""||t==null){const A=typeof r[e];A==="boolean"?t=D2(t):t==null&&A==="string"?(t="",s=!0):A==="number"&&(t=0,s=!0)}try{r[e]=t}catch{}s&&r.removeAttribute(e)}function JA(r,e,t,n){r.addEventListener(e,t,n)}function EV(r,e,t,n){r.removeEventListener(e,t,n)}function CV(r,e,t,n,i=null){const a=r._vei||(r._vei={}),o=a[e];if(n&&o)o.value=n;else{const[s,A]=BV(e);if(n){const l=a[e]=SV(n,i);JA(r,s,l,A)}else o&&(EV(r,s,o,A),a[e]=void 0)}}const wR=/(?:Once|Passive|Capture)$/;function BV(r){let e;if(wR.test(r)){e={};let n;for(;n=r.match(wR);)r=r.slice(0,r.length-n[0].length),e[n[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):Zo(r.slice(2)),e]}let pC=0;const TV=Promise.resolve(),xV=()=>pC||(TV.then(()=>pC=0),pC=Date.now());function SV(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;No(bV(n,t.value),e,5,[n])};return t.value=r,t.attached=xV(),t}function bV(r,e){if(Ee(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const ER=/^on[a-z]/,FV=(r,e,t,n,i=!1,a,o,s,A)=>{e==="class"?gV(r,n,i):e==="style"?yV(r,t,n):Dg(e)?eF(e)||CV(r,e,t,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):IV(r,e,n,i))?wV(r,e,n,a,o,s,A):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),_V(r,e,n,i))};function IV(r,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in r&&ER.test(e)&&Ke(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA"||ER.test(e)&&Un(t)?!1:e in r}function iQ(r,e){const t=wF(r);class n extends X1{constructor(a){super(t,a,e)}}return n.def=t,n}const LV=r=>iQ(r,mQ),OV=typeof HTMLElement<"u"?HTMLElement:class{};class X1 extends OV{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,dF(()=>{this._connected||(kT(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver(n=>{for(const i of n)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const e=(n,i=!1)=>{const{props:a,styles:o}=n;let s;if(a&&!Ee(a))for(const A in a){const l=a[A];(l===Number||l&&l.type===Number)&&(A in this._props&&(this._props[A]=hl(this._props[A])),(s||(s=Object.create(null)))[lo(A)]=!0)}this._numberProps=s,i&&this._resolveProps(n),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then(n=>e(n,!0)):e(this._def)}_resolveProps(e){const{props:t}=e,n=Ee(t)?t:Object.keys(t||{});for(const i of Object.keys(this))i[0]!=="_"&&n.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of n.map(lo))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(a){this._setProp(i,a)}})}_setAttr(e){let t=this.getAttribute(e);const n=lo(e);this._numberProps&&this._numberProps[n]&&(t=hl(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,i=!0){t!==this._props[e]&&(this._props[e]=t,i&&this._instance&&this._update(),n&&(t===!0?this.setAttribute(Zo(e),""):typeof t=="string"||typeof t=="number"?this.setAttribute(Zo(e),t+""):t||this.removeAttribute(Zo(e))))}_update(){kT(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Zr(this._def,zn({},this._props));return this._instance||(e.ce=t=>{this._instance=t,t.isCE=!0;const n=(a,o)=>{this.dispatchEvent(new CustomEvent(a,{detail:o}))};t.emit=(a,...o)=>{n(a,o),Zo(a)!==a&&n(Zo(a),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof X1){t.parent=i._instance,t.provides=i._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(t=>{const n=document.createElement("style");n.textContent=t,this.shadowRoot.appendChild(n)})}}function RV(r="$style"){{const e=Ju();if(!e)return on;const t=e.type.__cssModules;if(!t)return on;const n=t[r];return n||on}}function MV(r){const e=Ju();if(!e)return;const t=e.ut=(i=r(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(a=>GT(a,i))},n=()=>{const i=r(e.proxy);HT(e.subTree,i),t(i)};vD(n),Je(()=>{const i=new MutationObserver(n);i.observe(e.subTree.el.parentNode,{childList:!0}),ar(()=>i.disconnect())})}function HT(r,e){if(r.shapeFlag&128){const t=r.suspense;r=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{HT(t.activeBranch,e)})}for(;r.component;)r=r.component.subTree;if(r.shapeFlag&1&&r.el)GT(r.el,e);else if(r.type===Mi)r.children.forEach(t=>HT(t,e));else if(r.type===Wc){let{el:t,anchor:n}=r;for(;t&&(GT(t,e),t!==n);)t=t.nextSibling}}function GT(r,e){if(r.nodeType===1){const t=r.style;for(const n in e)t.setProperty(`--${n}`,e[n])}}const Wl="transition",Gd="animation",Y1=(r,{slots:e})=>JD(_F,oQ(r),e);Y1.displayName="Transition";const aQ={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},NV=Y1.props=zn({},_F.props,aQ),yc=(r,e=[])=>{Ee(r)?r.forEach(t=>t(...e)):r&&r(...e)},CR=r=>r?Ee(r)?r.some(e=>e.length>1):r.length>1:!1;function oQ(r){const e={};for(const x in r)x in aQ||(e[x]=r[x]);if(r.css===!1)return e;const{name:t="v",type:n,duration:i,enterFromClass:a=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:s=`${t}-enter-to`,appearFromClass:A=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:c=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=r,p=PV(i),v=p&&p[0],m=p&&p[1],{onBeforeEnter:g,onEnter:_,onEnterCancelled:E,onLeave:B,onLeaveCancelled:L,onBeforeAppear:O=g,onAppear:b=_,onAppearCancelled:T=E}=e,F=(x,N,P)=>{su(x,N?u:s),su(x,N?l:o),P&&P()},M=(x,N)=>{x._isLeaving=!1,su(x,c),su(x,f),su(x,h),N&&N()},S=x=>(N,P)=>{const Y=x?b:_,z=()=>F(N,x,P);yc(Y,[N,z]),BR(()=>{su(N,x?A:a),KA(N,x?u:s),CR(Y)||TR(N,n,v,z)})};return zn(e,{onBeforeEnter(x){yc(g,[x]),KA(x,a),KA(x,o)},onBeforeAppear(x){yc(O,[x]),KA(x,A),KA(x,l)},onEnter:S(!1),onAppear:S(!0),onLeave(x,N){x._isLeaving=!0;const P=()=>M(x,N);KA(x,c),AQ(),KA(x,h),BR(()=>{x._isLeaving&&(su(x,c),KA(x,f),CR(B)||TR(x,n,m,P))}),yc(B,[x,P])},onEnterCancelled(x){F(x,!1),yc(E,[x])},onAppearCancelled(x){F(x,!0),yc(T,[x])},onLeaveCancelled(x){M(x),yc(L,[x])}})}function PV(r){if(r==null)return null;if(pn(r))return[dC(r.enter),dC(r.leave)];{const e=dC(r);return[e,e]}}function dC(r){return hl(r)}function KA(r,e){e.split(/\s+/).forEach(t=>t&&r.classList.add(t)),(r._vtc||(r._vtc=new Set)).add(e)}function su(r,e){e.split(/\s+/).forEach(n=>n&&r.classList.remove(n));const{_vtc:t}=r;t&&(t.delete(e),t.size||(r._vtc=void 0))}function BR(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let UV=0;function TR(r,e,t,n){const i=r._endId=++UV,a=()=>{i===r._endId&&n()};if(t)return setTimeout(a,t);const{type:o,timeout:s,propCount:A}=sQ(r,e);if(!o)return n();const l=o+"end";let u=0;const c=()=>{r.removeEventListener(l,h),a()},h=f=>{f.target===r&&++u>=A&&c()};setTimeout(()=>{u<A&&c()},s+1),r.addEventListener(l,h)}function sQ(r,e){const t=window.getComputedStyle(r),n=p=>(t[p]||"").split(", "),i=n(`${Wl}Delay`),a=n(`${Wl}Duration`),o=xR(i,a),s=n(`${Gd}Delay`),A=n(`${Gd}Duration`),l=xR(s,A);let u=null,c=0,h=0;e===Wl?o>0&&(u=Wl,c=o,h=a.length):e===Gd?l>0&&(u=Gd,c=l,h=A.length):(c=Math.max(o,l),u=c>0?o>l?Wl:Gd:null,h=u?u===Wl?a.length:A.length:0);const f=u===Wl&&/\b(transform|all)(,|$)/.test(n(`${Wl}Property`).toString());return{type:u,timeout:c,propCount:h,hasTransform:f}}function xR(r,e){for(;r.length<e.length;)r=r.concat(r);return Math.max(...e.map((t,n)=>SR(t)+SR(r[n])))}function SR(r){return Number(r.slice(0,-1).replace(",","."))*1e3}function AQ(){return document.body.offsetHeight}const lQ=new WeakMap,uQ=new WeakMap,DV={name:"TransitionGroup",props:zn({},NV,{tag:String,moveClass:String}),setup(r,{slots:e}){const t=Ju(),n=mF();let i,a;return j1(()=>{if(!i.length)return;const o=r.moveClass||`${r.name||"v"}-move`;if(!$V(i[0].el,t.vnode.el,o))return;i.forEach(HV),i.forEach(GV);const s=i.filter(kV);AQ(),s.forEach(A=>{const l=A.el,u=l.style;KA(l,o),u.transform=u.webkitTransform=u.transitionDuration="";const c=l._moveCb=h=>{h&&h.target!==l||(!h||/transform$/.test(h.propertyName))&&(l.removeEventListener("transitionend",c),l._moveCb=null,su(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=Rr(r),s=oQ(o);let A=o.tag||Mi;i=a,a=e.default?k1(e.default()):[];for(let l=0;l<a.length;l++){const u=a[l];u.key!=null&&lh(u,Ep(u,s,n,t))}if(i)for(let l=0;l<i.length;l++){const u=i[l];lh(u,Ep(u,s,n,t)),lQ.set(u,u.el.getBoundingClientRect())}return Zr(A,null,a)}}},QV=DV;function HV(r){const e=r.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function GV(r){uQ.set(r,r.el.getBoundingClientRect())}function kV(r){const e=lQ.get(r),t=uQ.get(r),n=e.left-t.left,i=e.top-t.top;if(n||i){const a=r.el.style;return a.transform=a.webkitTransform=`translate(${n}px,${i}px)`,a.transitionDuration="0s",r}}function $V(r,e,t){const n=r.cloneNode();r._vtc&&r._vtc.forEach(o=>{o.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),t.split(/\s+/).forEach(o=>o&&n.classList.add(o)),n.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(n);const{hasTransform:a}=sQ(n);return i.removeChild(n),a}const Du=r=>{const e=r.props["onUpdate:modelValue"]||!1;return Ee(e)?t=>ap(e,t):e};function jV(r){r.target.composing=!0}function bR(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const y_={created(r,{modifiers:{lazy:e,trim:t,number:n}},i){r._assign=Du(i);const a=n||i.props&&i.props.type==="number";JA(r,e?"change":"input",o=>{if(o.target.composing)return;let s=r.value;t&&(s=s.trim()),a&&(s=hl(s)),r._assign(s)}),t&&JA(r,"change",()=>{r.value=r.value.trim()}),e||(JA(r,"compositionstart",jV),JA(r,"compositionend",bR),JA(r,"change",bR))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,modifiers:{lazy:t,trim:n,number:i}},a){if(r._assign=Du(a),r.composing||document.activeElement===r&&r.type!=="range"&&(t||n&&r.value.trim()===e||(i||r.type==="number")&&hl(r.value)===e))return;const o=e??"";r.value!==o&&(r.value=o)}},FF={deep:!0,created(r,e,t){r._assign=Du(t),JA(r,"change",()=>{const n=r._modelValue,i=Bp(r),a=r.checked,o=r._assign;if(Ee(n)){const s=O1(n,i),A=s!==-1;if(a&&!A)o(n.concat(i));else if(!a&&A){const l=[...n];l.splice(s,1),o(l)}}else if(Bh(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(hQ(r,a))})},mounted:FR,beforeUpdate(r,e,t){r._assign=Du(t),FR(r,e,t)}};function FR(r,{value:e,oldValue:t},n){r._modelValue=e,Ee(e)?r.checked=O1(e,n.props.value)>-1:Bh(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=Ru(e,hQ(r,!0)))}const IF={created(r,{value:e},t){r.checked=Ru(e,t.props.value),r._assign=Du(t),JA(r,"change",()=>{r._assign(Bp(r))})},beforeUpdate(r,{value:e,oldValue:t},n){r._assign=Du(n),e!==t&&(r.checked=Ru(e,n.props.value))}},cQ={deep:!0,created(r,{value:e,modifiers:{number:t}},n){const i=Bh(e);JA(r,"change",()=>{const a=Array.prototype.filter.call(r.options,o=>o.selected).map(o=>t?hl(Bp(o)):Bp(o));r._assign(r.multiple?i?new Set(a):a:a[0])}),r._assign=Du(n)},mounted(r,{value:e}){IR(r,e)},beforeUpdate(r,e,t){r._assign=Du(t)},updated(r,{value:e}){IR(r,e)}};function IR(r,e){const t=r.multiple;if(!(t&&!Ee(e)&&!Bh(e))){for(let n=0,i=r.options.length;n<i;n++){const a=r.options[n],o=Bp(a);if(t)Ee(e)?a.selected=O1(e,o)>-1:a.selected=e.has(o);else if(Ru(Bp(a),e)){r.selectedIndex!==n&&(r.selectedIndex=n);return}}!t&&r.selectedIndex!==-1&&(r.selectedIndex=-1)}}function Bp(r){return"_value"in r?r._value:r.value}function hQ(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const fQ={created(r,e,t){Cm(r,e,t,null,"created")},mounted(r,e,t){Cm(r,e,t,null,"mounted")},beforeUpdate(r,e,t,n){Cm(r,e,t,n,"beforeUpdate")},updated(r,e,t,n){Cm(r,e,t,n,"updated")}};function pQ(r,e){switch(r){case"SELECT":return cQ;case"TEXTAREA":return y_;default:switch(e){case"checkbox":return FF;case"radio":return IF;default:return y_}}}function Cm(r,e,t,n,i){const o=pQ(r.tagName,t.props&&t.props.type)[i];o&&o(r,e,t,n)}function VV(){y_.getSSRProps=({value:r})=>({value:r}),IF.getSSRProps=({value:r},e)=>{if(e.props&&Ru(e.props.value,r))return{checked:!0}},FF.getSSRProps=({value:r},e)=>{if(Ee(r)){if(e.props&&O1(r,e.props.value)>-1)return{checked:!0}}else if(Bh(r)){if(e.props&&r.has(e.props.value))return{checked:!0}}else if(r)return{checked:!0}},fQ.getSSRProps=(r,e)=>{if(typeof e.type!="string")return;const t=pQ(e.type.toUpperCase(),e.props&&e.props.type);if(t.getSSRProps)return t.getSSRProps(r,e)}}const KV=["ctrl","shift","alt","meta"],zV={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>KV.some(t=>r[`${t}Key`]&&!e.includes(t))},XV=(r,e)=>(t,...n)=>{for(let i=0;i<e.length;i++){const a=zV[e[i]];if(a&&a(t,e))return}return r(t,...n)},YV={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},WV=(r,e)=>t=>{if(!("key"in t))return;const n=Zo(t.key);if(e.some(i=>i===n||YV[i]===n))return r(t)},dQ={beforeMount(r,{value:e},{transition:t}){r._vod=r.style.display==="none"?"":r.style.display,t&&e?t.beforeEnter(r):kd(r,e)},mounted(r,{value:e},{transition:t}){t&&e&&t.enter(r)},updated(r,{value:e,oldValue:t},{transition:n}){!e!=!t&&(n?e?(n.beforeEnter(r),kd(r,!0),n.enter(r)):n.leave(r,()=>{kd(r,!1)}):kd(r,e))},beforeUnmount(r,{value:e}){kd(r,e)}};function kd(r,e){r.style.display=e?r._vod:"none"}function qV(){dQ.getSSRProps=({value:r})=>{if(!r)return{style:{display:"none"}}}}const vQ=zn({patchProp:FV},vV);let Uv,LR=!1;function gQ(){return Uv||(Uv=DD(vQ))}function yQ(){return Uv=LR?Uv:QD(vQ),LR=!0,Uv}const kT=(...r)=>{gQ().render(...r)},mQ=(...r)=>{yQ().hydrate(...r)},_Q=(...r)=>{const e=gQ().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=wQ(n);if(!i)return;const a=e._component;!Ke(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=t(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e},ZV=(...r)=>{const e=yQ().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=wQ(n);if(i)return t(i,!0,i instanceof SVGElement)},e};function wQ(r){return Un(r)?document.querySelector(r):r}let OR=!1;const JV=()=>{OR||(OR=!0,VV(),qV())},tK=()=>{},eK=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:_F,Comment:xa,EffectScope:aF,Fragment:Mi,KeepAlive:gj,ReactiveEffect:Gg,Static:Wc,Suspense:sj,Teleport:$j,Text:uh,Transition:Y1,TransitionGroup:QV,VueElement:X1,callWithAsyncErrorHandling:No,callWithErrorHandling:rl,camelize:lo,capitalize:Hg,cloneVNode:uA,compatUtils:pV,compile:tK,computed:fr,createApp:_Q,createBlock:Vg,createCommentVNode:vr,createElementBlock:Vn,createElementVNode:Xi,createHydrationRenderer:QD,createPropsRestProxy:sV,createRenderer:DD,createSSRApp:ZV,createSlots:Cj,createStaticVNode:Kj,createTextVNode:SF,createVNode:Zr,customRef:V$,defineAsyncComponent:dj,defineComponent:wF,defineCustomElement:iQ,defineEmits:eV,defineExpose:rV,defineProps:tV,defineSSRCustomElement:LV,get devtools(){return Rf},effect:f$,effectScope:A$,getCurrentInstance:Ju,getCurrentScope:l$,getTransitionRawChildren:k1,guardReactiveProps:VD,h:JD,handleError:Th,hydrate:mQ,initCustomFormatter:lV,initDirectivesForSSR:JV,inject:Be,isMemoSame:rQ,isProxy:lF,isReactive:Xc,isReadonly:Ah,isRef:Zi,isRuntimeOnly:qj,isShallow:ng,isVNode:Pu,markRaw:uF,mergeDefaults:oV,mergeProps:KD,nextTick:dF,normalizeClass:Ug,normalizeProps:q9,normalizeStyle:Pg,onActivated:mD,onBeforeMount:ED,onBeforeUnmount:V1,onBeforeUpdate:CD,onDeactivated:_D,onErrorCaptured:SD,onMounted:Je,onRenderTracked:xD,onRenderTriggered:TD,onScopeDispose:u$,onServerPrefetch:BD,onUnmounted:ar,onUpdated:j1,openBlock:fn,popScopeId:hD,provide:Pr,proxyRefs:fF,pushScopeId:cD,queuePostFlushCb:vF,reactive:kg,readonly:AF,ref:kn,registerRuntimeCompiler:Wj,render:kT,renderList:FD,renderSlot:_r,resolveComponent:Mf,resolveDirective:Ej,resolveDynamicComponent:wj,resolveFilter:fV,resolveTransitionHooks:Ep,setBlockTracking:NT,setDevtoolsHook:lD,setTransitionHooks:lh,shallowReactive:eD,shallowReadonly:Q$,shallowRef:H$,ssrContextKey:tQ,ssrUtils:hV,stop:p$,toDisplayString:ou,toHandlerKey:Rv,toHandlers:Bj,toRaw:Rr,toRef:iD,toRefs:Nu,transformVNodeArgs:jj,triggerRef:k$,unref:nD,useAttrs:aV,useCssModule:RV,useCssVars:MV,useSSRContext:eQ,useSlots:iV,useTransitionState:mF,vModelCheckbox:FF,vModelDynamic:fQ,vModelRadio:IF,vModelSelect:cQ,vModelText:y_,vShow:dQ,version:nQ,warn:Y$,watch:fe,watchEffect:dD,watchPostEffect:vD,watchSyncEffect:hj,withAsyncContext:AV,withCtx:Qc,withDefaults:nV,withDirectives:mj,withKeys:WV,withMemo:uV,withModifiers:XV,withScopeId:ej},Symbol.toStringTag,{value:"Module"})),rK={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};let nK=class{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||rK[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const EQ=nK,Kg=6378137,Vf=Math.PI*Kg,iK=[-Vf,-Vf,Vf,Vf],aK=[-180,-85,180,85],Bm=Kg*Math.log(Math.tan(Math.PI/2));let ff=class extends EQ{constructor(e){super({code:e,units:"m",extent:iK,global:!0,worldExtent:aK,getPointResolution:function(t,n){return t/Math.cosh(n[1]/Kg)}})}};const RR=[new ff("EPSG:3857"),new ff("EPSG:102100"),new ff("EPSG:102113"),new ff("EPSG:900913"),new ff("http://www.opengis.net/def/crs/EPSG/0/3857"),new ff("http://www.opengis.net/gml/srs/epsg.xml#3857")];function oK(r,e,t){const n=r.length;t=t>1?t:2,e===void 0&&(t>2?e=r.slice():e=new Array(n));for(let i=0;i<n;i+=t){e[i]=Vf*r[i]/180;let a=Kg*Math.log(Math.tan(Math.PI*(+r[i+1]+90)/360));a>Bm?a=Bm:a<-Bm&&(a=-Bm),e[i+1]=a}return e}function sK(r,e,t){const n=r.length;t=t>1?t:2,e===void 0&&(t>2?e=r.slice():e=new Array(n));for(let i=0;i<n;i+=t)e[i]=180*r[i]/Vf,e[i+1]=360*Math.atan(Math.exp(r[i+1]/Kg))/Math.PI-90;return e}const AK=6378137,MR=[-180,-90,180,90],lK=Math.PI*AK/180;let mc=class extends EQ{constructor(e,t){super({code:e,units:"degrees",extent:MR,axisOrientation:t,global:!0,metersPerUnit:lK,worldExtent:MR})}};const NR=[new mc("CRS:84"),new mc("EPSG:4326","neu"),new mc("urn:ogc:def:crs:OGC:1.3:CRS84"),new mc("urn:ogc:def:crs:OGC:2:84"),new mc("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new mc("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new mc("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let $T={};function uK(r){return $T[r]||$T[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function cK(r,e){$T[r]=e}let Ap={};function m_(r,e,t){const n=r.getCode(),i=e.getCode();n in Ap||(Ap[n]={}),Ap[n][i]=t}function hK(r,e){let t;return r in Ap&&e in Ap[r]&&(t=Ap[r][e]),t}function CQ(r,e){if(e!==void 0){for(let t=0,n=r.length;t<n;++t)e[t]=r[t];e=e}else e=r.slice();return e}function fK(r,e){if(e!==void 0&&r!==e){for(let t=0,n=r.length;t<n;++t)e[t]=r[t];r=e}return r}function pK(r){cK(r.getCode(),r),m_(r,r,CQ)}function dK(r){r.forEach(pK)}function PR(r){return typeof r=="string"?uK(r):r||null}function UR(r){dK(r),r.forEach(function(e){r.forEach(function(t){e!==t&&m_(e,t,CQ)})})}function vK(r,e,t,n){r.forEach(function(i){e.forEach(function(a){m_(i,a,t),m_(a,i,n)})})}function DR(r,e){return mK(r,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function gK(r,e){const t=r.getCode(),n=e.getCode();let i=hK(t,n);return i||(i=fK),i}function yK(r,e){const t=PR(r),n=PR(e);return gK(t,n)}function mK(r,e,t){return yK(e,t)(r,void 0,r.length)}function _K(){UR(RR),UR(NR),vK(NR,RR,oK,sK)}_K();function BQ(r,e){return function(){return r.apply(e,arguments)}}const{toString:TQ}=Object.prototype,{getPrototypeOf:LF}=Object,OF=(r=>e=>{const t=TQ.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),El=r=>(r=r.toLowerCase(),e=>OF(e)===r),W1=r=>e=>typeof e===r,{isArray:$p}=Array,lg=W1("undefined");function wK(r){return r!==null&&!lg(r)&&r.constructor!==null&&!lg(r.constructor)&&Qu(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const xQ=El("ArrayBuffer");function EK(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&xQ(r.buffer),e}const CK=W1("string"),Qu=W1("function"),SQ=W1("number"),RF=r=>r!==null&&typeof r=="object",BK=r=>r===!0||r===!1,U0=r=>{if(OF(r)!=="object")return!1;const e=LF(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},TK=El("Date"),xK=El("File"),SK=El("Blob"),bK=El("FileList"),FK=r=>RF(r)&&Qu(r.pipe),IK=r=>{const e="[object FormData]";return r&&(typeof FormData=="function"&&r instanceof FormData||TQ.call(r)===e||Qu(r.toString)&&r.toString()===e)},LK=El("URLSearchParams"),OK=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zg(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),$p(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const a=t?Object.getOwnPropertyNames(r):Object.keys(r),o=a.length;let s;for(n=0;n<o;n++)s=a[n],e.call(null,r[s],s,r)}}function bQ(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const FQ=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),IQ=r=>!lg(r)&&r!==FQ;function jT(){const{caseless:r}=IQ(this)&&this||{},e={},t=(n,i)=>{const a=r&&bQ(e,i)||i;U0(e[a])&&U0(n)?e[a]=jT(e[a],n):U0(n)?e[a]=jT({},n):$p(n)?e[a]=n.slice():e[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&zg(arguments[n],t);return e}const RK=(r,e,t,{allOwnKeys:n}={})=>(zg(e,(i,a)=>{t&&Qu(i)?r[a]=BQ(i,t):r[a]=i},{allOwnKeys:n}),r),MK=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),NK=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},PK=(r,e,t,n)=>{let i,a,o;const s={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),a=i.length;a-- >0;)o=i[a],(!n||n(o,r,e))&&!s[o]&&(e[o]=r[o],s[o]=!0);r=t!==!1&&LF(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},UK=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},DK=r=>{if(!r)return null;if($p(r))return r;let e=r.length;if(!SQ(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},QK=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&LF(Uint8Array)),HK=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const a=i.value;e.call(r,a[0],a[1])}},GK=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},kK=El("HTMLFormElement"),$K=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),QR=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),jK=El("RegExp"),LQ=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};zg(t,(i,a)=>{e(i,a,r)!==!1&&(n[a]=i)}),Object.defineProperties(r,n)},VK=r=>{LQ(r,(e,t)=>{if(Qu(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(Qu(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},KK=(r,e)=>{const t={},n=i=>{i.forEach(a=>{t[a]=!0})};return $p(r)?n(r):n(String(r).split(e)),t},zK=()=>{},XK=(r,e)=>(r=+r,Number.isFinite(r)?r:e),vC="abcdefghijklmnopqrstuvwxyz",HR="0123456789",OQ={DIGIT:HR,ALPHA:vC,ALPHA_DIGIT:vC+vC.toUpperCase()+HR},YK=(r=16,e=OQ.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function WK(r){return!!(r&&Qu(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const qK=r=>{const e=new Array(10),t=(n,i)=>{if(RF(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const a=$p(n)?[]:{};return zg(n,(o,s)=>{const A=t(o,i+1);!lg(A)&&(a[s]=A)}),e[i]=void 0,a}}return n};return t(r,0)},Ut={isArray:$p,isArrayBuffer:xQ,isBuffer:wK,isFormData:IK,isArrayBufferView:EK,isString:CK,isNumber:SQ,isBoolean:BK,isObject:RF,isPlainObject:U0,isUndefined:lg,isDate:TK,isFile:xK,isBlob:SK,isRegExp:jK,isFunction:Qu,isStream:FK,isURLSearchParams:LK,isTypedArray:QK,isFileList:bK,forEach:zg,merge:jT,extend:RK,trim:OK,stripBOM:MK,inherits:NK,toFlatObject:PK,kindOf:OF,kindOfTest:El,endsWith:UK,toArray:DK,forEachEntry:HK,matchAll:GK,isHTMLForm:kK,hasOwnProperty:QR,hasOwnProp:QR,reduceDescriptors:LQ,freezeMethods:VK,toObjectSet:KK,toCamelCase:$K,noop:zK,toFiniteNumber:XK,findKey:bQ,global:FQ,isContextDefined:IQ,ALPHABET:OQ,generateString:YK,isSpecCompliantForm:WK,toJSONObject:qK};function Ir(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i)}Ut.inherits(Ir,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ut.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const RQ=Ir.prototype,MQ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{MQ[r]={value:r}});Object.defineProperties(Ir,MQ);Object.defineProperty(RQ,"isAxiosError",{value:!0});Ir.from=(r,e,t,n,i,a)=>{const o=Object.create(RQ);return Ut.toFlatObject(r,o,function(A){return A!==Error.prototype},s=>s!=="isAxiosError"),Ir.call(o,r.message,e,t,n,i),o.cause=r,o.name=r.name,a&&Object.assign(o,a),o};const ZK=null;function VT(r){return Ut.isPlainObject(r)||Ut.isArray(r)}function NQ(r){return Ut.endsWith(r,"[]")?r.slice(0,-2):r}function GR(r,e,t){return r?r.concat(e).map(function(i,a){return i=NQ(i),!t&&a?"["+i+"]":i}).join(t?".":""):e}function JK(r){return Ut.isArray(r)&&!r.some(VT)}const tz=Ut.toFlatObject(Ut,{},null,function(e){return/^is[A-Z]/.test(e)});function q1(r,e,t){if(!Ut.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=Ut.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,m){return!Ut.isUndefined(m[v])});const n=t.metaTokens,i=t.visitor||u,a=t.dots,o=t.indexes,A=(t.Blob||typeof Blob<"u"&&Blob)&&Ut.isSpecCompliantForm(e);if(!Ut.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(Ut.isDate(p))return p.toISOString();if(!A&&Ut.isBlob(p))throw new Ir("Blob is not supported. Use a Buffer instead.");return Ut.isArrayBuffer(p)||Ut.isTypedArray(p)?A&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,v,m){let g=p;if(p&&!m&&typeof p=="object"){if(Ut.endsWith(v,"{}"))v=n?v:v.slice(0,-2),p=JSON.stringify(p);else if(Ut.isArray(p)&&JK(p)||(Ut.isFileList(p)||Ut.endsWith(v,"[]"))&&(g=Ut.toArray(p)))return v=NQ(v),g.forEach(function(E,B){!(Ut.isUndefined(E)||E===null)&&e.append(o===!0?GR([v],B,a):o===null?v:v+"[]",l(E))}),!1}return VT(p)?!0:(e.append(GR(m,v,a),l(p)),!1)}const c=[],h=Object.assign(tz,{defaultVisitor:u,convertValue:l,isVisitable:VT});function f(p,v){if(!Ut.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));c.push(p),Ut.forEach(p,function(g,_){(!(Ut.isUndefined(g)||g===null)&&i.call(e,g,Ut.isString(_)?_.trim():_,v,h))===!0&&f(g,v?v.concat(_):[_])}),c.pop()}}if(!Ut.isObject(r))throw new TypeError("data must be an object");return f(r),e}function kR(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function MF(r,e){this._pairs=[],r&&q1(r,this,e)}const PQ=MF.prototype;PQ.append=function(e,t){this._pairs.push([e,t])};PQ.toString=function(e){const t=e?function(n){return e.call(this,n,kR)}:kR;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function ez(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function UQ(r,e,t){if(!e)return r;const n=t&&t.encode||ez,i=t&&t.serialize;let a;if(i?a=i(e,t):a=Ut.isURLSearchParams(e)?e.toString():new MF(e,t).toString(n),a){const o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class rz{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ut.forEach(this.handlers,function(n){n!==null&&e(n)})}}const $R=rz,DQ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nz=typeof URLSearchParams<"u"?URLSearchParams:MF,iz=FormData,az=(()=>{let r;return typeof navigator<"u"&&((r=navigator.product)==="ReactNative"||r==="NativeScript"||r==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),oz=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),eA={isBrowser:!0,classes:{URLSearchParams:nz,FormData:iz,Blob},isStandardBrowserEnv:az,isStandardBrowserWebWorkerEnv:oz,protocols:["http","https","file","blob","url","data"]};function sz(r,e){return q1(r,new eA.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,a){return eA.isNode&&Ut.isBuffer(t)?(this.append(n,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function Az(r){return Ut.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function lz(r){const e={},t=Object.keys(r);let n;const i=t.length;let a;for(n=0;n<i;n++)a=t[n],e[a]=r[a];return e}function QQ(r){function e(t,n,i,a){let o=t[a++];const s=Number.isFinite(+o),A=a>=t.length;return o=!o&&Ut.isArray(i)?i.length:o,A?(Ut.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!Ut.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],a)&&Ut.isArray(i[o])&&(i[o]=lz(i[o])),!s)}if(Ut.isFormData(r)&&Ut.isFunction(r.entries)){const t={};return Ut.forEachEntry(r,(n,i)=>{e(Az(n),i,t,0)}),t}return null}const uz={"Content-Type":void 0};function cz(r,e,t){if(Ut.isString(r))try{return(e||JSON.parse)(r),Ut.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Z1={transitional:DQ,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=Ut.isObject(e);if(a&&Ut.isHTMLForm(e)&&(e=new FormData(e)),Ut.isFormData(e))return i&&i?JSON.stringify(QQ(e)):e;if(Ut.isArrayBuffer(e)||Ut.isBuffer(e)||Ut.isStream(e)||Ut.isFile(e)||Ut.isBlob(e))return e;if(Ut.isArrayBufferView(e))return e.buffer;if(Ut.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return sz(e,this.formSerializer).toString();if((s=Ut.isFileList(e))||n.indexOf("multipart/form-data")>-1){const A=this.env&&this.env.FormData;return q1(s?{"files[]":e}:e,A&&new A,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),cz(e)):e}],transformResponse:[function(e){const t=this.transitional||Z1.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(e&&Ut.isString(e)&&(n&&!this.responseType||i)){const o=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?Ir.from(s,Ir.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eA.classes.FormData,Blob:eA.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ut.forEach(["delete","get","head"],function(e){Z1.headers[e]={}});Ut.forEach(["post","put","patch"],function(e){Z1.headers[e]=Ut.merge(uz)});const NF=Z1,hz=Ut.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fz=r=>{const e={};let t,n,i;return r&&r.split(`
`).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!t||e[t]&&hz[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},jR=Symbol("internals");function $d(r){return r&&String(r).trim().toLowerCase()}function D0(r){return r===!1||r==null?r:Ut.isArray(r)?r.map(D0):String(r)}function pz(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}function dz(r){return/^[-_a-zA-Z]+$/.test(r.trim())}function gC(r,e,t,n){if(Ut.isFunction(n))return n.call(this,e,t);if(Ut.isString(e)){if(Ut.isString(n))return e.indexOf(n)!==-1;if(Ut.isRegExp(n))return n.test(e)}}function vz(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function gz(r,e){const t=Ut.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,a,o){return this[n].call(this,e,i,a,o)},configurable:!0})})}class J1{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function a(s,A,l){const u=$d(A);if(!u)throw new Error("header name must be a non-empty string");const c=Ut.findKey(i,u);(!c||i[c]===void 0||l===!0||l===void 0&&i[c]!==!1)&&(i[c||A]=D0(s))}const o=(s,A)=>Ut.forEach(s,(l,u)=>a(l,u,A));return Ut.isPlainObject(e)||e instanceof this.constructor?o(e,t):Ut.isString(e)&&(e=e.trim())&&!dz(e)?o(fz(e),t):e!=null&&a(t,e,n),this}get(e,t){if(e=$d(e),e){const n=Ut.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return pz(i);if(Ut.isFunction(t))return t.call(this,i,n);if(Ut.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=$d(e),e){const n=Ut.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||gC(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function a(o){if(o=$d(o),o){const s=Ut.findKey(n,o);s&&(!t||gC(n,n[s],s,t))&&(delete n[s],i=!0)}}return Ut.isArray(e)?e.forEach(a):a(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const a=t[n];(!e||gC(this,this[a],a,e))&&(delete this[a],i=!0)}return i}normalize(e){const t=this,n={};return Ut.forEach(this,(i,a)=>{const o=Ut.findKey(n,a);if(o){t[o]=D0(i),delete t[a];return}const s=e?vz(a):String(a).trim();s!==a&&delete t[a],t[s]=D0(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ut.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&Ut.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[jR]=this[jR]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=$d(o);n[s]||(gz(i,o),n[s]=!0)}return Ut.isArray(e)?e.forEach(a):a(e),this}}J1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ut.freezeMethods(J1.prototype);Ut.freezeMethods(J1);const nl=J1;function yC(r,e){const t=this||NF,n=e||t,i=nl.from(n.headers);let a=n.data;return Ut.forEach(r,function(s){a=s.call(t,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function HQ(r){return!!(r&&r.__CANCEL__)}function Xg(r,e,t){Ir.call(this,r??"canceled",Ir.ERR_CANCELED,e,t),this.name="CanceledError"}Ut.inherits(Xg,Ir,{__CANCEL__:!0});function yz(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new Ir("Request failed with status code "+t.status,[Ir.ERR_BAD_REQUEST,Ir.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const mz=eA.isStandardBrowserEnv?function(){return{write:function(t,n,i,a,o,s){const A=[];A.push(t+"="+encodeURIComponent(n)),Ut.isNumber(i)&&A.push("expires="+new Date(i).toGMTString()),Ut.isString(a)&&A.push("path="+a),Ut.isString(o)&&A.push("domain="+o),s===!0&&A.push("secure"),document.cookie=A.join("; ")},read:function(t){const n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function _z(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function wz(r,e){return e?r.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):r}function GQ(r,e){return r&&!_z(e)?wz(r,e):e}const Ez=eA.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function i(a){let o=a;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(o){const s=Ut.isString(o)?i(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function Cz(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function Bz(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,a=0,o;return e=e!==void 0?e:1e3,function(A){const l=Date.now(),u=n[a];o||(o=l),t[i]=A,n[i]=l;let c=a,h=0;for(;c!==i;)h+=t[c++],c=c%r;if(i=(i+1)%r,i===a&&(a=(a+1)%r),l-o<e)return;const f=u&&l-u;return f?Math.round(h*1e3/f):void 0}}function VR(r,e){let t=0;const n=Bz(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-t,A=n(s),l=a<=o;t=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:A||void 0,estimated:A&&o&&l?(o-a)/A:void 0,event:i};u[e?"download":"upload"]=!0,r(u)}}const Tz=typeof XMLHttpRequest<"u",xz=Tz&&function(r){return new Promise(function(t,n){let i=r.data;const a=nl.from(r.headers).normalize(),o=r.responseType;let s;function A(){r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}Ut.isFormData(i)&&(eA.isStandardBrowserEnv||eA.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(r.auth){const f=r.auth.username||"",p=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";a.set("Authorization","Basic "+btoa(f+":"+p))}const u=GQ(r.baseURL,r.url);l.open(r.method.toUpperCase(),UQ(u,r.params,r.paramsSerializer),!0),l.timeout=r.timeout;function c(){if(!l)return;const f=nl.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:f,config:r,request:l};yz(function(g){t(g),A()},function(g){n(g),A()},v),l=null}if("onloadend"in l?l.onloadend=c:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(c)},l.onabort=function(){l&&(n(new Ir("Request aborted",Ir.ECONNABORTED,r,l)),l=null)},l.onerror=function(){n(new Ir("Network Error",Ir.ERR_NETWORK,r,l)),l=null},l.ontimeout=function(){let p=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const v=r.transitional||DQ;r.timeoutErrorMessage&&(p=r.timeoutErrorMessage),n(new Ir(p,v.clarifyTimeoutError?Ir.ETIMEDOUT:Ir.ECONNABORTED,r,l)),l=null},eA.isStandardBrowserEnv){const f=(r.withCredentials||Ez(u))&&r.xsrfCookieName&&mz.read(r.xsrfCookieName);f&&a.set(r.xsrfHeaderName,f)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&Ut.forEach(a.toJSON(),function(p,v){l.setRequestHeader(v,p)}),Ut.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),o&&o!=="json"&&(l.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&l.addEventListener("progress",VR(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",VR(r.onUploadProgress)),(r.cancelToken||r.signal)&&(s=f=>{l&&(n(!f||f.type?new Xg(null,r,l):f),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const h=Cz(u);if(h&&eA.protocols.indexOf(h)===-1){n(new Ir("Unsupported protocol "+h+":",Ir.ERR_BAD_REQUEST,r));return}l.send(i||null)})},Q0={http:ZK,xhr:xz};Ut.forEach(Q0,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Sz={getAdapter:r=>{r=Ut.isArray(r)?r:[r];const{length:e}=r;let t,n;for(let i=0;i<e&&(t=r[i],!(n=Ut.isString(t)?Q0[t.toLowerCase()]:t));i++);if(!n)throw n===!1?new Ir(`Adapter ${t} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Ut.hasOwnProp(Q0,t)?`Adapter '${t}' is not available in the build`:`Unknown adapter '${t}'`);if(!Ut.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Q0};function mC(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Xg(null,r)}function KR(r){return mC(r),r.headers=nl.from(r.headers),r.data=yC.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Sz.getAdapter(r.adapter||NF.adapter)(r).then(function(n){return mC(r),n.data=yC.call(r,r.transformResponse,n),n.headers=nl.from(n.headers),n},function(n){return HQ(n)||(mC(r),n&&n.response&&(n.response.data=yC.call(r,r.transformResponse,n.response),n.response.headers=nl.from(n.response.headers))),Promise.reject(n)})}const zR=r=>r instanceof nl?r.toJSON():r;function Tp(r,e){e=e||{};const t={};function n(l,u,c){return Ut.isPlainObject(l)&&Ut.isPlainObject(u)?Ut.merge.call({caseless:c},l,u):Ut.isPlainObject(u)?Ut.merge({},u):Ut.isArray(u)?u.slice():u}function i(l,u,c){if(Ut.isUndefined(u)){if(!Ut.isUndefined(l))return n(void 0,l,c)}else return n(l,u,c)}function a(l,u){if(!Ut.isUndefined(u))return n(void 0,u)}function o(l,u){if(Ut.isUndefined(u)){if(!Ut.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function s(l,u,c){if(c in e)return n(l,u);if(c in r)return n(void 0,l)}const A={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,u)=>i(zR(l),zR(u),!0)};return Ut.forEach(Object.keys(r).concat(Object.keys(e)),function(u){const c=A[u]||i,h=c(r[u],e[u],u);Ut.isUndefined(h)&&c!==s||(t[u]=h)}),t}const kQ="1.3.1",PF={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{PF[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const XR={};PF.transitional=function(e,t,n){function i(a,o){return"[Axios v"+kQ+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(e===!1)throw new Ir(i(o," has been removed"+(t?" in "+t:"")),Ir.ERR_DEPRECATED);return t&&!XR[o]&&(XR[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,o,s):!0}};function bz(r,e,t){if(typeof r!="object")throw new Ir("options must be an object",Ir.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const a=n[i],o=e[a];if(o){const s=r[a],A=s===void 0||o(s,a,r);if(A!==!0)throw new Ir("option "+a+" must be "+A,Ir.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Ir("Unknown option "+a,Ir.ERR_BAD_OPTION)}}const KT={assertOptions:bz,validators:PF},ql=KT.validators;class __{constructor(e){this.defaults=e,this.interceptors={request:new $R,response:new $R}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Tp(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:a}=t;n!==void 0&&KT.assertOptions(n,{silentJSONParsing:ql.transitional(ql.boolean),forcedJSONParsing:ql.transitional(ql.boolean),clarifyTimeoutError:ql.transitional(ql.boolean)},!1),i!==void 0&&KT.assertOptions(i,{encode:ql.function,serialize:ql.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o;o=a&&Ut.merge(a.common,a[t.method]),o&&Ut.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),t.headers=nl.concat(o,a);const s=[];let A=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(A=A&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let u,c=0,h;if(!A){const p=[KR.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,l),h=p.length,u=Promise.resolve(t);c<h;)u=u.then(p[c++],p[c++]);return u}h=s.length;let f=t;for(c=0;c<h;){const p=s[c++],v=s[c++];try{f=p(f)}catch(m){v.call(this,m);break}}try{u=KR.call(this,f)}catch(p){return Promise.reject(p)}for(c=0,h=l.length;c<h;)u=u.then(l[c++],l[c++]);return u}getUri(e){e=Tp(this.defaults,e);const t=GQ(e.baseURL,e.url);return UQ(t,e.params,e.paramsSerializer)}}Ut.forEach(["delete","get","head","options"],function(e){__.prototype[e]=function(t,n){return this.request(Tp(n||{},{method:e,url:t,data:(n||{}).data}))}});Ut.forEach(["post","put","patch"],function(e){function t(n){return function(a,o,s){return this.request(Tp(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}__.prototype[e]=t(),__.prototype[e+"Form"]=t(!0)});const H0=__;class UF{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},e(function(a,o,s){n.reason||(n.reason=new Xg(a,o,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new UF(function(i){e=i}),cancel:e}}}const Fz=UF;function Iz(r){return function(t){return r.apply(null,t)}}function Lz(r){return Ut.isObject(r)&&r.isAxiosError===!0}const zT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zT).forEach(([r,e])=>{zT[e]=r});const Oz=zT;function $Q(r){const e=new H0(r),t=BQ(H0.prototype.request,e);return Ut.extend(t,H0.prototype,e,{allOwnKeys:!0}),Ut.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return $Q(Tp(r,i))},t}const Qi=$Q(NF);Qi.Axios=H0;Qi.CanceledError=Xg;Qi.CancelToken=Fz;Qi.isCancel=HQ;Qi.VERSION=kQ;Qi.toFormData=q1;Qi.AxiosError=Ir;Qi.Cancel=Qi.CanceledError;Qi.all=function(e){return Promise.all(e)};Qi.spread=Iz;Qi.isAxiosError=Lz;Qi.mergeConfig=Tp;Qi.AxiosHeaders=nl;Qi.formToJSON=r=>QQ(Ut.isHTMLForm(r)?new FormData(r):r);Qi.HttpStatusCode=Oz;Qi.default=Qi;const YR=Qi,Rz=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},Mz={name:"MapsOverlay",data(){const r=kn(DR([-7.5029786,53.4494762])),e=kn("EPSG:3857"),t=kn(7),n=kn(0),i=kn(10),a=kn(1),o=kn("black"),s=kn("red");return{center:r,projection:e,zoom:t,rotation:n,radius:i,strokeWidth:a,strokeColor:o,fillColor:s,coordinates:[],dbLiveTrainData:[],allDataMap:{},selectedDataMap:{},display:!1}},created(){this.getLiveTrainData()},methods:{getLiveTrainData(){let r=this.$loading.show({loader:"dots",container:this.$refs.container,canCancel:!1});YR.get("https://us-central1-concept-d5be1.cloudfunctions.net/getLiveTrainData").then(e=>{r.hide(),this.dbLiveTrainData=e.data;for(var t=0;t<this.dbLiveTrainData.data.length;t++)this.coordinates[t]=kn(DR([this.dbLiveTrainData.data[t].TrainLongitude[0],this.dbLiveTrainData.data[t].TrainLatitude[0]])),this.allDataMap[t]=this.dbLiveTrainData.data[t]}).catch(e=>{console.log(e)})},getSelectedTrain(r){this.display=!0,this.selectedDataMap.TrainCode=this.allDataMap[r].TrainCode[0],this.selectedDataMap.TrainDate=this.allDataMap[r].TrainDate[0],this.selectedDataMap.TrainStatus=this.allDataMap[r].TrainStatus[0],this.selectedDataMap.TrainLongitude=this.allDataMap[r].TrainLongitude[0],this.selectedDataMap.TrainLatitude=this.allDataMap[r].TrainLatitude[0],this.selectedDataMap.Direction=this.allDataMap[r].Direction[0],this.selectedDataMap.PublicMessage=this.allDataMap[r].PublicMessage[0]},postLiveTrainData(){YR.get("https://us-central1-concept-d5be1.cloudfunctions.net/postLiveTrainData").then(r=>{console.log(r.data)}).catch(r=>{console.log(r)})}}},jQ=r=>(cD("data-v-37987b9c"),r=r(),hD(),r),Nz={key:0,id:"sidebarDiv"},Pz={id:"sidebarHeader"},Uz=jQ(()=>Xi("img",{id:"headerImage",src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png"},null,-1)),Dz={id:"sidebarDiv"},Qz=["onClick"],Hz=jQ(()=>Xi("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",class:"trainMapIcon"},null,-1)),Gz=[Hz];function kz(r,e,t,n,i,a){const o=Mf("ol-view"),s=Mf("ol-source-osm"),A=Mf("ol-tile-layer"),l=Mf("ol-overlay"),u=Mf("ol-map");return fn(),Vn(Mi,null,[Xi("button",{onClick:e[0]||(e[0]=(...c)=>a.getLiveTrainData&&a.getLiveTrainData(...c))},"Fetch Data"),Xi("button",{onClick:e[1]||(e[1]=(...c)=>a.postLiveTrainData&&a.postLiveTrainData(...c))},"Populate Database"),Zr(Y1,{id:"sidebar",name:"slideLeft"},{default:Qc(()=>[this.display?(fn(),Vn("div",Nz,[Xi("div",Pz,[Uz,Xi("div",{onClick:e[2]||(e[2]=c=>this.display=!1),id:"xButton"},"X")]),Xi("div",Dz,[Xi("h2",null,"Train Code: "+ou(i.selectedDataMap.TrainCode),1),Xi("p",null,"Date: "+ou(i.selectedDataMap.TrainDate),1),Xi("p",null,"Status: "+ou(i.selectedDataMap.TrainStatus),1),Xi("p",null,"Longitude: "+ou(i.selectedDataMap.TrainLongitude),1),Xi("p",null,"Latitude: "+ou(i.selectedDataMap.TrainLatitude),1),Xi("p",null,"Direction: "+ou(i.selectedDataMap.Direction),1),Xi("p",null,"Public Message: "+ou(i.selectedDataMap.PublicMessage),1)])])):vr("",!0)]),_:1}),Zr(u,{loadTilesWhileAnimating:!0,loadTilesWhileInteracting:!0,style:{height:"1000px"}},{default:Qc(()=>[Zr(o,{ref:"view",center:i.center,rotation:i.rotation,zoom:i.zoom,projection:i.projection},null,8,["center","rotation","zoom","projection"]),Zr(A,null,{default:Qc(()=>[Zr(s)]),_:1}),(fn(!0),Vn(Mi,null,FD(i.coordinates,(c,h)=>(fn(),Vg(l,{position:c},{default:Qc(()=>[Xi("div",{class:"overlay-content",onClick:f=>a.getSelectedTrain(h)},Gz,8,Qz)]),_:2},1032,["position"]))),256))]),_:1})],64)}const $z=Rz(Mz,[["render",kz],["__scopeId","data-v-37987b9c"]]),jz={__name:"App",setup(r){return(e,t)=>(fn(),Vg($z))}};var Vz=Object.defineProperty,Kz=Object.defineProperties,zz=Object.getOwnPropertyDescriptors,WR=Object.getOwnPropertySymbols,Xz=Object.prototype.hasOwnProperty,Yz=Object.prototype.propertyIsEnumerable,qR=(r,e,t)=>e in r?Vz(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Dn=(r,e)=>{for(var t in e||(e={}))Xz.call(e,t)&&qR(r,t,e[t]);if(WR)for(var t of WR(e))Yz.call(e,t)&&qR(r,t,e[t]);return r},Ms=(r,e)=>Kz(r,zz(e)),Wz=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}(),tw=Wz;function qz(r,e,t){for(var n,i,a=t||Hu,o=0,s=r.length,A=!1;o<s;)n=o+(s-o>>1),i=+a(r[n],e),i<0?o=n+1:(s=n,A=!i);return A?o:~o}function Hu(r,e){return r>e?1:r<e?-1:0}function mi(r,e){return r.indexOf(e)>=0}function ew(r,e,t){var n=r.length;if(r[0]<=e)return 0;if(e<=r[n-1])return n-1;var i=void 0;if(t>0){for(i=1;i<n;++i)if(r[i]<e)return i-1}else if(t<0){for(i=1;i<n;++i)if(r[i]<=e)return i}else for(i=1;i<n;++i){if(r[i]==e)return i;if(r[i]<e)return typeof t=="function"?t(e,r[i-1],r[i])>0?i-1:i:r[i-1]-e<e-r[i]?i-1:i}return n-1}function Zz(r,e,t){for(;e<t;){var n=r[e];r[e]=r[t],r[t]=n,++e,--t}}function Gr(r,e){for(var t=Array.isArray(e)?e:[e],n=t.length,i=0;i<n;i++)r[r.length]=t[i]}function Cl(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function Jz(r,e,t){var n=e||Hu;return r.every(function(i,a){if(a===0)return!0;var o=n(r[a-1],i);return!(o>0||t&&o===0)})}function sA(){return!0}function xh(){return!1}function hh(){}function tX(r){var e=!1,t,n,i;return function(){var a=Array.prototype.slice.call(arguments);return(!e||this!==i||!Cl(a,n))&&(e=!0,i=this,n=a,t=r.apply(this,arguments)),t}}function Te(){return function(){throw new Error("Unimplemented abstract method.")}()}var eX=0;function de(r){return r.ol_uid||(r.ol_uid=String(++eX))}var VQ="6.14.1",Gu=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",rX=Gu.indexOf("firefox")!==-1,nX=Gu.indexOf("safari")!==-1&&Gu.indexOf("chrom")==-1,iX=nX&&!!(Gu.indexOf("version/15.4")>=0||Gu.match(/cpu (os|iphone os) 15_4 like mac os x/)),aX=Gu.indexOf("webkit")!==-1&&Gu.indexOf("edge")==-1,KQ=Gu.indexOf("macintosh")!==-1,fh=typeof devicePixelRatio<"u"?devicePixelRatio:1,rw=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,oX=typeof Image<"u"&&Image.prototype.decode,zQ=function(){var r=!1;try{var e=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return r}(),sX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),AX=function(r){sX(e,r);function e(t){var n=this,i="v"+VQ.split("-")[0],a="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+t+" for details.";return n=r.call(this,a)||this,n.code=t,n.name="AssertionError",n.message=a,n}return e}(Error),XQ=AX;function we(r,e){if(!r)throw new XQ(e)}var DF=new Array(6);function si(){return[1,0,0,1,0,0]}function Dv(r){return Yg(r,1,0,0,1,0,0)}function jp(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=r[4],s=r[5],A=e[0],l=e[1],u=e[2],c=e[3],h=e[4],f=e[5];return r[0]=t*A+i*l,r[1]=n*A+a*l,r[2]=t*u+i*c,r[3]=n*u+a*c,r[4]=t*h+i*f+o,r[5]=n*h+a*f+s,r}function Yg(r,e,t,n,i,a,o){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r[4]=a,r[5]=o,r}function lX(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function hn(r,e){var t=e[0],n=e[1];return e[0]=r[0]*t+r[2]*n+r[4],e[1]=r[1]*t+r[3]*n+r[5],e}function uX(r,e){var t=Math.cos(e),n=Math.sin(e);return jp(r,Yg(DF,t,n,-n,t,0,0))}function Qv(r,e,t){return jp(r,Yg(DF,e,0,0,t,0,0))}function cX(r,e,t){return Yg(r,e,0,0,t,0,0)}function hX(r,e,t){return jp(r,Yg(DF,1,0,0,1,e,t))}function Va(r,e,t,n,i,a,o,s){var A=Math.sin(a),l=Math.cos(a);return r[0]=n*l,r[1]=i*A,r[2]=-n*A,r[3]=i*l,r[4]=o*n*l-s*n*A+e,r[5]=o*i*A+s*i*l+t,r}function Wg(r,e){var t=fX(e);we(t!==0,32);var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],A=e[5];return r[0]=o/t,r[1]=-i/t,r[2]=-a/t,r[3]=n/t,r[4]=(a*A-o*s)/t,r[5]=-(n*A-i*s)/t,r}function fX(r){return r[0]*r[3]-r[1]*r[2]}var ZR;function QF(r){var e="matrix("+r.join(", ")+")";if(rw)return e;var t=ZR||(ZR=document.createElement("div"));return t.style.transform=e,t.style.transform}var pv={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},Yi={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Wi(r){for(var e=wi(),t=0,n=r.length;t<n;++t)Zc(e,r[t]);return e}function pX(r,e,t){var n=Math.min.apply(null,r),i=Math.min.apply(null,e),a=Math.max.apply(null,r),o=Math.max.apply(null,e);return ho(n,i,a,o,t)}function Ka(r,e,t){return t?(t[0]=r[0]-e,t[1]=r[1]-e,t[2]=r[2]+e,t[3]=r[3]+e,t):[r[0]-e,r[1]-e,r[2]+e,r[3]+e]}function HF(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r.slice()}function tc(r,e,t){var n,i;return e<r[0]?n=r[0]-e:r[2]<e?n=e-r[2]:n=0,t<r[1]?i=r[1]-t:r[3]<t?i=t-r[3]:i=0,n*n+i*i}function Fs(r,e){return nw(r,e[0],e[1])}function Oo(r,e){return r[0]<=e[0]&&e[2]<=r[2]&&r[1]<=e[1]&&e[3]<=r[3]}function nw(r,e,t){return r[0]<=e&&e<=r[2]&&r[1]<=t&&t<=r[3]}function w_(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=e[0],s=e[1],A=Yi.UNKNOWN;return o<t?A=A|Yi.LEFT:o>i&&(A=A|Yi.RIGHT),s<n?A=A|Yi.BELOW:s>a&&(A=A|Yi.ABOVE),A===Yi.UNKNOWN&&(A=Yi.INTERSECTING),A}function wi(){return[1/0,1/0,-1/0,-1/0]}function ho(r,e,t,n,i){return i?(i[0]=r,i[1]=e,i[2]=t,i[3]=n,i):[r,e,t,n]}function ec(r){return ho(1/0,1/0,-1/0,-1/0,r)}function qc(r,e){var t=r[0],n=r[1];return ho(t,n,t,n,e)}function dX(r,e){var t=ec(e);return GF(t,r)}function iw(r,e,t,n,i){var a=ec(i);return kF(a,r,e,t,n)}function vX(r,e){var t=ec(e);return YQ(t,r)}function cA(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function gX(r,e,t){return Math.abs(r[0]-e[0])<t&&Math.abs(r[2]-e[2])<t&&Math.abs(r[1]-e[1])<t&&Math.abs(r[3]-e[3])<t}function ku(r,e){return e[0]<r[0]&&(r[0]=e[0]),e[2]>r[2]&&(r[2]=e[2]),e[1]<r[1]&&(r[1]=e[1]),e[3]>r[3]&&(r[3]=e[3]),r}function Zc(r,e){e[0]<r[0]&&(r[0]=e[0]),e[0]>r[2]&&(r[2]=e[0]),e[1]<r[1]&&(r[1]=e[1]),e[1]>r[3]&&(r[3]=e[1])}function GF(r,e){for(var t=0,n=e.length;t<n;++t)Zc(r,e[t]);return r}function kF(r,e,t,n,i){for(;t<n;t+=i)WQ(r,e[t],e[t+1]);return r}function YQ(r,e){for(var t=0,n=e.length;t<n;++t)GF(r,e[t]);return r}function WQ(r,e,t){r[0]=Math.min(r[0],e),r[1]=Math.min(r[1],t),r[2]=Math.max(r[2],e),r[3]=Math.max(r[3],t)}function aw(r,e){var t;return t=e(qg(r)),t||(t=e(Vp(r)),t)||(t=e(Zg(r)),t)||(t=e(Ns(r)),t)?t:!1}function ug(r){var e=0;return Kp(r)||(e=Or(r)*li(r)),e}function qg(r){return[r[0],r[1]]}function Vp(r){return[r[2],r[1]]}function ba(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function qQ(r,e){var t;return e===pv.BOTTOM_LEFT?t=qg(r):e===pv.BOTTOM_RIGHT?t=Vp(r):e===pv.TOP_LEFT?t=Ns(r):e===pv.TOP_RIGHT?t=Zg(r):we(!1,13),t}function yX(r,e){var t=Math.min(r[0],e[0]),n=Math.min(r[1],e[1]),i=Math.max(r[2],e[2]),a=Math.max(r[3],e[3]);return(i-t)*(a-n)}function Jc(r,e,t,n,i){var a=e*n[0]/2,o=e*n[1]/2,s=Math.cos(t),A=Math.sin(t),l=a*s,u=a*A,c=o*s,h=o*A,f=r[0],p=r[1],v=f-l+h,m=f-l-h,g=f+l-h,_=f+l+h,E=p-u-c,B=p-u+c,L=p+u+c,O=p+u-c;return ho(Math.min(v,m,g,_),Math.min(E,B,L,O),Math.max(v,m,g,_),Math.max(E,B,L,O),i)}function li(r){return r[3]-r[1]}function mX(r,e){var t=es(r,e);return ug(t)}function es(r,e,t){var n=t||wi();return Nn(r,e)?(r[0]>e[0]?n[0]=r[0]:n[0]=e[0],r[1]>e[1]?n[1]=r[1]:n[1]=e[1],r[2]<e[2]?n[2]=r[2]:n[2]=e[2],r[3]<e[3]?n[3]=r[3]:n[3]=e[3]):ec(n),n}function _X(r){return Or(r)+li(r)}function wX(r){return[r[2]-r[0],r[3]-r[1]]}function Ns(r){return[r[0],r[3]]}function Zg(r){return[r[2],r[3]]}function Or(r){return r[2]-r[0]}function Nn(r,e){return r[0]<=e[2]&&r[2]>=e[0]&&r[1]<=e[3]&&r[3]>=e[1]}function Kp(r){return r[2]<r[0]||r[3]<r[1]}function ZQ(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r}function JQ(r,e){var t=(r[2]-r[0])/2*(e-1),n=(r[3]-r[1])/2*(e-1);r[0]-=t,r[2]+=t,r[1]-=n,r[3]+=n}function t6(r,e,t){var n=!1,i=w_(r,e),a=w_(r,t);if(i===Yi.INTERSECTING||a===Yi.INTERSECTING)n=!0;else{var o=r[0],s=r[1],A=r[2],l=r[3],u=e[0],c=e[1],h=t[0],f=t[1],p=(f-c)/(h-u),v=void 0,m=void 0;a&Yi.ABOVE&&!(i&Yi.ABOVE)&&(v=h-(f-l)/p,n=v>=o&&v<=A),!n&&a&Yi.RIGHT&&!(i&Yi.RIGHT)&&(m=f-(h-A)*p,n=m>=s&&m<=l),!n&&a&Yi.BELOW&&!(i&Yi.BELOW)&&(v=h-(f-s)/p,n=v>=o&&v<=A),!n&&a&Yi.LEFT&&!(i&Yi.LEFT)&&(m=f-(h-o)*p,n=m>=s&&m<=l)}return n}function $F(r,e,t,n){var i=[];if(n>1)for(var a=r[2]-r[0],o=r[3]-r[1],s=0;s<n;++s)i.push(r[0]+a*s/n,r[1],r[2],r[1]+o*s/n,r[2]-a*s/n,r[3],r[0],r[3]-o*s/n);else i=[r[0],r[1],r[2],r[1],r[2],r[3],r[0],r[3]];e(i,i,2);for(var A=[],l=[],s=0,u=i.length;s<u;s+=2)A.push(i[s]),l.push(i[s+1]);return pX(A,l,t)}function e6(r,e){var t=e.getExtent(),n=ba(r);if(e.canWrapX()&&(n[0]<t[0]||n[0]>=t[2])){var i=Or(t),a=Math.floor((n[0]-t[0])/i),o=a*i;r[0]-=o,r[2]-=o}return r}var EX=Object.freeze(Object.defineProperty({__proto__:null,boundingExtent:Wi,buffer:Ka,clone:HF,closestSquaredDistanceXY:tc,containsCoordinate:Fs,containsExtent:Oo,containsXY:nw,coordinateRelationship:w_,createEmpty:wi,createOrUpdate:ho,createOrUpdateEmpty:ec,createOrUpdateFromCoordinate:qc,createOrUpdateFromCoordinates:dX,createOrUpdateFromFlatCoordinates:iw,createOrUpdateFromRings:vX,equals:cA,approximatelyEquals:gX,extend:ku,extendCoordinate:Zc,extendCoordinates:GF,extendFlatCoordinates:kF,extendRings:YQ,extendXY:WQ,forEachCorner:aw,getArea:ug,getBottomLeft:qg,getBottomRight:Vp,getCenter:ba,getCorner:qQ,getEnlargedArea:yX,getForViewAndSize:Jc,getHeight:li,getIntersectionArea:mX,getIntersection:es,getMargin:_X,getSize:wX,getTopLeft:Ns,getTopRight:Zg,getWidth:Or,intersects:Nn,isEmpty:Kp,returnOrUpdate:ZQ,scaleFromCenter:JQ,intersectsSegment:t6,applyTransform:$F,wrapX:e6},Symbol.toStringTag,{value:"Module"}));function bn(r,e,t){return Math.min(Math.max(r,e),t)}var CX=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),r6=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function BX(r,e,t,n,i,a){var o=i-t,s=a-n;if(o!==0||s!==0){var A=((r-t)*o+(e-n)*s)/(o*o+s*s);A>1?(t=i,n=a):A>0&&(t+=o*A,n+=s*A)}return th(r,e,t,n)}function th(r,e,t,n){var i=t-r,a=n-e;return i*i+a*a}function TX(r){for(var e=r.length,t=0;t<e;t++){for(var n=t,i=Math.abs(r[t][t]),a=t+1;a<e;a++){var o=Math.abs(r[a][t]);o>i&&(i=o,n=a)}if(i===0)return null;var s=r[n];r[n]=r[t],r[t]=s;for(var A=t+1;A<e;A++)for(var l=-r[A][t]/r[t][t],u=t;u<e+1;u++)t==u?r[A][u]=0:r[A][u]+=l*r[t][u]}for(var c=new Array(e),h=e-1;h>=0;h--){c[h]=r[h][e]/r[h][h];for(var f=h-1;f>=0;f--)r[f][e]-=r[f][h]*c[h]}return c}function JR(r){return r*180/Math.PI}function Su(r){return r*Math.PI/180}function bu(r,e){var t=r%e;return t*e<0?t+e:t}function qA(r,e,t){return r+t*(e-r)}function jF(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}function tM(r,e){return Math.round(jF(r,e))}function Kf(r,e){return Math.floor(jF(r,e))}function du(r,e){return Math.ceil(jF(r,e))}var n6=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,i6=/^([a-z]*)$|^hsla?\(.*\)$/i;function il(r){return typeof r=="string"?r:s6(r)}function a6(r){var e=document.createElement("div");if(e.style.color=r,e.style.color!==""){document.body.appendChild(e);var t=getComputedStyle(e).color;return document.body.removeChild(e),t}else return""}var o6=function(){var r=1024,e={},t=0;return function(n){var i;if(e.hasOwnProperty(n))i=e[n];else{if(t>=r){var a=0;for(var o in e)a++&3||(delete e[o],--t)}i=xX(n),e[n]=i,++t}return i}}();function $u(r){return Array.isArray(r)?r:o6(r)}function xX(r){var e,t,n,i,a;if(i6.exec(r)&&(r=a6(r)),n6.exec(r)){var o=r.length-1,s=void 0;o<=4?s=1:s=2;var A=o===4||o===8;e=parseInt(r.substr(1+0*s,s),16),t=parseInt(r.substr(1+1*s,s),16),n=parseInt(r.substr(1+2*s,s),16),A?i=parseInt(r.substr(1+3*s,s),16):i=255,s==1&&(e=(e<<4)+e,t=(t<<4)+t,n=(n<<4)+n,A&&(i=(i<<4)+i)),a=[e,t,n,i/255]}else r.indexOf("rgba(")==0?(a=r.slice(5,-1).split(",").map(Number),eM(a)):r.indexOf("rgb(")==0?(a=r.slice(4,-1).split(",").map(Number),a.push(1),eM(a)):we(!1,14);return a}function eM(r){return r[0]=bn(r[0]+.5|0,0,255),r[1]=bn(r[1]+.5|0,0,255),r[2]=bn(r[2]+.5|0,0,255),r[3]=bn(r[3],0,1),r}function s6(r){var e=r[0];e!=(e|0)&&(e=e+.5|0);var t=r[1];t!=(t|0)&&(t=t+.5|0);var n=r[2];n!=(n|0)&&(n=n+.5|0);var i=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+e+","+t+","+n+","+i+")"}function SX(r){return i6.test(r)&&(r=a6(r)),n6.test(r)||r.indexOf("rgba(")===0||r.indexOf("rgb(")===0}var bX=function(){function r(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return r.prototype.clear=function(){this.cache_={},this.cacheSize_=0},r.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},r.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var n=this.cache_[t];!(e++&3)&&!n.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}},r.prototype.get=function(e,t,n){var i=rM(e,t,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(e,t,n,i){var a=rM(e,t,n);this.cache_[a]=i,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function rM(r,e,t){var n=t?il(t):"null";return e+":"+r+":"+n}var E_=new bX,FX=function(){function r(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}return r.prototype.preventDefault=function(){this.defaultPrevented=!0},r.prototype.stopPropagation=function(){this.propagationStopped=!0},r}();function IX(r){r.stopPropagation()}var vo=FX,ph={PROPERTYCHANGE:"propertychange"},ve=typeof Object.assign=="function"?Object.assign:function(r,e){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(r),n=1,i=arguments.length;n<i;++n){var a=arguments[n];if(a!=null)for(var o in a)a.hasOwnProperty(o)&&(t[o]=a[o])}return t};function Sh(r){for(var e in r)delete r[e]}var VF=typeof Object.values=="function"?Object.values:function(r){var e=[];for(var t in r)e.push(r[t]);return e};function dh(r){var e;for(e in r)return!1;return!e}var LX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),OX=function(r){LX(e,r);function e(t){var n=r.call(this)||this;return n.eventTarget_=t,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return e.prototype.addEventListener=function(t,n){if(!(!t||!n)){var i=this.listeners_||(this.listeners_={}),a=i[t]||(i[t]=[]);a.indexOf(n)===-1&&a.push(n)}},e.prototype.dispatchEvent=function(t){var n=typeof t=="string",i=n?t:t.type,a=this.listeners_&&this.listeners_[i];if(a){var o=n?new vo(t):t;o.target||(o.target=this.eventTarget_||this);var s=this.dispatching_||(this.dispatching_={}),A=this.pendingRemovals_||(this.pendingRemovals_={});i in s||(s[i]=0,A[i]=0),++s[i];for(var l,u=0,c=a.length;u<c;++u)if("handleEvent"in a[u]?l=a[u].handleEvent(o):l=a[u].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[i]===0){var h=A[i];for(delete A[i];h--;)this.removeEventListener(i,hh);delete s[i]}return l}},e.prototype.disposeInternal=function(){this.listeners_&&Sh(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1},e.prototype.removeEventListener=function(t,n){var i=this.listeners_&&this.listeners_[t];if(i){var a=i.indexOf(n);a!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[a]=hh,++this.pendingRemovals_[t]):(i.splice(a,1),i.length===0&&delete this.listeners_[t]))}},e}(tw),bh=OX,me={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function Ue(r,e,t,n,i){if(n&&n!==r&&(t=t.bind(n)),i){var a=t;t=function(){r.removeEventListener(e,t),a.apply(this,arguments)}}var o={target:r,type:e,listener:t};return r.addEventListener(e,t),o}function cg(r,e,t,n){return Ue(r,e,t,n,!0)}function Nr(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Sh(r))}var RX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Jg=function(r){RX(e,r);function e(){var t=r.call(this)||this;return t.on=t.onInternal,t.once=t.onceInternal,t.un=t.unInternal,t.revision_=0,t}return e.prototype.changed=function(){++this.revision_,this.dispatchEvent(me.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var i=t.length,a=new Array(i),o=0;o<i;++o)a[o]=Ue(this,t[o],n);return a}else return Ue(this,t,n)},e.prototype.onceInternal=function(t,n){var i;if(Array.isArray(t)){var a=t.length;i=new Array(a);for(var o=0;o<a;++o)i[o]=cg(this,t[o],n)}else i=cg(this,t,n);return n.ol_key=i,i},e.prototype.unInternal=function(t,n){var i=n.ol_key;if(i)Uo(i);else if(Array.isArray(t))for(var a=0,o=t.length;a<o;++a)this.removeEventListener(t[a],n);else this.removeEventListener(t,n)},e}(bh);Jg.prototype.on;Jg.prototype.once;Jg.prototype.un;function Uo(r){if(Array.isArray(r))for(var e=0,t=r.length;e<t;++e)Nr(r[e]);else Nr(r)}var A6=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),nM=function(r){A6(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.key=n,a.oldValue=i,a}return e}(vo),MX=function(r){A6(e,r);function e(t){var n=r.call(this)||this;return n.on,n.once,n.un,de(n),n.values_=null,t!==void 0&&n.setProperties(t),n}return e.prototype.get=function(t){var n;return this.values_&&this.values_.hasOwnProperty(t)&&(n=this.values_[t]),n},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&ve({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,n){var i;i="change:".concat(t),this.hasListener(i)&&this.dispatchEvent(new nM(i,t,n)),i=ph.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new nM(i,t,n))},e.prototype.addChangeListener=function(t,n){this.addEventListener("change:".concat(t),n)},e.prototype.removeChangeListener=function(t,n){this.removeEventListener("change:".concat(t),n)},e.prototype.set=function(t,n,i){var a=this.values_||(this.values_={});if(i)a[t]=n;else{var o=a[t];a[t]=n,o!==n&&this.notify(t,o)}},e.prototype.setProperties=function(t,n){for(var i in t)this.set(i,t[i],n)},e.prototype.applyProperties=function(t){t.values_&&ve(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,n){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],dh(this.values_)&&(this.values_=null),n||this.notify(t,i)}},e}(Jg),ui=MX,Hr={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"},NX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),PX=function(r){NX(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un,n.background_=t.background;var i=ve({},t);return typeof t.properties=="object"&&(delete i.properties,ve(i,t.properties)),i[Hr.OPACITY]=t.opacity!==void 0?t.opacity:1,we(typeof i[Hr.OPACITY]=="number",64),i[Hr.VISIBLE]=t.visible!==void 0?t.visible:!0,i[Hr.Z_INDEX]=t.zIndex,i[Hr.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,i[Hr.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,i[Hr.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,i[Hr.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,n.className_=i.className!==void 0?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var n=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return n.opacity=bn(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=i===void 0&&!n.managed?1/0:i,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n},e.prototype.getLayersArray=function(t){return Te()},e.prototype.getLayerStatesArray=function(t){return Te()},e.prototype.getExtent=function(){return this.get(Hr.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(Hr.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(Hr.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(Hr.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(Hr.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(Hr.OPACITY)},e.prototype.getSourceState=function(){return Te()},e.prototype.getVisible=function(){return this.get(Hr.VISIBLE)},e.prototype.getZIndex=function(){return this.get(Hr.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Hr.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(Hr.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(Hr.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(Hr.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(Hr.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){we(typeof t=="number",64),this.set(Hr.OPACITY,t)},e.prototype.setVisible=function(t){this.set(Hr.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(Hr.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),r.prototype.disposeInternal.call(this)},e}(ui),KF=PX,so={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Ha={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},UX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),DX=function(r){UX(e,r);function e(t){var n=this,i=ve({},t);delete i.source,n=r.call(this,i)||this,n.on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,t.render&&(n.render=t.render),t.map&&n.setMap(t.map),n.addChangeListener(Hr.SOURCE,n.handleSourcePropertyChange_);var a=t.source?t.source:null;return n.setSource(a),n}return e.prototype.getLayersArray=function(t){var n=t||[];return n.push(this),n},e.prototype.getLayerStatesArray=function(t){var n=t||[];return n.push(this.getLayerState()),n},e.prototype.getSource=function(){return this.get(Hr.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Ha.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Nr(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=Ue(t,me.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(function(n){return n([])})},e.prototype.getData=function(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)},e.prototype.render=function(t,n){var i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,n)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(Hr.MAP,t)},e.prototype.getMapInternal=function(){return this.get(Hr.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Nr(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Nr(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Ue(t,so.PRECOMPOSE,function(n){var i=n,a=i.frameState.layerStatesArray,o=this.getLayerState(!1);we(!a.some(function(s){return s.layer===o.layer}),67),a.push(o)},this),this.mapRenderKey_=Ue(this,me.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Hr.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),r.prototype.disposeInternal.call(this)},e}(KF);function C_(r,e){if(!r.visible)return!1;var t=e.resolution;if(t<r.minResolution||t>=r.maxResolution)return!1;var n=e.zoom;return n>r.minZoom&&n<=r.maxZoom}var Fh=DX;function jd(r,e,t){var n=t!==void 0?r.toFixed(t):""+r,i=n.indexOf(".");return i=i===-1?n.length:i,i>e?n:new Array(1+e-i).join("0")+n}function l6(r,e){for(var t=(""+r).split("."),n=(""+e).split("."),i=0;i<Math.max(t.length,n.length);i++){var a=parseInt(t[i]||"0",10),o=parseInt(n[i]||"0",10);if(a>o)return 1;if(o>a)return-1}return 0}function u6(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function QX(r,e){var t=e.getRadius(),n=e.getCenter(),i=n[0],a=n[1],o=r[0],s=r[1],A=o-i,l=s-a;A===0&&l===0&&(A=1);var u=Math.sqrt(A*A+l*l),c=i+t*A/u,h=a+t*l/u;return[c,h]}function zF(r,e){var t=r[0],n=r[1],i=e[0],a=e[1],o=i[0],s=i[1],A=a[0],l=a[1],u=A-o,c=l-s,h=u===0&&c===0?0:(u*(t-o)+c*(n-s))/(u*u+c*c||0),f,p;return h<=0?(f=o,p=s):h>=1?(f=A,p=l):(f=o+h*u,p=s+h*c),[f,p]}function Es(r,e){for(var t=!0,n=r.length-1;n>=0;--n)if(r[n]!=e[n]){t=!1;break}return t}function XF(r,e){var t=Math.cos(e),n=Math.sin(e),i=r[0]*t-r[1]*n,a=r[1]*t+r[0]*n;return r[0]=i,r[1]=a,r}function c6(r,e){return r[0]*=e,r[1]*=e,r}function al(r,e){var t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function iM(r,e){return Math.sqrt(al(r,e))}function HX(r,e){return al(r,zF(r,e))}function YF(r,e){if(e.canWrapX()){var t=Or(e.getExtent()),n=h6(r,e,t);n&&(r[0]-=n*t)}return r}function h6(r,e,t){var n=e.getExtent(),i=0;if(e.canWrapX()&&(r[0]<n[0]||r[0]>n[2])){var a=t||Or(n);i=Math.floor((r[0]-n[0])/a)}return i}var GX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),kX=function(r){GX(e,r);function e(t){var n=r.call(this)||this;return n.map_=t,n}return e.prototype.dispatchRenderEvent=function(t,n){Te()},e.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,a=t.pixelToCoordinateTransform;Va(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),Wg(a,i)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o,s,A,l){var u,c=n.viewState;function h(Y,z,tt,J){return o.call(s,z,Y?tt:null,J)}var f=c.projection,p=YF(t.slice(),f),v=[[0,0]];if(f.canWrapX()&&a){var m=f.getExtent(),g=Or(m);v.push([-g,0],[g,0])}for(var _=n.layerStatesArray,E=_.length,B=[],L=[],O=0;O<v.length;O++)for(var b=E-1;b>=0;--b){var T=_[b],F=T.layer;if(F.hasRenderer()&&C_(T,c)&&A.call(l,F)){var M=F.getRenderer(),S=F.getSource();if(M&&S){var x=S.getWrapX()?p:t,N=h.bind(null,T.managed);L[0]=x[0]+v[O][0],L[1]=x[1]+v[O][1],u=M.forEachFeatureAtCoordinate(L,n,i,N,B)}if(u)return u}}if(B.length!==0){var P=1/B.length;return B.forEach(function(Y,z){return Y.distanceSq+=z*P}),B.sort(function(Y,z){return Y.distanceSq-z.distanceSq}),B.some(function(Y){return u=Y.callback(Y.feature,Y.layer,Y.geometry)}),u}},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){return Te()},e.prototype.hasFeatureAtCoordinate=function(t,n,i,a,o,s){var A=this.forEachFeatureAtCoordinate(t,n,i,a,sA,this,o,s);return A!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Te()},e.prototype.scheduleExpireIconCache=function(t){E_.canExpireCache()&&t.postRenderFunctions.push($X)},e}(tw);function $X(r,e){E_.expire()}var jX=kX,VX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),KX=function(r){VX(e,r);function e(t,n,i,a){var o=r.call(this,t)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=a,o}return e}(vo),Hv=KX,Tm="ol-hidden",zX="ol-selectable",hA="ol-unselectable",aM="ol-unsupported",Ih="ol-control",B_="ol-collapsed",XX=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),oM=["style","variant","weight","size","lineHeight","family"],f6=function(r){var e=r.match(XX);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=oM.length;n<i;++n){var a=e[n+1];a!==void 0&&(t[oM[n]]=a)}return t.families=t.family.split(/,\s?/),t};function p6(r){return r===1?"":String(Math.round(r*100)/100)}function za(r,e,t,n){var i;return t&&t.length?i=t.shift():rw?i=new OffscreenCanvas(r||300,e||300):i=document.createElement("canvas"),r&&(i.width=r),e&&(i.height=e),i.getContext("2d",n)}function YX(r){var e=r.offsetWidth,t=getComputedStyle(r);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function WX(r){var e=r.offsetHeight,t=getComputedStyle(r);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function xp(r,e){var t=e.parentNode;t&&t.replaceChild(r,e)}function T_(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function d6(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function qX(r,e){for(var t=r.childNodes,n=0;;++n){var i=t[n],a=e[n];if(!i&&!a)break;if(i!==a){if(!i){r.appendChild(a);continue}if(!a){r.removeChild(i),--n;continue}r.insertBefore(a,i)}}}var v6="10px sans-serif",sl="#000",x_="round",hg=[],fg=0,Sp="round",pg=10,dg="#000",vg="center",S_="middle",Gc=[0,0,0,0],gg=1,zA=new ui,ZX=new bh;ZX.setSize=function(){console.warn("labelCache is deprecated.")};var Nf=null,XT,YT={},JX=function(){var r=100,e="32px ",t=["monospace","serif"],n=t.length,i="wmytzilWMYTZIL@#/&?$%10",a,o;function s(l,u,c){for(var h=!0,f=0;f<n;++f){var p=t[f];if(o=b_(l+" "+u+" "+e+p,i),c!=p){var v=b_(l+" "+u+" "+e+c+","+p,i);h=h&&v!=o}}return!!h}function A(){for(var l=!0,u=zA.getKeys(),c=0,h=u.length;c<h;++c){var f=u[c];zA.get(f)<r&&(s.apply(this,f.split(`
`))?(Sh(YT),Nf=null,XT=void 0,zA.set(f,r)):(zA.set(f,zA.get(f)+1,!0),l=!1))}l&&(clearInterval(a),a=void 0)}return function(l){var u=f6(l);if(u)for(var c=u.families,h=0,f=c.length;h<f;++h){var p=c[h],v=u.style+`
`+u.weight+`
`+p;zA.get(v)===void 0&&(zA.set(v,r,!0),s(u.style,u.weight,p)||(zA.set(v,0,!0),a===void 0&&(a=setInterval(A,32))))}}}(),tY=function(){var r;return function(e){var t=YT[e];if(t==null){if(rw){var n=f6(e),i=g6(e,"Žg"),a=isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight);t=a*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=e,document.body.appendChild(r),t=r.offsetHeight,document.body.removeChild(r);YT[e]=t}return t}}();function g6(r,e){return Nf||(Nf=za(1,1)),r!=XT&&(Nf.font=r,XT=Nf.font),Nf.measureText(e)}function b_(r,e){return g6(r,e).width}function sM(r,e,t){if(e in t)return t[e];var n=b_(r,e);return t[e]=n,n}function eY(r,e){for(var t=[],n=[],i=[],a=0,o=0,s=0,A=0,l=0,u=e.length;l<=u;l+=2){var c=e[l];if(c===`
`||l===u){a=Math.max(a,o),i.push(o),o=0,s+=A;continue}var h=e[l+1]||r.font,f=b_(h,c);t.push(f),o+=f;var p=tY(h);n.push(p),A=Math.max(A,p)}return{width:a,height:s,widths:t,heights:n,lineWidths:i}}function rY(r,e,t,n,i,a,o,s,A,l,u){r.save(),t!==1&&(r.globalAlpha*=t),e&&r.setTransform.apply(r,e),n.contextInstructions?(r.translate(A,l),r.scale(u[0],u[1]),nY(n,r)):u[0]<0||u[1]<0?(r.translate(A,l),r.scale(u[0],u[1]),r.drawImage(n,i,a,o,s,0,0,o,s)):r.drawImage(n,i,a,o,s,A,l,o*u[0],s*u[1]),r.restore()}function nY(r,e){for(var t=r.contextInstructions,n=0,i=t.length;n<i;n+=2)Array.isArray(t[n+1])?e[t[n]].apply(e,t[n+1]):e[t[n]]=t[n+1]}var iY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),aY=function(r){iY(e,r);function e(t){var n=r.call(this,t)||this;n.fontChangeListenerKey_=Ue(zA,ph.PROPERTYCHANGE,t.redrawText.bind(t)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className=hA+" ol-layers";var a=t.getViewport();return a.insertBefore(n.element_,a.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return e.prototype.dispatchRenderEvent=function(t,n){var i=this.getMap();if(i.hasListener(t)){var a=new Hv(t,void 0,n);i.dispatchEvent(a)}},e.prototype.disposeInternal=function(){Nr(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),r.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(so.PRECOMPOSE,t);var n=t.layerStatesArray.sort(function(f,p){return f.zIndex-p.zIndex}),i=t.viewState;this.children_.length=0;for(var a=[],o=null,s=0,A=n.length;s<A;++s){var l=n[s];t.layerIndex=s;var u=l.layer,c=u.getSourceState();if(!C_(l,i)||c!=Ha.READY&&c!=Ha.UNDEFINED){u.unrender();continue}var h=u.render(t,o);h&&(h!==o&&(this.children_.push(h),o=h),"getDeclutter"in u&&a.push(u))}for(var s=a.length-1;s>=0;--s)a[s].renderDeclutter(t);qX(this.element_,this.children_),this.dispatchRenderEvent(so.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){for(var s=n.viewState,A=n.layerStatesArray,l=A.length,u=l-1;u>=0;--u){var c=A[u],h=c.layer;if(h.hasRenderer()&&C_(c,s)&&o(h)){var f=h.getRenderer(),p=f.getDataAtPixel(t,n,i);if(p){var v=a(h,p);if(v)return v}}}},e}(jX),y6=aY,$n={ADD:"add",REMOVE:"remove"},m6=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),AM={LENGTH:"length"},xm=function(r){m6(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.element=n,a.index=i,a}return e}(vo),oY=function(r){m6(e,r);function e(t,n){var i=r.call(this)||this;i.on,i.once,i.un;var a=n||{};if(i.unique_=!!a.unique,i.array_=t||[],i.unique_)for(var o=0,s=i.array_.length;o<s;++o)i.assertUnique_(i.array_[o],o);return i.updateLength_(),i}return e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var n=0,i=t.length;n<i;++n)this.push(t[n]);return this},e.prototype.forEach=function(t){for(var n=this.array_,i=0,a=n.length;i<a;++i)t(n[i],i,n)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(AM.LENGTH)},e.prototype.insertAt=function(t,n){this.unique_&&this.assertUnique_(n),this.array_.splice(t,0,n),this.updateLength_(),this.dispatchEvent(new xm($n.ADD,n,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var n=this.getLength();return this.insertAt(n,t),this.getLength()},e.prototype.remove=function(t){for(var n=this.array_,i=0,a=n.length;i<a;++i)if(n[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var n=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new xm($n.REMOVE,n,t)),n},e.prototype.setAt=function(t,n){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(n,t);var a=this.array_[t];this.array_[t]=n,this.dispatchEvent(new xm($n.REMOVE,a,t)),this.dispatchEvent(new xm($n.ADD,n,t))}else{for(var o=i;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,n)}},e.prototype.updateLength_=function(){this.set(AM.LENGTH,this.array_.length)},e.prototype.assertUnique_=function(t,n){for(var i=0,a=this.array_.length;i<a;++i)if(this.array_[i]===t&&i!==n)throw new XQ(58)},e}(ui),Ai=oY,_6=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),hu=function(r){_6(e,r);function e(t,n){var i=r.call(this,t)||this;return i.layer=n,i}return e}(vo),_C={LAYERS:"layers"},sY=function(r){_6(e,r);function e(t){var n=this,i=t||{},a=ve({},i);delete a.layers;var o=i.layers;return n=r.call(this,a)||this,n.on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(_C.LAYERS,n.handleLayersChanged_),o?Array.isArray(o)?o=new Ai(o.slice(),{unique:!0}):we(typeof o.getArray=="function",43):o=new Ai(void 0,{unique:!0}),n.setLayers(o),n}return e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(Nr),this.layersListenerKeys_.length=0;var t=this.getLayers();this.layersListenerKeys_.push(Ue(t,$n.ADD,this.handleLayersAdd_,this),Ue(t,$n.REMOVE,this.handleLayersRemove_,this));for(var n in this.listenerKeys_)this.listenerKeys_[n].forEach(Nr);Sh(this.listenerKeys_);for(var i=t.getArray(),a=0,o=i.length;a<o;a++){var s=i[a];this.registerLayerListeners_(s),this.dispatchEvent(new hu("addlayer",s))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[Ue(t,ph.PROPERTYCHANGE,this.handleLayerChange_,this),Ue(t,me.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push(Ue(t,"addlayer",this.handleLayerGroupAdd_,this),Ue(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[de(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new hu("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new hu("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var n=t.element;this.registerLayerListeners_(n),this.dispatchEvent(new hu("addlayer",n)),this.changed()},e.prototype.handleLayersRemove_=function(t){var n=t.element,i=de(n);this.listenerKeys_[i].forEach(Nr),delete this.listenerKeys_[i],this.dispatchEvent(new hu("removelayer",n)),this.changed()},e.prototype.getLayers=function(){return this.get(_C.LAYERS)},e.prototype.setLayers=function(t){var n=this.getLayers();if(n)for(var i=n.getArray(),a=0,o=i.length;a<o;++a)this.dispatchEvent(new hu("removelayer",i[a]));this.set(_C.LAYERS,t)},e.prototype.getLayersArray=function(t){var n=t!==void 0?t:[];return this.getLayers().forEach(function(i){i.getLayersArray(n)}),n},e.prototype.getLayerStatesArray=function(t){var n=t!==void 0?t:[],i=n.length;this.getLayers().forEach(function(u){u.getLayerStatesArray(n)});var a=this.getLayerState(),o=a.zIndex;!t&&a.zIndex===void 0&&(o=0);for(var s=i,A=n.length;s<A;s++){var l=n[s];l.opacity*=a.opacity,l.visible=l.visible&&a.visible,l.maxResolution=Math.min(l.maxResolution,a.maxResolution),l.minResolution=Math.max(l.minResolution,a.minResolution),l.minZoom=Math.max(l.minZoom,a.minZoom),l.maxZoom=Math.min(l.maxZoom,a.maxZoom),a.extent!==void 0&&(l.extent!==void 0?l.extent=es(l.extent,a.extent):l.extent=a.extent),l.zIndex===void 0&&(l.zIndex=o)}return n},e.prototype.getSourceState=function(){return Ha.READY},e}(KF),ty=sY,AY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),lY=function(r){AY(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.map=n,a.frameState=i!==void 0?i:null,a}return e}(vo),Pf=lY,uY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),cY=function(r){uY(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,o)||this;return s.originalEvent=i,s.pixel_=null,s.coordinate_=null,s.dragging=a!==void 0?a:!1,s}return Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){r.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){r.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(Pf),YA=cY,or={SINGLECLICK:"singleclick",CLICK:me.CLICK,DBLCLICK:me.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},qs={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},hY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),fY=function(r){hY(e,r);function e(t,n){var i=r.call(this,t)||this;i.map_=t,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=n===void 0?1:n,i.down_=null;var a=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=a,i.pointerdownListenerKey_=Ue(a,qs.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=Ue(a,qs.POINTERMOVE,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(me.TOUCHMOVE,i.boundHandleTouchMove_,zQ?{passive:!1}:!1),i}return e.prototype.emulateClick_=function(t){var n=new YA(or.CLICK,this.map_,t);this.dispatchEvent(n),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new YA(or.DBLCLICK,this.map_,t),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var i=new YA(or.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var n=t;n.type==or.POINTERUP||n.type==or.POINTERCANCEL?delete this.trackedTouches_[n.pointerId]:n.type==or.POINTERDOWN&&(this.trackedTouches_[n.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var n=new YA(or.POINTERUP,this.map_,t);this.dispatchEvent(n),this.emulateClicks_&&!n.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_===0&&(this.dragListenerKeys_.forEach(Nr),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return t.button===0},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=this.activePointers_===0,this.updateActivePointers_(t);var n=new YA(or.POINTERDOWN,this.map_,t);this.dispatchEvent(n),this.down_={};for(var i in t){var a=t[i];this.down_[i]=typeof a=="function"?hh:a}if(this.dragListenerKeys_.length===0){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Ue(o,or.POINTERMOVE,this.handlePointerMove_,this),Ue(o,or.POINTERUP,this.handlePointerUp_,this),Ue(this.element_,or.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(Ue(this.element_.getRootNode(),or.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var n=new YA(or.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(n)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var n=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new YA(t.type,this.map_,t,n))},e.prototype.handleTouchMove_=function(t){var n=this.originalPointerMoveEvent_;(!n||n.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(Nr(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(me.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Nr(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Nr),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},e}(bh),pY=fY,Xs={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},ti={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},F_=1/0,dY=function(){function r(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return r.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,Sh(this.queuedElements_)},r.prototype.dequeue=function(){var e=this.elements_,t=this.priorities_,n=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},r.prototype.enqueue=function(e){we(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=F_?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1},r.prototype.getCount=function(){return this.elements_.length},r.prototype.getLeftChildIndex_=function(e){return e*2+1},r.prototype.getRightChildIndex_=function(e){return e*2+2},r.prototype.getParentIndex_=function(e){return e-1>>1},r.prototype.heapify_=function(){var e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)},r.prototype.isEmpty=function(){return this.elements_.length===0},r.prototype.isKeyQueued=function(e){return e in this.queuedElements_},r.prototype.isQueued=function(e){return this.isKeyQueued(this.keyFunction_(e))},r.prototype.siftUp_=function(e){for(var t=this.elements_,n=this.priorities_,i=t.length,a=t[e],o=n[e],s=e;e<i>>1;){var A=this.getLeftChildIndex_(e),l=this.getRightChildIndex_(e),u=l<i&&n[l]<n[A]?l:A;t[e]=t[u],n[e]=n[u],e=u}t[e]=a,n[e]=o,this.siftDown_(s,e)},r.prototype.siftDown_=function(e,t){for(var n=this.elements_,i=this.priorities_,a=n[t],o=i[t];t>e;){var s=this.getParentIndex_(t);if(i[s]>o)n[t]=n[s],i[t]=i[s],t=s;else break}n[t]=a,i[t]=o},r.prototype.reprioritize=function(){var e=this.priorityFunction_,t=this.elements_,n=this.priorities_,i=0,a=t.length,o,s,A;for(s=0;s<a;++s)o=t[s],A=e(o),A==F_?delete this.queuedElements_[this.keyFunction_(o)]:(n[i]=A,t[i++]=o);t.length=i,n.length=i,this.heapify_()},r}(),vY=dY,ye={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},gY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),yY=function(r){gY(e,r);function e(t,n){var i=r.call(this,function(a){return t.apply(null,a)},function(a){return a[0].getKey()})||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=n,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return e.prototype.enqueue=function(t){var n=r.prototype.enqueue.call(this,t);if(n){var i=t[0];i.addEventListener(me.CHANGE,this.boundHandleTileChange_)}return n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var n=t.target,i=n.getState();if(i===ye.LOADED||i===ye.ERROR||i===ye.EMPTY){n.removeEventListener(me.CHANGE,this.boundHandleTileChange_);var a=n.getKey();a in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[a],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,n){for(var i=0,a,o,s;this.tilesLoading_<t&&i<n&&this.getCount()>0;)o=this.dequeue()[0],s=o.getKey(),a=o.getState(),a===ye.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++i,o.load())},e}(vY),mY=yY;function _Y(r,e,t,n,i){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return F_;var a=r.viewState.center,o=n[0]-a[0],s=n[1]-a[1];return 65536*Math.log(i)+Math.sqrt(o*o+s*s)/i}var st={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},zp={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Is={};Is[zp.RADIANS]=6370997/(2*Math.PI);Is[zp.DEGREES]=2*Math.PI*6370997/360;Is[zp.FEET]=.3048;Is[zp.METERS]=1;Is[zp.USFEET]=1200/3937;var Ga=zp,mn={ANIMATING:0,INTERACTING:1},bo={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},wY=42,WF=256,EY=function(){function r(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return r.prototype.canWrapX=function(){return this.canWrapX_},r.prototype.getCode=function(){return this.code_},r.prototype.getExtent=function(){return this.extent_},r.prototype.getUnits=function(){return this.units_},r.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Is[this.units_]},r.prototype.getWorldExtent=function(){return this.worldExtent_},r.prototype.getAxisOrientation=function(){return this.axisOrientation_},r.prototype.isGlobal=function(){return this.global_},r.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)},r.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},r.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},r.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)},r.prototype.setWorldExtent=function(e){this.worldExtent_=e},r.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},r.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},r}(),Bl=EY,CY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ey=6378137,zf=Math.PI*ey,BY=[-zf,-zf,zf,zf],TY=[-180,-85,180,85],Sm=ey*Math.log(Math.tan(Math.PI/2)),pf=function(r){CY(e,r);function e(t){return r.call(this,{code:t,units:Ga.METERS,extent:BY,global:!0,worldExtent:TY,getPointResolution:function(n,i){return n/CX(i[1]/ey)}})||this}return e}(Bl),lM=[new pf("EPSG:3857"),new pf("EPSG:102100"),new pf("EPSG:102113"),new pf("EPSG:900913"),new pf("http://www.opengis.net/def/crs/EPSG/0/3857"),new pf("http://www.opengis.net/gml/srs/epsg.xml#3857")];function xY(r,e,t){var n=r.length,i=t>1?t:2,a=e;a===void 0&&(i>2?a=r.slice():a=new Array(n));for(var o=0;o<n;o+=i){a[o]=zf*r[o]/180;var s=ey*Math.log(Math.tan(Math.PI*(+r[o+1]+90)/360));s>Sm?s=Sm:s<-Sm&&(s=-Sm),a[o+1]=s}return a}function SY(r,e,t){var n=r.length,i=t>1?t:2,a=e;a===void 0&&(i>2?a=r.slice():a=new Array(n));for(var o=0;o<n;o+=i)a[o]=180*r[o]/zf,a[o+1]=360*Math.atan(Math.exp(r[o+1]/ey))/Math.PI-90;return a}var bY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),FY=6378137,uM=[-180,-90,180,90],IY=Math.PI*FY/180,_c=function(r){bY(e,r);function e(t,n){return r.call(this,{code:t,units:Ga.DEGREES,extent:uM,axisOrientation:n,global:!0,metersPerUnit:IY,worldExtent:uM})||this}return e}(Bl),cM=[new _c("CRS:84"),new _c("EPSG:4326","neu"),new _c("urn:ogc:def:crs:OGC:1.3:CRS84"),new _c("urn:ogc:def:crs:OGC:2:84"),new _c("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new _c("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new _c("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],WT={};function LY(r){return WT[r]||WT[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function OY(r,e){WT[r]=e}var lp={};function bp(r,e,t){var n=r.getCode(),i=e.getCode();n in lp||(lp[n]={}),lp[n][i]=t}function w6(r,e){var t;return r in lp&&e in lp[r]&&(t=lp[r][e]),t}var E6=63710088e-1;function I_(r,e,t){var n=t||E6,i=Su(r[1]),a=Su(e[1]),o=(a-i)/2,s=Su(e[0]-r[0])/2,A=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(a);return 2*n*Math.atan2(Math.sqrt(A),Math.sqrt(1-A))}function RY(r,e,t,n){var i=n||E6,a=Su(r[1]),o=Su(r[0]),s=e/i,A=Math.asin(Math.sin(a)*Math.cos(s)+Math.cos(a)*Math.sin(s)*Math.cos(t)),l=o+Math.atan2(Math.sin(t)*Math.sin(s)*Math.cos(a),Math.cos(s)-Math.sin(a)*Math.sin(A));return[JR(l),JR(A)]}var qT=!0;function MY(r){var e=r===void 0?!0:r;qT=!e}function qF(r,e,t){var n;if(e!==void 0){for(var i=0,a=r.length;i<a;++i)e[i]=r[i];n=e}else n=r.slice();return n}function ow(r,e,t){if(e!==void 0&&r!==e){for(var n=0,i=r.length;n<i;++n)e[n]=r[n];r=e}return r}function C6(r){OY(r.getCode(),r),bp(r,r,qF)}function NY(r){r.forEach(C6)}function Re(r){return typeof r=="string"?LY(r):r||null}function L_(r,e,t,n){r=Re(r);var i,a=r.getPointResolutionFunc();if(a){if(i=a(e,t),n&&n!==r.getUnits()){var o=r.getMetersPerUnit();o&&(i=i*o/Is[n])}}else{var s=r.getUnits();if(s==Ga.DEGREES&&!n||n==Ga.DEGREES)i=e;else{var A=vh(r,Re("EPSG:4326"));if(A===ow&&s!==Ga.DEGREES)i=e*r.getMetersPerUnit();else{var l=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];l=A(l,l,2);var u=I_(l.slice(0,2),l.slice(2,4)),c=I_(l.slice(4,6),l.slice(6,8));i=(u+c)/2}var o=n?Is[n]:r.getMetersPerUnit();o!==void 0&&(i/=o)}}return i}function ZT(r){NY(r),r.forEach(function(e){r.forEach(function(t){e!==t&&bp(e,t,qF)})})}function PY(r,e,t,n){r.forEach(function(i){e.forEach(function(a){bp(i,a,t),bp(a,i,n)})})}function ZF(r,e){return r?typeof r=="string"?Re(r):r:Re(e)}function hM(r){return function(e,t,n){for(var i=e.length,a=n!==void 0?n:2,o=t!==void 0?t:new Array(i),s=0;s<i;s+=a){var A=r([e[s],e[s+1]]);o[s]=A[0],o[s+1]=A[1];for(var l=a-1;l>=2;--l)o[s+l]=e[s+l]}return o}}function UY(r,e,t,n){var i=Re(r),a=Re(e);bp(i,a,hM(t)),bp(a,i,hM(n))}function Zs(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var n=vh(r,e);return n===qF&&t}function vh(r,e){var t=r.getCode(),n=e.getCode(),i=w6(t,n);return i||(i=ow),i}function yg(r,e){var t=Re(r),n=Re(e);return vh(t,n)}function ju(r,e,t){var n=yg(e,t);return n(r,void 0,r.length)}function O_(r,e,t,n){var i=yg(e,t);return $F(r,i,void 0,n)}var DY=null;function gh(){return DY}function Fp(r,e){return r}function xn(r,e){return qT&&!Es(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(qT=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function sw(r,e){return r}function Ro(r,e){return r}function QY(r,e){return r}function fM(r,e,t){return function(n){var i=n[0],a=n[1],o,s;if(r.canWrapX()){var A=r.getExtent(),l=Or(A);s=h6(n,r,l),s&&(i=i-s*l),i=bn(i,A[0],A[2]),a=bn(a,A[1],A[3]),o=t([i,a])}else o=t(n);return s&&e.canWrapX()&&(o[0]+=s*Or(e.getExtent())),o}}function HY(){ZT(lM),ZT(cM),PY(cM,lM,xY,SY)}HY();function pM(r,e,t){return function(n,i,a,o,s){if(n){if(!i&&!e)return n;var A=e?0:a[0]*i,l=e?0:a[1]*i,u=s?s[0]:0,c=s?s[1]:0,h=r[0]+A/2+u,f=r[2]-A/2+u,p=r[1]+l/2+c,v=r[3]-l/2+c;h>f&&(h=(f+h)/2,f=h),p>v&&(p=(v+p)/2,v=p);var m=bn(n[0],h,f),g=bn(n[1],p,v);if(o&&t&&i){var _=30*i;m+=-_*Math.log(1+Math.max(0,h-n[0])/_)+_*Math.log(1+Math.max(0,n[0]-f)/_),g+=-_*Math.log(1+Math.max(0,p-n[1])/_)+_*Math.log(1+Math.max(0,n[1]-v)/_)}return[m,g]}}}function GY(r){return r}function JF(r,e,t,n){var i=Or(e)/t[0],a=li(e)/t[1];return n?Math.min(r,Math.max(i,a)):Math.min(r,Math.min(i,a))}function tI(r,e,t){var n=Math.min(r,e),i=50;return n*=Math.log(1+i*Math.max(0,r/e-1))/i+1,t&&(n=Math.max(n,t),n/=Math.log(1+i*Math.max(0,t/r-1))/i+1),bn(n,t/2,e*2)}function kY(r,e,t,n){return function(i,a,o,s){if(i!==void 0){var A=r[0],l=r[r.length-1],u=t?JF(A,t,o,n):A;if(s){var c=e!==void 0?e:!0;return c?tI(i,u,l):bn(i,l,u)}var h=Math.min(u,i),f=Math.floor(ew(r,h,a));return r[f]>u&&f<r.length-1?r[f+1]:r[f]}else return}}function $Y(r,e,t,n,i,a){return function(o,s,A,l){if(o!==void 0){var u=i?JF(e,i,A,a):e,c=t!==void 0?t:0;if(l){var h=n!==void 0?n:!0;return h?tI(o,u,c):bn(o,c,u)}var f=1e-9,p=Math.ceil(Math.log(e/u)/Math.log(r)-f),v=-s*(.5-f)+.5,m=Math.min(u,o),g=Math.floor(Math.log(e/m)/Math.log(r)+v),_=Math.max(p,g),E=e/Math.pow(r,_);return bn(E,c,u)}else return}}function dM(r,e,t,n,i){return function(a,o,s,A){if(a!==void 0){var l=n?JF(r,n,s,i):r,u=t!==void 0?t:!0;return!u||!A?bn(a,e,l):tI(a,l,e)}else return}}function eI(r){if(r!==void 0)return 0}function vM(r){if(r!==void 0)return r}function jY(r){var e=2*Math.PI/r;return function(t,n){if(n)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t}}function VY(r){var e=r||Su(5);return function(t,n){if(n)return t;if(t!==void 0)return Math.abs(t)<=e?0:t}}function rI(r){return Math.pow(r,3)}function rs(r){return 1-rI(1-r)}function R_(r){return 3*r*r-2*r*r*r}function nI(r){return r}function KY(r){return r<.5?R_(2*r):1-R_(2*(r-.5))}var zY=Object.freeze(Object.defineProperty({__proto__:null,easeIn:rI,easeOut:rs,inAndOut:R_,linear:nI,upAndDown:KY},Symbol.toStringTag,{value:"Module"})),qt={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function Fu(r,e,t,n,i,a){for(var o=a||[],s=0,A=e;A<t;A+=n){var l=r[A],u=r[A+1];o[s++]=i[0]*l+i[2]*u+i[4],o[s++]=i[1]*l+i[3]*u+i[5]}return a&&o.length!=s&&(o.length=s),o}function iI(r,e,t,n,i,a,o){for(var s=o||[],A=Math.cos(i),l=Math.sin(i),u=a[0],c=a[1],h=0,f=e;f<t;f+=n){var p=r[f]-u,v=r[f+1]-c;s[h++]=u+p*A-v*l,s[h++]=c+p*l+v*A;for(var m=f+2;m<f+n;++m)s[h++]=r[m]}return o&&s.length!=h&&(s.length=h),s}function XY(r,e,t,n,i,a,o,s){for(var A=s||[],l=o[0],u=o[1],c=0,h=e;h<t;h+=n){var f=r[h]-l,p=r[h+1]-u;A[c++]=l+i*f,A[c++]=u+a*p;for(var v=h+2;v<h+n;++v)A[c++]=r[v]}return s&&A.length!=c&&(A.length=c),A}function B6(r,e,t,n,i,a,o){for(var s=o||[],A=0,l=e;l<t;l+=n){s[A++]=r[l]+i,s[A++]=r[l+1]+a;for(var u=l+2;u<l+n;++u)s[A++]=r[u]}return o&&s.length!=A&&(s.length=A),s}var YY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gM=si(),WY=function(r){YY(e,r);function e(){var t=r.call(this)||this;return t.extent_=wi(),t.extentRevision_=-1,t.simplifiedGeometryMaxMinSquaredTolerance=0,t.simplifiedGeometryRevision=0,t.simplifyTransformedInternal=tX(function(n,i,a){if(!a)return this.getSimplifiedGeometry(i);var o=this.clone();return o.applyTransform(a),o.getSimplifiedGeometry(i)}),t}return e.prototype.simplifyTransformed=function(t,n){return this.simplifyTransformedInternal(this.getRevision(),t,n)},e.prototype.clone=function(){return Te()},e.prototype.closestPointXY=function(t,n,i,a){return Te()},e.prototype.containsXY=function(t,n){var i=this.getClosestPoint([t,n]);return i[0]===t&&i[1]===n},e.prototype.getClosestPoint=function(t,n){var i=n||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return Te()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&ec(n),this.extentRevision_=this.getRevision()}return ZQ(this.extent_,t)},e.prototype.rotate=function(t,n){Te()},e.prototype.scale=function(t,n,i){Te()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Te()},e.prototype.getType=function(){return Te()},e.prototype.applyTransform=function(t){Te()},e.prototype.intersectsExtent=function(t){return Te()},e.prototype.translate=function(t,n){Te()},e.prototype.transform=function(t,n){var i=Re(t),a=i.getUnits()==Ga.TILE_PIXELS?function(o,s,A){var l=i.getExtent(),u=i.getWorldExtent(),c=li(u)/li(l);return Va(gM,u[0],u[3],c,-c,0,0,0),Fu(o,0,o.length,A,gM,s),yg(i,n)(o,s,A)}:yg(i,n);return this.applyTransform(a),this},e}(ui),Aw=WY,qY=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ZY=function(r){qY(e,r);function e(){var t=r.call(this)||this;return t.layout=qt.XY,t.stride=2,t.flatCoordinates=null,t}return e.prototype.computeExtent=function(t){return iw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Te()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var n=this.getSimplifiedGeometryInternal(t),i=n.getFlatCoordinates();return i.length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,n){this.stride=JT(t),this.layout=t,this.flatCoordinates=n},e.prototype.setCoordinates=function(t,n){Te()},e.prototype.setLayout=function(t,n,i){var a;if(t)a=JT(t);else{for(var o=0;o<i;++o)if(n.length===0){this.layout=qt.XY,this.stride=2;return}else n=n[0];a=n.length,t=JY(a)}this.layout=t,this.stride=a},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,n){var i=this.getFlatCoordinates();if(i){var a=this.getStride();iI(i,0,i.length,a,t,n,i),this.changed()}},e.prototype.scale=function(t,n,i){var a=n;a===void 0&&(a=t);var o=i;o||(o=ba(this.getExtent()));var s=this.getFlatCoordinates();if(s){var A=this.getStride();XY(s,0,s.length,A,t,a,o,s),this.changed()}},e.prototype.translate=function(t,n){var i=this.getFlatCoordinates();if(i){var a=this.getStride();B6(i,0,i.length,a,t,n,i),this.changed()}},e}(Aw);function JY(r){var e;return r==2?e=qt.XY:r==3?e=qt.XYZ:r==4&&(e=qt.XYZM),e}function JT(r){var e;return r==qt.XY?e=2:r==qt.XYZ||r==qt.XYM?e=3:r==qt.XYZM&&(e=4),e}function tW(r,e,t){var n=r.getFlatCoordinates();if(n){var i=r.getStride();return Fu(n,0,n.length,i,e,t)}else return null}var Ls=ZY;function yM(r,e,t,n,i,a,o){var s=r[e],A=r[e+1],l=r[t]-s,u=r[t+1]-A,c;if(l===0&&u===0)c=e;else{var h=((i-s)*l+(a-A)*u)/(l*l+u*u);if(h>1)c=t;else if(h>0){for(var f=0;f<n;++f)o[f]=qA(r[e+f],r[t+f],h);o.length=n;return}else c=e}for(var f=0;f<n;++f)o[f]=r[c+f];o.length=n}function aI(r,e,t,n,i){var a=r[e],o=r[e+1];for(e+=n;e<t;e+=n){var s=r[e],A=r[e+1],l=th(a,o,s,A);l>i&&(i=l),a=s,o=A}return i}function oI(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=aI(r,e,s,n,i),e=s}return i}function eW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=oI(r,e,s,n,i),e=s[s.length-1]}return i}function sI(r,e,t,n,i,a,o,s,A,l,u){if(e==t)return l;var c,h;if(i===0)if(h=th(o,s,r[e],r[e+1]),h<l){for(c=0;c<n;++c)A[c]=r[e+c];return A.length=n,h}else return l;for(var f=u||[NaN,NaN],p=e+n;p<t;)if(yM(r,p-n,p,n,o,s,f),h=th(o,s,f[0],f[1]),h<l){for(l=h,c=0;c<n;++c)A[c]=f[c];A.length=n,p+=n}else p+=n*Math.max((Math.sqrt(h)-Math.sqrt(l))/i|0,1);if(a&&(yM(r,t-n,e,n,o,s,f),h=th(o,s,f[0],f[1]),h<l)){for(l=h,c=0;c<n;++c)A[c]=f[c];A.length=n}return l}function AI(r,e,t,n,i,a,o,s,A,l,u){for(var c=u||[NaN,NaN],h=0,f=t.length;h<f;++h){var p=t[h];l=sI(r,e,p,n,i,a,o,s,A,l,c),e=p}return l}function rW(r,e,t,n,i,a,o,s,A,l,u){for(var c=u||[NaN,NaN],h=0,f=t.length;h<f;++h){var p=t[h];l=AI(r,e,p,n,i,a,o,s,A,l,c),e=p[p.length-1]}return l}function T6(r,e,t,n){for(var i=0,a=t.length;i<a;++i)r[e++]=t[i];return e}function ry(r,e,t,n){for(var i=0,a=t.length;i<a;++i)for(var o=t[i],s=0;s<n;++s)r[e++]=o[s];return e}function lI(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=ry(r,e,t[s],n);a[o++]=l,e=l}return a.length=o,a}function nW(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=lI(r,e,t[s],n,a[o]);a[o++]=l,e=l[l.length-1]}return a.length=o,a}function uI(r,e,t,n,i,a,o){var s=(t-e)/n;if(s<3){for(;e<t;e+=n)a[o++]=r[e],a[o++]=r[e+1];return o}var A=new Array(s);A[0]=1,A[s-1]=1;for(var l=[e,t-n],u=0;l.length>0;){for(var c=l.pop(),h=l.pop(),f=0,p=r[h],v=r[h+1],m=r[c],g=r[c+1],_=h+n;_<c;_+=n){var E=r[_],B=r[_+1],L=BX(E,B,p,v,m,g);L>f&&(u=_,f=L)}f>i&&(A[(u-e)/n]=1,h+n<u&&l.push(h,u),u+n<c&&l.push(u,c))}for(var _=0;_<s;++_)A[_]&&(a[o++]=r[e+_*n],a[o++]=r[e+_*n+1]);return o}function iW(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=uI(r,e,u,n,i,a,o),s.push(o),e=u}return o}function Lc(r,e){return e*Math.round(r/e)}function aW(r,e,t,n,i,a,o){if(e==t)return o;var s=Lc(r[e],i),A=Lc(r[e+1],i);e+=n,a[o++]=s,a[o++]=A;var l,u;do if(l=Lc(r[e],i),u=Lc(r[e+1],i),e+=n,e==t)return a[o++]=l,a[o++]=u,o;while(l==s&&u==A);for(;e<t;){var c=Lc(r[e],i),h=Lc(r[e+1],i);if(e+=n,!(c==l&&h==u)){var f=l-s,p=u-A,v=c-s,m=h-A;if(f*m==p*v&&(f<0&&v<f||f==v||f>0&&v>f)&&(p<0&&m<p||p==m||p>0&&m>p)){l=c,u=h;continue}a[o++]=l,a[o++]=u,s=l,A=u,l=c,u=h}}return a[o++]=l,a[o++]=u,o}function x6(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=aW(r,e,u,n,i,a,o),s.push(o),e=u}return o}function oW(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A],c=[];o=x6(r,e,u,n,i,a,o,c),s.push(c),e=u[u.length-1]}return o}function tl(r,e,t,n,i){for(var a=i!==void 0?i:[],o=0,s=e;s<t;s+=n)a[o++]=r.slice(s,s+n);return a.length=o,a}function mg(r,e,t,n,i){for(var a=i!==void 0?i:[],o=0,s=0,A=t.length;s<A;++s){var l=t[s];a[o++]=tl(r,e,l,n,a[o]),e=l}return a.length=o,a}function tx(r,e,t,n,i){for(var a=i!==void 0?i:[],o=0,s=0,A=t.length;s<A;++s){var l=t[s];a[o++]=mg(r,e,l,n,a[o]),e=l[l.length-1]}return a.length=o,a}function S6(r,e,t,n){for(var i=0,a=r[t-n],o=r[t-n+1];e<t;e+=n){var s=r[e],A=r[e+1];i+=o*s-a*A,a=s,o=A}return i/2}function b6(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=S6(r,e,s,n),e=s}return i}function sW(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=b6(r,e,s,n),e=s[s.length-1]}return i}var AW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),lW=function(r){AW(e,r);function e(t,n){var i=r.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(t[0])?i.setFlatCoordinates(n,t):i.setCoordinates(t,n),i}return e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,n,i,a){return a<tc(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(aI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.getArea=function(){return S6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return tl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=uI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,qt.XY)},e.prototype.getType=function(){return st.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ry(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Ls),Ip=lW,uW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),cW=function(r){uW(e,r);function e(t,n){var i=r.call(this)||this;return i.setCoordinates(t,n),i}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){var o=this.flatCoordinates,s=th(t,n,o[0],o[1]);if(s<a){for(var A=this.stride,l=0;l<A;++l)i[l]=o[l];return i.length=A,s}else return a},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return qc(this.flatCoordinates,t)},e.prototype.getType=function(){return st.POINT},e.prototype.intersectsExtent=function(t){return nw(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=T6(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Ls),pr=cW;function hW(r,e,t,n,i){var a=aw(i,function(o){return!kc(r,e,t,n,o[0],o[1])});return!a}function kc(r,e,t,n,i,a){for(var o=0,s=r[t-n],A=r[t-n+1];e<t;e+=n){var l=r[e],u=r[e+1];A<=a?u>a&&(l-s)*(a-A)-(i-s)*(u-A)>0&&o++:u<=a&&(l-s)*(a-A)-(i-s)*(u-A)<0&&o--,s=l,A=u}return o!==0}function cI(r,e,t,n,i,a){if(t.length===0||!kc(r,e,t[0],n,i,a))return!1;for(var o=1,s=t.length;o<s;++o)if(kc(r,t[o-1],t[o],n,i,a))return!1;return!0}function fW(r,e,t,n,i,a){if(t.length===0)return!1;for(var o=0,s=t.length;o<s;++o){var A=t[o];if(cI(r,e,A,n,i,a))return!0;e=A[A.length-1]}return!1}function hI(r,e,t,n,i,a,o){for(var s,A,l,u,c,h,f,p=i[a+1],v=[],m=0,g=t.length;m<g;++m){var _=t[m];for(u=r[_-n],h=r[_-n+1],s=e;s<_;s+=n)c=r[s],f=r[s+1],(p<=h&&f<=p||h<=p&&p<=f)&&(l=(p-h)/(f-h)*(c-u)+u,v.push(l)),u=c,h=f}var E=NaN,B=-1/0;for(v.sort(Hu),u=v[0],s=1,A=v.length;s<A;++s){c=v[s];var L=Math.abs(c-u);L>B&&(l=(u+c)/2,cI(r,e,t,n,l,p)&&(E=l,B=L)),u=c}return isNaN(E)&&(E=i[a]),o?(o.push(E,p,B),o):[E,p,B]}function F6(r,e,t,n,i){for(var a=[],o=0,s=t.length;o<s;++o){var A=t[o];a=hI(r,e,A,n,i,2*o,a),e=A[A.length-1]}return a}function I6(r,e,t,n,i){var a;for(e+=n;e<t;e+=n)if(a=i(r.slice(e-n,e),r.slice(e,e+n)),a)return a;return!1}function lw(r,e,t,n,i){var a=kF(wi(),r,e,t,n);return Nn(i,a)?Oo(i,a)||a[0]>=i[0]&&a[2]<=i[2]||a[1]>=i[1]&&a[3]<=i[3]?!0:I6(r,e,t,n,function(o,s){return t6(i,o,s)}):!1}function pW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){if(lw(r,e,t[a],n,i))return!0;e=t[a]}return!1}function dW(r,e,t,n,i){return!!(lw(r,e,t,n,i)||kc(r,e,t,n,i[0],i[1])||kc(r,e,t,n,i[0],i[3])||kc(r,e,t,n,i[2],i[1])||kc(r,e,t,n,i[2],i[3]))}function L6(r,e,t,n,i){if(!dW(r,e,t[0],n,i))return!1;if(t.length===1)return!0;for(var a=1,o=t.length;a<o;++a)if(hW(r,t[a-1],t[a],n,i)&&!lw(r,t[a-1],t[a],n,i))return!1;return!0}function vW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(L6(r,e,s,n,i))return!0;e=s[s.length-1]}return!1}function gW(r,e,t,n){for(;e<t-n;){for(var i=0;i<n;++i){var a=r[e+i];r[e+i]=r[t-n+i],r[t-n+i]=a}e+=n,t-=n}}function uw(r,e,t,n){for(var i=0,a=r[t-n],o=r[t-n+1];e<t;e+=n){var s=r[e],A=r[e+1];i+=(s-a)*(A+o),a=s,o=A}return i===0?void 0:i>0}function O6(r,e,t,n,i){for(var a=i!==void 0?i:!1,o=0,s=t.length;o<s;++o){var A=t[o],l=uw(r,e,A,n);if(o===0){if(a&&l||!a&&!l)return!1}else if(a&&!l||!a&&l)return!1;e=A}return!0}function yW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(!O6(r,e,s,n,i))return!1;s.length&&(e=s[s.length-1])}return!0}function ex(r,e,t,n,i){for(var a=i!==void 0?i:!1,o=0,s=t.length;o<s;++o){var A=t[o],l=uw(r,e,A,n),u=o===0?a&&l||!a&&!l:a&&!l||!a&&l;u&&gW(r,e,A,n),e=A}return e}function mM(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a)e=ex(r,e,t[a],n,i);return e}function mW(r,e){for(var t=[],n=0,i=0,a=0,o=e.length;a<o;++a){var s=e[a];if(!uw(r,n,s,2))t.push(e.slice(i,a+1));else{if(t.length===0)continue;t[t.length-1].push(e[i])}i=a+1,n=s}return t}var _W=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),cw=function(r){_W(e,r);function e(t,n,i){var a=r.call(this)||this;return a.ends_=[],a.flatInteriorPointRevision_=-1,a.flatInteriorPoint_=null,a.maxDelta_=-1,a.maxDeltaRevision_=-1,a.orientedRevision_=-1,a.orientedFlatCoordinates_=null,n!==void 0&&i?(a.setFlatCoordinates(n,t),a.ends_=i):a.setCoordinates(t,n),a}return e.prototype.appendLinearRing=function(t){this.flatCoordinates?Gr(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){return a<tc(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oI(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),AI(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return cI(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,n)},e.prototype.getArea=function(){return b6(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),ex(n,0,this.ends_,this.stride,t)):n=this.flatCoordinates,mg(n,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=ba(this.getExtent());this.flatInteriorPoint_=hI(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new pr(this.getFlatInteriorPoint(),qt.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new Ip(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.ends_,a=[],o=0,s=0,A=i.length;s<A;++s){var l=i[s],u=new Ip(n.slice(o,l),t);a.push(u),o=l}return a},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;O6(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=ex(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=x6(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,qt.XY,i)},e.prototype.getType=function(){return st.POLYGON},e.prototype.intersectsExtent=function(t){return L6(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=lI(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(Ls),Fn=cw;function wW(r,e,t,n){for(var i=t||32,a=[],o=0;o<i;++o)Gr(a,RY(r,e,2*Math.PI*o/i,n));return a.push(a[0],a[1]),new cw(a,qt.XY,[a.length])}function Vu(r){var e=r[0],t=r[1],n=r[2],i=r[3],a=[e,t,e,i,n,i,n,t,e,t];return new cw(a,qt.XY,[a.length])}function R6(r,e,t){for(var n=e||32,i=r.getStride(),a=r.getLayout(),o=r.getCenter(),s=i*(n+1),A=new Array(s),l=0;l<s;l+=i){A[l]=0,A[l+1]=0;for(var u=2;u<i;u++)A[l+u]=o[u]}var c=[A.length],h=new cw(A,a,c);return EW(h,o,r.getRadius(),t),h}function EW(r,e,t,n){for(var i=r.getFlatCoordinates(),a=r.getStride(),o=i.length/a-1,s=n||0,A=0;A<=o;++A){var l=A*a,u=s+bu(A,o)*2*Math.PI/o;i[l]=e[0]+t*Math.cos(u),i[l+1]=e[1]+t*Math.sin(u)}r.changed()}var CW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),wC=0,BW=function(r){CW(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=ve({},t);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=ZF(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&MY(),i.center&&(i.center=xn(i.center,n.projection_)),i.extent&&(i.extent=Ro(i.extent,n.projection_)),n.applyOptions_(i),n}return e.prototype.applyOptions_=function(t){var n=ve({},t);for(var i in bo)delete n[i];this.setProperties(n,!0);var a=xW(t);this.maxResolution_=a.maxResolution,this.minResolution_=a.minResolution,this.zoomFactor_=a.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=a.minZoom;var o=TW(t),s=a.constraint,A=SW(t);this.constraints_={center:o,resolution:s,rotation:A},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var n=this.padding_;this.padding_=t;var i=this.getCenter();if(i){var a=t||[0,0,0,0];n=n||[0,0,0,0];var o=this.getResolution(),s=o/2*(a[3]-n[3]+n[1]-a[1]),A=o/2*(a[0]-n[0]+n[2]-a[2]);this.setCenterInternal([i[0]+s,i[1]-A])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var n=this.getProperties();return n.resolution!==void 0?n.resolution=this.getResolution():n.zoom=this.getZoom(),n.center=this.getCenterInternal(),n.rotation=this.getRotation(),ve({},n,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var n=new Array(arguments.length),i=0;i<n.length;++i){var a=arguments[i];a.center&&(a=ve({},a),a.center=xn(a.center,this.getProjection())),a.anchor&&(a=ve({},a),a.anchor=xn(a.anchor,this.getProjection())),n[i]=a}this.animateInternal.apply(this,n)},e.prototype.animateInternal=function(t){var n=arguments.length,i;n>1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);for(var a=0;a<n&&!this.isDef();++a){var o=arguments[a];o.center&&this.setCenterInternal(o.center),o.zoom!==void 0?this.setZoom(o.zoom):o.resolution&&this.setResolution(o.resolution),o.rotation!==void 0&&this.setRotation(o.rotation)}if(a===n){i&&bm(i,!0);return}for(var s=Date.now(),A=this.targetCenter_.slice(),l=this.targetResolution_,u=this.targetRotation_,c=[];a<n;++a){var h=arguments[a],f={start:s,complete:!1,anchor:h.anchor,duration:h.duration!==void 0?h.duration:1e3,easing:h.easing||R_,callback:i};if(h.center&&(f.sourceCenter=A,f.targetCenter=h.center.slice(),A=f.targetCenter),h.zoom!==void 0?(f.sourceResolution=l,f.targetResolution=this.getResolutionForZoom(h.zoom),l=f.targetResolution):h.resolution&&(f.sourceResolution=l,f.targetResolution=h.resolution,l=f.targetResolution),h.rotation!==void 0){f.sourceRotation=u;var p=bu(h.rotation-u+Math.PI,2*Math.PI)-Math.PI;f.targetRotation=u+p,u=f.targetRotation}bW(f)?f.complete=!0:s+=f.duration,c.push(f)}this.animations_.push(c),this.setHint(mn.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[mn.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[mn.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(mn.ANIMATING,-this.hints_[mn.ANIMATING]);for(var t,n=0,i=this.animations_.length;n<i;++n){var a=this.animations_[n];if(a[0].callback&&bm(a[0].callback,!1),!t)for(var o=0,s=a.length;o<s;++o){var A=a[o];if(!A.complete){t=A.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!!this.getAnimating()){for(var t=Date.now(),n=!1,i=this.animations_.length-1;i>=0;--i){for(var a=this.animations_[i],o=!0,s=0,A=a.length;s<A;++s){var l=a[s];if(!l.complete){var u=t-l.start,c=l.duration>0?u/l.duration:1;c>=1?(l.complete=!0,c=1):o=!1;var h=l.easing(c);if(l.sourceCenter){var f=l.sourceCenter[0],p=l.sourceCenter[1],v=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;var g=f+h*(v-f),_=p+h*(m-p);this.targetCenter_=[g,_]}if(l.sourceResolution&&l.targetResolution){var E=h===1?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){var B=this.getViewportSize_(this.getRotation()),L=this.constraints_.resolution(E,0,B,!0);this.targetCenter_=this.calculateCenterZoom(L,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=E,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){var O=h===1?bu(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){var b=this.constraints_.rotation(O,!0);this.targetCenter_=this.calculateCenterRotate(b,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=O}if(this.applyTargetState_(!0),n=!0,!l.complete)break}}if(o){this.animations_[i]=null,this.setHint(mn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var T=a[0].callback;T&&bm(T,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,n){var i,a=this.getCenterInternal();return a!==void 0&&(i=[a[0]-n[0],a[1]-n[1]],XF(i,t-this.getRotation()),u6(i,n)),i},e.prototype.calculateCenterZoom=function(t,n){var i,a=this.getCenterInternal(),o=this.getResolution();if(a!==void 0&&o!==void 0){var s=n[0]-t*(n[0]-a[0])/o,A=n[1]-t*(n[1]-a[1])/o;i=[s,A]}return i},e.prototype.getViewportSize_=function(t){var n=this.viewportSize_;if(t){var i=n[0],a=n[1];return[Math.abs(i*Math.cos(t))+Math.abs(a*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(a*Math.cos(t))]}else return n},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t&&Fp(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(bo.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var n=this.calculateExtentInternal(t);return sw(n,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var n=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();we(i,1);var a=this.getResolution();we(a!==void 0,2);var o=this.getRotation();return we(o!==void 0,3),Jc(i,a,o,n)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(bo.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Ro(t,this.getProjection()),n)},e.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.getViewportSizeMinusPadding_(),a=Or(t)/i[0],o=li(t)/i[1];return Math.max(a,o)},e.prototype.getResolutionForValueFunction=function(t){var n=t||2,i=this.getConstrainedResolution(this.maxResolution_),a=this.minResolution_,o=Math.log(i/a)/Math.log(n);return function(s){var A=i/Math.pow(n,s*o);return A}},e.prototype.getRotation=function(){return this.get(bo.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),a=this.minResolution_,o=Math.log(i/a)/n;return function(s){var A=Math.log(i/s)/n/o;return A}},e.prototype.getViewportSizeMinusPadding_=function(t){var n=this.getViewportSize_(t),i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n},e.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),i=this.getRotation(),a=this.getCenterInternal(),o=this.padding_;if(o){var s=this.getViewportSizeMinusPadding_();a=EC(a,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],n,i)}return{center:a.slice(0),projection:t!==void 0?t:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,n=this.getResolution();return n!==void 0&&(t=this.getZoomForResolution(n)),t},e.prototype.getZoomForResolution=function(t){var n=this.minZoom_||0,i,a;if(this.resolutions_){var o=ew(this.resolutions_,t,1);n=o,i=this.resolutions_[o],o==this.resolutions_.length-1?a=2:a=i/this.resolutions_[o+1]}else i=this.maxResolution_,a=this.zoomFactor_;return n+Math.log(i/t)/Math.log(a)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var n=bn(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,bn(t-n,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,n){var i;if(we(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){we(!Kp(t),25);var a=Ro(t,this.getProjection());i=Vu(a)}else if(t.getType()===st.CIRCLE){var a=Ro(t.getExtent(),this.getProjection());i=Vu(a),i.rotate(this.getRotation(),ba(a))}else{var o=gh();o?i=t.clone().transform(o,this.getProjection()):i=t}this.fitInternal(i,n)},e.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),i=Math.cos(n),a=Math.sin(-n),o=t.getFlatCoordinates(),s=t.getStride(),A=1/0,l=1/0,u=-1/0,c=-1/0,h=0,f=o.length;h<f;h+=s){var p=o[h]*i-o[h+1]*a,v=o[h]*a+o[h+1]*i;A=Math.min(A,p),l=Math.min(l,v),u=Math.max(u,p),c=Math.max(c,v)}return[A,l,u,c]},e.prototype.fitInternal=function(t,n){var i=n||{},a=i.size;a||(a=this.getViewportSizeMinusPadding_());var o=i.padding!==void 0?i.padding:[0,0,0,0],s=i.nearest!==void 0?i.nearest:!1,A;i.minResolution!==void 0?A=i.minResolution:i.maxZoom!==void 0?A=this.getResolutionForZoom(i.maxZoom):A=0;var l=this.rotatedExtentForGeometry(t),u=this.getResolutionForExtentInternal(l,[a[0]-o[1]-o[3],a[1]-o[0]-o[2]]);u=isNaN(u)?A:Math.max(u,A),u=this.getConstrainedResolution(u,s?0:1);var c=this.getRotation(),h=Math.sin(c),f=Math.cos(c),p=ba(l);p[0]+=(o[1]-o[3])/2*u,p[1]+=(o[0]-o[2])/2*u;var v=p[0]*f-p[1]*h,m=p[1]*f+p[0]*h,g=this.getConstrainedCenter([v,m],u),_=i.callback?i.callback:hh;i.duration!==void 0?this.animateInternal({resolution:u,center:g,duration:i.duration,easing:i.easing},_):(this.targetResolution_=u,this.targetCenter_=g,this.applyTargetState_(!1,!0),bm(_,!0))},e.prototype.centerOn=function(t,n,i){this.centerOnInternal(xn(t,this.getProjection()),n,i)},e.prototype.centerOnInternal=function(t,n,i){this.setCenterInternal(EC(t,n,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,n,i,a){var o,s=this.padding_;if(s&&t){var A=this.getViewportSizeMinusPadding_(-i),l=EC(t,a,[A[0]/2+s[3],A[1]/2+s[0]],n,i);o=[t[0]-l[0],t[1]-l[1]]}return o},e.prototype.isDef=function(){return!!this.getCenterInternal()&&this.getResolution()!==void 0},e.prototype.adjustCenter=function(t){var n=Fp(this.targetCenter_,this.getProjection());this.setCenter([n[0]+t[0],n[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var n=this.targetCenter_;this.setCenterInternal([n[0]+t[0],n[1]+t[1]])},e.prototype.adjustResolution=function(t,n){var i=n&&xn(n,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),a=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,a,i);n&&(this.targetCenter_=this.calculateCenterZoom(o,n)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,n){this.adjustResolution(Math.pow(this.zoomFactor_,-t),n)},e.prototype.adjustRotation=function(t,n){n&&(n=xn(n,this.getProjection())),this.adjustRotationInternal(t,n)},e.prototype.adjustRotationInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),a=this.constraints_.rotation(this.targetRotation_+t,i);n&&(this.targetCenter_=this.calculateCenterRotate(a,n)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t&&xn(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,n){return this.hints_[t]+=n,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,n){var i=this.getAnimating()||this.getInteracting()||n,a=this.constraints_.rotation(this.targetRotation_,i),o=this.getViewportSize_(a),s=this.constraints_.resolution(this.targetResolution_,0,o,i),A=this.constraints_.center(this.targetCenter_,s,o,i,this.calculateCenterShift(this.targetCenter_,s,a,o));this.get(bo.ROTATION)!==a&&this.set(bo.ROTATION,a),this.get(bo.RESOLUTION)!==s&&(this.set(bo.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!A||!this.get(bo.CENTER)||!Es(this.get(bo.CENTER),A))&&this.set(bo.CENTER,A),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,n,i){var a=t!==void 0?t:200,o=n||0,s=this.constraints_.rotation(this.targetRotation_),A=this.getViewportSize_(s),l=this.constraints_.resolution(this.targetResolution_,o,A),u=this.constraints_.center(this.targetCenter_,l,A,!1,this.calculateCenterShift(this.targetCenter_,l,s,A));if(a===0&&!this.cancelAnchor_){this.targetResolution_=l,this.targetRotation_=s,this.targetCenter_=u,this.applyTargetState_();return}var c=i||(a===0?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,(this.getResolution()!==l||this.getRotation()!==s||!this.getCenterInternal()||!Es(this.getCenterInternal(),u))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:u,resolution:l,duration:a,easing:rs,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(mn.INTERACTING,1)},e.prototype.endInteraction=function(t,n,i){var a=i&&xn(i,this.getProjection());this.endInteractionInternal(t,n,a)},e.prototype.endInteractionInternal=function(t,n,i){this.setHint(mn.INTERACTING,-1),this.resolveConstraints(t,n,i)},e.prototype.getConstrainedCenter=function(t,n){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,n||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,n){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,n))},e.prototype.getConstrainedResolution=function(t,n){var i=n||0,a=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,a)},e}(ui);function bm(r,e){setTimeout(function(){r(e)},0)}function TW(r){if(r.extent!==void 0){var e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return pM(r.extent,r.constrainOnlyCenter,e)}var t=ZF(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){var n=t.getExtent().slice();return n[0]=-1/0,n[2]=1/0,pM(n,!1,!1)}return GY}function xW(r){var e,t,n,i=28,a=2,o=r.minZoom!==void 0?r.minZoom:wC,s=r.maxZoom!==void 0?r.maxZoom:i,A=r.zoomFactor!==void 0?r.zoomFactor:a,l=r.multiWorld!==void 0?r.multiWorld:!1,u=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,c=r.showFullExtent!==void 0?r.showFullExtent:!1,h=ZF(r.projection,"EPSG:3857"),f=h.getExtent(),p=r.constrainOnlyCenter,v=r.extent;if(!l&&!v&&h.isGlobal()&&(p=!1,v=f),r.resolutions!==void 0){var m=r.resolutions;t=m[o],n=m[s]!==void 0?m[s]:m[m.length-1],r.constrainResolution?e=kY(m,u,!p&&v,c):e=dM(t,n,u,!p&&v,c)}else{var g=f?Math.max(Or(f),li(f)):360*Is[Ga.DEGREES]/h.getMetersPerUnit(),_=g/WF/Math.pow(a,wC),E=_/Math.pow(a,i-wC);t=r.maxResolution,t!==void 0?o=0:t=_/Math.pow(A,o),n=r.minResolution,n===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?n=t/Math.pow(A,s):n=_/Math.pow(A,s):n=E),s=o+Math.floor(Math.log(t/n)/Math.log(A)),n=t/Math.pow(A,s-o),r.constrainResolution?e=$Y(A,t,n,u,!p&&v,c):e=dM(t,n,u,!p&&v,c)}return{constraint:e,maxResolution:t,minResolution:n,minZoom:o,zoomFactor:A}}function SW(r){var e=r.enableRotation!==void 0?r.enableRotation:!0;if(e){var t=r.constrainRotation;return t===void 0||t===!0?VY():t===!1?vM:typeof t=="number"?jY(t):vM}else return eI}function bW(r){return!(r.sourceCenter&&r.targetCenter&&!Es(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function EC(r,e,t,n,i){var a=Math.cos(-i),o=Math.sin(-i),s=r[0]*a-r[1]*o,A=r[1]*a+r[0]*o;s+=(e[0]/2-t[0])*n,A+=(t[1]-e[1]/2)*n,o=-o;var l=s*a-A*o,u=A*a+s*o;return[l,u]}var Js=BW;function _M(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]+2*e,t[1]=r[1]+2*e,t}function wM(r){return r[0]>0&&r[1]>0}function M6(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]*e+.5|0,t[1]=r[1]*e+.5|0,t}function Ui(r,e){return Array.isArray(r)?r:(e===void 0?e=[r,r]:(e[0]=r,e[1]=r),e)}var FW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function N6(r){if(r instanceof Fh){r.setMapInternal(null);return}r instanceof ty&&r.getLayers().forEach(N6)}function P6(r,e){if(r instanceof Fh){r.setMapInternal(e);return}if(r instanceof ty)for(var t=r.getLayers().getArray(),n=0,i=t.length;n<i;++n)P6(t[n],e)}var IW=function(r){FW(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=LW(t);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,n.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:fh,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=si(),n.pixelToCoordinateTransform_=si(),n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=t.moveTolerance,n.keyboardEventTarget_=i.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=i.controls||new Ai,n.interactions=i.interactions||new Ai,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new mY(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(ti.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(ti.VIEW,n.handleViewChanged_),n.addChangeListener(ti.SIZE,n.handleSizeChanged_),n.addChangeListener(ti.TARGET,n.handleTargetChanged_),n.setProperties(i.values);var a=n;return t.view&&!(t.view instanceof Js)&&t.view.then(function(o){a.setView(new Js(o))}),n.controls.addEventListener($n.ADD,function(o){o.element.setMap(this)}.bind(n)),n.controls.addEventListener($n.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.interactions.addEventListener($n.ADD,function(o){o.element.setMap(this)}.bind(n)),n.interactions.addEventListener($n.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.overlays_.addEventListener($n.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(n)),n.overlays_.addEventListener($n.REMOVE,function(o){var s=o.element,A=s.getId();A!==void 0&&delete this.overlayIdIndex_[A.toString()],o.element.setMap(null)}.bind(n)),n.controls.forEach(function(o){o.setMap(this)}.bind(n)),n.interactions.forEach(function(o){o.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){var n=this.getLayerGroup().getLayers();n.push(t)},e.prototype.handleLayerAdd_=function(t){P6(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var n=t.getId();n!==void 0&&(this.overlayIdIndex_[n.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),r.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,n,i){if(!(!this.frameState_||!this.renderer_)){var a=this.getCoordinateFromPixelInternal(t);i=i!==void 0?i:{};var o=i.hitTolerance!==void 0?i.hitTolerance:0,s=i.layerFilter!==void 0?i.layerFilter:sA,A=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(a,this.frameState_,o,A,n,null,s,null)}},e.prototype.getFeaturesAtPixel=function(t,n){var i=[];return this.forEachFeatureAtPixel(t,function(a){i.push(a)},n),i},e.prototype.getAllLayers=function(){var t=[];function n(i){i.forEach(function(a){a instanceof ty?n(a.getLayers()):t.push(a)})}return n(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,n,i){if(!(!this.frameState_||!this.renderer_)){var a=i||{},o=a.hitTolerance!==void 0?a.hitTolerance:0,s=a.layerFilter||sA;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,o,n,s)}},e.prototype.hasFeatureAtPixel=function(t,n){if(!this.frameState_||!this.renderer_)return!1;var i=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};var a=n.layerFilter!==void 0?n.layerFilter:sA,o=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,o,s,a,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var n=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-n.left,i.clientY-n.top]},e.prototype.getTarget=function(){return this.get(ti.TARGET)},e.prototype.getTargetElement=function(){var t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Fp(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var n=this.frameState_;return n?hn(n.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var n=this.overlayIdIndex_[t.toString()];return n!==void 0?n:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(ti.LAYERGROUP)},e.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof Ai){n.setLayers(t);return}var i=n.getLayers();i.clear(),i.extend(t)},e.prototype.getLayers=function(){var t=this.getLayerGroup().getLayers();return t},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var a=t[n];if(a.visible){var o=a.layer.getRenderer();if(o&&!o.ready)return!0;var s=a.layer.getSource();if(s&&s.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var n=xn(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},e.prototype.getPixelFromCoordinateInternal=function(t){var n=this.frameState_;return n?hn(n.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(ti.SIZE)},e.prototype.getView=function(){return this.get(ti.VIEW)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,n,i,a){return _Y(this.frameState_,t,n,i,a)},e.prototype.handleBrowserEvent=function(t,n){var i=n||t.type,a=new YA(i,this,t);this.handleMapBrowserEvent(a)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var n=t.originalEvent,i=n.type;if(i===qs.POINTERDOWN||i===me.WHEEL||i===me.KEYDOWN){var a=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():a,s=n.target;if(this.overlayContainerStopEvent_.contains(s)||!(o===a?a.documentElement:o).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1)for(var A=this.getInteractions().getArray().slice(),l=A.length-1;l>=0;l--){var u=A[l];if(!(u.getMap()!==this||!u.getActive()||!this.getTargetElement())){var c=u.handleEvent(t);if(!c||t.propagationStopped)break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,n=this.tileQueue_;if(!n.isEmpty()){var i=this.maxTilesLoading_,a=i;if(t){var o=t.viewHints;if(o[mn.ANIMATING]||o[mn.INTERACTING]){var s=Date.now()-t.time>8;i=s?0:8,a=s?0:2}}n.getTilesLoading()<i&&(n.reprioritize(),n.loadMoreTiles(i,a))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(so.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(so.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Pf(Xs.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Pf(Xs.LOADSTART,this,t))));for(var A=this.postRenderFunctions_,l=0,u=A.length;l<u;++l)A[l](this,t);A.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,n=this.targetChangeHandlerKeys_.length;t<n;++t)Nr(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(me.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(me.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,T_(this.viewport_)}var i=this.getTargetElement();if(!i)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{i.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new pY(this,this.moveTolerance_);for(var a in or)this.mapBrowserEventHandler_.addEventListener(or[a],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(me.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(me.WHEEL,this.boundHandleBrowserEvent_,zQ?{passive:!1}:!1);var o=this.getOwnerDocument().defaultView,s=this.keyboardEventTarget_?this.keyboardEventTarget_:i;this.targetChangeHandlerKeys_=[Ue(s,me.KEYDOWN,this.handleBrowserEvent,this),Ue(s,me.KEYPRESS,this.handleBrowserEvent,this),Ue(o,me.RESIZE,this.updateSize,this)]}this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(Nr(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Nr(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=Ue(t,ph.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Ue(t,me.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Nr),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new hu("addlayer",t)),this.layerGroupPropertyListenerKeys_=[Ue(t,ph.PROPERTYCHANGE,this.render,this),Ue(t,me.CHANGE,this.render,this),Ue(t,"addlayer",this.handleLayerAdd_,this),Ue(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var a=t[n].layer;a.hasRenderer()&&a.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){var n=this.getLayerGroup().getLayers();return n.remove(t)},e.prototype.handleLayerRemove_=function(t){N6(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var n=this,i=this.getSize(),a=this.getView(),o=this.frameState_,s=null;if(i!==void 0&&wM(i)&&a&&a.isDef()){var A=a.getHints(this.frameState_?this.frameState_.viewHints:void 0),l=a.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Jc(l.center,l.resolution,l.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:l,viewHints:A,wantedTiles:{},mapId:de(this),renderTargets:{}},l.nextCenter&&l.nextResolution){var u=isNaN(l.nextRotation)?l.rotation:l.nextRotation;s.nextExtent=Jc(l.nextCenter,l.nextResolution,u,i)}}if(this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),o){var c=!this.previousExtent_||!Kp(this.previousExtent_)&&!cA(s.extent,this.previousExtent_);c&&(this.dispatchEvent(new Pf(Xs.MOVESTART,this,o)),this.previousExtent_=ec(this.previousExtent_))}var h=this.previousExtent_&&!s.viewHints[mn.ANIMATING]&&!s.viewHints[mn.INTERACTING]&&!cA(s.extent,this.previousExtent_);h&&(this.dispatchEvent(new Pf(Xs.MOVEEND,this,s)),HF(s.extent,this.previousExtent_))}this.dispatchEvent(new Pf(Xs.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(Xs.LOADSTART)||this.hasListener(Xs.LOADEND)||this.hasListener(so.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){n.postRenderTimeoutHandle_=void 0,n.handlePostRender()},0))},e.prototype.setLayerGroup=function(t){var n=this.getLayerGroup();n&&this.handleLayerRemove_(new hu("removelayer",n)),this.set(ti.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(ti.SIZE,t)},e.prototype.setTarget=function(t){this.set(ti.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof Js){this.set(ti.VIEW,t);return}this.set(ti.VIEW,new Js);var n=this;t.then(function(i){n.setView(new Js(i))})},e.prototype.updateSize=function(){var t=this.getTargetElement(),n=void 0;if(t){var i=getComputedStyle(t),a=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),o=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(a)&&!isNaN(o)&&(n=[a,o],!wM(n)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(n),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var n=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(n=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(n)}},e}(ui);function LW(r){var e=null;r.keyboardEventTarget!==void 0&&(e=typeof r.keyboardEventTarget=="string"?document.getElementById(r.keyboardEventTarget):r.keyboardEventTarget);var t={},n=r.layers&&typeof r.layers.getLayers=="function"?r.layers:new ty({layers:r.layers});t[ti.LAYERGROUP]=n,t[ti.TARGET]=r.target,t[ti.VIEW]=r.view instanceof Js?r.view:new Js;var i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new Ai(r.controls.slice()):(we(typeof r.controls.getArray=="function",47),i=r.controls));var a;r.interactions!==void 0&&(Array.isArray(r.interactions)?a=new Ai(r.interactions.slice()):(we(typeof r.interactions.getArray=="function",48),a=r.interactions));var o;return r.overlays!==void 0?Array.isArray(r.overlays)?o=new Ai(r.overlays.slice()):(we(typeof r.overlays.getArray=="function",49),o=r.overlays):o=new Ai,{controls:i,interactions:a,keyboardEventTarget:e,overlays:o,values:t}}var U6=IW,OW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),RW=function(r){OW(e,r);function e(t){var n=r.call(this)||this,i=t.element;return i&&!t.target&&!i.style.pointerEvents&&(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],t.render&&(n.render=t.render),t.target&&n.setTarget(t.target),n}return e.prototype.disposeInternal=function(){T_(this.element),r.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&T_(this.element);for(var n=0,i=this.listenerKeys.length;n<i;++n)Nr(this.listenerKeys[n]);if(this.listenerKeys.length=0,this.map_=t,t){var a=this.target_?this.target_:t.getOverlayContainerStopEvent();a.appendChild(this.element),this.render!==hh&&this.listenerKeys.push(Ue(t,Xs.POSTRENDER,this.render,this)),t.render()}},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_=typeof t=="string"?document.getElementById(t):t},e}(ui),wr=RW,MW=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"})),NW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),PW=function(r){NW(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.ulElement_=document.createElement("ul"),n.collapsed_=i.collapsed!==void 0?i.collapsed:!0,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=i.collapsible!==void 0,n.collapsible_=i.collapsible!==void 0?i.collapsible:!0,n.collapsible_||(n.collapsed_=!1);var a=i.className!==void 0?i.className:"ol-attribution",o=i.tipLabel!==void 0?i.tipLabel:"Attributions",s=i.expandClassName!==void 0?i.expandClassName:a+"-expand",A=i.collapseLabel!==void 0?i.collapseLabel:"",l=i.collapseClassName!==void 0?i.collapseClassName:a+"-collapse";typeof A=="string"?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=A,n.collapseLabel_.className=l):n.collapseLabel_=A;var u=i.label!==void 0?i.label:"i";typeof u=="string"?(n.label_=document.createElement("span"),n.label_.textContent=u,n.label_.className=s):n.label_=u;var c=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=o,n.toggleButton_.appendChild(c),n.toggleButton_.addEventListener(me.CLICK,n.handleClick_.bind(n),!1);var h=a+" "+hA+" "+Ih+(n.collapsed_&&n.collapsible_?" "+B_:"")+(n.collapsible_?"":" ol-uncollapsible"),f=n.element;return f.className=h,f.appendChild(n.toggleButton_),f.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return e.prototype.collectSourceAttributions_=function(t){for(var n={},i=[],a=!0,o=t.layerStatesArray,s=0,A=o.length;s<A;++s){var l=o[s];if(C_(l,t.viewState)){var u=l.layer.getSource();if(u){var c=u.getAttributions();if(c){var h=c(t);if(h)if(a=a&&u.getAttributionsCollapsible()!==!1,Array.isArray(h))for(var f=0,p=h.length;f<p;++f)h[f]in n||(i.push(h[f]),n[h[f]]=!0);else h in n||(i.push(h),n[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(a),i},e.prototype.updateElement_=function(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var n=this.collectSourceAttributions_(t),i=n.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Cl(n,this.renderedAttributions_)){d6(this.ulElement_);for(var a=0,o=n.length;a<o;++a){var s=document.createElement("li");s.innerHTML=n[a],this.ulElement_.appendChild(s)}this.renderedAttributions_=n}},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(B_),this.collapsed_?xp(this.collapseLabel_,this.label_):xp(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(wr),D6=PW,UW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),DW=function(r){UW(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var a=i.className!==void 0?i.className:"ol-rotate",o=i.label!==void 0?i.label:"⇧",s=i.compassClassName!==void 0?i.compassClassName:"ol-compass";n.label_=null,typeof o=="string"?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=o):(n.label_=o,n.label_.classList.add(s));var A=i.tipLabel?i.tipLabel:"Reset rotation",l=document.createElement("button");l.className=a+"-reset",l.setAttribute("type","button"),l.title=A,l.appendChild(n.label_),l.addEventListener(me.CLICK,n.handleClick_.bind(n),!1);var u=a+" "+hA+" "+Ih,c=n.element;return c.className=u,c.appendChild(l),n.callResetNorth_=i.resetNorth?i.resetNorth:void 0,n.duration_=i.duration!==void 0?i.duration:250,n.autoHide_=i.autoHide!==void 0?i.autoHide:!0,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(Tm),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap(),n=t.getView();if(n){var i=n.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:rs}):n.setRotation(0))}},e.prototype.render=function(t){var n=t.frameState;if(n){var i=n.viewState.rotation;if(i!=this.rotation_){var a="rotate("+i+"rad)";if(this.autoHide_){var o=this.element.classList.contains(Tm);!o&&i===0?this.element.classList.add(Tm):o&&i!==0&&this.element.classList.remove(Tm)}this.label_.style.transform=a}this.rotation_=i}},e}(wr),Q6=DW,QW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),HW=function(r){QW(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this;var a=i.className!==void 0?i.className:"ol-zoom",o=i.delta!==void 0?i.delta:1,s=i.zoomInClassName!==void 0?i.zoomInClassName:a+"-in",A=i.zoomOutClassName!==void 0?i.zoomOutClassName:a+"-out",l=i.zoomInLabel!==void 0?i.zoomInLabel:"+",u=i.zoomOutLabel!==void 0?i.zoomOutLabel:"",c=i.zoomInTipLabel!==void 0?i.zoomInTipLabel:"Zoom in",h=i.zoomOutTipLabel!==void 0?i.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=c,f.appendChild(typeof l=="string"?document.createTextNode(l):l),f.addEventListener(me.CLICK,n.handleClick_.bind(n,o),!1);var p=document.createElement("button");p.className=A,p.setAttribute("type","button"),p.title=h,p.appendChild(typeof u=="string"?document.createTextNode(u):u),p.addEventListener(me.CLICK,n.handleClick_.bind(n,-o),!1);var v=a+" "+hA+" "+Ih,m=n.element;return m.className=v,m.appendChild(f),m.appendChild(p),n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleClick_=function(t,n){n.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var n=this.getMap(),i=n.getView();if(i){var a=i.getZoom();if(a!==void 0){var o=i.getConstrainedZoom(a+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:o,duration:this.duration_,easing:rs})):i.setZoom(o)}}},e}(wr),H6=HW,GW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),EM=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],CM={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},kW=function(r){GW(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this,n.on,n.once,n.un,n.keys_=i.keys!==void 0?i.keys:!1,n.source_=i.source,n.isInFullscreen_=!1,n.boundHandleMapTargetChange_=n.handleMapTargetChange_.bind(n),n.cssClassName_=i.className!==void 0?i.className:"ol-full-screen",n.documentListeners_=[],n.activeClassName_=i.activeClassName!==void 0?i.activeClassName.split(" "):[n.cssClassName_+"-true"],n.inactiveClassName_=i.inactiveClassName!==void 0?i.inactiveClassName.split(" "):[n.cssClassName_+"-false"];var a=i.label!==void 0?i.label:"⤢";n.labelNode_=typeof a=="string"?document.createTextNode(a):a;var o=i.labelActive!==void 0?i.labelActive:"×";n.labelActiveNode_=typeof o=="string"?document.createTextNode(o):o;var s=i.tipLabel?i.tipLabel:"Toggle full-screen";return n.button_=document.createElement("button"),n.button_.title=s,n.button_.setAttribute("type","button"),n.button_.appendChild(n.labelNode_),n.button_.addEventListener(me.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat(hA," ").concat(Ih),n.element.appendChild(n.button_),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){var t=this.getMap();if(t){var n=t.getOwnerDocument();if(BM(n))if(TM(n))jW(n);else{var i=void 0;this.source_?i=typeof this.source_=="string"?n.getElementById(this.source_):this.source_:i=t.getTargetElement(),this.keys_?$W(i):G6(i)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var n=this.isInFullscreen_;this.isInFullscreen_=TM(t.getOwnerDocument()),n!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(xp(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(CM.ENTERFULLSCREEN)):(xp(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(CM.LEAVEFULLSCREEN)),t.updateSize())}},e.prototype.setClassName_=function(t,n){var i,a,o,s;n?((i=t.classList).remove.apply(i,this.inactiveClassName_),(a=t.classList).add.apply(a,this.activeClassName_)):((o=t.classList).remove.apply(o,this.activeClassName_),(s=t.classList).add.apply(s,this.inactiveClassName_))},e.prototype.setMap=function(t){var n=this.getMap();n&&n.removeChangeListener(ti.TARGET,this.boundHandleMapTargetChange_),r.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(ti.TARGET,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,n=0,i=t.length;n<i;++n)Nr(t[n]);t.length=0;var a=this.getMap();if(a){var o=a.getOwnerDocument();BM(o)?this.element.classList.remove(aM):this.element.classList.add(aM);for(var n=0,i=EM.length;n<i;++n)t.push(Ue(o,EM[n],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(wr);function BM(r){var e=r.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&r.msFullscreenEnabled||e.requestFullscreen&&r.fullscreenEnabled)}function TM(r){return!!(r.webkitIsFullScreen||r.msFullscreenElement||r.fullscreenElement)}function G6(r){r.requestFullscreen?r.requestFullscreen():r.msRequestFullscreen?r.msRequestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}function $W(r){r.webkitRequestFullscreen?r.webkitRequestFullscreen():G6(r)}function jW(r){r.exitFullscreen?r.exitFullscreen():r.msExitFullscreen?r.msExitFullscreen():r.webkitExitFullscreen&&r.webkitExitFullscreen()}var VW=kW,KW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),CC="projection",xM="coordinateFormat",zW=function(r){KW(e,r);function e(t){var n=this,i=t||{},a=document.createElement("div");a.className=i.className!==void 0?i.className:"ol-mouse-position",n=r.call(this,{element:a,render:i.render,target:i.target})||this,n.on,n.once,n.un,n.addChangeListener(CC,n.handleProjectionChanged_),i.coordinateFormat&&n.setCoordinateFormat(i.coordinateFormat),i.projection&&n.setProjection(i.projection);var o=!0,s="&#160;";return"undefinedHTML"in i?(i.undefinedHTML!==void 0&&(s=i.undefinedHTML),o=!!s):"placeholder"in i&&(i.placeholder===!1?o=!1:s=String(i.placeholder)),n.placeholder_=s,n.renderOnMouseOut_=o,n.renderedHTML_=a.innerHTML,n.mapProjection_=null,n.transform_=null,n}return e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get(xM)},e.prototype.getProjection=function(){return this.get(CC)},e.prototype.handleMouseMove=function(t){var n=this.getMap();this.updateHTML_(n.getEventPixel(t))},e.prototype.handleMouseOut=function(t){this.updateHTML_(null)},e.prototype.setMap=function(t){if(r.prototype.setMap.call(this,t),t){var n=t.getViewport();this.listenerKeys.push(Ue(n,qs.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(Ue(n,qs.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},e.prototype.setCoordinateFormat=function(t){this.set(xM,t)},e.prototype.setProjection=function(t){this.set(CC,Re(t))},e.prototype.updateHTML_=function(t){var n=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var i=this.getProjection();i?this.transform_=vh(this.mapProjection_,i):this.transform_=ow}var a=this.getMap(),o=a.getCoordinateFromPixelInternal(t);if(o){var s=gh();s&&(this.transform_=vh(this.mapProjection_,s)),this.transform_(o,o);var A=this.getCoordinateFormat();A?n=A(o):n=o.toString()}}(!this.renderedHTML_||n!==this.renderedHTML_)&&(this.element.innerHTML=n,this.renderedHTML_=n)},e.prototype.render=function(t){var n=t.frameState;n?this.mapProjection_!=n.viewState.projection&&(this.mapProjection_=n.viewState.projection,this.transform_=null):this.mapProjection_=null},e}(wr),XW=zW,ro={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"},YW=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),da={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},WW=function(r){YW(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un,n.options=t,n.id=t.id,n.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,n.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,n.element=document.createElement("div"),n.element.className=t.className!==void 0?t.className:"ol-overlay-container "+zX,n.element.style.position="absolute",n.element.style.pointerEvents="auto";var i=t.autoPan;return i&&typeof i!="object"&&(i={animation:t.autoPanAnimation,margin:t.autoPanMargin}),n.autoPan=i||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(da.ELEMENT,n.handleElementChanged),n.addChangeListener(da.MAP,n.handleMapChanged),n.addChangeListener(da.OFFSET,n.handleOffsetChanged),n.addChangeListener(da.POSITION,n.handlePositionChanged),n.addChangeListener(da.POSITIONING,n.handlePositioningChanged),t.element!==void 0&&n.setElement(t.element),n.setOffset(t.offset!==void 0?t.offset:[0,0]),n.setPositioning(t.positioning!==void 0?t.positioning:ro.TOP_LEFT),t.position!==void 0&&n.setPosition(t.position),n}return e.prototype.getElement=function(){return this.get(da.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(da.MAP)||null},e.prototype.getOffset=function(){return this.get(da.OFFSET)},e.prototype.getPosition=function(){return this.get(da.POSITION)},e.prototype.getPositioning=function(){return this.get(da.POSITIONING)},e.prototype.handleElementChanged=function(){d6(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(T_(this.element),Nr(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Ue(t,Xs.POSTRENDER,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(da.ELEMENT,t)},e.prototype.setMap=function(t){this.set(da.MAP,t)},e.prototype.setOffset=function(t){this.set(da.OFFSET,t)},e.prototype.setPosition=function(t){this.set(da.POSITION,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var n=this.getMap();if(!(!n||!n.getTargetElement()||!this.get(da.POSITION))){var i=this.getRect(n.getTargetElement(),n.getSize()),a=this.getElement(),o=this.getRect(a,[YX(a),WX(a)]),s=t||{},A=s.margin===void 0?20:s.margin;if(!Oo(i,o)){var l=o[0]-i[0],u=i[2]-o[2],c=o[1]-i[1],h=i[3]-o[3],f=[0,0];if(l<0?f[0]=l-A:u<0&&(f[0]=Math.abs(u)+A),c<0?f[1]=c-A:h<0&&(f[1]=Math.abs(h)+A),f[0]!==0||f[1]!==0){var p=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(p);if(!v)return;var m=[v[0]+f[0],v[1]+f[1]],g=s.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(m),duration:g.duration,easing:g.easing})}}}},e.prototype.getRect=function(t,n){var i=t.getBoundingClientRect(),a=i.left+window.pageXOffset,o=i.top+window.pageYOffset;return[a,o,a+n[0],o+n[1]]},e.prototype.setPositioning=function(t){this.set(da.POSITIONING,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),n=this.getPosition();if(!t||!t.isRendered()||!n){this.setVisible(!1);return}var i=t.getPixelFromCoordinate(n),a=t.getSize();this.updateRenderedPosition(i,a)},e.prototype.updateRenderedPosition=function(t,n){var i=this.element.style,a=this.getOffset(),o=this.getPositioning();this.setVisible(!0);var s=Math.round(t[0]+a[0])+"px",A=Math.round(t[1]+a[1])+"px",l="0%",u="0%";o==ro.BOTTOM_RIGHT||o==ro.CENTER_RIGHT||o==ro.TOP_RIGHT?l="-100%":(o==ro.BOTTOM_CENTER||o==ro.CENTER_CENTER||o==ro.TOP_CENTER)&&(l="-50%"),o==ro.BOTTOM_LEFT||o==ro.BOTTOM_CENTER||o==ro.BOTTOM_RIGHT?u="-100%":(o==ro.CENTER_LEFT||o==ro.CENTER_CENTER||o==ro.CENTER_RIGHT)&&(u="-50%");var c="translate(".concat(l,", ").concat(u,") translate(").concat(s,", ").concat(A,")");this.rendered.transform_!=c&&(this.rendered.transform_=c,i.transform=c,i.msTransform=c)},e.prototype.getOptions=function(){return this.options},e}(ui),k6=WW,$6=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),BC=.75,Fm=.1,qW=function(r){$6(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createRenderer=function(){return new y6(this)},e}(U6),ZW=function(r){$6(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.boundHandleRotationChanged_=n.handleRotationChanged_.bind(n),n.collapsed_=i.collapsed!==void 0?i.collapsed:!0,n.collapsible_=i.collapsible!==void 0?i.collapsible:!0,n.collapsible_||(n.collapsed_=!1),n.rotateWithView_=i.rotateWithView!==void 0?i.rotateWithView:!1,n.viewExtent_=void 0;var a=i.className!==void 0?i.className:"ol-overviewmap",o=i.tipLabel!==void 0?i.tipLabel:"Overview map",s=i.collapseLabel!==void 0?i.collapseLabel:"";typeof s=="string"?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=s):n.collapseLabel_=s;var A=i.label!==void 0?i.label:"";typeof A=="string"?(n.label_=document.createElement("span"),n.label_.textContent=A):n.label_=A;var l=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_,u=document.createElement("button");u.setAttribute("type","button"),u.title=o,u.appendChild(l),u.addEventListener(me.CLICK,n.handleClick_.bind(n),!1),n.ovmapDiv_=document.createElement("div"),n.ovmapDiv_.className="ol-overviewmap-map",n.view_=i.view,n.ovmap_=new qW({view:i.view});var c=n.ovmap_;i.layers&&i.layers.forEach(function(L){c.addLayer(L)});var h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",n.boxOverlay_=new k6({position:[0,0],positioning:ro.CENTER_CENTER,element:h}),n.ovmap_.addOverlay(n.boxOverlay_);var f=a+" "+hA+" "+Ih+(n.collapsed_&&n.collapsible_?" "+B_:"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;p.className=f,p.appendChild(n.ovmapDiv_),p.appendChild(u);var v=n,m=n.boxOverlay_,g=n.boxOverlay_.getElement(),_=function(L){return{clientX:L.clientX,clientY:L.clientY}},E=function(L){var O=_(L),b=c.getEventCoordinateInternal(O);m.setPosition(b)},B=function(L){var O=c.getEventCoordinateInternal(L);v.getMap().getView().setCenterInternal(O),window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",B)};return g.addEventListener("mousedown",function(){window.addEventListener("mousemove",E),window.addEventListener("mouseup",B)}),n}return e.prototype.setMap=function(t){var n=this.getMap();if(t!==n){if(n){var i=n.getView();i&&this.unbindView_(i),this.ovmap_.setTarget(null)}if(r.prototype.setMap.call(this,t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(Ue(t,ph.PROPERTYCHANGE,this.handleMapPropertyChange_,this));var a=t.getView();a&&(this.bindView_(a),a.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===ti.VIEW){var n=t.oldValue;n&&this.unbindView_(n);var i=this.getMap().getView();this.bindView_(i)}else!this.ovmap_.isRendered()&&(t.key===ti.TARGET||t.key===ti.SIZE)&&this.ovmap_.updateSize()},e.prototype.bindView_=function(t){if(!this.view_){var n=new Js({projection:t.getProjection()});this.ovmap_.setView(n)}t.addChangeListener(bo.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeChangeListener(bo.ROTATION,this.boundHandleRotationChanged_)},e.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),n=this.ovmap_;if(!(!t.isRendered()||!n.isRendered())){var i=t.getSize(),a=t.getView(),o=a.calculateExtentInternal(i);if(!(this.viewExtent_&&cA(o,this.viewExtent_))){this.viewExtent_=o;var s=n.getSize(),A=n.getView(),l=A.calculateExtentInternal(s),u=n.getPixelFromCoordinateInternal(Ns(o)),c=n.getPixelFromCoordinateInternal(Vp(o)),h=Math.abs(u[0]-c[0]),f=Math.abs(u[1]-c[1]),p=s[0],v=s[1];h<p*Fm||f<v*Fm||h>p*BC||f>v*BC?this.resetExtent_():Oo(l,o)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),n=this.ovmap_,i=t.getSize(),a=t.getView(),o=a.calculateExtentInternal(i),s=n.getView(),A=Math.log(BC/Fm)/Math.LN2,l=1/(Math.pow(2,A/2)*Fm);JQ(o,l),s.fitInternal(Vu(o))},e.prototype.recenter_=function(){var t=this.getMap(),n=this.ovmap_,i=t.getView(),a=n.getView();a.setCenterInternal(i.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),n=this.ovmap_;if(!(!t.isRendered()||!n.isRendered())){var i=t.getSize(),a=t.getView(),o=n.getView(),s=this.rotateWithView_?0:-a.getRotation(),A=this.boxOverlay_,l=this.boxOverlay_.getElement(),u=a.getCenterInternal(),c=a.getResolution(),h=o.getResolution(),f=i[0]*c/h,p=i[1]*c/h;if(A.setPosition(u),l){l.style.width=f+"px",l.style.height=p+"px";var v="rotate("+s+"rad)";l.style.transform=v}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=cg(this.ovmap_,Xs.POSTRENDER,function(t){delete this.ovmapPostrenderKey_,this.updateBox_()},this))},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(B_),this.collapsed_?xp(this.collapseLabel_,this.label_):xp(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=this.ovmap_;if(!this.collapsed_){if(t.isRendered()){this.viewExtent_=void 0,t.render();return}t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){!this.collapsible_||this.collapsed_===t||this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){return this.ovmap_},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(wr),JW=ZW,tq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),TC="units",wc={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},eq=[1,2,5],xC=25.4/.28,rq=function(r){tq(e,r);function e(t){var n=this,i=t||{},a=i.className!==void 0?i.className:i.bar?"ol-scale-bar":"ol-scale-line";return n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.on,n.once,n.un,n.innerElement_=document.createElement("div"),n.innerElement_.className=a+"-inner",n.element.className=a+" "+hA,n.element.appendChild(n.innerElement_),n.viewState_=null,n.minWidth_=i.minWidth!==void 0?i.minWidth:64,n.renderedVisible_=!1,n.renderedWidth_=void 0,n.renderedHTML_="",n.addChangeListener(TC,n.handleUnitsChanged_),n.setUnits(i.units||wc.METRIC),n.scaleBar_=i.bar||!1,n.scaleBarSteps_=i.steps||4,n.scaleBarText_=i.text||!1,n.dpi_=i.dpi||void 0,n}return e.prototype.getUnits=function(){return this.get(TC)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(TC,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var n=t.center,i=t.projection,a=this.getUnits(),o=a==wc.DEGREES?Ga.DEGREES:Ga.METERS,s=L_(i,t.resolution,n,o),A=this.minWidth_*(this.dpi_||xC)/xC,l=A*s,u="";if(a==wc.DEGREES){var c=Is[Ga.DEGREES];l*=c,l<c/60?(u="″",s*=3600):l<c?(u="",s*=60):u="°"}else a==wc.IMPERIAL?l<.9144?(u="in",s/=.0254):l<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):a==wc.NAUTICAL?(s/=1852,u="nm"):a==wc.METRIC?l<.001?(u="μm",s*=1e6):l<1?(u="mm",s*=1e3):l<1e3?u="m":(u="km",s/=1e3):a==wc.US?l<.9144?(u="in",s*=39.37):l<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):we(!1,33);for(var h=3*Math.floor(Math.log(A*s)/Math.log(10)),f,p,v;;){v=Math.floor(h/3);var m=Math.pow(10,v);if(f=eq[(h%3+3)%3]*m,p=Math.round(f/s),isNaN(p)){this.element.style.display="none",this.renderedVisible_=!1;return}else if(p>=A)break;++h}var g;this.scaleBar_?g=this.createScaleBar(p,f,u):g=f.toFixed(v<0?-v:0)+" "+u,this.renderedHTML_!=g&&(this.innerElement_.innerHTML=g,this.renderedHTML_=g),this.renderedWidth_!=p&&(this.innerElement_.style.width=p+"px",this.renderedWidth_=p),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)},e.prototype.createScaleBar=function(t,n,i){for(var a="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),o=[],s=t/this.scaleBarSteps_,A="#ffffff",l=0;l<this.scaleBarSteps_;l++)l===0&&o.push(this.createMarker("absolute",l)),o.push('<div><div class="ol-scale-singlebar" style="width: '+s+"px;background-color: "+A+';"></div>'+this.createMarker("relative",l)+(l%2===0||this.scaleBarSteps_===2?this.createStepText(l,t,!1,n,i):"")+"</div>"),l===this.scaleBarSteps_-1&&o.push(this.createStepText(l+1,t,!0,n,i)),A==="#ffffff"?A="#000000":A="#ffffff";var u;this.scaleBarText_?u='<div class="ol-scale-text" style="width: '+t+'px;">'+a+"</div>":u="";var c='<div style="display: flex;">'+u+o.join("")+"</div>";return c},e.prototype.createMarker=function(t,n){var i=t==="absolute"?3:-10;return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+i+'px;"></div>'},e.prototype.createStepText=function(t,n,i,a,o){var s=t===0?0:Math.round(a/this.scaleBarSteps_*t*100)/100,A=s+(t===0?"":" "+o),l=t===0?-3:n/this.scaleBarSteps_*-1,u=t===0?0:n/this.scaleBarSteps_*2;return'<div class="ol-scale-step-text" style="margin-left: '+l+"px;text-align: "+(t===0?"left":"center")+"; min-width: "+u+"px;left: "+(i?n+"px":"unset")+';">'+A+"</div>"},e.prototype.getScaleForResolution=function(){var t=L_(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,Ga.METERS),n=this.dpi_||xC,i=1e3/25.4;return parseFloat(t.toString())*i*n},e.prototype.render=function(t){var n=t.frameState;n?this.viewState_=n.viewState:this.viewState_=null,this.updateElement_()},e}(wr),nq=rq,iq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Vd={VERTICAL:0,HORIZONTAL:1},aq=function(r){iq(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render})||this,n.dragListenerKeys_=[],n.currentResolution_=void 0,n.direction_=Vd.VERTICAL,n.dragging_,n.heightLimit_=0,n.widthLimit_=0,n.startX_,n.startY_,n.thumbSize_=null,n.sliderInitialized_=!1,n.duration_=i.duration!==void 0?i.duration:200;var a=i.className!==void 0?i.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=a+"-thumb "+hA;var s=n.element;return s.className=a+" "+hA+" "+Ih,s.appendChild(o),s.addEventListener(qs.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),s.addEventListener(qs.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),s.addEventListener(qs.POINTERUP,n.handleDraggerEnd_.bind(n),!1),s.addEventListener(me.CLICK,n.handleContainerClick_.bind(n),!1),o.addEventListener(me.CLICK,IX,!1),n}return e.prototype.setMap=function(t){r.prototype.setMap.call(this,t),t&&t.render()},e.prototype.initSlider_=function(){var t=this.element,n=t.offsetWidth,i=t.offsetHeight;if(n===0&&i===0)return this.sliderInitialized_=!1;var a=getComputedStyle(t);n-=parseFloat(a.paddingRight)+parseFloat(a.paddingLeft),i-=parseFloat(a.paddingTop)+parseFloat(a.paddingBottom);var o=t.firstElementChild,s=getComputedStyle(o),A=o.offsetWidth+parseFloat(s.marginRight)+parseFloat(s.marginLeft),l=o.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom);return this.thumbSize_=[A,l],n>i?(this.direction_=Vd.HORIZONTAL,this.widthLimit_=n-A):(this.direction_=Vd.VERTICAL,this.heightLimit_=i-l),this.sliderInitialized_=!0},e.prototype.handleContainerClick_=function(t){var n=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),a=this.getResolutionForPosition_(i),o=n.getConstrainedZoom(n.getZoomForResolution(a));n.animateInternal({zoom:o,duration:this.duration_,easing:rs})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(n.style.left),this.startY_=t.clientY-parseFloat(n.style.top),this.dragging_=!0,this.dragListenerKeys_.length===0){var i=this.handleDraggerDrag_,a=this.handleDraggerEnd_,o=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(Ue(o,qs.POINTERMOVE,i,this),Ue(o,qs.POINTERUP,a,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var n=t.clientX-this.startX_,i=t.clientY-this.startY_,a=this.getRelativePosition_(n,i);this.currentResolution_=this.getResolutionForPosition_(a),this.getMap().getView().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){if(this.dragging_){var n=this.getMap().getView();n.endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(Nr),this.dragListenerKeys_.length=0}},e.prototype.setThumbPosition_=function(t){var n=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==Vd.HORIZONTAL?i.style.left=this.widthLimit_*n+"px":i.style.top=this.heightLimit_*n+"px"},e.prototype.getRelativePosition_=function(t,n){var i;return this.direction_===Vd.HORIZONTAL?i=t/this.widthLimit_:i=n/this.heightLimit_,bn(i,0,1)},e.prototype.getResolutionForPosition_=function(t){var n=this.getMap().getView().getResolutionForValueFunction();return n(1-t)},e.prototype.getPositionForResolution_=function(t){var n=this.getMap().getView().getValueForResolutionFunction();return bn(1-n(t),0,1)},e.prototype.render=function(t){if(t.frameState&&!(!this.sliderInitialized_&&!this.initSlider_())){var n=t.frameState.viewState.resolution;this.currentResolution_=n,this.setThumbPosition_(n)}},e}(wr),oq=aq,sq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Aq=function(r){sq(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this,n.extent=i.extent?i.extent:null;var a=i.className!==void 0?i.className:"ol-zoom-extent",o=i.label!==void 0?i.label:"E",s=i.tipLabel!==void 0?i.tipLabel:"Fit to extent",A=document.createElement("button");A.setAttribute("type","button"),A.title=s,A.appendChild(typeof o=="string"?document.createTextNode(o):o),A.addEventListener(me.CLICK,n.handleClick_.bind(n),!1);var l=a+" "+hA+" "+Ih,u=n.element;return u.className=l,u.appendChild(A),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap(),n=t.getView(),i=this.extent?this.extent:n.getProjection().getExtent();n.fitInternal(Vu(i))},e}(wr),lq=Aq;function uq(r){var e=r||{},t=new Ai,n=e.zoom!==void 0?e.zoom:!0;n&&t.push(new H6(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new Q6(e.rotateOptions));var a=e.attribution!==void 0?e.attribution:!0;return a&&t.push(new D6(e.attributionOptions)),t}var rx={ACTIVE:"active"},cq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),hq=function(r){cq(e,r);function e(t){var n=r.call(this)||this;return n.on,n.once,n.un,t&&t.handleEvent&&(n.handleEvent=t.handleEvent),n.map_=null,n.setActive(!0),n}return e.prototype.getActive=function(){return this.get(rx.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(rx.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(ui);function fq(r,e,t){var n=r.getCenterInternal();if(n){var i=[n[0]+e[0],n[1]+e[1]];r.animateInternal({duration:t!==void 0?t:250,easing:nI,center:r.getConstrainedCenter(i)})}}function fI(r,e,t,n){var i=r.getZoom();if(i!==void 0){var a=r.getConstrainedZoom(i+e),o=r.getResolutionForZoom(a);r.getAnimating()&&r.cancelAnimations(),r.animate({resolution:o,anchor:t,duration:n!==void 0?n:250,easing:rs})}}var Xp=hq,pq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dq=function(r){pq(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==or.DBLCLICK){var i=t.originalEvent,a=t.map,o=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_,A=a.getView();fI(A,s,o,this.duration_),i.preventDefault(),n=!0}return!n},e}(Xp),vq=dq,gq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),yq=function(r){gq(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==or.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==or.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==or.POINTERDOWN){var a=this.handleDownEvent(t);this.handlingDownUpSequence=a,n=this.stopDown(a)}else t.type==or.POINTERMOVE&&this.handleMoveEvent(t);return!n},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(mq(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==or.POINTERUP?delete this.trackedPointers_[i]:t.type==or.POINTERDOWN?this.trackedPointers_[i]=n:i in this.trackedPointers_&&(this.trackedPointers_[i]=n),this.targetPointers=VF(this.trackedPointers_)}},e}(Xp);function pI(r){for(var e=r.length,t=0,n=0,i=0;i<e;i++)t+=r[i].clientX,n+=r[i].clientY;return[t/e,n/e]}function mq(r){var e=r.type;return e===or.POINTERDOWN||e===or.POINTERDRAG||e===or.POINTERUP}var Do=yq;function M_(r){var e=arguments;return function(t){for(var n=!0,i=0,a=e.length;i<a&&(n=n&&e[i](t),!!n);++i);return n}}var j6=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},V6=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},K6=function(r){var e=r.map.getTargetElement(),t=r.map.getOwnerDocument().activeElement;return e.contains(t)},dI=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?K6(r):!0},hw=sA,_q=function(r){return r.type==or.CLICK},vI=function(r){var e=r.originalEvent;return e.button==0&&!(aX&&KQ&&e.ctrlKey)},nx=xh,wq=function(r){return r.type=="pointermove"},fw=function(r){return r.type==or.SINGLECLICK},Eq=function(r){return r.type==or.DBLCLICK},pw=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Cq=function(r){var e=r.originalEvent;return!e.altKey&&(KQ?e.metaKey:e.ctrlKey)&&!e.shiftKey},ny=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},gI=function(r){var e=r.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"},eh=function(r){var e=r.originalEvent;return we(e!==void 0,56),e.pointerType=="mouse"},Bq=function(r){var e=r.originalEvent;return we(e!==void 0,56),e.pointerType==="touch"},Tq=function(r){var e=r.originalEvent;return we(e!==void 0,56),e.pointerType==="pen"},yI=function(r){var e=r.originalEvent;return we(e!==void 0,56),e.isPrimary&&e.button===0},xq=Object.freeze(Object.defineProperty({__proto__:null,all:M_,altKeyOnly:j6,altShiftKeysOnly:V6,focus:K6,focusWithTabindex:dI,always:hw,click:_q,mouseActionButton:vI,never:nx,pointerMove:wq,singleClick:fw,doubleClick:Eq,noModifierKeys:pw,platformModifierKeyOnly:Cq,shiftKeyOnly:ny,targetNotEditable:gI,mouseOnly:eh,touchOnly:Bq,penOnly:Tq,primaryAction:yI},Symbol.toStringTag,{value:"Module"})),Sq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),bq=function(r){Sq(e,r);function e(t){var n=r.call(this,{stopDown:xh})||this,i=t||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var a=i.condition?i.condition:M_(pw,yI);return n.condition_=i.onFocusOnly?M_(dI,a):a,n.noKinetic_=!1,n}return e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,i=pI(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var a=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],o=t.map,s=o.getView();c6(a,s.getResolution()),XF(a,s.getRotation()),s.adjustCenterInternal(a)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var n=t.map,i=n.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var a=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=i.getCenterInternal(),A=n.getPixelFromCoordinateInternal(s),l=n.getCoordinateFromPixelInternal([A[0]-a*Math.cos(o),A[1]-a*Math.sin(o)]);i.animateInternal({center:i.getConstrainedCenter(l),duration:500,easing:rs})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var n=t.map,i=n.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1},e}(Do),Fq=bq,Iq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Lq=function(r){Iq(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,{stopDown:xh})||this,n.condition_=i.condition?i.condition:V6,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){if(eh(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==eI){var a=n.getSize(),o=t.pixel,s=Math.atan2(a[1]/2-o[1],o[0]-a[0]/2);if(this.lastAngle_!==void 0){var A=s-this.lastAngle_;i.adjustRotationInternal(-A)}this.lastAngle_=s}}},e.prototype.handleUpEvent=function(t){if(!eh(t))return!0;var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!eh(t))return!1;if(vI(t)&&this.condition_(t)){var n=t.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(Do),Oq=Lq,Rq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Mq=function(r){Rq(e,r);function e(t){var n=r.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+t,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,n=this.endPixel_,i="px",a=this.element_.style;a.left=Math.min(t[0],n[0])+i,a.top=Math.min(t[1],n[1])+i,a.width=Math.abs(n[0]-t[0])+i,a.height=Math.abs(n[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var n=this.element_.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,n){this.startPixel_=t,this.endPixel_=n,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,n=this.endPixel_,i=[t,[t[0],n[1]],n,[n[0],t[1]]],a=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);a[4]=a[0].slice(),this.geometry_?this.geometry_.setCoordinates([a]):this.geometry_=new Fn([a])},e.prototype.getGeometry=function(){return this.geometry_},e}(tw),Nq=Mq,z6=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Im={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},SC=function(r){z6(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.coordinate=n,a.mapBrowserEvent=i,a}return e}(vo),Pq=function(r){z6(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.box_=new Nq(i.className||"ol-dragbox"),n.minArea_=i.minArea!==void 0?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:vI,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return e.prototype.defaultBoxEndCondition=function(t,n,i){var a=i[0]-n[0],o=i[1]-n[1];return a*a+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new SC(Im.BOXDRAG,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var n=this.boxEndCondition_(t,this.startPixel_,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new SC(n?Im.BOXEND:Im.BOXCANCEL,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new SC(Im.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(Do),Uq=Pq,Dq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Qq=function(r){Dq(e,r);function e(t){var n=this,i=t||{},a=i.condition?i.condition:ny;return n=r.call(this,{condition:a,className:i.className||"ol-dragzoom",minArea:i.minArea})||this,n.duration_=i.duration!==void 0?i.duration:200,n.out_=i.out!==void 0?i.out:!1,n}return e.prototype.onBoxEnd=function(t){var n=this.getMap(),i=n.getView(),a=this.getGeometry();if(this.out_){var o=i.rotatedExtentForGeometry(a),s=i.getResolutionForExtentInternal(o),A=i.getResolution()/s;a=a.clone(),a.scale(A*A)}i.fitInternal(a,{duration:this.duration_,easing:rs})},e}(Uq),Hq=Qq,Ec={LEFT:37,UP:38,RIGHT:39,DOWN:40},Gq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),kq=function(r){Gq(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.defaultCondition_=function(a){return pw(a)&&gI(a)},n.condition_=i.condition!==void 0?i.condition:n.defaultCondition_,n.duration_=i.duration!==void 0?i.duration:100,n.pixelDelta_=i.pixelDelta!==void 0?i.pixelDelta:128,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==me.KEYDOWN){var i=t.originalEvent,a=i.keyCode;if(this.condition_(t)&&(a==Ec.DOWN||a==Ec.LEFT||a==Ec.RIGHT||a==Ec.UP)){var o=t.map,s=o.getView(),A=s.getResolution()*this.pixelDelta_,l=0,u=0;a==Ec.DOWN?u=-A:a==Ec.LEFT?l=-A:a==Ec.RIGHT?l=A:u=A;var c=[l,u];XF(c,s.getRotation()),fq(s,c,this.duration_),i.preventDefault(),n=!0}}return!n},e}(Xp),$q=kq,jq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Vq=function(r){jq(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.condition_=i.condition?i.condition:gI,n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:100,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==me.KEYDOWN||t.type==me.KEYPRESS){var i=t.originalEvent,a=i.charCode;if(this.condition_(t)&&(a=="+".charCodeAt(0)||a=="-".charCodeAt(0))){var o=t.map,s=a=="+".charCodeAt(0)?this.delta_:-this.delta_,A=o.getView();fI(A,s,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},e}(Xp),Kq=Vq,zq=function(){function r(e,t,n){this.decay_=e,this.minVelocity_=t,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return r.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},r.prototype.update=function(e,t){this.points_.push(e,t,Date.now())},r.prototype.end=function(){if(this.points_.length<6)return!1;var e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;for(var n=t-3;n>0&&this.points_[n+2]>e;)n-=3;var i=this.points_[t+2]-this.points_[n+2];if(i<1e3/60)return!1;var a=this.points_[t]-this.points_[n],o=this.points_[t+1]-this.points_[n+1];return this.angle_=Math.atan2(o,a),this.initialVelocity_=Math.sqrt(a*a+o*o)/i,this.initialVelocity_>this.minVelocity_},r.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},r.prototype.getAngle=function(){return this.angle_},r}(),Xq=zq,Yq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),bC={TRACKPAD:"trackpad",WHEEL:"wheel"},Wq=function(r){Yq(e,r);function e(t){var n=this,i=t||{};n=r.call(this,i)||this,n.totalDelta_=0,n.lastDelta_=0,n.maxDelta_=i.maxDelta!==void 0?i.maxDelta:1,n.duration_=i.duration!==void 0?i.duration:250,n.timeout_=i.timeout!==void 0?i.timeout:80,n.useAnchor_=i.useAnchor!==void 0?i.useAnchor:!0,n.constrainResolution_=i.constrainResolution!==void 0?i.constrainResolution:!1;var a=i.condition?i.condition:hw;return n.condition_=i.onFocusOnly?M_(dI,a):a,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap().getView();t.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var n=t.type;if(n!==me.WHEEL)return!0;var i=t.map,a=t.originalEvent;a.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);var o;if(t.type==me.WHEEL&&(o=a.deltaY,rX&&a.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=fh),a.deltaMode===WheelEvent.DOM_DELTA_LINE&&(o*=40)),o===0)return!1;this.lastDelta_=o;var s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?bC.TRACKPAD:bC.WHEEL);var A=i.getView();if(this.mode_===bC.TRACKPAD&&!(A.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(A.getAnimating()&&A.cancelAnimations(),A.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),A.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=o;var l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),l),!1},e.prototype.handleWheelZoom_=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var i=-bn(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),fI(n,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Xp),qq=Wq,Zq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Jq=function(r){Zq(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=xh),n=r.call(this,a)||this,n.anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=i.threshold!==void 0?i.threshold:.3,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){var n=0,i=this.targetPointers[0],a=this.targetPointers[1],o=Math.atan2(a.clientY-i.clientY,a.clientX-i.clientX);if(this.lastAngle_!==void 0){var s=o-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),n=s}this.lastAngle_=o;var A=t.map,l=A.getView();if(l.getConstraints().rotation!==eI){var u=A.getViewport().getBoundingClientRect(),c=pI(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.anchor_=A.getCoordinateFromPixelInternal(c),this.rotating_&&(A.render(),l.adjustRotationInternal(n,this.anchor_))}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(Do),t3=Jq,e3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),r3=function(r){e3(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=xh),n=r.call(this,a)||this,n.anchor_=null,n.duration_=i.duration!==void 0?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return e.prototype.handleDragEvent=function(t){var n=1,i=this.targetPointers[0],a=this.targetPointers[1],o=i.clientX-a.clientX,s=i.clientY-a.clientY,A=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(n=this.lastDistance_/A),this.lastDistance_=A;var l=t.map,u=l.getView();n!=1&&(this.lastScaleDelta_=n);var c=l.getViewport().getBoundingClientRect(),h=pI(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),l.render(),u.adjustResolutionInternal(n,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView(),a=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,a),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(Do),n3=r3,Ts={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"},i3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),a3=function(r){i3(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.condition_=i.condition?i.condition:ny,n.lastAngle_=void 0,n.lastMagnitude_=void 0,n.lastScaleDelta_=0,n.duration_=i.duration!==void 0?i.duration:400,n}return e.prototype.handleDragEvent=function(t){if(eh(t)){var n=t.map,i=n.getSize(),a=t.pixel,o=a[0]-i[0]/2,s=i[1]/2-a[1],A=Math.atan2(s,o),l=Math.sqrt(o*o+s*s),u=n.getView();if(this.lastAngle_!==void 0){var c=this.lastAngle_-A;u.adjustRotationInternal(c)}this.lastAngle_=A,this.lastMagnitude_!==void 0&&u.adjustResolutionInternal(this.lastMagnitude_/l),this.lastMagnitude_!==void 0&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},e.prototype.handleUpEvent=function(t){if(!eh(t))return!0;var n=t.map,i=n.getView(),a=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,a),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return eh(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0):!1},e}(Do),o3=a3,s3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),X6=function(r){s3(e,r);function e(t,n,i){var a=r.call(this)||this;if(i!==void 0&&n===void 0)a.setFlatCoordinates(i,t);else{var o=n||0;a.setCenterAndRadius(t,o,i)}return a}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){var o=this.flatCoordinates,s=t-o[0],A=n-o[1],l=s*s+A*A;if(l<a){if(l===0)for(var u=0;u<this.stride;++u)i[u]=o[u];else{var c=this.getRadius()/Math.sqrt(l);i[0]=o[0]+c*s,i[1]=o[1]+c*A;for(var u=2;u<this.stride;++u)i[u]=o[u]}return i.length=this.stride,l}else return a},e.prototype.containsXY=function(t,n){var i=this.flatCoordinates,a=t-i[0],o=n-i[1];return a*a+o*o<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var n=this.flatCoordinates,i=n[this.stride]-n[0];return ho(n[0]-i,n[1]-i,n[0]+i,n[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],n=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+n*n},e.prototype.getType=function(){return st.CIRCLE},e.prototype.intersectsExtent=function(t){var n=this.getExtent();if(Nn(t,n)){var i=this.getCenter();return t[0]<=i[0]&&t[2]>=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:aw(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var n=this.stride,i=this.flatCoordinates[n]-this.flatCoordinates[0],a=t.slice();a[n]=a[0]+i;for(var o=1;o<n;++o)a[n+o]=t[o];this.setFlatCoordinates(this.layout,a),this.changed()},e.prototype.setCenterAndRadius=function(t,n,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var a=this.flatCoordinates,o=T6(a,0,t,this.stride);a[o++]=a[0]+n;for(var s=1,A=this.stride;s<A;++s)a[o++]=a[s];a.length=o,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,n){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,n){var i=this.getCenter(),a=this.getStride();this.setCenter(iI(i,0,i.length,a,t,n,i)),this.changed()},e.prototype.translate=function(t,n){var i=this.getCenter(),a=this.getStride();this.setCenter(B6(i,0,i.length,a,t,n,i)),this.changed()},e}(Ls);X6.prototype.transform;var mI=X6,A3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),l3=function(r){A3(e,r);function e(t){var n=r.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){var i=t;n.setGeometry(i)}else{var a=t;n.setProperties(a)}return n}return e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(Nr(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=Ue(t,me.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?u3(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(ui);function u3(r){if(typeof r=="function")return r;var e;if(Array.isArray(r))e=r;else{we(typeof r.getZIndex=="function",41);var t=r;e=[t]}return function(){return e}}var sr=l3;function N_(r,e,t,n,i,a,o){var s,A,l=(t-e)/n;if(l===1)s=e;else if(l===2)s=e,A=i;else if(l!==0){for(var u=r[e],c=r[e+1],h=0,f=[0],p=e+n;p<t;p+=n){var v=r[p],m=r[p+1];h+=Math.sqrt((v-u)*(v-u)+(m-c)*(m-c)),f.push(h),u=v,c=m}var g=i*h,_=qz(f,g);_<0?(A=(g-f[-_-2])/(f[-_-1]-f[-_-2]),s=e+(-_-2)*n):s=e+_*n}for(var E=o>1?o:2,B=a||new Array(E),p=0;p<E;++p)B[p]=s===void 0?NaN:A===void 0?r[s+p]:qA(r[s+p],r[s+n+p],A);return B}function ix(r,e,t,n,i,a){if(t==e)return null;var o;if(i<r[e+n-1])return a?(o=r.slice(e,e+n),o[n-1]=i,o):null;if(r[t-1]<i)return a?(o=r.slice(t-n,t),o[n-1]=i,o):null;if(i==r[e+n-1])return r.slice(e,e+n);for(var s=e/n,A=t/n;s<A;){var l=s+A>>1;i<r[(l+1)*n-1]?A=l:s=l+1}var u=r[s*n-1];if(i==u)return r.slice((s-1)*n,(s-1)*n+n);var c=r[(s+1)*n-1],h=(i-u)/(c-u);o=[];for(var f=0;f<n-1;++f)o.push(qA(r[(s-1)*n+f],r[s*n+f],h));return o.push(i),o}function c3(r,e,t,n,i,a,o){if(o)return ix(r,e,t[t.length-1],n,i,a);var s;if(i<r[n-1])return a?(s=r.slice(0,n),s[n-1]=i,s):null;if(r[r.length-1]<i)return a?(s=r.slice(r.length-n),s[n-1]=i,s):null;for(var A=0,l=t.length;A<l;++A){var u=t[A];if(e!=u){if(i<r[e+n-1])return null;if(i<=r[u-1])return ix(r,e,u,n,i,!1);e=u}}return null}function Y6(r,e,t,n){for(var i=r[e],a=r[e+1],o=0,s=e+n;s<t;s+=n){var A=r[s],l=r[s+1];o+=Math.sqrt((A-i)*(A-i)+(l-a)*(l-a)),i=A,a=l}return o}var h3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),f3=function(r){h3(e,r);function e(t,n){var i=r.call(this)||this;return i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(t[0])?i.setFlatCoordinates(n,t):i.setCoordinates(t,n),i}return e.prototype.appendCoordinate=function(t){this.flatCoordinates?Gr(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){return a<tc(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(aI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.forEachSegment=function(t){return I6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,n){if(this.layout!=qt.XYM&&this.layout!=qt.XYZM)return null;var i=n!==void 0?n:!1;return ix(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return tl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,n){return N_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},e.prototype.getLength=function(){return Y6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=uI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,qt.XY)},e.prototype.getType=function(){return st.LINE_STRING},e.prototype.intersectsExtent=function(t){return lw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ry(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Ls),kr=f3,p3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),d3=function(r){p3(e,r);function e(t,n,i){var a=r.call(this)||this;if(a.ends_=[],a.maxDelta_=-1,a.maxDeltaRevision_=-1,Array.isArray(t[0]))a.setCoordinates(t,n);else if(n!==void 0&&i)a.setFlatCoordinates(n,t),a.ends_=i;else{for(var o=a.getLayout(),s=t,A=[],l=[],u=0,c=s.length;u<c;++u){var h=s[u];u===0&&(o=h.getLayout()),Gr(A,h.getFlatCoordinates()),l.push(A.length)}a.setFlatCoordinates(o,A),a.ends_=l}return a}return e.prototype.appendLineString=function(t){this.flatCoordinates?Gr(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){return a<tc(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oI(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),AI(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.getCoordinateAtM=function(t,n,i){if(this.layout!=qt.XYM&&this.layout!=qt.XYZM||this.flatCoordinates.length===0)return null;var a=n!==void 0?n:!1,o=i!==void 0?i:!1;return c3(this.flatCoordinates,0,this.ends_,this.stride,t,a,o)},e.prototype.getCoordinates=function(){return mg(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new kr(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,n=this.ends_,i=this.layout,a=[],o=0,s=0,A=n.length;s<A;++s){var l=n[s],u=new kr(t.slice(o,l),i);a.push(u),o=l}return a},e.prototype.getFlatMidpoints=function(){for(var t=[],n=this.flatCoordinates,i=0,a=this.ends_,o=this.stride,s=0,A=a.length;s<A;++s){var l=a[s],u=N_(n,i,l,o,.5);Gr(t,u),i=l}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=iW(this.flatCoordinates,0,this.ends_,this.stride,t,n,0,i),new e(n,qt.XY,i)},e.prototype.getType=function(){return st.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return pW(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=lI(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(Ls),Fa=d3,v3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),g3=function(r){v3(e,r);function e(t,n){var i=r.call(this)||this;return n&&!Array.isArray(t[0])?i.setFlatCoordinates(n,t):i.setCoordinates(t,n),i}return e.prototype.appendPoint=function(t){this.flatCoordinates?Gr(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){if(a<tc(this.getExtent(),t,n))return a;for(var o=this.flatCoordinates,s=this.stride,A=0,l=o.length;A<l;A+=s){var u=th(t,n,o[A],o[A+1]);if(u<a){a=u;for(var c=0;c<s;++c)i[c]=o[A+c];i.length=s}}return a},e.prototype.getCoordinates=function(){return tl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var n=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||n<=t?null:new pr(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,n=this.layout,i=this.stride,a=[],o=0,s=t.length;o<s;o+=i){var A=new pr(t.slice(o,o+i),n);a.push(A)}return a},e.prototype.getType=function(){return st.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var n=this.flatCoordinates,i=this.stride,a=0,o=n.length;a<o;a+=i){var s=n[a],A=n[a+1];if(nw(t,s,A))return!0}return!1},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ry(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Ls),ns=g3;function W6(r,e,t,n){for(var i=[],a=wi(),o=0,s=t.length;o<s;++o){var A=t[o];a=iw(r,e,A[0],n),i.push((a[0]+a[2])/2,(a[1]+a[3])/2),e=A[A.length-1]}return i}var y3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),m3=function(r){y3(e,r);function e(t,n,i){var a=r.call(this)||this;if(a.endss_=[],a.flatInteriorPointsRevision_=-1,a.flatInteriorPoints_=null,a.maxDelta_=-1,a.maxDeltaRevision_=-1,a.orientedRevision_=-1,a.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){for(var o=a.getLayout(),s=t,A=[],l=[],u=0,c=s.length;u<c;++u){var h=s[u];u===0&&(o=h.getLayout());for(var f=A.length,p=h.getEnds(),v=0,m=p.length;v<m;++v)p[v]+=f;Gr(A,h.getFlatCoordinates()),l.push(p)}n=o,t=A,i=l}return n!==void 0&&i?(a.setFlatCoordinates(n,t),a.endss_=i):a.setCoordinates(t,n),a}return e.prototype.appendPolygon=function(t){var n;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),n=t.getEnds().slice(),this.endss_.push();else{var i=this.flatCoordinates.length;Gr(this.flatCoordinates,t.getFlatCoordinates()),n=t.getEnds().slice();for(var a=0,o=n.length;a<o;++a)n[a]+=i}this.endss_.push(n),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,n=new Array(t),i=0;i<t;++i)n[i]=this.endss_[i].slice();var a=new e(this.flatCoordinates.slice(),this.layout,n);return a.applyProperties(this),a},e.prototype.closestPointXY=function(t,n,i,a){return a<tc(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(eW(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),rW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return fW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,n)},e.prototype.getArea=function(){return sW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),mM(n,0,this.endss_,this.stride,t)):n=this.flatCoordinates,tx(n,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=W6(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=F6(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new ns(this.getFlatInteriorPoints().slice(),qt.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;yW(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=mM(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=oW(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),n,0,i),new e(n,qt.XY,i)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var n;if(t===0)n=0;else{var i=this.endss_[t-1];n=i[i.length-1]}var a=this.endss_[t].slice(),o=a[a.length-1];if(n!==0)for(var s=0,A=a.length;s<A;++s)a[s]-=n;return new Fn(this.flatCoordinates.slice(n,o),this.layout,a)},e.prototype.getPolygons=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.endss_,a=[],o=0,s=0,A=i.length;s<A;++s){var l=i[s].slice(),u=l[l.length-1];if(o!==0)for(var c=0,h=l.length;c<h;++c)l[c]-=o;var f=new Fn(n.slice(o,u),t,l);a.push(f),o=u}return a},e.prototype.getType=function(){return st.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return vW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=nW(this.flatCoordinates,0,t,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{var a=i[i.length-1];this.flatCoordinates.length=a.length===0?0:a[a.length-1]}this.changed()},e}(Ls),Ia=m3;function _3(r,e,t,n,i){q6(r,e,t||0,n||r.length-1,i||w3)}function q6(r,e,t,n,i){for(;n>t;){if(n-t>600){var a=n-t+1,o=e-t+1,s=Math.log(a),A=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*A*(a-A)/a)*(o-a/2<0?-1:1),u=Math.max(t,Math.floor(e-o*A/a+l)),c=Math.min(n,Math.floor(e+(a-o)*A/a+l));q6(r,e,u,c,i)}var h=r[e],f=t,p=n;for(Kd(r,t,e),i(r[n],h)>0&&Kd(r,t,n);f<p;){for(Kd(r,f,p),f++,p--;i(r[f],h)<0;)f++;for(;i(r[p],h)>0;)p--}i(r[t],h)===0?Kd(r,t,p):(p++,Kd(r,p,n)),p<=e&&(t=p+1),e<=p&&(n=p-1)}}function Kd(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function w3(r,e){return r<e?-1:r>e?1:0}class Z6{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const n=[];if(!Om(e,t))return n;const i=this.toBBox,a=[];for(;t;){for(let o=0;o<t.children.length;o++){const s=t.children[o],A=t.leaf?i(s):s;Om(e,A)&&(t.leaf?n.push(s):IC(e,A)?this._all(s,n):a.push(s))}t=a.pop()}return n}collides(e){let t=this.data;if(!Om(e,t))return!1;const n=[];for(;t;){for(let i=0;i<t.children.length;i++){const a=t.children[i],o=t.leaf?this.toBBox(a):a;if(Om(e,o)){if(t.leaf||IC(e,o))return!0;n.push(a)}}t=n.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let n=0;n<e.length;n++)this.insert(e[n]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const n=this.data;this.data=t,t=n}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=Uf([]),this}remove(e,t){if(!e)return this;let n=this.data;const i=this.toBBox(e),a=[],o=[];let s,A,l;for(;n||a.length;){if(n||(n=a.pop(),A=a[a.length-1],s=o.pop(),l=!0),n.leaf){const u=E3(e,n.children,t);if(u!==-1)return n.children.splice(u,1),a.push(n),this._condense(a),this}!l&&!n.leaf&&IC(n,i)?(a.push(n),o.push(s),s=0,A=n,n=n.children[0]):A?(s++,n=A.children[s],l=!1):n=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const n=[];for(;e;)e.leaf?t.push(...e.children):n.push(...e.children),e=n.pop();return t}_build(e,t,n,i){const a=n-t+1;let o=this._maxEntries,s;if(a<=o)return s=Uf(e.slice(t,n+1)),df(s,this.toBBox),s;i||(i=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,i-1))),s=Uf([]),s.leaf=!1,s.height=i;const A=Math.ceil(a/o),l=A*Math.ceil(Math.sqrt(o));SM(e,t,n,l,this.compareMinX);for(let u=t;u<=n;u+=l){const c=Math.min(u+l-1,n);SM(e,u,c,A,this.compareMinY);for(let h=u;h<=c;h+=A){const f=Math.min(h+A-1,c);s.children.push(this._build(e,h,f,i-1))}}return df(s,this.toBBox),s}_chooseSubtree(e,t,n,i){for(;i.push(t),!(t.leaf||i.length-1===n);){let a=1/0,o=1/0,s;for(let A=0;A<t.children.length;A++){const l=t.children[A],u=FC(l),c=T3(e,l)-u;c<o?(o=c,a=u<a?u:a,s=l):c===o&&u<a&&(a=u,s=l)}t=s||t.children[0]}return t}_insert(e,t,n){const i=n?e:this.toBBox(e),a=[],o=this._chooseSubtree(i,this.data,t,a);for(o.children.push(e),vv(o,i);t>=0&&a[t].children.length>this._maxEntries;)this._split(a,t),t--;this._adjustParentBBoxes(i,a,t)}_split(e,t){const n=e[t],i=n.children.length,a=this._minEntries;this._chooseSplitAxis(n,a,i);const o=this._chooseSplitIndex(n,a,i),s=Uf(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,df(n,this.toBBox),df(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=Uf([e,t]),this.data.height=e.height+1,this.data.leaf=!1,df(this.data,this.toBBox)}_chooseSplitIndex(e,t,n){let i,a=1/0,o=1/0;for(let s=t;s<=n-t;s++){const A=dv(e,0,s,this.toBBox),l=dv(e,s,n,this.toBBox),u=x3(A,l),c=FC(A)+FC(l);u<a?(a=u,i=s,o=c<o?c:o):u===a&&c<o&&(o=c,i=s)}return i||n-t}_chooseSplitAxis(e,t,n){const i=e.leaf?this.compareMinX:C3,a=e.leaf?this.compareMinY:B3,o=this._allDistMargin(e,t,n,i),s=this._allDistMargin(e,t,n,a);o<s&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const a=this.toBBox,o=dv(e,0,t,a),s=dv(e,n-t,n,a);let A=Lm(o)+Lm(s);for(let l=t;l<n-t;l++){const u=e.children[l];vv(o,e.leaf?a(u):u),A+=Lm(o)}for(let l=n-t-1;l>=t;l--){const u=e.children[l];vv(s,e.leaf?a(u):u),A+=Lm(s)}return A}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)vv(t[i],e)}_condense(e){for(let t=e.length-1,n;t>=0;t--)e[t].children.length===0?t>0?(n=e[t-1].children,n.splice(n.indexOf(e[t]),1)):this.clear():df(e[t],this.toBBox)}}function E3(r,e,t){if(!t)return e.indexOf(r);for(let n=0;n<e.length;n++)if(t(r,e[n]))return n;return-1}function df(r,e){dv(r,0,r.children.length,e,r)}function dv(r,e,t,n,i){i||(i=Uf(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let a=e;a<t;a++){const o=r.children[a];vv(i,r.leaf?n(o):o)}return i}function vv(r,e){return r.minX=Math.min(r.minX,e.minX),r.minY=Math.min(r.minY,e.minY),r.maxX=Math.max(r.maxX,e.maxX),r.maxY=Math.max(r.maxY,e.maxY),r}function C3(r,e){return r.minX-e.minX}function B3(r,e){return r.minY-e.minY}function FC(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function Lm(r){return r.maxX-r.minX+(r.maxY-r.minY)}function T3(r,e){return(Math.max(e.maxX,r.maxX)-Math.min(e.minX,r.minX))*(Math.max(e.maxY,r.maxY)-Math.min(e.minY,r.minY))}function x3(r,e){const t=Math.max(r.minX,e.minX),n=Math.max(r.minY,e.minY),i=Math.min(r.maxX,e.maxX),a=Math.min(r.maxY,e.maxY);return Math.max(0,i-t)*Math.max(0,a-n)}function IC(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function Om(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function Uf(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function SM(r,e,t,n,i){const a=[e,t];for(;a.length;){if(t=a.pop(),e=a.pop(),t-e<=n)continue;const o=e+Math.ceil((t-e)/n/2)*n;_3(r,o,e,t,i),a.push(e,o,o,t)}}var je={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},S3=function(){function r(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Ui(e.scale),this.displacement_=e.displacement}return r.prototype.clone=function(){var e=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},r.prototype.getOpacity=function(){return this.opacity_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getDisplacement=function(){return this.displacement_},r.prototype.getAnchor=function(){return Te()},r.prototype.getImage=function(e){return Te()},r.prototype.getHitDetectionImage=function(){return Te()},r.prototype.getPixelRatio=function(e){return 1},r.prototype.getImageState=function(){return Te()},r.prototype.getImageSize=function(){return Te()},r.prototype.getOrigin=function(){return Te()},r.prototype.getSize=function(){return Te()},r.prototype.setDisplacement=function(e){this.displacement_=e},r.prototype.setOpacity=function(e){this.opacity_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=Ui(e)},r.prototype.listenImageChange=function(e){Te()},r.prototype.load=function(){Te()},r.prototype.unlistenImageChange=function(e){Te()},r}(),J6=S3;function rA(r){return Array.isArray(r)?s6(r):r}var b3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),F3=function(r){b3(e,r);function e(t){var n=this,i=t.rotateWithView!==void 0?t.rotateWithView:!1;return n=r.call(this,{opacity:1,rotateWithView:i,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0]})||this,n.canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=t.fill!==void 0?t.fill:null,n.origin_=[0,0],n.points_=t.points,n.radius_=t.radius!==void 0?t.radius:t.radius1,n.radius2_=t.radius2,n.angle_=t.angle!==void 0?t.angle:0,n.stroke_=t.stroke!==void 0?t.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var n=this.getDisplacement();return[t[0]/2-n[0],t[1]/2+n[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var n=this.canvas_[t];if(!n){var i=this.renderOptions_,a=za(i.size*t,i.size*t);this.draw_(i,a,t),n=a.canvas,this.canvas_[t]=n}return n},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return je.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,n,i){if(n===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return n;var a=this.radius_,o=this.radius2_===void 0?a:this.radius2_;if(a<o){var s=a;a=o,o=s}var A=this.radius2_===void 0?this.points_:this.points_*2,l=2*Math.PI/A,u=o*Math.sin(l),c=Math.sqrt(o*o-u*u),h=a-c,f=Math.sqrt(u*u+h*h),p=f/u;if(t==="miter"&&p<=i)return p*n;var v=n/2/p,m=n/2*(h/f),g=Math.sqrt((a+v)*(a+v)+m*m),_=g-a;if(this.radius2_===void 0||t==="bevel")return _*2;var E=a*Math.sin(l),B=Math.sqrt(a*a-E*E),L=o-B,O=Math.sqrt(E*E+L*L),b=O/E;if(b<=i){var T=b*n/2-o-a;return 2*Math.max(_,T)}return _*2},e.prototype.createRenderOptions=function(){var t=Sp,n=0,i=null,a=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=dg),o=rA(o),s=this.stroke_.getWidth(),s===void 0&&(s=gg),i=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Sp),n=this.stroke_.getMiterLimit(),n===void 0&&(n=pg));var A=this.calculateLineJoinSize_(t,s,n),l=Math.max(this.radius_,this.radius2_||0),u=Math.ceil(2*l+A);return{strokeStyle:o,strokeWidth:s,size:u,lineDash:i,lineDashOffset:a,lineJoin:t,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,n,i){if(n.scale(i,i),n.translate(t.size/2,t.size/2),this.createPath_(n),this.fill_){var a=this.fill_.getColor();a===null&&(a=sl),n.fillStyle=rA(a),n.fill()}this.stroke_&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,n.setLineDash&&t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var n=this.fill_.getColor(),i=0;if(typeof n=="string"&&(n=$u(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0){var a=za(t.size,t.size);this.hitDetectionCanvas_=a.canvas,this.drawHitDetectionCanvas_(t,a)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var n=this.points_,i=this.radius_;if(n===1/0)t.arc(0,0,i,0,2*Math.PI);else{var a=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(n*=2);for(var o=this.angle_-Math.PI/2,s=2*Math.PI/n,A=0;A<n;A++){var l=o+A*s,u=A%2===0?i:a;t.lineTo(u*Math.cos(l),u*Math.sin(l))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,n){n.translate(t.size/2,t.size/2),this.createPath_(n),n.fillStyle=sl,n.fill(),this.stroke_&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},e}(J6),G0=F3,I3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),L3=function(r){I3(e,r);function e(t){var n=t||{};return r.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:n.scale!==void 0?n.scale:1,rotation:n.rotation!==void 0?n.rotation:0,rotateWithView:n.rotateWithView!==void 0?n.rotateWithView:!1,displacement:n.displacement!==void 0?n.displacement:[0,0]})||this}return e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(G0),iy=L3,O3=function(){function r(e){var t=e||{};this.color_=t.color!==void 0?t.color:null}return r.prototype.clone=function(){var e=this.getColor();return new r({color:Array.isArray(e)?e.slice():e||void 0})},r.prototype.getColor=function(){return this.color_},r.prototype.setColor=function(e){this.color_=e},r}(),ua=O3,R3=function(){function r(e){var t=e||{};this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}return r.prototype.clone=function(){var e=this.getColor();return new r({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},r.prototype.getColor=function(){return this.color_},r.prototype.getLineCap=function(){return this.lineCap_},r.prototype.getLineDash=function(){return this.lineDash_},r.prototype.getLineDashOffset=function(){return this.lineDashOffset_},r.prototype.getLineJoin=function(){return this.lineJoin_},r.prototype.getMiterLimit=function(){return this.miterLimit_},r.prototype.getWidth=function(){return this.width_},r.prototype.setColor=function(e){this.color_=e},r.prototype.setLineCap=function(e){this.lineCap_=e},r.prototype.setLineDash=function(e){this.lineDash_=e},r.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e},r.prototype.setLineJoin=function(e){this.lineJoin_=e},r.prototype.setMiterLimit=function(e){this.miterLimit_=e},r.prototype.setWidth=function(e){this.width_=e},r}(),Di=R3,Xf=function(){function r(e){var t=e||{};this.geometry_=null,this.geometryFunction_=bM,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}return r.prototype.clone=function(){var e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new r({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},r.prototype.getRenderer=function(){return this.renderer_},r.prototype.setRenderer=function(e){this.renderer_=e},r.prototype.setHitDetectionRenderer=function(e){this.hitDetectionRenderer_=e},r.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},r.prototype.getGeometry=function(){return this.geometry_},r.prototype.getGeometryFunction=function(){return this.geometryFunction_},r.prototype.getFill=function(){return this.fill_},r.prototype.setFill=function(e){this.fill_=e},r.prototype.getImage=function(){return this.image_},r.prototype.setImage=function(e){this.image_=e},r.prototype.getStroke=function(){return this.stroke_},r.prototype.setStroke=function(e){this.stroke_=e},r.prototype.getText=function(){return this.text_},r.prototype.setText=function(e){this.text_=e},r.prototype.getZIndex=function(){return this.zIndex_},r.prototype.setGeometry=function(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=bM,this.geometry_=e},r.prototype.setZIndex=function(e){this.zIndex_=e},r}();function M3(r){var e;if(typeof r=="function")e=r;else{var t;if(Array.isArray(r))t=r;else{we(typeof r.getZIndex=="function",41);var n=r;t=[n]}e=function(){return t}}return e}var LC=null;function N3(r,e){if(!LC){var t=new ua({color:"rgba(255,255,255,0.4)"}),n=new Di({color:"#3399CC",width:1.25});LC=[new Xf({image:new iy({fill:t,stroke:n,radius:5}),fill:t,stroke:n})]}return LC}function _I(){var r={},e=[255,255,255,1],t=[0,153,255,1],n=3;return r[st.POLYGON]=[new Xf({fill:new ua({color:[255,255,255,.5]})})],r[st.MULTI_POLYGON]=r[st.POLYGON],r[st.LINE_STRING]=[new Xf({stroke:new Di({color:e,width:n+2})}),new Xf({stroke:new Di({color:t,width:n})})],r[st.MULTI_LINE_STRING]=r[st.LINE_STRING],r[st.CIRCLE]=r[st.POLYGON].concat(r[st.LINE_STRING]),r[st.POINT]=[new Xf({image:new iy({radius:n*2,fill:new ua({color:t}),stroke:new Di({color:e,width:n/2})}),zIndex:1/0})],r[st.MULTI_POINT]=r[st.POINT],r[st.GEOMETRY_COLLECTION]=r[st.POLYGON].concat(r[st.LINE_STRING],r[st.POINT]),r}function bM(r){return r.getGeometry()}var Aa=Xf,P3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),FM={RENDER_ORDER:"renderOrder"},U3=function(r){P3(e,r);function e(t){var n=this,i=t||{},a=ve({},i);return delete a.style,delete a.renderBuffer,delete a.updateWhileAnimating,delete a.updateWhileInteracting,n=r.call(this,a)||this,n.declutter_=i.declutter!==void 0?i.declutter:!1,n.renderBuffer_=i.renderBuffer!==void 0?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=i.updateWhileAnimating!==void 0?i.updateWhileAnimating:!1,n.updateWhileInteracting_=i.updateWhileInteracting!==void 0?i.updateWhileInteracting:!1,n}return e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(t){return r.prototype.getFeatures.call(this,t)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(FM.RENDER_ORDER)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Z6(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(FM.RENDER_ORDER,t)},e.prototype.setStyle=function(t){this.style_=t!==void 0?t:N3,this.styleFunction_=t===null?void 0:M3(this.style_),this.changed()},e}(Fh),dw=U3,ay={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Rm=[ay.FILL],vu=[ay.STROKE],$c=[ay.BEGIN_PATH],IM=[ay.CLOSE_PATH],He=ay,D3=function(){function r(){}return r.prototype.drawCustom=function(e,t,n,i){},r.prototype.drawGeometry=function(e){},r.prototype.setStyle=function(e){},r.prototype.drawCircle=function(e,t){},r.prototype.drawFeature=function(e,t){},r.prototype.drawGeometryCollection=function(e,t){},r.prototype.drawLineString=function(e,t){},r.prototype.drawMultiLineString=function(e,t){},r.prototype.drawMultiPoint=function(e,t){},r.prototype.drawMultiPolygon=function(e,t){},r.prototype.drawPoint=function(e,t){},r.prototype.drawPolygon=function(e,t){},r.prototype.drawText=function(e,t){},r.prototype.setFillStrokeStyle=function(e,t){},r.prototype.setImageStyle=function(e,t){},r.prototype.setTextStyle=function(e,t){},r}(),t4=D3,Q3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),H3=function(r){Q3(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.tolerance=t,o.maxExtent=n,o.pixelRatio=a,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return e.prototype.applyPixelRatio=function(t){var n=this.pixelRatio;return n==1?t:t.map(function(i){return i*n})},e.prototype.appendFlatPointCoordinates=function(t,n){for(var i=this.getBufferedMaxExtent(),a=this.tmpCoordinate_,o=this.coordinates,s=o.length,A=0,l=t.length;A<l;A+=n)a[0]=t[A],a[1]=t[A+1],Fs(i,a)&&(o[s++]=a[0],o[s++]=a[1]);return s},e.prototype.appendFlatLineCoordinates=function(t,n,i,a,o,s){var A=this.coordinates,l=A.length,u=this.getBufferedMaxExtent();s&&(n+=a);var c=t[n],h=t[n+1],f=this.tmpCoordinate_,p=!0,v,m,g;for(v=n+a;v<i;v+=a)f[0]=t[v],f[1]=t[v+1],g=w_(u,f),g!==m?(p&&(A[l++]=c,A[l++]=h,p=!1),A[l++]=f[0],A[l++]=f[1]):g===Yi.INTERSECTING?(A[l++]=f[0],A[l++]=f[1],p=!1):p=!0,c=f[0],h=f[1],m=g;return(o&&p||v===n+a)&&(A[l++]=c,A[l++]=h),l},e.prototype.drawCustomCoordinates_=function(t,n,i,a,o){for(var s=0,A=i.length;s<A;++s){var l=i[s],u=this.appendFlatLineCoordinates(t,n,l,a,!1,!1);o.push(u),n=l}return n},e.prototype.drawCustom=function(t,n,i,a){this.beginGeometry(t,n);var o=t.getType(),s=t.getStride(),A=this.coordinates.length,l,u,c,h,f;switch(o){case st.MULTI_POLYGON:l=t.getOrientedFlatCoordinates(),h=[];var p=t.getEndss();f=0;for(var v=0,m=p.length;v<m;++v){var g=[];f=this.drawCustomCoordinates_(l,f,p[v],s,g),h.push(g)}this.instructions.push([He.CUSTOM,A,h,t,i,tx]),this.hitDetectionInstructions.push([He.CUSTOM,A,h,t,a||i,tx]);break;case st.POLYGON:case st.MULTI_LINE_STRING:c=[],l=o==st.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),f=this.drawCustomCoordinates_(l,0,t.getEnds(),s,c),this.instructions.push([He.CUSTOM,A,c,t,i,mg]),this.hitDetectionInstructions.push([He.CUSTOM,A,c,t,a||i,mg]);break;case st.LINE_STRING:case st.CIRCLE:l=t.getFlatCoordinates(),u=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([He.CUSTOM,A,u,t,i,tl]),this.hitDetectionInstructions.push([He.CUSTOM,A,u,t,a||i,tl]);break;case st.MULTI_POINT:l=t.getFlatCoordinates(),u=this.appendFlatPointCoordinates(l,s),u>A&&(this.instructions.push([He.CUSTOM,A,u,t,i,tl]),this.hitDetectionInstructions.push([He.CUSTOM,A,u,t,a||i,tl]));break;case st.POINT:l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([He.CUSTOM,A,u,t,i]),this.hitDetectionInstructions.push([He.CUSTOM,A,u,t,a||i]);break}this.endGeometry(n)},e.prototype.beginGeometry=function(t,n){this.beginGeometryInstruction1_=[He.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[He.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t=this.hitDetectionInstructions;t.reverse();var n,i=t.length,a,o,s=-1;for(n=0;n<i;++n)a=t[n],o=a[0],o==He.END_GEOMETRY?s=n:o==He.BEGIN_GEOMETRY&&(a[2]=n,Zz(this.hitDetectionInstructions,s,n),s=-1)},e.prototype.setFillStrokeStyle=function(t,n){var i=this.state;if(t){var a=t.getColor();i.fillStyle=rA(a||sl)}else i.fillStyle=void 0;if(n){var o=n.getColor();i.strokeStyle=rA(o||dg);var s=n.getLineCap();i.lineCap=s!==void 0?s:x_;var A=n.getLineDash();i.lineDash=A?A.slice():hg;var l=n.getLineDashOffset();i.lineDashOffset=l||fg;var u=n.getLineJoin();i.lineJoin=u!==void 0?u:Sp;var c=n.getWidth();i.lineWidth=c!==void 0?c:gg;var h=n.getMiterLimit();i.miterLimit=h!==void 0?h:pg,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var n=t.fillStyle,i=[He.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[He.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,n){var i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(n.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,n){var i=t.strokeStyle,a=t.lineCap,o=t.lineDash,s=t.lineDashOffset,A=t.lineJoin,l=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=a||o!=t.currentLineDash&&!Cl(t.currentLineDash,o)||t.currentLineDashOffset!=s||t.currentLineJoin!=A||t.currentLineWidth!=l||t.currentMiterLimit!=u)&&(i!==void 0&&n.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=a,t.currentLineDash=o,t.currentLineDashOffset=s,t.currentLineJoin=A,t.currentLineWidth=l,t.currentMiterLimit=u)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var n=[He.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=HF(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Ka(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(t4),oy=H3,G3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),k3=function(r){G3(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i,a)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return e.prototype.drawPoint=function(t,n){if(this.image_){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),a=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(i,a);this.instructions.push([He.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([He.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(n)}},e.prototype.drawMultiPoint=function(t,n){if(this.image_){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),a=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(i,a);this.instructions.push([He.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([He.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(n)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,r.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,n){var i=t.getAnchor(),a=t.getSize(),o=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),A=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=o,this.image_=s,this.height_=a[1],this.opacity_=t.getOpacity(),this.originX_=A[0]*this.imagePixelRatio_,this.originY_=A[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=a[0],this.declutterImageWithText_=n},e}(oy),$3=k3,j3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),V3=function(r){j3(e,r);function e(t,n,i,a){return r.call(this,t,n,i,a)||this}return e.prototype.drawFlatCoordinates_=function(t,n,i,a){var o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,n,i,a,!1,!1),A=[He.MOVE_TO_LINE_TO,o,s];return this.instructions.push(A),this.hitDetectionInstructions.push(A),i},e.prototype.drawLineString=function(t,n){var i=this.state,a=i.strokeStyle,o=i.lineWidth;if(!(a===void 0||o===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([He.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,hg,fg],$c);var s=t.getFlatCoordinates(),A=t.getStride();this.drawFlatCoordinates_(s,0,s.length,A),this.hitDetectionInstructions.push(vu),this.endGeometry(n)}},e.prototype.drawMultiLineString=function(t,n){var i=this.state,a=i.strokeStyle,o=i.lineWidth;if(!(a===void 0||o===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([He.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],$c);for(var s=t.getEnds(),A=t.getFlatCoordinates(),l=t.getStride(),u=0,c=0,h=s.length;c<h;++c)u=this.drawFlatCoordinates_(A,u,s[c],l);this.hitDetectionInstructions.push(vu),this.endGeometry(n)}},e.prototype.finish=function(){var t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(vu),this.reverseHitDetectionInstructions(),this.state=null,r.prototype.finish.call(this)},e.prototype.applyStroke=function(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(vu),t.lastStroke=this.coordinates.length),t.lastStroke=0,r.prototype.applyStroke.call(this,t),this.instructions.push($c)},e}(oy),K3=V3,z3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),X3=function(r){z3(e,r);function e(t,n,i,a){return r.call(this,t,n,i,a)||this}return e.prototype.drawFlatCoordinatess_=function(t,n,i,a){var o=this.state,s=o.fillStyle!==void 0,A=o.strokeStyle!==void 0,l=i.length;this.instructions.push($c),this.hitDetectionInstructions.push($c);for(var u=0;u<l;++u){var c=i[u],h=this.coordinates.length,f=this.appendFlatLineCoordinates(t,n,c,a,!0,!A),p=[He.MOVE_TO_LINE_TO,h,f];this.instructions.push(p),this.hitDetectionInstructions.push(p),A&&(this.instructions.push(IM),this.hitDetectionInstructions.push(IM)),n=c}return s&&(this.instructions.push(Rm),this.hitDetectionInstructions.push(Rm)),A&&(this.instructions.push(vu),this.hitDetectionInstructions.push(vu)),n},e.prototype.drawCircle=function(t,n){var i=this.state,a=i.fillStyle,o=i.strokeStyle;if(!(a===void 0&&o===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([He.SET_FILL_STYLE,sl]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([He.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var s=t.getFlatCoordinates(),A=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,A,!1,!1);var u=[He.CIRCLE,l];this.instructions.push($c,u),this.hitDetectionInstructions.push($c,u),i.fillStyle!==void 0&&(this.instructions.push(Rm),this.hitDetectionInstructions.push(Rm)),i.strokeStyle!==void 0&&(this.instructions.push(vu),this.hitDetectionInstructions.push(vu)),this.endGeometry(n)}},e.prototype.drawPolygon=function(t,n){var i=this.state,a=i.fillStyle,o=i.strokeStyle;if(!(a===void 0&&o===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([He.SET_FILL_STYLE,sl]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([He.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var s=t.getEnds(),A=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(A,0,s,l),this.endGeometry(n)}},e.prototype.drawMultiPolygon=function(t,n){var i=this.state,a=i.fillStyle,o=i.strokeStyle;if(!(a===void 0&&o===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([He.SET_FILL_STYLE,sl]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([He.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var s=t.getEndss(),A=t.getOrientedFlatCoordinates(),l=t.getStride(),u=0,c=0,h=s.length;c<h;++c)u=this.drawFlatCoordinatess_(A,u,s[c],l);this.endGeometry(n)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(t!==0)for(var n=this.coordinates,i=0,a=n.length;i<a;++i)n[i]=Lc(n[i],t);return r.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state,n=t.fillStyle;n!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)},e}(oy),LM=X3,e4={POINT:"point",LINE:"line"};function Y3(r,e,t,n,i){var a=t,o=t,s=0,A=0,l=t,u,c,h,f,p,v,m,g,_,E;for(c=t;c<n;c+=i){var B=e[c],L=e[c+1];p!==void 0&&(_=B-p,E=L-v,f=Math.sqrt(_*_+E*E),m!==void 0&&(A+=h,u=Math.acos((m*_+g*E)/(h*f)),u>r&&(A>s&&(s=A,a=l,o=c),A=0,l=c-i)),h=f,m=_,g=E),p=B,v=L}return A+=f,A>s?[l,c]:[a,o]}var W3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),P_={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},q3=function(r){W3(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i,a)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return e.prototype.finish=function(){var t=r.prototype.finish.call(this);return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t},e.prototype.drawText=function(t,n){var i=this.textFillState_,a=this.textStrokeState_,o=this.textState_;if(!(this.text_===""||!o||!i&&!a)){var s=this.coordinates,A=s.length,l=t.getType(),u=null,c=t.getStride();if(o.placement===e4.LINE&&(l==st.LINE_STRING||l==st.MULTI_LINE_STRING||l==st.POLYGON||l==st.MULTI_POLYGON)){if(!Nn(this.getBufferedMaxExtent(),t.getExtent()))return;var h=void 0;if(u=t.getFlatCoordinates(),l==st.LINE_STRING)h=[u.length];else if(l==st.MULTI_LINE_STRING)h=t.getEnds();else if(l==st.POLYGON)h=t.getEnds().slice(0,1);else if(l==st.MULTI_POLYGON){var f=t.getEndss();h=[];for(var p=0,v=f.length;p<v;++p)h.push(f[p][0])}this.beginGeometry(t,n);for(var m=o.textAlign,g=0,_=void 0,E=0,B=h.length;E<B;++E){if(m==null){var L=Y3(o.maxAngle,u,g,h[E],c);g=L[0],_=L[1]}else _=h[E];for(var p=g;p<_;p+=c)s.push(u[p],u[p+1]);var O=s.length;g=h[E],this.drawChars_(A,O),A=O}this.endGeometry(n)}else{var b=o.overflow?null:[];switch(l){case st.POINT:case st.MULTI_POINT:u=t.getFlatCoordinates();break;case st.LINE_STRING:u=t.getFlatMidpoint();break;case st.CIRCLE:u=t.getCenter();break;case st.MULTI_LINE_STRING:u=t.getFlatMidpoints(),c=2;break;case st.POLYGON:u=t.getFlatInteriorPoint(),o.overflow||b.push(u[2]/this.resolution),c=3;break;case st.MULTI_POLYGON:var T=t.getFlatInteriorPoints();u=[];for(var p=0,v=T.length;p<v;p+=3)o.overflow||b.push(T[p+2]/this.resolution),u.push(T[p],T[p+1]);if(u.length===0)return;c=2;break}var O=this.appendFlatPointCoordinates(u,c);if(O===A)return;if(b&&(O-A)/2!==u.length/c){var F=A/2;b=b.filter(function(J,nt){var it=s[(F+nt)*2]===u[nt*c]&&s[(F+nt)*2+1]===u[nt*c+1];return it||--F,it})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,n);var M=o.padding;if(M!=Gc&&(o.scale[0]<0||o.scale[1]<0)){var S=o.padding[0],x=o.padding[1],N=o.padding[2],P=o.padding[3];o.scale[0]<0&&(x=-x,P=-P),o.scale[1]<0&&(S=-S,N=-N),M=[S,x,N,P]}var Y=this.pixelRatio;this.instructions.push([He.DRAW_IMAGE,A,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,M==Gc?Gc:M.map(function(J){return J*Y}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,b]);var z=1/Y;this.hitDetectionInstructions.push([He.DRAW_IMAGE,A,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[z,z],NaN,this.declutterImageWithText_,M,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,b]),this.endGeometry(n)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,n=this.textState_,i=this.textFillState_,a=this.strokeKey_;t&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var o=this.textKey_;o in this.textStates||(this.textStates[o]={font:n.font,textAlign:n.textAlign||vg,textBaseline:n.textBaseline||S_,scale:n.scale});var s=this.fillKey_;i&&(s in this.fillStates||(this.fillStates[s]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,n){var i=this.textStrokeState_,a=this.textState_,o=this.strokeKey_,s=this.textKey_,A=this.fillKey_;this.saveTextStates_();var l=this.pixelRatio,u=P_[a.textBaseline],c=this.textOffsetY_*l,h=this.text_,f=i?i.lineWidth*Math.abs(a.scale[0])/2:0;this.instructions.push([He.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,l,c,o,f*l,h,s,1]),this.hitDetectionInstructions.push([He.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,1,c,o,f,h,s,1/l])},e.prototype.setTextStyle=function(t,n){var i,a,o;if(!t)this.text_="";else{var s=t.getFill();s?(a=this.textFillState_,a||(a={},this.textFillState_=a),a.fillStyle=rA(s.getColor()||sl)):(a=null,this.textFillState_=a);var A=t.getStroke();if(!A)o=null,this.textStrokeState_=o;else{o=this.textStrokeState_,o||(o={},this.textStrokeState_=o);var l=A.getLineDash(),u=A.getLineDashOffset(),c=A.getWidth(),h=A.getMiterLimit();o.lineCap=A.getLineCap()||x_,o.lineDash=l?l.slice():hg,o.lineDashOffset=u===void 0?fg:u,o.lineJoin=A.getLineJoin()||Sp,o.lineWidth=c===void 0?gg:c,o.miterLimit=h===void 0?pg:h,o.strokeStyle=rA(A.getColor()||dg)}i=this.textState_;var f=t.getFont()||v6;JX(f);var p=t.getScaleArray();i.overflow=t.getOverflow(),i.font=f,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||S_,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Gc,i.scale=p===void 0?[1,1]:p;var v=t.getOffsetX(),m=t.getOffsetY(),g=t.getRotateWithView(),_=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=v===void 0?0:v,this.textOffsetY_=m===void 0?0:m,this.textRotateWithView_=g===void 0?!1:g,this.textRotation_=_===void 0?0:_,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:de(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=a?typeof a.fillStyle=="string"?a.fillStyle:"|"+de(a.fillStyle):""}this.declutterImageWithText_=n},e}(oy),Z3=q3,J3={Circle:LM,Default:oy,Image:$3,LineString:K3,Polygon:LM,Text:Z3},tZ=function(){function r(e,t,n,i){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}return r.prototype.finish=function(){var e={};for(var t in this.buildersByZIndex_){e[t]=e[t]||{};var n=this.buildersByZIndex_[t];for(var i in n){var a=n[i].finish();e[t][i]=a}}return e},r.prototype.getBuilder=function(e,t){var n=e!==void 0?e.toString():"0",i=this.buildersByZIndex_[n];i===void 0&&(i={},this.buildersByZIndex_[n]=i);var a=i[t];if(a===void 0){var o=J3[t];a=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=a}return a},r}(),U_=tZ,eZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rZ=function(r){eZ(e,r);function e(t){var n=r.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=t,n.declutterExecutorGroup=null,n}return e.prototype.getFeatures=function(t){return Te()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return Te()},e.prototype.renderFrame=function(t,n){return Te()},e.prototype.loadedTileCallback=function(t,n,i){t[n]||(t[n]={}),t[n][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,n,i){return function(a,o){var s=this.loadedTileCallback.bind(this,i,a);return t.forEachLoadedTile(n,a,o,s)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){},e.prototype.getDataAtPixel=function(t,n,i){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){var n=t.target;n.getState()===je.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var n=t.getState();return n!=je.LOADED&&n!=je.ERROR&&t.addEventListener(me.CHANGE,this.boundHandleImageChange_),n==je.IDLE&&(t.load(),n=t.getState()),n==je.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Ha.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,r.prototype.disposeInternal.call(this)},e}(Jg),r4=rZ,nZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gv=null;function iZ(){var r=document.createElement("canvas");r.width=1,r.height=1,gv=r.getContext("2d")}var aZ=function(r){nZ(e,r);function e(t){var n=r.call(this,t)||this;return n.container=null,n.renderedResolution,n.tempTransform=si(),n.pixelTransform=si(),n.inversePixelTransform=si(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return e.prototype.getImageData=function(t,n,i){gv||iZ(),gv.clearRect(0,0,1,1);var a;try{gv.drawImage(t,n,i,1,1,0,0,1,1),a=gv.getImageData(0,0,1,1).data}catch{return null}return a},e.prototype.getBackground=function(t){var n=this.getLayer(),i=n.getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0},e.prototype.useContainer=function(t,n,i,a){var o=this.getLayer().getClassName(),s,A;if(t&&t.className===o&&t.style.opacity===""&&i===1&&(!a||t.style.backgroundColor&&Cl($u(t.style.backgroundColor),$u(a)))){var l=t.firstElementChild;l instanceof HTMLCanvasElement&&(A=l.getContext("2d"))}if(A&&A.canvas.style.transform===n?(this.container=t,this.context=A,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){s=document.createElement("div"),s.className=o;var u=s.style;u.position="absolute",u.width="100%",u.height="100%",a&&(u.backgroundColor=a),A=za();var l=A.canvas;s.appendChild(l),u=l.style,u.position="absolute",u.left="0",u.transformOrigin="top left",this.container=s,this.context=A}},e.prototype.clipUnrotated=function(t,n,i){var a=Ns(i),o=Zg(i),s=Vp(i),A=qg(i);hn(n.coordinateToPixelTransform,a),hn(n.coordinateToPixelTransform,o),hn(n.coordinateToPixelTransform,s),hn(n.coordinateToPixelTransform,A);var l=this.inversePixelTransform;hn(l,a),hn(l,o),hn(l,s),hn(l,A),t.save(),t.beginPath(),t.moveTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(A[0]),Math.round(A[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,n,i){var a=this.getLayer();if(a.hasListener(t)){var o=new Hv(t,this.inversePixelTransform,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.frameState=n,this.dispatchRenderEvent_(so.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(so.POSTRENDER,t,n)},e.prototype.getRenderTransform=function(t,n,i,a,o,s,A){var l=o/2,u=s/2,c=a/n,h=-c,f=-t[0]+A,p=-t[1];return Va(this.tempTransform,l,u,c,h,-i,f,p)},e.prototype.getDataAtPixel=function(t,n,i){var a=hn(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer(),A=s.getExtent();if(A){var l=hn(n.pixelToCoordinateTransform,t.slice());if(!Fs(A,l))return null}var u=Math.round(a[0]),c=Math.round(a[1]),h=this.pixelContext_;if(!h){var f=document.createElement("canvas");f.width=1,f.height=1,h=f.getContext("2d"),this.pixelContext_=h}h.clearRect(0,0,1,1);var p;try{h.drawImage(o.canvas,u,c,1,1,0,0,1,1),p=h.getImageData(0,0,1,1).data}catch(v){return v.name==="SecurityError"?(this.pixelContext_=null,new Uint8Array):p}return p[3]===0?null:p},e.prototype.disposeInternal=function(){delete this.frameState,r.prototype.disposeInternal.call(this)},e}(r4),wI=aZ,lr={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function oZ(r,e,t,n,i,a,o,s,A,l,u,c){var h=r[e],f=r[e+1],p=0,v=0,m=0,g=0;function _(){p=h,v=f,e+=n,h=r[e],f=r[e+1],g+=m,m=Math.sqrt((h-p)*(h-p)+(f-v)*(f-v))}do _();while(e<t-n&&g+m<a);for(var E=m===0?0:(a-g)/m,B=qA(p,h,E),L=qA(v,f,E),O=e-n,b=g,T=a+s*A(l,i,u);e<t-n&&g+m<T;)_();E=m===0?0:(T-g)/m;var F=qA(p,h,E),M=qA(v,f,E),S;if(c){var x=[B,L,F,M];iI(x,0,4,2,c,x,x),S=x[0]>x[2]}else S=B>F;var N=Math.PI,P=[],Y=O+n===e;e=O,m=0,g=b,h=r[e],f=r[e+1];var z;if(Y){_(),z=Math.atan2(f-v,h-p),S&&(z+=z>0?-N:N);var tt=(F+B)/2,J=(M+L)/2;return P[0]=[tt,J,(T-a)/2,z,i],P}for(var nt=0,it=i.length;nt<it;){_();var _t=Math.atan2(f-v,h-p);if(S&&(_t+=_t>0?-N:N),z!==void 0){var R=_t-z;if(R+=R>N?-2*N:R<-N?2*N:0,Math.abs(R)>o)return null}z=_t;for(var $=nt,K=0;nt<it;++nt){var q=S?it-nt-1:nt,at=s*A(l,i[q],u);if(e+n<t&&g+m<a+K+at/2)break;K+=at}if(nt!==$){var vt=S?i.substring(it-$,it-nt):i.substring($,nt);E=m===0?0:(a+K/2-g)/m;var tt=qA(p,h,E),J=qA(v,f,E);P.push([tt,J,K/2,_t,vt]),a+=K}}return P}var vf=wi(),Zl=[],PA=[],UA=[],Jl=[];function OM(r){return r[3].declutterBox}var sZ=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function RM(r,e){return(e==="start"||e==="end")&&!sZ.test(r)&&(e=e==="start"?"left":"right"),P_[e]}function AZ(r,e,t){return t>0&&r.push(`
`,""),r.push(e,""),r}var lZ=function(){function r(e,t,n,i){this.overlaps=n,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=si(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return r.prototype.createLabel=function(e,t,n,i){var a=e+t+n+i;if(this.labels_[a])return this.labels_[a];var o=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,A=this.textStates[t],l=this.pixelRatio,u=[A.scale[0]*l,A.scale[1]*l],c=Array.isArray(e),h=RM(c?e[0]:e,A.textAlign||vg),f=i&&o.lineWidth?o.lineWidth:0,p=c?e:e.split(`
`).reduce(AZ,[]),v=eY(A,p),m=v.width,g=v.height,_=v.widths,E=v.heights,B=v.lineWidths,L=m+f,O=[],b=(L+2)*u[0],T=(g+f)*u[1],F={width:b<0?Math.floor(b):Math.ceil(b),height:T<0?Math.floor(T):Math.ceil(T),contextInstructions:O};if((u[0]!=1||u[1]!=1)&&O.push("scale",u),i){O.push("strokeStyle",o.strokeStyle),O.push("lineWidth",f),O.push("lineCap",o.lineCap),O.push("lineJoin",o.lineJoin),O.push("miterLimit",o.miterLimit);var M=rw?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;M.prototype.setLineDash&&(O.push("setLineDash",[o.lineDash]),O.push("lineDashOffset",o.lineDashOffset))}n&&O.push("fillStyle",s.fillStyle),O.push("textBaseline","middle"),O.push("textAlign","center");for(var S=.5-h,x=h*L+S*f,N=[],P=[],Y=0,z=0,tt=0,J=0,nt,it=0,_t=p.length;it<_t;it+=2){var R=p[it];if(R===`
`){z+=Y,Y=0,x=h*L+S*f,++J;continue}var $=p[it+1]||A.font;$!==nt&&(i&&N.push("font",$),n&&P.push("font",$),nt=$),Y=Math.max(Y,E[tt]);var K=[R,x+S*_[tt]+h*(_[tt]-B[J]),.5*(f+Y)+z];x+=_[tt],i&&N.push("strokeText",K),n&&P.push("fillText",K),++tt}return Array.prototype.push.apply(O,N),Array.prototype.push.apply(O,P),this.labels_[a]=F,F},r.prototype.replayTextBackground_=function(e,t,n,i,a,o,s){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,i),e.lineTo.apply(e,a),e.lineTo.apply(e,t),o&&(this.alignFill_=o[2],this.fill_(e)),s&&(this.setStrokeStyle_(e,s),e.stroke())},r.prototype.calculateImageOrLabelDimensions_=function(e,t,n,i,a,o,s,A,l,u,c,h,f,p,v,m){s*=h[0],A*=h[1];var g=n-s,_=i-A,E=a+l>e?e-l:a,B=o+u>t?t-u:o,L=p[3]+E*h[0]+p[1],O=p[0]+B*h[1]+p[2],b=g-p[3],T=_-p[0];(v||c!==0)&&(Zl[0]=b,Jl[0]=b,Zl[1]=T,PA[1]=T,PA[0]=b+L,UA[0]=PA[0],UA[1]=T+O,Jl[1]=UA[1]);var F;return c!==0?(F=Va(si(),n,i,1,1,c,-n,-i),hn(F,Zl),hn(F,PA),hn(F,UA),hn(F,Jl),ho(Math.min(Zl[0],PA[0],UA[0],Jl[0]),Math.min(Zl[1],PA[1],UA[1],Jl[1]),Math.max(Zl[0],PA[0],UA[0],Jl[0]),Math.max(Zl[1],PA[1],UA[1],Jl[1]),vf)):ho(Math.min(b,b+L),Math.min(T,T+O),Math.max(b,b+L),Math.max(T,T+O),vf),f&&(g=Math.round(g),_=Math.round(_)),{drawImageX:g,drawImageY:_,drawImageW:E,drawImageH:B,originX:l,originY:u,declutterBox:{minX:vf[0],minY:vf[1],maxX:vf[2],maxY:vf[3],value:m},canvasTransform:F,scale:h}},r.prototype.replayImageOrLabel_=function(e,t,n,i,a,o,s){var A=!!(o||s),l=i.declutterBox,u=e.canvas,c=s?s[2]*i.scale[0]/2:0,h=l.minX-c<=u.width/t&&l.maxX+c>=0&&l.minY-c<=u.height/t&&l.maxY+c>=0;return h&&(A&&this.replayTextBackground_(e,Zl,PA,UA,Jl,o,s),rY(e,i.canvasTransform,a,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},r.prototype.fill_=function(e){if(this.alignFill_){var t=hn(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;e.save(),e.translate(t[0]%n,t[1]%n),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()},r.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.setLineDash&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},r.prototype.drawLabelWithPointPlacement_=function(e,t,n,i){var a=this.textStates[t],o=this.createLabel(e,t,i,n),s=this.strokeStates[n],A=this.pixelRatio,l=RM(Array.isArray(e)?e[0]:e,a.textAlign||vg),u=P_[a.textBaseline||S_],c=s&&s.lineWidth?s.lineWidth:0,h=o.width/A-2*a.scale[0],f=l*h+2*(.5-l)*c,p=u*o.height/A+2*(.5-u)*c;return{label:o,anchorX:f,anchorY:p}},r.prototype.execute_=function(e,t,n,i,a,o,s,A){var l;this.pixelCoordinates_&&Cl(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Fu(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),lX(this.renderedTransform_,n));for(var u=0,c=i.length,h=0,f,p,v,m,g,_,E,B,L,O,b,T,F=0,M=0,S=null,x=null,N=this.coordinateCache_,P=this.viewRotation_,Y=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,z={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:P},tt=this.instructions!=i||this.overlaps?0:200,J,nt,it,_t;u<c;){var R=i[u],$=R[0];switch($){case He.BEGIN_GEOMETRY:J=R[1],_t=R[3],J.getGeometry()?s!==void 0&&!Nn(s,_t.getExtent())?u=R[2]+1:++u:u=R[2];break;case He.BEGIN_PATH:F>tt&&(this.fill_(e),F=0),M>tt&&(e.stroke(),M=0),!F&&!M&&(e.beginPath(),m=NaN,g=NaN),++u;break;case He.CIRCLE:h=R[1];var K=l[h],q=l[h+1],at=l[h+2],vt=l[h+3],wt=at-K,W=vt-q,Ft=Math.sqrt(wt*wt+W*W);e.moveTo(K+Ft,q),e.arc(K,q,Ft,0,2*Math.PI,!0),++u;break;case He.CLOSE_PATH:e.closePath(),++u;break;case He.CUSTOM:h=R[1],f=R[2];var Ot=R[3],V=R[4],Z=R.length==6?R[5]:void 0;z.geometry=Ot,z.feature=J,u in N||(N[u]=[]);var ut=N[u];Z?Z(l,h,f,2,ut):(ut[0]=l[h],ut[1]=l[h+1],ut.length=2),V(ut,z),++u;break;case He.DRAW_IMAGE:h=R[1],f=R[2],B=R[3],p=R[4],v=R[5];var rt=R[6],G=R[7],St=R[8],bt=R[9],dt=R[10],Et=R[11],yt=R[12],xt=R[13],It=R[14];if(!B&&R.length>=19){L=R[18],O=R[19],b=R[20],T=R[21];var Mt=this.drawLabelWithPointPlacement_(L,O,b,T);B=Mt.label,R[3]=B;var Vt=R[22];p=(Mt.anchorX-Vt)*this.pixelRatio,R[4]=p;var Yt=R[23];v=(Mt.anchorY-Yt)*this.pixelRatio,R[5]=v,rt=B.height,R[6]=rt,xt=B.width,R[13]=xt}var ae=void 0;R.length>24&&(ae=R[24]);var re=void 0,Wt=void 0,se=void 0;R.length>16?(re=R[15],Wt=R[16],se=R[17]):(re=Gc,Wt=!1,se=!1),dt&&Y?Et+=P:!dt&&!Y&&(Et-=P);for(var zt=0;h<f;h+=2)if(!(ae&&ae[zt++]<xt/this.pixelRatio)){var We=this.calculateImageOrLabelDimensions_(B.width,B.height,l[h],l[h+1],xt,rt,p,v,St,bt,Et,yt,a,re,Wt||se,J),Me=[e,t,B,We,G,Wt?S:null,se?x:null],dr=void 0,Ie=void 0;if(A&&It){var be=f-h;if(!It[be]){It[be]=Me;continue}if(dr=It[be],delete It[be],Ie=OM(dr),A.collides(Ie))continue}A&&A.collides(We.declutterBox)||(dr&&(A&&A.insert(Ie),this.replayImageOrLabel_.apply(this,dr)),A&&A.insert(We.declutterBox),this.replayImageOrLabel_.apply(this,Me))}++u;break;case He.DRAW_CHARS:var An=R[1],Ar=R[2],xi=R[3],Tr=R[4];T=R[5];var hi=R[6],Vr=R[7],Kr=R[8];b=R[9];var Ne=R[10];L=R[11],O=R[12];var Er=[R[13],R[13]],Yn=this.textStates[O],dn=Yn.font,Si=[Yn.scale[0]*Vr,Yn.scale[1]*Vr],bi=void 0;dn in this.widths_?bi=this.widths_[dn]:(bi={},this.widths_[dn]=bi);var Fe=Y6(l,An,Ar,2),fi=Math.abs(Si[0])*sM(dn,L,bi);if(Tr||fi<=Fe){var Qn=this.textStates[O].textAlign,Fi=(Fe-fi)*P_[Qn],nn=oZ(l,An,Ar,2,L,Fi,hi,Math.abs(Si[0]),sM,dn,bi,Y?0:this.viewRotation_);t:if(nn){var Jr=[],Bn=void 0,wo=void 0,Ae=void 0,ht=void 0,Ht=void 0;if(b)for(Bn=0,wo=nn.length;Bn<wo;++Bn){Ht=nn[Bn],Ae=Ht[4],ht=this.createLabel(Ae,O,"",b),p=Ht[2]+(Si[0]<0?-Ne:Ne),v=xi*ht.height+(.5-xi)*2*Ne*Si[1]/Si[0]-Kr;var We=this.calculateImageOrLabelDimensions_(ht.width,ht.height,Ht[0],Ht[1],ht.width,ht.height,p,v,0,0,Ht[3],Er,!1,Gc,!1,J);if(A&&A.collides(We.declutterBox))break t;Jr.push([e,t,ht,We,1,null,null])}if(T)for(Bn=0,wo=nn.length;Bn<wo;++Bn){Ht=nn[Bn],Ae=Ht[4],ht=this.createLabel(Ae,O,T,""),p=Ht[2],v=xi*ht.height-Kr;var We=this.calculateImageOrLabelDimensions_(ht.width,ht.height,Ht[0],Ht[1],ht.width,ht.height,p,v,0,0,Ht[3],Er,!1,Gc,!1,J);if(A&&A.collides(We.declutterBox))break t;Jr.push([e,t,ht,We,1,null,null])}A&&A.load(Jr.map(OM));for(var Zt=0,rr=Jr.length;Zt<rr;++Zt)this.replayImageOrLabel_.apply(this,Jr[Zt])}}++u;break;case He.END_GEOMETRY:if(o!==void 0){J=R[1];var Mr=o(J,_t);if(Mr)return Mr}++u;break;case He.FILL:tt?F++:this.fill_(e),++u;break;case He.MOVE_TO_LINE_TO:for(h=R[1],f=R[2],nt=l[h],it=l[h+1],_=nt+.5|0,E=it+.5|0,(_!==m||E!==g)&&(e.moveTo(nt,it),m=_,g=E),h+=2;h<f;h+=2)nt=l[h],it=l[h+1],_=nt+.5|0,E=it+.5|0,(h==f-2||_!==m||E!==g)&&(e.lineTo(nt,it),m=_,g=E);++u;break;case He.SET_FILL_STYLE:S=R,this.alignFill_=R[2],F&&(this.fill_(e),F=0,M&&(e.stroke(),M=0)),e.fillStyle=R[1],++u;break;case He.SET_STROKE_STYLE:x=R,M&&(e.stroke(),M=0),this.setStrokeStyle_(e,R),++u;break;case He.STROKE:tt?M++:e.stroke(),++u;break;default:++u;break}}F&&this.fill_(e),M&&e.stroke()},r.prototype.execute=function(e,t,n,i,a,o){this.viewRotation_=i,this.execute_(e,t,n,this.instructions,a,void 0,void 0,o)},r.prototype.executeHitDetection=function(e,t,n,i,a){return this.viewRotation_=n,this.execute_(e,1,t,this.hitDetectionInstructions,!0,i,a)},r}(),uZ=lZ,OC=[lr.POLYGON,lr.CIRCLE,lr.LINE_STRING,lr.IMAGE,lr.TEXT,lr.DEFAULT],cZ=function(){function r(e,t,n,i,a,o){this.maxExtent_=e,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=t,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=si(),this.createExecutors_(a)}return r.prototype.clip=function(e,t){var n=this.getClipCoords(t);e.beginPath(),e.moveTo(n[0],n[1]),e.lineTo(n[2],n[3]),e.lineTo(n[4],n[5]),e.lineTo(n[6],n[7]),e.clip()},r.prototype.createExecutors_=function(e){for(var t in e){var n=this.executorsByZIndex_[t];n===void 0&&(n={},this.executorsByZIndex_[t]=n);var i=e[t];for(var a in i){var o=i[a];n[a]=new uZ(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},r.prototype.hasExecutors=function(e){for(var t in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[t],i=0,a=e.length;i<a;++i)if(e[i]in n)return!0;return!1},r.prototype.forEachFeatureAtCoordinate=function(e,t,n,i,a,o){i=Math.round(i);var s=i*2+1,A=Va(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=za(s,s));var u=this.hitDetectionContext_;u.canvas.width!==s||u.canvas.height!==s?(u.canvas.width=s,u.canvas.height=s):l||u.clearRect(0,0,s,s);var c;this.renderBuffer_!==void 0&&(c=wi(),Zc(c,e),Ka(c,t*(this.renderBuffer_+i),c));var h=hZ(i),f;function p(O,b){for(var T=u.getImageData(0,0,s,s).data,F=0,M=h.length;F<M;F++)if(T[h[F]]>0){if(!o||f!==lr.IMAGE&&f!==lr.TEXT||o.indexOf(O)!==-1){var S=(h[F]-3)/4,x=i-S%s,N=i-(S/s|0),P=a(O,b,x*x+N*N);if(P)return P}u.clearRect(0,0,s,s);break}}var v=Object.keys(this.executorsByZIndex_).map(Number);v.sort(Hu);var m,g,_,E,B;for(m=v.length-1;m>=0;--m){var L=v[m].toString();for(_=this.executorsByZIndex_[L],g=OC.length-1;g>=0;--g)if(f=OC[g],E=_[f],E!==void 0&&(B=E.executeHitDetection(u,A,n,p,c),B))return B}},r.prototype.getClipCoords=function(e){var t=this.maxExtent_;if(!t)return null;var n=t[0],i=t[1],a=t[2],o=t[3],s=[n,i,n,o,a,o,a,i];return Fu(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return dh(this.executorsByZIndex_)},r.prototype.execute=function(e,t,n,i,a,o,s){var A=Object.keys(this.executorsByZIndex_).map(Number);A.sort(Hu),this.maxExtent_&&(e.save(),this.clip(e,n));var l=o||OC,u,c,h,f,p,v;for(s&&A.reverse(),u=0,c=A.length;u<c;++u){var m=A[u].toString();for(p=this.executorsByZIndex_[m],h=0,f=l.length;h<f;++h){var g=l[h];v=p[g],v!==void 0&&v.execute(e,t,n,i,a,s)}}this.maxExtent_&&e.restore()},r}(),RC={};function hZ(r){if(RC[r]!==void 0)return RC[r];for(var e=r*2+1,t=r*r,n=new Array(t+1),i=0;i<=r;++i)for(var a=0;a<=r;++a){var o=i*i+a*a;if(o>t)break;var s=n[o];s||(s=[],n[o]=s),s.push(((r+i)*e+(r+a))*4+3),i>0&&s.push(((r-i)*e+(r+a))*4+3),a>0&&(s.push(((r+i)*e+(r-a))*4+3),i>0&&s.push(((r-i)*e+(r-a))*4+3))}for(var A=[],i=0,l=n.length;i<l;++i)n[i]&&A.push.apply(A,n[i]);return RC[r]=A,A}var D_=cZ,fZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),pZ=function(r){fZ(e,r);function e(t,n,i,a,o,s,A){var l=r.call(this)||this;return l.context_=t,l.pixelRatio_=n,l.extent_=i,l.transform_=a,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=A,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=si(),l}return e.prototype.drawImages_=function(t,n,i,a){if(this.image_){var o=Fu(t,n,i,a,this.transform_,this.pixelCoordinates_),s=this.context_,A=this.tmpLocalTransform_,l=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=l*this.imageOpacity_);var u=this.imageRotation_;this.imageRotateWithView_&&(u+=this.viewRotation_);for(var c=0,h=o.length;c<h;c+=2){var f=o[c]-this.imageAnchorX_,p=o[c+1]-this.imageAnchorY_;if(u!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var v=f+this.imageAnchorX_,m=p+this.imageAnchorY_;Va(A,v,m,1,1,u,-v,-m),s.setTransform.apply(s,A),s.translate(v,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,f,p,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}},e.prototype.drawText_=function(t,n,i,a){if(!(!this.textState_||this.text_==="")){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var o=Fu(t,n,i,a,this.transform_,this.pixelCoordinates_),s=this.context_,A=this.textRotation_;for(this.textRotateWithView_&&(A+=this.viewRotation_);n<i;n+=a){var l=o[n]+this.textOffsetX_,u=o[n+1]+this.textOffsetY_;if(A!==0||this.textScale_[0]!=1||this.textScale_[1]!=1){var c=Va(this.tmpLocalTransform_,l,u,1,1,A,-l,-u);s.setTransform.apply(s,c),s.translate(l,u),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&s.strokeText(this.text_,l,u),this.textFillState_&&s.fillText(this.text_,l,u)}}},e.prototype.moveToLineTo_=function(t,n,i,a,o){var s=this.context_,A=Fu(t,n,i,a,this.transform_,this.pixelCoordinates_);s.moveTo(A[0],A[1]);var l=A.length;o&&(l-=2);for(var u=2;u<l;u+=2)s.lineTo(A[u],A[u+1]);return o&&s.closePath(),i},e.prototype.drawRings_=function(t,n,i,a){for(var o=0,s=i.length;o<s;++o)n=this.moveToLineTo_(t,n,i[o],a,!0);return n},e.prototype.drawCircle=function(t){if(Nn(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=tW(t,this.transform_,this.pixelCoordinates_),i=n[2]-n[0],a=n[3]-n[1],o=Math.sqrt(i*i+a*a),s=this.context_;s.beginPath(),s.arc(n[0],n[1],o,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){var n=t.getType();switch(n){case st.POINT:this.drawPoint(t);break;case st.LINE_STRING:this.drawLineString(t);break;case st.POLYGON:this.drawPolygon(t);break;case st.MULTI_POINT:this.drawMultiPoint(t);break;case st.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case st.MULTI_POLYGON:this.drawMultiPolygon(t);break;case st.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case st.CIRCLE:this.drawCircle(t);break}},e.prototype.drawFeature=function(t,n){var i=n.getGeometryFunction()(t);!i||!Nn(this.extent_,i.getExtent())||(this.setStyle(n),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var n=t.getGeometriesArray(),i=0,a=n.length;i<a;++i)this.drawGeometry(n[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(n,0,n.length,i),this.text_!==""&&this.drawText_(n,0,n.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(n,0,n.length,i),this.text_!==""&&this.drawText_(n,0,n.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Nn(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getFlatCoordinates();n.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),n.stroke()}if(this.text_!==""){var a=t.getFlatMidpoint();this.drawText_(a,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=t.getExtent();if(Nn(this.extent_,n)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,a=t.getFlatCoordinates(),o=0,s=t.getEnds(),A=t.getStride();i.beginPath();for(var l=0,u=s.length;l<u;++l)o=this.moveToLineTo_(a,o,s[l],A,!1);i.stroke()}if(this.text_!==""){var c=t.getFlatMidpoints();this.drawText_(c,0,c.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Nn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=this.context_;n.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Nn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getOrientedFlatCoordinates(),a=0,o=t.getEndss(),s=t.getStride();n.beginPath();for(var A=0,l=o.length;A<l;++A){var u=o[A];a=this.drawRings_(i,a,u,s)}this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){var c=t.getFlatInteriorPoints();this.drawText_(c,0,c.length,2)}}},e.prototype.setContextFillState_=function(t){var n=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,n.fillStyle=t.fillStyle):(n.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var n=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,n.lineCap=t.lineCap),n.setLineDash&&(Cl(i.lineDash,t.lineDash)||n.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,n.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,n.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,n.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,n.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,n.strokeStyle=t.strokeStyle)):(n.lineCap=t.lineCap,n.setLineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.lineWidth=t.lineWidth,n.miterLimit=t.miterLimit,n.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var n=this.context_,i=this.contextTextState_,a=t.textAlign?t.textAlign:vg;i?(i.font!=t.font&&(i.font=t.font,n.font=t.font),i.textAlign!=a&&(i.textAlign=a,n.textAlign=a),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,n.textBaseline=t.textBaseline)):(n.font=t.font,n.textAlign=a,n.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:a,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,n){var i=this;if(!t)this.fillState_=null;else{var a=t.getColor();this.fillState_={fillStyle:rA(a||sl)}}if(!n)this.strokeState_=null;else{var o=n.getColor(),s=n.getLineCap(),A=n.getLineDash(),l=n.getLineDashOffset(),u=n.getLineJoin(),c=n.getWidth(),h=n.getMiterLimit(),f=A||hg;this.strokeState_={lineCap:s!==void 0?s:x_,lineDash:this.pixelRatio_===1?f:f.map(function(p){return p*i.pixelRatio_}),lineDashOffset:(l||fg)*this.pixelRatio_,lineJoin:u!==void 0?u:Sp,lineWidth:(c!==void 0?c:gg)*this.pixelRatio_,miterLimit:h!==void 0?h:pg,strokeStyle:rA(o||dg)}}},e.prototype.setImageStyle=function(t){var n;if(!t||!(n=t.getSize())){this.image_=null;return}var i=t.getAnchor(),a=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=n[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=a[0],this.imageOriginY_=a[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=n[0]*this.pixelRatio_},e.prototype.setTextStyle=function(t){if(!t)this.text_="";else{var n=t.getFill();if(!n)this.textFillState_=null;else{var i=n.getColor();this.textFillState_={fillStyle:rA(i||sl)}}var a=t.getStroke();if(!a)this.textStrokeState_=null;else{var o=a.getColor(),s=a.getLineCap(),A=a.getLineDash(),l=a.getLineDashOffset(),u=a.getLineJoin(),c=a.getWidth(),h=a.getMiterLimit();this.textStrokeState_={lineCap:s!==void 0?s:x_,lineDash:A||hg,lineDashOffset:l||fg,lineJoin:u!==void 0?u:Sp,lineWidth:c!==void 0?c:gg,miterLimit:h!==void 0?h:pg,strokeStyle:rA(o||dg)}}var f=t.getFont(),p=t.getOffsetX(),v=t.getOffsetY(),m=t.getRotateWithView(),g=t.getRotation(),_=t.getScaleArray(),E=t.getText(),B=t.getTextAlign(),L=t.getTextBaseline();this.textState_={font:f!==void 0?f:v6,textAlign:B!==void 0?B:vg,textBaseline:L!==void 0?L:S_},this.text_=E!==void 0?Array.isArray(E)?E.reduce(function(O,b,T){return O+=T%2?" ":b},""):E:"",this.textOffsetX_=p!==void 0?this.pixelRatio_*p:0,this.textOffsetY_=v!==void 0?this.pixelRatio_*v:0,this.textRotateWithView_=m!==void 0?m:!1,this.textRotation_=g!==void 0?g:0,this.textScale_=[this.pixelRatio_*_[0],this.pixelRatio_*_[1]]}},e}(t4),EI=pZ,Qa={FRACTION:"fraction",PIXELS:"pixels"},Oi={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},dZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),vZ=function(r){dZ(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.extent=t,o.pixelRatio_=i,o.resolution=n,o.state=a,o}return e.prototype.changed=function(){this.dispatchEvent(me.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Te()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){Te()},e}(bh),n4=vZ,gZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),yZ=function(r){gZ(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,i,je.IDLE)||this;return A.src_=a,A.image_=new Image,o!==null&&(A.image_.crossOrigin=o),A.unlisten_=null,A.state=je.IDLE,A.imageLoadFunction_=s,A}return e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=je.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=li(this.extent)/this.image_.height),this.state=je.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){(this.state==je.IDLE||this.state==je.ERROR)&&(this.state=je.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=CI(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=li(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(n4);function CI(r,e,t){var n=r,i=!0,a=!1,o=!1,s=[cg(n,me.LOAD,function(){o=!0,a||e()})];return n.src&&oX?(a=!0,n.decode().then(function(){i&&e()}).catch(function(A){i&&(o?e():t())})):s.push(cg(n,me.ERROR,t)),function(){i=!1,s.forEach(Nr)}}var i4=yZ,mZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zd=null,_Z=function(r){mZ(e,r);function e(t,n,i,a,o,s){var A=r.call(this)||this;return A.hitDetectionImage_=null,A.image_=t||new Image,a!==null&&(A.image_.crossOrigin=a),A.canvas_={},A.color_=s,A.unlisten_=null,A.imageState_=o,A.size_=i,A.src_=n,A.tainted_,A}return e.prototype.isTainted_=function(){if(this.tainted_===void 0&&this.imageState_===je.LOADED){zd||(zd=za(1,1)),zd.drawImage(this.image_,0,0);try{zd.getImageData(0,0,1,1),this.tainted_=!1}catch{zd=null,this.tainted_=!0}}return this.tainted_===!0},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(me.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=je.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=je.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],n=this.size_[1],i=za(t,n);i.fillRect(0,0,t,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==je.IDLE){this.imageState_=je.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=CI(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(!(!this.color_||this.canvas_[t]||this.imageState_!==je.LOADED)){var n=document.createElement("canvas");this.canvas_[t]=n,n.width=Math.ceil(this.image_.width*t),n.height=Math.ceil(this.image_.height*t);var i=n.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply",i.globalCompositeOperation==="multiply"||this.isTainted_())i.fillStyle=il(this.color_),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var a=i.getImageData(0,0,n.width,n.height),o=a.data,s=this.color_[0]/255,A=this.color_[1]/255,l=this.color_[2]/255,u=this.color_[3],c=0,h=o.length;c<h;c+=4)o[c]*=s,o[c+1]*=A,o[c+2]*=l,o[c+3]*=u;i.putImageData(a,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(bh);function wZ(r,e,t,n,i,a){var o=E_.get(e,n,a);return o||(o=new _Z(r,e,t,n,i,a),E_.set(e,n,a,o)),o}var EZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),CZ=function(r){EZ(e,r);function e(t){var n=this,i=t||{},a=i.opacity!==void 0?i.opacity:1,o=i.rotation!==void 0?i.rotation:0,s=i.scale!==void 0?i.scale:1,A=i.rotateWithView!==void 0?i.rotateWithView:!1;n=r.call(this,{opacity:a,rotation:o,scale:s,displacement:i.displacement!==void 0?i.displacement:[0,0],rotateWithView:A})||this,n.anchor_=i.anchor!==void 0?i.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=i.anchorOrigin!==void 0?i.anchorOrigin:Oi.TOP_LEFT,n.anchorXUnits_=i.anchorXUnits!==void 0?i.anchorXUnits:Qa.FRACTION,n.anchorYUnits_=i.anchorYUnits!==void 0?i.anchorYUnits:Qa.FRACTION,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:null;var l=i.img!==void 0?i.img:null;n.imgSize_=i.imgSize;var u=i.src;we(!(u!==void 0&&l),4),we(!l||l&&n.imgSize_,5),(u===void 0||u.length===0)&&l&&(u=l.src||de(l)),we(u!==void 0&&u.length>0,6);var c=i.src!==void 0?je.IDLE:je.LOADED;return n.color_=i.color!==void 0?$u(i.color):null,n.iconImage_=wZ(l,u,n.imgSize_!==void 0?n.imgSize_:null,n.crossOrigin_,c,n.color_),n.offset_=i.offset!==void 0?i.offset:[0,0],n.offsetOrigin_=i.offsetOrigin!==void 0?i.offsetOrigin:Oi.TOP_LEFT,n.origin_=null,n.size_=i.size!==void 0?i.size:null,n}return e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var n=this.getSize();if(this.anchorXUnits_==Qa.FRACTION||this.anchorYUnits_==Qa.FRACTION){if(!n)return null;t=this.anchor_.slice(),this.anchorXUnits_==Qa.FRACTION&&(t[0]*=n[0]),this.anchorYUnits_==Qa.FRACTION&&(t[1]*=n[1])}if(this.anchorOrigin_!=Oi.TOP_LEFT){if(!n)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==Oi.TOP_RIGHT||this.anchorOrigin_==Oi.BOTTOM_RIGHT)&&(t[0]=-t[0]+n[0]),(this.anchorOrigin_==Oi.BOTTOM_LEFT||this.anchorOrigin_==Oi.BOTTOM_RIGHT)&&(t[1]=-t[1]+n[1])}this.normalizedAnchor_=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Oi.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;t=t.slice(),(this.offsetOrigin_==Oi.TOP_RIGHT||this.offsetOrigin_==Oi.BOTTOM_RIGHT)&&(t[0]=i[0]-n[0]-t[0]),(this.offsetOrigin_==Oi.BOTTOM_LEFT||this.offsetOrigin_==Oi.BOTTOM_RIGHT)&&(t[1]=i[1]-n[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(me.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(me.CHANGE,t)},e}(J6),sy=CZ,BZ="#333",TZ=function(){function r(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Ui(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new ua({color:BZ}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:e4.POINT,this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}return r.prototype.clone=function(){var e=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},r.prototype.getOverflow=function(){return this.overflow_},r.prototype.getFont=function(){return this.font_},r.prototype.getMaxAngle=function(){return this.maxAngle_},r.prototype.getPlacement=function(){return this.placement_},r.prototype.getOffsetX=function(){return this.offsetX_},r.prototype.getOffsetY=function(){return this.offsetY_},r.prototype.getFill=function(){return this.fill_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getStroke=function(){return this.stroke_},r.prototype.getText=function(){return this.text_},r.prototype.getTextAlign=function(){return this.textAlign_},r.prototype.getTextBaseline=function(){return this.textBaseline_},r.prototype.getBackgroundFill=function(){return this.backgroundFill_},r.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},r.prototype.getPadding=function(){return this.padding_},r.prototype.setOverflow=function(e){this.overflow_=e},r.prototype.setFont=function(e){this.font_=e},r.prototype.setMaxAngle=function(e){this.maxAngle_=e},r.prototype.setOffsetX=function(e){this.offsetX_=e},r.prototype.setOffsetY=function(e){this.offsetY_=e},r.prototype.setPlacement=function(e){this.placement_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setFill=function(e){this.fill_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=Ui(e!==void 0?e:1)},r.prototype.setStroke=function(e){this.stroke_=e},r.prototype.setText=function(e){this.text_=e},r.prototype.setTextAlign=function(e){this.textAlign_=e},r.prototype.setTextBaseline=function(e){this.textBaseline_=e},r.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},r.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},r.prototype.setPadding=function(e){this.padding_=e},r}(),Lh=TZ,Lo=.5;function a4(r,e,t,n,i,a,o){var s=r[0]*Lo,A=r[1]*Lo,l=za(s,A);l.imageSmoothingEnabled=!1;for(var u=l.canvas,c=new EI(l,Lo,i,null,o),h=t.length,f=Math.floor((256*256*256-1)/h),p={},v=1;v<=h;++v){var m=t[v-1],g=m.getStyleFunction()||n;if(n){var _=g(m,a);if(_){Array.isArray(_)||(_=[_]);for(var E=v*f,B="#"+("000000"+E.toString(16)).slice(-6),L=0,O=_.length;L<O;++L){var b=_[L],T=b.getGeometryFunction()(m);if(!(!T||!Nn(i,T.getExtent()))){var F=b.clone(),M=F.getFill();M&&M.setColor(B);var S=F.getStroke();S&&(S.setColor(B),S.setLineDash(null)),F.setText(void 0);var x=b.getImage();if(x&&x.getOpacity()!==0){var N=x.getImageSize();if(!N)continue;var P=za(N[0],N[1],void 0,{alpha:!1}),Y=P.canvas;P.fillStyle=B,P.fillRect(0,0,Y.width,Y.height),F.setImage(new sy({img:Y,imgSize:N,anchor:x.getAnchor(),anchorXUnits:Qa.PIXELS,anchorYUnits:Qa.PIXELS,offset:x.getOrigin(),opacity:1,size:x.getSize(),scale:x.getScale(),rotation:x.getRotation(),rotateWithView:x.getRotateWithView()}))}var z=F.getZIndex()||0,tt=p[z];tt||(tt={},p[z]=tt,tt[st.POLYGON]=[],tt[st.CIRCLE]=[],tt[st.LINE_STRING]=[],tt[st.POINT]=[]),tt[T.getType().replace("Multi","")].push(T,F)}}}}}for(var J=Object.keys(p).map(Number).sort(Hu),v=0,nt=J.length;v<nt;++v){var tt=p[J[v]];for(var it in tt)for(var _t=tt[it],L=0,O=_t.length;L<O;L+=2){c.setStyle(_t[L+1]);for(var R=0,$=e.length;R<$;++R)c.setTransform(e[R]),c.drawGeometry(_t[L])}}return l.getImageData(0,0,u.width,u.height)}function o4(r,e,t){var n=[];if(t){var i=Math.floor(Math.round(r[0])*Lo),a=Math.floor(Math.round(r[1])*Lo),o=(bn(i,0,t.width-1)+bn(a,0,t.height-1)*t.width)*4,s=t.data[o],A=t.data[o+1],l=t.data[o+2],u=l+256*(A+256*s),c=Math.floor((256*256*256-1)/e.length);u&&u%c===0&&n.push(e[u/c-1])}return n}var xZ=.5,s4={Point:MZ,LineString:LZ,Polygon:PZ,MultiPoint:NZ,MultiLineString:OZ,MultiPolygon:RZ,GeometryCollection:IZ,Circle:bZ};function SZ(r,e){return parseInt(de(r),10)-parseInt(de(e),10)}function A4(r,e){var t=ax(r,e);return t*t}function ax(r,e){return xZ*r/e}function bZ(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),lr.CIRCLE);s.setFillStrokeStyle(a,o),s.drawCircle(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),lr.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function Q_(r,e,t,n,i,a,o){var s=!1,A=t.getImage();if(A){var l=A.getImageState();l==je.LOADED||l==je.ERROR?A.unlistenImageChange(i):(l==je.IDLE&&A.load(),l=A.getImageState(),A.listenImageChange(i),s=!0)}return FZ(r,e,t,n,a,o),s}function FZ(r,e,t,n,i,a){var o=t.getGeometryFunction()(e);if(o){var s=o.simplifyTransformed(n,i),A=t.getRenderer();if(A)l4(r,s,t,e);else{var l=s4[s.getType()];l(r,s,t,e,a)}}}function l4(r,e,t,n){if(e.getType()==st.GEOMETRY_COLLECTION){for(var i=e.getGeometries(),a=0,o=i.length;a<o;++a)l4(r,i[a],t,n);return}var s=r.getBuilder(t.getZIndex(),lr.DEFAULT);s.drawCustom(e,n,t.getRenderer(),t.getHitDetectionRenderer())}function IZ(r,e,t,n,i){var a=e.getGeometriesArray(),o,s;for(o=0,s=a.length;o<s;++o){var A=s4[a[o].getType()];A(r,a[o],t,n,i)}}function LZ(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),lr.LINE_STRING);o.setFillStrokeStyle(null,a),o.drawLineString(e,n)}var s=t.getText();if(s&&s.getText()){var A=(i||r).getBuilder(t.getZIndex(),lr.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function OZ(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),lr.LINE_STRING);o.setFillStrokeStyle(null,a),o.drawMultiLineString(e,n)}var s=t.getText();if(s&&s.getText()){var A=(i||r).getBuilder(t.getZIndex(),lr.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function RZ(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(o||a){var s=r.getBuilder(t.getZIndex(),lr.POLYGON);s.setFillStrokeStyle(a,o),s.drawMultiPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),lr.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function MZ(r,e,t,n,i){var a=t.getImage(),o=t.getText(),s;if(i&&(r=i,s=a&&o&&o.getText()?{}:void 0),a){if(a.getImageState()!=je.LOADED)return;var A=r.getBuilder(t.getZIndex(),lr.IMAGE);A.setImageStyle(a,s),A.drawPoint(e,n)}if(o&&o.getText()){var l=r.getBuilder(t.getZIndex(),lr.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function NZ(r,e,t,n,i){var a=t.getImage(),o=t.getText(),s;if(i&&(r=i,s=a&&o&&o.getText()?{}:void 0),a){if(a.getImageState()!=je.LOADED)return;var A=r.getBuilder(t.getZIndex(),lr.IMAGE);A.setImageStyle(a,s),A.drawMultiPoint(e,n)}if(o&&o.getText()){var l=(i||r).getBuilder(t.getZIndex(),lr.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function PZ(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),lr.POLYGON);s.setFillStrokeStyle(a,o),s.drawPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),lr.TEXT);l.setTextStyle(A),l.drawText(e,n)}}var UZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),DZ=function(r){UZ(e,r);function e(t){var n=r.call(this,t)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.dirty_=!1,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=wi(),n.wrappedRenderedExtent_=wi(),n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n}return e.prototype.renderWorlds=function(t,n,i){var a=n.extent,o=n.viewState,s=o.center,A=o.resolution,l=o.projection,u=o.rotation,c=l.getExtent(),h=this.getLayer().getSource(),f=n.pixelRatio,p=n.viewHints,v=!(p[mn.ANIMATING]||p[mn.INTERACTING]),m=this.context,g=Math.round(n.size[0]*f),_=Math.round(n.size[1]*f),E=h.getWrapX()&&l.canWrapX(),B=E?Or(c):null,L=E?Math.ceil((a[2]-c[2])/B)+1:1,O=E?Math.floor((a[0]-c[0])/B):0;do{var b=this.getRenderTransform(s,A,u,f,g,_,O*B);t.execute(m,1,b,u,v,void 0,i)}while(++O<L)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,n){var i=t.pixelRatio,a=t.layerStatesArray[t.layerIndex];cX(this.pixelTransform,1/i,1/i),Wg(this.inversePixelTransform,this.pixelTransform);var o=QF(this.pixelTransform);this.useContainer(n,o,a.opacity,this.getBackground(t));var s=this.context,A=s.canvas,l=this.replayGroup_,u=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!u||u.isEmpty()))return null;var c=Math.round(t.size[0]*i),h=Math.round(t.size[1]*i);A.width!=c||A.height!=h?(A.width=c,A.height=h,A.style.transform!==o&&(A.style.transform=o)):this.containerReused||s.clearRect(0,0,c,h),this.preRender(s,t);var f=t.viewState;f.projection;var p=!1,v=!0;if(a.extent&&this.clipping){var m=Ro(a.extent);v=Nn(m,t.extent),p=v&&!Oo(m,t.extent),p&&this.clipUnrotated(s,t,m)}v&&this.renderWorlds(l,t),p&&s.restore(),this.postRender(s,t);var g=p6(a.opacity),_=this.container;return g!==_.style.opacity&&(_.style.opacity=g),this.renderedRotation_!==f.rotation&&(this.renderedRotation_=f.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(n){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];hn(this.pixelTransform,i);var a=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,A=this.renderedProjection_,l=this.wrappedRenderedExtent_,u=this.getLayer(),c=[],h=i[0]*Lo,f=i[1]*Lo;c.push(this.getRenderTransform(a,o,s,Lo,h,f,0).slice());var p=u.getSource(),v=A.getExtent();if(p.getWrapX()&&A.canWrapX()&&!Oo(v,l)){for(var m=l[0],g=Or(v),_=0,E=void 0;m<v[0];)--_,E=g*_,c.push(this.getRenderTransform(a,o,s,Lo,h,f,E).slice()),m+=g;for(_=0,m=l[2];m>v[2];)++_,E=g*_,c.push(this.getRenderTransform(a,o,s,Lo,h,f,E).slice()),m-=g}this.hitDetectionImageData_=a4(i,c,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}n(o4(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){var s=this;if(this.replayGroup_){var A=n.viewState.resolution,l=n.viewState.rotation,u=this.getLayer(),c={},h=function(v,m,g){var _=de(v),E=c[_];if(E){if(E!==!0&&g<E.distanceSq){if(g===0)return c[_]=!0,o.splice(o.lastIndexOf(E),1),a(v,u,m);E.geometry=m,E.distanceSq=g}}else{if(g===0)return c[_]=!0,a(v,u,m);o.push(c[_]={feature:v,layer:u,geometry:m,distanceSq:g,callback:a})}},f,p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some(function(v){return f=v.forEachFeatureAtCoordinate(t,A,l,i,h,v===s.declutterExecutorGroup&&n.declutterTree?n.declutterTree.all().map(function(m){return m.value}):null)}),f}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var n=this.getLayer(),i=n.getSource();if(!i)return!1;var a=t.viewHints[mn.ANIMATING],o=t.viewHints[mn.INTERACTING],s=n.getUpdateWhileAnimating(),A=n.getUpdateWhileInteracting();if(!this.dirty_&&!s&&a||!A&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var l=t.extent,u=t.viewState,c=u.projection,h=u.resolution,f=t.pixelRatio,p=n.getRevision(),v=n.getRenderBuffer(),m=n.getRenderOrder();m===void 0&&(m=SZ);var g=u.center.slice(),_=Ka(l,v*h),E=_.slice(),B=[_.slice()],L=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!Oo(L,t.extent)){var O=Or(L),b=Math.max(Or(_)/2,O);_[0]=L[0]-b,_[2]=L[2]+b,YF(g,c);var T=e6(B[0],c);T[0]<L[0]&&T[2]<L[2]?B.push([T[0]+O,T[1],T[2]+O,T[3]]):T[0]>L[0]&&T[2]>L[2]&&B.push([T[0]-O,T[1],T[2]-O,T[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==m&&Oo(this.wrappedRenderedExtent_,_))return Cl(this.renderedExtent_,E)||(this.hitDetectionImageData_=null,this.renderedExtent_=E),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var F=new U_(ax(h,f),_,h,f),M;this.getLayer().getDeclutter()&&(M=new U_(ax(h,f),_,h,f));for(var S,x,N,x=0,N=B.length;x<N;++x)i.loadFeatures(B[x],h,c);var P=A4(h,f),Y=function(it){var _t,R=it.getStyleFunction()||n.getStyleFunction();if(R&&(_t=R(it,h)),_t){var $=this.renderFeature(it,P,_t,F,S,M);this.dirty_=this.dirty_||$}}.bind(this),z=sw(_),tt=i.getFeaturesInExtent(z);m&&tt.sort(m);for(var x=0,N=tt.length;x<N;++x)Y(tt[x]);this.renderedFeatures_=tt;var J=F.finish(),nt=new D_(_,h,f,i.getOverlaps(),J,n.getRenderBuffer());return M&&(this.declutterExecutorGroup=new D_(_,h,f,i.getOverlaps(),M.finish(),n.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=m,this.renderedExtent_=E,this.wrappedRenderedExtent_=_,this.renderedCenter_=g,this.renderedProjection_=c,this.replayGroup_=nt,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,n,i,a,o,s){if(!i)return!1;var A=!1;if(Array.isArray(i))for(var l=0,u=i.length;l<u;++l)A=Q_(a,t,i[l],n,this.boundHandleStyleImageChange_,o,s)||A;else A=Q_(a,t,i,n,this.boundHandleStyleImageChange_,o,s);return A},e}(wI),QZ=DZ,HZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),GZ=function(r){HZ(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new QZ(this)},e}(dw),dA=GZ,kZ=function(){function r(e){this.rbush_=new Z6(e),this.items_={}}return r.prototype.insert=function(e,t){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(n),this.items_[de(t)]=n},r.prototype.load=function(e,t){for(var n=new Array(t.length),i=0,a=t.length;i<a;i++){var o=e[i],s=t[i],A={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[i]=A,this.items_[de(s)]=A}this.rbush_.load(n)},r.prototype.remove=function(e){var t=de(e),n=this.items_[t];return delete this.items_[t],this.rbush_.remove(n)!==null},r.prototype.update=function(e,t){var n=this.items_[de(t)],i=[n.minX,n.minY,n.maxX,n.maxY];cA(i,e)||(this.remove(t),this.insert(e,t))},r.prototype.getAll=function(){var e=this.rbush_.all();return e.map(function(t){return t.value})},r.prototype.getInExtent=function(e){var t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]},n=this.rbush_.search(t);return n.map(function(i){return i.value})},r.prototype.forEach=function(e){return this.forEach_(this.getAll(),e)},r.prototype.forEachInExtent=function(e,t){return this.forEach_(this.getInExtent(e),t)},r.prototype.forEach_=function(e,t){for(var n,i=0,a=e.length;i<a;i++)if(n=t(e[i]),n)return n;return n},r.prototype.isEmpty=function(){return dh(this.items_)},r.prototype.clear=function(){this.rbush_.clear(),this.items_={}},r.prototype.getExtent=function(e){var t=this.rbush_.toJSON();return ho(t.minX,t.minY,t.maxX,t.maxY,e)},r.prototype.concat=function(e){this.rbush_.load(e.rbush_.all());for(var t in e.items_)this.items_[t]=e.items_[t]},r}(),H_=kZ,$Z=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),jZ=function(r){$Z(e,r);function e(t){var n=r.call(this)||this;n.projection=Re(t.projection),n.attributions_=MM(t.attributions),n.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,n.loading=!1,n.state_=t.state!==void 0?t.state:Ha.READY,n.wrapX_=t.wrapX!==void 0?t.wrapX:!1,n.interpolate_=!!t.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise(function(a,o){i.viewResolver=a,i.viewRejector=o}),n}return e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Te()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=MM(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(ui);function MM(r){return r?Array.isArray(r)?function(e){return r}:typeof r=="function"?r:function(e){return[r]}:null}var vw=jZ,Ri={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function u4(r,e){return[[-1/0,-1/0,1/0,1/0]]}function VZ(r,e){return[r]}function KZ(r){return function(e,t,n){var i=r.getZForResolution(QY(t)),a=r.getTileRangeForExtentAndZ(Ro(e),i),o=[],s=[i,0,0];for(s[1]=a.minX;s[1]<=a.maxX;++s[1])for(s[2]=a.minY;s[2]<=a.maxY;++s[2])o.push(sw(r.getTileCoordExtent(s)));return o}}var zZ=Object.freeze(Object.defineProperty({__proto__:null,all:u4,bbox:VZ,tile:KZ},Symbol.toStringTag,{value:"Module"})),XZ=!1;function YZ(r,e,t,n,i,a,o){var s=new XMLHttpRequest;s.open("GET",typeof r=="function"?r(t,n,i):r,!0),e.getType()==Ts.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.withCredentials=XZ,s.onload=function(A){if(!s.status||s.status>=200&&s.status<300){var l=e.getType(),u=void 0;l==Ts.JSON||l==Ts.TEXT?u=s.responseText:l==Ts.XML?(u=s.responseXML,u||(u=new DOMParser().parseFromString(s.responseText,"application/xml"))):l==Ts.ARRAY_BUFFER&&(u=s.response),u?a(e.readFeatures(u,{extent:t,featureProjection:i}),e.readProjection(u)):o()}else o()},s.onerror=o,s.send()}function NM(r,e){return function(t,n,i,a,o){var s=this;YZ(r,e,t,n,i,function(A,l){s.addFeatures(A),a!==void 0&&a(A)},o||hh)}}var c4=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),tu=function(r){c4(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.feature=n,a.features=i,a}return e}(vo),WZ=function(r){c4(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:Ha.READY,wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,n.on,n.once,n.un,n.loader_=hh,n.format_=i.format,n.overlaps_=i.overlaps===void 0?!0:i.overlaps,n.url_=i.url,i.loader!==void 0?n.loader_=i.loader:n.url_!==void 0&&(we(n.format_,7),n.loader_=NM(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:u4;var a=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=a?new H_:null,n.loadedExtentsRtree_=new H_,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null;var o,s;return Array.isArray(i.features)?s=i.features:i.features&&(o=i.features,s=o.getArray()),!a&&o===void 0&&(o=new Ai(s)),s!==void 0&&n.addFeaturesInternal(s),o!==void 0&&n.bindFeaturesCollection_(o),n}return e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var n=de(t);if(!this.addToIndex_(n,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(n,t);var i=t.getGeometry();if(i){var a=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(a,t)}else this.nullGeometryFeatures_[n]=t;this.dispatchEvent(new tu(Ri.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,n){this.featureChangeKeys_[t]=[Ue(n,me.CHANGE,this.handleFeatureChange_,this),Ue(n,ph.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,n){var i=!0,a=n.getId();return a!==void 0&&(a.toString()in this.idIndex_?i=!1:this.idIndex_[a.toString()]=n),i&&(we(!(t in this.uidIndex_),30),this.uidIndex_[t]=n),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var n=[],i=[],a=[],o=0,s=t.length;o<s;o++){var A=t[o],l=de(A);this.addToIndex_(l,A)&&i.push(A)}for(var o=0,u=i.length;o<u;o++){var A=i[o],l=de(A);this.setupChangeEvents_(l,A);var c=A.getGeometry();if(c){var h=c.getExtent();n.push(h),a.push(A)}else this.nullGeometryFeatures_[l]=A}if(this.featuresRtree_&&this.featuresRtree_.load(n,a),this.hasListener(Ri.ADDFEATURE))for(var o=0,f=i.length;o<f;o++)this.dispatchEvent(new tu(Ri.ADDFEATURE,i[o]))},e.prototype.bindFeaturesCollection_=function(t){var n=!1;this.addEventListener(Ri.ADDFEATURE,function(i){n||(n=!0,t.push(i.feature),n=!1)}),this.addEventListener(Ri.REMOVEFEATURE,function(i){n||(n=!0,t.remove(i.feature),n=!1)}),t.addEventListener($n.ADD,function(i){n||(n=!0,this.addFeature(i.element),n=!1)}.bind(this)),t.addEventListener($n.REMOVE,function(i){n||(n=!0,this.removeFeature(i.element),n=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var n in this.featureChangeKeys_){var i=this.featureChangeKeys_[n];i.forEach(Nr)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var a=function(A){this.removeFeatureInternal(A)}.bind(this);this.featuresRtree_.forEach(a);for(var o in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[o])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var s=new tu(Ri.CLEAR);this.dispatchEvent(s),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,n){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(a){var o=a.getGeometry();if(o.intersectsCoordinate(t))return n(a)})},e.prototype.forEachFeatureInExtent=function(t,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)},e.prototype.forEachFeatureIntersectingExtent=function(t,n){return this.forEachFeatureInExtent(t,function(i){var a=i.getGeometry();if(a.intersectsExtent(t)){var o=n(i);if(o)return o}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),dh(this.nullGeometryFeatures_)||Gr(t,VF(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var n=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){n.push(i)}),n},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,n){var i=t[0],a=t[1],o=null,s=[NaN,NaN],A=1/0,l=[-1/0,-1/0,1/0,1/0],u=n||sA;return this.featuresRtree_.forEachInExtent(l,function(c){if(u(c)){var h=c.getGeometry(),f=A;if(A=h.closestPointXY(i,a,s,A),A<f){o=c;var p=Math.sqrt(A);l[0]=i-p,l[1]=a-p,l[2]=i+p,l[3]=a+p}}}),o},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var n=this.idIndex_[t.toString()];return n!==void 0?n:null},e.prototype.getFeatureByUid=function(t){var n=this.uidIndex_[t];return n!==void 0?n:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var n=t.target,i=de(n),a=n.getGeometry();if(!a)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(n),this.nullGeometryFeatures_[i]=n);else{var o=a.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,n)):this.featuresRtree_&&this.featuresRtree_.update(o,n)}var s=n.getId();if(s!==void 0){var A=s.toString();this.idIndex_[A]!==n&&(this.removeFromIdIndex_(n),this.idIndex_[A]=n)}else this.removeFromIdIndex_(n),this.uidIndex_[i]=n;this.changed(),this.dispatchEvent(new tu(Ri.CHANGEFEATURE,n))},e.prototype.hasFeature=function(t){var n=t.getId();return n!==void 0?n in this.idIndex_:de(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&dh(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0},e.prototype.loadFeatures=function(t,n,i){for(var a=this.loadedExtentsRtree_,o=this.strategy_(t,n,i),s=function(c,h){var f=o[c],p=a.forEachInExtent(f,function(v){return Oo(v.extent,f)});p||(++A.loadingExtentsCount_,A.dispatchEvent(new tu(Ri.FEATURESLOADSTART)),A.loader_.call(A,f,n,i,function(v){--this.loadingExtentsCount_,this.dispatchEvent(new tu(Ri.FEATURESLOADEND,void 0,v))}.bind(A),function(){--this.loadingExtentsCount_,this.dispatchEvent(new tu(Ri.FEATURESLOADERROR))}.bind(A)),a.insert(f,{extent:f.slice()}))},A=this,l=0,u=o.length;l<u;++l)s(l);this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),r.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var n=this.loadedExtentsRtree_,i;n.forEachInExtent(t,function(a){if(cA(a.extent,t))return i=a,!0}),i&&n.remove(i)},e.prototype.removeFeature=function(t){if(t){var n=de(t);n in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[n]:this.featuresRtree_&&this.featuresRtree_.remove(t);var i=this.removeFeatureInternal(t);i&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var n=de(t),i=this.featureChangeKeys_[n];if(i){i.forEach(Nr),delete this.featureChangeKeys_[n];var a=t.getId();return a!==void 0&&delete this.idIndex_[a.toString()],delete this.uidIndex_[n],this.dispatchEvent(new tu(Ri.REMOVEFEATURE,t)),t}},e.prototype.removeFromIdIndex_=function(t){var n=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],n=!0;break}return n},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){we(this.format_,7),this.url_=t,this.setLoader(NM(t,this.format_))},e}(vw),Tl=WZ,h4=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),br={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},Mm={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},Nm=function(r){h4(e,r);function e(t,n){var i=r.call(this,t)||this;return i.feature=n,i}return e}(vo),qZ=function(r){h4(e,r);function e(t){var n=this,i=t;i.stopDown||(i.stopDown=xh),n=r.call(this,i)||this,n.on,n.once,n.un,n.shouldHandle_=!1,n.downPx_=null,n.downTimeout_,n.lastDragTime_,n.pointerType_,n.freehand_=!1,n.source_=t.source?t.source:null,n.features_=t.features?t.features:null,n.snapTolerance_=t.snapTolerance?t.snapTolerance:12,n.type_=t.type,n.mode_=JZ(n.type_),n.stopClick_=!!t.stopClick,n.minPoints_=t.minPoints?t.minPoints:n.mode_===br.POLYGON?3:2,n.maxPoints_=n.mode_===br.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,n.finishCondition_=t.finishCondition?t.finishCondition:sA;var a=t.geometryFunction;if(!a){var o=n.mode_;if(o===br.CIRCLE)a=function(A,l,u){var c=l||new mI([NaN,NaN]),h=xn(A[0]),f=al(h,xn(A[A.length-1]));return c.setCenterAndRadius(h,Math.sqrt(f)),c};else{var s;o===br.POINT?s=pr:o===br.LINE_STRING?s=kr:o===br.POLYGON&&(s=Fn),a=function(A,l,u){return l?o===br.POLYGON?A[0].length?l.setCoordinates([A[0].concat([A[0][0]])]):l.setCoordinates([]):l.setCoordinates(A):l=new s(A),l}}}return n.geometryFunction_=a,n.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,n.finishCoordinate_=null,n.sketchFeature_=null,n.sketchPoint_=null,n.sketchCoords_=null,n.sketchLine_=null,n.sketchLineCoords_=null,n.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,n.overlay_=new dA({source:new Tl({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:ZZ(),updateWhileInteracting:!0}),n.geometryName_=t.geometryName,n.condition_=t.condition?t.condition:pw,n.freehandCondition_,t.freehand?n.freehandCondition_=hw:n.freehandCondition_=t.freehandCondition?t.freehandCondition:ny,n.addChangeListener(rx.ACTIVE,n.updateState_),n}return e.prototype.setMap=function(t){r.prototype.setMap.call(this,t),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(t){t.originalEvent.type===me.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!==br.POINT&&this.freehandCondition_(t);var n=t.type===or.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===or.POINTERDRAG){var a=Date.now();a-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===or.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===or.POINTERDOWN?i=!1:n&&this.getPointerCount()<2?(i=t.type===or.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===or.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===or.DBLCLICK&&(i=!1),r.prototype.handleEvent.call(this,t)&&i},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new YA(or.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var n=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var i=!this.finishCoordinate_;i&&this.startDrawing_(t.coordinate),!i&&this.freehand_?this.finishDrawing():!this.freehand_&&(!i||this.mode_===br.POINT)&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),n=!1}else this.freehand_&&this.abortDrawing();return!n&&this.stopClick_&&t.preventDefault(),n},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var n=this.downPx_,i=t.pixel,a=n[0]-i[0],o=n[1]-i[1],s=a*a+o*o;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var n=!1;if(this.sketchFeature_){var i=!1,a=[this.finishCoordinate_],o=this.mode_;if(o===br.POINT)n=!0;else if(o===br.CIRCLE)n=this.sketchCoords_.length===2;else if(o===br.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(o===br.POLYGON){var s=this.sketchCoords_;i=s[0].length>this.minPoints_,a=[s[0][0],s[0][s[0].length-2]]}if(i)for(var A=this.getMap(),l=0,u=a.length;l<u;l++){var c=a[l],h=A.getPixelFromCoordinate(c),f=t[0]-h[0],p=t[1]-h[1],v=this.freehand_?1:this.snapTolerance_;if(n=Math.sqrt(f*f+p*p)<=v,n){this.finishCoordinate_=c;break}}}return n},e.prototype.createOrUpdateSketchPoint_=function(t){if(!this.sketchPoint_)this.sketchPoint_=new sr(new pr(t)),this.updateSketchFeatures_();else{var n=this.sketchPoint_.getGeometry();n.setCoordinates(t)}},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new sr);var n=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),i.changed()):(i=new kr(n.getFlatCoordinates(),n.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var n=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===br.POINT?this.sketchCoords_=t.slice():this.mode_===br.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new sr(new kr(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,n);this.sketchFeature_=new sr,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Nm(Mm.DRAWSTART,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var n=this.getMap(),i=this.sketchFeature_.getGeometry(),a=n.getView().getProjection(),o,s;if(this.mode_===br.POINT?s=this.sketchCoords_:this.mode_===br.POLYGON?(o=this.sketchCoords_[0],s=o[o.length-1],this.atFinish_(n.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(o=this.sketchCoords_,s=o[o.length-1]),s[0]=t[0],s[1]=t[1],this.geometryFunction_(this.sketchCoords_,i,a),this.sketchPoint_){var A=this.sketchPoint_.getGeometry();A.setCoordinates(t)}if(i.getType()===st.POLYGON&&this.mode_!==br.POLYGON)this.createOrUpdateCustomSketchLine_(i);else if(this.sketchLineCoords_){var l=this.sketchLine_.getGeometry();l.setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var n=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),a,o,s=this.mode_;s===br.LINE_STRING||s===br.CIRCLE?(this.finishCoordinate_=t.slice(),o=this.sketchCoords_,o.length>=this.maxPoints_&&(this.freehand_?o.pop():a=!0),o.push(t.slice()),this.geometryFunction_(o,n,i)):s===br.POLYGON&&(o=this.sketchCoords_[0],o.length>=this.maxPoints_&&(this.freehand_?o.pop():a=!0),o.push(t.slice()),a&&(this.finishCoordinate_=o[0]),this.geometryFunction_(this.sketchCoords_,n,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),a&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),i,a=this.mode_;if(a===br.LINE_STRING||a===br.CIRCLE){if(i=this.sketchCoords_,i.splice(-2,1),i.length>=2){this.finishCoordinate_=i[i.length-2].slice();var o=this.finishCoordinate_.slice();i[i.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(i,t,n),t.getType()===st.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(a===br.POLYGON){i=this.sketchCoords_[0],i.splice(-2,1);var s=this.sketchLine_.getGeometry();if(i.length>=2){var o=i[i.length-2].slice();i[i.length-1]=o,this.createOrUpdateSketchPoint_(o)}s.setCoordinates(i),this.geometryFunction_(this.sketchCoords_,t,n)}i.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var n=this.sketchCoords_,i=t.getGeometry(),a=this.getMap().getView().getProjection();this.mode_===br.LINE_STRING?(n.pop(),this.geometryFunction_(n,i,a)):this.mode_===br.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i,a),n=i.getCoordinates()),this.type_===st.MULTI_POINT?t.setGeometry(new ns([n])):this.type_===st.MULTI_LINE_STRING?t.setGeometry(new Fa([n])):this.type_===st.MULTI_POLYGON&&t.setGeometry(new Ia([n])),this.dispatchEvent(new Nm(Mm.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Nm(Mm.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var n=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(t[0]);var a;if(n===br.LINE_STRING||n===br.CIRCLE)a=this.sketchCoords_;else if(n===br.POLYGON)a=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&a.shift(),a.pop();for(var o=0;o<t.length;o++)this.addToDrawing_(t[o]);var s=t[t.length-1];this.addToDrawing_(s),this.modifyDrawing_(s)},e.prototype.extend=function(t){var n=t.getGeometry(),i=n;this.sketchFeature_=t,this.sketchCoords_=i.getCoordinates();var a=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=a.slice(),this.sketchCoords_.push(a.slice()),this.sketchPoint_=new sr(new pr(a)),this.updateSketchFeatures_(),this.dispatchEvent(new Nm(Mm.DRAWSTART,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var n=this.overlay_.getSource();n.clear(!0),n.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),n=this.getActive();(!t||!n)&&this.abortDrawing(),this.overlay_.setMap(n?t:null)},e}(Do);function ZZ(){var r=_I();return function(e,t){return r[e.getGeometry().getType()]}}function JZ(r){switch(r){case st.POINT:case st.MULTI_POINT:return br.POINT;case st.LINE_STRING:case st.MULTI_LINE_STRING:return br.LINE_STRING;case st.POLYGON:case st.MULTI_POLYGON:return br.POLYGON;case st.CIRCLE:return br.CIRCLE;default:throw new Error("Invalid type: "+r)}}var BI=qZ,f4=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),PM=0,Gv=1,UM=[0,0,0,0],up=[],MC={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},NC=function(r){f4(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.features=n,a.mapBrowserEvent=i,a}return e}(vo),tJ=function(r){f4(e,r);function e(t){var n=r.call(this,t)||this;n.on,n.once,n.un,n.boundHandleFeatureChange_=n.handleFeatureChange_.bind(n),n.condition_=t.condition?t.condition:yI,n.defaultDeleteCondition_=function(a){return j6(a)&&fw(a)},n.deleteCondition_=t.deleteCondition?t.deleteCondition:n.defaultDeleteCondition_,n.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:hw,n.vertexFeature_=null,n.vertexSegments_=null,n.lastPixel_=[0,0],n.ignoreNextSingleClick_=!1,n.featuresBeingModified_=null,n.rBush_=new H_,n.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,n.snappedToVertex_=!1,n.changingFeature_=!1,n.dragSegments_=[],n.overlay_=new dA({source:new Tl({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:rJ(),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.SEGMENT_WRITERS_={Point:n.writePointGeometry_.bind(n),LineString:n.writeLineStringGeometry_.bind(n),LinearRing:n.writeLineStringGeometry_.bind(n),Polygon:n.writePolygonGeometry_.bind(n),MultiPoint:n.writeMultiPointGeometry_.bind(n),MultiLineString:n.writeMultiLineStringGeometry_.bind(n),MultiPolygon:n.writeMultiPolygonGeometry_.bind(n),Circle:n.writeCircleGeometry_.bind(n),GeometryCollection:n.writeGeometryCollectionGeometry_.bind(n)},n.source_=null,n.hitDetection_=null;var i;if(t.features?i=t.features:t.source&&(n.source_=t.source,i=new Ai(n.source_.getFeatures()),n.source_.addEventListener(Ri.ADDFEATURE,n.handleSourceAdd_.bind(n)),n.source_.addEventListener(Ri.REMOVEFEATURE,n.handleSourceRemove_.bind(n))),!i)throw new Error("The modify interaction requires features, a source or a layer");return t.hitDetection&&(n.hitDetection_=t.hitDetection),n.features_=i,n.features_.forEach(n.addFeature_.bind(n)),n.features_.addEventListener($n.ADD,n.handleFeatureAdd_.bind(n)),n.features_.addEventListener($n.REMOVE,n.handleFeatureRemove_.bind(n)),n.lastPointerEvent_=null,n.delta_=[0,0],n.snapToPointer_=t.snapToPointer===void 0?!n.hitDetection_:t.snapToPointer,n}return e.prototype.addFeature_=function(t){var n=t.getGeometry();if(n){var i=this.SEGMENT_WRITERS_[n.getType()];i&&i(t,n)}var a=this.getMap();a&&a.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,a),t.addEventListener(me.CHANGE,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,n){if(!this.featuresBeingModified_){this.featuresBeingModified_=new Ai;for(var i=this.featuresBeingModified_.getArray(),a=0,o=n.length;a<o;++a)for(var s=n[a],A=0,l=s.length;A<l;++A){var u=s[A].feature;u&&i.indexOf(u)===-1&&this.featuresBeingModified_.push(u)}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new NC(MC.MODIFYSTART,this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(me.CHANGE,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var n=this.rBush_,i=[];n.forEach(function(A){t===A.feature&&i.push(A)});for(var a=i.length-1;a>=0;--a){for(var o=i[a],s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===o&&this.dragSegments_.splice(s,1);n.remove(o)}},e.prototype.setActive=function(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),r.prototype.setActive.call(this,t)},e.prototype.setMap=function(t){this.overlay_.setMap(t),r.prototype.setMap.call(this,t)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var n=t.target;this.removeFeature_(n),this.addFeature_(n)}},e.prototype.handleFeatureRemove_=function(t){var n=t.element;this.removeFeature_(n)},e.prototype.writePointGeometry_=function(t,n){var i=n.getCoordinates(),a={feature:t,geometry:n,segment:[i,i]};this.rBush_.insert(n.getExtent(),a)},e.prototype.writeMultiPointGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a){var s=i[a],A={feature:t,geometry:n,depth:[a],index:a,segment:[s,s]};this.rBush_.insert(n.getExtent(),A)}},e.prototype.writeLineStringGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length-1;a<o;++a){var s=i.slice(a,a+2),A={feature:t,geometry:n,index:a,segment:s};this.rBush_.insert(Wi(s),A)}},e.prototype.writeMultiLineStringGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A){var u=s.slice(A,A+2),c={feature:t,geometry:n,depth:[a],index:A,segment:u};this.rBush_.insert(Wi(u),c)}},e.prototype.writePolygonGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A){var u=s.slice(A,A+2),c={feature:t,geometry:n,depth:[a],index:A,segment:u};this.rBush_.insert(Wi(u),c)}},e.prototype.writeMultiPolygonGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length;A<l;++A)for(var u=s[A],c=0,h=u.length-1;c<h;++c){var f=u.slice(c,c+2),p={feature:t,geometry:n,depth:[A,a],index:c,segment:f};this.rBush_.insert(Wi(f),p)}},e.prototype.writeCircleGeometry_=function(t,n){var i=n.getCenter(),a={feature:t,geometry:n,index:PM,segment:[i,i]},o={feature:t,geometry:n,index:Gv,segment:[i,i]},s=[a,o];a.featureSegments=s,o.featureSegments=s,this.rBush_.insert(qc(i),a);var A=n;this.rBush_.insert(A.getExtent(),o)},e.prototype.writeGeometryCollectionGeometry_=function(t,n){for(var i=n.getGeometriesArray(),a=0;a<i.length;++a){var o=i[a],s=this.SEGMENT_WRITERS_[o.getType()];s(t,o)}},e.prototype.createOrUpdateVertexFeature_=function(t,n,i){var a=this.vertexFeature_;if(!a)a=new sr(new pr(t)),this.vertexFeature_=a,this.overlay_.getSource().addFeature(a);else{var o=a.getGeometry();o.setCoordinates(t)}return a.set("features",n),a.set("geometries",i),a},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;var n;return!t.map.getView().getInteracting()&&t.type==or.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=or.SINGLECLICK||!this.ignoreNextSingleClick_?n=this.removePoint():n=!0),t.type==or.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),r.prototype.handleEvent.call(this,t)&&!n},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var n=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],a=[],o=0,s=this.dragSegments_.length;o<s;++o){var A=this.dragSegments_[o],l=A[0],u=l.feature;i.indexOf(u)===-1&&i.push(u);var c=l.geometry;a.indexOf(c)===-1&&a.push(c);for(var h=l.depth,f=void 0,p=l.segment,v=A[1];n.length<c.getStride();)n.push(p[v][n.length]);switch(c.getType()){case st.POINT:f=n,p[0]=n,p[1]=n;break;case st.MULTI_POINT:f=c.getCoordinates(),f[l.index]=n,p[0]=n,p[1]=n;break;case st.LINE_STRING:f=c.getCoordinates(),f[l.index+v]=n,p[v]=n;break;case st.MULTI_LINE_STRING:f=c.getCoordinates(),f[h[0]][l.index+v]=n,p[v]=n;break;case st.POLYGON:f=c.getCoordinates(),f[h[0]][l.index+v]=n,p[v]=n;break;case st.MULTI_POLYGON:f=c.getCoordinates(),f[h[1]][h[0]][l.index+v]=n,p[v]=n;break;case st.CIRCLE:if(p[0]=n,p[1]=n,l.index===PM)this.changingFeature_=!0,c.setCenter(n),this.changingFeature_=!1;else{this.changingFeature_=!0;var m=t.map.getView().getProjection(),g=iM(xn(c.getCenter()),xn(n)),_=gh();if(_){var E=c.clone().transform(_,m);E.setRadius(g),g=E.transform(m,_).getRadius()}c.setRadius(g),this.changingFeature_=!1}break}f&&this.setGeometryCoordinates_(c,f)}this.createOrUpdateVertexFeature_(n,i,a)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var n=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,n),this.dragSegments_.length=0,this.featuresBeingModified_=null;var i=this.vertexFeature_;if(i){var a=t.map.getView().getProjection(),o=[],s=i.getGeometry().getCoordinates(),A=Wi([s]),l=this.rBush_.getInExtent(A),u={};l.sort(eJ);for(var c=0,h=l.length;c<h;++c){var f=l[c],p=f.segment,v=de(f.geometry),m=f.depth;if(m&&(v+="-"+m.join("-")),u[v]||(u[v]=new Array(2)),f.geometry.getType()===st.CIRCLE&&f.index===Gv){var g=QM(n,f,a);Es(g,s)&&!u[v][0]&&(this.dragSegments_.push([f,0]),u[v][0]=f);continue}if(Es(p[0],s)&&!u[v][0]){this.dragSegments_.push([f,0]),u[v][0]=f;continue}if(Es(p[1],s)&&!u[v][1]){if((f.geometry.getType()===st.LINE_STRING||f.geometry.getType()===st.MULTI_LINE_STRING)&&u[v][0]&&u[v][0].index===0)continue;this.dragSegments_.push([f,1]),u[v][1]=f;continue}de(p)in this.vertexSegments_&&!u[v][0]&&!u[v][1]&&this.insertVertexCondition_(t)&&o.push(f)}o.length&&this.willModifyFeatures_(t,[o]);for(var _=o.length-1;_>=0;--_)this.insertVertex_(o[_],s)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var n=this.dragSegments_.length-1;n>=0;--n){var i=this.dragSegments_[n][0],a=i.geometry;if(a.getType()===st.CIRCLE){var o=a.getCenter(),s=i.featureSegments[0],A=i.featureSegments[1];s.segment[0]=o,s.segment[1]=o,A.segment[0]=o,A.segment[1]=o,this.rBush_.update(qc(o),s);var l=a,u=gh();if(u){var c=t.map.getView().getProjection();l=l.clone().transform(u,c),l=R6(l).transform(c,u)}this.rBush_.update(l.getExtent(),A)}else this.rBush_.update(Wi(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new NC(MC.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,n,i){var a=this,o=i||n.getCoordinateFromPixel(t),s=n.getView().getProjection(),A=function(P,Y){return DM(o,P,s)-DM(o,Y,s)},l,u;if(this.hitDetection_){var c=typeof this.hitDetection_=="object"?function(P){return P===a.hitDetection_}:void 0;n.forEachFeatureAtPixel(t,function(P,Y,z){if(z=z||P.getGeometry(),z.getType()===st.POINT&&mi(a.features_.getArray(),P)){u=z;var tt=z.getFlatCoordinates().slice(0,2);l=[{feature:P,geometry:z,segment:[tt,tt]}]}return!0},{layerFilter:c})}if(!l){var h=Ro(qc(o,UM)),f=n.getView().getResolution()*this.pixelTolerance_,p=sw(Ka(h,f,UM));l=this.rBush_.getInExtent(p)}if(l&&l.length>0){var v=l.sort(A)[0],m=v.segment,g=QM(o,v,s),_=n.getPixelFromCoordinate(g),E=iM(t,_);if(u||E<=this.pixelTolerance_){var B={};if(B[de(m)]=!0,this.snapToPointer_||(this.delta_[0]=g[0]-o[0],this.delta_[1]=g[1]-o[1]),v.geometry.getType()===st.CIRCLE&&v.index===Gv)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(g,[v.feature],[v.geometry]);else{var L=n.getPixelFromCoordinate(m[0]),O=n.getPixelFromCoordinate(m[1]),b=al(_,L),T=al(_,O);E=Math.sqrt(Math.min(b,T)),this.snappedToVertex_=E<=this.pixelTolerance_,this.snappedToVertex_&&(g=b>T?m[1]:m[0]),this.createOrUpdateVertexFeature_(g,[v.feature],[v.geometry]);var F={};F[de(v.geometry)]=!0;for(var M=1,S=l.length;M<S;++M){var x=l[M].segment;if(Es(m[0],x[0])&&Es(m[1],x[1])||Es(m[0],x[1])&&Es(m[1],x[0])){var N=de(l[M].geometry);N in F||(F[N]=!0,B[de(x)]=!0)}else break}}this.vertexSegments_=B;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,n){for(var i=t.segment,a=t.feature,o=t.geometry,s=t.depth,A=t.index,l;n.length<o.getStride();)n.push(0);switch(o.getType()){case st.MULTI_LINE_STRING:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case st.POLYGON:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case st.MULTI_POLYGON:l=o.getCoordinates(),l[s[1]][s[0]].splice(A+1,0,n);break;case st.LINE_STRING:l=o.getCoordinates(),l.splice(A+1,0,n);break;default:return}this.setGeometryCoordinates_(o,l);var u=this.rBush_;u.remove(t),this.updateSegmentIndices_(o,A,s,1);var c={segment:[i[0],n],feature:a,geometry:o,depth:s,index:A};u.insert(Wi(c.segment),c),this.dragSegments_.push([c,1]);var h={segment:[n,i[1]],feature:a,geometry:o,depth:s,index:A+1};u.insert(Wi(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=or.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var n=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new NC(MC.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,n}return!1},e.prototype.removeVertex_=function(){var t=this.dragSegments_,n={},i=!1,a,o,s,A,l,u,c,h,f,p,v;for(l=t.length-1;l>=0;--l)s=t[l],p=s[0],v=de(p.feature),p.depth&&(v+="-"+p.depth.join("-")),v in n||(n[v]={}),s[1]===0?(n[v].right=p,n[v].index=p.index):s[1]==1&&(n[v].left=p,n[v].index=p.index+1);for(v in n){switch(f=n[v].right,c=n[v].left,u=n[v].index,h=u-1,c!==void 0?p=c:p=f,h<0&&(h=0),A=p.geometry,o=A.getCoordinates(),a=o,i=!1,A.getType()){case st.MULTI_LINE_STRING:o[p.depth[0]].length>2&&(o[p.depth[0]].splice(u,1),i=!0);break;case st.LINE_STRING:o.length>2&&(o.splice(u,1),i=!0);break;case st.MULTI_POLYGON:a=a[p.depth[1]];case st.POLYGON:a=a[p.depth[0]],a.length>4&&(u==a.length-1&&(u=0),a.splice(u,1),i=!0,u===0&&(a.pop(),a.push(a[0]),h=a.length-1));break}if(i){this.setGeometryCoordinates_(A,o);var m=[];if(c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[0])),f!==void 0&&(this.rBush_.remove(f),m.push(f.segment[1])),c!==void 0&&f!==void 0){var g={depth:p.depth,feature:p.feature,geometry:p.geometry,index:h,segment:m};this.rBush_.insert(Wi(g.segment),g)}this.updateSegmentIndices_(A,u,p.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return i},e.prototype.setGeometryCoordinates_=function(t,n){this.changingFeature_=!0,t.setCoordinates(n),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,n,i,a){this.rBush_.forEachInExtent(t.getExtent(),function(o){o.geometry===t&&(i===void 0||o.depth===void 0||Cl(o.depth,i))&&o.index>n&&(o.index+=a)})},e}(Do);function eJ(r,e){return r.index-e.index}function DM(r,e,t){var n=e.geometry;if(n.getType()===st.CIRCLE){var i=n;if(e.index===Gv){var a=gh();a&&(i=i.clone().transform(a,t));var o=al(i.getCenter(),xn(r)),s=Math.sqrt(o)-i.getRadius();return s*s}}var A=xn(r);return up[0]=xn(e.segment[0]),up[1]=xn(e.segment[1]),HX(A,up)}function QM(r,e,t){var n=e.geometry;if(n.getType()===st.CIRCLE&&e.index===Gv){var i=n,a=gh();return a&&(i=i.clone().transform(a,t)),Fp(i.getClosestPoint(xn(r)))}var o=xn(r);return up[0]=xn(e.segment[0]),up[1]=xn(e.segment[1]),Fp(zF(o,up))}function rJ(){var r=_I();return function(e,t){return r[st.POINT]}}var TI=tJ,p4=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),nJ={SELECT:"select"},iJ=function(r){p4(e,r);function e(t,n,i,a){var o=r.call(this,t)||this;return o.selected=n,o.deselected=i,o.mapBrowserEvent=a,o}return e}(vo),Pm={},aJ=function(r){p4(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};n.boundAddFeature_=n.addFeature_.bind(n),n.boundRemoveFeature_=n.removeFeature_.bind(n),n.condition_=i.condition?i.condition:fw,n.addCondition_=i.addCondition?i.addCondition:nx,n.removeCondition_=i.removeCondition?i.removeCondition:nx,n.toggleCondition_=i.toggleCondition?i.toggleCondition:ny,n.multi_=i.multi?i.multi:!1,n.filter_=i.filter?i.filter:sA,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.style_=i.style!==void 0?i.style:oJ(),n.features_=i.features||new Ai;var a;if(i.layers)if(typeof i.layers=="function")a=i.layers;else{var o=i.layers;a=function(s){return mi(o,s)}}else a=sA;return n.layerFilter_=a,n.featureLayerAssociation_={},n}return e.prototype.addFeatureLayerAssociation_=function(t,n){this.featureLayerAssociation_[de(t)]=n},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[de(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(t){var n=this.getMap();n&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),r.prototype.setMap.call(this,t),t?(this.features_.addEventListener($n.ADD,this.boundAddFeature_),this.features_.addEventListener($n.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener($n.ADD,this.boundAddFeature_),this.features_.removeEventListener($n.REMOVE,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var n=t.element;if(this.style_&&this.applySelectedStyle_(n),!this.getLayer(n)){var i=this.getMap().getAllLayers().find(function(a){if(a instanceof dA&&a.getSource()&&a.getSource().hasFeature(n))return a});i&&this.addFeatureLayerAssociation_(n,i)}},e.prototype.removeFeature_=function(t){var n=t.element;this.style_&&this.restorePreviousStyle_(n)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var n=de(t);n in Pm||(Pm[n]=t.getStyle()),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){for(var n=this.getMap().getInteractions().getArray(),i=n.length-1;i>=0;--i){var a=n[i];if(a!==this&&a instanceof e&&a.getStyle()&&a.getFeatures().getArray().lastIndexOf(t)!==-1){t.setStyle(a.getStyle());return}}var o=de(t);t.setStyle(Pm[o]),delete Pm[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[de(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var n=this.addCondition_(t),i=this.removeCondition_(t),a=this.toggleCondition_(t),o=!n&&!i&&!a,s=t.map,A=this.getFeatures(),l=[],u=[];if(o){Sh(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,function(v,m){if(this.filter_(v,m))return this.addFeatureLayerAssociation_(v,m),u.push(v),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var c=A.getLength()-1;c>=0;--c){var h=A.item(c),f=u.indexOf(h);f>-1?u.splice(f,1):(A.remove(h),l.push(h))}u.length!==0&&A.extend(u)}else{s.forEachFeatureAtPixel(t.pixel,function(v,m){if(this.filter_(v,m))return(n||a)&&!mi(A.getArray(),v)?(this.addFeatureLayerAssociation_(v,m),u.push(v)):(i||a)&&mi(A.getArray(),v)&&(l.push(v),this.removeFeatureLayerAssociation_(v)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var p=l.length-1;p>=0;--p)A.remove(l[p]);A.extend(u)}return(u.length>0||l.length>0)&&this.dispatchEvent(new iJ(nJ.SELECT,u,l,t)),!0},e}(Xp);function oJ(){var r=_I();return Gr(r[st.POLYGON],r[st.LINE_STRING]),Gr(r[st.GEOMETRY_COLLECTION],r[st.LINE_STRING]),function(e){return e.getGeometry()?r[e.getGeometry().getType()]:null}}var gw=aJ,sJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function HM(r){if(r.feature)return r.feature;if(r.element)return r.element}var PC=[],AJ=function(r){sJ(e,r);function e(t){var n=this,i=t||{},a=i;return a.handleDownEvent||(a.handleDownEvent=sA),a.stopDown||(a.stopDown=xh),n=r.call(this,a)||this,n.source_=i.source?i.source:null,n.vertex_=i.vertex!==void 0?i.vertex:!0,n.edge_=i.edge!==void 0?i.edge:!0,n.features_=i.features?i.features:null,n.featuresListenerKeys_=[],n.featureChangeListenerKeys_={},n.indexedFeaturesExtents_={},n.pendingFeatures_={},n.pixelTolerance_=i.pixelTolerance!==void 0?i.pixelTolerance:10,n.rBush_=new H_,n.GEOMETRY_SEGMENTERS_={Point:n.segmentPointGemetry_.bind(n),LineString:n.segmentLineStringGemetry_.bind(n),LinearRing:n.segmentLineStringGemetry_.bind(n),Polygon:n.segmentPolygonGemetry_.bind(n),MultiPoint:n.segmentMultiPointGemetry_.bind(n),MultiLineString:n.segmentMultiLineStringGemetry_.bind(n),MultiPolygon:n.segmentMultiPolygonGemetry_.bind(n),GeometryCollection:n.segmentGeometryCollectionGemetry_.bind(n),Circle:n.segmentCircleGemetry_.bind(n)},n}return e.prototype.addFeature=function(t,n){var i=n!==void 0?n:!0,a=de(t),o=t.getGeometry();if(o){var s=this.GEOMETRY_SEGMENTERS_[o.getType()];if(s){this.indexedFeaturesExtents_[a]=o.getExtent(wi());var A=[];if(s(A,o),A.length===1)this.rBush_.insert(Wi(A[0]),{feature:t,segment:A[0]});else if(A.length>1){var l=A.map(function(c){return Wi(c)}),u=A.map(function(c){return{feature:t,segment:c}});this.rBush_.load(l,u)}}}i&&(this.featureChangeListenerKeys_[a]=Ue(t,me.CHANGE,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(t){var n=this.snapTo(t.pixel,t.coordinate,t.map);return n&&(t.coordinate=n.vertex.slice(0,2),t.pixel=n.vertexPixel),r.prototype.handleEvent.call(this,t)},e.prototype.handleFeatureAdd_=function(t){var n=HM(t);this.addFeature(n)},e.prototype.handleFeatureRemove_=function(t){var n=HM(t);this.removeFeature(n)},e.prototype.handleFeatureChange_=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=de(n);i in this.pendingFeatures_||(this.pendingFeatures_[i]=n)}else this.updateFeature_(n)},e.prototype.handleUpEvent=function(t){var n=VF(this.pendingFeatures_);return n.length&&(n.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,n){var i=n!==void 0?n:!0,a=de(t),o=this.indexedFeaturesExtents_[a];if(o){var s=this.rBush_,A=[];s.forEachInExtent(o,function(u){t===u.feature&&A.push(u)});for(var l=A.length-1;l>=0;--l)s.remove(A[l])}i&&(Nr(this.featureChangeListenerKeys_[a]),delete this.featureChangeListenerKeys_[a])},e.prototype.setMap=function(t){var n=this.getMap(),i=this.featuresListenerKeys_,a=this.getFeatures_();n&&(i.forEach(Nr),i.length=0,a.forEach(this.forEachFeatureRemove_.bind(this))),r.prototype.setMap.call(this,t),t&&(this.features_?i.push(Ue(this.features_,$n.ADD,this.handleFeatureAdd_,this),Ue(this.features_,$n.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(Ue(this.source_,Ri.ADDFEATURE,this.handleFeatureAdd_,this),Ue(this.source_,Ri.REMOVEFEATURE,this.handleFeatureRemove_,this)),a.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,n,i){var a=i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),o=i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=Wi([a,o]),A=this.rBush_.getInExtent(s),l=A.length;if(l===0)return null;var u=i.getView().getProjection(),c=xn(n),h,f=1/0,p=this.pixelTolerance_*this.pixelTolerance_,v=function(){if(h){var M=i.getPixelFromCoordinate(h),S=al(t,M);if(S<=p)return{vertex:h,vertexPixel:[Math.round(M[0]),Math.round(M[1])]}}return null};if(this.vertex_){for(var m=0;m<l;++m){var g=A[m];g.feature.getGeometry().getType()!==st.CIRCLE&&g.segment.forEach(function(M){var S=xn(M),x=al(c,S);x<f&&(h=M,f=x)})}var _=v();if(_)return _}if(this.edge_){for(var m=0;m<l;++m){var E=null,g=A[m];if(g.feature.getGeometry().getType()===st.CIRCLE){var B=g.feature.getGeometry(),L=gh();L&&(B=B.clone().transform(L,u)),E=Fp(QX(c,B))}else{var O=g.segment,b=O[0],T=O[1];T&&(PC[0]=xn(b),PC[1]=xn(T),E=zF(c,PC))}if(E){var F=al(c,E);F<f&&(h=E,f=F)}}var _=v();if(_)return _}return null},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.segmentCircleGemetry_=function(t,n){this.getMap().getView().getProjection();for(var i=n,a=R6(i),o=a.getCoordinates()[0],s=0,A=o.length-1;s<A;++s)t.push(o.slice(s,s+2))},e.prototype.segmentGeometryCollectionGemetry_=function(t,n){for(var i=n.getGeometriesArray(),a=0;a<i.length;++a){var o=this.GEOMETRY_SEGMENTERS_[i[a].getType()];o&&o(t,i[a])}},e.prototype.segmentLineStringGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length-1;a<o;++a)t.push(i.slice(a,a+2))},e.prototype.segmentMultiLineStringGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A)t.push(s.slice(A,A+2))},e.prototype.segmentMultiPointGemetry_=function(t,n){n.getCoordinates().forEach(function(i){t.push([i])})},e.prototype.segmentMultiPolygonGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length;A<l;++A)for(var u=s[A],c=0,h=u.length-1;c<h;++c)t.push(u.slice(c,c+2))},e.prototype.segmentPointGemetry_=function(t,n){t.push([n.getCoordinates()])},e.prototype.segmentPolygonGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A)t.push(s.slice(A,A+2))},e}(Do),lJ=AJ;function uJ(r){var e=r||{},t=new Ai,n=new Xq(-.005,.05,100),i=e.altShiftDragRotate!==void 0?e.altShiftDragRotate:!0;i&&t.push(new Oq);var a=e.doubleClickZoom!==void 0?e.doubleClickZoom:!0;a&&t.push(new vq({delta:e.zoomDelta,duration:e.zoomDuration}));var o=e.dragPan!==void 0?e.dragPan:!0;o&&t.push(new Fq({onFocusOnly:e.onFocusOnly,kinetic:n}));var s=e.pinchRotate!==void 0?e.pinchRotate:!0;s&&t.push(new t3);var A=e.pinchZoom!==void 0?e.pinchZoom:!0;A&&t.push(new n3({duration:e.zoomDuration}));var l=e.keyboard!==void 0?e.keyboard:!0;l&&(t.push(new $q),t.push(new Kq({delta:e.zoomDelta,duration:e.zoomDuration})));var u=e.mouseWheelZoom!==void 0?e.mouseWheelZoom:!0;u&&t.push(new qq({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var c=e.shiftDragZoom!==void 0?e.shiftDragZoom:!0;return c&&t.push(new Hq({duration:e.zoomDuration})),t}var cJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),hJ=function(r){cJ(e,r);function e(t){return t=ve({},t),t.controls||(t.controls=uq()),t.interactions||(t.interactions=uJ({onFocusOnly:!0})),r.call(this,t)||this}return e.prototype.createRenderer=function(){return new y6(this)},e}(U6),yw=hJ;function gr(r,e=[]){let t=Nu(r);Object.keys(t).forEach(i=>{t[i]=t[i].value});const n=kg(Dn({},t));return fe(r,()=>{t=Nu(r),Object.keys(t).forEach(i=>{n[i]!=t[i].value&&!e.includes(i)&&(n[i]=t[i].value)})}),{properties:n}}var ue=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t};const fJ={name:"ol-map",setup(r,{emit:e}){const{properties:t}=gr(r),n=kn(null);let i=new yw(t);fe(t,()=>{i.setProperties(t)}),Je(()=>{i.setTarget(n.value)}),ar(()=>{i.setTarget(null),i=null}),Pr("map",i);const a=()=>i.focus(),o=(h,f,p={})=>i.forEachFeatureAtPixel(h,f,p),s=(h,f,p)=>i.forEachLayerAtPixel(h,f,p),A=h=>i.getCoordinateFromPixel(h),l=()=>i.refresh(),u=()=>i.render(),c=()=>i.updateSize();return i.on("click",h=>e("click",h)),i.on("dblclick",h=>e("dblclick",h)),i.on("singleclick",h=>e("singleclick",h)),i.on("pointerdrag",h=>e("pointerdrag",h)),i.on("pointermove",h=>e("pointermove",h)),i.on("movestart",h=>e("movestart",h)),i.on("moveend",h=>e("moveend",h)),i.on("postrender",h=>e("postrender",h)),i.on("precompose",h=>e("precompose",h)),i.on("postcompose",h=>e("postcompose",h)),{map:i,mapRef:n,focus:a,forEachFeatureAtPixel:o,forEachLayerAtPixel:s,getCoordinateFromPixel:A,refresh:l,render:u,updateSize:c}},props:{loadTilesWhileAnimating:{type:Boolean,default:!1},loadTilesWhileInteracting:{type:Boolean,default:!1},moveTolerance:{type:Number,default:1},pixelRatio:{type:Number,default:1},controls:{type:Array,default:()=>[]}}};function pJ(r,e,t,n,i,a){return fn(),Vn("div",{ref:o=>n.mapRef=o},[_r(r.$slots,"default")],512)}var ox=ue(fJ,[["render",pJ]]);function dJ(r,e){const t=Be("map"),{properties:n}=gr(r),i=()=>Ms(Dn({},n),{projection:typeof n.projection=="string"?n.projection:new Bl(Dn({},n.projection))});let a=new Js(i());Je(()=>{t.setView(a)}),a.on("change:center",()=>{e("centerChanged",L()),e("zoomChanged",it())}),a.on("change:resolution",()=>e("resolutionChanged",P())),a.on("change:rotation",()=>e("rotationChanged",nt())),fe(n,()=>{let W=i();a.setProperties(W),a.applyOptions_(W)});const o=W=>a.adjustCenter(W),s=(W,Ft)=>a.adjustResolution(W,Ft),A=(W,Ft)=>a.adjustRotation(W,Ft),l=(W,Ft)=>a.adjustZoom(W,Ft),u=W=>a.animate(W),c=()=>a.beginInteraction(),h=W=>a.calculateExtent(W),f=()=>a.cancelAnimations(),p=(W,Ft,Ot)=>a.centerOn(W,Ft,Ot),v=()=>a.changed(),m=W=>a.dispatchEvent(W),g=(W,Ft,Ot)=>a.endInteraction(W,Ft,Ot),_=(W,Ft)=>a.fit(W,Ft),E=W=>a.get(W),B=()=>a.getAnimating(),L=()=>a.getCenter(),O=()=>a.getInteracting(),b=()=>a.getKeys(),T=()=>a.getMaxResolution(),F=()=>a.getMaxZoom(),M=()=>a.getMinResolution(),S=()=>a.getMinZoom(),x=()=>a.getProjection(),N=()=>a.getProperties(),P=()=>a.getResolution(),Y=(W,Ft)=>a.getResolutionForExtent(W,Ft),z=W=>a.getResolutionForZoom(W),tt=()=>a.getResolutions(),J=()=>a.getRevision(),nt=()=>a.getRotation(),it=()=>a.getZoom();return{view:a,adjustCenter:o,adjustResolution:s,adjustRotation:A,adjustZoom:l,animate:u,beginInteraction:c,calculateExtent:h,cancelAnimations:f,centerOn:p,changed:v,dispatchEvent:m,endInteraction:g,fit:_,get:E,getAnimating:B,getCenter:L,getInteracting:O,getKeys:b,getMaxResolution:T,getMaxZoom:F,getMinResolution:M,getMinZoom:S,getProjection:x,getProperties:N,getResolution:P,getResolutionForExtent:Y,getResolutionForZoom:z,getResolutions:tt,getRevision:J,getRotation:nt,getZoom:it,getZoomForResolution:W=>a.getZoomForResolution(W),setCenter:W=>a.setCenter(W),setConstrainResolution:W=>a.setConstrainResolution(W),setMaxZoom:W=>a.setMaxZoom(W),setMinZoom:W=>a.setMinZoom(W),setResolution:W=>a.setResolution(W),setRotation:W=>a.setRotation(W),setZoom:W=>a.setZoom(W)}}const vJ={name:"ol-view",setup(r,{emit:e}){const t=dJ(r,e);return Dn({},t)},props:{center:{type:Array,default:()=>[0,0]},constrainRotation:{type:Boolean,default:!0},enableRotation:{type:Boolean,default:!0},extent:{type:Array},constrainOnlyCenter:{type:Boolean,default:!1},smoothExtentConstraint:{type:Boolean,default:!0},maxResolution:{type:Number},minResolution:{type:Number},maxZoom:{type:Number,default:28},minZoom:{type:Number,default:0},multiWorld:{type:Boolean,default:!1},constrainResolution:{type:Boolean,default:!1},smoothResolutionConstraint:{type:Boolean,default:!0},showFullExtent:{type:Boolean,default:!1},projection:{type:[String,Object],default:"EPSG:3857"},resolution:{type:Number},resolutions:{type:Array},rotation:{type:Number},zoom:{type:Number,default:0},zoomFactor:{type:Number,default:2},padding:{type:Array,default:()=>[0,0,0,0]}}};function gJ(r,e,t,n,i,a){return vr("",!0)}var sx=ue(vJ,[["render",gJ]]);const yJ={name:"ol-feature",setup(r){const e=Be("vectorSource"),t=Be("vectorLayer"),n=Be("animation",null),{properties:i}=gr(r);let a=fr(()=>new sr(Dn({},i.properties)));return fe(a,(o,s)=>{e.value.removeFeature(s),e.value.addFeature(o),e.value.changed()}),fe(e,(o,s)=>{s.removeFeature(a.value),o.addFeature(a.value),o.changed()}),Je(()=>{e.value.addFeature(a.value),n!=null&&t.value.animateFeature(a.value,n.value)}),ar(()=>{e.value.removeFeature(a.value)}),Pr("feature",a),Pr("stylable",a),{feature:a}},props:{properties:{type:[Aw,Object,Array]}}};function mJ(r,e,t,n,i,a){return _r(r.$slots,"default")}var Ax=ue(yJ,[["render",mJ]]);function _J(r,e){const t=Be("map"),n=kn(null),{properties:i}=gr(r);let a=fr(()=>new k6(i));Je(()=>{t.addOverlay(a.value)}),ar(()=>{t.removeOverlay(a.value)}),fe(a,(v,m)=>{t.removeOverlay(m),t.addOverlay(v)}),dD(()=>{c(n.value)},{flush:"post"}),a.value.on("change:element",()=>e("elementChanged",o())),a.value.on("change:offset",()=>e("offsetChanged",s())),a.value.on("change:position",()=>e("positionChanged",A())),a.value.on("change:positioning",()=>e("positioningChanged",l()));const o=()=>a.value.getElement(),s=()=>a.value.getOffset(),A=()=>a.value.getPosition(),l=()=>a.value.getPositioning(),u=v=>a.value.panIntoView(v),c=v=>a.value.setElement(v);return{overlay:a,htmlContent:n,getOffset:s,getPosition:A,getPositioning:l,panIntoView:u,setElement:c,setOffset:v=>a.value.setOffset(v),setPosition:v=>a.value.setPosition(v),setPositioning:v=>a.value.setPositioning(v)}}const wJ={name:"ol-overlay",setup(r,{emit:e}){const t=new _J(r,e);return Dn({},t)},props:{position:{type:Array},offset:{type:Array},positioning:{type:String},stopEvent:{type:Boolean,default:!0},insertFirst:{type:Boolean,default:!0},autoPan:{type:Boolean,default:!1},autoPanMargin:{type:Number,default:20},autoPanAnimation:{type:Object,default:void 0}}},EJ={ref:"htmlContent"};function CJ(r,e,t,n,i,a){return fn(),Vn("div",EJ,[_r(r.$slots,"default",{position:t.position})],512)}var lx=ue(wJ,[["render",CJ]]),d4=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Rn={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},BJ=function(r){d4(e,r);function e(t){var n=r.call(this,me.ERROR)||this;return n.code=t.code,n.message=t.message,n}return e}(vo),TJ=function(r){d4(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.position_=null,n.transform_=ow,n.watchId_=void 0,n.addChangeListener(Rn.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(Rn.TRACKING,n.handleTrackingChanged_),i.projection!==void 0&&n.setProjection(i.projection),i.trackingOptions!==void 0&&n.setTrackingOptions(i.trackingOptions),n.setTracking(i.tracking!==void 0?i.tracking:!1),n}return e.prototype.disposeInternal=function(){this.setTracking(!1),r.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=vh(Re("EPSG:4326"),t),this.position_&&this.set(Rn.POSITION,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!t&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var n=t.coords;this.set(Rn.ACCURACY,n.accuracy),this.set(Rn.ALTITUDE,n.altitude===null?void 0:n.altitude),this.set(Rn.ALTITUDE_ACCURACY,n.altitudeAccuracy===null?void 0:n.altitudeAccuracy),this.set(Rn.HEADING,n.heading===null?void 0:Su(n.heading)),this.position_?(this.position_[0]=n.longitude,this.position_[1]=n.latitude):this.position_=[n.longitude,n.latitude];var i=this.transform_(this.position_);this.set(Rn.POSITION,i),this.set(Rn.SPEED,n.speed===null?void 0:n.speed);var a=wW(this.position_,n.accuracy);a.applyTransform(this.transform_),this.set(Rn.ACCURACY_GEOMETRY,a),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new BJ(t))},e.prototype.getAccuracy=function(){return this.get(Rn.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(Rn.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(Rn.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(Rn.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(Rn.HEADING)},e.prototype.getPosition=function(){return this.get(Rn.POSITION)},e.prototype.getProjection=function(){return this.get(Rn.PROJECTION)},e.prototype.getSpeed=function(){return this.get(Rn.SPEED)},e.prototype.getTracking=function(){return this.get(Rn.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(Rn.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(Rn.PROJECTION,Re(t))},e.prototype.setTracking=function(t){this.set(Rn.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(Rn.TRACKING_OPTIONS,t)},e}(ui),xJ=TJ;const SJ={name:"ol-geolocation",emits:["positionChanged","speedChanged","headingChanged","altitudeChanged","altitudeAccuracyChanged","accuracyGeometryChanged"],setup(r,{emit:e}){const{properties:t}=gr(r);let n=fr(()=>{let h=new xJ(t);return h.on("change",c),h});const i=kn([]),a=kn(0),o=kn(0),s=kn(0),A=kn(0),l=kn(0),u=kn({});fe(i,()=>{e("positionChanged",i.value)}),fe(A,()=>{e("speedChanged",A.value)}),fe(l,()=>{e("headingChanged",l.value)}),fe(o,()=>{e("altitudeChanged",o.value)}),fe(s,()=>{e("altitudeAccuracyChanged",s.value)}),fe(u,()=>{e("accuracyGeometryChanged",u.value)});const c=()=>{i.value=n.value.getPosition(),A.value=n.value.getSpeed(),l.value=n.value.getHeading(),a.value=n.value.getAccuracy(),o.value=n.value.getAltitude(),s.value=n.value.getAltitudeAccuracy(),u.value=n.value.getAccuracyGeometry()};return fe(n,(h,f)=>{f.un("change",c),h.on("change",c)}),{geoLoc:n,position:i,accuracy:a,altitude:o,altitudeAccuracy:s,speed:A,heading:l,accuracyGeometry:u}},props:{projection:{type:[String,Object],default:"EPSG:3857"},tracking:{type:Boolean,default:!0},trackingOptions:{type:Object,default:()=>({enableHighAccuracy:!0})}}};function bJ(r,e,t,n,i,a){return _r(r.$slots,"default",{position:n.position,speed:n.speed,heading:n.heading,accuracy:n.accuracy,altitude:n.altitude,altitudeAccuracy:n.altitudeAccuracy,accuracyGeometry:n.accuracyGeometry})}var ux=ue(SJ,[["render",bJ]]);function FJ(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var yh=1,mh=2,k0=3,IJ=4,cx=5,GM=6378137,LJ=6356752314e-3,kM=.0066943799901413165,kv=484813681109536e-20,Xt=Math.PI/2,OJ=.16666666666666666,RJ=.04722222222222222,MJ=.022156084656084655,ie=1e-10,ia=.017453292519943295,nA=57.29577951308232,Yr=Math.PI/4,_g=Math.PI*2,ri=3.14159265359,go={};go.greenwich=0;go.lisbon=-9.131906111111;go.paris=2.337229166667;go.bogota=-74.080916666667;go.madrid=-3.687938888889;go.rome=12.452333333333;go.bern=7.439583333333;go.jakarta=106.807719444444;go.ferro=-17.666666666667;go.brussels=4.367975;go.stockholm=18.058277777778;go.athens=23.7163375;go.oslo=10.722916666667;var NJ={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},$M=/[\s_\-\/\(\)]/g;function Ku(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace($M,""),i=-1,a,o;++i<t.length;)if(a=t[i],o=a.toLowerCase().replace($M,""),o===n)return r[a]}function hx(r){var e={},t=r.split("+").map(function(s){return s.trim()}).filter(function(s){return s}).reduce(function(s,A){var l=A.split("=");return l.push(!0),s[l[0].toLowerCase()]=l[1],s},{}),n,i,a,o={proj:"projName",datum:"datumCode",rf:function(s){e.rf=parseFloat(s)},lat_0:function(s){e.lat0=s*ia},lat_1:function(s){e.lat1=s*ia},lat_2:function(s){e.lat2=s*ia},lat_ts:function(s){e.lat_ts=s*ia},lon_0:function(s){e.long0=s*ia},lon_1:function(s){e.long1=s*ia},lon_2:function(s){e.long2=s*ia},alpha:function(s){e.alpha=parseFloat(s)*ia},gamma:function(s){e.rectified_grid_angle=parseFloat(s)},lonc:function(s){e.longc=s*ia},x_0:function(s){e.x0=parseFloat(s)},y_0:function(s){e.y0=parseFloat(s)},k_0:function(s){e.k0=parseFloat(s)},k:function(s){e.k0=parseFloat(s)},a:function(s){e.a=parseFloat(s)},b:function(s){e.b=parseFloat(s)},r_a:function(){e.R_A=!0},zone:function(s){e.zone=parseInt(s,10)},south:function(){e.utmSouth=!0},towgs84:function(s){e.datum_params=s.split(",").map(function(A){return parseFloat(A)})},to_meter:function(s){e.to_meter=parseFloat(s)},units:function(s){e.units=s;var A=Ku(NJ,s);A&&(e.to_meter=A.to_meter)},from_greenwich:function(s){e.from_greenwich=s*ia},pm:function(s){var A=Ku(go,s);e.from_greenwich=(A||parseFloat(s))*ia},nadgrids:function(s){s==="@null"?e.datumCode="none":e.nadgrids=s},axis:function(s){var A="ewnsud";s.length===3&&A.indexOf(s.substr(0,1))!==-1&&A.indexOf(s.substr(1,1))!==-1&&A.indexOf(s.substr(2,1))!==-1&&(e.axis=s)},approx:function(){e.approx=!0}};for(n in t)i=t[n],n in o?(a=o[n],typeof a=="function"?a(i):e[a]=i):e[n]=i;return typeof e.datumCode=="string"&&e.datumCode!=="WGS84"&&(e.datumCode=e.datumCode.toLowerCase()),e}var wg=1,v4=2,g4=3,G_=4,y4=5,xI=-1,PJ=/\s/,UJ=/[A-Za-z]/,DJ=/[A-Za-z84_]/,mw=/[,\]]/,m4=/[\d\.E\-\+]/;function xl(r){if(typeof r!="string")throw new Error("not a string");this.text=r.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=wg}xl.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==G_)for(;PJ.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case wg:return this.neutral(r);case v4:return this.keyword(r);case G_:return this.quoted(r);case y4:return this.afterquote(r);case g4:return this.number(r);case xI:return}};xl.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=G_;return}if(mw.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)};xl.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=wg;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=wg,this.currentObject=this.stack.pop(),this.currentObject||(this.state=xI);return}};xl.prototype.number=function(r){if(m4.test(r)){this.word+=r;return}if(mw.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)};xl.prototype.quoted=function(r){if(r==='"'){this.state=y4;return}this.word+=r};xl.prototype.keyword=function(r){if(DJ.test(r)){this.word+=r;return}if(r==="["){var e=[];e.push(this.word),this.level++,this.root===null?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=wg;return}if(mw.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)};xl.prototype.neutral=function(r){if(UJ.test(r)){this.word=r,this.state=v4;return}if(r==='"'){this.word="",this.state=G_;return}if(m4.test(r)){this.word=r,this.state=g4;return}if(mw.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)};xl.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===xI)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function QJ(r){var e=new xl(r);return e.output()}function jM(r,e,t){Array.isArray(e)&&(t.unshift(e),e=null);var n=e?{}:r,i=t.reduce(function(a,o){return Yf(o,a),a},n);e&&(r[e]=i)}function Yf(r,e){if(!Array.isArray(r)){e[r]=!0;return}var t=r.shift();if(t==="PARAMETER"&&(t=r.shift()),r.length===1){if(Array.isArray(r[0])){e[t]={},Yf(r[0],e[t]);return}e[t]=r[0];return}if(!r.length){e[t]=!0;return}if(t==="TOWGS84"){e[t]=r;return}if(t==="AXIS"){t in e||(e[t]=[]),e[t].push(r);return}Array.isArray(t)||(e[t]={});var n;switch(t){case"UNIT":case"PRIMEM":case"VERT_DATUM":e[t]={name:r[0].toLowerCase(),convert:r[1]},r.length===3&&Yf(r[2],e[t]);return;case"SPHEROID":case"ELLIPSOID":e[t]={name:r[0],a:r[1],rf:r[2]},r.length===4&&Yf(r[3],e[t]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":r[0]=["name",r[0]],jM(e,t,r);return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return Yf(r,e[t]);return jM(e,t,r)}}var HJ=.017453292519943295;function GJ(r,e){var t=e[0],n=e[1];!(t in r)&&n in r&&(r[t]=r[n],e.length===3&&(r[t]=e[2](r[t])))}function DA(r){return r*HJ}function kJ(r){if(r.type==="GEOGCS"?r.projName="longlat":r.type==="LOCAL_CS"?(r.projName="identity",r.local=!0):typeof r.PROJECTION=="object"?r.projName=Object.keys(r.PROJECTION)[0]:r.projName=r.PROJECTION,r.AXIS){for(var e="",t=0,n=r.AXIS.length;t<n;++t){var i=[r.AXIS[t][0].toLowerCase(),r.AXIS[t][1].toLowerCase()];i[0].indexOf("north")!==-1||(i[0]==="y"||i[0]==="lat")&&i[1]==="north"?e+="n":i[0].indexOf("south")!==-1||(i[0]==="y"||i[0]==="lat")&&i[1]==="south"?e+="s":i[0].indexOf("east")!==-1||(i[0]==="x"||i[0]==="lon")&&i[1]==="east"?e+="e":(i[0].indexOf("west")!==-1||(i[0]==="x"||i[0]==="lon")&&i[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(r.axis=e)}r.UNIT&&(r.units=r.UNIT.name.toLowerCase(),r.units==="metre"&&(r.units="meter"),r.UNIT.convert&&(r.type==="GEOGCS"?r.DATUM&&r.DATUM.SPHEROID&&(r.to_meter=r.UNIT.convert*r.DATUM.SPHEROID.a):r.to_meter=r.UNIT.convert));var a=r.GEOGCS;r.type==="GEOGCS"&&(a=r),a&&(a.DATUM?r.datumCode=a.DATUM.name.toLowerCase():r.datumCode=a.name.toLowerCase(),r.datumCode.slice(0,2)==="d_"&&(r.datumCode=r.datumCode.slice(2)),(r.datumCode==="new_zealand_geodetic_datum_1949"||r.datumCode==="new_zealand_1949")&&(r.datumCode="nzgd49"),(r.datumCode==="wgs_1984"||r.datumCode==="world_geodetic_system_1984")&&(r.PROJECTION==="Mercator_Auxiliary_Sphere"&&(r.sphere=!0),r.datumCode="wgs84"),r.datumCode.slice(-6)==="_ferro"&&(r.datumCode=r.datumCode.slice(0,-6)),r.datumCode.slice(-8)==="_jakarta"&&(r.datumCode=r.datumCode.slice(0,-8)),~r.datumCode.indexOf("belge")&&(r.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(r.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),r.ellps.toLowerCase().slice(0,13)==="international"&&(r.ellps="intl"),r.a=a.DATUM.SPHEROID.a,r.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(r.datum_params=a.DATUM.TOWGS84),~r.datumCode.indexOf("osgb_1936")&&(r.datumCode="osgb36"),~r.datumCode.indexOf("osni_1952")&&(r.datumCode="osni52"),(~r.datumCode.indexOf("tm65")||~r.datumCode.indexOf("geodetic_datum_of_1965"))&&(r.datumCode="ire65"),r.datumCode==="ch1903+"&&(r.datumCode="ch1903"),~r.datumCode.indexOf("israel")&&(r.datumCode="isr93")),r.b&&!isFinite(r.b)&&(r.b=r.a);function o(l){var u=r.to_meter||1;return l*u}var s=function(l){return GJ(r,l)},A=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",DA],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",DA],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",DA],["lat0","latitude_of_origin",DA],["lat0","standard_parallel_1",DA],["lat1","standard_parallel_1",DA],["lat2","standard_parallel_2",DA],["azimuth","Azimuth"],["alpha","azimuth",DA],["srsCode","name"]];A.forEach(s),!r.long0&&r.longc&&(r.projName==="Albers_Conic_Equal_Area"||r.projName==="Lambert_Azimuthal_Equal_Area")&&(r.long0=r.longc),!r.lat_ts&&r.lat1&&(r.projName==="Stereographic_South_Pole"||r.projName==="Polar Stereographic (variant B)")&&(r.lat0=DA(r.lat1>0?90:-90),r.lat_ts=r.lat1)}function _4(r){var e=QJ(r),t=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",t]);var i={};return Yf(e,i),kJ(i),i}function Ua(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Ua[r]=hx(arguments[1]):Ua[r]=_4(arguments[1]):Ua[r]=t}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Ua.apply(e,n):Ua(n)});if(typeof r=="string"){if(r in Ua)return Ua[r]}else"EPSG"in r?Ua["EPSG:"+r.EPSG]=r:"ESRI"in r?Ua["ESRI:"+r.ESRI]=r:"IAU2000"in r?Ua["IAU2000:"+r.IAU2000]=r:console.log(r);return}}FJ(Ua);function $J(r){return typeof r=="string"}function jJ(r){return r in Ua}var VJ=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function KJ(r){return VJ.some(function(e){return r.indexOf(e)>-1})}var zJ=["3857","900913","3785","102113"];function XJ(r){var e=Ku(r,"authority");if(e){var t=Ku(e,"epsg");return t&&zJ.indexOf(t)>-1}}function YJ(r){var e=Ku(r,"extension");if(e)return Ku(e,"proj4")}function WJ(r){return r[0]==="+"}function qJ(r){if($J(r)){if(jJ(r))return Ua[r];if(KJ(r)){var e=_4(r);if(XJ(e))return Ua["EPSG:3857"];var t=YJ(e);return t?hx(t):e}if(WJ(r))return hx(r)}else return r}function VM(r,e){r=r||{};var t,n;if(!e)return r;for(n in e)t=e[n],t!==void 0&&(r[n]=t);return r}function fA(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function Ay(r){return r<0?-1:1}function pe(r){return Math.abs(r)<=ri?r:r-Ay(r)*_g}function bs(r,e,t){var n=r*t,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(Xt-e))/n}function Eg(r,e){for(var t=.5*r,n,i,a=Xt-2*Math.atan(e),o=0;o<=15;o++)if(n=r*Math.sin(a),i=Xt-2*Math.atan(e*Math.pow((1-n)/(1+n),t))-a,a+=i,Math.abs(i)<=1e-10)return a;return-9999}function ZJ(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=fA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function JJ(r){var e=r.x,t=r.y;if(t*nA>90&&t*nA<-90&&e*nA>180&&e*nA<-180)return null;var n,i;if(Math.abs(Math.abs(t)-Xt)<=ie)return null;if(this.sphere)n=this.x0+this.a*this.k0*pe(e-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(Yr+.5*t));else{var a=Math.sin(t),o=bs(this.e,t,a);n=this.x0+this.a*this.k0*pe(e-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return r.x=n,r.y=i,r}function ttt(r){var e=r.x-this.x0,t=r.y-this.y0,n,i;if(this.sphere)i=Xt-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(i=Eg(this.e,a),i===-9999)return null}return n=pe(this.long0+e/(this.a*this.k0)),r.x=n,r.y=i,r}var ett=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],rtt={init:ZJ,forward:JJ,inverse:ttt,names:ett};function ntt(){}function KM(r){return r}var itt=["longlat","identity"],att={init:ntt,forward:KM,inverse:KM,names:itt},ott=[rtt,att],$0={},k_=[];function w4(r,e){var t=k_.length;return r.names?(k_[t]=r,r.names.forEach(function(n){$0[n.toLowerCase()]=t}),this):(console.log(e),!0)}function stt(r){if(!r)return!1;var e=r.toLowerCase();if(typeof $0[e]<"u"&&k_[$0[e]])return k_[$0[e]]}function Att(){ott.forEach(w4)}var ltt={start:Att,add:w4,get:stt},Ye={};Ye.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Ye.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Ye.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Ye.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Ye.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Ye.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Ye.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Ye.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Ye.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Ye.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Ye.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Ye.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Ye.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Ye.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Ye.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Ye.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Ye.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Ye.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Ye.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Ye.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Ye.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Ye.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Ye.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Ye.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Ye.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Ye.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Ye.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Ye.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Ye.hough={a:6378270,rf:297,ellipseName:"Hough"};Ye.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Ye.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Ye.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Ye.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Ye.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Ye.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Ye.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Ye.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Ye.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Ye.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Ye.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Ye.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var utt=Ye.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ye.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function ctt(r,e,t,n){var i=r*r,a=e*e,o=(i-a)/i,s=0;n?(r*=1-o*(OJ+o*(RJ+o*MJ)),i=r*r,o=0):s=Math.sqrt(o);var A=(i-a)/a;return{es:o,e:s,ep2:A}}function htt(r,e,t,n,i){if(!r){var a=Ku(Ye,n);a||(a=utt),r=a.a,e=a.b,t=a.rf}return t&&!e&&(e=(1-1/t)*r),(t===0||Math.abs(r-e)<ie)&&(i=!0,e=r),{a:r,b:e,rf:t,sphere:i}}var Ci={};Ci.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};Ci.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};Ci.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};Ci.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};Ci.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};Ci.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};Ci.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};Ci.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};Ci.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};Ci.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};Ci.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};Ci.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};Ci.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};Ci.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};Ci.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};Ci.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};Ci.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function ftt(r,e,t,n,i,a,o){var s={};return r===void 0||r==="none"?s.datum_type=cx:s.datum_type=IJ,e&&(s.datum_params=e.map(parseFloat),(s.datum_params[0]!==0||s.datum_params[1]!==0||s.datum_params[2]!==0)&&(s.datum_type=yh),s.datum_params.length>3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=mh,s.datum_params[3]*=kv,s.datum_params[4]*=kv,s.datum_params[5]*=kv,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=k0,s.grids=o),s.a=t,s.b=n,s.es=i,s.ep2=a,s}var E4={};function ptt(r,e){var t=new DataView(e),n=gtt(t),i=ytt(t,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=mtt(t,i,n),o={header:i,subgrids:a};return E4[r]=o,o}function dtt(r){if(r===void 0)return null;var e=r.split(",");return e.map(vtt)}function vtt(r){if(r.length===0)return null;var e=r[0]==="@";return e&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:r,mandatory:!e,grid:E4[r]||null,isNull:!1}}function Wf(r){return r/3600*Math.PI/180}function gtt(r){var e=r.getInt32(8,!1);return e===11?!1:(e=r.getInt32(8,!0),e!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function ytt(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:fx(r,56,56+8).trim(),fromSemiMajorAxis:r.getFloat64(120,e),fromSemiMinorAxis:r.getFloat64(136,e),toSemiMajorAxis:r.getFloat64(152,e),toSemiMinorAxis:r.getFloat64(168,e)}}function fx(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function mtt(r,e,t){for(var n=176,i=[],a=0;a<e.nSubgrids;a++){var o=wtt(r,n,t),s=Ett(r,n,o,t),A=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),l=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);i.push({ll:[Wf(o.lowerLongitude),Wf(o.lowerLatitude)],del:[Wf(o.longitudeInterval),Wf(o.latitudeInterval)],lim:[A,l],count:o.gridNodeCount,cvs:_tt(s)})}return i}function _tt(r){return r.map(function(e){return[Wf(e.longitudeShift),Wf(e.latitudeShift)]})}function wtt(r,e,t){return{name:fx(r,e+8,e+16).trim(),parent:fx(r,e+24,e+24+8).trim(),lowerLatitude:r.getFloat64(e+72,t),upperLatitude:r.getFloat64(e+88,t),lowerLongitude:r.getFloat64(e+104,t),upperLongitude:r.getFloat64(e+120,t),latitudeInterval:r.getFloat64(e+136,t),longitudeInterval:r.getFloat64(e+152,t),gridNodeCount:r.getInt32(e+168,t)}}function Ett(r,e,t,n){for(var i=e+176,a=16,o=[],s=0;s<t.gridNodeCount;s++){var A={latitudeShift:r.getFloat32(i+s*a,n),longitudeShift:r.getFloat32(i+s*a+4,n),latitudeAccuracy:r.getFloat32(i+s*a+8,n),longitudeAccuracy:r.getFloat32(i+s*a+12,n)};o.push(A)}return o}function AA(r,e){if(!(this instanceof AA))return new AA(r);e=e||function(l){if(l)throw l};var t=qJ(r);if(typeof t!="object"){e(r);return}var n=AA.projections.get(t.projName);if(!n){e(r);return}if(t.datumCode&&t.datumCode!=="none"){var i=Ku(Ci,t.datumCode);i&&(t.datum_params=t.datum_params||(i.towgs84?i.towgs84.split(","):null),t.ellps=i.ellipse,t.datumName=i.datumName?i.datumName:t.datumCode)}t.k0=t.k0||1,t.axis=t.axis||"enu",t.ellps=t.ellps||"wgs84",t.lat1=t.lat1||t.lat0;var a=htt(t.a,t.b,t.rf,t.ellps,t.sphere),o=ctt(a.a,a.b,a.rf,t.R_A),s=dtt(t.nadgrids),A=t.datum||ftt(t.datumCode,t.datum_params,a.a,a.b,o.es,o.ep2,s);VM(this,t),VM(this,n),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=A,this.init(),e(null,this)}AA.projections=ltt;AA.projections.start();function Ctt(r,e){return r.datum_type!==e.datum_type||r.a!==e.a||Math.abs(r.es-e.es)>5e-11?!1:r.datum_type===yh?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]:r.datum_type===mh?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]&&r.datum_params[3]===e.datum_params[3]&&r.datum_params[4]===e.datum_params[4]&&r.datum_params[5]===e.datum_params[5]&&r.datum_params[6]===e.datum_params[6]:!0}function C4(r,e,t){var n=r.x,i=r.y,a=r.z?r.z:0,o,s,A,l;if(i<-Xt&&i>-1.001*Xt)i=-Xt;else if(i>Xt&&i<1.001*Xt)i=Xt;else{if(i<-Xt)return{x:-1/0,y:-1/0,z:r.z};if(i>Xt)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),s=Math.sin(i),l=Math.cos(i),A=s*s,o=t/Math.sqrt(1-e*A),{x:(o+a)*l*Math.cos(n),y:(o+a)*l*Math.sin(n),z:(o*(1-e)+a)*s}}function B4(r,e,t,n){var i=1e-12,a=i*i,o=30,s,A,l,u,c,h,f,p,v,m,g,_,E,B=r.x,L=r.y,O=r.z?r.z:0,b,T,F;if(s=Math.sqrt(B*B+L*L),A=Math.sqrt(B*B+L*L+O*O),s/t<i){if(b=0,A/t<i)return T=Xt,F=-n,{x:r.x,y:r.y,z:r.z}}else b=Math.atan2(L,B);l=O/A,u=s/A,c=1/Math.sqrt(1-e*(2-e)*u*u),p=u*(1-e)*c,v=l*c,E=0;do E++,f=t/Math.sqrt(1-e*v*v),F=s*p+O*v-f*(1-e*v*v),h=e*f/(f+F),c=1/Math.sqrt(1-h*(2-h)*u*u),m=u*(1-h)*c,g=l*c,_=g*p-m*v,p=m,v=g;while(_*_>a&&E<o);return T=Math.atan(g/Math.abs(m)),{x:b,y:T,z:F}}function Btt(r,e,t){if(e===yh)return{x:r.x+t[0],y:r.y+t[1],z:r.z+t[2]};if(e===mh){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],A=t[5],l=t[6];return{x:l*(r.x-A*r.y+s*r.z)+n,y:l*(A*r.x+r.y-o*r.z)+i,z:l*(-s*r.x+o*r.y+r.z)+a}}}function Ttt(r,e,t){if(e===yh)return{x:r.x-t[0],y:r.y-t[1],z:r.z-t[2]};if(e===mh){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],A=t[5],l=t[6],u=(r.x-n)/l,c=(r.y-i)/l,h=(r.z-a)/l;return{x:u+A*c-s*h,y:-A*u+c+o*h,z:s*u-o*c+h}}}function Um(r){return r===yh||r===mh}function xtt(r,e,t){if(Ctt(r,e)||r.datum_type===cx||e.datum_type===cx)return t;var n=r.a,i=r.es;if(r.datum_type===k0){var a=zM(r,!1,t);if(a!==0)return;n=GM,i=kM}var o=e.a,s=e.b,A=e.es;if(e.datum_type===k0&&(o=GM,s=LJ,A=kM),i===A&&n===o&&!Um(r.datum_type)&&!Um(e.datum_type))return t;if(t=C4(t,i,n),Um(r.datum_type)&&(t=Btt(t,r.datum_type,r.datum_params)),Um(e.datum_type)&&(t=Ttt(t,e.datum_type,e.datum_params)),t=B4(t,A,o,s),e.datum_type===k0){var l=zM(e,!0,t);if(l!==0)return}return t}function zM(r,e,t){if(r.grids===null||r.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-t.x,y:t.y},i={x:Number.NaN,y:Number.NaN},a=[],o=0;o<r.grids.length;o++){var s=r.grids[o];if(a.push(s.name),s.isNull){i=n;break}if(s.grid===null){if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;continue}var A=s.grid.subgrids[0],l=(Math.abs(A.del[1])+Math.abs(A.del[0]))/1e4,u=A.ll[0]-l,c=A.ll[1]-l,h=A.ll[0]+(A.lim[0]-1)*A.del[0]+l,f=A.ll[1]+(A.lim[1]-1)*A.del[1]+l;if(!(c>n.y||u>n.x||f<n.y||h<n.x)&&(i=Stt(n,e,A),!isNaN(i.x)))break}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*nA+" "+n.y*nA+" tried: '"+a+"'"),-1):(t.x=-i.x,t.y=i.y,0)}function Stt(r,e,t){var n={x:Number.NaN,y:Number.NaN};if(isNaN(r.x))return n;var i={x:r.x,y:r.y};i.x-=t.ll[0],i.y-=t.ll[1],i.x=pe(i.x-Math.PI)+Math.PI;var a=XM(i,t);if(e){if(isNaN(a.x))return n;a.x=i.x-a.x,a.y=i.y-a.y;var o=9,s=1e-12,A,l;do{if(l=XM(a,t),isNaN(l.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}A={x:i.x-(l.x+a.x),y:i.y-(l.y+a.y)},a.x+=A.x,a.y+=A.y}while(o--&&Math.abs(A.x)>s&&Math.abs(A.y)>s);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=pe(a.x+t.ll[0]),n.y=a.y+t.ll[1]}else isNaN(a.x)||(n.x=r.x+a.x,n.y=r.y+a.y);return n}function XM(r,e){var t={x:r.x/e.del[0],y:r.y/e.del[1]},n={x:Math.floor(t.x),y:Math.floor(t.y)},i={x:t.x-1*n.x,y:t.y-1*n.y},a={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=e.lim[0]||n.y<0||n.y>=e.lim[1])return a;o=n.y*e.lim[0]+n.x;var s={x:e.cvs[o][0],y:e.cvs[o][1]};o++;var A={x:e.cvs[o][0],y:e.cvs[o][1]};o+=e.lim[0];var l={x:e.cvs[o][0],y:e.cvs[o][1]};o--;var u={x:e.cvs[o][0],y:e.cvs[o][1]},c=i.x*i.y,h=i.x*(1-i.y),f=(1-i.x)*(1-i.y),p=(1-i.x)*i.y;return a.x=f*s.x+h*A.x+p*u.x+c*l.x,a.y=f*s.y+h*A.y+p*u.y+c*l.y,a}function YM(r,e,t){var n=t.x,i=t.y,a=t.z||0,o,s,A,l={};for(A=0;A<3;A++)if(!(e&&A===2&&t.z===void 0))switch(A===0?(o=n,"ew".indexOf(r.axis[A])!==-1?s="x":s="y"):A===1?(o=i,"ns".indexOf(r.axis[A])!==-1?s="y":s="x"):(o=a,s="z"),r.axis[A]){case"e":l[s]=o;break;case"w":l[s]=-o;break;case"n":l[s]=o;break;case"s":l[s]=-o;break;case"u":t[s]!==void 0&&(l.z=o);break;case"d":t[s]!==void 0&&(l.z=-o);break;default:return null}return l}function T4(r){var e={x:r[0],y:r[1]};return r.length>2&&(e.z=r[2]),r.length>3&&(e.m=r[3]),e}function btt(r){WM(r.x),WM(r.y)}function WM(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function Ftt(r,e){return(r.datum.datum_type===yh||r.datum.datum_type===mh)&&e.datumCode!=="WGS84"||(e.datum.datum_type===yh||e.datum.datum_type===mh)&&r.datumCode!=="WGS84"}function $_(r,e,t,n){var i;if(Array.isArray(t)&&(t=T4(t)),btt(t),r.datum&&e.datum&&Ftt(r,e)&&(i=new AA("WGS84"),t=$_(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=YM(r,!1,t)),r.projName==="longlat")t={x:t.x*ia,y:t.y*ia,z:t.z||0};else if(r.to_meter&&(t={x:t.x*r.to_meter,y:t.y*r.to_meter,z:t.z||0}),t=r.inverse(t),!t)return;if(r.from_greenwich&&(t.x+=r.from_greenwich),t=xtt(r.datum,e.datum,t),!!t)return e.from_greenwich&&(t={x:t.x-e.from_greenwich,y:t.y,z:t.z||0}),e.projName==="longlat"?t={x:t.x*nA,y:t.y*nA,z:t.z||0}:(t=e.forward(t),e.to_meter&&(t={x:t.x/e.to_meter,y:t.y/e.to_meter,z:t.z||0})),n&&e.axis!=="enu"?YM(e,!0,t):t}var qM=AA("WGS84");function UC(r,e,t,n){var i,a,o;return Array.isArray(t)?(i=$_(r,e,t,n)||{x:NaN,y:NaN},t.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(t.splice(3)):[i.x,i.y,t[2]].concat(t.splice(3)):[i.x,i.y].concat(t.splice(2)):[i.x,i.y]):(a=$_(r,e,t,n),o=Object.keys(t),o.length===2||o.forEach(function(s){if(typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"){if(s==="x"||s==="y"||s==="z")return}else if(s==="x"||s==="y")return;a[s]=t[s]}),a)}function ZM(r){return r instanceof AA?r:r.oProj?r.oProj:AA(r)}function fo(r,e,t){r=ZM(r);var n=!1,i;return typeof e>"u"?(e=r,r=qM,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=qM,n=!0),e=ZM(e),t?UC(r,e,t):(i={forward:function(a,o){return UC(r,e,a,o)},inverse:function(a,o){return UC(e,r,a,o)}},n&&(i.oProj=e),i)}var JM=6,x4="AJSAJS",S4="AFAFAF",qf=65,no=73,Xo=79,yv=86,mv=90,Itt={forward:b4,inverse:Ltt,toPoint:F4};function b4(r,e){return e=e||5,Mtt(Ott({lat:r[1],lon:r[0]}),e)}function Ltt(r){var e=SI(L4(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function F4(r){var e=SI(L4(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function DC(r){return r*(Math.PI/180)}function tN(r){return 180*(r/Math.PI)}function Ott(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,a=.9996,o,s,A,l,u,c,h,f=DC(e),p=DC(t),v,m;m=Math.floor((t+180)/6)+1,t===180&&(m=60),e>=56&&e<64&&t>=3&&t<12&&(m=32),e>=72&&e<84&&(t>=0&&t<9?m=31:t>=9&&t<21?m=33:t>=21&&t<33?m=35:t>=33&&t<42&&(m=37)),o=(m-1)*6-180+3,v=DC(o),s=i/(1-i),A=n/Math.sqrt(1-i*Math.sin(f)*Math.sin(f)),l=Math.tan(f)*Math.tan(f),u=s*Math.cos(f)*Math.cos(f),c=Math.cos(f)*(p-v),h=n*((1-i/4-3*i*i/64-5*i*i*i/256)*f-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*f)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*f)-35*i*i*i/3072*Math.sin(6*f));var g=a*A*(c+(1-l+u)*c*c*c/6+(5-18*l+l*l+72*u-58*s)*c*c*c*c*c/120)+5e5,_=a*(h+A*Math.tan(f)*(c*c/2+(5-l+9*u+4*u*u)*c*c*c*c/24+(61-58*l+l*l+600*u-330*s)*c*c*c*c*c*c/720));return e<0&&(_+=1e7),{northing:Math.round(_),easting:Math.round(g),zoneNumber:m,zoneLetter:Rtt(e)}}function SI(r){var e=r.northing,t=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var a=.9996,o=6378137,s=.00669438,A,l=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),u,c,h,f,p,v,m,g,_,E=t-5e5,B=e;n<"N"&&(B-=1e7),m=(i-1)*6-180+3,A=s/(1-s),v=B/a,g=v/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),_=g+(3*l/2-27*l*l*l/32)*Math.sin(2*g)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*g)+151*l*l*l/96*Math.sin(6*g),u=o/Math.sqrt(1-s*Math.sin(_)*Math.sin(_)),c=Math.tan(_)*Math.tan(_),h=A*Math.cos(_)*Math.cos(_),f=o*(1-s)/Math.pow(1-s*Math.sin(_)*Math.sin(_),1.5),p=E/(u*a);var L=_-u*Math.tan(_)/f*(p*p/2-(5+3*c+10*h-4*h*h-9*A)*p*p*p*p/24+(61+90*c+298*h+45*c*c-252*A-3*h*h)*p*p*p*p*p*p/720);L=tN(L);var O=(p-(1+2*c+h)*p*p*p/6+(5-2*h+28*c-3*h*h+8*A+24*c*c)*p*p*p*p*p/120)/Math.cos(_);O=m+tN(O);var b;if(r.accuracy){var T=SI({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});b={top:T.lat,right:T.lon,bottom:L,left:O}}else b={lat:L,lon:O};return b}function Rtt(r){var e="Z";return 84>=r&&r>=72?e="X":72>r&&r>=64?e="W":64>r&&r>=56?e="V":56>r&&r>=48?e="U":48>r&&r>=40?e="T":40>r&&r>=32?e="S":32>r&&r>=24?e="R":24>r&&r>=16?e="Q":16>r&&r>=8?e="P":8>r&&r>=0?e="N":0>r&&r>=-8?e="M":-8>r&&r>=-16?e="L":-16>r&&r>=-24?e="K":-24>r&&r>=-32?e="J":-32>r&&r>=-40?e="H":-40>r&&r>=-48?e="G":-48>r&&r>=-56?e="F":-56>r&&r>=-64?e="E":-64>r&&r>=-72?e="D":-72>r&&r>=-80&&(e="C"),e}function Mtt(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+Ntt(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function Ntt(r,e,t){var n=I4(t),i=Math.floor(r/1e5),a=Math.floor(e/1e5)%20;return Ptt(i,a,n)}function I4(r){var e=r%JM;return e===0&&(e=JM),e}function Ptt(r,e,t){var n=t-1,i=x4.charCodeAt(n),a=S4.charCodeAt(n),o=i+r-1,s=a+e,A=!1;o>mv&&(o=o-mv+qf-1,A=!0),(o===no||i<no&&o>no||(o>no||i<no)&&A)&&o++,(o===Xo||i<Xo&&o>Xo||(o>Xo||i<Xo)&&A)&&(o++,o===no&&o++),o>mv&&(o=o-mv+qf-1),s>yv?(s=s-yv+qf-1,A=!0):A=!1,(s===no||a<no&&s>no||(s>no||a<no)&&A)&&s++,(s===Xo||a<Xo&&s>Xo||(s>Xo||a<Xo)&&A)&&(s++,s===no&&s++),s>yv&&(s=s-yv+qf-1);var l=String.fromCharCode(o)+String.fromCharCode(s);return l}function L4(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var e=r.length,t=null,n="",i,a=0;!/[A-Z]/.test(i=r.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,a++}var o=parseInt(n,10);if(a===0||a+3>e)throw"MGRSPoint bad conversion from: "+r;var s=r.charAt(a++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+r;t=r.substring(a,a+=2);for(var A=I4(o),l=Utt(t.charAt(0),A),u=Dtt(t.charAt(1),A);u<Qtt(s);)u+=2e6;var c=e-a;if(c%2!==0)throw`MGRSPoint has to have an even number
of digits after the zone letter and two 100km letters - front
half for easting meters, second half for
northing meters`+r;var h=c/2,f=0,p=0,v,m,g,_,E;return h>0&&(v=1e5/Math.pow(10,h),m=r.substring(a,a+h),f=parseFloat(m)*v,g=r.substring(a+h),p=parseFloat(g)*v),_=f+l,E=p+u,{easting:_,northing:E,zoneLetter:s,zoneNumber:o,accuracy:v}}function Utt(r,e){for(var t=x4.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===no&&t++,t===Xo&&t++,t>mv){if(i)throw"Bad character: "+r;t=qf,i=!0}n+=1e5}return n}function Dtt(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=S4.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===no&&t++,t===Xo&&t++,t>yv){if(i)throw"Bad character: "+r;t=qf,i=!0}n+=1e5}return n}function Qtt(r){var e;switch(r){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+r}function Lp(r,e,t){if(!(this instanceof Lp))return new Lp(r,e,t);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof e>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=e,this.z=t||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Lp.fromMGRS=function(r){return new Lp(F4(r))};Lp.prototype.toMGRS=function(r){return b4([this.x,this.y],r)};var Htt=1,Gtt=.25,eN=.046875,rN=.01953125,nN=.01068115234375,ktt=.75,$tt=.46875,jtt=.013020833333333334,Vtt=.007120768229166667,Ktt=.3645833333333333,ztt=.005696614583333333,Xtt=.3076171875;function O4(r){var e=[];e[0]=Htt-r*(Gtt+r*(eN+r*(rN+r*nN))),e[1]=r*(ktt-r*(eN+r*(rN+r*nN)));var t=r*r;return e[2]=t*($tt-r*(jtt+r*Vtt)),t*=r,e[3]=t*(Ktt-r*ztt),e[4]=t*r*Xtt,e}function _w(r,e,t,n){return t*=e,e*=e,n[0]*r-t*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}var Ytt=20;function R4(r,e,t){for(var n=1/(1-e),i=r,a=Ytt;a;--a){var o=Math.sin(i),s=1-e*o*o;if(s=(_w(i,o,Math.cos(i),t)-r)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)<ie)return i}return i}function Wtt(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=O4(this.es),this.ml0=_w(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function qtt(r){var e=r.x,t=r.y,n=pe(e-this.long0),i,a,o,s=Math.sin(t),A=Math.cos(t);if(this.es){var u=A*n,c=Math.pow(u,2),h=this.ep2*Math.pow(A,2),f=Math.pow(h,2),p=Math.abs(A)>ie?Math.tan(t):0,v=Math.pow(p,2),m=Math.pow(v,2);i=1-this.es*Math.pow(s,2),u=u/Math.sqrt(i);var g=_w(t,s,A,this.en);a=this.a*(this.k0*u*(1+c/6*(1-v+h+c/20*(5-18*v+m+14*h-58*v*h+c/42*(61+179*m-m*v-479*v)))))+this.x0,o=this.a*(this.k0*(g-this.ml0+s*n*u/2*(1+c/12*(5-v+9*h+4*f+c/30*(61+m-58*v+270*h-330*v*h+c/56*(1385+543*m-m*v-3111*v))))))+this.y0}else{var l=A*Math.sin(n);if(Math.abs(Math.abs(l)-1)<ie)return 93;if(a=.5*this.a*this.k0*Math.log((1+l)/(1-l))+this.x0,o=A*Math.cos(n)/Math.sqrt(1-Math.pow(l,2)),l=Math.abs(o),l>=1){if(l-1>ie)return 93;o=0}else o=Math.acos(o);t<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return r.x=a,r.y=o,r}function Ztt(r){var e,t,n,i,a=(r.x-this.x0)*(1/this.a),o=(r.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,t=R4(e,this.es,this.en),Math.abs(t)<Xt){var c=Math.sin(t),h=Math.cos(t),f=Math.abs(h)>ie?Math.tan(t):0,p=this.ep2*Math.pow(h,2),v=Math.pow(p,2),m=Math.pow(f,2),g=Math.pow(m,2);e=1-this.es*Math.pow(c,2);var _=a*Math.sqrt(e)/this.k0,E=Math.pow(_,2);e=e*f,n=t-e*E/(1-this.es)*.5*(1-E/12*(5+3*m-9*p*m+p-4*v-E/30*(61+90*m-252*p*m+45*g+46*p-E/56*(1385+3633*m+4095*g+1574*g*m)))),i=pe(this.long0+_*(1-E/6*(1+2*m+p-E/20*(5+28*m+24*g+8*p*m+6*p-E/42*(61+662*m+1320*g+720*g*m))))/h)}else n=Xt*Ay(o),i=0;else{var s=Math.exp(a/this.k0),A=.5*(s-1/s),l=this.lat0+o/this.k0,u=Math.cos(l);e=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(A,2))),n=Math.asin(e),o<0&&(n=-n),A===0&&u===0?i=0:i=pe(Math.atan2(A,u)+this.long0)}return r.x=i,r.y=n,r}var Jtt=["Fast_Transverse_Mercator","Fast Transverse Mercator"],j0={init:Wtt,forward:qtt,inverse:Ztt,names:Jtt};function M4(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function ww(r,e){r=Math.abs(r),e=Math.abs(e);var t=Math.max(r,e),n=Math.min(r,e)/(t||1);return t*Math.sqrt(1+Math.pow(n,2))}function tet(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function eet(r){var e=Math.abs(r);return e=tet(e*(1+e/(ww(1,e)+1))),r<0?-e:e}function bI(r,e){for(var t=2*Math.cos(2*e),n=r.length-1,i=r[n],a=0,o;--n>=0;)o=-a+t*i+r[n],a=i,i=o;return e+o*Math.sin(2*e)}function ret(r,e){for(var t=2*Math.cos(e),n=r.length-1,i=r[n],a=0,o;--n>=0;)o=-a+t*i+r[n],a=i,i=o;return Math.sin(e)*o}function net(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function N4(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),a=M4(t),o=net(t),s=2*i*o,A=-2*n*a,l=r.length-1,u=r[l],c=0,h=0,f=0,p,v;--l>=0;)p=h,v=c,h=u,c=f,u=-p+s*h-A*c+r[l],f=-v+A*h+s*c;return s=n*o,A=i*a,[s*u-A*f,s*f+A*u]}function iet(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(j0.init.apply(this),this.forward=j0.forward,this.inverse=j0.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),e=r/(2-r),t=e;this.cgb[0]=e*(2+e*(-2/3+e*(-2+e*(116/45+e*(26/45+e*(-2854/675)))))),this.cbg[0]=e*(-2+e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))),t=t*e,this.cgb[1]=t*(7/3+e*(-8/5+e*(-227/45+e*(2704/315+e*(2323/945))))),this.cbg[1]=t*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),t=t*e,this.cgb[2]=t*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=t*(-26/15+e*(34/21+e*(8/5+e*(-12686/2835)))),t=t*e,this.cgb[3]=t*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=t*(1237/630+e*(-12/5+e*(-24832/14175))),t=t*e,this.cgb[4]=t*(4174/315+e*(-144838/6237)),this.cbg[4]=t*(-734/315+e*(109598/31185)),t=t*e,this.cgb[5]=t*(601676/22275),this.cbg[5]=t*(444337/155925),t=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+t*(1/4+t*(1/64+t/256))),this.utg[0]=e*(-.5+e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=t*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=t*(13/48+e*(-3/5+e*(557/1440+e*(281/630+e*(-1983433/1935360))))),t=t*e,this.utg[2]=t*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=t*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),t=t*e,this.utg[3]=t*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=t*(49561/161280+e*(-179/168+e*(6601661/7257600))),t=t*e,this.utg[4]=t*(-4583/161280+e*(108847/3991680)),this.gtu[4]=t*(34729/80640+e*(-3418889/1995840)),t=t*e,this.utg[5]=t*(-20648693/638668800),this.gtu[5]=t*(212378941/319334400);var n=bI(this.cbg,this.lat0);this.Zb=-this.Qn*(n+ret(this.gtu,2*n))}function aet(r){var e=pe(r.x-this.long0),t=r.y;t=bI(this.cbg,t);var n=Math.sin(t),i=Math.cos(t),a=Math.sin(e),o=Math.cos(e);t=Math.atan2(n,o*i),e=Math.atan2(a*i,ww(n,i*o)),e=eet(Math.tan(e));var s=N4(this.gtu,2*t,2*e);t=t+s[0],e=e+s[1];var A,l;return Math.abs(e)<=2.623395162778?(A=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*t+this.Zb)+this.y0):(A=1/0,l=1/0),r.x=A,r.y=l,r}function oet(r){var e=(r.x-this.x0)*(1/this.a),t=(r.y-this.y0)*(1/this.a);t=(t-this.Zb)/this.Qn,e=e/this.Qn;var n,i;if(Math.abs(e)<=2.623395162778){var a=N4(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(M4(e));var o=Math.sin(t),s=Math.cos(t),A=Math.sin(e),l=Math.cos(e);t=Math.atan2(o*l,ww(A,l*s)),e=Math.atan2(A,l*s),n=pe(e+this.long0),i=bI(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var set=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],V0={init:iet,forward:aet,inverse:oet,names:set};function Aet(r,e){if(r===void 0){if(r=Math.floor((pe(e)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var uet="etmerc";function cet(){var r=Aet(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*ia,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,V0.init.apply(this),this.forward=V0.forward,this.inverse=V0.inverse}var het=["Universal Transverse Mercator System","utm"],fet={init:cet,names:het,dependsOn:uet};function FI(r,e){return Math.pow((1-r)/(1+r),e)}var pet=20;function det(){var r=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Yr)/(Math.pow(Math.tan(.5*this.lat0+Yr),this.C)*FI(this.e*r,this.ratexp))}function vet(r){var e=r.x,t=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+Yr),this.C)*FI(this.e*Math.sin(t),this.ratexp))-Xt,r.x=this.C*e,r}function get(r){for(var e=1e-14,t=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+Yr)/this.K,1/this.C),a=pet;a>0&&(n=2*Math.atan(i*FI(this.e*Math.sin(r.y),-.5*this.e))-Xt,!(Math.abs(n-r.y)<e));--a)r.y=n;return a?(r.x=t,r.y=n,r):null}var yet=["gauss"],II={init:det,forward:vet,inverse:get,names:yet};function met(){II.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function _et(r){var e,t,n,i;return r.x=pe(r.x-this.long0),II.forward.apply(this,[r]),e=Math.sin(r.y),t=Math.cos(r.y),n=Math.cos(r.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*t*n),r.x=i*t*Math.sin(r.x),r.y=i*(this.cosc0*e-this.sinc0*t*n),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function wet(r){var e,t,n,i,a;if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,a=Math.sqrt(r.x*r.x+r.y*r.y)){var o=2*Math.atan2(a,this.R2);e=Math.sin(o),t=Math.cos(o),i=Math.asin(t*this.sinc0+r.y*e*this.cosc0/a),n=Math.atan2(r.x*e,a*this.cosc0*t-r.y*this.sinc0*e)}else i=this.phic0,n=0;return r.x=n,r.y=i,II.inverse.apply(this,[r]),r.x=pe(r.x+this.long0),r}var Eet=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],Cet={init:met,forward:_et,inverse:wet,names:Eet};function Bet(r,e,t){return e*=t,Math.tan(.5*(Xt+r))*Math.pow((1-e)/(1+e),.5*t)}function Tet(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ie&&(this.k0=.5*(1+Ay(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ie&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ie&&(this.k0=.5*this.cons*fA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/bs(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=fA(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Xt,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function xet(r){var e=r.x,t=r.y,n=Math.sin(t),i=Math.cos(t),a,o,s,A,l,u,c=pe(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=ie&&Math.abs(t+this.lat0)<=ie?(r.x=NaN,r.y=NaN,r):this.sphere?(a=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(c)),r.x=this.a*a*i*Math.sin(c)+this.x0,r.y=this.a*a*(this.coslat0*n-this.sinlat0*i*Math.cos(c))+this.y0,r):(o=2*Math.atan(this.ssfn_(t,n,this.e))-Xt,A=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=ie?(l=bs(this.e,t*this.con,this.con*n),u=2*this.a*this.k0*l/this.cons,r.x=this.x0+u*Math.sin(e-this.long0),r.y=this.y0-this.con*u*Math.cos(e-this.long0),r):(Math.abs(this.sinlat0)<ie?(a=2*this.a*this.k0/(1+A*Math.cos(c)),r.y=a*s):(a=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*A*Math.cos(c))),r.y=a*(this.cosX0*s-this.sinX0*A*Math.cos(c))+this.y0),r.x=a*A*Math.sin(c)+this.x0,r))}function bet(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,a,o=Math.sqrt(r.x*r.x+r.y*r.y);if(this.sphere){var s=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,t=this.lat0,o<=ie?(r.x=e,r.y=t,r):(t=Math.asin(Math.cos(s)*this.sinlat0+r.y*Math.sin(s)*this.coslat0/o),Math.abs(this.coslat0)<ie?this.lat0>0?e=pe(this.long0+Math.atan2(r.x,-1*r.y)):e=pe(this.long0+Math.atan2(r.x,r.y)):e=pe(this.long0+Math.atan2(r.x*Math.sin(s),o*this.coslat0*Math.cos(s)-r.y*this.sinlat0*Math.sin(s))),r.x=e,r.y=t,r)}else if(Math.abs(this.coslat0)<=ie){if(o<=ie)return t=this.lat0,e=this.long0,r.x=e,r.y=t,r;r.x*=this.con,r.y*=this.con,n=o*this.cons/(2*this.a*this.k0),t=this.con*Eg(this.e,n),e=this.con*pe(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=ie?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/o),e=pe(this.long0+Math.atan2(r.x*Math.sin(i),o*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),t=-1*Eg(this.e,Math.tan(.5*(Xt+a)));return r.x=e,r.y=t,r}var Fet=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],Iet={init:Tet,forward:xet,inverse:bet,names:Fet,ssfn_:Bet};function Let(){var r=this.lat0;this.lambda0=this.long0;var e=Math.sin(r),t=this.a,n=this.rf,i=1/n,a=2*i-Math.pow(i,2),o=this.e=Math.sqrt(a);this.R=this.k0*t*Math.sqrt(1-a)/(1-a*Math.pow(e,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),A=Math.log(Math.tan(Math.PI/4+r/2)),l=Math.log((1+o*e)/(1-o*e));this.K=s-this.alpha*A+this.alpha*o/2*l}function Oet(r){var e=Math.log(Math.tan(Math.PI/4-r.y/2)),t=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(e+t)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),a=this.alpha*(r.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return r.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,r.x=this.R*o+this.x0,r}function Ret(r){for(var e=r.x-this.x0,t=r.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(t/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+o/this.alpha,A=0,l=a,u=-1e3,c=0;Math.abs(l-u)>1e-7;){if(++c>20)return;A=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(A))-Math.PI/2}return r.x=s,r.y=l,r}var Met=["somerc"],Net={init:Let,forward:Oet,inverse:Ret,names:Met},Df=1e-7;function Pet(r){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],t=typeof r.PROJECTION=="object"?Object.keys(r.PROJECTION)[0]:r.PROJECTION;return"no_uoff"in r||"no_off"in r||e.indexOf(t)!==-1}function Uet(){var r,e,t,n,i,a,o,s,A,l,u=0,c,h=0,f=0,p=0,v=0,m=0,g=0;this.no_off=Pet(this),this.no_rot="no_rot"in this;var _=!1;"alpha"in this&&(_=!0);var E=!1;if("rectified_grid_angle"in this&&(E=!0),_&&(g=this.alpha),E&&(u=this.rectified_grid_angle*ia),_||E)h=this.longc;else if(f=this.long1,v=this.lat1,p=this.long2,m=this.lat2,Math.abs(v-m)<=Df||(r=Math.abs(v))<=Df||Math.abs(r-Xt)<=Df||Math.abs(Math.abs(this.lat0)-Xt)<=Df||Math.abs(Math.abs(m)-Xt)<=Df)throw new Error;var B=1-this.es;e=Math.sqrt(B),Math.abs(this.lat0)>ie?(s=Math.sin(this.lat0),t=Math.cos(this.lat0),r=1-this.es*s*s,this.B=t*t,this.B=Math.sqrt(1+this.es*this.B*this.B/B),this.A=this.B*this.k0*e/r,n=this.B*e/(t*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(bs(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),_||E?(_?(c=Math.asin(Math.sin(g)/n),E||(u=g)):(c=u,g=Math.asin(n*Math.sin(c))),this.lam0=h-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(a=Math.pow(bs(this.e,v,Math.sin(v)),this.B),o=Math.pow(bs(this.e,m,Math.sin(m)),this.B),i=this.E/a,A=(o-a)/(o+a),l=this.E*this.E,l=(l-o*a)/(l+o*a),r=f-p,r<-Math.pi?p-=_g:r>Math.pi&&(p+=_g),this.lam0=pe(.5*(f+p)-Math.atan(l*Math.tan(.5*this.B*(f-p))/A)/this.B),c=Math.atan(2*Math.sin(this.B*pe(f-this.lam0))/(i-1/i)),u=g=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(Yr-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(Yr+i))}function Det(r){var e={},t,n,i,a,o,s,A,l;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-Xt)>ie){if(o=this.E/Math.pow(bs(this.e,r.y,Math.sin(r.y)),this.B),s=1/o,t=.5*(o-s),n=.5*(o+s),a=Math.sin(this.B*r.x),i=(t*this.singam-a*this.cosgam)/n,Math.abs(Math.abs(i)-1)<ie)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*r.x),Math.abs(s)<Df?A=this.A*r.x:A=this.ArB*Math.atan2(t*this.cosgam+a*this.singam,s)}else l=r.y>0?this.v_pole_n:this.v_pole_s,A=this.ArB*r.y;return this.no_rot?(e.x=A,e.y=l):(A-=this.u_0,e.x=l*this.cosrot+A*this.sinrot,e.y=A*this.cosrot-l*this.sinrot),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function Qet(r){var e,t,n,i,a,o,s,A={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(t=r.y,e=r.x):(t=r.x*this.cosrot-r.y*this.sinrot,e=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*t),i=.5*(n-1/n),a=.5*(n+1/n),o=Math.sin(this.BrA*e),s=(o*this.cosgam+i*this.singam)/a,Math.abs(Math.abs(s)-1)<ie)A.x=0,A.y=s<0?-Xt:Xt;else{if(A.y=this.E/Math.sqrt((1+s)/(1-s)),A.y=Eg(this.e,Math.pow(A.y,1/this.B)),A.y===1/0)throw new Error;A.x=-this.rB*Math.atan2(i*this.cosgam-o*this.singam,Math.cos(this.BrA*e))}return A.x+=this.lam0,A}var Het=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"],Get={init:Uet,forward:Det,inverse:Qet,names:Het};function ket(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<ie)){var r=this.b/this.a;this.e=Math.sqrt(1-r*r);var e=Math.sin(this.lat1),t=Math.cos(this.lat1),n=fA(this.e,e,t),i=bs(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=fA(this.e,a,o),A=bs(this.e,this.lat2,a),l=bs(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>ie?this.ns=Math.log(n/s)/Math.log(i/A):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function $et(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=ie&&(t=Ay(t)*(Xt-2*ie));var n=Math.abs(Math.abs(t)-Xt),i,a;if(n>ie)i=bs(this.e,t,Math.sin(t)),a=this.a*this.f0*Math.pow(i,this.ns);else{if(n=t*this.ns,n<=0)return null;a=0}var o=this.ns*pe(e-this.long0);return r.x=this.k0*(a*Math.sin(o))+this.x0,r.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,r}function jet(r){var e,t,n,i,a,o=(r.x-this.x0)/this.k0,s=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),t=1):(e=-Math.sqrt(o*o+s*s),t=-1);var A=0;if(e!==0&&(A=Math.atan2(t*o,t*s)),e!==0||this.ns>0){if(t=1/this.ns,n=Math.pow(e/(this.a*this.f0),t),i=Eg(this.e,n),i===-9999)return null}else i=-Xt;return a=pe(A/this.ns+this.long0),r.x=a,r.y=i,r}var Vet=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],Ket={init:ket,forward:$et,inverse:jet,names:Vet};function zet(){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 Xet(r){var e,t,n,i,a,o,s,A=r.x,l=r.y,u=pe(A-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),t=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(t)+Math.sin(this.ad)*Math.cos(t)*Math.cos(n)),a=Math.asin(Math.cos(t)*Math.sin(n)/Math.cos(i)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=s*Math.cos(o)/1,r.x=s*Math.sin(o)/1,this.czech||(r.y*=-1,r.x*=-1),r}function Yet(r){var e,t,n,i,a,o,s,A,l=r.x;r.x=r.y,r.y=l,this.czech||(r.y*=-1,r.x*=-1),o=Math.sqrt(r.x*r.x+r.y*r.y),a=Math.atan2(r.y,r.x),i=a/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),t=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),r.x=this.long0-t/this.alfa,s=e,A=0;var u=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-r.y)<1e-10&&(A=1),s=r.y,u+=1;while(A===0&&u<15);return u>=15?null:r}var Wet=["Krovak","krovak"],qet={init:zet,forward:Xet,inverse:Yet,names:Wet};function ka(r,e,t,n,i){return r*i-e*Math.sin(2*i)+t*Math.sin(4*i)-n*Math.sin(6*i)}function ly(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function uy(r){return .375*r*(1+.25*r*(1+.46875*r))}function cy(r){return .05859375*r*r*(1+.75*r)}function hy(r){return r*r*r*(35/3072)}function Op(r,e,t){var n=e*t;return r/Math.sqrt(1-n*n)}function Yp(r){return Math.abs(r)<Xt?r:r-Ay(r)*Math.PI}function j_(r,e,t,n,i){var a,o;a=r/e;for(var s=0;s<15;s++)if(o=(r-(e*a-t*Math.sin(2*a)+n*Math.sin(4*a)-i*Math.sin(6*a)))/(e-2*t*Math.cos(2*a)+4*n*Math.cos(4*a)-6*i*Math.cos(6*a)),a+=o,Math.abs(o)<=1e-10)return a;return NaN}function Zet(){this.sphere||(this.e0=ly(this.es),this.e1=uy(this.es),this.e2=cy(this.es),this.e3=hy(this.es),this.ml0=this.a*ka(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Jet(r){var e,t,n=r.x,i=r.y;if(n=pe(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(n)),t=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var a=Math.sin(i),o=Math.cos(i),s=Op(this.a,this.e,a),A=Math.tan(i)*Math.tan(i),l=n*Math.cos(i),u=l*l,c=this.es*o*o/(1-this.es),h=this.a*ka(this.e0,this.e1,this.e2,this.e3,i);e=s*l*(1-u*A*(1/6-(8-A+8*c)*u/120)),t=h-this.ml0+s*a/o*u*(.5+(5-A+6*c)*u/24)}return r.x=e+this.x0,r.y=t+this.y0,r}function trt(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i;if(this.sphere){var a=t+this.lat0;n=Math.asin(Math.sin(a)*Math.cos(e)),i=Math.atan2(Math.tan(e),Math.cos(a))}else{var o=this.ml0/this.a+t,s=j_(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-Xt)<=ie)return r.x=this.long0,r.y=Xt,t<0&&(r.y*=-1),r;var A=Op(this.a,this.e,Math.sin(s)),l=A*A*A/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(s),2),c=e*this.a/A,h=c*c;n=s-A*Math.tan(s)/l*c*c*(.5-(1+3*u)*c*c/24),i=c*(1-h*(u/3+(1+3*u)*u*h/15))/Math.cos(s)}return r.x=pe(i+this.long0),r.y=Yp(n),r}var ert=["Cassini","Cassini_Soldner","cass"],rrt={init:Zet,forward:Jet,inverse:trt,names:ert};function Iu(r,e){var t;return r>1e-7?(t=r*e,(1-r*r)*(e/(1-t*t)-.5/r*Math.log((1-t)/(1+t)))):2*e}var nrt=1,irt=2,art=3,ort=4;function srt(){var r=Math.abs(this.lat0);if(Math.abs(r-Xt)<ie?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<ie?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=Iu(this.e,1),this.mmf=.5/(1-this.es),this.apa=vrt(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),e=Math.sin(this.lat0),this.sinb1=Iu(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*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 Art(r){var e,t,n,i,a,o,s,A,l,u,c=r.x,h=r.y;if(c=pe(c-this.long0),this.sphere){if(a=Math.sin(h),u=Math.cos(h),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t=this.mode===this.EQUIT?1+u*n:1+this.sinph0*a+this.cosph0*u*n,t<=ie)return null;t=Math.sqrt(2/t),e=t*u*Math.sin(c),t*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(h+this.lat0)<ie)return null;t=Yr-h*.5,t=2*(this.mode===this.S_POLE?Math.cos(t):Math.sin(t)),e=t*Math.sin(c),t*=n}}else{switch(s=0,A=0,l=0,n=Math.cos(c),i=Math.sin(c),a=Math.sin(h),o=Iu(this.e,a),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=o/this.qp,A=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:l=1+this.sinb1*s+this.cosb1*A*n;break;case this.EQUIT:l=1+A*n;break;case this.N_POLE:l=Xt+h,o=this.qp-o;break;case this.S_POLE:l=h-Xt,o=this.qp+o;break}if(Math.abs(l)<ie)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),this.mode===this.OBLIQ?t=this.ymf*l*(this.cosb1*s-this.sinb1*A*n):t=(l=Math.sqrt(2/(1+A*n)))*s*this.ymf,e=this.xmf*l*A*i;break;case this.N_POLE:case this.S_POLE:o>=0?(e=(l=Math.sqrt(o))*i,t=n*(this.mode===this.S_POLE?l:-l)):e=t=0;break}}return r.x=this.a*e+this.x0,r.y=this.a*t+this.y0,r}function lrt(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i,a,o,s,A,l;if(this.sphere){var u=0,c,h=0;if(c=Math.sqrt(e*e+t*t),i=c*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(i),u=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=ie?0:Math.asin(t*h/c),e*=h,t=u*c;break;case this.OBLIQ:i=Math.abs(c)<=ie?this.lat0:Math.asin(u*this.sinph0+t*h*this.cosph0/c),e*=h*this.cosph0,t=(u-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:t=-t,i=Xt-i;break;case this.S_POLE:i-=Xt;break}n=t===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(e,t)}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,t*=this.dd,A=Math.sqrt(e*e+t*t),A<ie)return r.x=this.long0,r.y=this.lat0,r;o=2*Math.asin(.5*A/this.rq),a=Math.cos(o),e*=o=Math.sin(o),this.mode===this.OBLIQ?(l=a*this.sinb1+t*o*this.cosb1/A,s=this.qp*l,t=A*this.cosb1*a-t*this.sinb1*o):(l=t*o/A,s=this.qp*l,t=A*a)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(t=-t),s=e*e+t*t,!s)return r.x=this.long0,r.y=this.lat0,r;l=1-s/this.qp,this.mode===this.S_POLE&&(l=-l)}n=Math.atan2(e,t),i=grt(Math.asin(l),this.apa)}return r.x=pe(this.long0+n),r.y=i,r}var urt=.3333333333333333,crt=.17222222222222222,hrt=.10257936507936508,frt=.06388888888888888,prt=.0664021164021164,drt=.016415012942191543;function vrt(r){var e,t=[];return t[0]=r*urt,e=r*r,t[0]+=e*crt,t[1]=e*frt,e*=r,t[0]+=e*hrt,t[1]+=e*prt,t[2]=e*drt,t}function grt(r,e){var t=r+r;return r+e[0]*Math.sin(t)+e[1]*Math.sin(t+t)+e[2]*Math.sin(t+t+t)}var yrt=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],mrt={init:srt,forward:Art,inverse:lrt,names:yrt,S_POLE:nrt,N_POLE:irt,EQUIT:art,OBLIQ:ort};function zu(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function _rt(){Math.abs(this.lat1+this.lat2)<ie||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=fA(this.e3,this.sin_po,this.cos_po),this.qs1=Iu(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=fA(this.e3,this.sin_po,this.cos_po),this.qs2=Iu(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Iu(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>ie?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 wrt(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=Iu(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*pe(e-this.long0),o=i*Math.sin(a)+this.x0,s=this.rh-i*Math.cos(a)+this.y0;return r.x=o,r.y=s,r}function Ert(r){var e,t,n,i,a,o;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,e!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(t=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,t)),a=pe(i/this.ns0+this.long0),r.x=a,r.y=o,r}function Crt(r,e){var t,n,i,a,o,s=zu(.5*e);if(r<ie)return s;for(var A=r*r,l=1;l<=25;l++)if(t=Math.sin(s),n=Math.cos(s),i=r*t,a=1-i*i,o=.5*a*a/n*(e/(1-A)-t/a+.5/r*Math.log((1-i)/(1+i))),s=s+o,Math.abs(o)<=1e-7)return s;return null}var Brt=["Albers_Conic_Equal_Area","Albers","aea"],Trt={init:_rt,forward:wrt,inverse:Ert,names:Brt,phi1z:Crt};function xrt(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Srt(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=pe(l-this.long0),e=Math.sin(u),t=Math.cos(u),i=Math.cos(n),o=this.sin_p14*e+this.cos_p14*t*i,a=1,o>0||Math.abs(o)<=ie?(s=this.x0+this.a*a*t*Math.sin(n)/o,A=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*i)/o):(s=this.x0+this.infinity_dist*t*Math.sin(n),A=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*t*i)),r.x=s,r.y=A,r}function brt(r){var e,t,n,i,a,o;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(e=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(e,this.rc),t=Math.sin(i),n=Math.cos(i),o=zu(n*this.sin_p14+r.y*t*this.cos_p14/e),a=Math.atan2(r.x*t,e*this.cos_p14*n-r.y*this.sin_p14*t),a=pe(this.long0+a)):(o=this.phic0,a=0),r.x=a,r.y=o,r}var Frt=["gnom"],Irt={init:xrt,forward:Srt,inverse:brt,names:Frt};function Lrt(r,e){var t=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(e)-t)<1e-6)return e<0?-1*Xt:Xt;for(var n=Math.asin(.5*e),i,a,o,s,A=0;A<30;A++)if(a=Math.sin(n),o=Math.cos(n),s=r*a,i=Math.pow(1-s*s,2)/(2*o)*(e/(1-r*r)-a/(1-s*s)+.5/r*Math.log((1-s)/(1+s))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function Ort(){this.sphere||(this.k0=fA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Rrt(r){var e=r.x,t=r.y,n,i,a=pe(e-this.long0);if(this.sphere)n=this.x0+this.a*a*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(t)/Math.cos(this.lat_ts);else{var o=Iu(this.e,Math.sin(t));n=this.x0+this.a*this.k0*a,i=this.y0+this.a*o*.5/this.k0}return r.x=n,r.y=i,r}function Mrt(r){r.x-=this.x0,r.y-=this.y0;var e,t;return this.sphere?(e=pe(this.long0+r.x/this.a/Math.cos(this.lat_ts)),t=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(t=Lrt(this.e,2*r.y*this.k0/this.a),e=pe(this.long0+r.x/(this.a*this.k0))),r.x=e,r.y=t,r}var Nrt=["cea"],Prt={init:Ort,forward:Rrt,inverse:Mrt,names:Nrt};function Urt(){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 Drt(r){var e=r.x,t=r.y,n=pe(e-this.long0),i=Yp(t-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function Qrt(r){var e=r.x,t=r.y;return r.x=pe(this.long0+(e-this.x0)/(this.a*this.rc)),r.y=Yp(this.lat0+(t-this.y0)/this.a),r}var Hrt=["Equirectangular","Equidistant_Cylindrical","eqc"],Grt={init:Urt,forward:Drt,inverse:Qrt,names:Hrt},iN=20;function krt(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ly(this.es),this.e1=uy(this.es),this.e2=cy(this.es),this.e3=hy(this.es),this.ml0=this.a*ka(this.e0,this.e1,this.e2,this.e3,this.lat0)}function $rt(r){var e=r.x,t=r.y,n,i,a,o=pe(e-this.long0);if(a=o*Math.sin(t),this.sphere)Math.abs(t)<=ie?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(a)/Math.tan(t),i=this.a*(Yp(t-this.lat0)+(1-Math.cos(a))/Math.tan(t)));else if(Math.abs(t)<=ie)n=this.a*o,i=-1*this.ml0;else{var s=Op(this.a,this.e,Math.sin(t))/Math.tan(t);n=s*Math.sin(a),i=this.a*ka(this.e0,this.e1,this.e2,this.e3,t)-this.ml0+s*(1-Math.cos(a))}return r.x=n+this.x0,r.y=i+this.y0,r}function jrt(r){var e,t,n,i,a,o,s,A,l;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=ie)e=pe(n/this.a+this.long0),t=0;else{o=this.lat0+i/this.a,s=n*n/this.a/this.a+o*o,A=o;var u;for(a=iN;a;--a)if(u=Math.tan(A),l=-1*(o*(A*u+1)-A-.5*(A*A+s)*u)/((A-o)/u-1),A+=l,Math.abs(l)<=ie){t=A;break}e=pe(this.long0+Math.asin(n*Math.tan(A)/this.a)/Math.sin(t))}else if(Math.abs(i+this.ml0)<=ie)t=0,e=pe(this.long0+n/this.a);else{o=(this.ml0+i)/this.a,s=n*n/this.a/this.a+o*o,A=o;var c,h,f,p,v;for(a=iN;a;--a)if(v=this.e*Math.sin(A),c=Math.sqrt(1-v*v)*Math.tan(A),h=this.a*ka(this.e0,this.e1,this.e2,this.e3,A),f=this.e0-2*this.e1*Math.cos(2*A)+4*this.e2*Math.cos(4*A)-6*this.e3*Math.cos(6*A),p=h/this.a,l=(o*(c*p+1)-p-.5*c*(p*p+s))/(this.es*Math.sin(2*A)*(p*p+s-2*o*p)/(4*c)+(o-p)*(c*f-2/Math.sin(2*A))-f),A-=l,Math.abs(l)<=ie){t=A;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=pe(this.long0+Math.asin(n*c/this.a)/Math.sin(t))}return r.x=e,r.y=t,r}var Vrt=["Polyconic","poly"],Krt={init:krt,forward:$rt,inverse:jrt,names:Vrt};function zrt(){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 Xrt(r){var e,t=r.x,n=r.y,i=n-this.lat0,a=t-this.long0,o=i/kv*1e-5,s=a,A=1,l=0;for(e=1;e<=10;e++)A=A*o,l=l+this.A[e]*A;var u=l,c=s,h=1,f=0,p,v,m=0,g=0;for(e=1;e<=6;e++)p=h*u-f*c,v=f*u+h*c,h=p,f=v,m=m+this.B_re[e]*h-this.B_im[e]*f,g=g+this.B_im[e]*h+this.B_re[e]*f;return r.x=g*this.a+this.x0,r.y=m*this.a+this.y0,r}function Yrt(r){var e,t=r.x,n=r.y,i=t-this.x0,a=n-this.y0,o=a/this.a,s=i/this.a,A=1,l=0,u,c,h=0,f=0;for(e=1;e<=6;e++)u=A*o-l*s,c=l*o+A*s,A=u,l=c,h=h+this.C_re[e]*A-this.C_im[e]*l,f=f+this.C_im[e]*A+this.C_re[e]*l;for(var p=0;p<this.iterations;p++){var v=h,m=f,g,_,E=o,B=s;for(e=2;e<=6;e++)g=v*h-m*f,_=m*h+v*f,v=g,m=_,E=E+(e-1)*(this.B_re[e]*v-this.B_im[e]*m),B=B+(e-1)*(this.B_im[e]*v+this.B_re[e]*m);v=1,m=0;var L=this.B_re[1],O=this.B_im[1];for(e=2;e<=6;e++)g=v*h-m*f,_=m*h+v*f,v=g,m=_,L=L+e*(this.B_re[e]*v-this.B_im[e]*m),O=O+e*(this.B_im[e]*v+this.B_re[e]*m);var b=L*L+O*O;h=(E*L+B*O)/b,f=(B*L-E*O)/b}var T=h,F=f,M=1,S=0;for(e=1;e<=9;e++)M=M*T,S=S+this.D[e]*M;var x=this.lat0+S*kv*1e5,N=this.long0+F;return r.x=N,r.y=x,r}var Wrt=["New_Zealand_Map_Grid","nzmg"],qrt={init:zrt,forward:Xrt,inverse:Yrt,names:Wrt};function Zrt(){}function Jrt(r){var e=r.x,t=r.y,n=pe(e-this.long0),i=this.x0+this.a*n,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+t/2.5))*1.25;return r.x=i,r.y=a,r}function tnt(r){r.x-=this.x0,r.y-=this.y0;var e=pe(this.long0+r.x/this.a),t=2.5*(Math.atan(Math.exp(.8*r.y/this.a))-Math.PI/4);return r.x=e,r.y=t,r}var ent=["Miller_Cylindrical","mill"],rnt={init:Zrt,forward:Jrt,inverse:tnt,names:ent},nnt=20;function int(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=O4(this.es)}function ant(r){var e,t,n=r.x,i=r.y;if(n=pe(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var a=this.n*Math.sin(i),o=nnt;o;--o){var s=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=s,Math.abs(s)<ie)break}e=this.a*this.C_x*n*(this.m+Math.cos(i)),t=this.a*this.C_y*i}else{var A=Math.sin(i),l=Math.cos(i);t=this.a*_w(i,A,l,this.en),e=this.a*n*l/Math.sqrt(1-this.es*A*A)}return r.x=e,r.y=t,r}function ont(r){var e,t,n,i;return r.x-=this.x0,n=r.x/this.a,r.y-=this.y0,e=r.y/this.a,this.sphere?(e/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(e))),this.m?e=zu((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=zu(Math.sin(e)/this.n)),n=pe(n+this.long0),e=Yp(e)):(e=R4(r.y/this.a,this.es,this.en),i=Math.abs(e),i<Xt?(i=Math.sin(e),t=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)),n=pe(t)):i-ie<Xt&&(n=this.long0)),r.x=n,r.y=e,r}var snt=["Sinusoidal","sinu"],Ant={init:int,forward:ant,inverse:ont,names:snt};function lnt(){}function unt(r){for(var e=r.x,t=r.y,n=pe(e-this.long0),i=t,a=Math.PI*Math.sin(t);;){var o=-(i+Math.sin(i)-a)/(1+Math.cos(i));if(i+=o,Math.abs(o)<ie)break}i/=2,Math.PI/2-Math.abs(t)<ie&&(n=0);var s=.900316316158*this.a*n*Math.cos(i)+this.x0,A=1.4142135623731*this.a*Math.sin(i)+this.y0;return r.x=s,r.y=A,r}function cnt(r){var e,t;r.x-=this.x0,r.y-=this.y0,t=r.y/(1.4142135623731*this.a),Math.abs(t)>.999999999999&&(t=.999999999999),e=Math.asin(t);var n=pe(this.long0+r.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),t=(2*e+Math.sin(2*e))/Math.PI,Math.abs(t)>1&&(t=1);var i=Math.asin(t);return r.x=n,r.y=i,r}var hnt=["Mollweide","moll"],fnt={init:lnt,forward:unt,inverse:cnt,names:hnt};function pnt(){Math.abs(this.lat1+this.lat2)<ie||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ly(this.es),this.e1=uy(this.es),this.e2=cy(this.es),this.e3=hy(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=fA(this.e,this.sinphi,this.cosphi),this.ml1=ka(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<ie?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=fA(this.e,this.sinphi,this.cosphi),this.ml2=ka(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=ka(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function dnt(r){var e=r.x,t=r.y,n;if(this.sphere)n=this.a*(this.g-t);else{var i=ka(this.e0,this.e1,this.e2,this.e3,t);n=this.a*(this.g-i)}var a=this.ns*pe(e-this.long0),o=this.x0+n*Math.sin(a),s=this.y0+this.rh-n*Math.cos(a);return r.x=o,r.y=s,r}function vnt(r){r.x-=this.x0,r.y=this.rh-r.y+this.y0;var e,t,n,i;this.ns>=0?(t=Math.sqrt(r.x*r.x+r.y*r.y),e=1):(t=-Math.sqrt(r.x*r.x+r.y*r.y),e=-1);var a=0;if(t!==0&&(a=Math.atan2(e*r.x,e*r.y)),this.sphere)return i=pe(this.long0+a/this.ns),n=Yp(this.g-t/this.a),r.x=i,r.y=n,r;var o=this.g-t/this.a;return n=j_(o,this.e0,this.e1,this.e2,this.e3),i=pe(this.long0+a/this.ns),r.x=i,r.y=n,r}var gnt=["Equidistant_Conic","eqdc"],ynt={init:pnt,forward:dnt,inverse:vnt,names:gnt};function mnt(){this.R=this.a}function _nt(r){var e=r.x,t=r.y,n=pe(e-this.long0),i,a;Math.abs(t)<=ie&&(i=this.x0+this.R*n,a=this.y0);var o=zu(2*Math.abs(t/Math.PI));(Math.abs(n)<=ie||Math.abs(Math.abs(t)-Xt)<=ie)&&(i=this.x0,t>=0?a=this.y0+Math.PI*this.R*Math.tan(.5*o):a=this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/n-n/Math.PI),A=s*s,l=Math.sin(o),u=Math.cos(o),c=u/(l+u-1),h=c*c,f=c*(2/l-1),p=f*f,v=Math.PI*this.R*(s*(c-p)+Math.sqrt(A*(c-p)*(c-p)-(p+A)*(h-p)))/(p+A);n<0&&(v=-v),i=this.x0+v;var m=A+c;return v=Math.PI*this.R*(f*m-s*Math.sqrt((p+A)*(A+1)-m*m))/(p+A),t>=0?a=this.y0+v:a=this.y0-v,r.x=i,r.y=a,r}function wnt(r){var e,t,n,i,a,o,s,A,l,u,c,h,f;return r.x-=this.x0,r.y-=this.y0,c=Math.PI*this.R,n=r.x/c,i=r.y/c,a=n*n+i*i,o=-Math.abs(i)*(1+a),s=o-2*i*i+n*n,A=-2*o+1+2*i*i+a*a,f=i*i/A+(2*s*s*s/A/A/A-9*o*s/A/A)/27,l=(o-s*s/3/A)/A,u=2*Math.sqrt(-l/3),c=3*f/l/u,Math.abs(c)>1&&(c>=0?c=1:c=-1),h=Math.acos(c)/3,r.y>=0?t=(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI:t=-(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI,Math.abs(n)<ie?e=this.long0:e=pe(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(n*n-i*i)+a*a))/2/n),r.x=e,r.y=t,r}var Ent=["Van_der_Grinten_I","VanDerGrinten","vandg"],Cnt={init:mnt,forward:_nt,inverse:wnt,names:Ent};function Bnt(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function Tnt(r){var e=r.x,t=r.y,n=Math.sin(r.y),i=Math.cos(r.y),a=pe(e-this.long0),o,s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,O,b,T,F,M,S,x;return this.sphere?Math.abs(this.sin_p12-1)<=ie?(r.x=this.x0+this.a*(Xt-t)*Math.sin(a),r.y=this.y0-this.a*(Xt-t)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=ie?(r.x=this.x0+this.a*(Xt+t)*Math.sin(a),r.y=this.y0+this.a*(Xt+t)*Math.cos(a),r):(b=this.sin_p12*n+this.cos_p12*i*Math.cos(a),L=Math.acos(b),O=L?L/Math.sin(L):1,r.x=this.x0+this.a*O*i*Math.sin(a),r.y=this.y0+this.a*O*(this.cos_p12*n-this.sin_p12*i*Math.cos(a)),r):(o=ly(this.es),s=uy(this.es),A=cy(this.es),l=hy(this.es),Math.abs(this.sin_p12-1)<=ie?(u=this.a*ka(o,s,A,l,Xt),c=this.a*ka(o,s,A,l,t),r.x=this.x0+(u-c)*Math.sin(a),r.y=this.y0-(u-c)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=ie?(u=this.a*ka(o,s,A,l,Xt),c=this.a*ka(o,s,A,l,t),r.x=this.x0+(u+c)*Math.sin(a),r.y=this.y0+(u+c)*Math.cos(a),r):(h=n/i,f=Op(this.a,this.e,this.sin_p12),p=Op(this.a,this.e,n),v=Math.atan((1-this.es)*h+this.es*f*this.sin_p12/(p*i)),m=Math.atan2(Math.sin(a),this.cos_p12*Math.tan(v)-this.sin_p12*Math.cos(a)),m===0?T=Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):Math.abs(Math.abs(m)-Math.PI)<=ie?T=-Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):T=Math.asin(Math.sin(a)*Math.cos(v)/Math.sin(m)),g=this.e*this.sin_p12/Math.sqrt(1-this.es),_=this.e*this.cos_p12*Math.cos(m)/Math.sqrt(1-this.es),E=g*_,B=_*_,F=T*T,M=F*T,S=M*T,x=S*T,L=f*T*(1-F*B*(1-B)/6+M/8*E*(1-2*B)+S/120*(B*(4-7*B)-3*g*g*(1-7*B))-x/48*E),r.x=this.x0+L*Math.sin(m),r.y=this.y0+L*Math.cos(m),r))}function xnt(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,O,b,T;return this.sphere?(e=Math.sqrt(r.x*r.x+r.y*r.y),e>2*Xt*this.a?void 0:(t=e/this.a,n=Math.sin(t),i=Math.cos(t),a=this.long0,Math.abs(e)<=ie?o=this.lat0:(o=zu(i*this.sin_p12+r.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-Xt,Math.abs(s)<=ie?this.lat0>=0?a=pe(this.long0+Math.atan2(r.x,-r.y)):a=pe(this.long0-Math.atan2(-r.x,r.y)):a=pe(this.long0+Math.atan2(r.x*n,e*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=a,r.y=o,r)):(A=ly(this.es),l=uy(this.es),u=cy(this.es),c=hy(this.es),Math.abs(this.sin_p12-1)<=ie?(h=this.a*ka(A,l,u,c,Xt),e=Math.sqrt(r.x*r.x+r.y*r.y),f=h-e,o=j_(f/this.a,A,l,u,c),a=pe(this.long0+Math.atan2(r.x,-1*r.y)),r.x=a,r.y=o,r):Math.abs(this.sin_p12+1)<=ie?(h=this.a*ka(A,l,u,c,Xt),e=Math.sqrt(r.x*r.x+r.y*r.y),f=e-h,o=j_(f/this.a,A,l,u,c),a=pe(this.long0+Math.atan2(r.x,r.y)),r.x=a,r.y=o,r):(e=Math.sqrt(r.x*r.x+r.y*r.y),m=Math.atan2(r.x,r.y),p=Op(this.a,this.e,this.sin_p12),g=Math.cos(m),_=this.e*this.cos_p12*g,E=-_*_/(1-this.es),B=3*this.es*(1-E)*this.sin_p12*this.cos_p12*g/(1-this.es),L=e/p,O=L-E*(1+E)*Math.pow(L,3)/6-B*(1+3*E)*Math.pow(L,4)/24,b=1-E*O*O/2-L*O*O*O/6,v=Math.asin(this.sin_p12*Math.cos(O)+this.cos_p12*Math.sin(O)*g),a=pe(this.long0+Math.asin(Math.sin(m)*Math.sin(O)/Math.cos(v))),T=Math.sin(v),o=Math.atan2((T-this.es*b*this.sin_p12)*Math.tan(v),T*(1-this.es)),r.x=a,r.y=o,r))}var Snt=["Azimuthal_Equidistant","aeqd"],bnt={init:Bnt,forward:Tnt,inverse:xnt,names:Snt};function Fnt(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Int(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=pe(l-this.long0),e=Math.sin(u),t=Math.cos(u),i=Math.cos(n),o=this.sin_p14*e+this.cos_p14*t*i,a=1,(o>0||Math.abs(o)<=ie)&&(s=this.a*a*t*Math.sin(n),A=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*i)),r.x=s,r.y=A,r}function Lnt(r){var e,t,n,i,a,o,s;return r.x-=this.x0,r.y-=this.y0,e=Math.sqrt(r.x*r.x+r.y*r.y),t=zu(e/this.a),n=Math.sin(t),i=Math.cos(t),o=this.long0,Math.abs(e)<=ie?(s=this.lat0,r.x=o,r.y=s,r):(s=zu(i*this.sin_p14+r.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-Xt,Math.abs(a)<=ie?(this.lat0>=0?o=pe(this.long0+Math.atan2(r.x,-r.y)):o=pe(this.long0-Math.atan2(-r.x,r.y)),r.x=o,r.y=s,r):(o=pe(this.long0+Math.atan2(r.x*n,e*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=o,r.y=s,r))}var Ont=["ortho"],Rnt={init:Fnt,forward:Int,inverse:Lnt,names:Ont},Mn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Wr={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Mnt(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Xt-Yr/2?this.face=Mn.TOP:this.lat0<=-(Xt-Yr/2)?this.face=Mn.BOTTOM:Math.abs(this.long0)<=Yr?this.face=Mn.FRONT:Math.abs(this.long0)<=Xt+Yr?this.face=this.long0>0?Mn.RIGHT:Mn.LEFT:this.face=Mn.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function Nnt(r){var e={x:0,y:0},t,n,i,a,o,s,A={value:0};if(r.x-=this.long0,this.es!==0?t=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):t=r.y,n=r.x,this.face===Mn.TOP)a=Xt-t,n>=Yr&&n<=Xt+Yr?(A.value=Wr.AREA_0,i=n-Xt):n>Xt+Yr||n<=-(Xt+Yr)?(A.value=Wr.AREA_1,i=n>0?n-ri:n+ri):n>-(Xt+Yr)&&n<=-Yr?(A.value=Wr.AREA_2,i=n+Xt):(A.value=Wr.AREA_3,i=n);else if(this.face===Mn.BOTTOM)a=Xt+t,n>=Yr&&n<=Xt+Yr?(A.value=Wr.AREA_0,i=-n+Xt):n<Yr&&n>=-Yr?(A.value=Wr.AREA_1,i=-n):n<-Yr&&n>=-(Xt+Yr)?(A.value=Wr.AREA_2,i=-n-Xt):(A.value=Wr.AREA_3,i=n>0?-n+ri:-n-ri);else{var l,u,c,h,f,p,v;this.face===Mn.RIGHT?n=cp(n,+Xt):this.face===Mn.BACK?n=cp(n,+ri):this.face===Mn.LEFT&&(n=cp(n,-Xt)),h=Math.sin(t),f=Math.cos(t),p=Math.sin(n),v=Math.cos(n),l=f*v,u=f*p,c=h,this.face===Mn.FRONT?(a=Math.acos(l),i=Dm(a,c,u,A)):this.face===Mn.RIGHT?(a=Math.acos(u),i=Dm(a,c,-l,A)):this.face===Mn.BACK?(a=Math.acos(-l),i=Dm(a,c,-u,A)):this.face===Mn.LEFT?(a=Math.acos(-u),i=Dm(a,c,l,A)):(a=i=0,A.value=Wr.AREA_0)}return s=Math.atan(12/ri*(i+Math.acos(Math.sin(i)*Math.cos(Yr))-Xt)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),A.value===Wr.AREA_1?s+=Xt:A.value===Wr.AREA_2?s+=ri:A.value===Wr.AREA_3&&(s+=1.5*ri),e.x=o*Math.cos(s),e.y=o*Math.sin(s),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,r.x=e.x,r.y=e.y,r}function Pnt(r){var e={lam:0,phi:0},t,n,i,a,o,s,A,l,u,c={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),t=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?c.value=Wr.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(c.value=Wr.AREA_1,t-=Xt):r.x<0&&-r.x>=Math.abs(r.y)?(c.value=Wr.AREA_2,t=t<0?t+ri:t-ri):(c.value=Wr.AREA_3,t+=Xt),u=ri/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),s=Math.atan(o),i=Math.cos(t),a=Math.tan(n),A=1-i*i*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),A<-1?A=-1:A>1&&(A=1),this.face===Mn.TOP)l=Math.acos(A),e.phi=Xt-l,c.value===Wr.AREA_0?e.lam=s+Xt:c.value===Wr.AREA_1?e.lam=s<0?s+ri:s-ri:c.value===Wr.AREA_2?e.lam=s-Xt:e.lam=s;else if(this.face===Mn.BOTTOM)l=Math.acos(A),e.phi=l-Xt,c.value===Wr.AREA_0?e.lam=-s+Xt:c.value===Wr.AREA_1?e.lam=-s:c.value===Wr.AREA_2?e.lam=-s-Xt:e.lam=s<0?-s-ri:-s+ri;else{var h,f,p;h=A,u=h*h,u>=1?p=0:p=Math.sqrt(1-u)*Math.sin(s),u+=p*p,u>=1?f=0:f=Math.sqrt(1-u),c.value===Wr.AREA_1?(u=f,f=-p,p=u):c.value===Wr.AREA_2?(f=-f,p=-p):c.value===Wr.AREA_3&&(u=f,f=p,p=-u),this.face===Mn.RIGHT?(u=h,h=-f,f=u):this.face===Mn.BACK?(h=-h,f=-f):this.face===Mn.LEFT&&(u=h,h=f,f=-u),e.phi=Math.acos(-p)-Xt,e.lam=Math.atan2(f,h),this.face===Mn.RIGHT?e.lam=cp(e.lam,-Xt):this.face===Mn.BACK?e.lam=cp(e.lam,-ri):this.face===Mn.LEFT&&(e.lam=cp(e.lam,+Xt))}if(this.es!==0){var v,m,g;v=e.phi<0?1:0,m=Math.tan(e.phi),g=this.b/Math.sqrt(m*m+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),v&&(e.phi=-e.phi)}return e.lam+=this.long0,r.x=e.lam,r.y=e.phi,r}function Dm(r,e,t,n){var i;return r<ie?(n.value=Wr.AREA_0,i=0):(i=Math.atan2(e,t),Math.abs(i)<=Yr?n.value=Wr.AREA_0:i>Yr&&i<=Xt+Yr?(n.value=Wr.AREA_1,i-=Xt):i>Xt+Yr||i<=-(Xt+Yr)?(n.value=Wr.AREA_2,i=i>=0?i-ri:i+ri):(n.value=Wr.AREA_3,i+=Xt)),i}function cp(r,e){var t=r+e;return t<-ri?t+=_g:t>+ri&&(t-=_g),t}var Unt=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Dnt={init:Mnt,forward:Nnt,inverse:Pnt,names:Unt},px=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],_v=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],P4=.8487,U4=1.3523,D4=nA/5,Qnt=1/D4,Zf=18,V_=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},Hnt=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function Gnt(r,e,t,n){for(var i=e;n;--n){var a=r(i);if(i-=a,Math.abs(a)<t)break}return i}function knt(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function $nt(r){var e=pe(r.x-this.long0),t=Math.abs(r.y),n=Math.floor(t*D4);n<0?n=0:n>=Zf&&(n=Zf-1),t=nA*(t-Qnt*n);var i={x:V_(px[n],t)*e,y:V_(_v[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*P4+this.x0,i.y=i.y*this.a*U4+this.y0,i}function jnt(r){var e={x:(r.x-this.x0)/(this.a*P4),y:Math.abs(r.y-this.y0)/(this.a*U4)};if(e.y>=1)e.x/=px[Zf][0],e.y=r.y<0?-Xt:Xt;else{var t=Math.floor(e.y*Zf);for(t<0?t=0:t>=Zf&&(t=Zf-1);;)if(_v[t][0]>e.y)--t;else if(_v[t+1][0]<=e.y)++t;else break;var n=_v[t],i=5*(e.y-n[0])/(_v[t+1][0]-n[0]);i=Gnt(function(a){return(V_(n,a)-e.y)/Hnt(n,a)},i,ie,100),e.x/=V_(px[t],i),e.y=(5*t+i)*ia,r.y<0&&(e.y=-e.y)}return e.x=pe(e.x+this.long0),e}var Vnt=["Robinson","robin"],Knt={init:knt,forward:$nt,inverse:jnt,names:Vnt};function znt(){this.name="geocent"}function Xnt(r){var e=C4(r,this.es,this.a);return e}function Ynt(r){var e=B4(r,this.es,this.a,this.b);return e}var Wnt=["Geocentric","geocentric","geocent","Geocent"],qnt={init:znt,forward:Xnt,inverse:Ynt,names:Wnt},wa={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Xd={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function Znt(){if(Object.keys(Xd).forEach(function(t){if(typeof this[t]>"u")this[t]=Xd[t].def;else{if(Xd[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Xd[t].num&&(this[t]=parseFloat(this[t]))}Xd[t].degrees&&(this[t]=this[t]*ia)}.bind(this)),Math.abs(Math.abs(this.lat0)-Xt)<ie?this.mode=this.lat0<0?wa.S_POLE:wa.N_POLE:Math.abs(this.lat0)<ie?this.mode=wa.EQUIT:(this.mode=wa.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var r=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(r),this.sw=Math.sin(r)}function Jnt(r){r.x-=this.long0;var e=Math.sin(r.y),t=Math.cos(r.y),n=Math.cos(r.x),i,a;switch(this.mode){case wa.OBLIQ:a=this.sinph0*e+this.cosph0*t*n;break;case wa.EQUIT:a=t*n;break;case wa.S_POLE:a=-e;break;case wa.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),i=a*t*Math.sin(r.x),this.mode){case wa.OBLIQ:a*=this.cosph0*e-this.sinph0*t*n;break;case wa.EQUIT:a*=e;break;case wa.N_POLE:a*=-(t*n);break;case wa.S_POLE:a*=t*n;break}var o,s;return o=a*this.cg+i*this.sg,s=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-a*this.sg)*this.cw*s,a=o*s,r.x=i*this.a,r.y=a*this.a,r}function tit(r){r.x/=this.a,r.y/=this.a;var e={x:r.x,y:r.y},t,n,i;i=1/(this.pn1-r.y*this.sw),t=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=t*this.cg+n*this.sg,r.y=n*this.cg-t*this.sg;var a=ww(r.x,r.y);if(Math.abs(a)<ie)e.x=0,e.y=r.y;else{var o,s;switch(s=1-a*a*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/a+a/this.pn1),o=Math.sqrt(1-s*s),this.mode){case wa.OBLIQ:e.y=Math.asin(o*this.sinph0+r.y*s*this.cosph0/a),r.y=(o-this.sinph0*Math.sin(e.y))*a,r.x*=s*this.cosph0;break;case wa.EQUIT:e.y=Math.asin(r.y*s/a),r.y=o*a,r.x*=s;break;case wa.N_POLE:e.y=Math.asin(o),r.y=-r.y;break;case wa.S_POLE:e.y=-Math.asin(o);break}e.x=Math.atan2(r.x,r.y)}return r.x=e.x+this.long0,r.y=e.y,r}var eit=["Tilted_Perspective","tpers"],rit={init:Znt,forward:Jnt,inverse:tit,names:eit};function nit(r){r.Proj.projections.add(j0),r.Proj.projections.add(V0),r.Proj.projections.add(fet),r.Proj.projections.add(Cet),r.Proj.projections.add(Iet),r.Proj.projections.add(Net),r.Proj.projections.add(Get),r.Proj.projections.add(Ket),r.Proj.projections.add(qet),r.Proj.projections.add(rrt),r.Proj.projections.add(mrt),r.Proj.projections.add(Trt),r.Proj.projections.add(Irt),r.Proj.projections.add(Prt),r.Proj.projections.add(Grt),r.Proj.projections.add(Krt),r.Proj.projections.add(qrt),r.Proj.projections.add(rnt),r.Proj.projections.add(Ant),r.Proj.projections.add(fnt),r.Proj.projections.add(ynt),r.Proj.projections.add(Cnt),r.Proj.projections.add(bnt),r.Proj.projections.add(Rnt),r.Proj.projections.add(Dnt),r.Proj.projections.add(Knt),r.Proj.projections.add(qnt),r.Proj.projections.add(rit)}fo.defaultDatum="WGS84";fo.Proj=AA;fo.WGS84=new fo.Proj("WGS84");fo.Point=Lp;fo.toPoint=T4;fo.defs=Ua;fo.nadgrid=ptt;fo.transform=$_;fo.mgrs=Itt;fo.version="__VERSION__";nit(fo);function iit(r){var e=Object.keys(r.defs),t=e.length,n,i;for(n=0;n<t;++n){var a=e[n];if(!Re(a)){var o=r.defs(a),s=o.units;!s&&o.projName==="longlat"&&(s=Ga.DEGREES),C6(new Bl({code:a,axisOrientation:o.axis,metersPerUnit:o.to_meter,units:s}))}}for(n=0;n<t;++n){var A=e[n],l=Re(A);for(i=0;i<t;++i){var u=e[i],c=Re(u);if(!w6(A,u))if(r.defs[A]===r.defs[u])ZT([l,c]);else{var h=r(A,u);UY(l,c,fM(l,c,h.forward),fM(c,l,h.inverse))}}}}const ait={name:"ol-projection-register",setup(r){const{projectionName:e,projectionDef:t,projectionExtent:n}=Nu(r);return fo.defs(e.value,t.value),iit(fo),{projection:new Bl({code:e.value,extent:n.value})}},props:{projectionName:{type:String},projectionDef:{type:String},projectionExtent:{type:Array}}};function oit(r,e,t,n,i,a){return vr("",!0)}var dx=ue(ait,[["render",oit]]);function K_(r){K_.installed||(K_.installed=!0,r.component(ox.name,ox),r.component(sx.name,sx),r.component(Ax.name,Ax),r.component(lx.name,lx),r.component(ux.name,ux),r.component(dx.name,dx))}var sit=Object.freeze(Object.defineProperty({__proto__:null,default:K_,install:K_,Map:ox,View:sx,Feature:Ax,Overlay:lx,GeoLocation:ux,Projection:dx},Symbol.toStringTag,{value:"Module"})),gu={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"},Ait=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),lit=function(r){Ait(e,r);function e(t){var n=this,i=t||{},a=ve({},i);return delete a.preload,delete a.useInterimTilesOnError,n=r.call(this,a)||this,n.on,n.once,n.un,n.setPreload(i.preload!==void 0?i.preload:0),n.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),n}return e.prototype.getPreload=function(){return this.get(gu.PRELOAD)},e.prototype.setPreload=function(t){this.set(gu.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(gu.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(gu.USE_INTERIM_TILES_ON_ERROR,t)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Fh),Q4=lit,uit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),cit=function(r){uit(e,r);function e(t,n,i){var a=r.call(this)||this,o=i||{};return a.tileCoord=t,a.state=n,a.interimTile=null,a.key="",a.transition_=o.transition===void 0?250:o.transition,a.transitionStarts_={},a.interpolate=!!o.interpolate,a}return e.prototype.changed=function(){this.dispatchEvent(me.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==ye.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,n=this;do{if(t.getState()==ye.LOADED){t.interimTile=null;break}else t.getState()==ye.LOADING?n=t:t.getState()==ye.IDLE?n.interimTile=t.interimTile:n=t;t=n.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==ye.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Te()},e.prototype.getAlpha=function(t,n){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(!i)i=n,this.transitionStarts_[t]=i;else if(i===-1)return 1;var a=n-i+1e3/60;return a>=this.transition_?1:rI(a/this.transition_)},e.prototype.inTransition=function(t){return this.transition_?this.transitionStarts_[t]!==-1:!1},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(bh),LI=cit,hit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),fit=function(r){hit(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,s)||this;return A.crossOrigin_=a,A.src_=i,A.key=i,A.image_=new Image,a!==null&&(A.image_.crossOrigin=a),A.unlisten_=null,A.tileLoadFunction_=o,A}return e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=ye.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){this.state=ye.ERROR,this.unlistenImage_(),this.image_=pit(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=ye.LOADED:this.state=ye.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==ye.ERROR&&(this.state=ye.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ye.IDLE&&(this.state=ye.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=CI(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(LI);function pit(){var r=za(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var z_=fit,H4=.5,dit=10,aN=.25,vit=function(){function r(e,t,n,i,a,o){this.sourceProj_=e,this.targetProj_=t;var s={},A=yg(this.targetProj_,this.sourceProj_);this.transformInv_=function(E){var B=E[0]+"/"+E[1];return s[B]||(s[B]=A(E)),s[B]},this.maxSourceExtent_=i,this.errorThresholdSquared_=a*a,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Or(i)==Or(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Or(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Or(this.targetProj_.getExtent()):null;var l=Ns(n),u=Zg(n),c=Vp(n),h=qg(n),f=this.transformInv_(l),p=this.transformInv_(u),v=this.transformInv_(c),m=this.transformInv_(h),g=dit+(o?Math.max(0,Math.ceil(r6(ug(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,c,h,f,p,v,m,g),this.wrapsXInSource_){var _=1/0;this.triangles_.forEach(function(E,B,L){_=Math.min(_,E.source[0][0],E.source[1][0],E.source[2][0])}),this.triangles_.forEach(function(E){if(Math.max(E.source[0][0],E.source[1][0],E.source[2][0])-_>this.sourceWorldWidth_/2){var B=[[E.source[0][0],E.source[0][1]],[E.source[1][0],E.source[1][1]],[E.source[2][0],E.source[2][1]]];B[0][0]-_>this.sourceWorldWidth_/2&&(B[0][0]-=this.sourceWorldWidth_),B[1][0]-_>this.sourceWorldWidth_/2&&(B[1][0]-=this.sourceWorldWidth_),B[2][0]-_>this.sourceWorldWidth_/2&&(B[2][0]-=this.sourceWorldWidth_);var L=Math.min(B[0][0],B[1][0],B[2][0]),O=Math.max(B[0][0],B[1][0],B[2][0]);O-L<this.sourceWorldWidth_/2&&(E.source=B)}}.bind(this))}s={}}return r.prototype.addTriangle_=function(e,t,n,i,a,o){this.triangles_.push({source:[i,a,o],target:[e,t,n]})},r.prototype.addQuad_=function(e,t,n,i,a,o,s,A,l){var u=Wi([a,o,s,A]),c=this.sourceWorldWidth_?Or(u)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&c>.5&&c<1,p=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var v=Wi([e,t,n,i]),m=Or(v)/this.targetWorldWidth_;p=m>aN||p}!f&&this.sourceProj_.isGlobal()&&c&&(p=c>aN||p)}if(!(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Nn(u,this.maxSourceExtent_))){var g=0;if(!p&&(!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(A[0])||!isFinite(A[1]))){if(l>0)p=!0;else if(g=(!isFinite(a[0])||!isFinite(a[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(s[0])||!isFinite(s[1])?2:0)+(!isFinite(A[0])||!isFinite(A[1])?1:0),g!=1&&g!=2&&g!=4&&g!=8)return}if(l>0){if(!p){var _=[(e[0]+n[0])/2,(e[1]+n[1])/2],E=this.transformInv_(_),B=void 0;if(f){var L=(bu(a[0],h)+bu(s[0],h))/2;B=L-bu(E[0],h)}else B=(a[0]+s[0])/2-E[0];var O=(a[1]+s[1])/2-E[1],b=B*B+O*O;p=b>this.errorThresholdSquared_}if(p){if(Math.abs(e[0]-n[0])<=Math.abs(e[1]-n[1])){var T=[(t[0]+n[0])/2,(t[1]+n[1])/2],F=this.transformInv_(T),M=[(i[0]+e[0])/2,(i[1]+e[1])/2],S=this.transformInv_(M);this.addQuad_(e,t,T,M,a,o,F,S,l-1),this.addQuad_(M,T,n,i,S,F,s,A,l-1)}else{var x=[(e[0]+t[0])/2,(e[1]+t[1])/2],N=this.transformInv_(x),P=[(n[0]+i[0])/2,(n[1]+i[1])/2],Y=this.transformInv_(P);this.addQuad_(e,x,P,i,a,N,Y,A,l-1),this.addQuad_(x,t,n,P,N,o,s,Y,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}g&11||this.addTriangle_(e,n,i,a,s,A),g&14||this.addTriangle_(e,n,t,a,s,o),g&&(g&13||this.addTriangle_(t,i,e,o,A,a),g&7||this.addTriangle_(t,i,n,o,A,s))}},r.prototype.calculateSourceExtent=function(){var e=wi();return this.triangles_.forEach(function(t,n,i){var a=t.source;Zc(e,a[0]),Zc(e,a[1]),Zc(e,a[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}(),G4=vit,Rp={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},k4={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},QC;function oN(r,e,t,n,i){r.beginPath(),r.moveTo(0,0),r.lineTo(e,t),r.lineTo(n,i),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(e,n)+1,Math.max(t,i)),r.restore()}function HC(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function git(){if(QC===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",oN(r,4,5,4,0),oN(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;QC=HC(e,0)||HC(e,4)||HC(e,8)}return QC}function Cg(r,e,t,n){var i=ju(t,e,r),a=L_(e,n,t),o=e.getMetersPerUnit();o!==void 0&&(a*=o);var s=r.getMetersPerUnit();s!==void 0&&(a/=s);var A=r.getExtent();if(!A||Fs(A,i)){var l=L_(r,a,i)/a;isFinite(l)&&l>0&&(a/=l)}return a}function yit(r,e,t,n){var i=ba(t),a=Cg(r,e,i,n);return(!isFinite(a)||a<=0)&&aw(t,function(o){return a=Cg(r,e,o,n),isFinite(a)&&a>0}),a}function $4(r,e,t,n,i,a,o,s,A,l,u,c){var h=za(Math.round(t*r),Math.round(t*e));if(c||ve(h,Rp),A.length===0)return h.canvas;h.scale(t,t);function f(B){return Math.round(B*t)/t}h.globalCompositeOperation="lighter";var p=wi();A.forEach(function(B,L,O){ku(p,B.extent)});var v=Or(p),m=li(p),g=za(Math.round(t*v/n),Math.round(t*m/n));c||ve(g,Rp);var _=t/n;A.forEach(function(B,L,O){var b=B.extent[0]-p[0],T=-(B.extent[3]-p[3]),F=Or(B.extent),M=li(B.extent);B.image.width>0&&B.image.height>0&&g.drawImage(B.image,l,l,B.image.width-2*l,B.image.height-2*l,b*_,T*_,F*_,M*_)});var E=Ns(o);return s.getTriangles().forEach(function(B,L,O){var b=B.source,T=B.target,F=b[0][0],M=b[0][1],S=b[1][0],x=b[1][1],N=b[2][0],P=b[2][1],Y=f((T[0][0]-E[0])/a),z=f(-(T[0][1]-E[1])/a),tt=f((T[1][0]-E[0])/a),J=f(-(T[1][1]-E[1])/a),nt=f((T[2][0]-E[0])/a),it=f(-(T[2][1]-E[1])/a),_t=F,R=M;F=0,M=0,S-=_t,x-=R,N-=_t,P-=R;var $=[[S,x,0,0,tt-Y],[N,P,0,0,nt-Y],[0,0,S,x,J-z],[0,0,N,P,it-z]],K=TX($);if(K){if(h.save(),h.beginPath(),git()||!c){h.moveTo(tt,J);for(var q=4,at=Y-tt,vt=z-J,wt=0;wt<q;wt++)h.lineTo(tt+f((wt+1)*at/q),J+f(wt*vt/(q-1))),wt!=q-1&&h.lineTo(tt+f((wt+1)*at/q),J+f((wt+1)*vt/(q-1)));h.lineTo(nt,it)}else h.moveTo(tt,J),h.lineTo(Y,z),h.lineTo(nt,it);h.clip(),h.transform(K[0],K[2],K[1],K[3],Y,z),h.translate(p[0]-_t,p[3]-R),h.scale(n/t,-n/t),h.drawImage(g.canvas,0,0),h.restore()}}),u&&(h.save(),h.globalCompositeOperation="source-over",h.strokeStyle="black",h.lineWidth=1,s.getTriangles().forEach(function(B,L,O){var b=B.target,T=(b[0][0]-E[0])/a,F=-(b[0][1]-E[1])/a,M=(b[1][0]-E[0])/a,S=-(b[1][1]-E[1])/a,x=(b[2][0]-E[0])/a,N=-(b[2][1]-E[1])/a;h.beginPath(),h.moveTo(M,S),h.lineTo(T,F),h.lineTo(x,N),h.closePath(),h.stroke()}),h.restore()),h.canvas}var mit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),_it=function(r){mit(e,r);function e(t,n,i,a,o,s,A,l,u,c,h,f){var p=r.call(this,o,ye.IDLE,{interpolate:!!f})||this;p.renderEdges_=h!==void 0?h:!1,p.pixelRatio_=A,p.gutter_=l,p.canvas_=null,p.sourceTileGrid_=n,p.targetTileGrid_=a,p.wrappedTileCoord_=s||o,p.sourceTiles_=[],p.sourcesListenerKeys_=null,p.sourceZ_=0;var v=a.getTileCoordExtent(p.wrappedTileCoord_),m=p.targetTileGrid_.getExtent(),g=p.sourceTileGrid_.getExtent(),_=m?es(v,m):v;if(ug(_)===0)return p.state=ye.EMPTY,p;var E=t.getExtent();E&&(g?g=es(g,E):g=E);var B=a.getResolution(p.wrappedTileCoord_[0]),L=yit(t,i,_,B);if(!isFinite(L)||L<=0)return p.state=ye.EMPTY,p;var O=c!==void 0?c:H4;if(p.triangulation_=new G4(t,i,_,g,L*O,B),p.triangulation_.getTriangles().length===0)return p.state=ye.EMPTY,p;p.sourceZ_=n.getZForResolution(L);var b=p.triangulation_.calculateSourceExtent();if(g&&(t.canWrapX()?(b[1]=bn(b[1],g[1],g[3]),b[3]=bn(b[3],g[1],g[3])):b=es(b,g)),!ug(b))p.state=ye.EMPTY;else{for(var T=n.getTileRangeForExtentAndZ(b,p.sourceZ_),F=T.minX;F<=T.maxX;F++)for(var M=T.minY;M<=T.maxY;M++){var S=u(p.sourceZ_,F,M,A);S&&p.sourceTiles_.push(S)}p.sourceTiles_.length===0&&(p.state=ye.EMPTY)}return p}return e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(u,c,h){u&&u.getState()==ye.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(u.tileCoord),image:u.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=ye.ERROR;else{var n=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(n),a=typeof i=="number"?i:i[0],o=typeof i=="number"?i:i[1],s=this.targetTileGrid_.getResolution(n),A=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=$4(a,o,this.pixelRatio_,A,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=ye.LOADED}this.changed()},e.prototype.load=function(){if(this.state==ye.IDLE){this.state=ye.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(n,i,a){var o=n.getState();if(o==ye.IDLE||o==ye.LOADING){t++;var s=Ue(n,me.CHANGE,function(A){var l=n.getState();(l==ye.LOADED||l==ye.ERROR||l==ye.EMPTY)&&(Nr(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(n,i,a){var o=n.getState();o==ye.IDLE&&n.load()})}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(Nr),this.sourcesListenerKeys_=null},e}(LI),OI=_it,j4=function(){function r(e,t,n,i){this.minX=e,this.maxX=t,this.minY=n,this.maxY=i}return r.prototype.contains=function(e){return this.containsXY(e[1],e[2])},r.prototype.containsTileRange=function(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY},r.prototype.containsXY=function(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY},r.prototype.equals=function(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY},r.prototype.extend=function(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)},r.prototype.getHeight=function(){return this.maxY-this.minY+1},r.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},r.prototype.getWidth=function(){return this.maxX-this.minX+1},r.prototype.intersects=function(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY},r}();function gf(r,e,t,n,i){return i!==void 0?(i.minX=r,i.maxX=e,i.minY=t,i.maxY=n,i):new j4(r,e,t,n)}var RI=j4,wit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Eit=function(r){wit(e,r);function e(t){var n=r.call(this,t)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=wi(),n.tmpTileRange_=new RI(0,0,0,0),n}return e.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==ye.LOADED||i==ye.EMPTY||i==ye.ERROR&&!a},e.prototype.getTile=function(t,n,i,a){var o=a.pixelRatio,s=a.viewState.projection,A=this.getLayer(),l=A.getSource(),u=l.getTile(t,n,i,o,s);return u.getState()==ye.ERROR&&(A.getUseInterimTilesOnError()?A.getPreload()>0&&(this.newTiles_=!0):u.setState(ye.LOADED)),this.isDrawableTile(u)||(u=u.getInterimTile()),u},e.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),a=hn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!Fs(o,a))return null;for(var s=n.pixelRatio,A=n.viewState.projection,l=n.viewState,u=i.getRenderSource(),c=u.getTileGridForProjection(l.projection),h=u.getTilePixelRatio(n.pixelRatio),f=c.getZForResolution(l.resolution);f>=c.getMinZoom();--f){var p=c.getTileCoordForCoordAndZ(a,f),v=u.getTile(f,p[1],p[2],s,A);if(!(v instanceof z_||v instanceof OI))return null;if(v.getState()===ye.LOADED){var m=c.getOrigin(f),g=Ui(c.getTileSize(f)),_=c.getResolution(f),E=Math.floor(h*((a[0]-m[0])/_-p[1]*g[0])),B=Math.floor(h*((m[1]-a[1])/_-p[2]*g[1]));return this.getImageData(v.getImage(),E,B)}}return null},e.prototype.loadedTileCallback=function(t,n,i){return this.isDrawableTile(i)?r.prototype.loadedTileCallback.call(this,t,n,i):!1},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,n){var i=t.layerStatesArray[t.layerIndex],a=t.viewState,o=a.projection,s=a.resolution,A=a.center,l=a.rotation,u=t.pixelRatio,c=this.getLayer(),h=c.getSource(),f=h.getRevision(),p=h.getTileGridForProjection(o),v=p.getZForResolution(s,h.zDirection),m=p.getResolution(v),g=t.extent,_=i.extent&&Ro(i.extent);_&&(g=es(g,Ro(i.extent)));var E=h.getTilePixelRatio(u),B=Math.round(t.size[0]*E),L=Math.round(t.size[1]*E);if(l){var O=Math.round(Math.sqrt(B*B+L*L));B=O,L=O}var b=m*B/2/E,T=m*L/2/E,F=[A[0]-b,A[1]-T,A[0]+b,A[1]+T],M=p.getTileRangeForExtentAndZ(g,v),S={};S[v]={};var x=this.createLoadedTileFinder(h,o,S),N=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;for(var Y=M.minX;Y<=M.maxX;++Y)for(var z=M.minY;z<=M.maxY;++z){var tt=this.getTile(v,Y,z,t);if(this.isDrawableTile(tt)){var J=de(this);if(tt.getState()==ye.LOADED){S[v][tt.tileCoord.toString()]=tt;var nt=tt.inTransition(J);!this.newTiles_&&(nt||this.renderedTiles.indexOf(tt)===-1)&&(this.newTiles_=!0)}if(tt.getAlpha(J,t.time)===1)continue}var it=p.getTileCoordChildTileRange(tt.tileCoord,P,N),_t=!1;it&&(_t=x(v+1,it)),_t||p.forEachTileCoordParentTileRange(tt.tileCoord,x,P,N)}var R=m/s;Va(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/E,1/E,l,-B/2,-L/2);var $=QF(this.pixelTransform);this.useContainer(n,$,i.opacity,this.getBackground(t));var K=this.context,q=K.canvas;Wg(this.inversePixelTransform,this.pixelTransform),Va(this.tempTransform,B/2,L/2,R,R,0,-B/2,-L/2),q.width!=B||q.height!=L?(q.width=B,q.height=L):this.containerReused||K.clearRect(0,0,B,L),_&&this.clipUnrotated(K,t,_),h.getInterpolate()||ve(K,Rp),this.preRender(K,t),this.renderedTiles.length=0;var at=Object.keys(S).map(Number);at.sort(Hu);var vt,wt,W;i.opacity===1&&(!this.containerReused||h.getOpaque(t.viewState.projection))?at=at.reverse():(vt=[],wt=[]);for(var Ft=at.length-1;Ft>=0;--Ft){var Ot=at[Ft],V=h.getTilePixelSize(Ot,u,o),Z=p.getResolution(Ot),ut=Z/m,rt=V[0]*ut*R,G=V[1]*ut*R,St=p.getTileCoordForCoordAndZ(Ns(F),Ot),bt=p.getTileCoordExtent(St),dt=hn(this.tempTransform,[E*(bt[0]-F[0])/m,E*(F[3]-bt[3])/m]),Et=E*h.getGutterForProjection(o),yt=S[Ot];for(var xt in yt){var tt=yt[xt],It=tt.tileCoord,Mt=St[1]-It[1],Vt=Math.round(dt[0]-(Mt-1)*rt),Yt=St[2]-It[2],ae=Math.round(dt[1]-(Yt-1)*G),Y=Math.round(dt[0]-Mt*rt),z=Math.round(dt[1]-Yt*G),re=Vt-Y,Wt=ae-z,se=v===Ot,nt=se&&tt.getAlpha(de(this),t.time)!==1,zt=!1;if(!nt)if(vt){W=[Y,z,Y+re,z,Y+re,z+Wt,Y,z+Wt];for(var We=0,Me=vt.length;We<Me;++We)if(v!==Ot&&Ot<wt[We]){var dr=vt[We];Nn([Y,z,Y+re,z+Wt],[dr[0],dr[3],dr[4],dr[7]])&&(zt||(K.save(),zt=!0),K.beginPath(),K.moveTo(W[0],W[1]),K.lineTo(W[2],W[3]),K.lineTo(W[4],W[5]),K.lineTo(W[6],W[7]),K.moveTo(dr[6],dr[7]),K.lineTo(dr[4],dr[5]),K.lineTo(dr[2],dr[3]),K.lineTo(dr[0],dr[1]),K.clip())}vt.push(W),wt.push(Ot)}else K.clearRect(Y,z,re,Wt);this.drawTileImage(tt,t,Y,z,re,Wt,Et,se),vt&&!nt?(zt&&K.restore(),this.renderedTiles.unshift(tt)):this.renderedTiles.push(tt),this.updateUsedTiles(t.usedTiles,h,tt)}}this.renderedRevision=f,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!cA(this.renderedExtent_,F),this.renderedExtent_=F,this.renderedPixelRatio=u,this.renderedProjection=o,this.manageTilePyramid(t,h,p,u,o,g,v,c.getPreload()),this.scheduleExpireCache(t,h),this.postRender(K,t),i.extent&&K.restore(),ve(K,k4),$!==q.style.transform&&(q.style.transform=$);var Ie=p6(i.opacity),be=this.container;return Ie!==be.style.opacity&&(be.style.opacity=Ie),this.container},e.prototype.drawTileImage=function(t,n,i,a,o,s,A,l){var u=this.getTileImage(t);if(u){var c=de(this),h=l?t.getAlpha(c,n.time):1,f=h!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(u,A,A,u.width-2*A,u.height-2*A,i,a,o,s),f&&this.context.restore(),h!==1?n.animate=!0:l&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,n){if(n.canExpireCache()){var i=function(a,o,s){var A=de(a);A in s.usedTiles&&a.expireCache(s.viewState.projection,s.usedTiles[A])}.bind(null,n);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,n,i){var a=de(n);a in t||(t[a]={}),t[a][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,n,i,a,o,s,A,l,u){var c=de(n);c in t.wantedTiles||(t.wantedTiles[c]={});var h=t.wantedTiles[c],f=t.tileQueue,p=i.getMinZoom(),v=0,m,g,_,E,B,L;for(L=p;L<=A;++L)for(g=i.getTileRangeForExtentAndZ(s,L,g),_=i.getResolution(L),E=g.minX;E<=g.maxX;++E)for(B=g.minY;B<=g.maxY;++B)A-L<=l?(++v,m=n.getTile(L,E,B,a,o),m.getState()==ye.IDLE&&(h[m.getKey()]=!0,f.isKeyQueued(m.getKey())||f.enqueue([m,c,i.getTileCoordCenter(m.tileCoord),_])),u!==void 0&&u(m)):n.useTile(L,E,B,o);n.updateCacheSize(v,o)},e}(wI),V4=Eit,Cit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Bit=function(r){Cit(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new V4(this)},e}(Q4),MI=Bit;const Tit={props:{className:{type:String,default:"ol-layer"},opacity:{type:Number,default:1},visible:{type:Boolean,default:!0},extent:{type:Array},zIndex:{type:Number},minResolution:{type:Number},maxResolution:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},title:{type:String},name:{type:String},preview:{type:String},baseLayer:{type:Boolean},properties:{type:Object,default:()=>{}}}};function xit(r,e,t,n,i,a){return fn(),Vn("div")}var Oh=ue(Tit,[["render",xit]]);const Sit={extends:Oh,name:"ol-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=gr(r),i=fr(()=>new MI(n)),a=()=>{t!=null?(t.value.getOverviewMap().addLayer(i.value),t.value.changed()):e.addLayer(i.value)},o=()=>{t!=null?(t.value.getOverviewMap().removeLayer(i.value),t.value.changed()):e.removeLayer(i.value)};return t!=null&&fe(t,()=>{o(),a()}),Je(()=>{a()}),ar(()=>{o()}),Pr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function bit(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var vx=ue(Sit,[["render",bit]]),Fit=function(){function r(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return r.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},r.prototype.expireCache=function(e){for(;this.canExpireCache();)this.pop()},r.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},r.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},r.prototype.forEach=function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer},r.prototype.get=function(e,t){var n=this.entries_[e];return we(n!==void 0,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},r.prototype.remove=function(e){var t=this.entries_[e];return we(t!==void 0,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},r.prototype.getCount=function(){return this.count_},r.prototype.getKeys=function(){var e=new Array(this.count_),t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.key_;return e},r.prototype.getValues=function(){var e=new Array(this.count_),t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.value_;return e},r.prototype.peekLast=function(){return this.oldest_.value_},r.prototype.peekLastKey=function(){return this.oldest_.key_},r.prototype.peekFirstKey=function(){return this.newest_.key_},r.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},r.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},r.prototype.set=function(e,t){we(!(e in this.entries_),16);var n={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[e]=n,++this.count_},r.prototype.setSize=function(e){this.highWaterMark=e},r}(),K4=Fit,Iit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Lit=function(r){Iit(e,r);function e(t){var n=this,i=ye.IDLE;return n=r.call(this,t.tileCoord,i,{transition:t.transition,interpolate:t.interpolate})||this,n.loader_=t.loader,n.data_=null,n.error_=null,n}return e.prototype.getData=function(){return this.data_},e.prototype.getError=function(){return this.error_},e.prototype.load=function(){this.state=ye.LOADING,this.changed();var t=this;this.loader_().then(function(n){t.data_=n,t.state=ye.LOADED,t.changed()}).catch(function(n){t.error_=n,t.state=ye.ERROR,t.changed()})},e}(LI),Oit=Lit,Bg=34962,Ew=34963,Rit=35040,NI=35044,K0=35048,Mit=5121,Nit=5123,Pit=5125,z4=5126,sN=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function X4(r,e){for(var t=ve({preserveDrawingBuffer:!0,antialias:!iX},e),n=sN.length,i=0;i<n;++i)try{var a=r.getContext(sN[i],t);if(a)return a}catch{}return null}var Uit={STATIC_DRAW:NI,STREAM_DRAW:Rit,DYNAMIC_DRAW:K0},Dit=function(){function r(e,t){this.array=null,this.type=e,we(e===Bg||e===Ew,62),this.usage=t!==void 0?t:Uit.STATIC_DRAW}return r.prototype.ofSize=function(e){this.array=new(GC(this.type))(e)},r.prototype.fromArray=function(e){var t=GC(this.type);this.array=t.from?t.from(e):new t(e)},r.prototype.fromArrayBuffer=function(e){this.array=new(GC(this.type))(e)},r.prototype.getType=function(){return this.type},r.prototype.getArray=function(){return this.array},r.prototype.getUsage=function(){return this.usage},r.prototype.getSize=function(){return this.array?this.array.length:0},r}();function GC(r){switch(r){case Bg:return Float32Array;case Ew:return Uint32Array;default:return Float32Array}}var $v=Dit,Qit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function Y4(r,e,t){var n=t?r.LINEAR:r.NEAREST;r.bindTexture(r.TEXTURE_2D,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,n),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,n)}function Hit(r,e,t,n){Y4(r,e,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t)}function AN(r,e,t,n,i,a){var o=r.getGL(),s,A;if(t instanceof Float32Array){s=o.FLOAT,r.getExtension("OES_texture_float");var l=r.getExtension("OES_texture_float_linear");A=l!==null}else s=o.UNSIGNED_BYTE,A=!0;Y4(o,e,a&&A);var u=t.byteLength/n[1],c=1;u%8===0?c=8:u%4===0?c=4:u%2===0&&(c=2);var h;switch(i){case 1:{h=o.LUMINANCE;break}case 2:{h=o.LUMINANCE_ALPHA;break}case 3:{h=o.RGB;break}case 4:{h=o.RGBA;break}default:throw new Error("Unsupported number of bands: ".concat(i))}var f=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,c),o.texImage2D(o.TEXTURE_2D,0,h,n[0],n[1],0,h,s,t),o.pixelStorei(o.UNPACK_ALIGNMENT,f)}var wv=null;function Git(){var r=document.createElement("canvas");r.width=1,r.height=1,wv=r.getContext("2d")}var kit=function(r){Qit(e,r);function e(t){var n=r.call(this)||this;n.tile,n.textures=[],n.handleTileChange_=n.handleTileChange_.bind(n),n.size=Ui(t.grid.getTileSize(t.tile.tileCoord[0])),n.tilePixelRatio_=t.tilePixelRatio||1,n.gutter_=t.gutter||0,n.bandCount=NaN,n.helper_=t.helper;var i=new $v(Bg,NI);return i.fromArray([0,1,1,1,1,0,0,0]),n.helper_.flushBufferData(i),n.coords=i,n.setTile(t.tile),n}return e.prototype.setTile=function(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(me.CHANGE,this.handleTileChange_),this.tile=t,this.textures.length=0,this.loaded=t.getState()===ye.LOADED,this.loaded)this.uploadTile_();else{if(t instanceof z_){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(me.CHANGE,this.handleTileChange_)}},e.prototype.uploadTile_=function(){var t=this.helper_,n=t.getGL(),i=this.tile;if(i instanceof z_||i instanceof OI){var a=i.getImage();if(this.gutter_!==0){var o=this.tilePixelRatio_*this.gutter_,s=Math.round(a.width-2*o),A=Math.round(a.height-2*o),l=za(s,A);i.interpolate||ve(l,Rp),l.drawImage(a,o,o,s,A,0,0,s,A),a=l.canvas}var u=n.createTexture();this.textures.push(u),this.bandCount=4,Hit(n,u,a,i.interpolate);return}var c=[this.size[0]*this.tilePixelRatio_,this.size[1]*this.tilePixelRatio_],h=i.getData(),f=h instanceof Float32Array,p=c[0]*c[1],v=f?Float32Array:Uint8Array,m=v.BYTES_PER_ELEMENT,g=h.byteLength/c[1];this.bandCount=Math.floor(g/m/c[0]);var _=Math.ceil(this.bandCount/4);if(_===1){var u=n.createTexture();this.textures.push(u),AN(t,u,h,c,this.bandCount,i.interpolate);return}for(var E=new Array(_),B=0;B<_;++B){var u=n.createTexture();this.textures.push(u);var L=B<_-1?4:this.bandCount%4;E[B]=new v(p*L)}for(var O=0,b=0,T=c[0]*this.bandCount,F=0;F<c[1];++F){for(var M=0;M<T;++M){var S=h[b+M],x=Math.floor(O/this.bandCount),N=M%this.bandCount,B=Math.floor(N/4),P=E[B],L=P.length/p,Y=N%4;P[x*L+Y]=S,++O}b+=g/m}for(var B=0;B<_;++B){var u=this.textures[B],P=E[B],L=P.length/p;AN(t,u,P,c,L,i.interpolate)}},e.prototype.handleTileChange_=function(){this.tile.getState()===ye.LOADED&&(this.loaded=!0,this.uploadTile_(),this.dispatchEvent(me.CHANGE))},e.prototype.disposeInternal=function(){var t=this.helper_.getGL();this.helper_.deleteBuffer(this.coords);for(var n=0;n<this.textures.length;++n)t.deleteTexture(this.textures[n]);this.tile.removeEventListener(me.CHANGE,this.handleTileChange_)},e.prototype.getPixelData=function(t,n){if(!this.loaded)return null;if(t=Math.floor(this.tilePixelRatio_*t),n=Math.floor(this.tilePixelRatio_*n),this.tile instanceof Oit){var i=this.tile.getData(),a=Math.floor(this.tilePixelRatio_*this.size[0]);if(i instanceof DataView){var o=i.byteLength/(this.size[0]*this.size[1]),s=n*a*o+t*o,A=i.buffer.slice(s,s+o);return new DataView(A)}var l=n*a*this.bandCount+t*this.bandCount;return i.slice(l,l+this.bandCount)}wv||Git(),wv.clearRect(0,0,1,1);var u,c=this.tile.getImage();try{wv.drawImage(c,t,n,1,1,0,0,1,1),u=wv.getImageData(0,0,1,1).data}catch{return null}return u},e}(bh),$it=kit,Qm={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},jit=`
precision mediump float;
attribute vec2 a_position;
varying vec2 v_texCoord;
varying vec2 v_screenCoord;
uniform vec2 u_screenSize;
void main() {
v_texCoord = a_position * 0.5 + 0.5;
v_screenCoord = v_texCoord * u_screenSize;
gl_Position = vec4(a_position, 0.0, 1.0);
}
`,Vit=`
precision mediump float;
uniform sampler2D u_image;
uniform float u_opacity;
varying vec2 v_texCoord;
void main() {
gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
}
`,Kit=function(){function r(e){this.gl_=e.webGlContext;var t=this.gl_;this.scaleRatio_=e.scaleRatio||1,this.renderTargetTexture_=t.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=t.createFramebuffer();var n=t.createShader(t.VERTEX_SHADER);t.shaderSource(n,e.vertexShader||jit),t.compileShader(n);var i=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,e.fragmentShader||Vit),t.compileShader(i),this.renderTargetProgram_=t.createProgram(),t.attachShader(this.renderTargetProgram_,n),t.attachShader(this.renderTargetProgram_,i),t.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=t.createBuffer();var a=[-1,-1,1,-1,-1,1,1,-1,1,1,-1,1];t.bindBuffer(t.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),t.bufferData(t.ARRAY_BUFFER,new Float32Array(a),t.STATIC_DRAW),this.renderTargetAttribLocation_=t.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],e.uniforms&&Object.keys(e.uniforms).forEach(function(o){this.uniforms_.push({value:e.uniforms[o],location:t.getUniformLocation(this.renderTargetProgram_,o)})}.bind(this))}return r.prototype.getGL=function(){return this.gl_},r.prototype.init=function(e){var t=this.getGL(),n=[t.drawingBufferWidth*this.scaleRatio_,t.drawingBufferHeight*this.scaleRatio_];if(t.bindFramebuffer(t.FRAMEBUFFER,this.getFrameBuffer()),t.viewport(0,0,n[0],n[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==n[0]||this.renderTargetTextureSize_[1]!==n[1]){this.renderTargetTextureSize_=n;var i=0,a=t.RGBA,o=0,s=t.RGBA,A=t.UNSIGNED_BYTE,l=null;t.bindTexture(t.TEXTURE_2D,this.renderTargetTexture_),t.texImage2D(t.TEXTURE_2D,i,a,n[0],n[1],o,s,A,l),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.renderTargetTexture_,0)}},r.prototype.apply=function(e,t,n,i){var a=this.getGL(),o=e.size;if(a.bindFramebuffer(a.FRAMEBUFFER,t?t.getFrameBuffer():null),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.renderTargetTexture_),!t){var s=de(a.canvas);if(!e.renderTargets[s]){var A=a.getContextAttributes();A&&A.preserveDrawingBuffer&&(a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT)),e.renderTargets[s]=!0}}a.enable(a.BLEND),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight),a.bindBuffer(a.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),a.useProgram(this.renderTargetProgram_),a.enableVertexAttribArray(this.renderTargetAttribLocation_),a.vertexAttribPointer(this.renderTargetAttribLocation_,2,a.FLOAT,!1,0,0),a.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),a.uniform1i(this.renderTargetTextureLocation_,0);var l=e.layerStatesArray[e.layerIndex].opacity;a.uniform1f(this.renderTargetOpacityLocation_,l),this.applyUniforms(e),n&&n(a,e),a.drawArrays(a.TRIANGLES,0,6),i&&i(a,e)},r.prototype.getFrameBuffer=function(){return this.frameBuffer_},r.prototype.applyUniforms=function(e){var t=this.getGL(),n,i=1;this.uniforms_.forEach(function(a){if(n=typeof a.value=="function"?a.value(e):a.value,n instanceof HTMLCanvasElement||n instanceof ImageData)a.texture||(a.texture=t.createTexture()),t.activeTexture(t["TEXTURE".concat(i)]),t.bindTexture(t.TEXTURE_2D,a.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),n instanceof ImageData?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,n.width,n.height,0,t.UNSIGNED_BYTE,new Uint8Array(n.data)):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.uniform1i(a.location,i++);else if(Array.isArray(n))switch(n.length){case 2:t.uniform2f(a.location,n[0],n[1]);return;case 3:t.uniform3f(a.location,n[0],n[1],n[2]);return;case 4:t.uniform4f(a.location,n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&t.uniform1f(a.location,n)})},r}(),lN=Kit;function W4(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function z0(r,e){return r[0]=e[0],r[1]=e[1],r[4]=e[2],r[5]=e[3],r[12]=e[4],r[13]=e[5],r}var zit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Qf={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"},Wo={UNSIGNED_BYTE:Mit,UNSIGNED_SHORT:Nit,UNSIGNED_INT:Pit,FLOAT:z4},X_={};function uN(r){return"shared/"+r}var cN=0;function Xit(){var r="unique/"+cN;return cN+=1,r}function Yit(r){var e=X_[r];if(!e){var t=document.createElement("canvas");t.style.position="absolute",t.style.left="0",e={users:0,canvas:t},X_[r]=e}return e.users+=1,e.canvas}function Wit(r){var e=X_[r];if(e&&(e.users-=1,!(e.users>0))){var t=e.canvas,n=X4(t),i=n.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete X_[r]}}var qit=function(r){zit(e,r);function e(t){var n=r.call(this)||this,i=t||{};n.boundHandleWebGLContextLost_=n.handleWebGLContextLost.bind(n),n.boundHandleWebGLContextRestored_=n.handleWebGLContextRestored.bind(n),n.canvasCacheKey_=i.canvasCacheKey?uN(i.canvasCacheKey):Xit(),n.canvas_=Yit(n.canvasCacheKey_),n.gl_=X4(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(Qm.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(Qm.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=si(),n.offsetScaleMatrix_=si(),n.tmpMat4_=W4(),n.uniformLocations_={},n.attribLocations_={},n.uniforms_=[],i.uniforms&&n.setUniforms(i.uniforms);var a=n.getGL();return n.postProcessPasses_=i.postProcesses?i.postProcesses.map(function(o){return new lN({webGlContext:a,scaleRatio:o.scaleRatio,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,uniforms:o.uniforms})}):[new lN({webGlContext:a})],n.shaderCompileErrors_=null,n.startTime_=Date.now(),n}return e.prototype.setUniforms=function(t){this.uniforms_=[];for(var n in t)this.uniforms_.push({name:n,value:t[n]});this.uniformLocations_={}},e.prototype.canvasCacheKeyMatches=function(t){return this.canvasCacheKey_===uN(t)},e.prototype.getExtension=function(t){if(t in this.extensionCache_)return this.extensionCache_[t];var n=this.gl_.getExtension(t);return this.extensionCache_[t]=n,n},e.prototype.bindBuffer=function(t){var n=this.getGL(),i=de(t),a=this.bufferCache_[i];if(!a){var o=n.createBuffer();a={buffer:t,webGlBuffer:o},this.bufferCache_[i]=a}n.bindBuffer(t.getType(),a.webGlBuffer)},e.prototype.flushBufferData=function(t){var n=this.getGL();this.bindBuffer(t),n.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var n=this.getGL(),i=de(t),a=this.bufferCache_[i];a&&!n.isContextLost()&&n.deleteBuffer(a.webGlBuffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(Qm.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(Qm.RESTORED,this.boundHandleWebGLContextRestored_),Wit(this.canvasCacheKey_),delete this.gl_,delete this.canvas_},e.prototype.prepareDraw=function(t,n){var i=this.getGL(),a=this.getCanvas(),o=t.size,s=t.pixelRatio;a.width=o[0]*s,a.height=o[1]*s,a.style.width=o[0]+"px",a.style.height=o[1]+"px",i.useProgram(this.currentProgram_);for(var A=this.postProcessPasses_.length-1;A>=0;A--)this.postProcessPasses_[A].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,n?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,n,i){var a=this.getGL(),o=n.getSize();a.bindFramebuffer(a.FRAMEBUFFER,n.getFramebuffer()),a.viewport(0,0,o[0],o[1]),a.bindTexture(a.TEXTURE_2D,n.getTexture()),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.enable(a.BLEND),a.blendFunc(a.ONE,i?a.ZERO:a.ONE_MINUS_SRC_ALPHA),a.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,n){var i=this.getGL();this.getExtension("OES_element_index_uint");var a=i.UNSIGNED_INT,o=4,s=n-t,A=t*o;i.drawElements(i.TRIANGLES,s,a,A)},e.prototype.finalizeDraw=function(t,n,i){for(var a=0,o=this.postProcessPasses_.length;a<o;a++)a===o-1?this.postProcessPasses_[a].apply(t,null,n,i):this.postProcessPasses_[a].apply(t,this.postProcessPasses_[a+1])},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var n=t.size,i=t.viewState.rotation,a=Dv(this.offsetScaleMatrix_);Qv(a,2/n[0],2/n[1]);var o=Dv(this.offsetRotateMatrix_);i!==0&&uX(o,-i),this.setUniformMatrixValue(Qf.OFFSET_SCALE_MATRIX,z0(this.tmpMat4_,a)),this.setUniformMatrixValue(Qf.OFFSET_ROTATION_MATRIX,z0(this.tmpMat4_,o)),this.setUniformFloatValue(Qf.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(Qf.ZOOM,t.viewState.zoom),this.setUniformFloatValue(Qf.RESOLUTION,t.viewState.resolution)},e.prototype.applyUniforms=function(t){var n=this.getGL(),i,a=0;this.uniforms_.forEach(function(o){if(i=typeof o.value=="function"?o.value(t):o.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData){o.texture||(o.prevValue=void 0,o.texture=n.createTexture()),n.activeTexture(n["TEXTURE".concat(a)]),n.bindTexture(n.TEXTURE_2D,o.texture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);var s=!(i instanceof HTMLImageElement)||i.complete;s&&o.prevValue!==i&&(o.prevValue=i,n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,i)),n.uniform1i(this.getUniformLocation(o.name),a++)}else if(Array.isArray(i)&&i.length===6)this.setUniformMatrixValue(o.name,z0(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:n.uniform2f(this.getUniformLocation(o.name),i[0],i[1]);return;case 3:n.uniform3f(this.getUniformLocation(o.name),i[0],i[1],i[2]);return;case 4:n.uniform4f(this.getUniformLocation(o.name),i[0],i[1],i[2],i[3]);return;default:return}else typeof i=="number"&&n.uniform1f(this.getUniformLocation(o.name),i)}.bind(this))},e.prototype.useProgram=function(t){if(t==this.currentProgram_)return!1;var n=this.getGL();return n.useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0},e.prototype.compileShader=function(t,n){var i=this.getGL(),a=i.createShader(n);return i.shaderSource(a,t),i.compileShader(a),a},e.prototype.getProgram=function(t,n){var i=this.getGL(),a=this.compileShader(t,i.FRAGMENT_SHADER),o=this.compileShader(n,i.VERTEX_SHADER),s=i.createProgram();if(i.attachShader(s,a),i.attachShader(s,o),i.linkProgram(s),!i.getShaderParameter(a,i.COMPILE_STATUS)){var A="Fragment shader compliation failed: ".concat(i.getShaderInfoLog(a));throw new Error(A)}if(i.deleteShader(a),!i.getShaderParameter(o,i.COMPILE_STATUS)){var A="Vertex shader compilation failed: ".concat(i.getShaderInfoLog(o));throw new Error(A)}if(i.deleteShader(o),!i.getProgramParameter(s,i.LINK_STATUS)){var A="GL program linking failed: ".concat(i.getShaderInfoLog(o));throw new Error(A)}return s},e.prototype.getUniformLocation=function(t){return this.uniformLocations_[t]===void 0&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return this.attribLocations_[t]===void 0&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,n){var i=t.size,a=t.viewState.rotation,o=t.viewState.resolution,s=t.viewState.center;return Dv(n),Va(n,0,0,2/(o*i[0]),2/(o*i[1]),-a,-s[0],-s[1]),n},e.prototype.setUniformFloatValue=function(t,n){this.getGL().uniform1f(this.getUniformLocation(t),n)},e.prototype.setUniformFloatVec4=function(t,n){this.getGL().uniform4fv(this.getUniformLocation(t),n)},e.prototype.setUniformMatrixValue=function(t,n){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,n)},e.prototype.enableAttributeArray_=function(t,n,i,a,o){var s=this.getAttributeLocation(t);s<0||(this.getGL().enableVertexAttribArray(s),this.getGL().vertexAttribPointer(s,n,i,!1,a,o))},e.prototype.enableAttributes=function(t){for(var n=Zit(t),i=0,a=0;a<t.length;a++){var o=t[a];this.enableAttributeArray_(o.name,o.size,o.type||z4,n,i),i+=o.size*q4(o.type)}},e.prototype.handleWebGLContextLost=function(){Sh(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,n,i){var a=this.getGL(),o=i||a.createTexture(),s=0,A=a.RGBA,l=0,u=a.RGBA,c=a.UNSIGNED_BYTE;return a.bindTexture(a.TEXTURE_2D,o),n?a.texImage2D(a.TEXTURE_2D,s,A,u,c,n):a.texImage2D(a.TEXTURE_2D,s,A,t[0],t[1],l,u,c,null),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),o},e}(tw);function Zit(r){for(var e=0,t=0;t<r.length;t++){var n=r[t];e+=n.size*q4(n.type)}return e}function q4(r){switch(r){case Wo.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Wo.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Wo.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Wo.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var Jit=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),kC={GENERATE_BUFFERS:"GENERATE_BUFFERS"},tat=function(r){Jit(e,r);function e(t,n){var i=r.call(this,t)||this,a=n||{};return i.inversePixelTransform_=si(),i.pixelContext_=null,i.postProcesses_=a.postProcesses,i.uniforms_=a.uniforms,i.helper,t.addChangeListener(Hr.MAP,i.removeHelper.bind(i)),i.dispatchPreComposeEvent=i.dispatchPreComposeEvent.bind(i),i.dispatchPostComposeEvent=i.dispatchPostComposeEvent.bind(i),i}return e.prototype.dispatchPreComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(so.PRECOMPOSE)){var a=new Hv(so.PRECOMPOSE,void 0,n,t);i.dispatchEvent(a)}},e.prototype.dispatchPostComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(so.POSTCOMPOSE)){var a=new Hv(so.POSTCOMPOSE,void 0,n,t);i.dispatchEvent(a)}},e.prototype.reset=function(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)},e.prototype.removeHelper=function(){this.helper&&(this.helper.dispose(),delete this.helper)},e.prototype.prepareFrame=function(t){if(this.getLayer().getRenderSource()){for(var n=!0,i=-1,a=void 0,o=0,s=t.layerStatesArray.length;o<s;o++){var A=t.layerStatesArray[o].layer,l=A.getRenderer();if(!(l instanceof e)){n=!0;continue}var u=A.getClassName();if((n||u!==a)&&(i+=1,n=!1),a=u,l===this)break}var c="map/"+t.mapId+"/group/"+i;(!this.helper||!this.helper.canvasCacheKeyMatches(c))&&(this.removeHelper(),this.helper=new qit({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:c}),a&&(this.helper.getCanvas().className=a),this.afterHelperCreated())}return this.prepareFrameInternal(t)},e.prototype.afterHelperCreated=function(){},e.prototype.prepareFrameInternal=function(t){return!0},e.prototype.disposeInternal=function(){this.removeHelper(),r.prototype.disposeInternal.call(this)},e.prototype.dispatchRenderEvent_=function(t,n,i){var a=this.getLayer();if(a.hasListener(t)){Va(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var o=new Hv(t,this.inversePixelTransform_,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.dispatchRenderEvent_(so.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(so.POSTRENDER,t,n)},e.prototype.getDataAtPixel=function(t,n,i){var a=hn([n.pixelRatio,0,0,n.pixelRatio,0,0],t.slice()),o=this.helper.getGL();if(!o)return null;var s=this.getLayer(),A=s.getExtent();if(A){var l=hn(n.pixelToCoordinateTransform,t.slice());if(!Fs(A,l))return null}var u=o.getContextAttributes();if(!u||!u.preserveDrawingBuffer)return new Uint8Array;var c=Math.round(a[0]),h=Math.round(a[1]),f=this.pixelContext_;if(!f){var p=document.createElement("canvas");p.width=1,p.height=1,f=p.getContext("2d"),this.pixelContext_=f}f.clearRect(0,0,1,1);var v;try{f.drawImage(o.canvas,c,h,1,1,0,0,1,1),v=f.getImageData(0,0,1,1).data}catch{return v}return v[3]===0?null:v},e}(r4);function eat(r,e){var t=e||[],n=256,i=n-1;return t[0]=Math.floor(r/n/n/n)/i,t[1]=Math.floor(r/n/n)%n/i,t[2]=Math.floor(r/n)%n/i,t[3]=r%n/i,t}function rat(r){var e=0,t=256,n=t-1;return e+=Math.round(r[0]*t*t*t*n),e+=Math.round(r[1]*t*t*n),e+=Math.round(r[2]*t*n),e+=Math.round(r[3]*n),e}var Z4=tat;function Tg(r,e,t,n){return n!==void 0?(n[0]=r,n[1]=e,n[2]=t,n):[r,e,t]}function Cw(r,e,t){return r+"/"+e+"/"+t}function xg(r){return Cw(r[0],r[1],r[2])}function nat(r){return r.split("/").map(Number)}function J4(r){return(r[1]<<r[0])+r[2]}function iat(r,e){var t=r[0],n=r[1],i=r[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;var a=e.getFullTileRange(t);return a?a.containsXY(n,i):!0}var aat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ze={TILE_TEXTURE_ARRAY:"u_tileTextures",TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY",RENDER_EXTENT:"u_renderExtent",RESOLUTION:"u_resolution",ZOOM:"u_zoom"},X0={TEXTURE_COORD:"a_textureCoord"},oat=[{name:X0.TEXTURE_COORD,size:2,type:Wo.FLOAT}],sat={};function Aat(r){return 2*(1-1/(r+1))-1}function hN(r,e,t){t in r||(r[t]=[]),r[t].push(e)}function $C(r,e){var t=r.layerStatesArray[r.layerIndex];t.extent&&(e=es(e,Ro(t.extent,r.viewState.projection)));var n=t.layer.getRenderSource();if(!n.getWrapX()){var i=n.getTileGridForProjection(r.viewState.projection).getExtent();i&&(e=es(e,i))}return e}function jC(r,e){return"".concat(r.getKey(),",").concat(xg(e))}var lat=function(r){aat(e,r);function e(t,n){var i=r.call(this,t,{uniforms:n.uniforms})||this;i.renderComplete=!1,i.tileTransform_=si(),i.tempMat4_=W4(),i.tempTileRange_=new RI(0,0,0,0),i.tempTileCoord_=Tg(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.indices_=new $v(Ew,NI),i.indices_.fromArray([0,1,3,1,2,3]);var a=n.cacheSize!==void 0?n.cacheSize:512;return i.tileTextureCache_=new K4(a),i.paletteTextures_=n.paletteTextures||[],i.frameState_=null,i}return e.prototype.reset=function(t){r.prototype.reset.call(this,{uniforms:t.uniforms}),this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))},e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)},e.prototype.isDrawableTile_=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==ye.LOADED||i==ye.EMPTY||i==ye.ERROR&&!a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getRenderSource();return!i||Kp($C(t,t.extent))?!1:i.getState()===Ha.READY},e.prototype.enqueueTiles=function(t,n,i,a){var o=t.viewState,s=this.getLayer(),A=s.getRenderSource(),l=A.getTileGridForProjection(o.projection),u=A.getTilePixelRatio(t.pixelRatio),c=A.getGutterForProjection(o.projection),h=de(A);h in t.wantedTiles||(t.wantedTiles[h]={});for(var f=t.wantedTiles[h],p=this.tileTextureCache_,v=Math.max(i-s.getPreload(),l.getMinZoom(),s.getMinZoom()),m=i;m>=v;--m)for(var g=l.getTileRangeForExtentAndZ(n,m,this.tempTileRange_),_=l.getResolution(m),E=g.minX;E<=g.maxX;++E)for(var B=g.minY;B<=g.maxY;++B){var L=Tg(m,E,B,this.tempTileCoord_),O=jC(A,L),b=void 0,T=void 0;if(p.containsKey(O)&&(b=p.get(O),T=b.tile),!b||b.tile.key!==A.getKey())if(T=A.getTile(m,E,B,t.pixelRatio,o.projection),!b)b=new $it({tile:T,grid:l,helper:this.helper,tilePixelRatio:u,gutter:c}),p.set(O,b);else if(this.isDrawableTile_(T))b.setTile(T);else{var F=T.getInterimTile();b.setTile(F)}hN(a,b,m);var M=T.getKey();f[M]=!0,T.getState()===ye.IDLE&&(t.tileQueue.isKeyQueued(M)||t.tileQueue.enqueue([T,h,l.getTileCoordCenter(L),_]))}},e.prototype.renderFrame=function(t){this.frameState_=t,this.renderComplete=!0;var n=this.helper.getGL();this.preRender(n,t);var i=t.viewState,a=this.getLayer(),o=a.getRenderSource(),s=o.getTileGridForProjection(i.projection),A=$C(t,t.extent),l=s.getZForResolution(i.resolution,o.zDirection),u={};if(t.nextExtent){var c=s.getZForResolution(i.nextResolution,o.zDirection),h=$C(t,t.nextExtent);this.enqueueTiles(t,h,c,u)}this.enqueueTiles(t,A,l,u);for(var f={},p=de(this),v=t.time,m=!1,g=u[l],_=0,E=g.length;_<E;++_){var B=g[_],L=B.tile,O=L.tileCoord;if(B.loaded){var b=L.getAlpha(p,v);if(b===1){L.endTransition(p);continue}m=!0;var T=xg(O);f[T]=b}this.renderComplete=!1;var F=this.findAltTiles_(s,O,l+1,u);if(!F)for(var M=s.getMinZoom(),S=l-1;S>=M;--S){var x=this.findAltTiles_(s,O,S,u);if(x)break}}this.helper.useProgram(this.program_),this.helper.prepareDraw(t,!m);for(var N=Object.keys(u).map(Number).sort(Hu),P=i.center[0],Y=i.center[1],z=0,tt=N.length;z<tt;++z)for(var J=N[z],nt=s.getResolution(J),it=Ui(s.getTileSize(J),this.tempSize_),_t=s.getOrigin(J),R=(P-_t[0])/(it[0]*nt),$=(_t[1]-Y)/(it[1]*nt),K=i.resolution/nt,q=Aat(J),at=u[J],_=0,E=at.length;_<E;++_){var B=at[_];if(B.loaded){var L=B.tile,O=L.tileCoord,T=xg(O),vt=O[1],wt=O[2];Va(this.tileTransform_,0,0,2/(t.size[0]*K/it[0]),-2/(t.size[1]*K/it[1]),i.rotation,-(R-vt),-($-wt)),this.helper.setUniformMatrixValue(Ze.TILE_TRANSFORM,z0(this.tempMat4_,this.tileTransform_)),this.helper.bindBuffer(B.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(oat);for(var W=0;W<B.textures.length;){var Ft="TEXTURE"+W,Ot="".concat(Ze.TILE_TEXTURE_ARRAY,"[").concat(W,"]");n.activeTexture(n[Ft]),n.bindTexture(n.TEXTURE_2D,B.textures[W]),n.uniform1i(this.helper.getUniformLocation(Ot),W),++W}for(var V=0;V<this.paletteTextures_.length;++V){var Z=this.paletteTextures_[V];n.activeTexture(n["TEXTURE"+W]);var ut=Z.getTexture(n);n.bindTexture(n.TEXTURE_2D,ut),n.uniform1i(this.helper.getUniformLocation(Z.name),W),++W}var b=T in f?f[T]:1;b<1&&(t.animate=!0),this.helper.setUniformFloatValue(Ze.TRANSITION_ALPHA,b),this.helper.setUniformFloatValue(Ze.DEPTH,q),this.helper.setUniformFloatValue(Ze.TEXTURE_PIXEL_WIDTH,it[0]),this.helper.setUniformFloatValue(Ze.TEXTURE_PIXEL_HEIGHT,it[1]),this.helper.setUniformFloatValue(Ze.TEXTURE_RESOLUTION,nt),this.helper.setUniformFloatValue(Ze.TEXTURE_ORIGIN_X,_t[0]+vt*it[0]*nt),this.helper.setUniformFloatValue(Ze.TEXTURE_ORIGIN_Y,_t[1]-wt*it[1]*nt),this.helper.setUniformFloatVec4(Ze.RENDER_EXTENT,A),this.helper.setUniformFloatValue(Ze.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(Ze.ZOOM,i.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var rt=this.helper.getCanvas(),G=this.tileTextureCache_;G.canExpireCache();){var B=G.pop();B.dispose()}var St=function(bt,dt){o.expireCache(dt.viewState.projection,sat)};return t.postRenderFunctions.push(St),this.postRender(n,t),rt},e.prototype.getData=function(t){var n=this.helper.getGL();if(!n)return null;var i=this.frameState_;if(!i)return null;var a=this.getLayer(),o=hn(i.pixelToCoordinateTransform,t.slice()),s=i.viewState,A=a.getExtent();if(A&&!Fs(Ro(A,s.projection),o))return null;var l=a.getRenderSource(),u=l.getTileGridForProjection(s.projection);if(!l.getWrapX()){var c=u.getExtent();if(c&&!Fs(c,o))return null}for(var h=this.tileTextureCache_,f=u.getZForResolution(s.resolution);f>=u.getMinZoom();--f){var p=u.getTileCoordForCoordAndZ(o,f),v=jC(l,p);if(h.containsKey(v)){var m=h.get(v);if(m.loaded){var g=u.getOrigin(f),_=Ui(u.getTileSize(f)),E=u.getResolution(f),B=(o[0]-g[0])/E-p[1]*_[0],L=(g[1]-o[1])/E-p[2]*_[1];return m.getPixelData(B,L)}}}return null},e.prototype.findAltTiles_=function(t,n,i,a){var o=t.getTileRangeForTileCoordAndZ(n,i,this.tempTileRange_);if(!o)return!1;for(var s=!0,A=this.tileTextureCache_,l=this.getLayer().getRenderSource(),u=o.minX;u<=o.maxX;++u)for(var c=o.minY;c<=o.maxY;++c){var h=jC(l,[i,u,c]),f=!1;if(A.containsKey(h)){var p=A.get(h);p.loaded&&(hN(a,p,i),f=!0)}f||(s=!1)}return s},e.prototype.removeHelper=function(){if(this.helper){var t=this.tileTextureCache_;t.forEach(function(n){return n.dispose()}),t.clear()}r.prototype.removeHelper.call(this)},e.prototype.disposeInternal=function(){var t=this.helper;if(t){var n=t.getGL();n.deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}r.prototype.disposeInternal.call(this),delete this.indices_,delete this.tileTextureCache_,delete this.frameState_},e}(Z4),uat=lat,cat=function(){function r(e,t){this.name=e,this.data=t,this.texture_=null}return r.prototype.getTexture=function(e){if(!this.texture_){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.data.length/4,1,0,e.RGBA,e.UNSIGNED_BYTE,this.data),this.texture_=t}return this.texture_},r}(),hat=cat,te={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},ir={};function pA(r){if(typeof r=="number")return te.NUMBER;if(typeof r=="boolean")return te.BOOLEAN;if(typeof r=="string")return SX(r)?te.COLOR|te.STRING:te.STRING;if(!Array.isArray(r))throw new Error("Unhandled value type: ".concat(JSON.stringify(r)));var e=r,t=e.every(function(i){return typeof i=="number"});if(t)return e.length===3||e.length===4?te.COLOR|te.NUMBER_ARRAY:te.NUMBER_ARRAY;if(typeof e[0]!="string")throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(e)));var n=ir[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.getReturnType(e.slice(1))}function fat(r){return r6(r)%1===0}function Bw(r){var e=r.toString();return e.indexOf(".")===-1?e+".0":e}function t8(r){if(r.length<2||r.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(r.length,"(").concat(r.map(Bw).join(", "),")")}function pat(r){var e=$u(r).slice();return e.length<4&&e.push(1),t8(e.map(function(t,n){return n<3?t/255:t}))}function Y_(r,e){return r.stringLiteralsMap[e]===void 0&&(r.stringLiteralsMap[e]=Object.keys(r.stringLiteralsMap).length),r.stringLiteralsMap[e]}function dat(r,e){return Bw(Y_(r,e))}function le(r,e,t){if(Array.isArray(e)&&typeof e[0]=="string"){var n=ir[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.toGlsl(r,e.slice(1),t)}var i=pA(e);if((i&te.NUMBER)>0)return Bw(e);if((i&te.BOOLEAN)>0)return e.toString();if((i&te.STRING)>0&&(t===void 0||t==te.STRING))return dat(r,e.toString());if((i&te.COLOR)>0&&(t===void 0||t==te.COLOR))return pat(e);if((i&te.NUMBER_ARRAY)>0)return t8(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(t,")"))}function e8(r){if(!(pA(r)&te.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(r)," instead"))}function ci(r){for(var e=0;e<r.length;e++)e8(r[e])}function r8(r){if(!(pA(r)&te.STRING))throw new Error("A string value was expected, got ".concat(JSON.stringify(r)," instead"))}function PI(r){if(!(pA(r)&te.BOOLEAN))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(r)," instead"))}function En(r,e){if(r.length!==e)throw new Error("Exactly ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function rc(r,e){if(r.length<e)throw new Error("At least ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function Tw(r,e){if(r.length>e)throw new Error("At most ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function n8(r){if(r.length%2!==0)throw new Error("An even amount of arguments was expected, got ".concat(r," instead"))}function vat(r){if(r.length%2===0)throw new Error("An odd amount of arguments was expected, got ".concat(r," instead"))}function UI(r,e){if(!fat(e))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(r)))}ir.get={getReturnType:function(r){return te.ANY},toGlsl:function(r,e){En(e,1),r8(e[0]);var t=e[0].toString();r.attributes.indexOf(t)===-1&&r.attributes.push(t);var n=r.inFragmentShader?"v_":"a_";return n+t}};function DI(r){return"u_var_"+r}ir.var={getReturnType:function(r){return te.ANY},toGlsl:function(r,e){En(e,1),r8(e[0]);var t=e[0].toString();return r.variables.indexOf(t)===-1&&r.variables.push(t),DI(t)}};var i8="u_paletteTextures";ir.palette={getReturnType:function(r){return te.COLOR},toGlsl:function(r,e){En(e,2),e8(e[0]);var t=le(r,e[0]),n=e[1];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");for(var i=n.length,a=new Uint8Array(i*4),o=0;o<i;o++){var s=n[o],A=void 0;if(typeof s=="string")A=o6(s);else{if(!Array.isArray(s))throw new Error("The second argument of palette must be an array of strings or colors");var l=s.length;if(l===4)A=s;else{if(l!==3)throw new Error("Expected palette color to have 3 or 4 values, got ".concat(l));A=[s[0],s[1],s[2],1]}}var u=o*4;a[u]=A[0],a[u+1]=A[1],a[u+2]=A[2],a[u+3]=A[3]*255}r.paletteTextures||(r.paletteTextures=[]);var c="".concat(i8,"[").concat(r.paletteTextures.length,"]"),h=new hat(c,a);return r.paletteTextures.push(h),"texture2D(".concat(c,", vec2((").concat(t," + 0.5) / ").concat(i,".0, 0.5))")}};var VC="getBandValue";ir.band={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){rc(e,1),Tw(e,3);var t=e[0];if(!(VC in r.functions)){for(var n="",i=r.bandCount||1,a=0;a<i;a++){var o=Math.floor(a/4),s=a%4;s===i-1&&s===1&&(s=3);var A="".concat(Ze.TILE_TEXTURE_ARRAY,"[").concat(o,"]");n+=`
if (band == `.concat(a+1,`.0) {
return texture2D(`).concat(A,", v_textureCoord + vec2(dx, dy))[").concat(s,`];
}
`)}r.functions[VC]=`
float getBandValue(float band, float xOffset, float yOffset) {
float dx = xOffset / `.concat(Ze.TEXTURE_PIXEL_WIDTH,`;
float dy = yOffset / `).concat(Ze.TEXTURE_PIXEL_HEIGHT,`;
`).concat(n,`
}
`)}var l=le(r,t),u=le(r,e[1]||0),c=le(r,e[2]||0);return"".concat(VC,"(").concat(l,", ").concat(u,", ").concat(c,")")}};ir.time={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,0),"u_time"}};ir.zoom={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,0),"u_zoom"}};ir.resolution={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,0),"u_resolution"}};ir["*"]={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," * ").concat(le(r,e[1]),")")}};ir["/"]={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," / ").concat(le(r,e[1]),")")}};ir["+"]={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," + ").concat(le(r,e[1]),")")}};ir["-"]={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," - ").concat(le(r,e[1]),")")}};ir.clamp={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){En(e,3),ci(e);var t=le(r,e[1]),n=le(r,e[2]);return"clamp(".concat(le(r,e[0]),", ").concat(t,", ").concat(n,")")}};ir["%"]={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,2),ci(e),"mod(".concat(le(r,e[0]),", ").concat(le(r,e[1]),")")}};ir["^"]={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,2),ci(e),"pow(".concat(le(r,e[0]),", ").concat(le(r,e[1]),")")}};ir.abs={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,1),ci(e),"abs(".concat(le(r,e[0]),")")}};ir.floor={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,1),ci(e),"floor(".concat(le(r,e[0]),")")}};ir.round={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,1),ci(e),"floor(".concat(le(r,e[0])," + 0.5)")}};ir.ceil={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,1),ci(e),"ceil(".concat(le(r,e[0]),")")}};ir.sin={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,1),ci(e),"sin(".concat(le(r,e[0]),")")}};ir.cos={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return En(e,1),ci(e),"cos(".concat(le(r,e[0]),")")}};ir.atan={getReturnType:function(r){return te.NUMBER},toGlsl:function(r,e){return rc(e,1),Tw(e,2),ci(e),e.length===2?"atan(".concat(le(r,e[0]),", ").concat(le(r,e[1]),")"):"atan(".concat(le(r,e[0]),")")}};ir[">"]={getReturnType:function(r){return te.BOOLEAN},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," > ").concat(le(r,e[1]),")")}};ir[">="]={getReturnType:function(r){return te.BOOLEAN},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," >= ").concat(le(r,e[1]),")")}};ir["<"]={getReturnType:function(r){return te.BOOLEAN},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," < ").concat(le(r,e[1]),")")}};ir["<="]={getReturnType:function(r){return te.BOOLEAN},toGlsl:function(r,e){return En(e,2),ci(e),"(".concat(le(r,e[0])," <= ").concat(le(r,e[1]),")")}};function a8(r){return{getReturnType:function(e){return te.BOOLEAN},toGlsl:function(e,t){En(t,2);for(var n=te.ANY,i=0;i<t.length;i++)n&=pA(t[i]);if(n===te.NONE)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(t)," instead"));return n&=~te.COLOR,"(".concat(le(e,t[0],n)," ").concat(r," ").concat(le(e,t[1],n),")")}}}ir["=="]=a8("==");ir["!="]=a8("!=");ir["!"]={getReturnType:function(r){return te.BOOLEAN},toGlsl:function(r,e){return En(e,1),PI(e[0]),"(!".concat(le(r,e[0]),")")}};function o8(r){return{getReturnType:function(e){return te.BOOLEAN},toGlsl:function(e,t){rc(t,2);for(var n=0;n<t.length;n++)PI(t[n]);var i="";return i=t.map(function(a){return le(e,a)}).join(" ".concat(r," ")),i="(".concat(i,")"),i}}}ir.all=o8("&&");ir.any=o8("||");ir.between={getReturnType:function(r){return te.BOOLEAN},toGlsl:function(r,e){En(e,3),ci(e);var t=le(r,e[1]),n=le(r,e[2]),i=le(r,e[0]);return"(".concat(i," >= ").concat(t," && ").concat(i," <= ").concat(n,")")}};ir.array={getReturnType:function(r){return te.NUMBER_ARRAY},toGlsl:function(r,e){rc(e,2),Tw(e,4),ci(e);var t=e.map(function(n){return le(r,n,te.NUMBER)});return"vec".concat(e.length,"(").concat(t.join(", "),")")}};ir.color={getReturnType:function(r){return te.COLOR},toGlsl:function(r,e){rc(e,3),Tw(e,4),ci(e);var t=e;e.length===3&&t.push(1);var n=e.map(function(i,a){return le(r,i,te.NUMBER)+(a<3?" / 255.0":"")});return"vec".concat(e.length,"(").concat(n.join(", "),")")}};ir.interpolate={getReturnType:function(r){for(var e=te.COLOR|te.NUMBER,t=3;t<r.length;t+=2)e=e&pA(r[t]);return e},toGlsl:function(r,e,t){n8(e),rc(e,6);var n=e[0],i;switch(n[0]){case"linear":i=1;break;case"exponential":i=n[1];break;default:i=null}if(!i)throw new Error('Invalid interpolation type for "interpolate" operator, received: '.concat(JSON.stringify(n)));var a=t!==void 0?t:te.ANY,o=ir.interpolate.getReturnType(e)&a;UI(e,o);for(var s=le(r,e[1]),A=Bw(i),l="",u=2;u<e.length-2;u+=2){var c=le(r,e[u]),h=l||le(r,e[u+1],o),f=le(r,e[u+2]),p=le(r,e[u+3],o);l="mix(".concat(h,", ").concat(p,", pow(clamp((").concat(s," - ").concat(c,") / (").concat(f," - ").concat(c,"), 0.0, 1.0), ").concat(A,"))")}return l}};ir.match={getReturnType:function(r){for(var e=te.ANY,t=2;t<r.length;t+=2)e=e&pA(r[t]);return e=e&pA(r[r.length-1]),e},toGlsl:function(r,e,t){n8(e),rc(e,4);var n=t!==void 0?t:te.ANY,i=ir.match.getReturnType(e)&n;UI(e,i);for(var a=le(r,e[0]),o=le(r,e[e.length-1],i),s=null,A=e.length-3;A>=1;A-=2){var l=le(r,e[A]),u=le(r,e[A+1],i);s="(".concat(a," == ").concat(l," ? ").concat(u," : ").concat(s||o,")")}return s}};ir.case={getReturnType:function(r){for(var e=te.ANY,t=1;t<r.length;t+=2)e=e&pA(r[t]);return e=e&pA(r[r.length-1]),e},toGlsl:function(r,e,t){vat(e),rc(e,3);var n=t!==void 0?t:te.ANY,i=ir.case.getReturnType(e)&n;UI(e,i);for(var a=0;a<e.length-1;a+=2)PI(e[a]);for(var o=le(r,e[e.length-1],i),s=null,a=e.length-3;a>=0;a-=2){var A=le(r,e[a]),l=le(r,e[a+1],i);s="(".concat(A," ? ").concat(l," : ").concat(s||o,")")}return s}};var gat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function fN(r,e){var t=`
attribute vec2 `.concat(X0.TEXTURE_COORD,`;
uniform mat4 `).concat(Ze.TILE_TRANSFORM,`;
uniform float `).concat(Ze.TEXTURE_PIXEL_WIDTH,`;
uniform float `).concat(Ze.TEXTURE_PIXEL_HEIGHT,`;
uniform float `).concat(Ze.TEXTURE_RESOLUTION,`;
uniform float `).concat(Ze.TEXTURE_ORIGIN_X,`;
uniform float `).concat(Ze.TEXTURE_ORIGIN_Y,`;
uniform float `).concat(Ze.DEPTH,`;
varying vec2 v_textureCoord;
varying vec2 v_mapCoord;
void main() {
v_textureCoord = `).concat(X0.TEXTURE_COORD,`;
v_mapCoord = vec2(
`).concat(Ze.TEXTURE_ORIGIN_X," + ").concat(Ze.TEXTURE_RESOLUTION," * ").concat(Ze.TEXTURE_PIXEL_WIDTH,` * v_textureCoord[0],
`).concat(Ze.TEXTURE_ORIGIN_Y," - ").concat(Ze.TEXTURE_RESOLUTION," * ").concat(Ze.TEXTURE_PIXEL_HEIGHT,` * v_textureCoord[1]
);
gl_Position = `).concat(Ze.TILE_TRANSFORM," * vec4(").concat(X0.TEXTURE_COORD,", ").concat(Ze.DEPTH,`, 1.0);
}
`),n={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e},i=[];if(r.color!==void 0){var a=le(n,r.color,te.COLOR);i.push("color = ".concat(a,";"))}if(r.contrast!==void 0){var o=le(n,r.contrast,te.NUMBER);i.push("color.rgb = clamp((".concat(o," + 1.0) * color.rgb - (").concat(o," / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(r.exposure!==void 0){var s=le(n,r.exposure,te.NUMBER);i.push("color.rgb = clamp((".concat(s," + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(r.saturation!==void 0){var A=le(n,r.saturation,te.NUMBER);i.push(`
float saturation = `.concat(A,` + 1.0;
float sr = (1.0 - saturation) * 0.2126;
float sg = (1.0 - saturation) * 0.7152;
float sb = (1.0 - saturation) * 0.0722;
mat3 saturationMatrix = mat3(
sr + saturation, sr, sr,
sg, sg + saturation, sg,
sb, sb, sb + saturation
);
color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));
`))}if(r.gamma!==void 0){var l=le(n,r.gamma,te.NUMBER);i.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(l,"));"))}if(r.brightness!==void 0){var u=le(n,r.brightness,te.NUMBER);i.push("color.rgb = clamp(color.rgb + ".concat(u,", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}var c={},h=n.variables.length;if(h>1&&!r.variables)throw new Error("Missing variables in style (expected ".concat(n.variables,")"));for(var f=function(E){var B=n.variables[E];if(!(B in r.variables))throw new Error("Missing '".concat(B,"' in style variables"));var L=DI(B);c[L]=function(){var O=r.variables[B];return typeof O=="string"&&(O=Y_(n,O)),O!==void 0?O:-9999999}},p=0;p<h;++p)f(p);var v=Object.keys(c).map(function(E){return"uniform float ".concat(E,";")}),m=Math.ceil(e/4);v.push("uniform sampler2D ".concat(Ze.TILE_TEXTURE_ARRAY,"[").concat(m,"];")),n.paletteTextures&&v.push("uniform sampler2D ".concat(i8,"[").concat(n.paletteTextures.length,"];"));var g=Object.keys(n.functions).map(function(E){return n.functions[E]}),_=`
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
varying vec2 v_textureCoord;
varying vec2 v_mapCoord;
uniform vec4 `.concat(Ze.RENDER_EXTENT,`;
uniform float `).concat(Ze.TRANSITION_ALPHA,`;
uniform float `).concat(Ze.TEXTURE_PIXEL_WIDTH,`;
uniform float `).concat(Ze.TEXTURE_PIXEL_HEIGHT,`;
uniform float `).concat(Ze.RESOLUTION,`;
uniform float `).concat(Ze.ZOOM,`;
`).concat(v.join(`
`),`
`).concat(g.join(`
`),`
void main() {
if (
v_mapCoord[0] < `).concat(Ze.RENDER_EXTENT,`[0] ||
v_mapCoord[1] < `).concat(Ze.RENDER_EXTENT,`[1] ||
v_mapCoord[0] > `).concat(Ze.RENDER_EXTENT,`[2] ||
v_mapCoord[1] > `).concat(Ze.RENDER_EXTENT,`[3]
) {
discard;
}
vec4 color = texture2D(`).concat(Ze.TILE_TEXTURE_ARRAY,`[0], v_textureCoord);
`).concat(i.join(`
`),`
if (color.a == 0.0) {
discard;
}
gl_FragColor = color;
gl_FragColor.rgb *= gl_FragColor.a;
gl_FragColor *= `).concat(Ze.TRANSITION_ALPHA,`;
}`);return{vertexShader:t,fragmentShader:_,uniforms:c,paletteTextures:n.paletteTextures}}var s8=function(r){gat(e,r);function e(t){var n=this,i=t?ve({},t):{},a=i.style||{};delete i.style;var o=i.cacheSize;return delete i.cacheSize,n=r.call(this,i)||this,n.sources_=i.sources,n.renderedSource_=null,n.renderedResolution_=NaN,n.style_=a,n.cacheSize_=o,n.styleVariables_=n.style_.variables||{},n.addChangeListener(Hr.SOURCE,n.handleSourceUpdate_),n}return e.prototype.getSources=function(t,n){var i=this.getSource();return this.sources_?typeof this.sources_=="function"?this.sources_(t,n):this.sources_:i?[i]:[]},e.prototype.getRenderSource=function(){return this.renderedSource_||this.getSource()},e.prototype.getSourceState=function(){var t=this.getRenderSource();return t?t.getState():Ha.UNDEFINED},e.prototype.handleSourceUpdate_=function(){this.getSource()&&this.setStyle(this.style_)},e.prototype.getSourceBandCount_=function(){var t=this.getSource();return t&&"bandCount"in t?t.bandCount:4},e.prototype.createRenderer=function(){var t=fN(this.style_,this.getSourceBandCount_());return new uat(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})},e.prototype.renderSources=function(t,n){for(var i=this.getRenderer(),a,o=0,s=n.length;o<s;++o)this.renderedSource_=n[o],i.prepareFrame(t)&&(a=i.renderFrame(t));return a},e.prototype.render=function(t,n){var i=this;this.rendered=!0;for(var a=t.viewState,o=this.getSources(t.extent,a.resolution),s=!0,A=function(f,p){var v=o[f],m=v.getState();if(m==Ha.LOADING){var g=function(){v.getState()==Ha.READY&&(v.removeEventListener("change",g),i.changed())};v.addEventListener("change",g)}s=s&&m==Ha.READY},l=0,u=o.length;l<u;++l)A(l);var c=this.renderSources(t,o);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=a.resolution,c;if(this.renderedResolution_>.5*a.resolution){var h=this.getSources(t.extent,this.renderedResolution_).filter(function(f){return!o.includes(f)});if(h.length>0)return this.renderSources(t,h)}return c},e.prototype.setStyle=function(t){this.styleVariables_=t.variables||{},this.style_=t;var n=fN(this.style_,this.getSourceBandCount_()),i=this.getRenderer();i.reset({vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms,paletteTextures:n.paletteTextures}),this.changed()},e.prototype.updateStyleVariables=function(t){ve(this.styleVariables_,t),this.changed()},e}(Q4);s8.prototype.dispose;var yat=s8;const mat={extends:Oh,name:"ol-webgl-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=gr(r),i=fr(()=>new yat(n)),a=()=>{t!=null?(t.value.getOverviewMap().addLayer(i.value),t.value.changed()):e.addLayer(i.value)},o=()=>{t!=null?(t.value.getOverviewMap().removeLayer(i.value),t.value.changed()):e.removeLayer(i.value)};return t!=null&&fe(t,()=>{o(),a()}),Je(()=>{a()}),ar(()=>{o()}),Pr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function _at(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var gx=ue(mat,[["render",_at]]),wat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Eat=function(r){wat(e,r);function e(t){var n=t||{};return r.call(this,n)||this}return e}(Fh),Cat=Eat,Bat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Tat=function(r){Bat(e,r);function e(t){var n=r.call(this,t)||this;return n.image_=null,n}return e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var n=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,a=t.viewState,o=a.resolution,s=this.getLayer().getSource(),A=t.viewHints,l=t.extent;if(n.extent!==void 0&&(l=es(l,Ro(n.extent,a.projection))),!A[mn.ANIMATING]&&!A[mn.INTERACTING]&&!Kp(l))if(s){var u=a.projection,c=s.getImage(l,o,i,u);c&&(this.loadImage(c)?this.image_=c:c.getState()===je.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),a=hn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!Fs(o,a))return null;var s=this.image_.getExtent(),A=this.image_.getImage(),l=Or(s),u=Math.floor(A.width*((a[0]-s[0])/l));if(u<0||u>=A.width)return null;var c=li(s),h=Math.floor(A.height*((s[3]-a[1])/c));return h<0||h>=A.height?null:this.getImageData(A,u,h)},e.prototype.renderFrame=function(t,n){var i=this.image_,a=i.getExtent(),o=i.getResolution(),s=i.getPixelRatio(),A=t.layerStatesArray[t.layerIndex],l=t.pixelRatio,u=t.viewState,c=u.center,h=u.resolution,f=t.size,p=l*o/(h*s),v=Math.round(f[0]*l),m=Math.round(f[1]*l),g=u.rotation;if(g){var _=Math.round(Math.sqrt(v*v+m*m));v=_,m=_}Va(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,g,-v/2,-m/2),Wg(this.inversePixelTransform,this.pixelTransform);var E=QF(this.pixelTransform);this.useContainer(n,E,A.opacity,this.getBackground(t));var B=this.context,L=B.canvas;L.width!=v||L.height!=m?(L.width=v,L.height=m):this.containerReused||B.clearRect(0,0,v,m);var O=!1,b=!0;if(A.extent){var T=Ro(A.extent,u.projection);b=Nn(T,t.extent),O=b&&!Oo(T,t.extent),O&&this.clipUnrotated(B,t,T)}var F=i.getImage(),M=Va(this.tempTransform,v/2,m/2,p,p,0,s*(a[0]-c[0])/o,s*(c[1]-a[3])/o);this.renderedResolution=o*l/s;var S=F.width*M[0],x=F.height*M[3];if(this.getLayer().getSource().getInterpolate()||ve(B,Rp),this.preRender(B,t),b&&S>=.5&&x>=.5){var N=M[4],P=M[5],Y=A.opacity,z=void 0;Y!==1&&(z=B.globalAlpha,B.globalAlpha=Y),B.drawImage(F,0,0,+F.width,+F.height,Math.round(N),Math.round(P),Math.round(S),Math.round(x)),Y!==1&&(B.globalAlpha=z)}return this.postRender(B,t),O&&B.restore(),ve(B,k4),E!==L.style.transform&&(L.style.transform=E),this.container},e}(wI),xat=Tat,Sat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),bat=function(r){Sat(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new xat(this)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Cat),A8=bat;const Fat={extends:Oh,name:"ol-image-layer",setup(r){const e=Be("map"),{properties:t}=gr(r),n=new A8(t);return fe(t,()=>{n.setProperties(t)}),Je(()=>{e.addLayer(n)}),ar(()=>{e.removeLayer(n)}),Pr("imageLayer",n),{imageLayer:n}}};function Iat(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var yx=ue(Fat,[["render",Iat]]);const Lat={extends:Oh,name:"ol-vector-layer",setup(r){const e=Be("map"),{properties:t}=gr(r),n=fr(()=>new dA(t));return fe(t,()=>{n.value.setProperties(t)}),Je(()=>{e.addLayer(n.value)}),ar(()=>{e.removeLayer(n.value)}),Pr("vectorLayer",n),Pr("stylable",n),{vectorLayer:n}},props:{renderBuffer:{type:Number,default:100},updateWhileAnimating:{type:Boolean,default:!1},style:{type:Function},updateWhileInteracting:{type:Boolean,default:!1}}};function Oat(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var mx=ue(Lat,[["render",Oat]]),Rat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Mat=function(r){Rat(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.expireCache=function(t){for(;this.canExpireCache();){var n=this.peekLast();if(n.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(this.getCount()!==0){var t=this.peekFirstKey(),n=nat(t),i=n[0];this.forEach(function(a){a.tileCoord[0]!==i&&(this.remove(xg(a.tileCoord)),a.release())}.bind(this))}},e}(K4),l8=Mat,KC={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Nat=[0,0,0],eu=5,Pat=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,we(Jz(this.resolutions_,function(o,s){return s-o},!0),17);var t;if(!e.origins){for(var n=0,i=this.resolutions_.length-1;n<i;++n)if(!t)t=this.resolutions_[n]/this.resolutions_[n+1];else if(this.resolutions_[n]/this.resolutions_[n+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,we(this.origins_.length==this.resolutions_.length,20));var a=e.extent;a!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ns(a)),we(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,we(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:WF,we(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=a!==void 0?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map(function(o,s){var A=new RI(Math.min(0,o[0]),Math.max(o[0]-1,-1),Math.min(0,o[1]),Math.max(o[1]-1,-1));if(a){var l=this.getTileRangeForExtentAndZ(a,s);A.minX=Math.max(l.minX,A.minX),A.maxX=Math.min(l.maxX,A.maxX),A.minY=Math.max(l.minY,A.minY),A.maxY=Math.min(l.maxY,A.maxY)}return A},this):a&&this.calculateTileRanges_(a)}return r.prototype.forEachTileCoord=function(e,t,n){for(var i=this.getTileRangeForExtentAndZ(e,t),a=i.minX,o=i.maxX;a<=o;++a)for(var s=i.minY,A=i.maxY;s<=A;++s)n([t,a,s])},r.prototype.forEachTileCoordParentTileRange=function(e,t,n,i){var a,o,s,A=null,l=e[0]-1;for(this.zoomFactor_===2?(o=e[1],s=e[2]):A=this.getTileCoordExtent(e,i);l>=this.minZoom;){if(this.zoomFactor_===2?(o=Math.floor(o/2),s=Math.floor(s/2),a=gf(o,o,s,s,n)):a=this.getTileRangeForExtentAndZ(A,l,n),t(l,a))return!0;--l}return!1},r.prototype.getExtent=function(){return this.extent_},r.prototype.getMaxZoom=function(){return this.maxZoom},r.prototype.getMinZoom=function(){return this.minZoom},r.prototype.getOrigin=function(e){return this.origin_?this.origin_:this.origins_[e]},r.prototype.getResolution=function(e){return this.resolutions_[e]},r.prototype.getResolutions=function(){return this.resolutions_},r.prototype.getTileCoordChildTileRange=function(e,t,n){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){var i=e[1]*2,a=e[2]*2;return gf(i,i+1,a,a+1,t)}var o=this.getTileCoordExtent(e,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,e[0]+1,t)}return null},r.prototype.getTileRangeForTileCoordAndZ=function(e,t,n){if(t>this.maxZoom||t<this.minZoom)return null;var i=e[0],a=e[1],o=e[2];if(t===i)return gf(a,o,a,o,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,t-i),A=Math.floor(a*s),l=Math.floor(o*s);if(t<i)return gf(A,A,l,l,n);var u=Math.floor(s*(a+1))-1,c=Math.floor(s*(o+1))-1;return gf(A,u,l,c,n)}var h=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(h,t,n)},r.prototype.getTileRangeExtent=function(e,t,n){var i=this.getOrigin(e),a=this.getResolution(e),o=Ui(this.getTileSize(e),this.tmpSize_),s=i[0]+t.minX*o[0]*a,A=i[0]+(t.maxX+1)*o[0]*a,l=i[1]+t.minY*o[1]*a,u=i[1]+(t.maxY+1)*o[1]*a;return ho(s,l,A,u,n)},r.prototype.getTileRangeForExtentAndZ=function(e,t,n){var i=Nat;this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,i);var a=i[1],o=i[2];return this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,i),gf(a,i[1],o,i[2],n)},r.prototype.getTileCoordCenter=function(e){var t=this.getOrigin(e[0]),n=this.getResolution(e[0]),i=Ui(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*i[0]*n,t[1]-(e[2]+.5)*i[1]*n]},r.prototype.getTileCoordExtent=function(e,t){var n=this.getOrigin(e[0]),i=this.getResolution(e[0]),a=Ui(this.getTileSize(e[0]),this.tmpSize_),o=n[0]+e[1]*a[0]*i,s=n[1]-(e[2]+1)*a[1]*i,A=o+a[0]*i,l=s+a[1]*i;return ho(o,s,A,l,t)},r.prototype.getTileCoordForCoordAndResolution=function(e,t,n){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,n)},r.prototype.getTileCoordForXYAndResolution_=function(e,t,n,i,a){var o=this.getZForResolution(n),s=n/this.getResolution(o),A=this.getOrigin(o),l=Ui(this.getTileSize(o),this.tmpSize_),u=s*(e-A[0])/n/l[0],c=s*(A[1]-t)/n/l[1];return i?(u=du(u,eu)-1,c=du(c,eu)-1):(u=Kf(u,eu),c=Kf(c,eu)),Tg(o,u,c,a)},r.prototype.getTileCoordForXYAndZ_=function(e,t,n,i,a){var o=this.getOrigin(n),s=this.getResolution(n),A=Ui(this.getTileSize(n),this.tmpSize_),l=(e-o[0])/s/A[0],u=(o[1]-t)/s/A[1];return i?(l=du(l,eu)-1,u=du(u,eu)-1):(l=Kf(l,eu),u=Kf(u,eu)),Tg(n,l,u,a)},r.prototype.getTileCoordForCoordAndZ=function(e,t,n){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,n)},r.prototype.getTileCoordResolution=function(e){return this.resolutions_[e[0]]},r.prototype.getTileSize=function(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]},r.prototype.getFullTileRange=function(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null},r.prototype.getZForResolution=function(e,t){var n=ew(this.resolutions_,e,t||0);return bn(n,this.minZoom,this.maxZoom)},r.prototype.calculateTileRanges_=function(e){for(var t=this.resolutions_.length,n=new Array(t),i=this.minZoom;i<t;++i)n[i]=this.getTileRangeForExtentAndZ(e,i);this.fullTileRanges_=n},r}(),QI=Pat;function u8(r){var e=r.getDefaultTileGrid();return e||(e=Qat(r),r.setDefaultTileGrid(e)),e}function Uat(r,e,t){var n=e[0],i=r.getTileCoordCenter(e),a=xw(t);if(Fs(a,i))return e;var o=Or(a),s=Math.ceil((a[0]-i[0])/o);return i[0]+=o*s,r.getTileCoordForCoordAndZ(i,n)}function Dat(r,e,t,n){var i=n!==void 0?n:pv.TOP_LEFT,a=h8(r,e,t);return new QI({extent:r,origin:qQ(r,i),resolutions:a,tileSize:t})}function c8(r){var e=r||{},t=e.extent||Re("EPSG:3857").getExtent(),n={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:h8(t,e.maxZoom,e.tileSize,e.maxResolution)};return new QI(n)}function h8(r,e,t,n){for(var i=e!==void 0?e:wY,a=li(r),o=Or(r),s=Ui(t!==void 0?t:WF),A=n>0?n:Math.max(o/s[0],a/s[1]),l=i+1,u=new Array(l),c=0;c<l;++c)u[c]=A/Math.pow(2,c);return u}function Qat(r,e,t,n){var i=xw(r);return Dat(i,e,t,n)}function xw(r){r=Re(r);var e=r.getExtent();if(!e){var t=180*Is[Ga.DEGREES]/r.getMetersPerUnit();e=ho(-t,-t,t,t)}return e}var f8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Hat=function(r){f8(e,r);function e(t){var n=r.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate})||this;n.on,n.once,n.un,n.opaque_=t.opaque!==void 0?t.opaque:!1,n.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,n.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;var i=[256,256];return n.tileGrid&&Ui(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),i),n.tileCache=new l8(t.cacheSize||0),n.tmpSize=[0,0],n.key_=t.key||"",n.tileOptions={transition:t.transition,interpolate:t.interpolate},n.zDirection=t.zDirection?t.zDirection:0,n}return e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);i&&i.expireCache(n)},e.prototype.forEachLoadedTile=function(t,n,i,a){var o=this.getTileCacheForProjection(t);if(!o)return!1;for(var s=!0,A,l,u,c=i.minX;c<=i.maxX;++c)for(var h=i.minY;h<=i.maxY;++h)l=Cw(n,c,h),u=!1,o.containsKey(l)&&(A=o.get(l),u=A.getState()===ye.LOADED,u&&(u=a(A)!==!1)),u||(s=!1);return s},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,n,i,a,o){return Te()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:u8(t)},e.prototype.getTileCacheForProjection=function(t){return we(Zs(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,n,i){var a=this.getTileGridForProjection(i),o=this.getTilePixelRatio(n),s=Ui(a.getTileSize(t),this.tmpSize);return o==1?s:M6(s,o,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,n){var i=n!==void 0?n:this.getProjection(),a=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=Uat(a,t,i)),iat(t,a)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),r.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,n){var i=this.getTileCacheForProjection(n);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,n,i,a){},e}(vw),Gat=function(r){f8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.tile=n,i}return e}(vo),p8=Hat;function kat(r,e){var t=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,a=/\{-y\}/g;return function(o,s,A){if(o)return r.replace(t,o[0].toString()).replace(n,o[1].toString()).replace(i,o[2].toString()).replace(a,function(){var l=o[0],u=e.getFullTileRange(l);we(u,55);var c=u.getHeight()-o[2]-1;return c.toString()})}}function $at(r,e){for(var t=r.length,n=new Array(t),i=0;i<t;++i)n[i]=kat(r[i],e);return W_(n)}function W_(r){return r.length===1?r[0]:function(e,t,n){if(e){var i=J4(e),a=bu(i,r.length);return r[a](e,t,n)}else return}}function d8(r){var e=[],t=/\{([a-z])-([a-z])\}/.exec(r);if(t){var n=t[1].charCodeAt(0),i=t[2].charCodeAt(0),a=void 0;for(a=n;a<=i;++a)e.push(r.replace(t[0],String.fromCharCode(a)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(r),t){for(var o=parseInt(t[2],10),s=parseInt(t[1],10);s<=o;s++)e.push(r.replace(t[0],s.toString()));return e}return e.push(r),e}var jat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Vat=function(r){jat(e,r);function e(t){var n=r.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(n.tileUrlFunction=t.tileUrlFunction),n.urls=null,t.urls?n.setUrls(t.urls):t.url&&n.setUrl(t.url),n.tileLoadingKeys_={},n}return e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var n=t.target,i=de(n),a=n.getState(),o;a==ye.LOADING?(this.tileLoadingKeys_[i]=!0,o=KC.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],o=a==ye.ERROR?KC.TILELOADERROR:a==ye.LOADED?KC.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new Gat(o,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,n){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof n<"u"?this.setKey(n):this.changed()},e.prototype.setUrl=function(t){var n=d8(t);this.urls=n,this.setUrls(n)},e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
`);this.generateTileUrlFunction_?this.setTileUrlFunction($at(t,this.tileGrid),n):this.setKey(n)},e.prototype.tileUrlFunction=function(t,n,i){},e.prototype.useTile=function(t,n,i){var a=Cw(t,n,i);this.tileCache.containsKey(a)&&this.tileCache.get(a)},e}(p8),Kat=Vat,zat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Xat=function(r){zat(e,r);function e(t){var n=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(i=t.interpolate),n=r.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Yat,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:i,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this,n.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,n.tileClass=t.tileClass!==void 0?t.tileClass:z_,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?n:{});for(var a in this.tileCacheForProjection){var o=this.tileCacheForProjection[a];o.expireCache(o==i?n:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Zs(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var t=r.prototype.getKey.call(this);return this.getInterpolate()||(t+=":disable-interpolation"),t},e.prototype.getOpaque=function(t){return this.getProjection()&&t&&!Zs(this.getProjection(),t)?!1:r.prototype.getOpaque.call(this,t)},e.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(this.tileGrid&&(!n||Zs(n,t)))return this.tileGrid;var i=de(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=u8(t)),this.tileGridForProjection[i]},e.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||Zs(n,t))return this.tileCache;var i=de(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new l8(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,n,i,a,o,s){var A=[t,n,i],l=this.getTileCoordForTileUrlFunction(A,o),u=l?this.tileUrlFunction(l,a,o):void 0,c=new this.tileClass(A,u!==void 0?ye.IDLE:ye.EMPTY,u!==void 0?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=s,c.addEventListener(me.CHANGE,this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,n,i,a,o){var s=this.getProjection();if(!s||!o||Zs(s,o))return this.getTileInternal(t,n,i,a,s||o);var A=this.getTileCacheForProjection(o),l=[t,n,i],u=void 0,c=xg(l);A.containsKey(c)&&(u=A.get(c));var h=this.getKey();if(u&&u.key==h)return u;var f=this.getTileGridForProjection(s),p=this.getTileGridForProjection(o),v=this.getTileCoordForTileUrlFunction(l,o),m=new OI(s,f,o,p,l,v,this.getTilePixelRatio(a),this.getGutter(),function(g,_,E,B){return this.getTileInternal(g,_,E,B,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=h,u?(m.interimTile=u,m.refreshInterimChain(),A.replace(c,m)):A.set(c,m),m},e.prototype.getTileInternal=function(t,n,i,a,o){var s=null,A=Cw(t,n,i),l=this.getKey();if(!this.tileCache.containsKey(A))s=this.createTile_(t,n,i,a,o,l),this.tileCache.set(A,s);else if(s=this.tileCache.get(A),s.key!=l){var u=s;s=this.createTile_(t,n,i,a,o,l),u.getState()==ye.IDLE?s.interimTile=u.interimTile:s.interimTile=u,s.refreshInterimChain(),this.tileCache.replace(A,s)}return s},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(var n in this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,n){{var i=Re(t);if(i){var a=de(i);a in this.tileGridForProjection||(this.tileGridForProjection[a]=n)}}},e}(Kat);function Yat(r,e){r.getImage().src=e}var Sw=Xat,v8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function Wat(r,e,t,n){var i=document.createElement("script"),a="olc_"+de(e);function o(){delete window[a],i.parentNode.removeChild(i)}i.async=!0,i.src=r+(r.indexOf("?")==-1?"?":"&")+(n||"callback")+"="+a;var s=setTimeout(function(){o(),t&&t()},1e4);window[a]=function(A){clearTimeout(s),o(),e(A)},document.getElementsByTagName("head")[0].appendChild(i)}(function(r){v8(e,r);function e(t){var n=this,i="Unexpected response status: "+t.status;return n=r.call(this,i)||this,n.name="ResponseError",n.response=t,n}return e})(Error);(function(r){v8(e,r);function e(t){var n=r.call(this,"Failed to issue request")||this;return n.name="ClientError",n.client=t,n}return e})(Error);var qat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function Zat(r){var e=r[0],t=new Array(e),n=1<<e-1,i,a;for(i=0;i<e;++i)a=48,r[1]&n&&(a+=1),r[2]&n&&(a+=2),t[i]=String.fromCharCode(a),n>>=1;return t.join("")}var Jat='<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>',tot=function(r){qat(e,r);function e(t){var n=this,i=t.hidpi!==void 0?t.hidpi:!1,a=t.imageSmoothing!==void 0?t.imageSmoothing:!0;t.interpolate!==void 0&&(a=t.interpolate),n=r.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:a,opaque:!0,projection:Re("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:Ha.LOADING,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:i?2:1,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection})||this,n.hidpi_=i,n.culture_=t.culture!==void 0?t.culture:"en-us",n.maxZoom_=t.maxZoom!==void 0?t.maxZoom:-1,n.apiKey_=t.key,n.imagerySet_=t.imagerySet;var o="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+n.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+n.apiKey_+"&c="+n.culture_;return Wat(o,n.handleImageryMetadataResponse.bind(n),void 0,"jsonp"),n}return e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(t.statusCode!=200||t.statusDescription!="OK"||t.authenticationResultCode!="ValidCredentials"||t.resourceSets.length!=1||t.resourceSets[0].resources.length!=1){this.setState(Ha.ERROR);return}var n=t.resourceSets[0].resources[0],i=this.maxZoom_==-1?n.zoomMax:this.maxZoom_,a=this.getProjection(),o=xw(a),s=this.hidpi_?2:1,A=n.imageWidth==n.imageHeight?n.imageWidth/s:[n.imageWidth/s,n.imageHeight/s],l=c8({extent:o,minZoom:n.zoomMin,maxZoom:i,tileSize:A});this.tileGrid=l;var u=this.culture_,c=this.hidpi_;if(this.tileUrlFunction=W_(n.imageUrlSubdomains.map(function(f){var p=[0,0,0],v=n.imageUrl.replace("{subdomain}",f).replace("{culture}",u);return function(m,g,_){if(m){Tg(m[0],m[1],m[2],p);var E=v;return c&&(E+="&dpi=d1&device=mobile"),E.replace("{quadkey}",Zat(p))}else return}})),n.imageryProviders){var h=vh(Re("EPSG:4326"),this.getProjection());this.setAttributions(function(f){var p=[],v=f.viewState,m=this.getTileGrid(),g=m.getZForResolution(v.resolution,this.zDirection),_=m.getTileCoordForCoordAndZ(v.center,g),E=_[0];return n.imageryProviders.map(function(B){for(var L=!1,O=B.coverageAreas,b=0,T=O.length;b<T;++b){var F=O[b];if(E>=F.zoomMin&&E<=F.zoomMax){var M=F.bbox,S=[M[1],M[0],M[3],M[2]],x=$F(S,h);if(Nn(x,f.extent)){L=!0;break}}}L&&p.push(B.attribution)}),p.push(Jat),p}.bind(this))}this.setState(Ha.READY)},e}(Sw),eot=tot,rot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),not=function(r){rot(e,r);function e(t){var n=t||{},i=n.imageSmoothing!==void 0?n.imageSmoothing:!0;n.interpolate!==void 0&&(i=n.interpolate);var a=n.projection!==void 0?n.projection:"EPSG:3857",o=n.tileGrid!==void 0?n.tileGrid:c8({extent:xw(a),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return r.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:i,opaque:n.opaque,projection:a,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX!==void 0?n.wrapX:!0,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this}return e}(Sw),g8=not,iot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),aot=function(r){iot(e,r);function e(t){var n=r.call(this,{attributions:t.attributions,wrapX:t.wrapX})||this;return n.resolution=void 0,n.distance=t.distance!==void 0?t.distance:20,n.minDistance=t.minDistance||0,n.interpolationRatio=0,n.features=[],n.geometryFunction=t.geometryFunction||function(i){var a=i.getGeometry();return we(a.getType()==st.POINT,10),a},n.createCustomCluster_=t.createCluster,n.source=null,n.boundRefresh_=n.refresh.bind(n),n.updateDistance(n.distance,n.minDistance),n.setSource(t.source||null),n}return e.prototype.clear=function(t){this.features.length=0,r.prototype.clear.call(this,t)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,n,i){this.source.loadFeatures(t,n,i),n!==this.resolution&&(this.resolution=n,this.refresh())},e.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},e.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},e.prototype.getMinDistance=function(){return this.minDistance},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(me.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(me.CHANGE,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,n){var i=t===0?0:Math.min(n,t)/t,a=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=n,this.interpolationRatio=i,a&&this.refresh()},e.prototype.cluster=function(){if(!(this.resolution===void 0||!this.source))for(var t=wi(),n=this.distance*this.resolution,i=this.source.getFeatures(),a={},o=0,s=i.length;o<s;o++){var A=i[o];if(!(de(A)in a)){var l=this.geometryFunction(A);if(l){var u=l.getCoordinates();qc(u,t),Ka(t,n,t);var c=this.source.getFeaturesInExtent(t).filter(function(h){var f=de(h);return f in a?!1:(a[f]=!0,!0)});this.features.push(this.createCluster(c,t))}}}},e.prototype.createCluster=function(t,n){for(var i=[0,0],a=t.length-1;a>=0;--a){var o=this.geometryFunction(t[a]);o?u6(i,o.getCoordinates()):t.splice(a,1)}c6(i,1/t.length);var s=ba(n),A=this.interpolationRatio,l=new pr([i[0]*(1-A)+s[0]*A,i[1]*(1-A)+s[1]*A]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new sr({geometry:l,features:t})},e}(Tl),y8=aot,tA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oot(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}),e}var Ca=globalThis&&globalThis.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))},Da={VERSION1:"version1",VERSION2:"version2",VERSION3:"version3"},_h={};_h[Da.VERSION1]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}};_h[Da.VERSION2]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}};_h[Da.VERSION3]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}};_h.none={none:{supports:[],formats:[],qualities:[]}};var sot=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,pN=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Aot=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;function lot(r){var e=r.getComplianceLevelSupportedFeatures();return e===void 0&&(e=_h[Da.VERSION1].level0),{url:r.imageInfo["@id"]===void 0?void 0:r.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:Ca(Ca([],e.formats,!0),[r.imageInfo.formats===void 0?[]:r.imageInfo.formats],!1),qualities:Ca(Ca([],e.qualities,!0),[r.imageInfo.qualities===void 0?[]:r.imageInfo.qualities],!1),resolutions:r.imageInfo.scale_factors,tileSize:r.imageInfo.tile_width!==void 0?r.imageInfo.tile_height!==void 0?[r.imageInfo.tile_width,r.imageInfo.tile_height]:[r.imageInfo.tile_width,r.imageInfo.tile_width]:r.imageInfo.tile_height!=null?[r.imageInfo.tile_height,r.imageInfo.tile_height]:void 0}}function uot(r){var e=r.getComplianceLevelSupportedFeatures(),t=Array.isArray(r.imageInfo.profile)&&r.imageInfo.profile.length>1,n=t&&r.imageInfo.profile[1].supports?r.imageInfo.profile[1].supports:[],i=t&&r.imageInfo.profile[1].formats?r.imageInfo.profile[1].formats:[],a=t&&r.imageInfo.profile[1].qualities?r.imageInfo.profile[1].qualities:[];return{url:r.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:r.imageInfo.sizes===void 0?void 0:r.imageInfo.sizes.map(function(o){return[o.width,o.height]}),tileSize:r.imageInfo.tiles===void 0?void 0:[r.imageInfo.tiles.map(function(o){return o.width})[0],r.imageInfo.tiles.map(function(o){return o.height===void 0?o.width:o.height})[0]],resolutions:r.imageInfo.tiles===void 0?void 0:r.imageInfo.tiles.map(function(o){return o.scaleFactors})[0],supports:Ca(Ca([],e.supports,!0),n,!0),formats:Ca(Ca([],e.formats,!0),i,!0),qualities:Ca(Ca([],e.qualities,!0),a,!0)}}function cot(r){var e=r.getComplianceLevelSupportedFeatures(),t=r.imageInfo.extraFormats===void 0?e.formats:Ca(Ca([],e.formats,!0),r.imageInfo.extraFormats,!0),n=r.imageInfo.preferredFormats!==void 0&&Array.isArray(r.imageInfo.preferredFormats)&&r.imageInfo.preferredFormats.length>0?r.imageInfo.preferredFormats.filter(function(i){return mi(["jpg","png","gif"],i)}).reduce(function(i,a){return i===void 0&&mi(t,a)?a:i},void 0):void 0;return{url:r.imageInfo.id,sizes:r.imageInfo.sizes===void 0?void 0:r.imageInfo.sizes.map(function(i){return[i.width,i.height]}),tileSize:r.imageInfo.tiles===void 0?void 0:[r.imageInfo.tiles.map(function(i){return i.width})[0],r.imageInfo.tiles.map(function(i){return i.height})[0]],resolutions:r.imageInfo.tiles===void 0?void 0:r.imageInfo.tiles.map(function(i){return i.scaleFactors})[0],supports:r.imageInfo.extraFeatures===void 0?e.supports:Ca(Ca([],e.supports,!0),r.imageInfo.extraFeatures,!0),formats:t,qualities:r.imageInfo.extraQualities===void 0?e.qualities:Ca(Ca([],e.qualities,!0),r.imageInfo.extraQualities,!0),preferredFormat:n}}var bw={};bw[Da.VERSION1]=lot;bw[Da.VERSION2]=uot;bw[Da.VERSION3]=cot;var hot=function(){function r(e){this.setImageInfo(e)}return r.prototype.setImageInfo=function(e){typeof e=="string"?this.imageInfo=JSON.parse(e):this.imageInfo=e},r.prototype.getImageApiVersion=function(){if(this.imageInfo!==void 0){var e=this.imageInfo["@context"]||"ol-no-context";typeof e=="string"&&(e=[e]);for(var t=0;t<e.length;t++)switch(e[t]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return Da.VERSION1;case"http://iiif.io/api/image/2/context.json":return Da.VERSION2;case"http://iiif.io/api/image/3/context.json":return Da.VERSION3;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(Da.VERSION1)&&this.imageInfo.identifier)return Da.VERSION1;break}we(!1,61)}},r.prototype.getComplianceLevelEntryFromProfile=function(e){if(!(this.imageInfo===void 0||this.imageInfo.profile===void 0))switch(e===void 0&&(e=this.getImageApiVersion()),e){case Da.VERSION1:if(sot.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Da.VERSION3:if(Aot.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Da.VERSION2:if(typeof this.imageInfo.profile=="string"&&pN.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&typeof this.imageInfo.profile[0]=="string"&&pN.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0];break}},r.prototype.getComplianceLevelFromProfile=function(e){var t=this.getComplianceLevelEntryFromProfile(e);if(t!==void 0){var n=t.match(/level[0-2](?:\.json)?$/g);return Array.isArray(n)?n[0].replace(".json",""):void 0}},r.prototype.getComplianceLevelSupportedFeatures=function(){if(this.imageInfo!==void 0){var e=this.getImageApiVersion(),t=this.getComplianceLevelFromProfile(e);return t===void 0?_h.none.none:_h[e][t]}},r.prototype.getTileSourceOptions=function(e){var t=e||{},n=this.getImageApiVersion();if(n!==void 0){var i=n===void 0?void 0:bw[n](this);if(i!==void 0)return{url:i.url,version:n,size:[this.imageInfo.width,this.imageInfo.height],sizes:i.sizes,format:t.format!==void 0&&mi(i.formats,t.format)?t.format:i.preferredFormat!==void 0?i.preferredFormat:"jpg",supports:i.supports,quality:t.quality&&mi(i.qualities,t.quality)?t.quality:mi(i.qualities,"native")?"native":"default",resolutions:Array.isArray(i.resolutions)?i.resolutions.sort(function(a,o){return o-a}):void 0,tileSize:i.tileSize}}},r}(),fot=hot,pot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dot=function(r){pot(e,r);function e(t,n,i,a,o,s,A){var l=this,u=t.getExtent(),c=n.getExtent(),h=c?es(i,c):i,f=ba(h),p=Cg(t,n,f,a),v=H4,m=new G4(t,n,h,u,p*v,a),g=m.calculateSourceExtent(),_=s(g,p,o),E=_?je.IDLE:je.EMPTY,B=_?_.getPixelRatio():1;return l=r.call(this,i,a,B,E)||this,l.targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=m,l.targetResolution_=a,l.targetExtent_=i,l.sourceImage_=_,l.sourcePixelRatio_=B,l.interpolate_=A,l.canvas_=null,l.sourceListenerKey_=null,l}return e.prototype.disposeInternal=function(){this.state==je.LOADING&&this.unlistenSource_(),r.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==je.LOADED){var n=Or(this.targetExtent_)/this.targetResolution_,i=li(this.targetExtent_)/this.targetResolution_;this.canvas_=$4(n,i,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==je.IDLE){this.state=je.LOADING,this.changed();var t=this.sourceImage_.getState();t==je.LOADED||t==je.ERROR?this.reproject_():(this.sourceListenerKey_=Ue(this.sourceImage_,me.CHANGE,function(n){var i=this.sourceImage_.getState();(i==je.LOADED||i==je.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){Nr(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(n4),vot=dot,m8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zC={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},got=function(r){m8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.image=n,i}return e}(vo),yot=function(r){m8(e,r);function e(t){var n=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(i=t.interpolate),n=r.call(this,{attributions:t.attributions,projection:t.projection,state:t.state,interpolate:i})||this,n.on,n.once,n.un,n.resolutions_=t.resolutions!==void 0?t.resolutions:null,n.reprojectedImage_=null,n.reprojectedRevision_=0,n}return e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var n=ew(this.resolutions_,t,0);t=this.resolutions_[n]}return t},e.prototype.getImage=function(t,n,i,a){var o=this.getProjection();if(!o||!a||Zs(o,a))return o&&(a=o),this.getImageInternal(t,n,i,a);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Zs(this.reprojectedImage_.getProjection(),a)&&this.reprojectedImage_.getResolution()==n&&cA(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new vot(o,a,t,n,i,function(s,A,l){return this.getImageInternal(s,A,l,o)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_},e.prototype.getImageInternal=function(t,n,i,a){return Te()},e.prototype.handleImageChange=function(t){var n=t.target,i;switch(n.getState()){case je.LOADING:this.loading=!0,i=zC.IMAGELOADSTART;break;case je.LOADED:this.loading=!1,i=zC.IMAGELOADEND;break;case je.ERROR:this.loading=!1,i=zC.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new got(i,n))},e}(vw);function _8(r,e){r.getImage().src=e}var w8=yot;function Mp(r,e){var t=[];Object.keys(e).forEach(function(i){e[i]!==null&&e[i]!==void 0&&t.push(i+"="+encodeURIComponent(e[i]))});var n=t.join("&");return r=r.replace(/[?&]$/,""),r=r.indexOf("?")===-1?r+"?":r+"&",r+n}var mot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),_ot=function(r){mot(e,r);function e(t){var n=this,i=t.crossOrigin!==void 0?t.crossOrigin:null,a=t.imageLoadFunction!==void 0?t.imageLoadFunction:_8,o=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(o=t.interpolate),n=r.call(this,{attributions:t.attributions,interpolate:o,projection:Re(t.projection)})||this,n.url_=t.url,n.imageExtent_=t.imageExtent,n.image_=new i4(n.imageExtent_,void 0,1,n.url_,i,a),n.imageSize_=t.imageSize?t.imageSize:null,n.image_.addEventListener(me.CHANGE,n.handleImageChange.bind(n)),n}return e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,n,i,a){return Nn(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(t){if(this.image_.getState()==je.LOADED){var n=this.image_.getExtent(),i=this.image_.getImage(),a=void 0,o=void 0;this.imageSize_?(a=this.imageSize_[0],o=this.imageSize_[1]):(a=i.width,o=i.height);var s=Or(n),A=li(n),l=s/a,u=A/o,c=a,h=o;if(l>u?c=Math.round(s/u):h=Math.round(A/l),c!==a||h!==o){var f=za(c,h);this.getInterpolate()||ve(f,Rp);var p=f.canvas;f.drawImage(i,0,0,a,o,0,0,p.width,p.height),this.image_.setImage(p)}}r.prototype.handleImageChange.call(this,t)},e}(w8),wot=_ot,yu="1.3.0",mu={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"},Eot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ru=4,dN=[101,101],Cot=function(r){Eot(e,r);function e(t){var n=this,i=t||{},a=i.imageSmoothing!==void 0?i.imageSmoothing:!0;return i.interpolate!==void 0&&(a=i.interpolate),n=r.call(this,{attributions:i.attributions,interpolate:a,projection:i.projection,resolutions:i.resolutions})||this,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:null,n.url_=i.url,n.imageLoadFunction_=i.imageLoadFunction!==void 0?i.imageLoadFunction:_8,n.params_=i.params||{},n.v13_=!0,n.updateV13_(),n.serverType_=i.serverType,n.hidpi_=i.hidpi!==void 0?i.hidpi:!0,n.image_=null,n.imageSize_=[0,0],n.renderedRevision_=0,n.ratio_=i.ratio!==void 0?i.ratio:1.5,n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){if(this.url_!==void 0){var o=Re(i),s=this.getProjection();s&&s!==o&&(n=Cg(s,o,t,n),t=ju(t,o,s));var A=Jc(t,n,0,dN),l={SERVICE:"WMS",VERSION:yu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};ve(l,this.params_,a);var u=Kf((t[0]-A[0])/n,ru),c=Kf((A[3]-t[1])/n,ru);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(A,dN,1,s||o,l)}},e.prototype.getLegendUrl=function(t,n){if(this.url_!==void 0){var i={SERVICE:"WMS",VERSION:yu,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(n===void 0||n.LAYER===void 0){var a=this.params_.LAYERS,o=!Array.isArray(a)||a.length===1;if(!o)return;i.LAYER=a}if(t!==void 0){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1,A=28e-5;i.SCALE=t*s/A}return ve(i,n),Mp(this.url_,i)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,n,i,a){if(this.url_===void 0)return null;n=this.findNearestResolution(n),i!=1&&(!this.hidpi_||this.serverType_===void 0)&&(i=1);var o=n/i,s=ba(t),A=du(Or(t)/o,ru),l=du(li(t)/o,ru),u=Jc(s,o,0,[A,l]),c=du(this.ratio_*Or(t)/o,ru),h=du(this.ratio_*li(t)/o,ru),f=Jc(s,o,0,[c,h]),p=this.image_;if(p&&this.renderedRevision_==this.getRevision()&&p.getResolution()==n&&p.getPixelRatio()==i&&Oo(p.getExtent(),u))return p;var v={SERVICE:"WMS",VERSION:yu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};ve(v,this.params_),this.imageSize_[0]=tM(Or(f)/o,ru),this.imageSize_[1]=tM(li(f)/o,ru);var m=this.getRequestUrl_(f,this.imageSize_,i,a,v);return this.image_=new i4(f,n,i,m,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(me.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,n,i,a,o){if(we(this.url_!==void 0,9),o[this.v13_?"CRS":"SRS"]=a.getCode(),"STYLES"in this.params_||(o.STYLES=""),i!=1)switch(this.serverType_){case mu.GEOSERVER:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case mu.MAPSERVER:o.MAP_RESOLUTION=90*i;break;case mu.CARMENTA_SERVER:case mu.QGIS:o.DPI=90*i;break;default:we(!1,8);break}o.WIDTH=n[0],o.HEIGHT=n[1];var A=a.getAxisOrientation(),l;return this.v13_&&A.substr(0,2)=="ne"?l=[t[1],t[0],t[3],t[2]]:l=t,o.BBOX=l.join(","),Mp(this.url_,o)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){ve(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||yu;this.v13_=l6(t,"1.3")>=0},e}(w8),Bot=Cot,Tot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),xot='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',Sot=function(r){Tot(e,r);function e(t){var n=t||{},i=n.imageSmoothing!==void 0?n.imageSmoothing:!0;n.interpolate!==void 0&&(i=n.interpolate);var a;n.attributions!==void 0?a=n.attributions:a=[xot];var o=n.crossOrigin!==void 0?n.crossOrigin:"anonymous",s=n.url!==void 0?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return r.call(this,{attributions:a,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:o,interpolate:i,maxZoom:n.maxZoom!==void 0?n.maxZoom:19,opaque:n.opaque!==void 0?n.opaque:!0,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:s,wrapX:n.wrapX,zDirection:n.zDirection})||this}return e}(g8),bot=Sot,Fot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Iot=function(r){Fot(e,r);function e(t){var n=this,i=t||{},a=i.imageSmoothing!==void 0?i.imageSmoothing:!0;i.interpolate!==void 0&&(a=i.interpolate);var o=i.params||{},s="TRANSPARENT"in o?o.TRANSPARENT:!0;return n=r.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:a,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:i.wrapX!==void 0?i.wrapX:!0,transition:i.transition,zDirection:i.zDirection})||this,n.gutter_=i.gutter!==void 0?i.gutter:0,n.params_=o,n.v13_=!0,n.serverType_=i.serverType,n.hidpi_=i.hidpi!==void 0?i.hidpi:!0,n.tmpExtent_=wi(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){var o=Re(i),s=this.getProjection(),A=this.getTileGrid();A||(A=this.getTileGridForProjection(o));var l=A.getZForResolution(n,this.zDirection),u=A.getTileCoordForCoordAndZ(t,l);if(!(A.getResolutions().length<=u[0])){var c=A.getResolution(u[0]),h=A.getTileCoordExtent(u,this.tmpExtent_),f=Ui(A.getTileSize(u[0]),this.tmpSize),p=this.gutter_;p!==0&&(f=_M(f,p,this.tmpSize),h=Ka(h,c*p,h)),s&&s!==o&&(c=Cg(s,o,t,c),h=O_(h,o,s),t=ju(t,o,s));var v={SERVICE:"WMS",VERSION:yu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};ve(v,this.params_,a);var m=Math.floor((t[0]-h[0])/c),g=Math.floor((h[3]-t[1])/c);return v[this.v13_?"I":"X"]=m,v[this.v13_?"J":"Y"]=g,this.getRequestUrl_(u,f,h,1,s||o,v)}},e.prototype.getLegendUrl=function(t,n){if(this.urls[0]!==void 0){var i={SERVICE:"WMS",VERSION:yu,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(n===void 0||n.LAYER===void 0){var a=this.params_.LAYERS,o=!Array.isArray(a)||a.length===1;if(!o)return;i.LAYER=a}if(t!==void 0){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1,A=28e-5;i.SCALE=t*s/A}return ve(i,n),Mp(this.urls[0],i)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,n,i,a,o,s){var A=this.urls;if(A){if(s.WIDTH=n[0],s.HEIGHT=n[1],s[this.v13_?"CRS":"SRS"]=o.getCode(),"STYLES"in this.params_||(s.STYLES=""),a!=1)switch(this.serverType_){case mu.GEOSERVER:var l=90*a+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+l:s.FORMAT_OPTIONS="dpi:"+l;break;case mu.MAPSERVER:s.MAP_RESOLUTION=90*a;break;case mu.CARMENTA_SERVER:case mu.QGIS:s.DPI=90*a;break;default:we(!1,52);break}var u=o.getAxisOrientation(),c=i;if(this.v13_&&u.substr(0,2)=="ne"){var h=void 0;h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h}s.BBOX=c.join(",");var f;if(A.length==1)f=A[0];else{var p=bu(J4(t),A.length);f=A[p]}return Mp(f,s)}},e.prototype.getTilePixelRatio=function(t){return!this.hidpi_||this.serverType_===void 0?1:t},e.prototype.getKeyForParams_=function(){var t=0,n=[];for(var i in this.params_)n[t++]=i+"-"+this.params_[i];return n.join("/")},e.prototype.updateParams=function(t){ve(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||yu;this.v13_=l6(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,n,i){var a=this.getTileGrid();if(a||(a=this.getTileGridForProjection(i)),!(a.getResolutions().length<=t[0])){n!=1&&(!this.hidpi_||this.serverType_===void 0)&&(n=1);var o=a.getResolution(t[0]),s=a.getTileCoordExtent(t,this.tmpExtent_),A=Ui(a.getTileSize(t[0]),this.tmpSize),l=this.gutter_;l!==0&&(A=_M(A,l,this.tmpSize),s=Ka(s,o*l,s)),n!=1&&(A=M6(A,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:yu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return ve(u,this.params_),this.getRequestUrl_(t,A,s,n,i,u)}},e}(Sw),Lot=Iot,Hm={KVP:"KVP",REST:"REST"},Oot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Rot=function(r){Oot(e,r);function e(t){var n=r.call(this,{extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes})||this;return n.matrixIds_=t.matrixIds,n}return e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(QI),_x=Rot,Mot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Not=function(r){Mot(e,r);function e(t){var n=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;t.interpolate!==void 0&&(i=t.interpolate);var a=t.requestEncoding!==void 0?t.requestEncoding:Hm.KVP,o=t.tileGrid,s=t.urls;return s===void 0&&t.url!==void 0&&(s=d8(t.url)),n=r.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:s,wrapX:t.wrapX!==void 0?t.wrapX:!1,transition:t.transition,zDirection:t.zDirection})||this,n.version_=t.version!==void 0?t.version:"1.0.0",n.format_=t.format!==void 0?t.format:"image/jpeg",n.dimensions_=t.dimensions!==void 0?t.dimensions:{},n.layer_=t.layer,n.matrixSet_=t.matrixSet,n.style_=t.style,n.requestEncoding_=a,n.setKey(n.getKeyForDimensions_()),s&&s.length>0&&(n.tileUrlFunction=W_(s.map(n.createFromWMTSTemplate.bind(n)))),n}return e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
`);this.setTileUrlFunction(W_(t.map(this.createFromWMTSTemplate.bind(this))),n)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,n=[];for(var i in this.dimensions_)n[t++]=i+"-"+this.dimensions_[i];return n.join("/")},e.prototype.updateDimensions=function(t){ve(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var n=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};n==Hm.KVP&&ve(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=n==Hm.KVP?Mp(t,i):t.replace(/\{(\w+?)\}/g,function(s,A){return A.toLowerCase()in i?i[A.toLowerCase()]:s});var a=this.tileGrid,o=this.dimensions_;return function(s,A,l){if(s){var u={TileMatrix:a.getMatrixId(s[0]),TileCol:s[1],TileRow:s[2]};ve(u,o);var c=t;return n==Hm.KVP?c=Mp(c,u):c=c.replace(/\{(\w+?)\}/g,function(h,f){return u[f]}),c}else return}},e}(Sw),E8=Not;window.ol&&!ol.ext&&(ol.ext={});var Br=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r};window.ol&&(ol.inherits||(ol.inherits=Br));window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});function Fw(r){const e=r.frameState,t=jp(r.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new EI(r.context,e.pixelRatio,e.extent,t,e.viewState.rotation)}window.ol&&(ol.util?ol.util.VERSION||(ol.util.VERSION=ol.VERSION||"6.1.0"):ol.util={VERSION:ol.VERSION||"5.3.0"});var Y0=VQ.split(".");Y0=parseInt(Y0[0])*100+parseInt(Y0[1]);var wx=function(r,e){var t=r.frameState.pixelRatio;if(Y0>605&&t!==1&&e.getImage()instanceof sy){e=e.clone();var n=e.getImage();n.setScale(n.getScale()*t);var i=n.getAnchor();if(n.setDisplacement){var a=n.getDisplacement();a&&(a[0]-=i[0]/t,a[1]+=i[1]/t,n.setAnchor([0,0]))}else i&&(i[0]/=t,i[1]/=t)}return e},Rh=function(r){var e=r||{};dA.call(this,e),this.oldcluster=new Tl,this.clusters=[],this.animation={start:!1},this.set("animationDuration",typeof e.animationDuration=="number"?e.animationDuration:700),this.set("animationMethod",e.animationMethod||rs),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};Br(Rh,dA);Rh.prototype.saveCluster=function(){if(this.oldcluster){if(this.oldcluster.clear(),!this.get("animationDuration"))return;var r=this.getSource().getFeatures();r.length&&r[0].get("features")&&(this.oldcluster.addFeatures(this.clusters),this.clusters=r.slice(0),this.sourceChanged=!0)}};Rh.prototype.getClusterForFeature=function(r,e){for(var t=0,n;n=e[t];t++){var i=n.get("features");if(i&&i.length){for(var a=0,o;o=i[a];a++)if(r===o)return n}}return!1};Rh.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]};Rh.prototype.animate=function(r){var e=this.get("animationDuration");if(e){var t=r.frameState.viewState.resolution,n,i,a=this.animation,o=r.frameState.time;if(a.resolution!=t&&this.sourceChanged){var s=r.frameState.extent;for(a.resolution<t?(s=Ka(s,100*t),a.cA=this.oldcluster.getFeaturesInExtent(s),a.cB=this.getSource().getFeaturesInExtent(s),a.revers=!1):(s=Ka(s,100*t),a.cA=this.getSource().getFeaturesInExtent(s),a.cB=this.oldcluster.getFeaturesInExtent(s),a.revers=!0),a.clusters=[],n=0,i;i=a.cA[n];n++){var A=i.get("features");if(A&&A.length){var l=this.getClusterForFeature(A[0],a.cB);l&&a.clusters.push({f:i,pt:l.getGeometry().getCoordinates()})}}if(a.resolution=t,this.sourceChanged=!1,!a.clusters.length||a.clusters.length>1e3){this.stopAnimation();return}o=a.start=new Date().getTime()}if(a.start){var u=r.vectorContext||Fw(r),c=(o-a.start)/e;c>1&&(this.stopAnimation(),c=1),c=this.get("animationMethod")(c);var h=this.getStyle(),f=typeof h=="function"?h:h.length?function(){return h}:function(){return[h]};for(r.context.save(),r.context.globalAlpha=this.getOpacity(),n=0,l;l=a.clusters[n];n++){var p=l.f.getGeometry().getCoordinates(),v=p[0]-l.pt[0],m=p[1]-l.pt[1];a.revers?(p[0]=l.pt[0]+c*v,p[1]=l.pt[1]+c*m):(p[0]=p[0]-c*v,p[1]=p[1]-c*m);var g=f(l.f,t,!0);if(g.length||(g=[g]),l.f.get("features").length===1&&!v&&!m)A=l.f.get("features")[0];else{var _=new pr(p);A=new sr(_)}for(var E=0,B;B=g[E];E++)if(B.getText()&&/\n/.test(B.getText().getText())){var L=B.getText().getOffsetX(),O=B.getText().getOffsetY(),b=B.getText().getRotation()||0,T=Number((B.getText().getFont()||"10px").match(/\d+/))*1.2,F=B.getText().getText().split(`
`),M,S=F.length-1,x=B.clone();F.forEach(function(N,P){switch(P==1&&(x.setImage(),x.setFill(),x.setStroke()),B.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":{M=S;break}case"hanging":case"top":{M=0;break}default:{M=S/2;break}}x.getText().setOffsetX(L-Math.sin(b)*T*(P-M)),x.getText().setOffsetY(O+Math.cos(b)*T*(P-M)),x.getText().setText(N),u.drawFeature(A,wx(r,x))})}else u.drawFeature(A,wx(r,B))}r.context.restore(),r.frameState.animate=!0,r.context.save(),r.context.beginPath(),r.context.rect(0,0,0,0),r.context.clip(),this.clip_=!0}}};Rh.prototype.postanimate=function(r){this.clip_&&(r.context.restore(),this.clip_=!1)};const Pot={extends:Oh,name:"ol-animated-clusterlayer",setup(r){const e=Be("map"),{properties:t}=gr(r),n=fr(()=>new Rh(Ms(Dn({},t),{source:new y8({distance:t.distance,geometryFunction:o=>o.getGeometry()})}))),i=fr(()=>n.value.getSource());return fe(t,()=>{n.value.setProperties(t),n.value.changed()}),Je(()=>{e.addLayer(n.value),n.value.changed(),e.changed()}),ar(()=>{e.removeLayer(n.value)}),Pr("vectorLayer",i),Pr("stylable",n),{vectorLayer:n,map:e}},props:{animationDuration:{type:Number,default:700},distance:{type:Number,default:20},animationMethod:{type:Function,default:rs},updateWhileAnimating:{type:Boolean,default:!1},updateWhileInteracting:{type:Boolean,default:!1}}};function Uot(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var Ex=ue(Pot,[["render",Uot]]),$s=new Uint8Array(4),Dot=function(){function r(e,t){this.helper_=e;var n=e.getGL();this.texture_=n.createTexture(),this.framebuffer_=n.createFramebuffer(),this.size_=t||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return r.prototype.setSize=function(e){Cl(e,this.size_)||(this.size_[0]=e[0],this.size_[1]=e[1],this.updateSize_())},r.prototype.getSize=function(){return this.size_},r.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},r.prototype.readAll=function(){if(this.dataCacheDirty_){var e=this.size_,t=this.helper_.getGL();t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.readPixels(0,0,e[0],e[1],t.RGBA,t.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},r.prototype.readPixel=function(e,t){if(e<0||t<0||e>this.size_[0]||t>=this.size_[1])return $s[0]=0,$s[1]=0,$s[2]=0,$s[3]=0,$s;this.readAll();var n=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return $s[0]=this.data_[n*4],$s[1]=this.data_[n*4+1],$s[2]=this.data_[n*4+2],$s[3]=this.data_[n*4+3],$s},r.prototype.getTexture=function(){return this.texture_},r.prototype.getFramebuffer=function(){return this.framebuffer_},r.prototype.updateSize_=function(){var e=this.size_,t=this.helper_.getGL();this.texture_=this.helper_.createTexture(e,null,this.texture_),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.viewport(0,0,e[0],e[1]),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(e[0]*e[1]*4)},r}(),Qot=Dot;function Hot(){var r='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,a){var u=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=a?a.vertexPosition:0,h=a?a.indexPosition:0,d=b/u;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=u,l,v,1),c.length&&i.set(c,b+3),o(i,b+=u,l,v,2),c.length&&i.set(c,b+3),o(i,b+=u,l,v,3),c.length&&i.set(c,b+3),b+=u,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o,s=r.customAttributesCount,a=2+s,u=new Float32Array(r.renderInstructions),l=u.length/a,v=4*l*(s+3),c=new Uint32Array(6*l),g=new Float32Array(v),b=0;b<u.length;b+=a)o=i(u,b,g,c,s,o);var h=e({vertexBuffer:g.buffer,indexBuffer:c.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[g.buffer,c.buffer,u.buffer])}};';return new Worker(typeof Blob>"u"?"data:application/javascript;base64,"+Buffer.from(r,"binary").toString("base64"):URL.createObjectURL(new Blob([r],{type:"application/javascript"})))}var Got=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),kot=function(r){Got(e,r);function e(t,n){var i=this,a=n.uniforms||{},o=si();a[Qf.PROJECTION_MATRIX]=o,i=r.call(this,t,{uniforms:a,postProcesses:n.postProcesses})||this,i.ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new $v(Bg,K0),i.hitVerticesBuffer_=new $v(Bg,K0),i.indicesBuffer_=new $v(Ew,K0),i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.program_,i.hitDetectionEnabled_=!!(n.hitFragmentShader&&n.hitVertexShader),i.hitVertexShader_=n.hitVertexShader,i.hitFragmentShader_=n.hitFragmentShader,i.hitProgram_;var s=n.attributes?n.attributes.map(function(l){return{name:"a_"+l.name,size:1,type:Wo.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:Wo.FLOAT},{name:"a_index",size:1,type:Wo.FLOAT}].concat(s),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Wo.FLOAT},{name:"a_index",size:1,type:Wo.FLOAT},{name:"a_hitColor",size:4,type:Wo.FLOAT},{name:"a_featureUid",size:1,type:Wo.FLOAT}].concat(s),i.customAttributes=n.attributes?n.attributes:[],i.previousExtent_=wi(),i.currentTransform_=o,i.renderTransform_=si(),i.invertRenderTransform_=si(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=Hot(),i.worker_.addEventListener("message",function(l){var u=l.data;if(u.type===kC.GENERATE_BUFFERS){var c=u.projectionTransform;u.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(u.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=c,Wg(this.invertRenderTransform_,this.renderTransform_),u.hitDetection?this.hitRenderInstructions_=new Float32Array(l.data.renderInstructions):(this.renderInstructions_=new Float32Array(l.data.renderInstructions),u.generateBuffersRun===this.generateBuffersRun_&&(this.ready=!0)),this.getLayer().changed()}}.bind(i)),i.featureCache_={},i.featureCount_=0;var A=i.getLayer().getSource();return i.sourceListenKeys_=[Ue(A,Ri.ADDFEATURE,i.handleSourceFeatureAdded_,i),Ue(A,Ri.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),Ue(A,Ri.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),Ue(A,Ri.CLEAR,i.handleSourceFeatureClear_,i)],A.forEachFeature(function(l){this.featureCache_[de(l)]={feature:l,properties:l.getProperties(),geometry:l.getGeometry()},this.featureCount_++}.bind(i)),i}return e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new Qot(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var n=t.feature;this.featureCache_[de(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var n=t.feature;this.featureCache_[de(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var n=t.feature;delete this.featureCache_[de(n)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var n=this.helper.getGL();this.preRender(n,t);var i=this.indicesBuffer_.getSize();this.helper.drawElements(0,i),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var a=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(n,t),a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getSource(),a=t.viewState,o=!t.viewHints[mn.ANIMATING]&&!t.viewHints[mn.INTERACTING],s=!cA(this.previousExtent_,t.extent),A=this.sourceRevision_<i.getRevision();if(A&&(this.sourceRevision_=i.getRevision()),o&&(s||A)){var l=a.projection,u=a.resolution,c=n instanceof dw?n.getRenderBuffer():0,h=Ka(t.extent,c*u);i.loadFeatures(h,u,l),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),jp(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var n=si();this.helper.makeProjectionTransform(t,n);var i=(2+this.customAttributes.length)*this.featureCount_;if((!this.renderInstructions_||this.renderInstructions_.length!==i)&&(this.renderInstructions_=new Float32Array(i)),this.hitDetectionEnabled_){var a=(7+this.customAttributes.length)*this.featureCount_;(!this.hitRenderInstructions_||this.hitRenderInstructions_.length!==a)&&(this.hitRenderInstructions_=new Float32Array(a))}var o,s,A=[],l=[],u=0,c=0,h;for(var f in this.featureCache_)if(o=this.featureCache_[f],s=o.geometry,!(!s||s.getType()!==st.POINT)){A[0]=s.getFlatCoordinates()[0],A[1]=s.getFlatCoordinates()[1],hn(n,A),h=eat(c+6,l),this.renderInstructions_[u++]=A[0],this.renderInstructions_[u++]=A[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[c++]=A[0],this.hitRenderInstructions_[c++]=A[1],this.hitRenderInstructions_[c++]=h[0],this.hitRenderInstructions_[c++]=h[1],this.hitRenderInstructions_[c++]=h[2],this.hitRenderInstructions_[c++]=h[3],this.hitRenderInstructions_[c++]=Number(f));for(var p=void 0,v=0;v<this.customAttributes.length;v++)p=this.customAttributes[v].callback(o.feature,o.properties),this.renderInstructions_[u++]=p,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[c++]=p)}var m={type:kC.GENERATE_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(m.projectionTransform=n,m.generateBuffersRun=++this.generateBuffersRun_,this.ready=!1,this.worker_.postMessage(m,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var g={type:kC.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};g.projectionTransform=n,g.hitDetection=!0,this.worker_.postMessage(g,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){if(we(this.hitDetectionEnabled_,66),!!this.hitRenderInstructions_){var s=hn(n.coordinateToPixelTransform,t.slice()),A=this.hitRenderTarget_.readPixel(s[0]/2,s[1]/2),l=[A[0]/255,A[1]/255,A[2]/255,A[3]/255],u=rat(l),c=this.hitRenderInstructions_[u],h=Math.floor(c).toString(),f=this.getLayer().getSource(),p=f.getFeatureByUid(h);if(p)return a(p,this.getLayer(),null)}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var n=this.indicesBuffer_.getSize();this.helper.drawElements(0,n)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){Nr(t)}),this.sourceListenKeys_=null,r.prototype.disposeInternal.call(this)},e}(Z4),C8=kot,$ot=function(){function r(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return r.prototype.addUniform=function(e){return this.uniforms.push(e),this},r.prototype.addAttribute=function(e){return this.attributes.push(e),this},r.prototype.addVarying=function(e,t,n){return this.varyings.push({name:e,type:t,expression:n}),this},r.prototype.setSizeExpression=function(e){return this.sizeExpression=e,this},r.prototype.setRotationExpression=function(e){return this.rotationExpression=e,this},r.prototype.setSymbolOffsetExpression=function(e){return this.offsetExpression=e,this},r.prototype.setColorExpression=function(e){return this.colorExpression=e,this},r.prototype.setTextureCoordinateExpression=function(e){return this.texCoordExpression=e,this},r.prototype.setFragmentDiscardExpression=function(e){return this.discardExpression=e,this},r.prototype.setSymbolRotateWithView=function(e){return this.rotateWithView=e,this},r.prototype.getSizeExpression=function(){return this.sizeExpression},r.prototype.getOffsetExpression=function(){return this.offsetExpression},r.prototype.getColorExpression=function(){return this.colorExpression},r.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},r.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},r.prototype.getSymbolVertexShader=function(e){var t=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",n=this.attributes,i=this.varyings;return e&&(n=n.concat("vec4 a_hitColor"),i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;
uniform mat4 u_projectionMatrix;
uniform mat4 u_offsetScaleMatrix;
uniform mat4 u_offsetRotateMatrix;
uniform float u_time;
uniform float u_zoom;
uniform float u_resolution;
`.concat(this.uniforms.map(function(a){return"uniform "+a+";"}).join(`
`),`
attribute vec2 a_position;
attribute float a_index;
`).concat(n.map(function(a){return"attribute "+a+";"}).join(`
`),`
varying vec2 v_texCoord;
varying vec2 v_quadCoord;
`).concat(i.map(function(a){return"varying "+a.type+" "+a.name+";"}).join(`
`),`
void main(void) {
mat4 offsetMatrix = `).concat(t,`;
vec2 halfSize = `).concat(this.sizeExpression,` * 0.5;
vec2 offset = `).concat(this.offsetExpression,`;
float angle = `).concat(this.rotationExpression,`;
float offsetX;
float offsetY;
if (a_index == 0.0) {
offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);
offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);
} else if (a_index == 1.0) {
offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);
offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);
} else if (a_index == 2.0) {
offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);
offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);
} else {
offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);
offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);
}
vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);
gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;
vec4 texCoord = `).concat(this.texCoordExpression,`;
float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;
float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;
v_texCoord = vec2(u, v);
u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;
v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;
v_quadCoord = vec2(u, v);
`).concat(i.map(function(a){return" "+a.name+" = "+a.expression+";"}).join(`
`),`
}`)},r.prototype.getSymbolFragmentShader=function(e){var t=e?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",n=this.varyings;return e&&(n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;
uniform float u_time;
uniform float u_zoom;
uniform float u_resolution;
`.concat(this.uniforms.map(function(i){return"uniform "+i+";"}).join(`
`),`
varying vec2 v_texCoord;
varying vec2 v_quadCoord;
`).concat(n.map(function(i){return"varying "+i.type+" "+i.name+";"}).join(`
`),`
void main(void) {
if (`).concat(this.discardExpression,`) { discard; }
gl_FragColor = `).concat(this.colorExpression,`;
gl_FragColor.rgb *= gl_FragColor.a;
`).concat(t,`
}`)},r}();function jot(r){var e=r.symbol,t=e.size!==void 0?e.size:1,n=e.color||"white",i=e.textureCoord||[0,0,1,1],a=e.offset||[0,0],o=e.opacity!==void 0?e.opacity:1,s=e.rotation!==void 0?e.rotation:0,A={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},l=le(A,t,te.NUMBER_ARRAY|te.NUMBER),u=le(A,a,te.NUMBER_ARRAY),c=le(A,i,te.NUMBER_ARRAY),h=le(A,s,te.NUMBER),f={inFragmentShader:!0,variables:A.variables,attributes:[],stringLiteralsMap:A.stringLiteralsMap,functions:{}},p=le(f,n,te.COLOR),v=le(f,o,te.NUMBER),m="1.0",g="vec2(".concat(le(f,t,te.NUMBER_ARRAY|te.NUMBER),").x");switch(e.symbolType){case"square":break;case"image":break;case"circle":m="(1.0-smoothstep(1.-4./".concat(g,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var _="(v_quadCoord*2.-1.)",E="(atan(".concat(_,".x,").concat(_,".y))");m="(1.0-smoothstep(.5-3./".concat(g,",.5,cos(floor(.5+").concat(E,"/2.094395102)*2.094395102-").concat(E,")*length(").concat(_,")))");break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var B=new $ot().setSizeExpression("vec2(".concat(l,")")).setRotationExpression(h).setSymbolOffsetExpression(u).setTextureCoordinateExpression(c).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4(".concat(p,".rgb, ").concat(p,".a * ").concat(v," * ").concat(m,")"));if(r.filter){var L=le(f,r.filter,te.BOOLEAN);B.setFragmentDiscardExpression("!".concat(L))}var O={};if(f.variables.forEach(function(T){var F=DI(T);B.addUniform("float ".concat(F)),O[F]=function(){if(!r.variables||r.variables[T]===void 0)throw new Error("The following variable is missing from the style: ".concat(T));var M=r.variables[T];return typeof M=="string"&&(M=Y_(A,M)),M!==void 0?M:-9999999}}),e.symbolType==="image"&&e.src){var b=new Image;b.crossOrigin=e.crossOrigin===void 0?"anonymous":e.crossOrigin,b.src=e.src,B.addUniform("sampler2D u_texture").setColorExpression(B.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),O.u_texture=b}return f.attributes.forEach(function(T){A.attributes.indexOf(T)===-1&&A.attributes.push(T),B.addVarying("v_".concat(T),"float","a_".concat(T))}),A.attributes.forEach(function(T){B.addAttribute("float a_".concat(T))}),{builder:B,attributes:A.attributes.map(function(T){return{name:T,callback:function(F,M){var S=M[T];return typeof S=="string"&&(S=Y_(A,S)),S!==void 0?S:-9999999}}}),uniforms:O}}var Vot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Kot=function(r){Vot(e,r);function e(t){var n=this,i=ve({},t);return n=r.call(this,i)||this,n.parseResult_=jot(t.style),n.styleVariables_=t.style.variables||{},n.hitDetectionDisabled_=!!t.disableHitDetection,n}return e.prototype.createRenderer=function(){return new C8(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},e.prototype.updateStyleVariables=function(t){ve(this.styleVariables_,t),this.changed()},e}(Fh),zot=Kot;const Xot={extends:Oh,name:"ol-webglpoints-layer",setup(r){const e=Be("map"),{properties:t}=gr(r),n=fr(()=>new zot(t));return fe(t,()=>{n.value.setProperties(t)}),Je(()=>{e.addLayer(n.value)}),ar(()=>{e.removeLayer(n.value)}),Pr("webglPointsLayer",n),{webglPointsLayer:n}},props:{disableHitDetection:{type:Boolean,default:!1},style:{type:Object,default:()=>({symbol:{symbolType:"circle",size:8,color:"#33AAFF",opacity:.9}})}}};function Yot(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var Cx=ue(Xot,[["render",Yot]]),Wot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),vs={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},qot=["#00f","#0ff","#0f0","#ff0","#f00"],Zot=function(r){Wot(e,r);function e(t){var n=this,i=t||{},a=ve({},i);delete a.gradient,delete a.radius,delete a.blur,delete a.weight,n=r.call(this,a)||this,n.gradient_=null,n.addChangeListener(vs.GRADIENT,n.handleGradientChanged_),n.setGradient(i.gradient?i.gradient:qot),n.setBlur(i.blur!==void 0?i.blur:15),n.setRadius(i.radius!==void 0?i.radius:8);var o=i.weight?i.weight:"weight";return typeof o=="string"?n.weightFunction_=function(s){return s.get(o)}:n.weightFunction_=o,n.setRenderOrder(null),n}return e.prototype.getBlur=function(){return this.get(vs.BLUR)},e.prototype.getGradient=function(){return this.get(vs.GRADIENT)},e.prototype.getRadius=function(){return this.get(vs.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=Jot(this.getGradient())},e.prototype.setBlur=function(t){this.set(vs.BLUR,t)},e.prototype.setGradient=function(t){this.set(vs.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(vs.RADIUS,t)},e.prototype.createRenderer=function(){return new C8(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.weightFunction_(t);return n!==void 0?bn(n,0,1):1}.bind(this)}],vertexShader:`
precision mediump float;
uniform mat4 u_projectionMatrix;
uniform mat4 u_offsetScaleMatrix;
uniform float u_size;
attribute vec2 a_position;
attribute float a_index;
attribute float a_weight;
varying vec2 v_texCoord;
varying float v_weight;
void main(void) {
mat4 offsetMatrix = u_offsetScaleMatrix;
float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;
float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;
vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);
gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;
float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;
float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;
v_texCoord = vec2(u, v);
v_weight = a_weight;
}`,fragmentShader:`
precision mediump float;
uniform float u_blurSlope;
varying vec2 v_texCoord;
varying float v_weight;
void main(void) {
vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);
float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;
float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;
float alpha = smoothstep(0.0, 1.0, value) * v_weight;
gl_FragColor = vec4(alpha, alpha, alpha, alpha);
}`,hitVertexShader:`
precision mediump float;
uniform mat4 u_projectionMatrix;
uniform mat4 u_offsetScaleMatrix;
uniform float u_size;
attribute vec2 a_position;
attribute float a_index;
attribute float a_weight;
attribute vec4 a_hitColor;
varying vec2 v_texCoord;
varying float v_weight;
varying vec4 v_hitColor;
void main(void) {
mat4 offsetMatrix = u_offsetScaleMatrix;
float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;
float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;
vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);
gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;
float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;
float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;
v_texCoord = vec2(u, v);
v_hitColor = a_hitColor;
v_weight = a_weight;
}`,hitFragmentShader:`
precision mediump float;
uniform float u_blurSlope;
varying vec2 v_texCoord;
varying float v_weight;
varying vec4 v_hitColor;
void main(void) {
vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);
float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;
float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;
float alpha = smoothstep(0.0, 1.0, value) * v_weight;
if (alpha < 0.05) {
discard;
}
gl_FragColor = v_hitColor;
}`,uniforms:{u_size:function(){return(this.get(vs.RADIUS)+this.get(vs.BLUR))*2}.bind(this),u_blurSlope:function(){return this.get(vs.RADIUS)/Math.max(1,this.get(vs.BLUR))}.bind(this)},postProcesses:[{fragmentShader:`
precision mediump float;
uniform sampler2D u_image;
uniform sampler2D u_gradientTexture;
uniform float u_opacity;
varying vec2 v_texCoord;
void main() {
vec4 color = texture2D(u_image, v_texCoord);
gl_FragColor.a = color.a * u_opacity;
gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;
gl_FragColor.rgb *= gl_FragColor.a;
}`,uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},e.prototype.renderDeclutter=function(){},e}(dw);function Jot(r){for(var e=1,t=256,n=za(e,t),i=n.createLinearGradient(0,0,e,t),a=1/(r.length-1),o=0,s=r.length;o<s;++o)i.addColorStop(o*a,r[o]);return n.fillStyle=i,n.fillRect(0,0,e,t),n.canvas}var B8=Zot;const tst={extends:Oh,name:"ol-heatmap-layer",setup(r){const e=Be("map"),{properties:t}=gr(r),n=fr(()=>new B8(t));return fe(t,()=>{n.value.setProperties(t)}),Je(()=>{e.addLayer(n.value)}),ar(()=>{e.removeLayer(n.value)}),Pr("heatmapLayer",n),Pr("stylable",n),{heatmapLayer:n}},props:{weight:{type:Function},extent:{type:Array},blur:{type:Number},radius:{type:Number}}};function est(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var Bx=ue(tst,[["render",est]]);function q_(r){q_.installed||(q_.installed=!0,r.component(vx.name,vx),r.component(gx.name,gx),r.component(yx.name,yx),r.component(mx.name,mx),r.component(Ex.name,Ex),r.component(Cx.name,Cx),r.component(Bx.name,Bx))}var rst=Object.freeze(Object.defineProperty({__proto__:null,default:q_,install:q_,TileLayer:vx,WebGLTileLayer:gx,ImageLayer:yx,VectorLayer:mx,AnimatedClusterLayer:Ex,WebglPointsLayer:Cx,HeatmapLayer:Bx},Symbol.toStringTag,{value:"Module"}));const nst={name:"ol-source-xyz",setup(r){const e=Be("tileLayer"),{properties:t}=gr(r);let n=fr(()=>new g8(t));return fe(n,()=>{e.value.setSource(n.value)}),fe(e,()=>{e.value.setSource(n.value)}),Je(()=>{e.value.setSource(n.value)}),ar(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{attributions:{type:[String,Array]},url:{type:String},cacheSize:{type:Number,default:2048},crossOrigin:{type:String},maxZoom:{type:Number,default:28},minZoom:{type:Number,default:0},opaque:{type:Boolean},projection:{type:String,default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},tileSize:{type:Array,default:()=>[256,256]},tilePixelRatio:{type:Number,default:1},tileKey:{type:String},transition:{type:Number},tileGrid:{type:Object}}};function ist(r,e,t,n,i,a){return vr("",!0)}var Tx=ue(nst,[["render",ist]]);const ast={name:"ol-source-osm",setup(r){const e=Be("tileLayer"),{properties:t}=gr(r);let n=fr(()=>new bot(t));return fe(n,()=>{e.value.setSource(n.value)}),fe(e,()=>{e.value.setSource(n.value)}),Je(()=>{e.value.setSource(n.value)}),ar(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{attributions:{type:String},cacheSize:{type:Number,default:2048},crossOrigin:{type:String,default:"anonymous"},imageSmoothing:{type:Boolean,default:!0},minZoom:{type:Number,default:0},maxZoom:{type:Number,default:19},opaque:{type:Boolean,default:!0},reprojectionErrorThreshold:{type:Number,default:.5},transition:{type:Number,default:250},url:{type:String,default:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"},wrapX:{type:Boolean,default:!0}}};function ost(r,e,t,n,i,a){return vr("",!0)}var xx=ue(ast,[["render",ost]]);const sst={name:"ol-source-image-static",setup(r){const e=Be("imageLayer"),{properties:t}=gr(r),n=()=>new wot(Ms(Dn({},t),{projection:typeof t.projection=="string"?t.projection:new Bl(Dn({},t.projection))}));let i=n();return fe(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),Je(()=>{e.setSource(i)}),ar(()=>{e.setSource(null)}),{layer:e,source:i}},props:{attributions:{type:String},crossOrigin:{type:String},imageExtent:{type:Array},projection:{type:[String,Object]},imageSmoothing:{type:Boolean,default:!0},imageSize:{type:Array},url:{type:String}}};function Ast(r,e,t,n,i,a){return vr("",!0)}var Sx=ue(sst,[["render",Ast]]);const lst={name:"ol-source-wmts",setup(r){const e=Be("tileLayer"),{properties:t}=gr(r),n=fr(()=>Re(t.projection).getExtent()),i=fr(()=>Ns(n.value)),a=fr(()=>Or(n.value)/256),o=fr(()=>{const A=new Array(t.tileZoomLevel),l=new Array(t.tileZoomLevel);for(var u=0;u<t.tileZoomLevel;++u)A[u]=a.value/Math.pow(2,u),l[u]=u;return new _x({origin:i.value,resolutions:A,matrixIds:l})}),s=fr(()=>new E8(Ms(Dn({},t),{projection:typeof t.projection=="string"?t.projection:new Bl(Dn({},t.projection)),tileGrid:o.value})));return fe(s,()=>{e.value.setSource(s.value)}),fe(e,()=>{e.value.setSource(s.value)}),Je(()=>{e.value.setSource(s.value)}),ar(()=>{e.value.setSource(null)}),{tileLayer:e,source:s}},props:{tileZoomLevel:{type:Number,default:30},attributions:{type:String},cacheSize:{type:Number},crossOrigin:{type:String},imageSmoothing:{type:Boolean,default:!0},projection:{type:[String,Object],default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},tilePixelRatio:{type:Number,default:1},format:{type:String,default:"image/jpeg"},version:{type:String,default:"1.0.0"},matrixSet:{type:String},dimensions:{type:Object},requestEncoding:{type:String,default:"KVP"},url:{type:String},urls:{type:Array},wrapX:{type:Boolean,default:!1},transition:{type:Number},layer:{type:String},style:{type:String}}};function ust(r,e,t,n,i,a){return vr("",!0)}var bx=ue(lst,[["render",ust]]);const cst={name:"ol-source-vector",setup(r){const e=Be("vectorLayer")||Be("heatmapLayer"),{properties:t}=gr(r);let n=fr(()=>new Tl(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return fe(t,()=>{i()}),fe(e,()=>{i()}),Je(()=>{e.value.setSource(n.value)}),ar(()=>{e.value.setSource(null)}),Pr("vectorSource",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},features:{type:Array,default:()=>[]},format:{type:Object},loader:{type:Function},overlaps:{type:Boolean,default:!0},projection:{type:String,default:"EPSG:3857"},strategy:{type:Function},url:{type:[String,Function]},useSpatialIndex:{type:Boolean,default:!0},wrapX:{type:Boolean,default:!0}}};function hst(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var Fx=ue(cst,[["render",hst]]);const fst={name:"ol-source-cluster",setup(r){const e=Be("vectorLayer"),{properties:t}=gr(r);let n=fr(()=>new y8(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return fe(t,()=>{i()}),fe(e,()=>{i()}),Je(()=>{e.value.setSource(n.value),e.value.changed()}),ar(()=>{e.value.setSource(null)}),Pr("vectorLayer",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},distance:{type:Number,default:20},geometryFunction:{type:Function,default:r=>r.getGeometry()},wrapX:{type:Boolean,default:!0}}};function pst(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var Ix=ue(fst,[["render",pst]]);const dst={name:"ol-source-bingmaps",setup(r){const e=Be("tileLayer"),{properties:t}=gr(r);let n=fr(()=>new eot(Ms(Dn({},t),{key:t.apiKey})));return fe(n,()=>{e.value.setSource(n.value)}),fe(e,()=>{e.value.setSource(n.value)}),Je(()=>{e.value.setSource(n.value)}),ar(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{cacheSize:{type:Number},hidpi:{type:Boolean,default:!1},culture:{type:String,default:"en-us"},apiKey:{type:String},imagerySet:{type:String},imageSmoothing:{type:Boolean,default:!0},maxZoom:{type:Number,default:21},reprojectionErrorThreshold:{type:Number,default:.5},tileLoadFunction:{type:Function,default:(r,e)=>r.getImage().src=e},wrapX:{type:Boolean,default:!0},transition:{type:Number}}};function vst(r,e,t,n,i,a){return vr("",!0)}var Lx=ue(dst,[["render",vst]]);class WA extends E8{constructor(e){WA.layerLabelMap={vec:"cva",ter:"cta",img:"cia"},WA.layerZoomMap={vec:18,ter:14,img:18};let t=e||{};t.layerType=t.layerType||"vec",t.layerType=t.isLabel?WA.layerLabelMap[t.layerType]:t.layerType,t.matrixSet=t.projection==="EPSG:4326"||t.projection==="EPSG:4490"?"c":"w",!t.url&&!t.urls&&(t.url="https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),t.tk&&(t.url=`${t.url}tk=${t.tk}`),t.url=t.url.replace("{layer}",t.layerType).replace("{proj}",t.matrixSet);let n=t.tileGrid||WA.getTileGrid(t.projection||"EPSG:3857"),i=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",a={version:t.version||"1.0.0",format:t.format||"tiles",dimensions:t.dimensions||{},layer:t.layerType,matrixSet:t.matrixSet,tileGrid:n,style:t.style||"default",cacheSize:t.cacheSize,crossOrigin:i,opaque:t.opaque===void 0?!0:t.opaque,maxZoom:WA.layerZoomMap[t.layerType],reprojectionErrorThreshold:t.reprojectionErrorThreshold,url:t.url,urls:t.urls,projection:t.projection||"EPSG:3857",wrapX:t.wrapX};t.tileProxy&&(a.tileLoadFunction=s),super(a),t.tileProxy&&(this.tileProxy=t.tileProxy);let o=this;function s(A,l){A.getImage().src=o.tileProxy+encodeURIComponent(l)}}static getTileGrid(e){return e==="EPSG:4326"||e==="EPSG:4490"?WA.default4326TileGrid():WA.default3857TileGrid()}static default4326TileGrid(){let e=[],t=[];for(let i=1;i<19;i++)e.push(.703125*2/Math.pow(2,i)),t.push(i);return new _x({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}static default3857TileGrid(){let e=[],t=[];for(let i=1;i<19;i++)e.push(78271.51696402031*2/Math.pow(2,i)),t.push(i);return new _x({extent:[-200375083427892e-7,-200375083427892e-7,200375083427892e-7,200375083427892e-7],resolutions:e,matrixIds:t,origin:[-200375083427892e-7,200375083427892e-7],minZoom:1})}}const gst={name:"ol-source-tianditu",setup(r){const e=Be("tileLayer"),{properties:t}=gr(r);let n=fr(()=>new WA(t));return fe(n,()=>{e.value.setSource(n.value)}),fe(e,()=>{e.value.setSource(n.value)}),Je(()=>{e.value.setSource(n.value)}),ar(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{layerType:{type:String,default:"img"},tk:{type:String},isLabel:{type:Boolean,default:!1},cacheSize:{type:Number},crossOrigin:{type:String},projection:{Type:String,default:"EPSG:3857"},hidpi:{type:Boolean,default:!1},requestEncoding:{type:String,default:"KVP"},format:{type:String},version:{type:String,default:"1.0.0"},culture:{type:String,default:"en-us"},matrixSet:{type:String},dimensions:{type:Object,default:()=>{}},imageSmoothing:{type:Boolean,default:!0},maxZoom:{type:Number,default:21},reprojectionErrorThreshold:{type:Number},tileLoadFunction:{type:Function,default:(r,e)=>r.getImage().src=e},wrapX:{type:Boolean,default:!0},transition:{type:Number}}};function yst(r,e,t,n,i,a){return vr("",!0)}var Ox=ue(gst,[["render",yst]]);const mst={name:"ol-source-image-wms",setup(r){const e=Be("imageLayer"),{properties:t}=gr(r),n=()=>new Bot(Ms(Dn({},t),{params:{LAYERS:r.layers,STYLES:r.styles,TIME:r.time},projection:typeof t.projection=="string"?t.projection:new Bl(Dn({},t.projection))}));let i=n();return fe(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),Je(()=>{e.setSource(i)}),ar(()=>{e.setSource(null)}),{layer:e,source:i}},props:{attributions:{type:String},crossOrigin:{type:String},imageExtent:{type:Array},projection:{type:[String,Object],default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},format:{type:String,default:"image/png"},version:{type:String,default:"1.3.0"},matrixSet:{type:String},serverType:{type:String,default:"mapserver"},imageSmoothing:{type:Boolean,default:!0},layers:{type:[String,Array],required:!0},styles:{type:[String,Array],default:""},time:{type:String},ratio:{type:Number,default:1},imageSize:{type:Array},url:{type:String},params:{type:Object},imageLoadFunction:{type:Function}}};function _st(r,e,t,n,i,a){return vr("",!0)}var Rx=ue(mst,[["render",_st]]);const wst={name:"ol-source-webglpoints",setup(r){const e=Be("webglPointsLayer"),{properties:t}=gr(r);let n=fr(()=>new Tl(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return fe(t,()=>{i()}),fe(e,()=>{i()}),Je(()=>{e.value.setSource(n.value)}),ar(()=>{e.value.setSource(null)}),Pr("vectorSource",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},features:{type:Array,default:()=>[]},format:{type:Object},loader:{type:Function},overlaps:{type:Boolean,default:!0},projection:{type:String,default:"EPSG:3857"},strategy:{type:Function},url:{type:[String,Function]},useSpatialIndex:{type:Boolean,default:!0},wrapX:{type:Boolean,default:!0}}};function Est(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var Mx=ue(wst,[["render",Est]]);function Z_(r){Z_.installed||(Z_.installed=!0,r.component(Tx.name,Tx),r.component(xx.name,xx),r.component(Sx.name,Sx),r.component(bx.name,bx),r.component(Fx.name,Fx),r.component(Ix.name,Ix),r.component(Lx.name,Lx),r.component(Ox.name,Ox),r.component(Rx.name,Rx),r.component(Mx.name,Mx))}var Cst=Object.freeze(Object.defineProperty({__proto__:null,default:Z_,install:Z_,SourceXYZ:Tx,SourceOSM:xx,SourceImageStatic:Sx,SourceWMTS:bx,SourceVector:Fx,SourceCluster:Ix,SourceTianDiTu:Ox,SourceImageWMS:Rx,SourceWebglPoints:Mx,SourceBingMaps:Lx},Symbol.toStringTag,{value:"Module"}));function Hi(r,e,t){const n=Be("map"),i=Be("controlBar",null),a=i!=null?i.value:n,{properties:o}=gr(e);let s=fr(()=>new r(Dn({},o)));return s.value.set("order",t.attrs.order==null?0:t.attrs.order),fe(s,(A,l)=>{a.removeControl&&(a.removeControl(l),a.addControl(A),n.changed())}),Je(()=>{if(a.addControl(s.value),a.controls_!=null){let A=[...a.controls_];A.sort((l,u)=>l.get("order")-u.get("order")),a.controls_=[],A.forEach(l=>{a.addControl(l)}),a.changed()}n.changed()}),ar(()=>{if(a.removeControl)a.removeControl(s.value);else{let A=a.controls_.findIndex(l=>l==s.value);a.controls_.splice(A,1),s.value.dispose()}n.changed()}),{map:n,control:s}}const Bst={name:"ol-fullscreen-control",setup(r,e){const{control:t}=Hi(VW,r,e);return{control:t}},props:{className:{type:String,default:"ol-full-screen"},label:{type:String,default:"⤢"},labelActive:{type:String,default:"×"},activeClassName:{type:String,default:"ol-full-screen-true"},inactiveClassName:{type:String,default:"ol-full-screen-false"},tipLabel:{type:String,default:"Toggle full-screen"},keys:{type:Boolean,default:!1},target:{type:Object,default:void 0},source:{type:Object,default:void 0}}};function Tst(r,e,t,n,i,a){return vr("",!0)}var Nx=ue(Bst,[["render",Tst]]);const xst={name:"ol-mouseposition-control",setup(r,e){const{control:t}=Hi(XW,r,e);return{control:t}},props:{className:{type:String,default:"ol-mouse-position"},coordinateFormat:{type:[String,Function]},projection:{type:String},render:{type:Function},target:{type:HTMLElement},undefinedHTML:{type:String,default:"&#160;"}}};function Sst(r,e,t,n,i,a){return vr("",!0)}var Px=ue(xst,[["render",Sst]]);const bst={name:"ol-attribution-control",setup(r,e){const{control:t}=Hi(D6,r,e);return{control:t}},props:{className:{type:String,default:"ol-attribution"},target:{type:HTMLElement},collapsible:{type:Boolean},collapsed:{type:Boolean,default:!0},tipLabel:{type:String,default:"Attributions"},label:{type:String,default:"i"},expandClassName:{type:String,default:"ol-attribution-expand"},collapseLabel:{type:String,default:"»"},collapseClassName:{type:String,default:"ol-attribution-collapse"},render:{type:Function}}};function Fst(r,e,t,n,i,a){return vr("",!0)}var Ux=ue(bst,[["render",Fst]]);const Ist={name:"ol-overviewmap-control",setup(r,e){const t=Be("map"),{control:n}=Hi(JW,r,e);return Je(()=>{n.value.setMap(t)}),ar(()=>{n.value.setMap(null)}),Pr("overviewMap",n),{control:n}},props:{className:{type:String,default:"ol-overviewmap"},collapsed:{type:Boolean,default:!0},collapseLabel:{type:String,default:"«"},collapsible:{type:Boolean,default:!0},label:{type:String,default:"»"},render:{type:Function},rotateWithView:{type:Boolean,default:!1},target:{type:HTMLElement},tipLabel:{type:String,default:"Overview map"}}};function Lst(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var Dx=ue(Ist,[["render",Lst]]);const Ost={name:"ol-scaleline-control",setup(r,e){const{control:t}=Hi(nq,r,e);return{control:t}},props:{className:{type:String,default:"ol-scale-line"},minWidth:{type:Number,default:64},render:{type:Function},target:{type:HTMLElement},units:{type:String,default:"metric"},bar:{type:Boolean,default:!1},steps:{type:Number,default:4},text:{type:Boolean,default:!1},dpi:{type:Number,default:void 0}}};function Rst(r,e,t,n,i,a){return vr("",!0)}var Qx=ue(Ost,[["render",Rst]]);const Mst={name:"ol-zoom-control",setup(r,e){const{control:t}=Hi(H6,r,e);return{control:t}},props:{duration:{type:Number,default:250},className:{type:String,default:"ol-zoom"},zoomInClassName:{type:String,default:"ol-zoom-in"},zoomOutClassName:{type:String,default:"ol-zoom-out"},zoomInLabel:{type:String,default:"+"},zoomOutLabel:{type:String,default:"-"},zoomInTipLabel:{type:String,default:"Zoom in"},zoomOutTipLabel:{type:String,default:"Zoom Out"},delta:{type:Number,default:1},target:{type:HTMLElement}}};function Nst(r,e,t,n,i,a){return vr("",!0)}var Hx=ue(Mst,[["render",Nst]]);const Pst={name:"ol-zoomslider-control",setup(r,e){const{control:t}=Hi(oq,r,e);return{control:t}},props:{duration:{type:Number,default:200},className:{type:String,default:"ol-zoomslider"},render:{type:Function}}};function Ust(r,e,t,n,i,a){return vr("",!0)}var Gx=ue(Pst,[["render",Ust]]);const Dst={name:"ol-zoomtoextent-control",setup(r,e){const{control:t}=Hi(lq,r,e);return{control:t}},props:{className:{type:String,default:"ol-zoom-extent"},target:{type:HTMLElement},label:{type:String,default:"E"},tipLabel:{type:String,default:"Fit to extent"},extent:{type:Array}}};function Qst(r,e,t,n,i,a){return vr("",!0)}var kx=ue(Dst,[["render",Qst]]);const Hst={name:"ol-rotate-control",setup(r,e){const{control:t}=Hi(Q6,r,e);return{control:t}},props:{className:{type:String,default:"ol-rotate"},label:{type:String,default:"⇧"},tipLabel:{type:String,default:"Reset rotation"},compassClassName:{type:String,default:"ol-compass"},duration:{type:Number,default:250},autoHide:{type:Boolean,default:!1},render:{type:Function},resetNorth:{type:Function},target:{type:HTMLElement}}};function Gst(r,e,t,n,i,a){return vr("",!0)}var vN=ue(Hst,[["render",Gst]]),T8={exports:{}},kst=oot(MW);/*!
* ol-contextmenu - v4.1.0
* https://github.com/jonataswalker/ol-contextmenu
* Built: Sat Aug 15 2020 10:43:26 GMT-0300 (Brasilia Standard Time)
*/(function(r,e){(function(t,n){r.exports=n(kst)})(tA,function(t){function n(F){return F&&typeof F=="object"&&"default"in F?F:{default:F}}var i=n(t),a="ol-ctx-menu",o={namespace:a,container:a+"-container",separator:a+"-separator",submenu:a+"-submenu",hidden:a+"-hidden",icon:a+"-icon",zoomIn:a+"-zoom-in",zoomOut:a+"-zoom-out",unselectable:"ol-unselectable"},s=o,A="beforeopen",l="open",u="close",c="contextmenu",h={width:150,scrollAt:4,eventType:c,defaultItems:!0},f=[{text:"Zoom In",classname:o.zoomIn+" "+o.icon,callback:function(F,M){var S=M.getView();S.animate({zoom:+S.getZoom()+1,duration:700,center:F.coordinate})}},{text:"Zoom Out",classname:o.zoomOut+" "+o.icon,callback:function(F,M){var S=M.getView();S.animate({zoom:+S.getZoom()-1,duration:700,center:F.coordinate})}}];function p(F,M){if(M===void 0&&(M="Assertion failed"),!F)throw typeof Error<"u"?new Error(M):M}function v(F){return/^\d+$/.test(F)}function m(F,M){return F.classList?F.classList.contains(M):B(M).test(F.className)}function g(F,M,S){M===void 0&&(M=window.document);var x=Array.prototype.slice,N=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(F))switch(F[0]){case"#":N=[_(F.substr(1))];break;case".":N=x.call(M.getElementsByClassName(F.substr(1).replace(/\./g," ")));break;default:N=x.call(M.getElementsByTagName(F))}else N=x.call(M.querySelectorAll(F));return S?N:N[0]}function _(F){return F=F[0]==="#"?F.substr(1,F.length):F,document.getElementById(F)}function E(F){var M=document.createDocumentFragment(),S=document.createElement("div");for(S.innerHTML=F;S.firstChild;)M.appendChild(S.firstChild);return M}function B(F){return new RegExp("(^|\\s+) "+F+" (\\s+|$)")}function L(F,M,S){F.classList?F.classList.add(M):F.className=(F.className+" "+M).trim(),S&&v(S)&&window.setTimeout(function(){return O(F,M)},S)}function O(F,M,S){F.classList?F.classList.remove(M):F.className=F.className.replace(B(M)," ").trim(),S&&v(S)&&window.setTimeout(function(){return L(F,M)},S)}var b=function(F){return this.Base=F,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:F.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};b.prototype.init=function(F){this.map=F,this.viewport=F.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},b.prototype.getItemsLength=function(){var F=this,M=0;return Object.keys(this.items).forEach(function(S){F.items[S].submenu||F.items[S].separator||M++}),M},b.prototype.getPixelClicked=function(){return this.pixelClicked},b.prototype.getCoordinateClicked=function(){return this.coordinateClicked},b.prototype.positionContainer=function(F){var M=this,S=this.Base.container,x=this.map.getSize(),N=x[1]-F[1],P=x[0]-F[0],Y=S.offsetWidth,z=Math.round(this.lineHeight*this.getItemsLength()),tt=g("li."+s.submenu+">div",S,!0);P>=Y?(S.style.right="auto",S.style.left=F[0]+5+"px"):(S.style.left="auto",S.style.right="15px"),N>=z?(S.style.bottom="auto",S.style.top=F[1]-10+"px"):(S.style.top="auto",S.style.bottom=0),function J(nt,it,_t){if(Array.isArray(nt))nt.forEach(function(K){return J(K,it,_t)});else for(var R=Array.isArray(it)?it:it.split(/\s+/),$=R.length;$--;)m(nt,R[$])&&O(nt,R[$],_t)}(S,s.hidden),tt.length&&(this.submenu.lastLeft=P<2*Y?"-"+Y+"px":this.submenu.left,tt.forEach(function(J){var nt,it,_t,R={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},$=(it=(nt=J).getBoundingClientRect(),_t=document.documentElement,{left:it.left+window.pageXOffset-_t.clientLeft,top:it.top+window.pageYOffset-_t.clientTop,width:nt.offsetWidth,height:nt.offsetHeight}),K=$.height,q=N-K;q<0&&(q=K-(R.h-$.top),J.style.top="-"+q+"px"),J.style.left=M.submenu.lastLeft}))},b.prototype.openMenu=function(F,M){this.Base.dispatchEvent({type:l,pixel:F,coordinate:M}),this.opened=!0,this.positionContainer(F)},b.prototype.closeMenu=function(){this.opened=!1,function F(M,S,x){if(Array.isArray(M))M.forEach(function(Y){return F(Y,S)});else for(var N=Array.isArray(S)?S:S.split(/\s+/),P=N.length;P--;)m(M,N[P])||L(M,N[P],x)}(this.Base.container,s.hidden),this.Base.dispatchEvent({type:u})},b.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},b.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},b.prototype.handleEvent=function(F){var M=this;this.coordinateClicked=this.map.getEventCoordinate(F),this.pixelClicked=this.map.getEventPixel(F),this.Base.dispatchEvent({type:A,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===c&&(F.stopPropagation(),F.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),F.target.addEventListener("pointerdown",{handleEvent:function(S){M.opened&&(M.closeMenu(),S.stopPropagation(),F.target.removeEventListener(S.type,this,!1))}},!1))},b.prototype.handleMapMoveEvent=function(F){this.closeMenu()},b.prototype.setItemListener=function(F,M){var S,x=this;F&&typeof this.items[M].callback=="function"&&(S=this.items[M].callback,F.addEventListener("click",function(N){N.preventDefault();var P={coordinate:x.getCoordinateClicked(),data:x.items[M].data||null};x.closeMenu(),S(P,x.map)},!1))};var T=function(F){return this.Base=F,this.Base.container=this.container=this.createContainer(!0),this};return T.prototype.createContainer=function(F){var M=document.createElement("div"),S=document.createElement("ul"),x=[s.container,s.unselectable];return F&&x.push(s.hidden),M.className=x.join(" "),M.style.width=parseInt(this.Base.options.width,10)+"px",M.appendChild(S),M},T.prototype.createMenu=function(){var F=[];if("items"in this.Base.options?F=this.Base.options.defaultItems?this.Base.options.items.concat(f):this.Base.options.items:this.Base.options.defaultItems&&(F=f),F.length===0)return!1;F.forEach(this.addMenuEntry,this)},T.prototype.addMenuEntry=function(F){var M,S=this;if(F.items&&Array.isArray(F.items)){F.classname=F.classname||"",M=s.submenu,~F.classname.indexOf(M)||(F.classname=F.classname.length?" "+s.submenu:s.submenu);var x=this.generateHtmlAndPublish(this.container,F),N=this.createContainer();N.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,x.appendChild(N),F.items.forEach(function(P){S.generateHtmlAndPublish(N,P,!0)})}else this.generateHtmlAndPublish(this.container,F)},T.prototype.generateHtmlAndPublish=function(F,M,S){var x,N,P="_"+Math.random().toString(36).substr(2,9),Y=!1;return typeof M=="string"&&M.trim()==="-"?(x=E('<li id="'+P+'" class="'+s.separator+'"><hr></li>'),N=[].slice.call(x.childNodes,0)[0],F.firstChild.appendChild(x),Y=!0):(M.classname=M.classname||"",x=E("<span>"+M.text+"</span>"),N=document.createElement("li"),M.icon&&(M.classname===""?M.classname=s.icon:M.classname.indexOf(s.icon)===-1&&(M.classname+=" "+s.icon),N.setAttribute("style","background-image:url("+M.icon+")")),N.id=P,N.className=M.classname,N.appendChild(x),F.firstChild.appendChild(N)),this.Base.Internal.items[P]={id:P,submenu:S||0,separator:Y,callback:M.callback,data:M.data||null},this.Base.Internal.setItemListener(N,P),N},T.prototype.removeMenuEntry=function(F){var M=g("#"+F,this.container.firstChild);M&&this.container.firstChild.removeChild(M),delete this.Base.Internal.items[F]},T.prototype.cloneAndGetLineHeight=function(){var F=this.container.cloneNode(),M=E("<span>Foo</span>"),S=E("<span>Foo</span>"),x=document.createElement("li"),N=document.createElement("li");x.appendChild(M),N.appendChild(S),F.appendChild(x),F.appendChild(N),this.container.parentNode.appendChild(F);var P=F.offsetHeight/2;return this.container.parentNode.removeChild(F),P},function(F){function M(S){S===void 0&&(S={}),p(typeof S=="object","@param `opt_options` should be object type!"),this.options=function(x,N){var P={};for(var Y in x)P[Y]=x[Y];for(var z in N)P[z]=N[z];return P}(h,S),this.disabled=!1,this.Internal=new b(this),this.Html=new T(this),F.call(this,{element:this.container})}return F&&(M.__proto__=F),M.prototype=Object.create(F&&F.prototype),M.prototype.constructor=M,M.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},M.prototype.close=function(){this.Internal.closeMenu()},M.prototype.enable=function(){this.disabled=!1},M.prototype.disable=function(){this.disabled=!0},M.prototype.getDefaultItems=function(){return f},M.prototype.countItems=function(){return Object.keys(this.Internal.items).length},M.prototype.extend=function(S){p(Array.isArray(S),"@param `arr` should be an Array."),S.forEach(this.push,this)},M.prototype.isOpen=function(){return this.Internal.opened},M.prototype.updatePosition=function(S){p(Array.isArray(S),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(S)},M.prototype.pop=function(){var S=Object.keys(this.Internal.items);this.Html.removeMenuEntry(S[S.length-1])},M.prototype.push=function(S){p(S!=null,"@param `item` must be informed."),this.Html.addMenuEntry(S)},M.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},M.prototype.setMap=function(S){F.prototype.setMap.call(this,S),S?this.Internal.init(S,this):this.Internal.removeListeners()},M}(i.default)})})(T8);var $st=T8.exports;const jst={name:"ol-context-menu",setup(r,e){const{control:t}=Hi($st,r,e);return{control:t}},props:{eventType:{type:String,default:"contextmenu"},defaultItems:{type:Boolean,default:!0},width:{type:Number,default:150},items:{type:Array,default:()=>[]}}};function Vst(r,e,t,n,i,a){return vr("",!0)}var $x=ue(jst,[["render",Vst]]),yo=function(r){r=r||{};var e=document.createElement("button"),t=document.createElement("div");t.className=(r.className||"ol-swipe")+" ol-unselectable ol-control",t.appendChild(e),t.addEventListener("mousedown",this.move.bind(this)),t.addEventListener("touchstart",this.move.bind(this)),wr.call(this,{element:t}),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],r.layers&&this.addLayer(r.layers,!1),r.rightLayers&&this.addLayer(r.rightLayers,!0),this.on("propertychange",function(n){if(this.getMap())try{this.getMap().renderSync()}catch{}this.get("orientation")==="horizontal"?(this.element.style.top=this.get("position")*100+"%",this.element.style.left=""):(this.get("orientation")!=="vertical"&&this.set("orientation","vertical"),this.element.style.left=this.get("position")*100+"%",this.element.style.top=""),n.key==="orientation"&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach(function(i){i.layer.getImageRatio&&i.layer.changed()})}.bind(this)),this.set("position",r.position||.5),this.set("orientation",r.orientation||"vertical")};Br(yo,wr);yo.prototype.setMap=function(r){var e,t;if(this.getMap()){for(e=0;e<this.layers.length;e++)t=this.layers[e],t.right?t.layer.un(["precompose","prerender"],this.precomposeRight_):t.layer.un(["precompose","prerender"],this.precomposeLeft_),t.layer.un(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch{}}if(wr.prototype.setMap.call(this,r),r){for(this._listener=[],e=0;e<this.layers.length;e++)t=this.layers[e],t.right?t.layer.on(["precompose","prerender"],this.precomposeRight_):t.layer.on(["precompose","prerender"],this.precomposeLeft_),t.layer.on(["postcompose","postrender"],this.postcompose_);try{r.renderSync()}catch{}}};yo.prototype.isLayer_=function(r){for(var e=0;e<this.layers.length;e++)if(this.layers[e].layer===r)return e;return-1};yo.prototype.addLayer=function(r,e){r instanceof Array||(r=[r]);for(var t=0;t<r.length;t++){var n=r[t];if(this.isLayer_(n)<0&&(this.layers.push({layer:n,right:e}),this.getMap())){e?n.on(["precompose","prerender"],this.precomposeRight_):n.on(["precompose","prerender"],this.precomposeLeft_),n.on(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch{}}}};yo.prototype.removeLayers=function(){var r=[];this.layers.forEach(function(e){r.push(e.layer)}),this.removeLayer(r)};yo.prototype.removeLayer=function(r){r instanceof Array||(r=[r]);for(var e=0;e<r.length;e++){var t=this.isLayer_(r[e]);t>=0&&this.getMap()&&(this.layers[t].right?r[e].un(["precompose","prerender"],this.precomposeRight_):r[e].un(["precompose","prerender"],this.precomposeLeft_),r[e].un(["postcompose","postrender"],this.postcompose_),this.layers.splice(t,1))}if(this.getMap())try{this.getMap().renderSync()}catch{}};yo.prototype.getRectangle=function(){var r;return this.get("orientation")==="vertical"?(r=this.getMap().getSize(),[0,0,r[0]*this.get("position"),r[1]]):(r=this.getMap().getSize(),[0,0,r[0],r[1]*this.get("position")])};yo.prototype.move=function(r){var e=this,t;switch(this._movefn||(this._movefn=this.move.bind(this)),r.type){case"touchcancel":case"touchend":case"mouseup":{e.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(s){document.removeEventListener(s,e._movefn)}),this.layers.forEach(function(s){s.layer.getImageRatio&&s.layer.changed()});break}case"mousedown":case"touchstart":e.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(s){document.addEventListener(s,e._movefn)});case"mousemove":case"touchmove":{if(e.isMoving)if(e.get("orientation")==="vertical"){var n=r.pageX||r.touches&&r.touches.length&&r.touches[0].pageX||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageX;if(!n)break;n-=e.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft,t=e.getMap().getSize()[0];var i=t-Math.min(Math.max(0,t-n),t);t=i/t,e.set("position",t),e.dispatchEvent({type:"moving",size:[i,e.getMap().getSize()[1]],position:[t,0]})}else{var a=r.pageY||r.touches&&r.touches.length&&r.touches[0].pageY||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageY;if(!a)break;a-=e.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop,t=e.getMap().getSize()[1];var o=t-Math.min(Math.max(0,t-a),t);t=o/t,e.set("position",t),e.dispatchEvent({type:"moving",size:[e.getMap().getSize()[0],o],position:[0,t]})}break}}};yo.prototype._transformPt=function(r,e){var t=r.inversePixelTransform,n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e};yo.prototype._drawRect=function(r,e){var t=r.inversePixelTransform;if(t){var n=[[e[0][0],e[0][1]],[e[0][0],e[1][1]],[e[1][0],e[1][1]],[e[1][0],e[0][1]],[e[0][0],e[0][1]]];if(r.context.save(),r.target.getImageRatio){var i=-Math.atan2(r.frameState.pixelToCoordinateTransform[1],r.frameState.pixelToCoordinateTransform[0]);r.context.translate(r.frameState.size[0]/2,r.frameState.size[1]/2),r.context.rotate(i),r.context.translate(-r.frameState.size[0]/2,-r.frameState.size[1]/2)}n.forEach(function(o,s){o=[o[0]*t[0]-o[1]*t[1]+t[4],-o[0]*t[2]+o[1]*t[3]+t[5]],s?r.context.lineTo(o[0],o[1]):r.context.moveTo(o[0],o[1])}),r.context.restore()}else{var a=r.frameState.pixelRatio;r.context.rect(e[0][0]*a,e[0][1]*a,e[1][0]*a,e[1][1]*a)}};yo.prototype.precomposeLeft=function(r){var e=r.context;if(e instanceof WebGLRenderingContext){if(r.type==="prerender"){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var t=this.getMap().getSize(),n=this._transformPt(r,[0,t[1]]),i=this._transformPt(r,[t[0],0]),a=i[0]-n[0],o=i[1]-n[1];this.get("orientation")==="vertical"?a=Math.round(a*this.get("position")):(o=Math.round(o*this.get("position")),n[1]+=t[1]-o),e.scissor(n[0],n[1],a,o)}}else{var s=r.frameState.size;e.save(),e.beginPath();var A=[[0,0],[s[0],s[1]]];this.get("orientation")==="vertical"?A[1]=[s[0]*.5+this.getMap().getSize()[0]*(this.get("position")-.5),s[1]]:A[1]=[s[0],s[1]*.5+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(r,A),e.clip()}};yo.prototype.precomposeRight=function(r){var e=r.context;if(e instanceof WebGLRenderingContext){if(r.type==="prerender"){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var t=this.getMap().getSize(),n=this._transformPt(r,[0,t[1]]),i=this._transformPt(r,[t[0],0]),a=i[0]-n[0],o=i[1]-n[1];this.get("orientation")==="vertical"?(a=Math.round(a*(1-this.get("position"))),n[0]+=t[0]-a):o=Math.round(o*(1-this.get("position"))),e.scissor(n[0],n[1],a,o)}}else{var s=r.frameState.size;e.save(),e.beginPath();var A=[[0,0],[s[0],s[1]]];this.get("orientation")==="vertical"?A[0]=[s[0]*.5+this.getMap().getSize()[0]*(this.get("position")-.5),0]:A[0]=[0,s[1]*.5+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(r,A),e.clip()}};yo.prototype.postcompose=function(r){if(r.context instanceof WebGLRenderingContext){if(r.type==="postrender"){var e=r.context;e.disable(e.SCISSOR_TEST)}}else r.target.getClassName&&r.target.getClassName()!=="ol-layer"&&r.target.get("declutter")?setTimeout(function(){r.context.restore()},0):r.context.restore()};const Kst={name:"ol-swipe-control",setup(r,e){const{control:t}=Hi(yo,r,e),{layerList:n}=Nu(r);return n.value.forEach((i,a)=>{t.value.addLayer(i,a==1)}),{control:t}},props:{layerList:{type:Array},className:{type:String,default:"ol-swipe"},position:{type:Number,default:.5},orientation:{type:String,default:"vertical"}}};function zst(r,e,t,n,i,a){return vr("",!0)}var jx=ue(Kst,[["render",zst]]),Qo=function(r){r||(r={});var e=document.createElement("div");if(e.classList.add("ol-unselectable","ol-control","ol-bar"),r.className){var t=r.className.split(" ").filter(function(i){return i.length>0});e.classList.add.apply(e.classList,t)}if(r.group&&e.classList.add("ol-group"),wr.call(this,{element:e,target:r.target}),this.set("toggleOne",r.toggleOne),this.set("autoDeactivate",r.autoDeactivate),this.controls_=[],r.controls instanceof Array)for(var n=0;n<r.controls.length;n++)this.addControl(r.controls[n])};Br(Qo,wr);Qo.prototype.setVisible=function(r){r?this.element.style.display="":this.element.style.display="none"};Qo.prototype.getVisible=function(){return this.element.style.display!="none"};Qo.prototype.setMap=function(r){wr.prototype.setMap.call(this,r);for(var e=0;e<this.controls_.length;e++){var t=this.controls_[e];t.setMap(r)}};Qo.prototype.getControls=function(){return this.controls_};Qo.prototype.setPosition=function(r){this.element.classList.remove("ol-left","ol-top","ol-bottom","ol-right"),r=r.split("-");for(var e=0;e<r.length;e++)switch(r[e]){case"top":case"left":case"bottom":case"right":this.element.classList.add("ol-"+r[e]);break}};Qo.prototype.addControl=function(r){this.controls_.push(r),r.setTarget(this.element),this.getMap()&&this.getMap().addControl(r),r.on("change:active",function(e){this.onActivateControl_(e,r)}.bind(this)),r.getActive&&this.onActivateControl_({target:r,active:r.getActive()},r)};Qo.prototype.deactivateControls=function(r){for(var e=0;e<this.controls_.length;e++)this.controls_[e]!==r&&this.controls_[e].setActive&&this.controls_[e].setActive(!1)};Qo.prototype.getActiveControls=function(){for(var r=[],e=0,t;t=this.controls_[e];e++)t.getActive&&t.getActive()&&r.push(t);return r};Qo.prototype.setActive=function(r){if(!r&&this.get("autoDeactivate")&&this.deactivateControls(),r)for(var e=this.getControls(),t=0,n;n=e[t];t++)n.get("autoActivate")&&n.setActive(!0)};Qo.prototype.onActivateControl_=function(r,e){if(this.get("toggleOne")){if(r.active){var t;for(t=0;t<this.controls_.length&&this.controls_[t]!==e;t++);if(t==this.controls_.length)return;this.deactivateControls(this.controls_[t])}else if(!this.getActiveControls().length){for(var n=0,i;i=this.controls_[n];n++)if(i.get("autoActivate")){i.setActive(!0);break}}}};Qo.prototype.getControlsByName=function(r){var e=this.getControls();return e.filter(function(t){return t.get("name")===r})};const Xst={name:"ol-control-bar",setup(r,e){const{control:t}=Hi(Qo,r,e);return Pr("controlBar",t),{control:t}},props:{toggleOne:{type:Boolean,default:!0},group:{type:Boolean,default:!0}}};function Yst(r,e,t,n,i,a){return _r(r.$slots,"default")}var Vx=ue(Xst,[["render",Yst]]);window.ol&&(ol.ext.input={});var Mh=function(r){r=r||{},ui.call(this);var e=this.input=r.input;e||(e=this.input=document.createElement("INPUT"),r.type&&e.setAttribute("type",r.type),r.min!==void 0&&e.setAttribute("min",r.min),r.max!==void 0&&e.setAttribute("max",r.max),r.step!==void 0&&e.setAttribute("step",r.step),r.parent&&r.parent.appendChild(e)),r.disabled&&(e.disabled=!0),r.checked!==void 0&&(e.checked=!!r.checked),r.val!==void 0&&(e.value=r.val),r.hidden&&(e.style.display="none"),e.addEventListener("focus",function(){this.element&&this.element.classList.add("ol-focus")}.bind(this));var t;e.addEventListener("focusout",function(){this.element&&(t&&clearTimeout(t),t=setTimeout(function(){this.element.classList.remove("ol-focus")}.bind(this),0))}.bind(this))};Br(Mh,ui);Mh.prototype._listenDrag=function(r,e){var t=function(n){this.moving=!0;var i=function(a){a.type==="pointerup"&&(document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",i),document.removeEventListener("pointercancel",i),setTimeout(function(){this.moving=!1}.bind(this))),a.target===r&&e(a),a.stopPropagation(),a.preventDefault()}.bind(this);document.addEventListener("pointermove",i,!1),document.addEventListener("pointerup",i,!1),document.addEventListener("pointercancel",i,!1),n.stopPropagation(),n.preventDefault()}.bind(this);r.addEventListener("mousedown",t,!1),r.addEventListener("touchstart",t,!1)};Mh.prototype.setValue=function(r){r!==void 0&&(this.input.value=r),this.input.dispatchEvent(new Event("change"))};Mh.prototype.getValue=function(){return this.input.value};Mh.prototype.getInputElement=function(){return this.input};var Nh=function(r){r=r||{},Mh.call(this,r);var e=this.element=document.createElement("LABEL");r.html instanceof Element?e.appendChild(r.html):r.html!==void 0&&(e.innerHTML=r.html),e.className=("ol-ext-check ol-ext-checkbox "+(r.className||"")).trim(),this.input.parentNode&&this.input.parentNode.insertBefore(e,this.input),e.appendChild(this.input),e.appendChild(document.createElement("SPAN")),r.after&&e.appendChild(document.createTextNode(r.after)),this.input.addEventListener("change",function(){this.dispatchEvent({type:"check",checked:this.input.checked,value:this.input.value})}.bind(this))};Br(Nh,Mh);Nh.prototype.isChecked=function(){return this.input.checked};var x8=function(r){r=r||{},Nh.call(this,r),this.element.className=("ol-ext-toggle-switch "+(r.className||"")).trim()};Br(x8,Nh);var S8=function(r){r=r||{},Nh.call(this,r),this.element.className=("ol-ext-check ol-ext-radio "+(r.className||"")).trim()};Br(S8,Nh);var ct={};ct.create=function(r,e){e=e||{};var t;if(r==="TEXT")t=document.createTextNode(e.html||""),e.parent&&e.parent.appendChild(t);else{t=document.createElement(r),/button/i.test(r)&&t.setAttribute("type","button");for(var n in e)switch(n){case"className":{e.className&&e.className.trim&&t.setAttribute("class",e.className.trim());break}case"text":{t.innerText=e.text;break}case"html":{e.html instanceof Element?t.appendChild(e.html):e.html!==void 0&&(t.innerHTML=e.html);break}case"parent":{e.parent&&e.parent.appendChild(t);break}case"options":{if(/select/i.test(r))for(var i in e.options)ct.create("OPTION",{html:i,value:e.options[i],parent:t});break}case"style":{this.setStyle(t,e.style);break}case"change":case"click":{ct.addListener(t,n,e[n]);break}case"on":{for(var a in e.on)ct.addListener(t,a,e.on[a]);break}case"checked":{t.checked=!!e.checked;break}default:{t.setAttribute(n,e[n]);break}}}return t};ct.createSwitch=function(r){var e=ct.create("INPUT",{type:"checkbox",on:r.on,click:r.click,change:r.change,parent:r.parent}),t=Object.assign({input:e},r||{});return new x8(t),e};ct.createCheck=function(r){var e=ct.create("INPUT",{name:r.name,type:r.type==="radio"?"radio":"checkbox",on:r.on,parent:r.parent});console.log(e);var t=Object.assign({input:e},r||{});return r.type==="radio"?new S8(t):new Nh(t),e};ct.setHTML=function(r,e){e instanceof Element?r.appendChild(e):e!==void 0&&(r.innerHTML=e)};ct.appendText=function(r,e){r.appendChild(document.createTextNode(e||""))};ct.addListener=function(r,e,t,n){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(i){r.addEventListener(i,t,n)})};ct.removeListener=function(r,e,t){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(n){r.removeEventListener(n,t)})};ct.show=function(r){r.style.display=""};ct.hide=function(r){r.style.display="none"};ct.hidden=function(r){return ct.getStyle(r,"display")==="none"};ct.toggle=function(r){r.style.display=r.style.display==="none"?"":"none"};ct.setStyle=function(r,e){for(var t in e)switch(t){case"top":case"left":case"bottom":case"right":case"minWidth":case"maxWidth":case"width":case"height":{typeof e[t]=="number"?r.style[t]=e[t]+"px":r.style[t]=e[t];break}default:r.style[t]=e[t]}};ct.getStyle=function(r,e){var t,n=(r.ownerDocument||document).defaultView;if(n&&n.getComputedStyle)e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),t=n.getComputedStyle(r,null).getPropertyValue(e);else if(r.currentStyle&&(e=e.replace(/-(\w)/g,function(i,a){return a.toUpperCase()}),t=r.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(t)))return function(i){var a=r.style.left,o=r.runtimeStyle.left;return r.runtimeStyle.left=r.currentStyle.left,r.style.left=i||0,i=r.style.pixelLeft+"px",r.style.left=a,r.runtimeStyle.left=o,i}(t);return/px$/.test(t)?parseInt(t):t};ct.outerHeight=function(r){return r.offsetHeight+ct.getStyle(r,"marginBottom")};ct.outerWidth=function(r){return r.offsetWidth+ct.getStyle(r,"marginLeft")};ct.offsetRect=function(r){var e=r.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),height:e.height||e.bottom-e.top,width:e.width||e.right-e.left}};ct.getFixedOffset=function(r){var e={left:0,top:0},t=function(n){if(!n)return e;if(ct.getStyle(n,"position")==="absolute"&&ct.getStyle(n,"transform")!=="none"){var i=n.getBoundingClientRect();return e.left+=i.left,e.top+=i.top,e}return t(n.offsetParent)};return t(r.offsetParent)};ct.positionRect=function(r,e){var t=0,n=0,i=function(a){if(a)return t+=a.offsetLeft,n+=a.offsetTop,i(a.offsetParent);var o={top:r.offsetTop+n,left:r.offsetLeft+t};return e&&(o.top-=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o.left-=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),o.bottom=o.top+r.offsetHeight,o.right=o.top+r.offsetWidth,o};return i(r.offsetParent)};ct.scrollDiv=function(r,e){e=e||{};var t=!1,n=0,i,a=0,o=typeof e.onmove=="function"?e.onmove:function(){},s=e.vertical?"screenY":"screenX",A=e.vertical?"scrollTop":"scrollLeft",l=!1,u,c,h=0,f=function(){E&&(h++,setTimeout(p))},p=function(){if(E){if(h--,h)return;var b=r.clientHeight,T=r.scrollHeight;u=b/T,E.style.height=u*100+"%",E.style.top=r.scrollTop/T*100+"%",_.style.height=b+"px",b>T-.5?_.classList.add("ol-100pc"):_.classList.remove("ol-100pc")}},v=function(b){b.target.classList.contains("ol-noscroll")||(l=!1,t=b[s],a=new Date,r.classList.add("ol-move"),b.preventDefault(),window.addEventListener("pointermove",m),ct.addListener(window,["pointerup","pointercancel"],L))},m=function(b){if(l=!0,t!==!1){var T=(c?-1/u:1)*(t-b[s]);r[A]+=T,i=new Date,i-a&&(n=(n+T/(i-a))/2),t=b[s],a=i,T&&o(!0)}},g=function(b){var T=b>0?Math.min(100,b/2):Math.max(-100,b/2);b-=T,r[A]+=T,-1<b&&b<1?(l?setTimeout(function(){r.classList.remove("ol-move")}):r.classList.remove("ol-move"),l=!1,o(!1)):setTimeout(function(){g(b)},40)},_,E;if(e.vertical&&e.minibar){var B=function(b){r.removeEventListener("pointermove",B),r.parentNode.classList.add("ol-miniscroll"),E=ct.create("DIV"),_=ct.create("DIV",{className:"ol-scroll",html:E}),r.parentNode.insertBefore(_,r),E.addEventListener("pointerdown",function(T){c=!0,v(T)}),e.mousewheel&&(ct.addListener(_,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){O(T)}),ct.addListener(E,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){O(T)})),r.parentNode.addEventListener("pointerenter",f),window.addEventListener("resize",f),b!==!1&&f()};r.parentNode?B(!1):r.addEventListener("pointermove",B),r.addEventListener("scroll",function(){f()})}r.style["touch-action"]="none",r.style.overflow="hidden",r.classList.add("ol-scrolldiv"),ct.addListener(r,["pointerdown"],function(b){c=!1,v(b)}),r.addEventListener("click",function(b){r.classList.contains("ol-move")&&(b.preventDefault(),b.stopPropagation())},!0);var L=function(b){a=new Date-a,a>100||c?n=0:a>0&&(n=((n||0)+(t-b[s])/a)/2),g(e.animate===!1?0:n*200),t=!1,n=0,a=0,r.classList.contains("ol-move")?r.classList.remove("ol-hasClick"):(r.classList.add("ol-hasClick"),setTimeout(function(){r.classList.remove("ol-hasClick")},500)),c=!1,window.removeEventListener("pointermove",m),ct.removeListener(window,["pointerup","pointercancel"],L)},O=function(b){var T=Math.max(-1,Math.min(1,b.wheelDelta||-b.detail));return r.classList.add("ol-move"),r[A]-=T*30,r.classList.remove("ol-move"),!1};return e.mousewheel&&ct.addListener(r,["mousewheel","DOMMouseScroll","onmousewheel"],O),{refresh:f}};ct.dispatchEvent=function(r,e){var t;try{t=new CustomEvent(r)}catch{t=document.createEvent("CustomEvent"),t.initCustomEvent(r,!0,!0,{})}e.dispatchEvent(t)};var Sl=function(r){r=r||{};var e=document.createElement("div");e.className=(r.className||"")+" ol-button ol-unselectable ol-control";var t=this,n=this.button_=document.createElement(/ol-text-button/.test(r.className)?"div":"button");n.type="button",r.title&&(n.title=r.title),r.name&&(n.name=r.name),r.html instanceof Element?n.appendChild(r.html):n.innerHTML=r.html||"";var i=function(a){a&&a.preventDefault&&(a.preventDefault(),a.stopPropagation()),r.handleClick&&r.handleClick.call(t,a)};n.addEventListener("click",i),e.appendChild(n),!r.title&&n.firstElementChild&&(n.title=n.firstElementChild.title),wr.call(this,{element:e,target:r.target}),r.title&&this.set("title",r.title),r.title&&this.set("title",r.title),r.name&&this.set("name",r.name)};Br(Sl,wr);Sl.prototype.setVisible=function(r){r?ct.show(this.element):ct.hide(this.element)};Sl.prototype.setTitle=function(r){this.button_.setAttribute("title",r)};Sl.prototype.setHtml=function(r){ct.setHTML(this.button_,r)};Sl.prototype.getButtonElement=function(){return this.button_};var is=function(r){r=r||{};var e=this;this.interaction_=r.interaction,this.interaction_&&(this.interaction_.setActive(r.active),this.interaction_.on("change:active",function(){e.setActive(e.interaction_.getActive())})),r.toggleFn&&(r.onToggle=r.toggleFn),r.handleClick=function(){e.toggle(),r.onToggle&&r.onToggle.call(e,e.getActive())},r.className=(r.className||"")+" ol-toggle",Sl.call(this,r),this.set("title",r.title),this.set("autoActivate",r.autoActivate),r.bar&&this.setSubBar(r.bar),this.setActive(r.active),this.setDisable(r.disable)};Br(is,Sl);is.prototype.setMap=function(r){!r&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),Sl.prototype.setMap.call(this,r),r&&(this.interaction_&&r.addInteraction(this.interaction_),this.subbar_&&r.addControl(this.subbar_))};is.prototype.getSubBar=function(){return this.subbar_};is.prototype.setSubBar=function(r){var e=this.getMap();e&&this.subbar_&&e.removeControl(this.subbar_),this.subbar_=r,r&&(this.subbar_.setTarget(this.element),this.subbar_.element.classList.add("ol-option-bar"),e&&e.addControl(this.subbar_))};is.prototype.getDisable=function(){var r=this.element.querySelector("button");return r&&r.disabled};is.prototype.setDisable=function(r){this.getDisable()!=r&&(this.element.querySelector("button").disabled=r,r&&this.getActive()&&this.setActive(!1),this.dispatchEvent({type:"change:disable",key:"disable",oldValue:!r,disable:r}))};is.prototype.getActive=function(){return this.element.classList.contains("ol-active")};is.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)};is.prototype.setActive=function(r){this.interaction_&&this.interaction_.setActive(r),this.subbar_&&this.subbar_.setActive(r),this.getActive()!==r&&(r?this.element.classList.add("ol-active"):this.element.classList.remove("ol-active"),this.dispatchEvent({type:"change:active",key:"active",oldValue:!r,active:r}))};is.prototype.setInteraction=function(r){this.interaction_=r};is.prototype.getInteraction=function(){return this.interaction_};const Wst={name:"ol-control-toggle",setup(r,e){const{control:t}=Hi(is,r,e);return{control:t}},props:{html:{type:String},interaction:{type:Object},className:{type:String},title:{type:String},onToggle:{type:Function}}};function qst(r,e,t,n,i,a){return vr("",!0)}var Kx=ue(Wst,[["render",qst]]);const Zst={name:"ol-control-button",setup(r,e){const{control:t}=Hi(Sl,r,e);return{control:t}},props:{html:{type:String},name:{type:String},className:{type:String},title:{type:String},handleClick:{type:Function}}};function Jst(r,e,t,n,i,a){return vr("",!0)}var zx=ue(Zst,[["render",Jst]]),La=function(r){r=r||{},r.fullscreen&&(r.target=document.body);var e=ct.create("DIV",{className:((r.className||"")+(r.zoom?" ol-zoom":"")+" ol-ext-dialog").trim(),click:function(i){this.get("hideOnBack")&&i.target===e&&this.close(),this.get("hideOnClick")&&this.close()}.bind(this)}),t=ct.create("FORM",{on:{submit:this._onButton("submit")},parent:e});ct.create("H2",{parent:t}),ct.create("DIV",{className:"ol-closebox",click:this._onButton("cancel"),parent:t}),ct.create("DIV",{className:"ol-content",parent:t}),this._progress=ct.create("DIV",{style:{display:"none"},parent:t});var n=ct.create("DIV",{className:"ol-progress-bar",parent:this._progress});this._progressbar=ct.create("DIV",{parent:n}),this._progressMessage=ct.create("DIV",{className:"ol-progress-message",parent:this._progress}),ct.create("DIV",{className:"ol-buttons",parent:t}),wr.call(this,{element:e,target:r.target}),this.set("closeBox",r.closeBox!==!1),this.set("zoom",!!r.zoom),this.set("hideOnClick",!!r.hideOnClick),this.set("hideOnBack",!!r.hideOnBack),this.set("className",e.className),this.set("closeOnSubmit",r.closeOnSubmit),this.set("buttons",r.buttons),this.setContent(r)};Br(La,wr);La.prototype.show=function(r){r&&((r instanceof Element||typeof r=="string")&&(r={content:r}),this.setContent(r)),this.element.classList.add("ol-visible");var e=this.element.querySelector('input[type="text"],input[type="search"],input[type="number"]');if(e&&e.focus(),this.dispatchEvent({type:"show"}),r){if(r.autoclose){var t=setTimeout(function(){this.hide()}.bind(this),r.autoclose);this.once("hide",function(){clearTimeout(t)})}if(r.hideOnBack){var n=this.get("hideOnBack");this.set("hideOnBack",!0),this.once("hide",function(){this.set("hideOnBack",n)}.bind(this))}}};La.prototype.open=function(){this.show()};La.prototype.setContentMessage=function(r){if(r!==void 0){var e=this.getContentElement();r instanceof Element&&ct.setHTML(e,""),ct.setHTML(e,r||"")}};La.prototype.setTitle=function(r){var e=this.element.querySelector("form");e.querySelector("h2").innerText=r||"",r?e.classList.add("ol-title"):e.classList.remove("ol-title")};La.prototype.setContent=function(r){if(r){this.element.className=this.get("className"),typeof r=="string"&&(r={content:r}),r=r||{},this.setProgress(!1),r.max&&this.setProgress(0,r.max),r.progress!==void 0&&this.setProgress(r.progress),this.get("zoom")?this.element.classList.add("ol-zoom"):this.element.classList.remove("ol-zoom"),r.className&&r.className.split(" ").forEach(function(a){this.element.classList.add(a)}.bind(this));var e=this.element.querySelector("form");r.content!==void 0&&(r.content instanceof Element&&ct.setHTML(e.querySelector(".ol-content"),""),ct.setHTML(e.querySelector(".ol-content"),r.content||"")),this.setTitle(r.title),r.closeBox||this.get("closeBox")&&r.closeBox!==!1?e.classList.add("ol-closebox"):e.classList.remove("ol-closebox");var t=this.element.querySelector(".ol-buttons");t.innerHTML="";var n=r.buttons||this.get("buttons");if(n){e.classList.add("ol-button");for(var i in n)ct.create("INPUT",{type:i==="submit"?"submit":"button",value:n[i],click:this._onButton(i,r.onButton),parent:t})}else e.classList.remove("ol-button")}};La.prototype.getContentElement=function(){return this.element.querySelector("form .ol-content")};La.prototype.setProgress=function(r,e,t){if(r===!1){ct.setStyle(this._progress,{display:"none"});return}if(e>0?this.set("max",Number(e)):e=this.get("max"),!e)ct.setStyle(this._progress,{display:"none"});else{var n=Math.round(r/e*100);ct.setStyle(this._progress,{display:""}),this._progressbar.className=n?"":"notransition",ct.setStyle(this._progressbar,{width:n+"%"})}this._progressMessage.innerHTML="",ct.setHTML(this._progressMessage,t||"")};La.prototype._onButton=function(r,e){var t=function(n){n.preventDefault(),(r!=="submit"||this.get("closeOnSubmit")!==!1)&&this.hide();var i=this.getInputs();this.dispatchEvent({type:"button",button:r,inputs:i}),typeof e=="function"&&e(r,i)}.bind(this);return t};La.prototype.getInputs=function(){var r={};return["input","textarea","select"].forEach(function(e){this.element.querySelectorAll("form "+e).forEach(function(t){t.className&&t.className.split(" ").forEach(function(n){r[n]=t})})}.bind(this)),r};La.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})};La.prototype.close=La.prototype.hide;La.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")};var tAt=function(r){if(!r)return null;var e=r.getViewport().getElementsByClassName("ol-fixedoverlay")[0];return e||(r.getViewport().querySelector(".ol-layers")?(e=document.createElement("canvas"),e.className="ol-fixedoverlay",r.getViewport().querySelector(".ol-layers").after(e),r.on("precompose",function(t){e.width=r.getSize()[0]*t.frameState.pixelRatio,e.height=r.getSize()[1]*t.frameState.pixelRatio})):e=r.getViewport().querySelector("canvas")),e},Gi=function(r){r||(r={}),this.setStyle(r.style),wr.call(this,r)};Br(Gi,wr);Gi.prototype.setMap=function(r){this.getCanvas(r);var e=this.getMap();if(this._listener&&(Uo(this._listener),this._listener=null),wr.prototype.setMap.call(this,r),e)try{e.renderSync()}catch{}r&&(this._listener=r.on("postcompose",this._draw.bind(this)))};Gi.prototype.getCanvas=function(r){return tAt(r)};Gi.prototype.getContext=function(r){var e=r.context;if(!e&&this.getMap()){var t=this.getMap().getViewport().getElementsByClassName("ol-fixedoverlay")[0];e=t?t.getContext("2d"):null}return e};Gi.prototype.setStyle=function(r){this._style=r||new Aa({})};Gi.prototype.getStyle=function(){return this._style};Gi.prototype.getStroke=function(){var r=this._style.getStroke();return r||this._style.setStroke(new Di({color:"#000",width:1.25})),this._style.getStroke()};Gi.prototype.getFill=function(){var r=this._style.getFill();return r||this._style.setFill(new ua({color:"#fff"})),this._style.getFill()};Gi.prototype.getTextStroke=function(){var r=this._style.getText();return r||(r=new Lh({})),r.getStroke()||r.setStroke(new Di({color:"#fff",width:3})),r.getStroke()};Gi.prototype.getTextFill=function(){var r=this._style.getText();return r||(r=new Lh({})),r.getFill()||r.setFill(new ua({color:"#fff"})),r.getFill()};Gi.prototype.getTextFont=function(){var r=this._style.getText();return r||(r=new Lh({})),r.getFont()||r.setFont("12px sans-serif"),r.getFont()};Gi.prototype._draw=function(){console.warn("[CanvasBase] draw function not implemented.")};function eAt(r,e){var t=r.canvas,n=e||{},i=n.pixelRatio||fh,a=n.size;a&&(t.width=a[0]*i,t.height=a[1]*i,t.style.width=a[0]+"px",t.style.height=a[1]+"px");var o=[0,0,t.width,t.height],s=Qv(si(),i,i);return new EI(r,i,o,s,0)}var Np=function(r){r=r||{},ui.call(this,r),r.feature&&this.set("feature",r.feature.clone())};Br(Np,ui);Np.prototype.setTitle=function(r){this.set("title",r||""),this.changed()};Np.prototype.getElement=function(r,e){var t=ct.create("LI",{className:this.get("className"),click:function(n){e(!1),n.stopPropagation()},style:{height:r[1]+"px"},"aria-label":this.get("title")});return ct.create("DIV",{click:function(n){e(!0),n.stopPropagation()},style:{width:r[0]+"px",height:r[1]+"px"},parent:t}),t};window.ol&&!ol.legend&&(ol.legend={});var ca=function(r){r=r||{},ui.call(this),this._items=new Ai;var e=[],t;this._items.on("add",function(n){e.push({item:n.element,on:n.element.on("change",function(){this.refresh()}.bind(this))}),t&&(clearTimeout(t),t=null),t=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._items.on("remove",function(n){for(var i=0;i<e;i++)if(n.element===e[i].item){Uo(e[i].on),e.splice(i,1);break}t&&(clearTimeout(t),t=null),t=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._listElement=ct.create("UL",{className:"ol-legend"}),this._canvas=document.createElement("canvas"),this.set("size",r.size||[40,25],!0),this.set("margin",r.margin===0?0:r.margin||10,!0),this._textStyle=r.textStyle||new Lh({font:"16px sans-serif",fill:new ua({color:"#333"}),backgroundFill:new ua({color:"rgba(255,255,255,.8)"})}),this._title=new Np({title:r.title||"",className:"ol-title"}),r.titleStyle?this._titleStyle=r.titleStyle:(this._titleStyle=this._textStyle.clone(),this._titleStyle.setFont("bold "+this._titleStyle.getFont())),this.setStyle(r.style),r.items instanceof Array&&r.items.forEach(function(n){this.addItem(n)}.bind(this)),this.refresh()};Br(ca,ui);ca.prototype.setTitle=function(r){this._title.setTitle(r),this.refresh()};ca.prototype.getTitle=function(){return this._title.get("title")};ca.prototype.getTextStyle=function(){return this._textStyle};ca.prototype.set=function(r,e,t){ui.prototype.set.call(this,r,e,t),t||this.refresh()};ca.prototype.getListElement=function(){return this._listElement};ca.prototype.getCanvas=function(){return this._canvas};ca.prototype.setStyle=function(r){this._style=r,this.refresh()};ca.prototype.addItem=function(r){r instanceof Np?this._items.push(r):this._items.push(new Np(r))};ca.prototype.getItems=function(){return this._items};ca.prototype._drawText=function(r,e,t,n){r.save(),r.scale(fh,fh),e=e||"";var i=e.split(`
`);i.length===1?r.fillText(e,t,n):(r.textBaseline="bottom",r.fillText(i[0],t,n),r.textBaseline="top",r.fillText(i[1],t,n)),r.restore()};ca.prototype._measureText=function(r,e){var t=(e||"").split(`
`);if(t.length===1)return r.measureText(e);var n=r.measureText(t[0]),i=r.measureText(t[1]);return{width:Math.max(n.width,i.width),height:n.height+i.height}};ca.prototype.refresh=function(){var r=this._listElement;r.innerHTML="";var e=this.get("margin"),t=this.get("size")[0]+2*e,n=this.get("lineHeight")||this.get("size")[1]+2*e,i=this.getCanvas(),a=i.getContext("2d");a.textAlign="left",a.textBaseline="middle";var o=fh;a.font=this._titleStyle.getFont();var s=this._measureText(a,this.getTitle("title")).width;this._items.forEach(function(A){A.get("feature")||A.get("typeGeom")?(a.font=A.get("textStyle")?A.get("textStyle").getFont():this._textStyle.getFont(),s=Math.max(s,this._measureText(a,A.get("title")).width+t)):(a.font=A.get("textStyle")?A.get("textStyle").getFont():this._titleStyle.getFont(),s=Math.max(s,this._measureText(a,A.get("title")).width))}.bind(this)),i.width=(s+2*e)*o,i.height=(this._items.getLength()+1)*n*o,i.style.height=(this._items.getLength()+1)*n+"px",a.textBaseline="middle",a.fillStyle=il(this._textStyle.getFill().getColor()),this.getTitle()&&(r.appendChild(this._title.getElement([t,n],function(A){this.dispatchEvent({type:"select",index:-1,symbol:A,item:this._title})}.bind(this))),a.font=this._titleStyle.getFont(),a.textAlign="center",this._drawText(a,this.getTitle(),i.width/o/2,n/2)),this._items.forEach(function(A,l){var u=l+(this.getTitle()?1:0);r.appendChild(A.getElement([t,n],function(h){this.dispatchEvent({type:"select",index:l,symbol:h,item:A})}.bind(this)));var c=A.getProperties();a.textAlign="left",c.feature||c.typeGeom?(i=this.getLegendImage(c,i,u),a.font=A.get("textStyle")?A.get("textStyle").getFont():this._textStyle.getFont(),this._drawText(a,A.get("title"),t+e,(l+1.5)*n)):(a.font=A.get("textStyle")?A.get("textStyle").getFont():this._titleStyle.getFont(),/\bcenter\b/.test(c.className)?(a.textAlign="center",this._drawText(a,A.get("title"),i.width/o/2,(l+1.5)*n)):this._drawText(a,A.get("title"),e,(l+1.5)*n))}.bind(this)),this.dispatchEvent({type:"refresh",width:t,height:(this._items.length+1)*n})};ca.prototype.getLegendImage=function(r,e,t){return r=r||{},ca.getLegendImage({className:r.className,feature:r.feature,typeGeom:r.typeGeom,style:r.style||this._style,properties:r.properties,margin:r.margin||this.get("margin"),size:r.size||this.get("size"),lineHeight:r.lineHeight||this.get("lineHeight"),onload:function(){this.refresh()}.bind(this)},e,t)};ca.getLegendImage=function(r,e,t){r=r||{},typeof r.margin>"u"&&(r.margin=10);var n=r.size||[40,25];r.onload=r.onload||function(){setTimeout(function(){ca.getLegendImage(r,e,t)},100)};var i=n[0]+2*r.margin,a=r.lineHeight||n[1]+2*r.margin,o=fh;e||(t=0,e=document.createElement("canvas"),e.width=i*o,e.height=a*o);var s=e.getContext("2d");s.save();var A=eAt(s,{pixelRatio:o}),l=r.typeGeom,u,c=r.feature;!c&&l&&(/Point/.test(l)?c=new sr(new pr([0,0])):/LineString/.test(l)?c=new sr(new kr([0,0])):c=new sr(new Fn([[0,0]])),r.properties&&c.setProperties(r.properties)),c?(u=c.getStyle(),typeof u=="function"&&(u=u(c)),u||(u=typeof r.style=="function"?r.style(c):r.style||[]),l=c.getGeometry().getType()):u=[],u instanceof Array||(u=[u]);var h=i/2,f=a/2,p=n[0]/2,v=n[1]/2,m,g;if(l==="Point"){var _=null;for(m=0;g=u[m];m++){var E=g.getImage();if(E){var B=E.getImage();if(B&&B.complete&&!B.naturalWidth&&(typeof r.onload=="function"&&B.addEventListener("load",function(){setTimeout(function(){r.onload()},100)}),E.load()),E.getAnchor){var L=E.getAnchor();if(L){var O=E.getSize(),b=L[0]-O[0],T=L[1]-O[1];_?ku(_,[b,T,b+O[0],T+O[1]]):_=[b,T,b+O[0],T+O[1]]}}}}_&&(h=h+(_[2]+_[0])/2,f=f+(_[3]+_[1])/2)}for(f+=t*a||0,m=0;g=u[m];m++)switch(A.setStyle(g),l){case pr:case"Point":case"MultiPoint":A.drawGeometry(new pr([h,f]));break;case kr:case"LineString":case"MultiLineString":s.save(),s.rect(r.margin*o,0,n[0]*o,e.height),s.clip(),A.drawGeometry(new kr([[h-p,f],[h+p,f]])),s.restore();break;case Fn:case"Polygon":case"MultiPolygon":A.drawGeometry(new Fn([[[h-p,f-v],[h+p,f-v],[h+p,f+v],[h-p,f+v],[h-p,f-v]]]));break}return s.restore(),e};var Ps=function(r){r=r||{};var e=document.createElement("div");if(r.target)e.className=r.className||"ol-legend";else{e.className=(r.className||"ol-legend")+" ol-unselectable ol-control"+(r.collapsible===!1?" ol-uncollapsible":" ol-collapsed");var t=document.createElement("button");t.setAttribute("type","button"),t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t),t=document.createElement("button"),t.setAttribute("type","button"),t.className="ol-closebox",t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t)}Gi.call(this,{element:e,target:r.target}),this._legend=r.legend,this._legend.getCanvas().className="ol-legendImg",e.appendChild(this._legend.getCanvas()),e.appendChild(this._legend.getListElement()),r.collapsible!==!1&&r.collapsed===!1&&this.show(),this._legend.on("select",function(n){this.dispatchEvent(n)}.bind(this)),this._legend.on("refresh",function(){if(this._onCanvas&&this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this))};Br(Ps,Gi);Ps.prototype.getLegend=function(){return this._legend};Ps.prototype.setCanvas=function(r){if(this._onCanvas=r,this.element.style.visibility=r?"hidden":"visible",this.getMap())try{this.getMap().renderSync()}catch{}};Ps.prototype.onCanvas=function(){return!!this._onCanvas};Ps.prototype._draw=function(r){if(this._onCanvas&&!this.element.classList.contains("ol-collapsed")){var e=this._legend.getCanvas(),t=this.getContext(r),n=t.canvas.height-e.height;t.save(),t.rect(0,n,e.width,e.height);var i="#fff";this._legend.getTextStyle().getBackgroundFill()&&(i=il(this._legend.getTextStyle().getBackgroundFill().getColor())),t.fillStyle=t.strokeStyle=i,t.lineWidth=10,t.lineJoin="round",t.stroke(),t.clearRect(0,n,e.width,e.height),t.fill(),t.drawImage(e,0,n),t.restore()}};Ps.prototype.show=function(){if(this.element.classList.contains("ol-collapsed")&&(this.element.classList.remove("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:!1}),this.getMap()))try{this.getMap().renderSync()}catch{}};Ps.prototype.hide=function(){if(!this.element.classList.contains("ol-collapsed")&&(this.element.classList.add("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:!0}),this.getMap()))try{this.getMap().renderSync()}catch{}};Ps.prototype.collapse=function(r){r===!1?this.show():this.hide()};Ps.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")};Ps.prototype.toggle=function(){if(this.element.classList.toggle("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:this.element.classList.contains("ol-collapsed")}),this.getMap())try{this.getMap().renderSync()}catch{}};var nc=function(r){r||(r={});var e=ct.create("DIV",{className:r.className||"ol-print"});r.target||(e.classList.add("ol-unselectable","ol-control"),ct.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e})),wr.call(this,{element:e,target:r.target}),this.set("immediate",r.immediate),this.set("imageType",r.imageType||"image/jpeg"),this.set("quality",r.quality||.8),this.set("orientation",r.orientation)};Br(nc,wr);nc.prototype.toClipboard=function(r,e){try{r.canvas.toBlob(function(t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},t.type,{value:t,enumerable:!0}))]),typeof e=="function"&&e(!0)}catch{typeof e=="function"&&e(!1)}})}catch{typeof e=="function"&&e(!1)}};nc.prototype.copyMap=function(r,e){this.once("print",function(t){this.toClipboard(t,e)}.bind(this)),this.print(r)};nc.prototype._getCanvas=function(r,e,t){var n;if(r.context)t=r.context.canvas;else{if(t)n=t.getContext("2d");else{t=document.createElement("canvas");var i=this.getMap().getSize();t.width=i[0],t.height=i[1],n=t.getContext("2d"),/jp.*g$/.test(e)&&(n.fillStyle=this.get("bgColor")||"white",n.fillRect(0,0,t.width,t.height))}this.getMap().getViewport().querySelectorAll(".ol-layers canvas, canvas.ol-fixedoverlay").forEach(function(a){if(a.width){if(n.save(),a.parentNode.style.opacity==="0")return;n.globalAlpha=parseFloat(a.parentNode.style.opacity)||1,ct.getStyle(a.parentNode,"mix-blend-mode")==="multiply"&&(n.globalCompositeOperation="multiply");var o=ct.getStyle(a,"transform")||ct.getStyle(a,"-webkit-transform");/^matrix/.test(o)?(o=o.replace(/^matrix\(|\)$/g,"").split(","),o.forEach(function(s,A){o[A]=parseFloat(s)}),n.transform(o[0],o[1],o[2],o[3],o[4],o[5]),n.drawImage(a,0,0)):n.drawImage(a,0,0,ct.getStyle(a,"width"),ct.getStyle(a,"height")),n.restore()}}.bind(this))}return t};nc.prototype.fastPrint=function(r,e){r=r||{},this._ol6?requestAnimationFrame(function(){e(this._getCanvas({},r.imageType,r.canvas))}.bind(this)):(this.getMap().once("postcompose",function(t){t.context||(this._ol6=!0),e(this._getCanvas(t,r.imageType,r.canvas))}.bind(this)),this.getMap().render())};nc.prototype.print=function(r){r=r||{};var e=r.imageType||this.get("imageType"),t=r.quality||this.get("quality");if(this.getMap()){if(r.immediate!=="silent"&&this.dispatchEvent(Object.assign({type:"printing"},r)),!r.immediate){setTimeout(function(){r=Object.assign({},r),r.immediate="silent",this.print(r)}.bind(this),200);return}this.getMap().once(this.get("immediate")?"postcompose":"rendercomplete",function(n){var i=this._getCanvas(n,e),a=r.size||[210,297],o=r.format||"a4",s,A,l,u=r.orient||this.get("orientation"),c=typeof r.margin=="number"?r.margin:10;if(i){u!=="landscape"&&u!=="portrait"&&(u=i.width>i.height?"landscape":"portrait"),u==="landscape"&&(a=[a[1],a[0]]);var h=Math.min((a[0]-2*c)/i.width,(a[1]-2*c)/i.height);s=h*i.width,A=h*i.height,l=[(a[0]-s)/2,(a[1]-A)/2]}var f;try{f=i?i.toDataURL(e,t):null}catch{this.dispatchEvent({type:"error",canvas:i});return}var p=Object.assign({type:"print",print:{format:o,orientation:u,unit:"mm",size:a,position:l,imageWidth:s,imageHeight:A},image:f,imageType:e,quality:t,canvas:i},r);this.dispatchEvent(p)}.bind(this)),this.getMap().render()}};var ic=function(r){r||(r={});var e=ct.create("DIV",{className:(r.className||"")+" ol-control-title ol-unselectable",style:{display:"block",visibility:"hidden"}});Gi.call(this,{element:e,style:r.style}),this.setTitle(r.title||""),this.setVisible(r.visible),this.element.style.font=this.getTextFont()};Br(ic,Gi);ic.prototype.setStyle=function(r){Gi.prototype.setStyle.call(this,r),this.element&&(this.element.style.font=this.getTextFont()),this.getMap()&&this.getMap().render()};ic.prototype.setTitle=function(r){if(this.element.textContent=r,this.set("title",r),this.getMap())try{this.getMap().renderSync()}catch{}};ic.prototype.getTitle=function(){return this.get("title")};ic.prototype.setVisible=function(r){if(this.element.style.display=r?"block":"none",this.getMap())try{this.getMap().renderSync()}catch{}};ic.prototype.getVisible=function(){return this.element.style.display!=="none"};ic.prototype._draw=function(r){if(this.getVisible()){var e=this.getContext(r);if(e){var t=r.frameState.pixelRatio;e.save(),e.scale(t,t);var n=this.element.getBoundingClientRect(),i=this.getMap().getViewport().getBoundingClientRect(),a=this.getMap().getSize()[0]/i.width;e.translate(Math.round((n.left-i.left)*a),Math.round((n.top-i.top)*a));var o=this.element.clientHeight,s=this.element.clientWidth,A=s/2;e.beginPath(),e.fillStyle=il(this.getFill().getColor()),e.rect(0,0,s,o),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=il(this.getTextFill().getColor()),e.strokeStyle=il(this.getTextStroke().getColor()),e.lineWidth=this.getTextStroke().getWidth(),e.textAlign="center",e.textBaseline="middle",e.font=this.getTextFont(),e.lineWidth&&e.strokeText(this.getTitle(),A,o/2),e.fillText(this.getTitle(),A,o/2),e.closePath(),e.restore()}}};var Xx=function(r,e){var t=r.getView(),n=t.getProjection(),i=t.getCenter(),a=r.getPixelFromCoordinate(i);a[1]+=1;var o=r.getCoordinateFromPixel(a),s=I_(ju(i,n,"EPSG:4326"),ju(o,n,"EPSG:4326"));return s*=(e||96)/.0254,s},rAt=function(r,e,t){if(r&&e){var n=e;if(typeof e=="string"&&(n=e.split("/")[1],n||(n=e),n=n.replace(/[^\d]/g,""),n=parseInt(n)),!n)return;var i=r.getView(),a=i.getProjection(),o=i.getCenter(),s=r.getPixelFromCoordinate(o);s[1]+=1;var A=r.getCoordinateFromPixel(s),l=I_(ju(o,a,"EPSG:4326"),ju(A,a,"EPSG:4326"));return l*=(t||96)/.0254,i.setResolution(i.getResolution()*n/l),n}},pl=function(r){r||(r={});var e=document.createElement("div");e.className="ol-control ol-compassctrl ol-unselectable ol-hidden"+(r.className?" "+r.className:""),e.style.position="absolute",e.style.visibility="hidden";var t=r.style instanceof Di?new Aa({stroke:r.style}):r.style;r.style||(t=new Aa({stroke:new Di({width:0})})),Gi.call(this,{element:e,style:t}),this.set("rotateVithView",r.rotateWithView!==!1),this.setVisible(r.visible!==!1),this.setImage(r.image||r.src)};Br(pl,Gi);pl.prototype.setImage=function(r){if(r instanceof Image)this.img_=r,this.img_.onload=function(){if(this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this);else if(typeof r=="string")switch(r){case"compact":{this.img_=this.compactCompass_(this.element.clientWidth,this.getStroke().getColor());break}case"default":{this.img_=this.defaultCompass_(this.element.clientWidth,this.getStroke().getColor());break}default:{this.img_=new Image,this.img_.onload=function(){if(this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this),this.img_.src=r;break}}else this.img_=this.defaultCompass_(this.element.clientWidth,this.getStroke().getColor())};pl.prototype.compactCompass_=function(r,e){var t=document.createElement("canvas"),n=t.getContext("2d");r=t.width=t.height=r||150;var i=r/2;return n.translate(i,i),n.fillStyle=e||"#963",n.lineWidth=5,n.lineJoin=n.lineCap="round",n.font="bold "+i*.4+"px sans-serif",n.textBaseline="bottom",n.textAlign="center",n.strokeStyle="#fff",n.globalAlpha=.75,n.strokeText("N",0,-i/2),n.globalAlpha=1,n.fillText("N",0,-i/2),n.beginPath(),n.moveTo(0,i/4),n.lineTo(i/3,i/2),n.lineTo(0,-i/2),n.lineTo(-i/3,i/2),n.lineTo(0,i/4),n.lineWidth=12,n.fillStyle="#fff",n.globalAlpha=.75,n.fill(),n.stroke(),n.globalAlpha=1,n.fillStyle=n.strokeStyle=e||"#963",n.lineWidth=5,n.beginPath(),n.moveTo(0,i/4),n.lineTo(0,-i/2),n.lineTo(i/3,i/2),n.lineTo(0,i/4),n.fill(),n.stroke(),n.beginPath(),n.moveTo(0,i/4),n.lineTo(0,-i/2),n.lineTo(-i/3,i/2),n.lineTo(0,i/4),n.stroke(),t};pl.prototype.defaultCompass_=function(r,e){var t=document.createElement("canvas"),n=t.getContext("2d");r=t.width=t.height=r||150;var i=r/2,a=.22*i;function o(A,l){n.fillStyle=e||"#963",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,-l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(l,-l),n.moveTo(0,0),n.fill(),n.stroke()}function s(A,l){n.globalCompositeOperation="destination-out",n.fillStyle="#fff",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,-l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(-l,-l),n.moveTo(0,0),n.fill(),n.globalCompositeOperation="source-over",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,-l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(-l,-l),n.moveTo(0,0),n.stroke()}return n.translate(i,i),n.strokeStyle=e||"#963",n.lineWidth=1.5,n.beginPath(),n.arc(0,0,r*.41,0,2*Math.PI),n.arc(0,0,r*.44,0,2*Math.PI),n.stroke(),n.rotate(Math.PI/4),o(i*.9,a*.8),s(i*.9,a*.8),n.rotate(-Math.PI/4),o(i,a),s(i,a),t};pl.prototype.getVisible=function(){return ct.getStyle(this.element,"display")==="block"};pl.prototype.setVisible=function(r){r?this.element.classList.add("ol-visible"):this.element.classList.remove("ol-visible"),this.getMap()&&this.getMap().render()};pl.prototype._draw=function(r){var e=this.getContext(r);if(!(!e||!this.getVisible())){var t=e.canvas,n,i=[];for(n=0;n<8;n++)i[n]=[Math.cos(Math.PI*n/8),Math.sin(Math.PI*n/8)];var a=r.frameState.pixelRatio;e.save(),e.scale(a,a);var o=this.element.clientWidth,s=this.element.clientHeight,A={left:this.element.offsetLeft,top:this.element.offsetTop},l=this.img_,u=r.frameState.viewState.rotation;if(e.beginPath(),e.translate(A.left+o/2,A.top+s/2),this.get("rotateVithView")&&e.rotate(u),this.getStroke().getWidth()){e.beginPath(),e.strokeStyle=this.getStroke().getColor(),e.lineWidth=this.getStroke().getWidth();var c=Math.max(t.width,t.height);for(n=0;n<8;n++)e.moveTo(-i[n][0]*c,-i[n][1]*c),e.lineTo(i[n][0]*c,i[n][1]*c);e.stroke()}l.width&&e.drawImage(l,-o/2,-s/2,o,s),e.closePath(),e.restore()}};var In=function(r){r||(r={}),this._lang=r.lang||"en";var e=ct.create("DIV",{className:(r.className||"ol-print")+" ol-unselectable ol-control"});ct.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e}),wr.call(this,{element:e}),r.openWindow&&this.on("print",function(x){x.canvas&&window.open().document.write('<img src="'+x.canvas.toDataURL()+'"/>')}),r.target=ct.create("DIV");var t=this._printCtrl=new nc(r);t.on(["print","error","printing"],function(x){i.setAttribute("data-status",x.type),x.clipboard||this.dispatchEvent(x)}.bind(this)),this._compass=new pl({src:r.northImage||"compact",visible:!1,className:"olext-print-compass",style:new Di({color:"#333",width:0})});var n=this._printDialog=new La({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),i=n.getContentElement();this._input={};var a=ct.create("DIV",{className:"ol-print-param",parent:i});this._pages=[ct.create("DIV",{className:"ol-page"})];var o=ct.create("DIV",{className:"ol-map",parent:this._pages[0]});ct.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:i}),ct.create("H2",{html:this.i18n("title"),parent:a});var s=ct.create("UL",{parent:a}),A=ct.create("LI",{className:"ol-orientation",parent:s});this._input.orientation={list:A};var l=ct.create("LABEL",{className:"portrait",parent:A});this._input.orientation.portrait=ct.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(x){this.setOrientation(x.target.value)}.bind(this)},parent:l}),ct.create("SPAN",{html:this.i18n("portrait"),parent:l}),l=ct.create("LABEL",{className:"landscape",parent:A}),this._input.orientation.landscape=ct.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(x){this.setOrientation(x.target.value)}.bind(this)},parent:l}),ct.create("SPAN",{html:this.i18n("landscape"),parent:l});var u;A=ct.create("LI",{html:ct.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:s});var c=this._input.size=ct.create("SELECT",{on:{change:function(){this.setSize(c.value||F)}.bind(this)},parent:A});for(u in this.paperSize)ct.create("OPTION",{html:u+(this.paperSize[u]?" - "+this.paperSize[u][0]+"x"+this.paperSize[u][1]+" mm":this.i18n("custom")),value:u,parent:c});A=ct.create("LI",{html:ct.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:s});var h=this._input.margin=ct.create("SELECT",{on:{change:function(){this.setMargin(h.value)}.bind(this)},parent:A});for(u in this.marginSize)ct.create("OPTION",{html:this.i18n(u)+" - "+this.marginSize[u]+" mm",value:this.marginSize[u],parent:h});A=ct.create("LI",{html:ct.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:s});var f=this._input.scale=ct.create("SELECT",{on:{change:function(){this.setScale(parseInt(f.value))}.bind(this)},parent:A});Object.keys(this.scales).forEach(function(x){ct.create("OPTION",{html:this.scales[x],value:x,parent:f})}.bind(this)),A=ct.create("LI",{className:"ol-legend",parent:s});var p=ct.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){S.legend.control.setCanvas(p.checked)}.bind(this)},parent:A});A=ct.create("LI",{className:"ol-print-north",parent:s});var v=this._input.north=ct.createSwitch({html:this.i18n("north"),checked:"checked",on:{change:function(){v.checked?this._compass.element.classList.add("ol-print-compass"):this._compass.element.classList.remove("ol-print-compass"),this.getMap().render()}.bind(this)},parent:A});A=ct.create("LI",{className:"ol-print-title",parent:s});var m=ct.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(x){S.title.control.setVisible(x.target.checked)}.bind(this)},parent:A}),g=ct.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(x){x.keyCode===13&&x.preventDefault()},keyup:function(){S.title.control.setTitle(g.value)},change:function(){S.title.control.setTitle(g.value)}.bind(this)},parent:A}),_=ct.create("DIV",{className:"ol-user-param",parent:a});A=ct.create("LI",{className:"ol-saveas",parent:s});var E=ct.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),B=ct.create("SELECT",{on:{change:function(){if(this.formats[B.value].clipboard)t.copyMap(this.formats[B.value],function(P){P&&(E.classList.add("visible"),setTimeout(function(){E.classList.remove("visible")},1e3))});else{var x=typeof this.getSize()=="string"?this.getSize():null,N=Object.assign({format:x,size:x?this.paperSize[x]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[B.value]);t.print(N)}B.value=""}.bind(this)},parent:A});ct.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:B}),this.formats.forEach(function(x,N){if(x.pdf){if(r.pdf===!1)return}else if(x.clipboard){if(r.copy===!1)return}else if(r.save===!1)return;ct.create("OPTION",{html:this.i18n(x.title),value:N,parent:B})}.bind(this)),A=ct.create("LI",{className:"ol-savelegend",parent:s});var L=ct.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),O=ct.create("SELECT",{on:{change:function(){var x=S.legend.control.getLegend().getCanvas(),N=document.createElement("CANVAS");N.width=x.width,N.height=x.height;var P=N.getContext("2d");if(P.fillStyle="#fff",P.fillRect(0,0,N.width,N.height),P.drawImage(x,0,0),this.formats[O.value].clipboard)N.toBlob(function(_t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},_t.type,{value:_t,enumerable:!0}))]),L.classList.add("visible"),setTimeout(function(){L.classList.remove("visible")},1e3)}catch{}},"image/png");else{var Y;try{Y=N.toDataURL(this.formats[O.value].imageType,this.formats[O.value].quality);var z=typeof this.getSize()=="string"?this.getSize():"A4",tt=N.width/96*25.4,J=N.height/96*25.4,nt=this.paperSize[z];this.getOrientation()==="landscape"&&(nt=[nt[1],nt[0]]);var it=[(nt[0]-tt)/2,(nt[1]-J)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:z,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[z],position:it,imageWidth:tt,imageHeight:J},image:Y,imageType:this.formats[O.value].imageType,pdf:this.formats[O.value].pdf,quality:this.formats[O.value].quality,canvas:N})}catch{}}O.value=""}.bind(this)},parent:A});ct.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:O}),this.formats.forEach(function(x,N){ct.create("OPTION",{html:this.i18n(x.title),value:N,parent:O})}.bind(this));var b=ct.create("DIV",{className:"ol-ext-buttons",parent:a});ct.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(x){x.preventDefault(),window.print()},parent:b}),ct.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){n.hide()},parent:b}),ct.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:a});var T,F,M,S={};n.on("show",function(){this.dispatchEvent({type:"show",userElement:_,dialog:this._printDialog,page:this.getPage()});var x=this.getMap();x&&(document.body.classList.add("ol-print-document"),T=x.getTargetElement(),F=x.getSize(),typeof this.getSize()=="string"?this.setSize(this.getSize()):this.setSize(F),x.setTarget(o),M&&Uo(M),M=x.on("moveend",function(){this.setScale(Xx(x))}.bind(this)),this.setScale(Xx(x)),S={},this.getMap().getControls().forEach(function(N){N instanceof Ps&&(S.legend={control:N}),N instanceof ic&&(S.title={control:N}),N instanceof pl&&(S.compass?N.element.classList.remove("ol-print-compass"):(this._input.north.checked?N.element.classList.add("ol-print-compass"):N.element.classList.remove("ol-print-compass"),this._compass=N,S.compass={control:N}))}.bind(this)),S.title?(m.checked=S.title.isVisible=S.title.control.getVisible(),g.value=S.title.control.getTitle(),m.parentNode.parentNode.classList.remove("hidden")):m.parentNode.parentNode.classList.add("hidden"),S.legend?(S.legend.ison=S.legend.control.onCanvas(),S.legend.collapsed=S.legend.control.isCollapsed(),S.legend.control.collapse(!1),O.parentNode.classList.remove("hidden"),p.parentNode.parentNode.classList.remove("hidden"),p.checked=!S.legend.collapsed,S.legend.control.setCanvas(!S.legend.collapsed)):(O.parentNode.classList.add("hidden"),p.parentNode.parentNode.classList.add("hidden")))}.bind(this)),n.on("hide",function(){document.body.classList.remove("ol-print-document"),T&&(this.getMap().setTarget(T),T=null,M&&Uo(M),S.title&&S.title.control.setVisible(S.title.isVisible),S.legend&&(S.legend.control.setCanvas(S.legend.ison),S.legend.control.collapse(S.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),r.saveAs&&this.on("print",function(x){x.pdf||x.canvas.toBlob(function(N){var P=(x.print.legend?"legend.":"map.")+x.imageType.replace("image/","");r.saveAs(N,P)},x.imageType,x.quality)}),r.jsPDF&&this.on("print",function(x){if(x.pdf){var N=new r.jsPDF({orientation:x.print.orientation,unit:x.print.unit,format:x.print.size});N.addImage(x.image,"JPEG",x.print.position[0],x.print.position[0],x.print.imageWidth,x.print.imageHeight),N.save(x.print.legend?"legend.pdf":"map.pdf")}})};Br(In,wr);In.prototype.isOpen=function(){return this._printDialog.isOpen()};In.addLang=function(r,e){In.prototype._labels[r]=e};In.prototype.i18n=function(r){var e=this._labels.en[r]||"bad param";return this._labels[this._lang]&&this._labels[this._lang][r]&&(e=this._labels[this._lang][r]),e};In.prototype._labels={en:{title:"Print",orientation:"Orientation",portrait:"Portrait",landscape:"Landscape",size:"Page size",custom:"screen size",margin:"Margin",scale:"Scale",legend:"Legend",north:"North arrow",mapTitle:"Map title",saveas:"Save as...",saveLegend:"Save legend...",copied:"✔ Copied to clipboard",errorMsg:"Can't save map canvas...",printBt:"Print...",clipboardFormat:"copy to clipboard...",jpegFormat:"save as jpeg",pngFormat:"save as png",pdfFormat:"save as pdf",none:"none",small:"small",large:"large",cancel:"cancel"},fr:{title:"Imprimer",orientation:"Orientation",portrait:"Portrait",landscape:"Paysage",size:"Taille du papier",custom:"taille écran",margin:"Marges",scale:"Echelle",legend:"Légende",north:"Flèche du nord",mapTitle:"Titre de la carte",saveas:"Enregistrer sous...",saveLegend:"Enregistrer la légende...",copied:"✔ Carte copiée",errorMsg:"Impossible d'enregistrer la carte",printBt:"Imprimer",clipboardFormat:"copier dans le presse-papier...",jpegFormat:"enregistrer un jpeg",pngFormat:"enregistrer un png",pdfFormat:"enregistrer un pdf",none:"aucune",small:"petites",large:"larges",cancel:"annuler"},de:{title:"Drucken",orientation:"Ausrichtung",portrait:"Hochformat",landscape:"Querformat",size:"Papierformat",custom:"Bildschirmgröße",margin:"Rand",scale:"Maßstab",legend:"Legende",north:"Nordpfeil",mapTitle:"Kartentitel",saveas:"Speichern als...",saveLegend:"Legende speichern...",copied:"✔ In die Zwischenablage kopiert",errorMsg:"Kann Karte nicht speichern...",printBt:"Drucken...",clipboardFormat:"in die Zwischenablage kopieren...",jpegFormat:"speichern als jpeg",pngFormat:"speichern als png",pdfFormat:"speichern als pdf",none:"kein",small:"klein",large:"groß",cancel:"abbrechen"},zh:{title:"打印",orientation:"方向",portrait:"纵向",landscape:"横向",size:"页面大小",custom:"屏幕大小",margin:"外边距",scale:"尺度",legend:"图例",north:"指北针",mapTitle:"地图名字",saveas:"保存为...",saveLegend:"保存图例为...",copied:"✔ 已复制到剪贴板",errorMsg:"无法保存地图...",printBt:"打印...",cancel:"取消"}};In.prototype.paperSize={"":null,A0:[841,1189],A1:[594,841],A2:[420,594],A3:[297,420],A4:[210,297],"US Letter":[215.9,279.4],A5:[148,210],B4:[257,364],B5:[182,257]};In.prototype.marginSize={none:0,small:5,large:10};In.prototype.formats=[{title:"clipboardFormat",imageType:"image/png",clipboard:!0},{title:"jpegFormat",imageType:"image/jpeg",quality:.8},{title:"pngFormat",imageType:"image/png",quality:.8},{title:"pdfFormat",imageType:"image/jpeg",pdf:!0}];In.prototype.scales={" 5000":"1/5.000"," 10000":"1/10.000"," 25000":"1/25.000"," 50000":"1/50.000"," 100000":"1/100.000"," 250000":"1/250.000"," 1000000":"1/1.000.000"};In.prototype.getOrientation=function(){return this._orientation||"portrait"};In.prototype.setOrientation=function(r){this._orientation=r==="landscape"?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()};In.prototype.getMargin=function(){return this._margin||0};In.prototype.setMargin=function(r){this._margin=r,this._input.margin.value=r,this.setSize()};In.prototype.getSize=function(){return this._size};In.prototype.setSize=function(r){if(this._printDialog.getContentElement().setAttribute("data-status",""),r?this._size=r:r=this._size,!!r){if(typeof r=="string"){for(var e in this.paperSize)e&&new RegExp(e,"i").test(r)&&(r=e);this.paperSize[r]||(r=this._size="A4"),this._input.size.value=r,r=[Math.trunc(this.paperSize[r][0]*96/25.4),Math.trunc(this.paperSize[r][1]*96/25.4)],this.getOrientation()==="landscape"&&(r=[r[1],r[0]]),this.getPage().classList.remove("margin")}else this._input.size.value="",this.getPage().classList.add("margin");var t=this.getPage(),n=t.parentNode.getBoundingClientRect(),i=(n.width-40)/r[0],a=(n.height-40)/r[1],o=Math.min(i,a,1);t.style.width=r[0]+"px",t.style.height=r[1]+"px",t.style["-webkit-transform"]=t.style.transform="translate(-50%,-50%) scale("+o+")";var s=Math.round(5/o);t.style["-webkit-box-shadow"]=t.style["box-shadow"]=s+"px "+s+"px "+s+"px rgba(0,0,0,.6)",t.style.padding=this.getMargin()*96/25.4+"px",this.getMap()&&this.getMap().updateSize(),this.dispatchEvent({type:"dialog:refresh"})}};In.prototype.getContentElement=function(){return this._printDialog.getContentElement()};In.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")};In.prototype.getPage=function(){return this._pages[0]};In.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),wr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))};In.prototype.setScale=function(r){rAt(this.getMap(),r),this._input.scale.value=" "+Math.round(r/100)*100};In.prototype.getScale=function(){return Xx(this.getMap())};In.prototype.print=function(r){r=r||{},r.size&&this.setSize(r.size),r.scale&&this.setScale(r.scale),r.orientation&&this.setOrientation(r.orientation),r.margin&&this.setMargin(r.margin),this._printDialog.show()};In.prototype.getrintControl=function(){return this._printCtrl};var HI={exports:{}};(function(r,e){(function(t,n){n()})(tA,function(){function t(l,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function n(l,u,c){var h=new XMLHttpRequest;h.open("GET",l),h.responseType="blob",h.onload=function(){A(h.response,u,c)},h.onerror=function(){console.error("could not download file")},h.send()}function i(l){var u=new XMLHttpRequest;u.open("HEAD",l,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(u)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof tA=="object"&&tA.global===tA?tA:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,u,c){var h=o.URL||o.webkitURL,f=document.createElement("a");u=u||l.name||"download",f.download=u,f.rel="noopener",typeof l=="string"?(f.href=l,f.origin===location.origin?a(f):i(f.href)?n(l,u,c):a(f,f.target="_blank")):(f.href=h.createObjectURL(l),setTimeout(function(){h.revokeObjectURL(f.href)},4e4),setTimeout(function(){a(f)},0))}:"msSaveOrOpenBlob"in navigator?function(l,u,c){if(u=u||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(t(l,c),u);else if(i(l))n(l,u,c);else{var h=document.createElement("a");h.href=l,h.target="_blank",setTimeout(function(){a(h)})}}:function(l,u,c,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof l=="string")return n(l,u,c);var f=l.type==="application/octet-stream",p=/constructor/i.test(o.HTMLElement)||o.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||f&&p||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var E=m.result;E=v?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=E:location=E,h=null},m.readAsDataURL(l)}else{var g=o.URL||o.webkitURL,_=g.createObjectURL(l);h?h.location=_:location.href=_,h=null,setTimeout(function(){g.revokeObjectURL(_)},4e4)}});o.saveAs=A.saveAs=A,r.exports=A})})(HI);function rn(r){return rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(r)}var $a=Uint8Array,ja=Uint16Array,Sg=Uint32Array,Iw=new $a([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Lw=new $a([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Yx=new $a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),b8=function(r,e){for(var t=new ja(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var i=new Sg(t[30]),n=1;n<30;++n)for(var a=t[n];a<t[n+1];++a)i[a]=a-t[n]<<5|n;return[t,i]},F8=b8(Iw,2),I8=F8[0],Wx=F8[1];I8[28]=258,Wx[258]=28;var L8=b8(Lw,0),nAt=L8[0],gN=L8[1],qx=new ja(32768);for(var Sn=0;Sn<32768;++Sn){var nu=(Sn&43690)>>>1|(Sn&21845)<<1;nu=(nu&52428)>>>2|(nu&13107)<<2,nu=(nu&61680)>>>4|(nu&3855)<<4,qx[Sn]=((nu&65280)>>>8|(nu&255)<<8)>>>1}var lA=function(r,e,t){for(var n=r.length,i=0,a=new ja(e);i<n;++i)++a[r[i]-1];var o=new ja(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(t){s=new ja(1<<e);var A=15-e;for(i=0;i<n;++i)if(r[i])for(var l=i<<4|r[i],u=e-r[i],c=o[r[i]-1]++<<u,h=c|(1<<u)-1;c<=h;++c)s[qx[c]>>>A]=l}else for(s=new ja(n),i=0;i<n;++i)s[i]=qx[o[r[i]-1]++]>>>15-r[i];return s},Xu=new $a(288);for(var Sn=0;Sn<144;++Sn)Xu[Sn]=8;for(var Sn=144;Sn<256;++Sn)Xu[Sn]=9;for(var Sn=256;Sn<280;++Sn)Xu[Sn]=7;for(var Sn=280;Sn<288;++Sn)Xu[Sn]=8;var bg=new $a(32);for(var Sn=0;Sn<32;++Sn)bg[Sn]=5;var iAt=lA(Xu,9,0),aAt=lA(Xu,9,1),oAt=lA(bg,5,0),sAt=lA(bg,5,1),XC=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},gs=function(r,e,t){var n=e/8>>0;return(r[n]|r[n+1]<<8)>>>(e&7)&t},YC=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},GI=function(r){return(r/8>>0)+(r&7&&1)},O8=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof ja?ja:r instanceof Sg?Sg:$a)(t-e);return n.set(r.subarray(e,t)),n},AAt=function(r,e,t){var n=r.length,i=!e||t,a=!t||t.i;t||(t={}),e||(e=new $a(n*3));var o=function(at){var vt=e.length;if(at>vt){var wt=new $a(Math.max(vt*2,at));wt.set(e),e=wt}},s=t.f||0,A=t.p||0,l=t.b||0,u=t.l,c=t.d,h=t.m,f=t.n,p=n*8;do{if(!u){t.f=s=gs(r,A,1);var v=gs(r,A+1,3);if(A+=3,v)if(v==1)u=aAt,c=sAt,h=9,f=5;else if(v==2){var E=gs(r,A,31)+257,B=gs(r,A+10,15)+4,L=E+gs(r,A+5,31)+1;A+=14;for(var O=new $a(L),b=new $a(19),T=0;T<B;++T)b[Yx[T]]=gs(r,A+T*3,7);A+=B*3;var F=XC(b),M=(1<<F)-1;if(!a&&A+L*(F+7)>p)break;for(var S=lA(b,F,1),T=0;T<L;){var x=S[gs(r,A,M)];A+=x&15;var m=x>>>4;if(m<16)O[T++]=m;else{var N=0,P=0;for(m==16?(P=3+gs(r,A,3),A+=2,N=O[T-1]):m==17?(P=3+gs(r,A,7),A+=3):m==18&&(P=11+gs(r,A,127),A+=7);P--;)O[T++]=N}}var Y=O.subarray(0,E),z=O.subarray(E);h=XC(Y),f=XC(z),u=lA(Y,h,1),c=lA(z,f,1)}else throw"invalid block type";else{var m=GI(A)+4,g=r[m-4]|r[m-3]<<8,_=m+g;if(_>n){if(a)throw"unexpected EOF";break}i&&o(l+g),e.set(r.subarray(m,_),l),t.b=l+=g,t.p=A=_*8;continue}if(A>p)throw"unexpected EOF"}i&&o(l+131072);for(var tt=(1<<h)-1,J=(1<<f)-1,nt=h+f+18;a||A+nt<p;){var N=u[YC(r,A)&tt],it=N>>>4;if(A+=N&15,A>p)throw"unexpected EOF";if(!N)throw"invalid length/literal";if(it<256)e[l++]=it;else if(it==256){u=null;break}else{var _t=it-254;if(it>264){var T=it-257,R=Iw[T];_t=gs(r,A,(1<<R)-1)+I8[T],A+=R}var $=c[YC(r,A)&J],K=$>>>4;if(!$)throw"invalid distance";A+=$&15;var z=nAt[K];if(K>3){var R=Lw[K];z+=YC(r,A)&(1<<R)-1,A+=R}if(A>p)throw"unexpected EOF";i&&o(l+131072);for(var q=l+_t;l<q;l+=4)e[l]=e[l-z],e[l+1]=e[l+1-z],e[l+2]=e[l+2-z],e[l+3]=e[l+3-z];l=q}}t.l=u,t.p=A,t.b=l,u&&(s=1,t.m=h,t.d=c,t.n=f)}while(!s);return l==e.length?e:O8(e,0,l)},QA=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8},Yd=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8,r[n+2]|=t>>>16},WC=function(r,e){for(var t=[],n=0;n<r.length;++n)r[n]&&t.push({s:n,f:r[n]});var i=t.length,a=t.slice();if(!i)return[new $a(0),0];if(i==1){var o=new $a(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(L,O){return L.f-O.f}),t.push({s:-1,f:25001});var s=t[0],A=t[1],l=0,u=1,c=2;for(t[0]={s:-1,f:s.f+A.f,l:s,r:A};u!=i-1;)s=t[t[l].f<t[c].f?l++:c++],A=t[l!=u&&t[l].f<t[c].f?l++:c++],t[u++]={s:-1,f:s.f+A.f,l:s,r:A};for(var h=a[0].s,n=1;n<i;++n)a[n].s>h&&(h=a[n].s);var f=new ja(h+1),p=Zx(t[u-1],f,0);if(p>e){var n=0,v=0,m=p-e,g=1<<m;for(a.sort(function(O,b){return f[b.s]-f[O.s]||O.f-b.f});n<i;++n){var _=a[n].s;if(f[_]>e)v+=g-(1<<p-f[_]),f[_]=e;else break}for(v>>>=m;v>0;){var E=a[n].s;f[E]<e?v-=1<<e-f[E]++-1:++n}for(;n>=0&&v;--n){var B=a[n].s;f[B]==e&&(--f[B],++v)}p=e}return[new $a(f),p]},Zx=function(r,e,t){return r.s==-1?Math.max(Zx(r.l,e,t+1),Zx(r.r,e,t+1)):e[r.s]=t},yN=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new ja(++e),n=0,i=r[0],a=1,o=function(A){t[n++]=A},s=1;s<=e;++s)if(r[s]==i&&s!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=r[s]}return[t.subarray(0,n),e]},Wd=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},W0=function(r,e,t){var n=t.length,i=GI(e+2);r[i]=n&255,r[i+1]=n>>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var a=0;a<n;++a)r[i+a+4]=t[a];return(i+4+n)*8},mN=function(r,e,t,n,i,a,o,s,A,l,u){QA(e,u++,t),++i[256];for(var c=WC(i,15),h=c[0],f=c[1],p=WC(a,15),v=p[0],m=p[1],g=yN(h),_=g[0],E=g[1],B=yN(v),L=B[0],O=B[1],b=new ja(19),T=0;T<_.length;++T)b[_[T]&31]++;for(var T=0;T<L.length;++T)b[L[T]&31]++;for(var F=WC(b,7),M=F[0],S=F[1],x=19;x>4&&!M[Yx[x-1]];--x);var N=l+5<<3,P=Wd(i,Xu)+Wd(a,bg)+o,Y=Wd(i,h)+Wd(a,v)+o+14+3*x+Wd(b,M)+(2*b[16]+3*b[17]+7*b[18]);if(N<=P&&N<=Y)return W0(e,u,r.subarray(A,A+l));var z,tt,J,nt;if(QA(e,u,1+(Y<P)),u+=2,Y<P){z=lA(h,f,0),tt=h,J=lA(v,m,0),nt=v;var it=lA(M,S,0);QA(e,u,E-257),QA(e,u+5,O-1),QA(e,u+10,x-4),u+=14;for(var T=0;T<x;++T)QA(e,u+3*T,M[Yx[T]]);u+=3*x;for(var _t=[_,L],R=0;R<2;++R)for(var $=_t[R],T=0;T<$.length;++T){var K=$[T]&31;QA(e,u,it[K]),u+=M[K],K>15&&(QA(e,u,$[T]>>>5&127),u+=$[T]>>>12)}}else z=iAt,tt=Xu,J=oAt,nt=bg;for(var T=0;T<s;++T)if(n[T]>255){var K=n[T]>>>18&31;Yd(e,u,z[K+257]),u+=tt[K+257],K>7&&(QA(e,u,n[T]>>>23&31),u+=Iw[K]);var q=n[T]&31;Yd(e,u,J[q]),u+=nt[q],q>3&&(Yd(e,u,n[T]>>>5&8191),u+=Lw[q])}else Yd(e,u,z[n[T]]),u+=tt[n[T]];return Yd(e,u,z[256]),u+tt[256]},lAt=new Sg([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),uAt=new $a(0),cAt=function(r,e,t,n,i,a){var o=r.length,s=new $a(n+o+5*(1+Math.floor(o/7e3))+i),A=s.subarray(n,s.length-i),l=0;if(!e||o<8)for(var u=0;u<=o;u+=65535){var c=u+65535;c<o?l=W0(A,l,r.subarray(u,c)):(A[u]=a,l=W0(A,l,r.subarray(u,o)))}else{for(var h=lAt[e-1],f=h>>>13,p=h&8191,v=(1<<t)-1,m=new ja(32768),g=new ja(v+1),_=Math.ceil(t/3),E=2*_,B=function(ut){return(r[ut]^r[ut+1]<<_^r[ut+2]<<E)&v},L=new Sg(25e3),O=new ja(288),b=new ja(32),T=0,F=0,u=0,M=0,S=0,x=0;u<o;++u){var N=B(u),P=u&32767,Y=g[N];if(m[P]=Y,g[N]=P,S<=u){var z=o-u;if((T>7e3||M>24576)&&z>423){l=mN(r,A,0,L,O,b,F,M,x,u-x,l),M=T=F=0,x=u;for(var tt=0;tt<286;++tt)O[tt]=0;for(var tt=0;tt<30;++tt)b[tt]=0}var J=2,nt=0,it=p,_t=P-Y&32767;if(z>2&&N==B(u-_t))for(var R=Math.min(f,z)-1,$=Math.min(32767,u),K=Math.min(258,z);_t<=$&&--it&&P!=Y;){if(r[u+J]==r[u+J-_t]){for(var q=0;q<K&&r[u+q]==r[u+q-_t];++q);if(q>J){if(J=q,nt=_t,q>R)break;for(var at=Math.min(_t,q-2),vt=0,tt=0;tt<at;++tt){var wt=u-_t+tt+32768&32767,W=m[wt],Ft=wt-W+32768&32767;Ft>vt&&(vt=Ft,Y=wt)}}}P=Y,Y=m[P],_t+=P-Y+32768&32767}if(nt){L[M++]=268435456|Wx[J]<<18|gN[nt];var Ot=Wx[J]&31,V=gN[nt]&31;F+=Iw[Ot]+Lw[V],++O[257+Ot],++b[V],S=u+J,++T}else L[M++]=r[u],++O[r[u]]}}l=mN(r,A,a,L,O,b,F,M,x,u-x,l),a||(l=W0(A,l,uAt))}return O8(s,0,n+GI(l)+i)},hAt=function(){var r=1,e=0;return{p:function(t){for(var n=r,i=e,a=t.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o<s;++o)n+=t[o],i+=n;n%=65521,i%=65521}r=n,e=i},d:function(){return(r>>>8<<16|(e&255)<<8|e>>>8)+((r&255)<<23)*2}}},fAt=function(r,e,t,n,i){return cAt(r,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):12+e.mem,t,n,!i)},pAt=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},dAt=function(r,e){var t=e.level,n=t==0?0:t<6?1:t==9?3:2;r[0]=120,r[1]=n<<6|(n?32-2*n:1)},vAt=function(r){if((r[0]&15)!=8||r[0]>>>4>7||(r[0]<<8|r[1])%31)throw"invalid zlib data";if(r[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Jx(r,e){e===void 0&&(e={});var t=hAt();t.p(r);var n=fAt(r,e,2,4);return dAt(n,e),pAt(n,n.length-4,t.d()),n}function gAt(r,e){return AAt((vAt(r),r.subarray(2,-4)),e)}/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
* CommitID 00000000
*
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
* 2015-2021 yWorks GmbH, http://www.yworks.com
* 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
* 2010 Aaron Spike, https://github.com/acspike
* 2012 Willow Systems Corporation, https://github.com/willowsystems
* 2012 Pablo Hess, https://github.com/pablohess
* 2012 Florian Jenett, https://github.com/fjenett
* 2013 Warren Weckesser, https://github.com/warrenweckesser
* 2013 Youssef Beddad, https://github.com/lifof
* 2013 Lee Driscoll, https://github.com/lsdriscoll
* 2013 Stefan Slonevskiy, https://github.com/stefslon
* 2013 Jeremy Morel, https://github.com/jmorel
* 2013 Christoph Hartmann, https://github.com/chris-rock
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
* 2014 James Makes, https://github.com/dollaruw
* 2014 Diego Casorran, https://github.com/diegocr
* 2014 Steven Spungin, https://github.com/Flamenco
* 2014 Kenneth Glassey, https://github.com/Gavvers
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Contributor(s):
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
* kim3er, mfo, alnorth, Flamenco
*/var Ge=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function qC(){Ge.console&&typeof Ge.console.log=="function"&&Ge.console.log.apply(Ge.console,arguments)}var cn={log:qC,warn:function(r){Ge.console&&(typeof Ge.console.warn=="function"?Ge.console.warn.apply(Ge.console,arguments):qC.call(null,arguments))},error:function(r){Ge.console&&(typeof Ge.console.error=="function"?Ge.console.error.apply(Ge.console,arguments):qC(r))}};function ZC(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){Oc(n.response,e,t)},n.onerror=function(){cn.error("could not download file")},n.send()}function _N(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Gm(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var jv,tS,Oc=Ge.saveAs||((typeof window>"u"?"undefined":rn(window))!=="object"||window!==Ge?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=Ge.URL||Ge.webkitURL,i=document.createElement("a");e=e||r.name||"download",i.download=e,i.rel="noopener",typeof r=="string"?(i.href=r,i.origin!==location.origin?_N(i.href)?ZC(r,e,t):Gm(i,i.target="_blank"):Gm(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){Gm(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(_N(r))ZC(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Gm(n)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:rn(a)!=="object"&&(cn.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob([String.fromCharCode(65279),i],{type:i.type}):i}(r,t),e)}:function(r,e,t,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return ZC(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(Ge.HTMLElement)||Ge.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":rn(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var u=s.result;u=o?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=u:location=u,n=null},s.readAsDataURL(r)}else{var A=Ge.URL||Ge.webkitURL,l=A.createObjectURL(r);n?n.location=l:location.href=l,n=null,setTimeout(function(){A.revokeObjectURL(l)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function R8(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],n=0;n<t.length;n++){var i=t[n].re,a=t[n].process,o=i.exec(r);o&&(e=a(o),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),A=this.g.toString(16),l=this.b.toString(16);return s.length==1&&(s="0"+s),A.length==1&&(A="0"+A),l.length==1&&(l="0"+l),"#"+s+A+l}}/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/function JC(r,e){var t=r[0],n=r[1],i=r[2],a=r[3];t=va(t,n,i,a,e[0],7,-680876936),a=va(a,t,n,i,e[1],12,-389564586),i=va(i,a,t,n,e[2],17,606105819),n=va(n,i,a,t,e[3],22,-1044525330),t=va(t,n,i,a,e[4],7,-176418897),a=va(a,t,n,i,e[5],12,1200080426),i=va(i,a,t,n,e[6],17,-1473231341),n=va(n,i,a,t,e[7],22,-45705983),t=va(t,n,i,a,e[8],7,1770035416),a=va(a,t,n,i,e[9],12,-1958414417),i=va(i,a,t,n,e[10],17,-42063),n=va(n,i,a,t,e[11],22,-1990404162),t=va(t,n,i,a,e[12],7,1804603682),a=va(a,t,n,i,e[13],12,-40341101),i=va(i,a,t,n,e[14],17,-1502002290),t=ga(t,n=va(n,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=ga(a,t,n,i,e[6],9,-1069501632),i=ga(i,a,t,n,e[11],14,643717713),n=ga(n,i,a,t,e[0],20,-373897302),t=ga(t,n,i,a,e[5],5,-701558691),a=ga(a,t,n,i,e[10],9,38016083),i=ga(i,a,t,n,e[15],14,-660478335),n=ga(n,i,a,t,e[4],20,-405537848),t=ga(t,n,i,a,e[9],5,568446438),a=ga(a,t,n,i,e[14],9,-1019803690),i=ga(i,a,t,n,e[3],14,-187363961),n=ga(n,i,a,t,e[8],20,1163531501),t=ga(t,n,i,a,e[13],5,-1444681467),a=ga(a,t,n,i,e[2],9,-51403784),i=ga(i,a,t,n,e[7],14,1735328473),t=ya(t,n=ga(n,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=ya(a,t,n,i,e[8],11,-2022574463),i=ya(i,a,t,n,e[11],16,1839030562),n=ya(n,i,a,t,e[14],23,-35309556),t=ya(t,n,i,a,e[1],4,-1530992060),a=ya(a,t,n,i,e[4],11,1272893353),i=ya(i,a,t,n,e[7],16,-155497632),n=ya(n,i,a,t,e[10],23,-1094730640),t=ya(t,n,i,a,e[13],4,681279174),a=ya(a,t,n,i,e[0],11,-358537222),i=ya(i,a,t,n,e[3],16,-722521979),n=ya(n,i,a,t,e[6],23,76029189),t=ya(t,n,i,a,e[9],4,-640364487),a=ya(a,t,n,i,e[12],11,-421815835),i=ya(i,a,t,n,e[15],16,530742520),t=ma(t,n=ya(n,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=ma(a,t,n,i,e[7],10,1126891415),i=ma(i,a,t,n,e[14],15,-1416354905),n=ma(n,i,a,t,e[5],21,-57434055),t=ma(t,n,i,a,e[12],6,1700485571),a=ma(a,t,n,i,e[3],10,-1894986606),i=ma(i,a,t,n,e[10],15,-1051523),n=ma(n,i,a,t,e[1],21,-2054922799),t=ma(t,n,i,a,e[8],6,1873313359),a=ma(a,t,n,i,e[15],10,-30611744),i=ma(i,a,t,n,e[6],15,-1560198380),n=ma(n,i,a,t,e[13],21,1309151649),t=ma(t,n,i,a,e[4],6,-145523070),a=ma(a,t,n,i,e[11],10,-1120210379),i=ma(i,a,t,n,e[2],15,718787259),n=ma(n,i,a,t,e[9],21,-343485551),r[0]=_u(t,r[0]),r[1]=_u(n,r[1]),r[2]=_u(i,r[2]),r[3]=_u(a,r[3])}function Ow(r,e,t,n,i,a){return e=_u(_u(e,r),_u(n,a)),_u(e<<i|e>>>32-i,t)}function va(r,e,t,n,i,a,o){return Ow(e&t|~e&n,r,e,i,a,o)}function ga(r,e,t,n,i,a,o){return Ow(e&n|t&~n,r,e,i,a,o)}function ya(r,e,t,n,i,a,o){return Ow(e^t^n,r,e,i,a,o)}function ma(r,e,t,n,i,a,o){return Ow(t^(e|~n),r,e,i,a,o)}function M8(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)JC(n,yAt(r.substring(e-64,e)));r=r.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r.length;e++)i[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(JC(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,JC(n,i),n}function yAt(r){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return t}jv=Ge.atob.bind(Ge),tS=Ge.btoa.bind(Ge);var wN="0123456789abcdef".split("");function mAt(r){for(var e="",t=0;t<4;t++)e+=wN[r>>8*t+4&15]+wN[r>>8*t&15];return e}function _At(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function eS(r){return M8(r).map(_At).join("")}var wAt=function(r){for(var e=0;e<r.length;e++)r[e]=mAt(r[e]);return r.join("")}(M8("hello"))!="5d41402abc4b2a76b9719d911017c592";function _u(r,e){if(wAt){var t=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(t>>16)<<16|65535&t}return r+e&4294967295}/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/function rS(r,e){var t,n,i,a;if(r!==t){for(var o=(i=r,a=1+(256/r.length>>0),new Array(a+1).join(i)),s=[],A=0;A<256;A++)s[A]=A;var l=0;for(A=0;A<256;A++){var u=s[A];l=(l+u+o.charCodeAt(A))%256,s[A]=s[l],s[l]=u}t=r,n=s}else s=n;var c=e.length,h=0,f=0,p="";for(A=0;A<c;A++)f=(f+(u=s[h=(h+1)%256]))%256,s[h]=s[f],s[f]=u,o=s[(s[h]+s[f])%256],p+=String.fromCharCode(e.charCodeAt(A)^o);return p}/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var EN={print:4,modify:8,copy:16,"annot-forms":32};function Hf(r,e,t,n){this.v=1,this.r=2;var i=192;r.forEach(function(s){if(EN.perm!==void 0)throw new Error("Invalid permission: "+s);i+=EN[s]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var a=(e+this.padding).substr(0,32),o=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=eS(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=rS(this.encryptionKey,this.padding)}function Gf(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",t=r.length,n=0;n<t;n++){var i=r.charCodeAt(n);i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?e+="#"+("0"+i.toString(16)).slice(-2):e+=r[n]}return e}function CN(r){if(rn(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,n,i){if(i=i||!1,typeof t!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var a=Math.random().toString(35);return e[t][a]=[n,!!i],a},this.unsubscribe=function(t){for(var n in e)if(e[n][t])return delete e[n][t],Object.keys(e[n]).length===0&&delete e[n],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in e[t]){var o=e[t][a];try{o[0].apply(r,n)}catch(s){Ge.console&&cn.error("jsPDF PubSub Error",s.message,s)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function J_(r){if(!(this instanceof J_))return new J_(r);var e="opacity,stroke-opacity".split(",");for(var t in r)r.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=r[t]);this.id="",this.objectNumber=-1}function N8(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function Pc(r,e,t,n,i){if(!(this instanceof Pc))return new Pc(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,N8.call(this,n,i)}function Jf(r,e,t,n,i){if(!(this instanceof Jf))return new Jf(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,N8.call(this,n,i)}function De(r){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],a=arguments[3],o=[],s=1,A=16,l="S",u=null;rn(r=r||{})==="object"&&(t=r.orientation,n=r.unit||n,i=r.format||i,a=r.compress||r.compressPdf||a,(u=r.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),s=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(A=r.floatPrecision),l=r.defaultPathOperation||"S"),o=r.filters||(a===!0?["FlateEncode"]:o),n=n||"mm",t=(""+(t||"P")).toLowerCase();var c=r.putOnlyUsedFonts||!1,h={},f={internal:{},__private__:{}};f.__private__.PubSub=CN;var p="1.3",v=f.__private__.getPdfVersion=function(){return p};f.__private__.setPdfVersion=function(w){p=w};var m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return m};var g=f.__private__.getPageFormat=function(w){return m[w]};i=i||"a4";var _={COMPAT:"compat",ADVANCED:"advanced"},E=_.COMPAT;function B(){this.saveGraphicsState(),G(new Fe(zt,0,0,-zt,0,Nl()*zt).toString()+" cm"),this.setFontSize(this.getFontSize()/zt),l="n",E=_.ADVANCED}function L(){this.restoreGraphicsState(),l="S",E=_.COMPAT}var O=f.__private__.combineFontStyleAndFontWeight=function(w,D){if(w=="bold"&&D=="normal"||w=="bold"&&D==400||w=="normal"&&D=="italic"||w=="bold"&&D=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return D&&(w=D==400||D==="normal"?w==="italic"?"italic":"normal":D!=700&&D!=="bold"||w!=="normal"?(D==700?"bold":D)+""+w:"bold"),w};f.advancedAPI=function(w){var D=E===_.COMPAT;return D&&B.call(this),typeof w!="function"||(w(this),D&&L.call(this)),this},f.compatAPI=function(w){var D=E===_.ADVANCED;return D&&L.call(this),typeof w!="function"||(w(this),D&&B.call(this)),this},f.isAdvancedAPI=function(){return E===_.ADVANCED};var b,T=function(w){if(E!==_.ADVANCED)throw new Error(w+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},F=f.roundToPrecision=f.__private__.roundToPrecision=function(w,D){var et=e||D;if(isNaN(w)||isNaN(et))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return w.toFixed(et).replace(/0+$/,"")};b=f.hpf=f.__private__.hpf=typeof A=="number"?function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.hpf");return F(w,A)}:A==="smart"?function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.hpf");return F(w,w>-1&&w<1?16:5)}:function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.hpf");return F(w,16)};var M=f.f2=f.__private__.f2=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.f2");return F(w,2)},S=f.__private__.f3=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.f3");return F(w,3)},x=f.scale=f.__private__.scale=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.scale");return E===_.COMPAT?w*zt:E===_.ADVANCED?w:void 0},N=function(w){return E===_.COMPAT?Nl()-w:E===_.ADVANCED?w:void 0},P=function(w){return x(N(w))};f.__private__.setPrecision=f.setPrecision=function(w){typeof parseInt(w,10)=="number"&&(e=parseInt(w,10))};var Y,z="00000000000000000000000000000000",tt=f.__private__.getFileId=function(){return z},J=f.__private__.setFileId=function(w){return z=w!==void 0&&/^[a-fA-F0-9]{32}$/.test(w)?w.toUpperCase():z.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(fa=new Hf(u.userPermissions,u.userPassword,u.ownerPassword,z)),z};f.setFileId=function(w){return J(w),this},f.getFileId=function(){return tt()};var nt=f.__private__.convertDateToPDFDate=function(w){var D=w.getTimezoneOffset(),et=D<0?"+":"-",lt=Math.floor(Math.abs(D/60)),Ct=Math.abs(D%60),Rt=[et,K(lt),"'",K(Ct),"'"].join("");return["D:",w.getFullYear(),K(w.getMonth()+1),K(w.getDate()),K(w.getHours()),K(w.getMinutes()),K(w.getSeconds()),Rt].join("")},it=f.__private__.convertPDFDateToDate=function(w){var D=parseInt(w.substr(2,4),10),et=parseInt(w.substr(6,2),10)-1,lt=parseInt(w.substr(8,2),10),Ct=parseInt(w.substr(10,2),10),Rt=parseInt(w.substr(12,2),10),Kt=parseInt(w.substr(14,2),10);return new Date(D,et,lt,Ct,Rt,Kt,0)},_t=f.__private__.setCreationDate=function(w){var D;if(w===void 0&&(w=new Date),w instanceof Date)D=nt(w);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(w))throw new Error("Invalid argument passed to jsPDF.setCreationDate");D=w}return Y=D},R=f.__private__.getCreationDate=function(w){var D=Y;return w==="jsDate"&&(D=it(Y)),D};f.setCreationDate=function(w){return _t(w),this},f.getCreationDate=function(w){return R(w)};var $,K=f.__private__.padd2=function(w){return("0"+parseInt(w)).slice(-2)},q=f.__private__.padd2Hex=function(w){return("00"+(w=w.toString())).substr(w.length)},at=0,vt=[],wt=[],W=0,Ft=[],Ot=[],V=!1,Z=wt,ut=function(){at=0,W=0,wt=[],vt=[],Ft=[],Ae=Jr(),ht=Jr()};f.__private__.setCustomOutputDestination=function(w){V=!0,Z=w};var rt=function(w){V||(Z=w)};f.__private__.resetCustomOutputDestination=function(){V=!1,Z=wt};var G=f.__private__.out=function(w){return w=w.toString(),W+=w.length+1,Z.push(w),Z},St=f.__private__.write=function(w){return G(arguments.length===1?w.toString():Array.prototype.join.call(arguments," "))},bt=f.__private__.getArrayBuffer=function(w){for(var D=w.length,et=new ArrayBuffer(D),lt=new Uint8Array(et);D--;)lt[D]=w.charCodeAt(D);return et},dt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];f.__private__.getStandardFonts=function(){return dt};var Et=r.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(w){return Et=E===_.ADVANCED?w/zt:w,this};var yt,xt=f.__private__.getFontSize=f.getFontSize=function(){return E===_.COMPAT?Et:Et*zt},It=r.R2L||!1;f.__private__.setR2L=f.setR2L=function(w){return It=w,this},f.__private__.getR2L=f.getR2L=function(){return It};var Mt,Vt=f.__private__.setZoomMode=function(w){var D=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(w))yt=w;else if(isNaN(w)){if(D.indexOf(w)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+w+'" is not recognized.');yt=w}else yt=parseInt(w,10)};f.__private__.getZoomMode=function(){return yt};var Yt,ae=f.__private__.setPageMode=function(w){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(w)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+w+'" is not recognized.');Mt=w};f.__private__.getPageMode=function(){return Mt};var re=f.__private__.setLayoutMode=function(w){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(w)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+w+'" is not recognized.');Yt=w};f.__private__.getLayoutMode=function(){return Yt},f.__private__.setDisplayMode=f.setDisplayMode=function(w,D,et){return Vt(w),re(D),ae(et),this};var Wt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(w){if(Object.keys(Wt).indexOf(w)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Wt[w]},f.__private__.getDocumentProperties=function(){return Wt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(w){for(var D in Wt)Wt.hasOwnProperty(D)&&w[D]&&(Wt[D]=w[D]);return this},f.__private__.setDocumentProperty=function(w,D){if(Object.keys(Wt).indexOf(w)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Wt[w]=D};var se,zt,We,Me,dr,Ie={},be={},An=[],Ar={},xi={},Tr={},hi={},Vr=null,Kr=0,Ne=[],Er=new CN(f),Yn=r.hotfixes||[],dn={},Si={},bi=[],Fe=function w(D,et,lt,Ct,Rt,Kt){if(!(this instanceof w))return new w(D,et,lt,Ct,Rt,Kt);isNaN(D)&&(D=1),isNaN(et)&&(et=0),isNaN(lt)&&(lt=0),isNaN(Ct)&&(Ct=1),isNaN(Rt)&&(Rt=0),isNaN(Kt)&&(Kt=0),this._matrix=[D,et,lt,Ct,Rt,Kt]};Object.defineProperty(Fe.prototype,"sx",{get:function(){return this._matrix[0]},set:function(w){this._matrix[0]=w}}),Object.defineProperty(Fe.prototype,"shy",{get:function(){return this._matrix[1]},set:function(w){this._matrix[1]=w}}),Object.defineProperty(Fe.prototype,"shx",{get:function(){return this._matrix[2]},set:function(w){this._matrix[2]=w}}),Object.defineProperty(Fe.prototype,"sy",{get:function(){return this._matrix[3]},set:function(w){this._matrix[3]=w}}),Object.defineProperty(Fe.prototype,"tx",{get:function(){return this._matrix[4]},set:function(w){this._matrix[4]=w}}),Object.defineProperty(Fe.prototype,"ty",{get:function(){return this._matrix[5]},set:function(w){this._matrix[5]=w}}),Object.defineProperty(Fe.prototype,"a",{get:function(){return this._matrix[0]},set:function(w){this._matrix[0]=w}}),Object.defineProperty(Fe.prototype,"b",{get:function(){return this._matrix[1]},set:function(w){this._matrix[1]=w}}),Object.defineProperty(Fe.prototype,"c",{get:function(){return this._matrix[2]},set:function(w){this._matrix[2]=w}}),Object.defineProperty(Fe.prototype,"d",{get:function(){return this._matrix[3]},set:function(w){this._matrix[3]=w}}),Object.defineProperty(Fe.prototype,"e",{get:function(){return this._matrix[4]},set:function(w){this._matrix[4]=w}}),Object.defineProperty(Fe.prototype,"f",{get:function(){return this._matrix[5]},set:function(w){this._matrix[5]=w}}),Object.defineProperty(Fe.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Fe.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Fe.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Fe.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Fe.prototype.join=function(w){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(b).join(w)},Fe.prototype.multiply=function(w){var D=w.sx*this.sx+w.shy*this.shx,et=w.sx*this.shy+w.shy*this.sy,lt=w.shx*this.sx+w.sy*this.shx,Ct=w.shx*this.shy+w.sy*this.sy,Rt=w.tx*this.sx+w.ty*this.shx+this.tx,Kt=w.tx*this.shy+w.ty*this.sy+this.ty;return new Fe(D,et,lt,Ct,Rt,Kt)},Fe.prototype.decompose=function(){var w=this.sx,D=this.shy,et=this.shx,lt=this.sy,Ct=this.tx,Rt=this.ty,Kt=Math.sqrt(w*w+D*D),ne=(w/=Kt)*et+(D/=Kt)*lt;et-=w*ne,lt-=D*ne;var Le=Math.sqrt(et*et+lt*lt);return ne/=Le,w*(lt/=Le)<D*(et/=Le)&&(w=-w,D=-D,ne=-ne,Kt=-Kt),{scale:new Fe(Kt,0,0,Le,0,0),translate:new Fe(1,0,0,1,Ct,Rt),rotate:new Fe(w,D,-D,w,0,0),skew:new Fe(1,0,ne,1,0,0)}},Fe.prototype.toString=function(w){return this.join(" ")},Fe.prototype.inversed=function(){var w=this.sx,D=this.shy,et=this.shx,lt=this.sy,Ct=this.tx,Rt=this.ty,Kt=1/(w*lt-D*et),ne=lt*Kt,Le=-D*Kt,cr=-et*Kt,ze=w*Kt;return new Fe(ne,Le,cr,ze,-ne*Ct-cr*Rt,-Le*Ct-ze*Rt)},Fe.prototype.applyToPoint=function(w){var D=w.x*this.sx+w.y*this.shx+this.tx,et=w.x*this.shy+w.y*this.sy+this.ty;return new qh(D,et)},Fe.prototype.applyToRectangle=function(w){var D=this.applyToPoint(w),et=this.applyToPoint(new qh(w.x+w.w,w.y+w.h));return new Ed(D.x,D.y,et.x-D.x,et.y-D.y)},Fe.prototype.clone=function(){var w=this.sx,D=this.shy,et=this.shx,lt=this.sy,Ct=this.tx,Rt=this.ty;return new Fe(w,D,et,lt,Ct,Rt)},f.Matrix=Fe;var fi=f.matrixMult=function(w,D){return D.multiply(w)},Qn=new Fe(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Qn;var Fi=function(w,D){if(!xi[w]){var et=(D instanceof Pc?"Sh":"P")+(Object.keys(Ar).length+1).toString(10);D.id=et,xi[w]=et,Ar[et]=D,Er.publish("addPattern",D)}};f.ShadingPattern=Pc,f.TilingPattern=Jf,f.addShadingPattern=function(w,D){return T("addShadingPattern()"),Fi(w,D),this},f.beginTilingPattern=function(w){T("beginTilingPattern()"),jy(w.boundingBox[0],w.boundingBox[1],w.boundingBox[2]-w.boundingBox[0],w.boundingBox[3]-w.boundingBox[1],w.matrix)},f.endTilingPattern=function(w,D){T("endTilingPattern()"),D.stream=Ot[$].join(`
`),Fi(w,D),Er.publish("endTilingPattern",D),bi.pop().restore()};var nn=f.__private__.newObject=function(){var w=Jr();return Bn(w,!0),w},Jr=f.__private__.newObjectDeferred=function(){return at++,vt[at]=function(){return W},at},Bn=function(w,D){return D=typeof D=="boolean"&&D,vt[w]=W,D&&G(w+" 0 obj"),w},wo=f.__private__.newAdditionalObject=function(){var w={objId:Jr(),content:""};return Ft.push(w),w},Ae=Jr(),ht=Jr(),Ht=f.__private__.decodeColorString=function(w){var D=w.split(" ");if(D.length!==2||D[1]!=="g"&&D[1]!=="G")D.length===5&&(D[4]==="k"||D[4]==="K")&&(D=[(1-D[0])*(1-D[3]),(1-D[1])*(1-D[3]),(1-D[2])*(1-D[3]),"r"]);else{var et=parseFloat(D[0]);D=[et,et,et,"r"]}for(var lt="#",Ct=0;Ct<3;Ct++)lt+=("0"+Math.floor(255*parseFloat(D[Ct])).toString(16)).slice(-2);return lt},Zt=f.__private__.encodeColorString=function(w){var D;typeof w=="string"&&(w={ch1:w});var et=w.ch1,lt=w.ch2,Ct=w.ch3,Rt=w.ch4,Kt=w.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof et=="string"&&et.charAt(0)!=="#"){var ne=new R8(et);if(ne.ok)et=ne.toHex();else if(!/^\d*\.?\d*$/.test(et))throw new Error('Invalid color "'+et+'" passed to jsPDF.encodeColorString.')}if(typeof et=="string"&&/^#[0-9A-Fa-f]{3}$/.test(et)&&(et="#"+et[1]+et[1]+et[2]+et[2]+et[3]+et[3]),typeof et=="string"&&/^#[0-9A-Fa-f]{6}$/.test(et)){var Le=parseInt(et.substr(1),16);et=Le>>16&255,lt=Le>>8&255,Ct=255&Le}if(lt===void 0||Rt===void 0&&et===lt&&lt===Ct)if(typeof et=="string")D=et+" "+Kt[0];else switch(w.precision){case 2:D=M(et/255)+" "+Kt[0];break;case 3:default:D=S(et/255)+" "+Kt[0]}else if(Rt===void 0||rn(Rt)==="object"){if(Rt&&!isNaN(Rt.a)&&Rt.a===0)return D=["1.","1.","1.",Kt[1]].join(" ");if(typeof et=="string")D=[et,lt,Ct,Kt[1]].join(" ");else switch(w.precision){case 2:D=[M(et/255),M(lt/255),M(Ct/255),Kt[1]].join(" ");break;default:case 3:D=[S(et/255),S(lt/255),S(Ct/255),Kt[1]].join(" ")}}else if(typeof et=="string")D=[et,lt,Ct,Rt,Kt[2]].join(" ");else switch(w.precision){case 2:D=[M(et),M(lt),M(Ct),M(Rt),Kt[2]].join(" ");break;case 3:default:D=[S(et),S(lt),S(Ct),S(Rt),Kt[2]].join(" ")}return D},rr=f.__private__.getFilters=function(){return o},Mr=f.__private__.putStream=function(w){var D=(w=w||{}).data||"",et=w.filters||rr(),lt=w.alreadyAppliedFilters||[],Ct=w.addLength1||!1,Rt=D.length,Kt=w.objectId,ne=function(pa){return pa};if(u!==null&&Kt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(ne=fa.encryptor(Kt,0));var Le={};et===!0&&(et=["FlateEncode"]);var cr=w.additionalKeyValues||[],ze=(Le=De.API.processDataByFilters!==void 0?De.API.processDataByFilters(D,et):{data:D,reverseChain:[]}).reverseChain+(Array.isArray(lt)?lt.join(" "):lt.toString());if(Le.data.length!==0&&(cr.push({key:"Length",value:Le.data.length}),Ct===!0&&cr.push({key:"Length1",value:Rt})),ze.length!=0)if(ze.split("/").length-1==1)cr.push({key:"Filter",value:ze});else{cr.push({key:"Filter",value:"["+ze+"]"});for(var xr=0;xr<cr.length;xr+=1)if(cr[xr].key==="DecodeParms"){for(var ea=[],qn=0;qn<Le.reverseChain.split("/").length-1;qn+=1)ea.push("null");ea.push(cr[xr].value),cr[xr].value="["+ea.join(" ")+"]"}}G("<<");for(var pi=0;pi<cr.length;pi++)G("/"+cr[pi].key+" "+cr[pi].value);G(">>"),Le.data.length!==0&&(G("stream"),G(ne(Le.data)),G("endstream"))},ln=f.__private__.putPage=function(w){var D=w.number,et=w.data,lt=w.objId,Ct=w.contentsObjId;Bn(lt,!0),G("<</Type /Page"),G("/Parent "+w.rootDictionaryObjId+" 0 R"),G("/Resources "+w.resourceDictionaryObjId+" 0 R"),G("/MediaBox ["+parseFloat(b(w.mediaBox.bottomLeftX))+" "+parseFloat(b(w.mediaBox.bottomLeftY))+" "+b(w.mediaBox.topRightX)+" "+b(w.mediaBox.topRightY)+"]"),w.cropBox!==null&&G("/CropBox ["+b(w.cropBox.bottomLeftX)+" "+b(w.cropBox.bottomLeftY)+" "+b(w.cropBox.topRightX)+" "+b(w.cropBox.topRightY)+"]"),w.bleedBox!==null&&G("/BleedBox ["+b(w.bleedBox.bottomLeftX)+" "+b(w.bleedBox.bottomLeftY)+" "+b(w.bleedBox.topRightX)+" "+b(w.bleedBox.topRightY)+"]"),w.trimBox!==null&&G("/TrimBox ["+b(w.trimBox.bottomLeftX)+" "+b(w.trimBox.bottomLeftY)+" "+b(w.trimBox.topRightX)+" "+b(w.trimBox.topRightY)+"]"),w.artBox!==null&&G("/ArtBox ["+b(w.artBox.bottomLeftX)+" "+b(w.artBox.bottomLeftY)+" "+b(w.artBox.topRightX)+" "+b(w.artBox.topRightY)+"]"),typeof w.userUnit=="number"&&w.userUnit!==1&&G("/UserUnit "+w.userUnit),Er.publish("putPage",{objId:lt,pageContext:Ne[D],pageNumber:D,page:et}),G("/Contents "+Ct+" 0 R"),G(">>"),G("endobj");var Rt=et.join(`
`);return E===_.ADVANCED&&(Rt+=`
Q`),Bn(Ct,!0),Mr({data:Rt,filters:rr(),objectId:Ct}),G("endobj"),lt},Tn=f.__private__.putPages=function(){var w,D,et=[];for(w=1;w<=Kr;w++)Ne[w].objId=Jr(),Ne[w].contentsObjId=Jr();for(w=1;w<=Kr;w++)et.push(ln({number:w,data:Ot[w],objId:Ne[w].objId,contentsObjId:Ne[w].contentsObjId,mediaBox:Ne[w].mediaBox,cropBox:Ne[w].cropBox,bleedBox:Ne[w].bleedBox,trimBox:Ne[w].trimBox,artBox:Ne[w].artBox,userUnit:Ne[w].userUnit,rootDictionaryObjId:Ae,resourceDictionaryObjId:ht}));Bn(Ae,!0),G("<</Type /Pages");var lt="/Kids [";for(D=0;D<Kr;D++)lt+=et[D]+" 0 R ";G(lt+"]"),G("/Count "+Kr),G(">>"),G("endobj"),Er.publish("postPutPages")},os=function(w){Er.publish("putFont",{font:w,out:G,newObject:nn,putStream:Mr}),w.isAlreadyPutted!==!0&&(w.objectNumber=nn(),G("<<"),G("/Type /Font"),G("/BaseFont /"+Gf(w.postScriptName)),G("/Subtype /Type1"),typeof w.encoding=="string"&&G("/Encoding /"+w.encoding),G("/FirstChar 32"),G("/LastChar 255"),G(">>"),G("endobj"))},Ii=function(){for(var w in Ie)Ie.hasOwnProperty(w)&&(c===!1||c===!0&&h.hasOwnProperty(w))&&os(Ie[w])},TA=function(w){w.objectNumber=nn();var D=[];D.push({key:"Type",value:"/XObject"}),D.push({key:"Subtype",value:"/Form"}),D.push({key:"BBox",value:"["+[b(w.x),b(w.y),b(w.x+w.width),b(w.y+w.height)].join(" ")+"]"}),D.push({key:"Matrix",value:"["+w.matrix.toString()+"]"});var et=w.pages[1].join(`
`);Mr({data:et,additionalKeyValues:D,objectId:w.objectNumber}),G("endobj")},Ll=function(){for(var w in dn)dn.hasOwnProperty(w)&&TA(dn[w])},cd=function(w,D){var et,lt=[],Ct=1/(D-1);for(et=0;et<1;et+=Ct)lt.push(et);if(lt.push(1),w[0].offset!=0){var Rt={offset:0,color:w[0].color};w.unshift(Rt)}if(w[w.length-1].offset!=1){var Kt={offset:1,color:w[w.length-1].color};w.push(Kt)}for(var ne="",Le=0,cr=0;cr<lt.length;cr++){for(et=lt[cr];et>w[Le+1].offset;)Le++;var ze=w[Le].offset,xr=(et-ze)/(w[Le+1].offset-ze),ea=w[Le].color,qn=w[Le+1].color;ne+=q(Math.round((1-xr)*ea[0]+xr*qn[0]).toString(16))+q(Math.round((1-xr)*ea[1]+xr*qn[1]).toString(16))+q(Math.round((1-xr)*ea[2]+xr*qn[2]).toString(16))}return ne.trim()},yE=function(w,D){D||(D=21);var et=nn(),lt=cd(w.colors,D),Ct=[];Ct.push({key:"FunctionType",value:"0"}),Ct.push({key:"Domain",value:"[0.0 1.0]"}),Ct.push({key:"Size",value:"["+D+"]"}),Ct.push({key:"BitsPerSample",value:"8"}),Ct.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ct.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Mr({data:lt,additionalKeyValues:Ct,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:et}),G("endobj"),w.objectNumber=nn(),G("<< /ShadingType "+w.type),G("/ColorSpace /DeviceRGB");var Rt="/Coords ["+b(parseFloat(w.coords[0]))+" "+b(parseFloat(w.coords[1]))+" ";w.type===2?Rt+=b(parseFloat(w.coords[2]))+" "+b(parseFloat(w.coords[3])):Rt+=b(parseFloat(w.coords[2]))+" "+b(parseFloat(w.coords[3]))+" "+b(parseFloat(w.coords[4]))+" "+b(parseFloat(w.coords[5])),G(Rt+="]"),w.matrix&&G("/Matrix ["+w.matrix.toString()+"]"),G("/Function "+et+" 0 R"),G("/Extend [true true]"),G(">>"),G("endobj")},mE=function(w,D){var et=Jr(),lt=nn();D.push({resourcesOid:et,objectOid:lt}),w.objectNumber=lt;var Ct=[];Ct.push({key:"Type",value:"/Pattern"}),Ct.push({key:"PatternType",value:"1"}),Ct.push({key:"PaintType",value:"1"}),Ct.push({key:"TilingType",value:"1"}),Ct.push({key:"BBox",value:"["+w.boundingBox.map(b).join(" ")+"]"}),Ct.push({key:"XStep",value:b(w.xStep)}),Ct.push({key:"YStep",value:b(w.yStep)}),Ct.push({key:"Resources",value:et+" 0 R"}),w.matrix&&Ct.push({key:"Matrix",value:"["+w.matrix.toString()+"]"}),Mr({data:w.stream,additionalKeyValues:Ct,objectId:w.objectNumber}),G("endobj")},$h=function(w){var D;for(D in Ar)Ar.hasOwnProperty(D)&&(Ar[D]instanceof Pc?yE(Ar[D]):Ar[D]instanceof Jf&&mE(Ar[D],w))},Sy=function(w){for(var D in w.objectNumber=nn(),G("<<"),w)switch(D){case"opacity":G("/ca "+M(w[D]));break;case"stroke-opacity":G("/CA "+M(w[D]))}G(">>"),G("endobj")},_E=function(){var w;for(w in Tr)Tr.hasOwnProperty(w)&&Sy(Tr[w])},hd=function(){for(var w in G("/XObject <<"),dn)dn.hasOwnProperty(w)&&dn[w].objectNumber>=0&&G("/"+w+" "+dn[w].objectNumber+" 0 R");Er.publish("putXobjectDict"),G(">>")},wE=function(){fa.oid=nn(),G("<<"),G("/Filter /Standard"),G("/V "+fa.v),G("/R "+fa.r),G("/U <"+fa.toHexString(fa.U)+">"),G("/O <"+fa.toHexString(fa.O)+">"),G("/P "+fa.P),G(">>"),G("endobj")},by=function(){for(var w in G("/Font <<"),Ie)Ie.hasOwnProperty(w)&&(c===!1||c===!0&&h.hasOwnProperty(w))&&G("/"+w+" "+Ie[w].objectNumber+" 0 R");G(">>")},EE=function(){if(Object.keys(Ar).length>0){for(var w in G("/Shading <<"),Ar)Ar.hasOwnProperty(w)&&Ar[w]instanceof Pc&&Ar[w].objectNumber>=0&&G("/"+w+" "+Ar[w].objectNumber+" 0 R");Er.publish("putShadingPatternDict"),G(">>")}},jh=function(w){if(Object.keys(Ar).length>0){for(var D in G("/Pattern <<"),Ar)Ar.hasOwnProperty(D)&&Ar[D]instanceof f.TilingPattern&&Ar[D].objectNumber>=0&&Ar[D].objectNumber<w&&G("/"+D+" "+Ar[D].objectNumber+" 0 R");Er.publish("putTilingPatternDict"),G(">>")}},CE=function(){if(Object.keys(Tr).length>0){var w;for(w in G("/ExtGState <<"),Tr)Tr.hasOwnProperty(w)&&Tr[w].objectNumber>=0&&G("/"+w+" "+Tr[w].objectNumber+" 0 R");Er.publish("putGStateDict"),G(">>")}},Wn=function(w){Bn(w.resourcesOid,!0),G("<<"),G("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),by(),EE(),jh(w.objectOid),CE(),hd(),G(">>"),G("endobj")},Fy=function(){var w=[];Ii(),_E(),Ll(),$h(w),Er.publish("putResources"),w.forEach(Wn),Wn({resourcesOid:ht,objectOid:Number.MAX_SAFE_INTEGER}),Er.publish("postPutResources")},Iy=function(){Er.publish("putAdditionalObjects");for(var w=0;w<Ft.length;w++){var D=Ft[w];Bn(D.objId,!0),G(D.content),G("endobj")}Er.publish("postPutAdditionalObjects")},Ly=function(w){be[w.fontName]=be[w.fontName]||{},be[w.fontName][w.fontStyle]=w.id},fd=function(w,D,et,lt,Ct){var Rt={id:"F"+(Object.keys(Ie).length+1).toString(10),postScriptName:w,fontName:D,fontStyle:et,encoding:lt,isStandardFont:Ct||!1,metadata:{}};return Er.publish("addFont",{font:Rt,instance:this}),Ie[Rt.id]=Rt,Ly(Rt),Rt.id},BE=function(w){for(var D=0,et=dt.length;D<et;D++){var lt=fd.call(this,w[D][0],w[D][1],w[D][2],dt[D][3],!0);c===!1&&(h[lt]=!0);var Ct=w[D][0].split("-");Ly({id:lt,fontName:Ct[0],fontStyle:Ct[1]||""})}Er.publish("addFonts",{fonts:Ie,dictionary:be})},ss=function(w){return w.foo=function(){try{return w.apply(this,arguments)}catch(lt){var D=lt.stack||"";~D.indexOf(" at ")&&(D=D.split(" at ")[1]);var et="Error in function "+D.split(`
`)[0].split("<")[0]+": "+lt.message;if(!Ge.console)throw new Error(et);Ge.console.error(et,lt),Ge.alert&&alert(et)}},w.foo.bar=w,w.foo},Vh=function(w,D){var et,lt,Ct,Rt,Kt,ne,Le,cr,ze;if(Ct=(D=D||{}).sourceEncoding||"Unicode",Kt=D.outputEncoding,(D.autoencode||Kt)&&Ie[se].metadata&&Ie[se].metadata[Ct]&&Ie[se].metadata[Ct].encoding&&(Rt=Ie[se].metadata[Ct].encoding,!Kt&&Ie[se].encoding&&(Kt=Ie[se].encoding),!Kt&&Rt.codePages&&(Kt=Rt.codePages[0]),typeof Kt=="string"&&(Kt=Rt[Kt]),Kt)){for(Le=!1,ne=[],et=0,lt=w.length;et<lt;et++)(cr=Kt[w.charCodeAt(et)])?ne.push(String.fromCharCode(cr)):ne.push(w[et]),ne[et].charCodeAt(0)>>8&&(Le=!0);w=ne.join("")}for(et=w.length;Le===void 0&&et!==0;)w.charCodeAt(et-1)>>8&&(Le=!0),et--;if(!Le)return w;for(ne=D.noBOM?[]:[254,255],et=0,lt=w.length;et<lt;et++){if((ze=(cr=w.charCodeAt(et))>>8)>>8)throw new Error("Character at position "+et+" of string '"+w+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");ne.push(ze),ne.push(cr-(ze<<8))}return String.fromCharCode.apply(void 0,ne)},Wa=f.__private__.pdfEscape=f.pdfEscape=function(w,D){return Vh(w,D).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},pd=f.__private__.beginPage=function(w){Ot[++Kr]=[],Ne[Kr]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(w[0]),topRightY:Number(w[1])}},Ry(Kr),rt(Ot[$])},Oy=function(w,D){var et,lt,Ct;switch(t=D||t,typeof w=="string"&&(et=g(w.toLowerCase()),Array.isArray(et)&&(lt=et[0],Ct=et[1])),Array.isArray(w)&&(lt=w[0]*zt,Ct=w[1]*zt),isNaN(lt)&&(lt=i[0],Ct=i[1]),(lt>14400||Ct>14400)&&(cn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),lt=Math.min(14400,lt),Ct=Math.min(14400,Ct)),i=[lt,Ct],t.substr(0,1)){case"l":Ct>lt&&(i=[Ct,lt]);break;case"p":lt>Ct&&(i=[Ct,lt])}pd(i),Qy(yd),G(As),_d!==0&&G(_d+" J"),wd!==0&&G(wd+" j"),Er.publish("addPage",{pageNumber:Kr})},TE=function(w){w>0&&w<=Kr&&(Ot.splice(w,1),Ne.splice(w,1),Kr--,$>Kr&&($=Kr),this.setPage($))},Ry=function(w){w>0&&w<=Kr&&($=w)},xE=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return Ot.length-1},My=function(w,D,et){var lt,Ct=void 0;return et=et||{},w=w!==void 0?w:Ie[se].fontName,D=D!==void 0?D:Ie[se].fontStyle,lt=w.toLowerCase(),be[lt]!==void 0&&be[lt][D]!==void 0?Ct=be[lt][D]:be[w]!==void 0&&be[w][D]!==void 0?Ct=be[w][D]:et.disableWarning===!1&&cn.warn("Unable to look up font label for font '"+w+"', '"+D+"'. Refer to getFontList() for available fonts."),Ct||et.noFallback||(Ct=be.times[D])==null&&(Ct=be.times.normal),Ct},SE=f.__private__.putInfo=function(){var w=nn(),D=function(lt){return lt};for(var et in u!==null&&(D=fa.encryptor(w,0)),G("<<"),G("/Producer ("+Wa(D("jsPDF "+De.version))+")"),Wt)Wt.hasOwnProperty(et)&&Wt[et]&&G("/"+et.substr(0,1).toUpperCase()+et.substr(1)+" ("+Wa(D(Wt[et]))+")");G("/CreationDate ("+Wa(D(Y))+")"),G(">>"),G("endobj")},dd=f.__private__.putCatalog=function(w){var D=(w=w||{}).rootDictionaryObjId||Ae;switch(nn(),G("<<"),G("/Type /Catalog"),G("/Pages "+D+" 0 R"),yt||(yt="fullwidth"),yt){case"fullwidth":G("/OpenAction [3 0 R /FitH null]");break;case"fullheight":G("/OpenAction [3 0 R /FitV null]");break;case"fullpage":G("/OpenAction [3 0 R /Fit]");break;case"original":G("/OpenAction [3 0 R /XYZ null null 1]");break;default:var et=""+yt;et.substr(et.length-1)==="%"&&(yt=parseInt(yt)/100),typeof yt=="number"&&G("/OpenAction [3 0 R /XYZ null null "+M(yt)+"]")}switch(Yt||(Yt="continuous"),Yt){case"continuous":G("/PageLayout /OneColumn");break;case"single":G("/PageLayout /SinglePage");break;case"two":case"twoleft":G("/PageLayout /TwoColumnLeft");break;case"tworight":G("/PageLayout /TwoColumnRight")}Mt&&G("/PageMode /"+Mt),Er.publish("putCatalog"),G(">>"),G("endobj")},bE=f.__private__.putTrailer=function(){G("trailer"),G("<<"),G("/Size "+(at+1)),G("/Root "+at+" 0 R"),G("/Info "+(at-1)+" 0 R"),u!==null&&G("/Encrypt "+fa.oid+" 0 R"),G("/ID [ <"+z+"> <"+z+"> ]"),G(">>")},FE=f.__private__.putHeader=function(){G("%PDF-"+p),G("%ºß¬à")},IE=f.__private__.putXRef=function(){var w="0000000000";G("xref"),G("0 "+(at+1)),G("0000000000 65535 f ");for(var D=1;D<=at;D++)typeof vt[D]=="function"?G((w+vt[D]()).slice(-10)+" 00000 n "):vt[D]!==void 0?G((w+vt[D]).slice(-10)+" 00000 n "):G("0000000000 00000 n ")},xA=f.__private__.buildDocument=function(){ut(),rt(wt),Er.publish("buildDocument"),FE(),Tn(),Iy(),Fy(),u!==null&&wE(),SE(),dd();var w=W;return IE(),bE(),G("startxref"),G(""+w),G("%%EOF"),rt(Ot[$]),wt.join(`
`)},Kh=f.__private__.getBlob=function(w){return new Blob([bt(w)],{type:"application/pdf"})},zh=f.output=f.__private__.output=ss(function(w,D){switch(typeof(D=D||{})=="string"?D={filename:D}:D.filename=D.filename||"generated.pdf",w){case void 0:return xA();case"save":f.save(D.filename);break;case"arraybuffer":return bt(xA());case"blob":return Kh(xA());case"bloburi":case"bloburl":if(Ge.URL!==void 0&&typeof Ge.URL.createObjectURL=="function")return Ge.URL&&Ge.URL.createObjectURL(Kh(xA()))||void 0;cn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var et="",lt=xA();try{et=tS(lt)}catch{et=tS(unescape(encodeURIComponent(lt)))}return"data:application/pdf;filename="+D.filename+";base64,"+et;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ge)==="[object Window]"){var Ct='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+(D.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(D)+");<\/script></body></html>",Rt=Ge.open();return Rt!==null&&Rt.document.write(Ct),Rt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Ge)==="[object Window]"){var Kt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(D.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+D.filename+'" width="500px" height="400px" /></body></html>',ne=Ge.open();if(ne!==null){ne.document.write(Kt);var Le=this;ne.document.documentElement.querySelector("#pdfViewer").onload=function(){ne.document.title=D.filename,ne.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Le.output("bloburl"))}}return ne}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Ge)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var cr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",D)+'"></iframe></body></html>',ze=Ge.open();if(ze!==null&&(ze.document.write(cr),ze.document.title=D.filename),ze||typeof safari>"u")return ze;break;case"datauri":case"dataurl":return Ge.document.location.href=this.output("datauristring",D);default:return null}}),Ny=function(w){return Array.isArray(Yn)===!0&&Yn.indexOf(w)>-1};switch(n){case"pt":zt=1;break;case"mm":zt=72/25.4;break;case"cm":zt=72/2.54;break;case"in":zt=72;break;case"px":zt=Ny("px_scaling")==1?.75:96/72;break;case"pc":case"em":zt=12;break;case"ex":zt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);zt=n}var fa=null;_t(),J();var LE=function(w){return u!==null?fa.encryptor(w,0):function(D){return D}},Py=f.__private__.getPageInfo=f.getPageInfo=function(w){if(isNaN(w)||w%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Ne[w].objId,pageNumber:w,pageContext:Ne[w]}},Ve=f.__private__.getPageInfoByObjId=function(w){if(isNaN(w)||w%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var D in Ne)if(Ne[D].objId===w)break;return Py(D)},OE=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:Ne[$].objId,pageNumber:$,pageContext:Ne[$]}};f.addPage=function(){return Oy.apply(this,arguments),this},f.setPage=function(){return Ry.apply(this,arguments),rt.call(this,Ot[$]),this},f.insertPage=function(w){return this.addPage(),this.movePage($,w),this},f.movePage=function(w,D){var et,lt;if(w>D){et=Ot[w],lt=Ne[w];for(var Ct=w;Ct>D;Ct--)Ot[Ct]=Ot[Ct-1],Ne[Ct]=Ne[Ct-1];Ot[D]=et,Ne[D]=lt,this.setPage(D)}else if(w<D){et=Ot[w],lt=Ne[w];for(var Rt=w;Rt<D;Rt++)Ot[Rt]=Ot[Rt+1],Ne[Rt]=Ne[Rt+1];Ot[D]=et,Ne[D]=lt,this.setPage(D)}return this},f.deletePage=function(){return TE.apply(this,arguments),this},f.__private__.text=f.text=function(w,D,et,lt,Ct){var Rt,Kt,ne,Le,cr,ze,xr,ea,qn,pi=(lt=lt||{}).scope||this;if(typeof w=="number"&&typeof D=="number"&&(typeof et=="string"||Array.isArray(et))){var pa=et;et=D,D=w,w=pa}if(arguments[3]instanceof Fe?(T("The transform parameter of text() with a Matrix value"),qn=Ct):(ne=arguments[4],Le=arguments[5],rn(xr=arguments[3])==="object"&&xr!==null||(typeof ne=="string"&&(Le=ne,ne=null),typeof xr=="string"&&(Le=xr,xr=null),typeof xr=="number"&&(ne=xr,xr=null),lt={flags:xr,angle:ne,align:Le})),isNaN(D)||isNaN(et)||w==null)throw new Error("Invalid arguments passed to jsPDF.text");if(w.length===0)return pi;var ji="",ls=!1,Eo=typeof lt.lineHeightFactor=="number"?lt.lineHeightFactor:cc,bA=pi.internal.scaleFactor;function Vy(vn){return vn=vn.split(" ").join(Array(lt.TabLen||9).join(" ")),Wa(vn,xr)}function xd(vn){for(var gn,Zn=vn.concat(),Li=[],OA=Zn.length;OA--;)typeof(gn=Zn.shift())=="string"?Li.push(gn):Array.isArray(vn)&&(gn.length===1||gn[1]===void 0&&gn[2]===void 0)?Li.push(gn[0]):Li.push([gn[0],gn[1],gn[2]]);return Li}function Sd(vn,gn){var Zn;if(typeof vn=="string")Zn=gn(vn)[0];else if(Array.isArray(vn)){for(var Li,OA,Hl=vn.concat(),Af=[],zy=Hl.length;zy--;)typeof(Li=Hl.shift())=="string"?Af.push(gn(Li)[0]):Array.isArray(Li)&&typeof Li[0]=="string"&&(OA=gn(Li[0],Li[1],Li[2]),Af.push([OA[0],OA[1],OA[2]]));Zn=Af}return Zn}var Jh=!1,bd=!0;if(typeof w=="string")Jh=!0;else if(Array.isArray(w)){var Fd=w.concat();Kt=[];for(var tf,qa=Fd.length;qa--;)(typeof(tf=Fd.shift())!="string"||Array.isArray(tf)&&typeof tf[0]!="string")&&(bd=!1);Jh=bd}if(Jh===!1)throw new Error('Type of text must be string or Array. "'+w+'" is not recognized.');typeof w=="string"&&(w=w.match(/[\r?\n]/)?w.split(/\r\n|\r|\n/g):[w]);var ef=Et/pi.internal.scaleFactor,rf=ef*(Eo-1);switch(lt.baseline){case"bottom":et-=rf;break;case"top":et+=ef-rf;break;case"hanging":et+=ef-2*rf;break;case"middle":et+=ef/2-rf}if((ze=lt.maxWidth||0)>0&&(typeof w=="string"?w=pi.splitTextToSize(w,ze):Object.prototype.toString.call(w)==="[object Array]"&&(w=w.reduce(function(vn,gn){return vn.concat(pi.splitTextToSize(gn,ze))},[]))),Rt={text:w,x:D,y:et,options:lt,mutex:{pdfEscape:Wa,activeFontKey:se,fonts:Ie,activeFontSize:Et}},Er.publish("preProcessText",Rt),w=Rt.text,ne=(lt=Rt.options).angle,!(qn instanceof Fe)&&ne&&typeof ne=="number"){ne*=Math.PI/180,lt.rotationDirection===0&&(ne=-ne),E===_.ADVANCED&&(ne=-ne);var nf=Math.cos(ne),Id=Math.sin(ne);qn=new Fe(nf,Id,-Id,nf,0,0)}else ne&&ne instanceof Fe&&(qn=ne);E!==_.ADVANCED||qn||(qn=Qn),(cr=lt.charSpace||Wh)!==void 0&&(ji+=b(x(cr))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(ea=lt.horizontalScale)!==void 0&&(ji+=b(100*ea)+` Tz
`),lt.lang;var Za=-1,kE=lt.renderingMode!==void 0?lt.renderingMode:lt.stroke,Ld=pi.internal.getCurrentPageInfo().pageContext;switch(kE){case 0:case!1:case"fill":Za=0;break;case 1:case!0:case"stroke":Za=1;break;case 2:case"fillThenStroke":Za=2;break;case 3:case"invisible":Za=3;break;case 4:case"fillAndAddForClipping":Za=4;break;case 5:case"strokeAndAddPathForClipping":Za=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Za=6;break;case 7:case"addToPathForClipping":Za=7}var Ky=Ld.usedRenderingMode!==void 0?Ld.usedRenderingMode:-1;Za!==-1?ji+=Za+` Tr
`:Ky!==-1&&(ji+=`0 Tr
`),Za!==-1&&(Ld.usedRenderingMode=Za),Le=lt.align||"left";var us,Od=Et*Eo,$E=pi.internal.pageSize.getWidth(),jE=Ie[se];cr=lt.charSpace||Wh,ze=lt.maxWidth||0,xr=Object.assign({autoencode:!0,noBOM:!0},lt.flags);var Pl=[];if(Object.prototype.toString.call(w)==="[object Array]"){var Go;Kt=xd(w),Le!=="left"&&(us=Kt.map(function(vn){return pi.getStringUnitWidth(vn,{font:jE,charSpace:cr,fontSize:Et,doKerning:!1})*Et/bA}));var cs,Ul=0;if(Le==="right"){D-=us[0],w=[],qa=Kt.length;for(var Gs=0;Gs<qa;Gs++)Gs===0?(cs=SA(D),Go=Rl(et)):(cs=x(Ul-us[Gs]),Go=-Od),w.push([Kt[Gs],cs,Go]),Ul=us[Gs]}else if(Le==="center"){D-=us[0]/2,w=[],qa=Kt.length;for(var FA=0;FA<qa;FA++)FA===0?(cs=SA(D),Go=Rl(et)):(cs=x((Ul-us[FA])/2),Go=-Od),w.push([Kt[FA],cs,Go]),Ul=us[FA]}else if(Le==="left"){w=[],qa=Kt.length;for(var af=0;af<qa;af++)w.push(Kt[af])}else{if(Le!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');w=[],qa=Kt.length,ze=ze!==0?ze:$E;for(var hs=0;hs<qa;hs++)Go=hs===0?Rl(et):-Od,cs=hs===0?SA(D):0,hs<qa-1?Pl.push(b(x((ze-us[hs])/(Kt[hs].split(" ").length-1)))):Pl.push(0),w.push([Kt[hs],cs,Go])}}var of=typeof lt.R2L=="boolean"?lt.R2L:It;of===!0&&(w=Sd(w,function(vn,gn,Zn){return[vn.split("").reverse().join(""),gn,Zn]})),Rt={text:w,x:D,y:et,options:lt,mutex:{pdfEscape:Wa,activeFontKey:se,fonts:Ie,activeFontSize:Et}},Er.publish("postProcessText",Rt),w=Rt.text,ls=Rt.mutex.isHex||!1;var Rd=Ie[se].encoding;Rd!=="WinAnsiEncoding"&&Rd!=="StandardEncoding"||(w=Sd(w,function(vn,gn,Zn){return[Vy(vn),gn,Zn]})),Kt=xd(w),w=[];for(var Dl,fs,IA,pc=0,sf=1,dc=Array.isArray(Kt[0])?sf:pc,Ql="",Md=function(vn,gn,Zn){var Li="";return Zn instanceof Fe?(Zn=typeof lt.angle=="number"?fi(Zn,new Fe(1,0,0,1,vn,gn)):fi(new Fe(1,0,0,1,vn,gn),Zn),E===_.ADVANCED&&(Zn=fi(new Fe(1,0,0,-1,0,0),Zn)),Li=Zn.join(" ")+` Tm
`):Li=b(vn)+" "+b(gn)+` Td
`,Li},ko=0;ko<Kt.length;ko++){switch(Ql="",dc){case sf:IA=(ls?"<":"(")+Kt[ko][0]+(ls?">":")"),Dl=parseFloat(Kt[ko][1]),fs=parseFloat(Kt[ko][2]);break;case pc:IA=(ls?"<":"(")+Kt[ko]+(ls?">":")"),Dl=SA(D),fs=Rl(et)}Pl!==void 0&&Pl[ko]!==void 0&&(Ql=Pl[ko]+` Tw
`),ko===0?w.push(Ql+Md(Dl,fs,qn)+IA):dc===pc?w.push(Ql+IA):dc===sf&&w.push(Ql+Md(Dl,fs,qn)+IA)}w=dc===pc?w.join(` Tj
T* `):w.join(` Tj
`),w+=` Tj
`;var LA=`BT
/`;return LA+=se+" "+Et+` Tf
`,LA+=b(Et*Eo)+` TL
`,LA+=hc+`
`,LA+=ji,LA+=w,G(LA+="ET"),h[se]=!0,pi};var RE=f.__private__.clip=f.clip=function(w){return G(w==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return RE("evenodd")},f.__private__.discardPath=f.discardPath=function(){return G("n"),this};var Hs=f.__private__.isValidStyle=function(w){var D=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(w)!==-1&&(D=!0),D};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(w){return Hs(w)&&(l=w),this};var Uy=f.__private__.getStyle=f.getStyle=function(w){var D=l;switch(w){case"D":case"S":D="S";break;case"F":D="f";break;case"FD":case"DF":D="B";break;case"f":case"f*":case"B":case"B*":D=w}return D},Dy=f.close=function(){return G("h"),this};f.stroke=function(){return G("S"),this},f.fill=function(w){return Xh("f",w),this},f.fillEvenOdd=function(w){return Xh("f*",w),this},f.fillStroke=function(w){return Xh("B",w),this},f.fillStrokeEvenOdd=function(w){return Xh("B*",w),this};var Xh=function(w,D){rn(D)==="object"?NE(D,w):G(w)},vd=function(w){w===null||E===_.ADVANCED&&w===void 0||(w=Uy(w),G(w))};function ME(w,D,et,lt,Ct){var Rt=new Jf(D||this.boundingBox,et||this.xStep,lt||this.yStep,this.gState,Ct||this.matrix);Rt.stream=this.stream;var Kt=w+"$$"+this.cloneIndex+++"$$";return Fi(Kt,Rt),Rt}var NE=function(w,D){var et=xi[w.key],lt=Ar[et];if(lt instanceof Pc)G("q"),G(PE(D)),lt.gState&&f.setGState(lt.gState),G(w.matrix.toString()+" cm"),G("/"+et+" sh"),G("Q");else if(lt instanceof Jf){var Ct=new Fe(1,0,0,-1,0,Nl());w.matrix&&(Ct=Ct.multiply(w.matrix||Qn),et=ME.call(lt,w.key,w.boundingBox,w.xStep,w.yStep,Ct).id),G("q"),G("/Pattern cs"),G("/"+et+" scn"),lt.gState&&f.setGState(lt.gState),G(D),G("Q")}},PE=function(w){switch(w){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},gd=f.moveTo=function(w,D){return G(b(x(w))+" "+b(P(D))+" m"),this},uc=f.lineTo=function(w,D){return G(b(x(w))+" "+b(P(D))+" l"),this},Ol=f.curveTo=function(w,D,et,lt,Ct,Rt){return G([b(x(w)),b(P(D)),b(x(et)),b(P(lt)),b(x(Ct)),b(P(Rt)),"c"].join(" ")),this};f.__private__.line=f.line=function(w,D,et,lt,Ct){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||!Hs(Ct))throw new Error("Invalid arguments passed to jsPDF.line");return E===_.COMPAT?this.lines([[et-w,lt-D]],w,D,[1,1],Ct||"S"):this.lines([[et-w,lt-D]],w,D,[1,1]).stroke()},f.__private__.lines=f.lines=function(w,D,et,lt,Ct,Rt){var Kt,ne,Le,cr,ze,xr,ea,qn,pi,pa,ji,ls;if(typeof w=="number"&&(ls=et,et=D,D=w,w=ls),lt=lt||[1,1],Rt=Rt||!1,isNaN(D)||isNaN(et)||!Array.isArray(w)||!Array.isArray(lt)||!Hs(Ct)||typeof Rt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(gd(D,et),Kt=lt[0],ne=lt[1],cr=w.length,pa=D,ji=et,Le=0;Le<cr;Le++)(ze=w[Le]).length===2?(pa=ze[0]*Kt+pa,ji=ze[1]*ne+ji,uc(pa,ji)):(xr=ze[0]*Kt+pa,ea=ze[1]*ne+ji,qn=ze[2]*Kt+pa,pi=ze[3]*ne+ji,pa=ze[4]*Kt+pa,ji=ze[5]*ne+ji,Ol(xr,ea,qn,pi,pa,ji));return Rt&&Dy(),vd(Ct),this},f.path=function(w){for(var D=0;D<w.length;D++){var et=w[D],lt=et.c;switch(et.op){case"m":gd(lt[0],lt[1]);break;case"l":uc(lt[0],lt[1]);break;case"c":Ol.apply(this,lt);break;case"h":Dy()}}return this},f.__private__.rect=f.rect=function(w,D,et,lt,Ct){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||!Hs(Ct))throw new Error("Invalid arguments passed to jsPDF.rect");return E===_.COMPAT&&(lt=-lt),G([b(x(w)),b(P(D)),b(x(et)),b(x(lt)),"re"].join(" ")),vd(Ct),this},f.__private__.triangle=f.triangle=function(w,D,et,lt,Ct,Rt,Kt){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||isNaN(Ct)||isNaN(Rt)||!Hs(Kt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[et-w,lt-D],[Ct-et,Rt-lt],[w-Ct,D-Rt]],w,D,[1,1],Kt,!0),this},f.__private__.roundedRect=f.roundedRect=function(w,D,et,lt,Ct,Rt,Kt){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||isNaN(Ct)||isNaN(Rt)||!Hs(Kt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ne=4/3*(Math.SQRT2-1);return Ct=Math.min(Ct,.5*et),Rt=Math.min(Rt,.5*lt),this.lines([[et-2*Ct,0],[Ct*ne,0,Ct,Rt-Rt*ne,Ct,Rt],[0,lt-2*Rt],[0,Rt*ne,-Ct*ne,Rt,-Ct,Rt],[2*Ct-et,0],[-Ct*ne,0,-Ct,-Rt*ne,-Ct,-Rt],[0,2*Rt-lt],[0,-Rt*ne,Ct*ne,-Rt,Ct,-Rt]],w+Ct,D,[1,1],Kt,!0),this},f.__private__.ellipse=f.ellipse=function(w,D,et,lt,Ct){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||!Hs(Ct))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Rt=4/3*(Math.SQRT2-1)*et,Kt=4/3*(Math.SQRT2-1)*lt;return gd(w+et,D),Ol(w+et,D-Kt,w+Rt,D-lt,w,D-lt),Ol(w-Rt,D-lt,w-et,D-Kt,w-et,D),Ol(w-et,D+Kt,w-Rt,D+lt,w,D+lt),Ol(w+Rt,D+lt,w+et,D+Kt,w+et,D),vd(Ct),this},f.__private__.circle=f.circle=function(w,D,et,lt){if(isNaN(w)||isNaN(D)||isNaN(et)||!Hs(lt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(w,D,et,et,lt)},f.setFont=function(w,D,et){return et&&(D=O(D,et)),se=My(w,D,{disableWarning:!1}),this};var UE=f.__private__.getFont=f.getFont=function(){return Ie[My.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var w,D,et={};for(w in be)if(be.hasOwnProperty(w))for(D in et[w]=[],be[w])be[w].hasOwnProperty(D)&&et[w].push(D);return et},f.addFont=function(w,D,et,lt,Ct){var Rt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Rt.indexOf(arguments[3])!==-1?Ct=arguments[3]:arguments[3]&&Rt.indexOf(arguments[3])==-1&&(et=O(et,lt)),Ct=Ct||"Identity-H",fd.call(this,w,D,et,Ct)};var cc,yd=r.lineWidth||.200025,Yh=f.__private__.getLineWidth=f.getLineWidth=function(){return yd},Qy=f.__private__.setLineWidth=f.setLineWidth=function(w){return yd=w,G(b(x(w))+" w"),this};f.__private__.setLineDash=De.API.setLineDash=De.API.setLineDashPattern=function(w,D){if(w=w||[],D=D||0,isNaN(D)||!Array.isArray(w))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return w=w.map(function(et){return b(x(et))}).join(" "),D=b(x(D)),G("["+w+"] "+D+" d"),this};var Hy=f.__private__.getLineHeight=f.getLineHeight=function(){return Et*cc};f.__private__.getLineHeight=f.getLineHeight=function(){return Et*cc};var Gy=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(w){return typeof(w=w||1.15)=="number"&&(cc=w),this},ky=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return cc};Gy(r.lineHeight);var SA=f.__private__.getHorizontalCoordinate=function(w){return x(w)},Rl=f.__private__.getVerticalCoordinate=function(w){return E===_.ADVANCED?w:Ne[$].mediaBox.topRightY-Ne[$].mediaBox.bottomLeftY-x(w)},DE=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(w){return b(SA(w))},Ml=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(w){return b(Rl(w))},As=r.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return Ht(As)},f.__private__.setStrokeColor=f.setDrawColor=function(w,D,et,lt){return As=Zt({ch1:w,ch2:D,ch3:et,ch4:lt,pdfColorType:"draw",precision:2}),G(As),this};var md=r.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return Ht(md)},f.__private__.setFillColor=f.setFillColor=function(w,D,et,lt){return md=Zt({ch1:w,ch2:D,ch3:et,ch4:lt,pdfColorType:"fill",precision:2}),G(md),this};var hc=r.textColor||"0 g",QE=f.__private__.getTextColor=f.getTextColor=function(){return Ht(hc)};f.__private__.setTextColor=f.setTextColor=function(w,D,et,lt){return hc=Zt({ch1:w,ch2:D,ch3:et,ch4:lt,pdfColorType:"text",precision:3}),this};var Wh=r.charSpace,HE=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(Wh||0)};f.__private__.setCharSpace=f.setCharSpace=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Wh=w,this};var _d=0;f.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},f.__private__.setLineCap=f.setLineCap=function(w){var D=f.CapJoinStyles[w];if(D===void 0)throw new Error("Line cap style of '"+w+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return _d=D,G(D+" J"),this};var wd=0;f.__private__.setLineJoin=f.setLineJoin=function(w){var D=f.CapJoinStyles[w];if(D===void 0)throw new Error("Line join style of '"+w+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return wd=D,G(D+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(w){if(w=w||0,isNaN(w))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return G(b(x(w))+" M"),this},f.GState=J_,f.setGState=function(w){(w=typeof w=="string"?Tr[hi[w]]:$y(null,w)).equals(Vr)||(G("/"+w.id+" gs"),Vr=w)};var $y=function(w,D){if(!w||!hi[w]){var et=!1;for(var lt in Tr)if(Tr.hasOwnProperty(lt)&&Tr[lt].equals(D)){et=!0;break}if(et)D=Tr[lt];else{var Ct="GS"+(Object.keys(Tr).length+1).toString(10);Tr[Ct]=D,D.id=Ct}return w&&(hi[w]=D.id),Er.publish("addGState",D),D}};f.addGState=function(w,D){return $y(w,D),this},f.saveGraphicsState=function(){return G("q"),An.push({key:se,size:Et,color:hc}),this},f.restoreGraphicsState=function(){G("Q");var w=An.pop();return se=w.key,Et=w.size,hc=w.color,Vr=null,this},f.setCurrentTransformationMatrix=function(w){return G(w.toString()+" cm"),this},f.comment=function(w){return G("#"+w),this};var qh=function(w,D){var et=w||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return et},set:function(Rt){isNaN(Rt)||(et=parseFloat(Rt))}});var lt=D||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return lt},set:function(Rt){isNaN(Rt)||(lt=parseFloat(Rt))}});var Ct="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Ct},set:function(Rt){Ct=Rt.toString()}}),this},Ed=function(w,D,et,lt){qh.call(this,w,D),this.type="rect";var Ct=et||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Ct},set:function(Kt){isNaN(Kt)||(Ct=parseFloat(Kt))}});var Rt=lt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Rt},set:function(Kt){isNaN(Kt)||(Rt=parseFloat(Kt))}}),this},Cd=function(){this.page=Kr,this.currentPage=$,this.pages=Ot.slice(0),this.pagesContext=Ne.slice(0),this.x=We,this.y=Me,this.matrix=dr,this.width=fc($),this.height=Nl($),this.outputDestination=Z,this.id="",this.objectNumber=-1};Cd.prototype.restore=function(){Kr=this.page,$=this.currentPage,Ne=this.pagesContext,Ot=this.pages,We=this.x,Me=this.y,dr=this.matrix,Bd($,this.width),Td($,this.height),Z=this.outputDestination};var jy=function(w,D,et,lt,Ct){bi.push(new Cd),Kr=$=0,Ot=[],We=w,Me=D,dr=Ct,pd([et,lt])},GE=function(w){if(Si[w])bi.pop().restore();else{var D=new Cd,et="Xo"+(Object.keys(dn).length+1).toString(10);D.id=et,Si[w]=et,dn[et]=D,Er.publish("addFormObject",D),bi.pop().restore()}};for(var Zh in f.beginFormObject=function(w,D,et,lt,Ct){return jy(w,D,et,lt,Ct),this},f.endFormObject=function(w){return GE(w),this},f.doFormObject=function(w,D){var et=dn[Si[w]];return G("q"),G(D.toString()+" cm"),G("/"+et.id+" Do"),G("Q"),this},f.getFormObject=function(w){var D=dn[Si[w]];return{x:D.x,y:D.y,width:D.width,height:D.height,matrix:D.matrix}},f.save=function(w,D){return w=w||"generated.pdf",(D=D||{}).returnPromise=D.returnPromise||!1,D.returnPromise===!1?(Oc(Kh(xA()),w),typeof Oc.unload=="function"&&Ge.setTimeout&&setTimeout(Oc.unload,911),this):new Promise(function(et,lt){try{var Ct=Oc(Kh(xA()),w);typeof Oc.unload=="function"&&Ge.setTimeout&&setTimeout(Oc.unload,911),et(Ct)}catch(Rt){lt(Rt.message)}})},De.API)De.API.hasOwnProperty(Zh)&&(Zh==="events"&&De.API.events.length?function(w,D){var et,lt,Ct;for(Ct=D.length-1;Ct!==-1;Ct--)et=D[Ct][0],lt=D[Ct][1],w.subscribe.apply(w,[et].concat(typeof lt=="function"?[lt]:lt))}(Er,De.API.events):f[Zh]=De.API[Zh]);var fc=f.getPageWidth=function(w){return(Ne[w=w||$].mediaBox.topRightX-Ne[w].mediaBox.bottomLeftX)/zt},Bd=f.setPageWidth=function(w,D){Ne[w].mediaBox.topRightX=D*zt+Ne[w].mediaBox.bottomLeftX},Nl=f.getPageHeight=function(w){return(Ne[w=w||$].mediaBox.topRightY-Ne[w].mediaBox.bottomLeftY)/zt},Td=f.setPageHeight=function(w,D){Ne[w].mediaBox.topRightY=D*zt+Ne[w].mediaBox.bottomLeftY};return f.internal={pdfEscape:Wa,getStyle:Uy,getFont:UE,getFontSize:xt,getCharSpace:HE,getTextColor:QE,getLineHeight:Hy,getLineHeightFactor:ky,getLineWidth:Yh,write:St,getHorizontalCoordinate:SA,getVerticalCoordinate:Rl,getCoordinateString:DE,getVerticalCoordinateString:Ml,collections:{},newObject:nn,newAdditionalObject:wo,newObjectDeferred:Jr,newObjectDeferredBegin:Bn,getFilters:rr,putStream:Mr,events:Er,scaleFactor:zt,pageSize:{getWidth:function(){return fc($)},setWidth:function(w){Bd($,w)},getHeight:function(){return Nl($)},setHeight:function(w){Td($,w)}},encryptionOptions:u,encryption:fa,getEncryptor:LE,output:zh,getNumberOfPages:xE,pages:Ot,out:G,f2:M,f3:S,getPageInfo:Py,getPageInfoByObjId:Ve,getCurrentPageInfo:OE,getPDFVersion:v,Point:qh,Rectangle:Ed,Matrix:Fe,hasHotfix:Ny},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return fc($)},set:function(w){Bd($,w)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return Nl($)},set:function(w){Td($,w)},enumerable:!0,configurable:!0}),BE.call(f,dt),se="F1",Oy(i,t),Er.publish("initialized"),f}Hf.prototype.lsbFirstWord=function(r){return String.fromCharCode(r>>0&255,r>>8&255,r>>16&255,r>>24&255)},Hf.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Hf.prototype.hexToBytes=function(r){for(var e=[],t=0;t<r.length;t+=2)e.push(String.fromCharCode(parseInt(r.substr(t,2),16)));return e.join("")},Hf.prototype.processOwnerPassword=function(r,e){return rS(eS(e).substr(0,5),r)},Hf.prototype.encryptor=function(r,e){var t=eS(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return rS(t,n)}},J_.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||rn(r)!==rn(this))return!1;var n=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e)||this[e]!==r[e])return!1;n++}for(e in r)r.hasOwnProperty(e)&&t.indexOf(e)<0&&n--;return n===0},De.API={events:[]},De.version="2.5.0";var Gn=De.API,kI=1,Ph=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},yf=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Xe=function(r){return r.toFixed(2)},iu=function(r){return r.toFixed(5)};Gn.__acroform__={};var mo=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},BN=function(r){return r*kI},Ks=function(r){var e=new U8,t=ge.internal.getHeight(r)||0,n=ge.internal.getWidth(r)||0;return e.BBox=[0,0,Number(Xe(n)),Number(Xe(t))],e},EAt=Gn.__acroform__.setBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|=1<<e},CAt=Gn.__acroform__.clearBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&=~(1<<e)},BAt=Gn.__acroform__.getBit=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<e?1:0},ni=Gn.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return BAt(r,e-1)},ii=Gn.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return EAt(r,e-1)},ai=Gn.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return CAt(r,e-1)},TAt=Gn.__acroform__.calculateCoordinates=function(r,e){var t=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,i=r[0],a=r[1],o=r[2],s=r[3],A={};return A.lowerLeft_X=t(i)||0,A.lowerLeft_Y=n(a+s)||0,A.upperRight_X=t(i+o)||0,A.upperRight_Y=n(a)||0,[Number(Xe(A.lowerLeft_X)),Number(Xe(A.lowerLeft_Y)),Number(Xe(A.upperRight_X)),Number(Xe(A.upperRight_Y))]},xAt=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,n=nS(r,t),i=r.scope.internal.getFont(r.fontName,r.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(r.scope.__private__.encodeColorString(r.color)),e.push("/"+i+" "+Xe(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=Ks(r);return a.scope=r.scope,a.stream=e.join(`
`),a}},nS=function(r,e){var t=r.fontSize===0?r.maxFontSize:r.fontSize,n={text:"",fontSize:""},i=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");i=r.multiline?i.map(function(S){return S.split(`
`)}):i.map(function(S){return[S]});var a=t,o=ge.internal.getHeight(r)||0;o=o<0?-o:o;var s=ge.internal.getWidth(r)||0;s=s<0?-s:s;var A=function(S,x,N){if(S+1<i.length){var P=x+" "+i[S+1][0];return km(P,r,N).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var l,u,c=km("3",r,a).height,h=r.multiline?o-a:(o-c)/2,f=h+=2,p=0,v=0,m=0;if(a<=0){e=`(...) Tj
`,e+="% Width of Text: "+km(e,r,a=12).width+", FieldWidth:"+s+`
`;break}for(var g="",_=0,E=0;E<i.length;E++)if(i.hasOwnProperty(E)){var B=!1;if(i[E].length!==1&&m!==i[E].length-1){if((c+2)*(_+2)+2>o)continue t;g+=i[E][m],B=!0,v=E,E--}else{g=(g+=i[E][m]+" ").substr(g.length-1)==" "?g.substr(0,g.length-1):g;var L=parseInt(E),O=A(L,g,a),b=E>=i.length-1;if(O&&!b){g+=" ",m=0;continue}if(O||b){if(b)v=L;else if(r.multiline&&(c+2)*(_+2)+2>o)continue t}else{if(!r.multiline||(c+2)*(_+2)+2>o)continue t;v=L}}for(var T="",F=p;F<=v;F++){var M=i[F];if(r.multiline){if(F===v){T+=M[m]+" ",m=(m+1)%M.length;continue}if(F===p){T+=M[M.length-1]+" ";continue}}T+=M[0]+" "}switch(T=T.substr(T.length-1)==" "?T.substr(0,T.length-1):T,u=km(T,r,a).width,r.textAlign){case"right":l=s-u-2;break;case"center":l=(s-u)/2;break;case"left":default:l=2}e+=Xe(l)+" "+Xe(f)+` Td
`,e+="("+Ph(T)+`) Tj
`,e+=-Xe(l)+` 0 Td
`,f=-(a+2),u=0,p=B?v:v+1,_++,g=""}break}return n.text=e,n.fontSize=a,n},km=function(r,e,t){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(r,{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:i}},SAt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},bAt=function(r,e){var t={type:"reference",object:r};e.internal.getPageInfo(r.page).pageContext.annotations.find(function(n){return n.type===t.type&&n.object===t.object})===void 0&&e.internal.getPageInfo(r.page).pageContext.annotations.push(t)},FAt=function(r,e){for(var t in r)if(r.hasOwnProperty(t)){var n=t,i=r[t];e.internal.newObjectDeferredBegin(i.objId,!0),rn(i)==="object"&&typeof i.putStream=="function"&&i.putStream(),delete r[n]}},IAt=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Us.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(SAt)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");kI=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new D8,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i];a.objId=void 0,a.hasAnnotation&&bAt(a,t)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(t){(function(n,i){var a=!n;for(var o in n||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(o)){var s=n[o],A=[],l=s.Rect;if(s.Rect&&(s.Rect=TAt(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=ge.createDefaultAppearanceStream(s),rn(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(A=s.getKeyValueListForStream()),s.Rect=l,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=xAt(s);A.push({key:"AP",value:"<</N "+u+">>"}),i.internal.acroformPlugin.xForms.push(u)}if(s.appearanceStreamContent){var c="";for(var h in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(h)){var f=s.appearanceStreamContent[h];if(c+="/"+h+" ",c+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var o in f)if(f.hasOwnProperty(o)){var p=f[o];typeof p=="function"&&(p=p.call(i,s)),c+="/"+o+" "+p+" ",i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p)}}else typeof(p=f)=="function"&&(p=p.call(i,s)),c+="/"+o+" "+p,i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p);c+=">>"}A.push({key:"AP",value:`<<
`+c+">>"})}i.internal.putStream({additionalKeyValues:A,objectId:s.objId}),i.internal.out("endobj")}a&&FAt(i.internal.acroformPlugin.xForms,i)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},P8=Gn.__acroform__.arrayToPdfArray=function(r,e,t){var n=function(o){return o};if(Array.isArray(r)){for(var i="[",a=0;a<r.length;a++)switch(a!==0&&(i+=" "),rn(r[a])){case"boolean":case"number":case"object":i+=r[a].toString();break;case"string":r[a].substr(0,1)!=="/"?(e!==void 0&&t&&(n=t.internal.getEncryptor(e)),i+="("+Ph(n(r[a].toString()))+")"):i+=r[a].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},tB=function(r,e,t){var n=function(i){return i};return e!==void 0&&t&&(n=t.internal.getEncryptor(e)),(r=r||"").toString(),r="("+Ph(n(r))+")"},iA=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};iA.prototype.toString=function(){return this.objId+" 0 R"},iA.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},iA.prototype.getKeyValueListForStream=function(){var r=[],e=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var n=e[t],i=this[n];i&&(Array.isArray(i)?r.push({key:n,value:P8(i,this.objId,this.scope)}):i instanceof iA?(i.scope=this.scope,r.push({key:n,value:i.objId+" 0 R"})):typeof i!="function"&&r.push({key:n,value:i}))}return r};var U8=function(){iA.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){r=t.trim()},get:function(){return r||null}})};mo(U8,iA);var D8=function(){iA.call(this);var r,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var t=function(n){return n};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Ph(t(r))+")"}},set:function(t){r=t}})};mo(D8,iA);var Us=function r(){iA.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(g){if(isNaN(g))throw new Error('Invalid value "'+g+'" for attribute F supplied.');e=g}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(e,3))},set:function(g){Boolean(g)===!0?this.F=ii(e,3):this.F=ai(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(g){if(isNaN(g))throw new Error('Invalid value "'+g+'" for attribute Ff supplied.');t=g}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(g){n=g!==void 0?g:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(g){n[0]=g}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(g){n[1]=g}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(g){n[2]=g}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(g){n[3]=g}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(g){switch(g){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=g;break;default:throw new Error('Invalid value "'+g+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof t1)return;a="FieldObject"+r.FieldNum++}var g=function(_){return _};return this.scope&&(g=this.scope.internal.getEncryptor(this.objId)),"("+Ph(g(a))+")"},set:function(g){a=g.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(g){a=g}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(g){o=g}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(g){s=g}});var A=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return A},set:function(g){A=g}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/kI:l},set:function(g){l=g}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(g){u=g}});var c="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!c||this instanceof t1||this instanceof rh))return tB(c,this.objId,this.scope)},set:function(g){g=g.toString(),c=g}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof qi?h:tB(h,this.objId,this.scope)},set:function(g){g=g.toString(),h=this instanceof qi?g:g.substr(0,1)==="("?yf(g.substr(1,g.length-2)):yf(g)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof qi?yf(h.substr(1,h.length-1)):h},set:function(g){g=g.toString(),h=this instanceof qi?"/"+g:g}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(g){this.V=g}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof qi?f:tB(f,this.objId,this.scope)},set:function(g){g=g.toString(),f=this instanceof qi?g:g.substr(0,1)==="("?yf(g.substr(1,g.length-2)):yf(g)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof qi?yf(f.substr(1,f.length-1)):f},set:function(g){g=g.toString(),f=this instanceof qi?"/"+g:g}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,v=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return v},set:function(g){g=Boolean(g),v=g}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(g){p=g}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,1))},set:function(g){Boolean(g)===!0?this.Ff=ii(this.Ff,1):this.Ff=ai(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,2))},set:function(g){Boolean(g)===!0?this.Ff=ii(this.Ff,2):this.Ff=ai(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,3))},set:function(g){Boolean(g)===!0?this.Ff=ii(this.Ff,3):this.Ff=ai(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(m!==null)return m},set:function(g){if([0,1,2].indexOf(g)===-1)throw new Error('Invalid value "'+g+'" for attribute Q supplied.');m=g}}),Object.defineProperty(this,"textAlign",{get:function(){var g;switch(m){case 0:default:g="left";break;case 1:g="center";break;case 2:g="right"}return g},configurable:!0,enumerable:!0,set:function(g){switch(g){case"right":case 2:m=2;break;case"center":case 1:m=1;break;case"left":case 0:default:m=0}}})};mo(Us,iA);var hp=function(){Us.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){r=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return P8(e,this.objId,this.scope)},set:function(t){var n,i;i=[],typeof(n=t)=="string"&&(i=function(a,o,s){s||(s=1);for(var A,l=[];A=o.exec(a);)l.push(A[s]);return l}(n,/\((.*?)\)/g)),e=i}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,n){for(n=n||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,18))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,18):this.Ff=ai(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,19))},set:function(t){this.combo===!0&&(Boolean(t)===!0?this.Ff=ii(this.Ff,19):this.Ff=ai(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,20))},set:function(t){Boolean(t)===!0?(this.Ff=ii(this.Ff,20),e.sort()):this.Ff=ai(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,22))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,22):this.Ff=ai(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,23))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,23):this.Ff=ai(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,27))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,27):this.Ff=ai(this.Ff,27)}}),this.hasAppearanceStream=!1};mo(hp,Us);var fp=function(){hp.call(this),this.fontName="helvetica",this.combo=!1};mo(fp,hp);var pp=function(){fp.call(this),this.combo=!0};mo(pp,fp);var q0=function(){pp.call(this),this.edit=!0};mo(q0,pp);var qi=function(){Us.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,15))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,15):this.Ff=ai(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,16))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,16):this.Ff=ai(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,17))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,17):this.Ff=ai(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,26))},set:function(t){Boolean(t)===!0?this.Ff=ii(this.Ff,26):this.Ff=ai(this.Ff,26)}});var r,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(a){return a};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var n,i=[];for(n in i.push("<<"),e)i.push("/"+n+" ("+Ph(t(e[n]))+")");return i.push(">>"),i.join(`
`)}},set:function(t){rn(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}})};mo(qi,Us);var Z0=function(){qi.call(this),this.pushButton=!0};mo(Z0,qi);var dp=function(){qi.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e!==void 0?e:[]}})};mo(dp,qi);var t1=function(){var r,e;Us.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(i){r=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(i){e=i}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(s){return s};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var a,o=[];for(a in o.push("<<"),n)o.push("/"+a+" ("+Ph(i(n[a]))+")");return o.push(">>"),o.join(`
`)},set:function(i){rn(i)==="object"&&(n=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(i){typeof i=="string"&&(n.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){t=i}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(i){t="/"+i}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=ge.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};mo(t1,Us),dp.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=r.createAppearanceStream(t.optionName),t.caption=r.getCA()}},dp.prototype.createOption=function(r){var e=new t1;return e.Parent=this,e.optionName=r,this.Kids.push(e),LAt.call(this.scope,e),e};var J0=function(){qi.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=ge.CheckBox.createAppearanceStream()};mo(J0,qi);var rh=function(){Us.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,13))},set:function(e){Boolean(e)===!0?this.Ff=ii(this.Ff,13):this.Ff=ai(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,21))},set:function(e){Boolean(e)===!0?this.Ff=ii(this.Ff,21):this.Ff=ai(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,23))},set:function(e){Boolean(e)===!0?this.Ff=ii(this.Ff,23):this.Ff=ai(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,24))},set:function(e){Boolean(e)===!0?this.Ff=ii(this.Ff,24):this.Ff=ai(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,25))},set:function(e){Boolean(e)===!0?this.Ff=ii(this.Ff,25):this.Ff=ai(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,26))},set:function(e){Boolean(e)===!0?this.Ff=ii(this.Ff,26):this.Ff=ai(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){Number.isInteger(e)&&(r=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};mo(rh,Us);var t_=function(){rh.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(ni(this.Ff,14))},set:function(r){Boolean(r)===!0?this.Ff=ii(this.Ff,14):this.Ff=ai(this.Ff,14)}}),this.password=!0};mo(t_,rh);var ge={CheckBox:{createAppearanceStream:function(){return{N:{On:ge.CheckBox.YesNormal},D:{On:ge.CheckBox.YesPushDown,Off:ge.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=Ks(r);e.scope=r.scope;var t=[],n=r.scope.internal.getFont(r.fontName,r.fontStyle).id,i=r.scope.__private__.encodeColorString(r.color),a=nS(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+Xe(ge.internal.getWidth(r))+" "+Xe(ge.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+Xe(a.fontSize)+" Tf "+i),t.push("BT"),t.push(a.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
`),e},YesNormal:function(r){var e=Ks(r);e.scope=r.scope;var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,n=r.scope.__private__.encodeColorString(r.color),i=[],a=ge.internal.getHeight(r),o=ge.internal.getWidth(r),s=nS(r,r.caption);return i.push("1 g"),i.push("0 0 "+Xe(o)+" "+Xe(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Xe(o-1)+" "+Xe(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+Xe(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
`),e},OffPushDown:function(r){var e=Ks(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Xe(ge.internal.getWidth(r))+" "+Xe(ge.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:ge.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=ge.RadioButton.Circle.YesNormal,e.D[r]=ge.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=Ks(r);e.scope=r.scope;var t=[],n=ge.internal.getWidth(r)<=ge.internal.getHeight(r)?ge.internal.getWidth(r)/4:ge.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=ge.internal.Bezier_C,a=Number((n*i).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+iu(ge.internal.getWidth(r)/2)+" "+iu(ge.internal.getHeight(r)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),t.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),t.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),t.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(r){var e=Ks(r);e.scope=r.scope;var t=[],n=ge.internal.getWidth(r)<=ge.internal.getHeight(r)?ge.internal.getWidth(r)/4:ge.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*ge.internal.Bezier_C).toFixed(5)),o=Number((n*ge.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+iu(ge.internal.getWidth(r)/2)+" "+iu(ge.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+iu(ge.internal.getWidth(r)/2)+" "+iu(ge.internal.getHeight(r)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),t.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),t.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),t.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e},OffPushDown:function(r){var e=Ks(r);e.scope=r.scope;var t=[],n=ge.internal.getWidth(r)<=ge.internal.getHeight(r)?ge.internal.getWidth(r)/4:ge.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*ge.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+iu(ge.internal.getWidth(r)/2)+" "+iu(ge.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e}},Cross:{createAppearanceStream:function(r){var e={D:{Off:ge.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=ge.RadioButton.Cross.YesNormal,e.D[r]=ge.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=Ks(r);e.scope=r.scope;var t=[],n=ge.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+Xe(ge.internal.getWidth(r)-2)+" "+Xe(ge.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(Xe(n.x1.x)+" "+Xe(n.x1.y)+" m"),t.push(Xe(n.x2.x)+" "+Xe(n.x2.y)+" l"),t.push(Xe(n.x4.x)+" "+Xe(n.x4.y)+" m"),t.push(Xe(n.x3.x)+" "+Xe(n.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(r){var e=Ks(r);e.scope=r.scope;var t=ge.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+Xe(ge.internal.getWidth(r))+" "+Xe(ge.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Xe(ge.internal.getWidth(r)-2)+" "+Xe(ge.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(Xe(t.x1.x)+" "+Xe(t.x1.y)+" m"),n.push(Xe(t.x2.x)+" "+Xe(t.x2.y)+" l"),n.push(Xe(t.x4.x)+" "+Xe(t.x4.y)+" m"),n.push(Xe(t.x3.x)+" "+Xe(t.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
`),e},OffPushDown:function(r){var e=Ks(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Xe(ge.internal.getWidth(r))+" "+Xe(ge.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
`),e}}},createDefaultAppearanceStream:function(r){var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,t=r.scope.__private__.encodeColorString(r.color);return"/"+e+" "+r.fontSize+" Tf "+t}};ge.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=ge.internal.getWidth(r),t=ge.internal.getHeight(r),n=Math.min(e,t);return{x1:{x:(e-n)/2,y:(t-n)/2+n},x2:{x:(e-n)/2+n,y:(t-n)/2},x3:{x:(e-n)/2,y:(t-n)/2},x4:{x:(e-n)/2+n,y:(t-n)/2+n}}}},ge.internal.getWidth=function(r){var e=0;return rn(r)==="object"&&(e=BN(r.Rect[2])),e},ge.internal.getHeight=function(r){var e=0;return rn(r)==="object"&&(e=BN(r.Rect[3])),e};var LAt=Gn.addField=function(r){if(IAt(this,r),!(r instanceof Us))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=r).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Gn.AcroFormChoiceField=hp,Gn.AcroFormListBox=fp,Gn.AcroFormComboBox=pp,Gn.AcroFormEditBox=q0,Gn.AcroFormButton=qi,Gn.AcroFormPushButton=Z0,Gn.AcroFormRadioButton=dp,Gn.AcroFormCheckBox=J0,Gn.AcroFormTextField=rh,Gn.AcroFormPasswordField=t_,Gn.AcroFormAppearance=ge,Gn.AcroForm={ChoiceField:hp,ListBox:fp,ComboBox:pp,EditBox:q0,Button:qi,PushButton:Z0,RadioButton:dp,CheckBox:J0,TextField:rh,PasswordField:t_,Appearance:ge},De.AcroForm={ChoiceField:hp,ListBox:fp,ComboBox:pp,EditBox:q0,Button:qi,PushButton:Z0,RadioButton:dp,CheckBox:J0,TextField:rh,PasswordField:t_,Appearance:ge};De.AcroForm;function Q8(r){return r.reduce(function(e,t,n){return e[t]=n,e},{})}(function(r){r.__addimage__={};var e="UNKNOWN",t={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=r.__addimage__.getImageFileTypeByImageData=function(S,x){var N,P,Y,z,tt,J=e;if((x=x||e)==="RGBA"||S.data!==void 0&&S.data instanceof Uint8ClampedArray&&"height"in S&&"width"in S)return"RGBA";if(O(S))for(tt in t)for(Y=t[tt],N=0;N<Y.length;N+=1){for(z=!0,P=0;P<Y[N].length;P+=1)if(Y[N][P]!==void 0&&Y[N][P]!==S[P]){z=!1;break}if(z===!0){J=tt;break}}else for(tt in t)for(Y=t[tt],N=0;N<Y.length;N+=1){for(z=!0,P=0;P<Y[N].length;P+=1)if(Y[N][P]!==void 0&&Y[N][P]!==S.charCodeAt(P)){z=!1;break}if(z===!0){J=tt;break}}return J===e&&x!==e&&(J=x),J},i=function S(x){for(var N=this.internal.write,P=this.internal.putStream,Y=(0,this.internal.getFilters)();Y.indexOf("FlateEncode")!==-1;)Y.splice(Y.indexOf("FlateEncode"),1);x.objectId=this.internal.newObject();var z=[];if(z.push({key:"Type",value:"/XObject"}),z.push({key:"Subtype",value:"/Image"}),z.push({key:"Width",value:x.width}),z.push({key:"Height",value:x.height}),x.colorSpace===m.INDEXED?z.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(x.palette.length/3-1)+" "+("sMask"in x&&x.sMask!==void 0?x.objectId+2:x.objectId+1)+" 0 R]"}):(z.push({key:"ColorSpace",value:"/"+x.colorSpace}),x.colorSpace===m.DEVICE_CMYK&&z.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),z.push({key:"BitsPerComponent",value:x.bitsPerComponent}),"decodeParameters"in x&&x.decodeParameters!==void 0&&z.push({key:"DecodeParms",value:"<<"+x.decodeParameters+">>"}),"transparency"in x&&Array.isArray(x.transparency)){for(var tt="",J=0,nt=x.transparency.length;J<nt;J++)tt+=x.transparency[J]+" "+x.transparency[J]+" ";z.push({key:"Mask",value:"["+tt+"]"})}x.sMask!==void 0&&z.push({key:"SMask",value:x.objectId+1+" 0 R"});var it=x.filter!==void 0?["/"+x.filter]:void 0;if(P({data:x.data,additionalKeyValues:z,alreadyAppliedFilters:it,objectId:x.objectId}),N("endobj"),"sMask"in x&&x.sMask!==void 0){var _t="/Predictor "+x.predictor+" /Colors 1 /BitsPerComponent "+x.bitsPerComponent+" /Columns "+x.width,R={width:x.width,height:x.height,colorSpace:"DeviceGray",bitsPerComponent:x.bitsPerComponent,decodeParameters:_t,data:x.sMask};"filter"in x&&(R.filter=x.filter),S.call(this,R)}if(x.colorSpace===m.INDEXED){var $=this.internal.newObject();P({data:T(new Uint8Array(x.palette)),objectId:$}),N("endobj")}},a=function(){var S=this.internal.collections.addImage_images;for(var x in S)i.call(this,S[x])},o=function(){var S,x=this.internal.collections.addImage_images,N=this.internal.write;for(var P in x)N("/I"+(S=x[P]).index,S.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",o))},A=function(){var S=this.internal.collections.addImage_images;return s.call(this),S},l=function(){return Object.keys(this.internal.collections.addImage_images).length},u=function(S){return typeof r["process"+S.toUpperCase()]=="function"},c=function(S){return rn(S)==="object"&&S.nodeType===1},h=function(S,x){if(S.nodeName==="IMG"&&S.hasAttribute("src")){var N=""+S.getAttribute("src");if(N.indexOf("data:image/")===0)return jv(unescape(N).split("base64,").pop());var P=r.loadFile(N,!0);if(P!==void 0)return P}if(S.nodeName==="CANVAS"){if(S.width===0||S.height===0)throw new Error("Given canvas must have data. Canvas width: "+S.width+", height: "+S.height);var Y;switch(x){case"PNG":Y="image/png";break;case"WEBP":Y="image/webp";break;case"JPEG":case"JPG":default:Y="image/jpeg"}return jv(S.toDataURL(Y,1).split("base64,").pop())}},f=function(S){var x=this.internal.collections.addImage_images;if(x){for(var N in x)if(S===x[N].alias)return x[N]}},p=function(S,x,N){return S||x||(S=-96,x=-96),S<0&&(S=-1*N.width*72/S/this.internal.scaleFactor),x<0&&(x=-1*N.height*72/x/this.internal.scaleFactor),S===0&&(S=x*N.width/N.height),x===0&&(x=S*N.height/N.width),[S,x]},v=function(S,x,N,P,Y,z){var tt=p.call(this,N,P,Y),J=this.internal.getCoordinateString,nt=this.internal.getVerticalCoordinateString,it=A.call(this);if(N=tt[0],P=tt[1],it[Y.index]=Y,z){z*=Math.PI/180;var _t=Math.cos(z),R=Math.sin(z),$=function(q){return q.toFixed(4)},K=[$(_t),$(R),$(-1*R),$(_t),0,0,"cm"]}this.internal.write("q"),z?(this.internal.write([1,"0","0",1,J(S),nt(x+P),"cm"].join(" ")),this.internal.write(K.join(" ")),this.internal.write([J(N),"0","0",J(P),"0","0","cm"].join(" "))):this.internal.write([J(N),"0","0",J(P),J(S),nt(x+P),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+Y.index+" Do"),this.internal.write("Q")},m=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var g=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},_=r.__addimage__.sHashCode=function(S){var x,N,P=0;if(typeof S=="string")for(N=S.length,x=0;x<N;x++)P=(P<<5)-P+S.charCodeAt(x),P|=0;else if(O(S))for(N=S.byteLength/2,x=0;x<N;x++)P=(P<<5)-P+S[x],P|=0;return P},E=r.__addimage__.validateStringAsBase64=function(S){(S=S||"").toString().trim();var x=!0;return S.length===0&&(x=!1),S.length%4!=0&&(x=!1),/^[A-Za-z0-9+/]+$/.test(S.substr(0,S.length-2))===!1&&(x=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(S.substr(-2))===!1&&(x=!1),x},B=r.__addimage__.extractImageFromDataUrl=function(S){var x=(S=S||"").split("base64,"),N=null;if(x.length===2){var P=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(x[0]);Array.isArray(P)&&(N={mimeType:P[1],charset:P[2],data:x[1]})}return N},L=r.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};r.__addimage__.isArrayBuffer=function(S){return L()&&S instanceof ArrayBuffer};var O=r.__addimage__.isArrayBufferView=function(S){return L()&&typeof Uint32Array<"u"&&(S instanceof Int8Array||S instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)},b=r.__addimage__.binaryStringToUint8Array=function(S){for(var x=S.length,N=new Uint8Array(x),P=0;P<x;P++)N[P]=S.charCodeAt(P);return N},T=r.__addimage__.arrayBufferToBinaryString=function(S){for(var x="",N=O(S)?S:new Uint8Array(S),P=0;P<N.length;P+=8192)x+=String.fromCharCode.apply(null,N.subarray(P,P+8192));return x};r.addImage=function(){var S,x,N,P,Y,z,tt,J,nt;if(typeof arguments[1]=="number"?(x=e,N=arguments[1],P=arguments[2],Y=arguments[3],z=arguments[4],tt=arguments[5],J=arguments[6],nt=arguments[7]):(x=arguments[1],N=arguments[2],P=arguments[3],Y=arguments[4],z=arguments[5],tt=arguments[6],J=arguments[7],nt=arguments[8]),rn(S=arguments[0])==="object"&&!c(S)&&"imageData"in S){var it=S;S=it.imageData,x=it.format||x||e,N=it.x||N||0,P=it.y||P||0,Y=it.w||it.width||Y,z=it.h||it.height||z,tt=it.alias||tt,J=it.compression||J,nt=it.rotation||it.angle||nt}var _t=this.internal.getFilters();if(J===void 0&&_t.indexOf("FlateEncode")!==-1&&(J="SLOW"),isNaN(N)||isNaN(P))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var R=F.call(this,S,x,tt,J);return v.call(this,N,P,Y,z,R,nt),this};var F=function(S,x,N,P){var Y,z,tt;if(typeof S=="string"&&n(S)===e){S=unescape(S);var J=M(S,!1);(J!==""||(J=r.loadFile(S,!0))!==void 0)&&(S=J)}if(c(S)&&(S=h(S,x)),x=n(S,x),!u(x))throw new Error("addImage does not support files of type '"+x+"', please ensure that a plugin for '"+x+"' support is added.");if(((tt=N)==null||tt.length===0)&&(N=function(nt){return typeof nt=="string"||O(nt)?_(nt):O(nt.data)?_(nt.data):null}(S)),(Y=f.call(this,N))||(L()&&(S instanceof Uint8Array||x==="RGBA"||(z=S,S=b(S))),Y=this["process"+x.toUpperCase()](S,l.call(this),N,function(nt){return nt&&typeof nt=="string"&&(nt=nt.toUpperCase()),nt in r.image_compression?nt:g.NONE}(P),z)),!Y)throw new Error("An unknown error occurred whilst processing the image.");return Y},M=r.__addimage__.convertBase64ToBinaryString=function(S,x){var N;x=typeof x!="boolean"||x;var P,Y="";if(typeof S=="string"){P=(N=B(S))!==null?N.data:S;try{Y=jv(P)}catch(z){if(x)throw E(P)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+z.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return Y};r.getImageProperties=function(S){var x,N,P="";if(c(S)&&(S=h(S)),typeof S=="string"&&n(S)===e&&((P=M(S,!1))===""&&(P=r.loadFile(S)||""),S=P),N=n(S),!u(N))throw new Error("addImage does not support files of type '"+N+"', please ensure that a plugin for '"+N+"' support is added.");if(!L()||S instanceof Uint8Array||(S=b(S)),!(x=this["process"+N.toUpperCase()](S)))throw new Error("An unknown error occurred whilst processing the image");return x.fileType=N,x}})(De.API),function(r){var e=function(t){if(t!==void 0&&t!="")return!0};De.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(t){for(var n,i,a,o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,A=this.internal.getPageInfoByObjId(t.objId),l=t.pageContext.annotations,u=!1,c=0;c<l.length&&!u;c++)switch((n=l[c]).type){case"link":(e(n.options.url)||e(n.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(u!=0){this.internal.write("/Annots [");for(var h=0;h<l.length;h++){n=l[h];var f=this.internal.pdfEscape,p=this.internal.getEncryptor(t.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var v=this.internal.newAdditionalObject(),m=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(v.objId),_=n.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y)+"] ")+"/Contents ("+f(g(n.contents))+")",a+=" /Popup "+m.objId+" 0 R",a+=" /P "+A.objId+" 0 R",a+=" /T ("+f(g(_))+") >>",v.content=a;var E=v.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+o(n.bounds.x+30)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w+30)+" "+s(n.bounds.y)+"] ")+" /Parent "+E,n.open&&(a+=" /Open true"),a+=" >>",m.content=a,this.internal.write(v.objId,"0 R",m.objId,"0 R");break;case"freetext":i="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y+n.bounds.h)+"] ";var B=n.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+f(p(n.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+B+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var L=this.annotations._nameMap[n.options.name];n.options.pageNumber=L.page,n.options.top=L.y}else n.options.top||(n.options.top=0);if(i="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",a="",n.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+f(p(n.options.url))+") >>";else if(n.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,a+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var O=s(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),a+=" /XYZ "+n.options.left+" "+O+" "+n.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),r.createAnnotation=function(t){var n=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":n.pageContext.annotations.push(t)}},r.link=function(t,n,i,a,o){var s=this.internal.getCurrentPageInfo(),A=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:A(t),y:l(n),w:A(t+i),h:l(n+a)},options:o,type:"link"})},r.textWithLink=function(t,n,i,a){var o,s,A=this.getTextWidth(t),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){s=a.maxWidth;var u=this.splitTextToSize(t,s).length;o=Math.ceil(l*u)}else s=A,o=l;return this.text(t,n,i,a),i+=.2*l,a.align==="center"&&(n-=A/2),a.align==="right"&&(n-=A),this.link(n,i-l,s,o,a),A},r.getTextWidth=function(t){var n=this.internal.getFontSize();return this.getStringUnitWidth(t)*n/this.internal.scaleFactor}}(De.API),function(r){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];r.__arabicParser__={};var a=r.__arabicParser__.isInArabicSubstitutionA=function(v){return e[v.charCodeAt(0)]!==void 0},o=r.__arabicParser__.isArabicLetter=function(v){return typeof v=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(v)},s=r.__arabicParser__.isArabicEndLetter=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length<=2},A=r.__arabicParser__.isArabicAlfLetter=function(v){return o(v)&&i.indexOf(v.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length>=1};var l=r.__arabicParser__.arabicLetterHasFinalForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length>=3};var u=r.__arabicParser__.arabicLetterHasMedialForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length==4},c=r.__arabicParser__.resolveLigatures=function(v){var m=0,g=t,_="",E=0;for(m=0;m<v.length;m+=1)g[v.charCodeAt(m)]!==void 0?(E++,typeof(g=g[v.charCodeAt(m)])=="number"&&(_+=String.fromCharCode(g),g=t,E=0),m===v.length-1&&(g=t,_+=v.charAt(m-(E-1)),m-=E-1,E=0)):(g=t,_+=v.charAt(m-E),m-=E,E=0);return _};r.__arabicParser__.isArabicDiacritic=function(v){return v!==void 0&&n[v.charCodeAt(0)]!==void 0};var h=r.__arabicParser__.getCorrectForm=function(v,m,g){return o(v)?a(v)===!1?-1:!l(v)||!o(m)&&!o(g)||!o(g)&&s(m)||s(v)&&!o(m)||s(v)&&A(m)||s(v)&&s(m)?0:u(v)&&o(m)&&!s(m)&&o(g)&&l(g)?3:s(v)||!o(g)?1:2:-1},f=function(v){var m=0,g=0,_=0,E="",B="",L="",O=(v=v||"").split("\\s+"),b=[];for(m=0;m<O.length;m+=1){for(b.push(""),g=0;g<O[m].length;g+=1)E=O[m][g],B=O[m][g-1],L=O[m][g+1],o(E)?(_=h(E,B,L),b[m]+=_!==-1?String.fromCharCode(e[E.charCodeAt(0)][_]):E):b[m]+=E;b[m]=c(b[m])}return b.join(" ")},p=r.__arabicParser__.processArabic=r.processArabic=function(){var v,m=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,g=[];if(Array.isArray(m)){var _=0;for(g=[],_=0;_<m.length;_+=1)Array.isArray(m[_])?g.push([f(m[_][0]),m[_][1],m[_][2]]):g.push([f(m[_])]);v=g}else v=f(m);return typeof arguments[0]=="string"?v:(arguments[0].text=v,arguments[0])};r.events.push(["preProcessText",p])}(De.API),De.API.autoPrint=function(r){var e;switch((r=r||{}).variant=r.variant||"non-conform",r.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},function(r){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(s){t=s}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(s){n=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(s){i=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(s){a=s}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(s){o=s}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,n){var i;if((t=t||"2d")!=="2d")return null;for(i in n)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=n[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(De.API),function(r){var e={left:0,top:0,bottom:0,right:0},t=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var A=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return A},set:function(v){A=v}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(v){l=v}});var u=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return u},set:function(v){u=v}});var c=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return c},set:function(v){c=v}});var h=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return h},set:function(v){h=v}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(v){f=v}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(v){p=v}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(A){return n.call(this),this.internal.__cell__.headerFunction=typeof A=="function"?A:void 0,this},r.getTextDimensions=function(A,l){n.call(this);var u=(l=l||{}).fontSize||this.getFontSize(),c=l.font||this.getFont(),h=l.scaleFactor||this.internal.scaleFactor,f=0,p=0,v=0,m=this;if(!Array.isArray(A)&&typeof A!="string"){if(typeof A!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");A=String(A)}var g=l.maxWidth;g>0?typeof A=="string"?A=this.splitTextToSize(A,g):Object.prototype.toString.call(A)==="[object Array]"&&(A=A.reduce(function(E,B){return E.concat(m.splitTextToSize(B,g))},[])):A=Array.isArray(A)?A:[A];for(var _=0;_<A.length;_++)f<(v=this.getStringUnitWidth(A[_],{font:c})*u)&&(f=v);return f!==0&&(p=A.length),{w:f/=h,h:Math.max((p*u*this.getLineHeightFactor()-u*(this.getLineHeightFactor()-1))/h,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var A=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(A.left,A.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=r.cell=function(){var A;A=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var l=this.internal.__cell__.lastCell,u=this.internal.__cell__.padding,c=this.internal.__cell__.margins||e,h=this.internal.__cell__.tableHeaderRow,f=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===A.lineNumber?(A.x=(l.x||0)+(l.width||0),A.y=l.y||0):l.y+l.height+A.height+c.bottom>this.getPageHeight()?(this.cellAddPage(),A.y=c.top,f&&h&&(this.printHeaderRow(A.lineNumber,!0),A.y+=h[0].height)):A.y=l.y+l.height||A.y),A.text[0]!==void 0&&(this.rect(A.x,A.y,A.width,A.height,t===!0?"FD":void 0),A.align==="right"?this.text(A.text,A.x+A.width-u,A.y+u,{align:"right",baseline:"top"}):A.align==="center"?this.text(A.text,A.x+A.width/2,A.y+u,{align:"center",baseline:"top",maxWidth:A.width-u-u}):this.text(A.text,A.x+u,A.y+u,{align:"left",baseline:"top",maxWidth:A.width-u-u})),this.internal.__cell__.lastCell=A,this};r.table=function(A,l,u,c,h){if(n.call(this),!u)throw new Error("No data for PDF table.");var f,p,v,m,g=[],_=[],E=[],B={},L={},O=[],b=[],T=(h=h||{}).autoSize||!1,F=h.printHeaders!==!1,M=h.css&&h.css["font-size"]!==void 0?16*h.css["font-size"]:h.fontSize||12,S=h.margins||Object.assign({width:this.getPageWidth()},e),x=typeof h.padding=="number"?h.padding:3,N=h.headerBackgroundColor||"#c8c8c8",P=h.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=F,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=M,this.internal.__cell__.padding=x,this.internal.__cell__.headerBackgroundColor=N,this.internal.__cell__.headerTextColor=P,this.setFontSize(M),c==null)_=g=Object.keys(u[0]),E=g.map(function(){return"left"});else if(Array.isArray(c)&&rn(c[0])==="object")for(g=c.map(function(it){return it.name}),_=c.map(function(it){return it.prompt||it.name||""}),E=c.map(function(it){return it.align||"left"}),f=0;f<c.length;f+=1)L[c[f].name]=c[f].width*(19.049976/25.4);else Array.isArray(c)&&typeof c[0]=="string"&&(_=g=c,E=g.map(function(){return"left"}));if(T||Array.isArray(c)&&typeof c[0]=="string")for(f=0;f<g.length;f+=1){for(B[m=g[f]]=u.map(function(it){return it[m]}),this.setFont(void 0,"bold"),O.push(this.getTextDimensions(_[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=B[m],this.setFont(void 0,"normal"),v=0;v<p.length;v+=1)O.push(this.getTextDimensions(p[v],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);L[m]=Math.max.apply(null,O)+x+x,O=[]}if(F){var Y={};for(f=0;f<g.length;f+=1)Y[g[f]]={},Y[g[f]].text=_[f],Y[g[f]].align=E[f];var z=s.call(this,Y,L);b=g.map(function(it){return new a(A,l,L[it],z,Y[it].text,void 0,Y[it].align)}),this.setTableHeaderRow(b),this.printHeaderRow(1,!1)}var tt=c.reduce(function(it,_t){return it[_t.name]=_t.align,it},{});for(f=0;f<u.length;f+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:f,data:u[f]},this);var J=s.call(this,u[f],L);for(v=0;v<g.length;v+=1){var nt=u[f][g[v]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:f,col:v,data:nt},this),o.call(this,new a(A,l,L[g[v]],J,nt,f+2,tt[g[v]]))}}return this.internal.__cell__.table_x=A,this.internal.__cell__.table_y=l,this};var s=function(A,l){var u=this.internal.__cell__.padding,c=this.internal.__cell__.table_font_size,h=this.internal.scaleFactor;return Object.keys(A).map(function(f){var p=A[f];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,l[f]-u-u)},this).map(function(f){return this.getLineHeightFactor()*f.length*c/h+u+u},this).reduce(function(f,p){return Math.max(f,p)},0)};r.setTableHeaderRow=function(A){n.call(this),this.internal.__cell__.tableHeaderRow=A},r.printHeaderRow=function(A,l){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var u;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var c=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(c[0],c[1],c[2],c[3],void 0,-1)}this.setFont(void 0,"bold");for(var h=[],f=0;f<this.internal.__cell__.tableHeaderRow.length;f+=1){u=this.internal.__cell__.tableHeaderRow[f].clone(),l&&(u.y=this.internal.__cell__.margins.top||0,h.push(u)),u.lineNumber=A;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,u),this.setTextColor(p)}h.length>0&&this.setTableHeaderRow(h),this.setFont(void 0,"normal"),t=!1}}(De.API);var H8={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},G8=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],iS=Q8(G8),k8=[100,200,300,400,500,600,700,800,900],OAt=Q8(k8);function aS(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=function(a){return H8[a=a||"normal"]?a:"normal"}(r.style),n=function(a){if(!a)return 400;if(typeof a=="number")return a>=100&&a<=900&&a%100==0?a:400;if(/^\d00$/.test(a))return parseInt(a);switch(a){case"bold":return 700;case"normal":default:return 400}}(r.weight),i=function(a){return typeof iS[a=a||"normal"]=="number"?a:"normal"}(r.stretch);return{family:e,style:t,weight:n,stretch:i,src:r.src||[],ref:r.ref||{name:e,style:[i,t,n].join(" ")}}}function TN(r,e,t,n){var i;for(i=t;i>=0&&i<e.length;i+=n)if(r[e[i]])return r[e[i]];for(i=t;i>=0&&i<e.length;i-=n)if(r[e[i]])return r[e[i]]}var RAt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},xN={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function SN(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function MAt(r,e,t){for(var n=(t=t||{}).defaultFontFamily||"times",i=Object.assign({},RAt,t.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=aS(e[s])).family]&&(a.family=i[a.family]),r.hasOwnProperty(a.family)){o=r[a.family];break}if(!(o=o||r[n]))throw new Error("Could not find a font-family for the rule '"+SN(a)+"' and default family '"+n+"'.");if(o=function(A,l){if(l[A])return l[A];var u=iS[A],c=u<=iS.normal?-1:1,h=TN(l,G8,u,c);if(!h)throw new Error("Could not find a matching font-stretch value for "+A);return h}(a.stretch,o),o=function(A,l){if(l[A])return l[A];for(var u=H8[A],c=0;c<u.length;++c)if(l[u[c]])return l[u[c]];throw new Error("Could not find a matching font-style for "+A)}(a.style,o),!(o=function(A,l){if(l[A])return l[A];if(A===400&&l[500])return l[500];if(A===500&&l[400])return l[400];var u=OAt[A],c=TN(l,k8,u,A<400?-1:1);if(!c)throw new Error("Could not find a matching font-weight for value "+A);return c}(a.weight,o)))throw new Error("Failed to resolve a font for the rule '"+SN(a)+"'.");return o}function bN(r){return r.trimLeft()}function NAt(r,e){for(var t=0;t<r.length;){if(r.charAt(t)===e)return[r.substring(0,t),r.substring(t+1)];t+=1}return null}function PAt(r){var e=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],r.substring(e[0].length)]}var $m,FN,IN,eB=["times"];(function(r){var e,t,n,i,a,o,s,A,l,u=function(R){return R=R||{},this.isStrokeTransparent=R.isStrokeTransparent||!1,this.strokeOpacity=R.strokeOpacity||1,this.strokeStyle=R.strokeStyle||"#000000",this.fillStyle=R.fillStyle||"#000000",this.isFillTransparent=R.isFillTransparent||!1,this.fillOpacity=R.fillOpacity||1,this.font=R.font||"10px sans-serif",this.textBaseline=R.textBaseline||"alphabetic",this.textAlign=R.textAlign||"left",this.lineWidth=R.lineWidth||1,this.lineJoin=R.lineJoin||"miter",this.lineCap=R.lineCap||"butt",this.path=R.path||[],this.transform=R.transform!==void 0?R.transform.clone():new A,this.globalCompositeOperation=R.globalCompositeOperation||"normal",this.globalAlpha=R.globalAlpha||1,this.clip_path=R.clip_path||[],this.currentPoint=R.currentPoint||new o,this.miterLimit=R.miterLimit||10,this.lastPoint=R.lastPoint||new o,this.lineDashOffset=R.lineDashOffset||0,this.lineDash=R.lineDash||[],this.margin=R.margin||[0,0,0,0],this.prevPageLastElemOffset=R.prevPageLastElemOffset||0,this.ignoreClearRect=typeof R.ignoreClearRect!="boolean"||R.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new c(this),e=this.internal.f2,t=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,A=this.internal.Matrix,l=new u}]);var c=function(R){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var $=R;Object.defineProperty(this,"pdf",{get:function(){return $}});var K=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return K},set:function(rt){K=Boolean(rt)}});var q=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return q},set:function(rt){q=Boolean(rt)}});var at=0;Object.defineProperty(this,"posX",{get:function(){return at},set:function(rt){isNaN(rt)||(at=rt)}});var vt=0;Object.defineProperty(this,"posY",{get:function(){return vt},set:function(rt){isNaN(rt)||(vt=rt)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(rt){var G;typeof rt=="number"?G=[rt,rt,rt,rt]:((G=new Array(4))[0]=rt[0],G[1]=rt.length>=2?rt[1]:G[0],G[2]=rt.length>=3?rt[2]:G[0],G[3]=rt.length>=4?rt[3]:G[1]),l.margin=G}});var wt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return wt},set:function(rt){wt=rt}});var W=0;Object.defineProperty(this,"lastBreak",{get:function(){return W},set:function(rt){W=rt}});var Ft=[];Object.defineProperty(this,"pageBreaks",{get:function(){return Ft},set:function(rt){Ft=rt}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(rt){rt instanceof u&&(l=rt)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(rt){l.path=rt}});var Ot=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ot},set:function(rt){Ot=rt}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(rt){var G;G=h(rt),this.ctx.fillStyle=G.style,this.ctx.isFillTransparent=G.a===0,this.ctx.fillOpacity=G.a,this.pdf.setFillColor(G.r,G.g,G.b,{a:G.a}),this.pdf.setTextColor(G.r,G.g,G.b,{a:G.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(rt){var G=h(rt);this.ctx.strokeStyle=G.style,this.ctx.isStrokeTransparent=G.a===0,this.ctx.strokeOpacity=G.a,G.a===0?this.pdf.setDrawColor(255,255,255):(G.a,this.pdf.setDrawColor(G.r,G.g,G.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(rt){["butt","round","square"].indexOf(rt)!==-1&&(this.ctx.lineCap=rt,this.pdf.setLineCap(rt))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(rt){isNaN(rt)||(this.ctx.lineWidth=rt,this.pdf.setLineWidth(rt))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(rt){["bevel","round","miter"].indexOf(rt)!==-1&&(this.ctx.lineJoin=rt,this.pdf.setLineJoin(rt))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(rt){isNaN(rt)||(this.ctx.miterLimit=rt,this.pdf.setMiterLimit(rt))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(rt){this.ctx.textBaseline=rt}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(rt){["right","end","center","left","start"].indexOf(rt)!==-1&&(this.ctx.textAlign=rt)}});var V=null;function Z(rt,G){if(V===null){var St=function(bt){var dt=[];return Object.keys(bt).forEach(function(Et){bt[Et].forEach(function(yt){var xt=null;switch(yt){case"bold":xt={family:Et,weight:"bold"};break;case"italic":xt={family:Et,style:"italic"};break;case"bolditalic":xt={family:Et,weight:"bold",style:"italic"};break;case"":case"normal":xt={family:Et}}xt!==null&&(xt.ref={name:Et,style:yt},dt.push(xt))})}),dt}(rt.getFontList());V=function(bt){for(var dt={},Et=0;Et<bt.length;++Et){var yt=aS(bt[Et]),xt=yt.family,It=yt.stretch,Mt=yt.style,Vt=yt.weight;dt[xt]=dt[xt]||{},dt[xt][It]=dt[xt][It]||{},dt[xt][It][Mt]=dt[xt][It][Mt]||{},dt[xt][It][Mt][Vt]=yt}return dt}(St.concat(G))}return V}var ut=null;Object.defineProperty(this,"fontFaces",{get:function(){return ut},set:function(rt){V=null,ut=rt}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(rt){var G;if(this.ctx.font=rt,(G=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(rt))!==null){var St=G[1],bt=(G[2],G[3]),dt=G[4],Et=(G[5],G[6]),yt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(dt)[2];dt=Math.floor(yt==="px"?parseFloat(dt)*this.pdf.internal.scaleFactor:yt==="em"?parseFloat(dt)*this.pdf.getFontSize():parseFloat(dt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(dt);var xt=function(Wt){var se,zt,We=[],Me=Wt.trim();if(Me==="")return eB;if(Me in xN)return[xN[Me]];for(;Me!=="";){switch(zt=null,se=(Me=bN(Me)).charAt(0)){case'"':case"'":zt=NAt(Me.substring(1),se);break;default:zt=PAt(Me)}if(zt===null||(We.push(zt[0]),(Me=bN(zt[1]))!==""&&Me.charAt(0)!==","))return eB;Me=Me.replace(/^,/,"")}return We}(Et);if(this.fontFaces){var It=MAt(Z(this.pdf,this.fontFaces),xt.map(function(Wt){return{family:Wt,stretch:"normal",weight:bt,style:St}}));this.pdf.setFont(It.ref.name,It.ref.style)}else{var Mt="";(bt==="bold"||parseInt(bt,10)>=700||St==="bold")&&(Mt="bold"),St==="italic"&&(Mt+="italic"),Mt.length===0&&(Mt="normal");for(var Vt="",Yt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},ae=0;ae<xt.length;ae++){if(this.pdf.internal.getFont(xt[ae],Mt,{noFallback:!0,disableWarning:!0})!==void 0){Vt=xt[ae];break}if(Mt==="bolditalic"&&this.pdf.internal.getFont(xt[ae],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Vt=xt[ae],Mt="bold";else if(this.pdf.internal.getFont(xt[ae],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Vt=xt[ae],Mt="normal";break}}if(Vt===""){for(var re=0;re<xt.length;re++)if(Yt[xt[re]]){Vt=Yt[xt[re]];break}}Vt=Vt===""?"Times":Vt,this.pdf.setFont(Vt,Mt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(rt){this.ctx.globalCompositeOperation=rt}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(rt){this.ctx.globalAlpha=rt}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(rt){this.ctx.lineDashOffset=rt,_t.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(rt){this.ctx.lineDash=rt,_t.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(rt){this.ctx.ignoreClearRect=Boolean(rt)}})};c.prototype.setLineDash=function(R){this.lineDash=R},c.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},c.prototype.fill=function(){B.call(this,"fill",!1)},c.prototype.stroke=function(){B.call(this,"stroke",!1)},c.prototype.beginPath=function(){this.path=[{type:"begin"}]},c.prototype.moveTo=function(R,$){if(isNaN(R)||isNaN($))throw cn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var K=this.ctx.transform.applyToPoint(new o(R,$));this.path.push({type:"mt",x:K.x,y:K.y}),this.ctx.lastPoint=new o(R,$)},c.prototype.closePath=function(){var R=new o(0,0),$=0;for($=this.path.length-1;$!==-1;$--)if(this.path[$].type==="begin"&&rn(this.path[$+1])==="object"&&typeof this.path[$+1].x=="number"){R=new o(this.path[$+1].x,this.path[$+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(R.x,R.y)},c.prototype.lineTo=function(R,$){if(isNaN(R)||isNaN($))throw cn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var K=this.ctx.transform.applyToPoint(new o(R,$));this.path.push({type:"lt",x:K.x,y:K.y}),this.ctx.lastPoint=new o(K.x,K.y)},c.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),B.call(this,null,!0)},c.prototype.quadraticCurveTo=function(R,$,K,q){if(isNaN(K)||isNaN(q)||isNaN(R)||isNaN($))throw cn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var at=this.ctx.transform.applyToPoint(new o(K,q)),vt=this.ctx.transform.applyToPoint(new o(R,$));this.path.push({type:"qct",x1:vt.x,y1:vt.y,x:at.x,y:at.y}),this.ctx.lastPoint=new o(at.x,at.y)},c.prototype.bezierCurveTo=function(R,$,K,q,at,vt){if(isNaN(at)||isNaN(vt)||isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw cn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var wt=this.ctx.transform.applyToPoint(new o(at,vt)),W=this.ctx.transform.applyToPoint(new o(R,$)),Ft=this.ctx.transform.applyToPoint(new o(K,q));this.path.push({type:"bct",x1:W.x,y1:W.y,x2:Ft.x,y2:Ft.y,x:wt.x,y:wt.y}),this.ctx.lastPoint=new o(wt.x,wt.y)},c.prototype.arc=function(R,$,K,q,at,vt){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q)||isNaN(at))throw cn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(vt=Boolean(vt),!this.ctx.transform.isIdentity){var wt=this.ctx.transform.applyToPoint(new o(R,$));R=wt.x,$=wt.y;var W=this.ctx.transform.applyToPoint(new o(0,K)),Ft=this.ctx.transform.applyToPoint(new o(0,0));K=Math.sqrt(Math.pow(W.x-Ft.x,2)+Math.pow(W.y-Ft.y,2))}Math.abs(at-q)>=2*Math.PI&&(q=0,at=2*Math.PI),this.path.push({type:"arc",x:R,y:$,radius:K,startAngle:q,endAngle:at,counterclockwise:vt})},c.prototype.arcTo=function(R,$,K,q,at){throw new Error("arcTo not implemented.")},c.prototype.rect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw cn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(R,$),this.lineTo(R+K,$),this.lineTo(R+K,$+q),this.lineTo(R,$+q),this.lineTo(R,$),this.lineTo(R+K,$),this.lineTo(R,$)},c.prototype.fillRect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw cn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var at={};this.lineCap!=="butt"&&(at.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(at.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(R,$,K,q),this.fill(),at.hasOwnProperty("lineCap")&&(this.lineCap=at.lineCap),at.hasOwnProperty("lineJoin")&&(this.lineJoin=at.lineJoin)}},c.prototype.strokeRect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw cn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(R,$,K,q),this.stroke())},c.prototype.clearRect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw cn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(R,$,K,q))},c.prototype.save=function(R){R=typeof R!="boolean"||R;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("q");if(this.pdf.setPage($),R){this.ctx.fontSize=this.pdf.internal.getFontSize();var q=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=q}},c.prototype.restore=function(R){R=typeof R!="boolean"||R;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("Q");this.pdf.setPage($),R&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},c.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var h=function(R){var $,K,q,at;if(R.isCanvasGradient===!0&&(R=R.getColor()),!R)return{r:0,g:0,b:0,a:0,style:R};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(R))$=0,K=0,q=0,at=0;else{var vt=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(R);if(vt!==null)$=parseInt(vt[1]),K=parseInt(vt[2]),q=parseInt(vt[3]),at=1;else if((vt=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(R))!==null)$=parseInt(vt[1]),K=parseInt(vt[2]),q=parseInt(vt[3]),at=parseFloat(vt[4]);else{if(at=1,typeof R=="string"&&R.charAt(0)!=="#"){var wt=new R8(R);R=wt.ok?wt.toHex():"#000000"}R.length===4?($=R.substring(1,2),$+=$,K=R.substring(2,3),K+=K,q=R.substring(3,4),q+=q):($=R.substring(1,3),K=R.substring(3,5),q=R.substring(5,7)),$=parseInt($,16),K=parseInt(K,16),q=parseInt(q,16)}}return{r:$,g:K,b:q,a:at,style:R}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return Boolean(this.ctx.isStrokeTransparent||this.globalAlpha==0)};c.prototype.fillText=function(R,$,K,q){if(isNaN($)||isNaN(K)||typeof R!="string")throw cn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(q=isNaN(q)?void 0:q,!f.call(this)){var at=J(this.ctx.transform.rotation),vt=this.ctx.transform.scaleX;x.call(this,{text:R,x:$,y:K,scale:vt,angle:at,align:this.textAlign,maxWidth:q})}},c.prototype.strokeText=function(R,$,K,q){if(isNaN($)||isNaN(K)||typeof R!="string")throw cn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){q=isNaN(q)?void 0:q;var at=J(this.ctx.transform.rotation),vt=this.ctx.transform.scaleX;x.call(this,{text:R,x:$,y:K,scale:vt,renderingMode:"stroke",angle:at,align:this.textAlign,maxWidth:q})}},c.prototype.measureText=function(R){if(typeof R!="string")throw cn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var $=this.pdf,K=this.pdf.internal.scaleFactor,q=$.internal.getFontSize(),at=$.getStringUnitWidth(R)*q/$.internal.scaleFactor,vt=function(wt){var W=(wt=wt||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return W}}),this};return new vt({width:at*=Math.round(96*K/72*1e4)/1e4})},c.prototype.scale=function(R,$){if(isNaN(R)||isNaN($))throw cn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var K=new A(R,0,0,$,0,0);this.ctx.transform=this.ctx.transform.multiply(K)},c.prototype.rotate=function(R){if(isNaN(R))throw cn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var $=new A(Math.cos(R),Math.sin(R),-Math.sin(R),Math.cos(R),0,0);this.ctx.transform=this.ctx.transform.multiply($)},c.prototype.translate=function(R,$){if(isNaN(R)||isNaN($))throw cn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var K=new A(1,0,0,1,R,$);this.ctx.transform=this.ctx.transform.multiply(K)},c.prototype.transform=function(R,$,K,q,at,vt){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q)||isNaN(at)||isNaN(vt))throw cn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var wt=new A(R,$,K,q,at,vt);this.ctx.transform=this.ctx.transform.multiply(wt)},c.prototype.setTransform=function(R,$,K,q,at,vt){R=isNaN(R)?1:R,$=isNaN($)?0:$,K=isNaN(K)?0:K,q=isNaN(q)?1:q,at=isNaN(at)?0:at,vt=isNaN(vt)?0:vt,this.ctx.transform=new A(R,$,K,q,at,vt)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};c.prototype.drawImage=function(R,$,K,q,at,vt,wt,W,Ft){var Ot=this.pdf.getImageProperties(R),V=1,Z=1,ut=1,rt=1;q!==void 0&&W!==void 0&&(ut=W/q,rt=Ft/at,V=Ot.width/q*W/q,Z=Ot.height/at*Ft/at),vt===void 0&&(vt=$,wt=K,$=0,K=0),q!==void 0&&W===void 0&&(W=q,Ft=at),q===void 0&&W===void 0&&(W=Ot.width,Ft=Ot.height);for(var G,St=this.ctx.transform.decompose(),bt=J(St.rotate.shx),dt=new A,Et=(dt=(dt=(dt=dt.multiply(St.translate)).multiply(St.skew)).multiply(St.scale)).applyToRectangle(new s(vt-$*ut,wt-K*rt,q*V,at*Z)),yt=m.call(this,Et),xt=[],It=0;It<yt.length;It+=1)xt.indexOf(yt[It])===-1&&xt.push(yt[It]);if(E(xt),this.autoPaging)for(var Mt=xt[0],Vt=xt[xt.length-1],Yt=Mt;Yt<Vt+1;Yt++){this.pdf.setPage(Yt);var ae=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],re=Yt===1?this.posY+this.margin[0]:this.margin[0],Wt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],se=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],zt=Yt===1?0:Wt+(Yt-2)*se;if(this.ctx.clip_path.length!==0){var We=this.path;G=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(G,this.posX+this.margin[3],-zt+re+this.ctx.prevPageLastElemOffset),L.call(this,"fill",!0),this.path=We}var Me=JSON.parse(JSON.stringify(Et));Me=_([Me],this.posX+this.margin[3],-zt+re+this.ctx.prevPageLastElemOffset)[0];var dr=(Yt>Mt||Yt<Vt)&&v.call(this);dr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ae,se,null).clip().discardPath()),this.pdf.addImage(R,"JPEG",Me.x,Me.y,Me.w,Me.h,null,null,bt),dr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(R,"JPEG",Et.x,Et.y,Et.w,Et.h,null,null,bt)};var m=function(R,$,K){var q=[];$=$||this.pdf.internal.pageSize.width,K=K||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var at=this.posY+this.ctx.prevPageLastElemOffset;switch(R.type){default:case"mt":case"lt":q.push(Math.floor((R.y+at)/K)+1);break;case"arc":q.push(Math.floor((R.y+at-R.radius)/K)+1),q.push(Math.floor((R.y+at+R.radius)/K)+1);break;case"qct":var vt=nt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,R.x1,R.y1,R.x,R.y);q.push(Math.floor((vt.y+at)/K)+1),q.push(Math.floor((vt.y+vt.h+at)/K)+1);break;case"bct":var wt=it(this.ctx.lastPoint.x,this.ctx.lastPoint.y,R.x1,R.y1,R.x2,R.y2,R.x,R.y);q.push(Math.floor((wt.y+at)/K)+1),q.push(Math.floor((wt.y+wt.h+at)/K)+1);break;case"rect":q.push(Math.floor((R.y+at)/K)+1),q.push(Math.floor((R.y+R.h+at)/K)+1)}for(var W=0;W<q.length;W+=1)for(;this.pdf.internal.getNumberOfPages()<q[W];)g.call(this);return q},g=function(){var R=this.fillStyle,$=this.strokeStyle,K=this.font,q=this.lineCap,at=this.lineWidth,vt=this.lineJoin;this.pdf.addPage(),this.fillStyle=R,this.strokeStyle=$,this.font=K,this.lineCap=q,this.lineWidth=at,this.lineJoin=vt},_=function(R,$,K){for(var q=0;q<R.length;q++)switch(R[q].type){case"bct":R[q].x2+=$,R[q].y2+=K;case"qct":R[q].x1+=$,R[q].y1+=K;case"mt":case"lt":case"arc":default:R[q].x+=$,R[q].y+=K}return R},E=function(R){return R.sort(function($,K){return $-K})},B=function(R,$){for(var K,q,at=this.fillStyle,vt=this.strokeStyle,wt=this.lineCap,W=this.lineWidth,Ft=Math.abs(W*this.ctx.transform.scaleX),Ot=this.lineJoin,V=JSON.parse(JSON.stringify(this.path)),Z=JSON.parse(JSON.stringify(this.path)),ut=[],rt=0;rt<Z.length;rt++)if(Z[rt].x!==void 0)for(var G=m.call(this,Z[rt]),St=0;St<G.length;St+=1)ut.indexOf(G[St])===-1&&ut.push(G[St]);for(var bt=0;bt<ut.length;bt++)for(;this.pdf.internal.getNumberOfPages()<ut[bt];)g.call(this);if(E(ut),this.autoPaging)for(var dt=ut[0],Et=ut[ut.length-1],yt=dt;yt<Et+1;yt++){this.pdf.setPage(yt),this.fillStyle=at,this.strokeStyle=vt,this.lineCap=wt,this.lineWidth=Ft,this.lineJoin=Ot;var xt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],It=yt===1?this.posY+this.margin[0]:this.margin[0],Mt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Vt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Yt=yt===1?0:Mt+(yt-2)*Vt;if(this.ctx.clip_path.length!==0){var ae=this.path;K=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(K,this.posX+this.margin[3],-Yt+It+this.ctx.prevPageLastElemOffset),L.call(this,R,!0),this.path=ae}if(q=JSON.parse(JSON.stringify(V)),this.path=_(q,this.posX+this.margin[3],-Yt+It+this.ctx.prevPageLastElemOffset),$===!1||yt===0){var re=(yt>dt||yt<Et)&&v.call(this);re&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],xt,Vt,null).clip().discardPath()),L.call(this,R,$),re&&this.pdf.restoreGraphicsState()}this.lineWidth=W}else this.lineWidth=Ft,L.call(this,R,$),this.lineWidth=W;this.path=V},L=function(R,$){if((R!=="stroke"||$||!p.call(this))&&(R==="stroke"||$||!f.call(this))){for(var K,q,at=[],vt=this.path,wt=0;wt<vt.length;wt++){var W=vt[wt];switch(W.type){case"begin":at.push({begin:!0});break;case"close":at.push({close:!0});break;case"mt":at.push({start:W,deltas:[],abs:[]});break;case"lt":var Ft=at.length;if(vt[wt-1]&&!isNaN(vt[wt-1].x)&&(K=[W.x-vt[wt-1].x,W.y-vt[wt-1].y],Ft>0)){for(;Ft>=0;Ft--)if(at[Ft-1].close!==!0&&at[Ft-1].begin!==!0){at[Ft-1].deltas.push(K),at[Ft-1].abs.push(W);break}}break;case"bct":K=[W.x1-vt[wt-1].x,W.y1-vt[wt-1].y,W.x2-vt[wt-1].x,W.y2-vt[wt-1].y,W.x-vt[wt-1].x,W.y-vt[wt-1].y],at[at.length-1].deltas.push(K);break;case"qct":var Ot=vt[wt-1].x+2/3*(W.x1-vt[wt-1].x),V=vt[wt-1].y+2/3*(W.y1-vt[wt-1].y),Z=W.x+2/3*(W.x1-W.x),ut=W.y+2/3*(W.y1-W.y),rt=W.x,G=W.y;K=[Ot-vt[wt-1].x,V-vt[wt-1].y,Z-vt[wt-1].x,ut-vt[wt-1].y,rt-vt[wt-1].x,G-vt[wt-1].y],at[at.length-1].deltas.push(K);break;case"arc":at.push({deltas:[],abs:[],arc:!0}),Array.isArray(at[at.length-1].abs)&&at[at.length-1].abs.push(W)}}q=$?null:R==="stroke"?"stroke":"fill";for(var St=!1,bt=0;bt<at.length;bt++)if(at[bt].arc)for(var dt=at[bt].abs,Et=0;Et<dt.length;Et++){var yt=dt[Et];yt.type==="arc"?T.call(this,yt.x,yt.y,yt.radius,yt.startAngle,yt.endAngle,yt.counterclockwise,void 0,$,!St):N.call(this,yt.x,yt.y),St=!0}else if(at[bt].close===!0)this.pdf.internal.out("h"),St=!1;else if(at[bt].begin!==!0){var xt=at[bt].start.x,It=at[bt].start.y;P.call(this,at[bt].deltas,xt,It),St=!0}q&&F.call(this,q),$&&M.call(this)}},O=function(R){var $=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,K=$*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return R-K;case"top":return R+$-K;case"hanging":return R+$-2*K;case"middle":return R+$/2-K;case"ideographic":return R;case"alphabetic":default:return R}},b=function(R){return R+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};c.prototype.createLinearGradient=function(){var R=function(){};return R.colorStops=[],R.addColorStop=function($,K){this.colorStops.push([$,K])},R.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},R.isCanvasGradient=!0,R},c.prototype.createPattern=function(){return this.createLinearGradient()},c.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(R,$,K,q,at,vt,wt,W,Ft){for(var Ot=z.call(this,K,q,at,vt),V=0;V<Ot.length;V++){var Z=Ot[V];V===0&&(Ft?S.call(this,Z.x1+R,Z.y1+$):N.call(this,Z.x1+R,Z.y1+$)),Y.call(this,R,$,Z.x2,Z.y2,Z.x3,Z.y3,Z.x4,Z.y4)}W?M.call(this):F.call(this,wt)},F=function(R){switch(R){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},M=function(){this.pdf.clip(),this.pdf.discardPath()},S=function(R,$){this.pdf.internal.out(t(R)+" "+n($)+" m")},x=function(R){var $;switch(R.align){case"right":case"end":$="right";break;case"center":$="center";break;case"left":case"start":default:$="left"}var K=this.pdf.getTextDimensions(R.text),q=O.call(this,R.y),at=b.call(this,q)-K.h,vt=this.ctx.transform.applyToPoint(new o(R.x,q)),wt=this.ctx.transform.decompose(),W=new A;W=(W=(W=W.multiply(wt.translate)).multiply(wt.skew)).multiply(wt.scale);for(var Ft,Ot,V,Z=this.ctx.transform.applyToRectangle(new s(R.x,q,K.w,K.h)),ut=W.applyToRectangle(new s(R.x,at,K.w,K.h)),rt=m.call(this,ut),G=[],St=0;St<rt.length;St+=1)G.indexOf(rt[St])===-1&&G.push(rt[St]);if(E(G),this.autoPaging)for(var bt=G[0],dt=G[G.length-1],Et=bt;Et<dt+1;Et++){this.pdf.setPage(Et);var yt=Et===1?this.posY+this.margin[0]:this.margin[0],xt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],It=this.pdf.internal.pageSize.height-this.margin[2],Mt=It-this.margin[0],Vt=this.pdf.internal.pageSize.width-this.margin[1],Yt=Vt-this.margin[3],ae=Et===1?0:xt+(Et-2)*Mt;if(this.ctx.clip_path.length!==0){var re=this.path;Ft=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(Ft,this.posX+this.margin[3],-1*ae+yt),L.call(this,"fill",!0),this.path=re}var Wt=_([JSON.parse(JSON.stringify(ut))],this.posX+this.margin[3],-ae+yt+this.ctx.prevPageLastElemOffset)[0];R.scale>=.01&&(Ot=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ot*R.scale),V=this.lineWidth,this.lineWidth=V*R.scale);var se=this.autoPaging!=="text";if(se||Wt.y+Wt.h<=It){if(se||Wt.y>=yt&&Wt.x<=Vt){var zt=se?R.text:this.pdf.splitTextToSize(R.text,R.maxWidth||Vt-Wt.x)[0],We=_([JSON.parse(JSON.stringify(Z))],this.posX+this.margin[3],-ae+yt+this.ctx.prevPageLastElemOffset)[0],Me=se&&(Et>bt||Et<dt)&&v.call(this);Me&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Yt,Mt,null).clip().discardPath()),this.pdf.text(zt,We.x,We.y,{angle:R.angle,align:$,renderingMode:R.renderingMode}),Me&&this.pdf.restoreGraphicsState()}}else Wt.y<It&&(this.ctx.prevPageLastElemOffset+=It-Wt.y);R.scale>=.01&&(this.pdf.setFontSize(Ot),this.lineWidth=V)}else R.scale>=.01&&(Ot=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ot*R.scale),V=this.lineWidth,this.lineWidth=V*R.scale),this.pdf.text(R.text,vt.x+this.posX,vt.y+this.posY,{angle:R.angle,align:$,renderingMode:R.renderingMode,maxWidth:R.maxWidth}),R.scale>=.01&&(this.pdf.setFontSize(Ot),this.lineWidth=V)},N=function(R,$,K,q){K=K||0,q=q||0,this.pdf.internal.out(t(R+K)+" "+n($+q)+" l")},P=function(R,$,K){return this.pdf.lines(R,$,K,null,null)},Y=function(R,$,K,q,at,vt,wt,W){this.pdf.internal.out([e(i(K+R)),e(a(q+$)),e(i(at+R)),e(a(vt+$)),e(i(wt+R)),e(a(W+$)),"c"].join(" "))},z=function(R,$,K,q){for(var at=2*Math.PI,vt=Math.PI/2;$>K;)$-=at;var wt=Math.abs(K-$);wt<at&&q&&(wt=at-wt);for(var W=[],Ft=q?-1:1,Ot=$;wt>1e-5;){var V=Ot+Ft*Math.min(wt,vt);W.push(tt.call(this,R,Ot,V)),wt-=Math.abs(V-Ot),Ot=V}return W},tt=function(R,$,K){var q=(K-$)/2,at=R*Math.cos(q),vt=R*Math.sin(q),wt=at,W=-vt,Ft=wt*wt+W*W,Ot=Ft+wt*at+W*vt,V=4/3*(Math.sqrt(2*Ft*Ot)-Ot)/(wt*vt-W*at),Z=wt-V*W,ut=W+V*wt,rt=Z,G=-ut,St=q+$,bt=Math.cos(St),dt=Math.sin(St);return{x1:R*Math.cos($),y1:R*Math.sin($),x2:Z*bt-ut*dt,y2:Z*dt+ut*bt,x3:rt*bt-G*dt,y3:rt*dt+G*bt,x4:R*Math.cos(K),y4:R*Math.sin(K)}},J=function(R){return 180*R/Math.PI},nt=function(R,$,K,q,at,vt){var wt=R+.5*(K-R),W=$+.5*(q-$),Ft=at+.5*(K-at),Ot=vt+.5*(q-vt),V=Math.min(R,at,wt,Ft),Z=Math.max(R,at,wt,Ft),ut=Math.min($,vt,W,Ot),rt=Math.max($,vt,W,Ot);return new s(V,ut,Z-V,rt-ut)},it=function(R,$,K,q,at,vt,wt,W){var Ft,Ot,V,Z,ut,rt,G,St,bt,dt,Et,yt,xt,It,Mt=K-R,Vt=q-$,Yt=at-K,ae=vt-q,re=wt-at,Wt=W-vt;for(Ot=0;Ot<41;Ot++)bt=(G=(V=R+(Ft=Ot/40)*Mt)+Ft*((ut=K+Ft*Yt)-V))+Ft*(ut+Ft*(at+Ft*re-ut)-G),dt=(St=(Z=$+Ft*Vt)+Ft*((rt=q+Ft*ae)-Z))+Ft*(rt+Ft*(vt+Ft*Wt-rt)-St),Ot==0?(Et=bt,yt=dt,xt=bt,It=dt):(Et=Math.min(Et,bt),yt=Math.min(yt,dt),xt=Math.max(xt,bt),It=Math.max(It,dt));return new s(Math.round(Et),Math.round(yt),Math.round(xt-Et),Math.round(It-yt))},_t=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var R,$,K=(R=this.ctx.lineDash,$=this.ctx.lineDashOffset,JSON.stringify({lineDash:R,lineDashOffset:$}));this.prevLineDash!==K&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=K)}}})(De.API),function(r){var e=function(a){var o,s,A,l,u,c,h,f,p,v;for(s=[],A=0,l=(a+=o="\0\0\0\0".slice(a.length%4||4)).length;l>A;A+=4)(u=(a.charCodeAt(A)<<24)+(a.charCodeAt(A+1)<<16)+(a.charCodeAt(A+2)<<8)+a.charCodeAt(A+3))!==0?(c=(u=((u=((u=((u=(u-(v=u%85))/85)-(p=u%85))/85)-(f=u%85))/85)-(h=u%85))/85)%85,s.push(c+33,h+33,f+33,p+33,v+33)):s.push(122);return function(m,g){for(var _=g;_>0;_--)m.pop()}(s,o.length),String.fromCharCode.apply(String,s)+"~>"},t=function(a){var o,s,A,l,u,c=String,h="length",f=255,p="charCodeAt",v="slice",m="replace";for(a[v](-2),a=a[v](0,-2)[m](/\s/g,"")[m]("z","!!!!!"),A=[],l=0,u=(a+=o="uuuuu"[v](a[h]%5||5))[h];u>l;l+=5)s=52200625*(a[p](l)-33)+614125*(a[p](l+1)-33)+7225*(a[p](l+2)-33)+85*(a[p](l+3)-33)+(a[p](l+4)-33),A.push(f&s>>24,f&s>>16,f&s>>8,f&s);return function(g,_){for(var E=_;E>0;E--)g.pop()}(A,o[h]),c.fromCharCode.apply(c,A)},n=function(a){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),o.test(a)===!1)return"";for(var s="",A=0;A<a.length;A+=2)s+=String.fromCharCode("0x"+(a[A]+a[A+1]));return s},i=function(a){for(var o=new Uint8Array(a.length),s=a.length;s--;)o[s]=a.charCodeAt(s);return a=(o=Jx(o)).reduce(function(A,l){return A+String.fromCharCode(l)},"")};r.processDataByFilters=function(a,o){var s=0,A=a||"",l=[];for(typeof(o=o||[])=="string"&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case"ASCII85Decode":case"/ASCII85Decode":A=t(A),l.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":A=e(A),l.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":A=n(A),l.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":A=A.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">",l.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":A=i(A),l.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[s]+'" is not implemented')}return{data:A,reverseChain:l.reverse().join(" ")}}}(De.API),function(r){r.loadFile=function(e,t,n){return function(i,a,o){a=a!==!1,o=typeof o=="function"?o:function(){};var s=void 0;try{s=function(A,l,u){var c=new XMLHttpRequest,h=0,f=function(p){var v=p.length,m=[],g=String.fromCharCode;for(h=0;h<v;h+=1)m.push(g(255&p.charCodeAt(h)));return m.join("")};if(c.open("GET",A,!l),c.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(c.onload=function(){c.status===200?u(f(this.responseText)):u(void 0)}),c.send(null),l&&c.status===200)return f(c.responseText)}(i,a,o)}catch{}return s}(e,t,n)},r.loadImageFile=r.loadFile}(De.API),function(r){function e(){return(Ge.html2canvas?Promise.resolve(Ge.html2canvas):Promise.resolve().then(function(){return iwt})).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function t(){return(Ge.DOMPurify?Promise.resolve(Ge.DOMPurify):Promise.resolve().then(function(){return Swt})).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var s=rn(o);return s==="undefined"?"undefined":s==="string"||o instanceof String?"string":s==="number"||o instanceof Number?"number":s==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":s==="object"?"object":"unknown"},i=function(o,s){var A=document.createElement(o);for(var l in s.className&&(A.className=s.className),s.innerHTML&&s.dompurify&&(A.innerHTML=s.dompurify.sanitize(s.innerHTML)),s.style)A.style[l]=s.style[l];return A},a=function o(s){var A=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),l=o.convert(Promise.resolve(),A);return l=(l=l.setProgress(1,o,1,[o])).set(s)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(o,s){return o.__proto__=s||a.prototype,o},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(o,s){return this.then(function(){switch(s=s||function(A){switch(n(A)){case"string":return"string";case"element":return A.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o)){case"string":return this.then(t).then(function(A){return this.set({src:i("div",{innerHTML:o,dompurify:A})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},a.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},s=function A(l,u){for(var c=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),h=l.firstChild;h;h=h.nextSibling)u!==!0&&h.nodeType===1&&h.nodeName==="SCRIPT"||c.appendChild(A(h,u));return l.nodeType===1&&(l.nodeName==="CANVAS"?(c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(c.value=l.value),c.addEventListener("load",function(){c.scrollTop=l.scrollTop,c.scrollLeft=l.scrollLeft},!0)),c}(this.prop.src,this.opt.html2canvas.javascriptEnabled);s.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(s),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(s){var A=Object.assign({},this.opt.html2canvas);return delete A.onrendered,s(this.prop.container,A)}).then(function(s){(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(s){var A=this.opt.jsPDF,l=this.opt.fontFaces,u=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,c=Object.assign({async:!0,allowTaint:!0,scale:u,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete c.onrendered,A.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,A.context2d.posX=this.opt.x,A.context2d.posY=this.opt.y,A.context2d.margin=this.opt.margin,A.context2d.fontFaces=l,l)for(var h=0;h<l.length;++h){var f=l[h],p=f.src.find(function(v){return v.format==="truetype"});p&&A.addFont(p.url,f.ref.name,f.ref.style)}return c.windowHeight=c.windowHeight||0,c.windowHeight=c.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):c.windowHeight,A.context2d.save(!0),s(this.prop.container,c)}).then(function(s){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(o,s,A){return(A=A||"pdf").toLowerCase()==="img"||A.toLowerCase()==="image"?this.outputImg(o,s):this.outputPdf(o,s)},a.prototype.outputPdf=function(o,s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,s)})},a.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},a.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(o){if(n(o)!=="object")return this;var s=Object.keys(o||{}).map(function(A){if(A in a.template.prop)return function(){this.prop[A]=o[A]};switch(A){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[A]=o[A]}}},this);return this.then(function(){return this.thenList(s)})},a.prototype.get=function(o,s){return this.then(function(){var A=o in a.template.prop?this.prop[o]:this.opt[o];return s?s(A):A})},a.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},a.prototype.setPageSize=function(o){function s(A,l){return Math.floor(A*l/72*96)}return this.then(function(){(o=o||De.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:s(o.inner.width,o.k),height:s(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},a.prototype.setProgress=function(o,s,A,l){return o!=null&&(this.progress.val=o),s!=null&&(this.progress.state=s),A!=null&&(this.progress.n=A),l!=null&&(this.progress.stack=l),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(o,s,A,l){return this.setProgress(o?this.progress.val+o:null,s||null,A?this.progress.n+A:null,l?this.progress.stack.concat(l):null)},a.prototype.then=function(o,s){var A=this;return this.thenCore(o,s,function(l,u){return A.updateProgress(null,null,1,[l]),Promise.prototype.then.call(this,function(c){return A.updateProgress(null,l),c}).then(l,u).then(function(c){return A.updateProgress(1),c})})},a.prototype.thenCore=function(o,s,A){A=A||Promise.prototype.then,o&&(o=o.bind(this)),s&&(s=s.bind(this));var l=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:a.convert(Object.assign({},this),Promise.prototype),u=A.call(l,o,s);return a.convert(u,this.__proto__)},a.prototype.thenExternal=function(o,s){return Promise.prototype.then.call(this,o,s)},a.prototype.thenList=function(o){var s=this;return o.forEach(function(A){s=s.thenCore(A)}),s},a.prototype.catch=function(o){o&&(o=o.bind(this));var s=Promise.prototype.catch.call(this,o);return a.convert(s,this)},a.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},a.prototype.error=function(o){return this.then(function(){throw new Error(o)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,De.getPageSize=function(o,s,A){if(rn(o)==="object"){var l=o;o=l.orientation,s=l.unit||s,A=l.format||A}s=s||"mm",A=A||"a4",o=(""+(o||"P")).toLowerCase();var u,c=(""+A).toLowerCase(),h={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(s){case"pt":u=1;break;case"mm":u=72/25.4;break;case"cm":u=72/2.54;break;case"in":u=72;break;case"px":u=.75;break;case"pc":case"em":u=12;break;case"ex":u=6;break;default:throw"Invalid unit: "+s}var f,p=0,v=0;if(h.hasOwnProperty(c))p=h[c][1]/u,v=h[c][0]/u;else try{p=A[1],v=A[0]}catch{throw new Error("Invalid format: "+A)}if(o==="p"||o==="portrait")o="p",v>p&&(f=v,v=p,p=f);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",p>v&&(f=v,v=p,p=f)}return{width:v,height:p,unit:s,k:u,orientation:o}},r.html=function(o,s){(s=s||{}).callback=s.callback||function(){},s.html2canvas=s.html2canvas||{},s.html2canvas.canvas=s.html2canvas.canvas||this.canvas,s.jsPDF=s.jsPDF||this,s.fontFaces=s.fontFaces?s.fontFaces.map(aS):null;var A=new a(s);return s.worker?A:A.from(o).doCallback()}}(De.API),De.API.addJS=function(r){return IN=r,this.internal.events.subscribe("postPutResources",function(){$m=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+($m+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),FN=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+IN+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){$m!==void 0&&FN!==void 0&&this.internal.out("/Names <</JavaScript "+$m+" 0 R>>")}),this},function(r){var e;r.events.push(["postPutResources",function(){var t=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=t.outline.render().split(/\r\n/),a=0;a<i.length;a++){var o=i[a],s=n.exec(o);if(s!=null){var A=s[1];t.internal.newObjectDeferredBegin(A,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,u=[];for(a=0;a<l;a++){var c=t.internal.newObject();u.push(c);var h=t.internal.getPageInfo(a+1);t.internal.write("<< /D["+h.objId+" 0 R /XYZ null null null]>> endobj")}var f=t.internal.newObject();for(t.internal.write("<< /Names [ "),a=0;a<u.length;a++)t.internal.write("(page_"+(a+1)+")"+u[a]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+f+" 0 R"),t.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),r.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(n,i,a){var o={title:i,options:a,children:[]};return n==null&&(n=this.root),n.children.push(o),o},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(n){n.id=t.internal.newObjectDeferred();for(var i=0;i<n.children.length;i++)this.genIds_r(n.children[i])},t.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},t.outline.renderItems=function(n){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<n.children.length;a++){var o=n.children[a];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(n)),a>0&&this.line("/Prev "+this.makeRef(n.children[a-1])),a<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[a+1])),o.children.length>0&&(this.line("/First "+this.makeRef(o.children[0])),this.line("/Last "+this.makeRef(o.children[o.children.length-1])));var s=this.count=this.count_r({count:0},o);if(s>0&&this.line("/Count "+s),o.options&&o.options.pageNumber){var A=t.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+A.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var l=0;l<n.children.length;l++)this.renderItems(n.children[l])},t.outline.line=function(n){this.ctx.val+=n+`\r
`},t.outline.makeRef=function(n){return n.id+" 0 R"},t.outline.makeString=function(n){return"("+t.internal.pdfEscape(n)+")"},t.outline.objStart=function(n){this.ctx.val+=`\r
`+n.id+` 0 obj\r
<<\r
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},t.outline.count_r=function(n,i){for(var a=0;a<i.children.length;a++)n.count++,this.count_r(n,i.children[a]);return n.count}}])}(De.API),function(r){var e=[192,193,194,195,196,197,198,199];r.processJPEG=function(t,n,i,a,o,s){var A,l=this.decode.DCT_DECODE,u=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(A=function(c){for(var h,f=256*c.charCodeAt(4)+c.charCodeAt(5),p=c.length,v={width:0,height:0,numcomponents:1},m=4;m<p;m+=2){if(m+=f,e.indexOf(c.charCodeAt(m+1))!==-1){h=256*c.charCodeAt(m+5)+c.charCodeAt(m+6),v={width:256*c.charCodeAt(m+7)+c.charCodeAt(m+8),height:h,numcomponents:c.charCodeAt(m+9)};break}f=256*c.charCodeAt(m+2)+c.charCodeAt(m+3)}return v}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}u={data:t,width:A.width,height:A.height,colorSpace:s,bitsPerComponent:8,filter:l,index:n,alias:i}}return u}}(De.API);var mf,jm,LN,ON,RN,UAt=function(){var r,e,t;function n(a){var o,s,A,l,u,c,h,f,p,v,m,g,_,E;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},c=null;;){switch(o=this.readUInt32(),p=function(){var B,L;for(L=[],B=0;B<4;++B)L.push(String.fromCharCode(this.data[this.pos++]));return L}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(o);break;case"fcTL":c&&this.animation.frames.push(c),this.pos+=4,c={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},u=this.readUInt16(),l=this.readUInt16()||100,c.delay=1e3*u/l,c.disposeOp=this.data[this.pos++],c.blendOp=this.data[this.pos++],c.data=[];break;case"IDAT":case"fdAT":for(p==="fdAT"&&(this.pos+=4,o-=4),a=(c!=null?c.data:void 0)||this.imgData,g=0;0<=o?g<o:g>o;0<=o?++g:--g)a.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(A=this.palette.length/3,this.transparency.indexed=this.read(o),this.transparency.indexed.length>A)throw new Error("More transparent colors than palette size");if((v=A-this.transparency.indexed.length)>0)for(_=0;0<=v?_<v:_>v;0<=v?++_:--_)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(o)[0];break;case 2:this.transparency.rgb=this.read(o)}break;case"tEXt":h=(m=this.read(o)).indexOf(0),f=String.fromCharCode.apply(String,m.slice(0,h)),this.text[f]=String.fromCharCode.apply(String,m.slice(h+1));break;case"IEND":return c&&this.animation.frames.push(c),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=(E=this.colorType)===4||E===6,s=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*s,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=o}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(a){var o,s;for(s=[],o=0;0<=a?o<a:o>a;0<=a?++o:--o)s.push(this.data[this.pos++]);return s},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(a){var o=this.pixelBitlength/8,s=new Uint8Array(this.width*this.height*o),A=0,l=this;if(a==null&&(a=this.imgData),a.length===0)return new Uint8Array(0);function u(c,h,f,p){var v,m,g,_,E,B,L,O,b,T,F,M,S,x,N,P,Y,z,tt,J,nt,it=Math.ceil((l.width-c)/f),_t=Math.ceil((l.height-h)/p),R=l.width==it&&l.height==_t;for(x=o*it,M=R?s:new Uint8Array(x*_t),B=a.length,S=0,m=0;S<_t&&A<B;){switch(a[A++]){case 0:for(_=Y=0;Y<x;_=Y+=1)M[m++]=a[A++];break;case 1:for(_=z=0;z<x;_=z+=1)v=a[A++],E=_<o?0:M[m-o],M[m++]=(v+E)%256;break;case 2:for(_=tt=0;tt<x;_=tt+=1)v=a[A++],g=(_-_%o)/o,N=S&&M[(S-1)*x+g*o+_%o],M[m++]=(N+v)%256;break;case 3:for(_=J=0;J<x;_=J+=1)v=a[A++],g=(_-_%o)/o,E=_<o?0:M[m-o],N=S&&M[(S-1)*x+g*o+_%o],M[m++]=(v+Math.floor((E+N)/2))%256;break;case 4:for(_=nt=0;nt<x;_=nt+=1)v=a[A++],g=(_-_%o)/o,E=_<o?0:M[m-o],S===0?N=P=0:(N=M[(S-1)*x+g*o+_%o],P=g&&M[(S-1)*x+(g-1)*o+_%o]),L=E+N-P,O=Math.abs(L-E),T=Math.abs(L-N),F=Math.abs(L-P),b=O<=T&&O<=F?E:T<=F?N:P,M[m++]=(v+b)%256;break;default:throw new Error("Invalid filter algorithm: "+a[A-1])}if(!R){var $=((h+S*p)*l.width+c)*o,K=S*x;for(_=0;_<it;_+=1){for(var q=0;q<o;q+=1)s[$++]=M[K++];$+=(f-1)*o}}S++}}return a=gAt(a),l.interlaceMethod==1?(u(0,0,8,8),u(4,0,8,8),u(0,4,4,8),u(2,0,4,4),u(0,2,2,4),u(1,0,2,2),u(0,1,1,2)):u(0,0,1,1),s},n.prototype.decodePalette=function(){var a,o,s,A,l,u,c,h,f;for(s=this.palette,u=this.transparency.indexed||[],l=new Uint8Array((u.length||0)+s.length),A=0,a=0,o=c=0,h=s.length;c<h;o=c+=3)l[A++]=s[o],l[A++]=s[o+1],l[A++]=s[o+2],l[A++]=(f=u[a++])!=null?f:255;return l},n.prototype.copyToImageData=function(a,o){var s,A,l,u,c,h,f,p,v,m,g;if(A=this.colors,v=null,s=this.hasAlphaChannel,this.palette.length&&(v=(g=this._decodedPalette)!=null?g:this._decodedPalette=this.decodePalette(),A=4,s=!0),p=(l=a.data||a).length,c=v||o,u=h=0,A===1)for(;u<p;)f=v?4*o[u/4]:h,m=c[f++],l[u++]=m,l[u++]=m,l[u++]=m,l[u++]=s?c[f++]:255,h=f;else for(;u<p;)f=v?4*o[u/4]:h,l[u++]=c[f++],l[u++]=c[f++],l[u++]=c[f++],l[u++]=s?c[f++]:255,h=f},n.prototype.decode=function(){var a;return a=new Uint8Array(this.width*this.height*4),this.copyToImageData(a,this.decodePixels()),a};var i=function(){if(Object.prototype.toString.call(Ge)==="[object Window]"){try{e=Ge.document.createElement("canvas"),t=e.getContext("2d")}catch{return!1}return!0}return!1};return i(),r=function(a){var o;if(i()===!0)return t.width=a.width,t.height=a.height,t.clearRect(0,0,a.width,a.height),t.putImageData(a,0,0),(o=new Image).src=e.toDataURL(),o;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(a){var o,s,A,l,u,c,h,f;if(this.animation){for(f=[],s=u=0,c=(h=this.animation.frames).length;u<c;s=++u)o=h[s],A=a.createImageData(o.width,o.height),l=this.decodePixels(new Uint8Array(o.data)),this.copyToImageData(A,l),o.imageData=A,f.push(o.image=r(A));return f}},n.prototype.renderFrame=function(a,o){var s,A,l;return s=(A=this.animation.frames)[o],l=A[o-1],o===0&&a.clearRect(0,0,this.width,this.height),(l!=null?l.disposeOp:void 0)===1?a.clearRect(l.xOffset,l.yOffset,l.width,l.height):(l!=null?l.disposeOp:void 0)===2&&a.putImageData(l.imageData,l.xOffset,l.yOffset),s.blendOp===0&&a.clearRect(s.xOffset,s.yOffset,s.width,s.height),a.drawImage(s.image,s.xOffset,s.yOffset)},n.prototype.animate=function(a){var o,s,A,l,u,c,h=this;return s=0,c=this.animation,l=c.numFrames,A=c.frames,u=c.numPlays,(o=function(){var f,p;if(f=s++%l,p=A[f],h.renderFrame(a,f),l>1&&s/l<u)return h.animation._timeout=setTimeout(o,p.delay)})()},n.prototype.stopAnimation=function(){var a;return clearTimeout((a=this.animation)!=null?a._timeout:void 0)},n.prototype.render=function(a){var o,s;return a._png&&a._png.stopAnimation(),a._png=this,a.width=this.width,a.height=this.height,o=a.getContext("2d"),this.animation?(this.decodeFrames(o),this.animate(o)):(s=o.createImageData(this.width,this.height),this.copyToImageData(s,this.decodePixels()),o.putImageData(s,0,0))},n}();/**
* @license
*
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*//**
* @license
* (c) Dean McNamee <dean@gmail.com>, 2013.
*
* https://github.com/deanm/omggif
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
* including animation and compression. It does not rely on any specific
* underlying system, so should run in the browser, Node, or Plask.
*/function DAt(r){var e=0;if(r[e++]!==71||r[e++]!==73||r[e++]!==70||r[e++]!==56||(r[e++]+1&253)!=56||r[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=r[e++]|r[e++]<<8,n=r[e++]|r[e++]<<8,i=r[e++],a=i>>7,o=1<<(7&i)+1;r[e++],r[e++];var s=null,A=null;a&&(s=e,A=o,e+=3*o);var l=!0,u=[],c=0,h=null,f=0,p=null;for(this.width=t,this.height=n;l&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,p=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((S=r[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var v=r[e++];c=r[e++]|r[e++]<<8,h=r[e++],!(1&v)&&(h=null),f=v>>2&7,e++;break;case 254:for(;;){if(!((S=r[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var m=r[e++]|r[e++]<<8,g=r[e++]|r[e++]<<8,_=r[e++]|r[e++]<<8,E=r[e++]|r[e++]<<8,B=r[e++],L=B>>6&1,O=1<<(7&B)+1,b=s,T=A,F=!1;B>>7&&(F=!0,b=e,T=O,e+=3*O);var M=e;for(e++;;){var S;if(!((S=r[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}u.push({x:m,y:g,width:_,height:E,has_local_palette:F,palette_offset:b,palette_size:T,data_offset:M,data_length:e-M,transparent_index:h,interlaced:!!L,delay:c,disposal:f});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+r[e-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return p},this.frameInfo=function(x){if(x<0||x>=u.length)throw new Error("Frame index out of range.");return u[x]},this.decodeAndBlitFrameBGRA=function(x,N){var P=this.frameInfo(x),Y=P.width*P.height,z=new Uint8Array(Y);MN(r,P.data_offset,z,Y);var tt=P.palette_offset,J=P.transparent_index;J===null&&(J=256);var nt=P.width,it=t-nt,_t=nt,R=4*(P.y*t+P.x),$=4*((P.y+P.height)*t+P.x),K=R,q=4*it;P.interlaced===!0&&(q+=4*t*7);for(var at=8,vt=0,wt=z.length;vt<wt;++vt){var W=z[vt];if(_t===0&&(_t=nt,(K+=q)>=$&&(q=4*it+4*t*(at-1),K=R+(nt+it)*(at<<1),at>>=1)),W===J)K+=4;else{var Ft=r[tt+3*W],Ot=r[tt+3*W+1],V=r[tt+3*W+2];N[K++]=V,N[K++]=Ot,N[K++]=Ft,N[K++]=255}--_t}},this.decodeAndBlitFrameRGBA=function(x,N){var P=this.frameInfo(x),Y=P.width*P.height,z=new Uint8Array(Y);MN(r,P.data_offset,z,Y);var tt=P.palette_offset,J=P.transparent_index;J===null&&(J=256);var nt=P.width,it=t-nt,_t=nt,R=4*(P.y*t+P.x),$=4*((P.y+P.height)*t+P.x),K=R,q=4*it;P.interlaced===!0&&(q+=4*t*7);for(var at=8,vt=0,wt=z.length;vt<wt;++vt){var W=z[vt];if(_t===0&&(_t=nt,(K+=q)>=$&&(q=4*it+4*t*(at-1),K=R+(nt+it)*(at<<1),at>>=1)),W===J)K+=4;else{var Ft=r[tt+3*W],Ot=r[tt+3*W+1],V=r[tt+3*W+2];N[K++]=Ft,N[K++]=Ot,N[K++]=V,N[K++]=255}--_t}}}function MN(r,e,t,n){for(var i=r[e++],a=1<<i,o=a+1,s=o+1,A=i+1,l=(1<<A)-1,u=0,c=0,h=0,f=r[e++],p=new Int32Array(4096),v=null;;){for(;u<16&&f!==0;)c|=r[e++]<<u,u+=8,f===1?f=r[e++]:--f;if(u<A)break;var m=c&l;if(c>>=A,u-=A,m!==a){if(m===o)break;for(var g=m<s?m:v,_=0,E=g;E>a;)E=p[E]>>8,++_;var B=E;if(h+_+(g!==m?1:0)>n)return void cn.log("Warning, gif stream longer than expected.");t[h++]=B;var L=h+=_;for(g!==m&&(t[h++]=B),E=g;_--;)E=p[E],t[--L]=255&E,E>>=8;v!==null&&s<4096&&(p[s++]=v<<8|B,s>=l+1&&A<12&&(++A,l=l<<1|1)),v=m}else s=o+1,l=(1<<(A=i+1))-1,v=null}return h!==n&&cn.log("Warning, gif stream shorter than expected."),t}/**
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function rB(r){var e,t,n,i,a,o=Math.floor,s=new Array(64),A=new Array(64),l=new Array(64),u=new Array(64),c=new Array(65535),h=new Array(65535),f=new Array(64),p=new Array(64),v=[],m=0,g=7,_=new Array(64),E=new Array(64),B=new Array(64),L=new Array(256),O=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],F=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],S=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],x=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],N=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Y=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function z(R,$){for(var K=0,q=0,at=new Array,vt=1;vt<=16;vt++){for(var wt=1;wt<=R[vt];wt++)at[$[q]]=[],at[$[q]][0]=K,at[$[q]][1]=vt,q++,K++;K*=2}return at}function tt(R){for(var $=R[0],K=R[1]-1;K>=0;)$&1<<K&&(m|=1<<g),K--,--g<0&&(m==255?(J(255),J(0)):J(m),g=7,m=0)}function J(R){v.push(R)}function nt(R){J(R>>8&255),J(255&R)}function it(R,$,K,q,at){for(var vt,wt=at[0],W=at[240],Ft=function(dt,Et){var yt,xt,It,Mt,Vt,Yt,ae,re,Wt,se,zt=0;for(Wt=0;Wt<8;++Wt){yt=dt[zt],xt=dt[zt+1],It=dt[zt+2],Mt=dt[zt+3],Vt=dt[zt+4],Yt=dt[zt+5],ae=dt[zt+6];var We=yt+(re=dt[zt+7]),Me=yt-re,dr=xt+ae,Ie=xt-ae,be=It+Yt,An=It-Yt,Ar=Mt+Vt,xi=Mt-Vt,Tr=We+Ar,hi=We-Ar,Vr=dr+be,Kr=dr-be;dt[zt]=Tr+Vr,dt[zt+4]=Tr-Vr;var Ne=.707106781*(Kr+hi);dt[zt+2]=hi+Ne,dt[zt+6]=hi-Ne;var Er=.382683433*((Tr=xi+An)-(Kr=Ie+Me)),Yn=.5411961*Tr+Er,dn=1.306562965*Kr+Er,Si=.707106781*(Vr=An+Ie),bi=Me+Si,Fe=Me-Si;dt[zt+5]=Fe+Yn,dt[zt+3]=Fe-Yn,dt[zt+1]=bi+dn,dt[zt+7]=bi-dn,zt+=8}for(zt=0,Wt=0;Wt<8;++Wt){yt=dt[zt],xt=dt[zt+8],It=dt[zt+16],Mt=dt[zt+24],Vt=dt[zt+32],Yt=dt[zt+40],ae=dt[zt+48];var fi=yt+(re=dt[zt+56]),Qn=yt-re,Fi=xt+ae,nn=xt-ae,Jr=It+Yt,Bn=It-Yt,wo=Mt+Vt,Ae=Mt-Vt,ht=fi+wo,Ht=fi-wo,Zt=Fi+Jr,rr=Fi-Jr;dt[zt]=ht+Zt,dt[zt+32]=ht-Zt;var Mr=.707106781*(rr+Ht);dt[zt+16]=Ht+Mr,dt[zt+48]=Ht-Mr;var ln=.382683433*((ht=Ae+Bn)-(rr=nn+Qn)),Tn=.5411961*ht+ln,os=1.306562965*rr+ln,Ii=.707106781*(Zt=Bn+nn),TA=Qn+Ii,Ll=Qn-Ii;dt[zt+40]=Ll+Tn,dt[zt+24]=Ll-Tn,dt[zt+8]=TA+os,dt[zt+56]=TA-os,zt++}for(Wt=0;Wt<64;++Wt)se=dt[Wt]*Et[Wt],f[Wt]=se>0?se+.5|0:se-.5|0;return f}(R,$),Ot=0;Ot<64;++Ot)p[b[Ot]]=Ft[Ot];var V=p[0]-K;K=p[0],V==0?tt(q[0]):(tt(q[h[vt=32767+V]]),tt(c[vt]));for(var Z=63;Z>0&&p[Z]==0;)Z--;if(Z==0)return tt(wt),K;for(var ut,rt=1;rt<=Z;){for(var G=rt;p[rt]==0&&rt<=Z;)++rt;var St=rt-G;if(St>=16){ut=St>>4;for(var bt=1;bt<=ut;++bt)tt(W);St&=15}vt=32767+p[rt],tt(at[(St<<4)+h[vt]]),tt(c[vt]),rt++}return Z!=63&&tt(wt),K}function _t(R){R=Math.min(Math.max(R,1),100),a!=R&&(function($){for(var K=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],q=0;q<64;q++){var at=o((K[q]*$+50)/100);at=Math.min(Math.max(at,1),255),s[b[q]]=at}for(var vt=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],wt=0;wt<64;wt++){var W=o((vt[wt]*$+50)/100);W=Math.min(Math.max(W,1),255),A[b[wt]]=W}for(var Ft=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ot=0,V=0;V<8;V++)for(var Z=0;Z<8;Z++)l[Ot]=1/(s[b[Ot]]*Ft[V]*Ft[Z]*8),u[Ot]=1/(A[b[Ot]]*Ft[V]*Ft[Z]*8),Ot++}(R<50?Math.floor(5e3/R):Math.floor(200-2*R)),a=R)}this.encode=function(R,$){$&&_t($),v=new Array,m=0,g=7,nt(65496),nt(65504),nt(16),J(74),J(70),J(73),J(70),J(0),J(1),J(1),J(0),nt(1),nt(1),J(0),J(0),function(){nt(65499),nt(132),J(0);for(var xt=0;xt<64;xt++)J(s[xt]);J(1);for(var It=0;It<64;It++)J(A[It])}(),function(xt,It){nt(65472),nt(17),J(8),nt(It),nt(xt),J(3),J(1),J(17),J(0),J(2),J(17),J(1),J(3),J(17),J(1)}(R.width,R.height),function(){nt(65476),nt(418),J(0);for(var xt=0;xt<16;xt++)J(T[xt+1]);for(var It=0;It<=11;It++)J(F[It]);J(16);for(var Mt=0;Mt<16;Mt++)J(M[Mt+1]);for(var Vt=0;Vt<=161;Vt++)J(S[Vt]);J(1);for(var Yt=0;Yt<16;Yt++)J(x[Yt+1]);for(var ae=0;ae<=11;ae++)J(N[ae]);J(17);for(var re=0;re<16;re++)J(P[re+1]);for(var Wt=0;Wt<=161;Wt++)J(Y[Wt])}(),nt(65498),nt(12),J(3),J(1),J(0),J(2),J(17),J(3),J(17),J(0),J(63),J(0);var K=0,q=0,at=0;m=0,g=7,this.encode.displayName="_encode_";for(var vt,wt,W,Ft,Ot,V,Z,ut,rt,G=R.data,St=R.width,bt=R.height,dt=4*St,Et=0;Et<bt;){for(vt=0;vt<dt;){for(Ot=dt*Et+vt,Z=-1,ut=0,rt=0;rt<64;rt++)V=Ot+(ut=rt>>3)*dt+(Z=4*(7&rt)),Et+ut>=bt&&(V-=dt*(Et+1+ut-bt)),vt+Z>=dt&&(V-=vt+Z-dt+4),wt=G[V++],W=G[V++],Ft=G[V++],_[rt]=(O[wt]+O[W+256>>0]+O[Ft+512>>0]>>16)-128,E[rt]=(O[wt+768>>0]+O[W+1024>>0]+O[Ft+1280>>0]>>16)-128,B[rt]=(O[wt+1280>>0]+O[W+1536>>0]+O[Ft+1792>>0]>>16)-128;K=it(_,l,K,e,n),q=it(E,u,q,t,i),at=it(B,u,at,t,i),vt+=32}Et+=8}if(g>=0){var yt=[];yt[1]=g+1,yt[0]=(1<<g+1)-1,tt(yt)}return nt(65497),new Uint8Array(v)},r=r||50,function(){for(var R=String.fromCharCode,$=0;$<256;$++)L[$]=R($)}(),e=z(T,F),t=z(x,N),n=z(M,S),i=z(P,Y),function(){for(var R=1,$=2,K=1;K<=15;K++){for(var q=R;q<$;q++)h[32767+q]=K,c[32767+q]=[],c[32767+q][1]=K,c[32767+q][0]=q;for(var at=-($-1);at<=-R;at++)h[32767+at]=K,c[32767+at]=[],c[32767+at][1]=K,c[32767+at][0]=$-1+at;R<<=1,$<<=1}}(),function(){for(var R=0;R<256;R++)O[R]=19595*R,O[R+256>>0]=38470*R,O[R+512>>0]=7471*R+32768,O[R+768>>0]=-11059*R,O[R+1024>>0]=-21709*R,O[R+1280>>0]=32768*R+8421375,O[R+1536>>0]=-27439*R,O[R+1792>>0]=-5329*R}(),_t(r)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function ys(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function NN(r){function e(T){if(!T)throw Error("assert :P")}function t(T,F,M){for(var S=0;4>S;S++)if(T[F+S]!=M.charCodeAt(S))return!0;return!1}function n(T,F,M,S,x){for(var N=0;N<x;N++)T[F+N]=M[S+N]}function i(T,F,M,S){for(var x=0;x<S;x++)T[F+x]=M}function a(T){return new Int32Array(T)}function o(T,F){for(var M=[],S=0;S<T;S++)M.push(new F);return M}function s(T,F){var M=[];return function S(x,N,P){for(var Y=P[N],z=0;z<Y&&(x.push(P.length>N+1?[]:new F),!(P.length<N+1));z++)S(x[z],N+1,P)}(M,0,T),M}var A=function(){var T=this;function F(d,y){for(var C=1<<y-1>>>0;d&C;)C>>>=1;return C?(d&C-1)+C:d}function M(d,y,C,I,U){e(!(I%C));do d[y+(I-=C)]=U;while(0<I)}function S(d,y,C,I,U){if(e(2328>=U),512>=U)var Q=a(512);else if((Q=a(U))==null)return 0;return function(H,k,j,X,ft,Bt){var Tt,mt,Qt=k,Lt=1<<j,pt=a(16),gt=a(16);for(e(ft!=0),e(X!=null),e(H!=null),e(0<j),mt=0;mt<ft;++mt){if(15<X[mt])return 0;++pt[X[mt]]}if(pt[0]==ft)return 0;for(gt[1]=0,Tt=1;15>Tt;++Tt){if(pt[Tt]>1<<Tt)return 0;gt[Tt+1]=gt[Tt]+pt[Tt]}for(mt=0;mt<ft;++mt)Tt=X[mt],0<X[mt]&&(Bt[gt[Tt]++]=mt);if(gt[15]==1)return(X=new x).g=0,X.value=Bt[0],M(H,Qt,1,Lt,X),Lt;var Pt,Gt=-1,Dt=Lt-1,ce=0,Jt=1,Pe=1,ee=1<<j;for(mt=0,Tt=1,ft=2;Tt<=j;++Tt,ft<<=1){if(Jt+=Pe<<=1,0>(Pe-=pt[Tt]))return 0;for(;0<pt[Tt];--pt[Tt])(X=new x).g=Tt,X.value=Bt[mt++],M(H,Qt+ce,ft,ee,X),ce=F(ce,Tt)}for(Tt=j+1,ft=2;15>=Tt;++Tt,ft<<=1){if(Jt+=Pe<<=1,0>(Pe-=pt[Tt]))return 0;for(;0<pt[Tt];--pt[Tt]){if(X=new x,(ce&Dt)!=Gt){for(Qt+=ee,Pt=1<<(Gt=Tt)-j;15>Gt&&!(0>=(Pt-=pt[Gt]));)++Gt,Pt<<=1;Lt+=ee=1<<(Pt=Gt-j),H[k+(Gt=ce&Dt)].g=Pt+j,H[k+Gt].value=Qt-k-Gt}X.g=Tt-j,X.value=Bt[mt++],M(H,Qt+(ce>>j),ft,ee,X),ce=F(ce,Tt)}}return Jt!=2*gt[15]-1?0:Lt}(d,y,C,I,U,Q)}function x(){this.value=this.g=0}function N(){this.value=this.g=0}function P(){this.G=o(5,x),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(qa,N)}function Y(d,y,C,I){e(d!=null),e(y!=null),e(2147483648>I),d.Ca=254,d.I=0,d.b=-8,d.Ka=0,d.oa=y,d.pa=C,d.Jd=y,d.Yc=C+I,d.Zc=4<=I?C+I-4+1:C,vt(d)}function z(d,y){for(var C=0;0<y--;)C|=W(d,128)<<y;return C}function tt(d,y){var C=z(d,y);return wt(d)?-C:C}function J(d,y,C,I){var U,Q=0;for(e(d!=null),e(y!=null),e(4294967288>I),d.Sb=I,d.Ra=0,d.u=0,d.h=0,4<I&&(I=4),U=0;U<I;++U)Q+=y[C+U]<<8*U;d.Ra=Q,d.bb=I,d.oa=y,d.pa=C}function nt(d){for(;8<=d.u&&d.bb<d.Sb;)d.Ra>>>=8,d.Ra+=d.oa[d.pa+d.bb]<<nf-8>>>0,++d.bb,d.u-=8;K(d)&&(d.h=1,d.u=0)}function it(d,y){if(e(0<=y),!d.h&&y<=rf){var C=$(d)&ef[y];return d.u+=y,nt(d),C}return d.h=1,d.u=0}function _t(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function R(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function $(d){return d.Ra>>>(d.u&nf-1)>>>0}function K(d){return e(d.bb<=d.Sb),d.h||d.bb==d.Sb&&d.u>nf}function q(d,y){d.u=y,d.h=K(d)}function at(d){d.u>=Id&&(e(d.u>=Id),nt(d))}function vt(d){e(d!=null&&d.oa!=null),d.pa<d.Zc?(d.I=(d.oa[d.pa++]|d.I<<8)>>>0,d.b+=8):(e(d!=null&&d.oa!=null),d.pa<d.Yc?(d.b+=8,d.I=d.oa[d.pa++]|d.I<<8):d.Ka?d.b=0:(d.I<<=8,d.b+=8,d.Ka=1))}function wt(d){return z(d,1)}function W(d,y){var C=d.Ca;0>d.b&&vt(d);var I=d.b,U=C*y>>>8,Q=(d.I>>>I>U)+0;for(Q?(C-=U,d.I-=U+1<<I>>>0):C=U+1,I=C,U=0;256<=I;)U+=8,I>>=8;return I=7^U+Za[I],d.b-=I,d.Ca=(C<<I)-1,Q}function Ft(d,y,C){d[y+0]=C>>24&255,d[y+1]=C>>16&255,d[y+2]=C>>8&255,d[y+3]=C>>0&255}function Ot(d,y){return d[y+0]<<0|d[y+1]<<8}function V(d,y){return Ot(d,y)|d[y+2]<<16}function Z(d,y){return Ot(d,y)|Ot(d,y+2)<<16}function ut(d,y){var C=1<<y;return e(d!=null),e(0<y),d.X=a(C),d.X==null?0:(d.Mb=32-y,d.Xa=y,1)}function rt(d,y){e(d!=null),e(y!=null),e(d.Xa==y.Xa),n(y.X,0,d.X,0,1<<y.Xa)}function G(){this.X=[],this.Xa=this.Mb=0}function St(d,y,C,I){e(C!=null),e(I!=null);var U=C[0],Q=I[0];return U==0&&(U=(d*Q+y/2)/y),Q==0&&(Q=(y*U+d/2)/d),0>=U||0>=Q?0:(C[0]=U,I[0]=Q,1)}function bt(d,y){return d+(1<<y)-1>>>y}function dt(d,y){return((4278255360&d)+(4278255360&y)>>>0&4278255360)+((16711935&d)+(16711935&y)>>>0&16711935)>>>0}function Et(d,y){T[y]=function(C,I,U,Q,H,k,j){var X;for(X=0;X<H;++X){var ft=T[d](k[j+X-1],U,Q+X);k[j+X]=dt(C[I+X],ft)}}}function yt(){this.ud=this.hd=this.jd=0}function xt(d,y){return((4278124286&(d^y))>>>1)+(d&y)>>>0}function It(d){return 0<=d&&256>d?d:0>d?0:255<d?255:void 0}function Mt(d,y){return It(d+(d-y+.5>>1))}function Vt(d,y,C){return Math.abs(y-C)-Math.abs(d-C)}function Yt(d,y,C,I,U,Q,H){for(I=Q[H-1],C=0;C<U;++C)Q[H+C]=I=dt(d[y+C],I)}function ae(d,y,C,I,U){var Q;for(Q=0;Q<C;++Q){var H=d[y+Q],k=H>>8&255,j=16711935&(j=(j=16711935&H)+((k<<16)+k));I[U+Q]=(4278255360&H)+j>>>0}}function re(d,y){y.jd=d>>0&255,y.hd=d>>8&255,y.ud=d>>16&255}function Wt(d,y,C,I,U,Q){var H;for(H=0;H<I;++H){var k=y[C+H],j=k>>>8,X=k,ft=255&(ft=(ft=k>>>16)+((d.jd<<24>>24)*(j<<24>>24)>>>5));X=255&(X=(X=X+((d.hd<<24>>24)*(j<<24>>24)>>>5))+((d.ud<<24>>24)*(ft<<24>>24)>>>5)),U[Q+H]=(4278255360&k)+(ft<<16)+X}}function se(d,y,C,I,U){T[y]=function(Q,H,k,j,X,ft,Bt,Tt,mt){for(j=Bt;j<Tt;++j)for(Bt=0;Bt<mt;++Bt)X[ft++]=U(k[I(Q[H++])])},T[d]=function(Q,H,k,j,X,ft,Bt){var Tt=8>>Q.b,mt=Q.Ea,Qt=Q.K[0],Lt=Q.w;if(8>Tt)for(Q=(1<<Q.b)-1,Lt=(1<<Tt)-1;H<k;++H){var pt,gt=0;for(pt=0;pt<mt;++pt)pt&Q||(gt=I(j[X++])),ft[Bt++]=U(Qt[gt&Lt]),gt>>=Tt}else T["VP8LMapColor"+C](j,X,Qt,Lt,ft,Bt,H,k,mt)}}function zt(d,y,C,I,U){for(C=y+C;y<C;){var Q=d[y++];I[U++]=Q>>16&255,I[U++]=Q>>8&255,I[U++]=Q>>0&255}}function We(d,y,C,I,U){for(C=y+C;y<C;){var Q=d[y++];I[U++]=Q>>16&255,I[U++]=Q>>8&255,I[U++]=Q>>0&255,I[U++]=Q>>24&255}}function Me(d,y,C,I,U){for(C=y+C;y<C;){var Q=(H=d[y++])>>16&240|H>>12&15,H=H>>0&240|H>>28&15;I[U++]=Q,I[U++]=H}}function dr(d,y,C,I,U){for(C=y+C;y<C;){var Q=(H=d[y++])>>16&248|H>>13&7,H=H>>5&224|H>>3&31;I[U++]=Q,I[U++]=H}}function Ie(d,y,C,I,U){for(C=y+C;y<C;){var Q=d[y++];I[U++]=Q>>0&255,I[U++]=Q>>8&255,I[U++]=Q>>16&255}}function be(d,y,C,I,U,Q){if(Q==0)for(C=y+C;y<C;)Ft(I,((Q=d[y++])[0]>>24|Q[1]>>8&65280|Q[2]<<8&16711680|Q[3]<<24)>>>0),U+=32;else n(I,U,d,y,C)}function An(d,y){T[y][0]=T[d+"0"],T[y][1]=T[d+"1"],T[y][2]=T[d+"2"],T[y][3]=T[d+"3"],T[y][4]=T[d+"4"],T[y][5]=T[d+"5"],T[y][6]=T[d+"6"],T[y][7]=T[d+"7"],T[y][8]=T[d+"8"],T[y][9]=T[d+"9"],T[y][10]=T[d+"10"],T[y][11]=T[d+"11"],T[y][12]=T[d+"12"],T[y][13]=T[d+"13"],T[y][14]=T[d+"0"],T[y][15]=T[d+"0"]}function Ar(d){return d==zE||d==XE||d==Jy||d==YE}function xi(){this.eb=[],this.size=this.A=this.fb=0}function Tr(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function hi(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new xi,this.f.kb=new Tr,this.sd=null}function Vr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Kr(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Ne(d){return alert("todo:WebPSamplerProcessPlane"),d.T}function Er(d,y){var C=d.T,I=y.ba.f.RGBA,U=I.eb,Q=I.fb+d.ka*I.A,H=jo[y.ba.S],k=d.y,j=d.O,X=d.f,ft=d.N,Bt=d.ea,Tt=d.W,mt=y.cc,Qt=y.dc,Lt=y.Mc,pt=y.Nc,gt=d.ka,Pt=d.ka+d.T,Gt=d.U,Dt=Gt+1>>1;for(gt==0?H(k,j,null,null,X,ft,Bt,Tt,X,ft,Bt,Tt,U,Q,null,null,Gt):(H(y.ec,y.fc,k,j,mt,Qt,Lt,pt,X,ft,Bt,Tt,U,Q-I.A,U,Q,Gt),++C);gt+2<Pt;gt+=2)mt=X,Qt=ft,Lt=Bt,pt=Tt,ft+=d.Rc,Tt+=d.Rc,Q+=2*I.A,H(k,(j+=2*d.fa)-d.fa,k,j,mt,Qt,Lt,pt,X,ft,Bt,Tt,U,Q-I.A,U,Q,Gt);return j+=d.fa,d.j+Pt<d.o?(n(y.ec,y.fc,k,j,Gt),n(y.cc,y.dc,X,ft,Dt),n(y.Mc,y.Nc,Bt,Tt,Dt),C--):1&Pt||H(k,j,null,null,X,ft,Bt,Tt,X,ft,Bt,Tt,U,Q+I.A,null,null,Gt),C}function Yn(d,y,C){var I=d.F,U=[d.J];if(I!=null){var Q=d.U,H=y.ba.S,k=H==Zy||H==Jy;y=y.ba.f.RGBA;var j=[0],X=d.ka;j[0]=d.T,d.Kb&&(X==0?--j[0]:(--X,U[0]-=d.width),d.j+d.ka+d.T==d.o&&(j[0]=d.o-d.j-X));var ft=y.eb;X=y.fb+X*y.A,d=zy(I,U[0],d.width,Q,j,ft,X+(k?0:3),y.A),e(C==j),d&&Ar(H)&&Hl(ft,X,k,Q,j,y.A)}return 0}function dn(d){var y=d.ma,C=y.ba.S,I=11>C,U=C==Wy||C==qy||C==Zy||C==KE||C==12||Ar(C);if(y.memory=null,y.Ib=null,y.Jb=null,y.Nd=null,!bd(y.Oa,d,U?11:12))return 0;if(U&&Ar(C)&&Kt(),d.da)alert("todo:use_scaling");else{if(I){if(y.Ib=Ne,d.Kb){if(C=d.U+1>>1,y.memory=a(d.U+2*C),y.memory==null)return 0;y.ec=y.memory,y.fc=0,y.cc=y.ec,y.dc=y.fc+d.U,y.Mc=y.cc,y.Nc=y.dc+C,y.Ib=Er,Kt()}}else alert("todo:EmitYUV");U&&(y.Jb=Yn,I&&Ct())}if(I&&!OO){for(d=0;256>d;++d)T9[d]=89858*(d-128)+em>>tm,b9[d]=-22014*(d-128)+em,S9[d]=-45773*(d-128),x9[d]=113618*(d-128)+em>>tm;for(d=Pd;d<ZE;++d)y=76283*(d-16)+em>>tm,F9[d-Pd]=Eo(y,255),I9[d-Pd]=Eo(y+8>>4,15);OO=1}return 1}function Si(d){var y=d.ma,C=d.U,I=d.T;return e(!(1&d.ka)),0>=C||0>=I?0:(C=y.Ib(d,y),y.Jb!=null&&y.Jb(d,y,C),y.Dc+=C,1)}function bi(d){d.ma.memory=null}function Fe(d,y,C,I){return it(d,8)!=47?0:(y[0]=it(d,14)+1,C[0]=it(d,14)+1,I[0]=it(d,1),it(d,3)!=0?0:!d.h)}function fi(d,y){if(4>d)return d+1;var C=d-2>>1;return(2+(1&d)<<C)+it(y,C)+1}function Qn(d,y){return 120<y?y-120:1<=(C=((C=c9[y-1])>>4)*d+(8-(15&C)))?C:1;var C}function Fi(d,y,C){var I=$(C),U=d[y+=255&I].g-8;return 0<U&&(q(C,C.u+8),I=$(C),y+=d[y].value,y+=I&(1<<U)-1),q(C,C.u+d[y].g),d[y].value}function nn(d,y,C){return C.g+=d.g,C.value+=d.value<<y>>>0,e(8>=C.g),d.g}function Jr(d,y,C){var I=d.xc;return e((y=I==0?0:d.vc[d.md*(C>>I)+(y>>I)])<d.Wb),d.Ya[y]}function Bn(d,y,C,I){var U=d.ab,Q=d.c*y,H=d.C;y=H+y;var k=C,j=I;for(I=d.Ta,C=d.Ua;0<U--;){var X=d.gc[U],ft=H,Bt=y,Tt=k,mt=j,Qt=(j=I,k=C,X.Ea);switch(e(ft<Bt),e(Bt<=X.nc),X.hc){case 2:Ky(Tt,mt,(Bt-ft)*Qt,j,k);break;case 0:var Lt=ft,pt=Bt,gt=j,Pt=k,Gt=(ee=X).Ea;Lt==0&&(kE(Tt,mt,null,null,1,gt,Pt),Yt(Tt,mt+1,0,0,Gt-1,gt,Pt+1),mt+=Gt,Pt+=Gt,++Lt);for(var Dt=1<<ee.b,ce=Dt-1,Jt=bt(Gt,ee.b),Pe=ee.K,ee=ee.w+(Lt>>ee.b)*Jt;Lt<pt;){var Ur=Pe,tn=ee,Sr=1;for(Ld(Tt,mt,gt,Pt-Gt,1,gt,Pt);Sr<Gt;){var yr=(Sr&~ce)+Dt;yr>Gt&&(yr=Gt),(0,Pl[Ur[tn++]>>8&15])(Tt,mt+ +Sr,gt,Pt+Sr-Gt,yr-Sr,gt,Pt+Sr),Sr=yr}mt+=Gt,Pt+=Gt,++Lt&ce||(ee+=Jt)}Bt!=X.nc&&n(j,k-Qt,j,k+(Bt-ft-1)*Qt,Qt);break;case 1:for(Qt=Tt,pt=mt,Gt=(Tt=X.Ea)-(Pt=Tt&~(gt=(mt=1<<X.b)-1)),Lt=bt(Tt,X.b),Dt=X.K,X=X.w+(ft>>X.b)*Lt;ft<Bt;){for(ce=Dt,Jt=X,Pe=new yt,ee=pt+Pt,Ur=pt+Tt;pt<ee;)re(ce[Jt++],Pe),Go(Pe,Qt,pt,mt,j,k),pt+=mt,k+=mt;pt<Ur&&(re(ce[Jt++],Pe),Go(Pe,Qt,pt,Gt,j,k),pt+=Gt,k+=Gt),++ft&gt||(X+=Lt)}break;case 3:if(Tt==j&&mt==k&&0<X.b){for(pt=j,Tt=Qt=k+(Bt-ft)*Qt-(Pt=(Bt-ft)*bt(X.Ea,X.b)),mt=j,gt=k,Lt=[],Pt=(Gt=Pt)-1;0<=Pt;--Pt)Lt[Pt]=mt[gt+Pt];for(Pt=Gt-1;0<=Pt;--Pt)pt[Tt+Pt]=Lt[Pt];us(X,ft,Bt,j,Qt,j,k)}else us(X,ft,Bt,Tt,mt,j,k)}k=I,j=C}j!=C&&n(I,C,k,j,Q)}function wo(d,y){var C=d.V,I=d.Ba+d.c*d.C,U=y-d.C;if(e(y<=d.l.o),e(16>=U),0<U){var Q=d.l,H=d.Ta,k=d.Ua,j=Q.width;if(Bn(d,U,C,I),U=k=[k],e((C=d.C)<(I=y)),e(Q.v<Q.va),I>Q.o&&(I=Q.o),C<Q.j){var X=Q.j-C;C=Q.j,U[0]+=X*j}if(C>=I?C=0:(U[0]+=4*Q.v,Q.ka=C-Q.j,Q.U=Q.va-Q.v,Q.T=I-C,C=1),C){if(k=k[0],11>(C=d.ca).S){var ft=C.f.RGBA,Bt=(I=C.S,U=Q.U,Q=Q.T,X=ft.eb,ft.A),Tt=Q;for(ft=ft.fb+d.Ma*ft.A;0<Tt--;){var mt=H,Qt=k,Lt=U,pt=X,gt=ft;switch(I){case Yy:cs(mt,Qt,Lt,pt,gt);break;case Wy:Ul(mt,Qt,Lt,pt,gt);break;case zE:Ul(mt,Qt,Lt,pt,gt),Hl(pt,gt,0,Lt,1,0);break;case EO:af(mt,Qt,Lt,pt,gt);break;case qy:be(mt,Qt,Lt,pt,gt,1);break;case XE:be(mt,Qt,Lt,pt,gt,1),Hl(pt,gt,0,Lt,1,0);break;case Zy:be(mt,Qt,Lt,pt,gt,0);break;case Jy:be(mt,Qt,Lt,pt,gt,0),Hl(pt,gt,1,Lt,1,0);break;case KE:Gs(mt,Qt,Lt,pt,gt);break;case YE:Gs(mt,Qt,Lt,pt,gt),Af(pt,gt,Lt,1,0);break;case CO:FA(mt,Qt,Lt,pt,gt);break;default:e(0)}k+=j,ft+=Bt}d.Ma+=Q}else alert("todo:EmitRescaledRowsYUVA");e(d.Ma<=C.height)}}d.C=y,e(d.C<=d.i)}function Ae(d){var y;if(0<d.ua)return 0;for(y=0;y<d.Wb;++y){var C=d.Ya[y].G,I=d.Ya[y].H;if(0<C[1][I[1]+0].g||0<C[2][I[2]+0].g||0<C[3][I[3]+0].g)return 0}return 1}function ht(d,y,C,I,U,Q){if(d.Z!=0){var H=d.qd,k=d.rd;for(e(kl[d.Z]!=null);y<C;++y)kl[d.Z](H,k,I,U,I,U,Q),H=I,k=U,U+=Q;d.qd=H,d.rd=k}}function Ht(d,y){var C=d.l.ma,I=C.Z==0||C.Z==1?d.l.j:d.C;if(I=d.C<I?I:d.C,e(y<=d.l.o),y>I){var U=d.l.width,Q=C.ca,H=C.tb+U*I,k=d.V,j=d.Ba+d.c*I,X=d.gc;e(d.ab==1),e(X[0].hc==3),$E(X[0],I,y,k,j,Q,H),ht(C,I,y,Q,H,U)}d.C=d.Ma=y}function Zt(d,y,C,I,U,Q,H){var k=d.$/I,j=d.$%I,X=d.m,ft=d.s,Bt=C+d.$,Tt=Bt;U=C+I*U;var mt=C+I*Q,Qt=280+ft.ua,Lt=d.Pb?k:16777216,pt=0<ft.ua?ft.Wa:null,gt=ft.wc,Pt=Bt<mt?Jr(ft,j,k):null;e(d.C<Q),e(mt<=U);var Gt=!1;t:for(;;){for(;Gt||Bt<mt;){var Dt=0;if(k>=Lt){var ce=Bt-C;e((Lt=d).Pb),Lt.wd=Lt.m,Lt.xd=ce,0<Lt.s.ua&&rt(Lt.s.Wa,Lt.s.vb),Lt=k+f9}if(j&gt||(Pt=Jr(ft,j,k)),e(Pt!=null),Pt.Qb&&(y[Bt]=Pt.qb,Gt=!0),!Gt)if(at(X),Pt.jc){Dt=X,ce=y;var Jt=Bt,Pe=Pt.pd[$(Dt)&qa-1];e(Pt.jc),256>Pe.g?(q(Dt,Dt.u+Pe.g),ce[Jt]=Pe.value,Dt=0):(q(Dt,Dt.u+Pe.g-256),e(256<=Pe.value),Dt=Pe.value),Dt==0&&(Gt=!0)}else Dt=Fi(Pt.G[0],Pt.H[0],X);if(X.h)break;if(Gt||256>Dt){if(!Gt)if(Pt.nd)y[Bt]=(Pt.qb|Dt<<8)>>>0;else{if(at(X),Gt=Fi(Pt.G[1],Pt.H[1],X),at(X),ce=Fi(Pt.G[2],Pt.H[2],X),Jt=Fi(Pt.G[3],Pt.H[3],X),X.h)break;y[Bt]=(Jt<<24|Gt<<16|Dt<<8|ce)>>>0}if(Gt=!1,++Bt,++j>=I&&(j=0,++k,H!=null&&k<=Q&&!(k%16)&&H(d,k),pt!=null))for(;Tt<Bt;)Dt=y[Tt++],pt.X[(506832829*Dt&4294967295)>>>pt.Mb]=Dt}else if(280>Dt){if(Dt=fi(Dt-256,X),ce=Fi(Pt.G[4],Pt.H[4],X),at(X),ce=Qn(I,ce=fi(ce,X)),X.h)break;if(Bt-C<ce||U-Bt<Dt)break t;for(Jt=0;Jt<Dt;++Jt)y[Bt+Jt]=y[Bt+Jt-ce];for(Bt+=Dt,j+=Dt;j>=I;)j-=I,++k,H!=null&&k<=Q&&!(k%16)&&H(d,k);if(e(Bt<=U),j&gt&&(Pt=Jr(ft,j,k)),pt!=null)for(;Tt<Bt;)Dt=y[Tt++],pt.X[(506832829*Dt&4294967295)>>>pt.Mb]=Dt}else{if(!(Dt<Qt))break t;for(Gt=Dt-280,e(pt!=null);Tt<Bt;)Dt=y[Tt++],pt.X[(506832829*Dt&4294967295)>>>pt.Mb]=Dt;Dt=Bt,e(!(Gt>>>(ce=pt).Xa)),y[Dt]=ce.X[Gt],Gt=!0}Gt||e(X.h==K(X))}if(d.Pb&&X.h&&Bt<U)e(d.m.h),d.a=5,d.m=d.wd,d.$=d.xd,0<d.s.ua&&rt(d.s.vb,d.s.Wa);else{if(X.h)break t;H!=null&&H(d,k>Q?Q:k),d.a=0,d.$=Bt-C}return 1}return d.a=3,0}function rr(d){e(d!=null),d.vc=null,d.yc=null,d.Ya=null;var y=d.Wa;y!=null&&(y.X=null),d.vb=null,e(d!=null)}function Mr(){var d=new GE;return d==null?null:(d.a=0,d.xb=xO,An("Predictor","VP8LPredictors"),An("Predictor","VP8LPredictors_C"),An("PredictorAdd","VP8LPredictorsAdd"),An("PredictorAdd","VP8LPredictorsAdd_C"),Ky=ae,Go=Wt,cs=zt,Ul=We,Gs=Me,FA=dr,af=Ie,T.VP8LMapColor32b=Od,T.VP8LMapColor8b=jE,d)}function ln(d,y,C,I,U){var Q=1,H=[d],k=[y],j=I.m,X=I.s,ft=null,Bt=0;t:for(;;){if(C)for(;Q&&it(j,1);){var Tt=H,mt=k,Qt=I,Lt=1,pt=Qt.m,gt=Qt.gc[Qt.ab],Pt=it(pt,2);if(Qt.Oc&1<<Pt)Q=0;else{switch(Qt.Oc|=1<<Pt,gt.hc=Pt,gt.Ea=Tt[0],gt.nc=mt[0],gt.K=[null],++Qt.ab,e(4>=Qt.ab),Pt){case 0:case 1:gt.b=it(pt,3)+2,Lt=ln(bt(gt.Ea,gt.b),bt(gt.nc,gt.b),0,Qt,gt.K),gt.K=gt.K[0];break;case 3:var Gt,Dt=it(pt,8)+1,ce=16<Dt?0:4<Dt?1:2<Dt?2:3;if(Tt[0]=bt(gt.Ea,ce),gt.b=ce,Gt=Lt=ln(Dt,1,0,Qt,gt.K)){var Jt,Pe=Dt,ee=gt,Ur=1<<(8>>ee.b),tn=a(Ur);if(tn==null)Gt=0;else{var Sr=ee.K[0],yr=ee.w;for(tn[0]=ee.K[0][0],Jt=1;Jt<1*Pe;++Jt)tn[Jt]=dt(Sr[yr+Jt],tn[Jt-1]);for(;Jt<4*Ur;++Jt)tn[Jt]=0;ee.K[0]=null,ee.K[0]=tn,Gt=1}}Lt=Gt;break;case 2:break;default:e(0)}Q=Lt}}if(H=H[0],k=k[0],Q&&it(j,1)&&!(Q=1<=(Bt=it(j,4))&&11>=Bt)){I.a=3;break t}var un;if(un=Q)e:{var an,er,di,Ja=I,vi=H,to=k,en=Bt,Bo=C,To=Ja.m,Vi=Ja.s,ra=[null],Ra=1,Vo=0,ks=h9[en];r:for(;;){if(Bo&&it(To,1)){var Ki=it(To,3)+2,MA=bt(vi,Ki),vc=bt(to,Ki),lf=MA*vc;if(!ln(MA,vc,0,Ja,ra))break r;for(ra=ra[0],Vi.xc=Ki,an=0;an<lf;++an){var $l=ra[an]>>8&65535;ra[an]=$l,$l>=Ra&&(Ra=$l+1)}}if(To.h)break r;for(er=0;5>er;++er){var Hn=BO[er];!er&&0<en&&(Hn+=1<<en),Vo<Hn&&(Vo=Hn)}var JE=o(Ra*ks,x),NO=Ra,PO=o(NO,P);if(PO==null)var nm=null;else e(65536>=NO),nm=PO;var Ud=a(Vo);if(nm==null||Ud==null||JE==null){Ja.a=1;break r}var im=JE;for(an=di=0;an<Ra;++an){var ds=nm[an],uf=ds.G,cf=ds.H,UO=0,am=1,DO=0;for(er=0;5>er;++er){Hn=BO[er],uf[er]=im,cf[er]=di,!er&&0<en&&(Hn+=1<<en);i:{var om,tC=Hn,sm=Ja,Dd=Ud,R9=im,M9=di,eC=0,jl=sm.m,N9=it(jl,1);if(i(Dd,0,0,tC),N9){var P9=it(jl,1)+1,U9=it(jl,1),QO=it(jl,U9==0?1:8);Dd[QO]=1,P9==2&&(Dd[QO=it(jl,8)]=1);var Am=1}else{var HO=a(19),GO=it(jl,4)+4;if(19<GO){sm.a=3;var lm=0;break i}for(om=0;om<GO;++om)HO[u9[om]]=it(jl,3);var rC=void 0,Qd=void 0,kO=sm,D9=HO,um=tC,$O=Dd,nC=0,Vl=kO.m,jO=8,VO=o(128,x);n:for(;S(VO,0,7,D9,19);){if(it(Vl,1)){var Q9=2+2*it(Vl,3);if((rC=2+it(Vl,Q9))>um)break n}else rC=um;for(Qd=0;Qd<um&&rC--;){at(Vl);var KO=VO[0+(127&$(Vl))];q(Vl,Vl.u+KO.g);var hf=KO.value;if(16>hf)$O[Qd++]=hf,hf!=0&&(jO=hf);else{var H9=hf==16,zO=hf-16,G9=A9[zO],XO=it(Vl,s9[zO])+G9;if(Qd+XO>um)break n;for(var k9=H9?jO:0;0<XO--;)$O[Qd++]=k9}}nC=1;break n}nC||(kO.a=3),Am=nC}(Am=Am&&!jl.h)&&(eC=S(R9,M9,8,Dd,tC)),Am&&eC!=0?lm=eC:(sm.a=3,lm=0)}if(lm==0)break r;if(am&&l9[er]==1&&(am=im[di].g==0),UO+=im[di].g,di+=lm,3>=er){var Hd,iC=Ud[0];for(Hd=1;Hd<Hn;++Hd)Ud[Hd]>iC&&(iC=Ud[Hd]);DO+=iC}}if(ds.nd=am,ds.Qb=0,am&&(ds.qb=(uf[3][cf[3]+0].value<<24|uf[1][cf[1]+0].value<<16|uf[2][cf[2]+0].value)>>>0,UO==0&&256>uf[0][cf[0]+0].value&&(ds.Qb=1,ds.qb+=uf[0][cf[0]+0].value<<8)),ds.jc=!ds.Qb&&6>DO,ds.jc){var cm,NA=ds;for(cm=0;cm<qa;++cm){var Kl=cm,zl=NA.pd[Kl],hm=NA.G[0][NA.H[0]+Kl];256<=hm.value?(zl.g=hm.g+256,zl.value=hm.value):(zl.g=0,zl.value=0,Kl>>=nn(hm,8,zl),Kl>>=nn(NA.G[1][NA.H[1]+Kl],16,zl),Kl>>=nn(NA.G[2][NA.H[2]+Kl],0,zl),nn(NA.G[3][NA.H[3]+Kl],24,zl))}}}Vi.vc=ra,Vi.Wb=Ra,Vi.Ya=nm,Vi.yc=JE,un=1;break e}un=0}if(!(Q=un)){I.a=3;break t}if(0<Bt){if(X.ua=1<<Bt,!ut(X.Wa,Bt)){I.a=1,Q=0;break t}}else X.ua=0;var aC=I,YO=H,$9=k,oC=aC.s,sC=oC.xc;if(aC.c=YO,aC.i=$9,oC.md=bt(YO,sC),oC.wc=sC==0?-1:(1<<sC)-1,C){I.xb=_9;break t}if((ft=a(H*k))==null){I.a=1,Q=0;break t}Q=(Q=Zt(I,ft,0,H,k,k,null))&&!j.h;break t}return Q?(U!=null?U[0]=ft:(e(ft==null),e(C)),I.$=0,C||rr(X)):rr(X),Q}function Tn(d,y){var C=d.c*d.i,I=C+y+16*y;return e(d.c<=y),d.V=a(I),d.V==null?(d.Ta=null,d.Ua=0,d.a=1,0):(d.Ta=d.V,d.Ua=d.Ba+C+y,1)}function os(d,y){var C=d.C,I=y-C,U=d.V,Q=d.Ba+d.c*C;for(e(y<=d.l.o);0<I;){var H=16<I?16:I,k=d.l.ma,j=d.l.width,X=j*H,ft=k.ca,Bt=k.tb+j*C,Tt=d.Ta,mt=d.Ua;Bn(d,H,U,Q),vO(Tt,mt,ft,Bt,X),ht(k,C,C+H,ft,Bt,j),I-=H,U+=H*d.c,C+=H}e(C==y),d.C=d.Ma=y}function Ii(){this.ub=this.yd=this.td=this.Rb=0}function TA(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ll(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function cd(){this.Yb=function(){var d=[];return function y(C,I,U){for(var Q=U[I],H=0;H<Q&&(C.push(U.length>I+1?[]:0),!(U.length<I+1));H++)y(C[H],I+1,U)}(d,0,[3,11]),d}()}function yE(){this.jb=a(3),this.Wc=s([4,8],cd),this.Xc=s([4,17],cd)}function mE(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function $h(){this.ld=this.La=this.dd=this.tc=0}function Sy(){this.Na=this.la=0}function _E(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function hd(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function wE(){this.uc=this.M=this.Nb=0,this.wa=Array(new $h),this.Y=0,this.ya=Array(new hd),this.aa=0,this.l=new jh}function by(){this.y=a(16),this.f=a(8),this.ea=a(8)}function EE(){this.cb=this.a=0,this.sc="",this.m=new _t,this.Od=new Ii,this.Kc=new TA,this.ed=new mE,this.Qa=new Ll,this.Ic=this.$c=this.Aa=0,this.D=new wE,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,_t),this.ia=0,this.pb=o(4,_E),this.Pa=new yE,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new by),this.Hd=0,this.rb=Array(new Sy),this.sb=0,this.wa=Array(new $h),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new hd),this.L=this.aa=0,this.gd=s([4,2],$h),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function jh(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function CE(){var d=new EE;return d!=null&&(d.a=0,d.sc="OK",d.cb=0,d.Xb=0,Nd||(Nd=Ly)),d}function Wn(d,y,C){return d.a==0&&(d.a=y,d.sc=C,d.cb=0),0}function Fy(d,y,C){return 3<=C&&d[y+0]==157&&d[y+1]==1&&d[y+2]==42}function Iy(d,y){if(d==null)return 0;if(d.a=0,d.sc="OK",y==null)return Wn(d,2,"null VP8Io passed to VP8GetHeaders()");var C=y.data,I=y.w,U=y.ha;if(4>U)return Wn(d,7,"Truncated header.");var Q=C[I+0]|C[I+1]<<8|C[I+2]<<16,H=d.Od;if(H.Rb=!(1&Q),H.td=Q>>1&7,H.yd=Q>>4&1,H.ub=Q>>5,3<H.td)return Wn(d,3,"Incorrect keyframe parameters.");if(!H.yd)return Wn(d,4,"Frame not displayable.");I+=3,U-=3;var k=d.Kc;if(H.Rb){if(7>U)return Wn(d,7,"cannot parse picture header");if(!Fy(C,I,U))return Wn(d,3,"Bad code word");k.c=16383&(C[I+4]<<8|C[I+3]),k.Td=C[I+4]>>6,k.i=16383&(C[I+6]<<8|C[I+5]),k.Ud=C[I+6]>>6,I+=7,U-=7,d.za=k.c+15>>4,d.Ub=k.i+15>>4,y.width=k.c,y.height=k.i,y.Da=0,y.j=0,y.v=0,y.va=y.width,y.o=y.height,y.da=0,y.ib=y.width,y.hb=y.height,y.U=y.width,y.T=y.height,i((Q=d.Pa).jb,0,255,Q.jb.length),e((Q=d.Qa)!=null),Q.Cb=0,Q.Bb=0,Q.Fb=1,i(Q.Zb,0,0,Q.Zb.length),i(Q.Lb,0,0,Q.Lb)}if(H.ub>U)return Wn(d,7,"bad partition length");Y(Q=d.m,C,I,H.ub),I+=H.ub,U-=H.ub,H.Rb&&(k.Ld=wt(Q),k.Kd=wt(Q)),k=d.Qa;var j,X=d.Pa;if(e(Q!=null),e(k!=null),k.Cb=wt(Q),k.Cb){if(k.Bb=wt(Q),wt(Q)){for(k.Fb=wt(Q),j=0;4>j;++j)k.Zb[j]=wt(Q)?tt(Q,7):0;for(j=0;4>j;++j)k.Lb[j]=wt(Q)?tt(Q,6):0}if(k.Bb)for(j=0;3>j;++j)X.jb[j]=wt(Q)?z(Q,8):255}else k.Bb=0;if(Q.Ka)return Wn(d,3,"cannot parse segment header");if((k=d.ed).zd=wt(Q),k.Tb=z(Q,6),k.wb=z(Q,3),k.Pc=wt(Q),k.Pc&&wt(Q)){for(X=0;4>X;++X)wt(Q)&&(k.vd[X]=tt(Q,6));for(X=0;4>X;++X)wt(Q)&&(k.od[X]=tt(Q,6))}if(d.L=k.Tb==0?0:k.zd?1:2,Q.Ka)return Wn(d,3,"cannot parse filter header");var ft=U;if(U=j=I,I=j+ft,k=ft,d.Xb=(1<<z(d.m,2))-1,ft<3*(X=d.Xb))C=7;else{for(j+=3*X,k-=3*X,ft=0;ft<X;++ft){var Bt=C[U+0]|C[U+1]<<8|C[U+2]<<16;Bt>k&&(Bt=k),Y(d.Jc[+ft],C,j,Bt),j+=Bt,k-=Bt,U+=3}Y(d.Jc[+X],C,j,k),C=j<I?0:5}if(C!=0)return Wn(d,C,"cannot parse partitions");for(C=z(j=d.m,7),U=wt(j)?tt(j,4):0,I=wt(j)?tt(j,4):0,k=wt(j)?tt(j,4):0,X=wt(j)?tt(j,4):0,j=wt(j)?tt(j,4):0,ft=d.Qa,Bt=0;4>Bt;++Bt){if(ft.Cb){var Tt=ft.Zb[Bt];ft.Fb||(Tt+=C)}else{if(0<Bt){d.pb[Bt]=d.pb[0];continue}Tt=C}var mt=d.pb[Bt];mt.Sc[0]=WE[Eo(Tt+U,127)],mt.Sc[1]=qE[Eo(Tt+0,127)],mt.Eb[0]=2*WE[Eo(Tt+I,127)],mt.Eb[1]=101581*qE[Eo(Tt+k,127)]>>16,8>mt.Eb[1]&&(mt.Eb[1]=8),mt.Qc[0]=WE[Eo(Tt+X,117)],mt.Qc[1]=qE[Eo(Tt+j,127)],mt.lc=Tt+j}if(!H.Rb)return Wn(d,4,"Not a key frame.");for(wt(Q),H=d.Pa,C=0;4>C;++C){for(U=0;8>U;++U)for(I=0;3>I;++I)for(k=0;11>k;++k)X=W(Q,y9[C][U][I][k])?z(Q,8):v9[C][U][I][k],H.Wc[C][U].Yb[I][k]=X;for(U=0;17>U;++U)H.Xc[C][U]=H.Wc[C][m9[U]]}return d.kc=wt(Q),d.kc&&(d.Bd=z(Q,8)),d.cb=1}function Ly(d,y,C,I,U,Q,H){var k=y[U].Yb[C];for(C=0;16>U;++U){if(!W(d,k[C+0]))return U;for(;!W(d,k[C+1]);)if(k=y[++U].Yb[0],C=0,U==16)return 16;var j=y[U+1].Yb;if(W(d,k[C+2])){var X=d,ft=0;if(W(X,(Tt=k)[(Bt=C)+3]))if(W(X,Tt[Bt+6])){for(k=0,Bt=2*(ft=W(X,Tt[Bt+8]))+(Tt=W(X,Tt[Bt+9+ft])),ft=0,Tt=p9[Bt];Tt[k];++k)ft+=ft+W(X,Tt[k]);ft+=3+(8<<Bt)}else W(X,Tt[Bt+7])?(ft=7+2*W(X,165),ft+=W(X,145)):ft=5+W(X,159);else ft=W(X,Tt[Bt+4])?3+W(X,Tt[Bt+5]):2;k=j[2]}else ft=1,k=j[1];j=H+d9[U],0>(X=d).b&&vt(X);var Bt,Tt=X.b,mt=(Bt=X.Ca>>1)-(X.I>>Tt)>>31;--X.b,X.Ca+=mt,X.Ca|=1,X.I-=(Bt+1&mt)<<Tt,Q[j]=((ft^mt)-mt)*I[(0<U)+0]}return 16}function fd(d){var y=d.rb[d.sb-1];y.la=0,y.Na=0,i(d.zc,0,0,d.zc.length),d.ja=0}function BE(d,y){if(d==null)return 0;if(y==null)return Wn(d,2,"NULL VP8Io parameter in VP8Decode().");if(!d.cb&&!Iy(d,y))return 0;if(e(d.cb),y.ac==null||y.ac(y)){y.ob&&(d.L=0);var C=rm[d.L];if(d.L==2?(d.yb=0,d.zb=0):(d.yb=y.v-C>>4,d.zb=y.j-C>>4,0>d.yb&&(d.yb=0),0>d.zb&&(d.zb=0)),d.Va=y.o+15+C>>4,d.Hb=y.va+15+C>>4,d.Hb>d.za&&(d.Hb=d.za),d.Va>d.Ub&&(d.Va=d.Ub),0<d.L){var I=d.ed;for(C=0;4>C;++C){var U;if(d.Qa.Cb){var Q=d.Qa.Lb[C];d.Qa.Fb||(Q+=I.Tb)}else Q=I.Tb;for(U=0;1>=U;++U){var H=d.gd[C][U],k=Q;if(I.Pc&&(k+=I.vd[0],U&&(k+=I.od[0])),0<(k=0>k?0:63<k?63:k)){var j=k;0<I.wb&&(j=4<I.wb?j>>2:j>>1)>9-I.wb&&(j=9-I.wb),1>j&&(j=1),H.dd=j,H.tc=2*k+j,H.ld=40<=k?2:15<=k?1:0}else H.tc=0;H.La=U}}}C=0}else Wn(d,6,"Frame setup failed"),C=d.a;if(C=C==0){if(C){d.$c=0,0<d.Aa||(d.Ic=O9);t:{C=d.Ic,I=4*(j=d.za);var X=32*j,ft=j+1,Bt=0<d.L?j*(0<d.Aa?2:1):0,Tt=(d.Aa==2?2:1)*j;if((H=I+832+(U=3*(16*C+rm[d.L])/2*X)+(Q=d.Fa!=null&&0<d.Fa.length?d.Kc.c*d.Kc.i:0))!=H)C=0;else{if(H>d.Vb){if(d.Vb=0,d.Ec=a(H),d.Fc=0,d.Ec==null){C=Wn(d,1,"no memory during frame initialization.");break t}d.Vb=H}H=d.Ec,k=d.Fc,d.Ac=H,d.Bc=k,k+=I,d.Gd=o(X,by),d.Hd=0,d.rb=o(ft+1,Sy),d.sb=1,d.wa=Bt?o(Bt,$h):null,d.Y=0,d.D.Nb=0,d.D.wa=d.wa,d.D.Y=d.Y,0<d.Aa&&(d.D.Y+=j),e(!0),d.oc=H,d.pc=k,k+=832,d.ya=o(Tt,hd),d.aa=0,d.D.ya=d.ya,d.D.aa=d.aa,d.Aa==2&&(d.D.aa+=j),d.R=16*j,d.B=8*j,j=(X=rm[d.L])*d.R,X=X/2*d.B,d.sa=H,d.ta=k+j,d.qa=d.sa,d.ra=d.ta+16*C*d.R+X,d.Ha=d.qa,d.Ia=d.ra+8*C*d.B+X,d.$c=0,k+=U,d.mb=Q?H:null,d.nb=Q?k:null,e(k+Q<=d.Fc+d.Vb),fd(d),i(d.Ac,d.Bc,0,I),C=1}}if(C){if(y.ka=0,y.y=d.sa,y.O=d.ta,y.f=d.qa,y.N=d.ra,y.ea=d.Ha,y.Vd=d.Ia,y.fa=d.R,y.Rc=d.B,y.F=null,y.J=0,!wO){for(C=-255;255>=C;++C)gO[255+C]=0>C?-C:C;for(C=-1020;1020>=C;++C)yO[1020+C]=-128>C?-128:127<C?127:C;for(C=-112;112>=C;++C)mO[112+C]=-16>C?-16:15<C?15:C;for(C=-255;510>=C;++C)_O[255+C]=0>C?0:255<C?255:C;wO=1}hs=SE,of=TE,Dl=Ry,fs=xE,IA=My,Rd=Oy,pc=md,sf=hc,dc=HE,Ql=_d,Md=QE,ko=Wh,LA=wd,vn=$y,gn=ky,Zn=SA,Li=Rl,OA=DE,ps[0]=Hs,ps[1]=bE,ps[2]=OE,ps[3]=RE,ps[4]=Uy,ps[5]=Xh,ps[6]=Dy,ps[7]=vd,ps[8]=NE,ps[9]=ME,Gl[0]=Ny,Gl[1]=IE,Gl[2]=xA,Gl[3]=Kh,Gl[4]=fa,Gl[5]=LE,Gl[6]=Py,RA[0]=Ol,RA[1]=FE,RA[2]=PE,RA[3]=gd,RA[4]=cc,RA[5]=UE,RA[6]=yd,C=1}else C=0}C&&(C=function(mt,Qt){for(mt.M=0;mt.M<mt.Va;++mt.M){var Lt,pt=mt.Jc[mt.M&mt.Xb],gt=mt.m,Pt=mt;for(Lt=0;Lt<Pt.za;++Lt){var Gt=gt,Dt=Pt,ce=Dt.Ac,Jt=Dt.Bc+4*Lt,Pe=Dt.zc,ee=Dt.ya[Dt.aa+Lt];if(Dt.Qa.Bb?ee.$b=W(Gt,Dt.Pa.jb[0])?2+W(Gt,Dt.Pa.jb[2]):W(Gt,Dt.Pa.jb[1]):ee.$b=0,Dt.kc&&(ee.Ad=W(Gt,Dt.Bd)),ee.Za=!W(Gt,145)+0,ee.Za){var Ur=ee.Ob,tn=0;for(Dt=0;4>Dt;++Dt){var Sr,yr=Pe[0+Dt];for(Sr=0;4>Sr;++Sr){yr=g9[ce[Jt+Sr]][yr];for(var un=TO[W(Gt,yr[0])];0<un;)un=TO[2*un+W(Gt,yr[un])];yr=-un,ce[Jt+Sr]=yr}n(Ur,tn,ce,Jt,4),tn+=4,Pe[0+Dt]=yr}}else yr=W(Gt,156)?W(Gt,128)?1:3:W(Gt,163)?2:0,ee.Ob[0]=yr,i(ce,Jt,yr,4),i(Pe,0,yr,4);ee.Dd=W(Gt,142)?W(Gt,114)?W(Gt,183)?1:3:2:0}if(Pt.m.Ka)return Wn(mt,7,"Premature end-of-partition0 encountered.");for(;mt.ja<mt.za;++mt.ja){if(Pt=pt,Gt=(gt=mt).rb[gt.sb-1],ce=gt.rb[gt.sb+gt.ja],Lt=gt.ya[gt.aa+gt.ja],Jt=gt.kc?Lt.Ad:0)Gt.la=ce.la=0,Lt.Za||(Gt.Na=ce.Na=0),Lt.Hc=0,Lt.Gc=0,Lt.ia=0;else{var an,er;if(Gt=ce,ce=Pt,Jt=gt.Pa.Xc,Pe=gt.ya[gt.aa+gt.ja],ee=gt.pb[Pe.$b],Dt=Pe.ad,Ur=0,tn=gt.rb[gt.sb-1],yr=Sr=0,i(Dt,Ur,0,384),Pe.Za)var di=0,Ja=Jt[3];else{un=a(16);var vi=Gt.Na+tn.Na;if(vi=Nd(ce,Jt[1],vi,ee.Eb,0,un,0),Gt.Na=tn.Na=(0<vi)+0,1<vi)hs(un,0,Dt,Ur);else{var to=un[0]+3>>3;for(un=0;256>un;un+=16)Dt[Ur+un]=to}di=1,Ja=Jt[0]}var en=15&Gt.la,Bo=15&tn.la;for(un=0;4>un;++un){var To=1&Bo;for(to=er=0;4>to;++to)en=en>>1|(To=(vi=Nd(ce,Ja,vi=To+(1&en),ee.Sc,di,Dt,Ur))>di)<<7,er=er<<2|(3<vi?3:1<vi?2:Dt[Ur+0]!=0),Ur+=16;en>>=4,Bo=Bo>>1|To<<7,Sr=(Sr<<8|er)>>>0}for(Ja=en,di=Bo>>4,an=0;4>an;an+=2){for(er=0,en=Gt.la>>4+an,Bo=tn.la>>4+an,un=0;2>un;++un){for(To=1&Bo,to=0;2>to;++to)vi=To+(1&en),en=en>>1|(To=0<(vi=Nd(ce,Jt[2],vi,ee.Qc,0,Dt,Ur)))<<3,er=er<<2|(3<vi?3:1<vi?2:Dt[Ur+0]!=0),Ur+=16;en>>=2,Bo=Bo>>1|To<<5}yr|=er<<4*an,Ja|=en<<4<<an,di|=(240&Bo)<<an}Gt.la=Ja,tn.la=di,Pe.Hc=Sr,Pe.Gc=yr,Pe.ia=43690&yr?0:ee.ia,Jt=!(Sr|yr)}if(0<gt.L&&(gt.wa[gt.Y+gt.ja]=gt.gd[Lt.$b][Lt.Za],gt.wa[gt.Y+gt.ja].La|=!Jt),Pt.Ka)return Wn(mt,7,"Premature end-of-file encountered.")}if(fd(mt),gt=Qt,Pt=1,Lt=(pt=mt).D,Gt=0<pt.L&&pt.M>=pt.zb&&pt.M<=pt.Va,pt.Aa==0)t:{if(Lt.M=pt.M,Lt.uc=Gt,Sd(pt,Lt),Pt=1,Lt=(er=pt.D).Nb,Gt=(yr=rm[pt.L])*pt.R,ce=yr/2*pt.B,un=16*Lt*pt.R,to=8*Lt*pt.B,Jt=pt.sa,Pe=pt.ta-Gt+un,ee=pt.qa,Dt=pt.ra-ce+to,Ur=pt.Ha,tn=pt.Ia-ce+to,Bo=(en=er.M)==0,Sr=en>=pt.Va-1,pt.Aa==2&&Sd(pt,er),er.uc)for(To=(vi=pt).D.M,e(vi.D.uc),er=vi.yb;er<vi.Hb;++er){di=er,Ja=To;var Vi=(ra=(Hn=vi).D).Nb;an=Hn.R;var ra=ra.wa[ra.Y+di],Ra=Hn.sa,Vo=Hn.ta+16*Vi*an+16*di,ks=ra.dd,Ki=ra.tc;if(Ki!=0)if(e(3<=Ki),Hn.L==1)0<di&&Zn(Ra,Vo,an,Ki+4),ra.La&&OA(Ra,Vo,an,Ki),0<Ja&&gn(Ra,Vo,an,Ki+4),ra.La&&Li(Ra,Vo,an,Ki);else{var MA=Hn.B,vc=Hn.qa,lf=Hn.ra+8*Vi*MA+8*di,$l=Hn.Ha,Hn=Hn.Ia+8*Vi*MA+8*di;Vi=ra.ld,0<di&&(sf(Ra,Vo,an,Ki+4,ks,Vi),Ql(vc,lf,$l,Hn,MA,Ki+4,ks,Vi)),ra.La&&(ko(Ra,Vo,an,Ki,ks,Vi),vn(vc,lf,$l,Hn,MA,Ki,ks,Vi)),0<Ja&&(pc(Ra,Vo,an,Ki+4,ks,Vi),dc(vc,lf,$l,Hn,MA,Ki+4,ks,Vi)),ra.La&&(Md(Ra,Vo,an,Ki,ks,Vi),LA(vc,lf,$l,Hn,MA,Ki,ks,Vi))}}if(pt.ia&&alert("todo:DitherRow"),gt.put!=null){if(er=16*en,en=16*(en+1),Bo?(gt.y=pt.sa,gt.O=pt.ta+un,gt.f=pt.qa,gt.N=pt.ra+to,gt.ea=pt.Ha,gt.W=pt.Ia+to):(er-=yr,gt.y=Jt,gt.O=Pe,gt.f=ee,gt.N=Dt,gt.ea=Ur,gt.W=tn),Sr||(en-=yr),en>gt.o&&(en=gt.o),gt.F=null,gt.J=null,pt.Fa!=null&&0<pt.Fa.length&&er<en&&(gt.J=Td(pt,gt,er,en-er),gt.F=pt.mb,gt.F==null&&gt.F.length==0)){Pt=Wn(pt,3,"Could not decode alpha data.");break t}er<gt.j&&(yr=gt.j-er,er=gt.j,e(!(1&yr)),gt.O+=pt.R*yr,gt.N+=pt.B*(yr>>1),gt.W+=pt.B*(yr>>1),gt.F!=null&&(gt.J+=gt.width*yr)),er<en&&(gt.O+=gt.v,gt.N+=gt.v>>1,gt.W+=gt.v>>1,gt.F!=null&&(gt.J+=gt.v),gt.ka=er-gt.j,gt.U=gt.va-gt.v,gt.T=en-er,Pt=gt.put(gt))}Lt+1!=pt.Ic||Sr||(n(pt.sa,pt.ta-Gt,Jt,Pe+16*pt.R,Gt),n(pt.qa,pt.ra-ce,ee,Dt+8*pt.B,ce),n(pt.Ha,pt.Ia-ce,Ur,tn+8*pt.B,ce))}if(!Pt)return Wn(mt,6,"Output aborted.")}return 1}(d,y)),y.bc!=null&&y.bc(y),C&=1}return C?(d.cb=0,C):0}function ss(d,y,C,I,U){U=d[y+C+32*I]+(U>>3),d[y+C+32*I]=-256&U?0>U?0:255:U}function Vh(d,y,C,I,U,Q){ss(d,y,0,C,I+U),ss(d,y,1,C,I+Q),ss(d,y,2,C,I-Q),ss(d,y,3,C,I-U)}function Wa(d){return(20091*d>>16)+d}function pd(d,y,C,I){var U,Q=0,H=a(16);for(U=0;4>U;++U){var k=d[y+0]+d[y+8],j=d[y+0]-d[y+8],X=(35468*d[y+4]>>16)-Wa(d[y+12]),ft=Wa(d[y+4])+(35468*d[y+12]>>16);H[Q+0]=k+ft,H[Q+1]=j+X,H[Q+2]=j-X,H[Q+3]=k-ft,Q+=4,y++}for(U=Q=0;4>U;++U)k=(d=H[Q+0]+4)+H[Q+8],j=d-H[Q+8],X=(35468*H[Q+4]>>16)-Wa(H[Q+12]),ss(C,I,0,0,k+(ft=Wa(H[Q+4])+(35468*H[Q+12]>>16))),ss(C,I,1,0,j+X),ss(C,I,2,0,j-X),ss(C,I,3,0,k-ft),Q++,I+=32}function Oy(d,y,C,I){var U=d[y+0]+4,Q=35468*d[y+4]>>16,H=Wa(d[y+4]),k=35468*d[y+1]>>16;Vh(C,I,0,U+H,d=Wa(d[y+1]),k),Vh(C,I,1,U+Q,d,k),Vh(C,I,2,U-Q,d,k),Vh(C,I,3,U-H,d,k)}function TE(d,y,C,I,U){pd(d,y,C,I),U&&pd(d,y+16,C,I+4)}function Ry(d,y,C,I){of(d,y+0,C,I,1),of(d,y+32,C,I+128,1)}function xE(d,y,C,I){var U;for(d=d[y+0]+4,U=0;4>U;++U)for(y=0;4>y;++y)ss(C,I,y,U,d)}function My(d,y,C,I){d[y+0]&&fs(d,y+0,C,I),d[y+16]&&fs(d,y+16,C,I+4),d[y+32]&&fs(d,y+32,C,I+128),d[y+48]&&fs(d,y+48,C,I+128+4)}function SE(d,y,C,I){var U,Q=a(16);for(U=0;4>U;++U){var H=d[y+0+U]+d[y+12+U],k=d[y+4+U]+d[y+8+U],j=d[y+4+U]-d[y+8+U],X=d[y+0+U]-d[y+12+U];Q[0+U]=H+k,Q[8+U]=H-k,Q[4+U]=X+j,Q[12+U]=X-j}for(U=0;4>U;++U)H=(d=Q[0+4*U]+3)+Q[3+4*U],k=Q[1+4*U]+Q[2+4*U],j=Q[1+4*U]-Q[2+4*U],X=d-Q[3+4*U],C[I+0]=H+k>>3,C[I+16]=X+j>>3,C[I+32]=H-k>>3,C[I+48]=X-j>>3,I+=64}function dd(d,y,C){var I,U=y-32,Q=Co,H=255-d[U-1];for(I=0;I<C;++I){var k,j=Q,X=H+d[y-1];for(k=0;k<C;++k)d[y+k]=j[X+d[U+k]];y+=32}}function bE(d,y){dd(d,y,4)}function FE(d,y){dd(d,y,8)}function IE(d,y){dd(d,y,16)}function xA(d,y){var C;for(C=0;16>C;++C)n(d,y+32*C,d,y-32,16)}function Kh(d,y){var C;for(C=16;0<C;--C)i(d,y,d[y-1],16),y+=32}function zh(d,y,C){var I;for(I=0;16>I;++I)i(y,C+32*I,d,16)}function Ny(d,y){var C,I=16;for(C=0;16>C;++C)I+=d[y-1+32*C]+d[y+C-32];zh(I>>5,d,y)}function fa(d,y){var C,I=8;for(C=0;16>C;++C)I+=d[y-1+32*C];zh(I>>4,d,y)}function LE(d,y){var C,I=8;for(C=0;16>C;++C)I+=d[y+C-32];zh(I>>4,d,y)}function Py(d,y){zh(128,d,y)}function Ve(d,y,C){return d+2*y+C+2>>2}function OE(d,y){var C,I=y-32;for(I=new Uint8Array([Ve(d[I-1],d[I+0],d[I+1]),Ve(d[I+0],d[I+1],d[I+2]),Ve(d[I+1],d[I+2],d[I+3]),Ve(d[I+2],d[I+3],d[I+4])]),C=0;4>C;++C)n(d,y+32*C,I,0,I.length)}function RE(d,y){var C=d[y-1],I=d[y-1+32],U=d[y-1+64],Q=d[y-1+96];Ft(d,y+0,16843009*Ve(d[y-1-32],C,I)),Ft(d,y+32,16843009*Ve(C,I,U)),Ft(d,y+64,16843009*Ve(I,U,Q)),Ft(d,y+96,16843009*Ve(U,Q,Q))}function Hs(d,y){var C,I=4;for(C=0;4>C;++C)I+=d[y+C-32]+d[y-1+32*C];for(I>>=3,C=0;4>C;++C)i(d,y+32*C,I,4)}function Uy(d,y){var C=d[y-1+0],I=d[y-1+32],U=d[y-1+64],Q=d[y-1-32],H=d[y+0-32],k=d[y+1-32],j=d[y+2-32],X=d[y+3-32];d[y+0+96]=Ve(I,U,d[y-1+96]),d[y+1+96]=d[y+0+64]=Ve(C,I,U),d[y+2+96]=d[y+1+64]=d[y+0+32]=Ve(Q,C,I),d[y+3+96]=d[y+2+64]=d[y+1+32]=d[y+0+0]=Ve(H,Q,C),d[y+3+64]=d[y+2+32]=d[y+1+0]=Ve(k,H,Q),d[y+3+32]=d[y+2+0]=Ve(j,k,H),d[y+3+0]=Ve(X,j,k)}function Dy(d,y){var C=d[y+1-32],I=d[y+2-32],U=d[y+3-32],Q=d[y+4-32],H=d[y+5-32],k=d[y+6-32],j=d[y+7-32];d[y+0+0]=Ve(d[y+0-32],C,I),d[y+1+0]=d[y+0+32]=Ve(C,I,U),d[y+2+0]=d[y+1+32]=d[y+0+64]=Ve(I,U,Q),d[y+3+0]=d[y+2+32]=d[y+1+64]=d[y+0+96]=Ve(U,Q,H),d[y+3+32]=d[y+2+64]=d[y+1+96]=Ve(Q,H,k),d[y+3+64]=d[y+2+96]=Ve(H,k,j),d[y+3+96]=Ve(k,j,j)}function Xh(d,y){var C=d[y-1+0],I=d[y-1+32],U=d[y-1+64],Q=d[y-1-32],H=d[y+0-32],k=d[y+1-32],j=d[y+2-32],X=d[y+3-32];d[y+0+0]=d[y+1+64]=Q+H+1>>1,d[y+1+0]=d[y+2+64]=H+k+1>>1,d[y+2+0]=d[y+3+64]=k+j+1>>1,d[y+3+0]=j+X+1>>1,d[y+0+96]=Ve(U,I,C),d[y+0+64]=Ve(I,C,Q),d[y+0+32]=d[y+1+96]=Ve(C,Q,H),d[y+1+32]=d[y+2+96]=Ve(Q,H,k),d[y+2+32]=d[y+3+96]=Ve(H,k,j),d[y+3+32]=Ve(k,j,X)}function vd(d,y){var C=d[y+0-32],I=d[y+1-32],U=d[y+2-32],Q=d[y+3-32],H=d[y+4-32],k=d[y+5-32],j=d[y+6-32],X=d[y+7-32];d[y+0+0]=C+I+1>>1,d[y+1+0]=d[y+0+64]=I+U+1>>1,d[y+2+0]=d[y+1+64]=U+Q+1>>1,d[y+3+0]=d[y+2+64]=Q+H+1>>1,d[y+0+32]=Ve(C,I,U),d[y+1+32]=d[y+0+96]=Ve(I,U,Q),d[y+2+32]=d[y+1+96]=Ve(U,Q,H),d[y+3+32]=d[y+2+96]=Ve(Q,H,k),d[y+3+64]=Ve(H,k,j),d[y+3+96]=Ve(k,j,X)}function ME(d,y){var C=d[y-1+0],I=d[y-1+32],U=d[y-1+64],Q=d[y-1+96];d[y+0+0]=C+I+1>>1,d[y+2+0]=d[y+0+32]=I+U+1>>1,d[y+2+32]=d[y+0+64]=U+Q+1>>1,d[y+1+0]=Ve(C,I,U),d[y+3+0]=d[y+1+32]=Ve(I,U,Q),d[y+3+32]=d[y+1+64]=Ve(U,Q,Q),d[y+3+64]=d[y+2+64]=d[y+0+96]=d[y+1+96]=d[y+2+96]=d[y+3+96]=Q}function NE(d,y){var C=d[y-1+0],I=d[y-1+32],U=d[y-1+64],Q=d[y-1+96],H=d[y-1-32],k=d[y+0-32],j=d[y+1-32],X=d[y+2-32];d[y+0+0]=d[y+2+32]=C+H+1>>1,d[y+0+32]=d[y+2+64]=I+C+1>>1,d[y+0+64]=d[y+2+96]=U+I+1>>1,d[y+0+96]=Q+U+1>>1,d[y+3+0]=Ve(k,j,X),d[y+2+0]=Ve(H,k,j),d[y+1+0]=d[y+3+32]=Ve(C,H,k),d[y+1+32]=d[y+3+64]=Ve(I,C,H),d[y+1+64]=d[y+3+96]=Ve(U,I,C),d[y+1+96]=Ve(Q,U,I)}function PE(d,y){var C;for(C=0;8>C;++C)n(d,y+32*C,d,y-32,8)}function gd(d,y){var C;for(C=0;8>C;++C)i(d,y,d[y-1],8),y+=32}function uc(d,y,C){var I;for(I=0;8>I;++I)i(y,C+32*I,d,8)}function Ol(d,y){var C,I=8;for(C=0;8>C;++C)I+=d[y+C-32]+d[y-1+32*C];uc(I>>4,d,y)}function UE(d,y){var C,I=4;for(C=0;8>C;++C)I+=d[y+C-32];uc(I>>3,d,y)}function cc(d,y){var C,I=4;for(C=0;8>C;++C)I+=d[y-1+32*C];uc(I>>3,d,y)}function yd(d,y){uc(128,d,y)}function Yh(d,y,C){var I=d[y-C],U=d[y+0],Q=3*(U-I)+VE[1020+d[y-2*C]-d[y+C]],H=Xy[112+(Q+4>>3)];d[y-C]=Co[255+I+Xy[112+(Q+3>>3)]],d[y+0]=Co[255+U-H]}function Qy(d,y,C,I){var U=d[y+0],Q=d[y+C];return $o[255+d[y-2*C]-d[y-C]]>I||$o[255+Q-U]>I}function Hy(d,y,C,I){return 4*$o[255+d[y-C]-d[y+0]]+$o[255+d[y-2*C]-d[y+C]]<=I}function Gy(d,y,C,I,U){var Q=d[y-3*C],H=d[y-2*C],k=d[y-C],j=d[y+0],X=d[y+C],ft=d[y+2*C],Bt=d[y+3*C];return 4*$o[255+k-j]+$o[255+H-X]>I?0:$o[255+d[y-4*C]-Q]<=U&&$o[255+Q-H]<=U&&$o[255+H-k]<=U&&$o[255+Bt-ft]<=U&&$o[255+ft-X]<=U&&$o[255+X-j]<=U}function ky(d,y,C,I){var U=2*I+1;for(I=0;16>I;++I)Hy(d,y+I,C,U)&&Yh(d,y+I,C)}function SA(d,y,C,I){var U=2*I+1;for(I=0;16>I;++I)Hy(d,y+I*C,1,U)&&Yh(d,y+I*C,1)}function Rl(d,y,C,I){var U;for(U=3;0<U;--U)ky(d,y+=4*C,C,I)}function DE(d,y,C,I){var U;for(U=3;0<U;--U)SA(d,y+=4,C,I)}function Ml(d,y,C,I,U,Q,H,k){for(Q=2*Q+1;0<U--;){if(Gy(d,y,C,Q,H))if(Qy(d,y,C,k))Yh(d,y,C);else{var j=d,X=y,ft=C,Bt=j[X-2*ft],Tt=j[X-ft],mt=j[X+0],Qt=j[X+ft],Lt=j[X+2*ft],pt=27*(Pt=VE[1020+3*(mt-Tt)+VE[1020+Bt-Qt]])+63>>7,gt=18*Pt+63>>7,Pt=9*Pt+63>>7;j[X-3*ft]=Co[255+j[X-3*ft]+Pt],j[X-2*ft]=Co[255+Bt+gt],j[X-ft]=Co[255+Tt+pt],j[X+0]=Co[255+mt-pt],j[X+ft]=Co[255+Qt-gt],j[X+2*ft]=Co[255+Lt-Pt]}y+=I}}function As(d,y,C,I,U,Q,H,k){for(Q=2*Q+1;0<U--;){if(Gy(d,y,C,Q,H))if(Qy(d,y,C,k))Yh(d,y,C);else{var j=d,X=y,ft=C,Bt=j[X-ft],Tt=j[X+0],mt=j[X+ft],Qt=Xy[112+((Lt=3*(Tt-Bt))+4>>3)],Lt=Xy[112+(Lt+3>>3)],pt=Qt+1>>1;j[X-2*ft]=Co[255+j[X-2*ft]+pt],j[X-ft]=Co[255+Bt+Lt],j[X+0]=Co[255+Tt-Qt],j[X+ft]=Co[255+mt-pt]}y+=I}}function md(d,y,C,I,U,Q){Ml(d,y,C,1,16,I,U,Q)}function hc(d,y,C,I,U,Q){Ml(d,y,1,C,16,I,U,Q)}function QE(d,y,C,I,U,Q){var H;for(H=3;0<H;--H)As(d,y+=4*C,C,1,16,I,U,Q)}function Wh(d,y,C,I,U,Q){var H;for(H=3;0<H;--H)As(d,y+=4,1,C,16,I,U,Q)}function HE(d,y,C,I,U,Q,H,k){Ml(d,y,U,1,8,Q,H,k),Ml(C,I,U,1,8,Q,H,k)}function _d(d,y,C,I,U,Q,H,k){Ml(d,y,1,U,8,Q,H,k),Ml(C,I,1,U,8,Q,H,k)}function wd(d,y,C,I,U,Q,H,k){As(d,y+4*U,U,1,8,Q,H,k),As(C,I+4*U,U,1,8,Q,H,k)}function $y(d,y,C,I,U,Q,H,k){As(d,y+4,1,U,8,Q,H,k),As(C,I+4,1,U,8,Q,H,k)}function qh(){this.ba=new hi,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Kr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Ed(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Cd(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function jy(){this.ua=0,this.Wa=new G,this.vb=new G,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new P,this.yc=new x}function GE(){this.xb=this.a=0,this.l=new jh,this.ca=new hi,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new R,this.Pb=0,this.wd=new R,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new jy,this.ab=0,this.gc=o(4,Cd),this.Oc=0}function Zh(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new jh,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function fc(d,y,C,I,U,Q,H){for(d=d==null?0:d[y+0],y=0;y<H;++y)U[Q+y]=d+C[I+y]&255,d=U[Q+y]}function Bd(d,y,C,I,U,Q,H){var k;if(d==null)fc(null,null,C,I,U,Q,H);else for(k=0;k<H;++k)U[Q+k]=d[y+k]+C[I+k]&255}function Nl(d,y,C,I,U,Q,H){if(d==null)fc(null,null,C,I,U,Q,H);else{var k,j=d[y+0],X=j,ft=j;for(k=0;k<H;++k)X=ft+(j=d[y+k])-X,ft=C[I+k]+(-256&X?0>X?0:255:X)&255,X=j,U[Q+k]=ft}}function Td(d,y,C,I){var U=y.width,Q=y.o;if(e(d!=null&&y!=null),0>C||0>=I||C+I>Q)return null;if(!d.Cc){if(d.ga==null){var H;if(d.ga=new Zh,(H=d.ga==null)||(H=y.width*y.o,e(d.Gb.length==0),d.Gb=a(H),d.Uc=0,d.Gb==null?H=0:(d.mb=d.Gb,d.nb=d.Uc,d.rc=null,H=1),H=!H),!H){H=d.ga;var k=d.Fa,j=d.P,X=d.qc,ft=d.mb,Bt=d.nb,Tt=j+1,mt=X-1,Qt=H.l;if(e(k!=null&&ft!=null&&y!=null),kl[0]=null,kl[1]=fc,kl[2]=Bd,kl[3]=Nl,H.ca=ft,H.tb=Bt,H.c=y.width,H.i=y.height,e(0<H.c&&0<H.i),1>=X)y=0;else if(H.$a=k[j+0]>>0&3,H.Z=k[j+0]>>2&3,H.Lc=k[j+0]>>4&3,j=k[j+0]>>6&3,0>H.$a||1<H.$a||4<=H.Z||1<H.Lc||j)y=0;else if(Qt.put=Si,Qt.ac=dn,Qt.bc=bi,Qt.ma=H,Qt.width=y.width,Qt.height=y.height,Qt.Da=y.Da,Qt.v=y.v,Qt.va=y.va,Qt.j=y.j,Qt.o=y.o,H.$a)t:{e(H.$a==1),y=Mr();e:for(;;){if(y==null){y=0;break t}if(e(H!=null),H.mc=y,y.c=H.c,y.i=H.i,y.l=H.l,y.l.ma=H,y.l.width=H.c,y.l.height=H.i,y.a=0,J(y.m,k,Tt,mt),!ln(H.c,H.i,1,y,null)||(y.ab==1&&y.gc[0].hc==3&&Ae(y.s)?(H.ic=1,k=y.c*y.i,y.Ta=null,y.Ua=0,y.V=a(k),y.Ba=0,y.V==null?(y.a=1,y=0):y=1):(H.ic=0,y=Tn(y,H.c)),!y))break e;y=1;break t}H.mc=null,y=0}else y=mt>=H.c*H.i;H=!y}if(H)return null;d.ga.Lc!=1?d.Ga=0:I=Q-C}e(d.ga!=null),e(C+I<=Q);t:{if(y=(k=d.ga).c,Q=k.l.o,k.$a==0){if(Tt=d.rc,mt=d.Vc,Qt=d.Fa,j=d.P+1+C*y,X=d.mb,ft=d.nb+C*y,e(j<=d.P+d.qc),k.Z!=0)for(e(kl[k.Z]!=null),H=0;H<I;++H)kl[k.Z](Tt,mt,Qt,j,X,ft,y),Tt=X,mt=ft,ft+=y,j+=y;else for(H=0;H<I;++H)n(X,ft,Qt,j,y),Tt=X,mt=ft,ft+=y,j+=y;d.rc=Tt,d.Vc=mt}else{if(e(k.mc!=null),y=C+I,e((H=k.mc)!=null),e(y<=H.i),H.C>=y)y=1;else if(k.ic||Ct(),k.ic){k=H.V,Tt=H.Ba,mt=H.c;var Lt=H.i,pt=(Qt=1,j=H.$/mt,X=H.$%mt,ft=H.m,Bt=H.s,H.$),gt=mt*Lt,Pt=mt*y,Gt=Bt.wc,Dt=pt<Pt?Jr(Bt,X,j):null;e(pt<=gt),e(y<=Lt),e(Ae(Bt));e:for(;;){for(;!ft.h&&pt<Pt;){if(X&Gt||(Dt=Jr(Bt,X,j)),e(Dt!=null),at(ft),256>(Lt=Fi(Dt.G[0],Dt.H[0],ft)))k[Tt+pt]=Lt,++pt,++X>=mt&&(X=0,++j<=y&&!(j%16)&&Ht(H,j));else{if(!(280>Lt)){Qt=0;break e}Lt=fi(Lt-256,ft);var ce,Jt=Fi(Dt.G[4],Dt.H[4],ft);if(at(ft),!(pt>=(Jt=Qn(mt,Jt=fi(Jt,ft)))&&gt-pt>=Lt)){Qt=0;break e}for(ce=0;ce<Lt;++ce)k[Tt+pt+ce]=k[Tt+pt+ce-Jt];for(pt+=Lt,X+=Lt;X>=mt;)X-=mt,++j<=y&&!(j%16)&&Ht(H,j);pt<Pt&&X&Gt&&(Dt=Jr(Bt,X,j))}e(ft.h==K(ft))}Ht(H,j>y?y:j);break e}!Qt||ft.h&&pt<gt?(Qt=0,H.a=ft.h?5:3):H.$=pt,y=Qt}else y=Zt(H,H.V,H.Ba,H.c,H.i,y,os);if(!y){I=0;break t}}C+I>=Q&&(d.Cc=1),I=1}if(!I)return null;if(d.Cc&&((I=d.ga)!=null&&(I.mc=null),d.ga=null,0<d.Ga))return alert("todo:WebPDequantizeLevels"),null}return d.nb+C*U}function w(d,y,C,I,U,Q){for(;0<U--;){var H,k=d,j=y+(C?1:0),X=d,ft=y+(C?0:3);for(H=0;H<I;++H){var Bt=X[ft+4*H];Bt!=255&&(Bt*=32897,k[j+4*H+0]=k[j+4*H+0]*Bt>>23,k[j+4*H+1]=k[j+4*H+1]*Bt>>23,k[j+4*H+2]=k[j+4*H+2]*Bt>>23)}y+=Q}}function D(d,y,C,I,U){for(;0<I--;){var Q;for(Q=0;Q<C;++Q){var H=d[y+2*Q+0],k=15&(X=d[y+2*Q+1]),j=4369*k,X=(240&X|X>>4)*j>>16;d[y+2*Q+0]=(240&H|H>>4)*j>>16&240|(15&H|H<<4)*j>>16>>4&15,d[y+2*Q+1]=240&X|k}y+=U}}function et(d,y,C,I,U,Q,H,k){var j,X,ft=255;for(X=0;X<U;++X){for(j=0;j<I;++j){var Bt=d[y+j];Q[H+4*j]=Bt,ft&=Bt}y+=C,H+=k}return ft!=255}function lt(d,y,C,I,U){var Q;for(Q=0;Q<U;++Q)C[I+Q]=d[y+Q]>>8}function Ct(){Hl=w,Af=D,zy=et,vO=lt}function Rt(d,y,C){T[d]=function(I,U,Q,H,k,j,X,ft,Bt,Tt,mt,Qt,Lt,pt,gt,Pt,Gt){var Dt,ce=Gt-1>>1,Jt=k[j+0]|X[ft+0]<<16,Pe=Bt[Tt+0]|mt[Qt+0]<<16;e(I!=null);var ee=3*Jt+Pe+131074>>2;for(y(I[U+0],255&ee,ee>>16,Lt,pt),Q!=null&&(ee=3*Pe+Jt+131074>>2,y(Q[H+0],255&ee,ee>>16,gt,Pt)),Dt=1;Dt<=ce;++Dt){var Ur=k[j+Dt]|X[ft+Dt]<<16,tn=Bt[Tt+Dt]|mt[Qt+Dt]<<16,Sr=Jt+Ur+Pe+tn+524296,yr=Sr+2*(Ur+Pe)>>3;ee=yr+Jt>>1,Jt=(Sr=Sr+2*(Jt+tn)>>3)+Ur>>1,y(I[U+2*Dt-1],255&ee,ee>>16,Lt,pt+(2*Dt-1)*C),y(I[U+2*Dt-0],255&Jt,Jt>>16,Lt,pt+(2*Dt-0)*C),Q!=null&&(ee=Sr+Pe>>1,Jt=yr+tn>>1,y(Q[H+2*Dt-1],255&ee,ee>>16,gt,Pt+(2*Dt-1)*C),y(Q[H+2*Dt+0],255&Jt,Jt>>16,gt,Pt+(2*Dt+0)*C)),Jt=Ur,Pe=tn}1&Gt||(ee=3*Jt+Pe+131074>>2,y(I[U+Gt-1],255&ee,ee>>16,Lt,pt+(Gt-1)*C),Q!=null&&(ee=3*Pe+Jt+131074>>2,y(Q[H+Gt-1],255&ee,ee>>16,gt,Pt+(Gt-1)*C)))}}function Kt(){jo[Yy]=w9,jo[Wy]=SO,jo[EO]=E9,jo[qy]=bO,jo[Zy]=FO,jo[KE]=IO,jo[CO]=C9,jo[zE]=SO,jo[XE]=bO,jo[Jy]=FO,jo[YE]=IO}function ne(d){return d&~B9?0>d?0:255:d>>LO}function Le(d,y){return ne((19077*d>>8)+(26149*y>>8)-14234)}function cr(d,y,C){return ne((19077*d>>8)-(6419*y>>8)-(13320*C>>8)+8708)}function ze(d,y){return ne((19077*d>>8)+(33050*y>>8)-17685)}function xr(d,y,C,I,U){I[U+0]=Le(d,C),I[U+1]=cr(d,y,C),I[U+2]=ze(d,y)}function ea(d,y,C,I,U){I[U+0]=ze(d,y),I[U+1]=cr(d,y,C),I[U+2]=Le(d,C)}function qn(d,y,C,I,U){var Q=cr(d,y,C);y=Q<<3&224|ze(d,y)>>3,I[U+0]=248&Le(d,C)|Q>>5,I[U+1]=y}function pi(d,y,C,I,U){var Q=240&ze(d,y)|15;I[U+0]=240&Le(d,C)|cr(d,y,C)>>4,I[U+1]=Q}function pa(d,y,C,I,U){I[U+0]=255,xr(d,y,C,I,U+1)}function ji(d,y,C,I,U){ea(d,y,C,I,U),I[U+3]=255}function ls(d,y,C,I,U){xr(d,y,C,I,U),I[U+3]=255}function Eo(d,y){return 0>d?0:d>y?y:d}function bA(d,y,C){T[d]=function(I,U,Q,H,k,j,X,ft,Bt){for(var Tt=ft+(-2&Bt)*C;ft!=Tt;)y(I[U+0],Q[H+0],k[j+0],X,ft),y(I[U+1],Q[H+0],k[j+0],X,ft+C),U+=2,++H,++j,ft+=2*C;1&Bt&&y(I[U+0],Q[H+0],k[j+0],X,ft)}}function Vy(d,y,C){return C==0?d==0?y==0?6:5:y==0?4:0:C}function xd(d,y,C,I,U){switch(d>>>30){case 3:of(y,C,I,U,0);break;case 2:Rd(y,C,I,U);break;case 1:fs(y,C,I,U)}}function Sd(d,y){var C,I,U=y.M,Q=y.Nb,H=d.oc,k=d.pc+40,j=d.oc,X=d.pc+584,ft=d.oc,Bt=d.pc+600;for(C=0;16>C;++C)H[k+32*C-1]=129;for(C=0;8>C;++C)j[X+32*C-1]=129,ft[Bt+32*C-1]=129;for(0<U?H[k-1-32]=j[X-1-32]=ft[Bt-1-32]=129:(i(H,k-32-1,127,21),i(j,X-32-1,127,9),i(ft,Bt-32-1,127,9)),I=0;I<d.za;++I){var Tt=y.ya[y.aa+I];if(0<I){for(C=-1;16>C;++C)n(H,k+32*C-4,H,k+32*C+12,4);for(C=-1;8>C;++C)n(j,X+32*C-4,j,X+32*C+4,4),n(ft,Bt+32*C-4,ft,Bt+32*C+4,4)}var mt=d.Gd,Qt=d.Hd+I,Lt=Tt.ad,pt=Tt.Hc;if(0<U&&(n(H,k-32,mt[Qt].y,0,16),n(j,X-32,mt[Qt].f,0,8),n(ft,Bt-32,mt[Qt].ea,0,8)),Tt.Za){var gt=H,Pt=k-32+16;for(0<U&&(I>=d.za-1?i(gt,Pt,mt[Qt].y[15],4):n(gt,Pt,mt[Qt+1].y,0,4)),C=0;4>C;C++)gt[Pt+128+C]=gt[Pt+256+C]=gt[Pt+384+C]=gt[Pt+0+C];for(C=0;16>C;++C,pt<<=2)gt=H,Pt=k+RO[C],ps[Tt.Ob[C]](gt,Pt),xd(pt,Lt,16*+C,gt,Pt)}else if(gt=Vy(I,U,Tt.Ob[0]),Gl[gt](H,k),pt!=0)for(C=0;16>C;++C,pt<<=2)xd(pt,Lt,16*+C,H,k+RO[C]);for(C=Tt.Gc,gt=Vy(I,U,Tt.Dd),RA[gt](j,X),RA[gt](ft,Bt),pt=Lt,gt=j,Pt=X,255&(Tt=C>>0)&&(170&Tt?Dl(pt,256,gt,Pt):IA(pt,256,gt,Pt)),Tt=ft,pt=Bt,255&(C>>=8)&&(170&C?Dl(Lt,320,Tt,pt):IA(Lt,320,Tt,pt)),U<d.Ub-1&&(n(mt[Qt].y,0,H,k+480,16),n(mt[Qt].f,0,j,X+224,8),n(mt[Qt].ea,0,ft,Bt+224,8)),C=8*Q*d.B,mt=d.sa,Qt=d.ta+16*I+16*Q*d.R,Lt=d.qa,Tt=d.ra+8*I+C,pt=d.Ha,gt=d.Ia+8*I+C,C=0;16>C;++C)n(mt,Qt+C*d.R,H,k+32*C,16);for(C=0;8>C;++C)n(Lt,Tt+C*d.B,j,X+32*C,8),n(pt,gt+C*d.B,ft,Bt+32*C,8)}}function Jh(d,y,C,I,U,Q,H,k,j){var X=[0],ft=[0],Bt=0,Tt=j!=null?j.kd:0,mt=j??new Ed;if(d==null||12>C)return 7;mt.data=d,mt.w=y,mt.ha=C,y=[y],C=[C],mt.gb=[mt.gb];t:{var Qt=y,Lt=C,pt=mt.gb;if(e(d!=null),e(Lt!=null),e(pt!=null),pt[0]=0,12<=Lt[0]&&!t(d,Qt[0],"RIFF")){if(t(d,Qt[0]+8,"WEBP")){pt=3;break t}var gt=Z(d,Qt[0]+4);if(12>gt||4294967286<gt){pt=3;break t}if(Tt&&gt>Lt[0]-8){pt=7;break t}pt[0]=gt,Qt[0]+=12,Lt[0]-=12}pt=0}if(pt!=0)return pt;for(gt=0<mt.gb[0],C=C[0];;){t:{var Pt=d;Lt=y,pt=C;var Gt=X,Dt=ft,ce=Qt=[0];if((ee=Bt=[Bt])[0]=0,8>pt[0])pt=7;else{if(!t(Pt,Lt[0],"VP8X")){if(Z(Pt,Lt[0]+4)!=10){pt=3;break t}if(18>pt[0]){pt=7;break t}var Jt=Z(Pt,Lt[0]+8),Pe=1+V(Pt,Lt[0]+12);if(2147483648<=Pe*(Pt=1+V(Pt,Lt[0]+15))){pt=3;break t}ce!=null&&(ce[0]=Jt),Gt!=null&&(Gt[0]=Pe),Dt!=null&&(Dt[0]=Pt),Lt[0]+=18,pt[0]-=18,ee[0]=1}pt=0}}if(Bt=Bt[0],Qt=Qt[0],pt!=0)return pt;if(Lt=!!(2&Qt),!gt&&Bt)return 3;if(Q!=null&&(Q[0]=!!(16&Qt)),H!=null&&(H[0]=Lt),k!=null&&(k[0]=0),H=X[0],Qt=ft[0],Bt&&Lt&&j==null){pt=0;break}if(4>C){pt=7;break}if(gt&&Bt||!gt&&!Bt&&!t(d,y[0],"ALPH")){C=[C],mt.na=[mt.na],mt.P=[mt.P],mt.Sa=[mt.Sa];t:{Jt=d,pt=y,gt=C;var ee=mt.gb;Gt=mt.na,Dt=mt.P,ce=mt.Sa,Pe=22,e(Jt!=null),e(gt!=null),Pt=pt[0];var Ur=gt[0];for(e(Gt!=null),e(ce!=null),Gt[0]=null,Dt[0]=null,ce[0]=0;;){if(pt[0]=Pt,gt[0]=Ur,8>Ur){pt=7;break t}var tn=Z(Jt,Pt+4);if(4294967286<tn){pt=3;break t}var Sr=8+tn+1&-2;if(Pe+=Sr,0<ee&&Pe>ee){pt=3;break t}if(!t(Jt,Pt,"VP8 ")||!t(Jt,Pt,"VP8L")){pt=0;break t}if(Ur[0]<Sr){pt=7;break t}t(Jt,Pt,"ALPH")||(Gt[0]=Jt,Dt[0]=Pt+8,ce[0]=tn),Pt+=Sr,Ur-=Sr}}if(C=C[0],mt.na=mt.na[0],mt.P=mt.P[0],mt.Sa=mt.Sa[0],pt!=0)break}C=[C],mt.Ja=[mt.Ja],mt.xa=[mt.xa];t:if(ee=d,pt=y,gt=C,Gt=mt.gb[0],Dt=mt.Ja,ce=mt.xa,Jt=pt[0],Pt=!t(ee,Jt,"VP8 "),Pe=!t(ee,Jt,"VP8L"),e(ee!=null),e(gt!=null),e(Dt!=null),e(ce!=null),8>gt[0])pt=7;else{if(Pt||Pe){if(ee=Z(ee,Jt+4),12<=Gt&&ee>Gt-12){pt=3;break t}if(Tt&&ee>gt[0]-8){pt=7;break t}Dt[0]=ee,pt[0]+=8,gt[0]-=8,ce[0]=Pe}else ce[0]=5<=gt[0]&&ee[Jt+0]==47&&!(ee[Jt+4]>>5),Dt[0]=gt[0];pt=0}if(C=C[0],mt.Ja=mt.Ja[0],mt.xa=mt.xa[0],y=y[0],pt!=0)break;if(4294967286<mt.Ja)return 3;if(k==null||Lt||(k[0]=mt.xa?2:1),H=[H],Qt=[Qt],mt.xa){if(5>C){pt=7;break}k=H,Tt=Qt,Lt=Q,d==null||5>C?d=0:5<=C&&d[y+0]==47&&!(d[y+4]>>5)?(gt=[0],ee=[0],Gt=[0],J(Dt=new R,d,y,C),Fe(Dt,gt,ee,Gt)?(k!=null&&(k[0]=gt[0]),Tt!=null&&(Tt[0]=ee[0]),Lt!=null&&(Lt[0]=Gt[0]),d=1):d=0):d=0}else{if(10>C){pt=7;break}k=Qt,d==null||10>C||!Fy(d,y+3,C-3)?d=0:(Tt=d[y+0]|d[y+1]<<8|d[y+2]<<16,Lt=16383&(d[y+7]<<8|d[y+6]),d=16383&(d[y+9]<<8|d[y+8]),1&Tt||3<(Tt>>1&7)||!(Tt>>4&1)||Tt>>5>=mt.Ja||!Lt||!d?d=0:(H&&(H[0]=Lt),k&&(k[0]=d),d=1))}if(!d||(H=H[0],Qt=Qt[0],Bt&&(X[0]!=H||ft[0]!=Qt)))return 3;j!=null&&(j[0]=mt,j.offset=y-j.w,e(4294967286>y-j.w),e(j.offset==j.ha-C));break}return pt==0||pt==7&&Bt&&j==null?(Q!=null&&(Q[0]|=mt.na!=null&&0<mt.na.length),I!=null&&(I[0]=H),U!=null&&(U[0]=Qt),0):pt}function bd(d,y,C){var I=y.width,U=y.height,Q=0,H=0,k=I,j=U;if(y.Da=d!=null&&0<d.Da,y.Da&&(k=d.cd,j=d.bd,Q=d.v,H=d.j,11>C||(Q&=-2,H&=-2),0>Q||0>H||0>=k||0>=j||Q+k>I||H+j>U))return 0;if(y.v=Q,y.j=H,y.va=Q+k,y.o=H+j,y.U=k,y.T=j,y.da=d!=null&&0<d.da,y.da){if(!St(k,j,C=[d.ib],Q=[d.hb]))return 0;y.ib=C[0],y.hb=Q[0]}return y.ob=d!=null&&d.ob,y.Kb=d==null||!d.Sd,y.da&&(y.ob=y.ib<3*I/4&&y.hb<3*U/4,y.Kb=0),1}function Fd(d){if(d==null)return 2;if(11>d.S){var y=d.f.RGBA;y.fb+=(d.height-1)*y.A,y.A=-y.A}else y=d.f.kb,d=d.height,y.O+=(d-1)*y.fa,y.fa=-y.fa,y.N+=(d-1>>1)*y.Ab,y.Ab=-y.Ab,y.W+=(d-1>>1)*y.Db,y.Db=-y.Db,y.F!=null&&(y.J+=(d-1)*y.lb,y.lb=-y.lb);return 0}function tf(d,y,C,I){if(I==null||0>=d||0>=y)return 2;if(C!=null){if(C.Da){var U=C.cd,Q=C.bd,H=-2&C.v,k=-2&C.j;if(0>H||0>k||0>=U||0>=Q||H+U>d||k+Q>y)return 2;d=U,y=Q}if(C.da){if(!St(d,y,U=[C.ib],Q=[C.hb]))return 2;d=U[0],y=Q[0]}}I.width=d,I.height=y;t:{var j=I.width,X=I.height;if(d=I.S,0>=j||0>=X||!(d>=Yy&&13>d))d=2;else{if(0>=I.Rd&&I.sd==null){H=Q=U=y=0;var ft=(k=j*MO[d])*X;if(11>d||(Q=(X+1)/2*(y=(j+1)/2),d==12&&(H=(U=j)*X)),(X=a(ft+2*Q+H))==null){d=1;break t}I.sd=X,11>d?((j=I.f.RGBA).eb=X,j.fb=0,j.A=k,j.size=ft):((j=I.f.kb).y=X,j.O=0,j.fa=k,j.Fd=ft,j.f=X,j.N=0+ft,j.Ab=y,j.Cd=Q,j.ea=X,j.W=0+ft+Q,j.Db=y,j.Ed=Q,d==12&&(j.F=X,j.J=0+ft+2*Q),j.Tc=H,j.lb=U)}if(y=1,U=I.S,Q=I.width,H=I.height,U>=Yy&&13>U)if(11>U)d=I.f.RGBA,y&=(k=Math.abs(d.A))*(H-1)+Q<=d.size,y&=k>=Q*MO[U],y&=d.eb!=null;else{d=I.f.kb,k=(Q+1)/2,ft=(H+1)/2,j=Math.abs(d.fa),X=Math.abs(d.Ab);var Bt=Math.abs(d.Db),Tt=Math.abs(d.lb),mt=Tt*(H-1)+Q;y&=j*(H-1)+Q<=d.Fd,y&=X*(ft-1)+k<=d.Cd,y=(y&=Bt*(ft-1)+k<=d.Ed)&j>=Q&X>=k&Bt>=k,y&=d.y!=null,y&=d.f!=null,y&=d.ea!=null,U==12&&(y&=Tt>=Q,y&=mt<=d.Tc,y&=d.F!=null)}else y=0;d=y?0:2}}return d!=0||C!=null&&C.fd&&(d=Fd(I)),d}var qa=64,ef=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],rf=24,nf=32,Id=8,Za=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Et("Predictor0","PredictorAdd0"),T.Predictor0=function(){return 4278190080},T.Predictor1=function(d){return d},T.Predictor2=function(d,y,C){return y[C+0]},T.Predictor3=function(d,y,C){return y[C+1]},T.Predictor4=function(d,y,C){return y[C-1]},T.Predictor5=function(d,y,C){return xt(xt(d,y[C+1]),y[C+0])},T.Predictor6=function(d,y,C){return xt(d,y[C-1])},T.Predictor7=function(d,y,C){return xt(d,y[C+0])},T.Predictor8=function(d,y,C){return xt(y[C-1],y[C+0])},T.Predictor9=function(d,y,C){return xt(y[C+0],y[C+1])},T.Predictor10=function(d,y,C){return xt(xt(d,y[C-1]),xt(y[C+0],y[C+1]))},T.Predictor11=function(d,y,C){var I=y[C+0];return 0>=Vt(I>>24&255,d>>24&255,(y=y[C-1])>>24&255)+Vt(I>>16&255,d>>16&255,y>>16&255)+Vt(I>>8&255,d>>8&255,y>>8&255)+Vt(255&I,255&d,255&y)?I:d},T.Predictor12=function(d,y,C){var I=y[C+0];return(It((d>>24&255)+(I>>24&255)-((y=y[C-1])>>24&255))<<24|It((d>>16&255)+(I>>16&255)-(y>>16&255))<<16|It((d>>8&255)+(I>>8&255)-(y>>8&255))<<8|It((255&d)+(255&I)-(255&y)))>>>0},T.Predictor13=function(d,y,C){var I=y[C-1];return(Mt((d=xt(d,y[C+0]))>>24&255,I>>24&255)<<24|Mt(d>>16&255,I>>16&255)<<16|Mt(d>>8&255,I>>8&255)<<8|Mt(d>>0&255,I>>0&255))>>>0};var kE=T.PredictorAdd0;T.PredictorAdd1=Yt,Et("Predictor2","PredictorAdd2"),Et("Predictor3","PredictorAdd3"),Et("Predictor4","PredictorAdd4"),Et("Predictor5","PredictorAdd5"),Et("Predictor6","PredictorAdd6"),Et("Predictor7","PredictorAdd7"),Et("Predictor8","PredictorAdd8"),Et("Predictor9","PredictorAdd9"),Et("Predictor10","PredictorAdd10"),Et("Predictor11","PredictorAdd11"),Et("Predictor12","PredictorAdd12"),Et("Predictor13","PredictorAdd13");var Ld=T.PredictorAdd2;se("ColorIndexInverseTransform","MapARGB","32b",function(d){return d>>8&255},function(d){return d}),se("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(d){return d},function(d){return d>>8&255});var Ky,us=T.ColorIndexInverseTransform,Od=T.MapARGB,$E=T.VP8LColorIndexInverseTransformAlpha,jE=T.MapAlpha,Pl=T.VP8LPredictorsAdd=[];Pl.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var Go,cs,Ul,Gs,FA,af,hs,of,Rd,Dl,fs,IA,pc,sf,dc,Ql,Md,ko,LA,vn,gn,Zn,Li,OA,Hl,Af,zy,vO,gO=a(511),yO=a(2041),mO=a(225),_O=a(767),wO=0,VE=yO,Xy=mO,Co=_O,$o=gO,Yy=0,Wy=1,EO=2,qy=3,Zy=4,KE=5,CO=6,zE=7,XE=8,Jy=9,YE=10,s9=[2,3,7],A9=[3,3,11],BO=[280,256,256,256,40],l9=[0,1,1,1,0],u9=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],c9=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],h9=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],f9=8,WE=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],qE=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Nd=null,p9=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],d9=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],TO=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],v9=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],g9=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],y9=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],m9=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Gl=[],ps=[],RA=[],_9=1,xO=2,kl=[],jo=[];Rt("UpsampleRgbLinePair",xr,3),Rt("UpsampleBgrLinePair",ea,3),Rt("UpsampleRgbaLinePair",ls,4),Rt("UpsampleBgraLinePair",ji,4),Rt("UpsampleArgbLinePair",pa,4),Rt("UpsampleRgba4444LinePair",pi,2),Rt("UpsampleRgb565LinePair",qn,2);var w9=T.UpsampleRgbLinePair,E9=T.UpsampleBgrLinePair,SO=T.UpsampleRgbaLinePair,bO=T.UpsampleBgraLinePair,FO=T.UpsampleArgbLinePair,IO=T.UpsampleRgba4444LinePair,C9=T.UpsampleRgb565LinePair,tm=16,em=1<<tm-1,Pd=-227,ZE=482,LO=6,B9=(256<<LO)-1,OO=0,T9=a(256),x9=a(256),S9=a(256),b9=a(256),F9=a(ZE-Pd),I9=a(ZE-Pd);bA("YuvToRgbRow",xr,3),bA("YuvToBgrRow",ea,3),bA("YuvToRgbaRow",ls,4),bA("YuvToBgraRow",ji,4),bA("YuvToArgbRow",pa,4),bA("YuvToRgba4444Row",pi,2),bA("YuvToRgb565Row",qn,2);var RO=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],rm=[0,2,8],L9=[8,7,6,4,4,2,2,2,1,1,1,1],O9=1;this.WebPDecodeRGBA=function(d,y,C,I,U){var Q=Wy,H=new qh,k=new hi;H.ba=k,k.S=Q,k.width=[k.width],k.height=[k.height];var j=k.width,X=k.height,ft=new Vr;if(ft==null||d==null)var Bt=2;else e(ft!=null),Bt=Jh(d,y,C,ft.width,ft.height,ft.Pd,ft.Qd,ft.format,null);if(Bt!=0?j=0:(j!=null&&(j[0]=ft.width[0]),X!=null&&(X[0]=ft.height[0]),j=1),j){k.width=k.width[0],k.height=k.height[0],I!=null&&(I[0]=k.width),U!=null&&(U[0]=k.height);t:{if(I=new jh,(U=new Ed).data=d,U.w=y,U.ha=C,U.kd=1,y=[0],e(U!=null),((d=Jh(U.data,U.w,U.ha,null,null,null,y,null,U))==0||d==7)&&y[0]&&(d=4),(y=d)==0){if(e(H!=null),I.data=U.data,I.w=U.w+U.offset,I.ha=U.ha-U.offset,I.put=Si,I.ac=dn,I.bc=bi,I.ma=H,U.xa){if((d=Mr())==null){H=1;break t}if(function(Tt,mt){var Qt=[0],Lt=[0],pt=[0];e:for(;;){if(Tt==null)return 0;if(mt==null)return Tt.a=2,0;if(Tt.l=mt,Tt.a=0,J(Tt.m,mt.data,mt.w,mt.ha),!Fe(Tt.m,Qt,Lt,pt)){Tt.a=3;break e}if(Tt.xb=xO,mt.width=Qt[0],mt.height=Lt[0],!ln(Qt[0],Lt[0],1,Tt,null))break e;return 1}return e(Tt.a!=0),0}(d,I)){if(I=(y=tf(I.width,I.height,H.Oa,H.ba))==0){e:{I=d;r:for(;;){if(I==null){I=0;break e}if(e(I.s.yc!=null),e(I.s.Ya!=null),e(0<I.s.Wb),e((C=I.l)!=null),e((U=C.ma)!=null),I.xb!=0){if(I.ca=U.ba,I.tb=U.tb,e(I.ca!=null),!bd(U.Oa,C,qy)){I.a=2;break r}if(!Tn(I,C.width)||C.da)break r;if((C.da||Ar(I.ca.S))&&Ct(),11>I.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),I.ca.f.kb.F!=null&&Ct()),I.Pb&&0<I.s.ua&&I.s.vb.X==null&&!ut(I.s.vb,I.s.Wa.Xa)){I.a=1;break r}I.xb=0}if(!Zt(I,I.V,I.Ba,I.c,I.i,C.o,wo))break r;U.Dc=I.Ma,I=1;break e}e(I.a!=0),I=0}I=!I}I&&(y=d.a)}else y=d.a}else{if((d=new CE)==null){H=1;break t}if(d.Fa=U.na,d.P=U.P,d.qc=U.Sa,Iy(d,I)){if((y=tf(I.width,I.height,H.Oa,H.ba))==0){if(d.Aa=0,C=H.Oa,e((U=d)!=null),C!=null){if(0<(j=0>(j=C.Md)?0:100<j?255:255*j/100)){for(X=ft=0;4>X;++X)12>(Bt=U.pb[X]).lc&&(Bt.ia=j*L9[0>Bt.lc?0:Bt.lc]>>3),ft|=Bt.ia;ft&&(alert("todo:VP8InitRandom"),U.ia=1)}U.Ga=C.Id,100<U.Ga?U.Ga=100:0>U.Ga&&(U.Ga=0)}BE(d,I)||(y=d.a)}}else y=d.a}y==0&&H.Oa!=null&&H.Oa.fd&&(y=Fd(H.ba))}H=y}Q=H!=0?null:11>Q?k.f.RGBA.eb:k.f.kb.y}else Q=null;return Q};var MO=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(T,F){for(var M="",S=0;S<4;S++)M+=String.fromCharCode(T[F++]);return M}function u(T,F){return(T[F+0]<<0|T[F+1]<<8|T[F+2]<<16)>>>0}function c(T,F){return(T[F+0]<<0|T[F+1]<<8|T[F+2]<<16|T[F+3]<<24)>>>0}new A;var h=[0],f=[0],p=[],v=new A,m=r,g=function(T,F){var M={},S=0,x=!1,N=0,P=0;if(M.frames=[],!function($,K,q,at){for(var vt=0;vt<at;vt++)if($[K+vt]!=q.charCodeAt(vt))return!0;return!1}(T,F,"RIFF",4)){var Y,z;for(c(T,F+=4),F+=8;F<T.length;){var tt=l(T,F),J=c(T,F+=4);F+=4;var nt=J+(1&J);switch(tt){case"VP8 ":case"VP8L":M.frames[S]===void 0&&(M.frames[S]={}),(R=M.frames[S]).src_off=x?P:F-8,R.src_size=N+J+8,S++,x&&(x=!1,N=0,P=0);break;case"VP8X":(R=M.header={}).feature_flags=T[F];var it=F+4;R.canvas_width=1+u(T,it),it+=3,R.canvas_height=1+u(T,it),it+=3;break;case"ALPH":x=!0,N=nt+8,P=F-8;break;case"ANIM":(R=M.header).bgcolor=c(T,F),it=F+4,R.loop_count=(Y=T)[(z=it)+0]<<0|Y[z+1]<<8,it+=2;break;case"ANMF":var _t,R;(R=M.frames[S]={}).offset_x=2*u(T,F),F+=3,R.offset_y=2*u(T,F),F+=3,R.width=1+u(T,F),F+=3,R.height=1+u(T,F),F+=3,R.duration=u(T,F),F+=3,_t=T[F++],R.dispose=1&_t,R.blend=_t>>1&1}tt!="ANMF"&&(F+=nt)}return M}}(m,0);g.response=m,g.rgbaoutput=!0,g.dataurl=!1;var _=g.header?g.header:null,E=g.frames?g.frames:null;if(_){_.loop_counter=_.loop_count,h=[_.canvas_height],f=[_.canvas_width];for(var B=0;B<E.length&&E[B].blend!=0;B++);}var L=E[0],O=v.WebPDecodeRGBA(m,L.src_off,L.src_size,f,h);L.rgba=O,L.imgwidth=f[0],L.imgheight=h[0];for(var b=0;b<f[0]*h[0]*4;b++)p[b]=O[b];return this.width=f,this.height=h,this.data=p,this}(function(r){var e=function(){return typeof Jx=="function"},t=function(h,f,p,v){var m=4,g=o;switch(v){case r.image_compression.FAST:m=1,g=a;break;case r.image_compression.MEDIUM:m=6,g=s;break;case r.image_compression.SLOW:m=9,g=A}h=n(h,f,p,g);var _=Jx(h,{level:m});return r.__addimage__.arrayBufferToBinaryString(_)},n=function(h,f,p,v){for(var m,g,_,E=h.length/f,B=new Uint8Array(h.length+E),L=u(),O=0;O<E;O+=1){if(_=O*f,m=h.subarray(_,_+f),v)B.set(v(m,p,g),_+O);else{for(var b,T=L.length,F=[];b<T;b+=1)F[b]=L[b](m,p,g);var M=c(F.concat());B.set(F[M],_+O)}g=m}return B},i=function(h){var f=Array.apply([],h);return f.unshift(0),f},a=function(h,f){var p,v=[],m=h.length;v[0]=1;for(var g=0;g<m;g+=1)p=h[g-f]||0,v[g+1]=h[g]-p+256&255;return v},o=function(h,f,p){var v,m=[],g=h.length;m[0]=2;for(var _=0;_<g;_+=1)v=p&&p[_]||0,m[_+1]=h[_]-v+256&255;return m},s=function(h,f,p){var v,m,g=[],_=h.length;g[0]=3;for(var E=0;E<_;E+=1)v=h[E-f]||0,m=p&&p[E]||0,g[E+1]=h[E]+256-(v+m>>>1)&255;return g},A=function(h,f,p){var v,m,g,_,E=[],B=h.length;E[0]=4;for(var L=0;L<B;L+=1)v=h[L-f]||0,m=p&&p[L]||0,g=p&&p[L-f]||0,_=l(v,m,g),E[L+1]=h[L]-_+256&255;return E},l=function(h,f,p){if(h===f&&f===p)return h;var v=Math.abs(f-p),m=Math.abs(h-p),g=Math.abs(h+f-p-p);return v<=m&&v<=g?h:m<=g?f:p},u=function(){return[i,a,o,s,A]},c=function(h){var f=h.map(function(p){return p.reduce(function(v,m){return v+Math.abs(m)},0)});return f.indexOf(Math.min.apply(null,f))};r.processPNG=function(h,f,p,v){var m,g,_,E,B,L,O,b,T,F,M,S,x,N,P,Y=this.decode.FLATE_DECODE,z="";if(this.__addimage__.isArrayBuffer(h)&&(h=new Uint8Array(h)),this.__addimage__.isArrayBufferView(h)){if(h=(_=new UAt(h)).imgData,g=_.bits,m=_.colorSpace,B=_.colors,[4,6].indexOf(_.colorType)!==-1){if(_.bits===8){T=(b=_.pixelBitlength==32?new Uint32Array(_.decodePixels().buffer):_.pixelBitlength==16?new Uint16Array(_.decodePixels().buffer):new Uint8Array(_.decodePixels().buffer)).length,M=new Uint8Array(T*_.colors),F=new Uint8Array(T);var tt,J=_.pixelBitlength-_.bits;for(N=0,P=0;N<T;N++){for(x=b[N],tt=0;tt<J;)M[P++]=x>>>tt&255,tt+=_.bits;F[N]=x>>>tt&255}}if(_.bits===16){T=(b=new Uint32Array(_.decodePixels().buffer)).length,M=new Uint8Array(T*(32/_.pixelBitlength)*_.colors),F=new Uint8Array(T*(32/_.pixelBitlength)),S=_.colors>1,N=0,P=0;for(var nt=0;N<T;)x=b[N++],M[P++]=x>>>0&255,S&&(M[P++]=x>>>16&255,x=b[N++],M[P++]=x>>>0&255),F[nt++]=x>>>16&255;g=8}v!==r.image_compression.NONE&&e()?(h=t(M,_.width*_.colors,_.colors,v),O=t(F,_.width,1,v)):(h=M,O=F,Y=void 0)}if(_.colorType===3&&(m=this.color_spaces.INDEXED,L=_.palette,_.transparency.indexed)){var it=_.transparency.indexed,_t=0;for(N=0,T=it.length;N<T;++N)_t+=it[N];if((_t/=255)===T-1&&it.indexOf(0)!==-1)E=[it.indexOf(0)];else if(_t!==T){for(b=_.decodePixels(),F=new Uint8Array(b.length),N=0,T=b.length;N<T;N++)F[N]=it[b[N]];O=t(F,_.width,1)}}var R=function($){var K;switch($){case r.image_compression.FAST:K=11;break;case r.image_compression.MEDIUM:K=13;break;case r.image_compression.SLOW:K=14;break;default:K=12}return K}(v);return Y===this.decode.FLATE_DECODE&&(z="/Predictor "+R+" "),z+="/Colors "+B+" /BitsPerComponent "+g+" /Columns "+_.width,(this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),(O&&this.__addimage__.isArrayBuffer(O)||this.__addimage__.isArrayBufferView(O))&&(O=this.__addimage__.arrayBufferToBinaryString(O)),{alias:p,data:h,index:f,filter:Y,decodeParameters:z,transparency:E,palette:L,sMask:O,predictor:R,width:_.width,height:_.height,bitsPerComponent:g,colorSpace:m}}}})(De.API),function(r){r.processGIF89A=function(e,t,n,i){var a=new DAt(e),o=a.width,s=a.height,A=[];a.decodeAndBlitFrameRGBA(0,A);var l={data:A,width:o,height:s},u=new rB(100).encode(l,100);return r.processJPEG.call(this,u,t,n,i)},r.processGIF87A=r.processGIF89A}(De.API),ys.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var e=0;e<r;e++){var t=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:n,blue:t,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},ys.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[r]()}catch(t){cn.log("bit decode error:"+t)}},ys.prototype.bit1=function(){var r,e=Math.ceil(this.width/8),t=e%4;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var A=this.palette[a>>7-s&1];this.data[o+4*s]=A.blue,this.data[o+4*s+1]=A.green,this.data[o+4*s+2]=A.red,this.data[o+4*s+3]=255}t!==0&&(this.pos+=4-t)}},ys.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<r;i++){var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*i*4,s=a>>4,A=15&a,l=this.palette[s];if(this.data[o]=l.blue,this.data[o+1]=l.green,this.data[o+2]=l.red,this.data[o+3]=255,2*i+1>=this.width)break;l=this.palette[A],this.data[o+4]=l.blue,this.data[o+4+1]=l.green,this.data[o+4+2]=l.red,this.data[o+4+3]=255}e!==0&&(this.pos+=4-e)}},ys.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*n;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}r!==0&&(this.pos+=4-r)}},ys.prototype.bit15=function(){for(var r=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,A=(a>>10&e)/e*255|0,l=a>>15?255:0,u=n*this.width*4+4*i;this.data[u]=A,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=l}this.pos+=r}},ys.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,A=(o>>5&t)/t*255|0,l=(o>>11)/e*255|0,u=i*this.width*4+4*a;this.data[u]=l,this.data[u+1]=A,this.data[u+2]=s,this.data[u+3]=255}this.pos+=r}},ys.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*t;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},ys.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*t;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=n,this.data[s+3]=o}},ys.prototype.getData=function(){return this.data},function(r){r.processBMP=function(e,t,n,i){var a=new ys(e,!1),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new rB(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(De.API),NN.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(e,t,n,i){var a=new NN(e),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new rB(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(De.API),De.API.processRGBA=function(r,e,t){for(var n=r.data,i=n.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,A=0,l=0;l<i;l+=4){var u=n[l],c=n[l+1],h=n[l+2],f=n[l+3];a[s++]=u,a[s++]=c,a[s++]=h,o[A++]=f}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:p,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},De.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},mf=De.API,jm=mf.getCharWidthsArray=function(r,e){var t,n,i=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:i.metadata.Unicode.widths,A=s.fof?s.fof:1,l=e.kerning?e.kerning:i.metadata.Unicode.kerning,u=l.fof?l.fof:1,c=e.doKerning!==!1,h=0,f=r.length,p=0,v=s[0]||A,m=[];for(t=0;t<f;t++)n=r.charCodeAt(t),typeof i.metadata.widthOfString=="function"?m.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+o*(1e3/a)||0)/1e3):(h=c&&rn(l[n])==="object"&&!isNaN(parseInt(l[n][p],10))?l[n][p]/u:0,m.push((s[n]||v)/A+h)),p=n;return m},LN=mf.getStringUnitWidth=function(r,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return mf.processArabic&&(r=mf.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,t,i)/t:jm.apply(this,arguments).reduce(function(a,o){return a+o},0)},ON=function(r,e,t,n){for(var i=[],a=0,o=r.length,s=0;a!==o&&s+e[a]<t;)s+=e[a],a++;i.push(r.slice(0,a));var A=a;for(s=0;a!==o;)s+e[a]>n&&(i.push(r.slice(A,a)),s=0,A=a),s+=e[a],a++;return A!==a&&i.push(r.slice(A,a)),i},RN=function(r,e,t){t||(t={});var n,i,a,o,s,A,l,u=[],c=[u],h=t.textIndent||0,f=0,p=0,v=r.split(" "),m=jm.apply(this,[" ",t])[0];if(A=t.lineIndent===-1?v[0].length+2:t.lineIndent||0){var g=Array(A).join(" "),_=[];v.map(function(B){(B=B.split(/\s*\n/)).length>1?_=_.concat(B.map(function(L,O){return(O&&L.length?`
`:"")+L})):_.push(B[0])}),v=_,A=LN.apply(this,[g,t])}for(a=0,o=v.length;a<o;a++){var E=0;if(n=v[a],A&&n[0]==`
`&&(n=n.substr(1),E=1),h+f+(p=(i=jm.apply(this,[n,t])).reduce(function(B,L){return B+L},0))>e||E){if(p>e){for(s=ON.apply(this,[n,i,e-(h+f),e]),u.push(s.shift()),u=[s.pop()];s.length;)c.push([s.shift()]);p=i.slice(n.length-(u[0]?u[0].length:0)).reduce(function(B,L){return B+L},0)}else u=[n];c.push(u),h=p+A,f=m}else u.push(n),h+=f+p,f=m}return l=A?function(B,L){return(L?g:"")+B.join(" ")}:function(B){return B.join(" ")},c.map(l)},mf.splitTextToSize=function(r,e,t){var n,i=(t=t||{}).fontSize||this.internal.getFontSize(),a=function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var c=this.internal.getFont(u.fontName,u.fontStyle);return c.metadata.Unicode?{widths:c.metadata.Unicode.widths||{0:1},kerning:c.metadata.Unicode.kerning||{}}:{font:c.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,t);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/i;a.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=t.lineIndent;var s,A,l=[];for(s=0,A=n.length;s<A;s++)l=l.concat(RN.apply(this,[n[s],o,a]));return l},function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",t={},n={},i=0;i<e.length;i++)t[e[i]]="0123456789abcdef"[i],n["0123456789abcdef"[i]]=e[i];var a=function(c){return"0x"+parseInt(c,10).toString(16)},o=r.__fontmetrics__.compress=function(c){var h,f,p,v,m=["{"];for(var g in c){if(h=c[g],isNaN(parseInt(g,10))?f="'"+g+"'":(g=parseInt(g,10),f=(f=a(g).slice(2)).slice(0,-1)+n[f.slice(-1)]),typeof h=="number")h<0?(p=a(h).slice(3),v="-"):(p=a(h).slice(2),v=""),p=v+p.slice(0,-1)+n[p.slice(-1)];else{if(rn(h)!=="object")throw new Error("Don't know what to do with value type "+rn(h)+".");p=o(h)}m.push(f+p)}return m.push("}"),m.join("")},s=r.__fontmetrics__.uncompress=function(c){if(typeof c!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,f,p,v,m={},g=1,_=m,E=[],B="",L="",O=c.length-1,b=1;b<O;b+=1)(v=c[b])=="'"?h?(p=h.join(""),h=void 0):h=[]:h?h.push(v):v=="{"?(E.push([_,p]),_={},p=void 0):v=="}"?((f=E.pop())[0][f[1]]=_,p=void 0,_=f[0]):v=="-"?g=-1:p===void 0?t.hasOwnProperty(v)?(B+=t[v],p=parseInt(B,16)*g,g=1,B=""):B+=v:t.hasOwnProperty(v)?(L+=t[v],_[p]=parseInt(L,16)*g,g=1,p=void 0,L=""):L+=v;return m},A={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},l={Unicode:{Courier:A,"Courier-Bold":A,"Courier-BoldOblique":A,"Courier-Oblique":A,Helvetica:A,"Helvetica-Bold":A,"Helvetica-BoldOblique":A,"Helvetica-Oblique":A,"Times-Roman":A,"Times-Bold":A,"Times-BoldItalic":A,"Times-Italic":A}},u={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":s("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(c){var h=c.font,f=u.Unicode[h.postScriptName];f&&(h.metadata.Unicode={},h.metadata.Unicode.widths=f.widths,h.metadata.Unicode.kerning=f.kerning);var p=l.Unicode[h.postScriptName];p&&(h.metadata.Unicode.encoding=p,h.encoding=p.codePages[0])}])}(De.API),function(r){var e=function(t){for(var n=t.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=t.charCodeAt(a);return i};r.API.events.push(["addFont",function(t){var n=void 0,i=t.font,a=t.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(n=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(jv(s)),o.metadata=r.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,n)}}])}(De),function(r){function e(){return(Ge.canvg?Promise.resolve(Ge.canvg):Promise.resolve().then(function(){return NOt})).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}De.API.addSvgAsImage=function(t,n,i,a,o,s,A,l){if(isNaN(n)||isNaN(i))throw cn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(o))throw cn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=a,u.height=o;var c=u.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,u.width,u.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return e().then(function(p){return p.fromString(c,t,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(h)}).then(function(){f.addImage(u.toDataURL("image/jpeg",1),n,i,a,o,A,l)})}}(),De.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,t);return this},De.API.viewerPreferences=function(r,e){var t;r=r||{},e=e||!1;var n,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),A=[],l=0,u=0,c=0;function h(p,v){var m,g=!1;for(m=0;m<p.length;m+=1)p[m]===v&&(g=!0);return g}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,r==="reset"||e===!0){var f=s.length;for(c=0;c<f;c+=1)t[s[c]].value=t[s[c]].defaultValue,t[s[c]].explicitSet=!1}if(rn(r)==="object"){for(i in r)if(a=r[i],h(s,i)&&a!==void 0){if(t[i].type==="boolean"&&typeof a=="boolean")t[i].value=a;else if(t[i].type==="name"&&h(t[i].valueSet,a))t[i].value=a;else if(t[i].type==="integer"&&Number.isInteger(a))t[i].value=a;else if(t[i].type==="array"){for(l=0;l<a.length;l+=1)if(n=!0,a[l].length===1&&typeof a[l][0]=="number")A.push(String(a[l]-1));else if(a[l].length>1){for(u=0;u<a[l].length;u+=1)typeof a[l][u]!="number"&&(n=!1);n===!0&&A.push([a[l][0]-1,a[l][1]-1].join(" "))}t[i].value="["+A.join(" ")+"]"}else t[i].value=t[i].defaultValue;t[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,v=[];for(p in t)t[p].explicitSet===!0&&(t[p].type==="name"?v.push("/"+p+" /"+t[p].value):v.push("/"+p+" "+t[p].value));v.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+v.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},function(r){var e=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',i=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),a=unescape(encodeURIComponent(n)),o=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),s=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),A=unescape(encodeURIComponent("</x:xmpmeta>")),l=a.length+o.length+s.length+i.length+A.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+l+" >>"),this.internal.write("stream"),this.internal.write(i+a+o+s+A),this.internal.write("endstream"),this.internal.write("endobj")},t=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(n,i){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:i||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",t),this.internal.events.subscribe("postPutResources",e)),this}}(De.API),function(r){var e=r.API,t=e.pdfEscape16=function(a,o){for(var s,A=o.metadata.Unicode.widths,l=["","0","00","000","0000"],u=[""],c=0,h=a.length;c<h;++c){if(s=o.metadata.characterToGlyph(a.charCodeAt(c)),o.metadata.glyIdsUsed.push(s),o.metadata.toUnicode[s]=a.charCodeAt(c),A.indexOf(s)==-1&&(A.push(s),A.push([parseInt(o.metadata.widthOfGlyph(s),10)])),s=="0")return u.join("");s=s.toString(16),u.push(l[4-s.length],s)}return u.join("")},n=function(a){var o,s,A,l,u,c,h;for(u=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,A=[],c=0,h=(s=Object.keys(a).sort(function(f,p){return f-p})).length;c<h;c++)o=s[c],A.length>=100&&(u+=`
`+A.length+` beginbfchar
`+A.join(`
`)+`
endbfchar`,A=[]),a[o]!==void 0&&a[o]!==null&&typeof a[o].toString=="function"&&(l=("0000"+a[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),A.push("<"+o+"><"+l+">"));return A.length&&(u+=`
`+A.length+` beginbfchar
`+A.join(`
`)+`
endbfchar
`),u+=`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};e.events.push(["putFont",function(a){(function(o){var s=o.font,A=o.out,l=o.newObject,u=o.putStream;if(s.metadata instanceof r.API.TTFFont&&s.encoding==="Identity-H"){for(var c=s.metadata.Unicode.widths,h=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),f="",p=0;p<h.length;p++)f+=String.fromCharCode(h[p]);var v=l();u({data:f,addLength1:!0,objectId:v}),A("endobj");var m=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:m}),A("endobj");var g=l();A("<<"),A("/Type /FontDescriptor"),A("/FontName /"+Gf(s.fontName)),A("/FontFile2 "+v+" 0 R"),A("/FontBBox "+r.API.PDFObject.convert(s.metadata.bbox)),A("/Flags "+s.metadata.flags),A("/StemV "+s.metadata.stemV),A("/ItalicAngle "+s.metadata.italicAngle),A("/Ascent "+s.metadata.ascender),A("/Descent "+s.metadata.decender),A("/CapHeight "+s.metadata.capHeight),A(">>"),A("endobj");var _=l();A("<<"),A("/Type /Font"),A("/BaseFont /"+Gf(s.fontName)),A("/FontDescriptor "+g+" 0 R"),A("/W "+r.API.PDFObject.convert(c)),A("/CIDToGIDMap /Identity"),A("/DW 1000"),A("/Subtype /CIDFontType2"),A("/CIDSystemInfo"),A("<<"),A("/Supplement 0"),A("/Registry (Adobe)"),A("/Ordering ("+s.encoding+")"),A(">>"),A(">>"),A("endobj"),s.objectNumber=l(),A("<<"),A("/Type /Font"),A("/Subtype /Type0"),A("/ToUnicode "+m+" 0 R"),A("/BaseFont /"+Gf(s.fontName)),A("/Encoding /"+s.encoding),A("/DescendantFonts ["+_+" 0 R]"),A(">>"),A("endobj"),s.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(o){var s=o.font,A=o.out,l=o.newObject,u=o.putStream;if(s.metadata instanceof r.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var c=s.metadata.rawData,h="",f=0;f<c.length;f++)h+=String.fromCharCode(c[f]);var p=l();u({data:h,addLength1:!0,objectId:p}),A("endobj");var v=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:v}),A("endobj");var m=l();A("<<"),A("/Descent "+s.metadata.decender),A("/CapHeight "+s.metadata.capHeight),A("/StemV "+s.metadata.stemV),A("/Type /FontDescriptor"),A("/FontFile2 "+p+" 0 R"),A("/Flags 96"),A("/FontBBox "+r.API.PDFObject.convert(s.metadata.bbox)),A("/FontName /"+Gf(s.fontName)),A("/ItalicAngle "+s.metadata.italicAngle),A("/Ascent "+s.metadata.ascender),A(">>"),A("endobj"),s.objectNumber=l();for(var g=0;g<s.metadata.hmtx.widths.length;g++)s.metadata.hmtx.widths[g]=parseInt(s.metadata.hmtx.widths[g]*(1e3/s.metadata.head.unitsPerEm));A("<</Subtype/TrueType/Type/Font/ToUnicode "+v+" 0 R/BaseFont/"+Gf(s.fontName)+"/FontDescriptor "+m+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),A("endobj"),s.isAlreadyPutted=!0}})(a)}]);var i=function(a){var o,s=a.text||"",A=a.x,l=a.y,u=a.options||{},c=a.mutex||{},h=c.pdfEscape,f=c.activeFontKey,p=c.fonts,v=f,m="",g=0,_="",E=p[v].encoding;if(p[v].encoding!=="Identity-H")return{text:s,x:A,y:l,options:u,mutex:c};for(_=s,v=f,Array.isArray(s)&&(_=s[0]),g=0;g<_.length;g+=1)p[v].metadata.hasOwnProperty("cmap")&&(o=p[v].metadata.cmap.unicode.codeMap[_[g].charCodeAt(0)]),o||_[g].charCodeAt(0)<256&&p[v].metadata.hasOwnProperty("Unicode")?m+=_[g]:m+="";var B="";return parseInt(v.slice(1))<14||E==="WinAnsiEncoding"?B=h(m,v).split("").map(function(L){return L.charCodeAt(0).toString(16)}).join(""):E==="Identity-H"&&(B=t(m,p[v])),c.isHex=!0,{text:B,x:A,y:l,options:u,mutex:c}};e.events.push(["postProcessText",function(a){var o=a.text||"",s=[],A={text:o,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(o)){var l=0;for(l=0;l<o.length;l+=1)Array.isArray(o[l])&&o[l].length===3?s.push([i(Object.assign({},A,{text:o[l][0]})).text,o[l][1],o[l][2]]):s.push(i(Object.assign({},A,{text:o[l]})).text);a.text=s}else a.text=i(Object.assign({},A,{text:o})).text}])}(De),function(r){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},r.addFileToVFS=function(t,n){return e.call(this),this.internal.vFS[t]=n,this},r.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(De.API),function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var i,a,o,s,A,l,u,c=e,h=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},m=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","","","","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),_=!1,E=0;this.__bidiEngine__={};var B=function(S){var x=S.charCodeAt(),N=x>>8,P=v[N];return P!==void 0?c[256*P+(255&x)]:N===252||N===253?"AL":g.test(N)?"L":N===8?"R":"N"},L=function(S){for(var x,N=0;N<S.length;N++){if((x=B(S.charAt(N)))==="L")return!1;if(x==="R")return!0}return!1},O=function(S,x,N,P){var Y,z,tt,J,nt=x[P];switch(nt){case"L":case"R":_=!1;break;case"N":case"AN":break;case"EN":_&&(nt="AN");break;case"AL":_=!0,nt="R";break;case"WS":nt="N";break;case"CS":P<1||P+1>=x.length||(Y=N[P-1])!=="EN"&&Y!=="AN"||(z=x[P+1])!=="EN"&&z!=="AN"?nt="N":_&&(z="AN"),nt=z===Y?z:"N";break;case"ES":nt=(Y=P>0?N[P-1]:"B")==="EN"&&P+1<x.length&&x[P+1]==="EN"?"EN":"N";break;case"ET":if(P>0&&N[P-1]==="EN"){nt="EN";break}if(_){nt="N";break}for(tt=P+1,J=x.length;tt<J&&x[tt]==="ET";)tt++;nt=tt<J&&x[tt]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(J=x.length,tt=P+1;tt<J&&x[tt]==="NSM";)tt++;if(tt<J){var it=S[P],_t=it>=1425&&it<=2303||it===64286;if(Y=x[tt],_t&&(Y==="R"||Y==="AL")){nt="R";break}}}nt=P<1||(Y=x[P-1])==="B"?"N":N[P-1];break;case"B":_=!1,i=!0,nt=E;break;case"S":a=!0,nt="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":_=!1;break;case"BN":nt="N"}return nt},b=function(S,x,N){var P=S.split("");return N&&T(P,N,{hiLevel:E}),P.reverse(),x&&x.reverse(),P.join("")},T=function(S,x,N){var P,Y,z,tt,J,nt=-1,it=S.length,_t=0,R=[],$=E?f:h,K=[];for(_=!1,i=!1,a=!1,Y=0;Y<it;Y++)K[Y]=B(S[Y]);for(z=0;z<it;z++){if(J=_t,R[z]=O(S,K,R,z),P=240&(_t=$[J][p[R[z]]]),_t&=15,x[z]=tt=$[_t][5],P>0)if(P===16){for(Y=nt;Y<z;Y++)x[Y]=1;nt=-1}else nt=-1;if($[_t][6])nt===-1&&(nt=z);else if(nt>-1){for(Y=nt;Y<z;Y++)x[Y]=tt;nt=-1}K[z]==="B"&&(x[z]=0),N.hiLevel|=tt}a&&function(q,at,vt){for(var wt=0;wt<vt;wt++)if(q[wt]==="S"){at[wt]=E;for(var W=wt-1;W>=0&&q[W]==="WS";W--)at[W]=E}}(K,x,it)},F=function(S,x,N,P,Y){if(!(Y.hiLevel<S)){if(S===1&&E===1&&!i)return x.reverse(),void(N&&N.reverse());for(var z,tt,J,nt,it=x.length,_t=0;_t<it;){if(P[_t]>=S){for(J=_t+1;J<it&&P[J]>=S;)J++;for(nt=_t,tt=J-1;nt<tt;nt++,tt--)z=x[nt],x[nt]=x[tt],x[tt]=z,N&&(z=N[nt],N[nt]=N[tt],N[tt]=z);_t=J}_t++}}},M=function(S,x,N){var P=S.split(""),Y={hiLevel:E};return N||(N=[]),T(P,N,Y),function(z,tt,J){if(J.hiLevel!==0&&u)for(var nt,it=0;it<z.length;it++)tt[it]===1&&(nt=m.indexOf(z[it]))>=0&&(z[it]=m[nt+1])}(P,N,Y),F(2,P,x,N,Y),F(1,P,x,N,Y),P.join("")};return this.__bidiEngine__.doBidiReorder=function(S,x,N){if(function(Y,z){if(z)for(var tt=0;tt<Y.length;tt++)z[tt]=tt;s===void 0&&(s=L(Y)),l===void 0&&(l=L(Y))}(S,x),o||!A||l)if(o&&A&&s^l)E=s?1:0,S=b(S,x,N);else if(!o&&A&&l)E=s?1:0,S=M(S,x,N),S=b(S,x);else if(!o||s||A||l){if(o&&!A&&s^l)S=b(S,x),s?(E=0,S=M(S,x,N)):(E=1,S=M(S,x,N),S=b(S,x));else if(o&&s&&!A&&l)E=1,S=M(S,x,N),S=b(S,x);else if(!o&&!A&&s^l){var P=u;s?(E=1,S=M(S,x,N),E=0,u=!1,S=M(S,x,N),u=P):(E=0,S=M(S,x,N),S=b(S,x),E=1,u=!1,S=M(S,x,N),u=P,S=b(S,x))}}else E=0,S=M(S,x,N);else E=s?1:0,S=M(S,x,N);return S},this.__bidiEngine__.setOptions=function(S){S&&(o=S.isInputVisual,A=S.isOutputVisual,s=S.isInputRtl,l=S.isOutputRtl,u=S.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(n){var i=n.text,a=(n.x,n.y,n.options||{}),o=(n.mutex,a.lang,[]);if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,t.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var s=0;for(o=[],s=0;s<i.length;s+=1)Object.prototype.toString.call(i[s])==="[object Array]"?o.push([t.doBidiReorder(i[s][0]),i[s][1],i[s][2]]):o.push([t.doBidiReorder(i[s])]);n.text=o}else n.text=t.doBidiReorder(i);t.setOptions({isInputVisual:!0})}])}(De),De.API.TTFFont=function(){function r(e){var t;if(this.rawData=e,t=this.contents=new Yu(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new JAt(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new QAt(this.contents),this.head=new GAt(this),this.name=new KAt(this),this.cmap=new $8(this),this.toUnicode={},this.hhea=new kAt(this),this.maxp=new zAt(this),this.hmtx=new XAt(this),this.post=new jAt(this),this.os2=new $At(this),this.loca=new ZAt(this),this.glyf=new YAt(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var e,t,n,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var o,s,A,l;for(l=[],o=0,s=(A=this.bbox).length;o<s;o++)e=A[o],l.push(Math.round(e*this.scaleFactor));return l}.call(this),this.stemV=0,this.post.exists?(n=255&(i=this.post.italic_angle),32768&(t=i>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},r.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},r.prototype.widthOfString=function(e,t,n){var i,a,o,s;for(o=0,a=0,s=(e=""+e).length;0<=s?a<s:a>s;a=0<=s?++a:--a)i=e.charCodeAt(a),o+=this.widthOfGlyph(this.characterToGlyph(i))+n*(1e3/t)||0;return o*(t/1e3)},r.prototype.lineHeight=function(e,t){var n;return t==null&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},r}();var Ds,Yu=function(){function r(e){this.data=e??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(e){return this.data[this.pos++]=e},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},r.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},r.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},r.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},r.prototype.writeString=function(e){var t,n,i;for(i=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)i.push(this.writeByte(e.charCodeAt(t)));return i},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(e){return this.writeInt16(e)},r.prototype.readLongLong=function(){var e,t,n,i,a,o,s,A;return e=this.readByte(),t=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),A=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^i)+16777216*(255^a)+65536*(255^o)+256*(255^s)+(255^A)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*i+16777216*a+65536*o+256*s+A},r.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(e){return this.writeInt32(e)},r.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},r.prototype.write=function(e){var t,n,i,a;for(a=[],n=0,i=e.length;n<i;n++)t=e[n],a.push(this.writeByte(t));return a},r}(),QAt=function(){var r;function e(t){var n,i,a;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return e.prototype.encode=function(t){var n,i,a,o,s,A,l,u,c,h,f,p,v;for(v in f=Object.keys(t).length,A=Math.log(2),c=16*Math.floor(Math.log(f)/A),o=Math.floor(c/A),u=16*f-c,(i=new Yu).writeInt(this.scalarType),i.writeShort(f),i.writeShort(c),i.writeShort(o),i.writeShort(u),a=16*f,l=i.pos+a,s=null,p=[],t)for(h=t[v],i.writeString(v),i.writeInt(r(h)),i.writeInt(l),i.writeInt(h.length),p=p.concat(h),v==="head"&&(s=l),l+=h.length;l%4;)p.push(0),l++;return i.write(p),n=2981146554-r(i.data),i.pos=s+8,i.writeUInt32(n),i.data},r=function(t){var n,i,a,o;for(t=j8.call(t);t.length%4;)t.push(0);for(a=new Yu(t),i=0,n=0,o=t.length;n<o;n=n+=4)i+=a.readUInt32();return 4294967295&i},e}(),HAt={}.hasOwnProperty,vA=function(r,e){for(var t in e)HAt.call(e,t)&&(r[t]=e[t]);function n(){this.constructor=r}return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r};Ds=function(){function r(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r}();var GAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var n;return(n=new Yu).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},e}(),PN=function(){function r(e,t){var n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),c=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(A=0;A<256;++A)this.codeMap[A]=e.readByte();break;case 4:for(f=e.readUInt16(),h=f/2,e.pos+=6,a=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),e.pos+=2,v=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),l=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),u=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),i=(this.length-e.pos+this.offset)/2,s=function(){var B,L;for(L=[],A=B=0;0<=i?B<i:B>i;A=0<=i?++B:--B)L.push(e.readUInt16());return L}(),A=g=0,E=a.length;g<E;A=++g)for(m=a[A],n=_=p=v[A];p<=m?_<=m:_>=m;n=p<=m?++_:--_)u[A]===0?o=n+l[A]:(o=s[u[A]/2+(n-p)-(h-A)]||0)!==0&&(o+=l[A]),this.codeMap[n]=65535&o}e.pos=c}return r.encode=function(e,t){var n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,O,b,T,F,M,S,x,N,P,Y,z,tt,J,nt,it,_t,R,$,K,q,at,vt,wt,W,Ft,Ot,V;switch(P=new Yu,o=Object.keys(e).sort(function(Z,ut){return Z-ut}),t){case"macroman":for(v=0,m=function(){var Z=[];for(p=0;p<256;++p)Z.push(0);return Z}(),_={0:0},a={},Y=0,nt=o.length;Y<nt;Y++)_[W=e[i=o[Y]]]==null&&(_[W]=++v),a[i]={old:e[i],new:_[e[i]]},m[i]=_[e[i]];return P.writeUInt16(1),P.writeUInt16(0),P.writeUInt32(12),P.writeUInt16(0),P.writeUInt16(262),P.writeUInt16(0),P.write(m),{charMap:a,subtable:P.data,maxGlyphID:v+1};case"unicode":for(x=[],c=[],E=0,_={},n={},g=l=null,z=0,it=o.length;z<it;z++)_[L=e[i=o[z]]]==null&&(_[L]=++E),n[i]={old:L,new:_[L]},s=_[L]-i,g!=null&&s===l||(g&&c.push(g),x.push(i),l=s),g=i;for(g&&c.push(g),c.push(65535),x.push(65535),M=2*(F=x.length),T=2*Math.pow(Math.log(F)/Math.LN2,2),h=Math.log(T/2)/Math.LN2,b=2*F-T,A=[],O=[],f=[],p=tt=0,_t=x.length;tt<_t;p=++tt){if(S=x[p],u=c[p],S===65535){A.push(0),O.push(0);break}if(S-(N=n[S].new)>=32768)for(A.push(0),O.push(2*(f.length+F-p)),i=J=S;S<=u?J<=u:J>=u;i=S<=u?++J:--J)f.push(n[i].new);else A.push(N-S),O.push(0)}for(P.writeUInt16(3),P.writeUInt16(1),P.writeUInt32(12),P.writeUInt16(4),P.writeUInt16(16+8*F+2*f.length),P.writeUInt16(0),P.writeUInt16(M),P.writeUInt16(T),P.writeUInt16(h),P.writeUInt16(b),vt=0,R=c.length;vt<R;vt++)i=c[vt],P.writeUInt16(i);for(P.writeUInt16(0),wt=0,$=x.length;wt<$;wt++)i=x[wt],P.writeUInt16(i);for(Ft=0,K=A.length;Ft<K;Ft++)s=A[Ft],P.writeUInt16(s);for(Ot=0,q=O.length;Ot<q;Ot++)B=O[Ot],P.writeUInt16(B);for(V=0,at=f.length;V<at;V++)v=f[V],P.writeUInt16(v);return{charMap:n,subtable:P.data,maxGlyphID:E+1}}},r}(),$8=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="cmap",e.prototype.parse=function(t){var n,i,a;for(t.pos=this.offset,this.version=t.readUInt16(),a=t.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=a?i<a:i>a;i=0<=a?++i:--i)n=new PN(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(t,n){var i,a;return n==null&&(n="macroman"),i=PN.encode(t,n),(a=new Yu).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},e}(),kAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e}(),$At=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,i;for(i=[],n=0;n<10;++n)i.push(t.readByte());return i}(),this.charRange=function(){var n,i;for(i=[],n=0;n<4;++n)i.push(t.readInt());return i}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(t.readInt());return i}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e}(),jAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="post",e.prototype.parse=function(t){var n,i,a;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:break;case 131072:var o;for(i=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=i?o<i:o>i;o=0<=i?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],a=[];t.pos<this.offset+this.length;)n=t.readByte(),a.push(this.names.push(t.readString(n)));return a;case 151552:return i=t.readUInt16(),this.offsets=t.read(i);case 196608:break;case 262144:return this.map=function(){var s,A,l;for(l=[],o=s=0,A=this.file.maxp.numGlyphs;0<=A?s<A:s>A;o=0<=A?++s:--s)l.push(t.readUInt32());return l}.call(this)}},e}(),VAt=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},KAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="name",e.prototype.parse=function(t){var n,i,a,o,s,A,l,u,c,h,f;for(t.pos=this.offset,t.readShort(),n=t.readShort(),A=t.readShort(),i=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)i.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+A+t.readShort()});for(l={},o=c=0,h=i.length;c<h;o=++c)a=i[o],t.pos=a.offset,u=t.readString(a.length),s=new VAt(u,a),l[f=a.nameID]==null&&(l[f]=[]),l[a.nameID].push(s);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},e}(),zAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e}(),XAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="hmtx",e.prototype.parse=function(t){var n,i,a,o,s,A,l;for(t.pos=this.offset,this.metrics=[],n=0,A=this.file.hhea.numberOfMetrics;0<=A?n<A:n>A;n=0<=A?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var u,c;for(c=[],n=u=0;0<=a?u<a:u>a;n=0<=a?++u:--u)c.push(t.readInt16());return c}(),this.widths=function(){var u,c,h,f;for(f=[],u=0,c=(h=this.metrics).length;u<c;u++)o=h[u],f.push(o.advance);return f}.call(this),i=this.widths[this.widths.length-1],l=[],n=s=0;0<=a?s<a:s>a;n=0<=a?++s:--s)l.push(this.widths.push(i));return l},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e}(),j8=[].slice,YAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var n,i,a,o,s,A,l,u,c,h;return t in this.cache?this.cache[t]:(o=this.file.loca,n=this.file.contents,i=o.indexOf(t),(a=o.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+i,s=(A=new Yu(n.read(a))).readShort(),u=A.readShort(),h=A.readShort(),l=A.readShort(),c=A.readShort(),this.cache[t]=s===-1?new qAt(A,u,h,l,c):new WAt(A,s,u,h,l,c),this.cache[t]))},e.prototype.encode=function(t,n,i){var a,o,s,A,l;for(s=[],o=[],A=0,l=n.length;A<l;A++)a=t[n[A]],o.push(s.length),a&&(s=s.concat(a.encode(i)));return o.push(s.length),{table:s,offsets:o}},e}(),WAt=function(){function r(e,t,n,i,a,o){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=i,this.xMax=a,this.yMax=o,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r}(),qAt=function(){function r(e,t,n,i,a){var o,s;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return r.prototype.encode=function(){var e,t,n;for(t=new Yu(j8.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},r}(),ZAt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return vA(e,Ds),e.prototype.tag="loca",e.prototype.parse=function(t){var n,i;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=2)o.push(2*t.readUInt16());return o}.call(this):function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=4)o.push(t.readUInt32());return o}.call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,n){for(var i=new Uint32Array(this.offsets.length),a=0,o=0,s=0;s<i.length;++s)if(i[s]=a,o<n.length&&n[o]==s){++o,i[s]=a;var A=this.offsets[s],l=this.offsets[s+1]-A;l>0&&(a+=l)}for(var u=new Array(4*i.length),c=0;c<i.length;++c)u[4*c+3]=255&i[c],u[4*c+2]=(65280&i[c])>>8,u[4*c+1]=(16711680&i[c])>>16,u[4*c]=(4278190080&i[c])>>24;return u},e}(),JAt=function(){function r(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var e,t,n,i,a;for(t in i=this.font.cmap.tables[0].codeMap,e={},a=this.subset)n=a[t],e[t]=i[n];return e},r.prototype.glyphsFor=function(e){var t,n,i,a,o,s,A;for(i={},o=0,s=e.length;o<s;o++)i[a=e[o]]=this.font.glyf.glyphFor(a);for(a in t=[],i)(n=i[a])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(a in A=this.glyphsFor(t))n=A[a],i[a]=n;return i},r.prototype.encode=function(e,t){var n,i,a,o,s,A,l,u,c,h,f,p,v,m,g;for(i in n=$8.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),f={0:0},g=n.charMap)f[(A=g[i]).old]=A.new;for(p in h=n.maxGlyphID,o)p in f||(f[p]=h++);return u=function(_){var E,B;for(E in B={},_)B[_[E]]=E;return B}(f),c=Object.keys(u).sort(function(_,E){return _-E}),v=function(){var _,E,B;for(B=[],_=0,E=c.length;_<E;_++)s=c[_],B.push(u[s]);return B}(),a=this.font.glyf.encode(o,v,f),l=this.font.loca.encode(a.offsets,v),m={cmap:this.font.cmap.raw(),glyf:a.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(m["OS/2"]=this.font.os2.raw()),this.font.directory.encode(m)},r}();De.API.PDFObject=function(){var r;function e(){}return r=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},e.convert=function(t){var n,i,a,o;if(Array.isArray(t))return"["+function(){var s,A,l;for(l=[],s=0,A=t.length;s<A;s++)n=t[s],l.push(e.convert(n));return l}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+r(t.getUTCFullYear(),4)+r(t.getUTCMonth(),2)+r(t.getUTCDate(),2)+r(t.getUTCHours(),2)+r(t.getUTCMinutes(),2)+r(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(i in a=["<<"],t)o=t[i],a.push("/"+i+" "+e.convert(o));return a.push(">>"),a.join(`
`)}return""+t},e}();const tlt={name:"ol-control-printdialog",setup(r,e){const{control:t}=Hi(In,r,e);return t.value.on(["print","error"],function(n){if(n.image)if(n.pdf){var i=new De({orientation:n.print.orientation,unit:n.print.unit,format:n.print.size});i.addImage(n.image,"JPEG",n.print.position[0],n.print.position[0],n.print.imageWidth,n.print.imageHeight),i.save(n.print.legend?"legend.pdf":"map.pdf")}else n.canvas.toBlob(function(a){var o=(n.print.legend?"legend.":"map.")+n.imageType.replace("image/","");HI.exports.saveAs(a,o)},n.imageType,n.quality);else console.warn("No canvas to export")}),{control:t}},props:{lang:{type:String}}};function elt(r,e,t,n,i,a){return vr("",!0)}var oS=ue(tlt,[["render",elt]]),Uh=function(r){r||(r={});var e=ct.create("DIV",{className:(r.className||"ol-videorec")+" ol-unselectable ol-control"});ct.create("BUTTON",{type:"button",className:"ol-start",title:"start",click:function(){this.start()}.bind(this),parent:e}),ct.create("BUTTON",{type:"button",className:"ol-stop",title:"stop",click:function(){this.stop()}.bind(this),parent:e}),ct.create("BUTTON",{type:"button",className:"ol-pause",title:"pause",click:function(){this.pause()}.bind(this),parent:e}),ct.create("BUTTON",{type:"button",className:"ol-resume",title:"resume",click:function(){this.resume()}.bind(this),parent:e}),wr.call(this,{element:e,target:r.target}),this.set("framerate",30),this.set("videoBitsPerSecond",5e6),r.videoTarget==="DIALOG"?(this._dialog=new La({className:"ol-fullscreen-dialog",target:document.body,closeBox:!0}),this._videoTarget=this._dialog.getContentElement()):this._videoTarget=r.videoTarget,this._printCtrl=new nc({target:ct.create("DIV")})};Br(Uh,wr);Uh.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._printCtrl),this._dialog&&this.getMap().removeControl(this._dialog)),wr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._printCtrl),this._dialog&&this.getMap().addControl(this._dialog))};Uh.prototype.start=function(){var r=this._printCtrl,e=!1;function t(n){e||r.fastPrint({canvas:n},t)}r.fastPrint({},function(n){var i;try{i=n.captureStream(this.get("framerate")||30)}catch(o){this.dispatchEvent({type:"error",error:o});return}this._mediaRecorder=new MediaRecorder(i,{videoBitsPerSecond:this.get("videoBitsPerSecond")||5e6});var a=[];this._mediaRecorder.ondataavailable=function(o){a.push(o.data)},this._mediaRecorder.onstop=function(){e=!0;var o=new Blob(a,{type:"video/mp4"});if(a=[],this._videoTarget instanceof Element){var s;this._videoTarget.tagName==="VIDEO"?s=this._videoTarget:(s=this._videoTarget.querySelector("video"),s||(s=ct.create("VIDEO",{controls:"",parent:this._videoTarget}))),this._dialog&&this._dialog.show(),s.src=URL.createObjectURL(o),this.dispatchEvent({type:"stop",videoURL:s.src})}else this.dispatchEvent({type:"stop",videoURL:URL.createObjectURL(o)})}.bind(this),this._mediaRecorder.onpause=function(){e=!0,this.dispatchEvent({type:"pause"})}.bind(this),this._mediaRecorder.onresume=function(){e=!1,t(n),this.dispatchEvent({type:"resume"})}.bind(this),this._mediaRecorder.onerror=function(o){this.dispatchEvent({type:"error",error:o})}.bind(this),e=!1,t(n),this._mediaRecorder.start(),this.dispatchEvent({type:"start",canvas:n}),this.element.setAttribute("data-state","rec")}.bind(this))};Uh.prototype.stop=function(){this._mediaRecorder&&(this._mediaRecorder.stop(),this._mediaRecorder=null,this.element.setAttribute("data-state","inactive"))};Uh.prototype.pause=function(){this._mediaRecorder&&(this._mediaRecorder.pause(),this.element.setAttribute("data-state","pause"))};Uh.prototype.resume=function(){this._mediaRecorder&&(this._mediaRecorder.resume(),this.element.setAttribute("data-state","rec"))};const rlt={name:"ol-control-videorecorder",emits:["start","stop"],setup(r,e){const{control:t}=Hi(Uh,r,e),{downloadName:n}=Nu(r);return t.value.on("start",i=>{e.emit("start",i)}),t.value.on("stop",i=>{e.emit("stop",i),HI.exports.saveAs(i.videoURL,n.value)}),{control:t}},props:{className:{type:String},framerate:{type:Number,default:30},videoBitsPerSecond:{type:Number,default:5e6},videoTarget:{type:String},downloadName:{type:String,default:"mapVideo.mp4"}}};function nlt(r,e,t,n,i,a){return vr("",!0)}var sS=ue(rlt,[["render",nlt]]),wu={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},ilt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),alt={image:[lr.POLYGON,lr.CIRCLE,lr.LINE_STRING,lr.IMAGE,lr.TEXT],hybrid:[lr.POLYGON,lr.LINE_STRING],vector:[]},olt={hybrid:[lr.IMAGE,lr.TEXT,lr.DEFAULT],vector:[lr.POLYGON,lr.CIRCLE,lr.LINE_STRING,lr.IMAGE,lr.TEXT,lr.DEFAULT]},slt=function(r){ilt(e,r);function e(t){var n=r.call(this,t)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.dirty_=!1,n.renderedLayerRevision_,n.renderedPixelToCoordinateTransform_=null,n.renderedRotation_,n.tmpTransform_=si(),n}return e.prototype.prepareTile=function(t,n,i){var a,o=t.getState();return(o===ye.LOADED||o===ye.ERROR)&&(this.updateExecutorGroup_(t,n,i),this.tileImageNeedsRender_(t)&&(a=!0)),a},e.prototype.getTile=function(t,n,i,a){var o=a.pixelRatio,s=a.viewState,A=s.resolution,l=s.projection,u=this.getLayer(),c=u.getSource().getTile(t,n,i,o,l),h=a.viewHints,f=!(h[mn.ANIMATING]||h[mn.INTERACTING]);(f||!c.wantedResolution)&&(c.wantedResolution=A);var p=this.prepareTile(c,o,l);return p&&(f||Date.now()-a.time<8)&&u.getRenderMode()!==wu.VECTOR&&this.renderTileImage_(c,a),r.prototype.getTile.call(this,t,n,i,a)},e.prototype.isDrawableTile=function(t){var n=this.getLayer();return r.prototype.isDrawableTile.call(this,t)&&(n.getRenderMode()===wu.VECTOR?de(n)in t.executorGroups:t.hasContext(n))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(t){var n=this.getLayer().getRevision();return this.renderedLayerRevision_!=n&&(this.renderedTiles.length=0),this.renderedLayerRevision_=n,r.prototype.prepareFrame.call(this,t)},e.prototype.updateExecutorGroup_=function(t,n,i){var a=this.getLayer(),o=a.getRevision(),s=a.getRenderOrder()||null,A=t.wantedResolution,l=t.getReplayState(a);if(!(!l.dirty&&l.renderedResolution===A&&l.renderedRevision==o&&l.renderedRenderOrder==s)){var u=a.getSource(),c=a.getDeclutter(),h=u.getTileGrid(),f=u.getTileGridForProjection(i),p=f.getTileCoordExtent(t.wrappedTileCoord),v=u.getSourceTiles(n,i,t),m=de(a);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],c&&(t.declutterExecutorGroups[m]=[]);for(var g=function(L,O){var b=v[L];if(b.getState()!=ye.LOADED)return"continue";var T=b.tileCoord,F=h.getTileCoordExtent(T),M=es(p,F),S=Ka(M,a.getRenderBuffer()*A,_.tmpExtent),x=cA(F,M)?null:S;l.dirty=!1;var N=new U_(0,S,A,n),P=c?new U_(0,M,A,n):void 0,Y=A4(A,n),z=function(q){var at,vt=q.getStyleFunction()||a.getStyleFunction();if(vt&&(at=vt(q,A)),at){var wt=this.renderFeature(q,Y,at,N,P);this.dirty_=this.dirty_||wt,l.dirty=l.dirty||wt}},tt=b.getFeatures();s&&s!==l.renderedRenderOrder&&tt.sort(s);for(var J=0,nt=tt.length;J<nt;++J){var it=tt[J];(!x||Nn(x,it.getGeometry().getExtent()))&&z.call(_,it)}var _t=N.finish(),R=a.getRenderMode()!==wu.VECTOR&&c&&v.length===1?null:M,$=new D_(R,A,n,u.getOverlaps(),_t,a.getRenderBuffer());if(t.executorGroups[m].push($),P){var K=new D_(null,A,n,u.getOverlaps(),P.finish(),a.getRenderBuffer());t.declutterExecutorGroups[m].push(K)}},_=this,E=0,B=v.length;E<B;++E)g(E);l.renderedRevision=o,l.renderedRenderOrder=s,l.renderedResolution=A}},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){var s=n.viewState.resolution,A=n.viewState.rotation;i=i??0;var l=this.getLayer(),u=l.getSource(),c=u.getTileGridForProjection(n.viewState.projection),h=Wi([t]);Ka(h,s*i,h);for(var f={},p=function(B,L,O){var b=B.getId();b===void 0&&(b=de(B));var T=f[b];if(T){if(T!==!0&&O<T.distanceSq){if(O===0)return f[b]=!0,o.splice(o.lastIndexOf(T),1),a(B,l,L);T.geometry=L,T.distanceSq=O}}else{if(O===0)return f[b]=!0,a(B,l,L);o.push(f[b]={feature:B,layer:l,geometry:L,distanceSq:O,callback:a})}},v=this.renderedTiles,m,g=function(B,L){var O=v[B],b=c.getTileCoordExtent(O.wrappedTileCoord);if(!Nn(b,h))return"continue";var T=de(l),F=[O.executorGroups[T]],M=O.declutterExecutorGroups[T];M&&F.push(M),F.some(function(S){for(var x=S===M?n.declutterTree.all().map(function(z){return z.value}):null,N=0,P=S.length;N<P;++N){var Y=S[N];if(m=Y.forEachFeatureAtCoordinate(t,s,A,i,p,x),m)return!0}})},_=0,E=v.length;!m&&_<E;++_)g(_);return m},e.prototype.getFeatures=function(t){return new Promise(function(n,i){for(var a=this.getLayer(),o=de(a),s=a.getSource(),A=this.renderedProjection,l=A.getExtent(),u=this.renderedResolution,c=s.getTileGridForProjection(A),h=hn(this.renderedPixelToCoordinateTransform_,t.slice()),f=c.getTileCoordForCoordAndResolution(h,u),p,v=0,m=this.renderedTiles.length;v<m;++v)if(f.toString()===this.renderedTiles[v].tileCoord.toString()){if(p=this.renderedTiles[v],p.getState()===ye.LOADED){var g=c.getTileCoordExtent(p.tileCoord);s.getWrapX()&&A.canWrapX()&&!Oo(l,g)&&YF(h,A);break}p=void 0}if(!p||p.loadingSourceTiles>0){n([]);return}var _=c.getTileCoordExtent(p.wrappedTileCoord),E=Ns(_),B=[(h[0]-E[0])/u,(E[1]-h[1])/u],L=p.getSourceTiles().reduce(function(M,S){return M.concat(S.getFeatures())},[]),O=p.hitDetectionImageData[o];if(!O&&!this.animatingOrInteracting_){var b=Ui(c.getTileSize(c.getZForResolution(u))),T=this.renderedRotation_,F=[this.getRenderTransform(c.getTileCoordCenter(p.wrappedTileCoord),u,0,Lo,b[0]*Lo,b[1]*Lo,0)];O=a4(b,F,L,a.getStyleFunction(),c.getTileCoordExtent(p.wrappedTileCoord),p.getReplayState(a).renderedResolution,T),p.hitDetectionImageData[o]=O}n(o4(B,L,O))}.bind(this))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var n=this.context,i=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var a=t.viewHints,o=!(a[mn.ANIMATING]||a[mn.INTERACTING]),s=this.renderedTiles,A=0,l=s.length;A<l;++A){var u=s[A],c=u.declutterExecutorGroups[de(this.getLayer())];if(c)for(var h=c.length-1;h>=0;--h)c[h].execute(this.context,1,this.getTileRenderTransform(u,t),t.viewState.rotation,o,void 0,t.declutterTree)}n.globalAlpha=i},e.prototype.getTileRenderTransform=function(t,n){var i=n.pixelRatio,a=n.viewState,o=a.center,s=a.resolution,A=a.rotation,l=n.size,u=Math.round(l[0]*i),c=Math.round(l[1]*i),h=this.getLayer().getSource(),f=h.getTileGridForProjection(n.viewState.projection),p=t.tileCoord,v=f.getTileCoordExtent(t.wrappedTileCoord),m=f.getTileCoordExtent(p,this.tmpExtent)[0]-v[0],g=jp(Qv(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(o,s,A,i,u,c,m));return g},e.prototype.renderFrame=function(t,n){var i=t.viewHints,a=!(i[mn.ANIMATING]||i[mn.INTERACTING]);r.prototype.renderFrame.call(this,t,n),this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;var o=this.getLayer(),s=o.getRenderMode(),A=this.context,l=A.globalAlpha;A.globalAlpha=o.getOpacity();for(var u=olt[s],c=t.viewState,h=c.rotation,f=o.getSource(),p=f.getTileGridForProjection(c.projection),v=p.getZForResolution(c.resolution,f.zDirection),m=this.renderedTiles,g=[],_=[],E=m.length-1;E>=0;--E){var B=m[E],L=B.executorGroups[de(o)].filter(function(z){return z.hasExecutors(u)});if(L.length!==0){for(var O=this.getTileRenderTransform(B,t),b=B.tileCoord[0],T=!1,F=L[0].getClipCoords(O),M=0,S=g.length;M<S;++M)if(v!==b&&b<_[M]){var x=g[M];Nn([F[0],F[3],F[4],F[7]],[x[0],x[3],x[4],x[7]])&&(T||(A.save(),T=!0),A.beginPath(),A.moveTo(F[0],F[1]),A.lineTo(F[2],F[3]),A.lineTo(F[4],F[5]),A.lineTo(F[6],F[7]),A.moveTo(x[6],x[7]),A.lineTo(x[4],x[5]),A.lineTo(x[2],x[3]),A.lineTo(x[0],x[1]),A.clip())}g.push(F),_.push(b);for(var N=0,P=L.length;N<P;++N){var Y=L[N];Y.execute(A,1,O,h,a,u)}T&&A.restore()}}return A.globalAlpha=l,this.container},e.prototype.renderFeature=function(t,n,i,a,o){if(!i)return!1;var s=!1;if(Array.isArray(i))for(var A=0,l=i.length;A<l;++A)s=Q_(a,t,i[A],n,this.boundHandleStyleImageChange_,void 0,o)||s;else s=Q_(a,t,i,n,this.boundHandleStyleImageChange_,void 0,o);return s},e.prototype.tileImageNeedsRender_=function(t){var n=this.getLayer();if(n.getRenderMode()===wu.VECTOR)return!1;var i=t.getReplayState(n),a=n.getRevision(),o=t.wantedResolution;return i.renderedTileResolution!==o||i.renderedTileRevision!==a},e.prototype.renderTileImage_=function(t,n){var i=this.getLayer(),a=t.getReplayState(i),o=i.getRevision(),s=t.executorGroups[de(i)];a.renderedTileRevision=o;var A=t.wrappedTileCoord,l=A[0],u=i.getSource(),c=n.pixelRatio,h=n.viewState,f=h.projection,p=u.getTileGridForProjection(f),v=p.getResolution(t.tileCoord[0]),m=n.pixelRatio/t.wantedResolution*v,g=p.getResolution(l),_=t.getContext(i);c=Math.round(Math.max(c,m/c));var E=u.getTilePixelSize(l,c,f);_.canvas.width=E[0],_.canvas.height=E[1];var B=c/m;if(B!==1){var L=Dv(this.tmpTransform_);Qv(L,B,B),_.setTransform.apply(_,L)}var O=p.getTileCoordExtent(A,this.tmpExtent),b=m/g,T=Dv(this.tmpTransform_);Qv(T,b,-b),hX(T,-O[0],-O[3]);for(var F=0,M=s.length;F<M;++F){var S=s[F];S.execute(_,B,T,0,!0,alt[i.getRenderMode()])}a.renderedTileResolution=t.wantedResolution},e}(V4),Alt=slt,llt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ult=function(r){llt(e,r);function e(t){var n=this,i=t||{},a=ve({},i);delete a.preload,delete a.useInterimTilesOnError,n=r.call(this,a)||this,n.on,n.once,n.un,i.renderMode===wu.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var o=i.renderMode||wu.HYBRID;return we(o==wu.HYBRID||o==wu.VECTOR,28),n.renderMode_=o,n.setPreload(i.preload?i.preload:0),n.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),n.getBackground,n.setBackground,n}return e.prototype.createRenderer=function(){return new Alt(this)},e.prototype.getFeatures=function(t){return r.prototype.getFeatures.call(this,t)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(gu.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(gu.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(gu.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(gu.USE_INTERIM_TILES_ON_ERROR,t)},e}(dw),clt=ult,jr=function(r){r=r||{};var e=this;this.dcount=0,this.show_progress=r.show_progress,this.oninfo=typeof r.oninfo=="function"?r.oninfo:null,this.onextent=typeof r.onextent=="function"?r.onextent:null,this.hasextent=r.extent||r.onextent,this.hastrash=r.trash,this.reordering=r.reordering!==!1,this._layers=[],this._layerGroup=r.layerGroup&&r.layerGroup.getLayers?r.layerGroup:null,this.onchangeCheck=typeof r.onchangeCheck=="function"?r.onchangeCheck:null,typeof r.displayInLayerSwitcher=="function"&&(this.displayInLayerSwitcher=r.displayInLayerSwitcher);var t;r.target?t=ct.create("DIV",{className:r.switcherClass||"ol-layerswitcher"}):(t=ct.create("DIV",{className:(r.switcherClass||"ol-layerswitcher")+" ol-unselectable ol-control"}),r.collapsed!==!1?t.classList.add("ol-collapsed"):t.classList.add("ol-forceopen"),this.button=ct.create("BUTTON",{type:"button",parent:t}),this.button.addEventListener("touchstart",function(n){t.classList.toggle("ol-forceopen"),t.classList.add("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:t.classList.contains("ol-collapsed")}),n.preventDefault(),e.overflow()}),this.button.addEventListener("click",function(){t.classList.toggle("ol-forceopen"),t.classList.add("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:!t.classList.contains("ol-forceopen")}),e.overflow()}),r.mouseover&&(t.addEventListener("mouseleave",function(){t.classList.add("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:!0})}),t.addEventListener("mouseover",function(){t.classList.remove("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:!1})})),r.minibar&&(r.noScroll=!0),r.noScroll||(this.topv=ct.create("DIV",{className:"ol-switchertopdiv",parent:t,click:function(){e.overflow("+50%")}}),this.botv=ct.create("DIV",{className:"ol-switcherbottomdiv",parent:t,click:function(){e.overflow("-50%")}})),this._noScroll=r.noScroll),this.panel_=ct.create("UL",{className:"panel"}),this.panelContainer_=ct.create("DIV",{className:"panel-container",html:this.panel_,parent:t}),!r.target&&!r.noScroll&&ct.addListener(this.panel_,"mousewheel DOMMouseScroll onmousewheel",function(n){e.overflow(Math.max(-1,Math.min(1,n.wheelDelta||-n.detail)))&&(n.stopPropagation(),n.preventDefault())}),this.header_=ct.create("LI",{className:"ol-header",parent:this.panel_}),wr.call(this,{element:t,target:r.target}),this.set("drawDelay",r.drawDelay||0),this.set("selection",r.selection),r.minibar&&setTimeout(function(){var n=ct.scrollDiv(this.panelContainer_,{mousewheel:!0,vertical:!0,minibar:!0});this.on(["drawlist","toggle"],function(){n.refresh()})}.bind(this))};Br(jr,wr);jr.prototype.tip={up:"up/down",down:"down",info:"informations...",extent:"zoom to extent",trash:"remove layer",plus:"expand/shrink"};jr.prototype.displayInLayerSwitcher=function(r){return r.get("displayInLayerSwitcher")!==!1};jr.prototype.setMap=function(r){if(wr.prototype.setMap.call(this,r),this.drawPanel(),this._listener)for(var e in this._listener)Uo(this._listener[e]);this._listener=null,r&&(this._listener={moveend:r.on("moveend",this.viewChange.bind(this)),size:r.on("change:size",this.overflow.bind(this))},this._layerGroup?this._listener.change=this._layerGroup.getLayers().on("change:length",this.drawPanel.bind(this)):this._listener.change=r.getLayerGroup().getLayers().on("change:length",this.drawPanel.bind(this)))};jr.prototype.show=function(){this.element.classList.add("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!1})};jr.prototype.hide=function(){this.element.classList.remove("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!0})};jr.prototype.toggle=function(){this.element.classList.toggle("ol-forceopen"),this.overflow()};jr.prototype.isOpen=function(){return this.element.classList.contains("ol-forceopen")};jr.prototype.setHeader=function(r){ct.setHTML(this.header_,r)};jr.prototype.overflow=function(r){if(this.button&&!this._noScroll){if(ct.hidden(this.panel_)){ct.setStyle(this.element,{height:"auto"});return}var e=ct.outerHeight(this.element),t=ct.outerHeight(this.panel_),n=this.button.offsetTop+ct.outerHeight(this.button),i=this.panel_.offsetTop-n;if(t>e-n){ct.setStyle(this.element,{height:"100%"});var a=this.panel_.querySelectorAll("li.visible .li-content")[0],o=a?2*ct.getStyle(a,"height"):0;switch(r){case 1:i+=o;break;case-1:i-=o;break;case"+50%":i+=Math.round(e/2);break;case"-50%":i-=Math.round(e/2);break}return i+t<=e-3*n/2?(i=e-3*n/2-t,ct.hide(this.botv)):ct.show(this.botv),i>=0?(i=0,ct.hide(this.topv)):ct.show(this.topv),ct.setStyle(this.panel_,{top:i+"px"}),!0}else return ct.setStyle(this.element,{height:"auto"}),ct.setStyle(this.panel_,{top:0}),ct.hide(this.botv),ct.hide(this.topv),!1}else return!1};jr.prototype._setLayerForLI=function(r,e){var t=[];e.getLayers&&t.push(e.getLayers().on("change:length",this.drawPanel.bind(this))),r&&(t.push(e.on("change:opacity",function(){this.setLayerOpacity(e,r)}.bind(this))),t.push(e.on("change:visible",function(){this.setLayerVisibility(e,r)}.bind(this)))),t.push(e.on("propertychange",function(n){(n.key==="displayInLayerSwitcher"||n.key==="openInLayerSwitcher")&&this.drawPanel(n)}.bind(this))),this._layers.push({li:r,layer:e,listeners:t})};jr.prototype.setLayerOpacity=function(r,e){var t=e.querySelector(".layerswitcher-opacity-cursor");t&&(t.style.left=r.getOpacity()*100+"%"),this.dispatchEvent({type:"layer:opacity",layer:r})};jr.prototype.setLayerVisibility=function(r,e){var t=e.querySelector(".ol-visibility");t&&(t.checked=r.getVisible()),r.getVisible()?e.classList.add("ol-visible"):e.classList.remove("ol-visible"),this.dispatchEvent({type:"layer:visible",layer:r})};jr.prototype._clearLayerForLI=function(){this._layers.forEach(function(r){r.listeners.forEach(function(e){Uo(e)})}),this._layers=[]};jr.prototype._getLayerForLI=function(r){for(var e=0,t;t=this._layers[e];e++)if(t.li===r)return t.layer;return null};jr.prototype.viewChange=function(){this.panel_.querySelectorAll("li").forEach(function(r){var e=this._getLayerForLI(r);e&&(this.testLayerVisibility(e)?r.classList.remove("ol-layer-hidden"):r.classList.add("ol-layer-hidden"))}.bind(this))};jr.prototype.getPanel=function(){return this.panelContainer_};jr.prototype.drawPanel=function(){if(this.getMap()){var r=this;this.dcount++,setTimeout(function(){r.drawPanel_()},this.get("drawDelay")||0)}};jr.prototype.drawPanel_=function(){if(!(--this.dcount||this.dragging_)){var r=this.panelContainer_.scrollTop;this._clearLayerForLI(),this.panel_.querySelectorAll("li").forEach(function(e){e.classList.contains("ol-header")||e.remove()}.bind(this)),this._layerGroup?this.drawList(this.panel_,this._layerGroup.getLayers()):this.getMap()&&this.drawList(this.panel_,this.getMap().getLayers()),this.panelContainer_.scrollTop=r}};jr.prototype.switchLayerVisibility=function(r,e){r.get("baseLayer")?(r.getVisible()||r.setVisible(!0),e.forEach(function(t){r!==t&&t.get("baseLayer")&&t.getVisible()&&t.setVisible(!1)})):r.setVisible(!r.getVisible())};jr.prototype.testLayerVisibility=function(r){if(!this.getMap())return!0;var e=this.getMap().getView().getResolution(),t=this.getMap().getView().getZoom();if(r.getMaxResolution()<=e||r.getMinResolution()>=e)return!1;if(r.getMinZoom&&(r.getMinZoom()>=t||r.getMaxZoom()<t))return!1;var n=r.getExtent();if(n){var i=this.getMap().getView().calculateExtent(this.getMap().getSize());return Nn(i,n)}return!0};jr.prototype.dragOrdering_=function(r){r.stopPropagation(),r.preventDefault();var e=this,t=r.currentTarget.parentNode.parentNode,n=!0,i=this.panel_,a,o=r.pageY||r.touches&&r.touches.length&&r.touches[0].pageY||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageY,s,A,l,u;t.parentNode.classList.add("drag");function c(){if(s){var f=l,p=e.getSelection()===f;if(f&&s){var v;u?v=u.getLayers():v=e._layerGroup?e._layerGroup.getLayers():e.getMap().getLayers();for(var m=v.getArray(),g=0;g<m.length;g++)if(m[g]==f){v.removeAt(g);break}for(var _=0;_<m.length;_++)if(m[_]===s){g>_?v.insertAt(_,f):v.insertAt(_+1,f);break}}p&&e.selectLayer(f),e.dispatchEvent({type:"reorder-end",layer:f,group:u})}t.parentNode.querySelectorAll("li").forEach(function(E){E.classList.remove("dropover"),E.classList.remove("dropover-after"),E.classList.remove("dropover-before")}),t.classList.remove("drag"),t.parentNode.classList.remove("drag"),e.element.classList.remove("drag"),A&&A.remove(),ct.removeListener(document,"mousemove touchmove",h),ct.removeListener(document,"mouseup touchend touchcancel",c)}function h(f){if(a=f.pageY||f.touches&&f.touches.length&&f.touches[0].pageY||f.changedTouches&&f.changedTouches.length&&f.changedTouches[0].pageY,n&&Math.abs(o-a)>2&&(n=!1,t.classList.add("drag"),l=e._getLayerForLI(t),s=!1,u=e._getLayerForLI(t.parentNode.parentNode),A=ct.create("LI",{className:"ol-dragover",html:t.innerHTML,style:{position:"absolute","z-index":1e4,left:t.offsetLeft,opacity:.5,width:ct.outerWidth(t),height:ct.getStyle(t,"height")},parent:i}),e.element.classList.add("drag"),e.dispatchEvent({type:"reorder-start",layer:l,group:u})),!n){f.preventDefault(),f.stopPropagation(),ct.setStyle(A,{top:a-ct.offsetRect(i).top+i.scrollTop+5});var p;for(f.touches?p=document.elementFromPoint(f.touches[0].clientX,f.touches[0].clientY):p=f.target,p.classList.contains("ol-switcherbottomdiv")?e.overflow(-1):p.classList.contains("ol-switchertopdiv")&&e.overflow(1);p&&p.tagName!=="LI";)p=p.parentNode;(!p||!p.classList.contains("dropover"))&&t.parentNode.querySelectorAll("li").forEach(function(v){v.classList.remove("dropover"),v.classList.remove("dropover-after"),v.classList.remove("dropover-before")}),p&&p.parentNode.classList.contains("drag")&&p!==t?(s=e._getLayerForLI(p),s&&!s.get("allwaysOnTop")==!l.get("allwaysOnTop")?(p.classList.add("dropover"),p.classList.add(t.offsetTop<p.offsetTop?"dropover-after":"dropover-before")):s=!1,ct.show(A)):(s=!1,p===t?ct.hide(A):ct.show(A)),s?A.classList.remove("forbidden"):A.classList.add("forbidden")}}ct.addListener(document,"mousemove touchmove",h),ct.addListener(document,"mouseup touchend touchcancel",c)};jr.prototype.dragOpacity_=function(r){r.stopPropagation(),r.preventDefault();var e=this,t=r.target,n=this._getLayerForLI(t.parentNode.parentNode.parentNode);if(!n)return;var i=r.pageX||r.touches&&r.touches.length&&r.touches[0].pageX||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageX,a=ct.getStyle(t,"left")-i;e.dragging_=!0;function o(){ct.removeListener(document,"mouseup touchend touchcancel",o),ct.removeListener(document,"mousemove touchmove",s),e.dragging_=!1}function s(A){var l=A.pageX||A.touches&&A.touches.length&&A.touches[0].pageX||A.changedTouches&&A.changedTouches.length&&A.changedTouches[0].pageX,u=(a+l)/ct.getStyle(t.parentNode,"width"),c=Math.max(0,Math.min(1,u));ct.setStyle(t,{left:c*100+"%"}),t.parentNode.nextElementSibling.innerHTML=Math.round(c*100),n.setOpacity(c)}ct.addListener(document,"mouseup touchend touchcancel",o),ct.addListener(document,"mousemove touchmove",s)};jr.prototype.drawList=function(r,e){var t=this,n=e.getArray(),i=function(u){u.stopPropagation(),u.preventDefault();var c=t._getLayerForLI(this.parentNode.parentNode);t.switchLayerVisibility(c,e),t.get("selection")&&c.getVisible()&&t.selectLayer(c),t.onchangeCheck&&t.onchangeCheck(c)};function a(u){u.stopPropagation(),u.preventDefault();var c=t._getLayerForLI(this.parentNode.parentNode);t.oninfo(c),t.dispatchEvent({type:"info",layer:c})}function o(u){u.stopPropagation(),u.preventDefault();var c=t._getLayerForLI(this.parentNode.parentNode);t.onextent?t.onextent(c):t.getMap().getView().fit(c.getExtent(),t.getMap().getSize()),t.dispatchEvent({type:"extent",layer:c})}function s(u){u.stopPropagation(),u.preventDefault();var c=this.parentNode.parentNode.parentNode.parentNode,h,f=t._getLayerForLI(c);f?(h=t._getLayerForLI(this.parentNode.parentNode),f.getLayers().remove(h),f.getLayers().getLength()==0&&!f.get("noSwitcherDelete")&&s.call(c.querySelectorAll(".layerTrash")[0],u)):(c=this.parentNode.parentNode,t.getMap().removeLayer(t._getLayerForLI(c)))}function A(u){if(!this.displayInLayerSwitcher(u)){this._setLayerForLI(null,u);return}var c=ct.create("LI",{className:(u.getVisible()?"visible ":" ")+(u.get("baseLayer")?"baselayer":""),parent:r});this._setLayerForLI(c,u),this._selectedLayer===u&&c.classList.add("ol-layer-select");var h=ct.create("DIV",{className:"ol-layerswitcher-buttons",parent:c}),f=ct.create("DIV",{className:"li-content",parent:c});ct.create("INPUT",{type:u.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:u.getVisible(),click:i,parent:f});var p=ct.create("LABEL",{title:u.get("title")||u.get("name"),click:i,unselectable:"on",style:{userSelect:"none"},parent:f});if(p.addEventListener("selectstart",function(){return!1}),ct.create("SPAN",{html:u.get("title")||u.get("name"),click:function(B){this.get("selection")&&(B.stopPropagation(),this.selectLayer(u))}.bind(this),parent:p}),this.reordering&&(l<n.length-1&&(u.get("allwaysOnTop")||!n[l+1].get("allwaysOnTop"))||l>0&&(!u.get("allwaysOnTop")||n[l-1].get("allwaysOnTop")))&&ct.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(B){t.dragOrdering_(B)}},parent:h}),u.getLayers){var v=0;u.getLayers().forEach(function(B){t.displayInLayerSwitcher(B)&&v++}),v&&ct.create("DIV",{className:u.get("openInLayerSwitcher")?"collapse-layers":"expend-layers",title:this.tip.plus,click:function(){var B=t._getLayerForLI(this.parentNode.parentNode);B.set("openInLayerSwitcher",!B.get("openInLayerSwitcher"))},parent:h})}if(this.oninfo&&ct.create("DIV",{className:"layerInfo",title:this.tip.info,click:a,parent:h}),this.hastrash&&!u.get("noSwitcherDelete")&&ct.create("DIV",{className:"layerTrash",title:this.tip.trash,click:s,parent:h}),this.hasextent&&n[l].getExtent()){var m=n[l].getExtent();m.length==4&&m[0]<m[2]&&m[1]<m[3]&&ct.create("DIV",{className:"layerExtent",title:this.tip.extent,click:o,parent:h})}if(this.show_progress&&u instanceof MI){var g=ct.create("DIV",{className:"layerswitcher-progress",parent:f});this.setprogress_(u),u.layerswitcher_progress=ct.create("DIV",{parent:g})}var _=ct.create("DIV",{className:"layerswitcher-opacity",click:function(B){if(B.target===this){B.stopPropagation(),B.preventDefault();var L=Math.max(0,Math.min(1,B.offsetX/ct.getStyle(this,"width")));t._getLayerForLI(this.parentNode.parentNode).setOpacity(L)}},parent:f});if(ct.create("DIV",{className:"layerswitcher-opacity-cursor ol-noscroll",style:{left:u.getOpacity()*100+"%"},on:{"mousedown touchstart":function(B){t.dragOpacity_(B)}},parent:_}),ct.create("DIV",{className:"layerswitcher-opacity-label",html:Math.round(u.getOpacity()*100),parent:f}),u.getLayers&&(c.classList.add("ol-layer-group"),u.get("openInLayerSwitcher")===!0)){var E=ct.create("UL",{parent:c});this.drawList(E,u.getLayers())}c.classList.add(this.getLayerClass(u)),this.dispatchEvent({type:"drawlist",layer:u,li:c})}for(var l=n.length-1;l>=0;l--)A.call(this,n[l]);this.viewChange(),r===this.panel_&&this.overflow()};jr.prototype.getLayerClass=function(r){return r?r.getLayers?"ol-layer-group":r instanceof dA?"ol-layer-vector":r instanceof clt?"ol-layer-vectortile":r instanceof MI?"ol-layer-tile":r instanceof A8?"ol-layer-image":r instanceof B8?"ol-layer-heatmap":r.getFeatures?"ol-layer-vectorimage":"unknown":"none"};jr.prototype.selectLayer=function(r,e){if(!r){if(!this.getMap())return;r=this.getMap().getLayers().item(this.getMap().getLayers().getLength()-1)}this._selectedLayer=r,this.drawPanel(),e||this.dispatchEvent({type:"select",layer:r})};jr.prototype.getSelection=function(){return this._selectedLayer};jr.prototype.setprogress_=function(r){if(!r.layerswitcher_progress){var e=0,t=0,n=function(){t===e?(t=e=0,ct.setStyle(r.layerswitcher_progress,{width:0})):ct.setStyle(r.layerswitcher_progress,{width:(e/t*100).toFixed(1)+"%"})};r.getSource().on("tileloadstart",function(){t++,n()}),r.getSource().on("tileloadend",function(){e++,n()}),r.getSource().on("tileloaderror",function(){e++,n()})}};const hlt={name:"ol-layerswitcher-control",setup(r,e){const{control:t}=Hi(jr,r,e);return{control:t}},props:{selection:{type:Boolean},displayInLayerSwitcher:{type:Function},show_progress:{type:Boolean,default:!1},mouseover:{type:Boolean,default:!1},reordering:{type:Boolean,default:!0},trash:{type:Boolean,default:!1},oninfo:{type:Function},extent:{type:Boolean},onextent:{type:Function},drawDelay:{type:Number},collapsed:{type:Boolean,default:!0},layerGroup:{type:Object},noScroll:{type:Boolean,default:!1}}};function flt(r,e,t,n,i,a){return vr("",!0)}var e1=ue(hlt,[["render",flt]]);vw.prototype.getPreview=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAk6QAAJOkBUCTn+AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANeSURBVHic7ZpPiE1RHMc/780MBhkik79JSUlIUbOxI+wkI2yRhYSUlJLNpJF/xcpiJBmZGBZsNM1CkmhKITGkGbH0/BuPmXnP4rxbb/TOn3fvOffeec6nfqvb/b7f93fveeec37ng8Xg8Ho/nf6Uu4d+fDswFssCvhHOJhaXAMeApMAQUyyIPPAdOAiuTStAVy4EHjDWsix5gdRLJ2mY34ulWYz6IEeA4kIk9awtkgTOEM/5vdAKT4k0/Ou3YMR/ELcbRm9AKFLBbgCJwNE4TYZkJfMG++SIwDCyLz0o4bI17WdyJz0r1TAZ+oDcxCBwAFgIzEIuhvcBbg3sLwOK4DFXLFvQGniCGSSUagS4DjUPOHESkA3XiOWCORqMR6Nfo9DjI3QqPUSd+ylBnv0Zn0GrWFvmIOvGNhjqrNDp/EAutyFgRKUM2tgO+Gur81FxvAKYZaimxXYBvmuuLDHWWaK4X0RfJCNsF6NdcbzXU2a65PohYFKWOc+jn8PUajbWIXaBKp9NB7lZYh34OzwFbFfd/NtDYYSth27urLGIm0M31AL3APWAAmIooymaDnPIl/Vz4NN1yHrd7gcvxWQnHAuA3bsyPop8hUsE13BSgK04TUViBeFo2zedJ8S6wElexW4D2eNOPTjNi6WvD/DtEr8E6tk6GGoAmxFY2iFHE9NZiQf8gogiB9gTEH23izAZuE77vHyU+ANucO1QwD3hD/MbLowAcdm20EmkwXx4n3NodS9rMB2HabYpEWs0HcRqHp0fNwAvJD+eBTZr7p6BvmQVxUaEzEbiruNfJekH15L8jtrEm7JJolEcOmKXRqQOuKDQuY7HZY8s8iNfzkSLxIuI43FTrkkLnOlBfRW4VsWk+oAX5weknxFAxJQNckGgVgZuIRVoomoGXEmGTMa+iQ6K7M4SW7k24QYgiuDQPYinbhugiF4H3RGtzZYCzyIvQXfpNI1ybLyeLpf5+iTbkRbiP2EcocTHm4+YI8iI8RFHwWjAfsA95Q+YZFU6wasl8wB7kReijtNbIILa0vcg/PRlGfPQwHmlCviDqAzaA+OREtzqr1ejOIDorxlNEjTGUBV4nnUWCvAJxGDlA8q9j3DEArAn2zvXAfOwfl6eVAmJrPpJ0Ih6Px+PxeJLjLwPul3vj5d0eAAAAAElFTkSuQmCC"};p8.prototype.getPreview=function(r,e){r||(r=[21020,6355964]),e||(e=150);var t=this.getTileGrid().getTileCoordForCoordAndResolution(r,e),n=this.getTileUrlFunction();return n.call(this,t,this.getProjection())};Lot.prototype.getPreview=function(r,e){r||(r=[21020,6355964]),e||(e=150);var t=this.getTileUrlFunction();if(t){var n=this.getTileGrid()||this.getTileGridForProjection(this.getProjection()),i=n.getTileCoordForCoordAndResolution(r,e);return t.call(this,i,1,this.getProjection())}var a=this.getGetFeatureInfoUrl?this.getGetFeatureInfoUrl(r,e,this.getProjection()||"EPSG:3857",{}):this.getFeatureInfoUrl(r,e,this.getProjection()||"EPSG:3857",{});return a=a.replace(/getfeatureinfo/i,"GetMap"),a};Fh.prototype.getPreview=function(r,e,t){if(this.get("preview"))return[this.get("preview")];if(e||(e=150),e<this.getMinResolution()||e>this.getMaxResolution()){var n=this.getMinResolution(),i=this.getMaxResolution();for(i>1e5&&(i=156543),n<.15&&(n=.15),e=i;i>n;)n*=2,i/=2,e=n}var a=this.getExtent();return r||(r=[21020,6355964]),a&&!Fs(a,r)&&(r=[(a[0]+a[2])/2,(a[1]+a[3])/2]),t&&(r=ju(r,t,this.getSource().getProjection())),this.getSource&&this.getSource()?[this.getSource().getPreview(r,e)]:[]};ty.prototype.getPreview=function(r,e){if(this.get("preview"))return[this.get("preview")];var t=[];if(this.getLayers)for(var n=this.getLayers().getArray(),i=0;i<n.length;i++)t=t.concat(n[i].getPreview(r,e));return t};var Rw=function(r){r=r||{},r.switcherClass="ol-layerswitcher-image",r.mouseover!==!1&&(r.mouseover=!0),jr.call(this,r)};Br(Rw,jr);Rw.prototype.drawList=function(r,e){var t=this,n=function(i){i.preventDefault();var a=t._getLayerForLI(this);t.switchLayerVisibility(a,e),i.type=="touchstart"&&t.element.classList.add("ol-collapsed")};ct.setStyle(r,{height:"auto"}),e.forEach(function(i){if(t.displayInLayerSwitcher(i)){var a=i.getPreview?i.getPreview():["none"],o=ct.create("LI",{className:"ol-imgcontainer"+(i.getVisible()?" ol-visible":""),on:{"touchstart click":n},parent:r});t._setLayerForLI(o,i),a.forEach(function(s){ct.create("IMG",{src:s,parent:o})}),ct.create("p",{html:i.get("title")||i.get("name"),parent:o}),t.testLayerVisibility(i)&&o.classList.add("ol-layer-hidden")}})};Rw.prototype.overflow=function(){};const plt={name:"ol-layerswitcherimage-control",extends:e1,setup(r,e){const{control:t}=Hi(Rw,r,e);return{control:t}}};function dlt(r,e,t,n,i,a){return vr("",!0)}var AS=ue(plt,[["render",dlt]]),Sa=function(r){r||(r={});var e=document.createElement("div");if(r.target)e=ct.create("DIV",{className:r.className||"ol-mapzone"});else{e=ct.create("DIV",{className:(r.className||"ol-mapzone")+" ol-unselectable ol-control ol-collapsed"});var t=ct.create("BUTTON",{type:"button",on:{click:function(){e.classList.toggle("ol-collapsed"),n.forEach(function(i){i.updateSize()})}.bind(this)},parent:e});ct.create("I",{parent:t})}wr.call(this,{element:e,target:r.target}),this.set("centerOnClick",r.centerOnClick);var n=this._maps=[];this._projection=r.projection,this._layer=r.layer,r.zones.forEach(this.addZone.bind(this)),setTimeout(function(){n.forEach(function(i){i.updateSize()})})};Br(Sa,wr);Sa.prototype.setCollapsed=function(r){r?(this.element.classList.remove("ol-collapsed"),this.getMaps().forEach(function(e){e.updateSize()})):this.element.classList.add("ol-collapsed")};Sa.prototype.getCollapsed=function(){return this.element.classList.contains("ol-collapsed")};Sa.prototype.setVisible=Sa.prototype.setCollapsed;Sa.prototype.getMaps=function(){return this._maps};Sa.prototype.getLength=function(){return this._maps.length};Sa.prototype.addZone=function(r){var e=new Js({zoom:6,center:[0,0],projection:this._projection}),t;r.map?t=O_(r.map.getView().calculateExtent(),r.map.getView().getProjection(),e.getProjection()):t=O_(r.extent,"EPSG:4326",e.getProjection());var n=ct.create("DIV",{className:"ol-mapzonezone",parent:this.element,click:function(){var o=-1;this._maps.forEach(function(s,A){s.get("zone")===r&&(o=A)}),this.dispatchEvent({type:"select",zone:r,index:o,coordinate:ba(t),extent:t}),this.get("centerOnClick")!==!1&&this.getMap().getView().fit(t),this.setVisible(!1)}.bind(this)}),i;r.layer?i=r.layer:typeof this._layer=="function"?i=this._layer(r):i=new this._layer.constructor({source:this._layer.getSource()});var a=new yw({target:n,view:e,controls:[],interactions:[],layers:[i]});a.set("zone",r),this._maps.push(a),e.fit(t),ct.create("P",{html:r.title,parent:n})};Sa.prototype.removeZone=function(r){var e=this.element.querySelectorAll(".ol-mapzonezone")[r];e&&(e.remove(),this._maps.splice(r,1))};Sa.zones={};Sa.zones.DOM=[{title:"Guadeloupe",extent:[-61.898594315312444,15.75623038647845,-60.957887532935324,16.575317670979473]},{title:"Guyane",extent:[-54.72525931072715,2.1603763430019,-51.528236062921344,5.7984307809552575]},{title:"Martinique",extent:[-61.257556528564756,14.387506317407514,-60.76934912110432,14.895067461729951]},{title:"Mayotte",extent:[44.959844536967815,-13.01674138212816,45.35328866510648,-12.65521942207829]},{title:"La réunion",extent:[55.17059012967656,-21.407680069231688,55.88195702001797,-20.85560221637526]}];Sa.zones.TOM=[{title:"Polynésie Française",extent:[206.23664226630862,-22.189040615809787,221.85920743981987,-10.835039595040698]},{title:"Nouvelle Calédonie",extent:[163.76420580160925,-22.581641092751838,167.66984709498706,-19.816411635668445]},{title:"St-Pierre et Miquelon",extent:[-56.453698765748676,46.74449858188555,-56.0980198121544,47.14669874229787]},{title:"Wallis et Futuna",extent:[181.7588623143665,-14.7341169873267,183.95612353301715,-13.134720799175085]},{title:"St-Martin St-Barthélemy",extent:[-63.1726389501678,17.806097291313506,-62.7606535945649,18.13267688837938]}];Sa.zones.DOMTOM=[{title:"Métropole",extent:[-5.318421740712579,41.16082274292913,9.73284186155716,51.21957336557702]}].concat(Sa.zones.DOM,Sa.zones.TOM);const vlt={name:"ol-zone-control",setup(r,e){const{control:t}=Hi(Sa,r,e);return{control:t}},props:{className:{type:String},zones:{type:Array},layer:{type:[Object,Function]},projection:{type:String,default:"EPSG:3857"},centerOnClick:{type:Boolean,default:!0}}};function glt(r,e,t,n,i,a){return vr("",!0)}var lS=ue(vlt,[["render",glt]]);function r1(r){r1.installed||(r1.installed=!0,r.component(Nx.name,Nx),r.component(Px.name,Px),r.component(Ux.name,Ux),r.component(Dx.name,Dx),r.component(Qx.name,Qx),r.component(Hx.name,Hx),r.component(Gx.name,Gx),r.component(kx.name,kx),r.component(vN.name,vN),r.component($x.name,$x),r.component(jx.name,jx),r.component(Vx.name,Vx),r.component(Kx.name,Kx),r.component(zx.name,zx),r.component(oS.name,oS),r.component(sS.name,sS),r.component(e1.name,e1),r.component(AS.name,AS),r.component(lS.name,lS))}var ylt=Object.freeze(Object.defineProperty({__proto__:null,default:r1,install:r1,FullScreenControl:Nx,MousePositionControl:Px,AttributionControl:Ux,OverviewMapControl:Dx,ScaleLineControl:Qx,ZoomControl:Hx,ZoomSliderControl:Gx,ZoomToExtentControl:kx,ContextMenuControl:$x,SwipeControl:jx,ControlBar:Vx,ToggleControl:Kx,ButtonControl:zx,PrintDialog:oS,VideoRecorderControl:sS,LayerSwitcherControl:e1,LayerSwitcherImageControl:AS,ZoneControl:lS},Symbol.toStringTag,{value:"Module"}));function Wp(r,e){const t=Be("feature"),{properties:n}=gr(e);let i=fr(()=>new r(...Object.values(n)));return fe(n,()=>{t.value.setGeometry(i.value),t.value.changed()}),fe(t,()=>{t.value.setGeometry(i.value)}),Je(()=>{t.value.setGeometry(i.value)}),ar(()=>{t.value.setGeometry(null)}),{geometry:i}}const mlt={name:"ol-geom-point",setup(r){const{geometry:e}=Wp(pr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function _lt(r,e,t,n,i,a){return vr("",!0)}var uS=ue(mlt,[["render",_lt]]);const wlt={name:"ol-geom-line-string",setup(r){const{geometry:e}=Wp(kr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Elt(r,e,t,n,i,a){return vr("",!0)}var cS=ue(wlt,[["render",Elt]]);const Clt={name:"ol-geom-polygon",setup(r){const{geometry:e}=Wp(Fn,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Blt(r,e,t,n,i,a){return vr("",!0)}var hS=ue(Clt,[["render",Blt]]);const Tlt={name:"ol-geom-multi-point",setup(r){const{geometry:e}=Wp(ns,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function xlt(r,e,t,n,i,a){return vr("",!0)}var fS=ue(Tlt,[["render",xlt]]);const Slt={name:"ol-geom-multi-line-string",setup(r){const{geometry:e}=Wp(Fa,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function blt(r,e,t,n,i,a){return vr("",!0)}var pS=ue(Slt,[["render",blt]]);const Flt={name:"ol-geom-multi-polygon",setup(r){const{geometry:e}=Wp(Ia,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Ilt(r,e,t,n,i,a){return vr("",!0)}var dS=ue(Flt,[["render",Ilt]]);function n1(r){n1.installed||(n1.installed=!0,r.component(uS.name,uS),r.component(cS.name,cS),r.component(hS.name,hS),r.component(fS.name,fS),r.component(pS.name,pS),r.component(dS.name,dS))}var Llt=Object.freeze(Object.defineProperty({__proto__:null,default:n1,install:n1,Point:uS,LineString:cS,Polygon:hS,MultiPoint:fS,MultiLineString:pS,MultiPolygon:dS},Symbol.toStringTag,{value:"Module"}));const Olt={name:"ol-style",setup(r){const e=Be("stylable",null),{properties:t}=gr(r);let n=fr(()=>new Aa(t));const i=o=>{if(e instanceof BI||e instanceof TI){e.getOverlay().setStyle(o),e.value.dispatchEvent("styleChanged");return}try{e.value.setStyle(o),e.value.changed(),e.value.dispatchEvent("styleChanged")}catch{e.value.style_=o,e.value.values_.style=o,e.value.changed(),e.value.dispatchEvent("styleChanged")}},a=fr(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return fe(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),Je(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),ar(()=>{i(null)}),Pr("style",n),Pr("styledObj",e),{style:n}},props:{zIndex:{type:Number},overrideStyleFunction:{type:Function}}};function Rlt(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var vS=ue(Olt,[["render",Rlt]]);const Mlt={name:"ol-style-circle",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=gr(r),i=s=>new iy(Ms(Dn({},s),{fill:new ua,stroke:new Di}));let a=fr(()=>i(n));const o=()=>{e.value.setImage(null),e.value.setImage(a.value),t.value.changed()};fe(n,()=>{o()}),fe(e,()=>{o()}),Je(()=>{e.value.setImage(a.value)}),ar(()=>{e.value.setImage(null)}),Pr("circle",a),Pr("styledObj",t)},props:{radius:{type:Number},scale:{type:Number}}};function Nlt(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var gS=ue(Mlt,[["render",Nlt]]);const Plt={name:"ol-style-stroke",setup(r){const e=Be("style",null),t=Be("circle",null),n=Be("styledObj",null),{properties:i}=gr(r);if(e!=null&&t==null){let a=new Di(i);e.value.setStroke(a);const o=()=>{e.value.setStroke(null),a=new Di(i),e.value.setStroke(a)};fe(i,()=>{o()}),fe(e,()=>{o()}),Je(()=>{e.value.setStroke(a)}),ar(()=>{e.value.setStroke(null)})}else if(t!=null){const a=o=>{t.value.getStroke().setColor(o.color),t.value.getStroke().setLineCap(o.lineCap),t.value.getStroke().setLineDash(o.lineDash),t.value.getStroke().setLineDashOffset(o.lineDashOffset),t.value.getStroke().setLineJoin(o.lineJoin),t.value.getStroke().setMiterLimit(o.miterLimit),t.value.getStroke().setWidth(o.width),t.value.setRadius(t.value.getRadius());try{n.value.changed()}catch{n.changed()}};a(i),fe(i,o=>{a(o)}),fe(t,()=>{a(i)})}},props:{color:{type:String},lineCap:{type:String,default:"round"},lineJoin:{type:String,default:"round"},lineDash:{type:Array},lineDashOffset:{type:Number,default:0},miterLimit:{type:Number,default:10},width:{type:Number,default:1}}};function Ult(r,e,t,n,i,a){return vr("",!0)}var yS=ue(Plt,[["render",Ult]]);const Dlt={name:"ol-style-fill",setup(r){const e=Be("style",null),t=Be("circle",null),n=Be("styledObj",null),{properties:i}=gr(r);if(e!=null&&t==null){let a=new ua(i);e.value.setFill(a);const o=()=>{e.value.setFill(null),a=new ua(i),e.value.setFill(a)};fe(i,()=>{o()}),fe(e,()=>{o()}),Je(()=>{e.value.setFill(a)}),ar(()=>{e.value.setFill(null)})}else if(t!=null){const a=o=>{t.value.getFill().setColor(o),t.value.setRadius(t.value.getRadius());try{n.value.changed()}catch{n.changed()}};a(i.color),fe(i,()=>{a(i.color)}),fe(t,()=>{a(i.color)})}},props:{color:{type:String}}};function Qlt(r,e,t,n,i,a){return vr("",!0)}var mS=ue(Dlt,[["render",Qlt]]);const Hlt={name:"ol-style-icon",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=gr(r);let i=fr(()=>{let o=new sy(n);return o.load(),o});const a=()=>{e.value.setImage(null),e.value.setImage(i.value),t.value.changed()};fe(n,()=>{a()}),fe(e,()=>{a()}),Je(()=>{e.value.setImage(i.value)}),ar(()=>{e.value.setImage(null)})},props:{anchor:{type:Array},anchorOrigin:{type:String,default:"top-left"},anchorXUnits:{type:String,default:"fraction"},color:{type:String},crossOrigin:{type:String},img:{type:[HTMLImageElement,HTMLCanvasElement]},offset:{type:Array,default:()=>[0,0]},displacement:{type:Array,default:()=>[0,0]},offsetOrigin:{type:String,default:"top-left"},opacity:{type:Number,default:1},scale:{type:Number,default:1},rotateWithView:{type:Boolean,default:!1},rotation:{type:Number,default:0},size:{type:Array},imgSize:{type:Array},src:{type:String}}};function Glt(r,e,t,n,i,a){return vr("",!0)}var _S=ue(Hlt,[["render",Glt]]);const klt={name:"ol-style-text",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=gr(r),i=s=>new Lh(Ms(Dn({},s),{fill:new ua,stroke:new Di}));let a=fr(()=>i(n));const o=()=>{e.value.setText(null),e.value.setText(a.value),t.value.changed()};fe(n,()=>{o()}),fe(e,()=>{o()}),Je(()=>{e.value.setText(a.value)}),ar(()=>{e.value.setText(null)}),Pr("style",a),Pr("styledObj",t)},props:{font:{type:String},maxAngle:{type:Number,default:Math.PI/4},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},overflow:{type:Boolean,default:!1},placement:{type:String,default:"point"},scale:{type:Number},rotateWithView:{type:Boolean,default:!1},rotation:{type:Number,default:0},text:{type:String},textAlign:{type:String},textBaseline:{type:String,default:"middle"},padding:{type:Array,default:()=>[0,0,0,0]}}};function $lt(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var wS=ue(klt,[["render",$lt]]),Pp=function(r,e){var t=r[0]-e[0],n=r[1]-e[1];return Math.sqrt(t*t+n*n)},qd=function(r,e){return r[0]==e[0]&&r[1]==e[1]},V8;(function(){function r(t,n){var i;for(let a=t.length-1;a>0;a--)(t[a][0]>n&&t[a-1][0]<n||t[a][0]<n&&t[a-1][0]>n)&&(i=[n,(n-t[a][0])/(t[a-1][0]-t[a][0])*(t[a-1][1]-t[a][1])+t[a][1]],t.splice(a,0,i))}function e(t,n){var i;for(let a=t.length-1;a>0;a--)(t[a][1]>n&&t[a-1][1]<n||t[a][1]<n&&t[a-1][1]>n)&&(i=[(n-t[a][1])/(t[a-1][1]-t[a][1])*(t[a-1][0]-t[a][0])+t[a][0],n],t.splice(a,0,i))}V8=function(t,n){var i=n.getType()==="Polygon";if(!i&&n.getType()!=="MultiPolygon")return null;var a=n.getCoordinates();return i&&(a=[a]),a.forEach(function(o){o.forEach(function(s){r(s,t[0]),r(s,t[2]),e(s,t[1]),e(s,t[3])})}),a.forEach(function(o){o.forEach(function(s){s.forEach(function(A){A[0]<t[0]?A[0]=t[0]:A[0]>t[2]&&(A[0]=t[2]),A[1]<t[1]?A[1]=t[1]:A[1]>t[3]&&(A[1]=t[3])})})}),i?new Fn(a[0]):new Ia(a)}})();var Mw=function(r,e,t,n){var i=[];n!==!1&&i.push(r);var a=Pp(r,e);if(a){var o=Math.round(a/t);if(o>1)for(var s=(e[0]-r[0])/o,A=(e[1]-r[1])/o,l=1;l<o;l++)i.push([r[0]+s*l,r[1]+A*l])}return i.push(e),i};kr.prototype.sampleAt=function(r){for(var e=this.getCoordinates(),t=[],n=1;n<e.length;n++)t=t.concat(Mw(e[n-1],e[n],r,n===1));return new kr(t)};Fa.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(n){for(var i=[],a=1;a<n.length;a++)i=i.concat(Mw(n[a-1],n[a],r,a===1));t.push(i)}),new Fa(t)};Fn.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(n){for(var i=[],a=1;a<n.length;a++)i=i.concat(Mw(n[a-1],n[a],r,a===1));t.push(i)}),new Fn(t)};Ia.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(n){var i=[];t.push(i),n.forEach(function(a){for(var o=[],s=1;s<a.length;s++)o=o.concat(Mw(a[s-1],a[s],r,s===1));i.push(o)})}),new Ia(t)};mI.prototype.intersection=function(r,e){if(r.sampleAt){var t=Ka(this.getCenter().concat(this.getCenter()),this.getRadius());r=V8(t,r),r=r.simplify(e);var n=this.getCenter(),i=this.getRadius(),a=r.sampleAt(e).getCoordinates();switch(r.getType()){case"Polygon":a=[a];case"MultiPolygon":{var o=!1,s=[];return a.forEach(function(A){var l=[];s.push(l),A.forEach(function(u){var c=[];l.push(c),u.forEach(function(h){var f=Pp(n,h);f>i?(o=!0,c.push([n[0]+i/f*(h[0]-n[0]),n[1]+i/f*(h[1]-n[1])])):c.push(h)})})}),o?r.getType()==="Polygon"?new Fn(s[0]):new Ia(s):r}}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+r.getType());return r};kr.prototype.splitAt=function(r,e){var t;if(!r)return[this];if(e||(e=1e-10),r.length&&r[0].length){var n=[this];for(t=0;t<r.length;t++){for(var i=[],a=0;a<n.length;a++){var o=n[a].splitAt(r[t],e);i=i.concat(o)}n=i}return n}if(qd(r,this.getFirstCoordinate())||qd(r,this.getLastCoordinate()))return[this];var s=this.getCoordinates(),A=[s[0]],l=[];for(t=0;t<s.length-1;t++)if(!qd(s[t],s[t+1])){if(qd(r,s[t+1]))A.push(s[t+1]),l.push(new kr(A)),A=[];else if(!qd(r,s[t])){var u,c,h=!1;s[t][0]==s[t+1][0]?(u=(s[t][1]-r[1])/(s[t][1]-s[t+1][1]),h=s[t][0]==r[0]&&0<u&&u<=1):s[t][1]==s[t+1][1]?(u=(s[t][0]-r[0])/(s[t][0]-s[t+1][0]),h=s[t][1]==r[1]&&0<u&&u<=1):(u=(s[t][0]-r[0])/(s[t][0]-s[t+1][0]),c=(s[t][1]-r[1])/(s[t][1]-s[t+1][1]),h=Math.abs(u-c)<=e&&0<u&&u<=1),h&&(A.push(r),l.push(new kr(A)),A=[r])}A.push(s[t+1])}return A.length>1&&l.push(new kr(A)),l.length?l:[this]};var Bi=function(r){r||(r={}),Aa.call(this,{renderer:this._render.bind(this),stroke:r.stroke,text:r.text,zIndex:r.zIndex,geometry:r.geometry}),this._visible=r.visible!==!1,typeof r.width=="function"?this._widthFn=r.width:this.setWidth(r.width),this.setWidth2(r.width2),typeof r.color=="function"?this._colorFn=r.color:this.setColor(r.color),this.setColor2(r.color2),this.setLineCap(r.lineCap),this.setArrow(r.arrow),this.setArrowSize(r.arrowSize),this.setArrowColor(r.arrowColor),this._offset=[0,0],this.setOffset(r.offset0,0),this.setOffset(r.offset1,1),this._noOverlap=r.noOverlap};Br(Bi,Aa);Bi.prototype.setWidth=function(r){this._width=r||0};Bi.prototype.setWidth2=function(r){this._width2=r};Bi.prototype.getOffset=function(r){return this._offset[r]};Bi.prototype.setOffset=function(r,e){switch(r=Math.max(0,parseFloat(r)),e){case 0:{this._offset[0]=r;break}case 1:{this._offset[1]=r;break}}};Bi.prototype.setLineCap=function(r){this._lineCap=r==="round"?"round":"butt"};Bi.prototype.getWidth=function(r,e){if(this._widthFn)return this._widthFn(r,e);var t=typeof this._width2=="number"?this._width2:this._width;return this._width+(t-this._width)*e};Bi.prototype.setColor=function(r){try{this._color=$u(r)}catch{this._color=[0,0,0,1]}};Bi.prototype.setColor2=function(r){try{this._color2=$u(r)}catch{this._color2=null}};Bi.prototype.setArrowColor=function(r){try{this._acolor=il(r)}catch{this._acolor=null}};Bi.prototype.getColor=function(r,e){if(this._colorFn)return il(this._colorFn(r,e));var t=this._color,n=this._color2||this._color;return"rgba("+ +Math.round(t[0]+(n[0]-t[0])*e)+","+Math.round(t[1]+(n[1]-t[1])*e)+","+Math.round(t[2]+(n[2]-t[2])*e)+","+(t[3]+(n[3]-t[3])*e)+")"};Bi.prototype.getArrow=function(){return this._arrow};Bi.prototype.setArrow=function(r){this._arrow=parseInt(r),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)};Bi.prototype.getArrowSize=function(){return this._arrowSize||[16,16]};Bi.prototype.setArrowSize=function(r){Array.isArray(r)?this._arrowSize=r:typeof r=="number"&&(this._arrowSize=[r,r])};Bi.prototype.drawArrow=function(r,e,t,n,i){var a=this.getArrowSize()[0]*i,o=Pp(e,t),s=(e[0]-t[0])/o,A=(e[1]-t[1])/o;n=Math.max(this.getArrowSize()[1]/2,n/2)*i,r.beginPath(),r.moveTo(e[0],e[1]),r.lineTo(e[0]-a*s+n*A,e[1]-a*A-n*s),r.lineTo(e[0]-a*s-n*A,e[1]-a*A+n*s),r.lineTo(e[0],e[1]),r.fill()};Bi.prototype._render=function(r,e){if(e.geometry.getType()==="LineString"){var t,n,i,a=e.context;if(!this._visible){var o=e.pixelRatio/e.resolution,s=Math.cos(e.rotation),A=Math.sin(e.rotation);n=e.geometry.getCoordinates();var l=r[0][0]-n[0][0]*o*s-n[0][1]*o*A,u=r[0][1]-n[0][0]*o*A+n[0][1]*o*s;for(r=[],t=0;i=n[t];t++)r[t]=[l+i[0]*o*s+i[1]*o*A,u+i[0]*o*A-i[1]*o*s,i[2]]}var c=this.getArrowSize()[0]*e.pixelRatio;a.save(),this.getOffset(0)&&this._splitAsize(r,this.getOffset(0)*e.pixelRatio),this.getOffset(1)&&this._splitAsize(r,this.getOffset(1)*e.pixelRatio,!0),r.length>1&&(this.getArrow()===-1||this.getArrow()===2)&&(i=this._splitAsize(r,c),this._acolor?a.fillStyle=this._acolor:a.fillStyle=this.getColor(e.feature,0),this.drawArrow(a,i[0],i[1],this.getWidth(e.feature,0),e.pixelRatio)),r.length>1&&this.getArrow()>0&&(i=this._splitAsize(r,c,!0),this._acolor?a.fillStyle=this._acolor:a.fillStyle=this.getColor(e.feature,1),this.drawArrow(a,i[0],i[1],this.getWidth(e.feature,1),e.pixelRatio));var h=this._splitInto(r,255,2),f=0,p=h.length;if(a.lineJoin="round",a.lineCap=this._lineCap||"butt",h.length>1)for(f=0;f<h.length;f++){var v=f/p;for(n=h[f],a.lineWidth=this.getWidth(e.feature,v)*e.pixelRatio,a.strokeStyle=this.getColor(e.feature,v),a.beginPath(),a.moveTo(n[0][0],n[0][1]),t=1;i=n[t];t++)a.lineTo(i[0],i[1]);a.stroke()}a.restore()}};Bi.prototype._splitAsize=function(r,e,t){var n,i,a,o,s=0;for(t?a=r.pop():a=r.shift(),n=a;r.length;){if(t?i=r.pop():i=r.shift(),o=Pp(n,i),s+o>e){n=[n[0]+(i[0]-n[0])*(e-s)/o,n[1]+(i[1]-n[1])*(e-s)/o],o=Pp(n,a),t?(r.push(i),r.push(n),r.push([n[0]+(a[0]-n[0])/o,n[1]+(a[1]-n[1])/o])):(r.unshift(i),r.unshift(n),r.unshift([n[0]+(a[0]-n[0])/o,n[1]+(a[1]-n[1])/o]));break}s+=o,n=i}return[a,n]};Bi.prototype._splitInto=function(r,e,t){var n,i,a=this._noOverlap?1:.9,o=[],s,A=0;for(n=1;i=r[n];n++)A+=Pp(r[n-1],i);var l=Math.max(t||2,A/(e||255)),u=r[0];A=0;var c=[u];for(n=1,i=r[1];n<r.length;){var h=i[0]-u[0],f=i[1]-u[1];if(s=Math.sqrt(h*h+f*f),A+s>l){var p=(l-A)/s;c.push([u[0]+h*p,u[1]+f*p]),o.push(c),u=[u[0]+h*p*a,u[1]+f*p*a],c=[u],A=0}else A+=s,u=i,c.push(u),n++,i=r[n]}return o.push(c),o};const jlt={name:"ol-style-flowline",setup(r){const e=Be("stylable",null),{properties:t}=gr(r);let n=fr(()=>new Bi(t));const i=o=>{if(e instanceof BI||e instanceof TI){e.getOverlay().setStyle(o),e.value.dispatchEvent("styleChanged");return}try{e.value.setStyle(o),e.value.changed(),e.value.dispatchEvent("styleChanged")}catch{e.value.style_=o,e.value.values_.style=o,e.value.changed(),e.value.dispatchEvent("styleChanged")}},a=fr(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return fe(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),Je(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),ar(()=>{i(null)}),{style:n}},props:{color:{type:[String,Function]},color2:{type:String},width:{type:[Number,Function]},width2:{type:Number},arrow:{type:Number},arrowColor:{type:String}}};function Vlt(r,e,t,n,i,a){return fn(),Vn("div",null,[_r(r.$slots,"default")])}var ES=ue(jlt,[["render",Vlt]]);function i1(r){i1.installed||(i1.installed=!0,r.component(vS.name,vS),r.component(gS.name,gS),r.component(yS.name,yS),r.component(mS.name,mS),r.component(_S.name,_S),r.component(wS.name,wS),r.component(ES.name,ES))}var Klt=Object.freeze(Object.defineProperty({__proto__:null,default:i1,install:i1,Style:vS,Stroke:yS,Fill:mS,Icon:_S,Text:wS,FlowLine:ES,Circle:gS},Symbol.toStringTag,{value:"Module"}));const zlt={name:"ol-interaction-select",emits:["select"],setup(r,{emit:e}){const t=Be("map"),{properties:n}=gr(r);let i=fr(()=>{let a=new gw(Ms(Dn({},n),{style:new Aa}));return a.on("select",o=>{e("select",o)}),a});return fe(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),Je(()=>{t.addInteraction(i.value)}),ar(()=>{t.removeInteraction(i.value)}),Pr("stylable",i),{select:i}},props:{multi:{type:Boolean,default:!1},condition:{type:Function},filter:{type:Function},features:{type:[Ai,Object]},hitTolerance:{type:Number,default:0,validator:r=>r>=0}}};function Xlt(r,e,t,n,i,a){return _r(r.$slots,"default")}var CS=ue(zlt,[["render",Xlt]]),ac=function(r){r=r||{},this.pointRadius=r.pointRadius||12,this.circleMaxObjects=r.circleMaxObjects||10,this.maxObjects=r.maxObjects||60,this.spiral=r.spiral!==!1,this.animate=r.animate,this.animationDuration=r.animationDuration||500,this.selectCluster_=r.selectCluster!==!1,this._autoClose=r.autoClose!==!1;var e=this.overlayLayer_=new dA({source:new Tl({features:new Ai,wrapX:r.wrapX,useSpatialIndex:!0}),name:"Cluster overlay",updateWhileAnimating:!0,updateWhileInteracting:!0,displayInLayerSwitcher:!1,style:r.featureStyle});if(r.layers)if(typeof r.layers=="function"){var t=r.layers;r.layers=function(i){return i===e||t(i)}}else r.layers.push&&r.layers.push(this.overlayLayer_);if(r.filter){var n=r.filter;r.filter=function(i,a){return!a&&i.get("selectclusterlink")?!1:n(i,a)}}else r.filter=function(i,a){return!(!a&&i.get("selectclusterlink"))};this.filter_=r.filter,!this._autoClose&&!r.toggleCondition&&(r.toggleCondition=fw),gw.call(this,r),this.on("select",this.selectCluster.bind(this))};Br(ac,gw);ac.prototype.setMap=function(r){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&Uo(this._listener),this._listener=null,gw.prototype.setMap.call(this,r),this.overlayLayer_.setMap(r),r&&r.getView()&&(this._listener=r.getView().on("change:resolution",this.clear.bind(this)))};ac.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()};ac.prototype.getLayer=function(){return this.overlayLayer_};ac.prototype.selectCluster=function(r){if(r instanceof sr&&(r={selected:[r]}),!r.selected.length){this._autoClose?this.clear():r.deselected.forEach(_=>{_.get("selectcluserfeatures").forEach(B=>{this.overlayLayer_.getSource().removeFeature(B)})});return}var e=r.selected[0];if(!e.get("selectclusterfeature")){var t=this.overlayLayer_.getSource();this._autoClose&&t.clear();var n=e.get("features");if(!(!n||n.length==1)){this.selectCluster_||this.getFeatures().clear();var i=e.getGeometry().getCoordinates(),a=this.getMap().getView().getResolution(),o,s,A,l,u,c,h,f=[];if(!this.spiral||n.length<=this.circleMaxObjects)for(l=Math.min(n.length,this.circleMaxObjects),o=a*this.pointRadius*(.5+l/4),A=0;A<l;A++)s=2*Math.PI*A/l,(l==2||l==4)&&(s+=Math.PI/4),u=[i[0]+o*Math.sin(s),i[1]+o*Math.cos(s)],c=new sr({selectclusterfeature:!0,features:[n[A]],geometry:new pr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new sr({selectclusterlink:!0,geometry:new kr([i,u])}),f.push(h);else{s=0;var p=2*this.pointRadius;for(l=Math.min(this.maxObjects,n.length),A=0;A<l;A++){o=p/2+p*s/(2*Math.PI),s=s+(p+.1)/o;var v=a*o*Math.sin(s),m=a*o*Math.cos(s);u=[i[0]+v,i[1]+m],c=new sr({selectclusterfeature:!0,features:[n[A]],geometry:new pr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new sr({selectclusterlink:!0,geometry:new kr([i,u])}),f.push(h)}}e.set("selectcluserfeatures",f),this.animate?this.animateCluster_(i,f):t.addFeatures(f)}}};ac.prototype.animateCluster_=function(r,e){if(this.listenerKey_&&Uo(this.listenerKey_),!e.length)return;var t=this.overlayLayer_.getStyle(),n=typeof t=="function"?t:t.length?function(){return t}:function(){return[t]},i=this.animationDuration||500,a=new Date().getTime();function o(A){for(var l=A.vectorContext||Fw(A),u=A.frameState.pixelRatio,c=this.getMap().getView().getResolution(),h=rs((A.frameState.time-a)/i),f=0,p;p=e[f];f++)if(p.get("features")){var v=p.getGeometry().getCoordinates();v[0]=r[0]+h*(v[0]-r[0]),v[1]=r[1]+h*(v[1]-r[1]);for(var m=new pr(v),g=n(p,c),_=0;_<g.length;_++){var E,B=yw.prototype.getFeaturesAtPixel?!1:g[_].getImage();B&&(E=B.getScale(),B.setScale(u)),l.setStyle?(l.setStyle(g[_]),l.drawGeometry(m)):(l.setImageStyle(B),l.drawPointGeometry(m)),B&&B.setScale(E)}}if(h>1){Uo(this.listenerKey_),this.overlayLayer_.getSource().addFeatures(e),this.overlayLayer_.changed();return}A.frameState.animate=!0}this.listenerKey_=this.overlayLayer_.on(["postcompose","postrender"],o.bind(this));var s=new sr(new pr(this.getMap().getView().getCenter()));s.setStyle(new Aa({image:new iy({})})),this.overlayLayer_.getSource().addFeature(s)};ac.prototype.getClusterExtent=function(r){if(!r.get("features"))return null;var e=wi();return r.get("features").forEach(function(t){e=ku(e,t.getGeometry().getExtent())}),e[0]===e[2]&&e[1]===e[3]?null:e};const Ylt={name:"ol-interaction-clusterselect",emits:["select"],setup(r,{emit:e}){const t=Be("map"),{properties:n}=gr(r);let i=fr(()=>{let a=new ac(Ms(Dn({},n),{style:new Aa}));return a.on("select",o=>{e("select",o)}),a});fe(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),Je(()=>{t.addInteraction(i.value)}),ar(()=>{t.removeInteraction(i.value)}),Pr("stylable",i)},props:{multi:{type:Boolean,default:!1},condition:{type:Function},filter:{type:Function},pointRadius:{type:Number,default:7},animate:{type:Boolean,default:!0},featureStyle:{type:Function},style:{type:Function}}};function Wlt(r,e,t,n,i,a){return _r(r.$slots,"default")}var BS=ue(Ylt,[["render",Wlt]]);const qlt={name:"ol-interaction-draw",emits:["drawstart","drawend"],setup(r,{emit:e}){const t=Be("map"),n=Be("vectorSource"),{type:i,clickTolerance:a,dragVertexDelay:o,snapTolerance:s,stopClick:A,maxPoints:l,minPoints:u,finishCondition:c,geometryFunction:h,geometryName:f,condition:p,freehand:v,freehandCondition:m,wrapX:g}=Nu(r);let _=()=>{let B=new BI({source:n.value,type:i.value,clickTolerance:a.value,dragVertexDelay:o.value,snapTolerance:s.value,stopClick:A.value,maxPoints:l.value,minPoints:u.value,finishCondition:c.value,geometryFunction:h.value,geometryName:f.value,condition:p.value,freehand:v.value,freehandCondition:m.value,wrapX:g.value});return B.on("drawstart",L=>{e("drawstart",L)}),B.on("drawend",L=>{e("drawend",L)}),B},E=_();fe([i,a,o,s,A,l,u,c,h,f,p,v,m,g],()=>{t.removeInteraction(E),E=_(),t.addInteraction(E),E.changed(),t.changed()}),Je(()=>{t.addInteraction(E)}),ar(()=>{t.removeInteraction(E)}),Pr("stylable",E)},props:{type:{type:String,required:!0},clickTolerance:{type:Number,default:6},dragVertexDelay:{type:Number,default:500},snapTolerance:{type:Number,default:12},stopClick:{type:Boolean,default:!1},maxPoints:{type:Number},minPoints:{type:Number},finishCondition:{type:Function},geometryFunction:{type:Function},geometryName:{type:String},condition:{type:Function},freehand:{type:Boolean,default:!1},freehandCondition:{type:Function},wrapX:{type:Boolean,default:!1}}};function Zlt(r,e,t,n,i,a){return _r(r.$slots,"default")}var TS=ue(qlt,[["render",Zlt]]);const Jlt={name:"ol-interaction-snap",setup(r){const e=Be("map"),t=Be("vectorSource"),{properties:n}=gr(r);let i=()=>new lJ(Ms(Dn({},n),{source:t.value})),a=i();fe(n,()=>{e.removeInteraction(a),a=i(),e.addInteraction(a),e.changed()}),Je(()=>{e.addInteraction(a)}),ar(()=>{e.removeInteraction(a)})},props:{vertex:{type:Boolean,default:!0},edge:{type:Boolean,default:!0},pixelTolerance:{type:Number,default:10}}};function tut(r,e,t,n,i,a){return _r(r.$slots,"default")}var xS=ue(Jlt,[["render",tut]]);const eut={name:"ol-interaction-modify",emits:["modifystart","modifyend"],setup(r,{emit:e}){const t=Be("map"),n=Be("vectorSource"),{features:i,condition:a,deleteCondition:o,insertVertexCondition:s,pixelTolerance:A,wrapX:l,hitDetection:u}=Nu(r);let c=()=>{let f=new TI({source:n.value,features:i.value,condition:a.value,deleteCondition:o.value,insertVertexCondition:s.value,pixelTolerance:A.value,wrapX:l.value,hitDetection:u.value});return f.on("modifystart",p=>{e("modifystart",p)}),f.on("modifyend",p=>{e("modifyend",p)}),f},h=c();fe([a,o,s,A,l,u],()=>{t.removeInteraction(h),h=c(),t.addInteraction(h),h.changed(),t.changed()}),Je(()=>{t.addInteraction(h)}),ar(()=>{t.removeInteraction(h)}),Pr("stylable",h)},props:{condition:{type:Function},deleteCondition:{type:Function},insertVertexCondition:{type:Function},pixelTolerance:{type:Number,default:10},wrapX:{type:Boolean,default:!1},hitDetection:{type:Boolean},features:{type:[Ai,Object]}}};function rut(r,e,t,n,i,a){return _r(r.$slots,"default")}var SS=ue(eut,[["render",rut]]),Xn=function(r){r||(r={});var e=this;this.selection_=new Ai,this.handles_=new Ai,this.overlayLayer_=new dA({source:new Tl({features:this.handles_,useSpatialIndex:!1,wrapX:!1}),name:"Transform overlay",displayInLayerSwitcher:!1,style:function(t){return e.style[(t.get("handle")||"default")+(t.get("constraint")||"")+(t.get("option")||"")]}}),Do.call(this,{handleDownEvent:this.handleDownEvent_,handleDragEvent:this.handleDragEvent_,handleMoveEvent:this.handleMoveEvent_,handleUpEvent:this.handleUpEvent_}),this.features_=r.features,typeof r.filter=="function"&&(this._filter=r.filter),this.layers_=r.layers?r.layers instanceof Array?r.layers:[r.layers]:null,this._handleEvent=r.condition||function(){return!0},this.addFn_=r.addCondition||function(){return!1},this.set("translateFeature",r.translateFeature!==!1),this.set("translate",r.translate!==!1),this.set("translateBBox",r.translateBBox===!0),this.set("stretch",r.stretch!==!1),this.set("scale",r.scale!==!1),this.set("rotate",r.rotate!==!1),this.set("keepAspectRatio",r.keepAspectRatio||function(t){return t.originalEvent.shiftKey}),this.set("modifyCenter",r.modifyCenter||function(t){return t.originalEvent.metaKey||t.originalEvent.ctrlKey}),this.set("noFlip",r.noFlip||!1),this.set("selection",r.selection!==!1),this.set("hitTolerance",r.hitTolerance||0),this.set("enableRotatedTransform",r.enableRotatedTransform||!1),this.set("keepRectangle",r.keepRectangle||!1),this.on("propertychange",function(){this.drawSketch_()}),this.setDefaultStyle()};Br(Xn,Do);Xn.prototype.Cursors={default:"auto",select:"pointer",translate:"move",rotate:"move",rotate0:"move",scale:"nesw-resize",scale1:"nwse-resize",scale2:"nesw-resize",scale3:"nwse-resize",scalev:"ew-resize",scaleh1:"ns-resize",scalev2:"ew-resize",scaleh3:"ns-resize"};Xn.prototype.setMap=function(r){var e=this.getMap();if(e){var t=e.getTargetElement();e.removeLayer(this.overlayLayer_),this.previousCursor_&&t&&(t.style.cursor=this.previousCursor_),this.previousCursor_=void 0}Do.prototype.setMap.call(this,r),this.overlayLayer_.setMap(r),r===null&&this.select(null),r!==null&&(this.isTouch=/touch/.test(r.getViewport().className),this.setDefaultStyle())};Xn.prototype.setActive=function(r){this.select(null),this.overlayLayer_.setVisible(r),Do.prototype.setActive.call(this,r)};Xn.prototype.setDefaultStyle=function(r){r=r||{};var e=r.pointStroke||new Di({color:[255,0,0,1],width:1}),t=r.stroke||new Di({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=r.fill||new ua({color:[255,0,0,.01]}),i=r.pointFill||new ua({color:[255,255,255,.8]}),a=new G0({fill:i,stroke:e,radius:this.isTouch?12:6,displacement:this.isTouch?[24,-24]:[12,-12],points:15});a.setDisplacement||(a.getAnchor()[0]=this.isTouch?-10:-5);var o=new G0({fill:i,stroke:e,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),s=new G0({fill:i,stroke:e,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function A(l,u,c){return[new Aa({image:l,stroke:u,fill:c})]}this.style={default:A(o,t,n),translate:A(o,e,i),rotate:A(a,e,i),rotate0:A(o,e,i),scale:A(o,e,i),scale1:A(o,e,i),scale2:A(o,e,i),scale3:A(o,e,i),scalev:A(s,e,i),scaleh1:A(s,e,i),scalev2:A(s,e,i),scaleh3:A(s,e,i)},this.drawSketch_()};Xn.prototype.setStyle=function(r,e){if(e){e instanceof Array?this.style[r]=e:this.style[r]=[e];for(var t=0;t<this.style[r].length;t++){var n=this.style[r][t].getImage();n&&(r=="rotate"&&(n.getAnchor()[0]=-5),this.isTouch&&n.setScale(1.8));var i=this.style[r][t].getText();i&&(r=="rotate"&&i.setOffsetX(this.isTouch?14:7),this.isTouch&&i.setScale(1.8))}this.drawSketch_()}};Xn.prototype.getFeatureAtPixel_=function(r){var e=this;return this.getMap().forEachFeatureAtPixel(r,function(t,n){var i=!1;if(!n){if(t===e.bbox_)return e.get("translateBBox")?{feature:t,handle:"translate",constraint:"",option:""}:!1;if(e.handles_.forEach(function(o){o===t&&(i=!0)}),i)return{feature:t,handle:t.get("handle"),constraint:t.get("constraint"),option:t.get("option")}}if(!e.get("selection"))return e.selection_.getArray().some(function(o){return t===o})?{feature:t}:null;if(e._filter)return e._filter(t,n)?{feature:t}:null;if(e.layers_){for(var a=0;a<e.layers_.length;a++)if(e.layers_[a]===n)return{feature:t};return null}else return e.features_?(e.features_.forEach(function(o){o===t&&(i=!0)}),i?{feature:t}:null):{feature:t}},{hitTolerance:this.get("hitTolerance")})||{}};Xn.prototype.getGeometryRotateToZero_=function(r,e){var t=r.getGeometry(),n=this.getMap().getView().getRotation();if(n===0||!this.get("enableRotatedTransform"))return e?t.clone():t;var i=t.clone();return i.rotate(n*-1,this.getMap().getView().getCenter()),i};Xn.prototype._isRectangle=function(r){if(this.get("keepRectangle")&&r.getType()==="Polygon"){var e=r.getCoordinates()[0];return e.length===5}return!1};Xn.prototype.drawSketch_=function(r){var e,t,n,i=this.selection_.item(0)&&this._isRectangle(this.selection_.item(0).getGeometry());if(this.overlayLayer_.getSource().clear(),!!this.selection_.getLength()){var a=this.getMap().getView().getRotation(),o=this.getGeometryRotateToZero_(this.selection_.item(0)).getExtent(),s;if(i&&(s=this.getGeometryRotateToZero_(this.selection_.item(0)).getCoordinates()[0].slice(0,4),s.unshift(s[3])),o=Ka(o,0),this.selection_.forEach(function(c){var h=this.getGeometryRotateToZero_(c).getExtent();ku(o,h)}.bind(this)),r===!0)this.ispt_||(this.overlayLayer_.getSource().addFeature(new sr({geometry:new pr(this.center_),handle:"rotate0"})),n=Vu(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new sr(n),this.overlayLayer_.getSource().addFeature(t));else{if(this.ispt_){var A=this.getMap().getPixelFromCoordinate([o[0],o[1]]);A&&(o=Wi([this.getMap().getCoordinateFromPixel([A[0]-10,A[1]-10]),this.getMap().getCoordinateFromPixel([A[0]+10,A[1]+10])]))}n=i?new Fn([s]):Vu(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new sr(n);var l=[],u=n.getCoordinates()[0];if(!this.ispt_){if(l.push(t),!this.iscircle_&&this.get("stretch")&&this.get("scale"))for(e=0;e<u.length-1;e++)t=new sr({geometry:new pr([(u[e][0]+u[e+1][0])/2,(u[e][1]+u[e+1][1])/2]),handle:"scale",constraint:e%2?"h":"v",option:e}),l.push(t);if(this.get("scale"))for(e=0;e<u.length-1;e++)t=new sr({geometry:new pr(u[e]),handle:"scale",option:e}),l.push(t);this.get("translate")&&!this.get("translateFeature")&&(t=new sr({geometry:new pr([(u[0][0]+u[2][0])/2,(u[0][1]+u[2][1])/2]),handle:"translate"}),l.push(t))}!this.iscircle_&&this.get("rotate")&&(t=new sr({geometry:new pr(u[3]),handle:"rotate"}),l.push(t)),this.overlayLayer_.getSource().addFeatures(l)}}};Xn.prototype.select=function(r,e){if(!r){this.selection_.clear(),this.drawSketch_();return}if(!(!r.getGeometry||!r.getGeometry())){if(e)this.selection_.push(r);else{var t=this.selection_.getArray().indexOf(r);this.selection_.removeAt(t)}this.ispt_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Point":!1,this.iscircle_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Circle":!1,this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:r,features:this.selection_})}};Xn.prototype.setSelection=function(r){this.selection_.clear(),r.forEach(function(e){this.selection_.push(e)}.bind(this)),this.ispt_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Point":!1,this.iscircle_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Circle":!1,this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",features:this.selection_})};Xn.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach(function(r){Uo(r)}),this._featureListeners=[],this.selection_.forEach(function(r){this._featureListeners.push(r.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))};Xn.prototype.handleDownEvent_=function(r){if(this._handleEvent(r,this.selection_)){var e=this.getFeatureAtPixel_(r.pixel),t=e.feature;if(this.selection_.getLength()&&this.selection_.getArray().indexOf(t)>=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(e.handle="translate"),e.handle){this.mode_=e.handle,this.opt_=e.option,this.constraint_=e.constraint;var n=this.getMap().getView().getRotation();this.coordinate_=r.coordinate,this.pixel_=r.pixel,this.geoms_=[],this.rotatedGeoms_=[];for(var i=wi(),a=wi(),o=0,s;s=this.selection_.item(o);o++)if(this.geoms_.push(s.getGeometry().clone()),i=ku(i,s.getGeometry().getExtent()),this.get("enableRotatedTransform")&&n!==0){var A=this.getGeometryRotateToZero_(s,!0);this.rotatedGeoms_.push(A),a=ku(a,A.getExtent())}if(this.extent_=Vu(i).getCoordinates()[0],this.get("enableRotatedTransform")&&n!==0&&(this.rotatedExtent_=Vu(a).getCoordinates()[0]),this.mode_==="rotate"){this.center_=this.getCenter()||ba(i);var l=r.map.getTargetElement();l.style.cursor=this.Cursors.rotate0,this.previousCursor_=l.style.cursor}else this.center_=ba(i);return this.angle_=Math.atan2(this.center_[1]-r.coordinate[1],this.center_[0]-r.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:r.pixel,coordinate:r.coordinate}),!0}else if(this.get("selection")){if(t){this.addFn_(r)||this.selection_.clear();var u=this.selection_.getArray().indexOf(t);u<0?this.selection_.push(t):this.selection_.removeAt(u)}else this.selection_.clear();return this.ispt_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Point":!1,this.iscircle_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Circle":!1,this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:t,features:this.selection_,pixel:r.pixel,coordinate:r.coordinate}),!1}}};Xn.prototype.getFeatures=function(){return this.selection_};Xn.prototype.getCenter=function(){return this.get("center")};Xn.prototype.setCenter=function(r){return this.set("center",r)};function HA(r,e){var t=(r[0]*e[0]+r[1]*e[1])/(e[0]*e[0]+e[1]*e[1]);return[e[0]*t,e[1]*t]}function eo(r,e){return[e[0]-r[0],e[1]-r[1]]}function Ma(r,e){return[r[0]+e[0],r[1]+e[1]]}Xn.prototype.handleDragEvent_=function(r){if(this._handleEvent(r,this.features_)){var e=this.getMap().getView().getRotation(),t,n,i,a,o=[this.coordinate_[0],this.coordinate_[1]],s=[r.coordinate[0],r.coordinate[1]];switch(this.isUpdating_=!0,this.mode_){case"rotate":{var A=Math.atan2(this.center_[1]-s[1],this.center_[0]-s[0]);if(!this.ispt)for(t=0,i;i=this.selection_.item(t);t++)a=this.geoms_[t].clone(),a.rotate(A-this.angle_,this.center_),a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),i.setGeometry(a);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:A-this.angle_,pixel:r.pixel,coordinate:r.coordinate});break}case"translate":{var l=s[0]-o[0],u=s[1]-o[1];for(t=0,i;i=this.selection_.item(t);t++)i.getGeometry().translate(l,u);this.handles_.forEach(function(T){T.getGeometry().translate(l,u)}),this.coordinate_=r.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[l,u],pixel:r.pixel,coordinate:r.coordinate});break}case"scale":{var c=this.center_;if(this.get("modifyCenter")(r)){var h=this.extent_;this.get("enableRotatedTransform")&&e!==0&&(h=this.rotatedExtent_),c=h[(Number(this.opt_)+2)%4]}var f=this.geoms_.length==1&&this._isRectangle(this.geoms_[0]),p=this.constraint_,v=this.opt_,m=this.coordinate_,g=r.coordinate;if(this.get("enableRotatedTransform")&&e!==0){var _=new pr(this.coordinate_);_.rotate(e*-1,c),m=_.getCoordinates();var E=new pr(r.coordinate);E.rotate(e*-1,c),g=E.getCoordinates()}var B=(g[0]-c[0])/(m[0]-c[0]),L=(g[1]-c[1])/(m[1]-c[1]),O=[g[0]-m[0],g[1]-m[1]];if(this.get("enableRotatedTransform")&&e!==0){var b=new pr(c);b.rotate(e*-1,this.getMap().getView().getCenter()),c=b.getCoordinates()}for(this.get("noFlip")&&(B<0&&(B=-B),L<0&&(L=-L)),this.constraint_?this.constraint_=="h"?B=1:L=1:this.get("keepAspectRatio")(r)&&(B=L=Math.min(B,L)),t=0,i;i=this.selection_.item(t);t++)a=e===0||!this.get("enableRotatedTransform")?this.geoms_[t].clone():this.rotatedGeoms_[t].clone(),a.applyTransform(function(T,F,M){if(M<2)return F;if(f){var S=[[6],[0,8],[2],[4]],x=[T[0],T[1]],N=[T[2],T[3]],P=[T[4],T[5]],Y=[T[6],T[7]],z=[T[8],T[9]];if(p){var tt=v%2===0?eo(x,N):eo(Y,x),J=HA(O,tt),nt=v+1<S.length?v+1:0,it=[...S[v],...S[nt]];for(n=0;n<T.length;n+=M)F[n]=it.includes(n)?T[n]+J[0]:T[n],F[n+1]=it.includes(n)?T[n+1]+J[1]:T[n+1]}else{var _t,R;switch(v){case 0:O=eo(Y,g),_t=HA(O,eo(P,Y)),R=HA(O,eo(x,Y)),[F[0],F[1]]=Ma(x,_t),[F[4],F[5]]=Ma(P,R),[F[6],F[7]]=Ma(Y,O),[F[8],F[9]]=Ma(z,_t);break;case 1:O=eo(x,g),_t=HA(O,eo(Y,x)),R=HA(O,eo(N,x)),[F[0],F[1]]=Ma(x,O),[F[2],F[3]]=Ma(N,_t),[F[6],F[7]]=Ma(Y,R),[F[8],F[9]]=Ma(z,O);break;case 2:O=eo(N,g),_t=HA(O,eo(x,N)),R=HA(O,eo(P,N)),[F[0],F[1]]=Ma(x,R),[F[2],F[3]]=Ma(N,O),[F[4],F[5]]=Ma(P,_t),[F[8],F[9]]=Ma(z,R);break;case 3:O=eo(P,g),_t=HA(O,eo(N,P)),R=HA(O,eo(Y,P)),[F[2],F[3]]=Ma(N,R),[F[4],F[5]]=Ma(P,O),[F[6],F[7]]=Ma(Y,_t);break}}}else for(n=0;n<T.length;n+=M)B!=1&&(F[n]=c[0]+(T[n]-c[0])*B),L!=1&&(F[n+1]=c[1]+(T[n+1]-c[1])*L);return a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),F}),this.get("enableRotatedTransform")&&e!==0&&a.rotate(e,this.getMap().getView().getCenter()),i.setGeometry(a);this.drawSketch_(),this.dispatchEvent({type:"scaling",feature:this.selection_.item(0),features:this.selection_,scale:[B,L],pixel:r.pixel,coordinate:r.coordinate});break}}this.isUpdating_=!1}};Xn.prototype.handleMoveEvent_=function(r){if(this._handleEvent(r,this.features_)&&!this.mode_){var e=this.getFeatureAtPixel_(r.pixel),t=r.map.getTargetElement();if(e.feature){var n=e.handle?this.Cursors[(e.handle||"default")+(e.constraint||"")+(e.option||"")]:this.Cursors.select;this.previousCursor_===void 0&&(this.previousCursor_=t.style.cursor),t.style.cursor=n}else this.previousCursor_!==void 0&&(t.style.cursor=this.previousCursor_),this.previousCursor_=void 0}};Xn.prototype.handleUpEvent_=function(r){if(this.mode_==="rotate"){var e=r.map.getTargetElement();e.style.cursor=this.Cursors.default,this.previousCursor_=void 0}return this.dispatchEvent({type:this.mode_+"end",feature:this.selection_.item(0),features:this.selection_,oldgeom:this.geoms_[0],oldgeoms:this.geoms_}),this.drawSketch_(),this.mode_=null,!1};Xn.prototype.getFeatures=function(){return this.selection_};const nut={name:"ol-interaction-transform",setup(r){const e=Be("map"),{properties:t}=gr(r);let n=fr(()=>new Xn(Dn({},t)));fe(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),Je(()=>{e.addInteraction(n.value)}),ar(()=>{e.removeInteraction(n.value)}),Pr("stylable",n)},props:{enableRotatedTransform:{type:Boolean,default:!1},condition:{type:Function},addCondition:{type:Function},filter:{type:Function},layers:{type:Array},hitTolerance:{type:Number,default:2},translateFeature:{type:Boolean,default:!0},scale:{type:Boolean,default:!0},rotate:{type:Boolean,default:!0},keepAspectRatio:{type:Boolean,default:!1},translate:{type:Boolean,default:!0},stretch:{type:Boolean,default:!0}}};function iut(r,e,t,n,i,a){return _r(r.$slots,"default")}var bS=ue(nut,[["render",iut]]);const aut={name:"ol-interaction-dragrotatezoom",setup(r){const e=Be("map"),{properties:t}=gr(r);let n=fr(()=>new o3(Dn({},t)));fe(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),Je(()=>{e.addInteraction(n.value)}),ar(()=>{e.removeInteraction(n.value)})},props:{condition:{type:Function},duration:{type:Number,default:400}}};function out(r,e,t,n,i,a){return _r(r.$slots,"default")}var FS=ue(aut,[["render",out]]);function a1(r){a1.installed||(a1.installed=!0,r.component(CS.name,CS),r.component(BS.name,BS),r.component(TS.name,TS),r.component(xS.name,xS),r.component(SS.name,SS),r.component(bS.name,bS),r.component(FS.name,FS))}var sut=Object.freeze(Object.defineProperty({__proto__:null,default:a1,install:a1,SelectInteraction:CS,ClusterSelectInteraction:BS,DrawInteraction:TS,SnapInteraction:xS,ModifyInteraction:SS,TransformInteraction:bS,DragRotateAndZoomInteraction:FS},Symbol.toStringTag,{value:"Module"}));const Aut={setup(){const r=Be("map"),e=Be("vectorLayer");return{map:r,vectorLayer:e}},props:{duration:{type:Number,default:1e3},revers:{type:Boolean,default:!1},repeat:{type:Number,default:0},fade:{type:Function},easing:{type:Function,default:rs}}};function lut(r,e,t,n,i,a){return _r(r.$slots,"default")}var Os=ue(Aut,[["render",lut]]),ki=function(r){r=r||{},this.duration_=typeof r.duration=="number"?r.duration>=0?r.duration:0:1e3,this.fade_=typeof r.fade=="function"?r.fade:null,this.repeat_=Number(r.repeat);var e=typeof r.easing=="function"?r.easing:nI;r.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=r.hiddenStyle,ui.call(this)};Br(ki,ui);ki.hiddenStyle=new Aa({image:new iy({}),stroke:new Di({color:"transparent"})});ki.prototype.drawGeom_=function(r,e,t){this.fade_&&(r.context.globalAlpha=this.fade_(1-r.elapsed));for(var n=r.style,i=0;i<n.length;i++)try{var a=r.vectorContext||Fw(r),o=wx(r,n[i]);a.setStyle(o),o.getZIndex()<0?a.drawGeometry(t||e):a.drawGeometry(e)}catch{}};ki.prototype.animate=function(){return!1};yw.prototype.animateFeature=function(r,e){var t=this._featureAnimationLayer;t||(t=this._featureAnimationLayer=new dA({source:new Tl}),t.setMap(this)),t.getSource().addFeature(r);var n=e.on("animationend",function(i){i.feature===r&&(t.getSource().removeFeature(r),Uo(n))});t.animateFeature(r,e)};KF.prototype.animateFeature=function(r,e,t){var n=this,i,a=r.getStyle(),o=a||(this.getStyleFunction?this.getStyleFunction()(r):null);o||(o=[]),o instanceof Array||(o=[o]);var s={vectorContext:null,frameState:null,start:0,time:0,elapsed:0,extent:!1,feature:r,geom:r.getGeometry(),typeGeom:r.getGeometry().getType(),bbox:r.getGeometry().getExtent(),coord:ba(r.getGeometry().getExtent()),style:o};e instanceof Array||(e=[e]);for(var A=e.length-1;A>=0;A--)e[A].duration_===0&&e.splice(A,1);var l=0,u=0,c=t&&this.getFilters?this.getFilters():[];function h(v){s.type=v.type;try{s.vectorContext=v.vectorContext||Fw(v)}catch{}if(s.frameState=v.frameState,s.inversePixelTransform=v.inversePixelTransform,s.extent||(s.extent=v.frameState.extent,s.start=v.frameState.time,s.context=v.context),s.time=v.frameState.time-s.start,s.elapsed=s.time/e[u].duration_,s.elapsed>1&&(s.elapsed=1),v.context.save(),c.forEach(function(g){g.get("active")&&g.precompose(v)}),this.getOpacity&&(v.context.globalAlpha=this.getOpacity()),!e[u].animate(s))l++,l<e[u].repeat_?s.extent=!1:u<e.length-1?(e[u].dispatchEvent({type:"animationend",feature:r}),u++,l=0,s.extent=!1):f();else{var m={type:"animating",step:u,start:s.start,time:s.time,elapsed:s.elapsed,rotation:s.rotation||0,geom:s.geom,coordinate:s.coord,feature:r};e[u].dispatchEvent(m),n.dispatchEvent(m)}c.forEach(function(g){g.get("active")&&g.postcompose(v)}),v.context.restore(),v.frameState.animate=!0}function f(v){Uo(i),i=null,r.setStyle(a);var m={type:"animationend",feature:r};if(v)for(var g in v)v.hasOwnProperty(g)&&(m[g]=v[g]);e[u].dispatchEvent(m),n.dispatchEvent(m)}function p(v){if(e.length&&!i){if(i=n.on(["postcompose","postrender"],h.bind(n)),n.renderSync)try{n.renderSync()}catch{}else n.changed();r.setStyle(e[u].hiddenStyle||ki.hiddenStyle);var m={type:"animationstart",feature:r};if(v)for(var g in v)v.hasOwnProperty(g)&&(m[g]=v[g]);e[u].dispatchEvent(m),n.dispatchEvent(m)}}return p(),{start:p,stop:f,isPlaying:function(){return!!i}}};var $I=function(r){r=r||{},this.speed_=r.speed||0,ki.call(this,r),this.side_=r.side||"top"};Br($I,ki);$I.prototype.animate=function(r){if(!r.time){var e=r.frameState.viewState.rotation,t=r.frameState.size[1]*r.frameState.viewState.resolution;this.side_!="top"&&(t*=-1),this.dx=-Math.sin(e)*t,this.dy=Math.cos(e)*t,this.speed_&&(this.duration_=t/this.speed_/r.frameState.viewState.resolution)}var n=r.geom.clone();return n.translate(this.dx*(1-this.easing_(r.elapsed)),this.dy*(1-this.easing_(r.elapsed))),this.drawGeom_(r,n,r.geom),r.time<=this.duration_};function Dh(r,e){const{map:t,vectorLayer:n}=Os.setup(),{properties:i}=gr(e),a=fr(()=>new r(Dn({},i)));return Pr("animation",a),{map:t,vectorLayer:n,animation:a,properties:i}}const uut={name:"ol-animation-drop",extends:Os,setup(r){const{map:e,vectorLayer:t,properties:n}=Dh($I,r);return{map:e,vectorLayer:t,properties:n}},props:{side:{type:Number,default:0},speed:{type:Number,default:0}}};function cut(r,e,t,n,i,a){return _r(r.$slots,"default")}var IS=ue(uut,[["render",cut]]),jI=function(r){r=r||{},ki.call(this,r),this.amplitude_=r.amplitude||40,this.bounce_=-Math.PI*(r.bounce||6),this.horizontal_=r.horizontal};Br(jI,ki);jI.prototype.animate=function(r){var e=r.geom.clone(),t=r.geom.clone(),n=this.easing_(r.elapsed);return n=Math.sin(this.bounce_*n)*this.amplitude_*(1-n)*r.frameState.viewState.resolution,this.horizontal_?(e.translate(n,0),t.translate(n,0)):e.translate(0,n),this.drawGeom_(r,e,t),r.time<=this.duration_};const hut={name:"ol-animation-shake",extends:Os,setup(r){const{map:e,vectorLayer:t,properties:n,animation:i}=Dh(jI,r);return{map:e,vectorLayer:t,properties:n,animation:i}},props:{bounce:{type:Number,default:6},amplitude:{type:Number,default:40},horizontal:{type:Boolean,default:!1}}};function fut(r,e,t,n,i,a){return _r(r.$slots,"default")}var LS=ue(hut,[["render",fut]]),fy=function(r){r=r||{},ki.call(this,r),this.set("zoomout",r.zoomOut)};Br(fy,ki);var put=function(r){r=r||{},r.zoomOut=!0,fy.call(this,r)};Br(put,fy);fy.prototype.animate=function(r){var e=this.easing_(r.elapsed);if(e){this.get("zoomout")&&(e=1/e);var t=r.style,n,i,a=[];for(n=0;n<t.length;n++)i=t[n].getImage(),i&&(a[n]=i.getScale(),r.type==="postrender"?i.setScale(a[n]*e/r.frameState.pixelRatio):i.setScale(a[n]*e));for(this.drawGeom_(r,r.geom),n=0;n<t.length;n++)i=t[n].getImage(),i&&i.setScale(a[n])}return r.time<=this.duration_};const dut={name:"ol-animation-zoom",extends:Os,setup(r){const{map:e,vectorLayer:t,properties:n}=Dh(fy,r);return{map:e,vectorLayer:t,properties:n}},props:{zoomOut:{type:Boolean,default:!1}}};function vut(r,e,t,n,i,a){return _r(r.$slots,"default")}var OS=ue(dut,[["render",vut]]),VI=function(r){ki.call(this,r)};Br(VI,ki);VI.prototype.animate=function(r){var e=this.easing_(r.elapsed);if(e){r.context.save();var t=r.frameState.pixelRatio;r.context.globalAlpha=e,r.context.scale(e,1/e);var n=r.frameState.coordinateToPixelTransform,i=(1/e-1)*t*(n[0]*r.coord[0]+n[1]*r.coord[1]+n[4]),a=(e-1)*t*(n[2]*r.coord[0]+n[3]*r.coord[1]+n[5]);r.context.translate(i,a),this.drawGeom_(r,r.geom),r.context.restore()}return r.time<=this.duration_};const gut={name:"ol-animation-teleport",extends:Os,setup(r){const{map:e,vectorLayer:t,properties:n}=Dh(VI,r);return{map:e,vectorLayer:t,properties:n}},props:{}};function yut(r,e,t,n,i,a){return _r(r.$slots,"default")}var RS=ue(gut,[["render",yut]]),KI=function(r){r=r||{},this.speed_=r.speed||0,ki.call(this,r)};Br(KI,ki);KI.prototype.animate=function(r){return r.context.globalAlpha=this.easing_(r.elapsed),this.drawGeom_(r,r.geom),r.time<=this.duration_};const mut={name:"ol-animation-fade",extends:Os,setup(r){const{map:e,vectorLayer:t,properties:n}=Dh(KI,r);return{map:e,vectorLayer:t,properties:n}}};function _ut(r,e,t,n,i,a){return _r(r.$slots,"default")}var MS=ue(mut,[["render",_ut]]),zI=function(r){r=r||{},this.speed_=r.speed||0,ki.call(this,r),this.side_=r.side||"left"};Br(zI,ki);zI.prototype.animate=function(r){r.time||(this.side_=="left"?this.dx=r.extent[0]-r.bbox[2]:this.dx=r.extent[2]-r.bbox[0],this.speed_&&(this.duration_=Math.abs(this.dx)/this.speed_/r.frameState.viewState.resolution));var e=r.geom.clone();return e.translate(this.dx*(1-this.easing_(r.elapsed)),0),this.drawGeom_(r,e),r.time<=this.duration_};const wut={name:"ol-animation-slide",extends:Os,setup(r){const{map:e,vectorLayer:t,properties:n}=Dh(zI,r);return{map:e,vectorLayer:t,properties:n}},props:{speed:{type:Number,default:0}}};function Eut(r,e,t,n,i,a){return _r(r.$slots,"default")}var NS=ue(wut,[["render",Eut]]),XI=function(r){switch(r=r||{},ki.call(this,r),this.speed_=r.speed||0,this.path_=r.path,r.rotate){case!0:case 0:this.rotate_=0;break;default:this.rotate_=r.rotate||!1;break}this.path_&&this.path_.getGeometry&&(this.path_=this.path_.getGeometry()),this.path_&&this.path_.getLineString&&(this.path_=this.path_.getLineString()),this.path_.getLength?(this.dist_=this.path_.getLength(),this.path_&&this.path_.getCoordinates&&(this.path_=this.path_.getCoordinates())):this.dist_=0,this.speed_>0&&(this.duration_=this.dist_/this.speed_)};Br(XI,ki);XI.prototype.animate=function(r){if(!r.time&&!this.dist_)return!1;var e=this.dist_*this.easing_(r.elapsed),t,n,i,a,o,s,A=0;n=this.path_[0];for(var l=1;l<this.path_.length;l++){if(t=n,n=this.path_[l],a=n[0]-t[0],o=n[1]-t[1],s=Math.sqrt(a*a+o*o),s&&A+s>=e){i=(e-A)/s,n=[t[0]+(n[0]-t[0])*i,t[1]+(n[1]-t[1])*i];break}A+=s}var u=r.style;if(r.rotation=Math.PI/2+Math.atan2(t[1]-n[1],t[0]-n[0]),this.rotate_!==!1){var c=[],h=this.rotate_-r.rotation+r.frameState.viewState.rotation;r.rotation=Math.PI/2+Math.atan2(t[1]-n[1],t[0]-n[0]);for(var f=0;i=r.style[f];f++)i.getImage()&&i.getImage().setRotation(h),c.push(i);r.style=c}return r.geom.setCoordinates(n),this.drawGeom_(r,r.geom),r.style=u,r.time<=this.duration_};const Cut={name:"ol-animation-path",extends:Os,setup(r){const{map:e,vectorLayer:t,properties:n}=Dh(XI,r);return{map:e,vectorLayer:t,properties:n}},props:{rotate:{type:Boolean,default:!1},speed:{type:Number,default:0},path:{type:Object}}};function But(r,e,t,n,i,a){return _r(r.$slots,"default")}var PS=ue(Cut,[["render",But]]);function o1(r){o1.installed||(o1.installed=!0,r.component(Os.name,Os),r.component(IS.name,IS),r.component(LS.name,LS),r.component(OS.name,OS),r.component(RS.name,RS),r.component(MS.name,MS),r.component(NS.name,NS),r.component(PS.name,PS))}var Tut=Object.freeze(Object.defineProperty({__proto__:null,default:o1,install:o1,FeatureAnimation:Os,DropAnimation:IS,ShakeAnimation:LS,ZoomAnimation:OS,TeleportAnimation:RS,FadeAnimation:MS,PathAnimation:PS,SlideAnimation:NS},Symbol.toStringTag,{value:"Module"})),xut=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Sut=function(r){xut(e,r);function e(t){var n=r.call(this)||this;return n.geometries_=t||null,n.changeEventsKeys_=[],n.listenGeometriesChange_(),n}return e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(Nr),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,n=this.geometries_.length;t<n;++t)this.changeEventsKeys_.push(Ue(this.geometries_[t],me.CHANGE,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){if(a<tc(this.getExtent(),t,n))return a;for(var o=this.geometries_,s=0,A=o.length;s<A;++s)a=o[s].closestPointXY(t,n,i,a);return a},e.prototype.containsXY=function(t,n){for(var i=this.geometries_,a=0,o=i.length;a<o;++a)if(i[a].containsXY(t,n))return!0;return!1},e.prototype.computeExtent=function(t){ec(t);for(var n=this.geometries_,i=0,a=n.length;i<a;++i)ku(t,n[i].getExtent());return t},e.prototype.getGeometries=function(){return UN(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],n=this.geometries_,i=0,a=n.length;i<a;++i)n[i].getType()===this.getType()?t=t.concat(n[i].getGeometriesArrayRecursive()):t.push(n[i]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var n=[],i=this.geometries_,a=!1,o=0,s=i.length;o<s;++o){var A=i[o],l=A.getSimplifiedGeometry(t);n.push(l),l!==A&&(a=!0)}if(a){var u=new e(null);return u.setGeometriesArray(n),u}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return st.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var n=this.geometries_,i=0,a=n.length;i<a;++i)if(n[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return this.geometries_.length===0},e.prototype.rotate=function(t,n){for(var i=this.geometries_,a=0,o=i.length;a<o;++a)i[a].rotate(t,n);this.changed()},e.prototype.scale=function(t,n,i){var a=i;a||(a=ba(this.getExtent()));for(var o=this.geometries_,s=0,A=o.length;s<A;++s)o[s].scale(t,n,a);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(UN(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var n=this.geometries_,i=0,a=n.length;i<a;++i)n[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,n){for(var i=this.geometries_,a=0,o=i.length;a<o;++a)i[a].translate(t,n);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),r.prototype.disposeInternal.call(this)},e}(Aw);function UN(r){for(var e=[],t=0,n=r.length;t<n;++t)e.push(r[t].clone());return e}var la=Sut,but=Object.freeze(Object.defineProperty({__proto__:null,Circle:mI,Geometry:Aw,GeometryCollection:la,LinearRing:Ip,LineString:kr,MultiLineString:Fa,MultiPoint:ns,MultiPolygon:Ia,Point:pr,Polygon:Fn,SimpleGeometry:Ls},Symbol.toStringTag,{value:"Module"})),Fut=function(){function r(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return r.prototype.getReadOptions=function(e,t){var n;if(t){var i=t.dataProjection?Re(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()===Ga.TILE_PIXELS&&(i=Re(i),i.setWorldExtent(t.extent)),n={dataProjection:i,featureProjection:t.featureProjection}}return this.adaptOptions(n)},r.prototype.adaptOptions=function(e){return ve({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)},r.prototype.getType=function(){return Te()},r.prototype.readFeature=function(e,t){return Te()},r.prototype.readFeatures=function(e,t){return Te()},r.prototype.readGeometry=function(e,t){return Te()},r.prototype.readProjection=function(e){return Te()},r.prototype.writeFeature=function(e,t){return Te()},r.prototype.writeFeatures=function(e,t){return Te()},r.prototype.writeGeometry=function(e,t){return Te()},r}(),py=Fut;function On(r,e,t){var n=t?Re(t.featureProjection):null,i=t?Re(t.dataProjection):null,a;if(n&&i&&!Zs(n,i)?a=(e?r.clone():r).transform(e?n:i,e?i:n):a=r,e&&t&&t.decimals!==void 0){var o=Math.pow(10,t.decimals),s=function(A){for(var l=0,u=A.length;l<u;++l)A[l]=Math.round(A[l]*o)/o;return A};a===r&&(a=r.clone()),a.applyTransform(s)}return a}function YI(r,e){var t=e?Re(e.featureProjection):null,n=e?Re(e.dataProjection):null;return t&&n&&!Zs(t,n)?O_(r,n,t):r}var Iut=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Lut=function(r){Iut(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return Ts.JSON},e.prototype.readFeature=function(t,n){return this.readFeatureFromObject(Vm(t),this.getReadOptions(t,n))},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(Vm(t),this.getReadOptions(t,n))},e.prototype.readFeatureFromObject=function(t,n){return Te()},e.prototype.readFeaturesFromObject=function(t,n){return Te()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(Vm(t),this.getReadOptions(t,n))},e.prototype.readGeometryFromObject=function(t,n){return Te()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(Vm(t))},e.prototype.readProjectionFromObject=function(t){return Te()},e.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},e.prototype.writeFeatureObject=function(t,n){return Te()},e.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},e.prototype.writeFeaturesObject=function(t,n){return Te()},e.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},e.prototype.writeGeometryObject=function(t,n){return Te()},e}(py);function Vm(r){if(typeof r=="string"){var e=JSON.parse(r);return e||null}else return r!==null?r:null}var WI=Lut,Out=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Qh={};Qh[st.POINT]=Nut;Qh[st.LINE_STRING]=Put;Qh[st.POLYGON]=Hut;Qh[st.MULTI_POINT]=Dut;Qh[st.MULTI_LINE_STRING]=Uut;Qh[st.MULTI_POLYGON]=Qut;var Hh={};Hh[st.POINT]=Gut;Hh[st.LINE_STRING]=kut;Hh[st.POLYGON]=$ut;Hh[st.MULTI_POINT]=Vut;Hh[st.MULTI_LINE_STRING]=jut;Hh[st.MULTI_POLYGON]=Kut;var Rut=function(r){Out(e,r);function e(t){var n=this,i=t||{};return n=r.call(this)||this,n.geometryName_=i.geometryName,n}return e.prototype.readFeatureFromObject=function(t,n,i){var a=t,o=DN(a.geometry,n),s=new sr;if(this.geometryName_&&s.setGeometryName(this.geometryName_),s.setGeometry(o),a.attributes){s.setProperties(a.attributes,!0);var A=a.attributes[i];A!==void 0&&s.setId(A)}return s},e.prototype.readFeaturesFromObject=function(t,n){var i=n||{};if(t.features){for(var a=t,o=[],s=a.features,A=0,l=s.length;A<l;++A)o.push(this.readFeatureFromObject(s[A],i,t.objectIdFieldName));return o}else return[this.readFeatureFromObject(t,i)]},e.prototype.readGeometryFromObject=function(t,n){return DN(t,n)},e.prototype.readProjectionFromObject=function(t){if(t.spatialReference&&t.spatialReference.wkid!==void 0){var n=t.spatialReference,i=n.wkid;return Re("EPSG:"+i)}else return null},e.prototype.writeGeometryObject=function(t,n){return QN(t,this.adaptOptions(n))},e.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={};if(!t.hasProperties())return i.attributes={},i;var a=t.getProperties(),o=t.getGeometry();if(o){i.geometry=QN(o,n);var s=n&&(n.dataProjection||n.featureProjection);s&&(i.geometry.spatialReference={wkid:Number(Re(s).getCode().split(":").pop())}),delete a[t.getGeometryName()]}return dh(a)?i.attributes={}:i.attributes=a,i},e.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],a=0,o=t.length;a<o;++a)i.push(this.writeFeatureObject(t[a],n));return{features:i}},e}(WI);function DN(r,e){var t,n;if(!r)return null;var i;if(typeof r.x=="number"&&typeof r.y=="number")i=st.POINT;else if(r.points)i=st.MULTI_POINT;else if(r.paths){var a=r;a.paths.length===1?i=st.LINE_STRING:i=st.MULTI_LINE_STRING}else if(r.rings){var o=r,s=qp(o),A=Mut(o.rings,s);A.length===1?(i=st.POLYGON,r=ve({},r,(t={},t.rings=A[0],t))):(i=st.MULTI_POLYGON,r=ve({},r,(n={},n.rings=A,n)))}var l=Qh[i];return On(l(r),!1,e)}function Mut(r,e){var t=[],n=[],i=[],a,o;for(a=0,o=r.length;a<o;++a){t.length=0,ry(t,0,r[a],e.length);var s=uw(t,0,t.length,e.length);s?n.push([r[a]]):i.push(r[a])}for(;i.length;){var A=i.shift(),l=!1;for(a=n.length-1;a>=0;a--){var u=n[a][0],c=Oo(new Ip(u).getExtent(),new Ip(A).getExtent());if(c){n[a].push(A),l=!0;break}}l||n.push([A.reverse()])}return n}function Nut(r){var e;return r.m!==void 0&&r.z!==void 0?e=new pr([r.x,r.y,r.z,r.m],qt.XYZM):r.z!==void 0?e=new pr([r.x,r.y,r.z],qt.XYZ):r.m!==void 0?e=new pr([r.x,r.y,r.m],qt.XYM):e=new pr([r.x,r.y]),e}function Put(r){var e=qp(r);return new kr(r.paths[0],e)}function Uut(r){var e=qp(r);return new Fa(r.paths,e)}function qp(r){var e=qt.XY;return r.hasZ===!0&&r.hasM===!0?e=qt.XYZM:r.hasZ===!0?e=qt.XYZ:r.hasM===!0&&(e=qt.XYM),e}function Dut(r){var e=qp(r);return new ns(r.points,e)}function Qut(r){var e=qp(r);return new Ia(r.rings,e)}function Hut(r){var e=qp(r);return new Fn(r.rings,e)}function Gut(r,e){var t=r.getCoordinates(),n,i=r.getLayout();return i===qt.XYZ?n={x:t[0],y:t[1],z:t[2]}:i===qt.XYM?n={x:t[0],y:t[1],m:t[2]}:i===qt.XYZM?n={x:t[0],y:t[1],z:t[2],m:t[3]}:i===qt.XY?n={x:t[0],y:t[1]}:we(!1,34),n}function dy(r){var e=r.getLayout();return{hasZ:e===qt.XYZ||e===qt.XYZM,hasM:e===qt.XYM||e===qt.XYZM}}function kut(r,e){var t=dy(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:[r.getCoordinates()]}}function $ut(r,e){var t=dy(r);return{hasZ:t.hasZ,hasM:t.hasM,rings:r.getCoordinates(!1)}}function jut(r,e){var t=dy(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:r.getCoordinates()}}function Vut(r,e){var t=dy(r);return{hasZ:t.hasZ,hasM:t.hasM,points:r.getCoordinates()}}function Kut(r,e){for(var t=dy(r),n=r.getCoordinates(!1),i=[],a=0;a<n.length;a++)for(var o=n[a].length-1;o>=0;o--)i.push(n[a][o]);return{hasZ:t.hasZ,hasM:t.hasM,rings:i}}function QN(r,e){var t=Hh[r.getType()];return t(On(r,!0,e),e)}var zut=Rut,Xut=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Yut=function(r){Xut(e,r);function e(t){var n=this,i=t||{};return n=r.call(this)||this,n.dataProjection=Re(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(n.defaultFeatureProjection=Re(i.featureProjection)),n.geometryName_=i.geometryName,n.extractGeometryName_=i.extractGeometryName,n.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],n}return e.prototype.readFeatureFromObject=function(t,n){var i=null;t.type==="Feature"?i=t:i={type:"Feature",geometry:t,properties:null};var a=US(i.geometry,n),o=new sr;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&o.setGeometryName(i.geometry_name),o.setGeometry(a),"id"in i&&o.setId(i.id),i.properties&&o.setProperties(i.properties,!0),o},e.prototype.readFeaturesFromObject=function(t,n){var i=t,a=null;if(i.type==="FeatureCollection"){var o=t;a=[];for(var s=o.features,A=0,l=s.length;A<l;++A)a.push(this.readFeatureFromObject(s[A],n))}else a=[this.readFeatureFromObject(t,n)];return a},e.prototype.readGeometryFromObject=function(t,n){return US(t,n)},e.prototype.readProjectionFromObject=function(t){var n=t.crs,i;return n?n.type=="name"?i=Re(n.properties.name):n.type==="EPSG"?i=Re("EPSG:"+n.properties.code):we(!1,36):i=this.dataProjection,i},e.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={type:"Feature",geometry:null,properties:null},a=t.getId();if(a!==void 0&&(i.id=a),!t.hasProperties())return i;var o=t.getProperties(),s=t.getGeometry();return s&&(i.geometry=DS(s,n),delete o[t.getGeometryName()]),dh(o)||(i.properties=o),i},e.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],a=0,o=t.length;a<o;++a)i.push(this.writeFeatureObject(t[a],n));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,n){return DS(t,this.adaptOptions(n))},e}(WI);function US(r,e){if(!r)return null;var t;switch(r.type){case st.POINT:{t=qut(r);break}case st.LINE_STRING:{t=Zut(r);break}case st.POLYGON:{t=rct(r);break}case st.MULTI_POINT:{t=tct(r);break}case st.MULTI_LINE_STRING:{t=Jut(r);break}case st.MULTI_POLYGON:{t=ect(r);break}case st.GEOMETRY_COLLECTION:{t=Wut(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return On(t,!1,e)}function Wut(r,e){var t=r.geometries.map(function(n){return US(n,e)});return new la(t)}function qut(r){return new pr(r.coordinates)}function Zut(r){return new kr(r.coordinates)}function Jut(r){return new Fa(r.coordinates)}function tct(r){return new ns(r.coordinates)}function ect(r){return new Ia(r.coordinates)}function rct(r){return new Fn(r.coordinates)}function DS(r,e){r=On(r,!0,e);var t=r.getType(),n;switch(t){case st.POINT:{n=Act(r);break}case st.LINE_STRING:{n=ict(r);break}case st.POLYGON:{n=lct(r,e);break}case st.MULTI_POINT:{n=oct(r);break}case st.MULTI_LINE_STRING:{n=act(r);break}case st.MULTI_POLYGON:{n=sct(r,e);break}case st.GEOMETRY_COLLECTION:{n=nct(r,e);break}case st.CIRCLE:{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return n}function nct(r,e){var t=r.getGeometriesArray().map(function(n){var i=ve({},e);return delete i.featureProjection,DS(n,i)});return{type:"GeometryCollection",geometries:t}}function ict(r,e){return{type:"LineString",coordinates:r.getCoordinates()}}function act(r,e){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function oct(r,e){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function sct(r,e){var t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(t)}}function Act(r,e){return{type:"Point",coordinates:r.getCoordinates()}}function lct(r,e){var t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(t)}}var uct=Yut,wh="http://www.w3.org/2001/XMLSchema-instance";function $e(r,e){return Zp().createElementNS(r,e)}function Xa(r,e){return K8(r,e,[]).join("")}function K8(r,e,t){if(r.nodeType==Node.CDATA_SECTION_NODE||r.nodeType==Node.TEXT_NODE)e?t.push(String(r.nodeValue).replace(/(\r\n|\r|\n)/g,"")):t.push(r.nodeValue);else{var n=void 0;for(n=r.firstChild;n;n=n.nextSibling)K8(n,e,t)}return t}function aA(r){return"documentElement"in r}function cct(r,e,t){return r.getAttributeNS(e,t)||""}function oA(r){return new DOMParser().parseFromString(r,"application/xml")}function HN(r,e){return function(t,n){var i=r.call(e!==void 0?e:this,t,n);if(i!==void 0){var a=n[n.length-1];Gr(a,i)}}}function _e(r,e){return function(t,n){var i=r.call(e!==void 0?e:this,t,n);if(i!==void 0){var a=n[n.length-1];a.push(i)}}}function Oe(r,e){return function(t,n){var i=r.call(e!==void 0?e:this,t,n);i!==void 0&&(n[n.length-1]=i)}}function yn(r,e,t){return function(n,i){var a=r.call(t!==void 0?t:this,n,i);if(a!==void 0){var o=i[i.length-1],s=e!==void 0?e:n.localName,A=void 0;s in o?A=o[s]:(A=[],o[s]=A),A.push(a)}}}function ot(r,e,t){return function(n,i){var a=r.call(t!==void 0?t:this,n,i);if(a!==void 0){var o=i[i.length-1],s=e!==void 0?e:n.localName;o[s]=a}}}function At(r,e){return function(t,n,i){r.call(e!==void 0?e:this,t,n,i);var a=i[i.length-1],o=a.node;o.appendChild(t)}}function z8(r,e){var t,n;return function(i,a,o){if(t===void 0){t={};var s={};s[i.localName]=r,t[i.namespaceURI]=s,n=Pn(i.localName)}X8(t,n,a,o)}}function Pn(r,e){var t=r;return function(n,i,a){var o=i[i.length-1],s=o.node,A=t;A===void 0&&(A=a);var l=e!==void 0?e:s.namespaceURI;return $e(l,A)}}var Ji=Pn();function po(r,e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=r[e[i]];return n}function Nt(r,e,t){var n=t!==void 0?t:{},i,a;for(i=0,a=r.length;i<a;++i)n[r[i]]=e;return n}function uo(r,e,t,n){var i;for(i=e.firstElementChild;i;i=i.nextElementSibling){var a=r[i.namespaceURI];if(a!==void 0){var o=a[i.localName];o!==void 0&&o.call(n,i,t)}}}function kt(r,e,t,n,i){return n.push(r),uo(e,t,n,i),n.pop()}function X8(r,e,t,n,i,a){for(var o=(i!==void 0?i:t).length,s,A,l=0;l<o;++l)s=t[l],s!==void 0&&(A=e.call(a!==void 0?a:this,s,n,i!==void 0?i[l]:void 0),A!==void 0&&r[A.namespaceURI][A.localName].call(a,A,s,n))}function ke(r,e,t,n,i,a,o){return i.push(r),X8(e,t,n,i,a,o),i.pop()}var nB=void 0;function hct(){return nB===void 0&&typeof XMLSerializer<"u"&&(nB=new XMLSerializer),nB}var iB=void 0;function Zp(){return iB===void 0&&typeof document<"u"&&(iB=document.implementation.createDocument("","",null)),iB}var fct=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),pct=function(r){fct(e,r);function e(){var t=r.call(this)||this;return t.xmlSerializer_=hct(),t}return e.prototype.getType=function(){return Ts.XML},e.prototype.readFeature=function(t,n){if(t)if(typeof t=="string"){var i=oA(t);return this.readFeatureFromDocument(i,n)}else return aA(t)?this.readFeatureFromDocument(t,n):this.readFeatureFromNode(t,n);else return null},e.prototype.readFeatureFromDocument=function(t,n){var i=this.readFeaturesFromDocument(t,n);return i.length>0?i[0]:null},e.prototype.readFeatureFromNode=function(t,n){return null},e.prototype.readFeatures=function(t,n){if(t)if(typeof t=="string"){var i=oA(t);return this.readFeaturesFromDocument(i,n)}else return aA(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n);else return[]},e.prototype.readFeaturesFromDocument=function(t,n){for(var i=[],a=t.firstChild;a;a=a.nextSibling)a.nodeType==Node.ELEMENT_NODE&&Gr(i,this.readFeaturesFromNode(a,n));return i},e.prototype.readFeaturesFromNode=function(t,n){return Te()},e.prototype.readGeometry=function(t,n){if(t)if(typeof t=="string"){var i=oA(t);return this.readGeometryFromDocument(i,n)}else return aA(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n);else return null},e.prototype.readGeometryFromDocument=function(t,n){return null},e.prototype.readGeometryFromNode=function(t,n){return null},e.prototype.readProjection=function(t){if(t)if(typeof t=="string"){var n=oA(t);return this.readProjectionFromDocument(n)}else return aA(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t);else return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,n){var i=this.writeFeatureNode(t,n);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeatureNode=function(t,n){return null},e.prototype.writeFeatures=function(t,n){var i=this.writeFeaturesNode(t,n);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeaturesNode=function(t,n){return null},e.prototype.writeGeometry=function(t,n){var i=this.writeGeometryNode(t,n);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeGeometryNode=function(t,n){return null},e}(py),vy=pct,dct=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Al="http://www.opengis.net/gml",vct=/^[\s\xa0]*$/,Kn=function(r){dct(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.featureType=i.featureType,n.featureNS=i.featureNS,n.srsName=i.srsName,n.schemaLocation="",n.FEATURE_COLLECTION_PARSERS={},n.FEATURE_COLLECTION_PARSERS[n.namespace]={featureMember:_e(n.readFeaturesInternal),featureMembers:Oe(n.readFeaturesInternal)},n.supportedMediaTypes=["application/gml+xml"],n}return e.prototype.readFeaturesInternal=function(t,n){var i=t.localName,a=null;if(i=="FeatureCollection")a=kt([],this.FEATURE_COLLECTION_PARSERS,t,n,this);else if(i=="featureMembers"||i=="featureMember"||i=="member"){var o=n[0],s=o.featureType,A=o.featureNS,l="p",u="p0";if(!s&&t.childNodes){s=[],A={};for(var c=0,h=t.childNodes.length;c<h;++c){var f=t.childNodes[c];if(f.nodeType===1){var p=f.nodeName.split(":").pop();if(s.indexOf(p)===-1){var v="",m=0,g=f.namespaceURI;for(var _ in A){if(A[_]===g){v=_;break}++m}v||(v=l+m,A[v]=g),s.push(v+":"+p)}}}i!="featureMember"&&(o.featureType=s,o.featureNS=A)}if(typeof A=="string"){var E=A;A={},A[u]=E}var B={},L=Array.isArray(s)?s:[s];for(var O in A){for(var b={},c=0,h=L.length;c<h;++c){var T=L[c].indexOf(":")===-1?u:L[c].split(":")[0];T===O&&(b[L[c].split(":").pop()]=i=="featureMembers"?_e(this.readFeatureElement,this):Oe(this.readFeatureElement,this))}B[A[O]]=b}i=="featureMember"||i=="member"?a=kt(void 0,B,t,n):a=kt([],B,t,n)}return a===null&&(a=[]),a},e.prototype.readGeometryOrExtent=function(t,n){var i=n[0];return i.srsName=t.firstElementChild.getAttribute("srsName"),i.srsDimension=t.firstElementChild.getAttribute("srsDimension"),kt(null,this.GEOMETRY_PARSERS,t,n,this)},e.prototype.readExtentElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?YI(a,i):void 0},e.prototype.readGeometryElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?On(a,!1,i):void 0},e.prototype.readFeatureElementInternal=function(t,n,i){for(var a,o={},s=t.firstElementChild;s;s=s.nextElementSibling){var A=void 0,l=s.localName;s.childNodes.length===0||s.childNodes.length===1&&(s.firstChild.nodeType===3||s.firstChild.nodeType===4)?(A=Xa(s,!1),vct.test(A)&&(A=void 0)):(i&&(A=l==="boundedBy"?this.readExtentElement(s,n):this.readGeometryElement(s,n)),A?l!=="boundedBy"&&(a=l):A=this.readFeatureElementInternal(s,n,!1)),o[l]?(o[l]instanceof Array||(o[l]=[o[l]]),o[l].push(A)):o[l]=A;var u=s.attributes.length;if(u>0){o[l]={_content_:o[l]};for(var c=0;c<u;c++){var h=s.attributes[c].name;o[l][h]=s.attributes[c].value}}}if(i){var f=new sr(o);a&&f.setGeometryName(a);var p=t.getAttribute("fid")||cct(t,this.namespace,"id");return p&&f.setId(p),f}else return o},e.prototype.readFeatureElement=function(t,n){return this.readFeatureElementInternal(t,n,!0)},e.prototype.readPoint=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new pr(i,qt.XYZ)},e.prototype.readMultiPoint=function(t,n){var i=kt([],this.MULTIPOINT_PARSERS,t,n,this);if(i)return new ns(i)},e.prototype.readMultiLineString=function(t,n){var i=kt([],this.MULTILINESTRING_PARSERS,t,n,this);if(i)return new Fa(i)},e.prototype.readMultiPolygon=function(t,n){var i=kt([],this.MULTIPOLYGON_PARSERS,t,n,this);if(i)return new Ia(i)},e.prototype.pointMemberParser=function(t,n){uo(this.POINTMEMBER_PARSERS,t,n,this)},e.prototype.lineStringMemberParser=function(t,n){uo(this.LINESTRINGMEMBER_PARSERS,t,n,this)},e.prototype.polygonMemberParser=function(t,n){uo(this.POLYGONMEMBER_PARSERS,t,n,this)},e.prototype.readLineString=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i){var a=new kr(i,qt.XYZ);return a}else return},e.prototype.readFlatLinearRing=function(t,n){var i=kt(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this);if(i)return i},e.prototype.readLinearRing=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new Ip(i,qt.XYZ)},e.prototype.readPolygon=function(t,n){var i=kt([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this);if(i&&i[0]){var a=i[0],o=[a.length],s=void 0,A=void 0;for(s=1,A=i.length;s<A;++s)Gr(a,i[s]),o.push(a.length);return new Fn(a,qt.XYZ,o)}else return},e.prototype.readFlatCoordinatesFromNode=function(t,n){return kt(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},e.prototype.readGeometryFromNode=function(t,n){var i=this.readGeometryElement(t,[this.getReadOptions(t,n||{})]);return i||null},e.prototype.readFeaturesFromNode=function(t,n){var i={featureType:this.featureType,featureNS:this.featureNS};n&&ve(i,this.getReadOptions(t,n));var a=this.readFeaturesInternal(t,[i]);return a||[]},e.prototype.readProjectionFromNode=function(t){return Re(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(vy);Kn.prototype.namespace=Al;Kn.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}};Kn.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}};Kn.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}};Kn.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:_e(Kn.prototype.pointMemberParser),pointMembers:_e(Kn.prototype.pointMemberParser)}};Kn.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:_e(Kn.prototype.lineStringMemberParser),lineStringMembers:_e(Kn.prototype.lineStringMemberParser)}};Kn.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:_e(Kn.prototype.polygonMemberParser),polygonMembers:_e(Kn.prototype.polygonMemberParser)}};Kn.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:_e(Kn.prototype.readFlatCoordinatesFromNode)}};Kn.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:_e(Kn.prototype.readLineString)}};Kn.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:_e(Kn.prototype.readPolygon)}};Kn.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Oe(Kn.prototype.readFlatLinearRing)}};var ur=Kn;function Wu(r){var e=Xa(r,!1);return nh(e)}function nh(r){var e=/^\s*(true|1)|(false|0)\s*$/.exec(r);if(e)return e[1]!==void 0||!1}function qI(r){var e=Xa(r,!1),t=Date.parse(e);return isNaN(t)?void 0:t/1e3}function Lr(r){var e=Xa(r,!1);return ZA(e)}function ZA(r){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(r);if(e)return parseFloat(e[1])}function oi(r){var e=Xa(r,!1);return el(e)}function el(r){var e=/^\s*(\d+)\s*$/.exec(r);if(e)return parseInt(e[1],10)}function jt(r){return Xa(r,!1).trim()}function Up(r,e){Qe(r,e?"1":"0")}function gct(r,e){r.appendChild(Zp().createCDATASection(e))}function yct(r,e){var t=new Date(e*1e3),n=t.getUTCFullYear()+"-"+jd(t.getUTCMonth()+1,2)+"-"+jd(t.getUTCDate(),2)+"T"+jd(t.getUTCHours(),2)+":"+jd(t.getUTCMinutes(),2)+":"+jd(t.getUTCSeconds(),2)+"Z";r.appendChild(Zp().createTextNode(n))}function ao(r,e){var t=e.toPrecision();r.appendChild(Zp().createTextNode(t))}function s1(r,e){var t=e.toString();r.appendChild(Zp().createTextNode(t))}function Qe(r,e){r.appendChild(Zp().createTextNode(e))}var mct=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),_ct=Al+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",wct={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Cr=function(r){mct(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.FEATURE_COLLECTION_PARSERS[Al].featureMember=_e(n.readFeaturesInternal),n.schemaLocation=i.schemaLocation?i.schemaLocation:_ct,n}return e.prototype.readFlatCoordinates=function(t,n){var i=Xa(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s="enu";if(o){var A=Re(o);A&&(s=A.getAxisOrientation())}for(var l=i.trim().split(/\s+/),u=[],c=0,h=l.length;c<h;c++){var f=l[c].split(/,+/),p=parseFloat(f[0]),v=parseFloat(f[1]),m=f.length===3?parseFloat(f[2]):0;s.substr(0,2)==="en"?u.push(p,v,m):u.push(v,p,m)}return u},e.prototype.readBox=function(t,n){var i=kt([null],this.BOX_PARSERS_,t,n,this);return ho(i[1][0],i[1][1],i[1][3],i[1][4])},e.prototype.innerBoundaryIsParser=function(t,n){var i=kt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a.push(i)}},e.prototype.outerBoundaryIsParser=function(t,n){var i=kt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a[0]=i}},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.multiSurface,s=a.surface,A=a.multiCurve,l;return Array.isArray(t)?l="Envelope":(l=t.getType(),l==="MultiPolygon"&&o===!0?l="MultiSurface":l==="Polygon"&&s===!0?l="Surface":l==="MultiLineString"&&A===!0&&(l="MultiCurve")),$e("http://www.opengis.net/gml",l)},e.prototype.writeFeatureElement=function(t,n,i){var a=n.getId();a&&t.setAttribute("fid",a);var o=i[i.length-1],s=o.featureNS,A=n.getGeometryName();o.serializers||(o.serializers={},o.serializers[s]={});var l=[],u=[];if(n.hasProperties()){var c=n.getProperties();for(var h in c){var f=c[h];f!==null&&(l.push(h),u.push(f),h==A||typeof f.getSimplifiedGeometry=="function"?h in o.serializers[s]||(o.serializers[s][h]=At(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=At(Qe)))}}var p=ve({},o);p.node=t,ke(p,o.serializers,Pn(void 0,s),u,i,l)},e.prototype.writeCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.srsName;if(t.nodeName!=="LineStringSegment"&&o&&t.setAttribute("srsName",o),t.nodeName==="LineString"||t.nodeName==="LineStringSegment"){var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s),this.writeCoordinates_(s,n,i)}else if(t.nodeName==="Curve"){var A=$e(t.namespaceURI,"segments");t.appendChild(A),this.writeCurveSegments_(A,n,i)}},e.prototype.writeLineStringOrCurveMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeCurveOrLineString(a,n,i))},e.prototype.writeMultiCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.curve;s&&t.setAttribute("srsName",s);var l=n.getLineStrings();ke({node:t,hasZ:o,srsName:s,curve:A},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeGeometryElement=function(t,n,i){var a=i[i.length-1],o=ve({},a);o.node=t;var s;Array.isArray(n)?s=YI(n,a):s=On(n,!0,a),ke(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var n=$e(t,"coordinates");return n.setAttribute("decimal","."),n.setAttribute("cs",","),n.setAttribute("ts"," "),n},e.prototype.writeCoordinates_=function(t,n,i){for(var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=n.getCoordinates(),l=A.length,u=new Array(l),c=0;c<l;++c){var h=A[c];u[c]=this.getCoords_(h,s,o)}Qe(t,u.join(" "))},e.prototype.writeCurveSegments_=function(t,n,i){var a=$e(t.namespaceURI,"LineStringSegment");t.appendChild(a),this.writeCurveOrLineString(a,n,i)},e.prototype.writeSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;if(t.nodeName!=="PolygonPatch"&&s&&t.setAttribute("srsName",s),t.nodeName==="Polygon"||t.nodeName==="PolygonPatch"){var A=n.getLinearRings();ke({node:t,hasZ:o,srsName:s},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,A,i,void 0,this)}else if(t.nodeName==="Surface"){var l=$e(t.namespaceURI,"patches");t.appendChild(l),this.writeSurfacePatches_(l,n,i)}},e.prototype.RING_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.node,s=a.exteriorWritten;return s===void 0&&(a.exteriorWritten=!0),$e(o.namespaceURI,s!==void 0?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,n,i){var a=$e(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeRing=function(t,n,i){var a=$e(t.namespaceURI,"LinearRing");t.appendChild(a),this.writeLinearRing(a,n,i)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Re(n).getAxisOrientation());var o=a.substr(0,2)==="en"?t[0]+","+t[1]:t[1]+","+t[0];if(i){var s=t[2]||0;o+=","+s}return o},e.prototype.writePoint=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;s&&t.setAttribute("srsName",s);var A=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(A);var l=n.getCoordinates(),u=this.getCoords_(l,s,o);Qe(A,u)},e.prototype.writeMultiPoint=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;s&&t.setAttribute("srsName",s);var A=n.getPoints();ke({node:t,hasZ:o,srsName:s},this.POINTMEMBER_SERIALIZERS,Pn("pointMember"),A,i,void 0,this)},e.prototype.writePointMember=function(t,n,i){var a=$e(t.namespaceURI,"Point");t.appendChild(a),this.writePoint(a,n,i)},e.prototype.writeLinearRing=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s),this.writeCoordinates_(s,n,i)},e.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.surface;s&&t.setAttribute("srsName",s);var l=n.getPolygons();ke({node:t,hasZ:o,srsName:s,surface:A},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i))},e.prototype.writeEnvelope=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=["lowerCorner","upperCorner"],A=[n[0]+" "+n[1],n[2]+" "+n[3]];ke({node:t},this.ENVELOPE_SERIALIZERS,Ji,A,i,s,this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return $e("http://www.opengis.net/gml",wct[a.nodeName])},e}(ur);Cr.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Oe(Cr.prototype.readFlatCoordinates)}};Cr.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:Cr.prototype.innerBoundaryIsParser,outerBoundaryIs:Cr.prototype.outerBoundaryIsParser}};Cr.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:_e(Cr.prototype.readFlatCoordinates)}};Cr.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Oe(ur.prototype.readPoint),MultiPoint:Oe(ur.prototype.readMultiPoint),LineString:Oe(ur.prototype.readLineString),MultiLineString:Oe(ur.prototype.readMultiLineString),LinearRing:Oe(ur.prototype.readLinearRing),Polygon:Oe(ur.prototype.readPolygon),MultiPolygon:Oe(ur.prototype.readMultiPolygon),Box:Oe(Cr.prototype.readBox)}};Cr.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:At(Cr.prototype.writeCurveOrLineString),MultiCurve:At(Cr.prototype.writeMultiCurveOrLineString),Point:At(Cr.prototype.writePoint),MultiPoint:At(Cr.prototype.writeMultiPoint),LineString:At(Cr.prototype.writeCurveOrLineString),MultiLineString:At(Cr.prototype.writeMultiCurveOrLineString),LinearRing:At(Cr.prototype.writeLinearRing),Polygon:At(Cr.prototype.writeSurfaceOrPolygon),MultiPolygon:At(Cr.prototype.writeMultiSurfaceOrPolygon),Surface:At(Cr.prototype.writeSurfaceOrPolygon),MultiSurface:At(Cr.prototype.writeMultiSurfaceOrPolygon),Envelope:At(Cr.prototype.writeEnvelope)}};Cr.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:At(Cr.prototype.writeLineStringOrCurveMember),curveMember:At(Cr.prototype.writeLineStringOrCurveMember)}};Cr.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:At(Cr.prototype.writeRing),innerBoundaryIs:At(Cr.prototype.writeRing)}};Cr.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:At(Cr.prototype.writePointMember)}};Cr.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:At(Cr.prototype.writeSurfaceOrPolygonMember),polygonMember:At(Cr.prototype.writeSurfaceOrPolygonMember)}};Cr.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:At(Qe),upperCorner:At(Qe)}};var Jp=Cr,Ect=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Cct=Al+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",Bct={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Ce=function(r){Ect(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.surface_=i.surface!==void 0?i.surface:!1,n.curve_=i.curve!==void 0?i.curve:!1,n.multiCurve_=i.multiCurve!==void 0?i.multiCurve:!0,n.multiSurface_=i.multiSurface!==void 0?i.multiSurface:!0,n.schemaLocation=i.schemaLocation?i.schemaLocation:Cct,n.hasZ=i.hasZ!==void 0?i.hasZ:!1,n}return e.prototype.readMultiCurve=function(t,n){var i=kt([],this.MULTICURVE_PARSERS,t,n,this);if(i){var a=new Fa(i);return a}else return},e.prototype.readMultiSurface=function(t,n){var i=kt([],this.MULTISURFACE_PARSERS,t,n,this);if(i)return new Ia(i)},e.prototype.curveMemberParser=function(t,n){uo(this.CURVEMEMBER_PARSERS,t,n,this)},e.prototype.surfaceMemberParser=function(t,n){uo(this.SURFACEMEMBER_PARSERS,t,n,this)},e.prototype.readPatch=function(t,n){return kt([null],this.PATCHES_PARSERS,t,n,this)},e.prototype.readSegment=function(t,n){return kt([null],this.SEGMENTS_PARSERS,t,n,this)},e.prototype.readPolygonPatch=function(t,n){return kt([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this)},e.prototype.readLineStringSegment=function(t,n){return kt([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},e.prototype.interiorParser=function(t,n){var i=kt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a.push(i)}},e.prototype.exteriorParser=function(t,n){var i=kt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a[0]=i}},e.prototype.readSurface=function(t,n){var i=kt([null],this.SURFACE_PARSERS,t,n,this);if(i&&i[0]){var a=i[0],o=[a.length],s=void 0,A=void 0;for(s=1,A=i.length;s<A;++s)Gr(a,i[s]),o.push(a.length);return new Fn(a,qt.XYZ,o)}else return},e.prototype.readCurve=function(t,n){var i=kt([null],this.CURVE_PARSERS,t,n,this);if(i){var a=new kr(i,qt.XYZ);return a}else return},e.prototype.readEnvelope=function(t,n){var i=kt([null],this.ENVELOPE_PARSERS,t,n,this);return ho(i[1][0],i[1][1],i[2][0],i[2][1])},e.prototype.readFlatPos=function(t,n){for(var i=Xa(t,!1),a=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[],s;s=a.exec(i);)o.push(parseFloat(s[1])),i=i.substr(s[0].length);if(i===""){var A=n[0],l=A.srsName,u="enu";if(l){var c=Re(l);u=c.getAxisOrientation()}if(u==="neu"){var h=void 0,f=void 0;for(h=0,f=o.length;h<f;h+=3){var p=o[h],v=o[h+1];o[h]=v,o[h+1]=p}}var m=o.length;if(m==2&&o.push(0),m!==0)return o}},e.prototype.readFlatPosList=function(t,n){var i=Xa(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s=a.srsDimension,A="enu";if(o){var l=Re(o);A=l.getAxisOrientation()}var u=i.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=el(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=el(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=el(t.parentNode.getAttribute("srsDimension")):s&&(c=el(s));for(var h,f,p,v=[],m=0,g=u.length;m<g;m+=c)h=parseFloat(u[m]),f=parseFloat(u[m+1]),p=c===3?parseFloat(u[m+2]):0,A.substr(0,2)==="en"?v.push(h,f,p):v.push(f,h,p);return v},e.prototype.writePos_=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=o?"3":"2";t.setAttribute("srsDimension",s);var A=a.srsName,l="enu";A&&(l=Re(A).getAxisOrientation());var u=n.getCoordinates(),c;if(l.substr(0,2)==="en"?c=u[0]+" "+u[1]:c=u[1]+" "+u[0],o){var h=u[2]||0;c+=" "+h}Qe(t,c)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Re(n).getAxisOrientation());var o=a.substr(0,2)==="en"?t[0]+" "+t[1]:t[1]+" "+t[0];if(i){var s=t[2]||0;o+=" "+s}return o},e.prototype.writePosList_=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=o?"3":"2";t.setAttribute("srsDimension",s);for(var A=a.srsName,l=n.getCoordinates(),u=l.length,c=new Array(u),h,f=0;f<u;++f)h=l[f],c[f]=this.getCoords_(h,A,o);Qe(t,c.join(" "))},e.prototype.writePoint=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=$e(t.namespaceURI,"pos");t.appendChild(s),this.writePos_(s,n,i)},e.prototype.writeEnvelope=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=["lowerCorner","upperCorner"],A=[n[0]+" "+n[1],n[2]+" "+n[3]];ke({node:t},this.ENVELOPE_SERIALIZERS,Ji,A,i,s,this)},e.prototype.writeLinearRing=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=$e(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,n,i)},e.prototype.RING_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.node,s=a.exteriorWritten;return s===void 0&&(a.exteriorWritten=!0),$e(o.namespaceURI,s!==void 0?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;if(t.nodeName!=="PolygonPatch"&&s&&t.setAttribute("srsName",s),t.nodeName==="Polygon"||t.nodeName==="PolygonPatch"){var A=n.getLinearRings();ke({node:t,hasZ:o,srsName:s},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,A,i,void 0,this)}else if(t.nodeName==="Surface"){var l=$e(t.namespaceURI,"patches");t.appendChild(l),this.writeSurfacePatches_(l,n,i)}},e.prototype.writeCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.srsName;if(t.nodeName!=="LineStringSegment"&&o&&t.setAttribute("srsName",o),t.nodeName==="LineString"||t.nodeName==="LineStringSegment"){var s=$e(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,n,i)}else if(t.nodeName==="Curve"){var A=$e(t.namespaceURI,"segments");t.appendChild(A),this.writeCurveSegments_(A,n,i)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.surface;s&&t.setAttribute("srsName",s);var l=n.getPolygons();ke({node:t,hasZ:o,srsName:s,surface:A},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeMultiPoint=function(t,n,i){var a=i[i.length-1],o=a.srsName,s=a.hasZ;o&&t.setAttribute("srsName",o);var A=n.getPoints();ke({node:t,hasZ:s,srsName:o},this.POINTMEMBER_SERIALIZERS,Pn("pointMember"),A,i,void 0,this)},e.prototype.writeMultiCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.curve;s&&t.setAttribute("srsName",s);var l=n.getLineStrings();ke({node:t,hasZ:o,srsName:s,curve:A},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeRing=function(t,n,i){var a=$e(t.namespaceURI,"LinearRing");t.appendChild(a),this.writeLinearRing(a,n,i)},e.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i))},e.prototype.writePointMember=function(t,n,i){var a=$e(t.namespaceURI,"Point");t.appendChild(a),this.writePoint(a,n,i)},e.prototype.writeLineStringOrCurveMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeCurveOrLineString(a,n,i))},e.prototype.writeSurfacePatches_=function(t,n,i){var a=$e(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeCurveSegments_=function(t,n,i){var a=$e(t.namespaceURI,"LineStringSegment");t.appendChild(a),this.writeCurveOrLineString(a,n,i)},e.prototype.writeGeometryElement=function(t,n,i){var a=i[i.length-1],o=ve({},a);o.node=t;var s;Array.isArray(n)?s=YI(n,a):s=On(n,!0,a),ke(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)},e.prototype.writeFeatureElement=function(t,n,i){var a=n.getId();a&&t.setAttribute("fid",a);var o=i[i.length-1],s=o.featureNS,A=n.getGeometryName();o.serializers||(o.serializers={},o.serializers[s]={});var l=[],u=[];if(n.hasProperties()){var c=n.getProperties();for(var h in c){var f=c[h];f!==null&&(l.push(h),u.push(f),h==A||typeof f.getSimplifiedGeometry=="function"?h in o.serializers[s]||(o.serializers[s][h]=At(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=At(Qe)))}}var p=ve({},o);p.node=t,ke(p,o.serializers,Pn(void 0,s),u,i,l)},e.prototype.writeFeatureMembers_=function(t,n,i){var a=i[i.length-1],o=a.featureType,s=a.featureNS,A={};A[s]={},A[s][o]=At(this.writeFeatureElement,this);var l=ve({},a);l.node=t,ke(l,A,Pn(o,s),n,i)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return $e(this.namespace,Bct[a.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.multiSurface,s=a.surface,A=a.curve,l=a.multiCurve,u;return Array.isArray(t)?u="Envelope":(u=t.getType(),u==="MultiPolygon"&&o===!0?u="MultiSurface":u==="Polygon"&&s===!0?u="Surface":u==="LineString"&&A===!0?u="Curve":u==="MultiLineString"&&l===!0&&(u="MultiCurve")),$e(this.namespace,u)},e.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var i=$e(this.namespace,"geom"),a={node:i,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return n&&ve(a,n),this.writeGeometryElement(i,t,[a]),i},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=$e(this.namespace,"featureMembers");i.setAttributeNS(wh,"xsi:schemaLocation",this.schemaLocation);var a={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return n&&ve(a,n),this.writeFeatureMembers_(i,t,[a]),i},e}(ur);Ce.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Oe(Ce.prototype.readFlatPos),posList:Oe(Ce.prototype.readFlatPosList),coordinates:Oe(Jp.prototype.readFlatCoordinates)}};Ce.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:Ce.prototype.interiorParser,exterior:Ce.prototype.exteriorParser}};Ce.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Oe(ur.prototype.readPoint),MultiPoint:Oe(ur.prototype.readMultiPoint),LineString:Oe(ur.prototype.readLineString),MultiLineString:Oe(ur.prototype.readMultiLineString),LinearRing:Oe(ur.prototype.readLinearRing),Polygon:Oe(ur.prototype.readPolygon),MultiPolygon:Oe(ur.prototype.readMultiPolygon),Surface:Oe(Ce.prototype.readSurface),MultiSurface:Oe(Ce.prototype.readMultiSurface),Curve:Oe(Ce.prototype.readCurve),MultiCurve:Oe(Ce.prototype.readMultiCurve),Envelope:Oe(Ce.prototype.readEnvelope)}};Ce.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:_e(Ce.prototype.curveMemberParser),curveMembers:_e(Ce.prototype.curveMemberParser)}};Ce.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:_e(Ce.prototype.surfaceMemberParser),surfaceMembers:_e(Ce.prototype.surfaceMemberParser)}};Ce.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:_e(ur.prototype.readLineString),Curve:_e(Ce.prototype.readCurve)}};Ce.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:_e(ur.prototype.readPolygon),Surface:_e(Ce.prototype.readSurface)}};Ce.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Oe(Ce.prototype.readPatch)}};Ce.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Oe(Ce.prototype.readSegment)}};Ce.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:_e(Ce.prototype.readFlatPosList),upperCorner:_e(Ce.prototype.readFlatPosList)}};Ce.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Oe(Ce.prototype.readPolygonPatch)}};Ce.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Oe(Ce.prototype.readLineStringSegment)}};Ce.prototype.writeFeatures;Ce.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:At(Ce.prototype.writeRing),interior:At(Ce.prototype.writeRing)}};Ce.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:At(Qe),upperCorner:At(Qe)}};Ce.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:At(Ce.prototype.writeSurfaceOrPolygonMember),polygonMember:At(Ce.prototype.writeSurfaceOrPolygonMember)}};Ce.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:At(Ce.prototype.writePointMember)}};Ce.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:At(Ce.prototype.writeLineStringOrCurveMember),curveMember:At(Ce.prototype.writeLineStringOrCurveMember)}};Ce.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:At(Ce.prototype.writeCurveOrLineString),MultiCurve:At(Ce.prototype.writeMultiCurveOrLineString),Point:At(Ce.prototype.writePoint),MultiPoint:At(Ce.prototype.writeMultiPoint),LineString:At(Ce.prototype.writeCurveOrLineString),MultiLineString:At(Ce.prototype.writeMultiCurveOrLineString),LinearRing:At(Ce.prototype.writeLinearRing),Polygon:At(Ce.prototype.writeSurfaceOrPolygon),MultiPolygon:At(Ce.prototype.writeMultiSurfaceOrPolygon),Surface:At(Ce.prototype.writeSurfaceOrPolygon),MultiSurface:At(Ce.prototype.writeMultiSurfaceOrPolygon),Envelope:At(Ce.prototype.writeEnvelope)}};var nr=Ce,ZI=nr;ZI.prototype.writeFeatures;ZI.prototype.writeFeaturesNode;var Tct=ZI,xct=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ei=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Sct="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd",bct={rte:Y8,trk:W8,wpt:q8},Fct=Nt(Ei,{rte:_e(Y8),trk:_e(W8),wpt:_e(q8)}),Ict=Nt(Ei,{text:ot(jt,"linkText"),type:ot(jt,"linkType")}),Lct=Nt(Ei,{rte:At(eht),trk:At(rht),wpt:At(iht)}),Oct=function(r){xct(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Re("EPSG:4326"),n.readExtensions_=i.readExtensions,n}return e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var n=0,i=t.length;n<i;++n){var a=t[n];if(this.readExtensions_){var o=a.get("extensionsNode_")||null;this.readExtensions_(a,o)}a.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,n){if(!mi(Ei,t.namespaceURI))return null;var i=bct[t.localName];if(!i)return null;var a=i(t,[this.getReadOptions(t,n)]);return a?(this.handleReadExtensions_([a]),a):null},e.prototype.readFeaturesFromNode=function(t,n){if(!mi(Ei,t.namespaceURI))return[];if(t.localName=="gpx"){var i=kt([],Fct,t,[this.getReadOptions(t,n)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=$e("http://www.topografix.com/GPX/1/1","gpx"),a="http://www.w3.org/2000/xmlns/";return i.setAttributeNS(a,"xmlns:xsi",wh),i.setAttributeNS(wh,"xsi:schemaLocation",Sct),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),ke({node:i},Lct,qct,t,[n]),i},e}(vy),Rct=Nt(Ei,{name:ot(jt),cmt:ot(jt),desc:ot(jt),src:ot(jt),link:eL,number:ot(oi),extensions:rL,type:ot(jt),rtept:Zct}),Mct=Nt(Ei,{ele:ot(Lr),time:ot(qI)}),Nct=Nt(Ei,{name:ot(jt),cmt:ot(jt),desc:ot(jt),src:ot(jt),link:eL,number:ot(oi),type:ot(jt),extensions:rL,trkseg:tht}),Pct=Nt(Ei,{trkpt:Jct}),Uct=Nt(Ei,{ele:ot(Lr),time:ot(qI)}),Dct=Nt(Ei,{ele:ot(Lr),time:ot(qI),magvar:ot(Lr),geoidheight:ot(Lr),name:ot(jt),cmt:ot(jt),desc:ot(jt),src:ot(jt),link:eL,sym:ot(jt),type:ot(jt),fix:ot(jt),sat:ot(oi),hdop:ot(Lr),vdop:ot(Lr),pdop:ot(Lr),ageofdgpsdata:ot(Lr),dgpsid:ot(oi),extensions:rL}),Qct=["text","type"],Hct=Nt(Ei,{text:At(Qe),type:At(Qe)}),Gct=Nt(Ei,["name","cmt","desc","src","link","number","type","rtept"]),kct=Nt(Ei,{name:At(Qe),cmt:At(Qe),desc:At(Qe),src:At(Qe),link:At(nL),number:At(s1),type:At(Qe),rtept:z8(At(iL))}),$ct=Nt(Ei,["ele","time"]),jct=Nt(Ei,["name","cmt","desc","src","link","number","type","trkseg"]),Vct=Nt(Ei,{name:At(Qe),cmt:At(Qe),desc:At(Qe),src:At(Qe),link:At(nL),number:At(s1),type:At(Qe),trkseg:z8(At(nht))}),Kct=Pn("trkpt"),zct=Nt(Ei,{trkpt:At(iL)}),Xct=Nt(Ei,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),Yct=Nt(Ei,{ele:At(ao),time:At(yct),magvar:At(ao),geoidheight:At(ao),name:At(Qe),cmt:At(Qe),desc:At(Qe),src:At(Qe),link:At(nL),sym:At(Qe),type:At(Qe),fix:At(Qe),sat:At(s1),hdop:At(ao),vdop:At(ao),pdop:At(ao),ageofdgpsdata:At(ao),dgpsid:At(s1)}),Wct={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function qct(r,e,t){var n=r.getGeometry();if(n){var i=Wct[n.getType()];if(i){var a=e[e.length-1].node;return $e(a.namespaceURI,i)}}}function JI(r,e,t,n){return r.push(parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))),"ele"in n?(r.push(n.ele),delete n.ele,e.hasZ=!0):r.push(0),"time"in n?(r.push(n.time),delete n.time,e.hasM=!0):r.push(0),r}function tL(r,e,t){var n=qt.XY,i=2;if(r.hasZ&&r.hasM?(n=qt.XYZM,i=4):r.hasZ?(n=qt.XYZ,i=3):r.hasM&&(n=qt.XYM,i=3),i!==4){for(var a=0,o=e.length/4;a<o;a++)e[a*i]=e[a*4],e[a*i+1]=e[a*4+1],r.hasZ&&(e[a*i+2]=e[a*4+2]),r.hasM&&(e[a*i+2]=e[a*4+3]);if(e.length=e.length/4*i,t)for(var a=0,o=t.length;a<o;a++)t[a]=t[a]/4*i}return n}function eL(r,e){var t=e[e.length-1],n=r.getAttribute("href");n!==null&&(t.link=n),uo(Ict,r,e)}function rL(r,e){var t=e[e.length-1];t.extensionsNode_=r}function Zct(r,e){var t=kt({},Mct,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;JI(i,a,r,t)}}function Jct(r,e){var t=kt({},Uct,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;JI(i,a,r,t)}}function tht(r,e){var t=e[e.length-1];uo(Pct,r,e);var n=t.flatCoordinates,i=t.ends;i.push(n.length)}function Y8(r,e){var t=e[0],n=kt({flatCoordinates:[],layoutOptions:{}},Rct,r,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var a=n.layoutOptions;delete n.layoutOptions;var o=tL(a,i),s=new kr(i,o);On(s,!1,t);var A=new sr(s);return A.setProperties(n,!0),A}}function W8(r,e){var t=e[0],n=kt({flatCoordinates:[],ends:[],layoutOptions:{}},Nct,r,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var a=n.ends;delete n.ends;var o=n.layoutOptions;delete n.layoutOptions;var s=tL(o,i,a),A=new Fa(i,s,a);On(A,!1,t);var l=new sr(A);return l.setProperties(n,!0),l}}function q8(r,e){var t=e[0],n=kt({},Dct,r,e);if(n){var i={},a=JI([],i,r,n),o=tL(i,a),s=new pr(a,o);On(s,!1,t);var A=new sr(s);return A.setProperties(n,!0),A}}function nL(r,e,t){r.setAttribute("href",e);var n=t[t.length-1],i=n.properties,a=[i.linkText,i.linkType];ke({node:r},Hct,Ji,a,t,Qct)}function iL(r,e,t){var n=t[t.length-1],i=n.node,a=i.namespaceURI,o=n.properties;r.setAttributeNS(null,"lat",String(e[1])),r.setAttributeNS(null,"lon",String(e[0]));var s=n.geometryLayout;switch(s){case qt.XYZM:e[3]!==0&&(o.time=e[3]);case qt.XYZ:e[2]!==0&&(o.ele=e[2]);break;case qt.XYM:e[2]!==0&&(o.time=e[2]);break}var A=r.nodeName=="rtept"?$ct[a]:Xct[a],l=po(o,A);ke({node:r,properties:o},Yct,Ji,l,t,A)}function eht(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==st.LINE_STRING){var s=On(o,!0,n);a.geometryLayout=s.getLayout(),i.rtept=s.getCoordinates()}var A=t[t.length-1].node,l=Gct[A.namespaceURI],u=po(i,l);ke(a,kct,Ji,u,t,l)}function rht(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==st.MULTI_LINE_STRING){var s=On(o,!0,n);i.trkseg=s.getLineStrings()}var A=t[t.length-1].node,l=jct[A.namespaceURI],u=po(i,l);ke(a,Vct,Ji,u,t,l)}function nht(r,e,t){var n={node:r};n.geometryLayout=e.getLayout(),n.properties={},ke(n,zct,Kct,e.getCoordinates(),t)}function iht(r,e,t){var n=t[0],i=t[t.length-1];i.properties=e.getProperties();var a=e.getGeometry();if(a.getType()==st.POINT){var o=On(a,!0,n);i.geometryLayout=o.getLayout(),iL(r,o.getCoordinates(),t)}}var aht=Oct,oht=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),sht=function(r){oht(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return Ts.TEXT},e.prototype.readFeature=function(t,n){return this.readFeatureFromText(Km(t),this.adaptOptions(n))},e.prototype.readFeatureFromText=function(t,n){return Te()},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(Km(t),this.adaptOptions(n))},e.prototype.readFeaturesFromText=function(t,n){return Te()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromText(Km(t),this.adaptOptions(n))},e.prototype.readGeometryFromText=function(t,n){return Te()},e.prototype.readProjection=function(t){return this.readProjectionFromText(Km(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,n){return this.writeFeatureText(t,this.adaptOptions(n))},e.prototype.writeFeatureText=function(t,n){return Te()},e.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},e.prototype.writeFeaturesText=function(t,n){return Te()},e.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},e.prototype.writeGeometryText=function(t,n){return Te()},e}(py);function Km(r){return typeof r=="string"?r:""}var aL=sht,Aht=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Zd={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},lht=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,uht=/^H.([A-Z]{3}).*?:(.*)/,cht=/^HFDTE(\d{2})(\d{2})(\d{2})/,hht=/\r\n|\r|\n/,fht=function(r){Aht(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Re("EPSG:4326"),n.altitudeMode_=i.altitudeMode?i.altitudeMode:Zd.NONE,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.altitudeMode_,a=t.split(hht),o={},s=[],A=2e3,l=0,u=1,c=-1,h,f;for(h=0,f=a.length;h<f;++h){var p=a[h],v=void 0;if(p.charAt(0)=="B"){if(v=lht.exec(p),v){var m=parseInt(v[1],10),g=parseInt(v[2],10),_=parseInt(v[3],10),E=parseInt(v[4],10)+parseInt(v[5],10)/6e4;v[6]=="S"&&(E=-E);var B=parseInt(v[7],10)+parseInt(v[8],10)/6e4;if(v[9]=="W"&&(B=-B),s.push(B,E),i!=Zd.NONE){var L=void 0;i==Zd.GPS?L=parseInt(v[11],10):i==Zd.BAROMETRIC?L=parseInt(v[12],10):L=0,s.push(L)}var O=Date.UTC(A,l,u,m,g,_);O<c&&(O=Date.UTC(A,l,u+1,m,g,_)),s.push(O/1e3),c=O}}else p.charAt(0)=="H"&&(v=cht.exec(p),v?(u=parseInt(v[1],10),l=parseInt(v[2],10)-1,A=2e3+parseInt(v[3],10)):(v=uht.exec(p),v&&(o[v[1]]=v[2].trim())))}if(s.length===0)return null;var b=i==Zd.NONE?qt.XYM:qt.XYZM,T=new kr(s,b),F=new sr(On(T,!1,n));return F.setProperties(o,!0),F},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return i?[i]:[]},e}(aL),pht=fht,dht=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),bl=["http://www.google.com/kml/ext/2.2"],xe=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],vht="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",GN={fraction:Qa.FRACTION,pixels:Qa.PIXELS,insetPixels:Qa.PIXELS},ght=Nt(xe,{ExtendedData:hH,Region:fH,MultiGeometry:ot(lH,"geometry"),LineString:ot(sH,"geometry"),LinearRing:ot(AH,"geometry"),Point:ot(uH,"geometry"),Polygon:ot(cH,"geometry"),Style:ot(AL),StyleMap:Jht,address:ot(jt),description:ot(jt),name:ot(jt),open:ot(Wu),phoneNumber:ot(jt),styleUrl:ot(rH),visibility:ot(Wu)},Nt(bl,{MultiTrack:ot(Hht,"geometry"),Track:ot(oH,"geometry")})),yht=Nt(xe,{ExtendedData:hH,Region:fH,Link:cft,address:ot(jt),description:ot(jt),name:ot(jt),open:ot(Wu),phoneNumber:ot(jt),visibility:ot(Wu)}),mht=Nt(xe,{href:ot(eH)}),Z8=Nt(xe,{LatLonAltBox:ift,Lod:oft}),_ht=Nt(xe,["Document","Placemark"]),wht=Nt(xe,{Document:At(mft),Placemark:At(vH)}),vp,e_=null,QS,Vv,Kv,zv,A1,HS=null,oL,GS=null,kS,jc=null,kN=null,$S=null;function l1(r){return 32/Math.min(r[0],r[1])}function Eht(){vp=[255,255,255,1],e_=new ua({color:vp}),QS=[20,2],Vv=Qa.PIXELS,Kv=Qa.PIXELS,zv=[64,64],A1="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",HS=new sy({anchor:QS,anchorOrigin:Oi.BOTTOM_LEFT,anchorXUnits:Vv,anchorYUnits:Kv,crossOrigin:"anonymous",rotation:0,scale:l1(zv),size:zv,src:A1}),oL="NO_IMAGE",GS=new Di({color:vp,width:1}),kS=new Di({color:[51,51,51,1],width:2}),jc=new Lh({font:"bold 16px Helvetica",fill:e_,stroke:kS,scale:.8}),kN=new Aa({fill:e_,image:HS,text:jc,stroke:GS,zIndex:0}),$S=[kN]}var zm;function Cht(r){return r}var Bht=function(r){dht(e,r);function e(t){var n=r.call(this)||this,i=t||{};return $S||Eht(),n.dataProjection=Re("EPSG:4326"),n.defaultStyle_=i.defaultStyle?i.defaultStyle:$S,n.extractStyles_=i.extractStyles!==void 0?i.extractStyles:!0,n.writeStyles_=i.writeStyles!==void 0?i.writeStyles:!0,n.sharedStyles_={},n.showPointNames_=i.showPointNames!==void 0?i.showPointNames:!0,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:"anonymous",n.iconUrlFunction_=i.iconUrlFunction?i.iconUrlFunction:Cht,n.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],n}return e.prototype.readDocumentOrFolder_=function(t,n){var i=Nt(xe,{Document:HN(this.readDocumentOrFolder_,this),Folder:HN(this.readDocumentOrFolder_,this),Placemark:_e(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),a=kt([],i,t,n,this);if(a)return a},e.prototype.readPlacemark_=function(t,n){var i=kt({geometry:null},ght,t,n,this);if(i){var a=new sr,o=t.getAttribute("id");o!==null&&a.setId(o);var s=n[0],A=i.geometry;if(A&&On(A,!1,s),a.setGeometry(A),delete i.geometry,this.extractStyles_){var l=i.Style,u=i.styleUrl,c=xht(l,u,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);a.setStyle(c)}return delete i.Style,a.setProperties(i,!0),a}},e.prototype.readSharedStyle_=function(t,n){var i=t.getAttribute("id");if(i!==null){var a=AL.call(this,t,n);if(a){var o=void 0,s=t.baseURI;if((!s||s=="about:blank")&&(s=window.location.href),s){var A=new URL("#"+i,s);o=A.href}else o="#"+i;this.sharedStyles_[o]=a}}},e.prototype.readSharedStyleMap_=function(t,n){var i=t.getAttribute("id");if(i!==null){var a=iH.call(this,t,n);if(a){var o,s=t.baseURI;if((!s||s=="about:blank")&&(s=window.location.href),s){var A=new URL("#"+i,s);o=A.href}else o="#"+i;this.sharedStyles_[o]=a}}},e.prototype.readFeatureFromNode=function(t,n){if(!mi(xe,t.namespaceURI))return null;var i=this.readPlacemark_(t,[this.getReadOptions(t,n)]);return i||null},e.prototype.readFeaturesFromNode=function(t,n){if(!mi(xe,t.namespaceURI))return[];var i,a=t.localName;if(a=="Document"||a=="Folder")return i=this.readDocumentOrFolder_(t,[this.getReadOptions(t,n)]),i||[];if(a=="Placemark"){var o=this.readPlacemark_(t,[this.getReadOptions(t,n)]);return o?[o]:[]}else if(a=="kml"){i=[];for(var s=t.firstElementChild;s;s=s.nextElementSibling){var A=this.readFeaturesFromNode(s,n);A&&Gr(i,A)}return i}else return[]},e.prototype.readName=function(t){if(t)if(typeof t=="string"){var n=oA(t);return this.readNameFromDocument(n)}else return aA(t)?this.readNameFromDocument(t):this.readNameFromNode(t);else return},e.prototype.readNameFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(n);if(i)return i}},e.prototype.readNameFromNode=function(t){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(mi(xe,n.namespaceURI)&&n.localName=="name")return jt(n);for(var n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(mi(xe,n.namespaceURI)&&(i=="Document"||i=="Folder"||i=="Placemark"||i=="kml")){var a=this.readNameFromNode(n);if(a)return a}}},e.prototype.readNetworkLinks=function(t){var n=[];if(typeof t=="string"){var i=oA(t);Gr(n,this.readNetworkLinksFromDocument(i))}else aA(t)?Gr(n,this.readNetworkLinksFromDocument(t)):Gr(n,this.readNetworkLinksFromNode(t));return n},e.prototype.readNetworkLinksFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&Gr(n,this.readNetworkLinksFromNode(i));return n},e.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(mi(xe,i.namespaceURI)&&i.localName=="NetworkLink"){var a=kt({},yht,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;mi(xe,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&Gr(n,this.readNetworkLinksFromNode(i))}return n},e.prototype.readRegion=function(t){var n=[];if(typeof t=="string"){var i=oA(t);Gr(n,this.readRegionFromDocument(i))}else aA(t)?Gr(n,this.readRegionFromDocument(t)):Gr(n,this.readRegionFromNode(t));return n},e.prototype.readRegionFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&Gr(n,this.readRegionFromNode(i));return n},e.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(mi(xe,i.namespaceURI)&&i.localName=="Region"){var a=kt({},Z8,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;mi(xe,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&Gr(n,this.readRegionFromNode(i))}return n},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=$e(xe[4],"kml"),a="http://www.w3.org/2000/xmlns/";i.setAttributeNS(a,"xmlns:gx",bl[0]),i.setAttributeNS(a,"xmlns:xsi",wh),i.setAttributeNS(wh,"xsi:schemaLocation",vht);var o={node:i},s={};t.length>1?s.Document=t:t.length==1&&(s.Placemark=t[0]);var A=_ht[i.namespaceURI],l=po(s,A);return ke(o,wht,Ji,l,[n],A,this),i},e}(vy);function Tht(r,e){var t=[0,0],n="start",i=r.getImage();if(i){var a=i.getSize();if(a&&a.length==2){var o=i.getScaleArray(),s=i.getAnchor();t[0]=o[0]*(a[0]-s[0]),t[1]=o[1]*(a[1]/2-s[1]),n="left"}}var A=r.getText();A?(A=A.clone(),A.setFont(A.getFont()||jc.getFont()),A.setScale(A.getScale()||jc.getScale()),A.setFill(A.getFill()||jc.getFill()),A.setStroke(A.getStroke()||kS)):A=jc.clone(),A.setText(e),A.setOffsetX(t[0]),A.setOffsetY(t[1]),A.setTextAlign(n);var l=new Aa({image:i,text:A});return l}function xht(r,e,t,n,i){return function(a,o){var s=i,A="",l=[];if(s){var u=a.getGeometry();if(u)if(u instanceof la)l=u.getGeometriesArrayRecursive().filter(function(v){var m=v.getType();return m===st.POINT||m===st.MULTI_POINT}),s=l.length>0;else{var c=u.getType();s=c===st.POINT||c===st.MULTI_POINT}}s&&(A=a.get("name"),s=s&&!!A,s&&A.search(/&[^&]+;/)>-1&&(zm||(zm=document.createElement("textarea")),zm.innerHTML=A,A=zm.value));var h=t;if(r?h=r:e&&(h=J8(e,t,n)),s){var f=Tht(h[0],A);if(l.length>0){f.setGeometry(new la(l));var p=new Aa({geometry:h[0].getGeometry(),image:null,fill:h[0].getFill(),stroke:h[0].getStroke(),text:null});return[f,p].concat(h.slice(1))}return f}return h}}function J8(r,e,t){return Array.isArray(r)?r:typeof r=="string"?J8(t[r],e,t):e}function Nw(r){var e=Xa(r,!1),t=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(t){var n=t[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}else return}function tH(r){var e=Xa(r,!1),t=[];e=e.replace(/\s*,\s*/g,",");for(var n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i,i;i=n.exec(e);){var a=parseFloat(i[1]),o=parseFloat(i[2]),s=i[3]?parseFloat(i[3]):0;t.push(a,o,s),e=e.substr(i[0].length)}if(e==="")return t}function eH(r){var e=Xa(r,!1).trim(),t=r.baseURI;if((!t||t=="about:blank")&&(t=window.location.href),t){var n=new URL(e,t);return n.href}else return e}function rH(r){var e=Xa(r,!1).trim().replace(/^(?!.*#)/,"#"),t=r.baseURI;if((!t||t=="about:blank")&&(t=window.location.href),t){var n=new URL(e,t);return n.href}else return e}function Sht(r){var e=r.getAttribute("xunits"),t=r.getAttribute("yunits"),n;return e!=="insetPixels"?t!=="insetPixels"?n=Oi.BOTTOM_LEFT:n=Oi.TOP_LEFT:t!=="insetPixels"?n=Oi.BOTTOM_RIGHT:n=Oi.TOP_RIGHT,{x:parseFloat(r.getAttribute("x")),xunits:GN[e],y:parseFloat(r.getAttribute("y")),yunits:GN[t],origin:n}}function nH(r){return Lr(r)}var bht=Nt(xe,{Pair:Zht});function iH(r,e){return kt(void 0,bht,r,e,this)}var Fht=Nt(xe,{Icon:ot($ht),color:ot(Nw),heading:ot(Lr),hotSpot:ot(Sht),scale:ot(nH)});function Iht(r,e){var t=kt({},Fht,r,e);if(t){var n=e[e.length-1],i="Icon"in t?t.Icon:{},a=!("Icon"in t)||Object.keys(i).length>0,o,s=i.href;s?o=s:a&&(o=A1);var A,l,u,c=Oi.BOTTOM_LEFT,h=t.hotSpot;h?(A=[h.x,h.y],l=h.xunits,u=h.yunits,c=h.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(o)&&(/pushpin/.test(o)?(A=QS,l=Vv,u=Kv):/arrow-reverse/.test(o)?(A=[54,42],l=Vv,u=Kv):/paddle/.test(o)&&(A=[32,1],l=Vv,u=Kv));var f,p=i.x,v=i.y;p!==void 0&&v!==void 0&&(f=[p,v]);var m,g=i.w,_=i.h;g!==void 0&&_!==void 0&&(m=[g,_]);var E,B=t.heading;B!==void 0&&(E=Su(B));var L=t.scale,O=t.color;if(a){o==A1&&(m=zv);var b=new sy({anchor:A,anchorOrigin:c,anchorXUnits:l,anchorYUnits:u,crossOrigin:this.crossOrigin_,offset:f,offsetOrigin:Oi.BOTTOM_LEFT,rotation:E,scale:L,size:m,src:this.iconUrlFunction_(o),color:O}),T=b.getScaleArray()[0],F=b.getSize();if(F===null){var M=b.getImageState();if(M===je.IDLE||M===je.LOADING){var S=function(){var N=b.getImageState();if(!(N===je.IDLE||N===je.LOADING)){var P=b.getSize();if(P&&P.length==2){var Y=l1(P);b.setScale(T*Y)}b.unlistenImageChange(S)}};b.listenImageChange(S),M===je.IDLE&&b.load()}}else if(F.length==2){var x=l1(F);b.setScale(T*x)}n.imageStyle=b}else n.imageStyle=oL}}var Lht=Nt(xe,{color:ot(Nw),scale:ot(nH)});function Oht(r,e){var t=kt({},Lht,r,e);if(t){var n=e[e.length-1],i=new Lh({fill:new ua({color:"color"in t?t.color:vp}),scale:t.scale});n.textStyle=i}}var Rht=Nt(xe,{color:ot(Nw),width:ot(Lr)});function Mht(r,e){var t=kt({},Rht,r,e);if(t){var n=e[e.length-1],i=new Di({color:"color"in t?t.color:vp,width:"width"in t?t.width:1});n.strokeStyle=i}}var Nht=Nt(xe,{color:ot(Nw),fill:ot(Wu),outline:ot(Wu)});function Pht(r,e){var t=kt({},Nht,r,e);if(t){var n=e[e.length-1],i=new ua({color:"color"in t?t.color:vp});n.fillStyle=i;var a=t.fill;a!==void 0&&(n.fill=a);var o=t.outline;o!==void 0&&(n.outline=o)}}var Uht=Nt(xe,{coordinates:Oe(tH)});function aH(r,e){return kt(null,Uht,r,e)}function Dht(r,e){var t=e[e.length-1],n=t.coordinates,i=Xa(r,!1),a=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i,o=a.exec(i);if(o){var s=parseFloat(o[1]),A=parseFloat(o[2]),l=parseFloat(o[3]);n.push([s,A,l])}else n.push([])}var Qht=Nt(bl,{Track:_e(oH)});function Hht(r,e){var t=kt([],Qht,r,e);if(t)return new Fa(t)}var Ght=Nt(xe,{when:hft},Nt(bl,{coord:Dht}));function oH(r,e){var t=kt({coordinates:[],whens:[]},Ght,r,e);if(t){for(var n=[],i=t.coordinates,a=t.whens,o=0,s=Math.min(i.length,a.length);o<s;++o)i[o].length==3&&n.push(i[o][0],i[o][1],i[o][2],a[o]);return new kr(n,qt.XYZM)}}var kht=Nt(xe,{href:ot(eH)},Nt(bl,{x:ot(Lr),y:ot(Lr),w:ot(Lr),h:ot(Lr)}));function $ht(r,e){var t=kt({},kht,r,e);return t||null}var jht=Nt(xe,{coordinates:Oe(tH)});function sL(r,e){return kt(null,jht,r,e)}var Pw=Nt(xe,{extrude:ot(Wu),tessellate:ot(Wu),altitudeMode:ot(jt)});function sH(r,e){var t=kt({},Pw,r,e),n=sL(r,e);if(n){var i=new kr(n,qt.XYZ);return i.setProperties(t,!0),i}else return}function AH(r,e){var t=kt({},Pw,r,e),n=sL(r,e);if(n){var i=new Fn(n,qt.XYZ,[n.length]);return i.setProperties(t,!0),i}else return}var Vht=Nt(xe,{LineString:_e(sH),LinearRing:_e(AH),MultiGeometry:_e(lH),Point:_e(uH),Polygon:_e(cH)});function lH(r,e){var t=kt([],Vht,r,e);if(!t)return null;if(t.length===0)return new la(t);for(var n,i=!0,a=t[0].getType(),o,s=1,A=t.length;s<A;++s)if(o=t[s],o.getType()!=a){i=!1;break}if(i){var l=void 0,u=void 0;if(a==st.POINT){var c=t[0];l=c.getLayout(),u=c.getFlatCoordinates();for(var s=1,A=t.length;s<A;++s)o=t[s],Gr(u,o.getFlatCoordinates());n=new ns(u,l),aB(n,t)}else a==st.LINE_STRING?(n=new Fa(t),aB(n,t)):a==st.POLYGON?(n=new Ia(t),aB(n,t)):a==st.GEOMETRY_COLLECTION?n=new la(t):we(!1,37)}else n=new la(t);return n}function uH(r,e){var t=kt({},Pw,r,e),n=sL(r,e);if(n){var i=new pr(n,qt.XYZ);return i.setProperties(t,!0),i}else return}var Kht=Nt(xe,{innerBoundaryIs:Aft,outerBoundaryIs:uft});function cH(r,e){var t=kt({},Pw,r,e),n=kt([null],Kht,r,e);if(n&&n[0]){for(var i=n[0],a=[i.length],o=1,s=n.length;o<s;++o)Gr(i,n[o]),a.push(i.length);var A=new Fn(i,qt.XYZ,a);return A.setProperties(t,!0),A}else return}var zht=Nt(xe,{IconStyle:Iht,LabelStyle:Oht,LineStyle:Mht,PolyStyle:Pht});function AL(r,e){var t=kt({},zht,r,e,this);if(!t)return null;var n="fillStyle"in t?t.fillStyle:e_,i=t.fill;i!==void 0&&!i&&(n=null);var a;"imageStyle"in t?t.imageStyle!=oL&&(a=t.imageStyle):a=HS;var o="textStyle"in t?t.textStyle:jc,s="strokeStyle"in t?t.strokeStyle:GS,A=t.outline;return A!==void 0&&!A?[new Aa({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===st.GEOMETRY_COLLECTION){var h=u;return new la(h.getGeometriesArrayRecursive().filter(function(f){var p=f.getType();return p!==st.POLYGON&&p!==st.MULTI_POLYGON}))}else if(c!==st.POLYGON&&c!==st.MULTI_POLYGON)return u},fill:n,image:a,stroke:s,text:o,zIndex:void 0}),new Aa({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===st.GEOMETRY_COLLECTION){var h=u;return new la(h.getGeometriesArrayRecursive().filter(function(f){var p=f.getType();return p===st.POLYGON||p===st.MULTI_POLYGON}))}else if(c===st.POLYGON||c===st.MULTI_POLYGON)return u},fill:n,stroke:null,zIndex:void 0})]:[new Aa({fill:n,image:a,stroke:s,text:o,zIndex:void 0})]}function aB(r,e){var t=e.length,n=new Array(e.length),i=new Array(e.length),a=new Array(e.length),o,s,A;o=!1,s=!1,A=!1;for(var l=0;l<t;++l){var u=e[l];n[l]=u.get("extrude"),i[l]=u.get("tessellate"),a[l]=u.get("altitudeMode"),o=o||n[l]!==void 0,s=s||i[l]!==void 0,A=A||a[l]}o&&r.set("extrude",n),s&&r.set("tessellate",i),A&&r.set("altitudeMode",a)}var Xht=Nt(xe,{displayName:ot(jt),value:ot(jt)});function Yht(r,e){var t=r.getAttribute("name");uo(Xht,r,e);var n=e[e.length-1];t&&n.displayName?n[t]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:t!==null?n[t]=n.value:n.displayName!==null&&(n[n.displayName]=n.value),delete n.value}var Wht=Nt(xe,{Data:Yht,SchemaData:eft});function hH(r,e){uo(Wht,r,e)}function fH(r,e){uo(Z8,r,e)}var qht=Nt(xe,{Style:ot(AL),key:ot(jt),styleUrl:ot(rH)});function Zht(r,e){var t=kt({},qht,r,e,this);if(t){var n=t.key;if(n&&n=="normal"){var i=t.styleUrl;i&&(e[e.length-1]=i);var a=t.Style;a&&(e[e.length-1]=a)}}}function Jht(r,e){var t=iH.call(this,r,e);if(t){var n=e[e.length-1];Array.isArray(t)?n.Style=t:typeof t=="string"?n.styleUrl=t:we(!1,38)}}var tft=Nt(xe,{SimpleData:rft});function eft(r,e){uo(tft,r,e)}function rft(r,e){var t=r.getAttribute("name");if(t!==null){var n=jt(r),i=e[e.length-1];i[t]=n}}var nft=Nt(xe,{altitudeMode:ot(jt),minAltitude:ot(Lr),maxAltitude:ot(Lr),north:ot(Lr),south:ot(Lr),east:ot(Lr),west:ot(Lr)});function ift(r,e){var t=kt({},nft,r,e);if(t){var n=e[e.length-1],i=[parseFloat(t.west),parseFloat(t.south),parseFloat(t.east),parseFloat(t.north)];n.extent=i,n.altitudeMode=t.altitudeMode,n.minAltitude=parseFloat(t.minAltitude),n.maxAltitude=parseFloat(t.maxAltitude)}}var aft=Nt(xe,{minLodPixels:ot(Lr),maxLodPixels:ot(Lr),minFadeExtent:ot(Lr),maxFadeExtent:ot(Lr)});function oft(r,e){var t=kt({},aft,r,e);if(t){var n=e[e.length-1];n.minLodPixels=parseFloat(t.minLodPixels),n.maxLodPixels=parseFloat(t.maxLodPixels),n.minFadeExtent=parseFloat(t.minFadeExtent),n.maxFadeExtent=parseFloat(t.maxFadeExtent)}}var sft=Nt(xe,{LinearRing:_e(aH)});function Aft(r,e){var t=kt([],sft,r,e);if(t.length>0){var n=e[e.length-1];n.push.apply(n,t)}}var lft=Nt(xe,{LinearRing:Oe(aH)});function uft(r,e){var t=kt(void 0,lft,r,e);if(t){var n=e[e.length-1];n[0]=t}}function cft(r,e){uo(mht,r,e)}function hft(r,e){var t=e[e.length-1],n=t.whens,i=Xa(r,!1),a=Date.parse(i);n.push(isNaN(a)?0:a)}function Uw(r,e){for(var t=$u(e),n=t.length==4?t[3]:1,i=[n*255,t[2],t[1],t[0]],a=0;a<4;++a){var o=Math.floor(i[a]).toString(16);i[a]=o.length==1?"0"+o:o}Qe(r,i.join(""))}function fft(r,e,t){var n=t[t.length-1],i=n.layout,a=n.stride,o;i==qt.XY||i==qt.XYM?o=2:i==qt.XYZ||i==qt.XYZM?o=3:we(!1,34);var s=e.length,A="";if(s>0){A+=e[0];for(var l=1;l<o;++l)A+=","+e[l];for(var u=a;u<s;u+=a){A+=" "+e[u];for(var l=1;l<o;++l)A+=","+e[u+l]}}Qe(r,A)}var r_=Nt(xe,{Data:At(pft),value:At(vft),displayName:At(dft)});function pft(r,e,t){r.setAttribute("name",e.name);var n={node:r},i=e.value;typeof i=="object"?(i!==null&&i.displayName&&ke(n,r_,Ji,[i.displayName],t,["displayName"]),i!==null&&i.value&&ke(n,r_,Ji,[i.value],t,["value"])):ke(n,r_,Ji,[i],t,["value"])}function dft(r,e){gct(r,e)}function vft(r,e){Qe(r,e)}var gft=Nt(xe,{Placemark:At(vH)}),yft=function(r,e,t){var n=e[e.length-1].node;return $e(n.namespaceURI,"Placemark")};function mft(r,e,t){var n={node:r};ke(n,gft,yft,e,t,void 0,this)}var _ft=Pn("Data");function wft(r,e,t){for(var n={node:r},i=e.names,a=e.values,o=i.length,s=0;s<o;s++)ke(n,r_,_ft,[{name:i[s],value:a[s]}],t)}var $N=Nt(xe,["href"],Nt(bl,["x","y","w","h"])),jN=Nt(xe,{href:At(Qe)},Nt(bl,{x:At(ao),y:At(ao),w:At(ao),h:At(ao)})),Eft=function(r,e,t){return $e(bl[0],"gx:"+t)};function Cft(r,e,t){var n={node:r},i=t[t.length-1].node,a=$N[i.namespaceURI],o=po(e,a);ke(n,jN,Ji,o,t,a),a=$N[bl[0]],o=po(e,a),ke(n,jN,Eft,o,t,a)}var Bft=Nt(xe,["scale","heading","Icon","color","hotSpot"]),Tft=Nt(xe,{Icon:At(Cft),color:At(Uw),heading:At(ao),hotSpot:At(Zft),scale:At(yH)});function xft(r,e,t){var n={node:r},i={},a=e.getSrc(),o=e.getSize(),s=e.getImageSize(),A={href:a};if(o){A.w=o[0],A.h=o[1];var l=e.getAnchor(),u=e.getOrigin();if(u&&s&&u[0]!==0&&u[1]!==o[1]&&(A.x=u[0],A.y=s[1]-(u[1]+o[1])),l&&(l[0]!==o[0]/2||l[1]!==o[1]/2)){var c={x:l[0],xunits:Qa.PIXELS,y:o[1]-l[1],yunits:Qa.PIXELS};i.hotSpot=c}}i.Icon=A;var h=e.getScaleArray()[0],f=o;if(f===null&&(f=zv),f.length==2){var p=l1(f);h=h/p}h!==1&&(i.scale=h);var v=e.getRotation();v!==0&&(i.heading=v);var m=e.getColor();m&&(i.color=m);var g=t[t.length-1].node,_=Bft[g.namespaceURI],E=po(i,_);ke(n,Tft,Ji,E,t,_)}var Sft=Nt(xe,["color","scale"]),bft=Nt(xe,{color:At(Uw),scale:At(yH)});function Fft(r,e,t){var n={node:r},i={},a=e.getFill();a&&(i.color=a.getColor());var o=e.getScale();o&&o!==1&&(i.scale=o);var s=t[t.length-1].node,A=Sft[s.namespaceURI],l=po(i,A);ke(n,bft,Ji,l,t,A)}var Ift=Nt(xe,["color","width"]),Lft=Nt(xe,{color:At(Uw),width:At(ao)});function Oft(r,e,t){var n={node:r},i={color:e.getColor(),width:Number(e.getWidth())||1},a=t[t.length-1].node,o=Ift[a.namespaceURI],s=po(i,o);ke(n,Lft,Ji,s,t,o)}var Rft={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},pH=function(r,e,t){if(r){var n=e[e.length-1].node;return $e(n.namespaceURI,Rft[r.getType()])}},Mft=Pn("Point"),Nft=Pn("LineString"),Pft=Pn("LinearRing"),Uft=Pn("Polygon"),Dft=Nt(xe,{LineString:At(gp),Point:At(gp),Polygon:At(gH),GeometryCollection:At(dH)});function dH(r,e,t){var n={node:r},i=e.getType(),a=[],o;i===st.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach(function(s){var A=s.getType();A===st.MULTI_POINT?a=a.concat(s.getPoints()):A===st.MULTI_LINE_STRING?a=a.concat(s.getLineStrings()):A===st.MULTI_POLYGON?a=a.concat(s.getPolygons()):A===st.POINT||A===st.LINE_STRING||A===st.POLYGON?a.push(s):we(!1,39)}),o=pH):i===st.MULTI_POINT?(a=e.getPoints(),o=Mft):i===st.MULTI_LINE_STRING?(a=e.getLineStrings(),o=Nft):i===st.MULTI_POLYGON?(a=e.getPolygons(),o=Uft):we(!1,39),ke(n,Dft,o,a,t)}var Qft=Nt(xe,{LinearRing:At(gp)});function VN(r,e,t){var n={node:r};ke(n,Qft,Pft,[e],t)}var oB=Nt(xe,{ExtendedData:At(wft),MultiGeometry:At(dH),LineString:At(gp),LinearRing:At(gp),Point:At(gp),Polygon:At(gH),Style:At(qft),address:At(Qe),description:At(Qe),name:At(Qe),open:At(Up),phoneNumber:At(Qe),styleUrl:At(Qe),visibility:At(Up)}),Hft=Nt(xe,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Gft=Pn("ExtendedData");function vH(r,e,t){var n={node:r};e.getId()&&r.setAttribute("id",e.getId());var i=e.getProperties(),a={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};a[e.getGeometryName()]=1;var o=Object.keys(i||{}).sort().filter(function(L){return!a[L]}),s=e.getStyleFunction();if(s){var A=s(e,0);if(A){var l=Array.isArray(A)?A:[A],u=l;if(e.getGeometry()&&(u=l.filter(function(L){var O=L.getGeometryFunction()(e);if(O){var b=O.getType();return b===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var F=T.getType();return F===st.POINT||F===st.MULTI_POINT}).length:b===st.POINT||b===st.MULTI_POINT}})),this.writeStyles_){var c=l,h=l;e.getGeometry()&&(c=l.filter(function(L){var O=L.getGeometryFunction()(e);if(O){var b=O.getType();return b===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var F=T.getType();return F===st.LINE_STRING||F===st.MULTI_LINE_STRING}).length:b===st.LINE_STRING||b===st.MULTI_LINE_STRING}}),h=l.filter(function(L){var O=L.getGeometryFunction()(e);if(O){var b=O.getType();return b===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var F=T.getType();return F===st.POLYGON||F===st.MULTI_POLYGON}).length:b===st.POLYGON||b===st.MULTI_POLYGON}})),i.Style={pointStyles:u,lineStyles:c,polyStyles:h}}if(u.length&&i.name===void 0){var f=u[0].getText();f&&(i.name=f.getText())}}}var p=t[t.length-1].node,v=Hft[p.namespaceURI],m=po(i,v);if(ke(n,oB,Ji,m,t,v),o.length>0){var g=po(i,o),_={names:o,values:g};ke(n,oB,Gft,[_],t)}var E=t[0],B=e.getGeometry();B&&(B=On(B,!0,E)),ke(n,oB,pH,[B],t)}var kft=Nt(xe,["extrude","tessellate","altitudeMode","coordinates"]),$ft=Nt(xe,{extrude:At(Up),tessellate:At(Up),altitudeMode:At(Qe),coordinates:At(fft)});function gp(r,e,t){var n=e.getFlatCoordinates(),i={node:r};i.layout=e.getLayout(),i.stride=e.getStride();var a=e.getProperties();a.coordinates=n;var o=t[t.length-1].node,s=kft[o.namespaceURI],A=po(a,s);ke(i,$ft,Ji,A,t,s)}var jft=Nt(xe,["color","fill","outline"]),KN=Nt(xe,{outerBoundaryIs:At(VN),innerBoundaryIs:At(VN)}),Vft=Pn("innerBoundaryIs"),Kft=Pn("outerBoundaryIs");function gH(r,e,t){var n=e.getLinearRings(),i=n.shift(),a={node:r};ke(a,KN,Vft,n,t),ke(a,KN,Kft,[i],t)}var zft=Nt(xe,{color:At(Uw),fill:At(Up),outline:At(Up)});function Xft(r,e,t){var n={node:r},i=e.getFill(),a=e.getStroke(),o={color:i?i.getColor():void 0,fill:i?void 0:!1,outline:a?void 0:!1},s=t[t.length-1].node,A=jft[s.namespaceURI],l=po(o,A);ke(n,zft,Ji,l,t,A)}function yH(r,e){ao(r,Math.round(e*1e6)/1e6)}var Yft=Nt(xe,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Wft=Nt(xe,{IconStyle:At(xft),LabelStyle:At(Fft),LineStyle:At(Oft),PolyStyle:At(Xft)});function qft(r,e,t){var n={node:r},i={};if(e.pointStyles.length){var a=e.pointStyles[0].getText();a&&(i.LabelStyle=a);var o=e.pointStyles[0].getImage();o&&typeof o.getSrc=="function"&&(i.IconStyle=o)}if(e.lineStyles.length){var s=e.lineStyles[0].getStroke();s&&(i.LineStyle=s)}if(e.polyStyles.length){var s=e.polyStyles[0].getStroke();s&&!i.LineStyle&&(i.LineStyle=s),i.PolyStyle=e.polyStyles[0]}var A=t[t.length-1].node,l=Yft[A.namespaceURI],u=po(i,l);ke(n,Wft,Ji,u,t,l)}function Zft(r,e){r.setAttribute("x",String(e.x)),r.setAttribute("y",String(e.y)),r.setAttribute("xunits",e.xunits),r.setAttribute("yunits",e.yunits)}var Jft=Bht,lL={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */lL.read=function(r,e,t,n,i){var a,o,s=i*8-n-1,A=(1<<s)-1,l=A>>1,u=-7,c=t?i-1:0,h=t?-1:1,f=r[e+c];for(c+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=a*256+r[e+c],c+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=o*256+r[e+c],c+=h,u-=8);if(a===0)a=1-l;else{if(a===A)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(f?-1:1)*o*Math.pow(2,a-n)};lL.write=function(r,e,t,n,i,a){var o,s,A,l=a*8-i-1,u=(1<<l)-1,c=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,p=n?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(A=Math.pow(2,-o))<1&&(o--,A*=2),o+c>=1?e+=h/A:e+=h*Math.pow(2,1-c),e*A>=2&&(o++,A/=2),o+c>=u?(s=0,o=u):o+c>=1?(s=(e*A-1)*Math.pow(2,i),o=o+c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;r[t+f]=s&255,f+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;r[t+f]=o&255,f+=p,o/=256,l-=8);r[t+f-p]|=v*128};var tpt=Dr,Xm=lL;function Dr(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}Dr.Varint=0;Dr.Fixed64=1;Dr.Bytes=2;Dr.Fixed32=5;var jS=(1<<16)*(1<<16),zN=1/jS,ept=12,mH=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Dr.prototype={destroy:function(){this.buf=null},readFields:function(r,e,t){for(t=t||this.length;this.pos<t;){var n=this.readVarint(),i=n>>3,a=this.pos;this.type=n&7,r(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(r,e){return this.readFields(r,e,this.readVarint()+this.pos)},readFixed32:function(){var r=Ym(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=YN(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=Ym(this.buf,this.pos)+Ym(this.buf,this.pos+4)*jS;return this.pos+=8,r},readSFixed64:function(){var r=Ym(this.buf,this.pos)+YN(this.buf,this.pos+4)*jS;return this.pos+=8,r},readFloat:function(){var r=Xm.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=Xm.read(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var e=this.buf,t,n;return n=e[this.pos++],t=n&127,n<128||(n=e[this.pos++],t|=(n&127)<<7,n<128)||(n=e[this.pos++],t|=(n&127)<<14,n<128)||(n=e[this.pos++],t|=(n&127)<<21,n<128)?t:(n=e[this.pos],t|=(n&15)<<28,rpt(t,r,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2===1?(r+1)/-2:r/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var r=this.readVarint()+this.pos,e=this.pos;return this.pos=r,r-e>=ept&&mH?vpt(this.buf,e,r):dpt(this.buf,e,r)},readBytes:function(){var r=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,r);return this.pos=r,e},readPackedVarint:function(r,e){if(this.type!==Dr.Bytes)return r.push(this.readVarint(e));var t=GA(this);for(r=r||[];this.pos<t;)r.push(this.readVarint(e));return r},readPackedSVarint:function(r){if(this.type!==Dr.Bytes)return r.push(this.readSVarint());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readSVarint());return r},readPackedBoolean:function(r){if(this.type!==Dr.Bytes)return r.push(this.readBoolean());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readBoolean());return r},readPackedFloat:function(r){if(this.type!==Dr.Bytes)return r.push(this.readFloat());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readFloat());return r},readPackedDouble:function(r){if(this.type!==Dr.Bytes)return r.push(this.readDouble());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readDouble());return r},readPackedFixed32:function(r){if(this.type!==Dr.Bytes)return r.push(this.readFixed32());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readFixed32());return r},readPackedSFixed32:function(r){if(this.type!==Dr.Bytes)return r.push(this.readSFixed32());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed32());return r},readPackedFixed64:function(r){if(this.type!==Dr.Bytes)return r.push(this.readFixed64());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readFixed64());return r},readPackedSFixed64:function(r){if(this.type!==Dr.Bytes)return r.push(this.readSFixed64());var e=GA(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed64());return r},skip:function(r){var e=r&7;if(e===Dr.Varint)for(;this.buf[this.pos++]>127;);else if(e===Dr.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Dr.Fixed32)this.pos+=4;else if(e===Dr.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(r,e){this.writeVarint(r<<3|e)},realloc:function(r){for(var e=this.length||16;e<this.pos+r;)e*=2;if(e!==this.length){var t=new Uint8Array(e);t.set(this.buf),this.buf=t,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(r){this.realloc(4),wf(this.buf,r,this.pos),this.pos+=4},writeSFixed32:function(r){this.realloc(4),wf(this.buf,r,this.pos),this.pos+=4},writeFixed64:function(r){this.realloc(8),wf(this.buf,r&-1,this.pos),wf(this.buf,Math.floor(r*zN),this.pos+4),this.pos+=8},writeSFixed64:function(r){this.realloc(8),wf(this.buf,r&-1,this.pos),wf(this.buf,Math.floor(r*zN),this.pos+4),this.pos+=8},writeVarint:function(r){if(r=+r||0,r>268435455||r<0){npt(r,this);return}this.realloc(4),this.buf[this.pos++]=r&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=(r>>>=7)&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=(r>>>=7)&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=r>>>7&127)))},writeSVarint:function(r){this.writeVarint(r<0?-r*2-1:r*2)},writeBoolean:function(r){this.writeVarint(Boolean(r))},writeString:function(r){r=String(r),this.realloc(r.length*4),this.pos++;var e=this.pos;this.pos=gpt(this.buf,r,this.pos);var t=this.pos-e;t>=128&&XN(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(r){this.realloc(4),Xm.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),Xm.write(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var e=r.length;this.writeVarint(e),this.realloc(e);for(var t=0;t<e;t++)this.buf[this.pos++]=r[t]},writeRawMessage:function(r,e){this.pos++;var t=this.pos;r(e,this);var n=this.pos-t;n>=128&&XN(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeMessage:function(r,e,t){this.writeTag(r,Dr.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,opt,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,spt,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,upt,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,Apt,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,lpt,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,cpt,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,hpt,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,fpt,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,ppt,e)},writeBytesField:function(r,e){this.writeTag(r,Dr.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,Dr.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,Dr.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,Dr.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,Dr.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,Dr.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,Dr.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,Dr.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,Dr.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,Dr.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};function rpt(r,e,t){var n=t.buf,i,a;if(a=n[t.pos++],i=(a&112)>>4,a<128||(a=n[t.pos++],i|=(a&127)<<3,a<128)||(a=n[t.pos++],i|=(a&127)<<10,a<128)||(a=n[t.pos++],i|=(a&127)<<17,a<128)||(a=n[t.pos++],i|=(a&127)<<24,a<128)||(a=n[t.pos++],i|=(a&1)<<31,a<128))return _f(r,i,e);throw new Error("Expected varint not more than 10 bytes")}function GA(r){return r.type===Dr.Bytes?r.readVarint()+r.pos:r.pos+1}function _f(r,e,t){return t?e*4294967296+(r>>>0):(e>>>0)*4294967296+(r>>>0)}function npt(r,e){var t,n;if(r>=0?(t=r%4294967296|0,n=r/4294967296|0):(t=~(-r%4294967296),n=~(-r/4294967296),t^4294967295?t=t+1|0:(t=0,n=n+1|0)),r>=18446744073709552e3||r<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),ipt(t,n,e),apt(n,e)}function ipt(r,e,t){t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos]=r&127}function apt(r,e){var t=(r&7)<<4;e.buf[e.pos++]|=t|((r>>>=3)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127)))))}function XN(r,e,t){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(n);for(var i=t.pos-1;i>=r;i--)t.buf[i+n]=t.buf[i]}function opt(r,e){for(var t=0;t<r.length;t++)e.writeVarint(r[t])}function spt(r,e){for(var t=0;t<r.length;t++)e.writeSVarint(r[t])}function Apt(r,e){for(var t=0;t<r.length;t++)e.writeFloat(r[t])}function lpt(r,e){for(var t=0;t<r.length;t++)e.writeDouble(r[t])}function upt(r,e){for(var t=0;t<r.length;t++)e.writeBoolean(r[t])}function cpt(r,e){for(var t=0;t<r.length;t++)e.writeFixed32(r[t])}function hpt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed32(r[t])}function fpt(r,e){for(var t=0;t<r.length;t++)e.writeFixed64(r[t])}function ppt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed64(r[t])}function Ym(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+r[e+3]*16777216}function wf(r,e,t){r[t]=e,r[t+1]=e>>>8,r[t+2]=e>>>16,r[t+3]=e>>>24}function YN(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function dpt(r,e,t){for(var n="",i=e;i<t;){var a=r[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s>t)break;var A,l,u;s===1?a<128&&(o=a):s===2?(A=r[i+1],(A&192)===128&&(o=(a&31)<<6|A&63,o<=127&&(o=null))):s===3?(A=r[i+1],l=r[i+2],(A&192)===128&&(l&192)===128&&(o=(a&15)<<12|(A&63)<<6|l&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(A=r[i+1],l=r[i+2],u=r[i+3],(A&192)===128&&(l&192)===128&&(u&192)===128&&(o=(a&15)<<18|(A&63)<<12|(l&63)<<6|u&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,n+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),n+=String.fromCharCode(o),i+=s}return n}function vpt(r,e,t){return mH.decode(r.subarray(e,t))}function gpt(r,e,t){for(var n=0,i,a;n<e.length;n++){if(i=e.charCodeAt(n),i>55295&&i<57344)if(a)if(i<56320){r[t++]=239,r[t++]=191,r[t++]=189,a=i;continue}else i=a-55296<<10|i-56320|65536,a=null;else{i>56319||n+1===e.length?(r[t++]=239,r[t++]=191,r[t++]=189):a=i;continue}else a&&(r[t++]=239,r[t++]=191,r[t++]=189,a=null);i<128?r[t++]=i:(i<2048?r[t++]=i>>6|192:(i<65536?r[t++]=i>>12|224:(r[t++]=i>>18|240,r[t++]=i>>12&63|128),r[t++]=i>>6&63|128),r[t++]=i&63|128)}return t}var WN=si(),Fg=function(){function r(e,t,n,i,a){this.styleFunction,this.extent_,this.id_=a,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=i}return r.prototype.get=function(e){return this.properties_[e]},r.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===st.POINT?qc(this.flatCoordinates_):iw(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},r.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var e=ba(this.getExtent());this.flatInteriorPoints_=hI(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_},r.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var e=W6(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=F6(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_},r.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=N_(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},r.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var e=this.flatCoordinates_,t=0,n=this.ends_,i=0,a=n.length;i<a;++i){var o=n[i],s=N_(e,t,o,2,.5);Gr(this.flatMidpoints_,s),t=o}}return this.flatMidpoints_},r.prototype.getId=function(){return this.id_},r.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},r.prototype.getGeometry=function(){return this},r.prototype.getSimplifiedGeometry=function(e){return this},r.prototype.simplifyTransformed=function(e,t){return this},r.prototype.getProperties=function(){return this.properties_},r.prototype.getStride=function(){return 2},r.prototype.getStyleFunction=function(){return this.styleFunction},r.prototype.getType=function(){return this.type_},r.prototype.transform=function(e){e=Re(e);var t=e.getExtent(),n=e.getWorldExtent();if(t&&n){var i=li(n)/li(t);Va(WN,n[0],n[3],i,-i,0,0,0),Fu(this.flatCoordinates_,0,this.flatCoordinates_.length,2,WN,this.flatCoordinates_)}},r.prototype.getEnds=function(){return this.ends_},r}();Fg.prototype.getEndss=Fg.prototype.getEnds;Fg.prototype.getFlatCoordinates=Fg.prototype.getOrientedFlatCoordinates;var qN=Fg,ypt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),mpt=function(r){ypt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=new Bl({code:"",units:Ga.TILE_PIXELS}),n.featureClass_=i.featureClass?i.featureClass:qN,n.geometryName_=i.geometryName,n.layerName_=i.layerName?i.layerName:"layer",n.layers_=i.layers?i.layers:null,n.idProperty_=i.idProperty,n.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],n}return e.prototype.readRawGeometry_=function(t,n,i,a){t.pos=n.geometry;for(var o=t.readVarint()+t.pos,s=1,A=0,l=0,u=0,c=0,h=0;t.pos<o;){if(!A){var f=t.readVarint();s=f&7,A=f>>3}A--,s===1||s===2?(l+=t.readSVarint(),u+=t.readSVarint(),s===1&&c>h&&(a.push(c),h=c),i.push(l,u),c+=2):s===7?c>h&&(i.push(i[h],i[h+1]),c+=2):we(!1,59)}c>h&&(a.push(c),h=c)},e.prototype.createFeature_=function(t,n,i){var a=n.type;if(a===0)return null;var o,s=n.properties,A;this.idProperty_?(A=s[this.idProperty_],delete s[this.idProperty_]):A=n.id,s[this.layerName_]=n.layer.name;var l=[],u=[];this.readRawGeometry_(t,n,l,u);var c=Bpt(a,u.length);if(this.featureClass_===qN)o=new this.featureClass_(c,l,u,s,A),o.transform(i.dataProjection);else{var h=void 0;if(c==st.POLYGON){var f=mW(l,u);h=f.length>1?new Ia(l,qt.XY,f):new Fn(l,qt.XY,u)}else h=c===st.POINT?new pr(l,qt.XY):c===st.LINE_STRING?new kr(l,qt.XY):c===st.POLYGON?new Fn(l,qt.XY,u):c===st.MULTI_POINT?new ns(l,qt.XY):c===st.MULTI_LINE_STRING?new Fa(l,qt.XY,u):null;var p=this.featureClass_;o=new p,this.geometryName_&&o.setGeometryName(this.geometryName_);var v=On(h,!1,i);o.setGeometry(v),A!==void 0&&o.setId(A),o.setProperties(s,!0)}return o},e.prototype.getType=function(){return Ts.ARRAY_BUFFER},e.prototype.readFeatures=function(t,n){var i=this.layers_,a=this.adaptOptions(n),o=Re(a.dataProjection);o.setWorldExtent(a.extent),a.dataProjection=o;var s=new tpt(t),A=s.readFields(_pt,{}),l=[];for(var u in A)if(!(i&&i.indexOf(u)==-1)){var c=A[u],h=c?[0,0,c.extent,c.extent]:null;o.setExtent(h);for(var f=0,p=c.length;f<p;++f){var v=Cpt(s,c,f),m=this.createFeature_(s,v,a);m!==null&&l.push(m)}}return l},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(py);function _pt(r,e,t){if(r===3){var n={keys:[],values:[],features:[]},i=t.readVarint()+t.pos;t.readFields(wpt,n,i),n.length=n.features.length,n.length&&(e[n.name]=n)}}function wpt(r,e,t){if(r===15)e.version=t.readVarint();else if(r===1)e.name=t.readString();else if(r===5)e.extent=t.readVarint();else if(r===2)e.features.push(t.pos);else if(r===3)e.keys.push(t.readString());else if(r===4){for(var n=null,i=t.readVarint()+t.pos;t.pos<i;)r=t.readVarint()>>3,n=r===1?t.readString():r===2?t.readFloat():r===3?t.readDouble():r===4?t.readVarint64():r===5?t.readVarint():r===6?t.readSVarint():r===7?t.readBoolean():null;e.values.push(n)}}function Ept(r,e,t){if(r==1)e.id=t.readVarint();else if(r==2)for(var n=t.readVarint()+t.pos;t.pos<n;){var i=e.layer.keys[t.readVarint()],a=e.layer.values[t.readVarint()];e.properties[i]=a}else r==3?e.type=t.readVarint():r==4&&(e.geometry=t.pos)}function Cpt(r,e,t){r.pos=e.features[t];var n=r.readVarint()+r.pos,i={layer:e,type:0,properties:{}};return r.readFields(Ept,i,n),i}function Bpt(r,e){var t;return r===1?t=e===1?st.POINT:st.MULTI_POINT:r===2?t=e===1?st.LINE_STRING:st.MULTI_LINE_STRING:r===3&&(t=st.POLYGON),t}var Tpt=mpt,xpt=function(){function r(){}return r.prototype.read=function(e){if(e)if(typeof e=="string"){var t=oA(e);return this.readFromDocument(t)}else return aA(e)?this.readFromDocument(e):this.readFromNode(e);else return null},r.prototype.readFromDocument=function(e){for(var t=e.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readFromNode(t);return null},r.prototype.readFromNode=function(e){},r}(),uL=xpt,Spt="http://www.w3.org/1999/xlink";function td(r){return r.getAttributeNS(Spt,"href")}var bpt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),_o=[null,"http://www.opengis.net/ows/1.1"],Fpt=Nt(_o,{ServiceIdentification:ot(tdt),ServiceProvider:ot(rdt),OperationsMetadata:ot(Zpt)}),Ipt=function(r){bpt(e,r);function e(){return r.call(this)||this}return e.prototype.readFromNode=function(t){var n=kt({},Fpt,t,[]);return n||null},e}(uL),Lpt=Nt(_o,{DeliveryPoint:ot(jt),City:ot(jt),AdministrativeArea:ot(jt),PostalCode:ot(jt),Country:ot(jt),ElectronicMailAddress:ot(jt)}),Opt=Nt(_o,{Value:yn(ndt)}),Rpt=Nt(_o,{AllowedValues:ot(Vpt)}),Mpt=Nt(_o,{Phone:ot(Jpt),Address:ot(jpt)}),Npt=Nt(_o,{HTTP:ot(Wpt)}),Ppt=Nt(_o,{Get:yn(Ypt),Post:void 0}),Upt=Nt(_o,{DCP:ot(Xpt)}),Dpt=Nt(_o,{Operation:qpt}),Qpt=Nt(_o,{Voice:ot(jt),Facsimile:ot(jt)}),Hpt=Nt(_o,{Constraint:yn(Kpt)}),Gpt=Nt(_o,{IndividualName:ot(jt),PositionName:ot(jt),ContactInfo:ot(zpt)}),kpt=Nt(_o,{Abstract:ot(jt),AccessConstraints:ot(jt),Fees:ot(jt),Title:ot(jt),ServiceTypeVersion:ot(jt),ServiceType:ot(jt)}),$pt=Nt(_o,{ProviderName:ot(jt),ProviderSite:ot(td),ServiceContact:ot(edt)});function jpt(r,e){return kt({},Lpt,r,e)}function Vpt(r,e){return kt({},Opt,r,e)}function Kpt(r,e){var t=r.getAttribute("name");if(t)return kt({name:t},Rpt,r,e)}function zpt(r,e){return kt({},Mpt,r,e)}function Xpt(r,e){return kt({},Npt,r,e)}function Ypt(r,e){var t=td(r);if(t)return kt({href:t},Hpt,r,e)}function Wpt(r,e){return kt({},Ppt,r,e)}function qpt(r,e){var t=r.getAttribute("name"),n=kt({},Upt,r,e);if(n){var i=e[e.length-1];i[t]=n}}function Zpt(r,e){return kt({},Dpt,r,e)}function Jpt(r,e){return kt({},Qpt,r,e)}function tdt(r,e){return kt({},kpt,r,e)}function edt(r,e){return kt({},Gpt,r,e)}function rdt(r,e){return kt({},$pt,r,e)}function ndt(r,e){return jt(r)}var _H=Ipt;function ZN(r,e,t,n,i,a){var o,s;i!==void 0?(o=i,s=a!==void 0?a:0):(o=[],s=0);for(var A=e;A<t;){var l=r[A++];o[s++]=r[A++],o[s++]=l;for(var u=2;u<n;++u)o[s++]=r[A++]}return o.length=s,o}var idt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),adt=function(r){idt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Re("EPSG:4326"),n.factor_=i.factor?i.factor:1e5,n.geometryLayout_=i.geometryLayout?i.geometryLayout:qt.XY,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new sr(i)},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return[i]},e.prototype.readGeometryFromText=function(t,n){var i=JT(this.geometryLayout_),a=sdt(t,i,this.factor_);ZN(a,0,a.length,i,a);var o=tl(a,0,a.length,i),s=new kr(o,this.geometryLayout_);return On(s,!1,this.adaptOptions(n))},e.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(we(!1,40),"")},e.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},e.prototype.writeGeometryText=function(t,n){t=On(t,!0,this.adaptOptions(n));var i=t.getFlatCoordinates(),a=t.getStride();return ZN(i,0,i.length,a,i),odt(i,a,this.factor_)},e}(aL);function odt(r,e,t){var n=t||1e5,i,a=new Array(e);for(i=0;i<e;++i)a[i]=0;for(var o=0,s=r.length;o<s;)for(i=0;i<e;++i,++o){var A=r[o],l=A-a[i];a[i]=A,r[o]=l}return Adt(r,n)}function sdt(r,e,t){var n=t||1e5,i,a=new Array(e);for(i=0;i<e;++i)a[i]=0;for(var o=ldt(r,n),s=0,A=o.length;s<A;)for(i=0;i<e;++i,++s)a[i]+=o[s],o[s]=a[i];return o}function Adt(r,e){for(var t=e||1e5,n=0,i=r.length;n<i;++n)r[n]=Math.round(r[n]*t);return udt(r)}function ldt(r,e){for(var t=e||1e5,n=cdt(r),i=0,a=n.length;i<a;++i)n[i]/=t;return n}function udt(r){for(var e=0,t=r.length;e<t;++e){var n=r[e];r[e]=n<0?~(n<<1):n<<1}return hdt(r)}function cdt(r){for(var e=fdt(r),t=0,n=e.length;t<n;++t){var i=e[t];e[t]=i&1?~(i>>1):i>>1}return e}function hdt(r){for(var e="",t=0,n=r.length;t<n;++t)e+=pdt(r[t]);return e}function fdt(r){for(var e=[],t=0,n=0,i=0,a=r.length;i<a;++i){var o=r.charCodeAt(i)-63;t|=(o&31)<<n,o<32?(e.push(t),t=0,n=0):n+=5}return e}function pdt(r){for(var e,t="";r>=32;)e=(32|r&31)+63,t+=String.fromCharCode(e),r>>=5;return e=r+63,t+=String.fromCharCode(e),t}var ddt=adt,vdt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gdt=function(r){vdt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.layerName_=i.layerName,n.layers_=i.layers?i.layers:null,n.dataProjection=Re(i.dataProjection?i.dataProjection:"EPSG:4326"),n}return e.prototype.readFeaturesFromObject=function(t,n){if(t.type=="Topology"){var i=t,a=void 0,o=null,s=null;i.transform&&(a=i.transform,o=a.scale,s=a.translate);var A=i.arcs;a&&xdt(A,o,s);var l=[],u=i.objects,c=this.layerName_,h=void 0;for(var f in u)this.layers_&&this.layers_.indexOf(f)==-1||(u[f].type==="GeometryCollection"?(h=u[f],l.push.apply(l,Tdt(h,A,o,s,c,f,n))):(h=u[f],l.push(wH(h,A,o,s,c,f,n))));return l}else return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(WI),ydt={Point:mdt,LineString:wdt,Polygon:Cdt,MultiPoint:_dt,MultiLineString:Edt,MultiPolygon:Bdt};function Dw(r,e){for(var t=[],n,i=0,a=r.length;i<a;++i)if(n=r[i],i>0&&t.pop(),n>=0)for(var o=e[n],s=0,A=o.length;s<A;++s)t.push(o[s].slice(0));else for(var o=e[~n],s=o.length-1;s>=0;--s)t.push(o[s].slice(0));return t}function mdt(r,e,t){var n=r.coordinates;return e&&t&&cL(n,e,t),new pr(n)}function _dt(r,e,t){var n=r.coordinates;if(e&&t)for(var i=0,a=n.length;i<a;++i)cL(n[i],e,t);return new ns(n)}function wdt(r,e){var t=Dw(r.arcs,e);return new kr(t)}function Edt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=Dw(r.arcs[n],e);return new Fa(t)}function Cdt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=Dw(r.arcs[n],e);return new Fn(t)}function Bdt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n){for(var a=r.arcs[n],o=[],s=0,A=a.length;s<A;++s)o[s]=Dw(a[s],e);t[n]=o}return new Ia(t)}function Tdt(r,e,t,n,i,a,o){for(var s=r.geometries,A=[],l=0,u=s.length;l<u;++l)A[l]=wH(s[l],e,t,n,i,a,o);return A}function wH(r,e,t,n,i,a,o){var s=null,A=r.type;if(A){var l=ydt[A];A==="Point"||A==="MultiPoint"?s=l(r,t,n):s=l(r,e),s=On(s,!1,o)}var u=new sr({geometry:s});r.id!==void 0&&u.setId(r.id);var c=r.properties;return i&&(c||(c={}),c[i]=a),c&&u.setProperties(c,!0),u}function xdt(r,e,t){for(var n=0,i=r.length;n<i;++n)Sdt(r[n],e,t)}function Sdt(r,e,t){for(var n=0,i=0,a=0,o=r.length;a<o;++a){var s=r[a];n+=s[0],i+=s[1],s[0]=n,s[1]=i,cL(s,e,t)}}function cL(r,e,t){r[0]=r[0]*e[0]+t[0],r[1]=r[1]*e[1]+t[1]}var bdt=gdt,Fdt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),$r=function(r){Fdt(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.schemaLocation=i.schemaLocation?i.schemaLocation:n.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",n}return e}(nr);$r.prototype.namespace="http://www.opengis.net/gml/3.2";$r.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Oe(nr.prototype.readFlatPos),posList:Oe(nr.prototype.readFlatPosList),coordinates:Oe(Jp.prototype.readFlatCoordinates)}};$r.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:nr.prototype.interiorParser,exterior:nr.prototype.exteriorParser}};$r.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Oe(ur.prototype.readPoint),MultiPoint:Oe(ur.prototype.readMultiPoint),LineString:Oe(ur.prototype.readLineString),MultiLineString:Oe(ur.prototype.readMultiLineString),LinearRing:Oe(ur.prototype.readLinearRing),Polygon:Oe(ur.prototype.readPolygon),MultiPolygon:Oe(ur.prototype.readMultiPolygon),Surface:Oe($r.prototype.readSurface),MultiSurface:Oe(nr.prototype.readMultiSurface),Curve:Oe($r.prototype.readCurve),MultiCurve:Oe(nr.prototype.readMultiCurve),Envelope:Oe($r.prototype.readEnvelope)}};$r.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:_e(nr.prototype.curveMemberParser),curveMembers:_e(nr.prototype.curveMemberParser)}};$r.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:_e(nr.prototype.surfaceMemberParser),surfaceMembers:_e(nr.prototype.surfaceMemberParser)}};$r.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:_e(ur.prototype.readLineString),Curve:_e(nr.prototype.readCurve)}};$r.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:_e(ur.prototype.readPolygon),Surface:_e(nr.prototype.readSurface)}};$r.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Oe(nr.prototype.readPatch)}};$r.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:Oe(nr.prototype.readSegment)}};$r.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:_e(nr.prototype.readFlatPosList),upperCorner:_e(nr.prototype.readFlatPosList)}};$r.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Oe(nr.prototype.readPolygonPatch)}};$r.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Oe(nr.prototype.readLineStringSegment)}};$r.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:_e(ur.prototype.pointMemberParser),pointMembers:_e(ur.prototype.pointMemberParser)}};$r.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:_e(ur.prototype.lineStringMemberParser),lineStringMembers:_e(ur.prototype.lineStringMemberParser)}};$r.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:_e(ur.prototype.polygonMemberParser),polygonMembers:_e(ur.prototype.polygonMemberParser)}};$r.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:_e(ur.prototype.readFlatCoordinatesFromNode)}};$r.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:_e(ur.prototype.readLineString)}};$r.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:_e(ur.prototype.readPolygon)}};$r.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Oe(ur.prototype.readFlatLinearRing)}};$r.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:At(nr.prototype.writeRing),interior:At(nr.prototype.writeRing)}};$r.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:At(Qe),upperCorner:At(Qe)}};$r.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:At(nr.prototype.writeSurfaceOrPolygonMember),polygonMember:At(nr.prototype.writeSurfaceOrPolygonMember)}};$r.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:At(nr.prototype.writePointMember)}};$r.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:At(nr.prototype.writeLineStringOrCurveMember),curveMember:At(nr.prototype.writeLineStringOrCurveMember)}};$r.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:At(nr.prototype.writeCurveOrLineString),MultiCurve:At(nr.prototype.writeMultiCurveOrLineString),Point:At($r.prototype.writePoint),MultiPoint:At(nr.prototype.writeMultiPoint),LineString:At(nr.prototype.writeCurveOrLineString),MultiLineString:At(nr.prototype.writeMultiCurveOrLineString),LinearRing:At(nr.prototype.writeLinearRing),Polygon:At(nr.prototype.writeSurfaceOrPolygon),MultiPolygon:At(nr.prototype.writeMultiSurfaceOrPolygon),Surface:At(nr.prototype.writeSurfaceOrPolygon),MultiSurface:At(nr.prototype.writeMultiSurfaceOrPolygon),Envelope:At(nr.prototype.writeEnvelope)}};var hL=$r,Idt=function(){function r(e){this.tagName_=e}return r.prototype.getTagName=function(){return this.tagName_},r}(),EH=Idt,Ldt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Odt=function(r){Ldt(e,r);function e(t,n){var i=r.call(this,t)||this;return i.conditions=n,we(i.conditions.length>=2,57),i}return e}(EH),Rdt=Odt,Mdt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ndt=function(r){Mdt(e,r);function e(t){return r.call(this,"And",Array.prototype.slice.call(arguments))||this}return e}(Rdt),Pdt=Ndt,Udt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ddt=function(r){Udt(e,r);function e(t,n,i){var a=r.call(this,"BBOX")||this;if(a.geometryName=t,a.extent=n,n.length!==4)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return a.srsName=i,a}return e}(EH),Qdt=Ddt;function Hdt(r){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Pdt,e))}function Gdt(r,e,t){return new Qdt(r,e,t)}var kdt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),JN={"http://www.opengis.net/gml":{boundedBy:ot(ur.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:_e(ur.prototype.readFeaturesInternal)}},$dt={"http://www.opengis.net/wfs":{totalInserted:ot(oi),totalUpdated:ot(oi),totalDeleted:ot(oi)},"http://www.opengis.net/wfs/2.0":{totalInserted:ot(oi),totalUpdated:ot(oi),totalDeleted:ot(oi)}},jdt={"http://www.opengis.net/wfs":{TransactionSummary:ot(eP,"transactionSummary"),InsertResults:ot(nP,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:ot(eP,"transactionSummary"),InsertResults:ot(nP,"insertIds")}},Vdt={"http://www.opengis.net/wfs":{PropertyName:At(Qe)},"http://www.opengis.net/wfs/2.0":{PropertyName:At(Qe)}},CH={"http://www.opengis.net/wfs":{Insert:At(iP),Update:At(oP),Delete:At(aP),Property:At(sP),Native:At(AP)},"http://www.opengis.net/wfs/2.0":{Insert:At(iP),Update:At(oP),Delete:At(aP),Property:At(sP),Native:At(AP)}},BH="feature",fL="http://www.w3.org/2000/xmlns/",pL={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},VS={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},dL={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},tP={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},vL={"2.0.0":hL,"1.1.0":nr,"1.0.0":Jp},Kdt="1.1.0",zdt=function(r){kdt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.version_=i.version?i.version:Kdt,n.featureType_=i.featureType,n.featureNS_=i.featureNS,n.gmlFormat_=i.gmlFormat?i.gmlFormat:new vL[n.version_],n.schemaLocation_=i.schemaLocation?i.schemaLocation:tP[n.version_],n}return e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,n){var i={node:t};ve(i,{featureType:this.featureType_,featureNS:this.featureNS_}),ve(i,this.getReadOptions(t,n||{}));var a=[i],o;this.version_==="2.0.0"?o=JN:o=this.gmlFormat_.FEATURE_COLLECTION_PARSERS;var s=kt([],o,t,a,this.gmlFormat_);return s||(s=[]),s},e.prototype.readTransactionResponse=function(t){if(t)if(typeof t=="string"){var n=oA(t);return this.readTransactionResponseFromDocument(n)}else return aA(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t);else return},e.prototype.readFeatureCollectionMetadata=function(t){if(t)if(typeof t=="string"){var n=oA(t);return this.readFeatureCollectionMetadataFromDocument(n)}else return aA(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t);else return},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(n)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var n={},i=el(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,kt(n,JN,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(n)},e.prototype.readTransactionResponseFromNode=function(t){return kt({},jdt,t,[])},e.prototype.writeGetFeature=function(t){var n=this,i=$e(VS[this.version_],"GetFeature");i.setAttribute("service","WFS"),i.setAttribute("version",this.version_),t.handle&&i.setAttribute("handle",t.handle),t.outputFormat&&i.setAttribute("outputFormat",t.outputFormat),t.maxFeatures!==void 0&&i.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&i.setAttribute("resultType",t.resultType),t.startIndex!==void 0&&i.setAttribute("startIndex",String(t.startIndex)),t.count!==void 0&&i.setAttribute("count",String(t.count)),t.viewParams!==void 0&&i.setAttribute("viewParams",t.viewParams),i.setAttributeNS(wh,"xsi:schemaLocation",this.schemaLocation_);var a={node:i};if(ve(a,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),we(Array.isArray(t.featureTypes),11),typeof t.featureTypes[0]=="string"){var o=t.filter;t.bbox&&(we(t.geometryName,12),o=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,o)),ve(a,{geometryName:t.geometryName,filter:o}),yP(i,t.featureTypes,[a])}else t.featureTypes.forEach(function(s){var A=n.combineBboxAndFilter(s.geometryName,s.bbox,t.srsName,t.filter);ve(a,{geometryName:s.geometryName,filter:A}),yP(i,[s.name],[a])});return i},e.prototype.combineBboxAndFilter=function(t,n,i,a){var o=Gdt(t,n,i);return a?Hdt(a,o):o},e.prototype.writeTransaction=function(t,n,i,a){var o=[],s=a.version?a.version:this.version_,A=$e(VS[s],"Transaction");A.setAttribute("service","WFS"),A.setAttribute("version",s);var l;a&&(l=a.gmlOptions?a.gmlOptions:{},a.handle&&A.setAttribute("handle",a.handle)),A.setAttributeNS(wh,"xsi:schemaLocation",tP[s]);var u=Xdt(A,l,s,a);return t&&Wm("Insert",t,o,u),n&&Wm("Update",n,o,u),i&&Wm("Delete",i,o,u),a.nativeElements&&Wm("Native",a.nativeElements,o,u),A},e.prototype.readProjectionFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(n);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild){t=t.firstElementChild.firstElementChild;for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(!(n.childNodes.length===0||n.childNodes.length===1&&n.firstChild.nodeType===3)){var i=[{}];return this.gmlFormat_.readGeometryElement(n,i),Re(i.pop().srsName)}}return null},e}(vy);function Xdt(r,e,t,n){var i=n.featurePrefix?n.featurePrefix:BH,a;t==="1.0.0"?a=2:t==="1.1.0"?a=3:t==="2.0.0"&&(a=3.2);var o=ve({node:r},{version:t,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:i,gmlVersion:a,hasZ:n.hasZ,srsName:n.srsName},e);return o}function Wm(r,e,t,n){ke(n,CH,Pn(r),e,t)}function eP(r,e){return kt({},$dt,r,e)}var Ydt={"http://www.opengis.net/ogc":{FeatureId:_e(function(r,e){return r.getAttribute("fid")})},"http://www.opengis.net/ogc/1.1":{FeatureId:_e(function(r,e){return r.getAttribute("fid")})}};function rP(r,e){uo(Ydt,r,e)}var Wdt={"http://www.opengis.net/wfs":{Feature:rP},"http://www.opengis.net/wfs/2.0":{Feature:rP}};function nP(r,e){return kt([],Wdt,r,e)}function iP(r,e,t){var n=t[t.length-1],i=n.featureType,a=n.featureNS,o=n.gmlVersion,s=$e(a,i);r.appendChild(s),o===2?Jp.prototype.writeFeatureElement(s,e,t):o===3?nr.prototype.writeFeatureElement(s,e,t):hL.prototype.writeFeatureElement(s,e,t)}function TH(r,e,t){var n=t[t.length-1],i=n.version,a=pL[i],o=$e(a,"Filter"),s=$e(a,"FeatureId");o.appendChild(s),s.setAttribute("fid",e),r.appendChild(o)}function gL(r,e){r=r||BH;var t=r+":";return e.indexOf(t)===0?e:t+e}function aP(r,e,t){var n=t[t.length-1];we(e.getId()!==void 0,26);var i=n.featureType,a=n.featurePrefix,o=n.featureNS,s=gL(a,i);r.setAttribute("typeName",s),r.setAttributeNS(fL,"xmlns:"+a,o);var A=e.getId();A!==void 0&&TH(r,A,t)}function oP(r,e,t){var n=t[t.length-1];we(e.getId()!==void 0,27);var i=n.version,a=n.featureType,o=n.featurePrefix,s=n.featureNS,A=gL(o,a),l=e.getGeometryName();r.setAttribute("typeName",A),r.setAttributeNS(fL,"xmlns:"+o,s);var u=e.getId();if(u!==void 0){for(var c=e.getKeys(),h=[],f=0,p=c.length;f<p;f++){var v=e.get(c[f]);if(v!==void 0){var m=c[f];v&&typeof v.getSimplifiedGeometry=="function"&&(m=l),h.push({name:m,value:v})}}ke({version:i,gmlVersion:n.gmlVersion,node:r,hasZ:n.hasZ,srsName:n.srsName},CH,Pn("Property"),h,t),TH(r,u,t)}}function sP(r,e,t){var n=t[t.length-1],i=n.version,a=VS[i],o=$e(a,"Name"),s=n.gmlVersion;if(r.appendChild(o),Qe(o,e.name),e.value!==void 0&&e.value!==null){var A=$e(a,"Value");r.appendChild(A),e.value&&typeof e.value.getSimplifiedGeometry=="function"?s===2?Jp.prototype.writeGeometryElement(A,e.value,t):s===3?nr.prototype.writeGeometryElement(A,e.value,t):hL.prototype.writeGeometryElement(A,e.value,t):Qe(A,e.value)}}function AP(r,e,t){e.vendorId&&r.setAttribute("vendorId",e.vendorId),e.safeToIgnore!==void 0&&r.setAttribute("safeToIgnore",String(e.safeToIgnore)),e.value!==void 0&&Qe(r,e.value)}var Qw={"http://www.opengis.net/wfs":{Query:At(lP)},"http://www.opengis.net/wfs/2.0":{Query:At(lP)},"http://www.opengis.net/ogc":{During:At(hP),And:At(qm),Or:At(qm),Not:At(fP),BBOX:At(uP),Contains:At(Au),Intersects:At(Au),Within:At(Au),DWithin:At(cP),PropertyIsEqualTo:At(zo),PropertyIsNotEqualTo:At(zo),PropertyIsLessThan:At(zo),PropertyIsLessThanOrEqualTo:At(zo),PropertyIsGreaterThan:At(zo),PropertyIsGreaterThanOrEqualTo:At(zo),PropertyIsNull:At(pP),PropertyIsBetween:At(dP),PropertyIsLike:At(vP)},"http://www.opengis.net/fes/2.0":{During:At(hP),And:At(qm),Or:At(qm),Not:At(fP),BBOX:At(uP),Contains:At(Au),Disjoint:At(Au),Intersects:At(Au),ResourceId:At(Zdt),Within:At(Au),DWithin:At(cP),PropertyIsEqualTo:At(zo),PropertyIsNotEqualTo:At(zo),PropertyIsLessThan:At(zo),PropertyIsLessThanOrEqualTo:At(zo),PropertyIsGreaterThan:At(zo),PropertyIsGreaterThanOrEqualTo:At(zo),PropertyIsNull:At(pP),PropertyIsBetween:At(dP),PropertyIsLike:At(vP)}};function lP(r,e,t){var n=t[t.length-1],i=n.version,a=n.featurePrefix,o=n.featureNS,s=n.propertyNames,A=n.srsName,l;a?l=gL(a,e):l=e;var u;i==="2.0.0"?u="typeNames":u="typeName",r.setAttribute(u,l),A&&r.setAttribute("srsName",A),o&&r.setAttributeNS(fL,"xmlns:"+a,o);var c=ve({},n);c.node=r,ke(c,Vdt,Pn("PropertyName"),s,t);var h=n.filter;if(h){var f=$e(Hw(i),"Filter");r.appendChild(f),qdt(f,h,t)}}function qdt(r,e,t){var n=t[t.length-1],i={node:r};ve(i,{context:n}),ke(i,Qw,Pn(e.getTagName()),[e],t)}function uP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=vL[a];ed(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.extent,t)}function Zdt(r,e,t){r.setAttribute("rid",e.rid)}function Au(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=vL[a];ed(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.geometry,t)}function cP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;Au(r,e,t);var o=$e(Hw(a),"Distance");Qe(o,e.distance.toString()),a==="2.0.0"?o.setAttribute("uom",e.unit):o.setAttribute("units",e.unit),r.appendChild(o)}function hP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;u1(dL[a],"ValueReference",r,e.propertyName);var o=$e(Al,"TimePeriod");r.appendChild(o);var s=$e(Al,"begin");o.appendChild(s),gP(s,e.begin);var A=$e(Al,"end");o.appendChild(A),gP(A,e.end)}function qm(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};ve(a,{context:i});for(var o=e.conditions,s=0,A=o.length;s<A;++s){var l=o[s];ke(a,Qw,Pn(l.getTagName()),[l],t)}}function fP(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};ve(a,{context:i});var o=e.condition;ke(a,Qw,Pn(o.getTagName()),[o],t)}function zo(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;e.matchCase!==void 0&&r.setAttribute("matchCase",e.matchCase.toString()),ed(a,r,e.propertyName),c1(a,r,""+e.expression)}function pP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;ed(a,r,e.propertyName)}function dP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version,o=Hw(a);ed(a,r,e.propertyName);var s=$e(o,"LowerBoundary");r.appendChild(s),c1(a,s,""+e.lowerBoundary);var A=$e(o,"UpperBoundary");r.appendChild(A),c1(a,A,""+e.upperBoundary)}function vP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;r.setAttribute("wildCard",e.wildCard),r.setAttribute("singleChar",e.singleChar),r.setAttribute("escapeChar",e.escapeChar),e.matchCase!==void 0&&r.setAttribute("matchCase",e.matchCase.toString()),ed(a,r,e.propertyName),c1(a,r,""+e.pattern)}function u1(r,e,t,n){var i=$e(r,e);Qe(i,n),t.appendChild(i)}function c1(r,e,t){u1(Hw(r),"Literal",e,t)}function ed(r,e,t){r==="2.0.0"?u1(dL[r],"ValueReference",e,t):u1(pL[r],"PropertyName",e,t)}function gP(r,e){var t=$e(Al,"TimeInstant");r.appendChild(t);var n=$e(Al,"timePosition");t.appendChild(n),Qe(n,e)}function yP(r,e,t){var n=t[t.length-1],i=ve({},n);i.node=r,ke(i,Qw,Pn("Query"),e,t)}function Hw(r){var e;return r==="2.0.0"?e=dL[r]:e=pL[r],e}var Jdt=zdt,tvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Xr={POINT:1,LINE_STRING:2,POLYGON:3,MULTI_POINT:4,MULTI_LINE_STRING:5,MULTI_POLYGON:6,GEOMETRY_COLLECTION:7,POLYHEDRAL_SURFACE:15,TIN:16,TRIANGLE:17},mP=function(){function r(e){this.view_=e,this.pos_=0,this.initialized_=!1,this.isLittleEndian_=!1,this.hasZ_=!1,this.hasM_=!1,this.srid_=null,this.layout_=qt.XY}return r.prototype.readUint8=function(){return this.view_.getUint8(this.pos_++)},r.prototype.readUint32=function(e){return this.view_.getUint32((this.pos_+=4)-4,e!==void 0?e:this.isLittleEndian_)},r.prototype.readDouble=function(e){return this.view_.getFloat64((this.pos_+=8)-8,e!==void 0?e:this.isLittleEndian_)},r.prototype.readPoint=function(){var e=[];return e.push(this.readDouble()),e.push(this.readDouble()),this.hasZ_&&e.push(this.readDouble()),this.hasM_&&e.push(this.readDouble()),e},r.prototype.readLineString=function(){for(var e=this.readUint32(),t=[],n=0;n<e;n++)t.push(this.readPoint());return t},r.prototype.readPolygon=function(){for(var e=this.readUint32(),t=[],n=0;n<e;n++)t.push(this.readLineString());return t},r.prototype.readWkbHeader=function(e){var t=this.readUint8(),n=t>0,i=this.readUint32(n),a=Math.floor((i&268435455)/1e3),o=Boolean(i&2147483648)||a===1||a===3,s=Boolean(i&1073741824)||a===2||a===3,A=Boolean(i&536870912),l=(i&268435455)%1e3,u=["XY",o?"Z":"",s?"M":""].join(""),c=A?this.readUint32(n):null;if(e!==void 0&&e!==l)throw new Error("Unexpected WKB geometry type "+l);if(this.initialized_){if(this.isLittleEndian_!==n)throw new Error("Inconsistent endian");if(this.layout_!==u)throw new Error("Inconsistent geometry layout");if(c&&this.srid_!==c)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=n,this.hasZ_=o,this.hasM_=s,this.layout_=u,this.srid_=c,this.initialized_=!0;return l},r.prototype.readWkbPayload=function(e){switch(e){case Xr.POINT:return this.readPoint();case Xr.LINE_STRING:return this.readLineString();case Xr.POLYGON:case Xr.TRIANGLE:return this.readPolygon();case Xr.MULTI_POINT:return this.readMultiPoint();case Xr.MULTI_LINE_STRING:return this.readMultiLineString();case Xr.MULTI_POLYGON:case Xr.POLYHEDRAL_SURFACE:case Xr.TIN:return this.readMultiPolygon();case Xr.GEOMETRY_COLLECTION:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+e+" is found")}},r.prototype.readWkbBlock=function(e){return this.readWkbPayload(this.readWkbHeader(e))},r.prototype.readWkbCollection=function(e,t){for(var n=this.readUint32(),i=[],a=0;a<n;a++){var o=e.call(this,t);o&&i.push(o)}return i},r.prototype.readMultiPoint=function(){return this.readWkbCollection(this.readWkbBlock,Xr.POINT)},r.prototype.readMultiLineString=function(){return this.readWkbCollection(this.readWkbBlock,Xr.LINE_STRING)},r.prototype.readMultiPolygon=function(){return this.readWkbCollection(this.readWkbBlock,Xr.POLYGON)},r.prototype.readGeometryCollection=function(){return this.readWkbCollection(this.readGeometry)},r.prototype.readGeometry=function(){var e=this.readWkbHeader(),t=this.readWkbPayload(e);switch(e){case Xr.POINT:return new pr(t,this.layout_);case Xr.LINE_STRING:return new kr(t,this.layout_);case Xr.POLYGON:case Xr.TRIANGLE:return new Fn(t,this.layout_);case Xr.MULTI_POINT:return new ns(t,this.layout_);case Xr.MULTI_LINE_STRING:return new Fa(t,this.layout_);case Xr.MULTI_POLYGON:case Xr.POLYHEDRAL_SURFACE:case Xr.TIN:return new Ia(t,this.layout_);case Xr.GEOMETRY_COLLECTION:return new la(t);default:return null}},r.prototype.getSrid=function(){return this.srid_},r}(),evt=function(){function r(e){e=e||{},this.layout_=e.layout,this.isLittleEndian_=e.littleEndian!==!1,this.isEWKB_=e.ewkb!==!1,this.writeQueue_=[],this.nodata_=ve({X:0,Y:0,Z:0,M:0},e.nodata)}return r.prototype.writeUint8=function(e){this.writeQueue_.push([1,e])},r.prototype.writeUint32=function(e){this.writeQueue_.push([4,e])},r.prototype.writeDouble=function(e){this.writeQueue_.push([8,e])},r.prototype.writePoint=function(e,t){for(var n=ve.apply(null,t.split("").map(function(s,A){var l;return l={},l[s]=e[A],l})),i=0,a=this.layout_;i<a.length;i++){var o=a[i];this.writeDouble(o in n?n[o]:this.nodata_[o])}},r.prototype.writeLineString=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writePoint(e[n],t)},r.prototype.writePolygon=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeLineString(e[n],t)},r.prototype.writeWkbHeader=function(e,t){e%=1e3,this.layout_.indexOf("Z")>=0&&(e+=this.isEWKB_?2147483648:1e3),this.layout_.indexOf("M")>=0&&(e+=this.isEWKB_?1073741824:2e3),this.isEWKB_&&Number.isInteger(t)&&(e|=536870912),this.writeUint8(this.isLittleEndian_?1:0),this.writeUint32(e),this.isEWKB_&&Number.isInteger(t)&&this.writeUint32(t)},r.prototype.writeMultiPoint=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeWkbHeader(1),this.writePoint(e[n],t)},r.prototype.writeMultiLineString=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeWkbHeader(2),this.writeLineString(e[n],t)},r.prototype.writeMultiPolygon=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeWkbHeader(3),this.writePolygon(e[n],t)},r.prototype.writeGeometryCollection=function(e){this.writeUint32(e.length);for(var t=0;t<e.length;t++)this.writeGeometry(e[t])},r.prototype.findMinimumLayout=function(e,t){t===void 0&&(t=qt.XYZM);var n=function(o,s){return o===s?o:o===qt.XYZM?s:s===qt.XYZM?o:qt.XY};if(e instanceof Ls)return n(e.getLayout(),t);if(e instanceof la)for(var i=e.getGeometriesArray(),a=0;a<i.length&&t!==qt.XY;a++)t=this.findMinimumLayout(i[a],t);return t},r.prototype.writeGeometry=function(e,t){var n,i,a=(n={},n[st.POINT]=Xr.POINT,n[st.LINE_STRING]=Xr.LINE_STRING,n[st.POLYGON]=Xr.POLYGON,n[st.MULTI_POINT]=Xr.MULTI_POINT,n[st.MULTI_LINE_STRING]=Xr.MULTI_LINE_STRING,n[st.MULTI_POLYGON]=Xr.MULTI_POLYGON,n[st.GEOMETRY_COLLECTION]=Xr.GEOMETRY_COLLECTION,n),o=e.getType(),s=a[o];if(!s)throw new Error("GeometryType "+o+" is not supported");if(this.layout_||(this.layout_=this.findMinimumLayout(e)),this.writeWkbHeader(s,t),e instanceof Ls){var A=(i={},i[st.POINT]=this.writePoint,i[st.LINE_STRING]=this.writeLineString,i[st.POLYGON]=this.writePolygon,i[st.MULTI_POINT]=this.writeMultiPoint,i[st.MULTI_LINE_STRING]=this.writeMultiLineString,i[st.MULTI_POLYGON]=this.writeMultiPolygon,i);A[o].call(this,e.getCoordinates(),e.getLayout())}else e instanceof la&&this.writeGeometryCollection(e.getGeometriesArray())},r.prototype.getBuffer=function(){var e=this,t=this.writeQueue_.reduce(function(o,s){return o+s[0]},0),n=new ArrayBuffer(t),i=new DataView(n),a=0;return this.writeQueue_.forEach(function(o){switch(o[0]){case 1:i.setUint8(a,o[1]);break;case 4:i.setUint32(a,o[1],e.isLittleEndian_);break;case 8:i.setFloat64(a,o[1],e.isLittleEndian_);break}a+=o[0]}),n},r}(),rvt=function(r){tvt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.splitCollection=Boolean(i.splitCollection),n.viewCache_=null,n.hex_=i.hex!==!1,n.littleEndian_=i.littleEndian!==!1,n.ewkb_=i.ewkb!==!1,n.layout_=i.geometryLayout,n.nodataZ_=i.nodataZ||0,n.nodataM_=i.nodataM||0,n.srid_=i.srid,n}return e.prototype.getType=function(){return this.hex_?Ts.TEXT:Ts.ARRAY_BUFFER},e.prototype.readFeature=function(t,n){return new sr({geometry:this.readGeometry(t,n)})},e.prototype.readFeatures=function(t,n){var i=[],a=this.readGeometry(t,n);return this.splitCollection&&a instanceof la?i=a.getGeometriesArray():i=[a],i.map(function(o){return new sr({geometry:o})})},e.prototype.readGeometry=function(t,n){var i=_P(t);if(!i)return null;var a=new mP(i),o=a.readGeometry();this.viewCache_=i;var s=this.getReadOptions(t,n);return this.viewCache_=null,On(o,!1,s)},e.prototype.readProjection=function(t){var n=this.viewCache_||_P(t);if(n){var i=new mP(n);return i.readWkbHeader(),i.getSrid()&&Re("EPSG:"+i.getSrid())||void 0}},e.prototype.writeFeature=function(t,n){return this.writeGeometry(t.getGeometry(),n)},e.prototype.writeFeatures=function(t,n){return this.writeGeometry(new la(t.map(function(i){return i.getGeometry()})),n)},e.prototype.writeGeometry=function(t,n){var i=this.adaptOptions(n),a=new evt({layout:this.layout_,littleEndian:this.littleEndian_,ewkb:this.ewkb_,nodata:{Z:this.nodataZ_,M:this.nodataM_}}),o=Number.isInteger(this.srid_)?Number(this.srid_):null;if(this.srid_!==!1&&!Number.isInteger(this.srid_)){var s=i.dataProjection&&Re(i.dataProjection);if(s){var A=s.getCode();A.indexOf("EPSG:")===0&&(o=Number(A.substring(5)))}}a.writeGeometry(On(t,!0,i),o);var l=a.getBuffer();return this.hex_?nvt(l):l},e}(py);function nvt(r){var e=new Uint8Array(r);return Array.from(e.values()).map(function(t){return(t<16?"0":"")+Number(t).toString(16).toUpperCase()}).join("")}function ivt(r){for(var e=new Uint8Array(r.length/2),t=0;t<r.length/2;t++)e[t]=parseInt(r.substr(t*2,2),16);return new DataView(e.buffer)}function _P(r){return typeof r=="string"?ivt(r):ArrayBuffer.isView(r)?r instanceof DataView?r:new DataView(r.buffer,r.byteOffset,r.byteLength):r instanceof ArrayBuffer?new DataView(r):null}var avt=rvt,ovt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),svt={POINT:pr,LINESTRING:kr,POLYGON:Fn,MULTIPOINT:ns,MULTILINESTRING:Fa,MULTIPOLYGON:Ia},xH="EMPTY",SH="Z",bH="M",Avt="ZM",Qr={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6};for(var lvt in st)st[lvt].toUpperCase();var uvt=function(){function r(e){this.wkt=e,this.index_=-1}return r.prototype.isAlpha_=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"},r.prototype.isNumeric_=function(e,t){var n=t!==void 0?t:!1;return e>="0"&&e<="9"||e=="."&&!n},r.prototype.isWhiteSpace_=function(e){return e==" "||e==" "||e=="\r"||e==`
`},r.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},r.prototype.nextToken=function(){var e=this.nextChar_(),t=this.index_,n=e,i;if(e=="(")i=Qr.LEFT_PAREN;else if(e==",")i=Qr.COMMA;else if(e==")")i=Qr.RIGHT_PAREN;else if(this.isNumeric_(e)||e=="-")i=Qr.NUMBER,n=this.readNumber_();else if(this.isAlpha_(e))i=Qr.TEXT,n=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(e==="")i=Qr.EOF;else throw new Error("Unexpected character: "+e)}return{position:t,value:n,type:i}},r.prototype.readNumber_=function(){var e,t=this.index_,n=!1,i=!1;do e=="."?n=!0:(e=="e"||e=="E")&&(i=!0),e=this.nextChar_();while(this.isNumeric_(e,n)||!i&&(e=="e"||e=="E")||i&&(e=="-"||e=="+"));return parseFloat(this.wkt.substring(t,this.index_--))},r.prototype.readText_=function(){var e,t=this.index_;do e=this.nextChar_();while(this.isAlpha_(e));return this.wkt.substring(t,this.index_--).toUpperCase()},r}(),cvt=function(){function r(e){this.lexer_=e,this.token_={position:0,type:Qr.START},this.layout_=qt.XY}return r.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},r.prototype.isTokenType=function(e){return this.token_.type==e},r.prototype.match=function(e){var t=this.isTokenType(e);return t&&this.consume_(),t},r.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},r.prototype.parseGeometryLayout_=function(){var e=qt.XY,t=this.token_;if(this.isTokenType(Qr.TEXT)){var n=t.value;n===SH?e=qt.XYZ:n===bH?e=qt.XYM:n===Avt&&(e=qt.XYZM),e!==qt.XY&&this.consume_()}return e},r.prototype.parseGeometryCollectionText_=function(){if(this.match(Qr.LEFT_PAREN)){var e=[];do e.push(this.parseGeometry_());while(this.match(Qr.COMMA));if(this.match(Qr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePointText_=function(){if(this.match(Qr.LEFT_PAREN)){var e=this.parsePoint_();if(this.match(Qr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseLineStringText_=function(){if(this.match(Qr.LEFT_PAREN)){var e=this.parsePointList_();if(this.match(Qr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePolygonText_=function(){if(this.match(Qr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Qr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPointText_=function(){if(this.match(Qr.LEFT_PAREN)){var e=void 0;if(this.token_.type==Qr.LEFT_PAREN?e=this.parsePointTextList_():e=this.parsePointList_(),this.match(Qr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiLineStringText_=function(){if(this.match(Qr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Qr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPolygonText_=function(){if(this.match(Qr.LEFT_PAREN)){var e=this.parsePolygonTextList_();if(this.match(Qr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePoint_=function(){for(var e=[],t=this.layout_.length,n=0;n<t;++n){var i=this.token_;if(this.match(Qr.NUMBER))e.push(i.value);else break}if(e.length==t)return e;throw new Error(this.formatErrorMessage_())},r.prototype.parsePointList_=function(){for(var e=[this.parsePoint_()];this.match(Qr.COMMA);)e.push(this.parsePoint_());return e},r.prototype.parsePointTextList_=function(){for(var e=[this.parsePointText_()];this.match(Qr.COMMA);)e.push(this.parsePointText_());return e},r.prototype.parseLineStringTextList_=function(){for(var e=[this.parseLineStringText_()];this.match(Qr.COMMA);)e.push(this.parseLineStringText_());return e},r.prototype.parsePolygonTextList_=function(){for(var e=[this.parsePolygonText_()];this.match(Qr.COMMA);)e.push(this.parsePolygonText_());return e},r.prototype.isEmptyGeometry_=function(){var e=this.isTokenType(Qr.TEXT)&&this.token_.value==xH;return e&&this.consume_(),e},r.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},r.prototype.parseGeometry_=function(){var e=this.token_;if(this.match(Qr.TEXT)){var t=e.value;this.layout_=this.parseGeometryLayout_();var n=this.isEmptyGeometry_();if(t=="GEOMETRYCOLLECTION"){if(n)return new la([]);var i=this.parseGeometryCollectionText_();return new la(i)}else{var a=svt[t];if(!a)throw new Error("Invalid geometry type: "+t);var o=void 0;if(n)t=="POINT"?o=[NaN,NaN]:o=[];else switch(t){case"POINT":{o=this.parsePointText_();break}case"LINESTRING":{o=this.parseLineStringText_();break}case"POLYGON":{o=this.parsePolygonText_();break}case"MULTIPOINT":{o=this.parseMultiPointText_();break}case"MULTILINESTRING":{o=this.parseMultiLineStringText_();break}case"MULTIPOLYGON":{o=this.parseMultiPolygonText_();break}}return new a(o,this.layout_)}}throw new Error(this.formatErrorMessage_())},r}(),hvt=function(r){ovt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.splitCollection_=i.splitCollection!==void 0?i.splitCollection:!1,n}return e.prototype.parse_=function(t){var n=new uvt(t),i=new cvt(n);return i.parse()},e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n),a=new sr;return a.setGeometry(i),a},e.prototype.readFeaturesFromText=function(t,n){var i=[],a=this.readGeometryFromText(t,n);this.splitCollection_&&a.getType()==st.GEOMETRY_COLLECTION?i=a.getGeometriesArray():i=[a];for(var o=[],s=0,A=i.length;s<A;++s){var l=new sr;l.setGeometry(i[s]),o.push(l)}return o},e.prototype.readGeometryFromText=function(t,n){var i=this.parse_(t);return On(i,!1,n)},e.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):""},e.prototype.writeFeaturesText=function(t,n){if(t.length==1)return this.writeFeatureText(t[0],n);for(var i=[],a=0,o=t.length;a<o;++a)i.push(t[a].getGeometry());var s=new la(i);return this.writeGeometryText(s,n)},e.prototype.writeGeometryText=function(t,n){return LH(On(t,!0,n))},e}(aL);function FH(r){var e=r.getCoordinates();return e.length===0?"":e.join(" ")}function fvt(r){for(var e=[],t=r.getPoints(),n=0,i=t.length;n<i;++n)e.push("("+FH(t[n])+")");return e.join(",")}function pvt(r){for(var e=[],t=r.getGeometries(),n=0,i=t.length;n<i;++n)e.push(LH(t[n]));return e.join(",")}function yL(r){for(var e=r.getCoordinates(),t=[],n=0,i=e.length;n<i;++n)t.push(e[n].join(" "));return t.join(",")}function dvt(r){for(var e=[],t=r.getLineStrings(),n=0,i=t.length;n<i;++n)e.push("("+yL(t[n])+")");return e.join(",")}function IH(r){for(var e=[],t=r.getLinearRings(),n=0,i=t.length;n<i;++n)e.push("("+yL(t[n])+")");return e.join(",")}function vvt(r){for(var e=[],t=r.getPolygons(),n=0,i=t.length;n<i;++n)e.push("("+IH(t[n])+")");return e.join(",")}function gvt(r){var e=r.getLayout(),t="";return(e===qt.XYZ||e===qt.XYZM)&&(t+=SH),(e===qt.XYM||e===qt.XYZM)&&(t+=bH),t}var yvt={Point:FH,LineString:yL,Polygon:IH,MultiPoint:fvt,MultiLineString:dvt,MultiPolygon:vvt,GeometryCollection:pvt};function LH(r){var e=r.getType(),t=yvt[e],n=t(r);if(e=e.toUpperCase(),typeof r.getFlatCoordinates=="function"){var i=gvt(r);i.length>0&&(e+=" "+i)}return n.length===0?e+" "+xH:e+"("+n+")"}var mvt=hvt,_vt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ha=[null,"http://www.opengis.net/wms"],wvt=Nt(ha,{Service:ot(kvt),Capability:ot(Gvt)}),Evt=Nt(ha,{Request:ot(Yvt),Exception:ot(Kvt),Layer:ot(zvt)}),Cvt=function(r){_vt(e,r);function e(){var t=r.call(this)||this;return t.version=void 0,t}return e.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=kt({version:this.version},wvt,t,[]);return n||null},e}(uL),Bvt=Nt(ha,{Name:ot(jt),Title:ot(jt),Abstract:ot(jt),KeywordList:ot(NH),OnlineResource:ot(td),ContactInformation:ot($vt),Fees:ot(jt),AccessConstraints:ot(jt),LayerLimit:ot(oi),MaxWidth:ot(oi),MaxHeight:ot(oi)}),Tvt=Nt(ha,{ContactPersonPrimary:ot(jvt),ContactPosition:ot(jt),ContactAddress:ot(Vvt),ContactVoiceTelephone:ot(jt),ContactFacsimileTelephone:ot(jt),ContactElectronicMailAddress:ot(jt)}),xvt=Nt(ha,{ContactPerson:ot(jt),ContactOrganization:ot(jt)}),Svt=Nt(ha,{AddressType:ot(jt),Address:ot(jt),City:ot(jt),StateOrProvince:ot(jt),PostCode:ot(jt),Country:ot(jt)}),bvt=Nt(ha,{Format:_e(jt)}),OH=Nt(ha,{Name:ot(jt),Title:ot(jt),Abstract:ot(jt),KeywordList:ot(NH),CRS:yn(jt),EX_GeographicBoundingBox:ot(Hvt),BoundingBox:yn(Qvt),Dimension:yn(Xvt),Attribution:ot(Dvt),AuthorityURL:yn(Zvt),Identifier:yn(jt),MetadataURL:yn(Jvt),DataURL:yn(dl),FeatureListURL:yn(dl),Style:yn(tgt),MinScaleDenominator:ot(Lr),MaxScaleDenominator:ot(Lr),Layer:yn(RH)}),Fvt=Nt(ha,{Title:ot(jt),OnlineResource:ot(td),LogoURL:ot(MH)}),Ivt=Nt(ha,{westBoundLongitude:ot(Lr),eastBoundLongitude:ot(Lr),southBoundLatitude:ot(Lr),northBoundLatitude:ot(Lr)}),Lvt=Nt(ha,{GetCapabilities:ot(sB),GetMap:ot(sB),GetFeatureInfo:ot(sB)}),Ovt=Nt(ha,{Format:yn(jt),DCPType:yn(Wvt)}),Rvt=Nt(ha,{HTTP:ot(qvt)}),Mvt=Nt(ha,{Get:ot(dl),Post:ot(dl)}),Nvt=Nt(ha,{Name:ot(jt),Title:ot(jt),Abstract:ot(jt),LegendURL:yn(MH),StyleSheetURL:ot(dl),StyleURL:ot(dl)}),Pvt=Nt(ha,{Format:ot(jt),OnlineResource:ot(td)}),Uvt=Nt(ha,{Keyword:_e(jt)});function Dvt(r,e){return kt({},Fvt,r,e)}function Qvt(r,e){var t=[ZA(r.getAttribute("minx")),ZA(r.getAttribute("miny")),ZA(r.getAttribute("maxx")),ZA(r.getAttribute("maxy"))],n=[ZA(r.getAttribute("resx")),ZA(r.getAttribute("resy"))];return{crs:r.getAttribute("CRS"),extent:t,res:n}}function Hvt(r,e){var t=kt({},Ivt,r,e);if(t){var n=t.westBoundLongitude,i=t.southBoundLatitude,a=t.eastBoundLongitude,o=t.northBoundLatitude;if(!(n===void 0||i===void 0||a===void 0||o===void 0))return[n,i,a,o]}}function Gvt(r,e){return kt({},Evt,r,e)}function kvt(r,e){return kt({},Bvt,r,e)}function $vt(r,e){return kt({},Tvt,r,e)}function jvt(r,e){return kt({},xvt,r,e)}function Vvt(r,e){return kt({},Svt,r,e)}function Kvt(r,e){return kt([],bvt,r,e)}function zvt(r,e){var t=kt({},OH,r,e);return t.Layer===void 0?Object.assign(t,RH(r,e)):t}function RH(r,e){var t=e[e.length-1],n=kt({},OH,r,e);if(n){var i=nh(r.getAttribute("queryable"));i===void 0&&(i=t.queryable),n.queryable=i!==void 0?i:!1;var a=el(r.getAttribute("cascaded"));a===void 0&&(a=t.cascaded),n.cascaded=a;var o=nh(r.getAttribute("opaque"));o===void 0&&(o=t.opaque),n.opaque=o!==void 0?o:!1;var s=nh(r.getAttribute("noSubsets"));s===void 0&&(s=t.noSubsets),n.noSubsets=s!==void 0?s:!1;var A=ZA(r.getAttribute("fixedWidth"));A||(A=t.fixedWidth),n.fixedWidth=A;var l=ZA(r.getAttribute("fixedHeight"));l||(l=t.fixedHeight),n.fixedHeight=l;var u=["Style","CRS","AuthorityURL"];u.forEach(function(h){if(h in t){var f=n[h]||[];n[h]=f.concat(t[h])}});var c=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];return c.forEach(function(h){if(!(h in n)){var f=t[h];n[h]=f}}),n}}function Xvt(r,e){var t={name:r.getAttribute("name"),units:r.getAttribute("units"),unitSymbol:r.getAttribute("unitSymbol"),default:r.getAttribute("default"),multipleValues:nh(r.getAttribute("multipleValues")),nearestValue:nh(r.getAttribute("nearestValue")),current:nh(r.getAttribute("current")),values:jt(r)};return t}function dl(r,e){return kt({},Pvt,r,e)}function Yvt(r,e){return kt({},Lvt,r,e)}function Wvt(r,e){return kt({},Rvt,r,e)}function qvt(r,e){return kt({},Mvt,r,e)}function sB(r,e){return kt({},Ovt,r,e)}function MH(r,e){var t=dl(r,e);if(t){var n=[el(r.getAttribute("width")),el(r.getAttribute("height"))];return t.size=n,t}}function Zvt(r,e){var t=dl(r,e);if(t)return t.name=r.getAttribute("name"),t}function Jvt(r,e){var t=dl(r,e);if(t)return t.type=r.getAttribute("type"),t}function tgt(r,e){return kt({},Nvt,r,e)}function NH(r,e){return kt([],Uvt,r,e)}var egt=Cvt,rgt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ngt="_feature",igt="_layer",agt=function(r){rgt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.featureNS_="http://mapserver.gis.umn.edu/mapserver",n.gmlFormat_=new Jp,n.layers_=i.layers?i.layers:null,n}return e.prototype.getLayers=function(){return this.layers_},e.prototype.setLayers=function(t){this.layers_=t},e.prototype.readFeatures_=function(t,n){t.setAttribute("namespaceURI",this.featureNS_);var i=t.localName,a=[];if(t.childNodes.length===0)return a;if(i=="msGMLOutput")for(var o=0,s=t.childNodes.length;o<s;o++){var A=t.childNodes[o];if(A.nodeType===Node.ELEMENT_NODE){var l=A,u=n[0],c=igt,h=l.localName.replace(c,"");if(!(this.layers_&&!mi(this.layers_,h))){var f=h+ngt;u.featureType=f,u.featureNS=this.featureNS_;var p={};p[f]=_e(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var v=Nt([u.featureNS,null],p);l.setAttribute("namespaceURI",this.featureNS_);var m=kt([],v,l,n,this.gmlFormat_);m&&Gr(a,m)}}}if(i=="FeatureCollection"){var g=kt([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);g&&(a=g)}return a},e.prototype.readFeaturesFromNode=function(t,n){var i={};return n&&ve(i,this.getReadOptions(t,n)),this.readFeatures_(t,[i])},e}(vy),ogt=agt,sgt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gA=[null,"http://www.opengis.net/wmts/1.0"],rd=[null,"http://www.opengis.net/ows/1.1"],Agt=Nt(gA,{Contents:ot(_gt)}),lgt=function(r){sgt(e,r);function e(){var t=r.call(this)||this;return t.owsParser_=new _H,t}return e.prototype.readFromNode=function(t){var n=t.getAttribute("version");n&&(n=n.trim());var i=this.owsParser_.readFromNode(t);return i?(i.version=n,i=kt(i,Agt,t,[]),i||null):null},e}(uL),ugt=Nt(gA,{Layer:yn(wgt),TileMatrixSet:yn(Egt)}),cgt=Nt(gA,{Style:yn(Cgt),Format:yn(jt),TileMatrixSetLink:yn(Bgt),Dimension:yn(Tgt),ResourceURL:yn(xgt)},Nt(rd,{Title:ot(jt),Abstract:ot(jt),WGS84BoundingBox:ot(PH),Identifier:ot(jt)})),hgt=Nt(gA,{LegendURL:yn(Sgt)},Nt(rd,{Title:ot(jt),Identifier:ot(jt)})),fgt=Nt(gA,{TileMatrixSet:ot(jt),TileMatrixSetLimits:ot(Fgt)}),pgt=Nt(gA,{TileMatrixLimits:_e(Igt)}),dgt=Nt(gA,{TileMatrix:ot(jt),MinTileRow:ot(oi),MaxTileRow:ot(oi),MinTileCol:ot(oi),MaxTileCol:ot(oi)}),vgt=Nt(gA,{Default:ot(jt),Value:yn(jt)},Nt(rd,{Identifier:ot(jt)})),ggt=Nt(rd,{LowerCorner:_e(KS),UpperCorner:_e(KS)}),ygt=Nt(gA,{WellKnownScaleSet:ot(jt),TileMatrix:yn(bgt)},Nt(rd,{SupportedCRS:ot(jt),Identifier:ot(jt),BoundingBox:ot(PH)})),mgt=Nt(gA,{TopLeftCorner:ot(KS),ScaleDenominator:ot(Lr),TileWidth:ot(oi),TileHeight:ot(oi),MatrixWidth:ot(oi),MatrixHeight:ot(oi)},Nt(rd,{Identifier:ot(jt)}));function _gt(r,e){return kt({},ugt,r,e)}function wgt(r,e){return kt({},cgt,r,e)}function Egt(r,e){return kt({},ygt,r,e)}function Cgt(r,e){var t=kt({},hgt,r,e);if(t){var n=r.getAttribute("isDefault")==="true";return t.isDefault=n,t}}function Bgt(r,e){return kt({},fgt,r,e)}function Tgt(r,e){return kt({},vgt,r,e)}function xgt(r,e){var t=r.getAttribute("format"),n=r.getAttribute("template"),i=r.getAttribute("resourceType"),a={};return t&&(a.format=t),n&&(a.template=n),i&&(a.resourceType=i),a}function PH(r,e){var t=kt([],ggt,r,e);if(t.length==2)return Wi(t)}function Sgt(r,e){var t={};return t.format=r.getAttribute("format"),t.href=td(r),t}function KS(r,e){var t=jt(r).split(/\s+/);if(!(!t||t.length!=2)){var n=+t[0],i=+t[1];if(!(isNaN(n)||isNaN(i)))return[n,i]}}function bgt(r,e){return kt({},mgt,r,e)}function Fgt(r,e){return kt([],pgt,r,e)}function Igt(r,e){return kt({},dgt,r,e)}var Lgt=lgt,Ogt=Object.freeze(Object.defineProperty({__proto__:null,EsriJSON:zut,GeoJSON:uct,GML:Tct,GPX:aht,IGC:pht,IIIFInfo:fot,KML:Jft,MVT:Tpt,OWS:_H,Polyline:ddt,TopoJSON:bdt,WFS:Jdt,WKB:avt,WKT:mvt,WMSCapabilities:egt,WMSGetFeatureInfo:ogt,WMTSCapabilities:Lgt},Symbol.toStringTag,{value:"Module"}));function zS(r){if(zS.installed){console.error("OPENLAYERS MAP ALREADY INSTALLED");return}zS.installed=!0,r.use(sit),r.use(rst),r.use(Cst),r.use(ylt),r.use(Llt),r.use(Klt),r.use(sut),r.use(Tut),r.provide("ol-feature",sr),r.provide("ol-geom",but),r.provide("ol-animations",zY),r.provide("ol-format",Ogt),r.provide("ol-loadingstrategy",zZ),r.provide("ol-selectconditions",xq),r.provide("ol-extent",EX)}/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var XS=function(r,e){return XS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},XS(r,e)};function Qs(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");XS(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var YS=function(){return YS=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},YS.apply(this,arguments)};function Pa(r,e,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(u){try{l(n.next(u))}catch(c){o(c)}}function A(u){try{l(n.throw(u))}catch(c){o(c)}}function l(u){u.done?a(u.value):i(u.value).then(s,A)}l((n=n.apply(r,e||[])).next())})}function _a(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return A([l,u])}}function A(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){t.label=l[1];break}if(l[0]===6&&t.label<a[1]){t.label=a[1],a=l;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(l);break}a[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Zm(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||e)}var vl=function(){function r(e,t,n,i){this.left=e,this.top=t,this.width=n,this.height=i}return r.prototype.add=function(e,t,n,i){return new r(this.left+e,this.top+t,this.width+n,this.height+i)},r.fromClientRect=function(e,t){return new r(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},r.fromDOMRectList=function(e,t){var n=Array.from(t).find(function(i){return i.width!==0});return n?new r(n.left+e.windowBounds.left,n.top+e.windowBounds.top,n.width,n.height):r.EMPTY},r.EMPTY=new r(0,0,0,0),r}(),Gw=function(r,e){return vl.fromClientRect(r,e.getBoundingClientRect())},Rgt=function(r){var e=r.body,t=r.documentElement;if(!e||!t)throw new Error("Unable to get document size");var n=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),i=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new vl(0,0,n,i)},kw=function(r){for(var e=[],t=0,n=r.length;t<n;){var i=r.charCodeAt(t++);if(i>=55296&&i<=56319&&t<n){var a=r.charCodeAt(t++);(a&64512)===56320?e.push(((i&1023)<<10)+(a&1023)+65536):(e.push(i),t--)}else e.push(i)}return e},ei=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var t=r.length;if(!t)return"";for(var n=[],i=-1,a="";++i<t;){var o=r[i];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(i+1===t||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},wP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mgt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Jm=0;Jm<wP.length;Jm++)Mgt[wP.charCodeAt(Jm)]=Jm;var EP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ev=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var t0=0;t0<EP.length;t0++)Ev[EP.charCodeAt(t0)]=t0;var Ngt=function(r){var e=r.length*.75,t=r.length,n,i=0,a,o,s,A;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)a=Ev[r.charCodeAt(n)],o=Ev[r.charCodeAt(n+1)],s=Ev[r.charCodeAt(n+2)],A=Ev[r.charCodeAt(n+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|A&63;return l},Pgt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},Ugt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=4)t.push(r[n+3]<<24|r[n+2]<<16|r[n+1]<<8|r[n]);return t},ih=5,mL=6+5,AB=2,Dgt=mL-ih,UH=65536>>ih,Qgt=1<<ih,lB=Qgt-1,Hgt=1024>>ih,Ggt=UH+Hgt,kgt=Ggt,$gt=32,jgt=kgt+$gt,Vgt=65536>>mL,Kgt=1<<Dgt,zgt=Kgt-1,CP=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},Xgt=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},Ygt=function(r,e){var t=Ngt(r),n=Array.isArray(t)?Ugt(t):new Uint32Array(t),i=Array.isArray(t)?Pgt(t):new Uint16Array(t),a=24,o=CP(i,a/2,n[4]/2),s=n[5]===2?CP(i,(a+n[4])/2):Xgt(n,Math.ceil((a+n[4])/4));return new Wgt(n[0],n[1],n[2],n[3],o,s)},Wgt=function(){function r(e,t,n,i,a,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=i,this.index=a,this.data=o}return r.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>ih],t=(t<<AB)+(e&lB),this.data[t];if(e<=65535)return t=this.index[UH+(e-55296>>ih)],t=(t<<AB)+(e&lB),this.data[t];if(e<this.highStart)return t=jgt-Vgt+(e>>mL),t=this.index[t],t+=e>>ih&zgt,t=this.index[t],t=(t<<AB)+(e&lB),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),BP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qgt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var e0=0;e0<BP.length;e0++)qgt[BP.charCodeAt(e0)]=e0;var Zgt="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",TP=50,Jgt=1,DH=2,QH=3,tyt=4,eyt=5,xP=7,HH=8,SP=9,Eu=10,WS=11,bP=12,qS=13,ryt=14,Cv=15,ZS=16,r0=17,Jd=18,nyt=19,FP=20,JS=21,tv=22,uB=23,Ef=24,So=25,Bv=26,Tv=27,Cf=28,iyt=29,Uc=30,ayt=31,n0=32,i0=33,tb=34,eb=35,rb=36,Ig=37,nb=38,n_=39,i_=40,cB=41,GH=42,oyt=43,syt=[9001,65288],kH="!",mr="×",a0="÷",ib=Ygt(Zgt),kA=[Uc,rb],ab=[Jgt,DH,QH,eyt],$H=[Eu,HH],IP=[Tv,Bv],Ayt=ab.concat($H),LP=[nb,n_,i_,tb,eb],lyt=[Cv,qS],uyt=function(r,e){e===void 0&&(e="strict");var t=[],n=[],i=[];return r.forEach(function(a,o){var s=ib.get(a);if(s>TP?(i.push(!0),s-=TP):i.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(a)!==-1)return n.push(o),t.push(ZS);if(s===tyt||s===WS){if(o===0)return n.push(o),t.push(Uc);var A=t[o-1];return Ayt.indexOf(A)===-1?(n.push(n[o-1]),t.push(A)):(n.push(o),t.push(Uc))}if(n.push(o),s===ayt)return t.push(e==="strict"?JS:Ig);if(s===GH||s===iyt)return t.push(Uc);if(s===oyt)return a>=131072&&a<=196605||a>=196608&&a<=262141?t.push(Ig):t.push(Uc);t.push(s)}),[n,t,i]},hB=function(r,e,t,n){var i=n[t];if(Array.isArray(r)?r.indexOf(i)!==-1:r===i)for(var a=t;a<=n.length;){a++;var o=n[a];if(o===e)return!0;if(o!==Eu)break}if(i===Eu)for(var a=t;a>0;){a--;var s=n[a];if(Array.isArray(r)?r.indexOf(s)!==-1:r===s)for(var A=t;A<=n.length;){A++;var o=n[A];if(o===e)return!0;if(o!==Eu)break}if(s!==Eu)break}return!1},OP=function(r,e){for(var t=r;t>=0;){var n=e[t];if(n===Eu)t--;else return n}return 0},cyt=function(r,e,t,n,i){if(t[n]===0)return mr;var a=n-1;if(Array.isArray(i)&&i[a]===!0)return mr;var o=a-1,s=a+1,A=e[a],l=o>=0?e[o]:0,u=e[s];if(A===DH&&u===QH)return mr;if(ab.indexOf(A)!==-1)return kH;if(ab.indexOf(u)!==-1||$H.indexOf(u)!==-1)return mr;if(OP(a,e)===HH)return a0;if(ib.get(r[a])===WS||(A===n0||A===i0)&&ib.get(r[s])===WS||A===xP||u===xP||A===SP||[Eu,qS,Cv].indexOf(A)===-1&&u===SP||[r0,Jd,nyt,Ef,Cf].indexOf(u)!==-1||OP(a,e)===tv||hB(uB,tv,a,e)||hB([r0,Jd],JS,a,e)||hB(bP,bP,a,e))return mr;if(A===Eu)return a0;if(A===uB||u===uB)return mr;if(u===ZS||A===ZS)return a0;if([qS,Cv,JS].indexOf(u)!==-1||A===ryt||l===rb&&lyt.indexOf(A)!==-1||A===Cf&&u===rb||u===FP||kA.indexOf(u)!==-1&&A===So||kA.indexOf(A)!==-1&&u===So||A===Tv&&[Ig,n0,i0].indexOf(u)!==-1||[Ig,n0,i0].indexOf(A)!==-1&&u===Bv||kA.indexOf(A)!==-1&&IP.indexOf(u)!==-1||IP.indexOf(A)!==-1&&kA.indexOf(u)!==-1||[Tv,Bv].indexOf(A)!==-1&&(u===So||[tv,Cv].indexOf(u)!==-1&&e[s+1]===So)||[tv,Cv].indexOf(A)!==-1&&u===So||A===So&&[So,Cf,Ef].indexOf(u)!==-1)return mr;if([So,Cf,Ef,r0,Jd].indexOf(u)!==-1)for(var c=a;c>=0;){var h=e[c];if(h===So)return mr;if([Cf,Ef].indexOf(h)!==-1)c--;else break}if([Tv,Bv].indexOf(u)!==-1)for(var c=[r0,Jd].indexOf(A)!==-1?o:a;c>=0;){var h=e[c];if(h===So)return mr;if([Cf,Ef].indexOf(h)!==-1)c--;else break}if(nb===A&&[nb,n_,tb,eb].indexOf(u)!==-1||[n_,tb].indexOf(A)!==-1&&[n_,i_].indexOf(u)!==-1||[i_,eb].indexOf(A)!==-1&&u===i_||LP.indexOf(A)!==-1&&[FP,Bv].indexOf(u)!==-1||LP.indexOf(u)!==-1&&A===Tv||kA.indexOf(A)!==-1&&kA.indexOf(u)!==-1||A===Ef&&kA.indexOf(u)!==-1||kA.concat(So).indexOf(A)!==-1&&u===tv&&syt.indexOf(r[s])===-1||kA.concat(So).indexOf(u)!==-1&&A===Jd)return mr;if(A===cB&&u===cB){for(var f=t[a],p=1;f>0&&(f--,e[f]===cB);)p++;if(p%2!==0)return mr}return A===n0&&u===i0?mr:a0},hyt=function(r,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=uyt(r,e.lineBreak),n=t[0],i=t[1],a=t[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(i=i.map(function(s){return[So,Uc,GH].indexOf(s)!==-1?Ig:s}));var o=e.wordBreak==="keep-all"?a.map(function(s,A){return s&&r[A]>=19968&&r[A]<=40959}):void 0;return[n,i,o]},fyt=function(){function r(e,t,n,i){this.codePoints=e,this.required=t===kH,this.start=n,this.end=i}return r.prototype.slice=function(){return ei.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),pyt=function(r,e){var t=kw(r),n=hyt(t,e),i=n[0],a=n[1],o=n[2],s=t.length,A=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var u=mr;l<s&&(u=cyt(t,a,i,++l,o))===mr;);if(u!==mr||l===s){var c=new fyt(t,u,A,l);return A=l,{value:c,done:!1}}return{done:!0,value:null}}}},dyt=1<<0,vyt=1<<1,gy=1<<2,RP=1<<3,h1=10,MP=47,Xv=92,gyt=9,yyt=32,o0=34,ev=61,myt=35,_yt=36,wyt=37,s0=39,A0=40,rv=41,Eyt=95,oo=45,Cyt=33,Byt=60,Tyt=62,xyt=64,Syt=91,byt=93,Fyt=61,Iyt=123,l0=63,Lyt=125,NP=124,Oyt=126,Ryt=128,PP=65533,fB=42,Vc=43,Myt=44,Nyt=58,Pyt=59,Lg=46,Uyt=0,Dyt=8,Qyt=11,Hyt=14,Gyt=31,kyt=127,js=-1,jH=48,VH=97,KH=101,$yt=102,jyt=117,Vyt=122,zH=65,XH=69,YH=70,Kyt=85,zyt=90,Ea=function(r){return r>=jH&&r<=57},Xyt=function(r){return r>=55296&&r<=57343},Bf=function(r){return Ea(r)||r>=zH&&r<=YH||r>=VH&&r<=$yt},Yyt=function(r){return r>=VH&&r<=Vyt},Wyt=function(r){return r>=zH&&r<=zyt},qyt=function(r){return Yyt(r)||Wyt(r)},Zyt=function(r){return r>=Ryt},u0=function(r){return r===h1||r===gyt||r===yyt},f1=function(r){return qyt(r)||Zyt(r)||r===Eyt},UP=function(r){return f1(r)||Ea(r)||r===oo},Jyt=function(r){return r>=Uyt&&r<=Dyt||r===Qyt||r>=Hyt&&r<=Gyt||r===kyt},fu=function(r,e){return r!==Xv?!1:e!==h1},c0=function(r,e,t){return r===oo?f1(e)||fu(e,t):f1(r)?!0:!!(r===Xv&&fu(r,e))},pB=function(r,e,t){return r===Vc||r===oo?Ea(e)?!0:e===Lg&&Ea(t):Ea(r===Lg?e:r)},tmt=function(r){var e=0,t=1;(r[e]===Vc||r[e]===oo)&&(r[e]===oo&&(t=-1),e++);for(var n=[];Ea(r[e]);)n.push(r[e++]);var i=n.length?parseInt(ei.apply(void 0,n),10):0;r[e]===Lg&&e++;for(var a=[];Ea(r[e]);)a.push(r[e++]);var o=a.length,s=o?parseInt(ei.apply(void 0,a),10):0;(r[e]===XH||r[e]===KH)&&e++;var A=1;(r[e]===Vc||r[e]===oo)&&(r[e]===oo&&(A=-1),e++);for(var l=[];Ea(r[e]);)l.push(r[e++]);var u=l.length?parseInt(ei.apply(void 0,l),10):0;return t*(i+s*Math.pow(10,-o))*Math.pow(10,A*u)},emt={type:2},rmt={type:3},nmt={type:4},imt={type:13},amt={type:8},omt={type:21},smt={type:9},Amt={type:10},lmt={type:11},umt={type:12},cmt={type:14},h0={type:23},hmt={type:1},fmt={type:25},pmt={type:24},dmt={type:26},vmt={type:27},gmt={type:28},ymt={type:29},mmt={type:31},ob={type:32},WH=function(){function r(){this._value=[]}return r.prototype.write=function(e){this._value=this._value.concat(kw(e))},r.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==ob;)e.push(t),t=this.consumeToken();return e},r.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case o0:return this.consumeStringToken(o0);case myt:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),i=this.peekCodePoint(2);if(UP(t)||fu(n,i)){var a=c0(t,n,i)?vyt:dyt,o=this.consumeName();return{type:5,value:o,flags:a}}break;case _yt:if(this.peekCodePoint(0)===ev)return this.consumeCodePoint(),imt;break;case s0:return this.consumeStringToken(s0);case A0:return emt;case rv:return rmt;case fB:if(this.peekCodePoint(0)===ev)return this.consumeCodePoint(),cmt;break;case Vc:if(pB(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Myt:return nmt;case oo:var s=e,A=this.peekCodePoint(0),l=this.peekCodePoint(1);if(pB(s,A,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(c0(s,A,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(A===oo&&l===Tyt)return this.consumeCodePoint(),this.consumeCodePoint(),pmt;break;case Lg:if(pB(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case MP:if(this.peekCodePoint(0)===fB)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===fB&&(u=this.consumeCodePoint(),u===MP))return this.consumeToken();if(u===js)return this.consumeToken()}break;case Nyt:return dmt;case Pyt:return vmt;case Byt:if(this.peekCodePoint(0)===Cyt&&this.peekCodePoint(1)===oo&&this.peekCodePoint(2)===oo)return this.consumeCodePoint(),this.consumeCodePoint(),fmt;break;case xyt:var c=this.peekCodePoint(0),h=this.peekCodePoint(1),f=this.peekCodePoint(2);if(c0(c,h,f)){var o=this.consumeName();return{type:7,value:o}}break;case Syt:return gmt;case Xv:if(fu(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case byt:return ymt;case Fyt:if(this.peekCodePoint(0)===ev)return this.consumeCodePoint(),amt;break;case Iyt:return lmt;case Lyt:return umt;case jyt:case Kyt:var p=this.peekCodePoint(0),v=this.peekCodePoint(1);return p===Vc&&(Bf(v)||v===l0)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case NP:if(this.peekCodePoint(0)===ev)return this.consumeCodePoint(),smt;if(this.peekCodePoint(0)===NP)return this.consumeCodePoint(),omt;break;case Oyt:if(this.peekCodePoint(0)===ev)return this.consumeCodePoint(),Amt;break;case js:return ob}return u0(e)?(this.consumeWhiteSpace(),mmt):Ea(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):f1(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:ei(e)}},r.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},r.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},r.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},r.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Bf(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===l0&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var i=parseInt(ei.apply(void 0,e.map(function(A){return A===l0?jH:A})),16),a=parseInt(ei.apply(void 0,e.map(function(A){return A===l0?YH:A})),16);return{type:30,start:i,end:a}}var o=parseInt(ei.apply(void 0,e),16);if(this.peekCodePoint(0)===oo&&Bf(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];Bf(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();var a=parseInt(ei.apply(void 0,s),16);return{type:30,start:o,end:a}}else return{type:30,start:o,end:o}},r.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===A0?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===A0?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},r.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===js)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===s0||t===o0){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===js||this.peekCodePoint(0)===rv)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),h0)}for(;;){var i=this.consumeCodePoint();if(i===js||i===rv)return{type:22,value:ei.apply(void 0,e)};if(u0(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===js||this.peekCodePoint(0)===rv?(this.consumeCodePoint(),{type:22,value:ei.apply(void 0,e)}):(this.consumeBadUrlRemnants(),h0);if(i===o0||i===s0||i===A0||Jyt(i))return this.consumeBadUrlRemnants(),h0;if(i===Xv)if(fu(i,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),h0;else e.push(i)}},r.prototype.consumeWhiteSpace=function(){for(;u0(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===rv||e===js)return;fu(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},r.prototype.consumeStringSlice=function(e){for(var t=5e4,n="";e>0;){var i=Math.min(t,e);n+=ei.apply(void 0,this._value.splice(0,i)),e-=i}return this._value.shift(),n},r.prototype.consumeStringToken=function(e){var t="",n=0;do{var i=this._value[n];if(i===js||i===void 0||i===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(i===h1)return this._value.splice(0,n),hmt;if(i===Xv){var a=this._value[n+1];a!==js&&a!==void 0&&(a===h1?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):fu(i,a)&&(t+=this.consumeStringSlice(n),t+=ei(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var e=[],t=gy,n=this.peekCodePoint(0);for((n===Vc||n===oo)&&e.push(this.consumeCodePoint());Ea(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(n===Lg&&Ea(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=RP;Ea(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),i=this.peekCodePoint(1);var a=this.peekCodePoint(2);if((n===XH||n===KH)&&((i===Vc||i===oo)&&Ea(a)||Ea(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=RP;Ea(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[tmt(e),t]},r.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],i=this.peekCodePoint(0),a=this.peekCodePoint(1),o=this.peekCodePoint(2);if(c0(i,a,o)){var s=this.consumeName();return{type:15,number:t,flags:n,unit:s}}return i===wyt?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Bf(e)){for(var t=ei(e);Bf(this.peekCodePoint(0))&&t.length<6;)t+=ei(this.consumeCodePoint());u0(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||Xyt(n)||n>1114111?PP:n}return e===js?PP:e},r.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(UP(t))e+=ei(t);else if(fu(t,this.peekCodePoint(0)))e+=ei(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},r}(),qH=function(){function r(e){this._tokens=e}return r.create=function(e){var t=new WH;return t.write(e),new r(t.read())},r.parseValue=function(e){return r.create(e).parseComponentValue()},r.parseValues=function(e){return r.create(e).parseComponentValues()},r.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},r.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},r.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},r.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||wmt(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},r.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},r.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?ob:e},r.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},r}(),yy=function(r){return r.type===15},nd=function(r){return r.type===17},sn=function(r){return r.type===20},_mt=function(r){return r.type===0},sb=function(r,e){return sn(r)&&r.value===e},ZH=function(r){return r.type!==31},Dp=function(r){return r.type!==31&&r.type!==4},yA=function(r){var e=[],t=[];return r.forEach(function(n){if(n.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(t),t=[];return}n.type!==31&&t.push(n)}),t.length&&e.push(t),e},wmt=function(r,e){return e===11&&r.type===12||e===28&&r.type===29?!0:e===2&&r.type===3},qu=function(r){return r.type===17||r.type===15},_i=function(r){return r.type===16||qu(r)},JH=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},sa={type:17,number:0,flags:gy},_L={type:16,number:50,flags:gy},Cu={type:16,number:100,flags:gy},xv=function(r,e,t){var n=r[0],i=r[1];return[_n(n,e),_n(typeof i<"u"?i:n,t)]},_n=function(r,e){if(r.type===16)return r.number/100*e;if(yy(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},t7="deg",e7="grad",r7="rad",n7="turn",$w={name:"angle",parse:function(r,e){if(e.type===15)switch(e.unit){case t7:return Math.PI*e.number/180;case e7:return Math.PI/200*e.number;case r7:return e.number;case n7:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},i7=function(r){return r.type===15&&(r.unit===t7||r.unit===e7||r.unit===r7||r.unit===n7)},a7=function(r){var e=r.filter(sn).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[sa,sa];case"to top":case"bottom":return Jo(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[sa,Cu];case"to right":case"left":return Jo(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Cu,Cu];case"to bottom":case"top":return Jo(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Cu,sa];case"to left":case"right":return Jo(270)}return 0},Jo=function(r){return Math.PI*r/180},Lu={name:"color",parse:function(r,e){if(e.type===18){var t=Emt[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(r,e.values)}if(e.type===5){if(e.value.length===3){var n=e.value.substring(0,1),i=e.value.substring(1,2),a=e.value.substring(2,3);return Bu(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(e.value.length===4){var n=e.value.substring(0,1),i=e.value.substring(1,2),a=e.value.substring(2,3),o=e.value.substring(3,4);return Bu(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(e.value.length===6){var n=e.value.substring(0,2),i=e.value.substring(2,4),a=e.value.substring(4,6);return Bu(parseInt(n,16),parseInt(i,16),parseInt(a,16),1)}if(e.value.length===8){var n=e.value.substring(0,2),i=e.value.substring(2,4),a=e.value.substring(4,6),o=e.value.substring(6,8);return Bu(parseInt(n,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(e.type===20){var s=ll[e.value.toUpperCase()];if(typeof s<"u")return s}return ll.TRANSPARENT}},Ou=function(r){return(255&r)===0},zi=function(r){var e=255&r,t=255&r>>8,n=255&r>>16,i=255&r>>24;return e<255?"rgba("+i+","+n+","+t+","+e/255+")":"rgb("+i+","+n+","+t+")"},Bu=function(r,e,t,n){return(r<<24|e<<16|t<<8|Math.round(n*255)<<0)>>>0},DP=function(r,e){if(r.type===17)return r.number;if(r.type===16){var t=e===3?1:255;return e===3?r.number/100*t:Math.round(r.number/100*t)}return 0},QP=function(r,e){var t=e.filter(Dp);if(t.length===3){var n=t.map(DP),i=n[0],a=n[1],o=n[2];return Bu(i,a,o,1)}if(t.length===4){var s=t.map(DP),i=s[0],a=s[1],o=s[2],A=s[3];return Bu(i,a,o,A)}return 0};function dB(r,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-r)*t*6+r:t<1/2?e:t<2/3?(e-r)*6*(2/3-t)+r:r}var HP=function(r,e){var t=e.filter(Dp),n=t[0],i=t[1],a=t[2],o=t[3],s=(n.type===17?Jo(n.number):$w.parse(r,n))/(Math.PI*2),A=_i(i)?i.number/100:0,l=_i(a)?a.number/100:0,u=typeof o<"u"&&_i(o)?_n(o,1):1;if(A===0)return Bu(l*255,l*255,l*255,1);var c=l<=.5?l*(A+1):l+A-l*A,h=l*2-c,f=dB(h,c,s+1/3),p=dB(h,c,s),v=dB(h,c,s-1/3);return Bu(f*255,p*255,v*255,u)},Emt={hsl:HP,hsla:HP,rgb:QP,rgba:QP},Yv=function(r,e){return Lu.parse(r,qH.create(e).parseComponentValue())},ll={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Cmt={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(sn(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Bmt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},jw=function(r,e){var t=Lu.parse(r,e[0]),n=e[1];return n&&_i(n)?{color:t,stop:n}:{color:t,stop:null}},GP=function(r,e){var t=r[0],n=r[r.length-1];t.stop===null&&(t.stop=sa),n.stop===null&&(n.stop=Cu);for(var i=[],a=0,o=0;o<r.length;o++){var s=r[o].stop;if(s!==null){var A=_n(s,e);A>a?i.push(A):i.push(a),a=A}else i.push(null)}for(var l=null,o=0;o<i.length;o++){var u=i[o];if(u===null)l===null&&(l=o);else if(l!==null){for(var c=o-l,h=i[l-1],f=(u-h)/(c+1),p=1;p<=c;p++)i[l+p-1]=f*p;l=null}}return r.map(function(v,m){var g=v.color;return{color:g,stop:Math.max(Math.min(1,i[m]/e),0)}})},Tmt=function(r,e,t){var n=e/2,i=t/2,a=_n(r[0],e)-n,o=i-_n(r[1],t);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},xmt=function(r,e,t){var n=typeof r=="number"?r:Tmt(r,e,t),i=Math.abs(e*Math.sin(n))+Math.abs(t*Math.cos(n)),a=e/2,o=t/2,s=i/2,A=Math.sin(n-Math.PI/2)*s,l=Math.cos(n-Math.PI/2)*s;return[i,a-l,a+l,o-A,o+A]},_s=function(r,e){return Math.sqrt(r*r+e*e)},kP=function(r,e,t,n,i){var a=[[0,0],[0,e],[r,0],[r,e]];return a.reduce(function(o,s){var A=s[0],l=s[1],u=_s(t-A,n-l);return(i?u<o.optimumDistance:u>o.optimumDistance)?{optimumCorner:s,optimumDistance:u}:o},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},Smt=function(r,e,t,n,i){var a=0,o=0;switch(r.size){case 0:r.shape===0?a=o=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-i)):r.shape===1&&(a=Math.min(Math.abs(e),Math.abs(e-n)),o=Math.min(Math.abs(t),Math.abs(t-i)));break;case 2:if(r.shape===0)a=o=Math.min(_s(e,t),_s(e,t-i),_s(e-n,t),_s(e-n,t-i));else if(r.shape===1){var s=Math.min(Math.abs(t),Math.abs(t-i))/Math.min(Math.abs(e),Math.abs(e-n)),A=kP(n,i,e,t,!0),l=A[0],u=A[1];a=_s(l-e,(u-t)/s),o=s*a}break;case 1:r.shape===0?a=o=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-i)):r.shape===1&&(a=Math.max(Math.abs(e),Math.abs(e-n)),o=Math.max(Math.abs(t),Math.abs(t-i)));break;case 3:if(r.shape===0)a=o=Math.max(_s(e,t),_s(e,t-i),_s(e-n,t),_s(e-n,t-i));else if(r.shape===1){var s=Math.max(Math.abs(t),Math.abs(t-i))/Math.max(Math.abs(e),Math.abs(e-n)),c=kP(n,i,e,t,!1),l=c[0],u=c[1];a=_s(l-e,(u-t)/s),o=s*a}break}return Array.isArray(r.size)&&(a=_n(r.size[0],n),o=r.size.length===2?_n(r.size[1],i):a),[a,o]},bmt=function(r,e){var t=Jo(180),n=[];return yA(e).forEach(function(i,a){if(a===0){var o=i[0];if(o.type===20&&o.value==="to"){t=a7(i);return}else if(i7(o)){t=$w.parse(r,o);return}}var s=jw(r,i);n.push(s)}),{angle:t,stops:n,type:1}},f0=function(r,e){var t=Jo(180),n=[];return yA(e).forEach(function(i,a){if(a===0){var o=i[0];if(o.type===20&&["top","left","right","bottom"].indexOf(o.value)!==-1){t=a7(i);return}else if(i7(o)){t=($w.parse(r,o)+Jo(270))%Jo(360);return}}var s=jw(r,i);n.push(s)}),{angle:t,stops:n,type:1}},Fmt=function(r,e){var t=Jo(180),n=[],i=1,a=0,o=3,s=[];return yA(e).forEach(function(A,l){var u=A[0];if(l===0){if(sn(u)&&u.value==="linear"){i=1;return}else if(sn(u)&&u.value==="radial"){i=2;return}}if(u.type===18){if(u.name==="from"){var c=Lu.parse(r,u.values[0]);n.push({stop:sa,color:c})}else if(u.name==="to"){var c=Lu.parse(r,u.values[0]);n.push({stop:Cu,color:c})}else if(u.name==="color-stop"){var h=u.values.filter(Dp);if(h.length===2){var c=Lu.parse(r,h[1]),f=h[0];nd(f)&&n.push({stop:{type:16,number:f.number*100,flags:f.flags},color:c})}}}}),i===1?{angle:(t+Jo(180))%Jo(360),stops:n,type:i}:{size:o,shape:a,stops:n,position:s,type:i}},o7="closest-side",s7="farthest-side",A7="closest-corner",l7="farthest-corner",u7="circle",c7="ellipse",h7="cover",f7="contain",Imt=function(r,e){var t=0,n=3,i=[],a=[];return yA(e).forEach(function(o,s){var A=!0;if(s===0){var l=!1;A=o.reduce(function(c,h){if(l)if(sn(h))switch(h.value){case"center":return a.push(_L),c;case"top":case"left":return a.push(sa),c;case"right":case"bottom":return a.push(Cu),c}else(_i(h)||qu(h))&&a.push(h);else if(sn(h))switch(h.value){case u7:return t=0,!1;case c7:return t=1,!1;case"at":return l=!0,!1;case o7:return n=0,!1;case h7:case s7:return n=1,!1;case f7:case A7:return n=2,!1;case l7:return n=3,!1}else if(qu(h)||_i(h))return Array.isArray(n)||(n=[]),n.push(h),!1;return c},A)}if(A){var u=jw(r,o);i.push(u)}}),{size:n,shape:t,stops:i,position:a,type:2}},p0=function(r,e){var t=0,n=3,i=[],a=[];return yA(e).forEach(function(o,s){var A=!0;if(s===0?A=o.reduce(function(u,c){if(sn(c))switch(c.value){case"center":return a.push(_L),!1;case"top":case"left":return a.push(sa),!1;case"right":case"bottom":return a.push(Cu),!1}else if(_i(c)||qu(c))return a.push(c),!1;return u},A):s===1&&(A=o.reduce(function(u,c){if(sn(c))switch(c.value){case u7:return t=0,!1;case c7:return t=1,!1;case f7:case o7:return n=0,!1;case s7:return n=1,!1;case A7:return n=2,!1;case h7:case l7:return n=3,!1}else if(qu(c)||_i(c))return Array.isArray(n)||(n=[]),n.push(c),!1;return u},A)),A){var l=jw(r,o);i.push(l)}}),{size:n,shape:t,stops:i,position:a,type:2}},Lmt=function(r){return r.type===1},Omt=function(r){return r.type===2},wL={name:"image",parse:function(r,e){if(e.type===22){var t={url:e.value,type:0};return r.cache.addImage(e.value),t}if(e.type===18){var n=p7[e.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(r,e.values)}throw new Error("Unsupported image type "+e.type)}};function Rmt(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!p7[r.name])}var p7={"linear-gradient":bmt,"-moz-linear-gradient":f0,"-ms-linear-gradient":f0,"-o-linear-gradient":f0,"-webkit-linear-gradient":f0,"radial-gradient":Imt,"-moz-radial-gradient":p0,"-ms-radial-gradient":p0,"-o-radial-gradient":p0,"-webkit-radial-gradient":p0,"-webkit-gradient":Fmt},Mmt={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(r,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e.filter(function(n){return Dp(n)&&Rmt(n)}).map(function(n){return wL.parse(r,n)})}},Nmt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(sn(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Pmt={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,e){return yA(e).map(function(t){return t.filter(_i)}).map(JH)}},Umt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,e){return yA(e).map(function(t){return t.filter(sn).map(function(n){return n.value}).join(" ")}).map(Dmt)}},Dmt=function(r){switch(r){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},yp;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(yp||(yp={}));var Qmt={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,e){return yA(e).map(function(t){return t.filter(Hmt)})}},Hmt=function(r){return sn(r)||_i(r)},Vw=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Gmt=Vw("top"),kmt=Vw("right"),$mt=Vw("bottom"),jmt=Vw("left"),Kw=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return JH(t.filter(_i))}}},Vmt=Kw("top-left"),Kmt=Kw("top-right"),zmt=Kw("bottom-right"),Xmt=Kw("bottom-left"),zw=function(r){return{name:"border-"+r+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Ymt=zw("top"),Wmt=zw("right"),qmt=zw("bottom"),Zmt=zw("left"),Xw=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return yy(t)?t.number:0}}},Jmt=Xw("top"),t0t=Xw("right"),e0t=Xw("bottom"),r0t=Xw("left"),n0t={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},i0t={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},a0t={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,e){return e.filter(sn).reduce(function(t,n){return t|o0t(n.value)},0)}},o0t=function(r){switch(r){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},s0t={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},A0t={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(r,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},p1;(function(r){r.NORMAL="normal",r.STRICT="strict"})(p1||(p1={}));var l0t={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"strict":return p1.STRICT;case"normal":default:return p1.NORMAL}}},u0t={name:"line-height",initialValue:"normal",prefix:!1,type:4},$P=function(r,e){return sn(r)&&r.value==="normal"?1.2*e:r.type===17?e*r.number:_i(r)?_n(r,e):e},c0t={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,e){return e.type===20&&e.value==="none"?null:wL.parse(r,e)}},h0t={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(r,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},Ab={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Yw=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},f0t=Yw("top"),p0t=Yw("right"),d0t=Yw("bottom"),v0t=Yw("left"),g0t={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,e){return e.filter(sn).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},y0t={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ww=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},m0t=Ww("top"),_0t=Ww("right"),w0t=Ww("bottom"),E0t=Ww("left"),C0t={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(r,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},B0t={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(r,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},T0t={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&sb(e[0],"none")?[]:yA(e).map(function(t){for(var n={color:ll.TRANSPARENT,offsetX:sa,offsetY:sa,blur:sa},i=0,a=0;a<t.length;a++){var o=t[a];qu(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:n.blur=o,i++):n.color=Lu.parse(r,o)}return n})}},x0t={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},S0t={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(r,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var t=I0t[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},b0t=function(r){var e=r.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},F0t=function(r){var e=r.filter(function(A){return A.type===17}).map(function(A){return A.number}),t=e[0],n=e[1];e[2],e[3];var i=e[4],a=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var o=e[12],s=e[13];return e[14],e[15],e.length===16?[t,n,i,a,o,s]:null},I0t={matrix:b0t,matrix3d:F0t},jP={type:16,number:50,flags:gy},L0t=[jP,jP],O0t={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,e){var t=e.filter(_i);return t.length!==2?L0t:[t[0],t[1]]}},R0t={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Wv;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(Wv||(Wv={}));var M0t={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-all":return Wv.BREAK_ALL;case"keep-all":return Wv.KEEP_ALL;case"normal":default:return Wv.NORMAL}}},N0t={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,e){if(e.type===20)return{auto:!0,order:0};if(nd(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},d7={name:"time",parse:function(r,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},P0t={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,e){return nd(e)?e.number:1}},U0t={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},D0t={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,e){return e.filter(sn).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},Q0t={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(r,e){var t=[],n=[];return e.forEach(function(i){switch(i.type){case 20:case 0:t.push(i.value);break;case 17:t.push(i.number.toString());break;case 4:n.push(t.join(" ")),t.length=0;break}}),t.length&&n.push(t.join(" ")),n.map(function(i){return i.indexOf(" ")===-1?i:"'"+i+"'"})}},H0t={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},G0t={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,e){if(nd(e))return e.number;if(sn(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},k0t={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.filter(sn).map(function(t){return t.value})}},$0t={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Ni=function(r,e){return(r&e)!==0},j0t={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(r,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e}},V0t={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;for(var n=[],i=e.filter(ZH),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(o.type===20){var A=s&&nd(s)?s.number:1;n.push({counter:o.value,increment:A})}}return n}},K0t={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return[];for(var t=[],n=e.filter(ZH),i=0;i<n.length;i++){var a=n[i],o=n[i+1];if(sn(a)&&a.value!=="none"){var s=o&&nd(o)?o.number:0;t.push({counter:a.value,reset:s})}}return t}},z0t={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(r,e){return e.filter(yy).map(function(t){return d7.parse(r,t)})}},X0t={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;var n=[],i=e.filter(_mt);if(i.length%2!==0)return null;for(var a=0;a<i.length;a+=2){var o=i[a].value,s=i[a+1].value;n.push({open:o,close:s})}return n}},VP=function(r,e,t){if(!r)return"";var n=r[Math.min(e,r.length-1)];return n?t?n.open:n.close:""},Y0t={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&sb(e[0],"none")?[]:yA(e).map(function(t){for(var n={color:255,offsetX:sa,offsetY:sa,blur:sa,spread:sa,inset:!1},i=0,a=0;a<t.length;a++){var o=t[a];sb(o,"inset")?n.inset=!0:qu(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:i===2?n.blur=o:n.spread=o,i++):n.color=Lu.parse(r,o)}return n})}},W0t={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(r,e){var t=[0,1,2],n=[];return e.filter(sn).forEach(function(i){switch(i.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2);break}}),t.forEach(function(i){n.indexOf(i)===-1&&n.push(i)}),n}},q0t={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Z0t={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(r,e){return yy(e)?e.number:0}},J0t=function(){function r(e,t){var n,i;this.animationDuration=he(e,z0t,t.animationDuration),this.backgroundClip=he(e,Cmt,t.backgroundClip),this.backgroundColor=he(e,Bmt,t.backgroundColor),this.backgroundImage=he(e,Mmt,t.backgroundImage),this.backgroundOrigin=he(e,Nmt,t.backgroundOrigin),this.backgroundPosition=he(e,Pmt,t.backgroundPosition),this.backgroundRepeat=he(e,Umt,t.backgroundRepeat),this.backgroundSize=he(e,Qmt,t.backgroundSize),this.borderTopColor=he(e,Gmt,t.borderTopColor),this.borderRightColor=he(e,kmt,t.borderRightColor),this.borderBottomColor=he(e,$mt,t.borderBottomColor),this.borderLeftColor=he(e,jmt,t.borderLeftColor),this.borderTopLeftRadius=he(e,Vmt,t.borderTopLeftRadius),this.borderTopRightRadius=he(e,Kmt,t.borderTopRightRadius),this.borderBottomRightRadius=he(e,zmt,t.borderBottomRightRadius),this.borderBottomLeftRadius=he(e,Xmt,t.borderBottomLeftRadius),this.borderTopStyle=he(e,Ymt,t.borderTopStyle),this.borderRightStyle=he(e,Wmt,t.borderRightStyle),this.borderBottomStyle=he(e,qmt,t.borderBottomStyle),this.borderLeftStyle=he(e,Zmt,t.borderLeftStyle),this.borderTopWidth=he(e,Jmt,t.borderTopWidth),this.borderRightWidth=he(e,t0t,t.borderRightWidth),this.borderBottomWidth=he(e,e0t,t.borderBottomWidth),this.borderLeftWidth=he(e,r0t,t.borderLeftWidth),this.boxShadow=he(e,Y0t,t.boxShadow),this.color=he(e,n0t,t.color),this.direction=he(e,i0t,t.direction),this.display=he(e,a0t,t.display),this.float=he(e,s0t,t.cssFloat),this.fontFamily=he(e,Q0t,t.fontFamily),this.fontSize=he(e,H0t,t.fontSize),this.fontStyle=he(e,$0t,t.fontStyle),this.fontVariant=he(e,k0t,t.fontVariant),this.fontWeight=he(e,G0t,t.fontWeight),this.letterSpacing=he(e,A0t,t.letterSpacing),this.lineBreak=he(e,l0t,t.lineBreak),this.lineHeight=he(e,u0t,t.lineHeight),this.listStyleImage=he(e,c0t,t.listStyleImage),this.listStylePosition=he(e,h0t,t.listStylePosition),this.listStyleType=he(e,Ab,t.listStyleType),this.marginTop=he(e,f0t,t.marginTop),this.marginRight=he(e,p0t,t.marginRight),this.marginBottom=he(e,d0t,t.marginBottom),this.marginLeft=he(e,v0t,t.marginLeft),this.opacity=he(e,P0t,t.opacity);var a=he(e,g0t,t.overflow);this.overflowX=a[0],this.overflowY=a[a.length>1?1:0],this.overflowWrap=he(e,y0t,t.overflowWrap),this.paddingTop=he(e,m0t,t.paddingTop),this.paddingRight=he(e,_0t,t.paddingRight),this.paddingBottom=he(e,w0t,t.paddingBottom),this.paddingLeft=he(e,E0t,t.paddingLeft),this.paintOrder=he(e,W0t,t.paintOrder),this.position=he(e,B0t,t.position),this.textAlign=he(e,C0t,t.textAlign),this.textDecorationColor=he(e,U0t,(n=t.textDecorationColor)!==null&&n!==void 0?n:t.color),this.textDecorationLine=he(e,D0t,(i=t.textDecorationLine)!==null&&i!==void 0?i:t.textDecoration),this.textShadow=he(e,T0t,t.textShadow),this.textTransform=he(e,x0t,t.textTransform),this.transform=he(e,S0t,t.transform),this.transformOrigin=he(e,O0t,t.transformOrigin),this.visibility=he(e,R0t,t.visibility),this.webkitTextStrokeColor=he(e,q0t,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=he(e,Z0t,t.webkitTextStrokeWidth),this.wordBreak=he(e,M0t,t.wordBreak),this.zIndex=he(e,N0t,t.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return Ou(this.backgroundColor)},r.prototype.isTransformed=function(){return this.transform!==null},r.prototype.isPositioned=function(){return this.position!==0},r.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},r.prototype.isFloating=function(){return this.float!==0},r.prototype.isInlineLevel=function(){return Ni(this.display,4)||Ni(this.display,33554432)||Ni(this.display,268435456)||Ni(this.display,536870912)||Ni(this.display,67108864)||Ni(this.display,134217728)},r}(),t_t=function(){function r(e,t){this.content=he(e,j0t,t.content),this.quotes=he(e,X0t,t.quotes)}return r}(),KP=function(){function r(e,t){this.counterIncrement=he(e,V0t,t.counterIncrement),this.counterReset=he(e,K0t,t.counterReset)}return r}(),he=function(r,e,t){var n=new WH,i=t!==null&&typeof t<"u"?t.toString():e.initialValue;n.write(i);var a=new qH(n.read());switch(e.type){case 2:var o=a.parseComponentValue();return e.parse(r,sn(o)?o.value:e.initialValue);case 0:return e.parse(r,a.parseComponentValue());case 1:return e.parse(r,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(e.format){case"angle":return $w.parse(r,a.parseComponentValue());case"color":return Lu.parse(r,a.parseComponentValue());case"image":return wL.parse(r,a.parseComponentValue());case"length":var s=a.parseComponentValue();return qu(s)?s:sa;case"length-percentage":var A=a.parseComponentValue();return _i(A)?A:sa;case"time":return d7.parse(r,a.parseComponentValue())}break}},e_t="data-html2canvas-debug",r_t=function(r){var e=r.getAttribute(e_t);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},lb=function(r,e){var t=r_t(r);return t===1||e===t},mA=function(){function r(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,lb(t,3))debugger;this.styles=new J0t(e,window.getComputedStyle(t,null)),hb(t)&&(this.styles.animationDuration.some(function(n){return n>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=Gw(this.context,t),lb(t,4)&&(this.flags|=16)}return r}(),n_t="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",zP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Sv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var d0=0;d0<zP.length;d0++)Sv[zP.charCodeAt(d0)]=d0;var i_t=function(r){var e=r.length*.75,t=r.length,n,i=0,a,o,s,A;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)a=Sv[r.charCodeAt(n)],o=Sv[r.charCodeAt(n+1)],s=Sv[r.charCodeAt(n+2)],A=Sv[r.charCodeAt(n+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|A&63;return l},a_t=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},o_t=function(r){for(var e=r.length,t=[],n=0;n<e;n+=4)t.push(r[n+3]<<24|r[n+2]<<16|r[n+1]<<8|r[n]);return t},ah=5,EL=6+5,vB=2,s_t=EL-ah,v7=65536>>ah,A_t=1<<ah,gB=A_t-1,l_t=1024>>ah,u_t=v7+l_t,c_t=u_t,h_t=32,f_t=c_t+h_t,p_t=65536>>EL,d_t=1<<s_t,v_t=d_t-1,XP=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},g_t=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},y_t=function(r,e){var t=i_t(r),n=Array.isArray(t)?o_t(t):new Uint32Array(t),i=Array.isArray(t)?a_t(t):new Uint16Array(t),a=24,o=XP(i,a/2,n[4]/2),s=n[5]===2?XP(i,(a+n[4])/2):g_t(n,Math.ceil((a+n[4])/4));return new m_t(n[0],n[1],n[2],n[3],o,s)},m_t=function(){function r(e,t,n,i,a,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=i,this.index=a,this.data=o}return r.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>ah],t=(t<<vB)+(e&gB),this.data[t];if(e<=65535)return t=this.index[v7+(e-55296>>ah)],t=(t<<vB)+(e&gB),this.data[t];if(e<this.highStart)return t=f_t-p_t+(e>>EL),t=this.index[t],t+=e>>ah&v_t,t=this.index[t],t=(t<<vB)+(e&gB),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),YP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",__t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var v0=0;v0<YP.length;v0++)__t[YP.charCodeAt(v0)]=v0;var w_t=1,yB=2,mB=3,WP=4,qP=5,E_t=7,ZP=8,_B=9,wB=10,JP=11,t5=12,e5=13,r5=14,EB=15,C_t=function(r){for(var e=[],t=0,n=r.length;t<n;){var i=r.charCodeAt(t++);if(i>=55296&&i<=56319&&t<n){var a=r.charCodeAt(t++);(a&64512)===56320?e.push(((i&1023)<<10)+(a&1023)+65536):(e.push(i),t--)}else e.push(i)}return e},B_t=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var t=r.length;if(!t)return"";for(var n=[],i=-1,a="";++i<t;){var o=r[i];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(i+1===t||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},T_t=y_t(n_t),Yo="×",CB="÷",x_t=function(r){return T_t.get(r)},S_t=function(r,e,t){var n=t-2,i=e[n],a=e[t-1],o=e[t];if(a===yB&&o===mB)return Yo;if(a===yB||a===mB||a===WP||o===yB||o===mB||o===WP)return CB;if(a===ZP&&[ZP,_B,JP,t5].indexOf(o)!==-1||(a===JP||a===_B)&&(o===_B||o===wB)||(a===t5||a===wB)&&o===wB||o===e5||o===qP||o===E_t||a===w_t)return Yo;if(a===e5&&o===r5){for(;i===qP;)i=e[--n];if(i===r5)return Yo}if(a===EB&&o===EB){for(var s=0;i===EB;)s++,i=e[--n];if(s%2===0)return Yo}return CB},b_t=function(r){var e=C_t(r),t=e.length,n=0,i=0,a=e.map(x_t);return{next:function(){if(n>=t)return{done:!0,value:null};for(var o=Yo;n<t&&(o=S_t(e,a,++n))===Yo;);if(o!==Yo||n===t){var s=B_t.apply(null,e.slice(i,n));return i=n,{value:s,done:!1}}return{done:!0,value:null}}}},F_t=function(r){for(var e=b_t(r),t=[],n;!(n=e.next()).done;)n.value&&t.push(n.value.slice());return t},I_t=function(r){var e=123;if(r.createRange){var t=r.createRange();if(t.getBoundingClientRect){var n=r.createElement("boundtest");n.style.height=e+"px",n.style.display="block",r.body.appendChild(n),t.selectNode(n);var i=t.getBoundingClientRect(),a=Math.round(i.height);if(r.body.removeChild(n),a===e)return!0}}return!1},L_t=function(r){var e=r.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",r.body.appendChild(e);var t=r.createRange();e.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var n=e.firstChild,i=kw(n.data).map(function(A){return ei(A)}),a=0,o={},s=i.every(function(A,l){t.setStart(n,a),t.setEnd(n,a+A.length);var u=t.getBoundingClientRect();a+=A.length;var c=u.x>o.x||u.y>o.y;return o=u,l===0?!0:c});return r.body.removeChild(e),s},O_t=function(){return typeof new Image().crossOrigin<"u"},R_t=function(){return typeof new XMLHttpRequest().responseType=="string"},M_t=function(r){var e=new Image,t=r.createElement("canvas"),n=t.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},n5=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},N_t=function(r){var e=r.createElement("canvas"),t=100;e.width=t,e.height=t;var n=e.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,t,t);var i=new Image,a=e.toDataURL();i.src=a;var o=ub(t,t,0,0,i);return n.fillStyle="red",n.fillRect(0,0,t,t),i5(o).then(function(s){n.drawImage(s,0,0);var A=n.getImageData(0,0,t,t).data;n.fillStyle="red",n.fillRect(0,0,t,t);var l=r.createElement("div");return l.style.backgroundImage="url("+a+")",l.style.height=t+"px",n5(A)?i5(ub(t,t,0,0,l)):Promise.reject(!1)}).then(function(s){return n.drawImage(s,0,0),n5(n.getImageData(0,0,t,t).data)}).catch(function(){return!1})},ub=function(r,e,t,n,i){var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return o.setAttributeNS(null,"width",r.toString()),o.setAttributeNS(null,"height",e.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",t.toString()),s.setAttributeNS(null,"y",n.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},i5=function(r){return new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},aa={get SUPPORT_RANGE_BOUNDS(){var r=I_t(document);return Object.defineProperty(aa,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=aa.SUPPORT_RANGE_BOUNDS&&L_t(document);return Object.defineProperty(aa,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=M_t(document);return Object.defineProperty(aa,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?N_t(document):Promise.resolve(!1);return Object.defineProperty(aa,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=O_t();return Object.defineProperty(aa,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=R_t();return Object.defineProperty(aa,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(aa,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(aa,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},qv=function(){function r(e,t){this.text=e,this.bounds=t}return r}(),P_t=function(r,e,t,n){var i=Q_t(e,t),a=[],o=0;return i.forEach(function(s){if(t.textDecorationLine.length||s.trim().length>0)if(aa.SUPPORT_RANGE_BOUNDS){var A=a5(n,o,s.length).getClientRects();if(A.length>1){var l=CL(s),u=0;l.forEach(function(h){a.push(new qv(h,vl.fromDOMRectList(r,a5(n,u+o,h.length).getClientRects()))),u+=h.length})}else a.push(new qv(s,vl.fromDOMRectList(r,A)))}else{var c=n.splitText(s.length);a.push(new qv(s,U_t(r,n))),n=c}else aa.SUPPORT_RANGE_BOUNDS||(n=n.splitText(s.length));o+=s.length}),a},U_t=function(r,e){var t=e.ownerDocument;if(t){var n=t.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var i=e.parentNode;if(i){i.replaceChild(n,e);var a=Gw(r,n);return n.firstChild&&i.replaceChild(n.firstChild,n),a}}return vl.EMPTY},a5=function(r,e,t){var n=r.ownerDocument;if(!n)throw new Error("Node has no owner document");var i=n.createRange();return i.setStart(r,e),i.setEnd(r,e+t),i},CL=function(r){if(aa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(r)).map(function(t){return t.segment})}return F_t(r)},D_t=function(r,e){if(aa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(r)).map(function(n){return n.segment})}return G_t(r,e)},Q_t=function(r,e){return e.letterSpacing!==0?CL(r):D_t(r,e)},H_t=[32,160,4961,65792,65793,4153,4241],G_t=function(r,e){for(var t=pyt(r,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),n=[],i,a=function(){if(i.value){var o=i.value.slice(),s=kw(o),A="";s.forEach(function(l){H_t.indexOf(l)===-1?A+=ei(l):(A.length&&n.push(A),n.push(ei(l)),A="")}),A.length&&n.push(A)}};!(i=t.next()).done;)a();return n},k_t=function(){function r(e,t,n){this.text=$_t(t.data,n.textTransform),this.textBounds=P_t(e,this.text,n,t)}return r}(),$_t=function(r,e){switch(e){case 1:return r.toLowerCase();case 3:return r.replace(j_t,V_t);case 2:return r.toUpperCase();default:return r}},j_t=/(^|\s|:|-|\(|\))([a-z])/g,V_t=function(r,e,t){return r.length>0?e+t.toUpperCase():r},g7=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.src=n.currentSrc||n.src,i.intrinsicWidth=n.naturalWidth,i.intrinsicHeight=n.naturalHeight,i.context.cache.addImage(i.src),i}return e}(mA),y7=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.canvas=n,i.intrinsicWidth=n.width,i.intrinsicHeight=n.height,i}return e}(mA),m7=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this,a=new XMLSerializer,o=Gw(t,n);return n.setAttribute("width",o.width+"px"),n.setAttribute("height",o.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(a.serializeToString(n)),i.intrinsicWidth=n.width.baseVal.value,i.intrinsicHeight=n.height.baseVal.value,i.context.cache.addImage(i.svg),i}return e}(mA),_7=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(mA),cb=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.start=n.start,i.reversed=typeof n.reversed=="boolean"&&n.reversed===!0,i}return e}(mA),K_t=[{type:15,flags:0,unit:"px",number:3}],z_t=[{type:16,flags:0,number:50}],X_t=function(r){return r.width>r.height?new vl(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new vl(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r},Y_t=function(r){var e=r.type===W_t?new Array(r.value.length+1).join("•"):r.value;return e.length===0?r.placeholder||"":e},d1="checkbox",v1="radio",W_t="password",o5=707406591,BL=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;switch(i.type=n.type.toLowerCase(),i.checked=n.checked,i.value=Y_t(n),(i.type===d1||i.type===v1)&&(i.styles.backgroundColor=3739148031,i.styles.borderTopColor=i.styles.borderRightColor=i.styles.borderBottomColor=i.styles.borderLeftColor=2779096575,i.styles.borderTopWidth=i.styles.borderRightWidth=i.styles.borderBottomWidth=i.styles.borderLeftWidth=1,i.styles.borderTopStyle=i.styles.borderRightStyle=i.styles.borderBottomStyle=i.styles.borderLeftStyle=1,i.styles.backgroundClip=[0],i.styles.backgroundOrigin=[0],i.bounds=X_t(i.bounds)),i.type){case d1:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=K_t;break;case v1:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=z_t;break}return i}return e}(mA),w7=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this,a=n.options[n.selectedIndex||0];return i.value=a&&a.text||"",i}return e}(mA),E7=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(mA),C7=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;i.src=n.src,i.width=parseInt(n.width,10)||0,i.height=parseInt(n.height,10)||0,i.backgroundColor=i.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){i.tree=T7(t,n.contentWindow.document.documentElement);var a=n.contentWindow.document.documentElement?Yv(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):ll.TRANSPARENT,o=n.contentWindow.document.body?Yv(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):ll.TRANSPARENT;i.backgroundColor=Ou(a)?Ou(o)?i.styles.backgroundColor:o:a}}catch{}return i}return e}(mA),q_t=["OL","UL","MENU"],a_=function(r,e,t,n){for(var i=e.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,x7(i)&&i.data.trim().length>0)t.textNodes.push(new k_t(r,i,t.styles));else if(tp(i))if(I7(i)&&i.assignedNodes)i.assignedNodes().forEach(function(s){return a_(r,s,t,n)});else{var o=B7(r,i);o.styles.isVisible()&&(Z_t(i,o,n)?o.flags|=4:J_t(o.styles)&&(o.flags|=2),q_t.indexOf(i.tagName)!==-1&&(o.flags|=8),t.elements.push(o),i.slot,i.shadowRoot?a_(r,i.shadowRoot,o,n):!g1(i)&&!S7(i)&&!y1(i)&&a_(r,i,o,n))}},B7=function(r,e){return fb(e)?new g7(r,e):b7(e)?new y7(r,e):S7(e)?new m7(r,e):t1t(e)?new _7(r,e):e1t(e)?new cb(r,e):r1t(e)?new BL(r,e):y1(e)?new w7(r,e):g1(e)?new E7(r,e):F7(e)?new C7(r,e):new mA(r,e)},T7=function(r,e){var t=B7(r,e);return t.flags|=4,a_(r,e,t,t),t},Z_t=function(r,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||TL(r)&&t.styles.isTransparent()},J_t=function(r){return r.isPositioned()||r.isFloating()},x7=function(r){return r.nodeType===Node.TEXT_NODE},tp=function(r){return r.nodeType===Node.ELEMENT_NODE},hb=function(r){return tp(r)&&typeof r.style<"u"&&!o_(r)},o_=function(r){return typeof r.className=="object"},t1t=function(r){return r.tagName==="LI"},e1t=function(r){return r.tagName==="OL"},r1t=function(r){return r.tagName==="INPUT"},n1t=function(r){return r.tagName==="HTML"},S7=function(r){return r.tagName==="svg"},TL=function(r){return r.tagName==="BODY"},b7=function(r){return r.tagName==="CANVAS"},s5=function(r){return r.tagName==="VIDEO"},fb=function(r){return r.tagName==="IMG"},F7=function(r){return r.tagName==="IFRAME"},A5=function(r){return r.tagName==="STYLE"},i1t=function(r){return r.tagName==="SCRIPT"},g1=function(r){return r.tagName==="TEXTAREA"},y1=function(r){return r.tagName==="SELECT"},I7=function(r){return r.tagName==="SLOT"},l5=function(r){return r.tagName.indexOf("-")>0},a1t=function(){function r(){this.counters={}}return r.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},r.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},r.prototype.pop=function(e){var t=this;e.forEach(function(n){return t.counters[n].pop()})},r.prototype.parse=function(e){var t=this,n=e.counterIncrement,i=e.counterReset,a=!0;n!==null&&n.forEach(function(s){var A=t.counters[s.counter];A&&s.increment!==0&&(a=!1,A.length||A.push(1),A[Math.max(0,A.length-1)]+=s.increment)});var o=[];return a&&i.forEach(function(s){var A=t.counters[s.counter];o.push(s.counter),A||(A=t.counters[s.counter]=[]),A.push(s.reset)}),o},r}(),u5={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},c5={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},o1t={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},s1t={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Tf=function(r,e,t,n,i,a){return r<e||r>t?Og(r,i,a.length>0):n.integers.reduce(function(o,s,A){for(;r>=s;)r-=s,o+=n.values[A];return o},"")+a},L7=function(r,e,t,n){var i="";do t||r--,i=n(r)+i,r/=e;while(r*e>=e);return i},Jn=function(r,e,t,n,i){var a=t-e+1;return(r<0?"-":"")+(L7(Math.abs(r),a,n,function(o){return ei(Math.floor(o%a)+e)})+i)},Cc=function(r,e,t){t===void 0&&(t=". ");var n=e.length;return L7(Math.abs(r),n,!1,function(i){return e[Math.floor(i%n)]})+t},kf=1<<0,lu=1<<1,uu=1<<2,bv=1<<3,$A=function(r,e,t,n,i,a){if(r<-9999||r>9999)return Og(r,4,i.length>0);var o=Math.abs(r),s=i;if(o===0)return e[0]+s;for(var A=0;o>0&&A<=4;A++){var l=o%10;l===0&&Ni(a,kf)&&s!==""?s=e[l]+s:l>1||l===1&&A===0||l===1&&A===1&&Ni(a,lu)||l===1&&A===1&&Ni(a,uu)&&r>100||l===1&&A>1&&Ni(a,bv)?s=e[l]+(A>0?t[A-1]:"")+s:l===1&&A>0&&(s=t[A-1]+s),o=Math.floor(o/10)}return(r<0?n:"")+s},h5="十百千萬",f5="拾佰仟萬",p5="マイナス",BB="마이너스",Og=function(r,e,t){var n=t?". ":"",i=t?"、":"",a=t?", ":"",o=t?" ":"";switch(e){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var s=Jn(r,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return Cc(r,"〇一二三四五六七八九",i);case 6:return Tf(r,1,3999,u5,3,n).toLowerCase();case 7:return Tf(r,1,3999,u5,3,n);case 8:return Jn(r,945,969,!1,n);case 9:return Jn(r,97,122,!1,n);case 10:return Jn(r,65,90,!1,n);case 11:return Jn(r,1632,1641,!0,n);case 12:case 49:return Tf(r,1,9999,c5,3,n);case 35:return Tf(r,1,9999,c5,3,n).toLowerCase();case 13:return Jn(r,2534,2543,!0,n);case 14:case 30:return Jn(r,6112,6121,!0,n);case 15:return Cc(r,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Cc(r,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return $A(r,"零一二三四五六七八九",h5,"負",i,lu|uu|bv);case 47:return $A(r,"零壹貳參肆伍陸柒捌玖",f5,"負",i,kf|lu|uu|bv);case 42:return $A(r,"零一二三四五六七八九",h5,"负",i,lu|uu|bv);case 41:return $A(r,"零壹贰叁肆伍陆柒捌玖",f5,"负",i,kf|lu|uu|bv);case 26:return $A(r,"〇一二三四五六七八九","十百千万",p5,i,0);case 25:return $A(r,"零壱弐参四伍六七八九","拾百千万",p5,i,kf|lu|uu);case 31:return $A(r,"영일이삼사오육칠팔구","십백천만",BB,a,kf|lu|uu);case 33:return $A(r,"零一二三四五六七八九","十百千萬",BB,a,0);case 32:return $A(r,"零壹貳參四五六七八九","拾百千",BB,a,kf|lu|uu);case 18:return Jn(r,2406,2415,!0,n);case 20:return Tf(r,1,19999,s1t,3,n);case 21:return Jn(r,2790,2799,!0,n);case 22:return Jn(r,2662,2671,!0,n);case 22:return Tf(r,1,10999,o1t,3,n);case 23:return Cc(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Cc(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Jn(r,3302,3311,!0,n);case 28:return Cc(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Cc(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return Jn(r,3792,3801,!0,n);case 37:return Jn(r,6160,6169,!0,n);case 38:return Jn(r,4160,4169,!0,n);case 39:return Jn(r,2918,2927,!0,n);case 40:return Jn(r,1776,1785,!0,n);case 43:return Jn(r,3046,3055,!0,n);case 44:return Jn(r,3174,3183,!0,n);case 45:return Jn(r,3664,3673,!0,n);case 46:return Jn(r,3872,3881,!0,n);case 3:default:return Jn(r,48,57,!0,n)}},O7="data-html2canvas-ignore",d5=function(){function r(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new a1t,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return r.prototype.toIFrame=function(e,t){var n=this,i=A1t(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var a=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,s=i.contentWindow,A=s.document,l=c1t(i).then(function(){return Pa(n,void 0,void 0,function(){var u,c;return _a(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(d1t),s&&(s.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(s.scrollY!==t.top||s.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-t.left,s.scrollY-t.top,0,0))),u=this.options.onclone,c=this.clonedReferenceElement,typeof c>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:A.fonts&&A.fonts.ready?[4,A.fonts.ready]:[3,2];case 1:h.sent(),h.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,u1t(A)]:[3,4];case 3:h.sent(),h.label=4;case 4:return typeof u=="function"?[2,Promise.resolve().then(function(){return u(A,c)}).then(function(){return i})]:[2,i]}})})});return A.open(),A.write(f1t(document.doctype)+"<html></html>"),p1t(this.referenceElement.ownerDocument,a,o),A.replaceChild(A.adoptNode(this.documentElement),A.documentElement),A.close(),l},r.prototype.createElementClone=function(e){if(lb(e,2))debugger;if(b7(e))return this.createCanvasClone(e);if(s5(e))return this.createVideoClone(e);if(A5(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return fb(t)&&(fb(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),l5(t)?this.createCustomElementClone(t):t},r.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return TB(e.style,t),t},r.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(a,o){return o&&typeof o.cssText=="string"?a+o.cssText:a},""),i=e.cloneNode(!1);return i.textContent=n,i}}catch(a){if(this.context.logger.error("Unable to access cssRules property",a),a.name!=="SecurityError")throw a}return e.cloneNode(!1)},r.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var a=e.getContext("2d"),o=i.getContext("2d");if(o)if(!this.options.allowTaint&&a)o.putImageData(a.getImageData(0,0,e.width,e.height),0,0);else{var s=(t=e.getContext("webgl2"))!==null&&t!==void 0?t:e.getContext("webgl");if(s){var A=s.getContextAttributes();(A==null?void 0:A.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return i}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},r.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},r.prototype.appendChildNode=function(e,t,n){(!tp(t)||!i1t(t)&&!t.hasAttribute(O7)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!tp(t)||!A5(t))&&e.appendChild(this.cloneNode(t,n))},r.prototype.cloneChildNodes=function(e,t,n){for(var i=this,a=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;a;a=a.nextSibling)if(tp(a)&&I7(a)&&typeof a.assignedNodes=="function"){var o=a.assignedNodes();o.length&&o.forEach(function(s){return i.appendChildNode(t,s,n)})}else this.appendChildNode(t,a,n)},r.prototype.cloneNode=function(e,t){if(x7(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&tp(e)&&(hb(e)||o_(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var a=n.getComputedStyle(e),o=n.getComputedStyle(e,":before"),s=n.getComputedStyle(e,":after");this.referenceElement===e&&hb(i)&&(this.clonedReferenceElement=i),TL(i)&&y1t(i);var A=this.counters.parse(new KP(this.context,a)),l=this.resolvePseudoContent(e,i,o,Zv.BEFORE);l5(e)&&(t=!0),s5(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var u=this.resolvePseudoContent(e,i,s,Zv.AFTER);return u&&i.appendChild(u),this.counters.pop(A),(a&&(this.options.copyStyles||o_(e))&&!F7(e)||t)&&TB(a,i),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(g1(e)||y1(e))&&(g1(i)||y1(i))&&(i.value=e.value),i}return e.cloneNode(!1)},r.prototype.resolvePseudoContent=function(e,t,n,i){var a=this;if(n){var o=n.content,s=t.ownerDocument;if(!(!s||!o||o==="none"||o==="-moz-alt-content"||n.display==="none")){this.counters.parse(new KP(this.context,n));var A=new t_t(this.context,n),l=s.createElement("html2canvaspseudoelement");TB(n,l),A.content.forEach(function(c){if(c.type===0)l.appendChild(s.createTextNode(c.value));else if(c.type===22){var h=s.createElement("img");h.src=c.value,h.style.opacity="1",l.appendChild(h)}else if(c.type===18){if(c.name==="attr"){var f=c.values.filter(sn);f.length&&l.appendChild(s.createTextNode(e.getAttribute(f[0].value)||""))}else if(c.name==="counter"){var p=c.values.filter(Dp),v=p[0],m=p[1];if(v&&sn(v)){var g=a.counters.getCounterValue(v.value),_=m&&sn(m)?Ab.parse(a.context,m.value):3;l.appendChild(s.createTextNode(Og(g,_,!1)))}}else if(c.name==="counters"){var E=c.values.filter(Dp),v=E[0],B=E[1],m=E[2];if(v&&sn(v)){var L=a.counters.getCounterValues(v.value),O=m&&sn(m)?Ab.parse(a.context,m.value):3,b=B&&B.type===0?B.value:"",T=L.map(function(S){return Og(S,O,!1)}).join(b);l.appendChild(s.createTextNode(T))}}}else if(c.type===20)switch(c.value){case"open-quote":l.appendChild(s.createTextNode(VP(A.quotes,a.quoteDepth++,!0)));break;case"close-quote":l.appendChild(s.createTextNode(VP(A.quotes,--a.quoteDepth,!1)));break;default:l.appendChild(s.createTextNode(c.value))}}),l.className=pb+" "+db;var u=i===Zv.BEFORE?" "+pb:" "+db;return o_(t)?t.className.baseValue+=u:t.className+=u,l}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r}(),Zv;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(Zv||(Zv={}));var A1t=function(r,e){var t=r.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(O7,"true"),r.body.appendChild(t),t},l1t=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},u1t=function(r){return Promise.all([].slice.call(r.images,0).map(l1t))},c1t=function(r){return new Promise(function(e,t){var n=r.contentWindow;if(!n)return t("No window assigned for iframe");var i=n.document;n.onload=r.onload=function(){n.onload=r.onload=null;var a=setInterval(function(){i.body.childNodes.length>0&&i.readyState==="complete"&&(clearInterval(a),e(r))},50)}})},h1t=["all","d","content"],TB=function(r,e){for(var t=r.length-1;t>=0;t--){var n=r.item(t);h1t.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},f1t=function(r){var e="";return r&&(e+="<!DOCTYPE ",r.name&&(e+=r.name),r.internalSubset&&(e+=r.internalSubset),r.publicId&&(e+='"'+r.publicId+'"'),r.systemId&&(e+='"'+r.systemId+'"'),e+=">"),e},p1t=function(r,e,t){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||t!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,t)},d1t=function(r){var e=r[0],t=r[1],n=r[2];e.scrollLeft=t,e.scrollTop=n},v1t=":before",g1t=":after",pb="___html2canvas___pseudoelement_before",db="___html2canvas___pseudoelement_after",v5=`{
content: "" !important;
display: none !important;
}`,y1t=function(r){m1t(r,"."+pb+v1t+v5+`
.`+db+g1t+v5)},m1t=function(r,e){var t=r.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,r.appendChild(n)}},R7=function(){function r(){}return r.getOrigin=function(e){var t=r._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},r.isSameOrigin=function(e){return r.getOrigin(e)===r._origin},r.setContext=function(e){r._link=e.document.createElement("a"),r._origin=r.getOrigin(e.location.href)},r._origin="about:blank",r}(),_1t=function(){function r(e,t){this.context=e,this._options=t,this._cache={}}return r.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(SB(e)||B1t(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},r.prototype.match=function(e){return this._cache[e]},r.prototype.loadImage=function(e){return Pa(this,void 0,void 0,function(){var t,n,i,a,o=this;return _a(this,function(s){switch(s.label){case 0:return t=R7.isSameOrigin(e),n=!xB(e)&&this._options.useCORS===!0&&aa.SUPPORT_CORS_IMAGES&&!t,i=!xB(e)&&!t&&!SB(e)&&typeof this._options.proxy=="string"&&aa.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!xB(e)&&!SB(e)&&!i&&!n?[2]:(a=e,i?[4,this.proxy(a)]:[3,2]);case 1:a=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(A,l){var u=new Image;u.onload=function(){return A(u)},u.onerror=l,(T1t(a)||n)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return A(u)},500),o._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,s.sent()]}})})},r.prototype.has=function(e){return typeof this._cache[e]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise(function(a,o){var s=aa.SUPPORT_RESPONSE_TYPE?"blob":"text",A=new XMLHttpRequest;A.onload=function(){if(A.status===200)if(s==="text")a(A.response);else{var c=new FileReader;c.addEventListener("load",function(){return a(c.result)},!1),c.addEventListener("error",function(h){return o(h)},!1),c.readAsDataURL(A.response)}else o("Failed to proxy resource "+i+" with status code "+A.status)},A.onerror=o;var l=n.indexOf("?")>-1?"&":"?";if(A.open("GET",""+n+l+"url="+encodeURIComponent(e)+"&responseType="+s),s!=="text"&&A instanceof XMLHttpRequest&&(A.responseType=s),t._options.imageTimeout){var u=t._options.imageTimeout;A.timeout=u,A.ontimeout=function(){return o("Timed out ("+u+"ms) proxying "+i)}}A.send()})},r}(),w1t=/^data:image\/svg\+xml/i,E1t=/^data:image\/.*;base64,/i,C1t=/^data:image\/.*/i,B1t=function(r){return aa.SUPPORT_SVG_DRAWING||!x1t(r)},xB=function(r){return C1t.test(r)},T1t=function(r){return E1t.test(r)},SB=function(r){return r.substr(0,4)==="blob"},x1t=function(r){return r.substr(-3).toLowerCase()==="svg"||w1t.test(r)},oe=function(){function r(e,t){this.type=0,this.x=e,this.y=t}return r.prototype.add=function(e,t){return new r(this.x+e,this.y+t)},r}(),xf=function(r,e,t){return new oe(r.x+(e.x-r.x)*t,r.y+(e.y-r.y)*t)},g0=function(){function r(e,t,n,i){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=i}return r.prototype.subdivide=function(e,t){var n=xf(this.start,this.startControl,e),i=xf(this.startControl,this.endControl,e),a=xf(this.endControl,this.end,e),o=xf(n,i,e),s=xf(i,a,e),A=xf(o,s,e);return t?new r(this.start,n,o,A):new r(A,s,a,this.end)},r.prototype.add=function(e,t){return new r(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),qo=function(r){return r.type===1},S1t=function(){function r(e){var t=e.styles,n=e.bounds,i=xv(t.borderTopLeftRadius,n.width,n.height),a=i[0],o=i[1],s=xv(t.borderTopRightRadius,n.width,n.height),A=s[0],l=s[1],u=xv(t.borderBottomRightRadius,n.width,n.height),c=u[0],h=u[1],f=xv(t.borderBottomLeftRadius,n.width,n.height),p=f[0],v=f[1],m=[];m.push((a+A)/n.width),m.push((p+c)/n.width),m.push((o+v)/n.height),m.push((l+h)/n.height);var g=Math.max.apply(Math,m);g>1&&(a/=g,o/=g,A/=g,l/=g,c/=g,h/=g,p/=g,v/=g);var _=n.width-A,E=n.height-h,B=n.width-c,L=n.height-v,O=t.borderTopWidth,b=t.borderRightWidth,T=t.borderBottomWidth,F=t.borderLeftWidth,M=_n(t.paddingTop,e.bounds.width),S=_n(t.paddingRight,e.bounds.width),x=_n(t.paddingBottom,e.bounds.width),N=_n(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?Ln(n.left+F/3,n.top+O/3,a-F/3,o-O/3,zr.TOP_LEFT):new oe(n.left+F/3,n.top+O/3),this.topRightBorderDoubleOuterBox=a>0||o>0?Ln(n.left+_,n.top+O/3,A-b/3,l-O/3,zr.TOP_RIGHT):new oe(n.left+n.width-b/3,n.top+O/3),this.bottomRightBorderDoubleOuterBox=c>0||h>0?Ln(n.left+B,n.top+E,c-b/3,h-T/3,zr.BOTTOM_RIGHT):new oe(n.left+n.width-b/3,n.top+n.height-T/3),this.bottomLeftBorderDoubleOuterBox=p>0||v>0?Ln(n.left+F/3,n.top+L,p-F/3,v-T/3,zr.BOTTOM_LEFT):new oe(n.left+F/3,n.top+n.height-T/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?Ln(n.left+F*2/3,n.top+O*2/3,a-F*2/3,o-O*2/3,zr.TOP_LEFT):new oe(n.left+F*2/3,n.top+O*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?Ln(n.left+_,n.top+O*2/3,A-b*2/3,l-O*2/3,zr.TOP_RIGHT):new oe(n.left+n.width-b*2/3,n.top+O*2/3),this.bottomRightBorderDoubleInnerBox=c>0||h>0?Ln(n.left+B,n.top+E,c-b*2/3,h-T*2/3,zr.BOTTOM_RIGHT):new oe(n.left+n.width-b*2/3,n.top+n.height-T*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||v>0?Ln(n.left+F*2/3,n.top+L,p-F*2/3,v-T*2/3,zr.BOTTOM_LEFT):new oe(n.left+F*2/3,n.top+n.height-T*2/3),this.topLeftBorderStroke=a>0||o>0?Ln(n.left+F/2,n.top+O/2,a-F/2,o-O/2,zr.TOP_LEFT):new oe(n.left+F/2,n.top+O/2),this.topRightBorderStroke=a>0||o>0?Ln(n.left+_,n.top+O/2,A-b/2,l-O/2,zr.TOP_RIGHT):new oe(n.left+n.width-b/2,n.top+O/2),this.bottomRightBorderStroke=c>0||h>0?Ln(n.left+B,n.top+E,c-b/2,h-T/2,zr.BOTTOM_RIGHT):new oe(n.left+n.width-b/2,n.top+n.height-T/2),this.bottomLeftBorderStroke=p>0||v>0?Ln(n.left+F/2,n.top+L,p-F/2,v-T/2,zr.BOTTOM_LEFT):new oe(n.left+F/2,n.top+n.height-T/2),this.topLeftBorderBox=a>0||o>0?Ln(n.left,n.top,a,o,zr.TOP_LEFT):new oe(n.left,n.top),this.topRightBorderBox=A>0||l>0?Ln(n.left+_,n.top,A,l,zr.TOP_RIGHT):new oe(n.left+n.width,n.top),this.bottomRightBorderBox=c>0||h>0?Ln(n.left+B,n.top+E,c,h,zr.BOTTOM_RIGHT):new oe(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||v>0?Ln(n.left,n.top+L,p,v,zr.BOTTOM_LEFT):new oe(n.left,n.top+n.height),this.topLeftPaddingBox=a>0||o>0?Ln(n.left+F,n.top+O,Math.max(0,a-F),Math.max(0,o-O),zr.TOP_LEFT):new oe(n.left+F,n.top+O),this.topRightPaddingBox=A>0||l>0?Ln(n.left+Math.min(_,n.width-b),n.top+O,_>n.width+b?0:Math.max(0,A-b),Math.max(0,l-O),zr.TOP_RIGHT):new oe(n.left+n.width-b,n.top+O),this.bottomRightPaddingBox=c>0||h>0?Ln(n.left+Math.min(B,n.width-F),n.top+Math.min(E,n.height-T),Math.max(0,c-b),Math.max(0,h-T),zr.BOTTOM_RIGHT):new oe(n.left+n.width-b,n.top+n.height-T),this.bottomLeftPaddingBox=p>0||v>0?Ln(n.left+F,n.top+Math.min(L,n.height-T),Math.max(0,p-F),Math.max(0,v-T),zr.BOTTOM_LEFT):new oe(n.left+F,n.top+n.height-T),this.topLeftContentBox=a>0||o>0?Ln(n.left+F+N,n.top+O+M,Math.max(0,a-(F+N)),Math.max(0,o-(O+M)),zr.TOP_LEFT):new oe(n.left+F+N,n.top+O+M),this.topRightContentBox=A>0||l>0?Ln(n.left+Math.min(_,n.width+F+N),n.top+O+M,_>n.width+F+N?0:A-F+N,l-(O+M),zr.TOP_RIGHT):new oe(n.left+n.width-(b+S),n.top+O+M),this.bottomRightContentBox=c>0||h>0?Ln(n.left+Math.min(B,n.width-(F+N)),n.top+Math.min(E,n.height+O+M),Math.max(0,c-(b+S)),h-(T+x),zr.BOTTOM_RIGHT):new oe(n.left+n.width-(b+S),n.top+n.height-(T+x)),this.bottomLeftContentBox=p>0||v>0?Ln(n.left+F+N,n.top+L,Math.max(0,p-(F+N)),v-(T+x),zr.BOTTOM_LEFT):new oe(n.left+F+N,n.top+n.height-(T+x))}return r}(),zr;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(zr||(zr={}));var Ln=function(r,e,t,n,i){var a=4*((Math.sqrt(2)-1)/3),o=t*a,s=n*a,A=r+t,l=e+n;switch(i){case zr.TOP_LEFT:return new g0(new oe(r,l),new oe(r,l-s),new oe(A-o,e),new oe(A,e));case zr.TOP_RIGHT:return new g0(new oe(r,e),new oe(r+o,e),new oe(A,l-s),new oe(A,l));case zr.BOTTOM_RIGHT:return new g0(new oe(A,e),new oe(A,e+s),new oe(r+o,l),new oe(r,l));case zr.BOTTOM_LEFT:default:return new g0(new oe(A,l),new oe(A-o,l),new oe(r,e+s),new oe(r,e))}},m1=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},b1t=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},_1=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},F1t=function(){function r(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return r}(),y0=function(){function r(e,t){this.path=e,this.target=t,this.type=1}return r}(),I1t=function(){function r(e){this.opacity=e,this.type=2,this.target=6}return r}(),L1t=function(r){return r.type===0},M7=function(r){return r.type===1},O1t=function(r){return r.type===2},g5=function(r,e){return r.length===e.length?r.some(function(t,n){return t===e[n]}):!1},R1t=function(r,e,t,n,i){return r.map(function(a,o){switch(o){case 0:return a.add(e,t);case 1:return a.add(e+n,t);case 2:return a.add(e+n,t+i);case 3:return a.add(e,t+i)}return a})},N7=function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),P7=function(){function r(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new S1t(this.container),this.container.styles.opacity<1&&this.effects.push(new I1t(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new F1t(n,i,a))}if(this.container.styles.overflowX!==0){var o=m1(this.curves),s=_1(this.curves);g5(o,s)?this.effects.push(new y0(o,6)):(this.effects.push(new y0(o,2)),this.effects.push(new y0(s,4)))}}return r.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,i=this.effects.slice(0);n;){var a=n.effects.filter(function(A){return!M7(A)});if(t||n.container.styles.position!==0||!n.parent){if(i.unshift.apply(i,a),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var o=m1(n.curves),s=_1(n.curves);g5(o,s)||i.unshift(new y0(s,6))}}else i.unshift.apply(i,a);n=n.parent}return i.filter(function(A){return Ni(A.target,e)})},r}(),vb=function(r,e,t,n){r.container.elements.forEach(function(i){var a=Ni(i.flags,4),o=Ni(i.flags,2),s=new P7(i,r);Ni(i.styles.display,2048)&&n.push(s);var A=Ni(i.flags,8)?[]:n;if(a||o){var l=a||i.styles.isPositioned()?t:e,u=new N7(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var c=i.styles.zIndex.order;if(c<0){var h=0;l.negativeZIndex.some(function(p,v){return c>p.element.container.styles.zIndex.order?(h=v,!1):h>0}),l.negativeZIndex.splice(h,0,u)}else if(c>0){var f=0;l.positiveZIndex.some(function(p,v){return c>=p.element.container.styles.zIndex.order?(f=v+1,!1):f>0}),l.positiveZIndex.splice(f,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);vb(s,u,a?u:t,A)}else i.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),vb(s,e,t,A);Ni(i.flags,8)&&U7(i,A)})},U7=function(r,e){for(var t=r instanceof cb?r.start:1,n=r instanceof cb?r.reversed:!1,i=0;i<e.length;i++){var a=e[i];a.container instanceof _7&&typeof a.container.value=="number"&&a.container.value!==0&&(t=a.container.value),a.listValue=Og(t,a.container.styles.listStyleType,!0),t+=n?-1:1}},M1t=function(r){var e=new P7(r,null),t=new N7(e),n=[];return vb(e,t,t,n),U7(e.container,n),t},y5=function(r,e){switch(e){case 0:return ts(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return ts(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return ts(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return ts(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},N1t=function(r,e){switch(e){case 0:return ts(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return ts(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return ts(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return ts(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},P1t=function(r,e){switch(e){case 0:return ts(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return ts(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return ts(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return ts(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},U1t=function(r,e){switch(e){case 0:return m0(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return m0(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return m0(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return m0(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},m0=function(r,e){var t=[];return qo(r)?t.push(r.subdivide(.5,!1)):t.push(r),qo(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},ts=function(r,e,t,n){var i=[];return qo(r)?i.push(r.subdivide(.5,!1)):i.push(r),qo(t)?i.push(t.subdivide(.5,!0)):i.push(t),qo(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),qo(e)?i.push(e.subdivide(.5,!1).reverse()):i.push(e),i},D7=function(r){var e=r.bounds,t=r.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},w1=function(r){var e=r.styles,t=r.bounds,n=_n(e.paddingLeft,t.width),i=_n(e.paddingRight,t.width),a=_n(e.paddingTop,t.width),o=_n(e.paddingBottom,t.width);return t.add(n+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+i),-(e.borderTopWidth+e.borderBottomWidth+a+o))},D1t=function(r,e){return r===0?e.bounds:r===2?w1(e):D7(e)},Q1t=function(r,e){return r===0?e.bounds:r===2?w1(e):D7(e)},bB=function(r,e,t){var n=D1t($f(r.styles.backgroundOrigin,e),r),i=Q1t($f(r.styles.backgroundClip,e),r),a=H1t($f(r.styles.backgroundSize,e),t,n),o=a[0],s=a[1],A=xv($f(r.styles.backgroundPosition,e),n.width-o,n.height-s),l=G1t($f(r.styles.backgroundRepeat,e),A,a,n,i),u=Math.round(n.left+A[0]),c=Math.round(n.top+A[1]);return[l,u,c,o,s]},Sf=function(r){return sn(r)&&r.value===yp.AUTO},_0=function(r){return typeof r=="number"},H1t=function(r,e,t){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1];if(!o)return[0,0];if(_i(o)&&s&&_i(s))return[_n(o,t.width),_n(s,t.height)];var A=_0(a);if(sn(o)&&(o.value===yp.CONTAIN||o.value===yp.COVER)){if(_0(a)){var l=t.width/t.height;return l<a!=(o.value===yp.COVER)?[t.width,t.width/a]:[t.height*a,t.height]}return[t.width,t.height]}var u=_0(n),c=_0(i),h=u||c;if(Sf(o)&&(!s||Sf(s))){if(u&&c)return[n,i];if(!A&&!h)return[t.width,t.height];if(h&&A){var f=u?n:i*a,p=c?i:n/a;return[f,p]}var v=u?n:t.width,m=c?i:t.height;return[v,m]}if(A){var g=0,_=0;return _i(o)?g=_n(o,t.width):_i(s)&&(_=_n(s,t.height)),Sf(o)?g=_*a:(!s||Sf(s))&&(_=g/a),[g,_]}var E=null,B=null;if(_i(o)?E=_n(o,t.width):s&&_i(s)&&(B=_n(s,t.height)),E!==null&&(!s||Sf(s))&&(B=u&&c?E/n*i:t.height),B!==null&&Sf(o)&&(E=u&&c?B/i*n:t.width),E!==null&&B!==null)return[E,B];throw new Error("Unable to calculate background-size for element")},$f=function(r,e){var t=r[e];return typeof t>"u"?r[0]:t},G1t=function(r,e,t,n,i){var a=e[0],o=e[1],s=t[0],A=t[1];switch(r){case 2:return[new oe(Math.round(n.left),Math.round(n.top+o)),new oe(Math.round(n.left+n.width),Math.round(n.top+o)),new oe(Math.round(n.left+n.width),Math.round(A+n.top+o)),new oe(Math.round(n.left),Math.round(A+n.top+o))];case 3:return[new oe(Math.round(n.left+a),Math.round(n.top)),new oe(Math.round(n.left+a+s),Math.round(n.top)),new oe(Math.round(n.left+a+s),Math.round(n.height+n.top)),new oe(Math.round(n.left+a),Math.round(n.height+n.top))];case 1:return[new oe(Math.round(n.left+a),Math.round(n.top+o)),new oe(Math.round(n.left+a+s),Math.round(n.top+o)),new oe(Math.round(n.left+a+s),Math.round(n.top+o+A)),new oe(Math.round(n.left+a),Math.round(n.top+o+A))];default:return[new oe(Math.round(i.left),Math.round(i.top)),new oe(Math.round(i.left+i.width),Math.round(i.top)),new oe(Math.round(i.left+i.width),Math.round(i.height+i.top)),new oe(Math.round(i.left),Math.round(i.height+i.top))]}},k1t="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",m5="Hidden Text",$1t=function(){function r(e){this._data={},this._document=e}return r.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),i=this._document.createElement("img"),a=this._document.createElement("span"),o=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",o.appendChild(n),i.src=k1t,i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=t,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(m5)),n.appendChild(a),n.appendChild(i);var s=i.offsetTop-a.offsetTop+2;n.removeChild(a),n.appendChild(this._document.createTextNode(m5)),n.style.lineHeight="normal",i.style.verticalAlign="super";var A=i.offsetTop-n.offsetTop+2;return o.removeChild(n),{baseline:s,middle:A}},r.prototype.getMetrics=function(e,t){var n=e+" "+t;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},r}(),Q7=function(){function r(e,t){this.context=e,this.options=t}return r}(),j1t=1e4,V1t=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i._activeEffects=[],i.canvas=n.canvas?n.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),n.canvas||(i.canvas.width=Math.floor(n.width*n.scale),i.canvas.height=Math.floor(n.height*n.scale),i.canvas.style.width=n.width+"px",i.canvas.style.height=n.height+"px"),i.fontMetrics=new $1t(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-n.x,-n.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),i}return e.prototype.applyEffects=function(t){for(var n=this;this._activeEffects.length;)this.popEffect();t.forEach(function(i){return n.applyEffect(i)})},e.prototype.applyEffect=function(t){this.ctx.save(),O1t(t)&&(this.ctx.globalAlpha=t.opacity),L1t(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),M7(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return Pa(this,void 0,void 0,function(){var n;return _a(this,function(i){switch(i.label){case 0:return n=t.element.container.styles,n.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return Pa(this,void 0,void 0,function(){return _a(this,function(n){switch(n.label){case 0:if(Ni(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(t)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,n,i){var a=this;if(n===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+i);else{var o=CL(t.text);o.reduce(function(s,A){return a.ctx.fillText(A,s,t.bounds.top+i),s+a.ctx.measureText(A).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var n=t.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),i=W1t(t.fontFamily).join(", "),a=yy(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,n,t.fontWeight,a,i].join(" "),i,a]},e.prototype.renderTextNode=function(t,n){return Pa(this,void 0,void 0,function(){var i,a,o,s,A,l,u,c,h=this;return _a(this,function(f){return i=this.createFontStyle(n),a=i[0],o=i[1],s=i[2],this.ctx.font=a,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",A=this.fontMetrics.getMetrics(o,s),l=A.baseline,u=A.middle,c=n.paintOrder,t.textBounds.forEach(function(p){c.forEach(function(v){switch(v){case 0:h.ctx.fillStyle=zi(n.color),h.renderTextWithLetterSpacing(p,n.letterSpacing,l);var m=n.textShadow;m.length&&p.text.trim().length&&(m.slice(0).reverse().forEach(function(g){h.ctx.shadowColor=zi(g.color),h.ctx.shadowOffsetX=g.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=g.offsetY.number*h.options.scale,h.ctx.shadowBlur=g.blur.number,h.renderTextWithLetterSpacing(p,n.letterSpacing,l)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),n.textDecorationLine.length&&(h.ctx.fillStyle=zi(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(g){switch(g){case 1:h.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+l),p.bounds.width,1);break;case 2:h.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:h.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+u),p.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&p.text.trim().length&&(h.ctx.strokeStyle=zi(n.webkitTextStrokeColor),h.ctx.lineWidth=n.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+l)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,n,i){if(i&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var a=w1(t),o=_1(n);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,t.intrinsicWidth,t.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return Pa(this,void 0,void 0,function(){var n,i,a,o,s,A,_,_,l,u,c,h,B,f,p,L,v,m,g,_,E,B,L;return _a(this,function(O){switch(O.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,i=t.curves,a=n.styles,o=0,s=n.textNodes,O.label=1;case 1:return o<s.length?(A=s[o],[4,this.renderTextNode(A,a)]):[3,4];case 2:O.sent(),O.label=3;case 3:return o++,[3,1];case 4:if(!(n instanceof g7))return[3,8];O.label=5;case 5:return O.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return _=O.sent(),this.renderReplacedElement(n,i,_),[3,8];case 7:return O.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof y7&&this.renderReplacedElement(n,i,n.canvas),!(n instanceof m7))return[3,12];O.label=9;case 9:return O.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return _=O.sent(),this.renderReplacedElement(n,i,_),[3,12];case 11:return O.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof C7&&n.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,l.render(n.tree)]):[3,14];case 13:u=O.sent(),n.width&&n.height&&this.ctx.drawImage(u,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),O.label=14;case 14:if(n instanceof BL&&(c=Math.min(n.bounds.width,n.bounds.height),n.type===d1?n.checked&&(this.ctx.save(),this.path([new oe(n.bounds.left+c*.39363,n.bounds.top+c*.79),new oe(n.bounds.left+c*.16,n.bounds.top+c*.5549),new oe(n.bounds.left+c*.27347,n.bounds.top+c*.44071),new oe(n.bounds.left+c*.39694,n.bounds.top+c*.5649),new oe(n.bounds.left+c*.72983,n.bounds.top+c*.23),new oe(n.bounds.left+c*.84,n.bounds.top+c*.34085),new oe(n.bounds.left+c*.39363,n.bounds.top+c*.79)]),this.ctx.fillStyle=zi(o5),this.ctx.fill(),this.ctx.restore()):n.type===v1&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+c/2,n.bounds.top+c/2,c/4,0,Math.PI*2,!0),this.ctx.fillStyle=zi(o5),this.ctx.fill(),this.ctx.restore())),K1t(n)&&n.value.length){switch(h=this.createFontStyle(a),B=h[0],f=h[1],p=this.fontMetrics.getMetrics(B,f).baseline,this.ctx.font=B,this.ctx.fillStyle=zi(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=X1t(n.styles.textAlign),L=w1(n),v=0,n.styles.textAlign){case 1:v+=L.width/2;break;case 2:v+=L.width;break}m=L.add(v,0,0,-L.height/2+1),this.ctx.save(),this.path([new oe(L.left,L.top),new oe(L.left+L.width,L.top),new oe(L.left+L.width,L.top+L.height),new oe(L.left,L.top+L.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new qv(n.value,m),a.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ni(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(g=n.styles.listStyleImage,g.type!==0)return[3,18];_=void 0,E=g.url,O.label=15;case 15:return O.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return _=O.sent(),this.ctx.drawImage(_,n.bounds.left-(_.width+10),n.bounds.top),[3,18];case 17:return O.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==-1&&(B=this.createFontStyle(a)[0],this.ctx.font=B,this.ctx.fillStyle=zi(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",L=new vl(n.bounds.left,n.bounds.top+_n(n.styles.paddingTop,n.bounds.width),n.bounds.width,$P(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new qv(t.listValue,L),a.letterSpacing,$P(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),O.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return Pa(this,void 0,void 0,function(){var n,i,g,a,o,g,s,A,g,l,u,g,c,h,g,f,p,g,v,m,g;return _a(this,function(_){switch(_.label){case 0:if(Ni(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:_.sent(),n=0,i=t.negativeZIndex,_.label=2;case 2:return n<i.length?(g=i[n],[4,this.renderStack(g)]):[3,5];case 3:_.sent(),_.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:_.sent(),a=0,o=t.nonInlineLevel,_.label=7;case 7:return a<o.length?(g=o[a],[4,this.renderNode(g)]):[3,10];case 8:_.sent(),_.label=9;case 9:return a++,[3,7];case 10:s=0,A=t.nonPositionedFloats,_.label=11;case 11:return s<A.length?(g=A[s],[4,this.renderStack(g)]):[3,14];case 12:_.sent(),_.label=13;case 13:return s++,[3,11];case 14:l=0,u=t.nonPositionedInlineLevel,_.label=15;case 15:return l<u.length?(g=u[l],[4,this.renderStack(g)]):[3,18];case 16:_.sent(),_.label=17;case 17:return l++,[3,15];case 18:c=0,h=t.inlineLevel,_.label=19;case 19:return c<h.length?(g=h[c],[4,this.renderNode(g)]):[3,22];case 20:_.sent(),_.label=21;case 21:return c++,[3,19];case 22:f=0,p=t.zeroOrAutoZIndexOrTransformedOrOpacity,_.label=23;case 23:return f<p.length?(g=p[f],[4,this.renderStack(g)]):[3,26];case 24:_.sent(),_.label=25;case 25:return f++,[3,23];case 26:v=0,m=t.positiveZIndex,_.label=27;case 27:return v<m.length?(g=m[v],[4,this.renderStack(g)]):[3,30];case 28:_.sent(),_.label=29;case 29:return v++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var n=this;t.forEach(function(i,a){var o=qo(i)?i.start:i;a===0?n.ctx.moveTo(o.x,o.y):n.ctx.lineTo(o.x,o.y),qo(i)&&n.ctx.bezierCurveTo(i.startControl.x,i.startControl.y,i.endControl.x,i.endControl.y,i.end.x,i.end.y)})},e.prototype.renderRepeat=function(t,n,i,a){this.path(t),this.ctx.fillStyle=n,this.ctx.translate(i,a),this.ctx.fill(),this.ctx.translate(-i,-a)},e.prototype.resizeImage=function(t,n,i){var a;if(t.width===n&&t.height===i)return t;var o=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,s=o.createElement("canvas");s.width=Math.max(1,n),s.height=Math.max(1,i);var A=s.getContext("2d");return A.drawImage(t,0,0,t.width,t.height,0,0,n,i),s},e.prototype.renderBackgroundImage=function(t){return Pa(this,void 0,void 0,function(){var n,i,a,o,s,A;return _a(this,function(l){switch(l.label){case 0:n=t.styles.backgroundImage.length-1,i=function(u){var c,h,f,M,z,tt,N,P,T,p,M,z,tt,N,P,v,m,g,_,E,B,L,O,b,T,F,M,S,x,N,P,Y,z,tt,J,nt,it,_t,R,$,K,q;return _a(this,function(at){switch(at.label){case 0:if(u.type!==0)return[3,5];c=void 0,h=u.url,at.label=1;case 1:return at.trys.push([1,3,,4]),[4,a.context.cache.match(h)];case 2:return c=at.sent(),[3,4];case 3:return at.sent(),a.context.logger.error("Error loading background-image "+h),[3,4];case 4:return c&&(f=bB(t,n,[c.width,c.height,c.width/c.height]),M=f[0],z=f[1],tt=f[2],N=f[3],P=f[4],T=a.ctx.createPattern(a.resizeImage(c,N,P),"repeat"),a.renderRepeat(M,T,z,tt)),[3,6];case 5:Lmt(u)?(p=bB(t,n,[null,null,null]),M=p[0],z=p[1],tt=p[2],N=p[3],P=p[4],v=xmt(u.angle,N,P),m=v[0],g=v[1],_=v[2],E=v[3],B=v[4],L=document.createElement("canvas"),L.width=N,L.height=P,O=L.getContext("2d"),b=O.createLinearGradient(g,E,_,B),GP(u.stops,m).forEach(function(vt){return b.addColorStop(vt.stop,zi(vt.color))}),O.fillStyle=b,O.fillRect(0,0,N,P),N>0&&P>0&&(T=a.ctx.createPattern(L,"repeat"),a.renderRepeat(M,T,z,tt))):Omt(u)&&(F=bB(t,n,[null,null,null]),M=F[0],S=F[1],x=F[2],N=F[3],P=F[4],Y=u.position.length===0?[_L]:u.position,z=_n(Y[0],N),tt=_n(Y[Y.length-1],P),J=Smt(u,z,tt,N,P),nt=J[0],it=J[1],nt>0&&it>0&&(_t=a.ctx.createRadialGradient(S+z,x+tt,0,S+z,x+tt,nt),GP(u.stops,nt*2).forEach(function(vt){return _t.addColorStop(vt.stop,zi(vt.color))}),a.path(M),a.ctx.fillStyle=_t,nt!==it?(R=t.bounds.left+.5*t.bounds.width,$=t.bounds.top+.5*t.bounds.height,K=it/nt,q=1/K,a.ctx.save(),a.ctx.translate(R,$),a.ctx.transform(1,0,0,K,0,0),a.ctx.translate(-R,-$),a.ctx.fillRect(S,q*(x-$)+$,N,P*q),a.ctx.restore()):a.ctx.fill())),at.label=6;case 6:return n--,[2]}})},a=this,o=0,s=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return o<s.length?(A=s[o],[5,i(A)]):[3,4];case 2:l.sent(),l.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,n,i){return Pa(this,void 0,void 0,function(){return _a(this,function(a){return this.path(y5(i,n)),this.ctx.fillStyle=zi(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,i,a){return Pa(this,void 0,void 0,function(){var o,s;return _a(this,function(A){switch(A.label){case 0:return n<3?[4,this.renderSolidBorder(t,i,a)]:[3,2];case 1:return A.sent(),[2];case 2:return o=N1t(a,i),this.path(o),this.ctx.fillStyle=zi(t),this.ctx.fill(),s=P1t(a,i),this.path(s),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return Pa(this,void 0,void 0,function(){var n,i,a,o,s,A,l,u,c=this;return _a(this,function(h){switch(h.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,i=!Ou(n.backgroundColor)||n.backgroundImage.length,a=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],o=z1t($f(n.backgroundClip,0),t.curves),i||n.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),Ou(n.backgroundColor)||(this.ctx.fillStyle=zi(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:h.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(f){c.ctx.save();var p=m1(t.curves),v=f.inset?0:j1t,m=R1t(p,-v+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(c.path(p),c.ctx.clip(),c.mask(m)):(c.mask(p),c.ctx.clip(),c.path(m)),c.ctx.shadowOffsetX=f.offsetX.number+v,c.ctx.shadowOffsetY=f.offsetY.number,c.ctx.shadowColor=zi(f.color),c.ctx.shadowBlur=f.blur.number,c.ctx.fillStyle=f.inset?zi(f.color):"rgba(0,0,0,1)",c.ctx.fill(),c.ctx.restore()}),h.label=2;case 2:s=0,A=0,l=a,h.label=3;case 3:return A<l.length?(u=l[A],u.style!==0&&!Ou(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,s,t.curves,2)]:[3,11]):[3,13];case 4:return h.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,s,t.curves,3)];case 6:return h.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,s,t.curves)];case 8:return h.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,s,t.curves)];case 10:h.sent(),h.label=11;case 11:s++,h.label=12;case 12:return A++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,n,i,a,o){return Pa(this,void 0,void 0,function(){var s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,O,L,O;return _a(this,function(b){return this.ctx.save(),s=U1t(a,i),A=y5(a,i),o===2&&(this.path(A),this.ctx.clip()),qo(A[0])?(l=A[0].start.x,u=A[0].start.y):(l=A[0].x,u=A[0].y),qo(A[1])?(c=A[1].end.x,h=A[1].end.y):(c=A[1].x,h=A[1].y),i===0||i===2?f=Math.abs(l-c):f=Math.abs(u-h),this.ctx.beginPath(),o===3?this.formatPath(s):this.formatPath(A.slice(0,2)),p=n<3?n*3:n*2,v=n<3?n*2:n,o===3&&(p=n,v=n),m=!0,f<=p*2?m=!1:f<=p*2+v?(g=f/(2*p+v),p*=g,v*=g):(_=Math.floor((f+v)/(p+v)),E=(f-_*p)/(_-1),B=(f-(_+1)*p)/_,v=B<=0||Math.abs(v-E)<Math.abs(v-B)?E:B),m&&(o===3?this.ctx.setLineDash([0,p+v]):this.ctx.setLineDash([p,v])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=zi(t),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(qo(A[0])&&(L=A[3],O=A[0],this.ctx.beginPath(),this.formatPath([new oe(L.end.x,L.end.y),new oe(O.start.x,O.start.y)]),this.ctx.stroke()),qo(A[1])&&(L=A[1],O=A[2],this.ctx.beginPath(),this.formatPath([new oe(L.end.x,L.end.y),new oe(O.start.x,O.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return Pa(this,void 0,void 0,function(){var n;return _a(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=zi(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=M1t(t),[4,this.renderStack(n)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Q7),K1t=function(r){return r instanceof E7||r instanceof w7?!0:r instanceof BL&&r.type!==v1&&r.type!==d1},z1t=function(r,e){switch(r){case 0:return m1(e);case 2:return b1t(e);case 1:default:return _1(e)}},X1t=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Y1t=["-apple-system","system-ui"],W1t=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(e){return Y1t.indexOf(e)===-1}):r},q1t=function(r){Qs(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.canvas=n.canvas?n.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.options=n,i.canvas.width=Math.floor(n.width*n.scale),i.canvas.height=Math.floor(n.height*n.scale),i.canvas.style.width=n.width+"px",i.canvas.style.height=n.height+"px",i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-n.x,-n.y),i.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),i}return e.prototype.render=function(t){return Pa(this,void 0,void 0,function(){var n,i;return _a(this,function(a){switch(a.label){case 0:return n=ub(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Z1t(n)];case 1:return i=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=zi(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Q7),Z1t=function(r){return new Promise(function(e,t){var n=new Image;n.onload=function(){e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},J1t=function(){function r(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return r.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Zm([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.prototype.getTime=function(){return Date.now()-this.start},r.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Zm([this.id,this.getTime()+"ms"],e))},r.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Zm([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Zm([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.instances={},r}(),twt=function(){function r(e,t){var n;this.windowBounds=t,this.instanceName="#"+r.instanceCount++,this.logger=new J1t({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new _1t(this,e)}return r.instanceCount=1,r}(),ewt=function(r,e){return e===void 0&&(e={}),rwt(r,e)};typeof window<"u"&&R7.setContext(window);var rwt=function(r,e){return Pa(void 0,void 0,void 0,function(){var t,n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,b,O,b,T,F,M,S,x,N,P,Y,z,tt,J,nt,it,_t,R,$,K;return _a(this,function(q){switch(q.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=r.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(n=t.defaultView,!n)throw new Error("Document is not attached to a Window");return i={allowTaint:(T=e.allowTaint)!==null&&T!==void 0?T:!1,imageTimeout:(F=e.imageTimeout)!==null&&F!==void 0?F:15e3,proxy:e.proxy,useCORS:(M=e.useCORS)!==null&&M!==void 0?M:!1},a=YS({logging:(S=e.logging)!==null&&S!==void 0?S:!0,cache:e.cache},i),o={windowWidth:(x=e.windowWidth)!==null&&x!==void 0?x:n.innerWidth,windowHeight:(N=e.windowHeight)!==null&&N!==void 0?N:n.innerHeight,scrollX:(P=e.scrollX)!==null&&P!==void 0?P:n.pageXOffset,scrollY:(Y=e.scrollY)!==null&&Y!==void 0?Y:n.pageYOffset},s=new vl(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),A=new twt(a,s),l=(z=e.foreignObjectRendering)!==null&&z!==void 0?z:!1,u={allowTaint:(tt=e.allowTaint)!==null&&tt!==void 0?tt:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},A.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),c=new d5(A,r,u),h=c.clonedReferenceElement,h?[4,c.toIFrame(t,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=q.sent(),p=TL(h)||n1t(h)?Rgt(h.ownerDocument):Gw(A,h),v=p.width,m=p.height,g=p.left,_=p.top,E=nwt(A,h,e.backgroundColor),B={canvas:e.canvas,backgroundColor:E,scale:(nt=(J=e.scale)!==null&&J!==void 0?J:n.devicePixelRatio)!==null&&nt!==void 0?nt:1,x:((it=e.x)!==null&&it!==void 0?it:0)+g,y:((_t=e.y)!==null&&_t!==void 0?_t:0)+_,width:(R=e.width)!==null&&R!==void 0?R:Math.ceil(v),height:($=e.height)!==null&&$!==void 0?$:Math.ceil(m)},l?(A.logger.debug("Document cloned, using foreign object rendering"),b=new q1t(A,B),[4,b.render(h)]):[3,3];case 2:return L=q.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+g+","+_+" with size "+v+"x"+m+" using computed rendering"),A.logger.debug("Starting DOM parsing"),O=T7(A,h),E===O.styles.backgroundColor&&(O.styles.backgroundColor=ll.TRANSPARENT),A.logger.debug("Starting renderer for element at "+B.x+","+B.y+" with size "+B.width+"x"+B.height),b=new V1t(A,B),[4,b.render(O)];case 4:L=q.sent(),q.label=5;case 5:return(!((K=e.removeContainer)!==null&&K!==void 0)||K)&&(d5.destroy(f)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,L]}})})},nwt=function(r,e,t){var n=e.ownerDocument,i=n.documentElement?Yv(r,getComputedStyle(n.documentElement).backgroundColor):ll.TRANSPARENT,a=n.body?Yv(r,getComputedStyle(n.body).backgroundColor):ll.TRANSPARENT,o=typeof t=="string"?Yv(r,t):t===null?ll.TRANSPARENT:4294967295;return e===n.documentElement?Ou(i)?Ou(a)?o:a:i:o},iwt=Object.freeze(Object.defineProperty({__proto__:null,default:ewt},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.3.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.5/LICENSE */function awt(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var owt=Object.hasOwnProperty,_5=Object.setPrototypeOf,swt=Object.isFrozen,Awt=Object.getPrototypeOf,lwt=Object.getOwnPropertyDescriptor,Ya=Object.freeze,gl=Object.seal,uwt=Object.create,H7=typeof Reflect<"u"&&Reflect,E1=H7.apply,gb=H7.construct;E1||(E1=function(e,t,n){return e.apply(t,n)});Ya||(Ya=function(e){return e});gl||(gl=function(e){return e});gb||(gb=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(awt(t))))});var cwt=Rs(Array.prototype.forEach),w5=Rs(Array.prototype.pop),nv=Rs(Array.prototype.push),s_=Rs(String.prototype.toLowerCase),E5=Rs(String.prototype.match),au=Rs(String.prototype.replace),hwt=Rs(String.prototype.indexOf),fwt=Rs(String.prototype.trim),xo=Rs(RegExp.prototype.test),FB=pwt(TypeError);function Rs(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return E1(r,e,n)}}function pwt(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return gb(r,t)}}function hr(r,e){_5&&_5(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=s_(n);i!==n&&(swt(e)||(e[t]=i),n=i)}r[n]=!0}return r}function Bc(r){var e=uwt(null),t=void 0;for(t in r)E1(owt,r,[t])&&(e[t]=r[t]);return e}function w0(r,e){for(;r!==null;){var t=lwt(r,e);if(t){if(t.get)return Rs(t.get);if(typeof t.value=="function")return Rs(t.value)}r=Awt(r)}function n(i){return console.warn("fallback value for",i),null}return n}var C5=Ya(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),IB=Ya(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),LB=Ya(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),dwt=Ya(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),OB=Ya(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),vwt=Ya(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B5=Ya(["#text"]),T5=Ya(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),RB=Ya(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),x5=Ya(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),E0=Ya(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gwt=gl(/\{\{[\s\S]*|[\s\S]*\}\}/gm),ywt=gl(/<%[\s\S]*|[\s\S]*%>/gm),mwt=gl(/^data-[\-\w.\u00B7-\uFFFF]/),_wt=gl(/^aria-[\-\w]+$/),wwt=gl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ewt=gl(/^(?:\w+script|data):/i),Cwt=gl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function Vs(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var Bwt=function(){return typeof window>"u"?null:window},Twt=function(e,t){if((typeof e>"u"?"undefined":Fv(e))!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function G7(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Bwt(),e=function(ht){return G7(ht)};if(e.version="2.3.5",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,i=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,s=r.Element,A=r.NodeFilter,l=r.NamedNodeMap,u=l===void 0?r.NamedNodeMap||r.MozNamedAttrMap:l,c=r.HTMLFormElement,h=r.DOMParser,f=r.trustedTypes,p=s.prototype,v=w0(p,"cloneNode"),m=w0(p,"nextSibling"),g=w0(p,"childNodes"),_=w0(p,"parentNode");if(typeof a=="function"){var E=n.createElement("template");E.content&&E.content.ownerDocument&&(n=E.content.ownerDocument)}var B=Twt(f,t),L=B?B.createHTML(""):"",O=n,b=O.implementation,T=O.createNodeIterator,F=O.createDocumentFragment,M=O.getElementsByTagName,S=t.importNode,x={};try{x=Bc(n).documentMode?n.documentMode:{}}catch{}var N={};e.isSupported=typeof _=="function"&&b&&typeof b.createHTMLDocument<"u"&&x!==9;var P=gwt,Y=ywt,z=mwt,tt=_wt,J=Ewt,nt=Cwt,it=wwt,_t=null,R=hr({},[].concat(Vs(C5),Vs(IB),Vs(LB),Vs(OB),Vs(B5))),$=null,K=hr({},[].concat(Vs(T5),Vs(RB),Vs(x5),Vs(E0))),q=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),at=null,vt=null,wt=!0,W=!0,Ft=!1,Ot=!1,V=!1,Z=!1,ut=!1,rt=!1,G=!1,St=!1,bt=!0,dt=!0,Et=!1,yt={},xt=null,It=hr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Mt=null,Vt=hr({},["audio","video","img","source","image","track"]),Yt=null,ae=hr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",se="http://www.w3.org/1999/xhtml",zt=se,We=!1,Me=void 0,dr=["application/xhtml+xml","text/html"],Ie="text/html",be=void 0,An=null,Ar=n.createElement("form"),xi=function(ht){return ht instanceof RegExp||ht instanceof Function},Tr=function(ht){An&&An===ht||((!ht||(typeof ht>"u"?"undefined":Fv(ht))!=="object")&&(ht={}),ht=Bc(ht),_t="ALLOWED_TAGS"in ht?hr({},ht.ALLOWED_TAGS):R,$="ALLOWED_ATTR"in ht?hr({},ht.ALLOWED_ATTR):K,Yt="ADD_URI_SAFE_ATTR"in ht?hr(Bc(ae),ht.ADD_URI_SAFE_ATTR):ae,Mt="ADD_DATA_URI_TAGS"in ht?hr(Bc(Vt),ht.ADD_DATA_URI_TAGS):Vt,xt="FORBID_CONTENTS"in ht?hr({},ht.FORBID_CONTENTS):It,at="FORBID_TAGS"in ht?hr({},ht.FORBID_TAGS):{},vt="FORBID_ATTR"in ht?hr({},ht.FORBID_ATTR):{},yt="USE_PROFILES"in ht?ht.USE_PROFILES:!1,wt=ht.ALLOW_ARIA_ATTR!==!1,W=ht.ALLOW_DATA_ATTR!==!1,Ft=ht.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=ht.SAFE_FOR_TEMPLATES||!1,V=ht.WHOLE_DOCUMENT||!1,rt=ht.RETURN_DOM||!1,G=ht.RETURN_DOM_FRAGMENT||!1,St=ht.RETURN_TRUSTED_TYPE||!1,ut=ht.FORCE_BODY||!1,bt=ht.SANITIZE_DOM!==!1,dt=ht.KEEP_CONTENT!==!1,Et=ht.IN_PLACE||!1,it=ht.ALLOWED_URI_REGEXP||it,zt=ht.NAMESPACE||se,ht.CUSTOM_ELEMENT_HANDLING&&xi(ht.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=ht.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ht.CUSTOM_ELEMENT_HANDLING&&xi(ht.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=ht.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ht.CUSTOM_ELEMENT_HANDLING&&typeof ht.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(q.allowCustomizedBuiltInElements=ht.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me=dr.indexOf(ht.PARSER_MEDIA_TYPE)===-1?Me=Ie:Me=ht.PARSER_MEDIA_TYPE,be=Me==="application/xhtml+xml"?function(Ht){return Ht}:s_,Ot&&(W=!1),G&&(rt=!0),yt&&(_t=hr({},[].concat(Vs(B5))),$=[],yt.html===!0&&(hr(_t,C5),hr($,T5)),yt.svg===!0&&(hr(_t,IB),hr($,RB),hr($,E0)),yt.svgFilters===!0&&(hr(_t,LB),hr($,RB),hr($,E0)),yt.mathMl===!0&&(hr(_t,OB),hr($,x5),hr($,E0))),ht.ADD_TAGS&&(_t===R&&(_t=Bc(_t)),hr(_t,ht.ADD_TAGS)),ht.ADD_ATTR&&($===K&&($=Bc($)),hr($,ht.ADD_ATTR)),ht.ADD_URI_SAFE_ATTR&&hr(Yt,ht.ADD_URI_SAFE_ATTR),ht.FORBID_CONTENTS&&(xt===It&&(xt=Bc(xt)),hr(xt,ht.FORBID_CONTENTS)),dt&&(_t["#text"]=!0),V&&hr(_t,["html","head","body"]),_t.table&&(hr(_t,["tbody"]),delete at.tbody),Ya&&Ya(ht),An=ht)},hi=hr({},["mi","mo","mn","ms","mtext"]),Vr=hr({},["foreignobject","desc","title","annotation-xml"]),Kr=hr({},IB);hr(Kr,LB),hr(Kr,dwt);var Ne=hr({},OB);hr(Ne,vwt);var Er=function(ht){var Ht=_(ht);(!Ht||!Ht.tagName)&&(Ht={namespaceURI:se,tagName:"template"});var Zt=s_(ht.tagName),rr=s_(Ht.tagName);if(ht.namespaceURI===Wt)return Ht.namespaceURI===se?Zt==="svg":Ht.namespaceURI===re?Zt==="svg"&&(rr==="annotation-xml"||hi[rr]):Boolean(Kr[Zt]);if(ht.namespaceURI===re)return Ht.namespaceURI===se?Zt==="math":Ht.namespaceURI===Wt?Zt==="math"&&Vr[rr]:Boolean(Ne[Zt]);if(ht.namespaceURI===se){if(Ht.namespaceURI===Wt&&!Vr[rr]||Ht.namespaceURI===re&&!hi[rr])return!1;var Mr=hr({},["title","style","font","a","script"]);return!Ne[Zt]&&(Mr[Zt]||!Kr[Zt])}return!1},Yn=function(ht){nv(e.removed,{element:ht});try{ht.parentNode.removeChild(ht)}catch{try{ht.outerHTML=L}catch{ht.remove()}}},dn=function(ht,Ht){try{nv(e.removed,{attribute:Ht.getAttributeNode(ht),from:Ht})}catch{nv(e.removed,{attribute:null,from:Ht})}if(Ht.removeAttribute(ht),ht==="is"&&!$[ht])if(rt||G)try{Yn(Ht)}catch{}else try{Ht.setAttribute(ht,"")}catch{}},Si=function(ht){var Ht=void 0,Zt=void 0;if(ut)ht="<remove></remove>"+ht;else{var rr=E5(ht,/^[\r\n\t ]+/);Zt=rr&&rr[0]}Me==="application/xhtml+xml"&&(ht='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ht+"</body></html>");var Mr=B?B.createHTML(ht):ht;if(zt===se)try{Ht=new h().parseFromString(Mr,Me)}catch{}if(!Ht||!Ht.documentElement){Ht=b.createDocument(zt,"template",null);try{Ht.documentElement.innerHTML=We?"":Mr}catch{}}var ln=Ht.body||Ht.documentElement;return ht&&Zt&&ln.insertBefore(n.createTextNode(Zt),ln.childNodes[0]||null),zt===se?M.call(Ht,V?"html":"body")[0]:V?Ht.documentElement:ln},bi=function(ht){return T.call(ht.ownerDocument||ht,ht,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT,null,!1)},Fe=function(ht){return ht instanceof c&&(typeof ht.nodeName!="string"||typeof ht.textContent!="string"||typeof ht.removeChild!="function"||!(ht.attributes instanceof u)||typeof ht.removeAttribute!="function"||typeof ht.setAttribute!="function"||typeof ht.namespaceURI!="string"||typeof ht.insertBefore!="function")},fi=function(ht){return(typeof o>"u"?"undefined":Fv(o))==="object"?ht instanceof o:ht&&(typeof ht>"u"?"undefined":Fv(ht))==="object"&&typeof ht.nodeType=="number"&&typeof ht.nodeName=="string"},Qn=function(ht,Ht,Zt){N[ht]&&cwt(N[ht],function(rr){rr.call(e,Ht,Zt,An)})},Fi=function(ht){var Ht=void 0;if(Qn("beforeSanitizeElements",ht,null),Fe(ht)||E5(ht.nodeName,/[\u0080-\uFFFF]/))return Yn(ht),!0;var Zt=be(ht.nodeName);if(Qn("uponSanitizeElement",ht,{tagName:Zt,allowedTags:_t}),!fi(ht.firstElementChild)&&(!fi(ht.content)||!fi(ht.content.firstElementChild))&&xo(/<[/\w]/g,ht.innerHTML)&&xo(/<[/\w]/g,ht.textContent)||Zt==="select"&&xo(/<template/i,ht.innerHTML))return Yn(ht),!0;if(!_t[Zt]||at[Zt]){if(dt&&!xt[Zt]){var rr=_(ht)||ht.parentNode,Mr=g(ht)||ht.childNodes;if(Mr&&rr)for(var ln=Mr.length,Tn=ln-1;Tn>=0;--Tn)rr.insertBefore(v(Mr[Tn],!0),m(ht))}return!at[Zt]&&Jr(Zt)&&(q.tagNameCheck instanceof RegExp&&xo(q.tagNameCheck,Zt)||q.tagNameCheck instanceof Function&&q.tagNameCheck(Zt))?!1:(Yn(ht),!0)}return ht instanceof s&&!Er(ht)||(Zt==="noscript"||Zt==="noembed")&&xo(/<\/no(script|embed)/i,ht.innerHTML)?(Yn(ht),!0):(Ot&&ht.nodeType===3&&(Ht=ht.textContent,Ht=au(Ht,P," "),Ht=au(Ht,Y," "),ht.textContent!==Ht&&(nv(e.removed,{element:ht.cloneNode()}),ht.textContent=Ht)),Qn("afterSanitizeElements",ht,null),!1)},nn=function(ht,Ht,Zt){if(bt&&(Ht==="id"||Ht==="name")&&(Zt in n||Zt in Ar))return!1;if(!(W&&!vt[Ht]&&xo(z,Ht))){if(!(wt&&xo(tt,Ht))){if(!$[Ht]||vt[Ht]){if(!(Jr(ht)&&(q.tagNameCheck instanceof RegExp&&xo(q.tagNameCheck,ht)||q.tagNameCheck instanceof Function&&q.tagNameCheck(ht))&&(q.attributeNameCheck instanceof RegExp&&xo(q.attributeNameCheck,Ht)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck(Ht))||Ht==="is"&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&xo(q.tagNameCheck,Zt)||q.tagNameCheck instanceof Function&&q.tagNameCheck(Zt))))return!1}else if(!Yt[Ht]){if(!xo(it,au(Zt,nt,""))){if(!((Ht==="src"||Ht==="xlink:href"||Ht==="href")&&ht!=="script"&&hwt(Zt,"data:")===0&&Mt[ht])){if(!(Ft&&!xo(J,au(Zt,nt,"")))){if(Zt)return!1}}}}}}return!0},Jr=function(ht){return ht.indexOf("-")>0},Bn=function(ht){var Ht=void 0,Zt=void 0,rr=void 0,Mr=void 0;Qn("beforeSanitizeAttributes",ht,null);var ln=ht.attributes;if(ln){var Tn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};for(Mr=ln.length;Mr--;){Ht=ln[Mr];var os=Ht,Ii=os.name,TA=os.namespaceURI;if(Zt=fwt(Ht.value),rr=be(Ii),Tn.attrName=rr,Tn.attrValue=Zt,Tn.keepAttr=!0,Tn.forceKeepAttr=void 0,Qn("uponSanitizeAttribute",ht,Tn),Zt=Tn.attrValue,!Tn.forceKeepAttr&&(dn(Ii,ht),!!Tn.keepAttr)){if(xo(/\/>/i,Zt)){dn(Ii,ht);continue}Ot&&(Zt=au(Zt,P," "),Zt=au(Zt,Y," "));var Ll=be(ht.nodeName);if(nn(Ll,rr,Zt))try{TA?ht.setAttributeNS(TA,Ii,Zt):ht.setAttribute(Ii,Zt),w5(e.removed)}catch{}}}Qn("afterSanitizeAttributes",ht,null)}},wo=function Ae(ht){var Ht=void 0,Zt=bi(ht);for(Qn("beforeSanitizeShadowDOM",ht,null);Ht=Zt.nextNode();)Qn("uponSanitizeShadowNode",Ht,null),!Fi(Ht)&&(Ht.content instanceof i&&Ae(Ht.content),Bn(Ht));Qn("afterSanitizeShadowDOM",ht,null)};return e.sanitize=function(Ae,ht){var Ht=void 0,Zt=void 0,rr=void 0,Mr=void 0,ln=void 0;if(We=!Ae,We&&(Ae="<!-->"),typeof Ae!="string"&&!fi(Ae)){if(typeof Ae.toString!="function")throw FB("toString is not a function");if(Ae=Ae.toString(),typeof Ae!="string")throw FB("dirty is not a string, aborting")}if(!e.isSupported){if(Fv(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof Ae=="string")return r.toStaticHTML(Ae);if(fi(Ae))return r.toStaticHTML(Ae.outerHTML)}return Ae}if(Z||Tr(ht),e.removed=[],typeof Ae=="string"&&(Et=!1),Et){if(Ae.nodeName){var Tn=be(Ae.nodeName);if(!_t[Tn]||at[Tn])throw FB("root node is forbidden and cannot be sanitized in-place")}}else if(Ae instanceof o)Ht=Si("<!---->"),Zt=Ht.ownerDocument.importNode(Ae,!0),Zt.nodeType===1&&Zt.nodeName==="BODY"||Zt.nodeName==="HTML"?Ht=Zt:Ht.appendChild(Zt);else{if(!rt&&!Ot&&!V&&Ae.indexOf("<")===-1)return B&&St?B.createHTML(Ae):Ae;if(Ht=Si(Ae),!Ht)return rt?null:St?L:""}Ht&&ut&&Yn(Ht.firstChild);for(var os=bi(Et?Ae:Ht);rr=os.nextNode();)rr.nodeType===3&&rr===Mr||Fi(rr)||(rr.content instanceof i&&wo(rr.content),Bn(rr),Mr=rr);if(Mr=null,Et)return Ae;if(rt){if(G)for(ln=F.call(Ht.ownerDocument);Ht.firstChild;)ln.appendChild(Ht.firstChild);else ln=Ht;return $.shadowroot&&(ln=S.call(t,ln,!0)),ln}var Ii=V?Ht.outerHTML:Ht.innerHTML;return Ot&&(Ii=au(Ii,P," "),Ii=au(Ii,Y," ")),B&&St?B.createHTML(Ii):Ii},e.setConfig=function(Ae){Tr(Ae),Z=!0},e.clearConfig=function(){An=null,Z=!1},e.isValidAttribute=function(Ae,ht,Ht){An||Tr({});var Zt=be(Ae),rr=be(ht);return nn(Zt,rr,Ht)},e.addHook=function(Ae,ht){typeof ht=="function"&&(N[Ae]=N[Ae]||[],nv(N[Ae],ht))},e.removeHook=function(Ae){N[Ae]&&w5(N[Ae])},e.removeHooks=function(Ae){N[Ae]&&(N[Ae]=[])},e.removeAllHooks=function(){N={}},e}var xwt=G7(),Swt=Object.freeze(Object.defineProperty({__proto__:null,default:xwt},Symbol.toStringTag,{value:"Module"})),C0=function(r){return r&&r.Math==Math&&r},tr=C0(typeof globalThis=="object"&&globalThis)||C0(typeof window=="object"&&window)||C0(typeof self=="object"&&self)||C0(typeof tA=="object"&&tA)||function(){return this}()||Function("return this")(),id={},Ti=function(r){try{return!!r()}catch{return!0}},bwt=Ti,Fl=!bwt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Fwt=Ti,qw=!Fwt(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),Iwt=qw,B0=Function.prototype.call,Ho=Iwt?B0.bind(B0):function(){return B0.apply(B0,arguments)},k7={},$7={}.propertyIsEnumerable,j7=Object.getOwnPropertyDescriptor,Lwt=j7&&!$7.call({1:2},1);k7.f=Lwt?function(e){var t=j7(this,e);return!!t&&t.enumerable}:$7;var Zw=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}},V7=qw,K7=Function.prototype,Owt=K7.bind,yb=K7.call,Rwt=V7&&Owt.bind(yb,yb),Cn=V7?function(r){return r&&Rwt(r)}:function(r){return r&&function(){return yb.apply(r,arguments)}},z7=Cn,Mwt=z7({}.toString),Nwt=z7("".slice),ad=function(r){return Nwt(Mwt(r),8,-1)},Pwt=tr,Uwt=Cn,Dwt=Ti,Qwt=ad,MB=Pwt.Object,Hwt=Uwt("".split),X7=Dwt(function(){return!MB("z").propertyIsEnumerable(0)})?function(r){return Qwt(r)=="String"?Hwt(r,""):MB(r)}:MB,Gwt=tr,kwt=Gwt.TypeError,_A=function(r){if(r==null)throw kwt("Can't call method on "+r);return r},$wt=X7,jwt=_A,my=function(r){return $wt(jwt(r))},$i=function(r){return typeof r=="function"},Vwt=$i,oc=function(r){return typeof r=="object"?r!==null:Vwt(r)},NB=tr,Kwt=$i,zwt=function(r){return Kwt(r)?r:void 0},Gh=function(r,e){return arguments.length<2?zwt(NB[r]):NB[r]&&NB[r][e]},Xwt=Cn,Jw=Xwt({}.isPrototypeOf),Ywt=Gh,tE=Ywt("navigator","userAgent")||"",Y7=tr,PB=tE,S5=Y7.process,b5=Y7.Deno,F5=S5&&S5.versions||b5&&b5.version,I5=F5&&F5.v8,Cs,C1;I5&&(Cs=I5.split("."),C1=Cs[0]>0&&Cs[0]<4?1:+(Cs[0]+Cs[1]));!C1&&PB&&(Cs=PB.match(/Edge\/(\d+)/),(!Cs||Cs[1]>=74)&&(Cs=PB.match(/Chrome\/(\d+)/),Cs&&(C1=+Cs[1])));var xL=C1,L5=xL,Wwt=Ti,W7=!!Object.getOwnPropertySymbols&&!Wwt(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&L5&&L5<41}),qwt=W7,q7=qwt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Zwt=tr,Jwt=Gh,tEt=$i,eEt=Jw,rEt=q7,nEt=Zwt.Object,Z7=rEt?function(r){return typeof r=="symbol"}:function(r){var e=Jwt("Symbol");return tEt(e)&&eEt(e.prototype,nEt(r))},iEt=tr,aEt=iEt.String,eE=function(r){try{return aEt(r)}catch{return"Object"}},oEt=tr,sEt=$i,AEt=eE,lEt=oEt.TypeError,od=function(r){if(sEt(r))return r;throw lEt(AEt(r)+" is not a function")},uEt=od,sd=function(r,e){var t=r[e];return t==null?void 0:uEt(t)},cEt=tr,UB=Ho,DB=$i,QB=oc,hEt=cEt.TypeError,fEt=function(r,e){var t,n;if(e==="string"&&DB(t=r.toString)&&!QB(n=UB(t,r))||DB(t=r.valueOf)&&!QB(n=UB(t,r))||e!=="string"&&DB(t=r.toString)&&!QB(n=UB(t,r)))return n;throw hEt("Can't convert object to primitive value")},rE={exports:{}},O5=tr,pEt=Object.defineProperty,SL=function(r,e){try{pEt(O5,r,{value:e,configurable:!0,writable:!0})}catch{O5[r]=e}return e},dEt=tr,vEt=SL,R5="__core-js_shared__",gEt=dEt[R5]||vEt(R5,{}),bL=gEt,M5=bL;(rE.exports=function(r,e){return M5[r]||(M5[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"});var yEt=tr,mEt=_A,_Et=yEt.Object,nE=function(r){return _Et(mEt(r))},wEt=Cn,EEt=nE,CEt=wEt({}.hasOwnProperty),wA=Object.hasOwn||function(e,t){return CEt(EEt(e),t)},BEt=Cn,TEt=0,xEt=Math.random(),SEt=BEt(1 .toString),J7=function(r){return"Symbol("+(r===void 0?"":r)+")_"+SEt(++TEt+xEt,36)},bEt=tr,FEt=rE.exports,N5=wA,IEt=J7,P5=W7,tG=q7,bf=FEt("wks"),oh=bEt.Symbol,U5=oh&&oh.for,LEt=tG?oh:oh&&oh.withoutSetter||IEt,ta=function(r){if(!N5(bf,r)||!(P5||typeof bf[r]=="string")){var e="Symbol."+r;P5&&N5(oh,r)?bf[r]=oh[r]:tG&&U5?bf[r]=U5(e):bf[r]=LEt(e)}return bf[r]},OEt=tr,REt=Ho,D5=oc,Q5=Z7,MEt=sd,NEt=fEt,PEt=ta,UEt=OEt.TypeError,DEt=PEt("toPrimitive"),QEt=function(r,e){if(!D5(r)||Q5(r))return r;var t=MEt(r,DEt),n;if(t){if(e===void 0&&(e="default"),n=REt(t,r,e),!D5(n)||Q5(n))return n;throw UEt("Can't convert object to primitive value")}return e===void 0&&(e="number"),NEt(r,e)},HEt=QEt,GEt=Z7,FL=function(r){var e=HEt(r,"string");return GEt(e)?e:e+""},kEt=tr,H5=oc,mb=kEt.document,$Et=H5(mb)&&H5(mb.createElement),iE=function(r){return $Et?mb.createElement(r):{}},jEt=Fl,VEt=Ti,KEt=iE,eG=!jEt&&!VEt(function(){return Object.defineProperty(KEt("div"),"a",{get:function(){return 7}}).a!=7}),zEt=Fl,XEt=Ho,YEt=k7,WEt=Zw,qEt=my,ZEt=FL,JEt=wA,tCt=eG,G5=Object.getOwnPropertyDescriptor;id.f=zEt?G5:function(e,t){if(e=qEt(e),t=ZEt(t),tCt)try{return G5(e,t)}catch{}if(JEt(e,t))return WEt(!XEt(YEt.f,e,t),e[t])};var Il={},eCt=Fl,rCt=Ti,rG=eCt&&rCt(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),nG=tr,nCt=oc,iCt=nG.String,aCt=nG.TypeError,Oa=function(r){if(nCt(r))return r;throw aCt(iCt(r)+" is not an object")},oCt=tr,sCt=Fl,ACt=eG,lCt=rG,T0=Oa,k5=FL,uCt=oCt.TypeError,HB=Object.defineProperty,cCt=Object.getOwnPropertyDescriptor,GB="enumerable",kB="configurable",$B="writable";Il.f=sCt?lCt?function(e,t,n){if(T0(e),t=k5(t),T0(n),typeof e=="function"&&t==="prototype"&&"value"in n&&$B in n&&!n[$B]){var i=cCt(e,t);i&&i[$B]&&(e[t]=n.value,n={configurable:kB in n?n[kB]:i[kB],enumerable:GB in n?n[GB]:i[GB],writable:!1})}return HB(e,t,n)}:HB:function(e,t,n){if(T0(e),t=k5(t),T0(n),ACt)try{return HB(e,t,n)}catch{}if("get"in n||"set"in n)throw uCt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var hCt=Fl,fCt=Il,pCt=Zw,Ad=hCt?function(r,e,t){return fCt.f(r,e,pCt(1,t))}:function(r,e,t){return r[e]=t,r},sc={exports:{}},dCt=Cn,vCt=$i,_b=bL,gCt=dCt(Function.toString);vCt(_b.inspectSource)||(_b.inspectSource=function(r){return gCt(r)});var aE=_b.inspectSource,yCt=tr,mCt=$i,_Ct=aE,$5=yCt.WeakMap,wCt=mCt($5)&&/native code/.test(_Ct($5)),ECt=rE.exports,CCt=J7,j5=ECt("keys"),IL=function(r){return j5[r]||(j5[r]=CCt(r))},LL={},BCt=wCt,iG=tr,jB=Cn,TCt=oc,xCt=Ad,VB=wA,KB=bL,SCt=IL,bCt=LL,V5="Object already initialized",wb=iG.TypeError,FCt=iG.WeakMap,B1,Rg,T1,ICt=function(r){return T1(r)?Rg(r):B1(r,{})},LCt=function(r){return function(e){var t;if(!TCt(e)||(t=Rg(e)).type!==r)throw wb("Incompatible receiver, "+r+" required");return t}};if(BCt||KB.state){var Tc=KB.state||(KB.state=new FCt),OCt=jB(Tc.get),K5=jB(Tc.has),RCt=jB(Tc.set);B1=function(r,e){if(K5(Tc,r))throw new wb(V5);return e.facade=r,RCt(Tc,r,e),e},Rg=function(r){return OCt(Tc,r)||{}},T1=function(r){return K5(Tc,r)}}else{var Ff=SCt("state");bCt[Ff]=!0,B1=function(r,e){if(VB(r,Ff))throw new wb(V5);return e.facade=r,xCt(r,Ff,e),e},Rg=function(r){return VB(r,Ff)?r[Ff]:{}},T1=function(r){return VB(r,Ff)}}var oE={set:B1,get:Rg,has:T1,enforce:ICt,getterFor:LCt},Eb=Fl,MCt=wA,aG=Function.prototype,NCt=Eb&&Object.getOwnPropertyDescriptor,OL=MCt(aG,"name"),PCt=OL&&function(){}.name==="something",UCt=OL&&(!Eb||Eb&&NCt(aG,"name").configurable),sE={EXISTS:OL,PROPER:PCt,CONFIGURABLE:UCt},DCt=tr,z5=$i,QCt=wA,X5=Ad,HCt=SL,GCt=aE,oG=oE,kCt=sE.CONFIGURABLE,$Ct=oG.get,jCt=oG.enforce,VCt=String(String).split("String");(sc.exports=function(r,e,t,n){var i=n?!!n.unsafe:!1,a=n?!!n.enumerable:!1,o=n?!!n.noTargetGet:!1,s=n&&n.name!==void 0?n.name:e,A;if(z5(t)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!QCt(t,"name")||kCt&&t.name!==s)&&X5(t,"name",s),A=jCt(t),A.source||(A.source=VCt.join(typeof s=="string"?s:""))),r===DCt){a?r[e]=t:HCt(e,t);return}else i?!o&&r[e]&&(a=!0):delete r[e];a?r[e]=t:X5(r,e,t)})(Function.prototype,"toString",function(){return z5(this)&&$Ct(this).source||GCt(this)});var sG={},KCt=Math.ceil,zCt=Math.floor,AE=function(r){var e=+r;return e!==e||e===0?0:(e>0?zCt:KCt)(e)},XCt=AE,YCt=Math.max,WCt=Math.min,AG=function(r,e){var t=XCt(r);return t<0?YCt(t+e,0):WCt(t,e)},qCt=AE,ZCt=Math.min,ld=function(r){return r>0?ZCt(qCt(r),9007199254740991):0},JCt=ld,lE=function(r){return JCt(r.length)},tBt=my,eBt=AG,rBt=lE,Y5=function(r){return function(e,t,n){var i=tBt(e),a=rBt(i),o=eBt(n,a),s;if(r&&t!=t){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((r||o in i)&&i[o]===t)return r||o||0;return!r&&-1}},lG={includes:Y5(!0),indexOf:Y5(!1)},nBt=Cn,zB=wA,iBt=my,aBt=lG.indexOf,oBt=LL,W5=nBt([].push),uG=function(r,e){var t=iBt(r),n=0,i=[],a;for(a in t)!zB(oBt,a)&&zB(t,a)&&W5(i,a);for(;e.length>n;)zB(t,a=e[n++])&&(~aBt(i,a)||W5(i,a));return i},RL=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],sBt=uG,ABt=RL,lBt=ABt.concat("length","prototype");sG.f=Object.getOwnPropertyNames||function(e){return sBt(e,lBt)};var cG={};cG.f=Object.getOwnPropertySymbols;var uBt=Gh,cBt=Cn,hBt=sG,fBt=cG,pBt=Oa,dBt=cBt([].concat),vBt=uBt("Reflect","ownKeys")||function(e){var t=hBt.f(pBt(e)),n=fBt.f;return n?dBt(t,n(e)):t},q5=wA,gBt=vBt,yBt=id,mBt=Il,_Bt=function(r,e,t){for(var n=gBt(e),i=mBt.f,a=yBt.f,o=0;o<n.length;o++){var s=n[o];!q5(r,s)&&!(t&&q5(t,s))&&i(r,s,a(e,s))}},wBt=Ti,EBt=$i,CBt=/#|\.prototype\./,_y=function(r,e){var t=TBt[BBt(r)];return t==SBt?!0:t==xBt?!1:EBt(e)?wBt(e):!!e},BBt=_y.normalize=function(r){return String(r).replace(CBt,".").toLowerCase()},TBt=_y.data={},xBt=_y.NATIVE="N",SBt=_y.POLYFILL="P",hG=_y,XB=tr,bBt=id.f,FBt=Ad,IBt=sc.exports,LBt=SL,OBt=_Bt,RBt=hG,EA=function(r,e){var t=r.target,n=r.global,i=r.stat,a,o,s,A,l,u;if(n?o=XB:i?o=XB[t]||LBt(t,{}):o=(XB[t]||{}).prototype,o)for(s in e){if(l=e[s],r.noTargetGet?(u=bBt(o,s),A=u&&u.value):A=o[s],a=RBt(n?s:t+(i?".":"#")+s,r.forced),!a&&A!==void 0){if(typeof l==typeof A)continue;OBt(l,A)}(r.sham||A&&A.sham)&&FBt(l,"sham",!0),IBt(o,s,l,r)}},MBt=tr,NBt=MBt.Promise,PBt=sc.exports,UBt=function(r,e,t){for(var n in e)PBt(r,n,e[n],t);return r},fG=tr,DBt=$i,QBt=fG.String,HBt=fG.TypeError,GBt=function(r){if(typeof r=="object"||DBt(r))return r;throw HBt("Can't set "+QBt(r)+" as a prototype")},kBt=Cn,$Bt=Oa,jBt=GBt,pG=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=kBt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(e,[]),r=e instanceof Array}catch{}return function(i,a){return $Bt(i),jBt(a),r?t(i,a):i.__proto__=a,i}}():void 0),VBt=Il.f,KBt=wA,zBt=ta,Z5=zBt("toStringTag"),ML=function(r,e,t){r&&!t&&(r=r.prototype),r&&!KBt(r,Z5)&&VBt(r,Z5,{configurable:!0,value:e})},XBt=Gh,YBt=Il,WBt=ta,qBt=Fl,J5=WBt("species"),ZBt=function(r){var e=XBt(r),t=YBt.f;qBt&&e&&!e[J5]&&t(e,J5,{configurable:!0,get:function(){return this}})},JBt=tr,tTt=Jw,eTt=JBt.TypeError,rTt=function(r,e){if(tTt(e,r))return r;throw eTt("Incorrect invocation")},tU=Cn,nTt=od,iTt=qw,aTt=tU(tU.bind),NL=function(r,e){return nTt(r),e===void 0?r:iTt?aTt(r,e):function(){return r.apply(e,arguments)}},wy={},oTt=ta,sTt=wy,ATt=oTt("iterator"),lTt=Array.prototype,uTt=function(r){return r!==void 0&&(sTt.Array===r||lTt[ATt]===r)},cTt=ta,hTt=cTt("toStringTag"),dG={};dG[hTt]="z";var fTt=String(dG)==="[object z]",pTt=tr,dTt=fTt,vTt=$i,A_=ad,gTt=ta,yTt=gTt("toStringTag"),mTt=pTt.Object,_Tt=A_(function(){return arguments}())=="Arguments",wTt=function(r,e){try{return r[e]}catch{}},PL=dTt?A_:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=wTt(e=mTt(r),yTt))=="string"?t:_Tt?A_(e):(n=A_(e))=="Object"&&vTt(e.callee)?"Arguments":n},ETt=PL,eU=sd,CTt=wy,BTt=ta,TTt=BTt("iterator"),vG=function(r){if(r!=null)return eU(r,TTt)||eU(r,"@@iterator")||CTt[ETt(r)]},xTt=tr,STt=Ho,bTt=od,FTt=Oa,ITt=eE,LTt=vG,OTt=xTt.TypeError,RTt=function(r,e){var t=arguments.length<2?LTt(r):e;if(bTt(t))return FTt(STt(t,r));throw OTt(ITt(r)+" is not iterable")},MTt=Ho,rU=Oa,NTt=sd,PTt=function(r,e,t){var n,i;rU(r);try{if(n=NTt(r,"return"),!n){if(e==="throw")throw t;return t}n=MTt(n,r)}catch(a){i=!0,n=a}if(e==="throw")throw t;if(i)throw n;return rU(n),t},UTt=tr,DTt=NL,QTt=Ho,HTt=Oa,GTt=eE,kTt=uTt,$Tt=lE,nU=Jw,jTt=RTt,VTt=vG,iU=PTt,KTt=UTt.TypeError,l_=function(r,e){this.stopped=r,this.result=e},aU=l_.prototype,zTt=function(r,e,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_ITERATOR),o=!!(t&&t.INTERRUPTED),s=DTt(e,n),A,l,u,c,h,f,p,v=function(g){return A&&iU(A,"normal",g),new l_(!0,g)},m=function(g){return i?(HTt(g),o?s(g[0],g[1],v):s(g[0],g[1])):o?s(g,v):s(g)};if(a)A=r;else{if(l=VTt(r),!l)throw KTt(GTt(r)+" is not iterable");if(kTt(l)){for(u=0,c=$Tt(r);c>u;u++)if(h=m(r[u]),h&&nU(aU,h))return h;return new l_(!1)}A=jTt(r,l)}for(f=A.next;!(p=QTt(f,A)).done;){try{h=m(p.value)}catch(g){iU(A,"throw",g)}if(typeof h=="object"&&h&&nU(aU,h))return h}return new l_(!1)},XTt=ta,gG=XTt("iterator"),yG=!1;try{var YTt=0,oU={next:function(){return{done:!!YTt++}},return:function(){yG=!0}};oU[gG]=function(){return this},Array.from(oU,function(){throw 2})}catch{}var WTt=function(r,e){if(!e&&!yG)return!1;var t=!1;try{var n={};n[gG]=function(){return{next:function(){return{done:t=!0}}}},r(n)}catch{}return t},qTt=Cn,ZTt=Ti,mG=$i,JTt=PL,txt=Gh,ext=aE,_G=function(){},rxt=[],wG=txt("Reflect","construct"),UL=/^\s*(?:class|function)\b/,nxt=qTt(UL.exec),ixt=!UL.exec(_G),iv=function(e){if(!mG(e))return!1;try{return wG(_G,rxt,e),!0}catch{return!1}},EG=function(e){if(!mG(e))return!1;switch(JTt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ixt||!!nxt(UL,ext(e))}catch{return!0}};EG.sham=!0;var axt=!wG||ZTt(function(){var r;return iv(iv.call)||!iv(Object)||!iv(function(){r=!0})||r})?EG:iv,oxt=tr,sxt=axt,Axt=eE,lxt=oxt.TypeError,uxt=function(r){if(sxt(r))return r;throw lxt(Axt(r)+" is not a constructor")},sU=Oa,cxt=uxt,hxt=ta,fxt=hxt("species"),CG=function(r,e){var t=sU(r).constructor,n;return t===void 0||(n=sU(t)[fxt])==null?e:cxt(n)},pxt=qw,BG=Function.prototype,AU=BG.apply,lU=BG.call,DL=typeof Reflect=="object"&&Reflect.apply||(pxt?lU.bind(AU):function(){return lU.apply(AU,arguments)}),dxt=Gh,TG=dxt("document","documentElement"),vxt=Cn,gxt=vxt([].slice),yxt=tE,xG=/(?:ipad|iphone|ipod).*applewebkit/i.test(yxt),mxt=ad,_xt=tr,uE=mxt(_xt.process)=="process",Mo=tr,wxt=DL,Ext=NL,uU=$i,Cxt=wA,Bxt=Ti,cU=TG,Txt=gxt,hU=iE,xxt=xG,Sxt=uE,Cb=Mo.setImmediate,Bb=Mo.clearImmediate,bxt=Mo.process,YB=Mo.Dispatch,Fxt=Mo.Function,fU=Mo.MessageChannel,Ixt=Mo.String,WB=0,Jv={},pU="onreadystatechange",Mg,xc,qB,ZB;try{Mg=Mo.location}catch{}var QL=function(r){if(Cxt(Jv,r)){var e=Jv[r];delete Jv[r],e()}},JB=function(r){return function(){QL(r)}},dU=function(r){QL(r.data)},vU=function(r){Mo.postMessage(Ixt(r),Mg.protocol+"//"+Mg.host)};(!Cb||!Bb)&&(Cb=function(e){var t=Txt(arguments,1);return Jv[++WB]=function(){wxt(uU(e)?e:Fxt(e),void 0,t)},xc(WB),WB},Bb=function(e){delete Jv[e]},Sxt?xc=function(r){bxt.nextTick(JB(r))}:YB&&YB.now?xc=function(r){YB.now(JB(r))}:fU&&!xxt?(qB=new fU,ZB=qB.port2,qB.port1.onmessage=dU,xc=Ext(ZB.postMessage,ZB)):Mo.addEventListener&&uU(Mo.postMessage)&&!Mo.importScripts&&Mg&&Mg.protocol!=="file:"&&!Bxt(vU)?(xc=vU,Mo.addEventListener("message",dU,!1)):pU in hU("script")?xc=function(r){cU.appendChild(hU("script"))[pU]=function(){cU.removeChild(this),QL(r)}}:xc=function(r){setTimeout(JB(r),0)});var SG={set:Cb,clear:Bb},Lxt=tE,Oxt=tr,Rxt=/ipad|iphone|ipod/i.test(Lxt)&&Oxt.Pebble!==void 0,Mxt=tE,Nxt=/web0s(?!.*chrome)/i.test(Mxt),Eh=tr,gU=NL,Pxt=id.f,tT=SG.set,Uxt=xG,Dxt=Rxt,Qxt=Nxt,eT=uE,yU=Eh.MutationObserver||Eh.WebKitMutationObserver,mU=Eh.document,_U=Eh.process,x0=Eh.Promise,wU=Pxt(Eh,"queueMicrotask"),bG=wU&&wU.value,av,Dc,tg,jf,rT,nT,S0,EU;bG||(av=function(){var r,e;for(eT&&(r=_U.domain)&&r.exit();Dc;){e=Dc.fn,Dc=Dc.next;try{e()}catch(t){throw Dc?jf():tg=void 0,t}}tg=void 0,r&&r.enter()},!Uxt&&!eT&&!Qxt&&yU&&mU?(rT=!0,nT=mU.createTextNode(""),new yU(av).observe(nT,{characterData:!0}),jf=function(){nT.data=rT=!rT}):!Dxt&&x0&&x0.resolve?(S0=x0.resolve(void 0),S0.constructor=x0,EU=gU(S0.then,S0),jf=function(){EU(av)}):eT?jf=function(){_U.nextTick(av)}:(tT=gU(tT,Eh),jf=function(){tT(av)}));var Hxt=bG||function(r){var e={fn:r,next:void 0};tg&&(tg.next=e),Dc||(Dc=e,jf()),tg=e},HL={},CU=od,Gxt=function(r){var e,t;this.promise=new r(function(n,i){if(e!==void 0||t!==void 0)throw TypeError("Bad Promise constructor");e=n,t=i}),this.resolve=CU(e),this.reject=CU(t)};HL.f=function(r){return new Gxt(r)};var kxt=Oa,$xt=oc,jxt=HL,Vxt=function(r,e){if(kxt(r),$xt(e)&&e.constructor===r)return e;var t=jxt.f(r),n=t.resolve;return n(e),t.promise},Kxt=tr,zxt=function(r,e){var t=Kxt.console;t&&t.error&&(arguments.length==1?t.error(r):t.error(r,e))},Xxt=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}},FG=function(){this.head=null,this.tail=null};FG.prototype={add:function(r){var e={item:r,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r)return this.head=r.next,this.tail===r&&(this.tail=null),r.item}};var Yxt=FG,Wxt=typeof window=="object",cE=EA,yl=tr,qxt=Gh,ml=Ho,x1=NBt,BU=sc.exports,Zxt=UBt,TU=pG,Jxt=ML,tSt=ZBt,Tb=od,eg=$i,eSt=oc,rSt=rTt,nSt=aE,xU=zTt,iSt=WTt,aSt=CG,IG=SG.set,GL=Hxt,oSt=Vxt,sSt=zxt,LG=HL,xb=Xxt,ASt=Yxt,kL=oE,lSt=hG,uSt=ta,cSt=Wxt,S1=uE,SU=xL,hSt=uSt("species"),CA="Promise",bU=kL.getterFor(CA),fSt=kL.set,pSt=kL.getterFor(CA),Rc=x1&&x1.prototype,xs=x1,ov=Rc,OG=yl.TypeError,Sb=yl.document,$L=yl.process,Qp=LG.f,dSt=Qp,vSt=!!(Sb&&Sb.createEvent&&yl.dispatchEvent),RG=eg(yl.PromiseRejectionEvent),MG="unhandledrejection",gSt="rejectionhandled",FU=0,NG=1,ySt=2,jL=1,PG=2,bb=!1,b0,IU,UG,LU,Ey=lSt(CA,function(){var r=nSt(xs),e=r!==String(xs);if(!e&&SU===66)return!0;if(SU>=51&&/native code/.test(r))return!1;var t=new xs(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=t.constructor={};return i[hSt]=n,bb=t.then(function(){})instanceof n,bb?!e&&cSt&&!RG:!0}),mSt=Ey||!iSt(function(r){xs.all(r).catch(function(){})}),DG=function(r){var e;return eSt(r)&&eg(e=r.then)?e:!1},QG=function(r,e){var t=e.value,n=e.state==NG,i=n?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,A,l,u;try{i?(n||(e.rejection===PG&&wSt(e),e.rejection=jL),i===!0?A=t:(s&&s.enter(),A=i(t),s&&(s.exit(),u=!0)),A===r.promise?o(OG("Promise-chain cycle")):(l=DG(A))?ml(l,A,a,o):a(A)):o(t)}catch(c){s&&!u&&s.exit(),o(c)}},HG=function(r,e){r.notified||(r.notified=!0,GL(function(){for(var t=r.reactions,n;n=t.get();)QG(n,r);r.notified=!1,e&&!r.rejection&&_St(r)}))},GG=function(r,e,t){var n,i;vSt?(n=Sb.createEvent("Event"),n.promise=e,n.reason=t,n.initEvent(r,!1,!0),yl.dispatchEvent(n)):n={promise:e,reason:t},!RG&&(i=yl["on"+r])?i(n):r===MG&&sSt("Unhandled promise rejection",t)},_St=function(r){ml(IG,yl,function(){var e=r.facade,t=r.value,n=OU(r),i;if(n&&(i=xb(function(){S1?$L.emit("unhandledRejection",t,e):GG(MG,e,t)}),r.rejection=S1||OU(r)?PG:jL,i.error))throw i.value})},OU=function(r){return r.rejection!==jL&&!r.parent},wSt=function(r){ml(IG,yl,function(){var e=r.facade;S1?$L.emit("rejectionHandled",e):GG(gSt,e,r.value)})},ep=function(r,e,t){return function(n){r(e,n,t)}},mp=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=ySt,HG(r,!0))},Fb=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw OG("Promise can't be resolved itself");var n=DG(e);n?GL(function(){var i={done:!1};try{ml(n,e,ep(Fb,i,r),ep(mp,i,r))}catch(a){mp(i,a,r)}}):(r.value=e,r.state=NG,HG(r,!1))}catch(i){mp({done:!1},i,r)}}};if(Ey&&(xs=function(e){rSt(this,ov),Tb(e),ml(b0,this);var t=bU(this);try{e(ep(Fb,t),ep(mp,t))}catch(n){mp(t,n)}},ov=xs.prototype,b0=function(e){fSt(this,{type:CA,done:!1,notified:!1,parent:!1,reactions:new ASt,rejection:!1,state:FU,value:void 0})},b0.prototype=Zxt(ov,{then:function(e,t){var n=pSt(this),i=Qp(aSt(this,xs));return n.parent=!0,i.ok=eg(e)?e:!0,i.fail=eg(t)&&t,i.domain=S1?$L.domain:void 0,n.state==FU?n.reactions.add(i):GL(function(){QG(i,n)}),i.promise},catch:function(r){return this.then(void 0,r)}}),IU=function(){var r=new b0,e=bU(r);this.promise=r,this.resolve=ep(Fb,e),this.reject=ep(mp,e)},LG.f=Qp=function(r){return r===xs||r===UG?new IU(r):dSt(r)},eg(x1)&&Rc!==Object.prototype)){LU=Rc.then,bb||(BU(Rc,"then",function(e,t){var n=this;return new xs(function(i,a){ml(LU,n,i,a)}).then(e,t)},{unsafe:!0}),BU(Rc,"catch",ov.catch,{unsafe:!0}));try{delete Rc.constructor}catch{}TU&&TU(Rc,ov)}cE({global:!0,wrap:!0,forced:Ey},{Promise:xs});Jxt(xs,CA,!1);tSt(CA);UG=qxt(CA);cE({target:CA,stat:!0,forced:Ey},{reject:function(e){var t=Qp(this);return ml(t.reject,void 0,e),t.promise}});cE({target:CA,stat:!0,forced:Ey},{resolve:function(e){return oSt(this,e)}});cE({target:CA,stat:!0,forced:mSt},{all:function(e){var t=this,n=Qp(t),i=n.resolve,a=n.reject,o=xb(function(){var s=Tb(t.resolve),A=[],l=0,u=1;xU(e,function(c){var h=l++,f=!1;u++,ml(s,t,c).then(function(p){f||(f=!0,A[h]=p,--u||i(A))},a)}),--u||i(A)});return o.error&&a(o.value),n.promise},race:function(e){var t=this,n=Qp(t),i=n.reject,a=xb(function(){var o=Tb(t.resolve);xU(e,function(s){ml(o,t,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});function RU(r,e,t,n,i,a,o){try{var s=r[a](o),A=s.value}catch(l){t(l);return}s.done?e(A):Promise.resolve(A).then(n,i)}function _l(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(A){RU(a,n,i,o,s,"next",A)}function s(A){RU(a,n,i,o,s,"throw",A)}o(void 0)})}}var ESt=tr,CSt=PL,BSt=ESt.String,BA=function(r){if(CSt(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return BSt(r)},TSt=Oa,kG=function(){var r=TSt(this),e="";return r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.sticky&&(e+="y"),e},VL=Ti,xSt=tr,KL=xSt.RegExp,zL=VL(function(){var r=KL("a","y");return r.lastIndex=2,r.exec("abcd")!=null}),SSt=zL||VL(function(){return!KL("a","y").sticky}),bSt=zL||VL(function(){var r=KL("^r","gy");return r.lastIndex=2,r.exec("str")!=null}),$G={BROKEN_CARET:bSt,MISSED_STICKY:SSt,UNSUPPORTED_Y:zL},jG={},FSt=uG,ISt=RL,LSt=Object.keys||function(e){return FSt(e,ISt)},OSt=Fl,RSt=rG,MSt=Il,NSt=Oa,PSt=my,USt=LSt;jG.f=OSt&&!RSt?Object.defineProperties:function(e,t){NSt(e);for(var n=PSt(t),i=USt(t),a=i.length,o=0,s;a>o;)MSt.f(e,s=i[o++],n[s]);return e};var DSt=Oa,QSt=jG,MU=RL,HSt=LL,GSt=TG,kSt=iE,$St=IL,NU=">",PU="<",Ib="prototype",Lb="script",VG=$St("IE_PROTO"),iT=function(){},KG=function(r){return PU+Lb+NU+r+PU+"/"+Lb+NU},UU=function(r){r.write(KG("")),r.close();var e=r.parentWindow.Object;return r=null,e},jSt=function(){var r=kSt("iframe"),e="java"+Lb+":",t;return r.style.display="none",GSt.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(KG("document.F=Object")),t.close(),t.F},F0,u_=function(){try{F0=new ActiveXObject("htmlfile")}catch{}u_=typeof document<"u"?document.domain&&F0?UU(F0):jSt():UU(F0);for(var r=MU.length;r--;)delete u_[Ib][MU[r]];return u_()};HSt[VG]=!0;var XL=Object.create||function(e,t){var n;return e!==null?(iT[Ib]=DSt(e),n=new iT,iT[Ib]=null,n[VG]=e):n=u_(),t===void 0?n:QSt.f(n,t)},VSt=Ti,KSt=tr,zSt=KSt.RegExp,XSt=VSt(function(){var r=zSt(".","s");return!(r.dotAll&&r.exec(`
`)&&r.flags==="s")}),YSt=Ti,WSt=tr,qSt=WSt.RegExp,ZSt=YSt(function(){var r=qSt("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),rp=Ho,hE=Cn,JSt=BA,tbt=kG,ebt=$G,rbt=rE.exports,nbt=XL,ibt=oE.get,abt=XSt,obt=ZSt,sbt=rbt("native-string-replace",String.prototype.replace),b1=RegExp.prototype.exec,Ob=b1,Abt=hE("".charAt),lbt=hE("".indexOf),ubt=hE("".replace),aT=hE("".slice),Rb=function(){var r=/a/,e=/b*/g;return rp(b1,r,"a"),rp(b1,e,"a"),r.lastIndex!==0||e.lastIndex!==0}(),zG=ebt.BROKEN_CARET,Mb=/()??/.exec("")[1]!==void 0,cbt=Rb||Mb||zG||abt||obt;cbt&&(Ob=function(e){var t=this,n=ibt(t),i=JSt(e),a=n.raw,o,s,A,l,u,c,h;if(a)return a.lastIndex=t.lastIndex,o=rp(Ob,a,i),t.lastIndex=a.lastIndex,o;var f=n.groups,p=zG&&t.sticky,v=rp(tbt,t),m=t.source,g=0,_=i;if(p&&(v=ubt(v,"y",""),lbt(v,"g")===-1&&(v+="g"),_=aT(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&Abt(i,t.lastIndex-1)!==`
`)&&(m="(?: "+m+")",_=" "+_,g++),s=new RegExp("^(?:"+m+")",v)),Mb&&(s=new RegExp("^"+m+"$(?!\\s)",v)),Rb&&(A=t.lastIndex),l=rp(b1,p?s:t,_),p?l?(l.input=aT(l.input,g),l[0]=aT(l[0],g),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:Rb&&l&&(t.lastIndex=t.global?l.index+l[0].length:A),Mb&&l&&l.length>1&&rp(sbt,l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&f)for(l.groups=c=nbt(null),u=0;u<f.length;u++)h=f[u],c[h[0]]=l[h[1]];return l});var fE=Ob,hbt=EA,DU=fE;hbt({target:"RegExp",proto:!0,forced:/./.exec!==DU},{exec:DU});var QU=Cn,HU=sc.exports,fbt=fE,GU=Ti,XG=ta,pbt=Ad,dbt=XG("species"),oT=RegExp.prototype,YL=function(r,e,t,n){var i=XG(r),a=!GU(function(){var l={};return l[i]=function(){return 7},""[r](l)!=7}),o=a&&!GU(function(){var l=!1,u=/a/;return r==="split"&&(u={},u.constructor={},u.constructor[dbt]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return l=!0,null},u[i](""),!l});if(!a||!o||t){var s=QU(/./[i]),A=e(i,""[r],function(l,u,c,h,f){var p=QU(l),v=u.exec;return v===fbt||v===oT.exec?a&&!f?{done:!0,value:s(u,c,h)}:{done:!0,value:p(c,u,h)}:{done:!1}});HU(String.prototype,r,A[0]),HU(oT,i,A[1])}n&&pbt(oT[i],"sham",!0)},WL=Cn,vbt=AE,gbt=BA,ybt=_A,mbt=WL("".charAt),kU=WL("".charCodeAt),_bt=WL("".slice),$U=function(r){return function(e,t){var n=gbt(ybt(e)),i=vbt(t),a=n.length,o,s;return i<0||i>=a?r?"":void 0:(o=kU(n,i),o<55296||o>56319||i+1===a||(s=kU(n,i+1))<56320||s>57343?r?mbt(n,i):o:r?_bt(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},wbt={codeAt:$U(!1),charAt:$U(!0)},Ebt=wbt.charAt,qL=function(r,e,t){return e+(t?Ebt(r,e).length:1)},Cbt=tr,jU=Ho,Bbt=Oa,Tbt=$i,xbt=ad,Sbt=fE,bbt=Cbt.TypeError,ZL=function(r,e){var t=r.exec;if(Tbt(t)){var n=jU(t,r,e);return n!==null&&Bbt(n),n}if(xbt(r)==="RegExp")return jU(Sbt,r,e);throw bbt("RegExp#exec called on incompatible receiver")},Fbt=Ho,Ibt=YL,Lbt=Oa,Obt=ld,sT=BA,Rbt=_A,Mbt=sd,Nbt=qL,VU=ZL;Ibt("match",function(r,e,t){return[function(i){var a=Rbt(this),o=i==null?void 0:Mbt(i,r);return o?Fbt(o,i,a):new RegExp(i)[r](sT(a))},function(n){var i=Lbt(this),a=sT(n),o=t(e,i,a);if(o.done)return o.value;if(!i.global)return VU(i,a);var s=i.unicode;i.lastIndex=0;for(var A=[],l=0,u;(u=VU(i,a))!==null;){var c=sT(u[0]);A[l]=c,c===""&&(i.lastIndex=Nbt(a,Obt(i.lastIndex),s)),l++}return l===0?null:A}]});var JL=Cn,Pbt=nE,Ubt=Math.floor,AT=JL("".charAt),Dbt=JL("".replace),lT=JL("".slice),Qbt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Hbt=/\$([$&'`]|\d{1,2})/g,Gbt=function(r,e,t,n,i,a){var o=t+r.length,s=n.length,A=Hbt;return i!==void 0&&(i=Pbt(i),A=Qbt),Dbt(a,A,function(l,u){var c;switch(AT(u,0)){case"$":return"$";case"&":return r;case"`":return lT(e,0,t);case"'":return lT(e,o);case"<":c=i[lT(u,1,-1)];break;default:var h=+u;if(h===0)return l;if(h>s){var f=Ubt(h/10);return f===0?l:f<=s?n[f-1]===void 0?AT(u,1):n[f-1]+AT(u,1):l}c=n[h-1]}return c===void 0?"":c})},kbt=DL,KU=Ho,pE=Cn,$bt=YL,jbt=Ti,Vbt=Oa,Kbt=$i,zbt=AE,Xbt=ld,If=BA,Ybt=_A,Wbt=qL,qbt=sd,Zbt=Gbt,Jbt=ZL,tFt=ta,Nb=tFt("replace"),eFt=Math.max,rFt=Math.min,nFt=pE([].concat),uT=pE([].push),zU=pE("".indexOf),XU=pE("".slice),iFt=function(r){return r===void 0?r:String(r)},aFt=function(){return"a".replace(/./,"$0")==="$0"}(),YU=function(){return/./[Nb]?/./[Nb]("a","$0")==="":!1}(),oFt=!jbt(function(){var r=/./;return r.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(r,"$<a>")!=="7"});$bt("replace",function(r,e,t){var n=YU?"$":"$0";return[function(a,o){var s=Ybt(this),A=a==null?void 0:qbt(a,Nb);return A?KU(A,a,s,o):KU(e,If(s),a,o)},function(i,a){var o=Vbt(this),s=If(i);if(typeof a=="string"&&zU(a,n)===-1&&zU(a,"$<")===-1){var A=t(e,o,s,a);if(A.done)return A.value}var l=Kbt(a);l||(a=If(a));var u=o.global;if(u){var c=o.unicode;o.lastIndex=0}for(var h=[];;){var f=Jbt(o,s);if(f===null||(uT(h,f),!u))break;var p=If(f[0]);p===""&&(o.lastIndex=Wbt(s,Xbt(o.lastIndex),c))}for(var v="",m=0,g=0;g<h.length;g++){f=h[g];for(var _=If(f[0]),E=eFt(rFt(zbt(f.index),s.length),0),B=[],L=1;L<f.length;L++)uT(B,iFt(f[L]));var O=f.groups;if(l){var b=nFt([_],B,E,s);O!==void 0&&uT(b,O);var T=If(kbt(a,void 0,b))}else T=Zbt(_,s,E,B,O,a);E>=m&&(v+=XU(s,m,E)+T,m=E+_.length)}return v+XU(s,m)}]},!oFt||!aFt||YU);var sFt=oc,AFt=ad,lFt=ta,uFt=lFt("match"),YG=function(r){var e;return sFt(r)&&((e=r[uFt])!==void 0?!!e:AFt(r)=="RegExp")},cFt=tr,hFt=YG,fFt=cFt.TypeError,tO=function(r){if(hFt(r))throw fFt("The method doesn't accept regular expressions");return r},pFt=ta,dFt=pFt("match"),eO=function(r){var e=/./;try{"/./"[r](e)}catch{try{return e[dFt]=!1,"/./"[r](e)}catch{}}return!1},vFt=EA,WG=Cn,gFt=id.f,yFt=ld,WU=BA,mFt=tO,_Ft=_A,wFt=eO,qU=WG("".startsWith),EFt=WG("".slice),CFt=Math.min,qG=wFt("startsWith"),BFt=!qG&&!!function(){var r=gFt(String.prototype,"startsWith");return r&&!r.writable}();vFt({target:"String",proto:!0,forced:!BFt&&!qG},{startsWith:function(e){var t=WU(_Ft(this));mFt(e);var n=yFt(CFt(arguments.length>1?arguments[1]:void 0,t.length)),i=WU(e);return qU?qU(t,i,n):EFt(t,n,n+i.length)===i}});var TFt=ta,xFt=XL,SFt=Il,Pb=TFt("unscopables"),Ub=Array.prototype;Ub[Pb]==null&&SFt.f(Ub,Pb,{configurable:!0,value:xFt(null)});var bFt=function(r){Ub[Pb][r]=!0},FFt=Ti,IFt=!FFt(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),LFt=tr,OFt=wA,RFt=$i,MFt=nE,NFt=IL,PFt=IFt,ZU=NFt("IE_PROTO"),Db=LFt.Object,UFt=Db.prototype,ZG=PFt?Db.getPrototypeOf:function(r){var e=MFt(r);if(OFt(e,ZU))return e[ZU];var t=e.constructor;return RFt(t)&&e instanceof t?t.prototype:e instanceof Db?UFt:null},DFt=Ti,QFt=$i,JU=ZG,HFt=sc.exports,GFt=ta,Qb=GFt("iterator"),JG=!1,Ch,cT,hT;[].keys&&(hT=[].keys(),"next"in hT?(cT=JU(JU(hT)),cT!==Object.prototype&&(Ch=cT)):JG=!0);var kFt=Ch==null||DFt(function(){var r={};return Ch[Qb].call(r)!==r});kFt&&(Ch={});QFt(Ch[Qb])||HFt(Ch,Qb,function(){return this});var tk={IteratorPrototype:Ch,BUGGY_SAFARI_ITERATORS:JG},$Ft=tk.IteratorPrototype,jFt=XL,VFt=Zw,KFt=ML,zFt=wy,XFt=function(){return this},YFt=function(r,e,t,n){var i=e+" Iterator";return r.prototype=jFt($Ft,{next:VFt(+!n,t)}),KFt(r,i,!1),zFt[i]=XFt,r},WFt=EA,qFt=Ho,ek=sE,ZFt=$i,JFt=YFt,t2=ZG,e2=pG,tIt=ML,eIt=Ad,fT=sc.exports,rIt=ta,nIt=wy,rk=tk,iIt=ek.PROPER,aIt=ek.CONFIGURABLE,r2=rk.IteratorPrototype,I0=rk.BUGGY_SAFARI_ITERATORS,sv=rIt("iterator"),n2="keys",Av="values",i2="entries",oIt=function(){return this},sIt=function(r,e,t,n,i,a,o){JFt(t,e,n);var s=function(g){if(g===i&&h)return h;if(!I0&&g in u)return u[g];switch(g){case n2:return function(){return new t(this,g)};case Av:return function(){return new t(this,g)};case i2:return function(){return new t(this,g)}}return function(){return new t(this)}},A=e+" Iterator",l=!1,u=r.prototype,c=u[sv]||u["@@iterator"]||i&&u[i],h=!I0&&c||s(i),f=e=="Array"&&u.entries||c,p,v,m;if(f&&(p=t2(f.call(new r)),p!==Object.prototype&&p.next&&(t2(p)!==r2&&(e2?e2(p,r2):ZFt(p[sv])||fT(p,sv,oIt)),tIt(p,A,!0))),iIt&&i==Av&&c&&c.name!==Av&&(aIt?eIt(u,"name",Av):(l=!0,h=function(){return qFt(c,this)})),i)if(v={values:s(Av),keys:a?h:s(n2),entries:s(i2)},o)for(m in v)(I0||l||!(m in u))&&fT(u,m,v[m]);else WFt({target:e,proto:!0,forced:I0||l},v);return u[sv]!==h&&fT(u,sv,h,{name:i}),nIt[e]=h,v},AIt=my,rO=bFt,a2=wy,nk=oE,lIt=Il.f,uIt=sIt,cIt=Fl,ik="Array Iterator",hIt=nk.set,fIt=nk.getterFor(ik),pIt=uIt(Array,"Array",function(r,e){hIt(this,{type:ik,target:AIt(r),index:0,kind:e})},function(){var r=fIt(this),e=r.target,t=r.kind,n=r.index++;return!e||n>=e.length?(r.target=void 0,{value:void 0,done:!0}):t=="keys"?{value:n,done:!1}:t=="values"?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}},"values"),o2=a2.Arguments=a2.Array;rO("keys");rO("values");rO("entries");if(cIt&&o2.name!=="values")try{lIt(o2,"name",{value:"values"})}catch{}var dIt={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vIt=iE,pT=vIt("span").classList,s2=pT&&pT.constructor&&pT.constructor.prototype,gIt=s2===Object.prototype?void 0:s2,A2=tr,ak=dIt,yIt=gIt,Iv=pIt,dT=Ad,ok=ta,vT=ok("iterator"),l2=ok("toStringTag"),gT=Iv.values,sk=function(r,e){if(r){if(r[vT]!==gT)try{dT(r,vT,gT)}catch{r[vT]=gT}if(r[l2]||dT(r,l2,e),ak[e]){for(var t in Iv)if(r[t]!==Iv[t])try{dT(r,t,Iv[t])}catch{r[t]=Iv[t]}}}};for(var yT in ak)sk(A2[yT]&&A2[yT].prototype,yT);sk(yIt,"DOMTokenList");function nO(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var mIt=tr,_It=od,wIt=nE,EIt=X7,CIt=lE,BIt=mIt.TypeError,u2=function(r){return function(e,t,n,i){_It(t);var a=wIt(e),o=EIt(a),s=CIt(a),A=r?s-1:0,l=r?-1:1;if(n<2)for(;;){if(A in o){i=o[A],A+=l;break}if(A+=l,r?A<0:s<=A)throw BIt("Reduce of empty array with no initial value")}for(;r?A>=0:s>A;A+=l)A in o&&(i=t(i,o[A],A,a));return i}},TIt={left:u2(!1),right:u2(!0)},xIt=Ti,Ak=function(r,e){var t=[][r];return!!t&&xIt(function(){t.call(null,e||function(){throw 1},1)})},SIt=EA,bIt=TIt.left,FIt=Ak,c2=xL,IIt=uE,LIt=FIt("reduce"),OIt=!IIt&&c2>79&&c2<83;SIt({target:"Array",proto:!0,forced:!LIt||OIt},{reduce:function(e){var t=arguments.length;return bIt(this,e,t,t>1?arguments[1]:void 0)}});var RIt=EA,lk=Cn,MIt=id.f,NIt=ld,h2=BA,PIt=tO,UIt=_A,DIt=eO,f2=lk("".endsWith),QIt=lk("".slice),HIt=Math.min,uk=DIt("endsWith"),GIt=!uk&&!!function(){var r=MIt(String.prototype,"endsWith");return r&&!r.writable}();RIt({target:"String",proto:!0,forced:!GIt&&!uk},{endsWith:function(e){var t=h2(UIt(this));PIt(e);var n=arguments.length>1?arguments[1]:void 0,i=t.length,a=n===void 0?i:HIt(NIt(n),i),o=h2(e);return f2?f2(t,o,a):QIt(t,a-o.length,a)===o}});var kIt=FL,$It=Il,jIt=Zw,VIt=function(r,e,t){var n=kIt(e);n in r?$It.f(r,n,jIt(0,t)):r[n]=t},KIt=tr,p2=AG,zIt=lE,XIt=VIt,YIt=KIt.Array,WIt=Math.max,qIt=function(r,e,t){for(var n=zIt(r),i=p2(e,n),a=p2(t===void 0?n:t,n),o=YIt(WIt(a-i,0)),s=0;i<a;i++,s++)XIt(o,s,r[i]);return o.length=s,o},ZIt=DL,lv=Ho,iO=Cn,JIt=YL,tLt=YG,eLt=Oa,d2=_A,rLt=CG,nLt=qL,iLt=ld,mT=BA,aLt=sd,v2=qIt,g2=ZL,oLt=fE,sLt=$G,ALt=Ti,Lf=sLt.UNSUPPORTED_Y,y2=4294967295,lLt=Math.min,ck=[].push,uLt=iO(/./.exec),Of=iO(ck),uv=iO("".slice),cLt=!ALt(function(){var r=/(?:)/,e=r.exec;r.exec=function(){return e.apply(this,arguments)};var t="ab".split(r);return t.length!==2||t[0]!=="a"||t[1]!=="b"});JIt("split",function(r,e,t){var n;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?n=function(i,a){var o=mT(d2(this)),s=a===void 0?y2:a>>>0;if(s===0)return[];if(i===void 0)return[o];if(!tLt(i))return lv(e,o,i,s);for(var A=[],l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),u=0,c=new RegExp(i.source,l+"g"),h,f,p;(h=lv(oLt,c,o))&&(f=c.lastIndex,!(f>u&&(Of(A,uv(o,u,h.index)),h.length>1&&h.index<o.length&&ZIt(ck,A,v2(h,1)),p=h[0].length,u=f,A.length>=s)));)c.lastIndex===h.index&&c.lastIndex++;return u===o.length?(p||!uLt(c,""))&&Of(A,""):Of(A,uv(o,u)),A.length>s?v2(A,0,s):A}:"0".split(void 0,0).length?n=function(i,a){return i===void 0&&a===0?[]:lv(e,this,i,a)}:n=e,[function(a,o){var s=d2(this),A=a==null?void 0:aLt(a,r);return A?lv(A,a,s,o):lv(n,mT(s),a,o)},function(i,a){var o=eLt(this),s=mT(i),A=t(n,o,s,a,n!==e);if(A.done)return A.value;var l=rLt(o,RegExp),u=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Lf?"g":"y"),h=new l(Lf?"^(?:"+o.source+")":o,c),f=a===void 0?y2:a>>>0;if(f===0)return[];if(s.length===0)return g2(h,s)===null?[s]:[];for(var p=0,v=0,m=[];v<s.length;){h.lastIndex=Lf?0:v;var g=g2(h,Lf?uv(s,v):s),_;if(g===null||(_=lLt(iLt(h.lastIndex+(Lf?v:0)),s.length))===p)v=nLt(s,v,u);else{if(Of(m,uv(s,p,v)),m.length===f)return m;for(var E=1;E<=g.length-1;E++)if(Of(m,g[E]),m.length===f)return m;v=p=_}}return Of(m,uv(s,p)),m}]},!cLt,Lf);var dE={exports:{}},Lv={exports:{}};(function(){var r,e,t,n,i,a;typeof performance<"u"&&performance!==null&&performance.now?Lv.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Lv.exports=function(){return(r()-i)/1e6},e=process.hrtime,r=function(){var o;return o=e(),o[0]*1e9+o[1]},n=r(),a=process.uptime()*1e9,i=n-a):Date.now?(Lv.exports=function(){return Date.now()-t},t=Date.now()):(Lv.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(tA);var hLt=Lv.exports,ul=typeof window>"u"?tA:window,L0=["moz","webkit"],_p="AnimationFrame",Hp=ul["request"+_p],Ng=ul["cancel"+_p]||ul["cancelRequest"+_p];for(var cv=0;!Hp&&cv<L0.length;cv++)Hp=ul[L0[cv]+"Request"+_p],Ng=ul[L0[cv]+"Cancel"+_p]||ul[L0[cv]+"CancelRequest"+_p];if(!Hp||!Ng){var _T=0,m2=0,Sc=[],fLt=1e3/60;Hp=function(r){if(Sc.length===0){var e=hLt(),t=Math.max(0,fLt-(e-_T));_T=t+e,setTimeout(function(){var n=Sc.slice(0);Sc.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(_T)}catch(a){setTimeout(function(){throw a},0)}},Math.round(t))}return Sc.push({handle:++m2,callback:r,cancelled:!1}),m2},Ng=function(r){for(var e=0;e<Sc.length;e++)Sc[e].handle===r&&(Sc[e].cancelled=!0)}}dE.exports=function(r){return Hp.call(ul,r)};dE.exports.cancel=function(){Ng.apply(ul,arguments)};dE.exports.polyfill=function(r){r||(r=ul),r.requestAnimationFrame=Hp,r.cancelAnimationFrame=Ng};var wT=dE.exports,hk=`
\v\f\r    \u2028\u2029\uFEFF`,pLt=Cn,dLt=_A,vLt=BA,gLt=hk,_2=pLt("".replace),F1="["+gLt+"]",yLt=RegExp("^"+F1+F1+"*"),mLt=RegExp(F1+F1+"*$"),ET=function(r){return function(e){var t=vLt(dLt(e));return r&1&&(t=_2(t,yLt,"")),r&2&&(t=_2(t,mLt,"")),t}},_Lt={start:ET(1),end:ET(2),trim:ET(3)},wLt=sE.PROPER,ELt=Ti,w2=hk,E2="…",CLt=function(r){return ELt(function(){return!!w2[r]()||E2[r]()!==E2||wLt&&w2[r].name!==r})},BLt=EA,TLt=_Lt.trim,xLt=CLt;BLt({target:"String",proto:!0,forced:xLt("trim")},{trim:function(){return TLt(this)}});var Hb=function(r){this.ok=!1,this.alpha=1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r=r.replace(/ /g,""),r=r.toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};r=e[r]||r;for(var t=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(A){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3]),parseFloat(A[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(A){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(A){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(A){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]}}],n=0;n<t.length;n++){var i=t[n].re,a=t[n].process,o=i.exec(r);if(o){var s=a(o);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var A=this.r.toString(16),l=this.g.toString(16),u=this.b.toString(16);return A.length==1&&(A="0"+A),l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),"#"+A+l+u},this.getHelpXML=function(){for(var A=new Array,l=0;l<t.length;l++)for(var u=t[l].example,c=0;c<u.length;c++)A[A.length]=u[c];for(var h in e)A[A.length]=h;var f=document.createElement("ul");f.setAttribute("id","rgbcolor-examples");for(var l=0;l<A.length;l++)try{var p=document.createElement("li"),v=new RGBColor(A[l]),m=document.createElement("div");m.style.cssText="margin: 3px; border: 1px solid black; background:"+v.toHex()+"; color:"+v.toHex(),m.appendChild(document.createTextNode("test"));var g=document.createTextNode(" "+A[l]+" -> "+v.toRGB()+" -> "+v.toHex());p.appendChild(m),p.appendChild(g),f.appendChild(p)}catch{}return f}},SLt=EA,bLt=Cn,FLt=tO,ILt=_A,C2=BA,LLt=eO,OLt=bLt("".indexOf);SLt({target:"String",proto:!0,forced:!LLt("includes")},{includes:function(e){return!!~OLt(C2(ILt(this)),C2(FLt(e)),arguments.length>1?arguments[1]:void 0)}});var RLt=EA,MLt=Cn,NLt=lG.indexOf,PLt=Ak,Gb=MLt([].indexOf),B2=!!Gb&&1/Gb([1],1,-0)<0,ULt=PLt("indexOf");RLt({target:"Array",proto:!0,forced:B2||!ULt},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return B2?Gb(this,e,t)||0:NLt(this,e,t)}});var DLt=ad,QLt=Array.isArray||function(e){return DLt(e)=="Array"},HLt=EA,GLt=Cn,kLt=QLt,$Lt=GLt([].reverse),T2=[1,2];HLt({target:"Array",proto:!0,forced:String(T2)===String(T2.reverse())},{reverse:function(){return kLt(this)&&(this.length=this.length),$Lt(this)}});/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var fk=function(r,e){return(fk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(r,e)};function pk(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}fk(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function jLt(r){var e="";Array.isArray(r)||(r=[r]);for(var t=0;t<r.length;t++){var n=r[t];if(n.type===$t.CLOSE_PATH)e+="z";else if(n.type===$t.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===$t.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===$t.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===$t.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===$t.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===$t.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===$t.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===$t.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==$t.ARC)throw new Error('Unexpected command type "'+n.type+'" at index '+t+".");e+=(n.relative?"a":"A")+n.rX+" "+n.rY+" "+n.xRot+" "+ +n.lArcFlag+" "+ +n.sweepFlag+" "+n.x+" "+n.y}}return e}function kb(r,e){var t=r[0],n=r[1];return[t*Math.cos(e)-n*Math.sin(e),t*Math.sin(e)+n*Math.cos(e)]}function ws(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error("assertNumbers arguments["+t+"] is not a number. "+typeof r[t]+" == typeof "+r[t]);return!0}var pu=Math.PI;function CT(r,e,t){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;var n=r.rX,i=r.rY,a=r.x,o=r.y;n=Math.abs(r.rX),i=Math.abs(r.rY);var s=kb([(e-a)/2,(t-o)/2],-r.xRot/180*pu),A=s[0],l=s[1],u=Math.pow(A,2)/Math.pow(n,2)+Math.pow(l,2)/Math.pow(i,2);1<u&&(n*=Math.sqrt(u),i*=Math.sqrt(u)),r.rX=n,r.rY=i;var c=Math.pow(n,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(A,2),h=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-c)/c)),f=n*l/i*h,p=-i*A/n*h,v=kb([f,p],r.xRot/180*pu);r.cX=v[0]+(e+a)/2,r.cY=v[1]+(t+o)/2,r.phi1=Math.atan2((l-p)/i,(A-f)/n),r.phi2=Math.atan2((-l-p)/i,(-A-f)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*pu),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*pu),r.phi1*=180/pu,r.phi2*=180/pu}function x2(r,e,t){ws(r,e,t);var n=r*r+e*e-t*t;if(0>n)return[];if(n===0)return[[r*t/(r*r+e*e),e*t/(r*r+e*e)]];var i=Math.sqrt(n);return[[(r*t+e*i)/(r*r+e*e),(e*t-r*i)/(r*r+e*e)],[(r*t-e*i)/(r*r+e*e),(e*t+r*i)/(r*r+e*e)]]}var yi,jA=Math.PI/180;function S2(r,e,t){return(1-t)*r+t*e}function b2(r,e,t,n){return r+Math.cos(n/180*pu)*e+Math.sin(n/180*pu)*t}function F2(r,e,t,n){var i=1e-6,a=e-r,o=t-e,s=3*a+3*(n-t)-6*o,A=6*(o-a),l=3*a;return Math.abs(s)<i?[-l/A]:function(u,c,h){h===void 0&&(h=1e-6);var f=u*u/4-c;if(f<-h)return[];if(f<=h)return[-u/2];var p=Math.sqrt(f);return[-u/2-p,-u/2+p]}(A/s,l/s,i)}function I2(r,e,t,n,i){var a=1-i;return r*(a*a*a)+e*(3*a*a*i)+t*(3*a*i*i)+n*(i*i*i)}(function(r){function e(){return i(function(s,A,l){return s.relative&&(s.x1!==void 0&&(s.x1+=A),s.y1!==void 0&&(s.y1+=l),s.x2!==void 0&&(s.x2+=A),s.y2!==void 0&&(s.y2+=l),s.x!==void 0&&(s.x+=A),s.y!==void 0&&(s.y+=l),s.relative=!1),s})}function t(){var s=NaN,A=NaN,l=NaN,u=NaN;return i(function(c,h,f){return c.type&$t.SMOOTH_CURVE_TO&&(c.type=$t.CURVE_TO,s=isNaN(s)?h:s,A=isNaN(A)?f:A,c.x1=c.relative?h-s:2*h-s,c.y1=c.relative?f-A:2*f-A),c.type&$t.CURVE_TO?(s=c.relative?h+c.x2:c.x2,A=c.relative?f+c.y2:c.y2):(s=NaN,A=NaN),c.type&$t.SMOOTH_QUAD_TO&&(c.type=$t.QUAD_TO,l=isNaN(l)?h:l,u=isNaN(u)?f:u,c.x1=c.relative?h-l:2*h-l,c.y1=c.relative?f-u:2*f-u),c.type&$t.QUAD_TO?(l=c.relative?h+c.x1:c.x1,u=c.relative?f+c.y1:c.y1):(l=NaN,u=NaN),c})}function n(){var s=NaN,A=NaN;return i(function(l,u,c){if(l.type&$t.SMOOTH_QUAD_TO&&(l.type=$t.QUAD_TO,s=isNaN(s)?u:s,A=isNaN(A)?c:A,l.x1=l.relative?u-s:2*u-s,l.y1=l.relative?c-A:2*c-A),l.type&$t.QUAD_TO){s=l.relative?u+l.x1:l.x1,A=l.relative?c+l.y1:l.y1;var h=l.x1,f=l.y1;l.type=$t.CURVE_TO,l.x1=((l.relative?0:u)+2*h)/3,l.y1=((l.relative?0:c)+2*f)/3,l.x2=(l.x+2*h)/3,l.y2=(l.y+2*f)/3}else s=NaN,A=NaN;return l})}function i(s){var A=0,l=0,u=NaN,c=NaN;return function(h){if(isNaN(u)&&!(h.type&$t.MOVE_TO))throw new Error("path must start with moveto");var f=s(h,A,l,u,c);return h.type&$t.CLOSE_PATH&&(A=u,l=c),h.x!==void 0&&(A=h.relative?A+h.x:h.x),h.y!==void 0&&(l=h.relative?l+h.y:h.y),h.type&$t.MOVE_TO&&(u=A,c=l),f}}function a(s,A,l,u,c,h){return ws(s,A,l,u,c,h),i(function(f,p,v,m){var g=f.x1,_=f.x2,E=f.relative&&!isNaN(m),B=f.x!==void 0?f.x:E?0:p,L=f.y!==void 0?f.y:E?0:v;function O(R){return R*R}f.type&$t.HORIZ_LINE_TO&&A!==0&&(f.type=$t.LINE_TO,f.y=f.relative?0:v),f.type&$t.VERT_LINE_TO&&l!==0&&(f.type=$t.LINE_TO,f.x=f.relative?0:p),f.x!==void 0&&(f.x=f.x*s+L*l+(E?0:c)),f.y!==void 0&&(f.y=B*A+f.y*u+(E?0:h)),f.x1!==void 0&&(f.x1=f.x1*s+f.y1*l+(E?0:c)),f.y1!==void 0&&(f.y1=g*A+f.y1*u+(E?0:h)),f.x2!==void 0&&(f.x2=f.x2*s+f.y2*l+(E?0:c)),f.y2!==void 0&&(f.y2=_*A+f.y2*u+(E?0:h));var b=s*u-A*l;if(f.xRot!==void 0&&(s!==1||A!==0||l!==0||u!==1))if(b===0)delete f.rX,delete f.rY,delete f.xRot,delete f.lArcFlag,delete f.sweepFlag,f.type=$t.LINE_TO;else{var T=f.xRot*Math.PI/180,F=Math.sin(T),M=Math.cos(T),S=1/O(f.rX),x=1/O(f.rY),N=O(M)*S+O(F)*x,P=2*F*M*(S-x),Y=O(F)*S+O(M)*x,z=N*u*u-P*A*u+Y*A*A,tt=P*(s*u+A*l)-2*(N*l*u+Y*s*A),J=N*l*l-P*s*l+Y*s*s,nt=(Math.atan2(tt,z-J)+Math.PI)%Math.PI/2,it=Math.sin(nt),_t=Math.cos(nt);f.rX=Math.abs(b)/Math.sqrt(z*O(_t)+tt*it*_t+J*O(it)),f.rY=Math.abs(b)/Math.sqrt(z*O(it)-tt*it*_t+J*O(_t)),f.xRot=180*nt/Math.PI}return f.sweepFlag!==void 0&&0>b&&(f.sweepFlag=+!f.sweepFlag),f})}function o(){return function(s){var A={};for(var l in s)A[l]=s[l];return A}}r.ROUND=function(s){function A(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),ws(s),function(l){return l.x1!==void 0&&(l.x1=A(l.x1)),l.y1!==void 0&&(l.y1=A(l.y1)),l.x2!==void 0&&(l.x2=A(l.x2)),l.y2!==void 0&&(l.y2=A(l.y2)),l.x!==void 0&&(l.x=A(l.x)),l.y!==void 0&&(l.y=A(l.y)),l.rX!==void 0&&(l.rX=A(l.rX)),l.rY!==void 0&&(l.rY=A(l.rY)),l}},r.TO_ABS=e,r.TO_REL=function(){return i(function(s,A,l){return s.relative||(s.x1!==void 0&&(s.x1-=A),s.y1!==void 0&&(s.y1-=l),s.x2!==void 0&&(s.x2-=A),s.y2!==void 0&&(s.y2-=l),s.x!==void 0&&(s.x-=A),s.y!==void 0&&(s.y-=l),s.relative=!0),s})},r.NORMALIZE_HVZ=function(s,A,l){return s===void 0&&(s=!0),A===void 0&&(A=!0),l===void 0&&(l=!0),i(function(u,c,h,f,p){if(isNaN(f)&&!(u.type&$t.MOVE_TO))throw new Error("path must start with moveto");return A&&u.type&$t.HORIZ_LINE_TO&&(u.type=$t.LINE_TO,u.y=u.relative?0:h),l&&u.type&$t.VERT_LINE_TO&&(u.type=$t.LINE_TO,u.x=u.relative?0:c),s&&u.type&$t.CLOSE_PATH&&(u.type=$t.LINE_TO,u.x=u.relative?f-c:f,u.y=u.relative?p-h:p),u.type&$t.ARC&&(u.rX===0||u.rY===0)&&(u.type=$t.LINE_TO,delete u.rX,delete u.rY,delete u.xRot,delete u.lArcFlag,delete u.sweepFlag),u})},r.NORMALIZE_ST=t,r.QT_TO_C=n,r.INFO=i,r.SANITIZE=function(s){s===void 0&&(s=0),ws(s);var A=NaN,l=NaN,u=NaN,c=NaN;return i(function(h,f,p,v,m){var g=Math.abs,_=!1,E=0,B=0;if(h.type&$t.SMOOTH_CURVE_TO&&(E=isNaN(A)?0:f-A,B=isNaN(l)?0:p-l),h.type&($t.CURVE_TO|$t.SMOOTH_CURVE_TO)?(A=h.relative?f+h.x2:h.x2,l=h.relative?p+h.y2:h.y2):(A=NaN,l=NaN),h.type&$t.SMOOTH_QUAD_TO?(u=isNaN(u)?f:2*f-u,c=isNaN(c)?p:2*p-c):h.type&$t.QUAD_TO?(u=h.relative?f+h.x1:h.x1,c=h.relative?p+h.y1:h.y2):(u=NaN,c=NaN),h.type&$t.LINE_COMMANDS||h.type&$t.ARC&&(h.rX===0||h.rY===0||!h.lArcFlag)||h.type&$t.CURVE_TO||h.type&$t.SMOOTH_CURVE_TO||h.type&$t.QUAD_TO||h.type&$t.SMOOTH_QUAD_TO){var L=h.x===void 0?0:h.relative?h.x:h.x-f,O=h.y===void 0?0:h.relative?h.y:h.y-p;E=isNaN(u)?h.x1===void 0?E:h.relative?h.x:h.x1-f:u-f,B=isNaN(c)?h.y1===void 0?B:h.relative?h.y:h.y1-p:c-p;var b=h.x2===void 0?0:h.relative?h.x:h.x2-f,T=h.y2===void 0?0:h.relative?h.y:h.y2-p;g(L)<=s&&g(O)<=s&&g(E)<=s&&g(B)<=s&&g(b)<=s&&g(T)<=s&&(_=!0)}return h.type&$t.CLOSE_PATH&&g(f-v)<=s&&g(p-m)<=s&&(_=!0),_?[]:h})},r.MATRIX=a,r.ROTATE=function(s,A,l){A===void 0&&(A=0),l===void 0&&(l=0),ws(s,A,l);var u=Math.sin(s),c=Math.cos(s);return a(c,u,-u,c,A-A*c+l*u,l-A*u-l*c)},r.TRANSLATE=function(s,A){return A===void 0&&(A=0),ws(s,A),a(1,0,0,1,s,A)},r.SCALE=function(s,A){return A===void 0&&(A=s),ws(s,A),a(s,0,0,A,0,0)},r.SKEW_X=function(s){return ws(s),a(1,0,Math.atan(s),1,0,0)},r.SKEW_Y=function(s){return ws(s),a(1,Math.atan(s),0,1,0,0)},r.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ws(s),a(-1,0,0,1,s,0)},r.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ws(s),a(1,0,0,-1,0,s)},r.A_TO_C=function(){return i(function(s,A,l){return $t.ARC===s.type?function(u,c,h){var f,p,v,m;u.cX||CT(u,c,h);for(var g=Math.min(u.phi1,u.phi2),_=Math.max(u.phi1,u.phi2)-g,E=Math.ceil(_/90),B=new Array(E),L=c,O=h,b=0;b<E;b++){var T=S2(u.phi1,u.phi2,b/E),F=S2(u.phi1,u.phi2,(b+1)/E),M=F-T,S=4/3*Math.tan(M*jA/4),x=[Math.cos(T*jA)-S*Math.sin(T*jA),Math.sin(T*jA)+S*Math.cos(T*jA)],N=x[0],P=x[1],Y=[Math.cos(F*jA),Math.sin(F*jA)],z=Y[0],tt=Y[1],J=[z+S*Math.sin(F*jA),tt-S*Math.cos(F*jA)],nt=J[0],it=J[1];B[b]={relative:u.relative,type:$t.CURVE_TO};var _t=function(R,$){var K=kb([R*u.rX,$*u.rY],u.xRot),q=K[0],at=K[1];return[u.cX+q,u.cY+at]};f=_t(N,P),B[b].x1=f[0],B[b].y1=f[1],p=_t(nt,it),B[b].x2=p[0],B[b].y2=p[1],v=_t(z,tt),B[b].x=v[0],B[b].y=v[1],u.relative&&(B[b].x1-=L,B[b].y1-=O,B[b].x2-=L,B[b].y2-=O,B[b].x-=L,B[b].y-=O),L=(m=[B[b].x,B[b].y])[0],O=m[1]}return B}(s,s.relative?0:A,s.relative?0:l):s})},r.ANNOTATE_ARCS=function(){return i(function(s,A,l){return s.relative&&(A=0,l=0),$t.ARC===s.type&&CT(s,A,l),s})},r.CLONE=o,r.CALCULATE_BOUNDS=function(){var s=function(h){var f={};for(var p in h)f[p]=h[p];return f},A=e(),l=n(),u=t(),c=i(function(h,f,p){var v=u(l(A(s(h))));function m(it){it>c.maxX&&(c.maxX=it),it<c.minX&&(c.minX=it)}function g(it){it>c.maxY&&(c.maxY=it),it<c.minY&&(c.minY=it)}if(v.type&$t.DRAWING_COMMANDS&&(m(f),g(p)),v.type&$t.HORIZ_LINE_TO&&m(v.x),v.type&$t.VERT_LINE_TO&&g(v.y),v.type&$t.LINE_TO&&(m(v.x),g(v.y)),v.type&$t.CURVE_TO){m(v.x),g(v.y);for(var _=0,E=F2(f,v.x1,v.x2,v.x);_<E.length;_++)0<(nt=E[_])&&1>nt&&m(I2(f,v.x1,v.x2,v.x,nt));for(var B=0,L=F2(p,v.y1,v.y2,v.y);B<L.length;B++)0<(nt=L[B])&&1>nt&&g(I2(p,v.y1,v.y2,v.y,nt))}if(v.type&$t.ARC){m(v.x),g(v.y),CT(v,f,p);for(var O=v.xRot/180*Math.PI,b=Math.cos(O)*v.rX,T=Math.sin(O)*v.rX,F=-Math.sin(O)*v.rY,M=Math.cos(O)*v.rY,S=v.phi1<v.phi2?[v.phi1,v.phi2]:-180>v.phi2?[v.phi2+360,v.phi1+360]:[v.phi2,v.phi1],x=S[0],N=S[1],P=function(it){var _t=it[0],R=it[1],$=180*Math.atan2(R,_t)/Math.PI;return $<x?$+360:$},Y=0,z=x2(F,-b,0).map(P);Y<z.length;Y++)(nt=z[Y])>x&&nt<N&&m(b2(v.cX,b,F,nt));for(var tt=0,J=x2(M,-T,0).map(P);tt<J.length;tt++){var nt;(nt=J[tt])>x&&nt<N&&g(b2(v.cY,T,M,nt))}}return h});return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}})(yi||(yi={}));var ms,dk=function(){function r(){}return r.prototype.round=function(e){return this.transform(yi.ROUND(e))},r.prototype.toAbs=function(){return this.transform(yi.TO_ABS())},r.prototype.toRel=function(){return this.transform(yi.TO_REL())},r.prototype.normalizeHVZ=function(e,t,n){return this.transform(yi.NORMALIZE_HVZ(e,t,n))},r.prototype.normalizeST=function(){return this.transform(yi.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(yi.QT_TO_C())},r.prototype.aToC=function(){return this.transform(yi.A_TO_C())},r.prototype.sanitize=function(e){return this.transform(yi.SANITIZE(e))},r.prototype.translate=function(e,t){return this.transform(yi.TRANSLATE(e,t))},r.prototype.scale=function(e,t){return this.transform(yi.SCALE(e,t))},r.prototype.rotate=function(e,t,n){return this.transform(yi.ROTATE(e,t,n))},r.prototype.matrix=function(e,t,n,i,a,o){return this.transform(yi.MATRIX(e,t,n,i,a,o))},r.prototype.skewX=function(e){return this.transform(yi.SKEW_X(e))},r.prototype.skewY=function(e){return this.transform(yi.SKEW_Y(e))},r.prototype.xSymmetry=function(e){return this.transform(yi.X_AXIS_SYMMETRY(e))},r.prototype.ySymmetry=function(e){return this.transform(yi.Y_AXIS_SYMMETRY(e))},r.prototype.annotateArcs=function(){return this.transform(yi.ANNOTATE_ARCS())},r}(),VLt=function(r){return r===" "||r===" "||r==="\r"||r===`
`},L2=function(r){return"0".charCodeAt(0)<=r.charCodeAt(0)&&r.charCodeAt(0)<="9".charCodeAt(0)},KLt=function(r){function e(){var t=r.call(this)||this;return t.curNumber="",t.curCommandType=-1,t.curCommandRelative=!1,t.canParseCommandOrComma=!0,t.curNumberHasExp=!1,t.curNumberHasExpDigits=!1,t.curNumberHasDecimal=!1,t.curArgs=[],t}return pk(e,r),e.prototype.finish=function(t){if(t===void 0&&(t=[]),this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,n){var i=this;n===void 0&&(n=[]);for(var a=function(c){n.push(c),i.curArgs.length=0,i.canParseCommandOrComma=!0},o=0;o<t.length;o++){var s=t[o],A=!(this.curCommandType!==$t.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=L2(s)&&(this.curNumber==="0"&&s==="0"||A);if(!L2(s)||l)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||A){if(this.curNumber&&this.curCommandType!==-1){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===$t.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+o+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"')}this.curArgs.push(u),this.curArgs.length===zLt[this.curCommandType]&&($t.HORIZ_LINE_TO===this.curCommandType?a({type:$t.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):$t.VERT_LINE_TO===this.curCommandType?a({type:$t.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===$t.MOVE_TO||this.curCommandType===$t.LINE_TO||this.curCommandType===$t.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),$t.MOVE_TO===this.curCommandType&&(this.curCommandType=$t.LINE_TO)):this.curCommandType===$t.CURVE_TO?a({type:$t.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===$t.SMOOTH_CURVE_TO?a({type:$t.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===$t.QUAD_TO?a({type:$t.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===$t.ARC&&a({type:$t.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!VLt(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(l)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=$t.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=$t.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=$t.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=$t.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=$t.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=$t.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=$t.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=$t.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=$t.ARC,this.curCommandRelative=s==="a"}else n.push({type:$t.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return n},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(n,i){i===void 0&&(i=[]);for(var a=0,o=Object.getPrototypeOf(this).parse.call(this,n);a<o.length;a++){var s=o[a],A=t(s);Array.isArray(A)?i.push.apply(i,A):i.push(A)}return i}}})},e}(dk),$t=function(r){function e(t){var n=r.call(this)||this;return n.commands=typeof t=="string"?e.parse(t):t,n}return pk(e,r),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=yi.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var n=[],i=0,a=this.commands;i<a.length;i++){var o=t(a[i]);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return this.commands=n,this},e.encode=function(t){return jLt(t)},e.parse=function(t){var n=new KLt,i=[];return n.parse(t,i),n.finish(i),i},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(dk),zLt=((ms={})[$t.MOVE_TO]=2,ms[$t.LINE_TO]=2,ms[$t.HORIZ_LINE_TO]=1,ms[$t.VERT_LINE_TO]=1,ms[$t.CLOSE_PATH]=0,ms[$t.QUAD_TO]=4,ms[$t.SMOOTH_QUAD_TO]=2,ms[$t.CURVE_TO]=6,ms[$t.SMOOTH_CURVE_TO]=4,ms[$t.ARC]=7,ms),XLt=Cn,YLt=sE.PROPER,WLt=sc.exports,qLt=Oa,ZLt=Jw,O2=BA,JLt=Ti,tOt=kG,aO="toString",$b=RegExp.prototype,vk=$b[aO],eOt=XLt(tOt),rOt=JLt(function(){return vk.call({source:"a",flags:"b"})!="/a/b"}),nOt=YLt&&vk.name!=aO;(rOt||nOt)&&WLt(RegExp.prototype,aO,function(){var e=qLt(this),t=O2(e.source),n=e.flags,i=O2(n===void 0&&ZLt($b,e)&&!("flags"in $b)?eOt(e):n);return"/"+t+"/"+i},{unsafe:!0});function c_(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c_=function(e){return typeof e}:c_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c_(r)}function iOt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var aOt=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],oOt=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function sOt(r,e,t,n,i){if(typeof r=="string"&&(r=document.getElementById(r)),!r||c_(r)!=="object"||!("getContext"in r))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=r.getContext("2d");try{return a.getImageData(e,t,n,i)}catch(o){throw new Error("unable to access image data: "+o)}}function AOt(r,e,t,n,i,a){if(!(isNaN(a)||a<1)){a|=0;var o=sOt(r,e,t,n,i);o=lOt(o,e,t,n,i,a),r.getContext("2d").putImageData(o,e,t)}}function lOt(r,e,t,n,i,a){for(var o=r.data,s=2*a+1,A=n-1,l=i-1,u=a+1,c=u*(u+1)/2,h=new R2,f=h,p,v=1;v<s;v++)f=f.next=new R2,v===u&&(p=f);f.next=h;for(var m=null,g=null,_=0,E=0,B=aOt[a],L=oOt[a],O=0;O<i;O++){f=h;for(var b=o[E],T=o[E+1],F=o[E+2],M=o[E+3],S=0;S<u;S++)f.r=b,f.g=T,f.b=F,f.a=M,f=f.next;for(var x=0,N=0,P=0,Y=0,z=u*b,tt=u*T,J=u*F,nt=u*M,it=c*b,_t=c*T,R=c*F,$=c*M,K=1;K<u;K++){var q=E+((A<K?A:K)<<2),at=o[q],vt=o[q+1],wt=o[q+2],W=o[q+3],Ft=u-K;it+=(f.r=at)*Ft,_t+=(f.g=vt)*Ft,R+=(f.b=wt)*Ft,$+=(f.a=W)*Ft,x+=at,N+=vt,P+=wt,Y+=W,f=f.next}m=h,g=p;for(var Ot=0;Ot<n;Ot++){var V=$*B>>L;if(o[E+3]=V,V!==0){var Z=255/V;o[E]=(it*B>>L)*Z,o[E+1]=(_t*B>>L)*Z,o[E+2]=(R*B>>L)*Z}else o[E]=o[E+1]=o[E+2]=0;it-=z,_t-=tt,R-=J,$-=nt,z-=m.r,tt-=m.g,J-=m.b,nt-=m.a;var ut=Ot+a+1;ut=_+(ut<A?ut:A)<<2,x+=m.r=o[ut],N+=m.g=o[ut+1],P+=m.b=o[ut+2],Y+=m.a=o[ut+3],it+=x,_t+=N,R+=P,$+=Y,m=m.next;var rt=g,G=rt.r,St=rt.g,bt=rt.b,dt=rt.a;z+=G,tt+=St,J+=bt,nt+=dt,x-=G,N-=St,P-=bt,Y-=dt,g=g.next,E+=4}_+=n}for(var Et=0;Et<n;Et++){E=Et<<2;var yt=o[E],xt=o[E+1],It=o[E+2],Mt=o[E+3],Vt=u*yt,Yt=u*xt,ae=u*It,re=u*Mt,Wt=c*yt,se=c*xt,zt=c*It,We=c*Mt;f=h;for(var Me=0;Me<u;Me++)f.r=yt,f.g=xt,f.b=It,f.a=Mt,f=f.next;for(var dr=n,Ie=0,be=0,An=0,Ar=0,xi=1;xi<=a;xi++){E=dr+Et<<2;var Tr=u-xi;Wt+=(f.r=yt=o[E])*Tr,se+=(f.g=xt=o[E+1])*Tr,zt+=(f.b=It=o[E+2])*Tr,We+=(f.a=Mt=o[E+3])*Tr,Ar+=yt,Ie+=xt,be+=It,An+=Mt,f=f.next,xi<l&&(dr+=n)}E=Et,m=h,g=p;for(var hi=0;hi<i;hi++){var Vr=E<<2;o[Vr+3]=Mt=We*B>>L,Mt>0?(Mt=255/Mt,o[Vr]=(Wt*B>>L)*Mt,o[Vr+1]=(se*B>>L)*Mt,o[Vr+2]=(zt*B>>L)*Mt):o[Vr]=o[Vr+1]=o[Vr+2]=0,Wt-=Vt,se-=Yt,zt-=ae,We-=re,Vt-=m.r,Yt-=m.g,ae-=m.b,re-=m.a,Vr=Et+((Vr=hi+u)<l?Vr:l)*n<<2,Wt+=Ar+=m.r=o[Vr],se+=Ie+=m.g=o[Vr+1],zt+=be+=m.b=o[Vr+2],We+=An+=m.a=o[Vr+3],m=m.next,Vt+=yt=g.r,Yt+=xt=g.g,ae+=It=g.b,re+=Mt=g.a,Ar-=yt,Ie-=xt,be-=It,An-=Mt,g=g.next,E+=n}}return r}var R2=function r(){iOt(this,r),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function uOt(){var{DOMParser:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:r,createCanvas(t,n){return new OffscreenCanvas(t,n)},createImage(t){return _l(function*(){var n=yield fetch(t),i=yield n.blob(),a=yield createImageBitmap(i);return a})()}};return(typeof DOMParser<"u"||typeof r>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function cOt(r){var{DOMParser:e,canvas:t,fetch:n}=r;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:n,createCanvas:t.createCanvas,createImage:t.loadImage}}var hOt=Object.freeze({__proto__:null,offscreen:uOt,node:cOt});function kh(r){return r.replace(/(?!\u3000)\s+/gm," ")}function gk(r){return r.replace(/^[\n \t]+/,"")}function yk(r){return r.replace(/[\n \t]+$/,"")}function co(r){var e=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var fOt=/^[A-Z-]+$/;function mk(r){return fOt.test(r)?r.toLowerCase():r}function oO(r){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return e[2]||e[3]||e[4]}function _k(r){if(!r.startsWith("rgb"))return r;var e=3,t=r.replace(/\d+(\.\d+)?/g,(n,i)=>e--&&i?String(Math.round(parseFloat(n))):n);return t}var pOt=/(\[[^\]]+\])/g,dOt=/(#[^\s+>~.[:]+)/g,vOt=/(\.[^\s+>~.[:]+)/g,gOt=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,yOt=/(:[\w-]+\([^)]*\))/gi,mOt=/(:[^\s+>~.[:]+)/g,_Ot=/([^\s+>~.[:]+)/g;function bc(r,e){var t=e.exec(r);return t?[r.replace(e," "),t.length]:[r,0]}function wk(r){var e=[0,0,0],t=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[t,n]=bc(t,pOt),e[1]+=n,[t,n]=bc(t,dOt),e[0]+=n,[t,n]=bc(t,vOt),e[1]+=n,[t,n]=bc(t,gOt),e[2]+=n,[t,n]=bc(t,yOt),e[1]+=n,[t,n]=bc(t,mOt),e[1]+=n,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,n]=bc(t,_Ot),e[2]+=n,e.join("")}var sh=1e-8;function jb(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function I1(r,e){return(r[0]*e[0]+r[1]*e[1])/(jb(r)*jb(e))}function Vb(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(I1(r,e))}function Kb(r){return r*r*r}function zb(r){return 3*r*r*(1-r)}function Xb(r){return 3*r*(1-r)*(1-r)}function Yb(r){return(1-r)*(1-r)*(1-r)}function Wb(r){return r*r}function qb(r){return 2*r*(1-r)}function Zb(r){return(1-r)*(1-r)}class Se{constructor(e,t,n){this.document=e,this.name=t,this.value=n,this.isNormalizedColor=!1}static empty(e){return new Se(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:n}=this;return kh(this.getString()).trim().split(e).map(i=>new Se(t,n,i))}hasValue(e){var{value:t}=this;return t!==null&&t!==""&&(e||t!==0)&&typeof t<"u"}isString(e){var{value:t}=this,n=typeof t=="string";return!n||!e?n:e.test(t)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:t}=this,n=parseFloat(t);return this.isString(/%$/)&&(n/=100),n}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var t=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=_k(t),this.value=t),t}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[n,i]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:a}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*a.computeSize(n);default:{var o=this.getNumber();return t&&o<1?o*a.computeSize(n):o}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),t=/#([^)'"]+)/.exec(e);return t&&(t=t[1]),t||(t=e),this.document.definitions[t]}getFillStyleDefinition(e,t){var n=this.getDefinition();if(!n)return null;if(typeof n.createGradient=="function")return n.createGradient(this.document.ctx,e,t);if(typeof n.createPattern=="function"){if(n.getHrefAttribute().hasValue()){var i=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),i.hasValue()&&n.getAttribute("patternTransform",!0).setValue(i.value)}return n.createPattern(this.document.ctx,e,t)}return null}getTextBaseline(){return this.hasValue()?Se.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var t=this.getColor(),n=t.length,i=0,a=0;a<n&&(t[a]===","&&i++,i!==3);a++);if(e.hasValue()&&this.isString()&&i!==3){var o=new Hb(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new Se(this.document,this.name,t)}}Se.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class Ek{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,t){this.viewPorts.push({width:e,height:t})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class jn{constructor(e,t){this.x=e,this.y=t}static parse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[n=t,i=t]=co(e);return new jn(n,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=t,i=n]=co(e);return new jn(n,i)}static parsePath(e){for(var t=co(e),n=t.length,i=[],a=0;a<n;a+=2)i.push(new jn(t[a],t[a+1]));return i}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:t,y:n}=this,i=t*e[0]+n*e[2]+e[4],a=t*e[1]+n*e[3]+e[5];this.x=i,this.y=a}}class Ck{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:t,onMouseMove:n}=this,i=e.ctx.canvas;i.onclick=t,i.onmousemove=n,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:t,eventElements:n}=this,{style:i}=e.ctx.canvas;i&&(i.cursor=""),t.forEach((a,o)=>{for(var{run:s}=a,A=n[o];A;)s(A),A=A.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(!(!this.working||!t)){var{events:n,eventElements:i}=this;n.forEach((a,o)=>{var{x:s,y:A}=a;!i[o]&&t.isPointInPath&&t.isPointInPath(s,A)&&(i[o]=e)})}}checkBoundingBox(e,t){if(!(!this.working||!t)){var{events:n,eventElements:i}=this;n.forEach((a,o)=>{var{x:s,y:A}=a;!i[o]&&t.isPointInBox(s,A)&&(i[o]=e)})}}mapXY(e,t){for(var{window:n,ctx:i}=this.screen,a=new jn(e,t),o=i.canvas;o;)a.x-=o.offsetLeft,a.y-=o.offsetTop,o=o.offsetParent;return n.scrollX&&(a.x+=n.scrollX),n.scrollY&&(a.y+=n.scrollY),a}onClick(e){var{x:t,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:t,y:n,run(i){i.onClick&&i.onClick()}})}onMouseMove(e){var{x:t,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:t,y:n,run(i){i.onMouseMove&&i.onMouseMove()}})}}var Bk=typeof window<"u"?window:null,Tk=typeof fetch<"u"?fetch.bind(void 0):null;class Cy{constructor(e){var{fetch:t=Tk,window:n=Bk}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Ek,this.mouse=new Ck(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,this.fetch=t}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(t=>t());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:t,ctx:n,aspectRatio:i,width:a,desiredWidth:o,height:s,desiredHeight:A,minX:l=0,minY:u=0,refX:c,refY:h,clip:f=!1,clipX:p=0,clipY:v=0}=e,m=kh(i).replace(/^defer\s/,""),[g,_]=m.split(" "),E=g||"xMidYMid",B=_||"meet",L=a/o,O=s/A,b=Math.min(L,O),T=Math.max(L,O),F=o,M=A;B==="meet"&&(F*=b,M*=b),B==="slice"&&(F*=T,M*=T);var S=new Se(t,"refX",c),x=new Se(t,"refY",h),N=S.hasValue()&&x.hasValue();if(N&&n.translate(-b*S.getPixels("x"),-b*x.getPixels("y")),f){var P=b*p,Y=b*v;n.beginPath(),n.moveTo(P,Y),n.lineTo(a,Y),n.lineTo(a,s),n.lineTo(P,s),n.closePath(),n.clip()}if(!N){var z=B==="meet"&&b===O,tt=B==="slice"&&T===O,J=B==="meet"&&b===L,nt=B==="slice"&&T===L;E.startsWith("xMid")&&(z||tt)&&n.translate(a/2-F/2,0),E.endsWith("YMid")&&(J||nt)&&n.translate(0,s/2-M/2),E.startsWith("xMax")&&(z||tt)&&n.translate(a-F,0),E.endsWith("YMax")&&(J||nt)&&n.translate(0,s-M)}switch(!0){case E==="none":n.scale(L,O);break;case B==="meet":n.scale(b,b);break;case B==="slice":n.scale(T,T);break}n.translate(-l,-u)}start(e){var{enableRedraw:t=!1,ignoreMouse:n=!1,ignoreAnimation:i=!1,ignoreDimensions:a=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:A,scaleHeight:l,offsetX:u,offsetY:c}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:h,mouse:f}=this,p=1e3/h;if(this.frameDuration=p,this.readyPromise=new Promise(E=>{this.resolveReady=E}),this.isReady()&&this.render(e,a,o,A,l,u,c),!!t){var v=Date.now(),m=v,g=0,_=()=>{v=Date.now(),g=v-m,g>=p&&(m=v-g%p,this.shouldUpdate(i,s)&&(this.render(e,a,o,A,l,u,c),f.runEvents())),this.intervalId=wT(_)};n||f.start(),this.intervalId=wT(_)}}stop(){this.intervalId&&(wT.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){var{frameDuration:n}=this,i=this.animations.reduce((a,o)=>o.update(n)||a,!1);if(i)return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,t,n,i,a,o,s){var{CLIENT_WIDTH:A,CLIENT_HEIGHT:l,viewPort:u,ctx:c,isFirstRender:h}=this,f=c.canvas;u.clear(),f.width&&f.height?u.setCurrent(f.width,f.height):u.setCurrent(A,l);var p=e.getStyle("width"),v=e.getStyle("height");!t&&(h||typeof i!="number"&&typeof a!="number")&&(p.hasValue()&&(f.width=p.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),v.hasValue()&&(f.height=v.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var m=f.clientWidth||f.width,g=f.clientHeight||f.height;if(t&&p.hasValue()&&v.hasValue()&&(m=p.getPixels("x"),g=v.getPixels("y")),u.setCurrent(m,g),typeof o=="number"&&e.getAttribute("x",!0).setValue(o),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof i=="number"||typeof a=="number"){var _=co(e.getAttribute("viewBox").getString()),E=0,B=0;if(typeof i=="number"){var L=e.getStyle("width");L.hasValue()?E=L.getPixels("x")/i:isNaN(_[2])||(E=_[2]/i)}if(typeof a=="number"){var O=e.getStyle("height");O.hasValue()?B=O.getPixels("y")/a:isNaN(_[3])||(B=_[3]/a)}E||(E=B),B||(B=E),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(a);var b=e.getStyle("transform",!0,!0);b.setValue("".concat(b.getString()," scale(").concat(1/E,", ").concat(1/B,")"))}n||c.clearRect(0,0,m,g),e.render(c),h&&(this.isFirstRender=!1)}}Cy.defaultWindow=Bk;Cy.defaultFetch=Tk;var{defaultFetch:wOt}=Cy,EOt=typeof DOMParser<"u"?DOMParser:null;class h_{constructor(){var{fetch:e=wOt,DOMParser:t=EOt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return _l(function*(){return e.startsWith("<")?t.parseFromString(e):t.load(e)})()}parseFromString(e){var t=new this.DOMParser;try{return this.checkDocument(t.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(t.parseFromString(e,"text/xml"))}}checkDocument(e){var t=e.getElementsByTagName("parsererror")[0];if(t)throw new Error(t.textContent);return e}load(e){var t=this;return _l(function*(){var n=yield t.fetch(e),i=yield n.text();return t.parseFromString(i)})()}}class xk{constructor(e,t){this.type="translate",this.point=null,this.point=jn.parse(t)}apply(e){var{x:t,y:n}=this.point;e.translate(t||0,n||0)}unapply(e){var{x:t,y:n}=this.point;e.translate(-1*t||0,-1*n||0)}applyToPoint(e){var{x:t,y:n}=this.point;e.applyTransform([1,0,0,1,t||0,n||0])}}class Sk{constructor(e,t,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=co(t);this.angle=new Se(e,"angle",i[0]),this.originX=n[0],this.originY=n[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(e){var{cx:t,cy:n,originX:i,originY:a,angle:o}=this,s=t+i.getPixels("x"),A=n+a.getPixels("y");e.translate(s,A),e.rotate(o.getRadians()),e.translate(-s,-A)}unapply(e){var{cx:t,cy:n,originX:i,originY:a,angle:o}=this,s=t+i.getPixels("x"),A=n+a.getPixels("y");e.translate(s,A),e.rotate(-1*o.getRadians()),e.translate(-s,-A)}applyToPoint(e){var{cx:t,cy:n,angle:i}=this,a=i.getRadians();e.applyTransform([1,0,0,1,t||0,n||0]),e.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]),e.applyTransform([1,0,0,1,-t||0,-n||0])}}class bk{constructor(e,t,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=jn.parseScale(t);(i.x===0||i.y===0)&&(i.x=sh,i.y=sh),this.scale=i,this.originX=n[0],this.originY=n[1]}apply(e){var{scale:{x:t,y:n},originX:i,originY:a}=this,o=i.getPixels("x"),s=a.getPixels("y");e.translate(o,s),e.scale(t,n||t),e.translate(-o,-s)}unapply(e){var{scale:{x:t,y:n},originX:i,originY:a}=this,o=i.getPixels("x"),s=a.getPixels("y");e.translate(o,s),e.scale(1/t,1/n||t),e.translate(-o,-s)}applyToPoint(e){var{x:t,y:n}=this.scale;e.applyTransform([t||0,0,0,n||0,0,0])}}class sO{constructor(e,t,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=co(t),this.originX=n[0],this.originY=n[1]}apply(e){var{originX:t,originY:n,matrix:i}=this,a=t.getPixels("x"),o=n.getPixels("y");e.translate(a,o),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-a,-o)}unapply(e){var{originX:t,originY:n,matrix:i}=this,a=i[0],o=i[2],s=i[4],A=i[1],l=i[3],u=i[5],c=0,h=0,f=1,p=1/(a*(l*f-u*h)-o*(A*f-u*c)+s*(A*h-l*c)),v=t.getPixels("x"),m=n.getPixels("y");e.translate(v,m),e.transform(p*(l*f-u*h),p*(u*c-A*f),p*(s*h-o*f),p*(a*f-s*c),p*(o*u-s*l),p*(s*A-a*u)),e.translate(-v,-m)}applyToPoint(e){e.applyTransform(this.matrix)}}class AO extends sO{constructor(e,t,n){super(e,t,n),this.type="skew",this.angle=null,this.angle=new Se(e,"angle",t)}}class Fk extends AO{constructor(e,t,n){super(e,t,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Ik extends AO{constructor(e,t,n){super(e,t,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function COt(r){return kh(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function BOt(r){var[e,t]=r.split("(");return[e.trim(),t.trim().replace(")","")]}class Zu{constructor(e,t,n){this.document=e,this.transforms=[];var i=COt(t);i.forEach(a=>{if(a!=="none"){var[o,s]=BOt(a),A=Zu.transformTypes[o];typeof A<"u"&&this.transforms.push(new A(this.document,s,n))}})}static fromElement(e,t){var n=t.getStyle("transform",!1,!0),[i,a=i]=t.getStyle("transform-origin",!1,!0).split(),o=[i,a];return n.hasValue()?new Zu(e,n.getString(),o):null}apply(e){for(var{transforms:t}=this,n=t.length,i=0;i<n;i++)t[i].apply(e)}unapply(e){for(var{transforms:t}=this,n=t.length,i=n-1;i>=0;i--)t[i].unapply(e)}applyToPoint(e){for(var{transforms:t}=this,n=t.length,i=0;i<n;i++)t[i].applyToPoint(e)}}Zu.transformTypes={translate:xk,rotate:Sk,scale:bk,matrix:sO,skewX:Fk,skewY:Ik};class wn{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=t,this.captureTextNodes=n,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!t||t.nodeType!==1)){if(Array.from(t.attributes).forEach(s=>{var A=mk(s.nodeName);this.attributes[A]=new Se(e,A,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(s=>s.trim());i.forEach(s=>{if(s){var[A,l]=s.split(":").map(u=>u.trim());this.styles[A]=new Se(e,A,l)}})}var{definitions:a}=e,o=this.getAttribute("id");o.hasValue()&&(a[o.getString()]||(a[o.getString()]=this)),Array.from(t.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(n&&(s.nodeType===3||s.nodeType===4)){var A=e.createTextNode(s);A.getText().length>0&&this.addChild(A)}})}}getAttribute(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.attributes[e];if(!n&&t){var i=new Se(this.document,e,"");return this.attributes[e]=i,i}return n||Se.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return Se.empty(this.document)}getStyle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[e];if(i)return i;var a=this.getAttribute(e);if(a!=null&&a.hasValue())return this.styles[e]=a,a;if(!n){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(t){var A=new Se(this.document,e,"");return this.styles[e]=A,A}return i||Se.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var n=this.getStyle("filter").getDefinition();n&&(this.applyEffects(e),n.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var t=Zu.fromElement(this.document,this);t&&t.apply(e);var n=this.getStyle("clip-path",!1,!0);if(n.hasValue()){var i=n.getDefinition();i&&i.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(t=>{t.render(e)})}addChild(e){var t=e instanceof wn?e:this.document.createElement(e);t.parent=this,wn.ignoreChildTypes.includes(t.type)||this.children.push(t)}matchesSelector(e){var{node:t}=this;if(typeof t.matches=="function")return t.matches(e);var n=t.getAttribute("class");return!n||n===""?!1:n.split(" ").some(i=>".".concat(i)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:t}=this.document;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var i=e[n],a=t[n];if(i)for(var o in i){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),a>=s&&(this.styles[o]=i[o],this.stylesSpecificity[o]=a)}}}removeStyles(e,t){var n=t.reduce((i,a)=>{var o=e.getStyle(a);if(!o.hasValue())return i;var s=o.getString();return o.setValue(""),[...i,[a,s]]},[]);return n}restoreStyles(e,t){t.forEach(n=>{var[i,a]=n;e.getStyle(i,!0).setValue(a)})}}wn.ignoreChildTypes=["title"];class Lk extends wn{constructor(e,t,n){super(e,t,n)}}function TOt(r){var e=r.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function xOt(r){return typeof process>"u"?r:r.trim().split(",").map(TOt).join(",")}function SOt(r){if(!r)return"";var e=r.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function bOt(r){if(!r)return"";var e=r.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class Ta{constructor(e,t,n,i,a,o){var s=o?typeof o=="string"?Ta.parse(o):o:{};this.fontFamily=a||s.fontFamily,this.fontSize=i||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=n||s.fontWeight,this.fontVariant=t||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n="",i="",a="",o="",s="",A=kh(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return A.forEach(u=>{switch(!0){case(!l.fontStyle&&Ta.styles.includes(u)):u!=="inherit"&&(n=u),l.fontStyle=!0;break;case(!l.fontVariant&&Ta.variants.includes(u)):u!=="inherit"&&(i=u),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&Ta.weights.includes(u)):u!=="inherit"&&(a=u),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:u!=="inherit"&&([o]=u.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:u!=="inherit"&&(s+=u)}}),new Ta(n,i,a,o,s,t)}toString(){return[SOt(this.fontStyle),this.fontVariant,bOt(this.fontWeight),this.fontSize,xOt(this.fontFamily)].join(" ").trim()}}Ta.styles="normal|italic|oblique|inherit";Ta.variants="normal|small-caps|inherit";Ta.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class as{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=t,this.x2=n,this.y2=i,this.addPoint(e,t),this.addPoint(n,i)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,t){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof t<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:t,y1:n,x2:i,y2:a}=e;this.addPoint(t,n),this.addPoint(i,a)}}sumCubic(e,t,n,i,a){return Math.pow(1-e,3)*t+3*Math.pow(1-e,2)*e*n+3*(1-e)*Math.pow(e,2)*i+Math.pow(e,3)*a}bezierCurveAdd(e,t,n,i,a){var o=6*t-12*n+6*i,s=-3*t+9*n-9*i+3*a,A=3*n-3*t;if(s===0){if(o===0)return;var l=-A/o;0<l&&l<1&&(e?this.addX(this.sumCubic(l,t,n,i,a)):this.addY(this.sumCubic(l,t,n,i,a)));return}var u=Math.pow(o,2)-4*A*s;if(!(u<0)){var c=(-o+Math.sqrt(u))/(2*s);0<c&&c<1&&(e?this.addX(this.sumCubic(c,t,n,i,a)):this.addY(this.sumCubic(c,t,n,i,a)));var h=(-o-Math.sqrt(u))/(2*s);0<h&&h<1&&(e?this.addX(this.sumCubic(h,t,n,i,a)):this.addY(this.sumCubic(h,t,n,i,a)))}}addBezierCurve(e,t,n,i,a,o,s,A){this.addPoint(e,t),this.addPoint(s,A),this.bezierCurveAdd(!0,e,n,a,s),this.bezierCurveAdd(!1,t,i,o,A)}addQuadraticCurve(e,t,n,i,a,o){var s=e+.6666666666666666*(n-e),A=t+2/3*(i-t),l=s+1/3*(a-e),u=A+1/3*(o-t);this.addBezierCurve(e,t,s,l,A,u,a,o)}isPointInBox(e,t){var{x1:n,y1:i,x2:a,y2:o}=this;return n<=e&&e<=a&&i<=t&&t<=o}}class qe extends $t{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new jn(0,0),this.control=new jn(0,0),this.current=new jn(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:t}=this;return e>=t.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",n=new jn(this.command[e],this.command[t]);return this.makeAbsolute(n)}getAsControlPoint(e,t){var n=this.getPoint(e,t);return this.control=n,n}getAsCurrentPoint(e,t){var n=this.getPoint(e,t);return this.current=n,n}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==$t.CURVE_TO&&e!==$t.SMOOTH_CURVE_TO&&e!==$t.QUAD_TO&&e!==$t.SMOOTH_QUAD_TO)return this.current;var{current:{x:t,y:n},control:{x:i,y:a}}=this,o=new jn(2*t-i,2*n-a);return o}makeAbsolute(e){if(this.command.relative){var{x:t,y:n}=this.current;e.x+=t,e.y+=n}return e}addMarker(e,t,n){var{points:i,angles:a}=this;n&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=i[i.length-1].angleTo(n)),this.addMarkerAngle(e,t?t.angleTo(e):null)}addMarkerAngle(e,t){this.points.push(e),this.angles.push(t)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,t=e.length,n=0;n<t;n++)if(!e[n]){for(var i=n+1;i<t;i++)if(e[i]){e[n]=e[i];break}}return e}}class Ac extends wn{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,t=this;t;){var n=t.getStyle("opacity",!1,!0);n.hasValue(!0)&&(e*=n.getNumber()),t=t.parent}return e}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!t){var n=this.getStyle("fill"),i=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(n.isUrlDefinition()){var s=n.getFillStyleDefinition(this,i);s&&(e.fillStyle=s)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var A=n.getColor();A!=="inherit"&&(e.fillStyle=A==="none"?"rgba(0,0,0,0)":A)}if(i.hasValue()){var l=new Se(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=l}if(a.isUrlDefinition()){var u=a.getFillStyleDefinition(this,o);u&&(e.strokeStyle=u)}else if(a.hasValue()){a.getString()==="currentColor"&&a.setValue(this.getStyle("color").getColor());var c=a.getString();c!=="inherit"&&(e.strokeStyle=c==="none"?"rgba(0,0,0,0)":c)}if(o.hasValue()){var h=new Se(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=h}var f=this.getStyle("stroke-width");if(f.hasValue()){var p=f.getPixels();e.lineWidth=p||sh}var v=this.getStyle("stroke-linecap"),m=this.getStyle("stroke-linejoin"),g=this.getStyle("stroke-miterlimit"),_=this.getStyle("stroke-dasharray"),E=this.getStyle("stroke-dashoffset");if(v.hasValue()&&(e.lineCap=v.getString()),m.hasValue()&&(e.lineJoin=m.getString()),g.hasValue()&&(e.miterLimit=g.getNumber()),_.hasValue()&&_.getString()!=="none"){var B=co(_.getString());typeof e.setLineDash<"u"?e.setLineDash(B):typeof e.webkitLineDash<"u"?e.webkitLineDash=B:typeof e.mozDash<"u"&&!(B.length===1&&B[0]===0)&&(e.mozDash=B);var L=E.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=L:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=L:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=L)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var O=this.getStyle("font"),b=this.getStyle("font-style"),T=this.getStyle("font-variant"),F=this.getStyle("font-weight"),M=this.getStyle("font-size"),S=this.getStyle("font-family"),x=new Ta(b.getString(),T.getString(),F.getString(),M.hasValue()?"".concat(M.getPixels(!0),"px"):"",S.getString(),Ta.parse(O.getString(),e.font));b.setValue(x.fontStyle),T.setValue(x.fontVariant),F.setValue(x.fontWeight),M.setValue(x.fontSize),S.setValue(x.fontFamily),e.font=x.toString(),M.isPixels()&&(this.document.emSize=M.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class qr extends Ac{constructor(e,t,n){super(e,t,n),this.type="path",this.pathParser=null,this.pathParser=new qe(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,n=new as;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case qe.MOVE_TO:this.pathM(e,n);break;case qe.LINE_TO:this.pathL(e,n);break;case qe.HORIZ_LINE_TO:this.pathH(e,n);break;case qe.VERT_LINE_TO:this.pathV(e,n);break;case qe.CURVE_TO:this.pathC(e,n);break;case qe.SMOOTH_CURVE_TO:this.pathS(e,n);break;case qe.QUAD_TO:this.pathQ(e,n);break;case qe.SMOOTH_QUAD_TO:this.pathT(e,n);break;case qe.ARC:this.pathA(e,n);break;case qe.CLOSE_PATH:this.pathZ(e,n);break}return n}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,t=e.getMarkerPoints(),n=e.getMarkerAngles(),i=t.map((a,o)=>[a,n[o]]);return i}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var t=this.getStyle("fill-rule");e.fillStyle!==""&&(t.getString("inherit")!=="inherit"?e.fill(t.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var n=this.getMarkers();if(n){var i=n.length-1,a=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(a.isUrlDefinition()){var A=a.getDefinition(),[l,u]=n[0];A.render(e,l,u)}if(o.isUrlDefinition())for(var c=o.getDefinition(),h=1;h<i;h++){var[f,p]=n[h];c.render(e,f,p)}if(s.isUrlDefinition()){var v=s.getDefinition(),[m,g]=n[i];v.render(e,m,g)}}}static pathM(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}pathM(e,t){var{pathParser:n}=this,{point:i}=qr.pathM(n),{x:a,y:o}=i;n.addMarker(i),t.addPoint(a,o),e&&e.moveTo(a,o)}static pathL(e){var{current:t}=e,n=e.getAsCurrentPoint();return{current:t,point:n}}pathL(e,t){var{pathParser:n}=this,{current:i,point:a}=qr.pathL(n),{x:o,y:s}=a;n.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:t,command:n}=e,i=new jn((n.relative?t.x:0)+n.x,t.y);return e.current=i,{current:t,point:i}}pathH(e,t){var{pathParser:n}=this,{current:i,point:a}=qr.pathH(n),{x:o,y:s}=a;n.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:t,command:n}=e,i=new jn(t.x,(n.relative?t.y:0)+n.y);return e.current=i,{current:t,point:i}}pathV(e,t){var{pathParser:n}=this,{current:i,point:a}=qr.pathV(n),{x:o,y:s}=a;n.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathC(e){var{current:t}=e,n=e.getPoint("x1","y1"),i=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:t,point:n,controlPoint:i,currentPoint:a}}pathC(e,t){var{pathParser:n}=this,{current:i,point:a,controlPoint:o,currentPoint:s}=qr.pathC(n);n.addMarker(s,o,a),t.addBezierCurve(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:t}=e,n=e.getReflectedControlPoint(),i=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:t,point:n,controlPoint:i,currentPoint:a}}pathS(e,t){var{pathParser:n}=this,{current:i,point:a,controlPoint:o,currentPoint:s}=qr.pathS(n);n.addMarker(s,o,a),t.addBezierCurve(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,o.x,o.y,s.x,s.y)}static pathQ(e){var{current:t}=e,n=e.getAsControlPoint("x1","y1"),i=e.getAsCurrentPoint();return{current:t,controlPoint:n,currentPoint:i}}pathQ(e,t){var{pathParser:n}=this,{current:i,controlPoint:a,currentPoint:o}=qr.pathQ(n);n.addMarker(o,a,a),t.addQuadraticCurve(i.x,i.y,a.x,a.y,o.x,o.y),e&&e.quadraticCurveTo(a.x,a.y,o.x,o.y)}static pathT(e){var{current:t}=e,n=e.getReflectedControlPoint();e.control=n;var i=e.getAsCurrentPoint();return{current:t,controlPoint:n,currentPoint:i}}pathT(e,t){var{pathParser:n}=this,{current:i,controlPoint:a,currentPoint:o}=qr.pathT(n);n.addMarker(o,a,a),t.addQuadraticCurve(i.x,i.y,a.x,a.y,o.x,o.y),e&&e.quadraticCurveTo(a.x,a.y,o.x,o.y)}static pathA(e){var{current:t,command:n}=e,{rX:i,rY:a,xRot:o,lArcFlag:s,sweepFlag:A}=n,l=o*(Math.PI/180),u=e.getAsCurrentPoint(),c=new jn(Math.cos(l)*(t.x-u.x)/2+Math.sin(l)*(t.y-u.y)/2,-Math.sin(l)*(t.x-u.x)/2+Math.cos(l)*(t.y-u.y)/2),h=Math.pow(c.x,2)/Math.pow(i,2)+Math.pow(c.y,2)/Math.pow(a,2);h>1&&(i*=Math.sqrt(h),a*=Math.sqrt(h));var f=(s===A?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(c.y,2)-Math.pow(a,2)*Math.pow(c.x,2))/(Math.pow(i,2)*Math.pow(c.y,2)+Math.pow(a,2)*Math.pow(c.x,2)));isNaN(f)&&(f=0);var p=new jn(f*i*c.y/a,f*-a*c.x/i),v=new jn((t.x+u.x)/2+Math.cos(l)*p.x-Math.sin(l)*p.y,(t.y+u.y)/2+Math.sin(l)*p.x+Math.cos(l)*p.y),m=Vb([1,0],[(c.x-p.x)/i,(c.y-p.y)/a]),g=[(c.x-p.x)/i,(c.y-p.y)/a],_=[(-c.x-p.x)/i,(-c.y-p.y)/a],E=Vb(g,_);return I1(g,_)<=-1&&(E=Math.PI),I1(g,_)>=1&&(E=0),{currentPoint:u,rX:i,rY:a,sweepFlag:A,xAxisRotation:l,centp:v,a1:m,ad:E}}pathA(e,t){var{pathParser:n}=this,{currentPoint:i,rX:a,rY:o,sweepFlag:s,xAxisRotation:A,centp:l,a1:u,ad:c}=qr.pathA(n),h=1-s?1:-1,f=u+h*(c/2),p=new jn(l.x+a*Math.cos(f),l.y+o*Math.sin(f));if(n.addMarkerAngle(p,f-h*Math.PI/2),n.addMarkerAngle(i,f-h*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(u)&&!isNaN(c)){var v=a>o?a:o,m=a>o?1:a/o,g=a>o?o/a:1;e.translate(l.x,l.y),e.rotate(A),e.scale(m,g),e.arc(0,0,v,u,u+c,Boolean(1-s)),e.scale(1/m,1/g),e.rotate(-A),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){qr.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class lO extends qr{constructor(e,t,n){super(e,t,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class lc extends Ac{constructor(e,t,n){super(e,t,new.target===lc?!0:n),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,t);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(e.textBaseline=n)}initializeCoordinates(e){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var t=this.getAttribute("dx"),n=this.getAttribute("dy");t.hasValue()&&(this.x+=t.getPixels("x")),n.hasValue()&&(this.y+=n.getPixels("y")),this.x+=this.getAnchorDelta(e,this,0)}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(e);var t=null;return this.children.forEach((n,i)=>{var a=this.getChildBoundingBox(e,this,this,i);t?t.addBoundingBox(a):t=a}),t}getFontSize(){var{document:e,parent:t}=this,n=Ta.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(n);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new as(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,n){var i=t[n],a=null;if(e.isArabic){var o=t.length,s=t[n-1],A=t[n+1],l="isolated";if((n===0||s===" ")&&n<o-2&&A!==" "&&(l="terminal"),n>0&&s!==" "&&n<o-2&&A!==" "&&(l="medial"),n>0&&s!==" "&&(n===o-1||A===" ")&&(l="initial"),typeof e.glyphs[i]<"u"){var u=e.glyphs[i];a=u instanceof lO?u:u[l]}}else a=e.glyphs[i];return a||(a=e.missingGlyph),a}getText(){return""}getTextFromNode(e){var t=e||this.node,n=Array.from(t.parentNode.childNodes),i=n.indexOf(t),a=n.length-1,o=kh(t.textContent||"");return i===0&&(o=gk(o)),i===a&&(o=yk(o)),o}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(e),this.children.forEach((n,i)=>{this.renderChild(e,this,this,i)});var{mouse:t}=this.document.screen;t.isWorking()&&t.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:t,parent:n}=this,i=this.getText(),a=n.getStyle("font-family").getDefinition();if(a){for(var{unitsPerEm:o}=a.fontFace,s=Ta.parse(t.ctx.font),A=n.getStyle("font-size").getNumber(s.fontSize),l=n.getStyle("font-style").getString(s.fontStyle),u=A/o,c=a.isRTL?i.split("").reverse().join(""):i,h=co(n.getAttribute("dx").getString()),f=c.length,p=0;p<f;p++){var v=this.getGlyph(a,c,p);e.translate(this.x,this.y),e.scale(u,-u);var m=e.lineWidth;e.lineWidth=e.lineWidth*o/A,l==="italic"&&e.transform(1,0,.4,1,0,0),v.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=m,e.scale(1/u,-1/u),e.translate(-this.x,-this.y),this.x+=A*(v.horizAdvX||a.horizAdvX)/o,typeof h[p]<"u"&&!isNaN(h[p])&&(this.x+=h[p])}return}var{x:g,y:_}=this;e.fillStyle&&e.fillText(i,g,_),e.strokeStyle&&e.strokeText(i,g,_)}getAnchorDelta(e,t,n){var i=this.getStyle("text-anchor").getString("start");if(i!=="start"){for(var{children:a}=t,o=a.length,s=null,A=0,l=n;l<o&&(s=a[l],!(l>n&&s.getAttribute("x").hasValue()||s.getAttribute("text-anchor").hasValue()));l++)A+=s.measureTextRecursive(e);return-1*(i==="end"?A:A/2)}return 0}adjustChildCoordinates(e,t,n,i){var a=n.children[i];if(typeof a.measureText!="function")return a;e.save(),a.setContext(e,!0);var o=a.getAttribute("x"),s=a.getAttribute("y"),A=a.getAttribute("dx"),l=a.getAttribute("dy"),u=a.getAttribute("text-anchor").getString("start");if(i===0&&a.type!=="textNode"&&(o.hasValue()||o.setValue(t.getAttribute("x").getValue("0")),s.hasValue()||s.setValue(t.getAttribute("y").getValue("0")),A.hasValue()||A.setValue(t.getAttribute("dx").getValue("0")),l.hasValue()||l.setValue(t.getAttribute("dy").getValue("0"))),o.hasValue()){if(a.x=o.getPixels("x")+t.getAnchorDelta(e,n,i),u!=="start"){var c=a.measureTextRecursive(e);a.x+=-1*(u==="end"?c:c/2)}A.hasValue()&&(a.x+=A.getPixels("x"))}else{if(u!=="start"){var h=a.measureTextRecursive(e);t.x+=-1*(u==="end"?h:h/2)}A.hasValue()&&(t.x+=A.getPixels("x")),a.x=t.x}return t.x=a.x+a.measureText(e),s.hasValue()?(a.y=s.getPixels("y"),l.hasValue()&&(a.y+=l.getPixels("y"))):(l.hasValue()&&(t.y+=l.getPixels("y")),a.y=t.y),t.y=a.y,a.clearContext(e),e.restore(),a}getChildBoundingBox(e,t,n,i){var a=this.adjustChildCoordinates(e,t,n,i);if(typeof a.getBoundingBox!="function")return null;var o=a.getBoundingBox(e);return o?(a.children.forEach((s,A)=>{var l=t.getChildBoundingBox(e,t,a,A);o.addBoundingBox(l)}),o):null}renderChild(e,t,n,i){var a=this.adjustChildCoordinates(e,t,n,i);a.render(e),a.children.forEach((o,s)=>{t.renderChild(e,t,a,s)})}measureTextRecursive(e){var t=this.children.reduce((n,i)=>n+i.measureTextRecursive(e),this.measureText(e));return t}measureText(e){var{measureCache:t}=this;if(~t)return t;var n=this.getText(),i=this.measureTargetText(e,n);return this.measureCache=i,i}measureTargetText(e,t){if(!t.length)return 0;var{parent:n}=this,i=n.getStyle("font-family").getDefinition();if(i){for(var a=this.getFontSize(),o=i.isRTL?t.split("").reverse().join(""):t,s=co(n.getAttribute("dx").getString()),A=o.length,l=0,u=0;u<A;u++){var c=this.getGlyph(i,o,u);l+=(c.horizAdvX||i.horizAdvX)*a/i.fontFace.unitsPerEm,typeof s[u]<"u"&&!isNaN(s[u])&&(l+=s[u])}return l}if(!e.measureText)return t.length*10;e.save(),this.setContext(e,!0);var{width:h}=e.measureText(t);return this.clearContext(e),e.restore(),h}}class By extends lc{constructor(e,t,n){super(e,t,new.target===By?!0:n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class FOt extends By{constructor(){super(...arguments),this.type="textNode"}}let ud=class extends Ac{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var t,{document:n}=this,{screen:i,window:a}=n,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&a&&typeof a.getComputedStyle<"u"){e.font=a.getComputedStyle(o).getPropertyValue("font");var s=new Se(n,"fontSize",Ta.parse(e.font).fontSize);s.hasValue()&&(n.rootEmSize=s.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:A,height:l}=i.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var u=this.getAttribute("refX"),c=this.getAttribute("refY"),h=this.getAttribute("viewBox"),f=h.hasValue()?co(h.getString()):null,p=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",v=0,m=0,g=0,_=0;f&&(v=f[0],m=f[1]),this.root||(A=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(g=v,_=m,v=0,m=0)),i.viewPort.setCurrent(A,l),this.node&&(!this.parent||((t=this.node.parentNode)===null||t===void 0?void 0:t.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),f&&(A=f[2],l=f[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:A,height:i.viewPort.height,desiredHeight:l,minX:v,minY:m,refX:u.getValue(),refY:c.getValue(),clip:p,clipX:g,clipY:_}),f&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(A,l))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),a=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),A=i.getNumber(0),l=a.getNumber(0);if(n)if(typeof n=="string")this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),a.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(A||e," ").concat(l||t)),s.hasValue()){var c=this.getStyle("width"),h=this.getStyle("height");c.hasValue()&&c.setValue("".concat(e,"px")),h.hasValue()&&h.setValue("".concat(t,"px"))}}};class uO extends qr{constructor(){super(...arguments),this.type="rect"}path(e){var t=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),a=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),A=o.getPixels("x"),l=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(l=A),s.hasValue()&&!o.hasValue()&&(A=l),A=Math.min(A,i/2),l=Math.min(l,a/2),e){var u=4*((Math.sqrt(2)-1)/3);e.beginPath(),a>0&&i>0&&(e.moveTo(t+A,n),e.lineTo(t+i-A,n),e.bezierCurveTo(t+i-A+u*A,n,t+i,n+l-u*l,t+i,n+l),e.lineTo(t+i,n+a-l),e.bezierCurveTo(t+i,n+a-l+u*l,t+i-A+u*A,n+a,t+i-A,n+a),e.lineTo(t+A,n+a),e.bezierCurveTo(t+A-u*A,n+a,t,n+a-l+u*l,t,n+a-l),e.lineTo(t,n+l),e.bezierCurveTo(t,n+l-u*l,t+A-u*A,n,t+A,n),e.closePath())}return new as(t,n,t+i,n+a)}getMarkers(){return null}}class Ok extends qr{constructor(){super(...arguments),this.type="circle"}path(e){var t=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return e&&i>0&&(e.beginPath(),e.arc(t,n,i,0,Math.PI*2,!1),e.closePath()),new as(t-i,n-i,t+i,n+i)}getMarkers(){return null}}class Rk extends qr{constructor(){super(...arguments),this.type="ellipse"}path(e){var t=4*((Math.sqrt(2)-1)/3),n=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&n>0&&i>0&&(e.beginPath(),e.moveTo(a+n,o),e.bezierCurveTo(a+n,o+t*i,a+t*n,o+i,a,o+i),e.bezierCurveTo(a-t*n,o+i,a-n,o+t*i,a-n,o),e.bezierCurveTo(a-n,o-t*i,a-t*n,o-i,a,o-i),e.bezierCurveTo(a+t*n,o-i,a+n,o-t*i,a+n,o),e.closePath()),new as(a-n,o-i,a+n,o+i)}getMarkers(){return null}}class Mk extends qr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new jn(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new jn(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:n},{x:i,y:a}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,n),e.lineTo(i,a)),new as(t,n,i,a)}getMarkers(){var[e,t]=this.getPoints(),n=e.angleTo(t);return[[e,n],[t,n]]}}class cO extends qr{constructor(e,t,n){super(e,t,n),this.type="polyline",this.points=[],this.points=jn.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:n,y:i}]=t,a=new as(n,i);return e&&(e.beginPath(),e.moveTo(n,i)),t.forEach(o=>{var{x:s,y:A}=o;a.addPoint(s,A),e&&e.lineTo(s,A)}),a}getMarkers(){var{points:e}=this,t=e.length-1,n=[];return e.forEach((i,a)=>{a!==t&&n.push([i,i.angleTo(e[a+1])])}),n.length>0&&n.push([e[e.length-1],n[n.length-1][1]]),n}}class Nk extends cO{constructor(){super(...arguments),this.type="polygon"}path(e){var t=super.path(e),[{x:n,y:i}]=this.points;return e&&(e.lineTo(n,i),e.closePath()),t}}class Pk extends wn{constructor(){super(...arguments),this.type="pattern"}createPattern(e,t,n){var i=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),o=new ud(this.document,null);o.attributes.viewBox=new Se(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new Se(this.document,"width","".concat(i,"px")),o.attributes.height=new Se(this.document,"height","".concat(a,"px")),o.attributes.transform=new Se(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(i,a),A=s.getContext("2d"),l=this.getAttribute("x"),u=this.getAttribute("y");l.hasValue()&&u.hasValue()&&A.translate(l.getPixels("x",!0),u.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(var c=-1;c<=1;c++)for(var h=-1;h<=1;h++)A.save(),o.attributes.x=new Se(this.document,"x",c*s.width),o.attributes.y=new Se(this.document,"y",h*s.height),o.render(A),A.restore();var f=e.createPattern(s,"repeat");return f}}class Uk extends wn{constructor(){super(...arguments),this.type="marker"}render(e,t,n){if(t){var{x:i,y:a}=t,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,a),o==="auto"&&e.rotate(n),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var A=new ud(this.document,null);A.type=this.type,A.attributes.viewBox=new Se(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.refX=new Se(this.document,"refX",this.getAttribute("refX").getValue()),A.attributes.refY=new Se(this.document,"refY",this.getAttribute("refY").getValue()),A.attributes.width=new Se(this.document,"width",this.getAttribute("markerWidth").getValue()),A.attributes.height=new Se(this.document,"height",this.getAttribute("markerHeight").getValue()),A.attributes.overflow=new Se(this.document,"overflow",this.getAttribute("overflow").getValue()),A.attributes.fill=new Se(this.document,"fill",this.getAttribute("fill").getColor("black")),A.attributes.stroke=new Se(this.document,"stroke",this.getAttribute("stroke").getValue("none")),A.children=this.children,A.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-n),e.translate(-i,-a)}}}class Dk extends wn{constructor(){super(...arguments),this.type="defs"}render(){}}class vE extends Ac{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new as;return this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),t}}class hO extends wn{constructor(e,t,n){super(e,t,n),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:a}=this;a.forEach(o=>{o.type==="stop"&&i.push(o)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,t,n){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:a}=i,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(n,a[a.length-1].color);if(a.forEach(m=>{o.addColorStop(m.offset,this.addParentOpacity(n,m.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:A,viewPort:l}=s.screen,[u]=l.viewPorts,c=new uO(s,null);c.attributes.x=new Se(s,"x",-A/3),c.attributes.y=new Se(s,"y",-A/3),c.attributes.width=new Se(s,"width",A),c.attributes.height=new Se(s,"height",A);var h=new vE(s,null);h.attributes.transform=new Se(s,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[c];var f=new ud(s,null);f.attributes.x=new Se(s,"x",0),f.attributes.y=new Se(s,"y",0),f.attributes.width=new Se(s,"width",u.width),f.attributes.height=new Se(s,"height",u.height),f.children=[h];var p=s.createCanvas(u.width,u.height),v=p.getContext("2d");return v.fillStyle=o,f.render(v),v.createPattern(p,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())})}addParentOpacity(e,t){if(e.hasValue()){var n=new Se(this.document,"color",t);return n.addOpacity(e).getColor()}return t}}class Qk extends hO{constructor(e,t,n){super(e,t,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,t){var n=this.getGradientUnits()==="objectBoundingBox",i=n?t.getBoundingBox(e):null;if(n&&!i)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var a=n?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=n?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=n?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),A=n?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===s&&o===A?null:e.createLinearGradient(a,o,s,A)}}class Hk extends hO{constructor(e,t,n){super(e,t,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,t){var n=this.getGradientUnits()==="objectBoundingBox",i=t.getBoundingBox(e);if(n&&!i)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var a=n?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=n?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=a,A=o;this.getAttribute("fx").hasValue()&&(s=n?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(A=n?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=n?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,A,u,a,o,l)}}class Gk extends wn{constructor(e,t,n){super(e,t,n),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),a=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),a.hasValue()&&(o=o.addOpacity(a)),this.offset=i,this.color=o.getColor()}}class gE extends wn{constructor(e,t,n){super(e,t,n),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new Se(e,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}calcValue(){var{initialUnits:e}=this,{progress:t,from:n,to:i}=this.getProgress(),a=n.getNumber()+(i.getNumber()-n.getNumber())*t;return e==="%"&&(a*=100),"".concat(a).concat(e)}update(e){var{parent:t}=this,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,t.animationFrozen=!0,t.animationFrozenValue=n.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,n.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var a=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var A=s.getString();o="".concat(A,"(").concat(o,")")}n.setValue(o),a=!0}return a}getProgress(){var{document:e,values:t}=this,n={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(t.hasValue()){var i=n.progress*(t.getValue().length-1),a=Math.floor(i),o=Math.ceil(i);n.from=new Se(e,"from",parseFloat(t.getValue()[a])),n.to=new Se(e,"to",parseFloat(t.getValue()[o])),n.progress=(i-a)/(o-a)}else n.from=this.from,n.to=this.to;return n}}class kk extends gE{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=new Hb(t.getColor()),a=new Hb(n.getColor());if(i.ok&&a.ok){var o=i.r+(a.r-i.r)*e,s=i.g+(a.g-i.g)*e,A=i.b+(a.b-i.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(A),")")}return this.getAttribute("from").getColor()}}class $k extends gE{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=co(t.getString()),a=co(n.getString()),o=i.map((s,A)=>{var l=a[A];return s+(l-s)*e}).join(" ");return o}}class jk extends wn{constructor(e,t,n){super(e,t,n),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=e,{children:a}=this;for(var o of a)switch(o.type){case"font-face":{this.fontFace=o;var s=o.getStyle("font-family");s.hasValue()&&(i[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=o;break;case"glyph":{var A=o;A.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[A.unicode]>"u"&&(this.glyphs[A.unicode]={}),this.glyphs[A.unicode][A.arabicForm]=A):this.glyphs[A.unicode]=A;break}}}render(){}}class Vk extends wn{constructor(e,t,n){super(e,t,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class Kk extends qr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class zk extends lc{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var t=e.children[0];if(t)return t.getText()}return""}}class Xk extends lc{constructor(e,t,n){super(e,t,n),this.type="a";var{childNodes:i}=t,a=i[0],o=i.length>0&&Array.from(i).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(a):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:n,y:i}=this,{mouse:a}=t.screen,o=new Se(t,"fontSize",Ta.parse(t.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new as(n,i-o.getPixels("y"),n+this.measureText(e),i))}else if(this.children.length>0){var s=new vE(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function M2(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function O0(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?M2(Object(t),!0).forEach(function(n){nO(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):M2(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class Yk extends lc{constructor(e,t,n){super(e,t,n),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var i=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(i)}getText(){return this.text}path(e){var{dataArray:t}=this;e&&e.beginPath(),t.forEach(n=>{var{type:i,points:a}=n;switch(i){case qe.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case qe.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case qe.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case qe.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case qe.ARC:{var[o,s,A,l,u,c,h,f]=a,p=A>l?A:l,v=A>l?1:A/l,m=A>l?l/A:1;e&&(e.translate(o,s),e.rotate(h),e.scale(v,m),e.arc(0,0,p,u,u+c,Boolean(1-f)),e.scale(1/v,1/m),e.rotate(-h),e.translate(-o,-s));break}case qe.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var t=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),{glyphInfo:i}=this,a=e.fillStyle;t==="underline"&&e.beginPath(),i.forEach((o,s)=>{var{p0:A,p1:l,rotation:u,text:c}=o;e.save(),e.translate(A.x,A.y),e.rotate(u),e.fillStyle&&e.fillText(c,0,0),e.strokeStyle&&e.strokeText(c,0,0),e.restore(),t==="underline"&&(s===0&&e.moveTo(A.x,A.y+n/8),e.lineTo(l.x,l.y+n/5))}),t==="underline"&&(e.lineWidth=n/20,e.strokeStyle=a,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,t,n,i,a,o,s,A,l){var u=o,c=this.measureText(e,A);A===" "&&t==="justify"&&n<i&&(c+=(i-n)/a),l>-1&&(u+=this.getLetterSpacingAt(l));var h=this.textHeight/20,f=this.getEquidistantPointOnPath(u,h,0),p=this.getEquidistantPointOnPath(u+c,h,0),v={p0:f,p1:p},m=f&&p?Math.atan2(p.y-f.y,p.x-f.x):0;if(s){var g=Math.cos(Math.PI/2+m)*s,_=Math.cos(-m)*s;v.p0=O0(O0({},f),{},{x:f.x+g,y:f.y+_}),v.p1=O0(O0({},p),{},{x:p.x+g,y:p.y+_})}return u+=c,{offset:u,segment:v,rotation:m}}measureText(e,t){var{measuresCache:n}=this,i=t||this.getText();if(n.has(i))return n.get(i);var a=this.measureTargetText(e,i);return n.set(i,a),a}setTextData(e){if(!this.glyphInfo){var t=this.getText(),n=t.split(""),i=t.split(" ").length-1,a=this.parent.getAttribute("dx").split().map(B=>B.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),A=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),u=0;!A.hasValue()||A.getValue()==="inherit"?u=l.getPixels():A.hasValue()&&A.getValue()!=="initial"&&A.getValue()!=="unset"&&(u=A.getPixels());var c=[],h=t.length;this.letterSpacingCache=c;for(var f=0;f<h;f++)c.push(typeof a[f]<"u"?a[f]:u);var p=c.reduce((B,L,O)=>O===0?0:B+L||0,0),v=this.measureText(e),m=Math.max(v+p,0);this.textWidth=v,this.textHeight=this.getFontSize(),this.glyphInfo=[];var g=this.getPathLength(),_=this.getStyle("startOffset").getNumber(0)*g,E=0;(s==="middle"||s==="center")&&(E=-m/2),(s==="end"||s==="right")&&(E=-m),E+=_,n.forEach((B,L)=>{var{offset:O,segment:b,rotation:T}=this.findSegmentToFitChar(e,s,m,g,i,E,o,B,L);E=O,!(!b.p0||!b.p1)&&this.glyphInfo.push({text:n[L],p0:b.p0,p1:b.p1,rotation:T})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:n}=e;for(n.reset();!n.isEnd();){var{current:i}=n,a=i?i.x:0,o=i?i.y:0,s=n.next(),A=s.type,l=[];switch(s.type){case qe.MOVE_TO:this.pathM(n,l);break;case qe.LINE_TO:A=this.pathL(n,l);break;case qe.HORIZ_LINE_TO:A=this.pathH(n,l);break;case qe.VERT_LINE_TO:A=this.pathV(n,l);break;case qe.CURVE_TO:this.pathC(n,l);break;case qe.SMOOTH_CURVE_TO:A=this.pathS(n,l);break;case qe.QUAD_TO:this.pathQ(n,l);break;case qe.SMOOTH_QUAD_TO:A=this.pathT(n,l);break;case qe.ARC:l=this.pathA(n);break;case qe.CLOSE_PATH:qr.pathZ(n);break}s.type!==qe.CLOSE_PATH?t.push({type:A,points:l,start:{x:a,y:o},pathLength:this.calcLength(a,o,A,l)}):t.push({type:qe.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:n,y:i}=qr.pathM(e).point;t.push(n,i)}pathL(e,t){var{x:n,y:i}=qr.pathL(e).point;return t.push(n,i),qe.LINE_TO}pathH(e,t){var{x:n,y:i}=qr.pathH(e).point;return t.push(n,i),qe.LINE_TO}pathV(e,t){var{x:n,y:i}=qr.pathV(e).point;return t.push(n,i),qe.LINE_TO}pathC(e,t){var{point:n,controlPoint:i,currentPoint:a}=qr.pathC(e);t.push(n.x,n.y,i.x,i.y,a.x,a.y)}pathS(e,t){var{point:n,controlPoint:i,currentPoint:a}=qr.pathS(e);return t.push(n.x,n.y,i.x,i.y,a.x,a.y),qe.CURVE_TO}pathQ(e,t){var{controlPoint:n,currentPoint:i}=qr.pathQ(e);t.push(n.x,n.y,i.x,i.y)}pathT(e,t){var{controlPoint:n,currentPoint:i}=qr.pathT(e);return t.push(n.x,n.y,i.x,i.y),qe.QUAD_TO}pathA(e){var{rX:t,rY:n,sweepFlag:i,xAxisRotation:a,centp:o,a1:s,ad:A}=qr.pathA(e);return i===0&&A>0&&(A-=2*Math.PI),i===1&&A<0&&(A+=2*Math.PI),[o.x,o.y,t,n,s,A,a,i]}calcLength(e,t,n,i){var a=0,o=null,s=null,A=0;switch(n){case qe.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case qe.CURVE_TO:for(a=0,o=this.getPointOnCubicBezier(0,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),A=.01;A<=1;A+=.01)s=this.getPointOnCubicBezier(A,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case qe.QUAD_TO:for(a=0,o=this.getPointOnQuadraticBezier(0,e,t,i[0],i[1],i[2],i[3]),A=.01;A<=1;A+=.01)s=this.getPointOnQuadraticBezier(A,e,t,i[0],i[1],i[2],i[3]),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case qe.ARC:{a=0;var l=i[4],u=i[5],c=i[4]+u,h=Math.PI/180;if(Math.abs(l-c)<h&&(h=Math.abs(l-c)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),u<0)for(A=l-h;A>c;A-=h)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],A,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(A=l+h;A<c;A+=h)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],A,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),a}}return 0}getPointOnLine(e,t,n,i,a){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:t,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:n,A=(a-n)/(i-t+sh),l=Math.sqrt(e*e/(1+A*A));i<t&&(l*=-1);var u=A*l,c=null;if(i===t)c={x:o,y:s+u};else if((s-n)/(o-t+sh)===A)c={x:o+l,y:s+u};else{var h=0,f=0,p=this.getLineLength(t,n,i,a);if(p<sh)return null;var v=(o-t)*(i-t)+(s-n)*(a-n);v/=p*p,h=t+v*(i-t),f=n+v*(a-n);var m=this.getLineLength(o,s,h,f),g=Math.sqrt(e*e-m*m);l=Math.sqrt(g*g/(1+A*A)),i<t&&(l*=-1),u=A*l,c={x:h+l,y:f+u}}return c}getPointOnPath(e){var t=this.getPathLength(),n=0,i=null;if(e<-5e-5||e-5e-5>t)return null;var{dataArray:a}=this;for(var o of a){if(o&&(o.pathLength<5e-5||n+o.pathLength+5e-5<e)){n+=o.pathLength;continue}var s=e-n,A=0;switch(o.type){case qe.LINE_TO:i=this.getPointOnLine(s,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case qe.ARC:{var l=o.points[4],u=o.points[5],c=o.points[4]+u;if(A=l+s/o.pathLength*u,u<0&&A<c||u>=0&&A>c)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],A,o.points[6]);break}case qe.CURVE_TO:A=s/o.pathLength,A>1&&(A=1),i=this.getPointOnCubicBezier(A,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case qe.QUAD_TO:A=s/o.pathLength,A>1&&(A=1),i=this.getPointOnQuadraticBezier(A,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3]);break}if(i)return i;break}return null}getLineLength(e,t,n,i){return Math.sqrt((n-e)*(n-e)+(i-t)*(i-t))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,t)=>t.pathLength>0?e+t.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,t,n,i,a,o,s,A,l){var u=A*Kb(e)+o*zb(e)+i*Xb(e)+t*Yb(e),c=l*Kb(e)+s*zb(e)+a*Xb(e)+n*Yb(e);return{x:u,y:c}}getPointOnQuadraticBezier(e,t,n,i,a,o,s){var A=o*Wb(e)+i*qb(e)+t*Zb(e),l=s*Wb(e)+a*qb(e)+n*Zb(e);return{x:A,y:l}}getPointOnEllipticalArc(e,t,n,i,a,o){var s=Math.cos(o),A=Math.sin(o),l={x:n*Math.cos(a),y:i*Math.sin(a)};return{x:e+(l.x*s-l.y*A),y:t+(l.x*A+l.y*s)}}buildEquidistantCache(e,t){var n=this.getPathLength(),i=t||.25,a=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==i){this.equidistantCache={step:a,precision:i,points:[]};for(var o=0,s=0;s<=n;s+=i){var A=this.getPointOnPath(s),l=this.getPointOnPath(s+i);!A||!l||(o+=this.getLineLength(A.x,A.y,l.x,l.y),o>=a&&(this.equidistantCache.points.push({x:A.x,y:A.y,distance:s}),o-=a))}}}getEquidistantPointOnPath(e,t,n){if(this.buildEquidistantCache(t,n),e<0||e-this.getPathLength()>5e-5)return null;var i=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}var IOt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Wk extends Ac{constructor(e,t,n){super(e,t,n),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var a=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),a?this.loadSvg(i):this.loadImage(i),this.isSvg=a}}loadImage(e){var t=this;return _l(function*(){try{var n=yield t.document.createImage(e);t.image=n}catch(i){console.error('Error while loading image "'.concat(e,'":'),i)}t.loaded=!0})()}loadSvg(e){var t=this;return _l(function*(){var n=IOt.exec(e);if(n){var i=n[5];n[4]==="base64"?t.image=atob(i):t.image=decodeURIComponent(i)}else try{var a=yield t.document.fetch(e),o=yield a.text();t.image=o}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}t.loaded=!0})()}renderChildren(e){var{document:t,image:n,loaded:i}=this,a=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),A=this.getStyle("height").getPixels("y");if(!(!i||!n||!s||!A)){if(e.save(),e.translate(a,o),this.isSvg){var l=t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:A});l.document.documentElement.parent=this,l.render()}else{var u=this.image;t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:u.width,height:A,desiredHeight:u.height}),this.loaded&&(typeof u.complete>"u"||u.complete)&&e.drawImage(u,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new as(e,t,e+n,t+i)}}class qk extends Ac{constructor(){super(...arguments),this.type="symbol"}render(e){}}class Zk{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var n=this;return _l(function*(){try{var{document:i}=n,a=yield i.canvg.parser.load(t),o=a.getElementsByTagName("font");Array.from(o).forEach(s=>{var A=i.createElement(s);i.definitions[e]=A})}catch(s){console.error('Error while loading font "'.concat(t,'":'),s)}n.loaded=!0})()}}class fO extends wn{constructor(e,t,n){super(e,t,n),this.type="style";var i=kh(Array.from(t.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),a=i.split("}");a.forEach(o=>{var s=o.trim();if(s){var A=s.split("{"),l=A[0].split(","),u=A[1].split(";");l.forEach(c=>{var h=c.trim();if(h){var f=e.styles[h]||{};if(u.forEach(m=>{var g=m.indexOf(":"),_=m.substr(0,g).trim(),E=m.substr(g+1,m.length-g).trim();_&&E&&(f[_]=new Se(e,_,E))}),e.styles[h]=f,e.stylesSpecificity[h]=wk(h),h==="@font-face"){var p=f["font-family"].getString().replace(/"|'/g,""),v=f.src.getString().split(",");v.forEach(m=>{if(m.indexOf('format("svg")')>0){var g=oO(m);g&&new Zk(e).load(p,g)}})}}})}})}}fO.parseExternalUrl=oO;class Jk extends Ac{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var t=this.getAttribute("x"),n=this.getAttribute("y");t.hasValue()&&e.translate(t.getPixels("x"),0),n.hasValue()&&e.translate(0,n.getPixels("y"))}path(e){var{element:t}=this;t&&t.path(e)}renderChildren(e){var{document:t,element:n}=this;if(n){var i=n;if(n.type==="symbol"&&(i=new ud(t,null),i.attributes.viewBox=new Se(t,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new Se(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new Se(t,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new Se(t,"opacity",this.calculateOpacity())),i.type==="svg"){var a=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);a.hasValue()&&(i.attributes.width=new Se(t,"width",a.getString())),o.hasValue()&&(i.attributes.height=new Se(t,"height",o.getString()))}var s=i.parent;i.parent=this,i.render(e),i.parent=s}}getBoundingBox(e){var{element:t}=this;return t?t.getBoundingBox(e):null}elementTransform(){var{document:e,element:t}=this;return Zu.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function R0(r,e,t,n,i,a){return r[t*n*4+e*4+a]}function M0(r,e,t,n,i,a,o){r[t*n*4+e*4+a]=o}function gi(r,e,t){var n=r[e];return n*t}function VA(r,e,t,n){return e+Math.cos(r)*t+Math.sin(r)*n}class pO extends wn{constructor(e,t,n){super(e,t,n),this.type="feColorMatrix";var i=co(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var a=i[0];i=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[VA(o,.213,.787,-.213),VA(o,.715,-.715,-.715),VA(o,.072,-.072,.928),0,0,VA(o,.213,-.213,.143),VA(o,.715,.285,.14),VA(o,.072,-.072,-.283),0,0,VA(o,.213,-.213,-.787),VA(o,.715,-.715,.715),VA(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=i,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,t,n,i,a){for(var{includeOpacity:o,matrix:s}=this,A=e.getImageData(0,0,i,a),l=0;l<a;l++)for(var u=0;u<i;u++){var c=R0(A.data,u,l,i,a,0),h=R0(A.data,u,l,i,a,1),f=R0(A.data,u,l,i,a,2),p=R0(A.data,u,l,i,a,3),v=gi(s,0,c)+gi(s,1,h)+gi(s,2,f)+gi(s,3,p)+gi(s,4,1),m=gi(s,5,c)+gi(s,6,h)+gi(s,7,f)+gi(s,8,p)+gi(s,9,1),g=gi(s,10,c)+gi(s,11,h)+gi(s,12,f)+gi(s,13,p)+gi(s,14,1),_=gi(s,15,c)+gi(s,16,h)+gi(s,17,f)+gi(s,18,p)+gi(s,19,1);o&&(v=0,m=0,g=0,_*=p/255),M0(A.data,u,l,i,a,0,v),M0(A.data,u,l,i,a,1,m),M0(A.data,u,l,i,a,2,g),M0(A.data,u,l,i,a,3,_)}e.clearRect(0,0,i,a),e.putImageData(A,0,0)}}class Ty extends wn{constructor(){super(...arguments),this.type="mask"}apply(e,t){var{document:n}=this,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var A=new as;this.children.forEach(p=>{A.addBoundingBox(p.getBoundingBox(e))}),i=Math.floor(A.x1),a=Math.floor(A.y1),o=Math.floor(A.width),s=Math.floor(A.height)}var l=this.removeStyles(t,Ty.ignoreStyles),u=n.createCanvas(i+o,a+s),c=u.getContext("2d");n.screen.setDefaults(c),this.renderChildren(c),new pO(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,i+o,a+s);var h=n.createCanvas(i+o,a+s),f=h.getContext("2d");n.screen.setDefaults(f),t.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=c.createPattern(u,"no-repeat"),f.fillRect(0,0,i+o,a+s),e.fillStyle=f.createPattern(h,"no-repeat"),e.fillRect(0,0,i+o,a+s),this.restoreStyles(t,l)}render(e){}}Ty.ignoreStyles=["mask","transform","clip-path"];var N2=()=>{};class t9 extends wn{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,n=Reflect.getPrototypeOf(e),{beginPath:i,closePath:a}=e;n&&(n.beginPath=N2,n.closePath=N2),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=Zu.fromElement(t,o)),s&&s.apply(e),o.path(e),n&&(n.closePath=a),s&&s.unapply(e)}}),Reflect.apply(a,e,[]),e.clip(),n&&(n.beginPath=i,n.closePath=a)}render(e){}}class xy extends wn{constructor(){super(...arguments),this.type="filter"}apply(e,t){var{document:n,children:i}=this,a=t.getBoundingBox(e);if(a){var o=0,s=0;i.forEach(g=>{var _=g.extraFilterDistance||0;o=Math.max(o,_),s=Math.max(s,_)});var A=Math.floor(a.width),l=Math.floor(a.height),u=A+2*o,c=l+2*s;if(!(u<1||c<1)){var h=Math.floor(a.x),f=Math.floor(a.y),p=this.removeStyles(t,xy.ignoreStyles),v=n.createCanvas(u,c),m=v.getContext("2d");n.screen.setDefaults(m),m.translate(-h+o,-f+s),t.render(m),i.forEach(g=>{typeof g.apply=="function"&&g.apply(m,0,0,u,c)}),e.drawImage(v,0,0,u,c,h-o,f-s,u,c),this.restoreStyles(t,p)}}}render(e){}}xy.ignoreStyles=["filter","transform","clip-path"];class e9 extends wn{constructor(e,t,n){super(e,t,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,n,i,a){}}class r9 extends wn{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,n,i,a){}}class n9 extends wn{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,n,i,a){}}class i9 extends wn{constructor(e,t,n){super(e,t,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,t,n,i,a){var{document:o,blurRadius:s}=this,A=o.window?o.window.document.body:null,l=e.canvas;l.id=o.getUniqueId(),A&&(l.style.display="none",A.appendChild(l)),AOt(l,t,n,i,a,s),A&&A.removeChild(l)}}class a9 extends wn{constructor(){super(...arguments),this.type="title"}}class o9 extends wn{constructor(){super(...arguments),this.type="desc"}}var LOt={svg:ud,rect:uO,circle:Ok,ellipse:Rk,line:Mk,polyline:cO,polygon:Nk,path:qr,pattern:Pk,marker:Uk,defs:Dk,linearGradient:Qk,radialGradient:Hk,stop:Gk,animate:gE,animateColor:kk,animateTransform:$k,font:jk,"font-face":Vk,"missing-glyph":Kk,glyph:lO,text:lc,tspan:By,tref:zk,a:Xk,textPath:Yk,image:Wk,g:vE,symbol:qk,style:fO,use:Jk,mask:Ty,clipPath:t9,filter:xy,feDropShadow:e9,feMorphology:r9,feComposite:n9,feColorMatrix:pO,feGaussianBlur:i9,title:a9,desc:o9};function P2(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function OOt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?P2(Object(t),!0).forEach(function(n){nO(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):P2(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ROt(r,e){var t=document.createElement("canvas");return t.width=r,t.height=e,t}function MOt(r){return Jb.apply(this,arguments)}function Jb(){return Jb=_l(function*(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=document.createElement("img");return e&&(t.crossOrigin="Anonymous"),new Promise((n,i)=>{t.onload=()=>{n(t)},t.onerror=(a,o,s,A,l)=>{i(l)},t.src=r})}),Jb.apply(this,arguments)}class cl{constructor(e){var{rootEmSize:t=12,emSize:n=12,createCanvas:i=cl.createCanvas,createImage:a=cl.createImage,anonymousCrossOrigin:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=t,this.emSize=n,this.createCanvas=i,this.createImage=this.bindCreateImage(a,o),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,t){return typeof t=="boolean"?(n,i)=>e(n,typeof i=="boolean"?i:t):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:t}=this;t.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}createElement(e){var t=e.nodeName.replace(/^[^:]+:/,""),n=cl.elementTypes[t];return typeof n<"u"?new n(this,e):new Lk(this,e)}createTextNode(e){return new FOt(this,e)}setViewBox(e){this.screen.setViewBox(OOt({document:this},e))}}cl.createCanvas=ROt;cl.createImage=MOt;cl.elementTypes=LOt;function U2(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Fc(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?U2(Object(t),!0).forEach(function(n){nO(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):U2(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class Kc{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new h_(n),this.screen=new Cy(e,n),this.options=n;var i=new cl(this,n),a=i.createDocumentElement(t);this.document=i,this.documentElement=a}static from(e,t){var n=arguments;return _l(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:{},a=new h_(i),o=yield a.parse(t);return new Kc(e,o,i)})()}static fromString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new h_(n),a=i.parseFromString(t);return new Kc(e,a,n)}fork(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Kc.from(e,t,Fc(Fc({},this.options),n))}forkString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Kc.fromString(e,t,Fc(Fc({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return _l(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};t.start(Fc({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),yield t.ready(),t.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:t,screen:n,options:i}=this;n.start(t,Fc(Fc({enableRedraw:!0},i),e))}stop(){this.screen.stop()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,t,n)}}var NOt=Object.freeze(Object.defineProperty({__proto__:null,default:Kc,AElement:Xk,AnimateColorElement:kk,AnimateElement:gE,AnimateTransformElement:$k,BoundingBox:as,CB1:Kb,CB2:zb,CB3:Xb,CB4:Yb,Canvg:Kc,CircleElement:Ok,ClipPathElement:t9,DefsElement:Dk,DescElement:o9,Document:cl,Element:wn,EllipseElement:Rk,FeColorMatrixElement:pO,FeCompositeElement:n9,FeDropShadowElement:e9,FeGaussianBlurElement:i9,FeMorphologyElement:r9,FilterElement:xy,Font:Ta,FontElement:jk,FontFaceElement:Vk,GElement:vE,GlyphElement:lO,GradientElement:hO,ImageElement:Wk,LineElement:Mk,LinearGradientElement:Qk,MarkerElement:Uk,MaskElement:Ty,Matrix:sO,MissingGlyphElement:Kk,Mouse:Ck,PSEUDO_ZERO:sh,Parser:h_,PathElement:qr,PathParser:qe,PatternElement:Pk,Point:jn,PolygonElement:Nk,PolylineElement:cO,Property:Se,QB1:Wb,QB2:qb,QB3:Zb,RadialGradientElement:Hk,RectElement:uO,RenderedElement:Ac,Rotate:Sk,SVGElement:ud,SVGFontLoader:Zk,Scale:bk,Screen:Cy,Skew:AO,SkewX:Fk,SkewY:Ik,StopElement:Gk,StyleElement:fO,SymbolElement:qk,TRefElement:zk,TSpanElement:By,TextElement:lc,TextPathElement:Yk,TitleElement:a9,Transform:Zu,Translate:xk,UnknownElement:Lk,UseElement:Jk,ViewPort:Ek,compressSpaces:kh,getSelectorSpecificity:wk,normalizeAttributeName:mk,normalizeColor:_k,parseExternalUrl:oO,presets:hOt,toNumbers:co,trimLeft:gk,trimRight:yk,vectorMagnitude:jb,vectorsAngle:Vb,vectorsRatio:I1},Symbol.toStringTag,{value:"Module"})),POt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function UOt(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var a=Function.bind.apply(e,i);return new a}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var tF={},DOt={get exports(){return tF},set exports(r){tF=r}};const QOt=UOt(eK);(function(r,e){(function(n,i){r.exports=i(QOt)})(POt,t=>(()=>{var n={657:(s,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.default=(l,u)=>{const c=l.__vccOpts||l;for(const[h,f]of u)c[h]=f;return c}},976:s=>{s.exports=t}},i={};function a(s){var A=i[s];if(A!==void 0)return A.exports;var l=i[s]={exports:{}};return n[s](l,l.exports,a),l.exports}a.d=(s,A)=>{for(var l in A)a.o(A,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:A[l]})},a.o=(s,A)=>Object.prototype.hasOwnProperty.call(s,A),a.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var o={};return(()=>{a.r(o),a.d(o,{Component:()=>q,LoadingPlugin:()=>vt,default:()=>wt,useLoading:()=>at});var s=a(976);function A(W){var Ft;typeof W.remove<"u"?W.remove():(Ft=W.parentNode)==null||Ft.removeChild(W)}function l(W,Ft,Ot){let V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const Z=(0,s.h)(W,Ft,V),ut=document.createElement("div");return ut.classList.add("vld-container"),Ot.appendChild(ut),(0,s.render)(Z,ut),Z.component}function u(){return typeof window<"u"}const c=u()?window.HTMLElement:Object,h=["aria-busy"],f={class:"vl-icon"};function p(W,Ft,Ot,V,Z,ut){return(0,s.openBlock)(),(0,s.createBlock)(s.Transition,{name:W.transition},{default:(0,s.withCtx)(()=>[(0,s.withDirectives)((0,s.createElementVNode)("div",{tabindex:"0",class:(0,s.normalizeClass)(["vl-overlay vl-active",{"vl-full-page":W.isFullPage}]),"aria-busy":W.isActive,"aria-label":"Loading",style:(0,s.normalizeStyle)({zIndex:W.zIndex})},[(0,s.createElementVNode)("div",{class:"vl-background",onClick:Ft[0]||(Ft[0]=(0,s.withModifiers)(function(){return W.cancel&&W.cancel(...arguments)},["prevent"])),style:(0,s.normalizeStyle)(W.bgStyle)},null,4),(0,s.createElementVNode)("div",f,[(0,s.renderSlot)(W.$slots,"before"),(0,s.renderSlot)(W.$slots,"default",{},()=>[((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(W.loader),{color:W.color,width:W.width,height:W.height},null,8,["color","width","height"]))]),(0,s.renderSlot)(W.$slots,"after")])],14,h),[[s.vShow,W.isActive]])]),_:3},8,["name"])}const v={mounted(){this.enforceFocus&&document.addEventListener("focusin",this.focusIn)},methods:{focusIn(W){if(!this.isActive||W.target===this.$el||this.$el.contains(W.target))return;let Ft=this.container?this.container:this.isFullPage?null:this.$el.parentElement;(this.isFullPage||Ft&&Ft.contains(W.target))&&(W.preventDefault(),this.$el.focus())}},beforeUnmount(){document.removeEventListener("focusin",this.focusIn)}},m=["width","height","stroke"],_=[(0,s.createStaticVNode)('<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".25" cx="18" cy="18" r="18"></circle><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.8s" repeatCount="indefinite"></animateTransform></path></g></g>',1)];function E(W,Ft,Ot,V,Z,ut){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",width:W.width,height:W.height,stroke:W.color},_,8,m)}const B=(0,s.defineComponent)({name:"spinner",props:{color:{type:String,default:"#000"},height:{type:Number,default:64},width:{type:Number,default:64}}});var L=a(657);const b=(0,L.default)(B,[["render",E]]),T=["fill","width","height"],M=[(0,s.createStaticVNode)('<circle cx="15" cy="15" r="15"><animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="60" cy="15" r="9" fill-opacity="0.3"><animate attributeName="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="105" cy="15" r="15"><animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite"></animate></circle>',3)];function S(W,Ft,Ot,V,Z,ut){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:W.color,width:W.width,height:W.height},M,8,T)}const x=(0,s.defineComponent)({name:"dots",props:{color:{type:String,default:"#000"},height:{type:Number,default:240},width:{type:Number,default:60}}}),P=(0,L.default)(x,[["render",S]]),Y=["height","width","fill"],tt=[(0,s.createStaticVNode)('<rect x="0" y="13" width="4" height="5"><animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="10" y="13" width="4" height="5"><animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="20" y="13" width="4" height="5"><animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate></rect>',3)];function J(W,Ft,Ot,V,Z,ut){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",height:W.height,width:W.width,fill:W.color},tt,8,Y)}const nt=(0,s.defineComponent)({name:"bars",props:{color:{type:String,default:"#000"},height:{type:Number,default:40},width:{type:Number,default:40}}}),R={Spinner:b,Dots:P,Bars:(0,L.default)(nt,[["render",J]])},$=(0,s.defineComponent)({name:"VueLoading",mixins:[v],props:{active:Boolean,programmatic:Boolean,container:[Object,Function,c],isFullPage:{type:Boolean,default:!0},enforceFocus:{type:Boolean,default:!0},lockScroll:Boolean,transition:{type:String,default:"fade"},canCancel:Boolean,onCancel:{type:Function,default:()=>{}},color:String,backgroundColor:String,opacity:Number,width:Number,height:Number,zIndex:Number,loader:{type:String,default:"spinner"}},components:R,emits:["hide","update:active"],data(){return{isActive:this.active}},mounted(){document.addEventListener("keyup",this.keyPress)},methods:{cancel(){!this.canCancel||!this.isActive||(this.hide(),this.onCancel.apply(null,arguments))},hide(){this.$emit("hide"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout(()=>{const W=this.$el.parentElement;(0,s.render)(null,W),A(W)},150))},disableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.add("vl-shown")},enableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.remove("vl-shown")},keyPress(W){W.keyCode===27&&this.cancel()}},watch:{active(W){this.isActive=W},isActive(W){W?this.disableScroll():this.enableScroll()}},computed:{bgStyle(){return{background:this.backgroundColor,opacity:this.opacity}}},beforeUnmount(){document.removeEventListener("keyup",this.keyPress)}}),q=(0,L.default)($,[["render",p]]);function at(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{show(){let Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:W,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ft;const ut={...W,...Ot,...{programmatic:!0,lockScroll:!0,isFullPage:!1,active:!0}};let rt=ut.container;ut.container||(rt=document.body,ut.isFullPage=!0);const G={...Ft,...V};return{hide:l(q,ut,rt,G).ctx.hide}}}}const vt=function(W){let Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const V=at(Ft,Ot);W.config.globalProperties.$loading=V,W.provide("$loading",V)},wt=q})(),o})())})(DOt);const dO=_Q(jz);dO.use(zS);dO.use(tF.LoadingPlugin);dO.mount("#app")});export default HOt();