2046 lines
2.0 MiB
2046 lines
2.0 MiB
(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 nC(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 LK="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",OK=nC(LK);function c0(r){if(Oe(r)){const e={};for(let t=0;t<r.length;t++){const n=r[t],i=Hn(n)?NK(n):c0(n);if(i)for(const a in i)e[a]=i[a]}return e}else{if(Hn(r))return r;if(Tn(r))return r}}const FK=/;(?![^(]*\))/g,RK=/:([^]+)/,MK=/\/\*.*?\*\//gs;function NK(r){const e={};return r.replace(MK,"").split(FK).forEach(t=>{if(t){const n=t.split(RK);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function h0(r){let e="";if(Hn(r))e=r;else if(Oe(r))for(let t=0;t<r.length;t++){const n=h0(r[t]);n&&(e+=n+" ")}else if(Tn(r))for(const t in r)r[t]&&(e+=t+" ");return e.trim()}function PK(r){if(!r)return null;let{class:e,style:t}=r;return e&&!Hn(e)&&(r.class=h0(e)),t&&(r.style=c0(t)),r}const UK="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",DK=nC(UK);function K6(r){return!!r||r===""}function QK(r,e){if(r.length!==e.length)return!1;let t=!0;for(let n=0;t&&n<r.length;n++)t=th(r[n],e[n]);return t}function th(r,e){if(r===e)return!0;let t=BN(r),n=BN(e);if(t||n)return t&&n?r.getTime()===e.getTime():!1;if(t=Sy(r),n=Sy(e),t||n)return r===e;if(t=Oe(r),n=Oe(e),t||n)return t&&n?QK(r,e):!1;if(t=Tn(r),n=Tn(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||!th(r[o],e[o]))return!1}}return String(r)===String(e)}function iC(r,e){return r.findIndex(t=>th(t,e))}const kK=r=>Hn(r)?r:r==null?"":Oe(r)||Tn(r)&&(r.toString===z6||!ar(r.toString))?JSON.stringify(r,W6,2):String(r),W6=(r,e)=>e&&e.__v_isRef?W6(r,e.value):sg(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,i])=>(t[`${n} =>`]=i,t),{})}:gd(e)?{[`Set(${e.size})`]:[...e.values()]}:Tn(e)&&!Oe(e)&&!Y6(e)?String(e):e,wn={},og=[],gA=()=>{},HK=()=>!1,GK=/^on[^a-z]/,f0=r=>GK.test(r),LO=r=>r.startsWith("onUpdate:"),ci=Object.assign,OO=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},$K=Object.prototype.hasOwnProperty,Vr=(r,e)=>$K.call(r,e),Oe=Array.isArray,sg=r=>tv(r)==="[object Map]",gd=r=>tv(r)==="[object Set]",BN=r=>tv(r)==="[object Date]",VK=r=>tv(r)==="[object RegExp]",ar=r=>typeof r=="function",Hn=r=>typeof r=="string",Sy=r=>typeof r=="symbol",Tn=r=>r!==null&&typeof r=="object",FO=r=>Tn(r)&&ar(r.then)&&ar(r.catch),z6=Object.prototype.toString,tv=r=>z6.call(r),jK=r=>tv(r).slice(8,-1),Y6=r=>tv(r)==="[object Object]",RO=r=>Hn(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,Zm=nC(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),aC=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},KK=/-(\w)/g,Uo=aC(r=>r.replace(KK,(e,t)=>t?t.toUpperCase():"")),WK=/\B([A-Z])/g,Us=aC(r=>r.replace(WK,"-$1").toLowerCase()),d0=aC(r=>r.charAt(0).toUpperCase()+r.slice(1)),Jm=aC(r=>r?`on${d0(r)}`:""),Tg=(r,e)=>!Object.is(r,e),Ag=(r,e)=>{for(let t=0;t<r.length;t++)r[t](e)},Lw=(r,e,t)=>{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value:t})},Ow=r=>{const e=parseFloat(r);return isNaN(e)?r:e},Fw=r=>{const e=Hn(r)?Number(r):NaN;return isNaN(e)?r:e};let bN;const zK=()=>bN||(bN=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let hs;class MO{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=hs,!e&&hs&&(this.index=(hs.scopes||(hs.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=hs;try{return hs=this,e()}finally{hs=t}}}on(){hs=this}off(){hs=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 YK(r){return new MO(r)}function X6(r,e=hs){e&&e.active&&e.effects.push(r)}function q6(){return hs}function XK(r){hs&&hs.cleanups.push(r)}const NO=r=>{const e=new Set(r);return e.w=0,e.n=0,e},Z6=r=>(r.w&eh)>0,J6=r=>(r.n&eh)>0,qK=({deps:r})=>{if(r.length)for(let e=0;e<r.length;e++)r[e].w|=eh},ZK=r=>{const{deps:e}=r;if(e.length){let t=0;for(let n=0;n<e.length;n++){const i=e[n];Z6(i)&&!J6(i)?i.delete(r):e[t++]=i,i.w&=~eh,i.n&=~eh}e.length=t}},Rw=new WeakMap;let Lm=0,eh=1;const KS=30;let hA;const Of=Symbol(""),WS=Symbol("");class p0{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,X6(this,n)}run(){if(!this.active)return this.fn();let e=hA,t=Vc;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=hA,hA=this,Vc=!0,eh=1<<++Lm,Lm<=KS?qK(this):TN(this),this.fn()}finally{Lm<=KS&&ZK(this),eh=1<<--Lm,hA=this.parent,Vc=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){hA===this?this.deferStop=!0:this.active&&(TN(this),this.onStop&&this.onStop(),this.active=!1)}}function TN(r){const{deps:e}=r;if(e.length){for(let t=0;t<e.length;t++)e[t].delete(r);e.length=0}}function JK(r,e){r.effect&&(r=r.effect.fn);const t=new p0(r);e&&(ci(t,e),e.scope&&X6(t,e.scope)),(!e||!e.lazy)&&t.run();const n=t.run.bind(t);return n.effect=t,n}function tW(r){r.effect.stop()}let Vc=!0;const t4=[];function ev(){t4.push(Vc),Vc=!1}function rv(){const r=t4.pop();Vc=r===void 0?!0:r}function ko(r,e,t){if(Vc&&hA){let n=Rw.get(r);n||Rw.set(r,n=new Map);let i=n.get(t);i||n.set(t,i=NO()),e4(i)}}function e4(r,e){let t=!1;Lm<=KS?J6(r)||(r.n|=eh,t=!Z6(r)):t=!r.has(hA),t&&(r.add(hA),hA.deps.push(r))}function wu(r,e,t,n,i,a){const o=Rw.get(r);if(!o)return;let s=[];if(e==="clear")s=[...o.values()];else if(t==="length"&&Oe(r)){const A=Number(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":Oe(r)?RO(t)&&s.push(o.get("length")):(s.push(o.get(Of)),sg(r)&&s.push(o.get(WS)));break;case"delete":Oe(r)||(s.push(o.get(Of)),sg(r)&&s.push(o.get(WS)));break;case"set":sg(r)&&s.push(o.get(Of));break}if(s.length===1)s[0]&&zS(s[0]);else{const A=[];for(const l of s)l&&A.push(...l);zS(NO(A))}}function zS(r,e){const t=Oe(r)?r:[...r];for(const n of t)n.computed&&SN(n);for(const n of t)n.computed||SN(n)}function SN(r,e){(r!==hA||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}function eW(r,e){var t;return(t=Rw.get(r))===null||t===void 0?void 0:t.get(e)}const rW=nC("__proto__,__v_isRef,__isVue"),r4=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(Sy)),nW=oC(),iW=oC(!1,!0),aW=oC(!0),oW=oC(!0,!0),xN=sW();function sW(){const r={};return["includes","indexOf","lastIndexOf"].forEach(e=>{r[e]=function(...t){const n=Dr(this);for(let a=0,o=this.length;a<o;a++)ko(n,"get",a+"");const i=n[e](...t);return i===-1||i===!1?n[e](...t.map(Dr)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{r[e]=function(...t){ev();const n=Dr(this)[e].apply(this,t);return rv(),n}}),r}function AW(r){const e=Dr(this);return ko(e,"has",r),e.hasOwnProperty(r)}function oC(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?l4:A4:e?s4:o4).get(n))return n;const o=Oe(n);if(!r){if(o&&Vr(xN,i))return Reflect.get(xN,i,a);if(i==="hasOwnProperty")return AW}const s=Reflect.get(n,i,a);return(Sy(i)?r4.has(i):rW(i))||(r||ko(n,"get",i),e)?s:Aa(s)?o&&RO(i)?s:s.value:Tn(s)?r?UO(s):vd(s):s}}const lW=n4(),uW=n4(!0);function n4(r=!1){return function(t,n,i,a){let o=t[n];if(Yf(o)&&Aa(o)&&!Aa(i))return!1;if(!r&&(!xy(i)&&!Yf(i)&&(o=Dr(o),i=Dr(i)),!Oe(t)&&Aa(o)&&!Aa(i)))return o.value=i,!0;const s=Oe(t)&&RO(n)?Number(n)<t.length:Vr(t,n),A=Reflect.set(t,n,i,a);return t===Dr(a)&&(s?Tg(i,o)&&wu(t,"set",n,i):wu(t,"add",n,i)),A}}function cW(r,e){const t=Vr(r,e);r[e];const n=Reflect.deleteProperty(r,e);return n&&t&&wu(r,"delete",e,void 0),n}function hW(r,e){const t=Reflect.has(r,e);return(!Sy(e)||!r4.has(e))&&ko(r,"has",e),t}function fW(r){return ko(r,"iterate",Oe(r)?"length":Of),Reflect.ownKeys(r)}const i4={get:nW,set:lW,deleteProperty:cW,has:hW,ownKeys:fW},a4={get:aW,set(r,e){return!0},deleteProperty(r,e){return!0}},dW=ci({},i4,{get:iW,set:uW}),pW=ci({},a4,{get:oW}),PO=r=>r,sC=r=>Reflect.getPrototypeOf(r);function x_(r,e,t=!1,n=!1){r=r.__v_raw;const i=Dr(r),a=Dr(e);t||(e!==a&&ko(i,"get",e),ko(i,"get",a));const{has:o}=sC(i),s=n?PO:t?kO:Iy;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 I_(r,e=!1){const t=this.__v_raw,n=Dr(t),i=Dr(r);return e||(r!==i&&ko(n,"has",r),ko(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function L_(r,e=!1){return r=r.__v_raw,!e&&ko(Dr(r),"iterate",Of),Reflect.get(r,"size",r)}function IN(r){r=Dr(r);const e=Dr(this);return sC(e).has.call(e,r)||(e.add(r),wu(e,"add",r,r)),this}function LN(r,e){e=Dr(e);const t=Dr(this),{has:n,get:i}=sC(t);let a=n.call(t,r);a||(r=Dr(r),a=n.call(t,r));const o=i.call(t,r);return t.set(r,e),a?Tg(e,o)&&wu(t,"set",r,e):wu(t,"add",r,e),this}function ON(r){const e=Dr(this),{has:t,get:n}=sC(e);let i=t.call(e,r);i||(r=Dr(r),i=t.call(e,r)),n&&n.call(e,r);const a=e.delete(r);return i&&wu(e,"delete",r,void 0),a}function FN(){const r=Dr(this),e=r.size!==0,t=r.clear();return e&&wu(r,"clear",void 0,void 0),t}function O_(r,e){return function(n,i){const a=this,o=a.__v_raw,s=Dr(o),A=e?PO:r?kO:Iy;return!r&&ko(s,"iterate",Of),o.forEach((l,u)=>n.call(i,A(l),A(u),a))}}function F_(r,e,t){return function(...n){const i=this.__v_raw,a=Dr(i),o=sg(a),s=r==="entries"||r===Symbol.iterator&&o,A=r==="keys"&&o,l=i[r](...n),u=t?PO:e?kO:Iy;return!e&&ko(a,"iterate",A?WS:Of),{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 Ac(r){return function(...e){return r==="delete"?!1:this}}function gW(){const r={get(a){return x_(this,a)},get size(){return L_(this)},has:I_,add:IN,set:LN,delete:ON,clear:FN,forEach:O_(!1,!1)},e={get(a){return x_(this,a,!1,!0)},get size(){return L_(this)},has:I_,add:IN,set:LN,delete:ON,clear:FN,forEach:O_(!1,!0)},t={get(a){return x_(this,a,!0)},get size(){return L_(this,!0)},has(a){return I_.call(this,a,!0)},add:Ac("add"),set:Ac("set"),delete:Ac("delete"),clear:Ac("clear"),forEach:O_(!0,!1)},n={get(a){return x_(this,a,!0,!0)},get size(){return L_(this,!0)},has(a){return I_.call(this,a,!0)},add:Ac("add"),set:Ac("set"),delete:Ac("delete"),clear:Ac("clear"),forEach:O_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=F_(a,!1,!1),t[a]=F_(a,!0,!1),e[a]=F_(a,!1,!0),n[a]=F_(a,!0,!0)}),[r,t,e,n]}const[vW,mW,yW,_W]=gW();function AC(r,e){const t=e?r?_W:yW:r?mW:vW;return(n,i,a)=>i==="__v_isReactive"?!r:i==="__v_isReadonly"?r:i==="__v_raw"?n:Reflect.get(Vr(t,i)&&i in n?t:n,i,a)}const wW={get:AC(!1,!1)},EW={get:AC(!1,!0)},CW={get:AC(!0,!1)},BW={get:AC(!0,!0)},o4=new WeakMap,s4=new WeakMap,A4=new WeakMap,l4=new WeakMap;function bW(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function TW(r){return r.__v_skip||!Object.isExtensible(r)?0:bW(jK(r))}function vd(r){return Yf(r)?r:lC(r,!1,i4,wW,o4)}function u4(r){return lC(r,!1,dW,EW,s4)}function UO(r){return lC(r,!0,a4,CW,A4)}function SW(r){return lC(r,!0,pW,BW,l4)}function lC(r,e,t,n,i){if(!Tn(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const a=i.get(r);if(a)return a;const o=TW(r);if(o===0)return r;const s=new Proxy(r,o===2?n:t);return i.set(r,s),s}function Ff(r){return Yf(r)?Ff(r.__v_raw):!!(r&&r.__v_isReactive)}function Yf(r){return!!(r&&r.__v_isReadonly)}function xy(r){return!!(r&&r.__v_isShallow)}function DO(r){return Ff(r)||Yf(r)}function Dr(r){const e=r&&r.__v_raw;return e?Dr(e):r}function QO(r){return Lw(r,"__v_skip",!0),r}const Iy=r=>Tn(r)?vd(r):r,kO=r=>Tn(r)?UO(r):r;function HO(r){Vc&&hA&&(r=Dr(r),e4(r.dep||(r.dep=NO())))}function uC(r,e){r=Dr(r);const t=r.dep;t&&zS(t)}function Aa(r){return!!(r&&r.__v_isRef===!0)}function Fo(r){return h4(r,!1)}function c4(r){return h4(r,!0)}function h4(r,e){return Aa(r)?r:new xW(r,e)}class xW{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Dr(e),this._value=t?e:Iy(e)}get value(){return HO(this),this._value}set value(e){const t=this.__v_isShallow||xy(e)||Yf(e);e=t?e:Dr(e),Tg(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Iy(e),uC(this))}}function IW(r){uC(r)}function Rf(r){return Aa(r)?r.value:r}const LW={get:(r,e,t)=>Rf(Reflect.get(r,e,t)),set:(r,e,t,n)=>{const i=r[e];return Aa(i)&&!Aa(t)?(i.value=t,!0):Reflect.set(r,e,t,n)}};function GO(r){return Ff(r)?r:new Proxy(r,LW)}class OW{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e(()=>HO(this),()=>uC(this));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function FW(r){return new OW(r)}function rh(r){const e=Oe(r)?new Array(r.length):{};for(const t in r)e[t]=f4(r,t);return e}class RW{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}get dep(){return eW(Dr(this._object),this._key)}}function f4(r,e,t){const n=r[e];return Aa(n)?n:new RW(r,e,t)}var d4;class MW{constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[d4]=!1,this._dirty=!0,this.effect=new p0(e,()=>{this._dirty||(this._dirty=!0,uC(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Dr(this);return HO(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}d4="__v_isReadonly";function NW(r,e,t=!1){let n,i;const a=ar(r);return a?(n=r,i=gA):(n=r.get,i=r.set),new MW(n,i,a||!i,t)}function PW(r,...e){}function UW(r,e){}function fu(r,e,t,n){let i;try{i=n?r(...n):r()}catch(a){md(a,e,t)}return i}function ms(r,e,t,n){if(ar(r)){const a=fu(r,e,t,n);return a&&FO(a)&&a.catch(o=>{md(o,e,t)}),a}const i=[];for(let a=0;a<r.length;a++)i.push(ms(r[a],e,t,n));return i}function md(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){fu(A,null,10,[r,o,s]);return}}DW(r,t,i,n)}function DW(r,e,t,n=!0){console.error(r)}let Ly=!1,YS=!1;const ja=[];let JA=0;const lg=[];let nu=null,yf=0;const p4=Promise.resolve();let $O=null;function cC(r){const e=$O||p4;return r?e.then(this?r.bind(this):r):e}function QW(r){let e=JA+1,t=ja.length;for(;e<t;){const n=e+t>>>1;Oy(ja[n])<r?e=n+1:t=n}return e}function hC(r){(!ja.length||!ja.includes(r,Ly&&r.allowRecurse?JA+1:JA))&&(r.id==null?ja.push(r):ja.splice(QW(r.id),0,r),g4())}function g4(){!Ly&&!YS&&(YS=!0,$O=p4.then(v4))}function kW(r){const e=ja.indexOf(r);e>JA&&ja.splice(e,1)}function VO(r){Oe(r)?lg.push(...r):(!nu||!nu.includes(r,r.allowRecurse?yf+1:yf))&&lg.push(r),g4()}function RN(r,e=Ly?JA+1:0){for(;e<ja.length;e++){const t=ja[e];t&&t.pre&&(ja.splice(e,1),e--,t())}}function Mw(r){if(lg.length){const e=[...new Set(lg)];if(lg.length=0,nu){nu.push(...e);return}for(nu=e,nu.sort((t,n)=>Oy(t)-Oy(n)),yf=0;yf<nu.length;yf++)nu[yf]();nu=null,yf=0}}const Oy=r=>r.id==null?1/0:r.id,HW=(r,e)=>{const t=Oy(r)-Oy(e);if(t===0){if(r.pre&&!e.pre)return-1;if(e.pre&&!r.pre)return 1}return t};function v4(r){YS=!1,Ly=!0,ja.sort(HW);const e=gA;try{for(JA=0;JA<ja.length;JA++){const t=ja[JA];t&&t.active!==!1&&fu(t,null,14)}}finally{JA=0,ja.length=0,Mw(),Ly=!1,$O=null,(ja.length||lg.length)&&v4()}}let Np,R_=[];function m4(r,e){var t,n;Np=r,Np?(Np.enabled=!0,R_.forEach(({event:i,args:a})=>Np.emit(i,...a)),R_=[]):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=>{m4(a,e)}),setTimeout(()=>{Np||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,R_=[])},3e3)):R_=[]}function GW(r,e,...t){if(r.isUnmounted)return;const n=r.vnode.props||wn;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]||wn;h&&(i=t.map(f=>Hn(f)?f.trim():f)),c&&(i=t.map(Ow))}let s,A=n[s=Jm(e)]||n[s=Jm(Uo(e))];!A&&a&&(A=n[s=Jm(Us(e))]),A&&ms(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,ms(l,r,6,i)}}function y4(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(!ar(r)){const A=l=>{const u=y4(l,e,!0);u&&(s=!0,ci(o,u))};!t&&e.mixins.length&&e.mixins.forEach(A),r.extends&&A(r.extends),r.mixins&&r.mixins.forEach(A)}return!a&&!s?(Tn(r)&&n.set(r,null),null):(Oe(a)?a.forEach(A=>o[A]=null):ci(o,a),Tn(r)&&n.set(r,o),o)}function fC(r,e){return!r||!f0(e)?!1:(e=e.slice(2).replace(/Once$/,""),Vr(r,e[0].toLowerCase()+e.slice(1))||Vr(r,Us(e))||Vr(r,e))}let _a=null,dC=null;function Fy(r){const e=_a;return _a=r,dC=r&&r.type.__scopeId||null,e}function $W(r){dC=r}function VW(){dC=null}const jW=r=>jO;function jO(r,e=_a,t){if(!e||r._n)return r;const n=(...i)=>{n._d&&rx(-1);const a=Fy(e);let o;try{o=r(...i)}finally{Fy(a),n._d&&rx(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function q1(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:d,inheritAttrs:g}=r;let m,v;const y=Fy(r);try{if(t.shapeFlag&4){const C=i||n;m=fs(u.call(C,C,c,a,f,h,d)),v=A}else{const C=e;m=fs(C.length>1?C(a,{attrs:A,slots:s,emit:l}):C(a,null)),v=e.props?A:WW(A)}}catch(C){ry.length=0,md(C,r,1),m=Pn(Wa)}let w=m;if(v&&g!==!1){const C=Object.keys(v),{shapeFlag:O}=w;C.length&&O&7&&(o&&C.some(LO)&&(v=zW(v,o)),w=gl(w,v))}return t.dirs&&(w=gl(w),w.dirs=w.dirs?w.dirs.concat(t.dirs):t.dirs),t.transition&&(w.transition=t.transition),m=w,Fy(y),m}function KW(r){let e;for(let t=0;t<r.length;t++){const n=r[t];if(nh(n)){if(n.type!==Wa||n.children==="v-if"){if(e)return;e=n}}else return}return e}const WW=r=>{let e;for(const t in r)(t==="class"||t==="style"||f0(t))&&((e||(e={}))[t]=r[t]);return e},zW=(r,e)=>{const t={};for(const n in r)(!LO(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function YW(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?MN(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]&&!fC(l,h))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:n===o?!1:n?o?MN(n,o,l):!0:!!o;return!1}function MN(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]&&!fC(t,a))return!0}return!1}function KO({vnode:r,parent:e},t){for(;e&&e.subTree===r;)(r=e.vnode).el=t,e=e.parent}const _4=r=>r.__isSuspense,XW={name:"Suspense",__isSuspense:!0,process(r,e,t,n,i,a,o,s,A,l){r==null?ZW(e,t,n,i,a,o,s,A,l):JW(r,e,t,n,i,o,s,A,l)},hydrate:tz,create:WO,normalize:ez},qW=XW;function Ry(r,e){const t=r.props&&r.props[e];ar(t)&&t()}function ZW(r,e,t,n,i,a,o,s,A){const{p:l,o:{createElement:u}}=A,c=u("div"),h=r.suspense=WO(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?(Ry(r,"onPending"),Ry(r,"onFallback"),l(null,r.ssFallback,e,t,n,null,a,o),ug(h,r.ssFallback)):h.resolve()}function JW(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:d,pendingBranch:g,isInFallback:m,isHydrating:v}=c;if(g)c.pendingBranch=h,fA(h,g)?(A(g,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():m&&(A(d,f,t,n,i,null,a,o,s),ug(c,f))):(c.pendingId++,v?(c.isHydrating=!1,c.activeBranch=g):l(g,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(d,f,t,n,i,null,a,o,s),ug(c,f))):d&&fA(h,d)?(A(d,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(d&&fA(h,d))A(d,h,t,n,i,c,a,o,s),ug(c,h);else if(Ry(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:y,pendingId:w}=c;y>0?setTimeout(()=>{c.pendingId===w&&c.fallback(f)},y):y===0&&c.fallback(f)}}function WO(r,e,t,n,i,a,o,s,A,l,u=!1){const{p:c,m:h,um:f,n:d,o:{parentNode:g,remove:m}}=l,v=r.props?Fw(r.props.timeout):void 0,y={vnode:r,parent:e,parentComponent:t,isSVG:o,container:n,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof v=="number"?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(w=!1){const{vnode:C,activeBranch:O,pendingBranch:F,pendingId:I,effects:T,parentComponent:L,container:N}=y;if(y.isHydrating)y.isHydrating=!1;else if(!w){const P=O&&F.transition&&F.transition.mode==="out-in";P&&(O.transition.afterLeave=()=>{I===y.pendingId&&h(F,N,U,0)});let{anchor:U}=y;O&&(U=d(O),f(O,L,y,!0)),P||h(F,N,U,0)}ug(y,F),y.pendingBranch=null,y.isInFallback=!1;let x=y.parent,S=!1;for(;x;){if(x.pendingBranch){x.effects.push(...T),S=!0;break}x=x.parent}S||VO(T),y.effects=[],Ry(C,"onResolve")},fallback(w){if(!y.pendingBranch)return;const{vnode:C,activeBranch:O,parentComponent:F,container:I,isSVG:T}=y;Ry(C,"onFallback");const L=d(O),N=()=>{y.isInFallback&&(c(null,w,I,L,F,null,T,s,A),ug(y,w))},x=w.transition&&w.transition.mode==="out-in";x&&(O.transition.afterLeave=N),y.isInFallback=!0,f(O,F,null,!0),x||N()},move(w,C,O){y.activeBranch&&h(y.activeBranch,w,C,O),y.container=w},next(){return y.activeBranch&&d(y.activeBranch)},registerDep(w,C){const O=!!y.pendingBranch;O&&y.deps++;const F=w.vnode.el;w.asyncDep.catch(I=>{md(I,w,0)}).then(I=>{if(w.isUnmounted||y.isUnmounted||y.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:T}=w;nx(w,I,!1),F&&(T.el=F);const L=!F&&w.subTree.el;C(w,T,g(F||w.subTree.el),F?null:d(w.subTree),y,o,A),L&&m(L),KO(w,T.el),O&&--y.deps===0&&y.resolve()})},unmount(w,C){y.isUnmounted=!0,y.activeBranch&&f(y.activeBranch,t,w,C),y.pendingBranch&&f(y.pendingBranch,t,w,C)}};return y}function tz(r,e,t,n,i,a,o,s,A){const l=e.suspense=WO(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 ez(r){const{shapeFlag:e,children:t}=r,n=e&32;r.ssContent=NN(n?t.default:t),r.ssFallback=n?NN(t.fallback):Pn(Wa)}function NN(r){let e;if(ar(r)){const t=Zf&&r._c;t&&(r._d=!1,ti()),r=r(),t&&(r._d=!0,e=Po,Y4())}return Oe(r)&&(r=KW(r)),r=fs(r),e&&!r.dynamicChildren&&(r.dynamicChildren=e.filter(t=>t!==r)),r}function w4(r,e){e&&e.pendingBranch?Oe(r)?e.effects.push(...r):e.effects.push(r):VO(r)}function ug(r,e){r.activeBranch=e;const{vnode:t,parentComponent:n}=r,i=t.el=e.el;n&&n.subTree===t&&(n.vnode.el=i,KO(n,i))}function Qr(r,e){if(li){let t=li.provides;const n=li.parent&&li.parent.provides;n===t&&(t=li.provides=Object.create(n)),t[r]=e}}function Be(r,e,t=!1){const n=li||_a;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&&ar(e)?e.call(n.proxy):e}}function E4(r,e){return g0(r,null,e)}function C4(r,e){return g0(r,null,{flush:"post"})}function rz(r,e){return g0(r,null,{flush:"sync"})}const M_={};function ye(r,e,t){return g0(r,e,t)}function g0(r,e,{immediate:t,deep:n,flush:i,onTrack:a,onTrigger:o}=wn){const s=q6()===(li==null?void 0:li.scope)?li:null;let A,l=!1,u=!1;if(Aa(r)?(A=()=>r.value,l=xy(r)):Ff(r)?(A=()=>r,n=!0):Oe(r)?(u=!0,l=r.some(w=>Ff(w)||xy(w)),A=()=>r.map(w=>{if(Aa(w))return w.value;if(Ff(w))return Bf(w);if(ar(w))return fu(w,s,2)})):ar(r)?e?A=()=>fu(r,s,2):A=()=>{if(!(s&&s.isUnmounted))return c&&c(),ms(r,s,3,[h])}:A=gA,e&&n){const w=A;A=()=>Bf(w())}let c,h=w=>{c=v.onStop=()=>{fu(w,s,4)}},f;if(xg)if(h=gA,e?t&&ms(e,s,3,[A(),u?[]:void 0,h]):A(),i==="sync"){const w=sk();f=w.__watcherHandles||(w.__watcherHandles=[])}else return gA;let d=u?new Array(r.length).fill(M_):M_;const g=()=>{if(v.active)if(e){const w=v.run();(n||l||(u?w.some((C,O)=>Tg(C,d[O])):Tg(w,d)))&&(c&&c(),ms(e,s,3,[w,d===M_?void 0:u&&d[0]===M_?[]:d,h]),d=w)}else v.run()};g.allowRecurse=!!e;let m;i==="sync"?m=g:i==="post"?m=()=>ga(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),m=()=>hC(g));const v=new p0(A,m);e?t?g():d=v.run():i==="post"?ga(v.run.bind(v),s&&s.suspense):v.run();const y=()=>{v.stop(),s&&s.scope&&OO(s.scope.effects,v)};return f&&f.push(y),y}function nz(r,e,t){const n=this.proxy,i=Hn(r)?r.includes(".")?B4(n,r):()=>n[r]:r.bind(n,n);let a;ar(e)?a=e:(a=e.handler,t=e);const o=li;ih(this);const s=g0(i,a.bind(n),t);return o?ih(o):jc(),s}function B4(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 Bf(r,e){if(!Tn(r)||r.__v_skip||(e=e||new Set,e.has(r)))return r;if(e.add(r),Aa(r))Bf(r.value,e);else if(Oe(r))for(let t=0;t<r.length;t++)Bf(r[t],e);else if(gd(r)||sg(r))r.forEach(t=>{Bf(t,e)});else if(Y6(r))for(const t in r)Bf(r[t],e);return r}function zO(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return cr(()=>{r.isMounted=!0}),mC(()=>{r.isUnmounting=!0}),r}const Os=[Function,Array],iz={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Os,onEnter:Os,onAfterEnter:Os,onEnterCancelled:Os,onBeforeLeave:Os,onLeave:Os,onAfterLeave:Os,onLeaveCancelled:Os,onBeforeAppear:Os,onAppear:Os,onAfterAppear:Os,onAppearCancelled:Os},setup(r,{slots:e}){const t=yh(),n=zO();let i;return()=>{const a=e.default&&pC(e.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const g of a)if(g.type!==Wa){o=g;break}}const s=Dr(r),{mode:A}=s;if(n.isLeaving)return Bb(o);const l=PN(o);if(!l)return Bb(o);const u=Sg(l,s,n,t);Xf(l,u);const c=t.subTree,h=c&&PN(c);let f=!1;const{getTransitionKey:d}=l.type;if(d){const g=d();i===void 0?i=g:g!==i&&(i=g,f=!0)}if(h&&h.type!==Wa&&(!fA(l,h)||f)){const g=Sg(h,s,n,t);if(Xf(h,g),A==="out-in")return n.isLeaving=!0,g.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},Bb(o);A==="in-out"&&l.type!==Wa&&(g.delayLeave=(m,v,y)=>{const w=b4(n,h);w[String(h.key)]=h,m._leaveCb=()=>{v(),m._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=y})}return o}}},YO=iz;function b4(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 Sg(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:d,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=e,w=String(r.key),C=b4(t,r),O=(T,L)=>{T&&ms(T,n,9,L)},F=(T,L)=>{const N=L[1];O(T,L),Oe(T)?T.every(x=>x.length<=1)&&N():T.length<=1&&N()},I={mode:a,persisted:o,beforeEnter(T){let L=s;if(!t.isMounted)if(i)L=g||s;else return;T._leaveCb&&T._leaveCb(!0);const N=C[w];N&&fA(r,N)&&N.el._leaveCb&&N.el._leaveCb(),O(L,[T])},enter(T){let L=A,N=l,x=u;if(!t.isMounted)if(i)L=m||A,N=v||l,x=y||u;else return;let S=!1;const P=T._enterCb=U=>{S||(S=!0,U?O(x,[T]):O(N,[T]),I.delayedLeave&&I.delayedLeave(),T._enterCb=void 0)};L?F(L,[T,P]):P()},leave(T,L){const N=String(r.key);if(T._enterCb&&T._enterCb(!0),t.isUnmounting)return L();O(c,[T]);let x=!1;const S=T._leaveCb=P=>{x||(x=!0,L(),P?O(d,[T]):O(f,[T]),T._leaveCb=void 0,C[N]===r&&delete C[N])};C[N]=r,h?F(h,[T,S]):S()},clone(T){return Sg(T,e,t,n)}};return I}function Bb(r){if(m0(r))return r=gl(r),r.children=null,r}function PN(r){return m0(r)?r.children?r.children[0]:void 0:r}function Xf(r,e){r.shapeFlag&6&&r.component?Xf(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 pC(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===ya?(o.patchFlag&128&&i++,n=n.concat(pC(o.children,e,s))):(e||o.type!==Wa)&&n.push(s!=null?gl(o,{key:s}):o)}if(i>1)for(let a=0;a<n.length;a++)n[a].patchFlag=-2;return n}function v0(r){return ar(r)?{setup:r,name:r.name}:r}const Mf=r=>!!r.type.__asyncLoader;function az(r){ar(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(d=>{if(d=d instanceof Error?d:new Error(String(d)),s)return new Promise((g,m)=>{s(d,()=>g(c()),()=>m(d),u+1)});throw d}).then(d=>f!==A&&A?A:(d&&(d.__esModule||d[Symbol.toStringTag]==="Module")&&(d=d.default),l=d,d)))};return v0({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return l},setup(){const f=li;if(l)return()=>bb(l,f);const d=y=>{A=null,md(y,f,13,!n)};if(o&&f.suspense||xg)return h().then(y=>()=>bb(y,f)).catch(y=>(d(y),()=>n?Pn(n,{error:y}):null));const g=Fo(!1),m=Fo(),v=Fo(!!i);return i&&setTimeout(()=>{v.value=!1},i),a!=null&&setTimeout(()=>{if(!g.value&&!m.value){const y=new Error(`Async component timed out after ${a}ms.`);d(y),m.value=y}},a),h().then(()=>{g.value=!0,f.parent&&m0(f.parent.vnode)&&hC(f.parent.update)}).catch(y=>{d(y),m.value=y}),()=>{if(g.value&&l)return bb(l,f);if(m.value&&n)return Pn(n,{error:m.value});if(t&&!v.value)return Pn(t)}}})}function bb(r,e){const{ref:t,props:n,children:i,ce:a}=e.vnode,o=Pn(r,n,i);return o.ref=t,o.ce=a,delete e.vnode.ce,o}const m0=r=>r.type.__isKeepAlive,oz={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:e}){const t=yh(),n=t.ctx;if(!n.renderer)return()=>{const y=e.default&&e.default();return y&&y.length===1?y[0]:y};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=(y,w,C,O,F)=>{const I=y.component;l(y,w,C,0,s),A(I.vnode,y,w,C,I,s,O,y.slotScopeIds,F),ga(()=>{I.isDeactivated=!1,I.a&&Ag(I.a);const T=y.props&&y.props.onVnodeMounted;T&&Oo(T,I.parent,y)},s)},n.deactivate=y=>{const w=y.component;l(y,h,null,1,s),ga(()=>{w.da&&Ag(w.da);const C=y.props&&y.props.onVnodeUnmounted;C&&Oo(C,w.parent,y),w.isDeactivated=!0},s)};function f(y){Tb(y),u(y,t,s,!0)}function d(y){i.forEach((w,C)=>{const O=ax(w.type);O&&(!y||!y(O))&&g(C)})}function g(y){const w=i.get(y);!o||!fA(w,o)?f(w):o&&Tb(o),i.delete(y),a.delete(y)}ye(()=>[r.include,r.exclude],([y,w])=>{y&&d(C=>Om(y,C)),w&&d(C=>!Om(w,C))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&i.set(m,Sb(t.subTree))};return cr(v),vC(v),mC(()=>{i.forEach(y=>{const{subTree:w,suspense:C}=t,O=Sb(w);if(y.type===O.type&&y.key===O.key){Tb(O);const F=O.component.da;F&&ga(F,C);return}f(y)})}),()=>{if(m=null,!e.default)return null;const y=e.default(),w=y[0];if(y.length>1)return o=null,y;if(!nh(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return o=null,w;let C=Sb(w);const O=C.type,F=ax(Mf(C)?C.type.__asyncResolved||{}:O),{include:I,exclude:T,max:L}=r;if(I&&(!F||!Om(I,F))||T&&F&&Om(T,F))return o=C,w;const N=C.key==null?O:C.key,x=i.get(N);return C.el&&(C=gl(C),w.shapeFlag&128&&(w.ssContent=C)),m=N,x?(C.el=x.el,C.component=x.component,C.transition&&Xf(C,C.transition),C.shapeFlag|=512,a.delete(N),a.add(N)):(a.add(N),L&&a.size>parseInt(L,10)&&g(a.values().next().value)),C.shapeFlag|=256,o=C,_4(w.type)?w:C}}},sz=oz;function Om(r,e){return Oe(r)?r.some(t=>Om(t,e)):Hn(r)?r.split(",").includes(e):VK(r)?r.test(e):!1}function T4(r,e){x4(r,"a",e)}function S4(r,e){x4(r,"da",e)}function x4(r,e,t=li){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if(gC(e,n,t),t){let i=t.parent;for(;i&&i.parent;)m0(i.parent.vnode)&&Az(n,e,t,i),i=i.parent}}function Az(r,e,t,n){const i=gC(e,r,n,!0);pr(()=>{OO(n[e],i)},t)}function Tb(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function Sb(r){return r.shapeFlag&128?r.ssContent:r}function gC(r,e,t=li,n=!1){if(t){const i=t[r]||(t[r]=[]),a=e.__weh||(e.__weh=(...o)=>{if(t.isUnmounted)return;ev(),ih(t);const s=ms(e,t,r,o);return jc(),rv(),s});return n?i.unshift(a):i.push(a),a}}const Ou=r=>(e,t=li)=>(!xg||r==="sp")&&gC(r,(...n)=>e(...n),t),I4=Ou("bm"),cr=Ou("m"),L4=Ou("bu"),vC=Ou("u"),mC=Ou("bum"),pr=Ou("um"),O4=Ou("sp"),F4=Ou("rtg"),R4=Ou("rtc");function M4(r,e=li){gC("ec",r,e)}function lz(r,e){const t=_a;if(t===null)return r;const n=wC(t)||t.proxy,i=r.dirs||(r.dirs=[]);for(let a=0;a<e.length;a++){let[o,s,A,l=wn]=e[a];o&&(ar(o)&&(o={mounted:o,updated:o}),o.deep&&Bf(s),i.push({dir:o,instance:n,value:s,oldValue:void 0,arg:A,modifiers:l}))}return r}function qA(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&&(ev(),ms(A,t,8,[r.el,s,r,e]),rv())}}const XO="components",uz="directives";function N4(r,e){return qO(XO,r,!0,e)||r}const P4=Symbol();function cz(r){return Hn(r)?qO(XO,r,!1)||r:r||P4}function hz(r){return qO(uz,r)}function qO(r,e,t=!0,n=!1){const i=_a||li;if(i){const a=i.type;if(r===XO){const s=ax(a,!1);if(s&&(s===e||s===Uo(e)||s===d0(Uo(e))))return a}const o=UN(i[r]||a[r],e)||UN(i.appContext[r],e);return!o&&n?a:o}}function UN(r,e){return r&&(r[e]||r[Uo(e)]||r[d0(Uo(e))])}function fz(r,e,t,n){let i;const a=t&&t[n];if(Oe(r)||Hn(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(Tn(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 dz(r,e){for(let t=0;t<e.length;t++){const n=e[t];if(Oe(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 Rr(r,e,t={},n,i){if(_a.isCE||_a.parent&&Mf(_a.parent)&&_a.parent.isCE)return e!=="default"&&(t.name=e),Pn("slot",t,n&&n());let a=r[e];a&&a._c&&(a._d=!1),ti();const o=a&&U4(a(t)),s=yC(ya,{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 U4(r){return r.some(e=>nh(e)?!(e.type===Wa||e.type===ya&&!U4(e.children)):!0)?r:null}function pz(r,e){const t={};for(const n in r)t[e&&/[A-Z]/.test(n)?`on:${n}`:Jm(n)]=r[n];return t}const XS=r=>r?ek(r)?wC(r)||r.proxy:XS(r.parent):null,ty=ci(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=>XS(r.parent),$root:r=>XS(r.root),$emit:r=>r.emit,$options:r=>ZO(r),$forceUpdate:r=>r.f||(r.f=()=>hC(r.update)),$nextTick:r=>r.n||(r.n=cC.bind(r.proxy)),$watch:r=>nz.bind(r)}),xb=(r,e)=>r!==wn&&!r.__isScriptSetup&&Vr(r,e),qS={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(xb(n,e))return o[e]=1,n[e];if(i!==wn&&Vr(i,e))return o[e]=2,i[e];if((l=r.propsOptions[0])&&Vr(l,e))return o[e]=3,a[e];if(t!==wn&&Vr(t,e))return o[e]=4,t[e];ZS&&(o[e]=0)}}const u=ty[e];let c,h;if(u)return e==="$attrs"&&ko(r,"get",e),u(r);if((c=s.__cssModules)&&(c=c[e]))return c;if(t!==wn&&Vr(t,e))return o[e]=4,t[e];if(h=A.config.globalProperties,Vr(h,e))return h[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:a}=r;return xb(i,e)?(i[e]=t,!0):n!==wn&&Vr(n,e)?(n[e]=t,!0):Vr(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!==wn&&Vr(r,o)||xb(e,o)||(s=a[0])&&Vr(s,o)||Vr(n,o)||Vr(ty,o)||Vr(i.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:Vr(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}},gz=ci({},qS,{get(r,e){if(e!==Symbol.unscopables)return qS.get(r,e,r)},has(r,e){return e[0]!=="_"&&!OK(e)}});let ZS=!0;function vz(r){const e=ZO(r),t=r.proxy,n=r.ctx;ZS=!1,e.beforeCreate&&DN(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:d,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:w,unmounted:C,render:O,renderTracked:F,renderTriggered:I,errorCaptured:T,serverPrefetch:L,expose:N,inheritAttrs:x,components:S,directives:P,filters:U}=e;if(l&&mz(l,n,null,r.appContext.config.unwrapInjectedRef),o)for(const rt in o){const nt=o[rt];ar(nt)&&(n[rt]=nt.bind(t))}if(i){const rt=i.call(t,t);Tn(rt)&&(r.data=vd(rt))}if(ZS=!0,a)for(const rt in a){const nt=a[rt],At=ar(nt)?nt.bind(t,t):ar(nt.get)?nt.get.bind(t,t):gA,ct=!ar(nt)&&ar(nt.set)?nt.set.bind(t):gA,Tt=Ze({get:At,set:ct});Object.defineProperty(n,rt,{enumerable:!0,configurable:!0,get:()=>Tt.value,set:M=>Tt.value=M})}if(s)for(const rt in s)D4(s[rt],n,t,rt);if(A){const rt=ar(A)?A.call(t):A;Reflect.ownKeys(rt).forEach(nt=>{Qr(nt,rt[nt])})}u&&DN(u,r,"c");function q(rt,nt){Oe(nt)?nt.forEach(At=>rt(At.bind(t))):nt&&rt(nt.bind(t))}if(q(I4,c),q(cr,h),q(L4,f),q(vC,d),q(T4,g),q(S4,m),q(M4,T),q(R4,F),q(F4,I),q(mC,y),q(pr,C),q(O4,L),Oe(N))if(N.length){const rt=r.exposed||(r.exposed={});N.forEach(nt=>{Object.defineProperty(rt,nt,{get:()=>t[nt],set:At=>t[nt]=At})})}else r.exposed||(r.exposed={});O&&r.render===gA&&(r.render=O),x!=null&&(r.inheritAttrs=x),S&&(r.components=S),P&&(r.directives=P)}function mz(r,e,t=gA,n=!1){Oe(r)&&(r=JS(r));for(const i in r){const a=r[i];let o;Tn(a)?"default"in a?o=Be(a.from||i,a.default,!0):o=Be(a.from||i):o=Be(a),Aa(o)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):e[i]=o}}function DN(r,e,t){ms(Oe(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function D4(r,e,t,n){const i=n.includes(".")?B4(t,n):()=>t[n];if(Hn(r)){const a=e[r];ar(a)&&ye(i,a)}else if(ar(r))ye(i,r.bind(t));else if(Tn(r))if(Oe(r))r.forEach(a=>D4(a,e,t,n));else{const a=ar(r.handler)?r.handler.bind(t):e[r.handler];ar(a)&&ye(i,a,r)}}function ZO(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=>Nw(A,l,o,!0)),Nw(A,e,o)),Tn(e)&&a.set(e,A),A}function Nw(r,e,t,n=!1){const{mixins:i,extends:a}=e;a&&Nw(r,a,t,!0),i&&i.forEach(o=>Nw(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const s=yz[o]||t&&t[o];r[o]=s?s(r[o],e[o]):e[o]}return r}const yz={data:QN,props:df,emits:df,methods:df,computed:df,beforeCreate:oo,created:oo,beforeMount:oo,mounted:oo,beforeUpdate:oo,updated:oo,beforeDestroy:oo,beforeUnmount:oo,destroyed:oo,unmounted:oo,activated:oo,deactivated:oo,errorCaptured:oo,serverPrefetch:oo,components:df,directives:df,watch:wz,provide:QN,inject:_z};function QN(r,e){return e?r?function(){return ci(ar(r)?r.call(this,this):r,ar(e)?e.call(this,this):e)}:e:r}function _z(r,e){return df(JS(r),JS(e))}function JS(r){if(Oe(r)){const e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return r}function oo(r,e){return r?[...new Set([].concat(r,e))]:e}function df(r,e){return r?ci(ci(Object.create(null),r),e):e}function wz(r,e){if(!r)return e;if(!e)return r;const t=ci(Object.create(null),r);for(const n in e)t[n]=oo(r[n],e[n]);return t}function Ez(r,e,t,n=!1){const i={},a={};Lw(a,_C,1),r.propsDefaults=Object.create(null),Q4(r,e,i,a);for(const o in r.propsOptions[0])o in i||(i[o]=void 0);t?r.props=n?i:u4(i):r.type.props?r.props=i:r.props=a,r.attrs=a}function Cz(r,e,t,n){const{props:i,attrs:a,vnode:{patchFlag:o}}=r,s=Dr(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(fC(r.emitsOptions,h))continue;const f=e[h];if(A)if(Vr(a,h))f!==a[h]&&(a[h]=f,l=!0);else{const d=Uo(h);i[d]=tx(A,s,d,f,r,!1)}else f!==a[h]&&(a[h]=f,l=!0)}}}else{Q4(r,e,i,a)&&(l=!0);let u;for(const c in s)(!e||!Vr(e,c)&&((u=Us(c))===c||!Vr(e,u)))&&(A?t&&(t[c]!==void 0||t[u]!==void 0)&&(i[c]=tx(A,s,c,void 0,r,!0)):delete i[c]);if(a!==s)for(const c in a)(!e||!Vr(e,c))&&(delete a[c],l=!0)}l&&wu(r,"set","$attrs")}function Q4(r,e,t,n){const[i,a]=r.propsOptions;let o=!1,s;if(e)for(let A in e){if(Zm(A))continue;const l=e[A];let u;i&&Vr(i,u=Uo(A))?!a||!a.includes(u)?t[u]=l:(s||(s={}))[u]=l:fC(r.emitsOptions,A)||(!(A in n)||l!==n[A])&&(n[A]=l,o=!0)}if(a){const A=Dr(t),l=s||wn;for(let u=0;u<a.length;u++){const c=a[u];t[c]=tx(i,A,c,l[c],r,!Vr(l,c))}}return o}function tx(r,e,t,n,i,a){const o=r[t];if(o!=null){const s=Vr(o,"default");if(s&&n===void 0){const A=o.default;if(o.type!==Function&&ar(A)){const{propsDefaults:l}=i;t in l?n=l[t]:(ih(i),n=l[t]=A.call(null,e),jc())}else n=A}o[0]&&(a&&!s?n=!1:o[1]&&(n===""||n===Us(t))&&(n=!0))}return n}function k4(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(!ar(r)){const u=c=>{A=!0;const[h,f]=k4(c,e,!0);ci(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 Tn(r)&&n.set(r,og),og;if(Oe(a))for(let u=0;u<a.length;u++){const c=Uo(a[u]);kN(c)&&(o[c]=wn)}else if(a)for(const u in a){const c=Uo(u);if(kN(c)){const h=a[u],f=o[c]=Oe(h)||ar(h)?{type:h}:Object.assign({},h);if(f){const d=$N(Boolean,f.type),g=$N(String,f.type);f[0]=d>-1,f[1]=g<0||d<g,(d>-1||Vr(f,"default"))&&s.push(c)}}}const l=[o,s];return Tn(r)&&n.set(r,l),l}function kN(r){return r[0]!=="$"}function HN(r){const e=r&&r.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:r===null?"null":""}function GN(r,e){return HN(r)===HN(e)}function $N(r,e){return Oe(e)?e.findIndex(t=>GN(t,r)):ar(e)&&GN(e,r)?0:-1}const H4=r=>r[0]==="_"||r==="$stable",JO=r=>Oe(r)?r.map(fs):[fs(r)],Bz=(r,e,t)=>{if(e._n)return e;const n=jO((...i)=>JO(e(...i)),t);return n._c=!1,n},G4=(r,e,t)=>{const n=r._ctx;for(const i in r){if(H4(i))continue;const a=r[i];if(ar(a))e[i]=Bz(i,a,n);else if(a!=null){const o=JO(a);e[i]=()=>o}}},$4=(r,e)=>{const t=JO(e);r.slots.default=()=>t},bz=(r,e)=>{if(r.vnode.shapeFlag&32){const t=e._;t?(r.slots=Dr(e),Lw(e,"_",t)):G4(e,r.slots={})}else r.slots={},e&&$4(r,e);Lw(r.slots,_C,1)},Tz=(r,e,t)=>{const{vnode:n,slots:i}=r;let a=!0,o=wn;if(n.shapeFlag&32){const s=e._;s?t&&s===1?a=!1:(ci(i,e),!t&&s===1&&delete i._):(a=!e.$stable,G4(e,i)),o=e}else e&&($4(r,e),o={default:1});if(a)for(const s in i)!H4(s)&&!(s in o)&&delete i[s]};function V4(){return{app:null,config:{isNativeTag:HK,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 Sz=0;function xz(r,e){return function(n,i=null){ar(n)||(n=Object.assign({},n)),i!=null&&!Tn(i)&&(i=null);const a=V4(),o=new Set;let s=!1;const A=a.app={_uid:Sz++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:lk,get config(){return a.config},set config(l){},use(l,...u){return o.has(l)||(l&&ar(l.install)?(o.add(l),l.install(A,...u)):ar(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=Pn(n,i);return h.appContext=a,u&&e?e(h,l):r(h,l,c),s=!0,A._container=l,l.__vue_app__=A,wC(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 Pw(r,e,t,n,i=!1){if(Oe(r)){r.forEach((h,f)=>Pw(h,e&&(Oe(e)?e[f]:e),t,n,i));return}if(Mf(n)&&!i)return;const a=n.shapeFlag&4?wC(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:A}=r,l=e&&e.r,u=s.refs===wn?s.refs={}:s.refs,c=s.setupState;if(l!=null&&l!==A&&(Hn(l)?(u[l]=null,Vr(c,l)&&(c[l]=null)):Aa(l)&&(l.value=null)),ar(A))fu(A,s,12,[o,u]);else{const h=Hn(A),f=Aa(A);if(h||f){const d=()=>{if(r.f){const g=h?Vr(c,A)?c[A]:u[A]:A.value;i?Oe(g)&&OO(g,a):Oe(g)?g.includes(a)||g.push(a):h?(u[A]=[a],Vr(c,A)&&(c[A]=u[A])):(A.value=[a],r.k&&(u[r.k]=A.value))}else h?(u[A]=o,Vr(c,A)&&(c[A]=o)):f&&(A.value=o,r.k&&(u[r.k]=o))};o?(d.id=-1,ga(d,t)):d()}}}let lc=!1;const N_=r=>/svg/.test(r.namespaceURI)&&r.tagName!=="foreignObject",P_=r=>r.nodeType===8;function Iz(r){const{mt:e,p:t,o:{patchProp:n,createText:i,nextSibling:a,parentNode:o,remove:s,insert:A,createComment:l}}=r,u=(v,y)=>{if(!y.hasChildNodes()){t(null,v,y),Mw(),y._vnode=v;return}lc=!1,c(y.firstChild,v,null,null,null),Mw(),y._vnode=v,lc&&console.error("Hydration completed but contains mismatches.")},c=(v,y,w,C,O,F=!1)=>{const I=P_(v)&&v.data==="[",T=()=>g(v,y,w,C,O,I),{type:L,ref:N,shapeFlag:x,patchFlag:S}=y;let P=v.nodeType;y.el=v,S===-2&&(F=!1,y.dynamicChildren=null);let U=null;switch(L){case qf:P!==3?y.children===""?(A(y.el=i(""),o(v),v),U=v):U=T():(v.data!==y.children&&(lc=!0,v.data=y.children),U=a(v));break;case Wa:P!==8||I?U=T():U=a(v);break;case Nf:if(I&&(v=a(v),P=v.nodeType),P===1||P===3){U=v;const tt=!y.children.length;for(let q=0;q<y.staticCount;q++)tt&&(y.children+=U.nodeType===1?U.outerHTML:U.data),q===y.staticCount-1&&(y.anchor=U),U=a(U);return I?a(U):U}else T();break;case ya:I?U=d(v,y,w,C,O,F):U=T();break;default:if(x&1)P!==1||y.type.toLowerCase()!==v.tagName.toLowerCase()?U=T():U=h(v,y,w,C,O,F);else if(x&6){y.slotScopeIds=O;const tt=o(v);if(e(y,tt,null,w,C,N_(tt),F),U=I?m(v):a(v),U&&P_(U)&&U.data==="teleport end"&&(U=a(U)),Mf(y)){let q;I?(q=Pn(ya),q.anchor=U?U.previousSibling:tt.lastChild):q=v.nodeType===3?rF(""):Pn("div"),q.el=v,y.component.subTree=q}}else x&64?P!==8?U=T():U=y.type.hydrate(v,y,w,C,O,F,r,f):x&128&&(U=y.type.hydrate(v,y,w,C,N_(o(v)),O,F,r,c))}return N!=null&&Pw(N,null,C,y),U},h=(v,y,w,C,O,F)=>{F=F||!!y.dynamicChildren;const{type:I,props:T,patchFlag:L,shapeFlag:N,dirs:x}=y,S=I==="input"&&x||I==="option";if(S||L!==-1){if(x&&qA(y,null,w,"created"),T)if(S||!F||L&48)for(const U in T)(S&&U.endsWith("value")||f0(U)&&!Zm(U))&&n(v,U,null,T[U],!1,void 0,w);else T.onClick&&n(v,"onClick",null,T.onClick,!1,void 0,w);let P;if((P=T&&T.onVnodeBeforeMount)&&Oo(P,w,y),x&&qA(y,null,w,"beforeMount"),((P=T&&T.onVnodeMounted)||x)&&w4(()=>{P&&Oo(P,w,y),x&&qA(y,null,w,"mounted")},C),N&16&&!(T&&(T.innerHTML||T.textContent))){let U=f(v.firstChild,y,v,w,C,O,F);for(;U;){lc=!0;const tt=U;U=U.nextSibling,s(tt)}}else N&8&&v.textContent!==y.children&&(lc=!0,v.textContent=y.children)}return v.nextSibling},f=(v,y,w,C,O,F,I)=>{I=I||!!y.dynamicChildren;const T=y.children,L=T.length;for(let N=0;N<L;N++){const x=I?T[N]:T[N]=fs(T[N]);if(v)v=c(v,x,C,O,F,I);else{if(x.type===qf&&!x.children)continue;lc=!0,t(null,x,w,null,C,O,N_(w),F)}}return v},d=(v,y,w,C,O,F)=>{const{slotScopeIds:I}=y;I&&(O=O?O.concat(I):I);const T=o(v),L=f(a(v),y,T,w,C,O,F);return L&&P_(L)&&L.data==="]"?a(y.anchor=L):(lc=!0,A(y.anchor=l("]"),T,L),L)},g=(v,y,w,C,O,F)=>{if(lc=!0,y.el=null,F){const L=m(v);for(;;){const N=a(v);if(N&&N!==L)s(N);else break}}const I=a(v),T=o(v);return s(v),t(null,y,T,I,w,C,N_(T),O),I},m=v=>{let y=0;for(;v;)if(v=a(v),v&&P_(v)&&(v.data==="["&&y++,v.data==="]")){if(y===0)return a(v);y--}return v};return[u,c]}const ga=w4;function j4(r){return W4(r)}function K4(r){return W4(r,Iz)}function W4(r,e){const t=zK();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=gA,insertStaticContent:d}=r,g=(j,Z,ft,it=null,V=null,Ft=null,Mt=!1,Et=null,Bt=!!Z.dynamicChildren)=>{if(j===Z)return;j&&!fA(j,Z)&&(it=ot(j),M(j,V,Ft,!0),j=null),Z.patchFlag===-2&&(Bt=!1,Z.dynamicChildren=null);const{type:Ct,ref:Rt,shapeFlag:Nt}=Z;switch(Ct){case qf:m(j,Z,ft,it);break;case Wa:v(j,Z,ft,it);break;case Nf:j==null&&y(Z,ft,it,Mt);break;case ya:S(j,Z,ft,it,V,Ft,Mt,Et,Bt);break;default:Nt&1?O(j,Z,ft,it,V,Ft,Mt,Et,Bt):Nt&6?P(j,Z,ft,it,V,Ft,Mt,Et,Bt):(Nt&64||Nt&128)&&Ct.process(j,Z,ft,it,V,Ft,Mt,Et,Bt,X)}Rt!=null&&V&&Pw(Rt,j&&j.ref,Ft,Z||j,!Z)},m=(j,Z,ft,it)=>{if(j==null)n(Z.el=s(Z.children),ft,it);else{const V=Z.el=j.el;Z.children!==j.children&&l(V,Z.children)}},v=(j,Z,ft,it)=>{j==null?n(Z.el=A(Z.children||""),ft,it):Z.el=j.el},y=(j,Z,ft,it)=>{[j.el,j.anchor]=d(j.children,Z,ft,it,j.el,j.anchor)},w=({el:j,anchor:Z},ft,it)=>{let V;for(;j&&j!==Z;)V=h(j),n(j,ft,it),j=V;n(Z,ft,it)},C=({el:j,anchor:Z})=>{let ft;for(;j&&j!==Z;)ft=h(j),i(j),j=ft;i(Z)},O=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{Mt=Mt||Z.type==="svg",j==null?F(Z,ft,it,V,Ft,Mt,Et,Bt):L(j,Z,V,Ft,Mt,Et,Bt)},F=(j,Z,ft,it,V,Ft,Mt,Et)=>{let Bt,Ct;const{type:Rt,props:Nt,shapeFlag:Dt,transition:Wt,dirs:te}=j;if(Bt=j.el=o(j.type,Ft,Nt&&Nt.is,Nt),Dt&8?u(Bt,j.children):Dt&16&&T(j.children,Bt,null,it,V,Ft&&Rt!=="foreignObject",Mt,Et),te&&qA(j,null,it,"created"),I(Bt,j,j.scopeId,Mt,it),Nt){for(const oe in Nt)oe!=="value"&&!Zm(oe)&&a(Bt,oe,null,Nt[oe],Ft,j.children,it,V,J);"value"in Nt&&a(Bt,"value",null,Nt.value),(Ct=Nt.onVnodeBeforeMount)&&Oo(Ct,it,j)}te&&qA(j,null,it,"beforeMount");const Ae=(!V||V&&!V.pendingBranch)&&Wt&&!Wt.persisted;Ae&&Wt.beforeEnter(Bt),n(Bt,Z,ft),((Ct=Nt&&Nt.onVnodeMounted)||Ae||te)&&ga(()=>{Ct&&Oo(Ct,it,j),Ae&&Wt.enter(Bt),te&&qA(j,null,it,"mounted")},V)},I=(j,Z,ft,it,V)=>{if(ft&&f(j,ft),it)for(let Ft=0;Ft<it.length;Ft++)f(j,it[Ft]);if(V){let Ft=V.subTree;if(Z===Ft){const Mt=V.vnode;I(j,Mt,Mt.scopeId,Mt.slotScopeIds,V.parent)}}},T=(j,Z,ft,it,V,Ft,Mt,Et,Bt=0)=>{for(let Ct=Bt;Ct<j.length;Ct++){const Rt=j[Ct]=Et?bc(j[Ct]):fs(j[Ct]);g(null,Rt,Z,ft,it,V,Ft,Mt,Et)}},L=(j,Z,ft,it,V,Ft,Mt)=>{const Et=Z.el=j.el;let{patchFlag:Bt,dynamicChildren:Ct,dirs:Rt}=Z;Bt|=j.patchFlag&16;const Nt=j.props||wn,Dt=Z.props||wn;let Wt;ft&&ef(ft,!1),(Wt=Dt.onVnodeBeforeUpdate)&&Oo(Wt,ft,Z,j),Rt&&qA(Z,j,ft,"beforeUpdate"),ft&&ef(ft,!0);const te=V&&Z.type!=="foreignObject";if(Ct?N(j.dynamicChildren,Ct,Et,ft,it,te,Ft):Mt||nt(j,Z,Et,null,ft,it,te,Ft,!1),Bt>0){if(Bt&16)x(Et,Z,Nt,Dt,ft,it,V);else if(Bt&2&&Nt.class!==Dt.class&&a(Et,"class",null,Dt.class,V),Bt&4&&a(Et,"style",Nt.style,Dt.style,V),Bt&8){const Ae=Z.dynamicProps;for(let oe=0;oe<Ae.length;oe++){const Jt=Ae[oe],fe=Nt[Jt],qt=Dt[Jt];(qt!==fe||Jt==="value")&&a(Et,Jt,fe,qt,V,j.children,ft,it,J)}}Bt&1&&j.children!==Z.children&&u(Et,Z.children)}else!Mt&&Ct==null&&x(Et,Z,Nt,Dt,ft,it,V);((Wt=Dt.onVnodeUpdated)||Rt)&&ga(()=>{Wt&&Oo(Wt,ft,Z,j),Rt&&qA(Z,j,ft,"updated")},it)},N=(j,Z,ft,it,V,Ft,Mt)=>{for(let Et=0;Et<Z.length;Et++){const Bt=j[Et],Ct=Z[Et],Rt=Bt.el&&(Bt.type===ya||!fA(Bt,Ct)||Bt.shapeFlag&70)?c(Bt.el):ft;g(Bt,Ct,Rt,null,it,V,Ft,Mt,!0)}},x=(j,Z,ft,it,V,Ft,Mt)=>{if(ft!==it){if(ft!==wn)for(const Et in ft)!Zm(Et)&&!(Et in it)&&a(j,Et,ft[Et],null,Mt,Z.children,V,Ft,J);for(const Et in it){if(Zm(Et))continue;const Bt=it[Et],Ct=ft[Et];Bt!==Ct&&Et!=="value"&&a(j,Et,Ct,Bt,Mt,Z.children,V,Ft,J)}"value"in it&&a(j,"value",ft.value,it.value)}},S=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{const Ct=Z.el=j?j.el:s(""),Rt=Z.anchor=j?j.anchor:s("");let{patchFlag:Nt,dynamicChildren:Dt,slotScopeIds:Wt}=Z;Wt&&(Et=Et?Et.concat(Wt):Wt),j==null?(n(Ct,ft,it),n(Rt,ft,it),T(Z.children,ft,Rt,V,Ft,Mt,Et,Bt)):Nt>0&&Nt&64&&Dt&&j.dynamicChildren?(N(j.dynamicChildren,Dt,ft,V,Ft,Mt,Et),(Z.key!=null||V&&Z===V.subTree)&&tF(j,Z,!0)):nt(j,Z,ft,Rt,V,Ft,Mt,Et,Bt)},P=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{Z.slotScopeIds=Et,j==null?Z.shapeFlag&512?V.ctx.activate(Z,ft,it,Mt,Bt):U(Z,ft,it,V,Ft,Mt,Bt):tt(j,Z,Bt)},U=(j,Z,ft,it,V,Ft,Mt)=>{const Et=j.component=tk(j,it,V);if(m0(j)&&(Et.ctx.renderer=X),rk(Et),Et.asyncDep){if(V&&V.registerDep(Et,q),!j.el){const Bt=Et.subTree=Pn(Wa);v(null,Bt,Z,ft)}return}q(Et,j,Z,ft,V,Ft,Mt)},tt=(j,Z,ft)=>{const it=Z.component=j.component;if(YW(j,Z,ft))if(it.asyncDep&&!it.asyncResolved){rt(it,Z,ft);return}else it.next=Z,kW(it.update),it.update();else Z.el=j.el,it.vnode=Z},q=(j,Z,ft,it,V,Ft,Mt)=>{const Et=()=>{if(j.isMounted){let{next:Rt,bu:Nt,u:Dt,parent:Wt,vnode:te}=j,Ae=Rt,oe;ef(j,!1),Rt?(Rt.el=te.el,rt(j,Rt,Mt)):Rt=te,Nt&&Ag(Nt),(oe=Rt.props&&Rt.props.onVnodeBeforeUpdate)&&Oo(oe,Wt,Rt,te),ef(j,!0);const Jt=q1(j),fe=j.subTree;j.subTree=Jt,g(fe,Jt,c(fe.el),ot(fe),j,V,Ft),Rt.el=Jt.el,Ae===null&&KO(j,Jt.el),Dt&&ga(Dt,V),(oe=Rt.props&&Rt.props.onVnodeUpdated)&&ga(()=>Oo(oe,Wt,Rt,te),V)}else{let Rt;const{el:Nt,props:Dt}=Z,{bm:Wt,m:te,parent:Ae}=j,oe=Mf(Z);if(ef(j,!1),Wt&&Ag(Wt),!oe&&(Rt=Dt&&Dt.onVnodeBeforeMount)&&Oo(Rt,Ae,Z),ef(j,!0),Nt&&at){const Jt=()=>{j.subTree=q1(j),at(Nt,j.subTree,j,V,null)};oe?Z.type.__asyncLoader().then(()=>!j.isUnmounted&&Jt()):Jt()}else{const Jt=j.subTree=q1(j);g(null,Jt,ft,it,j,V,Ft),Z.el=Jt.el}if(te&&ga(te,V),!oe&&(Rt=Dt&&Dt.onVnodeMounted)){const Jt=Z;ga(()=>Oo(Rt,Ae,Jt),V)}(Z.shapeFlag&256||Ae&&Mf(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&j.a&&ga(j.a,V),j.isMounted=!0,Z=ft=it=null}},Bt=j.effect=new p0(Et,()=>hC(Ct),j.scope),Ct=j.update=()=>Bt.run();Ct.id=j.uid,ef(j,!0),Ct()},rt=(j,Z,ft)=>{Z.component=j;const it=j.vnode.props;j.vnode=Z,j.next=null,Cz(j,Z.props,it,ft),Tz(j,Z.children,ft),ev(),RN(),rv()},nt=(j,Z,ft,it,V,Ft,Mt,Et,Bt=!1)=>{const Ct=j&&j.children,Rt=j?j.shapeFlag:0,Nt=Z.children,{patchFlag:Dt,shapeFlag:Wt}=Z;if(Dt>0){if(Dt&128){ct(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt);return}else if(Dt&256){At(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt);return}}Wt&8?(Rt&16&&J(Ct,V,Ft),Nt!==Ct&&u(ft,Nt)):Rt&16?Wt&16?ct(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt):J(Ct,V,Ft,!0):(Rt&8&&u(ft,""),Wt&16&&T(Nt,ft,it,V,Ft,Mt,Et,Bt))},At=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{j=j||og,Z=Z||og;const Ct=j.length,Rt=Z.length,Nt=Math.min(Ct,Rt);let Dt;for(Dt=0;Dt<Nt;Dt++){const Wt=Z[Dt]=Bt?bc(Z[Dt]):fs(Z[Dt]);g(j[Dt],Wt,ft,null,V,Ft,Mt,Et,Bt)}Ct>Rt?J(j,V,Ft,!0,!1,Nt):T(Z,ft,it,V,Ft,Mt,Et,Bt,Nt)},ct=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{let Ct=0;const Rt=Z.length;let Nt=j.length-1,Dt=Rt-1;for(;Ct<=Nt&&Ct<=Dt;){const Wt=j[Ct],te=Z[Ct]=Bt?bc(Z[Ct]):fs(Z[Ct]);if(fA(Wt,te))g(Wt,te,ft,null,V,Ft,Mt,Et,Bt);else break;Ct++}for(;Ct<=Nt&&Ct<=Dt;){const Wt=j[Nt],te=Z[Dt]=Bt?bc(Z[Dt]):fs(Z[Dt]);if(fA(Wt,te))g(Wt,te,ft,null,V,Ft,Mt,Et,Bt);else break;Nt--,Dt--}if(Ct>Nt){if(Ct<=Dt){const Wt=Dt+1,te=Wt<Rt?Z[Wt].el:it;for(;Ct<=Dt;)g(null,Z[Ct]=Bt?bc(Z[Ct]):fs(Z[Ct]),ft,te,V,Ft,Mt,Et,Bt),Ct++}}else if(Ct>Dt)for(;Ct<=Nt;)M(j[Ct],V,Ft,!0),Ct++;else{const Wt=Ct,te=Ct,Ae=new Map;for(Ct=te;Ct<=Dt;Ct++){const Ne=Z[Ct]=Bt?bc(Z[Ct]):fs(Z[Ct]);Ne.key!=null&&Ae.set(Ne.key,Ct)}let oe,Jt=0;const fe=Dt-te+1;let qt=!1,nr=0;const ke=new Array(fe);for(Ct=0;Ct<fe;Ct++)ke[Ct]=0;for(Ct=Wt;Ct<=Nt;Ct++){const Ne=j[Ct];if(Jt>=fe){M(Ne,V,Ft,!0);continue}let Pe;if(Ne.key!=null)Pe=Ae.get(Ne.key);else for(oe=te;oe<=Dt;oe++)if(ke[oe-te]===0&&fA(Ne,Z[oe])){Pe=oe;break}Pe===void 0?M(Ne,V,Ft,!0):(ke[Pe-te]=Ct+1,Pe>=nr?nr=Pe:qt=!0,g(Ne,Z[Pe],ft,null,V,Ft,Mt,Et,Bt),Jt++)}const wr=qt?Lz(ke):og;for(oe=wr.length-1,Ct=fe-1;Ct>=0;Ct--){const Ne=te+Ct,Pe=Z[Ne],Gr=Ne+1<Rt?Z[Ne+1].el:it;ke[Ct]===0?g(null,Pe,ft,Gr,V,Ft,Mt,Et,Bt):qt&&(oe<0||Ct!==wr[oe]?Tt(Pe,ft,Gr,2):oe--)}}},Tt=(j,Z,ft,it,V=null)=>{const{el:Ft,type:Mt,transition:Et,children:Bt,shapeFlag:Ct}=j;if(Ct&6){Tt(j.component.subTree,Z,ft,it);return}if(Ct&128){j.suspense.move(Z,ft,it);return}if(Ct&64){Mt.move(j,Z,ft,X);return}if(Mt===ya){n(Ft,Z,ft);for(let Nt=0;Nt<Bt.length;Nt++)Tt(Bt[Nt],Z,ft,it);n(j.anchor,Z,ft);return}if(Mt===Nf){w(j,Z,ft);return}if(it!==2&&Ct&1&&Et)if(it===0)Et.beforeEnter(Ft),n(Ft,Z,ft),ga(()=>Et.enter(Ft),V);else{const{leave:Nt,delayLeave:Dt,afterLeave:Wt}=Et,te=()=>n(Ft,Z,ft),Ae=()=>{Nt(Ft,()=>{te(),Wt&&Wt()})};Dt?Dt(Ft,te,Ae):Ae()}else n(Ft,Z,ft)},M=(j,Z,ft,it=!1,V=!1)=>{const{type:Ft,props:Mt,ref:Et,children:Bt,dynamicChildren:Ct,shapeFlag:Rt,patchFlag:Nt,dirs:Dt}=j;if(Et!=null&&Pw(Et,null,ft,j,!0),Rt&256){Z.ctx.deactivate(j);return}const Wt=Rt&1&&Dt,te=!Mf(j);let Ae;if(te&&(Ae=Mt&&Mt.onVnodeBeforeUnmount)&&Oo(Ae,Z,j),Rt&6)H(j.component,ft,it);else{if(Rt&128){j.suspense.unmount(ft,it);return}Wt&&qA(j,null,Z,"beforeUnmount"),Rt&64?j.type.remove(j,Z,ft,V,X,it):Ct&&(Ft!==ya||Nt>0&&Nt&64)?J(Ct,Z,ft,!1,!0):(Ft===ya&&Nt&384||!V&&Rt&16)&&J(Bt,Z,ft),it&&W(j)}(te&&(Ae=Mt&&Mt.onVnodeUnmounted)||Wt)&&ga(()=>{Ae&&Oo(Ae,Z,j),Wt&&qA(j,null,Z,"unmounted")},ft)},W=j=>{const{type:Z,el:ft,anchor:it,transition:V}=j;if(Z===ya){Y(ft,it);return}if(Z===Nf){C(j);return}const Ft=()=>{i(ft),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(j.shapeFlag&1&&V&&!V.persisted){const{leave:Mt,delayLeave:Et}=V,Bt=()=>Mt(ft,Ft);Et?Et(j.el,Ft,Bt):Bt()}else Ft()},Y=(j,Z)=>{let ft;for(;j!==Z;)ft=h(j),i(j),j=ft;i(Z)},H=(j,Z,ft)=>{const{bum:it,scope:V,update:Ft,subTree:Mt,um:Et}=j;it&&Ag(it),V.stop(),Ft&&(Ft.active=!1,M(Mt,j,Z,ft)),Et&&ga(Et,Z),ga(()=>{j.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},J=(j,Z,ft,it=!1,V=!1,Ft=0)=>{for(let Mt=Ft;Mt<j.length;Mt++)M(j[Mt],Z,ft,it,V)},ot=j=>j.shapeFlag&6?ot(j.component.subTree):j.shapeFlag&128?j.suspense.next():h(j.anchor||j.el),ut=(j,Z,ft)=>{j==null?Z._vnode&&M(Z._vnode,null,null,!0):g(Z._vnode||null,j,Z,null,null,null,ft),RN(),Mw(),Z._vnode=j},X={p:g,um:M,m:Tt,r:W,mt:U,mc:T,pc:nt,pbc:N,n:ot,o:r};let It,at;return e&&([It,at]=e(X)),{render:ut,hydrate:It,createApp:xz(ut,It)}}function ef({effect:r,update:e},t){r.allowRecurse=e.allowRecurse=t}function tF(r,e,t=!1){const n=r.children,i=e.children;if(Oe(n)&&Oe(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]=bc(i[a]),s.el=o.el),t||tF(o,s)),s.type===qf&&(s.el=o.el)}}function Lz(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 Oz=r=>r.__isTeleport,ey=r=>r&&(r.disabled||r.disabled===""),VN=r=>typeof SVGElement<"u"&&r instanceof SVGElement,ex=(r,e)=>{const t=r&&r.to;return Hn(t)?e?e(t):null:t},Fz={__isTeleport:!0,process(r,e,t,n,i,a,o,s,A,l){const{mc:u,pc:c,pbc:h,o:{insert:f,querySelector:d,createText:g,createComment:m}}=l,v=ey(e.props);let{shapeFlag:y,children:w,dynamicChildren:C}=e;if(r==null){const O=e.el=g(""),F=e.anchor=g("");f(O,t,n),f(F,t,n);const I=e.target=ex(e.props,d),T=e.targetAnchor=g("");I&&(f(T,I),o=o||VN(I));const L=(N,x)=>{y&16&&u(w,N,x,i,a,o,s,A)};v?L(t,F):I&&L(I,T)}else{e.el=r.el;const O=e.anchor=r.anchor,F=e.target=r.target,I=e.targetAnchor=r.targetAnchor,T=ey(r.props),L=T?t:F,N=T?O:I;if(o=o||VN(F),C?(h(r.dynamicChildren,C,L,i,a,o,s),tF(r,e,!0)):A||c(r,e,L,N,i,a,o,s,!1),v)T||U_(e,t,O,l,1);else if((e.props&&e.props.to)!==(r.props&&r.props.to)){const x=e.target=ex(e.props,d);x&&U_(e,x,null,l,0)}else T&&U_(e,F,I,l,1)}z4(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||!ey(h))&&(a(l),s&16))for(let f=0;f<A.length;f++){const d=A[f];i(d,e,t,!0,!!d.dynamicChildren)}},move:U_,hydrate:Rz};function U_(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||ey(u))&&A&16)for(let h=0;h<l.length;h++)i(l[h],e,t,2);c&&n(s,e,t)}function Rz(r,e,t,n,i,a,{o:{nextSibling:o,parentNode:s,querySelector:A}},l){const u=e.target=ex(e.props,A);if(u){const c=u._lpa||u.firstChild;if(e.shapeFlag&16)if(ey(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)}z4(e)}return e.anchor&&o(e.anchor)}const Mz=Fz;function z4(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 ya=Symbol(void 0),qf=Symbol(void 0),Wa=Symbol(void 0),Nf=Symbol(void 0),ry=[];let Po=null;function ti(r=!1){ry.push(Po=r?null:[])}function Y4(){ry.pop(),Po=ry[ry.length-1]||null}let Zf=1;function rx(r){Zf+=r}function X4(r){return r.dynamicChildren=Zf>0?Po||og:null,Y4(),Zf>0&&Po&&Po.push(r),r}function Yi(r,e,t,n,i,a){return X4(eF(r,e,t,n,i,a,!0))}function yC(r,e,t,n,i){return X4(Pn(r,e,t,n,i,!0))}function nh(r){return r?r.__v_isVNode===!0:!1}function fA(r,e){return r.type===e.type&&r.key===e.key}function Nz(r){}const _C="__vInternal",q4=({key:r})=>r??null,Z1=({ref:r,ref_key:e,ref_for:t})=>r!=null?Hn(r)||Aa(r)||ar(r)?{i:_a,r,k:e,f:!!t}:r:null;function eF(r,e=null,t=null,n=0,i=null,a=r===ya?0:1,o=!1,s=!1){const A={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&q4(e),ref:e&&Z1(e),scopeId:dC,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:_a};return s?(nF(A,t),a&128&&r.normalize(A)):t&&(A.shapeFlag|=Hn(t)?8:16),Zf>0&&!o&&Po&&(A.patchFlag>0||a&6)&&A.patchFlag!==32&&Po.push(A),A}const Pn=Pz;function Pz(r,e=null,t=null,n=0,i=null,a=!1){if((!r||r===P4)&&(r=Wa),nh(r)){const s=gl(r,e,!0);return t&&nF(s,t),Zf>0&&!a&&Po&&(s.shapeFlag&6?Po[Po.indexOf(r)]=s:Po.push(s)),s.patchFlag|=-2,s}if(Vz(r)&&(r=r.__vccOpts),e){e=Z4(e);let{class:s,style:A}=e;s&&!Hn(s)&&(e.class=h0(s)),Tn(A)&&(DO(A)&&!Oe(A)&&(A=ci({},A)),e.style=c0(A))}const o=Hn(r)?1:_4(r)?128:Oz(r)?64:Tn(r)?4:ar(r)?2:0;return eF(r,e,t,n,i,o,a,!0)}function Z4(r){return r?DO(r)||_C in r?ci({},r):r:null}function gl(r,e,t=!1){const{props:n,ref:i,patchFlag:a,children:o}=r,s=e?J4(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:s,key:s&&q4(s),ref:e&&e.ref?t&&i?Oe(i)?i.concat(Z1(e)):[i,Z1(e)]:Z1(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!==ya?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&&gl(r.ssContent),ssFallback:r.ssFallback&&gl(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce}}function rF(r=" ",e=0){return Pn(qf,null,r,e)}function Uz(r,e){const t=Pn(Nf,null,r);return t.staticCount=e,t}function Mr(r="",e=!1){return e?(ti(),yC(Wa,null,r)):Pn(Wa,null,r)}function fs(r){return r==null||typeof r=="boolean"?Pn(Wa):Oe(r)?Pn(ya,null,r.slice()):typeof r=="object"?bc(r):Pn(qf,null,String(r))}function bc(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:gl(r)}function nF(r,e){let t=0;const{shapeFlag:n}=r;if(e==null)e=null;else if(Oe(e))t=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),nF(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!(_C in e)?e._ctx=_a:i===3&&_a&&(_a.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else ar(e)?(e={default:e,_ctx:_a},t=32):(e=String(e),n&64?(t=16,e=[rF(e)]):t=8);r.children=e,r.shapeFlag|=t}function J4(...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=h0([e.class,n.class]));else if(i==="style")e.style=c0([e.style,n.style]);else if(f0(i)){const a=e[i],o=n[i];o&&a!==o&&!(Oe(a)&&a.includes(o))&&(e[i]=a?[].concat(a,o):o)}else i!==""&&(e[i]=n[i])}return e}function Oo(r,e,t,n=null){ms(r,e,7,[t,n])}const Dz=V4();let Qz=0;function tk(r,e,t){const n=r.type,i=(e?e.appContext:r.appContext)||Dz,a={uid:Qz++,vnode:r,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new MO(!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:k4(n,i),emitsOptions:y4(n,i),emit:null,emitted:null,propsDefaults:wn,inheritAttrs:n.inheritAttrs,ctx:wn,data:wn,props:wn,attrs:wn,slots:wn,refs:wn,setupState:wn,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=GW.bind(null,a),r.ce&&r.ce(a),a}let li=null;const yh=()=>li||_a,ih=r=>{li=r,r.scope.on()},jc=()=>{li&&li.scope.off(),li=null};function ek(r){return r.vnode.shapeFlag&4}let xg=!1;function rk(r,e=!1){xg=e;const{props:t,children:n}=r.vnode,i=ek(r);Ez(r,t,i,e),bz(r,n);const a=i?kz(r,e):void 0;return xg=!1,a}function kz(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=QO(new Proxy(r.ctx,qS));const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?ik(r):null;ih(r),ev();const a=fu(n,r,0,[r.props,i]);if(rv(),jc(),FO(a)){if(a.then(jc,jc),e)return a.then(o=>{nx(r,o,e)}).catch(o=>{md(o,r,0)});r.asyncDep=a}else nx(r,a,e)}else nk(r,e)}function nx(r,e,t){ar(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Tn(e)&&(r.setupState=GO(e)),nk(r,t)}let Uw,ix;function Hz(r){Uw=r,ix=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,gz))}}const Gz=()=>!Uw;function nk(r,e,t){const n=r.type;if(!r.render){if(!e&&Uw&&!n.render){const i=n.template||ZO(r).template;if(i){const{isCustomElement:a,compilerOptions:o}=r.appContext.config,{delimiters:s,compilerOptions:A}=n,l=ci(ci({isCustomElement:a,delimiters:s},o),A);n.render=Uw(i,l)}}r.render=n.render||gA,ix&&ix(r)}ih(r),ev(),vz(r),rv(),jc()}function $z(r){return new Proxy(r.attrs,{get(e,t){return ko(r,"get","$attrs"),e[t]}})}function ik(r){const e=n=>{r.exposed=n||{}};let t;return{get attrs(){return t||(t=$z(r))},slots:r.slots,emit:r.emit,expose:e}}function wC(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(GO(QO(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in ty)return ty[t](r)},has(e,t){return t in e||t in ty}}))}function ax(r,e=!0){return ar(r)?r.displayName||r.name:r.name||e&&r.__name}function Vz(r){return ar(r)&&"__vccOpts"in r}const Ze=(r,e)=>NW(r,e,xg);function jz(){return null}function Kz(){return null}function Wz(r){}function zz(r,e){return null}function Yz(){return ak().slots}function Xz(){return ak().attrs}function ak(){const r=yh();return r.setupContext||(r.setupContext=ik(r))}function qz(r,e){const t=Oe(r)?r.reduce((n,i)=>(n[i]={},n),{}):r;for(const n in e){const i=t[n];i?Oe(i)||ar(i)?t[n]={type:i,default:e[n]}:i.default=e[n]:i===null&&(t[n]={default:e[n]})}return t}function Zz(r,e){const t={};for(const n in r)e.includes(n)||Object.defineProperty(t,n,{enumerable:!0,get:()=>r[n]});return t}function Jz(r){const e=yh();let t=r();return jc(),FO(t)&&(t=t.catch(n=>{throw ih(e),n})),[t,()=>ih(e)]}function EC(r,e,t){const n=arguments.length;return n===2?Tn(e)&&!Oe(e)?nh(e)?Pn(r,null,[e]):Pn(r,e):Pn(r,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&nh(t)&&(t=[t]),Pn(r,e,t))}const ok=Symbol(""),sk=()=>Be(ok);function tY(){}function eY(r,e,t,n){const i=t[n];if(i&&Ak(i,r))return i;const a=e();return a.memo=r.slice(),t[n]=a}function Ak(r,e){const t=r.memo;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(Tg(t[n],e[n]))return!1;return Zf>0&&Po&&Po.push(r),!0}const lk="3.2.47",rY={createComponentInstance:tk,setupComponent:rk,renderComponentRoot:q1,setCurrentRenderingInstance:Fy,isVNode:nh,normalizeVNode:fs},nY=rY,iY=null,aY=null,oY="http://www.w3.org/2000/svg",_f=typeof document<"u"?document:null,jN=_f&&_f.createElement("template"),sY={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?_f.createElementNS(oY,r):_f.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>_f.createTextNode(r),createComment:r=>_f.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>_f.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{jN.innerHTML=n?`<svg>${r}</svg>`:r;const s=jN.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 AY(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 lY(r,e,t){const n=r.style,i=Hn(t);if(t&&!i){if(e&&!Hn(e))for(const a in e)t[a]==null&&ox(n,a,"");for(const a in t)ox(n,a,t[a])}else{const a=n.display;i?e!==t&&(n.cssText=t):e&&r.removeAttribute("style"),"_vod"in r&&(n.display=a)}}const KN=/\s*!important$/;function ox(r,e,t){if(Oe(t))t.forEach(n=>ox(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=uY(r,e);KN.test(t)?r.setProperty(Us(n),t.replace(KN,""),"important"):r[n]=t}}const WN=["Webkit","Moz","ms"],Ib={};function uY(r,e){const t=Ib[e];if(t)return t;let n=Uo(e);if(n!=="filter"&&n in r)return Ib[e]=n;n=d0(n);for(let i=0;i<WN.length;i++){const a=WN[i]+n;if(a in r)return Ib[e]=a}return e}const zN="http://www.w3.org/1999/xlink";function cY(r,e,t,n,i){if(n&&e.startsWith("xlink:"))t==null?r.removeAttributeNS(zN,e.slice(6,e.length)):r.setAttributeNS(zN,e,t);else{const a=DK(e);t==null||a&&!K6(t)?r.removeAttribute(e):r.setAttribute(e,a?"":t)}}function hY(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=K6(t):t==null&&A==="string"?(t="",s=!0):A==="number"&&(t=0,s=!0)}try{r[e]=t}catch{}s&&r.removeAttribute(e)}function Au(r,e,t,n){r.addEventListener(e,t,n)}function fY(r,e,t,n){r.removeEventListener(e,t,n)}function dY(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]=pY(e);if(n){const l=a[e]=mY(n,i);Au(r,s,l,A)}else o&&(fY(r,s,o,A),a[e]=void 0)}}const YN=/(?:Once|Passive|Capture)$/;function pY(r){let e;if(YN.test(r)){e={};let n;for(;n=r.match(YN);)r=r.slice(0,r.length-n[0].length),e[n[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):Us(r.slice(2)),e]}let Lb=0;const gY=Promise.resolve(),vY=()=>Lb||(gY.then(()=>Lb=0),Lb=Date.now());function mY(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;ms(yY(n,t.value),e,5,[n])};return t.value=r,t.attached=vY(),t}function yY(r,e){if(Oe(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 XN=/^on[a-z]/,_Y=(r,e,t,n,i=!1,a,o,s,A)=>{e==="class"?AY(r,n,i):e==="style"?lY(r,t,n):f0(e)?LO(e)||dY(r,e,t,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):wY(r,e,n,i))?hY(r,e,n,a,o,s,A):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),cY(r,e,n,i))};function wY(r,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in r&&XN.test(e)&&ar(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA"||XN.test(e)&&Hn(t)?!1:e in r}function uk(r,e){const t=v0(r);class n extends CC{constructor(a){super(t,a,e)}}return n.def=t,n}const EY=r=>uk(r,Tk),CY=typeof HTMLElement<"u"?HTMLElement:class{};class CC extends CY{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,cC(()=>{this._connected||(lx(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&&!Oe(a))for(const A in a){const l=a[A];(l===Number||l&&l.type===Number)&&(A in this._props&&(this._props[A]=Fw(this._props[A])),(s||(s=Object.create(null)))[Uo(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=Oe(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(Uo))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(a){this._setProp(i,a)}})}_setAttr(e){let t=this.getAttribute(e);const n=Uo(e);this._numberProps&&this._numberProps[n]&&(t=Fw(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(Us(e),""):typeof t=="string"||typeof t=="number"?this.setAttribute(Us(e),t+""):t||this.removeAttribute(Us(e))))}_update(){lx(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Pn(this._def,ci({},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),Us(a)!==a&&n(Us(a),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof CC){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 BY(r="$style"){{const e=yh();if(!e)return wn;const t=e.type.__cssModules;if(!t)return wn;const n=t[r];return n||wn}}function bY(r){const e=yh();if(!e)return;const t=e.ut=(i=r(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(a=>Ax(a,i))},n=()=>{const i=r(e.proxy);sx(e.subTree,i),t(i)};C4(n),cr(()=>{const i=new MutationObserver(n);i.observe(e.subTree.el.parentNode,{childList:!0}),pr(()=>i.disconnect())})}function sx(r,e){if(r.shapeFlag&128){const t=r.suspense;r=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{sx(t.activeBranch,e)})}for(;r.component;)r=r.component.subTree;if(r.shapeFlag&1&&r.el)Ax(r.el,e);else if(r.type===ya)r.children.forEach(t=>sx(t,e));else if(r.type===Nf){let{el:t,anchor:n}=r;for(;t&&(Ax(t,e),t!==n);)t=t.nextSibling}}function Ax(r,e){if(r.nodeType===1){const t=r.style;for(const n in e)t.setProperty(`--${n}`,e[n])}}const uc="transition",am="animation",iF=(r,{slots:e})=>EC(YO,hk(r),e);iF.displayName="Transition";const ck={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},TY=iF.props=ci({},YO.props,ck),rf=(r,e=[])=>{Oe(r)?r.forEach(t=>t(...e)):r&&r(...e)},qN=r=>r?Oe(r)?r.some(e=>e.length>1):r.length>1:!1;function hk(r){const e={};for(const S in r)S in ck||(e[S]=r[S]);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,d=SY(i),g=d&&d[0],m=d&&d[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:w,onLeave:C,onLeaveCancelled:O,onBeforeAppear:F=v,onAppear:I=y,onAppearCancelled:T=w}=e,L=(S,P,U)=>{wc(S,P?u:s),wc(S,P?l:o),U&&U()},N=(S,P)=>{S._isLeaving=!1,wc(S,c),wc(S,f),wc(S,h),P&&P()},x=S=>(P,U)=>{const tt=S?I:y,q=()=>L(P,S,U);rf(tt,[P,q]),ZN(()=>{wc(P,S?A:a),eu(P,S?u:s),qN(tt)||JN(P,n,g,q)})};return ci(e,{onBeforeEnter(S){rf(v,[S]),eu(S,a),eu(S,o)},onBeforeAppear(S){rf(F,[S]),eu(S,A),eu(S,l)},onEnter:x(!1),onAppear:x(!0),onLeave(S,P){S._isLeaving=!0;const U=()=>N(S,P);eu(S,c),dk(),eu(S,h),ZN(()=>{S._isLeaving&&(wc(S,c),eu(S,f),qN(C)||JN(S,n,m,U))}),rf(C,[S,U])},onEnterCancelled(S){L(S,!1),rf(w,[S])},onAppearCancelled(S){L(S,!0),rf(T,[S])},onLeaveCancelled(S){N(S),rf(O,[S])}})}function SY(r){if(r==null)return null;if(Tn(r))return[Ob(r.enter),Ob(r.leave)];{const e=Ob(r);return[e,e]}}function Ob(r){return Fw(r)}function eu(r,e){e.split(/\s+/).forEach(t=>t&&r.classList.add(t)),(r._vtc||(r._vtc=new Set)).add(e)}function wc(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 ZN(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let xY=0;function JN(r,e,t,n){const i=r._endId=++xY,a=()=>{i===r._endId&&n()};if(t)return setTimeout(a,t);const{type:o,timeout:s,propCount:A}=fk(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 fk(r,e){const t=window.getComputedStyle(r),n=d=>(t[d]||"").split(", "),i=n(`${uc}Delay`),a=n(`${uc}Duration`),o=tP(i,a),s=n(`${am}Delay`),A=n(`${am}Duration`),l=tP(s,A);let u=null,c=0,h=0;e===uc?o>0&&(u=uc,c=o,h=a.length):e===am?l>0&&(u=am,c=l,h=A.length):(c=Math.max(o,l),u=c>0?o>l?uc:am:null,h=u?u===uc?a.length:A.length:0);const f=u===uc&&/\b(transform|all)(,|$)/.test(n(`${uc}Property`).toString());return{type:u,timeout:c,propCount:h,hasTransform:f}}function tP(r,e){for(;r.length<e.length;)r=r.concat(r);return Math.max(...e.map((t,n)=>eP(t)+eP(r[n])))}function eP(r){return Number(r.slice(0,-1).replace(",","."))*1e3}function dk(){return document.body.offsetHeight}const pk=new WeakMap,gk=new WeakMap,vk={name:"TransitionGroup",props:ci({},TY,{tag:String,moveClass:String}),setup(r,{slots:e}){const t=yh(),n=zO();let i,a;return vC(()=>{if(!i.length)return;const o=r.moveClass||`${r.name||"v"}-move`;if(!MY(i[0].el,t.vnode.el,o))return;i.forEach(OY),i.forEach(FY);const s=i.filter(RY);dk(),s.forEach(A=>{const l=A.el,u=l.style;eu(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,wc(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=Dr(r),s=hk(o);let A=o.tag||ya;i=a,a=e.default?pC(e.default()):[];for(let l=0;l<a.length;l++){const u=a[l];u.key!=null&&Xf(u,Sg(u,s,n,t))}if(i)for(let l=0;l<i.length;l++){const u=i[l];Xf(u,Sg(u,s,n,t)),pk.set(u,u.el.getBoundingClientRect())}return Pn(A,null,a)}}},IY=r=>delete r.mode;vk.props;const LY=vk;function OY(r){const e=r.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function FY(r){gk.set(r,r.el.getBoundingClientRect())}function RY(r){const e=pk.get(r),t=gk.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 MY(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}=fk(n);return i.removeChild(n),a}const ah=r=>{const e=r.props["onUpdate:modelValue"]||!1;return Oe(e)?t=>Ag(e,t):e};function NY(r){r.target.composing=!0}function rP(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Dw={created(r,{modifiers:{lazy:e,trim:t,number:n}},i){r._assign=ah(i);const a=n||i.props&&i.props.type==="number";Au(r,e?"change":"input",o=>{if(o.target.composing)return;let s=r.value;t&&(s=s.trim()),a&&(s=Ow(s)),r._assign(s)}),t&&Au(r,"change",()=>{r.value=r.value.trim()}),e||(Au(r,"compositionstart",NY),Au(r,"compositionend",rP),Au(r,"change",rP))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,modifiers:{lazy:t,trim:n,number:i}},a){if(r._assign=ah(a),r.composing||document.activeElement===r&&r.type!=="range"&&(t||n&&r.value.trim()===e||(i||r.type==="number")&&Ow(r.value)===e))return;const o=e??"";r.value!==o&&(r.value=o)}},aF={deep:!0,created(r,e,t){r._assign=ah(t),Au(r,"change",()=>{const n=r._modelValue,i=Ig(r),a=r.checked,o=r._assign;if(Oe(n)){const s=iC(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(gd(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(yk(r,a))})},mounted:nP,beforeUpdate(r,e,t){r._assign=ah(t),nP(r,e,t)}};function nP(r,{value:e,oldValue:t},n){r._modelValue=e,Oe(e)?r.checked=iC(e,n.props.value)>-1:gd(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=th(e,yk(r,!0)))}const oF={created(r,{value:e},t){r.checked=th(e,t.props.value),r._assign=ah(t),Au(r,"change",()=>{r._assign(Ig(r))})},beforeUpdate(r,{value:e,oldValue:t},n){r._assign=ah(n),e!==t&&(r.checked=th(e,n.props.value))}},mk={deep:!0,created(r,{value:e,modifiers:{number:t}},n){const i=gd(e);Au(r,"change",()=>{const a=Array.prototype.filter.call(r.options,o=>o.selected).map(o=>t?Ow(Ig(o)):Ig(o));r._assign(r.multiple?i?new Set(a):a:a[0])}),r._assign=ah(n)},mounted(r,{value:e}){iP(r,e)},beforeUpdate(r,e,t){r._assign=ah(t)},updated(r,{value:e}){iP(r,e)}};function iP(r,e){const t=r.multiple;if(!(t&&!Oe(e)&&!gd(e))){for(let n=0,i=r.options.length;n<i;n++){const a=r.options[n],o=Ig(a);if(t)Oe(e)?a.selected=iC(e,o)>-1:a.selected=e.has(o);else if(th(Ig(a),e)){r.selectedIndex!==n&&(r.selectedIndex=n);return}}!t&&r.selectedIndex!==-1&&(r.selectedIndex=-1)}}function Ig(r){return"_value"in r?r._value:r.value}function yk(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const _k={created(r,e,t){D_(r,e,t,null,"created")},mounted(r,e,t){D_(r,e,t,null,"mounted")},beforeUpdate(r,e,t,n){D_(r,e,t,n,"beforeUpdate")},updated(r,e,t,n){D_(r,e,t,n,"updated")}};function wk(r,e){switch(r){case"SELECT":return mk;case"TEXTAREA":return Dw;default:switch(e){case"checkbox":return aF;case"radio":return oF;default:return Dw}}}function D_(r,e,t,n,i){const o=wk(r.tagName,t.props&&t.props.type)[i];o&&o(r,e,t,n)}function PY(){Dw.getSSRProps=({value:r})=>({value:r}),oF.getSSRProps=({value:r},e)=>{if(e.props&&th(e.props.value,r))return{checked:!0}},aF.getSSRProps=({value:r},e)=>{if(Oe(r)){if(e.props&&iC(r,e.props.value)>-1)return{checked:!0}}else if(gd(r)){if(e.props&&r.has(e.props.value))return{checked:!0}}else if(r)return{checked:!0}},_k.getSSRProps=(r,e)=>{if(typeof e.type!="string")return;const t=wk(e.type.toUpperCase(),e.props&&e.props.type);if(t.getSSRProps)return t.getSSRProps(r,e)}}const UY=["ctrl","shift","alt","meta"],DY={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)=>UY.some(t=>r[`${t}Key`]&&!e.includes(t))},QY=(r,e)=>(t,...n)=>{for(let i=0;i<e.length;i++){const a=DY[e[i]];if(a&&a(t,e))return}return r(t,...n)},kY={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},HY=(r,e)=>t=>{if(!("key"in t))return;const n=Us(t.key);if(e.some(i=>i===n||kY[i]===n))return r(t)},Ek={beforeMount(r,{value:e},{transition:t}){r._vod=r.style.display==="none"?"":r.style.display,t&&e?t.beforeEnter(r):om(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),om(r,!0),n.enter(r)):n.leave(r,()=>{om(r,!1)}):om(r,e))},beforeUnmount(r,{value:e}){om(r,e)}};function om(r,e){r.style.display=e?r._vod:"none"}function GY(){Ek.getSSRProps=({value:r})=>{if(!r)return{style:{display:"none"}}}}const Ck=ci({patchProp:_Y},sY);let ny,aP=!1;function Bk(){return ny||(ny=j4(Ck))}function bk(){return ny=aP?ny:K4(Ck),aP=!0,ny}const lx=(...r)=>{Bk().render(...r)},Tk=(...r)=>{bk().hydrate(...r)},Sk=(...r)=>{const e=Bk().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=xk(n);if(!i)return;const a=e._component;!ar(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},$Y=(...r)=>{const e=bk().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=xk(n);if(i)return t(i,!0,i instanceof SVGElement)},e};function xk(r){return Hn(r)?document.querySelector(r):r}let oP=!1;const VY=()=>{oP||(oP=!0,PY(),GY())},jY=()=>{},KY=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:YO,Comment:Wa,EffectScope:MO,Fragment:ya,KeepAlive:sz,ReactiveEffect:p0,Static:Nf,Suspense:qW,Teleport:Mz,Text:qf,Transition:iF,TransitionGroup:LY,VueElement:CC,assertNumber:UW,callWithAsyncErrorHandling:ms,callWithErrorHandling:fu,camelize:Uo,capitalize:d0,cloneVNode:gl,compatUtils:aY,compile:jY,computed:Ze,createApp:Sk,createBlock:yC,createCommentVNode:Mr,createElementBlock:Yi,createElementVNode:eF,createHydrationRenderer:K4,createPropsRestProxy:Zz,createRenderer:j4,createSSRApp:$Y,createSlots:dz,createStaticVNode:Uz,createTextVNode:rF,createVNode:Pn,customRef:FW,defineAsyncComponent:az,defineComponent:v0,defineCustomElement:uk,defineEmits:Kz,defineExpose:Wz,defineProps:jz,defineSSRCustomElement:EY,get devtools(){return Np},effect:JK,effectScope:YK,getCurrentInstance:yh,getCurrentScope:q6,getTransitionRawChildren:pC,guardReactiveProps:Z4,h:EC,handleError:md,hydrate:Tk,initCustomFormatter:tY,initDirectivesForSSR:VY,inject:Be,isMemoSame:Ak,isProxy:DO,isReactive:Ff,isReadonly:Yf,isRef:Aa,isRuntimeOnly:Gz,isShallow:xy,isVNode:nh,markRaw:QO,mergeDefaults:qz,mergeProps:J4,nextTick:cC,normalizeClass:h0,normalizeProps:PK,normalizeStyle:c0,onActivated:T4,onBeforeMount:I4,onBeforeUnmount:mC,onBeforeUpdate:L4,onDeactivated:S4,onErrorCaptured:M4,onMounted:cr,onRenderTracked:R4,onRenderTriggered:F4,onScopeDispose:XK,onServerPrefetch:O4,onUnmounted:pr,onUpdated:vC,openBlock:ti,popScopeId:VW,provide:Qr,proxyRefs:GO,pushScopeId:$W,queuePostFlushCb:VO,reactive:vd,readonly:UO,ref:Fo,registerRuntimeCompiler:Hz,render:lx,renderList:fz,renderSlot:Rr,resolveComponent:N4,resolveDirective:hz,resolveDynamicComponent:cz,resolveFilter:iY,resolveTransitionHooks:Sg,setBlockTracking:rx,setDevtoolsHook:m4,setTransitionHooks:Xf,shallowReactive:u4,shallowReadonly:SW,shallowRef:c4,ssrContextKey:ok,ssrUtils:nY,stop:tW,toDisplayString:kK,toHandlerKey:Jm,toHandlers:pz,toRaw:Dr,toRef:f4,toRefs:rh,transformVNodeArgs:Nz,triggerRef:IW,unref:Rf,useAttrs:Xz,useCssModule:BY,useCssVars:bY,useSSRContext:sk,useSlots:Yz,useTransitionState:zO,vModelCheckbox:aF,vModelDynamic:_k,vModelRadio:oF,vModelSelect:mk,vModelText:Dw,vShow:Ek,version:lk,warn:PW,watch:ye,watchEffect:E4,watchPostEffect:C4,watchSyncEffect:rz,withAsyncContext:Jz,withCtx:jO,withDefaults:zz,withDirectives:lz,withKeys:HY,withMemo:eY,withModifiers:QY,withScopeId:jW},Symbol.toStringTag,{value:"Module"})),WY=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},zY={};function YY(r,e){const t=N4("router-view");return ti(),yC(t)}const XY=WY(zY,[["render",YY]]);var qY=Object.defineProperty,ZY=Object.defineProperties,JY=Object.getOwnPropertyDescriptors,sP=Object.getOwnPropertySymbols,tX=Object.prototype.hasOwnProperty,eX=Object.prototype.propertyIsEnumerable,AP=(r,e,t)=>e in r?qY(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Jn=(r,e)=>{for(var t in e||(e={}))tX.call(e,t)&&AP(r,t,e[t]);if(sP)for(var t of sP(e))eX.call(e,t)&&AP(r,t,e[t]);return r},bA=(r,e)=>ZY(r,JY(e)),rX=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}(),BC=rX;function nX(r,e,t){for(var n,i,a=t||oh,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 oh(r,e){return r>e?1:r<e?-1:0}function Pi(r,e){return r.indexOf(e)>=0}function bC(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 iX(r,e,t){for(;e<t;){var n=r[e];r[e]=r[t],r[t]=n,++e,--t}}function tn(r,e){for(var t=Array.isArray(e)?e:[e],n=t.length,i=0;i<n;i++)r[r.length]=t[i]}function Fu(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 aX(r,e,t){var n=e||oh;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 ul(){return!0}function yd(){return!1}function Jf(){}function oX(r){var e=!1,t,n,i;return function(){var a=Array.prototype.slice.call(arguments);return(!e||this!==i||!Fu(a,n))&&(e=!0,i=this,n=a,t=r.apply(this,arguments)),t}}function Re(){return function(){throw new Error("Unimplemented abstract method.")}()}var sX=0;function Ee(r){return r.ol_uid||(r.ol_uid=String(++sX))}var Ik="6.14.1",sh=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",AX=sh.indexOf("firefox")!==-1,lX=sh.indexOf("safari")!==-1&&sh.indexOf("chrom")==-1,uX=lX&&!!(sh.indexOf("version/15.4")>=0||sh.match(/cpu (os|iphone os) 15_4 like mac os x/)),cX=sh.indexOf("webkit")!==-1&&sh.indexOf("edge")==-1,Lk=sh.indexOf("macintosh")!==-1,td=typeof devicePixelRatio<"u"?devicePixelRatio:1,TC=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,hX=typeof Image<"u"&&Image.prototype.decode,Ok=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}(),fX=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){fX(e,r);function e(t){var n=this,i="v"+Ik.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),Fk=dX;function Le(r,e){if(!r)throw new Fk(e)}var sF=new Array(6);function xi(){return[1,0,0,1,0,0]}function iy(r){return y0(r,1,0,0,1,0,0)}function nv(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 y0(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 pX(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 bn(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 gX(r,e){var t=Math.cos(e),n=Math.sin(e);return nv(r,y0(sF,t,n,-n,t,0,0))}function ay(r,e,t){return nv(r,y0(sF,e,0,0,t,0,0))}function vX(r,e,t){return y0(r,e,0,0,t,0,0)}function mX(r,e,t){return nv(r,y0(sF,1,0,0,1,e,t))}function yo(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 _0(r,e){var t=yX(e);Le(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 yX(r){return r[0]*r[3]-r[1]*r[2]}var lP;function AF(r){var e="matrix("+r.join(", ")+")";if(TC)return e;var t=lP||(lP=document.createElement("div"));return t.style.transform=e,t.style.transform}var Fm={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},aa={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function oa(r){for(var e=Di(),t=0,n=r.length;t<n;++t)Uf(e,r[t]);return e}function _X(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 _o(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 lF(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r.slice()}function _h(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 mA(r,e){return SC(r,e[0],e[1])}function ps(r,e){return r[0]<=e[0]&&e[2]<=r[2]&&r[1]<=e[1]&&e[3]<=r[3]}function SC(r,e,t){return r[0]<=e&&e<=r[2]&&r[1]<=t&&t<=r[3]}function Qw(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=e[0],s=e[1],A=aa.UNKNOWN;return o<t?A=A|aa.LEFT:o>i&&(A=A|aa.RIGHT),s<n?A=A|aa.BELOW:s>a&&(A=A|aa.ABOVE),A===aa.UNKNOWN&&(A=aa.INTERSECTING),A}function Di(){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 wh(r){return Ho(1/0,1/0,-1/0,-1/0,r)}function Pf(r,e){var t=r[0],n=r[1];return Ho(t,n,t,n,e)}function wX(r,e){var t=wh(e);return uF(t,r)}function xC(r,e,t,n,i){var a=wh(i);return cF(a,r,e,t,n)}function EX(r,e){var t=wh(e);return Rk(t,r)}function vl(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function CX(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 Ah(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 Uf(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 uF(r,e){for(var t=0,n=e.length;t<n;++t)Uf(r,e[t]);return r}function cF(r,e,t,n,i){for(;t<n;t+=i)Mk(r,e[t],e[t+1]);return r}function Rk(r,e){for(var t=0,n=e.length;t<n;++t)uF(r,e[t]);return r}function Mk(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 IC(r,e){var t;return t=e(w0(r)),t||(t=e(iv(r)),t)||(t=e(E0(r)),t)||(t=e(TA(r)),t)?t:!1}function My(r){var e=0;return av(r)||(e=Kr(r)*Li(r)),e}function w0(r){return[r[0],r[1]]}function iv(r){return[r[2],r[1]]}function Ya(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function Nk(r,e){var t;return e===Fm.BOTTOM_LEFT?t=w0(r):e===Fm.BOTTOM_RIGHT?t=iv(r):e===Fm.TOP_LEFT?t=TA(r):e===Fm.TOP_RIGHT?t=E0(r):Le(!1,13),t}function BX(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 Df(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],d=r[1],g=f-l+h,m=f-l-h,v=f+l-h,y=f+l+h,w=d-u-c,C=d-u+c,O=d+u+c,F=d+u-c;return Ho(Math.min(g,m,v,y),Math.min(w,C,O,F),Math.max(g,m,v,y),Math.max(w,C,O,F),i)}function Li(r){return r[3]-r[1]}function bX(r,e){var t=ks(r,e);return My(t)}function ks(r,e,t){var n=t||Di();return qn(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]):wh(n),n}function TX(r){return Kr(r)+Li(r)}function SX(r){return[r[2]-r[0],r[3]-r[1]]}function TA(r){return[r[0],r[3]]}function E0(r){return[r[2],r[3]]}function Kr(r){return r[2]-r[0]}function qn(r,e){return r[0]<=e[2]&&r[2]>=e[0]&&r[1]<=e[3]&&r[3]>=e[1]}function av(r){return r[2]<r[0]||r[3]<r[1]}function Pk(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r}function Uk(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 Dk(r,e,t){var n=!1,i=Qw(r,e),a=Qw(r,t);if(i===aa.INTERSECTING||a===aa.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],d=(f-c)/(h-u),g=void 0,m=void 0;a&aa.ABOVE&&!(i&aa.ABOVE)&&(g=h-(f-l)/d,n=g>=o&&g<=A),!n&&a&aa.RIGHT&&!(i&aa.RIGHT)&&(m=f-(h-A)*d,n=m>=s&&m<=l),!n&&a&aa.BELOW&&!(i&aa.BELOW)&&(g=h-(f-s)/d,n=g>=o&&g<=A),!n&&a&aa.LEFT&&!(i&aa.LEFT)&&(m=f-(h-o)*d,n=m>=s&&m<=l)}return n}function hF(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 _X(A,l,t)}function Qk(r,e){var t=e.getExtent(),n=Ya(r);if(e.canWrapX()&&(n[0]<t[0]||n[0]>=t[2])){var i=Kr(t),a=Math.floor((n[0]-t[0])/i),o=a*i;r[0]-=o,r[2]-=o}return r}var xX=Object.freeze(Object.defineProperty({__proto__:null,boundingExtent:oa,buffer:_o,clone:lF,closestSquaredDistanceXY:_h,containsCoordinate:mA,containsExtent:ps,containsXY:SC,coordinateRelationship:Qw,createEmpty:Di,createOrUpdate:Ho,createOrUpdateEmpty:wh,createOrUpdateFromCoordinate:Pf,createOrUpdateFromCoordinates:wX,createOrUpdateFromFlatCoordinates:xC,createOrUpdateFromRings:EX,equals:vl,approximatelyEquals:CX,extend:Ah,extendCoordinate:Uf,extendCoordinates:uF,extendFlatCoordinates:cF,extendRings:Rk,extendXY:Mk,forEachCorner:IC,getArea:My,getBottomLeft:w0,getBottomRight:iv,getCenter:Ya,getCorner:Nk,getEnlargedArea:BX,getForViewAndSize:Df,getHeight:Li,getIntersectionArea:bX,getIntersection:ks,getMargin:TX,getSize:SX,getTopLeft:TA,getTopRight:E0,getWidth:Kr,intersects:qn,isEmpty:av,returnOrUpdate:Pk,scaleFromCenter:Uk,intersectsSegment:Dk,applyTransform:hF,wrapX:Qk},Symbol.toStringTag,{value:"Module"}));function Un(r,e,t){return Math.min(Math.max(r,e),t)}var IX=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),kk=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function LX(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 Qf(r,e,t,n)}function Qf(r,e,t,n){var i=t-r,a=n-e;return i*i+a*a}function OX(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 uP(r){return r*180/Math.PI}function Kc(r){return r*Math.PI/180}function Wc(r,e){var t=r%e;return t*e<0?t+e:t}function ou(r,e,t){return r+t*(e-r)}function fF(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}function cP(r,e){return Math.round(fF(r,e))}function zp(r,e){return Math.floor(fF(r,e))}function Mc(r,e){return Math.ceil(fF(r,e))}var Hk=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Gk=/^([a-z]*)$|^hsla?\(.*\)$/i;function du(r){return typeof r=="string"?r:jk(r)}function $k(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 Vk=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=FX(n),e[n]=i,++t}return i}}();function lh(r){return Array.isArray(r)?r:Vk(r)}function FX(r){var e,t,n,i,a;if(Gk.exec(r)&&(r=$k(r)),Hk.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),hP(a)):r.indexOf("rgb(")==0?(a=r.slice(4,-1).split(",").map(Number),a.push(1),hP(a)):Le(!1,14);return a}function hP(r){return r[0]=Un(r[0]+.5|0,0,255),r[1]=Un(r[1]+.5|0,0,255),r[2]=Un(r[2]+.5|0,0,255),r[3]=Un(r[3],0,1),r}function jk(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 RX(r){return Gk.test(r)&&(r=$k(r)),Hk.test(r)||r.indexOf("rgba(")===0||r.indexOf("rgb(")===0}var MX=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=fP(e,t,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(e,t,n,i){var a=fP(e,t,n);this.cache_[a]=i,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function fP(r,e,t){var n=t?du(t):"null";return e+":"+r+":"+n}var kw=new MX,NX=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 PX(r){r.stopPropagation()}var Vo=NX,ed={PROPERTYCHANGE:"propertychange"},Ce=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 _d(r){for(var e in r)delete r[e]}var dF=typeof Object.values=="function"?Object.values:function(r){var e=[];for(var t in r)e.push(r[t]);return e};function rd(r){var e;for(e in r)return!1;return!e}var 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=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,Jf);delete s[i]}return l}},e.prototype.disposeInternal=function(){this.listeners_&&_d(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]=Jf,++this.pendingRemovals_[t]):(i.splice(a,1),i.length===0&&delete this.listeners_[t]))}},e}(BC),wd=DX,xe={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 je(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 Ny(r,e,t,n){return je(r,e,t,n,!0)}function Yr(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),_d(r))}var QX=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)}}(),C0=function(r){QX(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(xe.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]=je(this,t[o],n);return a}else return je(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]=Ny(this,t[o],n)}else i=Ny(this,t,n);return n.ol_key=i,i},e.prototype.unInternal=function(t,n){var i=n.ol_key;if(i)ys(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}(wd);C0.prototype.on;C0.prototype.once;C0.prototype.un;function ys(r){if(Array.isArray(r))for(var e=0,t=r.length;e<t;++e)Yr(r[e]);else Yr(r)}var Kk=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)}}(),dP=function(r){Kk(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),kX=function(r){Kk(e,r);function e(t){var n=r.call(this)||this;return n.on,n.once,n.un,Ee(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_&&Ce({},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 dP(i,t,n)),i=ed.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new dP(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_&&Ce(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],rd(this.values_)&&(this.values_=null),n||this.notify(t,i)}},e}(C0),Oi=kX,Jr={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"},HX=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)}}(),GX=function(r){HX(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un,n.background_=t.background;var i=Ce({},t);return typeof t.properties=="object"&&(delete i.properties,Ce(i,t.properties)),i[Jr.OPACITY]=t.opacity!==void 0?t.opacity:1,Le(typeof i[Jr.OPACITY]=="number",64),i[Jr.VISIBLE]=t.visible!==void 0?t.visible:!0,i[Jr.Z_INDEX]=t.zIndex,i[Jr.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,i[Jr.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,i[Jr.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,i[Jr.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=Un(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 Re()},e.prototype.getLayerStatesArray=function(t){return Re()},e.prototype.getExtent=function(){return this.get(Jr.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(Jr.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(Jr.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(Jr.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(Jr.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(Jr.OPACITY)},e.prototype.getSourceState=function(){return Re()},e.prototype.getVisible=function(){return this.get(Jr.VISIBLE)},e.prototype.getZIndex=function(){return this.get(Jr.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Jr.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(Jr.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(Jr.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(Jr.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(Jr.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){Le(typeof t=="number",64),this.set(Jr.OPACITY,t)},e.prototype.setVisible=function(t){this.set(Jr.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(Jr.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),r.prototype.disposeInternal.call(this)},e}(Oi),pF=GX,No={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},co={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},$X=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)}}(),VX=function(r){$X(e,r);function e(t){var n=this,i=Ce({},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(Jr.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(Jr.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():co.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Yr(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=je(t,xe.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(Jr.MAP,t)},e.prototype.getMapInternal=function(){return this.get(Jr.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Yr(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Yr(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=je(t,No.PRECOMPOSE,function(n){var i=n,a=i.frameState.layerStatesArray,o=this.getLayerState(!1);Le(!a.some(function(s){return s.layer===o.layer}),67),a.push(o)},this),this.mapRenderKey_=je(this,xe.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Jr.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}(pF);function Hw(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 Ed=VX;function sm(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 Wk(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 zk(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function jX(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 gF(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,d;return h<=0?(f=o,d=s):h>=1?(f=A,d=l):(f=o+h*u,d=s+h*c),[f,d]}function uA(r,e){for(var t=!0,n=r.length-1;n>=0;--n)if(r[n]!=e[n]){t=!1;break}return t}function vF(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 Yk(r,e){return r[0]*=e,r[1]*=e,r}function pu(r,e){var t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function pP(r,e){return Math.sqrt(pu(r,e))}function KX(r,e){return pu(r,gF(r,e))}function mF(r,e){if(e.canWrapX()){var t=Kr(e.getExtent()),n=Xk(r,e,t);n&&(r[0]-=n*t)}return r}function Xk(r,e,t){var n=e.getExtent(),i=0;if(e.canWrapX()&&(r[0]<n[0]||r[0]>n[2])){var a=t||Kr(n);i=Math.floor((r[0]-n[0])/a)}return i}var WX=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)}}(),zX=function(r){WX(e,r);function e(t){var n=r.call(this)||this;return n.map_=t,n}return e.prototype.dispatchRenderEvent=function(t,n){Re()},e.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,a=t.pixelToCoordinateTransform;yo(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),_0(a,i)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o,s,A,l){var u,c=n.viewState;function h(tt,q,rt,nt){return o.call(s,q,tt?rt:null,nt)}var f=c.projection,d=mF(t.slice(),f),g=[[0,0]];if(f.canWrapX()&&a){var m=f.getExtent(),v=Kr(m);g.push([-v,0],[v,0])}for(var y=n.layerStatesArray,w=y.length,C=[],O=[],F=0;F<g.length;F++)for(var I=w-1;I>=0;--I){var T=y[I],L=T.layer;if(L.hasRenderer()&&Hw(T,c)&&A.call(l,L)){var N=L.getRenderer(),x=L.getSource();if(N&&x){var S=x.getWrapX()?d:t,P=h.bind(null,T.managed);O[0]=S[0]+g[F][0],O[1]=S[1]+g[F][1],u=N.forEachFeatureAtCoordinate(O,n,i,P,C)}if(u)return u}}if(C.length!==0){var U=1/C.length;return C.forEach(function(tt,q){return tt.distanceSq+=q*U}),C.sort(function(tt,q){return tt.distanceSq-q.distanceSq}),C.some(function(tt){return u=tt.callback(tt.feature,tt.layer,tt.geometry)}),u}},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){return Re()},e.prototype.hasFeatureAtCoordinate=function(t,n,i,a,o,s){var A=this.forEachFeatureAtCoordinate(t,n,i,a,ul,this,o,s);return A!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Re()},e.prototype.scheduleExpireIconCache=function(t){kw.canExpireCache()&&t.postRenderFunctions.push(YX)},e}(BC);function YX(r,e){kw.expire()}var XX=zX,qX=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)}}(),ZX=function(r){qX(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),oy=ZX,Q_="ol-hidden",JX="ol-selectable",ml="ol-unselectable",gP="ol-unsupported",Cd="ol-control",Gw="ol-collapsed",tq=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"),vP=["style","variant","weight","size","lineHeight","family"],qk=function(r){var e=r.match(tq);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=vP.length;n<i;++n){var a=e[n+1];a!==void 0&&(t[vP[n]]=a)}return t.families=t.family.split(/,\s?/),t};function Zk(r){return r===1?"":String(Math.round(r*100)/100)}function wo(r,e,t,n){var i;return t&&t.length?i=t.shift():TC?i=new OffscreenCanvas(r||300,e||300):i=document.createElement("canvas"),r&&(i.width=r),e&&(i.height=e),i.getContext("2d",n)}function eq(r){var e=r.offsetWidth,t=getComputedStyle(r);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function rq(r){var e=r.offsetHeight,t=getComputedStyle(r);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function Lg(r,e){var t=e.parentNode;t&&t.replaceChild(r,e)}function $w(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function Jk(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function nq(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 t8="10px sans-serif",gu="#000",Vw="round",Py=[],Uy=0,Og="round",Dy=10,Qy="#000",ky="center",jw="middle",bf=[0,0,0,0],Hy=1,ru=new Oi,iq=new wd;iq.setSize=function(){console.warn("labelCache is deprecated.")};var Pp=null,ux,cx={},aq=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 d=t[f];if(o=Kw(l+" "+u+" "+e+d,i),c!=d){var g=Kw(l+" "+u+" "+e+c+","+d,i);h=h&&g!=o}}return!!h}function A(){for(var l=!0,u=ru.getKeys(),c=0,h=u.length;c<h;++c){var f=u[c];ru.get(f)<r&&(s.apply(this,f.split(`
|
||
`))?(_d(cx),Pp=null,ux=void 0,ru.set(f,r)):(ru.set(f,ru.get(f)+1,!0),l=!1))}l&&(clearInterval(a),a=void 0)}return function(l){var u=qk(l);if(u)for(var c=u.families,h=0,f=c.length;h<f;++h){var d=c[h],g=u.style+`
|
||
`+u.weight+`
|
||
`+d;ru.get(g)===void 0&&(ru.set(g,r,!0),s(u.style,u.weight,d)||(ru.set(g,0,!0),a===void 0&&(a=setInterval(A,32))))}}}(),oq=function(){var r;return function(e){var t=cx[e];if(t==null){if(TC){var n=qk(e),i=e8(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);cx[e]=t}return t}}();function e8(r,e){return Pp||(Pp=wo(1,1)),r!=ux&&(Pp.font=r,ux=Pp.font),Pp.measureText(e)}function Kw(r,e){return e8(r,e).width}function mP(r,e,t){if(e in t)return t[e];var n=Kw(r,e);return t[e]=n,n}function sq(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=Kw(h,c);t.push(f),o+=f;var d=oq(h);n.push(d),A=Math.max(A,d)}return{width:a,height:s,widths:t,heights:n,lineWidths:i}}function Aq(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]),lq(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 lq(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 uq=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)}}(),cq=function(r){uq(e,r);function e(t){var n=r.call(this,t)||this;n.fontChangeListenerKey_=je(ru,ed.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=ml+" 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 oy(t,void 0,n);i.dispatchEvent(a)}},e.prototype.disposeInternal=function(){Yr(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(No.PRECOMPOSE,t);var n=t.layerStatesArray.sort(function(f,d){return f.zIndex-d.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(!Hw(l,i)||c!=co.READY&&c!=co.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);nq(this.element_,this.children_),this.dispatchRenderEvent(No.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()&&Hw(c,s)&&o(h)){var f=h.getRenderer(),d=f.getDataAtPixel(t,n,i);if(d){var g=a(h,d);if(g)return g}}}},e}(XX),r8=cq,si={ADD:"add",REMOVE:"remove"},n8=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)}}(),yP={LENGTH:"length"},k_=function(r){n8(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),hq=function(r){n8(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(yP.LENGTH)},e.prototype.insertAt=function(t,n){this.unique_&&this.assertUnique_(n),this.array_.splice(t,0,n),this.updateLength_(),this.dispatchEvent(new k_(si.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 k_(si.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 k_(si.REMOVE,a,t)),this.dispatchEvent(new k_(si.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(yP.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 Fk(58)},e}(Oi),Ii=hq,i8=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=function(r){i8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.layer=n,i}return e}(Vo),Fb={LAYERS:"layers"},fq=function(r){i8(e,r);function e(t){var n=this,i=t||{},a=Ce({},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(Fb.LAYERS,n.handleLayersChanged_),o?Array.isArray(o)?o=new Ii(o.slice(),{unique:!0}):Le(typeof o.getArray=="function",43):o=new Ii(void 0,{unique:!0}),n.setLayers(o),n}return e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(Yr),this.layersListenerKeys_.length=0;var t=this.getLayers();this.layersListenerKeys_.push(je(t,si.ADD,this.handleLayersAdd_,this),je(t,si.REMOVE,this.handleLayersRemove_,this));for(var n in this.listenerKeys_)this.listenerKeys_[n].forEach(Yr);_d(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 Tc("addlayer",s))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[je(t,ed.PROPERTYCHANGE,this.handleLayerChange_,this),je(t,xe.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push(je(t,"addlayer",this.handleLayerGroupAdd_,this),je(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[Ee(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new Tc("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new Tc("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var n=t.element;this.registerLayerListeners_(n),this.dispatchEvent(new Tc("addlayer",n)),this.changed()},e.prototype.handleLayersRemove_=function(t){var n=t.element,i=Ee(n);this.listenerKeys_[i].forEach(Yr),delete this.listenerKeys_[i],this.dispatchEvent(new Tc("removelayer",n)),this.changed()},e.prototype.getLayers=function(){return this.get(Fb.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 Tc("removelayer",i[a]));this.set(Fb.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=ks(l.extent,a.extent):l.extent=a.extent),l.zIndex===void 0&&(l.zIndex=o)}return n},e.prototype.getSourceState=function(){return co.READY},e}(pF),B0=fq,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)}}(),pq=function(r){dq(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),Up=pq,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)}}(),vq=function(r){gq(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}(Up),iu=vq,yr={SINGLECLICK:"singleclick",CLICK:xe.CLICK,DBLCLICK:xe.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},tl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},mq=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){mq(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_=je(a,tl.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=je(a,tl.POINTERMOVE,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(xe.TOUCHMOVE,i.boundHandleTouchMove_,Ok?{passive:!1}:!1),i}return e.prototype.emulateClick_=function(t){var n=new iu(yr.CLICK,this.map_,t);this.dispatchEvent(n),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new iu(yr.DBLCLICK,this.map_,t),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var i=new iu(yr.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var n=t;n.type==yr.POINTERUP||n.type==yr.POINTERCANCEL?delete this.trackedTouches_[n.pointerId]:n.type==yr.POINTERDOWN&&(this.trackedTouches_[n.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var n=new iu(yr.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(Yr),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 iu(yr.POINTERDOWN,this.map_,t);this.dispatchEvent(n),this.down_={};for(var i in t){var a=t[i];this.down_[i]=typeof a=="function"?Jf:a}if(this.dragListenerKeys_.length===0){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(je(o,yr.POINTERMOVE,this.handlePointerMove_,this),je(o,yr.POINTERUP,this.handlePointerUp_,this),je(this.element_,yr.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(je(this.element_.getRootNode(),yr.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var n=new iu(yr.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 iu(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_&&(Yr(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(xe.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Yr(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Yr),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},e}(wd),_q=yq,ZA={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},wi={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Ww=1/0,wq=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,_d(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){Le(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=Ww?(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==Ww?delete this.queuedElements_[this.keyFunction_(o)]:(n[i]=A,t[i++]=o);t.length=i,n.length=i,this.heapify_()},r}(),Eq=wq,Te={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},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)}}(),Bq=function(r){Cq(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(xe.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===Te.LOADED||i===Te.ERROR||i===Te.EMPTY){n.removeEventListener(xe.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===Te.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++i,o.load())},e}(Eq),bq=Bq;function Tq(r,e,t,n,i){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return Ww;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 pt={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"},ov={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},yA={};yA[ov.RADIANS]=6370997/(2*Math.PI);yA[ov.DEGREES]=2*Math.PI*6370997/360;yA[ov.FEET]=.3048;yA[ov.METERS]=1;yA[ov.USFEET]=1200/3937;var ho=ov,In={ANIMATING:0,INTERACTING:1},cs={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Sq=42,yF=256,xq=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_||yA[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}(),Ru=xq,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)}}(),b0=6378137,Yp=Math.PI*b0,Lq=[-Yp,-Yp,Yp,Yp],Oq=[-180,-85,180,85],H_=b0*Math.log(Math.tan(Math.PI/2)),fp=function(r){Iq(e,r);function e(t){return r.call(this,{code:t,units:ho.METERS,extent:Lq,global:!0,worldExtent:Oq,getPointResolution:function(n,i){return n/IX(i[1]/b0)}})||this}return e}(Ru),_P=[new fp("EPSG:3857"),new fp("EPSG:102100"),new fp("EPSG:102113"),new fp("EPSG:900913"),new fp("http://www.opengis.net/def/crs/EPSG/0/3857"),new fp("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Fq(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]=Yp*r[o]/180;var s=b0*Math.log(Math.tan(Math.PI*(+r[o+1]+90)/360));s>H_?s=H_:s<-H_&&(s=-H_),a[o+1]=s}return a}function Rq(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]/Yp,a[o+1]=360*Math.atan(Math.exp(r[o+1]/b0))/Math.PI-90;return a}var Mq=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)}}(),Nq=6378137,wP=[-180,-90,180,90],Pq=Math.PI*Nq/180,nf=function(r){Mq(e,r);function e(t,n){return r.call(this,{code:t,units:ho.DEGREES,extent:wP,axisOrientation:n,global:!0,metersPerUnit:Pq,worldExtent:wP})||this}return e}(Ru),EP=[new nf("CRS:84"),new nf("EPSG:4326","neu"),new nf("urn:ogc:def:crs:OGC:1.3:CRS84"),new nf("urn:ogc:def:crs:OGC:2:84"),new nf("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new nf("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new nf("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],hx={};function Uq(r){return hx[r]||hx[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Dq(r,e){hx[r]=e}var cg={};function Fg(r,e,t){var n=r.getCode(),i=e.getCode();n in cg||(cg[n]={}),cg[n][i]=t}function a8(r,e){var t;return r in cg&&e in cg[r]&&(t=cg[r][e]),t}var o8=63710088e-1;function zw(r,e,t){var n=t||o8,i=Kc(r[1]),a=Kc(e[1]),o=(a-i)/2,s=Kc(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 Qq(r,e,t,n){var i=n||o8,a=Kc(r[1]),o=Kc(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[uP(l),uP(A)]}var fx=!0;function kq(r){var e=r===void 0?!0:r;fx=!e}function _F(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 LC(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 s8(r){Dq(r.getCode(),r),Fg(r,r,_F)}function Hq(r){r.forEach(s8)}function Ve(r){return typeof r=="string"?Uq(r):r||null}function Yw(r,e,t,n){r=Ve(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/yA[n])}}else{var s=r.getUnits();if(s==ho.DEGREES&&!n||n==ho.DEGREES)i=e;else{var A=nd(r,Ve("EPSG:4326"));if(A===LC&&s!==ho.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=zw(l.slice(0,2),l.slice(2,4)),c=zw(l.slice(4,6),l.slice(6,8));i=(u+c)/2}var o=n?yA[n]:r.getMetersPerUnit();o!==void 0&&(i/=o)}}return i}function dx(r){Hq(r),r.forEach(function(e){r.forEach(function(t){e!==t&&Fg(e,t,_F)})})}function Gq(r,e,t,n){r.forEach(function(i){e.forEach(function(a){Fg(i,a,t),Fg(a,i,n)})})}function wF(r,e){return r?typeof r=="string"?Ve(r):r:Ve(e)}function CP(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 $q(r,e,t,n){var i=Ve(r),a=Ve(e);Fg(i,a,CP(t)),Fg(a,i,CP(n))}function el(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var n=nd(r,e);return n===_F&&t}function nd(r,e){var t=r.getCode(),n=e.getCode(),i=a8(t,n);return i||(i=LC),i}function Gy(r,e){var t=Ve(r),n=Ve(e);return nd(t,n)}function uh(r,e,t){var n=Gy(e,t);return n(r,void 0,r.length)}function Xw(r,e,t,n){var i=Gy(e,t);return hF(r,i,void 0,n)}var Vq=null;function id(){return Vq}function Rg(r,e){return r}function Mn(r,e){return fx&&!uA(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(fx=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function OC(r,e){return r}function gs(r,e){return r}function jq(r,e){return r}function BP(r,e,t){return function(n){var i=n[0],a=n[1],o,s;if(r.canWrapX()){var A=r.getExtent(),l=Kr(A);s=Xk(n,r,l),s&&(i=i-s*l),i=Un(i,A[0],A[2]),a=Un(a,A[1],A[3]),o=t([i,a])}else o=t(n);return s&&e.canWrapX()&&(o[0]+=s*Kr(e.getExtent())),o}}function Kq(){dx(_P),dx(EP),Gq(EP,_P,Fq,Rq)}Kq();function bP(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,d=r[1]+l/2+c,g=r[3]-l/2+c;h>f&&(h=(f+h)/2,f=h),d>g&&(d=(g+d)/2,g=d);var m=Un(n[0],h,f),v=Un(n[1],d,g);if(o&&t&&i){var y=30*i;m+=-y*Math.log(1+Math.max(0,h-n[0])/y)+y*Math.log(1+Math.max(0,n[0]-f)/y),v+=-y*Math.log(1+Math.max(0,d-n[1])/y)+y*Math.log(1+Math.max(0,n[1]-g)/y)}return[m,v]}}}function Wq(r){return r}function EF(r,e,t,n){var i=Kr(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 CF(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),Un(n,t/2,e*2)}function zq(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?EF(A,t,o,n):A;if(s){var c=e!==void 0?e:!0;return c?CF(i,u,l):Un(i,l,u)}var h=Math.min(u,i),f=Math.floor(bC(r,h,a));return r[f]>u&&f<r.length-1?r[f+1]:r[f]}else return}}function Yq(r,e,t,n,i,a){return function(o,s,A,l){if(o!==void 0){var u=i?EF(e,i,A,a):e,c=t!==void 0?t:0;if(l){var h=n!==void 0?n:!0;return h?CF(o,u,c):Un(o,c,u)}var f=1e-9,d=Math.ceil(Math.log(e/u)/Math.log(r)-f),g=-s*(.5-f)+.5,m=Math.min(u,o),v=Math.floor(Math.log(e/m)/Math.log(r)+g),y=Math.max(d,v),w=e/Math.pow(r,y);return Un(w,c,u)}else return}}function TP(r,e,t,n,i){return function(a,o,s,A){if(a!==void 0){var l=n?EF(r,n,s,i):r,u=t!==void 0?t:!0;return!u||!A?Un(a,e,l):CF(a,l,e)}else return}}function BF(r){if(r!==void 0)return 0}function SP(r){if(r!==void 0)return r}function Xq(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 qq(r){var e=r||Kc(5);return function(t,n){if(n)return t;if(t!==void 0)return Math.abs(t)<=e?0:t}}function bF(r){return Math.pow(r,3)}function Gs(r){return 1-bF(1-r)}function qw(r){return 3*r*r-2*r*r*r}function TF(r){return r}function Zq(r){return r<.5?qw(2*r):1-qw(2*(r-.5))}var Jq=Object.freeze(Object.defineProperty({__proto__:null,easeIn:bF,easeOut:Gs,inAndOut:qw,linear:TF,upAndDown:Zq},Symbol.toStringTag,{value:"Module"})),ae={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function zc(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 SF(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 d=r[f]-u,g=r[f+1]-c;s[h++]=u+d*A-g*l,s[h++]=c+d*l+g*A;for(var m=f+2;m<f+n;++m)s[h++]=r[m]}return o&&s.length!=h&&(s.length=h),s}function t3(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,d=r[h+1]-u;A[c++]=l+i*f,A[c++]=u+a*d;for(var g=h+2;g<h+n;++g)A[c++]=r[g]}return s&&A.length!=c&&(A.length=c),A}function A8(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 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)}}(),xP=xi(),r3=function(r){e3(e,r);function e(){var t=r.call(this)||this;return t.extent_=Di(),t.extentRevision_=-1,t.simplifiedGeometryMaxMinSquaredTolerance=0,t.simplifiedGeometryRevision=0,t.simplifyTransformedInternal=oX(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 Re()},e.prototype.closestPointXY=function(t,n,i,a){return Re()},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 Re()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&wh(n),this.extentRevision_=this.getRevision()}return Pk(this.extent_,t)},e.prototype.rotate=function(t,n){Re()},e.prototype.scale=function(t,n,i){Re()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Re()},e.prototype.getType=function(){return Re()},e.prototype.applyTransform=function(t){Re()},e.prototype.intersectsExtent=function(t){return Re()},e.prototype.translate=function(t,n){Re()},e.prototype.transform=function(t,n){var i=Ve(t),a=i.getUnits()==ho.TILE_PIXELS?function(o,s,A){var l=i.getExtent(),u=i.getWorldExtent(),c=Li(u)/Li(l);return yo(xP,u[0],u[3],c,-c,0,0,0),zc(o,0,o.length,A,xP,s),Gy(i,n)(o,s,A)}:Gy(i,n);return this.applyTransform(a),this},e}(Oi),FC=r3,n3=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)}}(),i3=function(r){n3(e,r);function e(){var t=r.call(this)||this;return t.layout=ae.XY,t.stride=2,t.flatCoordinates=null,t}return e.prototype.computeExtent=function(t){return xC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Re()},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=px(t),this.layout=t,this.flatCoordinates=n},e.prototype.setCoordinates=function(t,n){Re()},e.prototype.setLayout=function(t,n,i){var a;if(t)a=px(t);else{for(var o=0;o<i;++o)if(n.length===0){this.layout=ae.XY,this.stride=2;return}else n=n[0];a=n.length,t=a3(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();SF(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=Ya(this.getExtent()));var s=this.getFlatCoordinates();if(s){var A=this.getStride();t3(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();A8(i,0,i.length,a,t,n,i),this.changed()}},e}(FC);function a3(r){var e;return r==2?e=ae.XY:r==3?e=ae.XYZ:r==4&&(e=ae.XYZM),e}function px(r){var e;return r==ae.XY?e=2:r==ae.XYZ||r==ae.XYM?e=3:r==ae.XYZM&&(e=4),e}function o3(r,e,t){var n=r.getFlatCoordinates();if(n){var i=r.getStride();return zc(n,0,n.length,i,e,t)}else return null}var _A=i3;function IP(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]=ou(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 xF(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=Qf(a,o,s,A);l>i&&(i=l),a=s,o=A}return i}function IF(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=xF(r,e,s,n,i),e=s}return i}function s3(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=IF(r,e,s,n,i),e=s[s.length-1]}return i}function LF(r,e,t,n,i,a,o,s,A,l,u){if(e==t)return l;var c,h;if(i===0)if(h=Qf(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],d=e+n;d<t;)if(IP(r,d-n,d,n,o,s,f),h=Qf(o,s,f[0],f[1]),h<l){for(l=h,c=0;c<n;++c)A[c]=f[c];A.length=n,d+=n}else d+=n*Math.max((Math.sqrt(h)-Math.sqrt(l))/i|0,1);if(a&&(IP(r,t-n,e,n,o,s,f),h=Qf(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 OF(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 d=t[h];l=LF(r,e,d,n,i,a,o,s,A,l,c),e=d}return l}function A3(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 d=t[h];l=OF(r,e,d,n,i,a,o,s,A,l,c),e=d[d.length-1]}return l}function l8(r,e,t,n){for(var i=0,a=t.length;i<a;++i)r[e++]=t[i];return e}function T0(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 FF(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=T0(r,e,t[s],n);a[o++]=l,e=l}return a.length=o,a}function l3(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=FF(r,e,t[s],n,a[o]);a[o++]=l,e=l[l.length-1]}return a.length=o,a}function RF(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,d=r[h],g=r[h+1],m=r[c],v=r[c+1],y=h+n;y<c;y+=n){var w=r[y],C=r[y+1],O=LX(w,C,d,g,m,v);O>f&&(u=y,f=O)}f>i&&(A[(u-e)/n]=1,h+n<u&&l.push(h,u),u+n<c&&l.push(u,c))}for(var y=0;y<s;++y)A[y]&&(a[o++]=r[e+y*n],a[o++]=r[e+y*n+1]);return o}function u3(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=RF(r,e,u,n,i,a,o),s.push(o),e=u}return o}function pf(r,e){return e*Math.round(r/e)}function c3(r,e,t,n,i,a,o){if(e==t)return o;var s=pf(r[e],i),A=pf(r[e+1],i);e+=n,a[o++]=s,a[o++]=A;var l,u;do if(l=pf(r[e],i),u=pf(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=pf(r[e],i),h=pf(r[e+1],i);if(e+=n,!(c==l&&h==u)){var f=l-s,d=u-A,g=c-s,m=h-A;if(f*m==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&m<d||d==m||d>0&&m>d)){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 u8(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=c3(r,e,u,n,i,a,o),s.push(o),e=u}return o}function h3(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A],c=[];o=u8(r,e,u,n,i,a,o,c),s.push(c),e=u[u.length-1]}return o}function lu(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 $y(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++]=lu(r,e,l,n,a[o]),e=l}return a.length=o,a}function gx(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++]=$y(r,e,l,n,a[o]),e=l[l.length-1]}return a.length=o,a}function c8(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 h8(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=c8(r,e,s,n),e=s}return i}function f3(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=h8(r,e,s,n),e=s[s.length-1]}return i}var d3=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)}}(),p3=function(r){d3(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<_h(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),LF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.getArea=function(){return c8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return lu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=RF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,ae.XY)},e.prototype.getType=function(){return pt.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=T0(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_A),Mg=p3,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)}}(),v3=function(r){g3(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=Qf(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 Pf(this.flatCoordinates,t)},e.prototype.getType=function(){return pt.POINT},e.prototype.intersectsExtent=function(t){return SC(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=l8(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_A),xr=v3;function m3(r,e,t,n,i){var a=IC(i,function(o){return!Tf(r,e,t,n,o[0],o[1])});return!a}function Tf(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 MF(r,e,t,n,i,a){if(t.length===0||!Tf(r,e,t[0],n,i,a))return!1;for(var o=1,s=t.length;o<s;++o)if(Tf(r,t[o-1],t[o],n,i,a))return!1;return!0}function y3(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(MF(r,e,A,n,i,a))return!0;e=A[A.length-1]}return!1}function NF(r,e,t,n,i,a,o){for(var s,A,l,u,c,h,f,d=i[a+1],g=[],m=0,v=t.length;m<v;++m){var y=t[m];for(u=r[y-n],h=r[y-n+1],s=e;s<y;s+=n)c=r[s],f=r[s+1],(d<=h&&f<=d||h<=d&&d<=f)&&(l=(d-h)/(f-h)*(c-u)+u,g.push(l)),u=c,h=f}var w=NaN,C=-1/0;for(g.sort(oh),u=g[0],s=1,A=g.length;s<A;++s){c=g[s];var O=Math.abs(c-u);O>C&&(l=(u+c)/2,MF(r,e,t,n,l,d)&&(w=l,C=O)),u=c}return isNaN(w)&&(w=i[a]),o?(o.push(w,d,C),o):[w,d,C]}function f8(r,e,t,n,i){for(var a=[],o=0,s=t.length;o<s;++o){var A=t[o];a=NF(r,e,A,n,i,2*o,a),e=A[A.length-1]}return a}function d8(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 RC(r,e,t,n,i){var a=cF(Di(),r,e,t,n);return qn(i,a)?ps(i,a)||a[0]>=i[0]&&a[2]<=i[2]||a[1]>=i[1]&&a[3]<=i[3]?!0:d8(r,e,t,n,function(o,s){return Dk(i,o,s)}):!1}function _3(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){if(RC(r,e,t[a],n,i))return!0;e=t[a]}return!1}function w3(r,e,t,n,i){return!!(RC(r,e,t,n,i)||Tf(r,e,t,n,i[0],i[1])||Tf(r,e,t,n,i[0],i[3])||Tf(r,e,t,n,i[2],i[1])||Tf(r,e,t,n,i[2],i[3]))}function p8(r,e,t,n,i){if(!w3(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(m3(r,t[a-1],t[a],n,i)&&!RC(r,t[a-1],t[a],n,i))return!1;return!0}function E3(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(p8(r,e,s,n,i))return!0;e=s[s.length-1]}return!1}function C3(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 MC(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 g8(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=MC(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 B3(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(!g8(r,e,s,n,i))return!1;s.length&&(e=s[s.length-1])}return!0}function vx(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=MC(r,e,A,n),u=o===0?a&&l||!a&&!l:a&&!l||!a&&l;u&&C3(r,e,A,n),e=A}return e}function LP(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a)e=vx(r,e,t[a],n,i);return e}function b3(r,e){for(var t=[],n=0,i=0,a=0,o=e.length;a<o;++a){var s=e[a];if(!MC(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 T3=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)}}(),NC=function(r){T3(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?tn(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<_h(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(IF(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),OF(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return MF(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,n)},e.prototype.getArea=function(){return h8(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),vx(n,0,this.ends_,this.stride,t)):n=this.flatCoordinates,$y(n,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Ya(this.getExtent());this.flatInteriorPoint_=NF(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new xr(this.getFlatInteriorPoint(),ae.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new Mg(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 Mg(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;g8(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=vx(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=u8(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,ae.XY,i)},e.prototype.getType=function(){return pt.POLYGON},e.prototype.intersectsExtent=function(t){return p8(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=FF(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(_A),Dn=NC;function S3(r,e,t,n){for(var i=t||32,a=[],o=0;o<i;++o)tn(a,Qq(r,e,2*Math.PI*o/i,n));return a.push(a[0],a[1]),new NC(a,ae.XY,[a.length])}function ch(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 NC(a,ae.XY,[a.length])}function v8(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 NC(A,a,c);return x3(h,o,r.getRadius(),t),h}function x3(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+Wc(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 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)}}(),Rb=0,L3=function(r){I3(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=Ce({},t);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=wF(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&&kq(),i.center&&(i.center=Mn(i.center,n.projection_)),i.extent&&(i.extent=gs(i.extent,n.projection_)),n.applyOptions_(i),n}return e.prototype.applyOptions_=function(t){var n=Ce({},t);for(var i in cs)delete n[i];this.setProperties(n,!0);var a=F3(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=O3(t),s=a.constraint,A=R3(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(),Ce({},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=Ce({},a),a.center=Mn(a.center,this.getProjection())),a.anchor&&(a=Ce({},a),a.anchor=Mn(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&&G_(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||qw,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 d=Wc(h.rotation-u+Math.PI,2*Math.PI)-Math.PI;f.targetRotation=u+d,u=f.targetRotation}M3(f)?f.complete=!0:s+=f.duration,c.push(f)}this.animations_.push(c),this.setHint(In.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[In.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[In.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(In.ANIMATING,-this.hints_[In.ANIMATING]);for(var t,n=0,i=this.animations_.length;n<i;++n){var a=this.animations_[n];if(a[0].callback&&G_(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],d=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;var v=f+h*(g-f),y=d+h*(m-d);this.targetCenter_=[v,y]}if(l.sourceResolution&&l.targetResolution){var w=h===1?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){var C=this.getViewportSize_(this.getRotation()),O=this.constraints_.resolution(w,0,C,!0);this.targetCenter_=this.calculateCenterZoom(O,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=w,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){var F=h===1?Wc(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){var I=this.constraints_.rotation(F,!0);this.targetCenter_=this.calculateCenterRotate(I,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=F}if(this.applyTargetState_(!0),n=!0,!l.complete)break}}if(o){this.animations_[i]=null,this.setHint(In.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var T=a[0].callback;T&&G_(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]],vF(i,t-this.getRotation()),zk(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&&Rg(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(cs.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 OC(n,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var n=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();Le(i,1);var a=this.getResolution();Le(a!==void 0,2);var o=this.getRotation();return Le(o!==void 0,3),Df(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(cs.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(gs(t,this.getProjection()),n)},e.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.getViewportSizeMinusPadding_(),a=Kr(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(cs.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=Mb(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=bC(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=Un(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,Un(t-n,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,n){var i;if(Le(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){Le(!av(t),25);var a=gs(t,this.getProjection());i=ch(a)}else if(t.getType()===pt.CIRCLE){var a=gs(t.getExtent(),this.getProjection());i=ch(a),i.rotate(this.getRotation(),Ya(a))}else{var o=id();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 d=o[h]*i-o[h+1]*a,g=o[h]*a+o[h+1]*i;A=Math.min(A,d),l=Math.min(l,g),u=Math.max(u,d),c=Math.max(c,g)}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),d=Ya(l);d[0]+=(o[1]-o[3])/2*u,d[1]+=(o[0]-o[2])/2*u;var g=d[0]*f-d[1]*h,m=d[1]*f+d[0]*h,v=this.getConstrainedCenter([g,m],u),y=i.callback?i.callback:Jf;i.duration!==void 0?this.animateInternal({resolution:u,center:v,duration:i.duration,easing:i.easing},y):(this.targetResolution_=u,this.targetCenter_=v,this.applyTargetState_(!1,!0),G_(y,!0))},e.prototype.centerOn=function(t,n,i){this.centerOnInternal(Mn(t,this.getProjection()),n,i)},e.prototype.centerOnInternal=function(t,n,i){this.setCenterInternal(Mb(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=Mb(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=Rg(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&&Mn(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=Mn(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&&Mn(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(cs.ROTATION)!==a&&this.set(cs.ROTATION,a),this.get(cs.RESOLUTION)!==s&&(this.set(cs.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!A||!this.get(cs.CENTER)||!uA(this.get(cs.CENTER),A))&&this.set(cs.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()||!uA(this.getCenterInternal(),u))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:u,resolution:l,duration:a,easing:Gs,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(In.INTERACTING,1)},e.prototype.endInteraction=function(t,n,i){var a=i&&Mn(i,this.getProjection());this.endInteractionInternal(t,n,a)},e.prototype.endInteractionInternal=function(t,n,i){this.setHint(In.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}(Oi);function G_(r,e){setTimeout(function(){r(e)},0)}function O3(r){if(r.extent!==void 0){var e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return bP(r.extent,r.constrainOnlyCenter,e)}var t=wF(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){var n=t.getExtent().slice();return n[0]=-1/0,n[2]=1/0,bP(n,!1,!1)}return Wq}function F3(r){var e,t,n,i=28,a=2,o=r.minZoom!==void 0?r.minZoom:Rb,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=wF(r.projection,"EPSG:3857"),f=h.getExtent(),d=r.constrainOnlyCenter,g=r.extent;if(!l&&!g&&h.isGlobal()&&(d=!1,g=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=zq(m,u,!d&&g,c):e=TP(t,n,u,!d&&g,c)}else{var v=f?Math.max(Kr(f),Li(f)):360*yA[ho.DEGREES]/h.getMetersPerUnit(),y=v/yF/Math.pow(a,Rb),w=y/Math.pow(a,i-Rb);t=r.maxResolution,t!==void 0?o=0:t=y/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=y/Math.pow(A,s):n=w),s=o+Math.floor(Math.log(t/n)/Math.log(A)),n=t/Math.pow(A,s-o),r.constrainResolution?e=Yq(A,t,n,u,!d&&g,c):e=TP(t,n,u,!d&&g,c)}return{constraint:e,maxResolution:t,minResolution:n,minZoom:o,zoomFactor:A}}function R3(r){var e=r.enableRotation!==void 0?r.enableRotation:!0;if(e){var t=r.constrainRotation;return t===void 0||t===!0?qq():t===!1?SP:typeof t=="number"?Xq(t):SP}else return BF}function M3(r){return!(r.sourceCenter&&r.targetCenter&&!uA(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function Mb(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 rl=L3;function OP(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]+2*e,t[1]=r[1]+2*e,t}function FP(r){return r[0]>0&&r[1]>0}function m8(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 Wi(r,e){return Array.isArray(r)?r:(e===void 0?e=[r,r]:(e[0]=r,e[1]=r),e)}var N3=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 y8(r){if(r instanceof Ed){r.setMapInternal(null);return}r instanceof B0&&r.getLayers().forEach(y8)}function _8(r,e){if(r instanceof Ed){r.setMapInternal(e);return}if(r instanceof B0)for(var t=r.getLayers().getArray(),n=0,i=t.length;n<i;++n)_8(t[n],e)}var P3=function(r){N3(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=U3(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:td,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=xi(),n.pixelToCoordinateTransform_=xi(),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 Ii,n.interactions=i.interactions||new Ii,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new bq(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(wi.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(wi.VIEW,n.handleViewChanged_),n.addChangeListener(wi.SIZE,n.handleSizeChanged_),n.addChangeListener(wi.TARGET,n.handleTargetChanged_),n.setProperties(i.values);var a=n;return t.view&&!(t.view instanceof rl)&&t.view.then(function(o){a.setView(new rl(o))}),n.controls.addEventListener(si.ADD,function(o){o.element.setMap(this)}.bind(n)),n.controls.addEventListener(si.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.interactions.addEventListener(si.ADD,function(o){o.element.setMap(this)}.bind(n)),n.interactions.addEventListener(si.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(si.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(n)),n.overlays_.addEventListener(si.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){_8(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:ul,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 B0?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||ul;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:ul,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(wi.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 Rg(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var n=this.frameState_;return n?bn(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(wi.LAYERGROUP)},e.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof Ii){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=Mn(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},e.prototype.getPixelFromCoordinateInternal=function(t){var n=this.frameState_;return n?bn(n.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(wi.SIZE)},e.prototype.getView=function(){return this.get(wi.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 Tq(this.frameState_,t,n,i,a)},e.prototype.handleBrowserEvent=function(t,n){var i=n||t.type,a=new iu(i,this,t);this.handleMapBrowserEvent(a)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var n=t.originalEvent,i=n.type;if(i===tl.POINTERDOWN||i===xe.WHEEL||i===xe.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[In.ANIMATING]||o[In.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(No.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(No.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Up(ZA.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Up(ZA.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)Yr(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(xe.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(xe.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,$w(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 _q(this,this.moveTolerance_);for(var a in yr)this.mapBrowserEventHandler_.addEventListener(yr[a],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(xe.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(xe.WHEEL,this.boundHandleBrowserEvent_,Ok?{passive:!1}:!1);var o=this.getOwnerDocument().defaultView,s=this.keyboardEventTarget_?this.keyboardEventTarget_:i;this.targetChangeHandlerKeys_=[je(s,xe.KEYDOWN,this.handleBrowserEvent,this),je(s,xe.KEYPRESS,this.handleBrowserEvent,this),je(o,xe.RESIZE,this.updateSize,this)]}this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(Yr(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Yr(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=je(t,ed.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=je(t,xe.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Yr),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Tc("addlayer",t)),this.layerGroupPropertyListenerKeys_=[je(t,ed.PROPERTYCHANGE,this.render,this),je(t,xe.CHANGE,this.render,this),je(t,"addlayer",this.handleLayerAdd_,this),je(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){y8(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&&FP(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:Df(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:Ee(this),renderTargets:{}},l.nextCenter&&l.nextResolution){var u=isNaN(l.nextRotation)?l.rotation:l.nextRotation;s.nextExtent=Df(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_||!av(this.previousExtent_)&&!vl(s.extent,this.previousExtent_);c&&(this.dispatchEvent(new Up(ZA.MOVESTART,this,o)),this.previousExtent_=wh(this.previousExtent_))}var h=this.previousExtent_&&!s.viewHints[In.ANIMATING]&&!s.viewHints[In.INTERACTING]&&!vl(s.extent,this.previousExtent_);h&&(this.dispatchEvent(new Up(ZA.MOVEEND,this,s)),lF(s.extent,this.previousExtent_))}this.dispatchEvent(new Up(ZA.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(ZA.LOADSTART)||this.hasListener(ZA.LOADEND)||this.hasListener(No.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 Tc("removelayer",n)),this.set(wi.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(wi.SIZE,t)},e.prototype.setTarget=function(t){this.set(wi.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof rl){this.set(wi.VIEW,t);return}this.set(wi.VIEW,new rl);var n=this;t.then(function(i){n.setView(new rl(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],!FP(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}(Oi);function U3(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 B0({layers:r.layers});t[wi.LAYERGROUP]=n,t[wi.TARGET]=r.target,t[wi.VIEW]=r.view instanceof rl?r.view:new rl;var i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new Ii(r.controls.slice()):(Le(typeof r.controls.getArray=="function",47),i=r.controls));var a;r.interactions!==void 0&&(Array.isArray(r.interactions)?a=new Ii(r.interactions.slice()):(Le(typeof r.interactions.getArray=="function",48),a=r.interactions));var o;return r.overlays!==void 0?Array.isArray(r.overlays)?o=new Ii(r.overlays.slice()):(Le(typeof r.overlays.getArray=="function",49),o=r.overlays):o=new Ii,{controls:i,interactions:a,keyboardEventTarget:e,overlays:o,values:t}}var w8=P3,D3=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)}}(),Q3=function(r){D3(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(){$w(this.element),r.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&$w(this.element);for(var n=0,i=this.listenerKeys.length;n<i;++n)Yr(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!==Jf&&this.listenerKeys.push(je(t,ZA.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}(Oi),Nr=Q3,k3=Object.freeze(Object.defineProperty({__proto__:null,default:Nr},Symbol.toStringTag,{value:"Module"})),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)}}(),G3=function(r){H3(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(xe.CLICK,n.handleClick_.bind(n),!1);var h=a+" "+ml+" "+Cd+(n.collapsed_&&n.collapsible_?" "+Gw:"")+(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(Hw(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,d=h.length;f<d;++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),!Fu(n,this.renderedAttributions_)){Jk(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(Gw),this.collapsed_?Lg(this.collapseLabel_,this.label_):Lg(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}(Nr),E8=G3,$3=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){$3(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(xe.CLICK,n.handleClick_.bind(n),!1);var u=a+" "+ml+" "+Cd,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(Q_),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:Gs}):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(Q_);!o&&i===0?this.element.classList.add(Q_):o&&i!==0&&this.element.classList.remove(Q_)}this.label_.style.transform=a}this.rotation_=i}},e}(Nr),C8=V3,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)}}(),K3=function(r){j3(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(xe.CLICK,n.handleClick_.bind(n,o),!1);var d=document.createElement("button");d.className=A,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof u=="string"?document.createTextNode(u):u),d.addEventListener(xe.CLICK,n.handleClick_.bind(n,-o),!1);var g=a+" "+ml+" "+Cd,m=n.element;return m.className=g,m.appendChild(f),m.appendChild(d),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:Gs})):i.setZoom(o)}}},e}(Nr),B8=K3,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)}}(),RP=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],MP={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},z3=function(r){W3(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(xe.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat(ml," ").concat(Cd),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(NP(n))if(PP(n))X3(n);else{var i=void 0;this.source_?i=typeof this.source_=="string"?n.getElementById(this.source_):this.source_:i=t.getTargetElement(),this.keys_?Y3(i):b8(i)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var n=this.isInFullscreen_;this.isInFullscreen_=PP(t.getOwnerDocument()),n!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(Lg(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(MP.ENTERFULLSCREEN)):(Lg(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(MP.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(wi.TARGET,this.boundHandleMapTargetChange_),r.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(wi.TARGET,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,n=0,i=t.length;n<i;++n)Yr(t[n]);t.length=0;var a=this.getMap();if(a){var o=a.getOwnerDocument();NP(o)?this.element.classList.remove(gP):this.element.classList.add(gP);for(var n=0,i=RP.length;n<i;++n)t.push(je(o,RP[n],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(Nr);function NP(r){var e=r.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&r.msFullscreenEnabled||e.requestFullscreen&&r.fullscreenEnabled)}function PP(r){return!!(r.webkitIsFullScreen||r.msFullscreenElement||r.fullscreenElement)}function b8(r){r.requestFullscreen?r.requestFullscreen():r.msRequestFullscreen?r.msRequestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}function Y3(r){r.webkitRequestFullscreen?r.webkitRequestFullscreen():b8(r)}function X3(r){r.exitFullscreen?r.exitFullscreen():r.msExitFullscreen?r.msExitFullscreen():r.webkitExitFullscreen&&r.webkitExitFullscreen()}var q3=z3,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)}}(),Nb="projection",UP="coordinateFormat",J3=function(r){Z3(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(Nb,n.handleProjectionChanged_),i.coordinateFormat&&n.setCoordinateFormat(i.coordinateFormat),i.projection&&n.setProjection(i.projection);var o=!0,s=" ";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(UP)},e.prototype.getProjection=function(){return this.get(Nb)},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(je(n,tl.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(je(n,tl.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},e.prototype.setCoordinateFormat=function(t){this.set(UP,t)},e.prototype.setProjection=function(t){this.set(Nb,Ve(t))},e.prototype.updateHTML_=function(t){var n=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var i=this.getProjection();i?this.transform_=nd(this.mapProjection_,i):this.transform_=LC}var a=this.getMap(),o=a.getCoordinateFromPixelInternal(t);if(o){var s=id();s&&(this.transform_=nd(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}(Nr),tZ=J3,Io={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"},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)}}(),Pa={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},rZ=function(r){eZ(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 "+JX,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(Pa.ELEMENT,n.handleElementChanged),n.addChangeListener(Pa.MAP,n.handleMapChanged),n.addChangeListener(Pa.OFFSET,n.handleOffsetChanged),n.addChangeListener(Pa.POSITION,n.handlePositionChanged),n.addChangeListener(Pa.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:Io.TOP_LEFT),t.position!==void 0&&n.setPosition(t.position),n}return e.prototype.getElement=function(){return this.get(Pa.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(Pa.MAP)||null},e.prototype.getOffset=function(){return this.get(Pa.OFFSET)},e.prototype.getPosition=function(){return this.get(Pa.POSITION)},e.prototype.getPositioning=function(){return this.get(Pa.POSITIONING)},e.prototype.handleElementChanged=function(){Jk(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&($w(this.element),Yr(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=je(t,ZA.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(Pa.ELEMENT,t)},e.prototype.setMap=function(t){this.set(Pa.MAP,t)},e.prototype.setOffset=function(t){this.set(Pa.OFFSET,t)},e.prototype.setPosition=function(t){this.set(Pa.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(Pa.POSITION))){var i=this.getRect(n.getTargetElement(),n.getSize()),a=this.getElement(),o=this.getRect(a,[eq(a),rq(a)]),s=t||{},A=s.margin===void 0?20:s.margin;if(!ps(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 d=n.getView().getCenterInternal(),g=n.getPixelFromCoordinateInternal(d);if(!g)return;var m=[g[0]+f[0],g[1]+f[1]],v=s.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(m),duration:v.duration,easing:v.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(Pa.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==Io.BOTTOM_RIGHT||o==Io.CENTER_RIGHT||o==Io.TOP_RIGHT?l="-100%":(o==Io.BOTTOM_CENTER||o==Io.CENTER_CENTER||o==Io.TOP_CENTER)&&(l="-50%"),o==Io.BOTTOM_LEFT||o==Io.BOTTOM_CENTER||o==Io.BOTTOM_RIGHT?u="-100%":(o==Io.CENTER_LEFT||o==Io.CENTER_CENTER||o==Io.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}(Oi),T8=rZ,S8=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)}}(),Pb=.75,$_=.1,nZ=function(r){S8(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createRenderer=function(){return new r8(this)},e}(w8),iZ=function(r){S8(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(xe.CLICK,n.handleClick_.bind(n),!1),n.ovmapDiv_=document.createElement("div"),n.ovmapDiv_.className="ol-overviewmap-map",n.view_=i.view,n.ovmap_=new nZ({view:i.view});var c=n.ovmap_;i.layers&&i.layers.forEach(function(O){c.addLayer(O)});var h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",n.boxOverlay_=new T8({position:[0,0],positioning:Io.CENTER_CENTER,element:h}),n.ovmap_.addOverlay(n.boxOverlay_);var f=a+" "+ml+" "+Cd+(n.collapsed_&&n.collapsible_?" "+Gw:"")+(n.collapsible_?"":" ol-uncollapsible"),d=n.element;d.className=f,d.appendChild(n.ovmapDiv_),d.appendChild(u);var g=n,m=n.boxOverlay_,v=n.boxOverlay_.getElement(),y=function(O){return{clientX:O.clientX,clientY:O.clientY}},w=function(O){var F=y(O),I=c.getEventCoordinateInternal(F);m.setPosition(I)},C=function(O){var F=c.getEventCoordinateInternal(O);g.getMap().getView().setCenterInternal(F),window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",C)};return v.addEventListener("mousedown",function(){window.addEventListener("mousemove",w),window.addEventListener("mouseup",C)}),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(je(t,ed.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===wi.VIEW){var n=t.oldValue;n&&this.unbindView_(n);var i=this.getMap().getView();this.bindView_(i)}else!this.ovmap_.isRendered()&&(t.key===wi.TARGET||t.key===wi.SIZE)&&this.ovmap_.updateSize()},e.prototype.bindView_=function(t){if(!this.view_){var n=new rl({projection:t.getProjection()});this.ovmap_.setView(n)}t.addChangeListener(cs.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeChangeListener(cs.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_&&vl(o,this.viewExtent_))){this.viewExtent_=o;var s=n.getSize(),A=n.getView(),l=A.calculateExtentInternal(s),u=n.getPixelFromCoordinateInternal(TA(o)),c=n.getPixelFromCoordinateInternal(iv(o)),h=Math.abs(u[0]-c[0]),f=Math.abs(u[1]-c[1]),d=s[0],g=s[1];h<d*$_||f<g*$_||h>d*Pb||f>g*Pb?this.resetExtent_():ps(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(Pb/$_)/Math.LN2,l=1/(Math.pow(2,A/2)*$_);Uk(o,l),s.fitInternal(ch(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,d=i[1]*c/h;if(A.setPosition(u),l){l.style.width=f+"px",l.style.height=d+"px";var g="rotate("+s+"rad)";l.style.transform=g}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Ny(this.ovmap_,ZA.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(Gw),this.collapsed_?Lg(this.collapseLabel_,this.label_):Lg(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}(Nr),aZ=iZ,oZ=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)}}(),Ub="units",af={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},sZ=[1,2,5],Db=25.4/.28,AZ=function(r){oZ(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+" "+ml,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(Ub,n.handleUnitsChanged_),n.setUnits(i.units||af.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(Ub)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Ub,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==af.DEGREES?ho.DEGREES:ho.METERS,s=Yw(i,t.resolution,n,o),A=this.minWidth_*(this.dpi_||Db)/Db,l=A*s,u="";if(a==af.DEGREES){var c=yA[ho.DEGREES];l*=c,l<c/60?(u="″",s*=3600):l<c?(u="′",s*=60):u="°"}else a==af.IMPERIAL?l<.9144?(u="in",s/=.0254):l<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):a==af.NAUTICAL?(s/=1852,u="nm"):a==af.METRIC?l<.001?(u="μm",s*=1e6):l<1?(u="mm",s*=1e3):l<1e3?u="m":(u="km",s/=1e3):a==af.US?l<.9144?(u="in",s*=39.37):l<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):Le(!1,33);for(var h=3*Math.floor(Math.log(A*s)/Math.log(10)),f,d,g;;){g=Math.floor(h/3);var m=Math.pow(10,g);if(f=sZ[(h%3+3)%3]*m,d=Math.round(f/s),isNaN(d)){this.element.style.display="none",this.renderedVisible_=!1;return}else if(d>=A)break;++h}var v;this.scaleBar_?v=this.createScaleBar(d,f,u):v=f.toFixed(g<0?-g:0)+" "+u,this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=d&&(this.innerElement_.style.width=d+"px",this.renderedWidth_=d),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=Yw(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,ho.METERS),n=this.dpi_||Db,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}(Nr),lZ=AZ,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)}}(),Am={VERTICAL:0,HORIZONTAL:1},cZ=function(r){uZ(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_=Am.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 "+ml;var s=n.element;return s.className=a+" "+ml+" "+Cd,s.appendChild(o),s.addEventListener(tl.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),s.addEventListener(tl.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),s.addEventListener(tl.POINTERUP,n.handleDraggerEnd_.bind(n),!1),s.addEventListener(xe.CLICK,n.handleContainerClick_.bind(n),!1),o.addEventListener(xe.CLICK,PX,!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_=Am.HORIZONTAL,this.widthLimit_=n-A):(this.direction_=Am.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:Gs})},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(je(o,tl.POINTERMOVE,i,this),je(o,tl.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(Yr),this.dragListenerKeys_.length=0}},e.prototype.setThumbPosition_=function(t){var n=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==Am.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_===Am.HORIZONTAL?i=t/this.widthLimit_:i=n/this.heightLimit_,Un(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 Un(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}(Nr),hZ=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)}}(),dZ=function(r){fZ(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(xe.CLICK,n.handleClick_.bind(n),!1);var l=a+" "+ml+" "+Cd,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(ch(i))},e}(Nr),pZ=dZ;function gZ(r){var e=r||{},t=new Ii,n=e.zoom!==void 0?e.zoom:!0;n&&t.push(new B8(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new C8(e.rotateOptions));var a=e.attribution!==void 0?e.attribution:!0;return a&&t.push(new E8(e.attributionOptions)),t}var mx={ACTIVE:"active"},vZ=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)}}(),mZ=function(r){vZ(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(mx.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(mx.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(Oi);function yZ(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:TF,center:r.getConstrainedCenter(i)})}}function PF(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:Gs})}}var sv=mZ,_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)}}(),wZ=function(r){_Z(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==yr.DBLCLICK){var i=t.originalEvent,a=t.map,o=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_,A=a.getView();PF(A,s,o,this.duration_),i.preventDefault(),n=!0}return!n},e}(sv),EZ=wZ,CZ=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)}}(),BZ=function(r){CZ(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==yr.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==yr.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==yr.POINTERDOWN){var a=this.handleDownEvent(t);this.handlingDownUpSequence=a,n=this.stopDown(a)}else t.type==yr.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(bZ(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==yr.POINTERUP?delete this.trackedPointers_[i]:t.type==yr.POINTERDOWN?this.trackedPointers_[i]=n:i in this.trackedPointers_&&(this.trackedPointers_[i]=n),this.targetPointers=dF(this.trackedPointers_)}},e}(sv);function UF(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 bZ(r){var e=r.type;return e===yr.POINTERDOWN||e===yr.POINTERDRAG||e===yr.POINTERUP}var Es=BZ;function Zw(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 x8=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},I8=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},L8=function(r){var e=r.map.getTargetElement(),t=r.map.getOwnerDocument().activeElement;return e.contains(t)},DF=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?L8(r):!0},PC=ul,TZ=function(r){return r.type==yr.CLICK},QF=function(r){var e=r.originalEvent;return e.button==0&&!(cX&&Lk&&e.ctrlKey)},yx=yd,SZ=function(r){return r.type=="pointermove"},UC=function(r){return r.type==yr.SINGLECLICK},xZ=function(r){return r.type==yr.DBLCLICK},DC=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},IZ=function(r){var e=r.originalEvent;return!e.altKey&&(Lk?e.metaKey:e.ctrlKey)&&!e.shiftKey},S0=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},kF=function(r){var e=r.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"},kf=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.pointerType=="mouse"},LZ=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.pointerType==="touch"},OZ=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.pointerType==="pen"},HF=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.isPrimary&&e.button===0},FZ=Object.freeze(Object.defineProperty({__proto__:null,all:Zw,altKeyOnly:x8,altShiftKeysOnly:I8,focus:L8,focusWithTabindex:DF,always:PC,click:TZ,mouseActionButton:QF,never:yx,pointerMove:SZ,singleClick:UC,doubleClick:xZ,noModifierKeys:DC,platformModifierKeyOnly:IZ,shiftKeyOnly:S0,targetNotEditable:kF,mouseOnly:kf,touchOnly:LZ,penOnly:OZ,primaryAction:HF},Symbol.toStringTag,{value:"Module"})),RZ=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)}}(),MZ=function(r){RZ(e,r);function e(t){var n=r.call(this,{stopDown:yd})||this,i=t||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var a=i.condition?i.condition:Zw(DC,HF);return n.condition_=i.onFocusOnly?Zw(DF,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=UF(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();Yk(a,s.getResolution()),vF(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:Gs})}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}(Es),NZ=MZ,PZ=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)}}(),UZ=function(r){PZ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,{stopDown:yd})||this,n.condition_=i.condition?i.condition:I8,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){if(kf(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==BF){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(!kf(t))return!0;var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!kf(t))return!1;if(QF(t)&&this.condition_(t)){var n=t.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(Es),DZ=UZ,QZ=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)}}(),kZ=function(r){QZ(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 Dn([a])},e.prototype.getGeometry=function(){return this.geometry_},e}(BC),HZ=kZ,O8=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)}}(),V_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},Qb=function(r){O8(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),GZ=function(r){O8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.box_=new HZ(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:QF,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 Qb(V_.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 Qb(n?V_.BOXEND:V_.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 Qb(V_.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(Es),$Z=GZ,VZ=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){VZ(e,r);function e(t){var n=this,i=t||{},a=i.condition?i.condition:S0;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:Gs})},e}($Z),KZ=jZ,of={LEFT:37,UP:38,RIGHT:39,DOWN:40},WZ=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)}}(),zZ=function(r){WZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.defaultCondition_=function(a){return DC(a)&&kF(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==xe.KEYDOWN){var i=t.originalEvent,a=i.keyCode;if(this.condition_(t)&&(a==of.DOWN||a==of.LEFT||a==of.RIGHT||a==of.UP)){var o=t.map,s=o.getView(),A=s.getResolution()*this.pixelDelta_,l=0,u=0;a==of.DOWN?u=-A:a==of.LEFT?l=-A:a==of.RIGHT?l=A:u=A;var c=[l,u];vF(c,s.getRotation()),yZ(s,c,this.duration_),i.preventDefault(),n=!0}}return!n},e}(sv),YZ=zZ,XZ=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)}}(),qZ=function(r){XZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.condition_=i.condition?i.condition:kF,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==xe.KEYDOWN||t.type==xe.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();PF(A,s,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},e}(sv),ZZ=qZ,JZ=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}(),tJ=JZ,eJ=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)}}(),kb={TRACKPAD:"trackpad",WHEEL:"wheel"},rJ=function(r){eJ(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:PC;return n.condition_=i.onFocusOnly?Zw(DF,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!==xe.WHEEL)return!0;var i=t.map,a=t.originalEvent;a.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);var o;if(t.type==xe.WHEEL&&(o=a.deltaY,AX&&a.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=td),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?kb.TRACKPAD:kb.WHEEL);var A=i.getView();if(this.mode_===kb.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=-Un(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),PF(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}(sv),nJ=rJ,iJ=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)}}(),aJ=function(r){iJ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=yd),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!==BF){var u=A.getViewport().getBoundingClientRect(),c=UF(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}(Es),oJ=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)}}(),AJ=function(r){sJ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=yd),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=UF(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}(Es),lJ=AJ,dA={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"},uJ=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)}}(),cJ=function(r){uJ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.condition_=i.condition?i.condition:S0,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(kf(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(!kf(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 kf(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0):!1},e}(Es),hJ=cJ,fJ=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)}}(),F8=function(r){fJ(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 pt.CIRCLE},e.prototype.intersectsExtent=function(t){var n=this.getExtent();if(qn(t,n)){var i=this.getCenter();return t[0]<=i[0]&&t[2]>=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:IC(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=l8(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(SF(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(A8(i,0,i.length,a,t,n,i)),this.changed()},e}(_A);F8.prototype.transform;var GF=F8,dJ=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)}}(),pJ=function(r){dJ(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_&&(Yr(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=je(t,xe.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?gJ(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}(Oi);function gJ(r){if(typeof r=="function")return r;var e;if(Array.isArray(r))e=r;else{Le(typeof r.getZIndex=="function",41);var t=r;e=[t]}return function(){return e}}var _r=pJ;function Jw(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],d=e+n;d<t;d+=n){var g=r[d],m=r[d+1];h+=Math.sqrt((g-u)*(g-u)+(m-c)*(m-c)),f.push(h),u=g,c=m}var v=i*h,y=nX(f,v);y<0?(A=(v-f[-y-2])/(f[-y-1]-f[-y-2]),s=e+(-y-2)*n):s=e+y*n}for(var w=o>1?o:2,C=a||new Array(w),d=0;d<w;++d)C[d]=s===void 0?NaN:A===void 0?r[s+d]:ou(r[s+d],r[s+n+d],A);return C}function _x(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(ou(r[(s-1)*n+f],r[s*n+f],h));return o.push(i),o}function vJ(r,e,t,n,i,a,o){if(o)return _x(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 _x(r,e,u,n,i,!1);e=u}}return null}function R8(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 mJ=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)}}(),yJ=function(r){mJ(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?tn(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<_h(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),LF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.forEachSegment=function(t){return d8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,n){if(this.layout!=ae.XYM&&this.layout!=ae.XYZM)return null;var i=n!==void 0?n:!1;return _x(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return lu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,n){return Jw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},e.prototype.getLength=function(){return R8(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=RF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,ae.XY)},e.prototype.getType=function(){return pt.LINE_STRING},e.prototype.intersectsExtent=function(t){return RC(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=T0(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_A),en=yJ,_J=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)}}(),wJ=function(r){_J(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()),tn(A,h.getFlatCoordinates()),l.push(A.length)}a.setFlatCoordinates(o,A),a.ends_=l}return a}return e.prototype.appendLineString=function(t){this.flatCoordinates?tn(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<_h(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(IF(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),OF(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.getCoordinateAtM=function(t,n,i){if(this.layout!=ae.XYM&&this.layout!=ae.XYZM||this.flatCoordinates.length===0)return null;var a=n!==void 0?n:!1,o=i!==void 0?i:!1;return vJ(this.flatCoordinates,0,this.ends_,this.stride,t,a,o)},e.prototype.getCoordinates=function(){return $y(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 en(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 en(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=Jw(n,i,l,o,.5);tn(t,u),i=l}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=u3(this.flatCoordinates,0,this.ends_,this.stride,t,n,0,i),new e(n,ae.XY,i)},e.prototype.getType=function(){return pt.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return _3(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=FF(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(_A),Xa=wJ,EJ=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)}}(),CJ=function(r){EJ(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?tn(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<_h(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=Qf(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 lu(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 xr(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 xr(t.slice(o,o+i),n);a.push(A)}return a},e.prototype.getType=function(){return pt.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(SC(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=T0(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_A),$s=CJ;function M8(r,e,t,n){for(var i=[],a=Di(),o=0,s=t.length;o<s;++o){var A=t[o];a=xC(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 BJ=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)}}(),bJ=function(r){BJ(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,d=h.getEnds(),g=0,m=d.length;g<m;++g)d[g]+=f;tn(A,h.getFlatCoordinates()),l.push(d)}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;tn(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<_h(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(s3(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),A3(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return y3(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,n)},e.prototype.getArea=function(){return f3(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),LP(n,0,this.endss_,this.stride,t)):n=this.flatCoordinates,gx(n,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=M8(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=f8(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new $s(this.getFlatInteriorPoints().slice(),ae.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;B3(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=LP(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=h3(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),n,0,i),new e(n,ae.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 Dn(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 Dn(n.slice(o,u),t,l);a.push(f),o=u}return a},e.prototype.getType=function(){return pt.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return E3(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=l3(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}(_A),qa=bJ;function TJ(r,e,t,n,i){N8(r,e,t||0,n||r.length-1,i||SJ)}function N8(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));N8(r,e,u,c,i)}var h=r[e],f=t,d=n;for(lm(r,t,e),i(r[n],h)>0&&lm(r,t,n);f<d;){for(lm(r,f,d),f++,d--;i(r[f],h)<0;)f++;for(;i(r[d],h)>0;)d--}i(r[t],h)===0?lm(r,t,d):(d++,lm(r,d,n)),d<=e&&(t=d+1),e<=d&&(n=d-1)}}function lm(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function SJ(r,e){return r<e?-1:r>e?1:0}class P8{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(!K_(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;K_(e,A)&&(t.leaf?n.push(s):Gb(e,A)?this._all(s,n):a.push(s))}t=a.pop()}return n}collides(e){let t=this.data;if(!K_(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(K_(e,o)){if(t.leaf||Gb(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=Dp([]),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=xJ(e,n.children,t);if(u!==-1)return n.children.splice(u,1),a.push(n),this._condense(a),this}!l&&!n.leaf&&Gb(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=Dp(e.slice(t,n+1)),dp(s,this.toBBox),s;i||(i=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,i-1))),s=Dp([]),s.leaf=!1,s.height=i;const A=Math.ceil(a/o),l=A*Math.ceil(Math.sqrt(o));DP(e,t,n,l,this.compareMinX);for(let u=t;u<=n;u+=l){const c=Math.min(u+l-1,n);DP(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 dp(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=Hb(l),c=OJ(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),Mm(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=Dp(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,dp(n,this.toBBox),dp(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=Dp([e,t]),this.data.height=e.height+1,this.data.leaf=!1,dp(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=Rm(e,0,s,this.toBBox),l=Rm(e,s,n,this.toBBox),u=FJ(A,l),c=Hb(A)+Hb(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:IJ,a=e.leaf?this.compareMinY:LJ,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=Rm(e,0,t,a),s=Rm(e,n-t,n,a);let A=j_(o)+j_(s);for(let l=t;l<n-t;l++){const u=e.children[l];Mm(o,e.leaf?a(u):u),A+=j_(o)}for(let l=n-t-1;l>=t;l--){const u=e.children[l];Mm(s,e.leaf?a(u):u),A+=j_(s)}return A}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)Mm(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():dp(e[t],this.toBBox)}}function xJ(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 dp(r,e){Rm(r,0,r.children.length,e,r)}function Rm(r,e,t,n,i){i||(i=Dp(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];Mm(i,r.leaf?n(o):o)}return i}function Mm(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 IJ(r,e){return r.minX-e.minX}function LJ(r,e){return r.minY-e.minY}function Hb(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function j_(r){return r.maxX-r.minX+(r.maxY-r.minY)}function OJ(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 FJ(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 Gb(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function K_(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function Dp(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function DP(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;TJ(r,o,e,t,i),a.push(e,o,o,t)}}var rr={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},RJ=function(){function r(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Wi(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 Re()},r.prototype.getImage=function(e){return Re()},r.prototype.getHitDetectionImage=function(){return Re()},r.prototype.getPixelRatio=function(e){return 1},r.prototype.getImageState=function(){return Re()},r.prototype.getImageSize=function(){return Re()},r.prototype.getOrigin=function(){return Re()},r.prototype.getSize=function(){return Re()},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_=Wi(e)},r.prototype.listenImageChange=function(e){Re()},r.prototype.load=function(){Re()},r.prototype.unlistenImageChange=function(e){Re()},r}(),U8=RJ;function il(r){return Array.isArray(r)?jk(r):r}var MJ=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=function(r){MJ(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=wo(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 rr.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),d=f/u;if(t==="miter"&&d<=i)return d*n;var g=n/2/d,m=n/2*(h/f),v=Math.sqrt((a+g)*(a+g)+m*m),y=v-a;if(this.radius2_===void 0||t==="bevel")return y*2;var w=a*Math.sin(l),C=Math.sqrt(a*a-w*w),O=o-C,F=Math.sqrt(w*w+O*O),I=F/w;if(I<=i){var T=I*n/2-o-a;return 2*Math.max(y,T)}return y*2},e.prototype.createRenderOptions=function(){var t=Og,n=0,i=null,a=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=Qy),o=il(o),s=this.stroke_.getWidth(),s===void 0&&(s=Hy),i=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Og),n=this.stroke_.getMiterLimit(),n===void 0&&(n=Dy));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=gu),n.fillStyle=il(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=lh(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0){var a=wo(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=gu,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}(U8),J1=NJ,PJ=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)}}(),UJ=function(r){PJ(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}(J1),x0=UJ,DJ=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}(),Ba=DJ,QJ=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}(),zi=QJ,Xp=function(){function r(e){var t=e||{};this.geometry_=null,this.geometryFunction_=QP,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_=QP,this.geometry_=e},r.prototype.setZIndex=function(e){this.zIndex_=e},r}();function kJ(r){var e;if(typeof r=="function")e=r;else{var t;if(Array.isArray(r))t=r;else{Le(typeof r.getZIndex=="function",41);var n=r;t=[n]}e=function(){return t}}return e}var $b=null;function HJ(r,e){if(!$b){var t=new Ba({color:"rgba(255,255,255,0.4)"}),n=new zi({color:"#3399CC",width:1.25});$b=[new Xp({image:new x0({fill:t,stroke:n,radius:5}),fill:t,stroke:n})]}return $b}function $F(){var r={},e=[255,255,255,1],t=[0,153,255,1],n=3;return r[pt.POLYGON]=[new Xp({fill:new Ba({color:[255,255,255,.5]})})],r[pt.MULTI_POLYGON]=r[pt.POLYGON],r[pt.LINE_STRING]=[new Xp({stroke:new zi({color:e,width:n+2})}),new Xp({stroke:new zi({color:t,width:n})})],r[pt.MULTI_LINE_STRING]=r[pt.LINE_STRING],r[pt.CIRCLE]=r[pt.POLYGON].concat(r[pt.LINE_STRING]),r[pt.POINT]=[new Xp({image:new x0({radius:n*2,fill:new Ba({color:t}),stroke:new zi({color:e,width:n/2})}),zIndex:1/0})],r[pt.MULTI_POINT]=r[pt.POINT],r[pt.GEOMETRY_COLLECTION]=r[pt.POLYGON].concat(r[pt.LINE_STRING],r[pt.POINT]),r}function QP(r){return r.getGeometry()}var Ea=Xp,GJ=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)}}(),kP={RENDER_ORDER:"renderOrder"},$J=function(r){GJ(e,r);function e(t){var n=this,i=t||{},a=Ce({},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(kP.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 P8(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(kP.RENDER_ORDER,t)},e.prototype.setStyle=function(t){this.style_=t!==void 0?t:HJ,this.styleFunction_=t===null?void 0:kJ(this.style_),this.changed()},e}(Ed),QC=$J,I0={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},W_=[I0.FILL],Nc=[I0.STROKE],Sf=[I0.BEGIN_PATH],HP=[I0.CLOSE_PATH],Ye=I0,VJ=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}(),D8=VJ,jJ=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)}}(),KJ=function(r){jJ(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],mA(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_,d=!0,g,m,v;for(g=n+a;g<i;g+=a)f[0]=t[g],f[1]=t[g+1],v=Qw(u,f),v!==m?(d&&(A[l++]=c,A[l++]=h,d=!1),A[l++]=f[0],A[l++]=f[1]):v===aa.INTERSECTING?(A[l++]=f[0],A[l++]=f[1],d=!1):d=!0,c=f[0],h=f[1],m=v;return(o&&d||g===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 pt.MULTI_POLYGON:l=t.getOrientedFlatCoordinates(),h=[];var d=t.getEndss();f=0;for(var g=0,m=d.length;g<m;++g){var v=[];f=this.drawCustomCoordinates_(l,f,d[g],s,v),h.push(v)}this.instructions.push([Ye.CUSTOM,A,h,t,i,gx]),this.hitDetectionInstructions.push([Ye.CUSTOM,A,h,t,a||i,gx]);break;case pt.POLYGON:case pt.MULTI_LINE_STRING:c=[],l=o==pt.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),f=this.drawCustomCoordinates_(l,0,t.getEnds(),s,c),this.instructions.push([Ye.CUSTOM,A,c,t,i,$y]),this.hitDetectionInstructions.push([Ye.CUSTOM,A,c,t,a||i,$y]);break;case pt.LINE_STRING:case pt.CIRCLE:l=t.getFlatCoordinates(),u=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Ye.CUSTOM,A,u,t,i,lu]),this.hitDetectionInstructions.push([Ye.CUSTOM,A,u,t,a||i,lu]);break;case pt.MULTI_POINT:l=t.getFlatCoordinates(),u=this.appendFlatPointCoordinates(l,s),u>A&&(this.instructions.push([Ye.CUSTOM,A,u,t,i,lu]),this.hitDetectionInstructions.push([Ye.CUSTOM,A,u,t,a||i,lu]));break;case pt.POINT:l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([Ye.CUSTOM,A,u,t,i]),this.hitDetectionInstructions.push([Ye.CUSTOM,A,u,t,a||i]);break}this.endGeometry(n)},e.prototype.beginGeometry=function(t,n){this.beginGeometryInstruction1_=[Ye.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ye.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==Ye.END_GEOMETRY?s=n:o==Ye.BEGIN_GEOMETRY&&(a[2]=n,iX(this.hitDetectionInstructions,s,n),s=-1)},e.prototype.setFillStrokeStyle=function(t,n){var i=this.state;if(t){var a=t.getColor();i.fillStyle=il(a||gu)}else i.fillStyle=void 0;if(n){var o=n.getColor();i.strokeStyle=il(o||Qy);var s=n.getLineCap();i.lineCap=s!==void 0?s:Vw;var A=n.getLineDash();i.lineDash=A?A.slice():Py;var l=n.getLineDashOffset();i.lineDashOffset=l||Uy;var u=n.getLineJoin();i.lineJoin=u!==void 0?u:Og;var c=n.getWidth();i.lineWidth=c!==void 0?c:Hy;var h=n.getMiterLimit();i.miterLimit=h!==void 0?h:Dy,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=[Ye.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[Ye.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&&!Fu(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=[Ye.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=lF(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;_o(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(D8),L0=KJ,WJ=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)}}(),zJ=function(r){WJ(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([Ye.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([Ye.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([Ye.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([Ye.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}(L0),YJ=zJ,XJ=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)}}(),qJ=function(r){XJ(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=[Ye.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([Ye.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Py,Uy],Sf);var s=t.getFlatCoordinates(),A=t.getStride();this.drawFlatCoordinates_(s,0,s.length,A),this.hitDetectionInstructions.push(Nc),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([Ye.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Sf);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(Nc),this.endGeometry(n)}},e.prototype.finish=function(){var t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Nc),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(Nc),t.lastStroke=this.coordinates.length),t.lastStroke=0,r.prototype.applyStroke.call(this,t),this.instructions.push(Sf)},e}(L0),ZJ=qJ,JJ=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)}}(),ttt=function(r){JJ(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(Sf),this.hitDetectionInstructions.push(Sf);for(var u=0;u<l;++u){var c=i[u],h=this.coordinates.length,f=this.appendFlatLineCoordinates(t,n,c,a,!0,!A),d=[Ye.MOVE_TO_LINE_TO,h,f];this.instructions.push(d),this.hitDetectionInstructions.push(d),A&&(this.instructions.push(HP),this.hitDetectionInstructions.push(HP)),n=c}return s&&(this.instructions.push(W_),this.hitDetectionInstructions.push(W_)),A&&(this.instructions.push(Nc),this.hitDetectionInstructions.push(Nc)),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([Ye.SET_FILL_STYLE,gu]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Ye.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=[Ye.CIRCLE,l];this.instructions.push(Sf,u),this.hitDetectionInstructions.push(Sf,u),i.fillStyle!==void 0&&(this.instructions.push(W_),this.hitDetectionInstructions.push(W_)),i.strokeStyle!==void 0&&(this.instructions.push(Nc),this.hitDetectionInstructions.push(Nc)),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([Ye.SET_FILL_STYLE,gu]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Ye.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([Ye.SET_FILL_STYLE,gu]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Ye.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]=pf(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}(L0),GP=ttt,Q8={POINT:"point",LINE:"line"};function ett(r,e,t,n,i){var a=t,o=t,s=0,A=0,l=t,u,c,h,f,d,g,m,v,y,w;for(c=t;c<n;c+=i){var C=e[c],O=e[c+1];d!==void 0&&(y=C-d,w=O-g,f=Math.sqrt(y*y+w*w),m!==void 0&&(A+=h,u=Math.acos((m*y+v*w)/(h*f)),u>r&&(A>s&&(s=A,a=l,o=c),A=0,l=c-i)),h=f,m=y,v=w),d=C,g=O}return A+=f,A>s?[l,c]:[a,o]}var rtt=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)}}(),tE={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},ntt=function(r){rtt(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===Q8.LINE&&(l==pt.LINE_STRING||l==pt.MULTI_LINE_STRING||l==pt.POLYGON||l==pt.MULTI_POLYGON)){if(!qn(this.getBufferedMaxExtent(),t.getExtent()))return;var h=void 0;if(u=t.getFlatCoordinates(),l==pt.LINE_STRING)h=[u.length];else if(l==pt.MULTI_LINE_STRING)h=t.getEnds();else if(l==pt.POLYGON)h=t.getEnds().slice(0,1);else if(l==pt.MULTI_POLYGON){var f=t.getEndss();h=[];for(var d=0,g=f.length;d<g;++d)h.push(f[d][0])}this.beginGeometry(t,n);for(var m=o.textAlign,v=0,y=void 0,w=0,C=h.length;w<C;++w){if(m==null){var O=ett(o.maxAngle,u,v,h[w],c);v=O[0],y=O[1]}else y=h[w];for(var d=v;d<y;d+=c)s.push(u[d],u[d+1]);var F=s.length;v=h[w],this.drawChars_(A,F),A=F}this.endGeometry(n)}else{var I=o.overflow?null:[];switch(l){case pt.POINT:case pt.MULTI_POINT:u=t.getFlatCoordinates();break;case pt.LINE_STRING:u=t.getFlatMidpoint();break;case pt.CIRCLE:u=t.getCenter();break;case pt.MULTI_LINE_STRING:u=t.getFlatMidpoints(),c=2;break;case pt.POLYGON:u=t.getFlatInteriorPoint(),o.overflow||I.push(u[2]/this.resolution),c=3;break;case pt.MULTI_POLYGON:var T=t.getFlatInteriorPoints();u=[];for(var d=0,g=T.length;d<g;d+=3)o.overflow||I.push(T[d+2]/this.resolution),u.push(T[d],T[d+1]);if(u.length===0)return;c=2;break}var F=this.appendFlatPointCoordinates(u,c);if(F===A)return;if(I&&(F-A)/2!==u.length/c){var L=A/2;I=I.filter(function(nt,At){var ct=s[(L+At)*2]===u[At*c]&&s[(L+At)*2+1]===u[At*c+1];return ct||--L,ct})}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 N=o.padding;if(N!=bf&&(o.scale[0]<0||o.scale[1]<0)){var x=o.padding[0],S=o.padding[1],P=o.padding[2],U=o.padding[3];o.scale[0]<0&&(S=-S,U=-U),o.scale[1]<0&&(x=-x,P=-P),N=[x,S,P,U]}var tt=this.pixelRatio;this.instructions.push([Ye.DRAW_IMAGE,A,F,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,N==bf?bf:N.map(function(nt){return nt*tt}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,I]);var q=1/tt;this.hitDetectionInstructions.push([Ye.DRAW_IMAGE,A,F,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[q,q],NaN,this.declutterImageWithText_,N,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,I]),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||ky,textBaseline:n.textBaseline||jw,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=tE[a.textBaseline],c=this.textOffsetY_*l,h=this.text_,f=i?i.lineWidth*Math.abs(a.scale[0])/2:0;this.instructions.push([Ye.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,l,c,o,f*l,h,s,1]),this.hitDetectionInstructions.push([Ye.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=il(s.getColor()||gu)):(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()||Vw,o.lineDash=l?l.slice():Py,o.lineDashOffset=u===void 0?Uy:u,o.lineJoin=A.getLineJoin()||Og,o.lineWidth=c===void 0?Hy:c,o.miterLimit=h===void 0?Dy:h,o.strokeStyle=il(A.getColor()||Qy)}i=this.textState_;var f=t.getFont()||t8;aq(f);var d=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()||jw,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||bf,i.scale=d===void 0?[1,1]:d;var g=t.getOffsetX(),m=t.getOffsetY(),v=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=g===void 0?0:g,this.textOffsetY_=m===void 0?0:m,this.textRotateWithView_=v===void 0?!1:v,this.textRotation_=y===void 0?0:y,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:Ee(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:"|"+Ee(a.fillStyle):""}this.declutterImageWithText_=n},e}(L0),itt=ntt,att={Circle:GP,Default:L0,Image:YJ,LineString:ZJ,Polygon:GP,Text:itt},ott=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=att[t];a=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=a}return a},r}(),eE=ott,stt=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)}}(),Att=function(r){stt(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 Re()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return Re()},e.prototype.renderFrame=function(t,n){return Re()},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()===rr.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var n=t.getState();return n!=rr.LOADED&&n!=rr.ERROR&&t.addEventListener(xe.CHANGE,this.boundHandleImageChange_),n==rr.IDLE&&(t.load(),n=t.getState()),n==rr.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==co.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,r.prototype.disposeInternal.call(this)},e}(C0),k8=Att,ltt=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=null;function utt(){var r=document.createElement("canvas");r.width=1,r.height=1,Nm=r.getContext("2d")}var ctt=function(r){ltt(e,r);function e(t){var n=r.call(this,t)||this;return n.container=null,n.renderedResolution,n.tempTransform=xi(),n.pixelTransform=xi(),n.inversePixelTransform=xi(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return e.prototype.getImageData=function(t,n,i){Nm||utt(),Nm.clearRect(0,0,1,1);var a;try{Nm.drawImage(t,n,i,1,1,0,0,1,1),a=Nm.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&&Fu(lh(t.style.backgroundColor),lh(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=wo();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=TA(i),o=E0(i),s=iv(i),A=w0(i);bn(n.coordinateToPixelTransform,a),bn(n.coordinateToPixelTransform,o),bn(n.coordinateToPixelTransform,s),bn(n.coordinateToPixelTransform,A);var l=this.inversePixelTransform;bn(l,a),bn(l,o),bn(l,s),bn(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 oy(t,this.inversePixelTransform,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.frameState=n,this.dispatchRenderEvent_(No.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(No.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,d=-t[1];return yo(this.tempTransform,l,u,c,h,-i,f,d)},e.prototype.getDataAtPixel=function(t,n,i){var a=bn(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer(),A=s.getExtent();if(A){var l=bn(n.pixelToCoordinateTransform,t.slice());if(!mA(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 d;try{h.drawImage(o.canvas,u,c,1,1,0,0,1,1),d=h.getImageData(0,0,1,1).data}catch(g){return g.name==="SecurityError"?(this.pixelContext_=null,new Uint8Array):d}return d[3]===0?null:d},e.prototype.disposeInternal=function(){delete this.frameState,r.prototype.disposeInternal.call(this)},e}(k8),VF=ctt,Er={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function htt(r,e,t,n,i,a,o,s,A,l,u,c){var h=r[e],f=r[e+1],d=0,g=0,m=0,v=0;function y(){d=h,g=f,e+=n,h=r[e],f=r[e+1],v+=m,m=Math.sqrt((h-d)*(h-d)+(f-g)*(f-g))}do y();while(e<t-n&&v+m<a);for(var w=m===0?0:(a-v)/m,C=ou(d,h,w),O=ou(g,f,w),F=e-n,I=v,T=a+s*A(l,i,u);e<t-n&&v+m<T;)y();w=m===0?0:(T-v)/m;var L=ou(d,h,w),N=ou(g,f,w),x;if(c){var S=[C,O,L,N];SF(S,0,4,2,c,S,S),x=S[0]>S[2]}else x=C>L;var P=Math.PI,U=[],tt=F+n===e;e=F,m=0,v=I,h=r[e],f=r[e+1];var q;if(tt){y(),q=Math.atan2(f-g,h-d),x&&(q+=q>0?-P:P);var rt=(L+C)/2,nt=(N+O)/2;return U[0]=[rt,nt,(T-a)/2,q,i],U}for(var At=0,ct=i.length;At<ct;){y();var Tt=Math.atan2(f-g,h-d);if(x&&(Tt+=Tt>0?-P:P),q!==void 0){var M=Tt-q;if(M+=M>P?-2*P:M<-P?2*P:0,Math.abs(M)>o)return null}q=Tt;for(var W=At,Y=0;At<ct;++At){var H=x?ct-At-1:At,J=s*A(l,i[H],u);if(e+n<t&&v+m<a+Y+J/2)break;Y+=J}if(At!==W){var ot=x?i.substring(ct-W,ct-At):i.substring(W,At);w=m===0?0:(a+Y/2-v)/m;var rt=ou(d,h,w),nt=ou(g,f,w);U.push([rt,nt,Y/2,Tt,ot]),a+=Y}}return U}var pp=Di(),cc=[],Vl=[],jl=[],hc=[];function $P(r){return r[3].declutterBox}var ftt=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 VP(r,e){return(e==="start"||e==="end")&&!ftt.test(r)&&(e=e==="start"?"left":"right"),tE[e]}function dtt(r,e,t){return t>0&&r.push(`
|
||
`,""),r.push(e,""),r}var ptt=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_=xi(),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=VP(c?e[0]:e,A.textAlign||ky),f=i&&o.lineWidth?o.lineWidth:0,d=c?e:e.split(`
|
||
`).reduce(dtt,[]),g=sq(A,d),m=g.width,v=g.height,y=g.widths,w=g.heights,C=g.lineWidths,O=m+f,F=[],I=(O+2)*u[0],T=(v+f)*u[1],L={width:I<0?Math.floor(I):Math.ceil(I),height:T<0?Math.floor(T):Math.ceil(T),contextInstructions:F};if((u[0]!=1||u[1]!=1)&&F.push("scale",u),i){F.push("strokeStyle",o.strokeStyle),F.push("lineWidth",f),F.push("lineCap",o.lineCap),F.push("lineJoin",o.lineJoin),F.push("miterLimit",o.miterLimit);var N=TC?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;N.prototype.setLineDash&&(F.push("setLineDash",[o.lineDash]),F.push("lineDashOffset",o.lineDashOffset))}n&&F.push("fillStyle",s.fillStyle),F.push("textBaseline","middle"),F.push("textAlign","center");for(var x=.5-h,S=h*O+x*f,P=[],U=[],tt=0,q=0,rt=0,nt=0,At,ct=0,Tt=d.length;ct<Tt;ct+=2){var M=d[ct];if(M===`
|
||
`){q+=tt,tt=0,S=h*O+x*f,++nt;continue}var W=d[ct+1]||A.font;W!==At&&(i&&P.push("font",W),n&&U.push("font",W),At=W),tt=Math.max(tt,w[rt]);var Y=[M,S+x*y[rt]+h*(y[rt]-C[nt]),.5*(f+tt)+q];S+=y[rt],i&&P.push("strokeText",Y),n&&U.push("fillText",Y),++rt}return Array.prototype.push.apply(F,P),Array.prototype.push.apply(F,U),this.labels_[a]=L,L},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,d,g,m){s*=h[0],A*=h[1];var v=n-s,y=i-A,w=a+l>e?e-l:a,C=o+u>t?t-u:o,O=d[3]+w*h[0]+d[1],F=d[0]+C*h[1]+d[2],I=v-d[3],T=y-d[0];(g||c!==0)&&(cc[0]=I,hc[0]=I,cc[1]=T,Vl[1]=T,Vl[0]=I+O,jl[0]=Vl[0],jl[1]=T+F,hc[1]=jl[1]);var L;return c!==0?(L=yo(xi(),n,i,1,1,c,-n,-i),bn(L,cc),bn(L,Vl),bn(L,jl),bn(L,hc),Ho(Math.min(cc[0],Vl[0],jl[0],hc[0]),Math.min(cc[1],Vl[1],jl[1],hc[1]),Math.max(cc[0],Vl[0],jl[0],hc[0]),Math.max(cc[1],Vl[1],jl[1],hc[1]),pp)):Ho(Math.min(I,I+O),Math.min(T,T+F),Math.max(I,I+O),Math.max(T,T+F),pp),f&&(v=Math.round(v),y=Math.round(y)),{drawImageX:v,drawImageY:y,drawImageW:w,drawImageH:C,originX:l,originY:u,declutterBox:{minX:pp[0],minY:pp[1],maxX:pp[2],maxY:pp[3],value:m},canvasTransform:L,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,cc,Vl,jl,hc,o,s),Aq(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=bn(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=VP(Array.isArray(e)?e[0]:e,a.textAlign||ky),u=tE[a.textBaseline||jw],c=s&&s.lineWidth?s.lineWidth:0,h=o.width/A-2*a.scale[0],f=l*h+2*(.5-l)*c,d=u*o.height/A+2*(.5-u)*c;return{label:o,anchorX:f,anchorY:d}},r.prototype.execute_=function(e,t,n,i,a,o,s,A){var l;this.pixelCoordinates_&&Fu(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=zc(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),pX(this.renderedTransform_,n));for(var u=0,c=i.length,h=0,f,d,g,m,v,y,w,C,O,F,I,T,L=0,N=0,x=null,S=null,P=this.coordinateCache_,U=this.viewRotation_,tt=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,q={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:U},rt=this.instructions!=i||this.overlaps?0:200,nt,At,ct,Tt;u<c;){var M=i[u],W=M[0];switch(W){case Ye.BEGIN_GEOMETRY:nt=M[1],Tt=M[3],nt.getGeometry()?s!==void 0&&!qn(s,Tt.getExtent())?u=M[2]+1:++u:u=M[2];break;case Ye.BEGIN_PATH:L>rt&&(this.fill_(e),L=0),N>rt&&(e.stroke(),N=0),!L&&!N&&(e.beginPath(),m=NaN,v=NaN),++u;break;case Ye.CIRCLE:h=M[1];var Y=l[h],H=l[h+1],J=l[h+2],ot=l[h+3],ut=J-Y,X=ot-H,It=Math.sqrt(ut*ut+X*X);e.moveTo(Y+It,H),e.arc(Y,H,It,0,2*Math.PI,!0),++u;break;case Ye.CLOSE_PATH:e.closePath(),++u;break;case Ye.CUSTOM:h=M[1],f=M[2];var at=M[3],j=M[4],Z=M.length==6?M[5]:void 0;q.geometry=at,q.feature=nt,u in P||(P[u]=[]);var ft=P[u];Z?Z(l,h,f,2,ft):(ft[0]=l[h],ft[1]=l[h+1],ft.length=2),j(ft,q),++u;break;case Ye.DRAW_IMAGE:h=M[1],f=M[2],C=M[3],d=M[4],g=M[5];var it=M[6],V=M[7],Ft=M[8],Mt=M[9],Et=M[10],Bt=M[11],Ct=M[12],Rt=M[13],Nt=M[14];if(!C&&M.length>=19){O=M[18],F=M[19],I=M[20],T=M[21];var Dt=this.drawLabelWithPointPlacement_(O,F,I,T);C=Dt.label,M[3]=C;var Wt=M[22];d=(Dt.anchorX-Wt)*this.pixelRatio,M[4]=d;var te=M[23];g=(Dt.anchorY-te)*this.pixelRatio,M[5]=g,it=C.height,M[6]=it,Rt=C.width,M[13]=Rt}var Ae=void 0;M.length>24&&(Ae=M[24]);var oe=void 0,Jt=void 0,fe=void 0;M.length>16?(oe=M[15],Jt=M[16],fe=M[17]):(oe=bf,Jt=!1,fe=!1),Et&&tt?Bt+=U:!Et&&!tt&&(Bt-=U);for(var qt=0;h<f;h+=2)if(!(Ae&&Ae[qt++]<Rt/this.pixelRatio)){var nr=this.calculateImageOrLabelDimensions_(C.width,C.height,l[h],l[h+1],Rt,it,d,g,Ft,Mt,Bt,Ct,a,oe,Jt||fe,nt),ke=[e,t,C,nr,V,Jt?x:null,fe?S:null],wr=void 0,Ne=void 0;if(A&&Nt){var Pe=f-h;if(!Nt[Pe]){Nt[Pe]=ke;continue}if(wr=Nt[Pe],delete Nt[Pe],Ne=$P(wr),A.collides(Ne))continue}A&&A.collides(nr.declutterBox)||(wr&&(A&&A.insert(Ne),this.replayImageOrLabel_.apply(this,wr)),A&&A.insert(nr.declutterBox),this.replayImageOrLabel_.apply(this,ke))}++u;break;case Ye.DRAW_CHARS:var Gr=M[1],se=M[2],fi=M[3],gr=M[4];T=M[5];var ei=M[6],Wr=M[7],zr=M[8];I=M[9];var He=M[10];O=M[11],F=M[12];var Ir=[M[13],M[13]],$n=this.textStates[F],yn=$n.font,di=[$n.scale[0]*Wr,$n.scale[1]*Wr],pi=void 0;yn in this.widths_?pi=this.widths_[yn]:(pi={},this.widths_[yn]=pi);var Ue=R8(l,Gr,se,2),ri=Math.abs(di[0])*mP(yn,O,pi);if(gr||ri<=Ue){var Cn=this.textStates[F].textAlign,gi=(Ue-ri)*tE[Cn],cn=htt(l,Gr,se,2,O,gi,ei,Math.abs(di[0]),mP,yn,pi,tt?0:this.viewRotation_);t:if(cn){var Br=[],_n=void 0,eo=void 0,de=void 0,_t=void 0,$t=void 0;if(I)for(_n=0,eo=cn.length;_n<eo;++_n){$t=cn[_n],de=$t[4],_t=this.createLabel(de,F,"",I),d=$t[2]+(di[0]<0?-He:He),g=fi*_t.height+(.5-fi)*2*He*di[1]/di[0]-zr;var nr=this.calculateImageOrLabelDimensions_(_t.width,_t.height,$t[0],$t[1],_t.width,_t.height,d,g,0,0,$t[3],Ir,!1,bf,!1,nt);if(A&&A.collides(nr.declutterBox))break t;Br.push([e,t,_t,nr,1,null,null])}if(T)for(_n=0,eo=cn.length;_n<eo;++_n){$t=cn[_n],de=$t[4],_t=this.createLabel(de,F,T,""),d=$t[2],g=fi*_t.height-zr;var nr=this.calculateImageOrLabelDimensions_(_t.width,_t.height,$t[0],$t[1],_t.width,_t.height,d,g,0,0,$t[3],Ir,!1,bf,!1,nt);if(A&&A.collides(nr.declutterBox))break t;Br.push([e,t,_t,nr,1,null,null])}A&&A.load(Br.map($P));for(var ne=0,Je=Br.length;ne<Je;++ne)this.replayImageOrLabel_.apply(this,Br[ne])}}++u;break;case Ye.END_GEOMETRY:if(o!==void 0){nt=M[1];var Lr=o(nt,Tt);if(Lr)return Lr}++u;break;case Ye.FILL:rt?L++:this.fill_(e),++u;break;case Ye.MOVE_TO_LINE_TO:for(h=M[1],f=M[2],At=l[h],ct=l[h+1],y=At+.5|0,w=ct+.5|0,(y!==m||w!==v)&&(e.moveTo(At,ct),m=y,v=w),h+=2;h<f;h+=2)At=l[h],ct=l[h+1],y=At+.5|0,w=ct+.5|0,(h==f-2||y!==m||w!==v)&&(e.lineTo(At,ct),m=y,v=w);++u;break;case Ye.SET_FILL_STYLE:x=M,this.alignFill_=M[2],L&&(this.fill_(e),L=0,N&&(e.stroke(),N=0)),e.fillStyle=M[1],++u;break;case Ye.SET_STROKE_STYLE:S=M,N&&(e.stroke(),N=0),this.setStrokeStyle_(e,M),++u;break;case Ye.STROKE:rt?N++:e.stroke(),++u;break;default:++u;break}}L&&this.fill_(e),N&&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}(),gtt=ptt,Vb=[Er.POLYGON,Er.CIRCLE,Er.LINE_STRING,Er.IMAGE,Er.TEXT,Er.DEFAULT],vtt=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_=xi(),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 gtt(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=yo(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=wo(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=Di(),Uf(c,e),_o(c,t*(this.renderBuffer_+i),c));var h=mtt(i),f;function d(F,I){for(var T=u.getImageData(0,0,s,s).data,L=0,N=h.length;L<N;L++)if(T[h[L]]>0){if(!o||f!==Er.IMAGE&&f!==Er.TEXT||o.indexOf(F)!==-1){var x=(h[L]-3)/4,S=i-x%s,P=i-(x/s|0),U=a(F,I,S*S+P*P);if(U)return U}u.clearRect(0,0,s,s);break}}var g=Object.keys(this.executorsByZIndex_).map(Number);g.sort(oh);var m,v,y,w,C;for(m=g.length-1;m>=0;--m){var O=g[m].toString();for(y=this.executorsByZIndex_[O],v=Vb.length-1;v>=0;--v)if(f=Vb[v],w=y[f],w!==void 0&&(C=w.executeHitDetection(u,A,n,d,c),C))return C}},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 zc(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return rd(this.executorsByZIndex_)},r.prototype.execute=function(e,t,n,i,a,o,s){var A=Object.keys(this.executorsByZIndex_).map(Number);A.sort(oh),this.maxExtent_&&(e.save(),this.clip(e,n));var l=o||Vb,u,c,h,f,d,g;for(s&&A.reverse(),u=0,c=A.length;u<c;++u){var m=A[u].toString();for(d=this.executorsByZIndex_[m],h=0,f=l.length;h<f;++h){var v=l[h];g=d[v],g!==void 0&&g.execute(e,t,n,i,a,s)}}this.maxExtent_&&e.restore()},r}(),jb={};function mtt(r){if(jb[r]!==void 0)return jb[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 jb[r]=A,A}var rE=vtt,ytt=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)}}(),_tt=function(r){ytt(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_=xi(),l}return e.prototype.drawImages_=function(t,n,i,a){if(this.image_){var o=zc(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_,d=o[c+1]-this.imageAnchorY_;if(u!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var g=f+this.imageAnchorX_,m=d+this.imageAnchorY_;yo(A,g,m,1,1,u,-g,-m),s.setTransform.apply(s,A),s.translate(g,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,f,d,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=zc(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=yo(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=zc(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(qn(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=o3(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 pt.POINT:this.drawPoint(t);break;case pt.LINE_STRING:this.drawLineString(t);break;case pt.POLYGON:this.drawPolygon(t);break;case pt.MULTI_POINT:this.drawMultiPoint(t);break;case pt.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case pt.MULTI_POLYGON:this.drawMultiPolygon(t);break;case pt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case pt.CIRCLE:this.drawCircle(t);break}},e.prototype.drawFeature=function(t,n){var i=n.getGeometryFunction()(t);!i||!qn(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_)),!!qn(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(qn(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_)),!!qn(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_)),!!qn(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&&(Fu(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:ky;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:il(a||gu)}}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||Py;this.strokeState_={lineCap:s!==void 0?s:Vw,lineDash:this.pixelRatio_===1?f:f.map(function(d){return d*i.pixelRatio_}),lineDashOffset:(l||Uy)*this.pixelRatio_,lineJoin:u!==void 0?u:Og,lineWidth:(c!==void 0?c:Hy)*this.pixelRatio_,miterLimit:h!==void 0?h:Dy,strokeStyle:il(o||Qy)}}},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:il(i||gu)}}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:Vw,lineDash:A||Py,lineDashOffset:l||Uy,lineJoin:u!==void 0?u:Og,lineWidth:c!==void 0?c:Hy,miterLimit:h!==void 0?h:Dy,strokeStyle:il(o||Qy)}}var f=t.getFont(),d=t.getOffsetX(),g=t.getOffsetY(),m=t.getRotateWithView(),v=t.getRotation(),y=t.getScaleArray(),w=t.getText(),C=t.getTextAlign(),O=t.getTextBaseline();this.textState_={font:f!==void 0?f:t8,textAlign:C!==void 0?C:ky,textBaseline:O!==void 0?O:jw},this.text_=w!==void 0?Array.isArray(w)?w.reduce(function(F,I,T){return F+=T%2?" ":I},""):w:"",this.textOffsetX_=d!==void 0?this.pixelRatio_*d:0,this.textOffsetY_=g!==void 0?this.pixelRatio_*g:0,this.textRotateWithView_=m!==void 0?m:!1,this.textRotation_=v!==void 0?v:0,this.textScale_=[this.pixelRatio_*y[0],this.pixelRatio_*y[1]]}},e}(D8),jF=_tt,uo={FRACTION:"fraction",PIXELS:"pixels"},Vi={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},wtt=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)}}(),Ett=function(r){wtt(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(xe.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Re()},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(){Re()},e}(wd),H8=Ett,Ctt=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)}}(),Btt=function(r){Ctt(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,i,rr.IDLE)||this;return A.src_=a,A.image_=new Image,o!==null&&(A.image_.crossOrigin=o),A.unlisten_=null,A.state=rr.IDLE,A.imageLoadFunction_=s,A}return e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=rr.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=Li(this.extent)/this.image_.height),this.state=rr.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){(this.state==rr.IDLE||this.state==rr.ERROR)&&(this.state=rr.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=KF(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}(H8);function KF(r,e,t){var n=r,i=!0,a=!1,o=!1,s=[Ny(n,xe.LOAD,function(){o=!0,a||e()})];return n.src&&hX?(a=!0,n.decode().then(function(){i&&e()}).catch(function(A){i&&(o?e():t())})):s.push(Ny(n,xe.ERROR,t)),function(){i=!1,s.forEach(Yr)}}var G8=Btt,btt=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)}}(),um=null,Ttt=function(r){btt(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_===rr.LOADED){um||(um=wo(1,1)),um.drawImage(this.image_,0,0);try{um.getImageData(0,0,1,1),this.tainted_=!1}catch{um=null,this.tainted_=!0}}return this.tainted_===!0},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(xe.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=rr.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=rr.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=wo(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_==rr.IDLE){this.imageState_=rr.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=KF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(!(!this.color_||this.canvas_[t]||this.imageState_!==rr.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=du(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}(wd);function Stt(r,e,t,n,i,a){var o=kw.get(e,n,a);return o||(o=new Ttt(r,e,t,n,i,a),kw.set(e,n,a,o)),o}var xtt=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)}}(),Itt=function(r){xtt(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:Vi.TOP_LEFT,n.anchorXUnits_=i.anchorXUnits!==void 0?i.anchorXUnits:uo.FRACTION,n.anchorYUnits_=i.anchorYUnits!==void 0?i.anchorYUnits:uo.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;Le(!(u!==void 0&&l),4),Le(!l||l&&n.imgSize_,5),(u===void 0||u.length===0)&&l&&(u=l.src||Ee(l)),Le(u!==void 0&&u.length>0,6);var c=i.src!==void 0?rr.IDLE:rr.LOADED;return n.color_=i.color!==void 0?lh(i.color):null,n.iconImage_=Stt(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:Vi.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_==uo.FRACTION||this.anchorYUnits_==uo.FRACTION){if(!n)return null;t=this.anchor_.slice(),this.anchorXUnits_==uo.FRACTION&&(t[0]*=n[0]),this.anchorYUnits_==uo.FRACTION&&(t[1]*=n[1])}if(this.anchorOrigin_!=Vi.TOP_LEFT){if(!n)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==Vi.TOP_RIGHT||this.anchorOrigin_==Vi.BOTTOM_RIGHT)&&(t[0]=-t[0]+n[0]),(this.anchorOrigin_==Vi.BOTTOM_LEFT||this.anchorOrigin_==Vi.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_!=Vi.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;t=t.slice(),(this.offsetOrigin_==Vi.TOP_RIGHT||this.offsetOrigin_==Vi.BOTTOM_RIGHT)&&(t[0]=i[0]-n[0]-t[0]),(this.offsetOrigin_==Vi.BOTTOM_LEFT||this.offsetOrigin_==Vi.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(xe.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(xe.CHANGE,t)},e}(U8),O0=Itt,Ltt="#333",Ott=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_=Wi(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 Ba({color:Ltt}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:Q8.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_=Wi(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}(),Bd=Ott,ds=.5;function $8(r,e,t,n,i,a,o){var s=r[0]*ds,A=r[1]*ds,l=wo(s,A);l.imageSmoothingEnabled=!1;for(var u=l.canvas,c=new jF(l,ds,i,null,o),h=t.length,f=Math.floor((256*256*256-1)/h),d={},g=1;g<=h;++g){var m=t[g-1],v=m.getStyleFunction()||n;if(n){var y=v(m,a);if(y){Array.isArray(y)||(y=[y]);for(var w=g*f,C="#"+("000000"+w.toString(16)).slice(-6),O=0,F=y.length;O<F;++O){var I=y[O],T=I.getGeometryFunction()(m);if(!(!T||!qn(i,T.getExtent()))){var L=I.clone(),N=L.getFill();N&&N.setColor(C);var x=L.getStroke();x&&(x.setColor(C),x.setLineDash(null)),L.setText(void 0);var S=I.getImage();if(S&&S.getOpacity()!==0){var P=S.getImageSize();if(!P)continue;var U=wo(P[0],P[1],void 0,{alpha:!1}),tt=U.canvas;U.fillStyle=C,U.fillRect(0,0,tt.width,tt.height),L.setImage(new O0({img:tt,imgSize:P,anchor:S.getAnchor(),anchorXUnits:uo.PIXELS,anchorYUnits:uo.PIXELS,offset:S.getOrigin(),opacity:1,size:S.getSize(),scale:S.getScale(),rotation:S.getRotation(),rotateWithView:S.getRotateWithView()}))}var q=L.getZIndex()||0,rt=d[q];rt||(rt={},d[q]=rt,rt[pt.POLYGON]=[],rt[pt.CIRCLE]=[],rt[pt.LINE_STRING]=[],rt[pt.POINT]=[]),rt[T.getType().replace("Multi","")].push(T,L)}}}}}for(var nt=Object.keys(d).map(Number).sort(oh),g=0,At=nt.length;g<At;++g){var rt=d[nt[g]];for(var ct in rt)for(var Tt=rt[ct],O=0,F=Tt.length;O<F;O+=2){c.setStyle(Tt[O+1]);for(var M=0,W=e.length;M<W;++M)c.setTransform(e[M]),c.drawGeometry(Tt[O])}}return l.getImageData(0,0,u.width,u.height)}function V8(r,e,t){var n=[];if(t){var i=Math.floor(Math.round(r[0])*ds),a=Math.floor(Math.round(r[1])*ds),o=(Un(i,0,t.width-1)+Un(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 Ftt=.5,j8={Point:ktt,LineString:Utt,Polygon:Gtt,MultiPoint:Htt,MultiLineString:Dtt,MultiPolygon:Qtt,GeometryCollection:Ptt,Circle:Mtt};function Rtt(r,e){return parseInt(Ee(r),10)-parseInt(Ee(e),10)}function K8(r,e){var t=wx(r,e);return t*t}function wx(r,e){return Ftt*r/e}function Mtt(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),Er.CIRCLE);s.setFillStrokeStyle(a,o),s.drawCircle(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function nE(r,e,t,n,i,a,o){var s=!1,A=t.getImage();if(A){var l=A.getImageState();l==rr.LOADED||l==rr.ERROR?A.unlistenImageChange(i):(l==rr.IDLE&&A.load(),l=A.getImageState(),A.listenImageChange(i),s=!0)}return Ntt(r,e,t,n,a,o),s}function Ntt(r,e,t,n,i,a){var o=t.getGeometryFunction()(e);if(o){var s=o.simplifyTransformed(n,i),A=t.getRenderer();if(A)W8(r,s,t,e);else{var l=j8[s.getType()];l(r,s,t,e,a)}}}function W8(r,e,t,n){if(e.getType()==pt.GEOMETRY_COLLECTION){for(var i=e.getGeometries(),a=0,o=i.length;a<o;++a)W8(r,i[a],t,n);return}var s=r.getBuilder(t.getZIndex(),Er.DEFAULT);s.drawCustom(e,n,t.getRenderer(),t.getHitDetectionRenderer())}function Ptt(r,e,t,n,i){var a=e.getGeometriesArray(),o,s;for(o=0,s=a.length;o<s;++o){var A=j8[a[o].getType()];A(r,a[o],t,n,i)}}function Utt(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),Er.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(),Er.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function Dtt(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),Er.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(),Er.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function Qtt(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(o||a){var s=r.getBuilder(t.getZIndex(),Er.POLYGON);s.setFillStrokeStyle(a,o),s.drawMultiPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function ktt(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()!=rr.LOADED)return;var A=r.getBuilder(t.getZIndex(),Er.IMAGE);A.setImageStyle(a,s),A.drawPoint(e,n)}if(o&&o.getText()){var l=r.getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function Htt(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()!=rr.LOADED)return;var A=r.getBuilder(t.getZIndex(),Er.IMAGE);A.setImageStyle(a,s),A.drawMultiPoint(e,n)}if(o&&o.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function Gtt(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),Er.POLYGON);s.setFillStrokeStyle(a,o),s.drawPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(A),l.drawText(e,n)}}var $tt=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)}}(),Vtt=function(r){$tt(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_=Di(),n.wrappedRenderedExtent_=Di(),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,d=n.viewHints,g=!(d[In.ANIMATING]||d[In.INTERACTING]),m=this.context,v=Math.round(n.size[0]*f),y=Math.round(n.size[1]*f),w=h.getWrapX()&&l.canWrapX(),C=w?Kr(c):null,O=w?Math.ceil((a[2]-c[2])/C)+1:1,F=w?Math.floor((a[0]-c[0])/C):0;do{var I=this.getRenderTransform(s,A,u,f,v,y,F*C);t.execute(m,1,I,u,g,void 0,i)}while(++F<O)},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];vX(this.pixelTransform,1/i,1/i),_0(this.inversePixelTransform,this.pixelTransform);var o=AF(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 d=!1,g=!0;if(a.extent&&this.clipping){var m=gs(a.extent);g=qn(m,t.extent),d=g&&!ps(m,t.extent),d&&this.clipUnrotated(s,t,m)}g&&this.renderWorlds(l,t),d&&s.restore(),this.postRender(s,t);var v=Zk(a.opacity),y=this.container;return v!==y.style.opacity&&(y.style.opacity=v),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];bn(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]*ds,f=i[1]*ds;c.push(this.getRenderTransform(a,o,s,ds,h,f,0).slice());var d=u.getSource(),g=A.getExtent();if(d.getWrapX()&&A.canWrapX()&&!ps(g,l)){for(var m=l[0],v=Kr(g),y=0,w=void 0;m<g[0];)--y,w=v*y,c.push(this.getRenderTransform(a,o,s,ds,h,f,w).slice()),m+=v;for(y=0,m=l[2];m>g[2];)++y,w=v*y,c.push(this.getRenderTransform(a,o,s,ds,h,f,w).slice()),m-=v}this.hitDetectionImageData_=$8(i,c,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}n(V8(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(g,m,v){var y=Ee(g),w=c[y];if(w){if(w!==!0&&v<w.distanceSq){if(v===0)return c[y]=!0,o.splice(o.lastIndexOf(w),1),a(g,u,m);w.geometry=m,w.distanceSq=v}}else{if(v===0)return c[y]=!0,a(g,u,m);o.push(c[y]={feature:g,layer:u,geometry:m,distanceSq:v,callback:a})}},f,d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(function(g){return f=g.forEachFeatureAtCoordinate(t,A,l,i,h,g===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[In.ANIMATING],o=t.viewHints[In.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,d=n.getRevision(),g=n.getRenderBuffer(),m=n.getRenderOrder();m===void 0&&(m=Rtt);var v=u.center.slice(),y=_o(l,g*h),w=y.slice(),C=[y.slice()],O=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!ps(O,t.extent)){var F=Kr(O),I=Math.max(Kr(y)/2,F);y[0]=O[0]-I,y[2]=O[2]+I,mF(v,c);var T=Qk(C[0],c);T[0]<O[0]&&T[2]<O[2]?C.push([T[0]+F,T[1],T[2]+F,T[3]]):T[0]>O[0]&&T[2]>O[2]&&C.push([T[0]-F,T[1],T[2]-F,T[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==d&&this.renderedRenderOrder_==m&&ps(this.wrappedRenderedExtent_,y))return Fu(this.renderedExtent_,w)||(this.hitDetectionImageData_=null,this.renderedExtent_=w),this.renderedCenter_=v,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var L=new eE(wx(h,f),y,h,f),N;this.getLayer().getDeclutter()&&(N=new eE(wx(h,f),y,h,f));for(var x,S,P,S=0,P=C.length;S<P;++S)i.loadFeatures(C[S],h,c);var U=K8(h,f),tt=function(ct){var Tt,M=ct.getStyleFunction()||n.getStyleFunction();if(M&&(Tt=M(ct,h)),Tt){var W=this.renderFeature(ct,U,Tt,L,x,N);this.dirty_=this.dirty_||W}}.bind(this),q=OC(y),rt=i.getFeaturesInExtent(q);m&&rt.sort(m);for(var S=0,P=rt.length;S<P;++S)tt(rt[S]);this.renderedFeatures_=rt;var nt=L.finish(),At=new rE(y,h,f,i.getOverlaps(),nt,n.getRenderBuffer());return N&&(this.declutterExecutorGroup=new rE(y,h,f,i.getOverlaps(),N.finish(),n.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=d,this.renderedRenderOrder_=m,this.renderedExtent_=w,this.wrappedRenderedExtent_=y,this.renderedCenter_=v,this.renderedProjection_=c,this.replayGroup_=At,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=nE(a,t,i[l],n,this.boundHandleStyleImageChange_,o,s)||A;else A=nE(a,t,i,n,this.boundHandleStyleImageChange_,o,s);return A},e}(VF),jtt=Vtt,Ktt=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)}}(),Wtt=function(r){Ktt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new jtt(this)},e}(QC),El=Wtt,ztt=function(){function r(e){this.rbush_=new P8(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_[Ee(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_[Ee(s)]=A}this.rbush_.load(n)},r.prototype.remove=function(e){var t=Ee(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_[Ee(t)],i=[n.minX,n.minY,n.maxX,n.maxY];vl(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 rd(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}(),iE=ztt,Ytt=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)}}(),Xtt=function(r){Ytt(e,r);function e(t){var n=r.call(this)||this;n.projection=Ve(t.projection),n.attributions_=jP(t.attributions),n.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,n.loading=!1,n.state_=t.state!==void 0?t.state:co.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 Re()},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_=jP(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Oi);function jP(r){return r?Array.isArray(r)?function(e){return r}:typeof r=="function"?r:function(e){return[r]}:null}var kC=Xtt,ji={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function z8(r,e){return[[-1/0,-1/0,1/0,1/0]]}function qtt(r,e){return[r]}function Ztt(r){return function(e,t,n){var i=r.getZForResolution(jq(t)),a=r.getTileRangeForExtentAndZ(gs(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(OC(r.getTileCoordExtent(s)));return o}}var Jtt=Object.freeze(Object.defineProperty({__proto__:null,all:z8,bbox:qtt,tile:Ztt},Symbol.toStringTag,{value:"Module"})),tet=!1;function eet(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()==dA.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.withCredentials=tet,s.onload=function(A){if(!s.status||s.status>=200&&s.status<300){var l=e.getType(),u=void 0;l==dA.JSON||l==dA.TEXT?u=s.responseText:l==dA.XML?(u=s.responseXML,u||(u=new DOMParser().parseFromString(s.responseText,"application/xml"))):l==dA.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 KP(r,e){return function(t,n,i,a,o){var s=this;eet(r,e,t,n,i,function(A,l){s.addFeatures(A),a!==void 0&&a(A)},o||Jf)}}var Y8=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)}}(),fc=function(r){Y8(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),ret=function(r){Y8(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:co.READY,wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,n.on,n.once,n.un,n.loader_=Jf,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&&(Le(n.format_,7),n.loader_=KP(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:z8;var a=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=a?new iE:null,n.loadedExtentsRtree_=new iE,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 Ii(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=Ee(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 fc(ji.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,n){this.featureChangeKeys_[t]=[je(n,xe.CHANGE,this.handleFeatureChange_,this),je(n,ed.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&&(Le(!(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=Ee(A);this.addToIndex_(l,A)&&i.push(A)}for(var o=0,u=i.length;o<u;o++){var A=i[o],l=Ee(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(ji.ADDFEATURE))for(var o=0,f=i.length;o<f;o++)this.dispatchEvent(new fc(ji.ADDFEATURE,i[o]))},e.prototype.bindFeaturesCollection_=function(t){var n=!1;this.addEventListener(ji.ADDFEATURE,function(i){n||(n=!0,t.push(i.feature),n=!1)}),this.addEventListener(ji.REMOVEFEATURE,function(i){n||(n=!0,t.remove(i.feature),n=!1)}),t.addEventListener(si.ADD,function(i){n||(n=!0,this.addFeature(i.element),n=!1)}.bind(this)),t.addEventListener(si.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(Yr)}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 fc(ji.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(),rd(this.nullGeometryFeatures_)||tn(t,dF(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||ul;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 d=Math.sqrt(A);l[0]=i-d,l[1]=a-d,l[2]=i+d,l[3]=a+d}}}),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=Ee(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 fc(ji.CHANGEFEATURE,n))},e.prototype.hasFeature=function(t){var n=t.getId();return n!==void 0?n in this.idIndex_:Ee(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&rd(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],d=a.forEachInExtent(f,function(g){return ps(g.extent,f)});d||(++A.loadingExtentsCount_,A.dispatchEvent(new fc(ji.FEATURESLOADSTART)),A.loader_.call(A,f,n,i,function(g){--this.loadingExtentsCount_,this.dispatchEvent(new fc(ji.FEATURESLOADEND,void 0,g))}.bind(A),function(){--this.loadingExtentsCount_,this.dispatchEvent(new fc(ji.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(vl(a.extent,t))return i=a,!0}),i&&n.remove(i)},e.prototype.removeFeature=function(t){if(t){var n=Ee(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=Ee(t),i=this.featureChangeKeys_[n];if(i){i.forEach(Yr),delete this.featureChangeKeys_[n];var a=t.getId();return a!==void 0&&delete this.idIndex_[a.toString()],delete this.uidIndex_[n],this.dispatchEvent(new fc(ji.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){Le(this.format_,7),this.url_=t,this.setLoader(KP(t,this.format_))},e}(kC),Mu=ret,X8=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={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},z_={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},Y_=function(r){X8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.feature=n,i}return e}(Vo),net=function(r){X8(e,r);function e(t){var n=this,i=t;i.stopDown||(i.stopDown=yd),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_=aet(n.type_),n.stopClick_=!!t.stopClick,n.minPoints_=t.minPoints?t.minPoints:n.mode_===$r.POLYGON?3:2,n.maxPoints_=n.mode_===$r.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,n.finishCondition_=t.finishCondition?t.finishCondition:ul;var a=t.geometryFunction;if(!a){var o=n.mode_;if(o===$r.CIRCLE)a=function(A,l,u){var c=l||new GF([NaN,NaN]),h=Mn(A[0]),f=pu(h,Mn(A[A.length-1]));return c.setCenterAndRadius(h,Math.sqrt(f)),c};else{var s;o===$r.POINT?s=xr:o===$r.LINE_STRING?s=en:o===$r.POLYGON&&(s=Dn),a=function(A,l,u){return l?o===$r.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 El({source:new Mu({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:iet(),updateWhileInteracting:!0}),n.geometryName_=t.geometryName,n.condition_=t.condition?t.condition:DC,n.freehandCondition_,t.freehand?n.freehandCondition_=PC:n.freehandCondition_=t.freehandCondition?t.freehandCondition:S0,n.addChangeListener(mx.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===xe.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!==$r.POINT&&this.freehandCondition_(t);var n=t.type===yr.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===yr.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===yr.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===yr.POINTERDOWN?i=!1:n&&this.getPointerCount()<2?(i=t.type===yr.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===yr.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===yr.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 iu(yr.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_===$r.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===$r.POINT)n=!0;else if(o===$r.CIRCLE)n=this.sketchCoords_.length===2;else if(o===$r.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(o===$r.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],d=t[1]-h[1],g=this.freehand_?1:this.snapTolerance_;if(n=Math.sqrt(f*f+d*d)<=g,n){this.finishCoordinate_=c;break}}}return n},e.prototype.createOrUpdateSketchPoint_=function(t){if(!this.sketchPoint_)this.sketchPoint_=new _r(new xr(t)),this.updateSketchFeatures_();else{var n=this.sketchPoint_.getGeometry();n.setCoordinates(t)}},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new _r);var n=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),i.changed()):(i=new en(n.getFlatCoordinates(),n.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var n=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===$r.POINT?this.sketchCoords_=t.slice():this.mode_===$r.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new _r(new en(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,n);this.sketchFeature_=new _r,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Y_(z_.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_===$r.POINT?s=this.sketchCoords_:this.mode_===$r.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()===pt.POLYGON&&this.mode_!==$r.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===$r.LINE_STRING||s===$r.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===$r.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===$r.LINE_STRING||a===$r.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()===pt.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(a===$r.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_===$r.LINE_STRING?(n.pop(),this.geometryFunction_(n,i,a)):this.mode_===$r.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i,a),n=i.getCoordinates()),this.type_===pt.MULTI_POINT?t.setGeometry(new $s([n])):this.type_===pt.MULTI_LINE_STRING?t.setGeometry(new Xa([n])):this.type_===pt.MULTI_POLYGON&&t.setGeometry(new qa([n])),this.dispatchEvent(new Y_(z_.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 Y_(z_.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var n=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(t[0]);var a;if(n===$r.LINE_STRING||n===$r.CIRCLE)a=this.sketchCoords_;else if(n===$r.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 _r(new xr(a)),this.updateSketchFeatures_(),this.dispatchEvent(new Y_(z_.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}(Es);function iet(){var r=$F();return function(e,t){return r[e.getGeometry().getType()]}}function aet(r){switch(r){case pt.POINT:case pt.MULTI_POINT:return $r.POINT;case pt.LINE_STRING:case pt.MULTI_LINE_STRING:return $r.LINE_STRING;case pt.POLYGON:case pt.MULTI_POLYGON:return $r.POLYGON;case pt.CIRCLE:return $r.CIRCLE;default:throw new Error("Invalid type: "+r)}}var WF=net,q8=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)}}(),WP=0,sy=1,zP=[0,0,0,0],hg=[],Kb={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},Wb=function(r){q8(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),oet=function(r){q8(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:HF,n.defaultDeleteCondition_=function(a){return x8(a)&&UC(a)},n.deleteCondition_=t.deleteCondition?t.deleteCondition:n.defaultDeleteCondition_,n.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:PC,n.vertexFeature_=null,n.vertexSegments_=null,n.lastPixel_=[0,0],n.ignoreNextSingleClick_=!1,n.featuresBeingModified_=null,n.rBush_=new iE,n.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,n.snappedToVertex_=!1,n.changingFeature_=!1,n.dragSegments_=[],n.overlay_=new El({source:new Mu({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:Aet(),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 Ii(n.source_.getFeatures()),n.source_.addEventListener(ji.ADDFEATURE,n.handleSourceAdd_.bind(n)),n.source_.addEventListener(ji.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(si.ADD,n.handleFeatureAdd_.bind(n)),n.features_.addEventListener(si.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(xe.CHANGE,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,n){if(!this.featuresBeingModified_){this.featuresBeingModified_=new Ii;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 Wb(Kb.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(xe.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(oa(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(oa(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(oa(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),d={feature:t,geometry:n,depth:[A,a],index:c,segment:f};this.rBush_.insert(oa(f),d)}},e.prototype.writeCircleGeometry_=function(t,n){var i=n.getCenter(),a={feature:t,geometry:n,index:WP,segment:[i,i]},o={feature:t,geometry:n,index:sy,segment:[i,i]},s=[a,o];a.featureSegments=s,o.featureSegments=s,this.rBush_.insert(Pf(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 _r(new xr(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==yr.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=yr.SINGLECLICK||!this.ignoreNextSingleClick_?n=this.removePoint():n=!0),t.type==yr.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,d=l.segment,g=A[1];n.length<c.getStride();)n.push(d[g][n.length]);switch(c.getType()){case pt.POINT:f=n,d[0]=n,d[1]=n;break;case pt.MULTI_POINT:f=c.getCoordinates(),f[l.index]=n,d[0]=n,d[1]=n;break;case pt.LINE_STRING:f=c.getCoordinates(),f[l.index+g]=n,d[g]=n;break;case pt.MULTI_LINE_STRING:f=c.getCoordinates(),f[h[0]][l.index+g]=n,d[g]=n;break;case pt.POLYGON:f=c.getCoordinates(),f[h[0]][l.index+g]=n,d[g]=n;break;case pt.MULTI_POLYGON:f=c.getCoordinates(),f[h[1]][h[0]][l.index+g]=n,d[g]=n;break;case pt.CIRCLE:if(d[0]=n,d[1]=n,l.index===WP)this.changingFeature_=!0,c.setCenter(n),this.changingFeature_=!1;else{this.changingFeature_=!0;var m=t.map.getView().getProjection(),v=pP(Mn(c.getCenter()),Mn(n)),y=id();if(y){var w=c.clone().transform(y,m);w.setRadius(v),v=w.transform(m,y).getRadius()}c.setRadius(v),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=oa([s]),l=this.rBush_.getInExtent(A),u={};l.sort(set);for(var c=0,h=l.length;c<h;++c){var f=l[c],d=f.segment,g=Ee(f.geometry),m=f.depth;if(m&&(g+="-"+m.join("-")),u[g]||(u[g]=new Array(2)),f.geometry.getType()===pt.CIRCLE&&f.index===sy){var v=XP(n,f,a);uA(v,s)&&!u[g][0]&&(this.dragSegments_.push([f,0]),u[g][0]=f);continue}if(uA(d[0],s)&&!u[g][0]){this.dragSegments_.push([f,0]),u[g][0]=f;continue}if(uA(d[1],s)&&!u[g][1]){if((f.geometry.getType()===pt.LINE_STRING||f.geometry.getType()===pt.MULTI_LINE_STRING)&&u[g][0]&&u[g][0].index===0)continue;this.dragSegments_.push([f,1]),u[g][1]=f;continue}Ee(d)in this.vertexSegments_&&!u[g][0]&&!u[g][1]&&this.insertVertexCondition_(t)&&o.push(f)}o.length&&this.willModifyFeatures_(t,[o]);for(var y=o.length-1;y>=0;--y)this.insertVertex_(o[y],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()===pt.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(Pf(o),s);var l=a,u=id();if(u){var c=t.map.getView().getProjection();l=l.clone().transform(u,c),l=v8(l).transform(c,u)}this.rBush_.update(l.getExtent(),A)}else this.rBush_.update(oa(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new Wb(Kb.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(U,tt){return YP(o,U,s)-YP(o,tt,s)},l,u;if(this.hitDetection_){var c=typeof this.hitDetection_=="object"?function(U){return U===a.hitDetection_}:void 0;n.forEachFeatureAtPixel(t,function(U,tt,q){if(q=q||U.getGeometry(),q.getType()===pt.POINT&&Pi(a.features_.getArray(),U)){u=q;var rt=q.getFlatCoordinates().slice(0,2);l=[{feature:U,geometry:q,segment:[rt,rt]}]}return!0},{layerFilter:c})}if(!l){var h=gs(Pf(o,zP)),f=n.getView().getResolution()*this.pixelTolerance_,d=OC(_o(h,f,zP));l=this.rBush_.getInExtent(d)}if(l&&l.length>0){var g=l.sort(A)[0],m=g.segment,v=XP(o,g,s),y=n.getPixelFromCoordinate(v),w=pP(t,y);if(u||w<=this.pixelTolerance_){var C={};if(C[Ee(m)]=!0,this.snapToPointer_||(this.delta_[0]=v[0]-o[0],this.delta_[1]=v[1]-o[1]),g.geometry.getType()===pt.CIRCLE&&g.index===sy)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(v,[g.feature],[g.geometry]);else{var O=n.getPixelFromCoordinate(m[0]),F=n.getPixelFromCoordinate(m[1]),I=pu(y,O),T=pu(y,F);w=Math.sqrt(Math.min(I,T)),this.snappedToVertex_=w<=this.pixelTolerance_,this.snappedToVertex_&&(v=I>T?m[1]:m[0]),this.createOrUpdateVertexFeature_(v,[g.feature],[g.geometry]);var L={};L[Ee(g.geometry)]=!0;for(var N=1,x=l.length;N<x;++N){var S=l[N].segment;if(uA(m[0],S[0])&&uA(m[1],S[1])||uA(m[0],S[1])&&uA(m[1],S[0])){var P=Ee(l[N].geometry);P in L||(L[P]=!0,C[Ee(S)]=!0)}else break}}this.vertexSegments_=C;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 pt.MULTI_LINE_STRING:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case pt.POLYGON:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case pt.MULTI_POLYGON:l=o.getCoordinates(),l[s[1]][s[0]].splice(A+1,0,n);break;case pt.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(oa(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(oa(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=yr.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var n=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Wb(Kb.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,d,g;for(l=t.length-1;l>=0;--l)s=t[l],d=s[0],g=Ee(d.feature),d.depth&&(g+="-"+d.depth.join("-")),g in n||(n[g]={}),s[1]===0?(n[g].right=d,n[g].index=d.index):s[1]==1&&(n[g].left=d,n[g].index=d.index+1);for(g in n){switch(f=n[g].right,c=n[g].left,u=n[g].index,h=u-1,c!==void 0?d=c:d=f,h<0&&(h=0),A=d.geometry,o=A.getCoordinates(),a=o,i=!1,A.getType()){case pt.MULTI_LINE_STRING:o[d.depth[0]].length>2&&(o[d.depth[0]].splice(u,1),i=!0);break;case pt.LINE_STRING:o.length>2&&(o.splice(u,1),i=!0);break;case pt.MULTI_POLYGON:a=a[d.depth[1]];case pt.POLYGON:a=a[d.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 v={depth:d.depth,feature:d.feature,geometry:d.geometry,index:h,segment:m};this.rBush_.insert(oa(v.segment),v)}this.updateSegmentIndices_(A,u,d.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||Fu(o.depth,i))&&o.index>n&&(o.index+=a)})},e}(Es);function set(r,e){return r.index-e.index}function YP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE){var i=n;if(e.index===sy){var a=id();a&&(i=i.clone().transform(a,t));var o=pu(i.getCenter(),Mn(r)),s=Math.sqrt(o)-i.getRadius();return s*s}}var A=Mn(r);return hg[0]=Mn(e.segment[0]),hg[1]=Mn(e.segment[1]),KX(A,hg)}function XP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE&&e.index===sy){var i=n,a=id();return a&&(i=i.clone().transform(a,t)),Rg(i.getClosestPoint(Mn(r)))}var o=Mn(r);return hg[0]=Mn(e.segment[0]),hg[1]=Mn(e.segment[1]),Rg(gF(o,hg))}function Aet(){var r=$F();return function(e,t){return r[pt.POINT]}}var zF=oet,Z8=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)}}(),uet={SELECT:"select"},cet=function(r){Z8(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),X_={},het=function(r){Z8(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:UC,n.addCondition_=i.addCondition?i.addCondition:yx,n.removeCondition_=i.removeCondition?i.removeCondition:yx,n.toggleCondition_=i.toggleCondition?i.toggleCondition:S0,n.multi_=i.multi?i.multi:!1,n.filter_=i.filter?i.filter:ul,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.style_=i.style!==void 0?i.style:fet(),n.features_=i.features||new Ii;var a;if(i.layers)if(typeof i.layers=="function")a=i.layers;else{var o=i.layers;a=function(s){return Pi(o,s)}}else a=ul;return n.layerFilter_=a,n.featureLayerAssociation_={},n}return e.prototype.addFeatureLayerAssociation_=function(t,n){this.featureLayerAssociation_[Ee(t)]=n},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[Ee(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(si.ADD,this.boundAddFeature_),this.features_.addEventListener(si.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(si.ADD,this.boundAddFeature_),this.features_.removeEventListener(si.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 El&&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=Ee(t);n in X_||(X_[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=Ee(t);t.setStyle(X_[o]),delete X_[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[Ee(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){_d(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,function(g,m){if(this.filter_(g,m))return this.addFeatureLayerAssociation_(g,m),u.push(g),!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(g,m){if(this.filter_(g,m))return(n||a)&&!Pi(A.getArray(),g)?(this.addFeatureLayerAssociation_(g,m),u.push(g)):(i||a)&&Pi(A.getArray(),g)&&(l.push(g),this.removeFeatureLayerAssociation_(g)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var d=l.length-1;d>=0;--d)A.remove(l[d]);A.extend(u)}return(u.length>0||l.length>0)&&this.dispatchEvent(new cet(uet.SELECT,u,l,t)),!0},e}(sv);function fet(){var r=$F();return tn(r[pt.POLYGON],r[pt.LINE_STRING]),tn(r[pt.GEOMETRY_COLLECTION],r[pt.LINE_STRING]),function(e){return e.getGeometry()?r[e.getGeometry().getType()]:null}}var HC=het,det=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 qP(r){if(r.feature)return r.feature;if(r.element)return r.element}var zb=[],pet=function(r){det(e,r);function e(t){var n=this,i=t||{},a=i;return a.handleDownEvent||(a.handleDownEvent=ul),a.stopDown||(a.stopDown=yd),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 iE,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=Ee(t),o=t.getGeometry();if(o){var s=this.GEOMETRY_SEGMENTERS_[o.getType()];if(s){this.indexedFeaturesExtents_[a]=o.getExtent(Di());var A=[];if(s(A,o),A.length===1)this.rBush_.insert(oa(A[0]),{feature:t,segment:A[0]});else if(A.length>1){var l=A.map(function(c){return oa(c)}),u=A.map(function(c){return{feature:t,segment:c}});this.rBush_.load(l,u)}}}i&&(this.featureChangeListenerKeys_[a]=je(t,xe.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=qP(t);this.addFeature(n)},e.prototype.handleFeatureRemove_=function(t){var n=qP(t);this.removeFeature(n)},e.prototype.handleFeatureChange_=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=Ee(n);i in this.pendingFeatures_||(this.pendingFeatures_[i]=n)}else this.updateFeature_(n)},e.prototype.handleUpEvent=function(t){var n=dF(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=Ee(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&&(Yr(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(Yr),i.length=0,a.forEach(this.forEachFeatureRemove_.bind(this))),r.prototype.setMap.call(this,t),t&&(this.features_?i.push(je(this.features_,si.ADD,this.handleFeatureAdd_,this),je(this.features_,si.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(je(this.source_,ji.ADDFEATURE,this.handleFeatureAdd_,this),je(this.source_,ji.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=oa([a,o]),A=this.rBush_.getInExtent(s),l=A.length;if(l===0)return null;var u=i.getView().getProjection(),c=Mn(n),h,f=1/0,d=this.pixelTolerance_*this.pixelTolerance_,g=function(){if(h){var N=i.getPixelFromCoordinate(h),x=pu(t,N);if(x<=d)return{vertex:h,vertexPixel:[Math.round(N[0]),Math.round(N[1])]}}return null};if(this.vertex_){for(var m=0;m<l;++m){var v=A[m];v.feature.getGeometry().getType()!==pt.CIRCLE&&v.segment.forEach(function(N){var x=Mn(N),S=pu(c,x);S<f&&(h=N,f=S)})}var y=g();if(y)return y}if(this.edge_){for(var m=0;m<l;++m){var w=null,v=A[m];if(v.feature.getGeometry().getType()===pt.CIRCLE){var C=v.feature.getGeometry(),O=id();O&&(C=C.clone().transform(O,u)),w=Rg(jX(c,C))}else{var F=v.segment,I=F[0],T=F[1];T&&(zb[0]=Mn(I),zb[1]=Mn(T),w=gF(c,zb))}if(w){var L=pu(c,w);L<f&&(h=w,f=L)}}var y=g();if(y)return y}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=v8(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}(Es),get=pet;function vet(r){var e=r||{},t=new Ii,n=new tJ(-.005,.05,100),i=e.altShiftDragRotate!==void 0?e.altShiftDragRotate:!0;i&&t.push(new DZ);var a=e.doubleClickZoom!==void 0?e.doubleClickZoom:!0;a&&t.push(new EZ({delta:e.zoomDelta,duration:e.zoomDuration}));var o=e.dragPan!==void 0?e.dragPan:!0;o&&t.push(new NZ({onFocusOnly:e.onFocusOnly,kinetic:n}));var s=e.pinchRotate!==void 0?e.pinchRotate:!0;s&&t.push(new oJ);var A=e.pinchZoom!==void 0?e.pinchZoom:!0;A&&t.push(new lJ({duration:e.zoomDuration}));var l=e.keyboard!==void 0?e.keyboard:!0;l&&(t.push(new YZ),t.push(new ZZ({delta:e.zoomDelta,duration:e.zoomDuration})));var u=e.mouseWheelZoom!==void 0?e.mouseWheelZoom:!0;u&&t.push(new nJ({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var c=e.shiftDragZoom!==void 0?e.shiftDragZoom:!0;return c&&t.push(new KZ({duration:e.zoomDuration})),t}var met=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)}}(),yet=function(r){met(e,r);function e(t){return t=Ce({},t),t.controls||(t.controls=gZ()),t.interactions||(t.interactions=vet({onFocusOnly:!0})),r.call(this,t)||this}return e.prototype.createRenderer=function(){return new r8(this)},e}(w8),GC=yet;function Or(r,e=[]){let t=rh(r);Object.keys(t).forEach(i=>{t[i]=t[i].value});const n=vd(Jn({},t));return ye(r,()=>{t=rh(r),Object.keys(t).forEach(i=>{n[i]!=t[i].value&&!e.includes(i)&&(n[i]=t[i].value)})}),{properties:n}}var me=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t};const _et={name:"ol-map",setup(r,{emit:e}){const{properties:t}=Or(r),n=Fo(null);let i=new GC(t);ye(t,()=>{i.setProperties(t)}),cr(()=>{i.setTarget(n.value)}),pr(()=>{i.setTarget(null),i=null}),Qr("map",i);const a=()=>i.focus(),o=(h,f,d={})=>i.forEachFeatureAtPixel(h,f,d),s=(h,f,d)=>i.forEachLayerAtPixel(h,f,d),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 wet(r,e,t,n,i,a){return ti(),Yi("div",{ref:o=>n.mapRef=o},[Rr(r.$slots,"default")],512)}var Ex=me(_et,[["render",wet]]);function Eet(r,e){const t=Be("map"),{properties:n}=Or(r),i=()=>bA(Jn({},n),{projection:typeof n.projection=="string"?n.projection:new Ru(Jn({},n.projection))});let a=new rl(i());cr(()=>{t.setView(a)}),a.on("change:center",()=>{e("centerChanged",O()),e("zoomChanged",ct())}),a.on("change:resolution",()=>e("resolutionChanged",U())),a.on("change:rotation",()=>e("rotationChanged",At())),ye(n,()=>{let X=i();a.setProperties(X),a.applyOptions_(X)});const o=X=>a.adjustCenter(X),s=(X,It)=>a.adjustResolution(X,It),A=(X,It)=>a.adjustRotation(X,It),l=(X,It)=>a.adjustZoom(X,It),u=X=>a.animate(X),c=()=>a.beginInteraction(),h=X=>a.calculateExtent(X),f=()=>a.cancelAnimations(),d=(X,It,at)=>a.centerOn(X,It,at),g=()=>a.changed(),m=X=>a.dispatchEvent(X),v=(X,It,at)=>a.endInteraction(X,It,at),y=(X,It)=>a.fit(X,It),w=X=>a.get(X),C=()=>a.getAnimating(),O=()=>a.getCenter(),F=()=>a.getInteracting(),I=()=>a.getKeys(),T=()=>a.getMaxResolution(),L=()=>a.getMaxZoom(),N=()=>a.getMinResolution(),x=()=>a.getMinZoom(),S=()=>a.getProjection(),P=()=>a.getProperties(),U=()=>a.getResolution(),tt=(X,It)=>a.getResolutionForExtent(X,It),q=X=>a.getResolutionForZoom(X),rt=()=>a.getResolutions(),nt=()=>a.getRevision(),At=()=>a.getRotation(),ct=()=>a.getZoom();return{view:a,adjustCenter:o,adjustResolution:s,adjustRotation:A,adjustZoom:l,animate:u,beginInteraction:c,calculateExtent:h,cancelAnimations:f,centerOn:d,changed:g,dispatchEvent:m,endInteraction:v,fit:y,get:w,getAnimating:C,getCenter:O,getInteracting:F,getKeys:I,getMaxResolution:T,getMaxZoom:L,getMinResolution:N,getMinZoom:x,getProjection:S,getProperties:P,getResolution:U,getResolutionForExtent:tt,getResolutionForZoom:q,getResolutions:rt,getRevision:nt,getRotation:At,getZoom:ct,getZoomForResolution:X=>a.getZoomForResolution(X),setCenter:X=>a.setCenter(X),setConstrainResolution:X=>a.setConstrainResolution(X),setMaxZoom:X=>a.setMaxZoom(X),setMinZoom:X=>a.setMinZoom(X),setResolution:X=>a.setResolution(X),setRotation:X=>a.setRotation(X),setZoom:X=>a.setZoom(X)}}const Cet={name:"ol-view",setup(r,{emit:e}){const t=Eet(r,e);return Jn({},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 Bet(r,e,t,n,i,a){return Mr("",!0)}var Cx=me(Cet,[["render",Bet]]);const bet={name:"ol-feature",setup(r){const e=Be("vectorSource"),t=Be("vectorLayer"),n=Be("animation",null),{properties:i}=Or(r);let a=Ze(()=>new _r(Jn({},i.properties)));return ye(a,(o,s)=>{e.value.removeFeature(s),e.value.addFeature(o),e.value.changed()}),ye(e,(o,s)=>{s.removeFeature(a.value),o.addFeature(a.value),o.changed()}),cr(()=>{e.value.addFeature(a.value),n!=null&&t.value.animateFeature(a.value,n.value)}),pr(()=>{e.value.removeFeature(a.value)}),Qr("feature",a),Qr("stylable",a),{feature:a}},props:{properties:{type:[FC,Object,Array]}}};function Tet(r,e,t,n,i,a){return Rr(r.$slots,"default")}var Bx=me(bet,[["render",Tet]]);function xet(r,e){const t=Be("map"),n=Fo(null),{properties:i}=Or(r);let a=Ze(()=>new T8(i));cr(()=>{t.addOverlay(a.value)}),pr(()=>{t.removeOverlay(a.value)}),ye(a,(g,m)=>{t.removeOverlay(m),t.addOverlay(g)}),E4(()=>{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=g=>a.value.panIntoView(g),c=g=>a.value.setElement(g);return{overlay:a,htmlContent:n,getOffset:s,getPosition:A,getPositioning:l,panIntoView:u,setElement:c,setOffset:g=>a.value.setOffset(g),setPosition:g=>a.value.setPosition(g),setPositioning:g=>a.value.setPositioning(g)}}const Iet={name:"ol-overlay",setup(r,{emit:e}){const t=new xet(r,e);return Jn({},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}}},Let={ref:"htmlContent"};function Oet(r,e,t,n,i,a){return ti(),Yi("div",Let,[Rr(r.$slots,"default",{position:t.position})],512)}var bx=me(Iet,[["render",Oet]]),J8=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)}}(),Yn={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},Fet=function(r){J8(e,r);function e(t){var n=r.call(this,xe.ERROR)||this;return n.code=t.code,n.message=t.message,n}return e}(Vo),Ret=function(r){J8(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_=LC,n.watchId_=void 0,n.addChangeListener(Yn.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(Yn.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_=nd(Ve("EPSG:4326"),t),this.position_&&this.set(Yn.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(Yn.ACCURACY,n.accuracy),this.set(Yn.ALTITUDE,n.altitude===null?void 0:n.altitude),this.set(Yn.ALTITUDE_ACCURACY,n.altitudeAccuracy===null?void 0:n.altitudeAccuracy),this.set(Yn.HEADING,n.heading===null?void 0:Kc(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(Yn.POSITION,i),this.set(Yn.SPEED,n.speed===null?void 0:n.speed);var a=S3(this.position_,n.accuracy);a.applyTransform(this.transform_),this.set(Yn.ACCURACY_GEOMETRY,a),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Fet(t))},e.prototype.getAccuracy=function(){return this.get(Yn.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(Yn.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(Yn.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(Yn.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(Yn.HEADING)},e.prototype.getPosition=function(){return this.get(Yn.POSITION)},e.prototype.getProjection=function(){return this.get(Yn.PROJECTION)},e.prototype.getSpeed=function(){return this.get(Yn.SPEED)},e.prototype.getTracking=function(){return this.get(Yn.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(Yn.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(Yn.PROJECTION,Ve(t))},e.prototype.setTracking=function(t){this.set(Yn.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(Yn.TRACKING_OPTIONS,t)},e}(Oi),Met=Ret;const Net={name:"ol-geolocation",emits:["positionChanged","speedChanged","headingChanged","altitudeChanged","altitudeAccuracyChanged","accuracyGeometryChanged"],setup(r,{emit:e}){const{properties:t}=Or(r);let n=Ze(()=>{let h=new Met(t);return h.on("change",c),h});const i=Fo([]),a=Fo(0),o=Fo(0),s=Fo(0),A=Fo(0),l=Fo(0),u=Fo({});ye(i,()=>{e("positionChanged",i.value)}),ye(A,()=>{e("speedChanged",A.value)}),ye(l,()=>{e("headingChanged",l.value)}),ye(o,()=>{e("altitudeChanged",o.value)}),ye(s,()=>{e("altitudeAccuracyChanged",s.value)}),ye(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 ye(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 Pet(r,e,t,n,i,a){return Rr(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 Tx=me(Net,[["render",Pet]]);function Uet(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 ad=1,od=2,tw=3,Det=4,Sx=5,ZP=6378137,Qet=6356752314e-3,JP=.0066943799901413165,Ay=484813681109536e-20,ee=Math.PI/2,ket=.16666666666666666,Het=.04722222222222222,Get=.022156084656084655,he=1e-10,va=.017453292519943295,al=57.29577951308232,An=Math.PI/4,Vy=Math.PI*2,Ci=3.14159265359,jo={};jo.greenwich=0;jo.lisbon=-9.131906111111;jo.paris=2.337229166667;jo.bogota=-74.080916666667;jo.madrid=-3.687938888889;jo.rome=12.452333333333;jo.bern=7.439583333333;jo.jakarta=106.807719444444;jo.ferro=-17.666666666667;jo.brussels=4.367975;jo.stockholm=18.058277777778;jo.athens=23.7163375;jo.oslo=10.722916666667;var $et={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},t5=/[\s_\-\/\(\)]/g;function hh(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace(t5,""),i=-1,a,o;++i<t.length;)if(a=t[i],o=a.toLowerCase().replace(t5,""),o===n)return r[a]}function xx(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*va},lat_1:function(s){e.lat1=s*va},lat_2:function(s){e.lat2=s*va},lat_ts:function(s){e.lat_ts=s*va},lon_0:function(s){e.long0=s*va},lon_1:function(s){e.long1=s*va},lon_2:function(s){e.long2=s*va},alpha:function(s){e.alpha=parseFloat(s)*va},gamma:function(s){e.rectified_grid_angle=parseFloat(s)},lonc:function(s){e.longc=s*va},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=hh($et,s);A&&(e.to_meter=A.to_meter)},from_greenwich:function(s){e.from_greenwich=s*va},pm:function(s){var A=hh(jo,s);e.from_greenwich=(A||parseFloat(s))*va},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 jy=1,tH=2,eH=3,aE=4,rH=5,YF=-1,Vet=/\s/,jet=/[A-Za-z]/,Ket=/[A-Za-z84_]/,$C=/[,\]]/,nH=/[\d\.E\-\+]/;function Nu(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=jy}Nu.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==aE)for(;Vet.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case jy:return this.neutral(r);case tH:return this.keyword(r);case aE:return this.quoted(r);case rH:return this.afterquote(r);case eH:return this.number(r);case YF:return}};Nu.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=aE;return}if($C.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)};Nu.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=jy;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=jy,this.currentObject=this.stack.pop(),this.currentObject||(this.state=YF);return}};Nu.prototype.number=function(r){if(nH.test(r)){this.word+=r;return}if($C.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)};Nu.prototype.quoted=function(r){if(r==='"'){this.state=rH;return}this.word+=r};Nu.prototype.keyword=function(r){if(Ket.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=jy;return}if($C.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)};Nu.prototype.neutral=function(r){if(jet.test(r)){this.word=r,this.state=tH;return}if(r==='"'){this.word="",this.state=aE;return}if(nH.test(r)){this.word=r,this.state=eH;return}if($C.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)};Nu.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===YF)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Wet(r){var e=new Nu(r);return e.output()}function e5(r,e,t){Array.isArray(e)&&(t.unshift(e),e=null);var n=e?{}:r,i=t.reduce(function(a,o){return qp(o,a),a},n);e&&(r[e]=i)}function qp(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]={},qp(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&&qp(r[2],e[t]);return;case"SPHEROID":case"ELLIPSOID":e[t]={name:r[0],a:r[1],rf:r[2]},r.length===4&&qp(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]],e5(e,t,r);return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return qp(r,e[t]);return e5(e,t,r)}}var zet=.017453292519943295;function Yet(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 Kl(r){return r*zet}function Xet(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 Yet(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",Kl],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Kl],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",Kl],["lat0","latitude_of_origin",Kl],["lat0","standard_parallel_1",Kl],["lat1","standard_parallel_1",Kl],["lat2","standard_parallel_2",Kl],["azimuth","Azimuth"],["alpha","azimuth",Kl],["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=Kl(r.lat1>0?90:-90),r.lat_ts=r.lat1)}function iH(r){var e=Wet(r),t=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",t]);var i={};return qp(e,i),Xet(i),i}function Ao(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Ao[r]=xx(arguments[1]):Ao[r]=iH(arguments[1]):Ao[r]=t}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Ao.apply(e,n):Ao(n)});if(typeof r=="string"){if(r in Ao)return Ao[r]}else"EPSG"in r?Ao["EPSG:"+r.EPSG]=r:"ESRI"in r?Ao["ESRI:"+r.ESRI]=r:"IAU2000"in r?Ao["IAU2000:"+r.IAU2000]=r:console.log(r);return}}Uet(Ao);function qet(r){return typeof r=="string"}function Zet(r){return r in Ao}var Jet=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function trt(r){return Jet.some(function(e){return r.indexOf(e)>-1})}var ert=["3857","900913","3785","102113"];function rrt(r){var e=hh(r,"authority");if(e){var t=hh(e,"epsg");return t&&ert.indexOf(t)>-1}}function nrt(r){var e=hh(r,"extension");if(e)return hh(e,"proj4")}function irt(r){return r[0]==="+"}function art(r){if(qet(r)){if(Zet(r))return Ao[r];if(trt(r)){var e=iH(r);if(rrt(e))return Ao["EPSG:3857"];var t=nrt(e);return t?xx(t):e}if(irt(r))return xx(r)}else return r}function r5(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 yl(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function F0(r){return r<0?-1:1}function we(r){return Math.abs(r)<=Ci?r:r-F0(r)*Vy}function vA(r,e,t){var n=r*t,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(ee-e))/n}function Ky(r,e){for(var t=.5*r,n,i,a=ee-2*Math.atan(e),o=0;o<=15;o++)if(n=r*Math.sin(a),i=ee-2*Math.atan(e*Math.pow((1-n)/(1+n),t))-a,a+=i,Math.abs(i)<=1e-10)return a;return-9999}function ort(){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=yl(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function srt(r){var e=r.x,t=r.y;if(t*al>90&&t*al<-90&&e*al>180&&e*al<-180)return null;var n,i;if(Math.abs(Math.abs(t)-ee)<=he)return null;if(this.sphere)n=this.x0+this.a*this.k0*we(e-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(An+.5*t));else{var a=Math.sin(t),o=vA(this.e,t,a);n=this.x0+this.a*this.k0*we(e-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return r.x=n,r.y=i,r}function Art(r){var e=r.x-this.x0,t=r.y-this.y0,n,i;if(this.sphere)i=ee-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(i=Ky(this.e,a),i===-9999)return null}return n=we(this.long0+e/(this.a*this.k0)),r.x=n,r.y=i,r}var lrt=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],urt={init:ort,forward:srt,inverse:Art,names:lrt};function crt(){}function n5(r){return r}var hrt=["longlat","identity"],frt={init:crt,forward:n5,inverse:n5,names:hrt},drt=[urt,frt],ew={},oE=[];function aH(r,e){var t=oE.length;return r.names?(oE[t]=r,r.names.forEach(function(n){ew[n.toLowerCase()]=t}),this):(console.log(e),!0)}function prt(r){if(!r)return!1;var e=r.toLowerCase();if(typeof ew[e]<"u"&&oE[ew[e]])return oE[ew[e]]}function grt(){drt.forEach(aH)}var vrt={start:grt,add:aH,get:prt},Ar={};Ar.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Ar.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Ar.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Ar.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Ar.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Ar.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Ar.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Ar.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Ar.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Ar.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Ar.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Ar.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Ar.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Ar.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Ar.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Ar.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Ar.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Ar.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Ar.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Ar.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Ar.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Ar.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Ar.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Ar.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Ar.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Ar.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Ar.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Ar.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Ar.hough={a:6378270,rf:297,ellipseName:"Hough"};Ar.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Ar.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Ar.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Ar.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Ar.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Ar.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Ar.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Ar.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Ar.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Ar.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Ar.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Ar.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var mrt=Ar.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ar.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function yrt(r,e,t,n){var i=r*r,a=e*e,o=(i-a)/i,s=0;n?(r*=1-o*(ket+o*(Het+o*Get)),i=r*r,o=0):s=Math.sqrt(o);var A=(i-a)/a;return{es:o,e:s,ep2:A}}function _rt(r,e,t,n,i){if(!r){var a=hh(Ar,n);a||(a=mrt),r=a.a,e=a.b,t=a.rf}return t&&!e&&(e=(1-1/t)*r),(t===0||Math.abs(r-e)<he)&&(i=!0,e=r),{a:r,b:e,rf:t,sphere:i}}var ua={};ua.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};ua.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};ua.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};ua.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};ua.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};ua.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};ua.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};ua.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};ua.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};ua.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};ua.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};ua.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};ua.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};ua.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};ua.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};ua.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};ua.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function wrt(r,e,t,n,i,a,o){var s={};return r===void 0||r==="none"?s.datum_type=Sx:s.datum_type=Det,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=ad),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=od,s.datum_params[3]*=Ay,s.datum_params[4]*=Ay,s.datum_params[5]*=Ay,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=tw,s.grids=o),s.a=t,s.b=n,s.es=i,s.ep2=a,s}var oH={};function Ert(r,e){var t=new DataView(e),n=brt(t),i=Trt(t,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=Srt(t,i,n),o={header:i,subgrids:a};return oH[r]=o,o}function Crt(r){if(r===void 0)return null;var e=r.split(",");return e.map(Brt)}function Brt(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:oH[r]||null,isNull:!1}}function Zp(r){return r/3600*Math.PI/180}function brt(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 Trt(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:Ix(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 Ix(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function Srt(r,e,t){for(var n=176,i=[],a=0;a<e.nSubgrids;a++){var o=Irt(r,n,t),s=Lrt(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:[Zp(o.lowerLongitude),Zp(o.lowerLatitude)],del:[Zp(o.longitudeInterval),Zp(o.latitudeInterval)],lim:[A,l],count:o.gridNodeCount,cvs:xrt(s)})}return i}function xrt(r){return r.map(function(e){return[Zp(e.longitudeShift),Zp(e.latitudeShift)]})}function Irt(r,e,t){return{name:Ix(r,e+8,e+16).trim(),parent:Ix(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 Lrt(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 cl(r,e){if(!(this instanceof cl))return new cl(r);e=e||function(l){if(l)throw l};var t=art(r);if(typeof t!="object"){e(r);return}var n=cl.projections.get(t.projName);if(!n){e(r);return}if(t.datumCode&&t.datumCode!=="none"){var i=hh(ua,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=_rt(t.a,t.b,t.rf,t.ellps,t.sphere),o=yrt(a.a,a.b,a.rf,t.R_A),s=Crt(t.nadgrids),A=t.datum||wrt(t.datumCode,t.datum_params,a.a,a.b,o.es,o.ep2,s);r5(this,t),r5(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)}cl.projections=vrt;cl.projections.start();function Ort(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===ad?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===od?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 sH(r,e,t){var n=r.x,i=r.y,a=r.z?r.z:0,o,s,A,l;if(i<-ee&&i>-1.001*ee)i=-ee;else if(i>ee&&i<1.001*ee)i=ee;else{if(i<-ee)return{x:-1/0,y:-1/0,z:r.z};if(i>ee)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 AH(r,e,t,n){var i=1e-12,a=i*i,o=30,s,A,l,u,c,h,f,d,g,m,v,y,w,C=r.x,O=r.y,F=r.z?r.z:0,I,T,L;if(s=Math.sqrt(C*C+O*O),A=Math.sqrt(C*C+O*O+F*F),s/t<i){if(I=0,A/t<i)return T=ee,L=-n,{x:r.x,y:r.y,z:r.z}}else I=Math.atan2(O,C);l=F/A,u=s/A,c=1/Math.sqrt(1-e*(2-e)*u*u),d=u*(1-e)*c,g=l*c,w=0;do w++,f=t/Math.sqrt(1-e*g*g),L=s*d+F*g-f*(1-e*g*g),h=e*f/(f+L),c=1/Math.sqrt(1-h*(2-h)*u*u),m=u*(1-h)*c,v=l*c,y=v*d-m*g,d=m,g=v;while(y*y>a&&w<o);return T=Math.atan(v/Math.abs(m)),{x:I,y:T,z:L}}function Frt(r,e,t){if(e===ad)return{x:r.x+t[0],y:r.y+t[1],z:r.z+t[2]};if(e===od){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 Rrt(r,e,t){if(e===ad)return{x:r.x-t[0],y:r.y-t[1],z:r.z-t[2]};if(e===od){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 q_(r){return r===ad||r===od}function Mrt(r,e,t){if(Ort(r,e)||r.datum_type===Sx||e.datum_type===Sx)return t;var n=r.a,i=r.es;if(r.datum_type===tw){var a=i5(r,!1,t);if(a!==0)return;n=ZP,i=JP}var o=e.a,s=e.b,A=e.es;if(e.datum_type===tw&&(o=ZP,s=Qet,A=JP),i===A&&n===o&&!q_(r.datum_type)&&!q_(e.datum_type))return t;if(t=sH(t,i,n),q_(r.datum_type)&&(t=Frt(t,r.datum_type,r.datum_params)),q_(e.datum_type)&&(t=Rrt(t,e.datum_type,e.datum_params)),t=AH(t,A,o,s),e.datum_type===tw){var l=i5(e,!0,t);if(l!==0)return}return t}function i5(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=Nrt(n,e,A),!isNaN(i.x)))break}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*al+" "+n.y*al+" tried: '"+a+"'"),-1):(t.x=-i.x,t.y=i.y,0)}function Nrt(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=we(i.x-Math.PI)+Math.PI;var a=a5(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=a5(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=we(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 a5(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),d=(1-i.x)*i.y;return a.x=f*s.x+h*A.x+d*u.x+c*l.x,a.y=f*s.y+h*A.y+d*u.y+c*l.y,a}function o5(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 lH(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 Prt(r){s5(r.x),s5(r.y)}function s5(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 Urt(r,e){return(r.datum.datum_type===ad||r.datum.datum_type===od)&&e.datumCode!=="WGS84"||(e.datum.datum_type===ad||e.datum.datum_type===od)&&r.datumCode!=="WGS84"}function sE(r,e,t,n){var i;if(Array.isArray(t)&&(t=lH(t)),Prt(t),r.datum&&e.datum&&Urt(r,e)&&(i=new cl("WGS84"),t=sE(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=o5(r,!1,t)),r.projName==="longlat")t={x:t.x*va,y:t.y*va,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=Mrt(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*al,y:t.y*al,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"?o5(e,!0,t):t}var A5=cl("WGS84");function Yb(r,e,t,n){var i,a,o;return Array.isArray(t)?(i=sE(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=sE(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 l5(r){return r instanceof cl?r:r.oProj?r.oProj:cl(r)}function Go(r,e,t){r=l5(r);var n=!1,i;return typeof e>"u"?(e=r,r=A5,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=A5,n=!0),e=l5(e),t?Yb(r,e,t):(i={forward:function(a,o){return Yb(r,e,a,o)},inverse:function(a,o){return Yb(e,r,a,o)}},n&&(i.oProj=e),i)}var u5=6,uH="AJSAJS",cH="AFAFAF",Jp=65,Lo=73,Rs=79,Pm=86,Um=90,Drt={forward:hH,inverse:Qrt,toPoint:fH};function hH(r,e){return e=e||5,Grt(krt({lat:r[1],lon:r[0]}),e)}function Qrt(r){var e=XF(pH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function fH(r){var e=XF(pH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Xb(r){return r*(Math.PI/180)}function c5(r){return 180*(r/Math.PI)}function krt(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,a=.9996,o,s,A,l,u,c,h,f=Xb(e),d=Xb(t),g,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,g=Xb(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)*(d-g),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 v=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,y=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&&(y+=1e7),{northing:Math.round(y),easting:Math.round(v),zoneNumber:m,zoneLetter:Hrt(e)}}function XF(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,d,g,m,v,y,w=t-5e5,C=e;n<"N"&&(C-=1e7),m=(i-1)*6-180+3,A=s/(1-s),g=C/a,v=g/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),y=v+(3*l/2-27*l*l*l/32)*Math.sin(2*v)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*v)+151*l*l*l/96*Math.sin(6*v),u=o/Math.sqrt(1-s*Math.sin(y)*Math.sin(y)),c=Math.tan(y)*Math.tan(y),h=A*Math.cos(y)*Math.cos(y),f=o*(1-s)/Math.pow(1-s*Math.sin(y)*Math.sin(y),1.5),d=w/(u*a);var O=y-u*Math.tan(y)/f*(d*d/2-(5+3*c+10*h-4*h*h-9*A)*d*d*d*d/24+(61+90*c+298*h+45*c*c-252*A-3*h*h)*d*d*d*d*d*d/720);O=c5(O);var F=(d-(1+2*c+h)*d*d*d/6+(5-2*h+28*c-3*h*h+8*A+24*c*c)*d*d*d*d*d/120)/Math.cos(y);F=m+c5(F);var I;if(r.accuracy){var T=XF({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});I={top:T.lat,right:T.lon,bottom:O,left:F}}else I={lat:O,lon:F};return I}function Hrt(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 Grt(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+$rt(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function $rt(r,e,t){var n=dH(t),i=Math.floor(r/1e5),a=Math.floor(e/1e5)%20;return Vrt(i,a,n)}function dH(r){var e=r%u5;return e===0&&(e=u5),e}function Vrt(r,e,t){var n=t-1,i=uH.charCodeAt(n),a=cH.charCodeAt(n),o=i+r-1,s=a+e,A=!1;o>Um&&(o=o-Um+Jp-1,A=!0),(o===Lo||i<Lo&&o>Lo||(o>Lo||i<Lo)&&A)&&o++,(o===Rs||i<Rs&&o>Rs||(o>Rs||i<Rs)&&A)&&(o++,o===Lo&&o++),o>Um&&(o=o-Um+Jp-1),s>Pm?(s=s-Pm+Jp-1,A=!0):A=!1,(s===Lo||a<Lo&&s>Lo||(s>Lo||a<Lo)&&A)&&s++,(s===Rs||a<Rs&&s>Rs||(s>Rs||a<Rs)&&A)&&(s++,s===Lo&&s++),s>Pm&&(s=s-Pm+Jp-1);var l=String.fromCharCode(o)+String.fromCharCode(s);return l}function pH(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=dH(o),l=jrt(t.charAt(0),A),u=Krt(t.charAt(1),A);u<Wrt(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,d=0,g,m,v,y,w;return h>0&&(g=1e5/Math.pow(10,h),m=r.substring(a,a+h),f=parseFloat(m)*g,v=r.substring(a+h),d=parseFloat(v)*g),y=f+l,w=d+u,{easting:y,northing:w,zoneLetter:s,zoneNumber:o,accuracy:g}}function jrt(r,e){for(var t=uH.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Rs&&t++,t>Um){if(i)throw"Bad character: "+r;t=Jp,i=!0}n+=1e5}return n}function Krt(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=cH.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Rs&&t++,t>Pm){if(i)throw"Bad character: "+r;t=Jp,i=!0}n+=1e5}return n}function Wrt(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 Ng(r,e,t){if(!(this instanceof Ng))return new Ng(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")}Ng.fromMGRS=function(r){return new Ng(fH(r))};Ng.prototype.toMGRS=function(r){return hH([this.x,this.y],r)};var zrt=1,Yrt=.25,h5=.046875,f5=.01953125,d5=.01068115234375,Xrt=.75,qrt=.46875,Zrt=.013020833333333334,Jrt=.007120768229166667,tnt=.3645833333333333,ent=.005696614583333333,rnt=.3076171875;function gH(r){var e=[];e[0]=zrt-r*(Yrt+r*(h5+r*(f5+r*d5))),e[1]=r*(Xrt-r*(h5+r*(f5+r*d5)));var t=r*r;return e[2]=t*(qrt-r*(Zrt+r*Jrt)),t*=r,e[3]=t*(tnt-r*ent),e[4]=t*r*rnt,e}function VC(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 nnt=20;function vH(r,e,t){for(var n=1/(1-e),i=r,a=nnt;a;--a){var o=Math.sin(i),s=1-e*o*o;if(s=(VC(i,o,Math.cos(i),t)-r)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)<he)return i}return i}function int(){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=gH(this.es),this.ml0=VC(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function ant(r){var e=r.x,t=r.y,n=we(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),d=Math.abs(A)>he?Math.tan(t):0,g=Math.pow(d,2),m=Math.pow(g,2);i=1-this.es*Math.pow(s,2),u=u/Math.sqrt(i);var v=VC(t,s,A,this.en);a=this.a*(this.k0*u*(1+c/6*(1-g+h+c/20*(5-18*g+m+14*h-58*g*h+c/42*(61+179*m-m*g-479*g)))))+this.x0,o=this.a*(this.k0*(v-this.ml0+s*n*u/2*(1+c/12*(5-g+9*h+4*f+c/30*(61+m-58*g+270*h-330*g*h+c/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var l=A*Math.sin(n);if(Math.abs(Math.abs(l)-1)<he)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>he)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 ont(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=vH(e,this.es,this.en),Math.abs(t)<ee){var c=Math.sin(t),h=Math.cos(t),f=Math.abs(h)>he?Math.tan(t):0,d=this.ep2*Math.pow(h,2),g=Math.pow(d,2),m=Math.pow(f,2),v=Math.pow(m,2);e=1-this.es*Math.pow(c,2);var y=a*Math.sqrt(e)/this.k0,w=Math.pow(y,2);e=e*f,n=t-e*w/(1-this.es)*.5*(1-w/12*(5+3*m-9*d*m+d-4*g-w/30*(61+90*m-252*d*m+45*v+46*d-w/56*(1385+3633*m+4095*v+1574*v*m)))),i=we(this.long0+y*(1-w/6*(1+2*m+d-w/20*(5+28*m+24*v+8*d*m+6*d-w/42*(61+662*m+1320*v+720*v*m))))/h)}else n=ee*F0(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=we(Math.atan2(A,u)+this.long0)}return r.x=i,r.y=n,r}var snt=["Fast_Transverse_Mercator","Fast Transverse Mercator"],rw={init:int,forward:ant,inverse:ont,names:snt};function mH(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function jC(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 Ant(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function lnt(r){var e=Math.abs(r);return e=Ant(e*(1+e/(jC(1,e)+1))),r<0?-e:e}function qF(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 unt(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 cnt(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function yH(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),a=mH(t),o=cnt(t),s=2*i*o,A=-2*n*a,l=r.length-1,u=r[l],c=0,h=0,f=0,d,g;--l>=0;)d=h,g=c,h=u,c=f,u=-d+s*h-A*c+r[l],f=-g+A*h+s*c;return s=n*o,A=i*a,[s*u-A*f,s*f+A*u]}function hnt(){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&&(rw.init.apply(this),this.forward=rw.forward,this.inverse=rw.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=qF(this.cbg,this.lat0);this.Zb=-this.Qn*(n+unt(this.gtu,2*n))}function fnt(r){var e=we(r.x-this.long0),t=r.y;t=qF(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,jC(n,i*o)),e=lnt(Math.tan(e));var s=yH(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 dnt(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=yH(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(mH(e));var o=Math.sin(t),s=Math.cos(t),A=Math.sin(e),l=Math.cos(e);t=Math.atan2(o*l,jC(A,l*s)),e=Math.atan2(A,l*s),n=we(e+this.long0),i=qF(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var pnt=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],nw={init:hnt,forward:fnt,inverse:dnt,names:pnt};function gnt(r,e){if(r===void 0){if(r=Math.floor((we(e)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var vnt="etmerc";function mnt(){var r=gnt(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*va,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,nw.init.apply(this),this.forward=nw.forward,this.inverse=nw.inverse}var ynt=["Universal Transverse Mercator System","utm"],_nt={init:mnt,names:ynt,dependsOn:vnt};function ZF(r,e){return Math.pow((1-r)/(1+r),e)}var wnt=20;function Ent(){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+An)/(Math.pow(Math.tan(.5*this.lat0+An),this.C)*ZF(this.e*r,this.ratexp))}function Cnt(r){var e=r.x,t=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+An),this.C)*ZF(this.e*Math.sin(t),this.ratexp))-ee,r.x=this.C*e,r}function Bnt(r){for(var e=1e-14,t=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+An)/this.K,1/this.C),a=wnt;a>0&&(n=2*Math.atan(i*ZF(this.e*Math.sin(r.y),-.5*this.e))-ee,!(Math.abs(n-r.y)<e));--a)r.y=n;return a?(r.x=t,r.y=n,r):null}var bnt=["gauss"],JF={init:Ent,forward:Cnt,inverse:Bnt,names:bnt};function Tnt(){JF.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 Snt(r){var e,t,n,i;return r.x=we(r.x-this.long0),JF.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 xnt(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,JF.inverse.apply(this,[r]),r.x=we(r.x+this.long0),r}var Int=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],Lnt={init:Tnt,forward:Snt,inverse:xnt,names:Int};function Ont(r,e,t){return e*=t,Math.tan(.5*(ee+r))*Math.pow((1-e)/(1+e),.5*t)}function Fnt(){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)<=he&&(this.k0=.5*(1+F0(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=he&&(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)<=he&&(this.k0=.5*this.cons*yl(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/vA(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=yl(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-ee,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function Rnt(r){var e=r.x,t=r.y,n=Math.sin(t),i=Math.cos(t),a,o,s,A,l,u,c=we(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=he&&Math.abs(t+this.lat0)<=he?(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))-ee,A=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=he?(l=vA(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)<he?(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 Mnt(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<=he?(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)<he?this.lat0>0?e=we(this.long0+Math.atan2(r.x,-1*r.y)):e=we(this.long0+Math.atan2(r.x,r.y)):e=we(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)<=he){if(o<=he)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*Ky(this.e,n),e=this.con*we(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<=he?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/o),e=we(this.long0+Math.atan2(r.x*Math.sin(i),o*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),t=-1*Ky(this.e,Math.tan(.5*(ee+a)));return r.x=e,r.y=t,r}var Nnt=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],Pnt={init:Fnt,forward:Rnt,inverse:Mnt,names:Nnt,ssfn_:Ont};function Unt(){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 Dnt(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 Qnt(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 knt=["somerc"],Hnt={init:Unt,forward:Dnt,inverse:Qnt,names:knt},Qp=1e-7;function Gnt(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 $nt(){var r,e,t,n,i,a,o,s,A,l,u=0,c,h=0,f=0,d=0,g=0,m=0,v=0;this.no_off=Gnt(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),y&&(v=this.alpha),w&&(u=this.rectified_grid_angle*va),y||w)h=this.longc;else if(f=this.long1,g=this.lat1,d=this.long2,m=this.lat2,Math.abs(g-m)<=Qp||(r=Math.abs(g))<=Qp||Math.abs(r-ee)<=Qp||Math.abs(Math.abs(this.lat0)-ee)<=Qp||Math.abs(Math.abs(m)-ee)<=Qp)throw new Error;var C=1-this.es;e=Math.sqrt(C),Math.abs(this.lat0)>he?(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/C),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(vA(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),y||w?(y?(c=Math.asin(Math.sin(v)/n),w||(u=v)):(c=u,v=Math.asin(n*Math.sin(c))),this.lam0=h-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(a=Math.pow(vA(this.e,g,Math.sin(g)),this.B),o=Math.pow(vA(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-d,r<-Math.pi?d-=Vy:r>Math.pi&&(d+=Vy),this.lam0=we(.5*(f+d)-Math.atan(l*Math.tan(.5*this.B*(f-d))/A)/this.B),c=Math.atan(2*Math.sin(this.B*we(f-this.lam0))/(i-1/i)),u=v=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(v))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(An-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(An+i))}function Vnt(r){var e={},t,n,i,a,o,s,A,l;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-ee)>he){if(o=this.E/Math.pow(vA(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)<he)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*r.x),Math.abs(s)<Qp?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 jnt(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)<he)A.x=0,A.y=s<0?-ee:ee;else{if(A.y=this.E/Math.sqrt((1+s)/(1-s)),A.y=Ky(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 Knt=["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"],Wnt={init:$nt,forward:Vnt,inverse:jnt,names:Knt};function znt(){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)<he)){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=yl(this.e,e,t),i=vA(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=yl(this.e,a,o),A=vA(this.e,this.lat2,a),l=vA(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>he?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 Ynt(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=he&&(t=F0(t)*(ee-2*he));var n=Math.abs(Math.abs(t)-ee),i,a;if(n>he)i=vA(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*we(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 Xnt(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=Ky(this.e,n),i===-9999)return null}else i=-ee;return a=we(A/this.ns+this.long0),r.x=a,r.y=i,r}var qnt=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],Znt={init:znt,forward:Ynt,inverse:Xnt,names:qnt};function Jnt(){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 tit(r){var e,t,n,i,a,o,s,A=r.x,l=r.y,u=we(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 eit(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 rit=["Krovak","krovak"],nit={init:Jnt,forward:tit,inverse:eit,names:rit};function fo(r,e,t,n,i){return r*i-e*Math.sin(2*i)+t*Math.sin(4*i)-n*Math.sin(6*i)}function R0(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function M0(r){return .375*r*(1+.25*r*(1+.46875*r))}function N0(r){return .05859375*r*r*(1+.75*r)}function P0(r){return r*r*r*(35/3072)}function Pg(r,e,t){var n=e*t;return r/Math.sqrt(1-n*n)}function Av(r){return Math.abs(r)<ee?r:r-F0(r)*Math.PI}function AE(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 iit(){this.sphere||(this.e0=R0(this.es),this.e1=M0(this.es),this.e2=N0(this.es),this.e3=P0(this.es),this.ml0=this.a*fo(this.e0,this.e1,this.e2,this.e3,this.lat0))}function ait(r){var e,t,n=r.x,i=r.y;if(n=we(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=Pg(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*fo(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 oit(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=AE(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-ee)<=he)return r.x=this.long0,r.y=ee,t<0&&(r.y*=-1),r;var A=Pg(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=we(i+this.long0),r.y=Av(n),r}var sit=["Cassini","Cassini_Soldner","cass"],Ait={init:iit,forward:ait,inverse:oit,names:sit};function Yc(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 lit=1,uit=2,cit=3,hit=4;function fit(){var r=Math.abs(this.lat0);if(Math.abs(r-ee)<he?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<he?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=Yc(this.e,1),this.mmf=.5/(1-this.es),this.apa=Eit(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=Yc(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 dit(r){var e,t,n,i,a,o,s,A,l,u,c=r.x,h=r.y;if(c=we(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<=he)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)<he)return null;t=An-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=Yc(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=ee+h,o=this.qp-o;break;case this.S_POLE:l=h-ee,o=this.qp+o;break}if(Math.abs(l)<he)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 pit(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)<=he?0:Math.asin(t*h/c),e*=h,t=u*c;break;case this.OBLIQ:i=Math.abs(c)<=he?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=ee-i;break;case this.S_POLE:i-=ee;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<he)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=Cit(Math.asin(l),this.apa)}return r.x=we(this.long0+n),r.y=i,r}var git=.3333333333333333,vit=.17222222222222222,mit=.10257936507936508,yit=.06388888888888888,_it=.0664021164021164,wit=.016415012942191543;function Eit(r){var e,t=[];return t[0]=r*git,e=r*r,t[0]+=e*vit,t[1]=e*yit,e*=r,t[0]+=e*mit,t[1]+=e*_it,t[2]=e*wit,t}function Cit(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 Bit=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],bit={init:fit,forward:dit,inverse:pit,names:Bit,S_POLE:lit,N_POLE:uit,EQUIT:cit,OBLIQ:hit};function fh(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function Tit(){Math.abs(this.lat1+this.lat2)<he||(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=yl(this.e3,this.sin_po,this.cos_po),this.qs1=Yc(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=yl(this.e3,this.sin_po,this.cos_po),this.qs2=Yc(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=Yc(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>he?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 Sit(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=Yc(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*we(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 xit(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=we(i/this.ns0+this.long0),r.x=a,r.y=o,r}function Iit(r,e){var t,n,i,a,o,s=fh(.5*e);if(r<he)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 Lit=["Albers_Conic_Equal_Area","Albers","aea"],Oit={init:Tit,forward:Sit,inverse:xit,names:Lit,phi1z:Iit};function Fit(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Rit(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=we(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)<=he?(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 Mit(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=fh(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=we(this.long0+a)):(o=this.phic0,a=0),r.x=a,r.y=o,r}var Nit=["gnom"],Pit={init:Fit,forward:Rit,inverse:Mit,names:Nit};function Uit(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*ee:ee;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 Dit(){this.sphere||(this.k0=yl(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Qit(r){var e=r.x,t=r.y,n,i,a=we(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=Yc(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 kit(r){r.x-=this.x0,r.y-=this.y0;var e,t;return this.sphere?(e=we(this.long0+r.x/this.a/Math.cos(this.lat_ts)),t=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(t=Uit(this.e,2*r.y*this.k0/this.a),e=we(this.long0+r.x/(this.a*this.k0))),r.x=e,r.y=t,r}var Hit=["cea"],Git={init:Dit,forward:Qit,inverse:kit,names:Hit};function $it(){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 Vit(r){var e=r.x,t=r.y,n=we(e-this.long0),i=Av(t-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function jit(r){var e=r.x,t=r.y;return r.x=we(this.long0+(e-this.x0)/(this.a*this.rc)),r.y=Av(this.lat0+(t-this.y0)/this.a),r}var Kit=["Equirectangular","Equidistant_Cylindrical","eqc"],Wit={init:$it,forward:Vit,inverse:jit,names:Kit},p5=20;function zit(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=R0(this.es),this.e1=M0(this.es),this.e2=N0(this.es),this.e3=P0(this.es),this.ml0=this.a*fo(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Yit(r){var e=r.x,t=r.y,n,i,a,o=we(e-this.long0);if(a=o*Math.sin(t),this.sphere)Math.abs(t)<=he?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(a)/Math.tan(t),i=this.a*(Av(t-this.lat0)+(1-Math.cos(a))/Math.tan(t)));else if(Math.abs(t)<=he)n=this.a*o,i=-1*this.ml0;else{var s=Pg(this.a,this.e,Math.sin(t))/Math.tan(t);n=s*Math.sin(a),i=this.a*fo(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 Xit(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)<=he)e=we(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=p5;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)<=he){t=A;break}e=we(this.long0+Math.asin(n*Math.tan(A)/this.a)/Math.sin(t))}else if(Math.abs(i+this.ml0)<=he)t=0,e=we(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,d,g;for(a=p5;a;--a)if(g=this.e*Math.sin(A),c=Math.sqrt(1-g*g)*Math.tan(A),h=this.a*fo(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),d=h/this.a,l=(o*(c*d+1)-d-.5*c*(d*d+s))/(this.es*Math.sin(2*A)*(d*d+s-2*o*d)/(4*c)+(o-d)*(c*f-2/Math.sin(2*A))-f),A-=l,Math.abs(l)<=he){t=A;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=we(this.long0+Math.asin(n*c/this.a)/Math.sin(t))}return r.x=e,r.y=t,r}var qit=["Polyconic","poly"],Zit={init:zit,forward:Yit,inverse:Xit,names:qit};function Jit(){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 tat(r){var e,t=r.x,n=r.y,i=n-this.lat0,a=t-this.long0,o=i/Ay*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,d,g,m=0,v=0;for(e=1;e<=6;e++)d=h*u-f*c,g=f*u+h*c,h=d,f=g,m=m+this.B_re[e]*h-this.B_im[e]*f,v=v+this.B_im[e]*h+this.B_re[e]*f;return r.x=v*this.a+this.x0,r.y=m*this.a+this.y0,r}function eat(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 d=0;d<this.iterations;d++){var g=h,m=f,v,y,w=o,C=s;for(e=2;e<=6;e++)v=g*h-m*f,y=m*h+g*f,g=v,m=y,w=w+(e-1)*(this.B_re[e]*g-this.B_im[e]*m),C=C+(e-1)*(this.B_im[e]*g+this.B_re[e]*m);g=1,m=0;var O=this.B_re[1],F=this.B_im[1];for(e=2;e<=6;e++)v=g*h-m*f,y=m*h+g*f,g=v,m=y,O=O+e*(this.B_re[e]*g-this.B_im[e]*m),F=F+e*(this.B_im[e]*g+this.B_re[e]*m);var I=O*O+F*F;h=(w*O+C*F)/I,f=(C*O-w*F)/I}var T=h,L=f,N=1,x=0;for(e=1;e<=9;e++)N=N*T,x=x+this.D[e]*N;var S=this.lat0+x*Ay*1e5,P=this.long0+L;return r.x=P,r.y=S,r}var rat=["New_Zealand_Map_Grid","nzmg"],nat={init:Jit,forward:tat,inverse:eat,names:rat};function iat(){}function aat(r){var e=r.x,t=r.y,n=we(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 oat(r){r.x-=this.x0,r.y-=this.y0;var e=we(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 sat=["Miller_Cylindrical","mill"],Aat={init:iat,forward:aat,inverse:oat,names:sat},lat=20;function uat(){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=gH(this.es)}function cat(r){var e,t,n=r.x,i=r.y;if(n=we(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=lat;o;--o){var s=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=s,Math.abs(s)<he)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*VC(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 hat(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=fh((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=fh(Math.sin(e)/this.n)),n=we(n+this.long0),e=Av(e)):(e=vH(r.y/this.a,this.es,this.en),i=Math.abs(e),i<ee?(i=Math.sin(e),t=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)),n=we(t)):i-he<ee&&(n=this.long0)),r.x=n,r.y=e,r}var fat=["Sinusoidal","sinu"],dat={init:uat,forward:cat,inverse:hat,names:fat};function pat(){}function gat(r){for(var e=r.x,t=r.y,n=we(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)<he)break}i/=2,Math.PI/2-Math.abs(t)<he&&(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 vat(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=we(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 mat=["Mollweide","moll"],yat={init:pat,forward:gat,inverse:vat,names:mat};function _at(){Math.abs(this.lat1+this.lat2)<he||(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=R0(this.es),this.e1=M0(this.es),this.e2=N0(this.es),this.e3=P0(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=yl(this.e,this.sinphi,this.cosphi),this.ml1=fo(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<he?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=yl(this.e,this.sinphi,this.cosphi),this.ml2=fo(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=fo(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function wat(r){var e=r.x,t=r.y,n;if(this.sphere)n=this.a*(this.g-t);else{var i=fo(this.e0,this.e1,this.e2,this.e3,t);n=this.a*(this.g-i)}var a=this.ns*we(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 Eat(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=we(this.long0+a/this.ns),n=Av(this.g-t/this.a),r.x=i,r.y=n,r;var o=this.g-t/this.a;return n=AE(o,this.e0,this.e1,this.e2,this.e3),i=we(this.long0+a/this.ns),r.x=i,r.y=n,r}var Cat=["Equidistant_Conic","eqdc"],Bat={init:_at,forward:wat,inverse:Eat,names:Cat};function bat(){this.R=this.a}function Tat(r){var e=r.x,t=r.y,n=we(e-this.long0),i,a;Math.abs(t)<=he&&(i=this.x0+this.R*n,a=this.y0);var o=fh(2*Math.abs(t/Math.PI));(Math.abs(n)<=he||Math.abs(Math.abs(t)-ee)<=he)&&(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),d=f*f,g=Math.PI*this.R*(s*(c-d)+Math.sqrt(A*(c-d)*(c-d)-(d+A)*(h-d)))/(d+A);n<0&&(g=-g),i=this.x0+g;var m=A+c;return g=Math.PI*this.R*(f*m-s*Math.sqrt((d+A)*(A+1)-m*m))/(d+A),t>=0?a=this.y0+g:a=this.y0-g,r.x=i,r.y=a,r}function Sat(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)<he?e=this.long0:e=we(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 xat=["Van_der_Grinten_I","VanDerGrinten","vandg"],Iat={init:bat,forward:Tat,inverse:Sat,names:xat};function Lat(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function Oat(r){var e=r.x,t=r.y,n=Math.sin(r.y),i=Math.cos(r.y),a=we(e-this.long0),o,s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,F,I,T,L,N,x,S;return this.sphere?Math.abs(this.sin_p12-1)<=he?(r.x=this.x0+this.a*(ee-t)*Math.sin(a),r.y=this.y0-this.a*(ee-t)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=he?(r.x=this.x0+this.a*(ee+t)*Math.sin(a),r.y=this.y0+this.a*(ee+t)*Math.cos(a),r):(I=this.sin_p12*n+this.cos_p12*i*Math.cos(a),O=Math.acos(I),F=O?O/Math.sin(O):1,r.x=this.x0+this.a*F*i*Math.sin(a),r.y=this.y0+this.a*F*(this.cos_p12*n-this.sin_p12*i*Math.cos(a)),r):(o=R0(this.es),s=M0(this.es),A=N0(this.es),l=P0(this.es),Math.abs(this.sin_p12-1)<=he?(u=this.a*fo(o,s,A,l,ee),c=this.a*fo(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)<=he?(u=this.a*fo(o,s,A,l,ee),c=this.a*fo(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=Pg(this.a,this.e,this.sin_p12),d=Pg(this.a,this.e,n),g=Math.atan((1-this.es)*h+this.es*f*this.sin_p12/(d*i)),m=Math.atan2(Math.sin(a),this.cos_p12*Math.tan(g)-this.sin_p12*Math.cos(a)),m===0?T=Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):Math.abs(Math.abs(m)-Math.PI)<=he?T=-Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):T=Math.asin(Math.sin(a)*Math.cos(g)/Math.sin(m)),v=this.e*this.sin_p12/Math.sqrt(1-this.es),y=this.e*this.cos_p12*Math.cos(m)/Math.sqrt(1-this.es),w=v*y,C=y*y,L=T*T,N=L*T,x=N*T,S=x*T,O=f*T*(1-L*C*(1-C)/6+N/8*w*(1-2*C)+x/120*(C*(4-7*C)-3*v*v*(1-7*C))-S/48*w),r.x=this.x0+O*Math.sin(m),r.y=this.y0+O*Math.cos(m),r))}function Fat(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,a,o,s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,F,I,T;return this.sphere?(e=Math.sqrt(r.x*r.x+r.y*r.y),e>2*ee*this.a?void 0:(t=e/this.a,n=Math.sin(t),i=Math.cos(t),a=this.long0,Math.abs(e)<=he?o=this.lat0:(o=fh(i*this.sin_p12+r.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-ee,Math.abs(s)<=he?this.lat0>=0?a=we(this.long0+Math.atan2(r.x,-r.y)):a=we(this.long0-Math.atan2(-r.x,r.y)):a=we(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=R0(this.es),l=M0(this.es),u=N0(this.es),c=P0(this.es),Math.abs(this.sin_p12-1)<=he?(h=this.a*fo(A,l,u,c,ee),e=Math.sqrt(r.x*r.x+r.y*r.y),f=h-e,o=AE(f/this.a,A,l,u,c),a=we(this.long0+Math.atan2(r.x,-1*r.y)),r.x=a,r.y=o,r):Math.abs(this.sin_p12+1)<=he?(h=this.a*fo(A,l,u,c,ee),e=Math.sqrt(r.x*r.x+r.y*r.y),f=e-h,o=AE(f/this.a,A,l,u,c),a=we(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),d=Pg(this.a,this.e,this.sin_p12),v=Math.cos(m),y=this.e*this.cos_p12*v,w=-y*y/(1-this.es),C=3*this.es*(1-w)*this.sin_p12*this.cos_p12*v/(1-this.es),O=e/d,F=O-w*(1+w)*Math.pow(O,3)/6-C*(1+3*w)*Math.pow(O,4)/24,I=1-w*F*F/2-O*F*F*F/6,g=Math.asin(this.sin_p12*Math.cos(F)+this.cos_p12*Math.sin(F)*v),a=we(this.long0+Math.asin(Math.sin(m)*Math.sin(F)/Math.cos(g))),T=Math.sin(g),o=Math.atan2((T-this.es*I*this.sin_p12)*Math.tan(g),T*(1-this.es)),r.x=a,r.y=o,r))}var Rat=["Azimuthal_Equidistant","aeqd"],Mat={init:Lat,forward:Oat,inverse:Fat,names:Rat};function Nat(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Pat(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=we(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)<=he)&&(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 Uat(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=fh(e/this.a),n=Math.sin(t),i=Math.cos(t),o=this.long0,Math.abs(e)<=he?(s=this.lat0,r.x=o,r.y=s,r):(s=fh(i*this.sin_p14+r.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-ee,Math.abs(a)<=he?(this.lat0>=0?o=we(this.long0+Math.atan2(r.x,-r.y)):o=we(this.long0-Math.atan2(-r.x,r.y)),r.x=o,r.y=s,r):(o=we(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 Dat=["ortho"],Qat={init:Nat,forward:Pat,inverse:Uat,names:Dat},Xn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ln={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function kat(){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>=ee-An/2?this.face=Xn.TOP:this.lat0<=-(ee-An/2)?this.face=Xn.BOTTOM:Math.abs(this.long0)<=An?this.face=Xn.FRONT:Math.abs(this.long0)<=ee+An?this.face=this.long0>0?Xn.RIGHT:Xn.LEFT:this.face=Xn.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 Hat(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===Xn.TOP)a=ee-t,n>=An&&n<=ee+An?(A.value=ln.AREA_0,i=n-ee):n>ee+An||n<=-(ee+An)?(A.value=ln.AREA_1,i=n>0?n-Ci:n+Ci):n>-(ee+An)&&n<=-An?(A.value=ln.AREA_2,i=n+ee):(A.value=ln.AREA_3,i=n);else if(this.face===Xn.BOTTOM)a=ee+t,n>=An&&n<=ee+An?(A.value=ln.AREA_0,i=-n+ee):n<An&&n>=-An?(A.value=ln.AREA_1,i=-n):n<-An&&n>=-(ee+An)?(A.value=ln.AREA_2,i=-n-ee):(A.value=ln.AREA_3,i=n>0?-n+Ci:-n-Ci);else{var l,u,c,h,f,d,g;this.face===Xn.RIGHT?n=fg(n,+ee):this.face===Xn.BACK?n=fg(n,+Ci):this.face===Xn.LEFT&&(n=fg(n,-ee)),h=Math.sin(t),f=Math.cos(t),d=Math.sin(n),g=Math.cos(n),l=f*g,u=f*d,c=h,this.face===Xn.FRONT?(a=Math.acos(l),i=Z_(a,c,u,A)):this.face===Xn.RIGHT?(a=Math.acos(u),i=Z_(a,c,-l,A)):this.face===Xn.BACK?(a=Math.acos(-l),i=Z_(a,c,-u,A)):this.face===Xn.LEFT?(a=Math.acos(-u),i=Z_(a,c,l,A)):(a=i=0,A.value=ln.AREA_0)}return s=Math.atan(12/Ci*(i+Math.acos(Math.sin(i)*Math.cos(An))-ee)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),A.value===ln.AREA_1?s+=ee:A.value===ln.AREA_2?s+=Ci:A.value===ln.AREA_3&&(s+=1.5*Ci),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 Gat(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=ln.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(c.value=ln.AREA_1,t-=ee):r.x<0&&-r.x>=Math.abs(r.y)?(c.value=ln.AREA_2,t=t<0?t+Ci:t-Ci):(c.value=ln.AREA_3,t+=ee),u=Ci/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===Xn.TOP)l=Math.acos(A),e.phi=ee-l,c.value===ln.AREA_0?e.lam=s+ee:c.value===ln.AREA_1?e.lam=s<0?s+Ci:s-Ci:c.value===ln.AREA_2?e.lam=s-ee:e.lam=s;else if(this.face===Xn.BOTTOM)l=Math.acos(A),e.phi=l-ee,c.value===ln.AREA_0?e.lam=-s+ee:c.value===ln.AREA_1?e.lam=-s:c.value===ln.AREA_2?e.lam=-s-ee:e.lam=s<0?-s-Ci:-s+Ci;else{var h,f,d;h=A,u=h*h,u>=1?d=0:d=Math.sqrt(1-u)*Math.sin(s),u+=d*d,u>=1?f=0:f=Math.sqrt(1-u),c.value===ln.AREA_1?(u=f,f=-d,d=u):c.value===ln.AREA_2?(f=-f,d=-d):c.value===ln.AREA_3&&(u=f,f=d,d=-u),this.face===Xn.RIGHT?(u=h,h=-f,f=u):this.face===Xn.BACK?(h=-h,f=-f):this.face===Xn.LEFT&&(u=h,h=f,f=-u),e.phi=Math.acos(-d)-ee,e.lam=Math.atan2(f,h),this.face===Xn.RIGHT?e.lam=fg(e.lam,-ee):this.face===Xn.BACK?e.lam=fg(e.lam,-Ci):this.face===Xn.LEFT&&(e.lam=fg(e.lam,+ee))}if(this.es!==0){var g,m,v;g=e.phi<0?1:0,m=Math.tan(e.phi),v=this.b/Math.sqrt(m*m+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-v*v)/(this.one_minus_f*v)),g&&(e.phi=-e.phi)}return e.lam+=this.long0,r.x=e.lam,r.y=e.phi,r}function Z_(r,e,t,n){var i;return r<he?(n.value=ln.AREA_0,i=0):(i=Math.atan2(e,t),Math.abs(i)<=An?n.value=ln.AREA_0:i>An&&i<=ee+An?(n.value=ln.AREA_1,i-=ee):i>ee+An||i<=-(ee+An)?(n.value=ln.AREA_2,i=i>=0?i-Ci:i+Ci):(n.value=ln.AREA_3,i+=ee)),i}function fg(r,e){var t=r+e;return t<-Ci?t+=Vy:t>+Ci&&(t-=Vy),t}var $at=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Vat={init:kat,forward:Hat,inverse:Gat,names:$at},Lx=[[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]],Dm=[[-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]],_H=.8487,wH=1.3523,EH=al/5,jat=1/EH,tg=18,lE=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},Kat=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function Wat(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 zat(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function Yat(r){var e=we(r.x-this.long0),t=Math.abs(r.y),n=Math.floor(t*EH);n<0?n=0:n>=tg&&(n=tg-1),t=al*(t-jat*n);var i={x:lE(Lx[n],t)*e,y:lE(Dm[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*_H+this.x0,i.y=i.y*this.a*wH+this.y0,i}function Xat(r){var e={x:(r.x-this.x0)/(this.a*_H),y:Math.abs(r.y-this.y0)/(this.a*wH)};if(e.y>=1)e.x/=Lx[tg][0],e.y=r.y<0?-ee:ee;else{var t=Math.floor(e.y*tg);for(t<0?t=0:t>=tg&&(t=tg-1);;)if(Dm[t][0]>e.y)--t;else if(Dm[t+1][0]<=e.y)++t;else break;var n=Dm[t],i=5*(e.y-n[0])/(Dm[t+1][0]-n[0]);i=Wat(function(a){return(lE(n,a)-e.y)/Kat(n,a)},i,he,100),e.x/=lE(Lx[t],i),e.y=(5*t+i)*va,r.y<0&&(e.y=-e.y)}return e.x=we(e.x+this.long0),e}var qat=["Robinson","robin"],Zat={init:zat,forward:Yat,inverse:Xat,names:qat};function Jat(){this.name="geocent"}function tot(r){var e=sH(r,this.es,this.a);return e}function eot(r){var e=AH(r,this.es,this.a,this.b);return e}var rot=["Geocentric","geocentric","geocent","Geocent"],not={init:Jat,forward:tot,inverse:eot,names:rot},Ga={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},cm={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 iot(){if(Object.keys(cm).forEach(function(t){if(typeof this[t]>"u")this[t]=cm[t].def;else{if(cm[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);cm[t].num&&(this[t]=parseFloat(this[t]))}cm[t].degrees&&(this[t]=this[t]*va)}.bind(this)),Math.abs(Math.abs(this.lat0)-ee)<he?this.mode=this.lat0<0?Ga.S_POLE:Ga.N_POLE:Math.abs(this.lat0)<he?this.mode=Ga.EQUIT:(this.mode=Ga.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 aot(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 Ga.OBLIQ:a=this.sinph0*e+this.cosph0*t*n;break;case Ga.EQUIT:a=t*n;break;case Ga.S_POLE:a=-e;break;case Ga.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),i=a*t*Math.sin(r.x),this.mode){case Ga.OBLIQ:a*=this.cosph0*e-this.sinph0*t*n;break;case Ga.EQUIT:a*=e;break;case Ga.N_POLE:a*=-(t*n);break;case Ga.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 oot(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=jC(r.x,r.y);if(Math.abs(a)<he)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 Ga.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 Ga.EQUIT:e.y=Math.asin(r.y*s/a),r.y=o*a,r.x*=s;break;case Ga.N_POLE:e.y=Math.asin(o),r.y=-r.y;break;case Ga.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 sot=["Tilted_Perspective","tpers"],Aot={init:iot,forward:aot,inverse:oot,names:sot};function lot(r){r.Proj.projections.add(rw),r.Proj.projections.add(nw),r.Proj.projections.add(_nt),r.Proj.projections.add(Lnt),r.Proj.projections.add(Pnt),r.Proj.projections.add(Hnt),r.Proj.projections.add(Wnt),r.Proj.projections.add(Znt),r.Proj.projections.add(nit),r.Proj.projections.add(Ait),r.Proj.projections.add(bit),r.Proj.projections.add(Oit),r.Proj.projections.add(Pit),r.Proj.projections.add(Git),r.Proj.projections.add(Wit),r.Proj.projections.add(Zit),r.Proj.projections.add(nat),r.Proj.projections.add(Aat),r.Proj.projections.add(dat),r.Proj.projections.add(yat),r.Proj.projections.add(Bat),r.Proj.projections.add(Iat),r.Proj.projections.add(Mat),r.Proj.projections.add(Qat),r.Proj.projections.add(Vat),r.Proj.projections.add(Zat),r.Proj.projections.add(not),r.Proj.projections.add(Aot)}Go.defaultDatum="WGS84";Go.Proj=cl;Go.WGS84=new Go.Proj("WGS84");Go.Point=Ng;Go.toPoint=lH;Go.defs=Ao;Go.nadgrid=Ert;Go.transform=sE;Go.mgrs=Drt;Go.version="__VERSION__";lot(Go);function uot(r){var e=Object.keys(r.defs),t=e.length,n,i;for(n=0;n<t;++n){var a=e[n];if(!Ve(a)){var o=r.defs(a),s=o.units;!s&&o.projName==="longlat"&&(s=ho.DEGREES),s8(new Ru({code:a,axisOrientation:o.axis,metersPerUnit:o.to_meter,units:s}))}}for(n=0;n<t;++n){var A=e[n],l=Ve(A);for(i=0;i<t;++i){var u=e[i],c=Ve(u);if(!a8(A,u))if(r.defs[A]===r.defs[u])dx([l,c]);else{var h=r(A,u);$q(l,c,BP(l,c,h.forward),BP(c,l,h.inverse))}}}}const cot={name:"ol-projection-register",setup(r){const{projectionName:e,projectionDef:t,projectionExtent:n}=rh(r);return Go.defs(e.value,t.value),uot(Go),{projection:new Ru({code:e.value,extent:n.value})}},props:{projectionName:{type:String},projectionDef:{type:String},projectionExtent:{type:Array}}};function hot(r,e,t,n,i,a){return Mr("",!0)}var Ox=me(cot,[["render",hot]]);function uE(r){uE.installed||(uE.installed=!0,r.component(Ex.name,Ex),r.component(Cx.name,Cx),r.component(Bx.name,Bx),r.component(bx.name,bx),r.component(Tx.name,Tx),r.component(Ox.name,Ox))}var fot=Object.freeze(Object.defineProperty({__proto__:null,default:uE,install:uE,Map:Ex,View:Cx,Feature:Bx,Overlay:bx,GeoLocation:Tx,Projection:Ox},Symbol.toStringTag,{value:"Module"})),Pc={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"},dot=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)}}(),pot=function(r){dot(e,r);function e(t){var n=this,i=t||{},a=Ce({},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(Pc.PRELOAD)},e.prototype.setPreload=function(t){this.set(Pc.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Pc.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Pc.USE_INTERIM_TILES_ON_ERROR,t)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Ed),CH=pot,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)}}(),vot=function(r){got(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(xe.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()==Te.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()==Te.LOADED){t.interimTile=null;break}else t.getState()==Te.LOADING?n=t:t.getState()==Te.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!==Te.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Re()},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:bF(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}(wd),tR=vot,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)}}(),yot=function(r){mot(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=Te.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){this.state=Te.ERROR,this.unlistenImage_(),this.image_=_ot(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=Te.LOADED:this.state=Te.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Te.ERROR&&(this.state=Te.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Te.IDLE&&(this.state=Te.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=KF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(tR);function _ot(){var r=wo(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var cE=yot,BH=.5,wot=10,g5=.25,Eot=function(){function r(e,t,n,i,a,o){this.sourceProj_=e,this.targetProj_=t;var s={},A=Gy(this.targetProj_,this.sourceProj_);this.transformInv_=function(w){var C=w[0]+"/"+w[1];return s[C]||(s[C]=A(w)),s[C]},this.maxSourceExtent_=i,this.errorThresholdSquared_=a*a,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Kr(i)==Kr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Kr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Kr(this.targetProj_.getExtent()):null;var l=TA(n),u=E0(n),c=iv(n),h=w0(n),f=this.transformInv_(l),d=this.transformInv_(u),g=this.transformInv_(c),m=this.transformInv_(h),v=wot+(o?Math.max(0,Math.ceil(kk(My(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,c,h,f,d,g,m,v),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach(function(w,C,O){y=Math.min(y,w.source[0][0],w.source[1][0],w.source[2][0])}),this.triangles_.forEach(function(w){if(Math.max(w.source[0][0],w.source[1][0],w.source[2][0])-y>this.sourceWorldWidth_/2){var C=[[w.source[0][0],w.source[0][1]],[w.source[1][0],w.source[1][1]],[w.source[2][0],w.source[2][1]]];C[0][0]-y>this.sourceWorldWidth_/2&&(C[0][0]-=this.sourceWorldWidth_),C[1][0]-y>this.sourceWorldWidth_/2&&(C[1][0]-=this.sourceWorldWidth_),C[2][0]-y>this.sourceWorldWidth_/2&&(C[2][0]-=this.sourceWorldWidth_);var O=Math.min(C[0][0],C[1][0],C[2][0]),F=Math.max(C[0][0],C[1][0],C[2][0]);F-O<this.sourceWorldWidth_/2&&(w.source=C)}}.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=oa([a,o,s,A]),c=this.sourceWorldWidth_?Kr(u)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&c>.5&&c<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var g=oa([e,t,n,i]),m=Kr(g)/this.targetWorldWidth_;d=m>g5||d}!f&&this.sourceProj_.isGlobal()&&c&&(d=c>g5||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!qn(u,this.maxSourceExtent_))){var v=0;if(!d&&(!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)d=!0;else if(v=(!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),v!=1&&v!=2&&v!=4&&v!=8)return}if(l>0){if(!d){var y=[(e[0]+n[0])/2,(e[1]+n[1])/2],w=this.transformInv_(y),C=void 0;if(f){var O=(Wc(a[0],h)+Wc(s[0],h))/2;C=O-Wc(w[0],h)}else C=(a[0]+s[0])/2-w[0];var F=(a[1]+s[1])/2-w[1],I=C*C+F*F;d=I>this.errorThresholdSquared_}if(d){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],L=this.transformInv_(T),N=[(i[0]+e[0])/2,(i[1]+e[1])/2],x=this.transformInv_(N);this.addQuad_(e,t,T,N,a,o,L,x,l-1),this.addQuad_(N,T,n,i,x,L,s,A,l-1)}else{var S=[(e[0]+t[0])/2,(e[1]+t[1])/2],P=this.transformInv_(S),U=[(n[0]+i[0])/2,(n[1]+i[1])/2],tt=this.transformInv_(U);this.addQuad_(e,S,U,i,a,P,tt,A,l-1),this.addQuad_(S,t,n,U,P,o,s,tt,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}v&11||this.addTriangle_(e,n,i,a,s,A),v&14||this.addTriangle_(e,n,t,a,s,o),v&&(v&13||this.addTriangle_(t,i,e,o,A,a),v&7||this.addTriangle_(t,i,n,o,A,s))}},r.prototype.calculateSourceExtent=function(){var e=Di();return this.triangles_.forEach(function(t,n,i){var a=t.source;Uf(e,a[0]),Uf(e,a[1]),Uf(e,a[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}(),bH=Eot,Ug={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},TH={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},qb;function v5(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 Zb(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function Cot(){if(qb===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",v5(r,4,5,4,0),v5(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;qb=Zb(e,0)||Zb(e,4)||Zb(e,8)}return qb}function Wy(r,e,t,n){var i=uh(t,e,r),a=Yw(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||mA(A,i)){var l=Yw(r,a,i)/a;isFinite(l)&&l>0&&(a/=l)}return a}function Bot(r,e,t,n){var i=Ya(t),a=Wy(r,e,i,n);return(!isFinite(a)||a<=0)&&IC(t,function(o){return a=Wy(r,e,o,n),isFinite(a)&&a>0}),a}function SH(r,e,t,n,i,a,o,s,A,l,u,c){var h=wo(Math.round(t*r),Math.round(t*e));if(c||Ce(h,Ug),A.length===0)return h.canvas;h.scale(t,t);function f(C){return Math.round(C*t)/t}h.globalCompositeOperation="lighter";var d=Di();A.forEach(function(C,O,F){Ah(d,C.extent)});var g=Kr(d),m=Li(d),v=wo(Math.round(t*g/n),Math.round(t*m/n));c||Ce(v,Ug);var y=t/n;A.forEach(function(C,O,F){var I=C.extent[0]-d[0],T=-(C.extent[3]-d[3]),L=Kr(C.extent),N=Li(C.extent);C.image.width>0&&C.image.height>0&&v.drawImage(C.image,l,l,C.image.width-2*l,C.image.height-2*l,I*y,T*y,L*y,N*y)});var w=TA(o);return s.getTriangles().forEach(function(C,O,F){var I=C.source,T=C.target,L=I[0][0],N=I[0][1],x=I[1][0],S=I[1][1],P=I[2][0],U=I[2][1],tt=f((T[0][0]-w[0])/a),q=f(-(T[0][1]-w[1])/a),rt=f((T[1][0]-w[0])/a),nt=f(-(T[1][1]-w[1])/a),At=f((T[2][0]-w[0])/a),ct=f(-(T[2][1]-w[1])/a),Tt=L,M=N;L=0,N=0,x-=Tt,S-=M,P-=Tt,U-=M;var W=[[x,S,0,0,rt-tt],[P,U,0,0,At-tt],[0,0,x,S,nt-q],[0,0,P,U,ct-q]],Y=OX(W);if(Y){if(h.save(),h.beginPath(),Cot()||!c){h.moveTo(rt,nt);for(var H=4,J=tt-rt,ot=q-nt,ut=0;ut<H;ut++)h.lineTo(rt+f((ut+1)*J/H),nt+f(ut*ot/(H-1))),ut!=H-1&&h.lineTo(rt+f((ut+1)*J/H),nt+f((ut+1)*ot/(H-1)));h.lineTo(At,ct)}else h.moveTo(rt,nt),h.lineTo(tt,q),h.lineTo(At,ct);h.clip(),h.transform(Y[0],Y[2],Y[1],Y[3],tt,q),h.translate(d[0]-Tt,d[3]-M),h.scale(n/t,-n/t),h.drawImage(v.canvas,0,0),h.restore()}}),u&&(h.save(),h.globalCompositeOperation="source-over",h.strokeStyle="black",h.lineWidth=1,s.getTriangles().forEach(function(C,O,F){var I=C.target,T=(I[0][0]-w[0])/a,L=-(I[0][1]-w[1])/a,N=(I[1][0]-w[0])/a,x=-(I[1][1]-w[1])/a,S=(I[2][0]-w[0])/a,P=-(I[2][1]-w[1])/a;h.beginPath(),h.moveTo(N,x),h.lineTo(T,L),h.lineTo(S,P),h.closePath(),h.stroke()}),h.restore()),h.canvas}var bot=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)}}(),Tot=function(r){bot(e,r);function e(t,n,i,a,o,s,A,l,u,c,h,f){var d=r.call(this,o,Te.IDLE,{interpolate:!!f})||this;d.renderEdges_=h!==void 0?h:!1,d.pixelRatio_=A,d.gutter_=l,d.canvas_=null,d.sourceTileGrid_=n,d.targetTileGrid_=a,d.wrappedTileCoord_=s||o,d.sourceTiles_=[],d.sourcesListenerKeys_=null,d.sourceZ_=0;var g=a.getTileCoordExtent(d.wrappedTileCoord_),m=d.targetTileGrid_.getExtent(),v=d.sourceTileGrid_.getExtent(),y=m?ks(g,m):g;if(My(y)===0)return d.state=Te.EMPTY,d;var w=t.getExtent();w&&(v?v=ks(v,w):v=w);var C=a.getResolution(d.wrappedTileCoord_[0]),O=Bot(t,i,y,C);if(!isFinite(O)||O<=0)return d.state=Te.EMPTY,d;var F=c!==void 0?c:BH;if(d.triangulation_=new bH(t,i,y,v,O*F,C),d.triangulation_.getTriangles().length===0)return d.state=Te.EMPTY,d;d.sourceZ_=n.getZForResolution(O);var I=d.triangulation_.calculateSourceExtent();if(v&&(t.canWrapX()?(I[1]=Un(I[1],v[1],v[3]),I[3]=Un(I[3],v[1],v[3])):I=ks(I,v)),!My(I))d.state=Te.EMPTY;else{for(var T=n.getTileRangeForExtentAndZ(I,d.sourceZ_),L=T.minX;L<=T.maxX;L++)for(var N=T.minY;N<=T.maxY;N++){var x=u(d.sourceZ_,L,N,A);x&&d.sourceTiles_.push(x)}d.sourceTiles_.length===0&&(d.state=Te.EMPTY)}return d}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()==Te.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(u.tileCoord),image:u.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=Te.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_=SH(a,o,this.pixelRatio_,A,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=Te.LOADED}this.changed()},e.prototype.load=function(){if(this.state==Te.IDLE){this.state=Te.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(n,i,a){var o=n.getState();if(o==Te.IDLE||o==Te.LOADING){t++;var s=je(n,xe.CHANGE,function(A){var l=n.getState();(l==Te.LOADED||l==Te.ERROR||l==Te.EMPTY)&&(Yr(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==Te.IDLE&&n.load()})}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(Yr),this.sourcesListenerKeys_=null},e}(tR),eR=Tot,xH=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 gp(r,e,t,n,i){return i!==void 0?(i.minX=r,i.maxX=e,i.minY=t,i.maxY=n,i):new xH(r,e,t,n)}var rR=xH,Sot=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=function(r){Sot(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=Di(),n.tmpTileRange_=new rR(0,0,0,0),n}return e.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==Te.LOADED||i==Te.EMPTY||i==Te.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()==Te.ERROR&&(A.getUseInterimTilesOnError()?A.getPreload()>0&&(this.newTiles_=!0):u.setState(Te.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=bn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!mA(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 d=c.getTileCoordForCoordAndZ(a,f),g=u.getTile(f,d[1],d[2],s,A);if(!(g instanceof cE||g instanceof eR))return null;if(g.getState()===Te.LOADED){var m=c.getOrigin(f),v=Wi(c.getTileSize(f)),y=c.getResolution(f),w=Math.floor(h*((a[0]-m[0])/y-d[1]*v[0])),C=Math.floor(h*((m[1]-a[1])/y-d[2]*v[1]));return this.getImageData(g.getImage(),w,C)}}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(),d=h.getTileGridForProjection(o),g=d.getZForResolution(s,h.zDirection),m=d.getResolution(g),v=t.extent,y=i.extent&&gs(i.extent);y&&(v=ks(v,gs(i.extent)));var w=h.getTilePixelRatio(u),C=Math.round(t.size[0]*w),O=Math.round(t.size[1]*w);if(l){var F=Math.round(Math.sqrt(C*C+O*O));C=F,O=F}var I=m*C/2/w,T=m*O/2/w,L=[A[0]-I,A[1]-T,A[0]+I,A[1]+T],N=d.getTileRangeForExtentAndZ(v,g),x={};x[g]={};var S=this.createLoadedTileFinder(h,o,x),P=this.tmpExtent,U=this.tmpTileRange_;this.newTiles_=!1;for(var tt=N.minX;tt<=N.maxX;++tt)for(var q=N.minY;q<=N.maxY;++q){var rt=this.getTile(g,tt,q,t);if(this.isDrawableTile(rt)){var nt=Ee(this);if(rt.getState()==Te.LOADED){x[g][rt.tileCoord.toString()]=rt;var At=rt.inTransition(nt);!this.newTiles_&&(At||this.renderedTiles.indexOf(rt)===-1)&&(this.newTiles_=!0)}if(rt.getAlpha(nt,t.time)===1)continue}var ct=d.getTileCoordChildTileRange(rt.tileCoord,U,P),Tt=!1;ct&&(Tt=S(g+1,ct)),Tt||d.forEachTileCoordParentTileRange(rt.tileCoord,S,U,P)}var M=m/s;yo(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/w,1/w,l,-C/2,-O/2);var W=AF(this.pixelTransform);this.useContainer(n,W,i.opacity,this.getBackground(t));var Y=this.context,H=Y.canvas;_0(this.inversePixelTransform,this.pixelTransform),yo(this.tempTransform,C/2,O/2,M,M,0,-C/2,-O/2),H.width!=C||H.height!=O?(H.width=C,H.height=O):this.containerReused||Y.clearRect(0,0,C,O),y&&this.clipUnrotated(Y,t,y),h.getInterpolate()||Ce(Y,Ug),this.preRender(Y,t),this.renderedTiles.length=0;var J=Object.keys(x).map(Number);J.sort(oh);var ot,ut,X;i.opacity===1&&(!this.containerReused||h.getOpaque(t.viewState.projection))?J=J.reverse():(ot=[],ut=[]);for(var It=J.length-1;It>=0;--It){var at=J[It],j=h.getTilePixelSize(at,u,o),Z=d.getResolution(at),ft=Z/m,it=j[0]*ft*M,V=j[1]*ft*M,Ft=d.getTileCoordForCoordAndZ(TA(L),at),Mt=d.getTileCoordExtent(Ft),Et=bn(this.tempTransform,[w*(Mt[0]-L[0])/m,w*(L[3]-Mt[3])/m]),Bt=w*h.getGutterForProjection(o),Ct=x[at];for(var Rt in Ct){var rt=Ct[Rt],Nt=rt.tileCoord,Dt=Ft[1]-Nt[1],Wt=Math.round(Et[0]-(Dt-1)*it),te=Ft[2]-Nt[2],Ae=Math.round(Et[1]-(te-1)*V),tt=Math.round(Et[0]-Dt*it),q=Math.round(Et[1]-te*V),oe=Wt-tt,Jt=Ae-q,fe=g===at,At=fe&&rt.getAlpha(Ee(this),t.time)!==1,qt=!1;if(!At)if(ot){X=[tt,q,tt+oe,q,tt+oe,q+Jt,tt,q+Jt];for(var nr=0,ke=ot.length;nr<ke;++nr)if(g!==at&&at<ut[nr]){var wr=ot[nr];qn([tt,q,tt+oe,q+Jt],[wr[0],wr[3],wr[4],wr[7]])&&(qt||(Y.save(),qt=!0),Y.beginPath(),Y.moveTo(X[0],X[1]),Y.lineTo(X[2],X[3]),Y.lineTo(X[4],X[5]),Y.lineTo(X[6],X[7]),Y.moveTo(wr[6],wr[7]),Y.lineTo(wr[4],wr[5]),Y.lineTo(wr[2],wr[3]),Y.lineTo(wr[0],wr[1]),Y.clip())}ot.push(X),ut.push(at)}else Y.clearRect(tt,q,oe,Jt);this.drawTileImage(rt,t,tt,q,oe,Jt,Bt,fe),ot&&!At?(qt&&Y.restore(),this.renderedTiles.unshift(rt)):this.renderedTiles.push(rt),this.updateUsedTiles(t.usedTiles,h,rt)}}this.renderedRevision=f,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!vl(this.renderedExtent_,L),this.renderedExtent_=L,this.renderedPixelRatio=u,this.renderedProjection=o,this.manageTilePyramid(t,h,d,u,o,v,g,c.getPreload()),this.scheduleExpireCache(t,h),this.postRender(Y,t),i.extent&&Y.restore(),Ce(Y,TH),W!==H.style.transform&&(H.style.transform=W);var Ne=Zk(i.opacity),Pe=this.container;return Ne!==Pe.style.opacity&&(Pe.style.opacity=Ne),this.container},e.prototype.drawTileImage=function(t,n,i,a,o,s,A,l){var u=this.getTileImage(t);if(u){var c=Ee(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=Ee(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=Ee(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=Ee(n);c in t.wantedTiles||(t.wantedTiles[c]={});var h=t.wantedTiles[c],f=t.tileQueue,d=i.getMinZoom(),g=0,m,v,y,w,C,O;for(O=d;O<=A;++O)for(v=i.getTileRangeForExtentAndZ(s,O,v),y=i.getResolution(O),w=v.minX;w<=v.maxX;++w)for(C=v.minY;C<=v.maxY;++C)A-O<=l?(++g,m=n.getTile(O,w,C,a,o),m.getState()==Te.IDLE&&(h[m.getKey()]=!0,f.isKeyQueued(m.getKey())||f.enqueue([m,c,i.getTileCoordCenter(m.tileCoord),y])),u!==void 0&&u(m)):n.useTile(O,w,C,o);n.updateCacheSize(g,o)},e}(VF),IH=xot,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)}}(),Lot=function(r){Iot(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new IH(this)},e}(CH),nR=Lot;const Oot={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 Fot(r,e,t,n,i,a){return ti(),Yi("div")}var bd=me(Oot,[["render",Fot]]);const Rot={extends:bd,name:"ol-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=Ze(()=>new nR(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&&ye(t,()=>{o(),a()}),cr(()=>{a()}),pr(()=>{o()}),Qr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function Mot(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Fx=me(Rot,[["render",Mot]]),Not=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 Le(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 Le(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){Le(!(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}(),LH=Not,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)}}(),Uot=function(r){Pot(e,r);function e(t){var n=this,i=Te.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=Te.LOADING,this.changed();var t=this;this.loader_().then(function(n){t.data_=n,t.state=Te.LOADED,t.changed()}).catch(function(n){t.error_=n,t.state=Te.ERROR,t.changed()})},e}(tR),Dot=Uot,zy=34962,KC=34963,Qot=35040,iR=35044,iw=35048,kot=5121,Hot=5123,Got=5125,OH=5126,m5=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function FH(r,e){for(var t=Ce({preserveDrawingBuffer:!0,antialias:!uX},e),n=m5.length,i=0;i<n;++i)try{var a=r.getContext(m5[i],t);if(a)return a}catch{}return null}var $ot={STATIC_DRAW:iR,STREAM_DRAW:Qot,DYNAMIC_DRAW:iw},Vot=function(){function r(e,t){this.array=null,this.type=e,Le(e===zy||e===KC,62),this.usage=t!==void 0?t:$ot.STATIC_DRAW}return r.prototype.ofSize=function(e){this.array=new(Jb(this.type))(e)},r.prototype.fromArray=function(e){var t=Jb(this.type);this.array=t.from?t.from(e):new t(e)},r.prototype.fromArrayBuffer=function(e){this.array=new(Jb(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 Jb(r){switch(r){case zy:return Float32Array;case KC:return Uint32Array;default:return Float32Array}}var ly=Vot,jot=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 RH(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 Kot(r,e,t,n){RH(r,e,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t)}function y5(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;RH(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 Qm=null;function Wot(){var r=document.createElement("canvas");r.width=1,r.height=1,Qm=r.getContext("2d")}var zot=function(r){jot(e,r);function e(t){var n=r.call(this)||this;n.tile,n.textures=[],n.handleTileChange_=n.handleTileChange_.bind(n),n.size=Wi(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 ly(zy,iR);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(xe.CHANGE,this.handleTileChange_),this.tile=t,this.textures.length=0,this.loaded=t.getState()===Te.LOADED,this.loaded)this.uploadTile_();else{if(t instanceof cE){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(xe.CHANGE,this.handleTileChange_)}},e.prototype.uploadTile_=function(){var t=this.helper_,n=t.getGL(),i=this.tile;if(i instanceof cE||i instanceof eR){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=wo(s,A);i.interpolate||Ce(l,Ug),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,Kot(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,d=c[0]*c[1],g=f?Float32Array:Uint8Array,m=g.BYTES_PER_ELEMENT,v=h.byteLength/c[1];this.bandCount=Math.floor(v/m/c[0]);var y=Math.ceil(this.bandCount/4);if(y===1){var u=n.createTexture();this.textures.push(u),y5(t,u,h,c,this.bandCount,i.interpolate);return}for(var w=new Array(y),C=0;C<y;++C){var u=n.createTexture();this.textures.push(u);var O=C<y-1?4:this.bandCount%4;w[C]=new g(d*O)}for(var F=0,I=0,T=c[0]*this.bandCount,L=0;L<c[1];++L){for(var N=0;N<T;++N){var x=h[I+N],S=Math.floor(F/this.bandCount),P=N%this.bandCount,C=Math.floor(P/4),U=w[C],O=U.length/d,tt=P%4;U[S*O+tt]=x,++F}I+=v/m}for(var C=0;C<y;++C){var u=this.textures[C],U=w[C],O=U.length/d;y5(t,u,U,c,O,i.interpolate)}},e.prototype.handleTileChange_=function(){this.tile.getState()===Te.LOADED&&(this.loaded=!0,this.uploadTile_(),this.dispatchEvent(xe.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(xe.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 Dot){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)}Qm||Wot(),Qm.clearRect(0,0,1,1);var u,c=this.tile.getImage();try{Qm.drawImage(c,t,n,1,1,0,0,1,1),u=Qm.getImageData(0,0,1,1).data}catch{return null}return u},e}(wd),Yot=zot,J_={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},Xot=`
|
||
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);
|
||
}
|
||
`,qot=`
|
||
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;
|
||
}
|
||
`,Zot=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||Xot),t.compileShader(n);var i=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,e.fragmentShader||qot),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=Ee(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}(),_5=Zot;function MH(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function aw(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 Jot=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)}}(),kp={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"},Ns={UNSIGNED_BYTE:kot,UNSIGNED_SHORT:Hot,UNSIGNED_INT:Got,FLOAT:OH},hE={};function w5(r){return"shared/"+r}var E5=0;function tst(){var r="unique/"+E5;return E5+=1,r}function est(r){var e=hE[r];if(!e){var t=document.createElement("canvas");t.style.position="absolute",t.style.left="0",e={users:0,canvas:t},hE[r]=e}return e.users+=1,e.canvas}function rst(r){var e=hE[r];if(e&&(e.users-=1,!(e.users>0))){var t=e.canvas,n=FH(t),i=n.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete hE[r]}}var nst=function(r){Jot(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?w5(i.canvasCacheKey):tst(),n.canvas_=est(n.canvasCacheKey_),n.gl_=FH(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(J_.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(J_.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=xi(),n.offsetScaleMatrix_=xi(),n.tmpMat4_=MH(),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 _5({webGlContext:a,scaleRatio:o.scaleRatio,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,uniforms:o.uniforms})}):[new _5({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_===w5(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=Ee(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=Ee(t),a=this.bufferCache_[i];a&&!n.isContextLost()&&n.deleteBuffer(a.webGlBuffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(J_.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(J_.RESTORED,this.boundHandleWebGLContextRestored_),rst(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=iy(this.offsetScaleMatrix_);ay(a,2/n[0],2/n[1]);var o=iy(this.offsetRotateMatrix_);i!==0&&gX(o,-i),this.setUniformMatrixValue(kp.OFFSET_SCALE_MATRIX,aw(this.tmpMat4_,a)),this.setUniformMatrixValue(kp.OFFSET_ROTATION_MATRIX,aw(this.tmpMat4_,o)),this.setUniformFloatValue(kp.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(kp.ZOOM,t.viewState.zoom),this.setUniformFloatValue(kp.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,aw(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 iy(n),yo(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=ist(t),i=0,a=0;a<t.length;a++){var o=t[a];this.enableAttributeArray_(o.name,o.size,o.type||OH,n,i),i+=o.size*NH(o.type)}},e.prototype.handleWebGLContextLost=function(){_d(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}(BC);function ist(r){for(var e=0,t=0;t<r.length;t++){var n=r[t];e+=n.size*NH(n.type)}return e}function NH(r){switch(r){case Ns.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Ns.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Ns.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Ns.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var ast=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)}}(),tT={GENERATE_BUFFERS:"GENERATE_BUFFERS"},ost=function(r){ast(e,r);function e(t,n){var i=r.call(this,t)||this,a=n||{};return i.inversePixelTransform_=xi(),i.pixelContext_=null,i.postProcesses_=a.postProcesses,i.uniforms_=a.uniforms,i.helper,t.addChangeListener(Jr.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(No.PRECOMPOSE)){var a=new oy(No.PRECOMPOSE,void 0,n,t);i.dispatchEvent(a)}},e.prototype.dispatchPostComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(No.POSTCOMPOSE)){var a=new oy(No.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 nst({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)){yo(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var o=new oy(t,this.inversePixelTransform_,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.dispatchRenderEvent_(No.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(No.POSTRENDER,t,n)},e.prototype.getDataAtPixel=function(t,n,i){var a=bn([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=bn(n.pixelToCoordinateTransform,t.slice());if(!mA(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 d=document.createElement("canvas");d.width=1,d.height=1,f=d.getContext("2d"),this.pixelContext_=f}f.clearRect(0,0,1,1);var g;try{f.drawImage(o.canvas,c,h,1,1,0,0,1,1),g=f.getImageData(0,0,1,1).data}catch{return g}return g[3]===0?null:g},e}(k8);function sst(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 Ast(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 PH=ost;function Yy(r,e,t,n){return n!==void 0?(n[0]=r,n[1]=e,n[2]=t,n):[r,e,t]}function WC(r,e,t){return r+"/"+e+"/"+t}function Xy(r){return WC(r[0],r[1],r[2])}function lst(r){return r.split("/").map(Number)}function UH(r){return(r[1]<<r[0])+r[2]}function ust(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 cst=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)}}(),ur={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"},ow={TEXTURE_COORD:"a_textureCoord"},hst=[{name:ow.TEXTURE_COORD,size:2,type:Ns.FLOAT}],fst={};function dst(r){return 2*(1-1/(r+1))-1}function C5(r,e,t){t in r||(r[t]=[]),r[t].push(e)}function eT(r,e){var t=r.layerStatesArray[r.layerIndex];t.extent&&(e=ks(e,gs(t.extent,r.viewState.projection)));var n=t.layer.getRenderSource();if(!n.getWrapX()){var i=n.getTileGridForProjection(r.viewState.projection).getExtent();i&&(e=ks(e,i))}return e}function rT(r,e){return"".concat(r.getKey(),",").concat(Xy(e))}var pst=function(r){cst(e,r);function e(t,n){var i=r.call(this,t,{uniforms:n.uniforms})||this;i.renderComplete=!1,i.tileTransform_=xi(),i.tempMat4_=MH(),i.tempTileRange_=new rR(0,0,0,0),i.tempTileCoord_=Yy(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.indices_=new ly(KC,iR),i.indices_.fromArray([0,1,3,1,2,3]);var a=n.cacheSize!==void 0?n.cacheSize:512;return i.tileTextureCache_=new LH(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==Te.LOADED||i==Te.EMPTY||i==Te.ERROR&&!a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getRenderSource();return!i||av(eT(t,t.extent))?!1:i.getState()===co.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=Ee(A);h in t.wantedTiles||(t.wantedTiles[h]={});for(var f=t.wantedTiles[h],d=this.tileTextureCache_,g=Math.max(i-s.getPreload(),l.getMinZoom(),s.getMinZoom()),m=i;m>=g;--m)for(var v=l.getTileRangeForExtentAndZ(n,m,this.tempTileRange_),y=l.getResolution(m),w=v.minX;w<=v.maxX;++w)for(var C=v.minY;C<=v.maxY;++C){var O=Yy(m,w,C,this.tempTileCoord_),F=rT(A,O),I=void 0,T=void 0;if(d.containsKey(F)&&(I=d.get(F),T=I.tile),!I||I.tile.key!==A.getKey())if(T=A.getTile(m,w,C,t.pixelRatio,o.projection),!I)I=new Yot({tile:T,grid:l,helper:this.helper,tilePixelRatio:u,gutter:c}),d.set(F,I);else if(this.isDrawableTile_(T))I.setTile(T);else{var L=T.getInterimTile();I.setTile(L)}C5(a,I,m);var N=T.getKey();f[N]=!0,T.getState()===Te.IDLE&&(t.tileQueue.isKeyQueued(N)||t.tileQueue.enqueue([T,h,l.getTileCoordCenter(O),y]))}},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=eT(t,t.extent),l=s.getZForResolution(i.resolution,o.zDirection),u={};if(t.nextExtent){var c=s.getZForResolution(i.nextResolution,o.zDirection),h=eT(t,t.nextExtent);this.enqueueTiles(t,h,c,u)}this.enqueueTiles(t,A,l,u);for(var f={},d=Ee(this),g=t.time,m=!1,v=u[l],y=0,w=v.length;y<w;++y){var C=v[y],O=C.tile,F=O.tileCoord;if(C.loaded){var I=O.getAlpha(d,g);if(I===1){O.endTransition(d);continue}m=!0;var T=Xy(F);f[T]=I}this.renderComplete=!1;var L=this.findAltTiles_(s,F,l+1,u);if(!L)for(var N=s.getMinZoom(),x=l-1;x>=N;--x){var S=this.findAltTiles_(s,F,x,u);if(S)break}}this.helper.useProgram(this.program_),this.helper.prepareDraw(t,!m);for(var P=Object.keys(u).map(Number).sort(oh),U=i.center[0],tt=i.center[1],q=0,rt=P.length;q<rt;++q)for(var nt=P[q],At=s.getResolution(nt),ct=Wi(s.getTileSize(nt),this.tempSize_),Tt=s.getOrigin(nt),M=(U-Tt[0])/(ct[0]*At),W=(Tt[1]-tt)/(ct[1]*At),Y=i.resolution/At,H=dst(nt),J=u[nt],y=0,w=J.length;y<w;++y){var C=J[y];if(C.loaded){var O=C.tile,F=O.tileCoord,T=Xy(F),ot=F[1],ut=F[2];yo(this.tileTransform_,0,0,2/(t.size[0]*Y/ct[0]),-2/(t.size[1]*Y/ct[1]),i.rotation,-(M-ot),-(W-ut)),this.helper.setUniformMatrixValue(ur.TILE_TRANSFORM,aw(this.tempMat4_,this.tileTransform_)),this.helper.bindBuffer(C.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(hst);for(var X=0;X<C.textures.length;){var It="TEXTURE"+X,at="".concat(ur.TILE_TEXTURE_ARRAY,"[").concat(X,"]");n.activeTexture(n[It]),n.bindTexture(n.TEXTURE_2D,C.textures[X]),n.uniform1i(this.helper.getUniformLocation(at),X),++X}for(var j=0;j<this.paletteTextures_.length;++j){var Z=this.paletteTextures_[j];n.activeTexture(n["TEXTURE"+X]);var ft=Z.getTexture(n);n.bindTexture(n.TEXTURE_2D,ft),n.uniform1i(this.helper.getUniformLocation(Z.name),X),++X}var I=T in f?f[T]:1;I<1&&(t.animate=!0),this.helper.setUniformFloatValue(ur.TRANSITION_ALPHA,I),this.helper.setUniformFloatValue(ur.DEPTH,H),this.helper.setUniformFloatValue(ur.TEXTURE_PIXEL_WIDTH,ct[0]),this.helper.setUniformFloatValue(ur.TEXTURE_PIXEL_HEIGHT,ct[1]),this.helper.setUniformFloatValue(ur.TEXTURE_RESOLUTION,At),this.helper.setUniformFloatValue(ur.TEXTURE_ORIGIN_X,Tt[0]+ot*ct[0]*At),this.helper.setUniformFloatValue(ur.TEXTURE_ORIGIN_Y,Tt[1]-ut*ct[1]*At),this.helper.setUniformFloatVec4(ur.RENDER_EXTENT,A),this.helper.setUniformFloatValue(ur.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(ur.ZOOM,i.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var it=this.helper.getCanvas(),V=this.tileTextureCache_;V.canExpireCache();){var C=V.pop();C.dispose()}var Ft=function(Mt,Et){o.expireCache(Et.viewState.projection,fst)};return t.postRenderFunctions.push(Ft),this.postRender(n,t),it},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=bn(i.pixelToCoordinateTransform,t.slice()),s=i.viewState,A=a.getExtent();if(A&&!mA(gs(A,s.projection),o))return null;var l=a.getRenderSource(),u=l.getTileGridForProjection(s.projection);if(!l.getWrapX()){var c=u.getExtent();if(c&&!mA(c,o))return null}for(var h=this.tileTextureCache_,f=u.getZForResolution(s.resolution);f>=u.getMinZoom();--f){var d=u.getTileCoordForCoordAndZ(o,f),g=rT(l,d);if(h.containsKey(g)){var m=h.get(g);if(m.loaded){var v=u.getOrigin(f),y=Wi(u.getTileSize(f)),w=u.getResolution(f),C=(o[0]-v[0])/w-d[1]*y[0],O=(v[1]-o[1])/w-d[2]*y[1];return m.getPixelData(C,O)}}}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=rT(l,[i,u,c]),f=!1;if(A.containsKey(h)){var d=A.get(h);d.loaded&&(C5(a,d,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}(PH),gst=pst,vst=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}(),mst=vst,ue={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},dr={};function _l(r){if(typeof r=="number")return ue.NUMBER;if(typeof r=="boolean")return ue.BOOLEAN;if(typeof r=="string")return RX(r)?ue.COLOR|ue.STRING:ue.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?ue.COLOR|ue.NUMBER_ARRAY:ue.NUMBER_ARRAY;if(typeof e[0]!="string")throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(e)));var n=dr[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.getReturnType(e.slice(1))}function yst(r){return kk(r)%1===0}function zC(r){var e=r.toString();return e.indexOf(".")===-1?e+".0":e}function DH(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(zC).join(", "),")")}function _st(r){var e=lh(r).slice();return e.length<4&&e.push(1),DH(e.map(function(t,n){return n<3?t/255:t}))}function fE(r,e){return r.stringLiteralsMap[e]===void 0&&(r.stringLiteralsMap[e]=Object.keys(r.stringLiteralsMap).length),r.stringLiteralsMap[e]}function wst(r,e){return zC(fE(r,e))}function ve(r,e,t){if(Array.isArray(e)&&typeof e[0]=="string"){var n=dr[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=_l(e);if((i&ue.NUMBER)>0)return zC(e);if((i&ue.BOOLEAN)>0)return e.toString();if((i&ue.STRING)>0&&(t===void 0||t==ue.STRING))return wst(r,e.toString());if((i&ue.COLOR)>0&&(t===void 0||t==ue.COLOR))return _st(e);if((i&ue.NUMBER_ARRAY)>0)return DH(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(t,")"))}function QH(r){if(!(_l(r)&ue.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(r)," instead"))}function Fi(r){for(var e=0;e<r.length;e++)QH(r[e])}function kH(r){if(!(_l(r)&ue.STRING))throw new Error("A string value was expected, got ".concat(JSON.stringify(r)," instead"))}function aR(r){if(!(_l(r)&ue.BOOLEAN))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(r)," instead"))}function Fn(r,e){if(r.length!==e)throw new Error("Exactly ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function Eh(r,e){if(r.length<e)throw new Error("At least ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function YC(r,e){if(r.length>e)throw new Error("At most ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function HH(r){if(r.length%2!==0)throw new Error("An even amount of arguments was expected, got ".concat(r," instead"))}function Est(r){if(r.length%2===0)throw new Error("An odd amount of arguments was expected, got ".concat(r," instead"))}function oR(r,e){if(!yst(e))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(r)))}dr.get={getReturnType:function(r){return ue.ANY},toGlsl:function(r,e){Fn(e,1),kH(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 sR(r){return"u_var_"+r}dr.var={getReturnType:function(r){return ue.ANY},toGlsl:function(r,e){Fn(e,1),kH(e[0]);var t=e[0].toString();return r.variables.indexOf(t)===-1&&r.variables.push(t),sR(t)}};var GH="u_paletteTextures";dr.palette={getReturnType:function(r){return ue.COLOR},toGlsl:function(r,e){Fn(e,2),QH(e[0]);var t=ve(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=Vk(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(GH,"[").concat(r.paletteTextures.length,"]"),h=new mst(c,a);return r.paletteTextures.push(h),"texture2D(".concat(c,", vec2((").concat(t," + 0.5) / ").concat(i,".0, 0.5))")}};var nT="getBandValue";dr.band={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){Eh(e,1),YC(e,3);var t=e[0];if(!(nT 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(ur.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[nT]=`
|
||
float getBandValue(float band, float xOffset, float yOffset) {
|
||
float dx = xOffset / `.concat(ur.TEXTURE_PIXEL_WIDTH,`;
|
||
float dy = yOffset / `).concat(ur.TEXTURE_PIXEL_HEIGHT,`;
|
||
`).concat(n,`
|
||
}
|
||
`)}var l=ve(r,t),u=ve(r,e[1]||0),c=ve(r,e[2]||0);return"".concat(nT,"(").concat(l,", ").concat(u,", ").concat(c,")")}};dr.time={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,0),"u_time"}};dr.zoom={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,0),"u_zoom"}};dr.resolution={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,0),"u_resolution"}};dr["*"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," * ").concat(ve(r,e[1]),")")}};dr["/"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," / ").concat(ve(r,e[1]),")")}};dr["+"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," + ").concat(ve(r,e[1]),")")}};dr["-"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," - ").concat(ve(r,e[1]),")")}};dr.clamp={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){Fn(e,3),Fi(e);var t=ve(r,e[1]),n=ve(r,e[2]);return"clamp(".concat(ve(r,e[0]),", ").concat(t,", ").concat(n,")")}};dr["%"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Fi(e),"mod(".concat(ve(r,e[0]),", ").concat(ve(r,e[1]),")")}};dr["^"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Fi(e),"pow(".concat(ve(r,e[0]),", ").concat(ve(r,e[1]),")")}};dr.abs={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Fi(e),"abs(".concat(ve(r,e[0]),")")}};dr.floor={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Fi(e),"floor(".concat(ve(r,e[0]),")")}};dr.round={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Fi(e),"floor(".concat(ve(r,e[0])," + 0.5)")}};dr.ceil={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Fi(e),"ceil(".concat(ve(r,e[0]),")")}};dr.sin={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Fi(e),"sin(".concat(ve(r,e[0]),")")}};dr.cos={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Fi(e),"cos(".concat(ve(r,e[0]),")")}};dr.atan={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Eh(e,1),YC(e,2),Fi(e),e.length===2?"atan(".concat(ve(r,e[0]),", ").concat(ve(r,e[1]),")"):"atan(".concat(ve(r,e[0]),")")}};dr[">"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," > ").concat(ve(r,e[1]),")")}};dr[">="]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," >= ").concat(ve(r,e[1]),")")}};dr["<"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," < ").concat(ve(r,e[1]),")")}};dr["<="]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," <= ").concat(ve(r,e[1]),")")}};function $H(r){return{getReturnType:function(e){return ue.BOOLEAN},toGlsl:function(e,t){Fn(t,2);for(var n=ue.ANY,i=0;i<t.length;i++)n&=_l(t[i]);if(n===ue.NONE)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(t)," instead"));return n&=~ue.COLOR,"(".concat(ve(e,t[0],n)," ").concat(r," ").concat(ve(e,t[1],n),")")}}}dr["=="]=$H("==");dr["!="]=$H("!=");dr["!"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,1),aR(e[0]),"(!".concat(ve(r,e[0]),")")}};function VH(r){return{getReturnType:function(e){return ue.BOOLEAN},toGlsl:function(e,t){Eh(t,2);for(var n=0;n<t.length;n++)aR(t[n]);var i="";return i=t.map(function(a){return ve(e,a)}).join(" ".concat(r," ")),i="(".concat(i,")"),i}}}dr.all=VH("&&");dr.any=VH("||");dr.between={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){Fn(e,3),Fi(e);var t=ve(r,e[1]),n=ve(r,e[2]),i=ve(r,e[0]);return"(".concat(i," >= ").concat(t," && ").concat(i," <= ").concat(n,")")}};dr.array={getReturnType:function(r){return ue.NUMBER_ARRAY},toGlsl:function(r,e){Eh(e,2),YC(e,4),Fi(e);var t=e.map(function(n){return ve(r,n,ue.NUMBER)});return"vec".concat(e.length,"(").concat(t.join(", "),")")}};dr.color={getReturnType:function(r){return ue.COLOR},toGlsl:function(r,e){Eh(e,3),YC(e,4),Fi(e);var t=e;e.length===3&&t.push(1);var n=e.map(function(i,a){return ve(r,i,ue.NUMBER)+(a<3?" / 255.0":"")});return"vec".concat(e.length,"(").concat(n.join(", "),")")}};dr.interpolate={getReturnType:function(r){for(var e=ue.COLOR|ue.NUMBER,t=3;t<r.length;t+=2)e=e&_l(r[t]);return e},toGlsl:function(r,e,t){HH(e),Eh(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:ue.ANY,o=dr.interpolate.getReturnType(e)&a;oR(e,o);for(var s=ve(r,e[1]),A=zC(i),l="",u=2;u<e.length-2;u+=2){var c=ve(r,e[u]),h=l||ve(r,e[u+1],o),f=ve(r,e[u+2]),d=ve(r,e[u+3],o);l="mix(".concat(h,", ").concat(d,", pow(clamp((").concat(s," - ").concat(c,") / (").concat(f," - ").concat(c,"), 0.0, 1.0), ").concat(A,"))")}return l}};dr.match={getReturnType:function(r){for(var e=ue.ANY,t=2;t<r.length;t+=2)e=e&_l(r[t]);return e=e&_l(r[r.length-1]),e},toGlsl:function(r,e,t){HH(e),Eh(e,4);var n=t!==void 0?t:ue.ANY,i=dr.match.getReturnType(e)&n;oR(e,i);for(var a=ve(r,e[0]),o=ve(r,e[e.length-1],i),s=null,A=e.length-3;A>=1;A-=2){var l=ve(r,e[A]),u=ve(r,e[A+1],i);s="(".concat(a," == ").concat(l," ? ").concat(u," : ").concat(s||o,")")}return s}};dr.case={getReturnType:function(r){for(var e=ue.ANY,t=1;t<r.length;t+=2)e=e&_l(r[t]);return e=e&_l(r[r.length-1]),e},toGlsl:function(r,e,t){Est(e),Eh(e,3);var n=t!==void 0?t:ue.ANY,i=dr.case.getReturnType(e)&n;oR(e,i);for(var a=0;a<e.length-1;a+=2)aR(e[a]);for(var o=ve(r,e[e.length-1],i),s=null,a=e.length-3;a>=0;a-=2){var A=ve(r,e[a]),l=ve(r,e[a+1],i);s="(".concat(A," ? ").concat(l," : ").concat(s||o,")")}return s}};var Cst=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 B5(r,e){var t=`
|
||
attribute vec2 `.concat(ow.TEXTURE_COORD,`;
|
||
uniform mat4 `).concat(ur.TILE_TRANSFORM,`;
|
||
uniform float `).concat(ur.TEXTURE_PIXEL_WIDTH,`;
|
||
uniform float `).concat(ur.TEXTURE_PIXEL_HEIGHT,`;
|
||
uniform float `).concat(ur.TEXTURE_RESOLUTION,`;
|
||
uniform float `).concat(ur.TEXTURE_ORIGIN_X,`;
|
||
uniform float `).concat(ur.TEXTURE_ORIGIN_Y,`;
|
||
uniform float `).concat(ur.DEPTH,`;
|
||
|
||
varying vec2 v_textureCoord;
|
||
varying vec2 v_mapCoord;
|
||
|
||
void main() {
|
||
v_textureCoord = `).concat(ow.TEXTURE_COORD,`;
|
||
v_mapCoord = vec2(
|
||
`).concat(ur.TEXTURE_ORIGIN_X," + ").concat(ur.TEXTURE_RESOLUTION," * ").concat(ur.TEXTURE_PIXEL_WIDTH,` * v_textureCoord[0],
|
||
`).concat(ur.TEXTURE_ORIGIN_Y," - ").concat(ur.TEXTURE_RESOLUTION," * ").concat(ur.TEXTURE_PIXEL_HEIGHT,` * v_textureCoord[1]
|
||
);
|
||
gl_Position = `).concat(ur.TILE_TRANSFORM," * vec4(").concat(ow.TEXTURE_COORD,", ").concat(ur.DEPTH,`, 1.0);
|
||
}
|
||
`),n={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e},i=[];if(r.color!==void 0){var a=ve(n,r.color,ue.COLOR);i.push("color = ".concat(a,";"))}if(r.contrast!==void 0){var o=ve(n,r.contrast,ue.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=ve(n,r.exposure,ue.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=ve(n,r.saturation,ue.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=ve(n,r.gamma,ue.NUMBER);i.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(l,"));"))}if(r.brightness!==void 0){var u=ve(n,r.brightness,ue.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(w){var C=n.variables[w];if(!(C in r.variables))throw new Error("Missing '".concat(C,"' in style variables"));var O=sR(C);c[O]=function(){var F=r.variables[C];return typeof F=="string"&&(F=fE(n,F)),F!==void 0?F:-9999999}},d=0;d<h;++d)f(d);var g=Object.keys(c).map(function(w){return"uniform float ".concat(w,";")}),m=Math.ceil(e/4);g.push("uniform sampler2D ".concat(ur.TILE_TEXTURE_ARRAY,"[").concat(m,"];")),n.paletteTextures&&g.push("uniform sampler2D ".concat(GH,"[").concat(n.paletteTextures.length,"];"));var v=Object.keys(n.functions).map(function(w){return n.functions[w]}),y=`
|
||
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
||
precision highp float;
|
||
#else
|
||
precision mediump float;
|
||
#endif
|
||
|
||
varying vec2 v_textureCoord;
|
||
varying vec2 v_mapCoord;
|
||
uniform vec4 `.concat(ur.RENDER_EXTENT,`;
|
||
uniform float `).concat(ur.TRANSITION_ALPHA,`;
|
||
uniform float `).concat(ur.TEXTURE_PIXEL_WIDTH,`;
|
||
uniform float `).concat(ur.TEXTURE_PIXEL_HEIGHT,`;
|
||
uniform float `).concat(ur.RESOLUTION,`;
|
||
uniform float `).concat(ur.ZOOM,`;
|
||
|
||
`).concat(g.join(`
|
||
`),`
|
||
|
||
`).concat(v.join(`
|
||
`),`
|
||
|
||
void main() {
|
||
if (
|
||
v_mapCoord[0] < `).concat(ur.RENDER_EXTENT,`[0] ||
|
||
v_mapCoord[1] < `).concat(ur.RENDER_EXTENT,`[1] ||
|
||
v_mapCoord[0] > `).concat(ur.RENDER_EXTENT,`[2] ||
|
||
v_mapCoord[1] > `).concat(ur.RENDER_EXTENT,`[3]
|
||
) {
|
||
discard;
|
||
}
|
||
|
||
vec4 color = texture2D(`).concat(ur.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(ur.TRANSITION_ALPHA,`;
|
||
}`);return{vertexShader:t,fragmentShader:y,uniforms:c,paletteTextures:n.paletteTextures}}var jH=function(r){Cst(e,r);function e(t){var n=this,i=t?Ce({},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(Jr.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():co.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=B5(this.style_,this.getSourceBandCount_());return new gst(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,d){var g=o[f],m=g.getState();if(m==co.LOADING){var v=function(){g.getState()==co.READY&&(g.removeEventListener("change",v),i.changed())};g.addEventListener("change",v)}s=s&&m==co.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=B5(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){Ce(this.styleVariables_,t),this.changed()},e}(CH);jH.prototype.dispose;var Bst=jH;const bst={extends:bd,name:"ol-webgl-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=Ze(()=>new Bst(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&&ye(t,()=>{o(),a()}),cr(()=>{a()}),pr(()=>{o()}),Qr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function Tst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Rx=me(bst,[["render",Tst]]),Sst=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)}}(),xst=function(r){Sst(e,r);function e(t){var n=t||{};return r.call(this,n)||this}return e}(Ed),Ist=xst,Lst=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)}}(),Ost=function(r){Lst(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=ks(l,gs(n.extent,a.projection))),!A[In.ANIMATING]&&!A[In.INTERACTING]&&!av(l))if(s){var u=a.projection,c=s.getImage(l,o,i,u);c&&(this.loadImage(c)?this.image_=c:c.getState()===rr.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=bn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!mA(o,a))return null;var s=this.image_.getExtent(),A=this.image_.getImage(),l=Kr(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,d=l*o/(h*s),g=Math.round(f[0]*l),m=Math.round(f[1]*l),v=u.rotation;if(v){var y=Math.round(Math.sqrt(g*g+m*m));g=y,m=y}yo(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,v,-g/2,-m/2),_0(this.inversePixelTransform,this.pixelTransform);var w=AF(this.pixelTransform);this.useContainer(n,w,A.opacity,this.getBackground(t));var C=this.context,O=C.canvas;O.width!=g||O.height!=m?(O.width=g,O.height=m):this.containerReused||C.clearRect(0,0,g,m);var F=!1,I=!0;if(A.extent){var T=gs(A.extent,u.projection);I=qn(T,t.extent),F=I&&!ps(T,t.extent),F&&this.clipUnrotated(C,t,T)}var L=i.getImage(),N=yo(this.tempTransform,g/2,m/2,d,d,0,s*(a[0]-c[0])/o,s*(c[1]-a[3])/o);this.renderedResolution=o*l/s;var x=L.width*N[0],S=L.height*N[3];if(this.getLayer().getSource().getInterpolate()||Ce(C,Ug),this.preRender(C,t),I&&x>=.5&&S>=.5){var P=N[4],U=N[5],tt=A.opacity,q=void 0;tt!==1&&(q=C.globalAlpha,C.globalAlpha=tt),C.drawImage(L,0,0,+L.width,+L.height,Math.round(P),Math.round(U),Math.round(x),Math.round(S)),tt!==1&&(C.globalAlpha=q)}return this.postRender(C,t),F&&C.restore(),Ce(C,TH),w!==O.style.transform&&(O.style.transform=w),this.container},e}(VF),Fst=Ost,Rst=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)}}(),Mst=function(r){Rst(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Fst(this)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Ist),KH=Mst;const Nst={extends:bd,name:"ol-image-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=new KH(t);return ye(t,()=>{n.setProperties(t)}),cr(()=>{e.addLayer(n)}),pr(()=>{e.removeLayer(n)}),Qr("imageLayer",n),{imageLayer:n}}};function Pst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Mx=me(Nst,[["render",Pst]]);const Ust={extends:bd,name:"ol-vector-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=Ze(()=>new El(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Qr("vectorLayer",n),Qr("stylable",n),{vectorLayer:n}},props:{renderBuffer:{type:Number,default:100},updateWhileAnimating:{type:Boolean,default:!1},style:{type:Function},updateWhileInteracting:{type:Boolean,default:!1}}};function Dst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Nx=me(Ust,[["render",Dst]]),Qst=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)}}(),kst=function(r){Qst(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=lst(t),i=n[0];this.forEach(function(a){a.tileCoord[0]!==i&&(this.remove(Xy(a.tileCoord)),a.release())}.bind(this))}},e}(LH),WH=kst,iT={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Hst=[0,0,0],dc=5,Gst=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,Le(aX(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,Le(this.origins_.length==this.resolutions_.length,20));var a=e.extent;a!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=TA(a)),Le(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,Le(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:yF,Le(!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 rR(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=gp(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 gp(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 gp(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 gp(A,A,l,l,n);var u=Math.floor(s*(a+1))-1,c=Math.floor(s*(o+1))-1;return gp(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=Wi(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=Hst;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),gp(a,i[1],o,i[2],n)},r.prototype.getTileCoordCenter=function(e){var t=this.getOrigin(e[0]),n=this.getResolution(e[0]),i=Wi(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=Wi(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=Wi(this.getTileSize(o),this.tmpSize_),u=s*(e-A[0])/n/l[0],c=s*(A[1]-t)/n/l[1];return i?(u=Mc(u,dc)-1,c=Mc(c,dc)-1):(u=zp(u,dc),c=zp(c,dc)),Yy(o,u,c,a)},r.prototype.getTileCoordForXYAndZ_=function(e,t,n,i,a){var o=this.getOrigin(n),s=this.getResolution(n),A=Wi(this.getTileSize(n),this.tmpSize_),l=(e-o[0])/s/A[0],u=(o[1]-t)/s/A[1];return i?(l=Mc(l,dc)-1,u=Mc(u,dc)-1):(l=zp(l,dc),u=zp(u,dc)),Yy(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=bC(this.resolutions_,e,t||0);return Un(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}(),AR=Gst;function zH(r){var e=r.getDefaultTileGrid();return e||(e=jst(r),r.setDefaultTileGrid(e)),e}function $st(r,e,t){var n=e[0],i=r.getTileCoordCenter(e),a=XC(t);if(mA(a,i))return e;var o=Kr(a),s=Math.ceil((a[0]-i[0])/o);return i[0]+=o*s,r.getTileCoordForCoordAndZ(i,n)}function Vst(r,e,t,n){var i=n!==void 0?n:Fm.TOP_LEFT,a=XH(r,e,t);return new AR({extent:r,origin:Nk(r,i),resolutions:a,tileSize:t})}function YH(r){var e=r||{},t=e.extent||Ve("EPSG:3857").getExtent(),n={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:XH(t,e.maxZoom,e.tileSize,e.maxResolution)};return new AR(n)}function XH(r,e,t,n){for(var i=e!==void 0?e:Sq,a=Li(r),o=Kr(r),s=Wi(t!==void 0?t:yF),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 jst(r,e,t,n){var i=XC(r);return Vst(i,e,t,n)}function XC(r){r=Ve(r);var e=r.getExtent();if(!e){var t=180*yA[ho.DEGREES]/r.getMetersPerUnit();e=Ho(-t,-t,t,t)}return e}var qH=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)}}(),Kst=function(r){qH(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&&Wi(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),i),n.tileCache=new WH(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=WC(n,c,h),u=!1,o.containsKey(l)&&(A=o.get(l),u=A.getState()===Te.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 Re()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:zH(t)},e.prototype.getTileCacheForProjection=function(t){return Le(el(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=Wi(a.getTileSize(t),this.tmpSize);return o==1?s:m8(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=$st(a,t,i)),ust(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}(kC),Wst=function(r){qH(e,r);function e(t,n){var i=r.call(this,t)||this;return i.tile=n,i}return e}(Vo),ZH=Kst;function zst(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);Le(u,55);var c=u.getHeight()-o[2]-1;return c.toString()})}}function Yst(r,e){for(var t=r.length,n=new Array(t),i=0;i<t;++i)n[i]=zst(r[i],e);return dE(n)}function dE(r){return r.length===1?r[0]:function(e,t,n){if(e){var i=UH(e),a=Wc(i,r.length);return r[a](e,t,n)}else return}}function JH(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 Xst=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)}}(),qst=function(r){Xst(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=Ee(n),a=n.getState(),o;a==Te.LOADING?(this.tileLoadingKeys_[i]=!0,o=iT.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],o=a==Te.ERROR?iT.TILELOADERROR:a==Te.LOADED?iT.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new Wst(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=JH(t);this.urls=n,this.setUrls(n)},e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
|
||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(Yst(t,this.tileGrid),n):this.setKey(n)},e.prototype.tileUrlFunction=function(t,n,i){},e.prototype.useTile=function(t,n,i){var a=WC(t,n,i);this.tileCache.containsKey(a)&&this.tileCache.get(a)},e}(ZH),Zst=qst,Jst=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){Jst(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:eAt,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:cE,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&&!el(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&&!el(this.getProjection(),t)?!1:r.prototype.getOpaque.call(this,t)},e.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(this.tileGrid&&(!n||el(n,t)))return this.tileGrid;var i=Ee(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=zH(t)),this.tileGridForProjection[i]},e.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||el(n,t))return this.tileCache;var i=Ee(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new WH(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?Te.IDLE:Te.EMPTY,u!==void 0?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=s,c.addEventListener(xe.CHANGE,this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,n,i,a,o){var s=this.getProjection();if(!s||!o||el(s,o))return this.getTileInternal(t,n,i,a,s||o);var A=this.getTileCacheForProjection(o),l=[t,n,i],u=void 0,c=Xy(l);A.containsKey(c)&&(u=A.get(c));var h=this.getKey();if(u&&u.key==h)return u;var f=this.getTileGridForProjection(s),d=this.getTileGridForProjection(o),g=this.getTileCoordForTileUrlFunction(l,o),m=new eR(s,f,o,d,l,g,this.getTilePixelRatio(a),this.getGutter(),function(v,y,w,C){return this.getTileInternal(v,y,w,C,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=WC(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()==Te.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=Ve(t);if(i){var a=Ee(i);a in this.tileGridForProjection||(this.tileGridForProjection[a]=n)}}},e}(Zst);function eAt(r,e){r.getImage().src=e}var qC=tAt,tG=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 rAt(r,e,t,n){var i=document.createElement("script"),a="olc_"+Ee(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){tG(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){tG(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 nAt=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 iAt(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 aAt='<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>',oAt=function(r){nAt(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:Ve("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:co.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 rAt(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(co.ERROR);return}var n=t.resourceSets[0].resources[0],i=this.maxZoom_==-1?n.zoomMax:this.maxZoom_,a=this.getProjection(),o=XC(a),s=this.hidpi_?2:1,A=n.imageWidth==n.imageHeight?n.imageWidth/s:[n.imageWidth/s,n.imageHeight/s],l=YH({extent:o,minZoom:n.zoomMin,maxZoom:i,tileSize:A});this.tileGrid=l;var u=this.culture_,c=this.hidpi_;if(this.tileUrlFunction=dE(n.imageUrlSubdomains.map(function(f){var d=[0,0,0],g=n.imageUrl.replace("{subdomain}",f).replace("{culture}",u);return function(m,v,y){if(m){Yy(m[0],m[1],m[2],d);var w=g;return c&&(w+="&dpi=d1&device=mobile"),w.replace("{quadkey}",iAt(d))}else return}})),n.imageryProviders){var h=nd(Ve("EPSG:4326"),this.getProjection());this.setAttributions(function(f){var d=[],g=f.viewState,m=this.getTileGrid(),v=m.getZForResolution(g.resolution,this.zDirection),y=m.getTileCoordForCoordAndZ(g.center,v),w=y[0];return n.imageryProviders.map(function(C){for(var O=!1,F=C.coverageAreas,I=0,T=F.length;I<T;++I){var L=F[I];if(w>=L.zoomMin&&w<=L.zoomMax){var N=L.bbox,x=[N[1],N[0],N[3],N[2]],S=hF(x,h);if(qn(S,f.extent)){O=!0;break}}}O&&d.push(C.attribution)}),d.push(aAt),d}.bind(this))}this.setState(co.READY)},e}(qC),sAt=oAt,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)}}(),lAt=function(r){AAt(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:YH({extent:XC(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}(qC),eG=lAt,uAt=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)}}(),cAt=function(r){uAt(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 Le(a.getType()==pt.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(xe.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(xe.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=Di(),n=this.distance*this.resolution,i=this.source.getFeatures(),a={},o=0,s=i.length;o<s;o++){var A=i[o];if(!(Ee(A)in a)){var l=this.geometryFunction(A);if(l){var u=l.getCoordinates();Pf(u,t),_o(t,n,t);var c=this.source.getFeaturesInExtent(t).filter(function(h){var f=Ee(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?zk(i,o.getCoordinates()):t.splice(a,1)}Yk(i,1/t.length);var s=Ya(n),A=this.interpolationRatio,l=new xr([i[0]*(1-A)+s[0]*A,i[1]*(1-A)+s[1]*A]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new _r({geometry:l,features:t})},e}(Mu),rG=cAt,nl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hAt(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 Va=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))},lo={VERSION1:"version1",VERSION2:"version2",VERSION3:"version3"},sd={};sd[lo.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"]}};sd[lo.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"]}};sd[lo.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"]}};sd.none={none:{supports:[],formats:[],qualities:[]}};var fAt=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,b5=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,dAt=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;function pAt(r){var e=r.getComplianceLevelSupportedFeatures();return e===void 0&&(e=sd[lo.VERSION1].level0),{url:r.imageInfo["@id"]===void 0?void 0:r.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:Va(Va([],e.formats,!0),[r.imageInfo.formats===void 0?[]:r.imageInfo.formats],!1),qualities:Va(Va([],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 gAt(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:Va(Va([],e.supports,!0),n,!0),formats:Va(Va([],e.formats,!0),i,!0),qualities:Va(Va([],e.qualities,!0),a,!0)}}function vAt(r){var e=r.getComplianceLevelSupportedFeatures(),t=r.imageInfo.extraFormats===void 0?e.formats:Va(Va([],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 Pi(["jpg","png","gif"],i)}).reduce(function(i,a){return i===void 0&&Pi(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:Va(Va([],e.supports,!0),r.imageInfo.extraFeatures,!0),formats:t,qualities:r.imageInfo.extraQualities===void 0?e.qualities:Va(Va([],e.qualities,!0),r.imageInfo.extraQualities,!0),preferredFormat:n}}var ZC={};ZC[lo.VERSION1]=pAt;ZC[lo.VERSION2]=gAt;ZC[lo.VERSION3]=vAt;var mAt=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 lo.VERSION1;case"http://iiif.io/api/image/2/context.json":return lo.VERSION2;case"http://iiif.io/api/image/3/context.json":return lo.VERSION3;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(lo.VERSION1)&&this.imageInfo.identifier)return lo.VERSION1;break}Le(!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 lo.VERSION1:if(fAt.test(this.imageInfo.profile))return this.imageInfo.profile;break;case lo.VERSION3:if(dAt.test(this.imageInfo.profile))return this.imageInfo.profile;break;case lo.VERSION2:if(typeof this.imageInfo.profile=="string"&&b5.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"&&b5.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?sd.none.none:sd[e][t]}},r.prototype.getTileSourceOptions=function(e){var t=e||{},n=this.getImageApiVersion();if(n!==void 0){var i=n===void 0?void 0:ZC[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&&Pi(i.formats,t.format)?t.format:i.preferredFormat!==void 0?i.preferredFormat:"jpg",supports:i.supports,quality:t.quality&&Pi(i.qualities,t.quality)?t.quality:Pi(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}(),yAt=mAt,_At=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)}}(),wAt=function(r){_At(e,r);function e(t,n,i,a,o,s,A){var l=this,u=t.getExtent(),c=n.getExtent(),h=c?ks(i,c):i,f=Ya(h),d=Wy(t,n,f,a),g=BH,m=new bH(t,n,h,u,d*g,a),v=m.calculateSourceExtent(),y=s(v,d,o),w=y?rr.IDLE:rr.EMPTY,C=y?y.getPixelRatio():1;return l=r.call(this,i,a,C,w)||this,l.targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=m,l.targetResolution_=a,l.targetExtent_=i,l.sourceImage_=y,l.sourcePixelRatio_=C,l.interpolate_=A,l.canvas_=null,l.sourceListenerKey_=null,l}return e.prototype.disposeInternal=function(){this.state==rr.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==rr.LOADED){var n=Kr(this.targetExtent_)/this.targetResolution_,i=Li(this.targetExtent_)/this.targetResolution_;this.canvas_=SH(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==rr.IDLE){this.state=rr.LOADING,this.changed();var t=this.sourceImage_.getState();t==rr.LOADED||t==rr.ERROR?this.reproject_():(this.sourceListenerKey_=je(this.sourceImage_,xe.CHANGE,function(n){var i=this.sourceImage_.getState();(i==rr.LOADED||i==rr.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){Yr(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(H8),EAt=wAt,nG=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)}}(),aT={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},CAt=function(r){nG(e,r);function e(t,n){var i=r.call(this,t)||this;return i.image=n,i}return e}(Vo),BAt=function(r){nG(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=bC(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||el(o,a))return o&&(a=o),this.getImageInternal(t,n,i,a);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&el(this.reprojectedImage_.getProjection(),a)&&this.reprojectedImage_.getResolution()==n&&vl(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new EAt(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 Re()},e.prototype.handleImageChange=function(t){var n=t.target,i;switch(n.getState()){case rr.LOADING:this.loading=!0,i=aT.IMAGELOADSTART;break;case rr.LOADED:this.loading=!1,i=aT.IMAGELOADEND;break;case rr.ERROR:this.loading=!1,i=aT.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new CAt(i,n))},e}(kC);function iG(r,e){r.getImage().src=e}var aG=BAt;function Dg(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 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=this,i=t.crossOrigin!==void 0?t.crossOrigin:null,a=t.imageLoadFunction!==void 0?t.imageLoadFunction:iG,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:Ve(t.projection)})||this,n.url_=t.url,n.imageExtent_=t.imageExtent,n.image_=new G8(n.imageExtent_,void 0,1,n.url_,i,a),n.imageSize_=t.imageSize?t.imageSize:null,n.image_.addEventListener(xe.CHANGE,n.handleImageChange.bind(n)),n}return e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,n,i,a){return qn(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(t){if(this.image_.getState()==rr.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=Kr(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=wo(c,h);this.getInterpolate()||Ce(f,Ug);var d=f.canvas;f.drawImage(i,0,0,a,o,0,0,d.width,d.height),this.image_.setImage(d)}}r.prototype.handleImageChange.call(this,t)},e}(aG),SAt=TAt,Uc="1.3.0",Dc={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"},xAt=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)}}(),pc=4,T5=[101,101],IAt=function(r){xAt(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:iG,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=Ve(i),s=this.getProjection();s&&s!==o&&(n=Wy(s,o,t,n),t=uh(t,o,s));var A=Df(t,n,0,T5),l={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Ce(l,this.params_,a);var u=zp((t[0]-A[0])/n,pc),c=zp((A[3]-t[1])/n,pc);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(A,T5,1,s||o,l)}},e.prototype.getLegendUrl=function(t,n){if(this.url_!==void 0){var i={SERVICE:"WMS",VERSION:Uc,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 Ce(i,n),Dg(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=Ya(t),A=Mc(Kr(t)/o,pc),l=Mc(Li(t)/o,pc),u=Df(s,o,0,[A,l]),c=Mc(this.ratio_*Kr(t)/o,pc),h=Mc(this.ratio_*Li(t)/o,pc),f=Df(s,o,0,[c,h]),d=this.image_;if(d&&this.renderedRevision_==this.getRevision()&&d.getResolution()==n&&d.getPixelRatio()==i&&ps(d.getExtent(),u))return d;var g={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Ce(g,this.params_),this.imageSize_[0]=cP(Kr(f)/o,pc),this.imageSize_[1]=cP(Li(f)/o,pc);var m=this.getRequestUrl_(f,this.imageSize_,i,a,g);return this.image_=new G8(f,n,i,m,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(xe.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,n,i,a,o){if(Le(this.url_!==void 0,9),o[this.v13_?"CRS":"SRS"]=a.getCode(),"STYLES"in this.params_||(o.STYLES=""),i!=1)switch(this.serverType_){case Dc.GEOSERVER:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case Dc.MAPSERVER:o.MAP_RESOLUTION=90*i;break;case Dc.CARMENTA_SERVER:case Dc.QGIS:o.DPI=90*i;break;default:Le(!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(","),Dg(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){Ce(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Uc;this.v13_=Wk(t,"1.3")>=0},e}(aG),LAt=IAt,OAt=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)}}(),FAt='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',RAt=function(r){OAt(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=[FAt];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}(eG),MAt=RAt,NAt=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)}}(),PAt=function(r){NAt(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_=Di(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){var o=Ve(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=Wi(A.getTileSize(u[0]),this.tmpSize),d=this.gutter_;d!==0&&(f=OP(f,d,this.tmpSize),h=_o(h,c*d,h)),s&&s!==o&&(c=Wy(s,o,t,c),h=Xw(h,o,s),t=uh(t,o,s));var g={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Ce(g,this.params_,a);var m=Math.floor((t[0]-h[0])/c),v=Math.floor((h[3]-t[1])/c);return g[this.v13_?"I":"X"]=m,g[this.v13_?"J":"Y"]=v,this.getRequestUrl_(u,f,h,1,s||o,g)}},e.prototype.getLegendUrl=function(t,n){if(this.urls[0]!==void 0){var i={SERVICE:"WMS",VERSION:Uc,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 Ce(i,n),Dg(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 Dc.GEOSERVER:var l=90*a+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+l:s.FORMAT_OPTIONS="dpi:"+l;break;case Dc.MAPSERVER:s.MAP_RESOLUTION=90*a;break;case Dc.CARMENTA_SERVER:case Dc.QGIS:s.DPI=90*a;break;default:Le(!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 d=Wc(UH(t),A.length);f=A[d]}return Dg(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){Ce(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Uc;this.v13_=Wk(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=Wi(a.getTileSize(t[0]),this.tmpSize),l=this.gutter_;l!==0&&(A=OP(A,l,this.tmpSize),s=_o(s,o*l,s)),n!=1&&(A=m8(A,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Ce(u,this.params_),this.getRequestUrl_(t,A,s,n,i,u)}},e}(qC),UAt=PAt,t1={KVP:"KVP",REST:"REST"},DAt=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)}}(),QAt=function(r){DAt(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}(AR),Px=QAt,kAt=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){kAt(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:t1.KVP,o=t.tileGrid,s=t.urls;return s===void 0&&t.url!==void 0&&(s=JH(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=dE(s.map(n.createFromWMTSTemplate.bind(n)))),n}return e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
|
||
`);this.setTileUrlFunction(dE(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){Ce(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==t1.KVP&&Ce(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=n==t1.KVP?Dg(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]};Ce(u,o);var c=t;return n==t1.KVP?c=Dg(c,u):c=c.replace(/\{(\w+?)\}/g,function(h,f){return u[f]}),c}else return}},e}(qC),oG=HAt;window.ol&&!ol.ext&&(ol.ext={});var kr=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r};window.ol&&(ol.inherits||(ol.inherits=kr));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 JC(r){const e=r.frameState,t=nv(r.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new jF(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 sw=Ik.split(".");sw=parseInt(sw[0])*100+parseInt(sw[1]);var Ux=function(r,e){var t=r.frameState.pixelRatio;if(sw>605&&t!==1&&e.getImage()instanceof O0){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},Td=function(r){var e=r||{};El.call(this,e),this.oldcluster=new Mu,this.clusters=[],this.animation={start:!1},this.set("animationDuration",typeof e.animationDuration=="number"?e.animationDuration:700),this.set("animationMethod",e.animationMethod||Gs),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};kr(Td,El);Td.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)}};Td.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};Td.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]};Td.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=_o(s,100*t),a.cA=this.oldcluster.getFeaturesInExtent(s),a.cB=this.getSource().getFeaturesInExtent(s),a.revers=!1):(s=_o(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||JC(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 d=l.f.getGeometry().getCoordinates(),g=d[0]-l.pt[0],m=d[1]-l.pt[1];a.revers?(d[0]=l.pt[0]+c*g,d[1]=l.pt[1]+c*m):(d[0]=d[0]-c*g,d[1]=d[1]-c*m);var v=f(l.f,t,!0);if(v.length||(v=[v]),l.f.get("features").length===1&&!g&&!m)A=l.f.get("features")[0];else{var y=new xr(d);A=new _r(y)}for(var w=0,C;C=v[w];w++)if(C.getText()&&/\n/.test(C.getText().getText())){var O=C.getText().getOffsetX(),F=C.getText().getOffsetY(),I=C.getText().getRotation()||0,T=Number((C.getText().getFont()||"10px").match(/\d+/))*1.2,L=C.getText().getText().split(`
|
||
`),N,x=L.length-1,S=C.clone();L.forEach(function(P,U){switch(U==1&&(S.setImage(),S.setFill(),S.setStroke()),C.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":{N=x;break}case"hanging":case"top":{N=0;break}default:{N=x/2;break}}S.getText().setOffsetX(O-Math.sin(I)*T*(U-N)),S.getText().setOffsetY(F+Math.cos(I)*T*(U-N)),S.getText().setText(P),u.drawFeature(A,Ux(r,S))})}else u.drawFeature(A,Ux(r,C))}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}}};Td.prototype.postanimate=function(r){this.clip_&&(r.context.restore(),this.clip_=!1)};const GAt={extends:bd,name:"ol-animated-clusterlayer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=Ze(()=>new Td(bA(Jn({},t),{source:new rG({distance:t.distance,geometryFunction:o=>o.getGeometry()})}))),i=Ze(()=>n.value.getSource());return ye(t,()=>{n.value.setProperties(t),n.value.changed()}),cr(()=>{e.addLayer(n.value),n.value.changed(),e.changed()}),pr(()=>{e.removeLayer(n.value)}),Qr("vectorLayer",i),Qr("stylable",n),{vectorLayer:n,map:e}},props:{animationDuration:{type:Number,default:700},distance:{type:Number,default:20},animationMethod:{type:Function,default:Gs},updateWhileAnimating:{type:Boolean,default:!1},updateWhileInteracting:{type:Boolean,default:!1}}};function $At(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Dx=me(GAt,[["render",$At]]),WA=new Uint8Array(4),VAt=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){Fu(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 WA[0]=0,WA[1]=0,WA[2]=0,WA[3]=0,WA;this.readAll();var n=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return WA[0]=this.data_[n*4],WA[1]=this.data_[n*4+1],WA[2]=this.data_[n*4+2],WA[3]=this.data_[n*4+3],WA},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}(),jAt=VAt;function KAt(){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 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)}}(),zAt=function(r){WAt(e,r);function e(t,n){var i=this,a=n.uniforms||{},o=xi();a[kp.PROJECTION_MATRIX]=o,i=r.call(this,t,{uniforms:a,postProcesses:n.postProcesses})||this,i.ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new ly(zy,iw),i.hitVerticesBuffer_=new ly(zy,iw),i.indicesBuffer_=new ly(KC,iw),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:Ns.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:Ns.FLOAT},{name:"a_index",size:1,type:Ns.FLOAT}].concat(s),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Ns.FLOAT},{name:"a_index",size:1,type:Ns.FLOAT},{name:"a_hitColor",size:4,type:Ns.FLOAT},{name:"a_featureUid",size:1,type:Ns.FLOAT}].concat(s),i.customAttributes=n.attributes?n.attributes:[],i.previousExtent_=Di(),i.currentTransform_=o,i.renderTransform_=xi(),i.invertRenderTransform_=xi(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=KAt(),i.worker_.addEventListener("message",function(l){var u=l.data;if(u.type===tT.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,_0(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_=[je(A,ji.ADDFEATURE,i.handleSourceFeatureAdded_,i),je(A,ji.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),je(A,ji.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),je(A,ji.CLEAR,i.handleSourceFeatureClear_,i)],A.forEachFeature(function(l){this.featureCache_[Ee(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 jAt(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var n=t.feature;this.featureCache_[Ee(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var n=t.feature;this.featureCache_[Ee(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var n=t.feature;delete this.featureCache_[Ee(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[In.ANIMATING]&&!t.viewHints[In.INTERACTING],s=!vl(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 QC?n.getRenderBuffer():0,h=_o(t.extent,c*u);i.loadFeatures(h,u,l),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),nv(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=xi();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()!==pt.POINT)){A[0]=s.getFlatCoordinates()[0],A[1]=s.getFlatCoordinates()[1],bn(n,A),h=sst(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 d=void 0,g=0;g<this.customAttributes.length;g++)d=this.customAttributes[g].callback(o.feature,o.properties),this.renderInstructions_[u++]=d,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[c++]=d)}var m={type:tT.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 v={type:tT.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};v.projectionTransform=n,v.hitDetection=!0,this.worker_.postMessage(v,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){if(Le(this.hitDetectionEnabled_,66),!!this.hitRenderInstructions_){var s=bn(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=Ast(l),c=this.hitRenderInstructions_[u],h=Math.floor(c).toString(),f=this.getLayer().getSource(),d=f.getFeatureByUid(h);if(d)return a(d,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){Yr(t)}),this.sourceListenKeys_=null,r.prototype.disposeInternal.call(this)},e}(PH),sG=zAt,YAt=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 XAt(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=ve(A,t,ue.NUMBER_ARRAY|ue.NUMBER),u=ve(A,a,ue.NUMBER_ARRAY),c=ve(A,i,ue.NUMBER_ARRAY),h=ve(A,s,ue.NUMBER),f={inFragmentShader:!0,variables:A.variables,attributes:[],stringLiteralsMap:A.stringLiteralsMap,functions:{}},d=ve(f,n,ue.COLOR),g=ve(f,o,ue.NUMBER),m="1.0",v="vec2(".concat(ve(f,t,ue.NUMBER_ARRAY|ue.NUMBER),").x");switch(e.symbolType){case"square":break;case"image":break;case"circle":m="(1.0-smoothstep(1.-4./".concat(v,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var y="(v_quadCoord*2.-1.)",w="(atan(".concat(y,".x,").concat(y,".y))");m="(1.0-smoothstep(.5-3./".concat(v,",.5,cos(floor(.5+").concat(w,"/2.094395102)*2.094395102-").concat(w,")*length(").concat(y,")))");break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var C=new YAt().setSizeExpression("vec2(".concat(l,")")).setRotationExpression(h).setSymbolOffsetExpression(u).setTextureCoordinateExpression(c).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4(".concat(d,".rgb, ").concat(d,".a * ").concat(g," * ").concat(m,")"));if(r.filter){var O=ve(f,r.filter,ue.BOOLEAN);C.setFragmentDiscardExpression("!".concat(O))}var F={};if(f.variables.forEach(function(T){var L=sR(T);C.addUniform("float ".concat(L)),F[L]=function(){if(!r.variables||r.variables[T]===void 0)throw new Error("The following variable is missing from the style: ".concat(T));var N=r.variables[T];return typeof N=="string"&&(N=fE(A,N)),N!==void 0?N:-9999999}}),e.symbolType==="image"&&e.src){var I=new Image;I.crossOrigin=e.crossOrigin===void 0?"anonymous":e.crossOrigin,I.src=e.src,C.addUniform("sampler2D u_texture").setColorExpression(C.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),F.u_texture=I}return f.attributes.forEach(function(T){A.attributes.indexOf(T)===-1&&A.attributes.push(T),C.addVarying("v_".concat(T),"float","a_".concat(T))}),A.attributes.forEach(function(T){C.addAttribute("float a_".concat(T))}),{builder:C,attributes:A.attributes.map(function(T){return{name:T,callback:function(L,N){var x=N[T];return typeof x=="string"&&(x=fE(A,x)),x!==void 0?x:-9999999}}}),uniforms:F}}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)}}(),ZAt=function(r){qAt(e,r);function e(t){var n=this,i=Ce({},t);return n=r.call(this,i)||this,n.parseResult_=XAt(t.style),n.styleVariables_=t.style.variables||{},n.hitDetectionDisabled_=!!t.disableHitDetection,n}return e.prototype.createRenderer=function(){return new sG(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){Ce(this.styleVariables_,t),this.changed()},e}(Ed),JAt=ZAt;const tlt={extends:bd,name:"ol-webglpoints-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=Ze(()=>new JAt(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Qr("webglPointsLayer",n),{webglPointsLayer:n}},props:{disableHitDetection:{type:Boolean,default:!1},style:{type:Object,default:()=>({symbol:{symbolType:"circle",size:8,color:"#33AAFF",opacity:.9}})}}};function elt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Qx=me(tlt,[["render",elt]]),rlt=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)}}(),iA={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},nlt=["#00f","#0ff","#0f0","#ff0","#f00"],ilt=function(r){rlt(e,r);function e(t){var n=this,i=t||{},a=Ce({},i);delete a.gradient,delete a.radius,delete a.blur,delete a.weight,n=r.call(this,a)||this,n.gradient_=null,n.addChangeListener(iA.GRADIENT,n.handleGradientChanged_),n.setGradient(i.gradient?i.gradient:nlt),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(iA.BLUR)},e.prototype.getGradient=function(){return this.get(iA.GRADIENT)},e.prototype.getRadius=function(){return this.get(iA.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=alt(this.getGradient())},e.prototype.setBlur=function(t){this.set(iA.BLUR,t)},e.prototype.setGradient=function(t){this.set(iA.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(iA.RADIUS,t)},e.prototype.createRenderer=function(){return new sG(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.weightFunction_(t);return n!==void 0?Un(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(iA.RADIUS)+this.get(iA.BLUR))*2}.bind(this),u_blurSlope:function(){return this.get(iA.RADIUS)/Math.max(1,this.get(iA.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}(QC);function alt(r){for(var e=1,t=256,n=wo(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 AG=ilt;const olt={extends:bd,name:"ol-heatmap-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=Ze(()=>new AG(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Qr("heatmapLayer",n),Qr("stylable",n),{heatmapLayer:n}},props:{weight:{type:Function},extent:{type:Array},blur:{type:Number},radius:{type:Number}}};function slt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var kx=me(olt,[["render",slt]]);function pE(r){pE.installed||(pE.installed=!0,r.component(Fx.name,Fx),r.component(Rx.name,Rx),r.component(Mx.name,Mx),r.component(Nx.name,Nx),r.component(Dx.name,Dx),r.component(Qx.name,Qx),r.component(kx.name,kx))}var Alt=Object.freeze(Object.defineProperty({__proto__:null,default:pE,install:pE,TileLayer:Fx,WebGLTileLayer:Rx,ImageLayer:Mx,VectorLayer:Nx,AnimatedClusterLayer:Dx,WebglPointsLayer:Qx,HeatmapLayer:kx},Symbol.toStringTag,{value:"Module"}));const llt={name:"ol-source-xyz",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new eG(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{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 ult(r,e,t,n,i,a){return Mr("",!0)}var Hx=me(llt,[["render",ult]]);const clt={name:"ol-source-osm",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new MAt(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{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 hlt(r,e,t,n,i,a){return Mr("",!0)}var Gx=me(clt,[["render",hlt]]);const flt={name:"ol-source-image-static",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new SAt(bA(Jn({},t),{projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection))}));let i=n();return ye(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),cr(()=>{e.setSource(i)}),pr(()=>{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 dlt(r,e,t,n,i,a){return Mr("",!0)}var $x=me(flt,[["render",dlt]]);const plt={name:"ol-source-wmts",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r),n=Ze(()=>Ve(t.projection).getExtent()),i=Ze(()=>TA(n.value)),a=Ze(()=>Kr(n.value)/256),o=Ze(()=>{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 Px({origin:i.value,resolutions:A,matrixIds:l})}),s=Ze(()=>new oG(bA(Jn({},t),{projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection)),tileGrid:o.value})));return ye(s,()=>{e.value.setSource(s.value)}),ye(e,()=>{e.value.setSource(s.value)}),cr(()=>{e.value.setSource(s.value)}),pr(()=>{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 glt(r,e,t,n,i,a){return Mr("",!0)}var Vx=me(plt,[["render",glt]]);const vlt={name:"ol-source-vector",setup(r){const e=Be("vectorLayer")||Be("heatmapLayer"),{properties:t}=Or(r);let n=Ze(()=>new Mu(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),Qr("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 mlt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var jx=me(vlt,[["render",mlt]]);const ylt={name:"ol-source-cluster",setup(r){const e=Be("vectorLayer"),{properties:t}=Or(r);let n=Ze(()=>new rG(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value),e.value.changed()}),pr(()=>{e.value.setSource(null)}),Qr("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 _lt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Kx=me(ylt,[["render",_lt]]);const wlt={name:"ol-source-bingmaps",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new sAt(bA(Jn({},t),{key:t.apiKey})));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{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 Elt(r,e,t,n,i,a){return Mr("",!0)}var Wx=me(wlt,[["render",Elt]]);class au extends oG{constructor(e){au.layerLabelMap={vec:"cva",ter:"cta",img:"cia"},au.layerZoomMap={vec:18,ter:14,img:18};let t=e||{};t.layerType=t.layerType||"vec",t.layerType=t.isLabel?au.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||au.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:au.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"?au.default4326TileGrid():au.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 Px({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 Px({extent:[-200375083427892e-7,-200375083427892e-7,200375083427892e-7,200375083427892e-7],resolutions:e,matrixIds:t,origin:[-200375083427892e-7,200375083427892e-7],minZoom:1})}}const Clt={name:"ol-source-tianditu",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new au(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{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 Blt(r,e,t,n,i,a){return Mr("",!0)}var zx=me(Clt,[["render",Blt]]);const blt={name:"ol-source-image-wms",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new LAt(bA(Jn({},t),{params:{LAYERS:r.layers,STYLES:r.styles,TIME:r.time},projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection))}));let i=n();return ye(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),cr(()=>{e.setSource(i)}),pr(()=>{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 Tlt(r,e,t,n,i,a){return Mr("",!0)}var Yx=me(blt,[["render",Tlt]]);const Slt={name:"ol-source-webglpoints",setup(r){const e=Be("webglPointsLayer"),{properties:t}=Or(r);let n=Ze(()=>new Mu(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),Qr("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 xlt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Xx=me(Slt,[["render",xlt]]);function gE(r){gE.installed||(gE.installed=!0,r.component(Hx.name,Hx),r.component(Gx.name,Gx),r.component($x.name,$x),r.component(Vx.name,Vx),r.component(jx.name,jx),r.component(Kx.name,Kx),r.component(Wx.name,Wx),r.component(zx.name,zx),r.component(Yx.name,Yx),r.component(Xx.name,Xx))}var Ilt=Object.freeze(Object.defineProperty({__proto__:null,default:gE,install:gE,SourceXYZ:Hx,SourceOSM:Gx,SourceImageStatic:$x,SourceWMTS:Vx,SourceVector:jx,SourceCluster:Kx,SourceTianDiTu:zx,SourceImageWMS:Yx,SourceWebglPoints:Xx,SourceBingMaps:Wx},Symbol.toStringTag,{value:"Module"}));function Xi(r,e,t){const n=Be("map"),i=Be("controlBar",null),a=i!=null?i.value:n,{properties:o}=Or(e);let s=Ze(()=>new r(Jn({},o)));return s.value.set("order",t.attrs.order==null?0:t.attrs.order),ye(s,(A,l)=>{a.removeControl&&(a.removeControl(l),a.addControl(A),n.changed())}),cr(()=>{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()}),pr(()=>{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 Llt={name:"ol-fullscreen-control",setup(r,e){const{control:t}=Xi(q3,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 Olt(r,e,t,n,i,a){return Mr("",!0)}var qx=me(Llt,[["render",Olt]]);const Flt={name:"ol-mouseposition-control",setup(r,e){const{control:t}=Xi(tZ,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:" "}}};function Rlt(r,e,t,n,i,a){return Mr("",!0)}var Zx=me(Flt,[["render",Rlt]]);const Mlt={name:"ol-attribution-control",setup(r,e){const{control:t}=Xi(E8,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 Nlt(r,e,t,n,i,a){return Mr("",!0)}var Jx=me(Mlt,[["render",Nlt]]);const Plt={name:"ol-overviewmap-control",setup(r,e){const t=Be("map"),{control:n}=Xi(aZ,r,e);return cr(()=>{n.value.setMap(t)}),pr(()=>{n.value.setMap(null)}),Qr("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 Ult(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var tI=me(Plt,[["render",Ult]]);const Dlt={name:"ol-scaleline-control",setup(r,e){const{control:t}=Xi(lZ,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 Qlt(r,e,t,n,i,a){return Mr("",!0)}var eI=me(Dlt,[["render",Qlt]]);const klt={name:"ol-zoom-control",setup(r,e){const{control:t}=Xi(B8,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 Hlt(r,e,t,n,i,a){return Mr("",!0)}var rI=me(klt,[["render",Hlt]]);const Glt={name:"ol-zoomslider-control",setup(r,e){const{control:t}=Xi(hZ,r,e);return{control:t}},props:{duration:{type:Number,default:200},className:{type:String,default:"ol-zoomslider"},render:{type:Function}}};function $lt(r,e,t,n,i,a){return Mr("",!0)}var nI=me(Glt,[["render",$lt]]);const Vlt={name:"ol-zoomtoextent-control",setup(r,e){const{control:t}=Xi(pZ,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 jlt(r,e,t,n,i,a){return Mr("",!0)}var iI=me(Vlt,[["render",jlt]]);const Klt={name:"ol-rotate-control",setup(r,e){const{control:t}=Xi(C8,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 Wlt(r,e,t,n,i,a){return Mr("",!0)}var S5=me(Klt,[["render",Wlt]]),lG={exports:{}},zlt=hAt(k3);/*!
|
||
* 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(zlt)})(nl,function(t){function n(L){return L&&typeof L=="object"&&"default"in L?L:{default:L}}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(L,N){var x=N.getView();x.animate({zoom:+x.getZoom()+1,duration:700,center:L.coordinate})}},{text:"Zoom Out",classname:o.zoomOut+" "+o.icon,callback:function(L,N){var x=N.getView();x.animate({zoom:+x.getZoom()-1,duration:700,center:L.coordinate})}}];function d(L,N){if(N===void 0&&(N="Assertion failed"),!L)throw typeof Error<"u"?new Error(N):N}function g(L){return/^\d+$/.test(L)}function m(L,N){return L.classList?L.classList.contains(N):C(N).test(L.className)}function v(L,N,x){N===void 0&&(N=window.document);var S=Array.prototype.slice,P=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(L))switch(L[0]){case"#":P=[y(L.substr(1))];break;case".":P=S.call(N.getElementsByClassName(L.substr(1).replace(/\./g," ")));break;default:P=S.call(N.getElementsByTagName(L))}else P=S.call(N.querySelectorAll(L));return x?P:P[0]}function y(L){return L=L[0]==="#"?L.substr(1,L.length):L,document.getElementById(L)}function w(L){var N=document.createDocumentFragment(),x=document.createElement("div");for(x.innerHTML=L;x.firstChild;)N.appendChild(x.firstChild);return N}function C(L){return new RegExp("(^|\\s+) "+L+" (\\s+|$)")}function O(L,N,x){L.classList?L.classList.add(N):L.className=(L.className+" "+N).trim(),x&&g(x)&&window.setTimeout(function(){return F(L,N)},x)}function F(L,N,x){L.classList?L.classList.remove(N):L.className=L.className.replace(C(N)," ").trim(),x&&g(x)&&window.setTimeout(function(){return O(L,N)},x)}var I=function(L){return this.Base=L,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:L.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};I.prototype.init=function(L){this.map=L,this.viewport=L.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},I.prototype.getItemsLength=function(){var L=this,N=0;return Object.keys(this.items).forEach(function(x){L.items[x].submenu||L.items[x].separator||N++}),N},I.prototype.getPixelClicked=function(){return this.pixelClicked},I.prototype.getCoordinateClicked=function(){return this.coordinateClicked},I.prototype.positionContainer=function(L){var N=this,x=this.Base.container,S=this.map.getSize(),P=S[1]-L[1],U=S[0]-L[0],tt=x.offsetWidth,q=Math.round(this.lineHeight*this.getItemsLength()),rt=v("li."+s.submenu+">div",x,!0);U>=tt?(x.style.right="auto",x.style.left=L[0]+5+"px"):(x.style.left="auto",x.style.right="15px"),P>=q?(x.style.bottom="auto",x.style.top=L[1]-10+"px"):(x.style.top="auto",x.style.bottom=0),function nt(At,ct,Tt){if(Array.isArray(At))At.forEach(function(Y){return nt(Y,ct,Tt)});else for(var M=Array.isArray(ct)?ct:ct.split(/\s+/),W=M.length;W--;)m(At,M[W])&&F(At,M[W],Tt)}(x,s.hidden),rt.length&&(this.submenu.lastLeft=U<2*tt?"-"+tt+"px":this.submenu.left,rt.forEach(function(nt){var At,ct,Tt,M={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},W=(ct=(At=nt).getBoundingClientRect(),Tt=document.documentElement,{left:ct.left+window.pageXOffset-Tt.clientLeft,top:ct.top+window.pageYOffset-Tt.clientTop,width:At.offsetWidth,height:At.offsetHeight}),Y=W.height,H=P-Y;H<0&&(H=Y-(M.h-W.top),nt.style.top="-"+H+"px"),nt.style.left=N.submenu.lastLeft}))},I.prototype.openMenu=function(L,N){this.Base.dispatchEvent({type:l,pixel:L,coordinate:N}),this.opened=!0,this.positionContainer(L)},I.prototype.closeMenu=function(){this.opened=!1,function L(N,x,S){if(Array.isArray(N))N.forEach(function(tt){return L(tt,x)});else for(var P=Array.isArray(x)?x:x.split(/\s+/),U=P.length;U--;)m(N,P[U])||O(N,P[U],S)}(this.Base.container,s.hidden),this.Base.dispatchEvent({type:u})},I.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},I.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},I.prototype.handleEvent=function(L){var N=this;this.coordinateClicked=this.map.getEventCoordinate(L),this.pixelClicked=this.map.getEventPixel(L),this.Base.dispatchEvent({type:A,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===c&&(L.stopPropagation(),L.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),L.target.addEventListener("pointerdown",{handleEvent:function(x){N.opened&&(N.closeMenu(),x.stopPropagation(),L.target.removeEventListener(x.type,this,!1))}},!1))},I.prototype.handleMapMoveEvent=function(L){this.closeMenu()},I.prototype.setItemListener=function(L,N){var x,S=this;L&&typeof this.items[N].callback=="function"&&(x=this.items[N].callback,L.addEventListener("click",function(P){P.preventDefault();var U={coordinate:S.getCoordinateClicked(),data:S.items[N].data||null};S.closeMenu(),x(U,S.map)},!1))};var T=function(L){return this.Base=L,this.Base.container=this.container=this.createContainer(!0),this};return T.prototype.createContainer=function(L){var N=document.createElement("div"),x=document.createElement("ul"),S=[s.container,s.unselectable];return L&&S.push(s.hidden),N.className=S.join(" "),N.style.width=parseInt(this.Base.options.width,10)+"px",N.appendChild(x),N},T.prototype.createMenu=function(){var L=[];if("items"in this.Base.options?L=this.Base.options.defaultItems?this.Base.options.items.concat(f):this.Base.options.items:this.Base.options.defaultItems&&(L=f),L.length===0)return!1;L.forEach(this.addMenuEntry,this)},T.prototype.addMenuEntry=function(L){var N,x=this;if(L.items&&Array.isArray(L.items)){L.classname=L.classname||"",N=s.submenu,~L.classname.indexOf(N)||(L.classname=L.classname.length?" "+s.submenu:s.submenu);var S=this.generateHtmlAndPublish(this.container,L),P=this.createContainer();P.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,S.appendChild(P),L.items.forEach(function(U){x.generateHtmlAndPublish(P,U,!0)})}else this.generateHtmlAndPublish(this.container,L)},T.prototype.generateHtmlAndPublish=function(L,N,x){var S,P,U="_"+Math.random().toString(36).substr(2,9),tt=!1;return typeof N=="string"&&N.trim()==="-"?(S=w('<li id="'+U+'" class="'+s.separator+'"><hr></li>'),P=[].slice.call(S.childNodes,0)[0],L.firstChild.appendChild(S),tt=!0):(N.classname=N.classname||"",S=w("<span>"+N.text+"</span>"),P=document.createElement("li"),N.icon&&(N.classname===""?N.classname=s.icon:N.classname.indexOf(s.icon)===-1&&(N.classname+=" "+s.icon),P.setAttribute("style","background-image:url("+N.icon+")")),P.id=U,P.className=N.classname,P.appendChild(S),L.firstChild.appendChild(P)),this.Base.Internal.items[U]={id:U,submenu:x||0,separator:tt,callback:N.callback,data:N.data||null},this.Base.Internal.setItemListener(P,U),P},T.prototype.removeMenuEntry=function(L){var N=v("#"+L,this.container.firstChild);N&&this.container.firstChild.removeChild(N),delete this.Base.Internal.items[L]},T.prototype.cloneAndGetLineHeight=function(){var L=this.container.cloneNode(),N=w("<span>Foo</span>"),x=w("<span>Foo</span>"),S=document.createElement("li"),P=document.createElement("li");S.appendChild(N),P.appendChild(x),L.appendChild(S),L.appendChild(P),this.container.parentNode.appendChild(L);var U=L.offsetHeight/2;return this.container.parentNode.removeChild(L),U},function(L){function N(x){x===void 0&&(x={}),d(typeof x=="object","@param `opt_options` should be object type!"),this.options=function(S,P){var U={};for(var tt in S)U[tt]=S[tt];for(var q in P)U[q]=P[q];return U}(h,x),this.disabled=!1,this.Internal=new I(this),this.Html=new T(this),L.call(this,{element:this.container})}return L&&(N.__proto__=L),N.prototype=Object.create(L&&L.prototype),N.prototype.constructor=N,N.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},N.prototype.close=function(){this.Internal.closeMenu()},N.prototype.enable=function(){this.disabled=!1},N.prototype.disable=function(){this.disabled=!0},N.prototype.getDefaultItems=function(){return f},N.prototype.countItems=function(){return Object.keys(this.Internal.items).length},N.prototype.extend=function(x){d(Array.isArray(x),"@param `arr` should be an Array."),x.forEach(this.push,this)},N.prototype.isOpen=function(){return this.Internal.opened},N.prototype.updatePosition=function(x){d(Array.isArray(x),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(x)},N.prototype.pop=function(){var x=Object.keys(this.Internal.items);this.Html.removeMenuEntry(x[x.length-1])},N.prototype.push=function(x){d(x!=null,"@param `item` must be informed."),this.Html.addMenuEntry(x)},N.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},N.prototype.setMap=function(x){L.prototype.setMap.call(this,x),x?this.Internal.init(x,this):this.Internal.removeListeners()},N}(i.default)})})(lG);var Ylt=lG.exports;const Xlt={name:"ol-context-menu",setup(r,e){const{control:t}=Xi(Ylt,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 qlt(r,e,t,n,i,a){return Mr("",!0)}var aI=me(Xlt,[["render",qlt]]),Ko=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)),Nr.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")};kr(Ko,Nr);Ko.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(Nr.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{}}};Ko.prototype.isLayer_=function(r){for(var e=0;e<this.layers.length;e++)if(this.layers[e].layer===r)return e;return-1};Ko.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{}}}};Ko.prototype.removeLayers=function(){var r=[];this.layers.forEach(function(e){r.push(e.layer)}),this.removeLayer(r)};Ko.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{}};Ko.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")])};Ko.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}}};Ko.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};Ko.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)}};Ko.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()}};Ko.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()}};Ko.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 Zlt={name:"ol-swipe-control",setup(r,e){const{control:t}=Xi(Ko,r,e),{layerList:n}=rh(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 Jlt(r,e,t,n,i,a){return Mr("",!0)}var oI=me(Zlt,[["render",Jlt]]),Cs=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"),Nr.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])};kr(Cs,Nr);Cs.prototype.setVisible=function(r){r?this.element.style.display="":this.element.style.display="none"};Cs.prototype.getVisible=function(){return this.element.style.display!="none"};Cs.prototype.setMap=function(r){Nr.prototype.setMap.call(this,r);for(var e=0;e<this.controls_.length;e++){var t=this.controls_[e];t.setMap(r)}};Cs.prototype.getControls=function(){return this.controls_};Cs.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}};Cs.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)};Cs.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)};Cs.prototype.getActiveControls=function(){for(var r=[],e=0,t;t=this.controls_[e];e++)t.getActive&&t.getActive()&&r.push(t);return r};Cs.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)};Cs.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}}}};Cs.prototype.getControlsByName=function(r){var e=this.getControls();return e.filter(function(t){return t.get("name")===r})};const tut={name:"ol-control-bar",setup(r,e){const{control:t}=Xi(Cs,r,e);return Qr("controlBar",t),{control:t}},props:{toggleOne:{type:Boolean,default:!0},group:{type:Boolean,default:!0}}};function eut(r,e,t,n,i,a){return Rr(r.$slots,"default")}var sI=me(tut,[["render",eut]]);window.ol&&(ol.ext.input={});var Sd=function(r){r=r||{},Oi.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))};kr(Sd,Oi);Sd.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)};Sd.prototype.setValue=function(r){r!==void 0&&(this.input.value=r),this.input.dispatchEvent(new Event("change"))};Sd.prototype.getValue=function(){return this.input.value};Sd.prototype.getInputElement=function(){return this.input};var xd=function(r){r=r||{},Sd.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))};kr(xd,Sd);xd.prototype.isChecked=function(){return this.input.checked};var uG=function(r){r=r||{},xd.call(this,r),this.element.className=("ol-ext-toggle-switch "+(r.className||"")).trim()};kr(uG,xd);var cG=function(r){r=r||{},xd.call(this,r),this.element.className=("ol-ext-check ol-ext-radio "+(r.className||"")).trim()};kr(cG,xd);var yt={};yt.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)yt.create("OPTION",{html:i,value:e.options[i],parent:t});break}case"style":{this.setStyle(t,e.style);break}case"change":case"click":{yt.addListener(t,n,e[n]);break}case"on":{for(var a in e.on)yt.addListener(t,a,e.on[a]);break}case"checked":{t.checked=!!e.checked;break}default:{t.setAttribute(n,e[n]);break}}}return t};yt.createSwitch=function(r){var e=yt.create("INPUT",{type:"checkbox",on:r.on,click:r.click,change:r.change,parent:r.parent}),t=Object.assign({input:e},r||{});return new uG(t),e};yt.createCheck=function(r){var e=yt.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 cG(t):new xd(t),e};yt.setHTML=function(r,e){e instanceof Element?r.appendChild(e):e!==void 0&&(r.innerHTML=e)};yt.appendText=function(r,e){r.appendChild(document.createTextNode(e||""))};yt.addListener=function(r,e,t,n){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(i){r.addEventListener(i,t,n)})};yt.removeListener=function(r,e,t){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(n){r.removeEventListener(n,t)})};yt.show=function(r){r.style.display=""};yt.hide=function(r){r.style.display="none"};yt.hidden=function(r){return yt.getStyle(r,"display")==="none"};yt.toggle=function(r){r.style.display=r.style.display==="none"?"":"none"};yt.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]}};yt.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};yt.outerHeight=function(r){return r.offsetHeight+yt.getStyle(r,"marginBottom")};yt.outerWidth=function(r){return r.offsetWidth+yt.getStyle(r,"marginLeft")};yt.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}};yt.getFixedOffset=function(r){var e={left:0,top:0},t=function(n){if(!n)return e;if(yt.getStyle(n,"position")==="absolute"&&yt.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)};yt.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)};yt.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(){w&&(h++,setTimeout(d))},d=function(){if(w){if(h--,h)return;var I=r.clientHeight,T=r.scrollHeight;u=I/T,w.style.height=u*100+"%",w.style.top=r.scrollTop/T*100+"%",y.style.height=I+"px",I>T-.5?y.classList.add("ol-100pc"):y.classList.remove("ol-100pc")}},g=function(I){I.target.classList.contains("ol-noscroll")||(l=!1,t=I[s],a=new Date,r.classList.add("ol-move"),I.preventDefault(),window.addEventListener("pointermove",m),yt.addListener(window,["pointerup","pointercancel"],O))},m=function(I){if(l=!0,t!==!1){var T=(c?-1/u:1)*(t-I[s]);r[A]+=T,i=new Date,i-a&&(n=(n+T/(i-a))/2),t=I[s],a=i,T&&o(!0)}},v=function(I){var T=I>0?Math.min(100,I/2):Math.max(-100,I/2);I-=T,r[A]+=T,-1<I&&I<1?(l?setTimeout(function(){r.classList.remove("ol-move")}):r.classList.remove("ol-move"),l=!1,o(!1)):setTimeout(function(){v(I)},40)},y,w;if(e.vertical&&e.minibar){var C=function(I){r.removeEventListener("pointermove",C),r.parentNode.classList.add("ol-miniscroll"),w=yt.create("DIV"),y=yt.create("DIV",{className:"ol-scroll",html:w}),r.parentNode.insertBefore(y,r),w.addEventListener("pointerdown",function(T){c=!0,g(T)}),e.mousewheel&&(yt.addListener(y,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){F(T)}),yt.addListener(w,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){F(T)})),r.parentNode.addEventListener("pointerenter",f),window.addEventListener("resize",f),I!==!1&&f()};r.parentNode?C(!1):r.addEventListener("pointermove",C),r.addEventListener("scroll",function(){f()})}r.style["touch-action"]="none",r.style.overflow="hidden",r.classList.add("ol-scrolldiv"),yt.addListener(r,["pointerdown"],function(I){c=!1,g(I)}),r.addEventListener("click",function(I){r.classList.contains("ol-move")&&(I.preventDefault(),I.stopPropagation())},!0);var O=function(I){a=new Date-a,a>100||c?n=0:a>0&&(n=((n||0)+(t-I[s])/a)/2),v(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),yt.removeListener(window,["pointerup","pointercancel"],O)},F=function(I){var T=Math.max(-1,Math.min(1,I.wheelDelta||-I.detail));return r.classList.add("ol-move"),r[A]-=T*30,r.classList.remove("ol-move"),!1};return e.mousewheel&&yt.addListener(r,["mousewheel","DOMMouseScroll","onmousewheel"],F),{refresh:f}};yt.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 Pu=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),Nr.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)};kr(Pu,Nr);Pu.prototype.setVisible=function(r){r?yt.show(this.element):yt.hide(this.element)};Pu.prototype.setTitle=function(r){this.button_.setAttribute("title",r)};Pu.prototype.setHtml=function(r){yt.setHTML(this.button_,r)};Pu.prototype.getButtonElement=function(){return this.button_};var Vs=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",Pu.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)};kr(Vs,Pu);Vs.prototype.setMap=function(r){!r&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),Pu.prototype.setMap.call(this,r),r&&(this.interaction_&&r.addInteraction(this.interaction_),this.subbar_&&r.addControl(this.subbar_))};Vs.prototype.getSubBar=function(){return this.subbar_};Vs.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_))};Vs.prototype.getDisable=function(){var r=this.element.querySelector("button");return r&&r.disabled};Vs.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}))};Vs.prototype.getActive=function(){return this.element.classList.contains("ol-active")};Vs.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)};Vs.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}))};Vs.prototype.setInteraction=function(r){this.interaction_=r};Vs.prototype.getInteraction=function(){return this.interaction_};const rut={name:"ol-control-toggle",setup(r,e){const{control:t}=Xi(Vs,r,e);return{control:t}},props:{html:{type:String},interaction:{type:Object},className:{type:String},title:{type:String},onToggle:{type:Function}}};function nut(r,e,t,n,i,a){return Mr("",!0)}var AI=me(rut,[["render",nut]]);const iut={name:"ol-control-button",setup(r,e){const{control:t}=Xi(Pu,r,e);return{control:t}},props:{html:{type:String},name:{type:String},className:{type:String},title:{type:String},handleClick:{type:Function}}};function aut(r,e,t,n,i,a){return Mr("",!0)}var lI=me(iut,[["render",aut]]),Za=function(r){r=r||{},r.fullscreen&&(r.target=document.body);var e=yt.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=yt.create("FORM",{on:{submit:this._onButton("submit")},parent:e});yt.create("H2",{parent:t}),yt.create("DIV",{className:"ol-closebox",click:this._onButton("cancel"),parent:t}),yt.create("DIV",{className:"ol-content",parent:t}),this._progress=yt.create("DIV",{style:{display:"none"},parent:t});var n=yt.create("DIV",{className:"ol-progress-bar",parent:this._progress});this._progressbar=yt.create("DIV",{parent:n}),this._progressMessage=yt.create("DIV",{className:"ol-progress-message",parent:this._progress}),yt.create("DIV",{className:"ol-buttons",parent:t}),Nr.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)};kr(Za,Nr);Za.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))}}};Za.prototype.open=function(){this.show()};Za.prototype.setContentMessage=function(r){if(r!==void 0){var e=this.getContentElement();r instanceof Element&&yt.setHTML(e,""),yt.setHTML(e,r||"")}};Za.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")};Za.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&&yt.setHTML(e.querySelector(".ol-content"),""),yt.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)yt.create("INPUT",{type:i==="submit"?"submit":"button",value:n[i],click:this._onButton(i,r.onButton),parent:t})}else e.classList.remove("ol-button")}};Za.prototype.getContentElement=function(){return this.element.querySelector("form .ol-content")};Za.prototype.setProgress=function(r,e,t){if(r===!1){yt.setStyle(this._progress,{display:"none"});return}if(e>0?this.set("max",Number(e)):e=this.get("max"),!e)yt.setStyle(this._progress,{display:"none"});else{var n=Math.round(r/e*100);yt.setStyle(this._progress,{display:""}),this._progressbar.className=n?"":"notransition",yt.setStyle(this._progressbar,{width:n+"%"})}this._progressMessage.innerHTML="",yt.setHTML(this._progressMessage,t||"")};Za.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};Za.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};Za.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})};Za.prototype.close=Za.prototype.hide;Za.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")};var out=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},qi=function(r){r||(r={}),this.setStyle(r.style),Nr.call(this,r)};kr(qi,Nr);qi.prototype.setMap=function(r){this.getCanvas(r);var e=this.getMap();if(this._listener&&(ys(this._listener),this._listener=null),Nr.prototype.setMap.call(this,r),e)try{e.renderSync()}catch{}r&&(this._listener=r.on("postcompose",this._draw.bind(this)))};qi.prototype.getCanvas=function(r){return out(r)};qi.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};qi.prototype.setStyle=function(r){this._style=r||new Ea({})};qi.prototype.getStyle=function(){return this._style};qi.prototype.getStroke=function(){var r=this._style.getStroke();return r||this._style.setStroke(new zi({color:"#000",width:1.25})),this._style.getStroke()};qi.prototype.getFill=function(){var r=this._style.getFill();return r||this._style.setFill(new Ba({color:"#fff"})),this._style.getFill()};qi.prototype.getTextStroke=function(){var r=this._style.getText();return r||(r=new Bd({})),r.getStroke()||r.setStroke(new zi({color:"#fff",width:3})),r.getStroke()};qi.prototype.getTextFill=function(){var r=this._style.getText();return r||(r=new Bd({})),r.getFill()||r.setFill(new Ba({color:"#fff"})),r.getFill()};qi.prototype.getTextFont=function(){var r=this._style.getText();return r||(r=new Bd({})),r.getFont()||r.setFont("12px sans-serif"),r.getFont()};qi.prototype._draw=function(){console.warn("[CanvasBase] draw function not implemented.")};function sut(r,e){var t=r.canvas,n=e||{},i=n.pixelRatio||td,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=ay(xi(),i,i);return new jF(r,i,o,s,0)}var Qg=function(r){r=r||{},Oi.call(this,r),r.feature&&this.set("feature",r.feature.clone())};kr(Qg,Oi);Qg.prototype.setTitle=function(r){this.set("title",r||""),this.changed()};Qg.prototype.getElement=function(r,e){var t=yt.create("LI",{className:this.get("className"),click:function(n){e(!1),n.stopPropagation()},style:{height:r[1]+"px"},"aria-label":this.get("title")});return yt.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 ba=function(r){r=r||{},Oi.call(this),this._items=new Ii;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){ys(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=yt.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 Bd({font:"16px sans-serif",fill:new Ba({color:"#333"}),backgroundFill:new Ba({color:"rgba(255,255,255,.8)"})}),this._title=new Qg({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()};kr(ba,Oi);ba.prototype.setTitle=function(r){this._title.setTitle(r),this.refresh()};ba.prototype.getTitle=function(){return this._title.get("title")};ba.prototype.getTextStyle=function(){return this._textStyle};ba.prototype.set=function(r,e,t){Oi.prototype.set.call(this,r,e,t),t||this.refresh()};ba.prototype.getListElement=function(){return this._listElement};ba.prototype.getCanvas=function(){return this._canvas};ba.prototype.setStyle=function(r){this._style=r,this.refresh()};ba.prototype.addItem=function(r){r instanceof Qg?this._items.push(r):this._items.push(new Qg(r))};ba.prototype.getItems=function(){return this._items};ba.prototype._drawText=function(r,e,t,n){r.save(),r.scale(td,td),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()};ba.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}};ba.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=td;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=du(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})};ba.prototype.getLegendImage=function(r,e,t){return r=r||{},ba.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)};ba.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(){ba.getLegendImage(r,e,t)},100)};var i=n[0]+2*r.margin,a=r.lineHeight||n[1]+2*r.margin,o=td;e||(t=0,e=document.createElement("canvas"),e.width=i*o,e.height=a*o);var s=e.getContext("2d");s.save();var A=sut(s,{pixelRatio:o}),l=r.typeGeom,u,c=r.feature;!c&&l&&(/Point/.test(l)?c=new _r(new xr([0,0])):/LineString/.test(l)?c=new _r(new en([0,0])):c=new _r(new Dn([[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,d=n[0]/2,g=n[1]/2,m,v;if(l==="Point"){var y=null;for(m=0;v=u[m];m++){var w=v.getImage();if(w){var C=w.getImage();if(C&&C.complete&&!C.naturalWidth&&(typeof r.onload=="function"&&C.addEventListener("load",function(){setTimeout(function(){r.onload()},100)}),w.load()),w.getAnchor){var O=w.getAnchor();if(O){var F=w.getSize(),I=O[0]-F[0],T=O[1]-F[1];y?Ah(y,[I,T,I+F[0],T+F[1]]):y=[I,T,I+F[0],T+F[1]]}}}}y&&(h=h+(y[2]+y[0])/2,f=f+(y[3]+y[1])/2)}for(f+=t*a||0,m=0;v=u[m];m++)switch(A.setStyle(v),l){case xr:case"Point":case"MultiPoint":A.drawGeometry(new xr([h,f]));break;case en:case"LineString":case"MultiLineString":s.save(),s.rect(r.margin*o,0,n[0]*o,e.height),s.clip(),A.drawGeometry(new en([[h-d,f],[h+d,f]])),s.restore();break;case Dn:case"Polygon":case"MultiPolygon":A.drawGeometry(new Dn([[[h-d,f-g],[h+d,f-g],[h+d,f+g],[h-d,f+g],[h-d,f-g]]]));break}return s.restore(),e};var SA=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)}qi.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))};kr(SA,qi);SA.prototype.getLegend=function(){return this._legend};SA.prototype.setCanvas=function(r){if(this._onCanvas=r,this.element.style.visibility=r?"hidden":"visible",this.getMap())try{this.getMap().renderSync()}catch{}};SA.prototype.onCanvas=function(){return!!this._onCanvas};SA.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=du(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()}};SA.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{}};SA.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{}};SA.prototype.collapse=function(r){r===!1?this.show():this.hide()};SA.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")};SA.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 Ch=function(r){r||(r={});var e=yt.create("DIV",{className:r.className||"ol-print"});r.target||(e.classList.add("ol-unselectable","ol-control"),yt.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e})),Nr.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)};kr(Ch,Nr);Ch.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)}};Ch.prototype.copyMap=function(r,e){this.once("print",function(t){this.toClipboard(t,e)}.bind(this)),this.print(r)};Ch.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,yt.getStyle(a.parentNode,"mix-blend-mode")==="multiply"&&(n.globalCompositeOperation="multiply");var o=yt.getStyle(a,"transform")||yt.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,yt.getStyle(a,"width"),yt.getStyle(a,"height")),n.restore()}}.bind(this))}return t};Ch.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())};Ch.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 d=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(d)}.bind(this)),this.getMap().render()}};var Bh=function(r){r||(r={});var e=yt.create("DIV",{className:(r.className||"")+" ol-control-title ol-unselectable",style:{display:"block",visibility:"hidden"}});qi.call(this,{element:e,style:r.style}),this.setTitle(r.title||""),this.setVisible(r.visible),this.element.style.font=this.getTextFont()};kr(Bh,qi);Bh.prototype.setStyle=function(r){qi.prototype.setStyle.call(this,r),this.element&&(this.element.style.font=this.getTextFont()),this.getMap()&&this.getMap().render()};Bh.prototype.setTitle=function(r){if(this.element.textContent=r,this.set("title",r),this.getMap())try{this.getMap().renderSync()}catch{}};Bh.prototype.getTitle=function(){return this.get("title")};Bh.prototype.setVisible=function(r){if(this.element.style.display=r?"block":"none",this.getMap())try{this.getMap().renderSync()}catch{}};Bh.prototype.getVisible=function(){return this.element.style.display!=="none"};Bh.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=du(this.getFill().getColor()),e.rect(0,0,s,o),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=du(this.getTextFill().getColor()),e.strokeStyle=du(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 uI=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=zw(uh(i,n,"EPSG:4326"),uh(o,n,"EPSG:4326"));return s*=(e||96)/.0254,s},Aut=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=zw(uh(o,a,"EPSG:4326"),uh(A,a,"EPSG:4326"));return l*=(t||96)/.0254,i.setResolution(i.getResolution()*n/l),n}},Eu=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 zi?new Ea({stroke:r.style}):r.style;r.style||(t=new Ea({stroke:new zi({width:0})})),qi.call(this,{element:e,style:t}),this.set("rotateVithView",r.rotateWithView!==!1),this.setVisible(r.visible!==!1),this.setImage(r.image||r.src)};kr(Eu,qi);Eu.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())};Eu.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};Eu.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};Eu.prototype.getVisible=function(){return yt.getStyle(this.element,"display")==="block"};Eu.prototype.setVisible=function(r){r?this.element.classList.add("ol-visible"):this.element.classList.remove("ol-visible"),this.getMap()&&this.getMap().render()};Eu.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 Qn=function(r){r||(r={}),this._lang=r.lang||"en";var e=yt.create("DIV",{className:(r.className||"ol-print")+" ol-unselectable ol-control"});yt.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e}),Nr.call(this,{element:e}),r.openWindow&&this.on("print",function(S){S.canvas&&window.open().document.write('<img src="'+S.canvas.toDataURL()+'"/>')}),r.target=yt.create("DIV");var t=this._printCtrl=new Ch(r);t.on(["print","error","printing"],function(S){i.setAttribute("data-status",S.type),S.clipboard||this.dispatchEvent(S)}.bind(this)),this._compass=new Eu({src:r.northImage||"compact",visible:!1,className:"olext-print-compass",style:new zi({color:"#333",width:0})});var n=this._printDialog=new Za({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),i=n.getContentElement();this._input={};var a=yt.create("DIV",{className:"ol-print-param",parent:i});this._pages=[yt.create("DIV",{className:"ol-page"})];var o=yt.create("DIV",{className:"ol-map",parent:this._pages[0]});yt.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:i}),yt.create("H2",{html:this.i18n("title"),parent:a});var s=yt.create("UL",{parent:a}),A=yt.create("LI",{className:"ol-orientation",parent:s});this._input.orientation={list:A};var l=yt.create("LABEL",{className:"portrait",parent:A});this._input.orientation.portrait=yt.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),yt.create("SPAN",{html:this.i18n("portrait"),parent:l}),l=yt.create("LABEL",{className:"landscape",parent:A}),this._input.orientation.landscape=yt.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),yt.create("SPAN",{html:this.i18n("landscape"),parent:l});var u;A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:s});var c=this._input.size=yt.create("SELECT",{on:{change:function(){this.setSize(c.value||L)}.bind(this)},parent:A});for(u in this.paperSize)yt.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=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:s});var h=this._input.margin=yt.create("SELECT",{on:{change:function(){this.setMargin(h.value)}.bind(this)},parent:A});for(u in this.marginSize)yt.create("OPTION",{html:this.i18n(u)+" - "+this.marginSize[u]+" mm",value:this.marginSize[u],parent:h});A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:s});var f=this._input.scale=yt.create("SELECT",{on:{change:function(){this.setScale(parseInt(f.value))}.bind(this)},parent:A});Object.keys(this.scales).forEach(function(S){yt.create("OPTION",{html:this.scales[S],value:S,parent:f})}.bind(this)),A=yt.create("LI",{className:"ol-legend",parent:s});var d=yt.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){x.legend.control.setCanvas(d.checked)}.bind(this)},parent:A});A=yt.create("LI",{className:"ol-print-north",parent:s});var g=this._input.north=yt.createSwitch({html:this.i18n("north"),checked:"checked",on:{change:function(){g.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=yt.create("LI",{className:"ol-print-title",parent:s});var m=yt.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(S){x.title.control.setVisible(S.target.checked)}.bind(this)},parent:A}),v=yt.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(S){S.keyCode===13&&S.preventDefault()},keyup:function(){x.title.control.setTitle(v.value)},change:function(){x.title.control.setTitle(v.value)}.bind(this)},parent:A}),y=yt.create("DIV",{className:"ol-user-param",parent:a});A=yt.create("LI",{className:"ol-saveas",parent:s});var w=yt.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),C=yt.create("SELECT",{on:{change:function(){if(this.formats[C.value].clipboard)t.copyMap(this.formats[C.value],function(U){U&&(w.classList.add("visible"),setTimeout(function(){w.classList.remove("visible")},1e3))});else{var S=typeof this.getSize()=="string"?this.getSize():null,P=Object.assign({format:S,size:S?this.paperSize[S]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[C.value]);t.print(P)}C.value=""}.bind(this)},parent:A});yt.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:C}),this.formats.forEach(function(S,P){if(S.pdf){if(r.pdf===!1)return}else if(S.clipboard){if(r.copy===!1)return}else if(r.save===!1)return;yt.create("OPTION",{html:this.i18n(S.title),value:P,parent:C})}.bind(this)),A=yt.create("LI",{className:"ol-savelegend",parent:s});var O=yt.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),F=yt.create("SELECT",{on:{change:function(){var S=x.legend.control.getLegend().getCanvas(),P=document.createElement("CANVAS");P.width=S.width,P.height=S.height;var U=P.getContext("2d");if(U.fillStyle="#fff",U.fillRect(0,0,P.width,P.height),U.drawImage(S,0,0),this.formats[F.value].clipboard)P.toBlob(function(Tt){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},Tt.type,{value:Tt,enumerable:!0}))]),O.classList.add("visible"),setTimeout(function(){O.classList.remove("visible")},1e3)}catch{}},"image/png");else{var tt;try{tt=P.toDataURL(this.formats[F.value].imageType,this.formats[F.value].quality);var q=typeof this.getSize()=="string"?this.getSize():"A4",rt=P.width/96*25.4,nt=P.height/96*25.4,At=this.paperSize[q];this.getOrientation()==="landscape"&&(At=[At[1],At[0]]);var ct=[(At[0]-rt)/2,(At[1]-nt)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:q,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[q],position:ct,imageWidth:rt,imageHeight:nt},image:tt,imageType:this.formats[F.value].imageType,pdf:this.formats[F.value].pdf,quality:this.formats[F.value].quality,canvas:P})}catch{}}F.value=""}.bind(this)},parent:A});yt.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:F}),this.formats.forEach(function(S,P){yt.create("OPTION",{html:this.i18n(S.title),value:P,parent:F})}.bind(this));var I=yt.create("DIV",{className:"ol-ext-buttons",parent:a});yt.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(S){S.preventDefault(),window.print()},parent:I}),yt.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){n.hide()},parent:I}),yt.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:a});var T,L,N,x={};n.on("show",function(){this.dispatchEvent({type:"show",userElement:y,dialog:this._printDialog,page:this.getPage()});var S=this.getMap();S&&(document.body.classList.add("ol-print-document"),T=S.getTargetElement(),L=S.getSize(),typeof this.getSize()=="string"?this.setSize(this.getSize()):this.setSize(L),S.setTarget(o),N&&ys(N),N=S.on("moveend",function(){this.setScale(uI(S))}.bind(this)),this.setScale(uI(S)),x={},this.getMap().getControls().forEach(function(P){P instanceof SA&&(x.legend={control:P}),P instanceof Bh&&(x.title={control:P}),P instanceof Eu&&(x.compass?P.element.classList.remove("ol-print-compass"):(this._input.north.checked?P.element.classList.add("ol-print-compass"):P.element.classList.remove("ol-print-compass"),this._compass=P,x.compass={control:P}))}.bind(this)),x.title?(m.checked=x.title.isVisible=x.title.control.getVisible(),v.value=x.title.control.getTitle(),m.parentNode.parentNode.classList.remove("hidden")):m.parentNode.parentNode.classList.add("hidden"),x.legend?(x.legend.ison=x.legend.control.onCanvas(),x.legend.collapsed=x.legend.control.isCollapsed(),x.legend.control.collapse(!1),F.parentNode.classList.remove("hidden"),d.parentNode.parentNode.classList.remove("hidden"),d.checked=!x.legend.collapsed,x.legend.control.setCanvas(!x.legend.collapsed)):(F.parentNode.classList.add("hidden"),d.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,N&&ys(N),x.title&&x.title.control.setVisible(x.title.isVisible),x.legend&&(x.legend.control.setCanvas(x.legend.ison),x.legend.control.collapse(x.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),r.saveAs&&this.on("print",function(S){S.pdf||S.canvas.toBlob(function(P){var U=(S.print.legend?"legend.":"map.")+S.imageType.replace("image/","");r.saveAs(P,U)},S.imageType,S.quality)}),r.jsPDF&&this.on("print",function(S){if(S.pdf){var P=new r.jsPDF({orientation:S.print.orientation,unit:S.print.unit,format:S.print.size});P.addImage(S.image,"JPEG",S.print.position[0],S.print.position[0],S.print.imageWidth,S.print.imageHeight),P.save(S.print.legend?"legend.pdf":"map.pdf")}})};kr(Qn,Nr);Qn.prototype.isOpen=function(){return this._printDialog.isOpen()};Qn.addLang=function(r,e){Qn.prototype._labels[r]=e};Qn.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};Qn.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:"取消"}};Qn.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]};Qn.prototype.marginSize={none:0,small:5,large:10};Qn.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}];Qn.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"};Qn.prototype.getOrientation=function(){return this._orientation||"portrait"};Qn.prototype.setOrientation=function(r){this._orientation=r==="landscape"?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()};Qn.prototype.getMargin=function(){return this._margin||0};Qn.prototype.setMargin=function(r){this._margin=r,this._input.margin.value=r,this.setSize()};Qn.prototype.getSize=function(){return this._size};Qn.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"})}};Qn.prototype.getContentElement=function(){return this._printDialog.getContentElement()};Qn.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")};Qn.prototype.getPage=function(){return this._pages[0]};Qn.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),Nr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))};Qn.prototype.setScale=function(r){Aut(this.getMap(),r),this._input.scale.value=" "+Math.round(r/100)*100};Qn.prototype.getScale=function(){return uI(this.getMap())};Qn.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()};Qn.prototype.getrintControl=function(){return this._printCtrl};var lR={exports:{}};(function(r,e){(function(t,n){n()})(nl,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 nl=="object"&&nl.global===nl?nl: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",d=/constructor/i.test(o.HTMLElement)||o.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||f&&d||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var w=m.result;w=g?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=w:location=w,h=null},m.readAsDataURL(l)}else{var v=o.URL||o.webkitURL,y=v.createObjectURL(l);h?h.location=y:location.href=y,h=null,setTimeout(function(){v.revokeObjectURL(y)},4e4)}});o.saveAs=A.saveAs=A,r.exports=A})})(lR);function mn(r){return mn=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},mn(r)}var po=Uint8Array,go=Uint16Array,qy=Uint32Array,tB=new po([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]),eB=new po([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]),cI=new po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hG=function(r,e){for(var t=new go(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var i=new qy(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]},fG=hG(tB,2),dG=fG[0],hI=fG[1];dG[28]=258,hI[258]=28;var pG=hG(eB,0),lut=pG[0],x5=pG[1],fI=new go(32768);for(var Nn=0;Nn<32768;++Nn){var gc=(Nn&43690)>>>1|(Nn&21845)<<1;gc=(gc&52428)>>>2|(gc&13107)<<2,gc=(gc&61680)>>>4|(gc&3855)<<4,fI[Nn]=((gc&65280)>>>8|(gc&255)<<8)>>>1}var hl=function(r,e,t){for(var n=r.length,i=0,a=new go(e);i<n;++i)++a[r[i]-1];var o=new go(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(t){s=new go(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[fI[c]>>>A]=l}else for(s=new go(n),i=0;i<n;++i)s[i]=fI[o[r[i]-1]++]>>>15-r[i];return s},dh=new po(288);for(var Nn=0;Nn<144;++Nn)dh[Nn]=8;for(var Nn=144;Nn<256;++Nn)dh[Nn]=9;for(var Nn=256;Nn<280;++Nn)dh[Nn]=7;for(var Nn=280;Nn<288;++Nn)dh[Nn]=8;var Zy=new po(32);for(var Nn=0;Nn<32;++Nn)Zy[Nn]=5;var uut=hl(dh,9,0),cut=hl(dh,9,1),hut=hl(Zy,5,0),fut=hl(Zy,5,1),oT=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},aA=function(r,e,t){var n=e/8>>0;return(r[n]|r[n+1]<<8)>>>(e&7)&t},sT=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},uR=function(r){return(r/8>>0)+(r&7&&1)},gG=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof go?go:r instanceof qy?qy:po)(t-e);return n.set(r.subarray(e,t)),n},dut=function(r,e,t){var n=r.length,i=!e||t,a=!t||t.i;t||(t={}),e||(e=new po(n*3));var o=function(J){var ot=e.length;if(J>ot){var ut=new po(Math.max(ot*2,J));ut.set(e),e=ut}},s=t.f||0,A=t.p||0,l=t.b||0,u=t.l,c=t.d,h=t.m,f=t.n,d=n*8;do{if(!u){t.f=s=aA(r,A,1);var g=aA(r,A+1,3);if(A+=3,g)if(g==1)u=cut,c=fut,h=9,f=5;else if(g==2){var w=aA(r,A,31)+257,C=aA(r,A+10,15)+4,O=w+aA(r,A+5,31)+1;A+=14;for(var F=new po(O),I=new po(19),T=0;T<C;++T)I[cI[T]]=aA(r,A+T*3,7);A+=C*3;var L=oT(I),N=(1<<L)-1;if(!a&&A+O*(L+7)>d)break;for(var x=hl(I,L,1),T=0;T<O;){var S=x[aA(r,A,N)];A+=S&15;var m=S>>>4;if(m<16)F[T++]=m;else{var P=0,U=0;for(m==16?(U=3+aA(r,A,3),A+=2,P=F[T-1]):m==17?(U=3+aA(r,A,7),A+=3):m==18&&(U=11+aA(r,A,127),A+=7);U--;)F[T++]=P}}var tt=F.subarray(0,w),q=F.subarray(w);h=oT(tt),f=oT(q),u=hl(tt,h,1),c=hl(q,f,1)}else throw"invalid block type";else{var m=uR(A)+4,v=r[m-4]|r[m-3]<<8,y=m+v;if(y>n){if(a)throw"unexpected EOF";break}i&&o(l+v),e.set(r.subarray(m,y),l),t.b=l+=v,t.p=A=y*8;continue}if(A>d)throw"unexpected EOF"}i&&o(l+131072);for(var rt=(1<<h)-1,nt=(1<<f)-1,At=h+f+18;a||A+At<d;){var P=u[sT(r,A)&rt],ct=P>>>4;if(A+=P&15,A>d)throw"unexpected EOF";if(!P)throw"invalid length/literal";if(ct<256)e[l++]=ct;else if(ct==256){u=null;break}else{var Tt=ct-254;if(ct>264){var T=ct-257,M=tB[T];Tt=aA(r,A,(1<<M)-1)+dG[T],A+=M}var W=c[sT(r,A)&nt],Y=W>>>4;if(!W)throw"invalid distance";A+=W&15;var q=lut[Y];if(Y>3){var M=eB[Y];q+=sT(r,A)&(1<<M)-1,A+=M}if(A>d)throw"unexpected EOF";i&&o(l+131072);for(var H=l+Tt;l<H;l+=4)e[l]=e[l-q],e[l+1]=e[l+1-q],e[l+2]=e[l+2-q],e[l+3]=e[l+3-q];l=H}}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:gG(e,0,l)},Wl=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8},hm=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},AT=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 po(0),0];if(i==1){var o=new po(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(O,F){return O.f-F.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 go(h+1),d=dI(t[u-1],f,0);if(d>e){var n=0,g=0,m=d-e,v=1<<m;for(a.sort(function(F,I){return f[I.s]-f[F.s]||F.f-I.f});n<i;++n){var y=a[n].s;if(f[y]>e)g+=v-(1<<d-f[y]),f[y]=e;else break}for(g>>>=m;g>0;){var w=a[n].s;f[w]<e?g-=1<<e-f[w]++-1:++n}for(;n>=0&&g;--n){var C=a[n].s;f[C]==e&&(--f[C],++g)}d=e}return[new po(f),d]},dI=function(r,e,t){return r.s==-1?Math.max(dI(r.l,e,t+1),dI(r.r,e,t+1)):e[r.s]=t},I5=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new go(++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]},fm=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},Aw=function(r,e,t){var n=t.length,i=uR(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},L5=function(r,e,t,n,i,a,o,s,A,l,u){Wl(e,u++,t),++i[256];for(var c=AT(i,15),h=c[0],f=c[1],d=AT(a,15),g=d[0],m=d[1],v=I5(h),y=v[0],w=v[1],C=I5(g),O=C[0],F=C[1],I=new go(19),T=0;T<y.length;++T)I[y[T]&31]++;for(var T=0;T<O.length;++T)I[O[T]&31]++;for(var L=AT(I,7),N=L[0],x=L[1],S=19;S>4&&!N[cI[S-1]];--S);var P=l+5<<3,U=fm(i,dh)+fm(a,Zy)+o,tt=fm(i,h)+fm(a,g)+o+14+3*S+fm(I,N)+(2*I[16]+3*I[17]+7*I[18]);if(P<=U&&P<=tt)return Aw(e,u,r.subarray(A,A+l));var q,rt,nt,At;if(Wl(e,u,1+(tt<U)),u+=2,tt<U){q=hl(h,f,0),rt=h,nt=hl(g,m,0),At=g;var ct=hl(N,x,0);Wl(e,u,w-257),Wl(e,u+5,F-1),Wl(e,u+10,S-4),u+=14;for(var T=0;T<S;++T)Wl(e,u+3*T,N[cI[T]]);u+=3*S;for(var Tt=[y,O],M=0;M<2;++M)for(var W=Tt[M],T=0;T<W.length;++T){var Y=W[T]&31;Wl(e,u,ct[Y]),u+=N[Y],Y>15&&(Wl(e,u,W[T]>>>5&127),u+=W[T]>>>12)}}else q=uut,rt=dh,nt=hut,At=Zy;for(var T=0;T<s;++T)if(n[T]>255){var Y=n[T]>>>18&31;hm(e,u,q[Y+257]),u+=rt[Y+257],Y>7&&(Wl(e,u,n[T]>>>23&31),u+=tB[Y]);var H=n[T]&31;hm(e,u,nt[H]),u+=At[H],H>3&&(hm(e,u,n[T]>>>5&8191),u+=eB[H])}else hm(e,u,q[n[T]]),u+=rt[n[T]];return hm(e,u,q[256]),u+rt[256]},put=new qy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),gut=new po(0),vut=function(r,e,t,n,i,a){var o=r.length,s=new po(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=Aw(A,l,r.subarray(u,c)):(A[u]=a,l=Aw(A,l,r.subarray(u,o)))}else{for(var h=put[e-1],f=h>>>13,d=h&8191,g=(1<<t)-1,m=new go(32768),v=new go(g+1),y=Math.ceil(t/3),w=2*y,C=function(ft){return(r[ft]^r[ft+1]<<y^r[ft+2]<<w)&g},O=new qy(25e3),F=new go(288),I=new go(32),T=0,L=0,u=0,N=0,x=0,S=0;u<o;++u){var P=C(u),U=u&32767,tt=v[P];if(m[U]=tt,v[P]=U,x<=u){var q=o-u;if((T>7e3||N>24576)&&q>423){l=L5(r,A,0,O,F,I,L,N,S,u-S,l),N=T=L=0,S=u;for(var rt=0;rt<286;++rt)F[rt]=0;for(var rt=0;rt<30;++rt)I[rt]=0}var nt=2,At=0,ct=d,Tt=U-tt&32767;if(q>2&&P==C(u-Tt))for(var M=Math.min(f,q)-1,W=Math.min(32767,u),Y=Math.min(258,q);Tt<=W&&--ct&&U!=tt;){if(r[u+nt]==r[u+nt-Tt]){for(var H=0;H<Y&&r[u+H]==r[u+H-Tt];++H);if(H>nt){if(nt=H,At=Tt,H>M)break;for(var J=Math.min(Tt,H-2),ot=0,rt=0;rt<J;++rt){var ut=u-Tt+rt+32768&32767,X=m[ut],It=ut-X+32768&32767;It>ot&&(ot=It,tt=ut)}}}U=tt,tt=m[U],Tt+=U-tt+32768&32767}if(At){O[N++]=268435456|hI[nt]<<18|x5[At];var at=hI[nt]&31,j=x5[At]&31;L+=tB[at]+eB[j],++F[257+at],++I[j],x=u+nt,++T}else O[N++]=r[u],++F[r[u]]}}l=L5(r,A,a,O,F,I,L,N,S,u-S,l),a||(l=Aw(A,l,gut))}return gG(s,0,n+uR(l)+i)},mut=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}}},yut=function(r,e,t,n,i){return vut(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)},_ut=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},wut=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)},Eut=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 pI(r,e){e===void 0&&(e={});var t=mut();t.p(r);var n=yut(r,e,2,4);return wut(n,e),_ut(n,n.length-4,t.d()),n}function Cut(r,e){return dut((Eut(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 Xe=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function lT(){Xe.console&&typeof Xe.console.log=="function"&&Xe.console.log.apply(Xe.console,arguments)}var Bn={log:lT,warn:function(r){Xe.console&&(typeof Xe.console.warn=="function"?Xe.console.warn.apply(Xe.console,arguments):lT.call(null,arguments))},error:function(r){Xe.console&&(typeof Xe.console.error=="function"?Xe.console.error.apply(Xe.console,arguments):lT(r))}};function uT(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){gf(n.response,e,t)},n.onerror=function(){Bn.error("could not download file")},n.send()}function O5(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function e1(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 uy,gI,gf=Xe.saveAs||((typeof window>"u"?"undefined":mn(window))!=="object"||window!==Xe?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=Xe.URL||Xe.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?O5(i.href)?uT(r,e,t):e1(i,i.target="_blank"):e1(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){e1(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(O5(r))uT(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){e1(n)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:mn(a)!=="object"&&(Bn.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 uT(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(Xe.HTMLElement)||Xe.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":mn(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=Xe.URL||Xe.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 vG(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 cT(r,e){var t=r[0],n=r[1],i=r[2],a=r[3];t=Ua(t,n,i,a,e[0],7,-680876936),a=Ua(a,t,n,i,e[1],12,-389564586),i=Ua(i,a,t,n,e[2],17,606105819),n=Ua(n,i,a,t,e[3],22,-1044525330),t=Ua(t,n,i,a,e[4],7,-176418897),a=Ua(a,t,n,i,e[5],12,1200080426),i=Ua(i,a,t,n,e[6],17,-1473231341),n=Ua(n,i,a,t,e[7],22,-45705983),t=Ua(t,n,i,a,e[8],7,1770035416),a=Ua(a,t,n,i,e[9],12,-1958414417),i=Ua(i,a,t,n,e[10],17,-42063),n=Ua(n,i,a,t,e[11],22,-1990404162),t=Ua(t,n,i,a,e[12],7,1804603682),a=Ua(a,t,n,i,e[13],12,-40341101),i=Ua(i,a,t,n,e[14],17,-1502002290),t=Da(t,n=Ua(n,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=Da(a,t,n,i,e[6],9,-1069501632),i=Da(i,a,t,n,e[11],14,643717713),n=Da(n,i,a,t,e[0],20,-373897302),t=Da(t,n,i,a,e[5],5,-701558691),a=Da(a,t,n,i,e[10],9,38016083),i=Da(i,a,t,n,e[15],14,-660478335),n=Da(n,i,a,t,e[4],20,-405537848),t=Da(t,n,i,a,e[9],5,568446438),a=Da(a,t,n,i,e[14],9,-1019803690),i=Da(i,a,t,n,e[3],14,-187363961),n=Da(n,i,a,t,e[8],20,1163531501),t=Da(t,n,i,a,e[13],5,-1444681467),a=Da(a,t,n,i,e[2],9,-51403784),i=Da(i,a,t,n,e[7],14,1735328473),t=Qa(t,n=Da(n,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=Qa(a,t,n,i,e[8],11,-2022574463),i=Qa(i,a,t,n,e[11],16,1839030562),n=Qa(n,i,a,t,e[14],23,-35309556),t=Qa(t,n,i,a,e[1],4,-1530992060),a=Qa(a,t,n,i,e[4],11,1272893353),i=Qa(i,a,t,n,e[7],16,-155497632),n=Qa(n,i,a,t,e[10],23,-1094730640),t=Qa(t,n,i,a,e[13],4,681279174),a=Qa(a,t,n,i,e[0],11,-358537222),i=Qa(i,a,t,n,e[3],16,-722521979),n=Qa(n,i,a,t,e[6],23,76029189),t=Qa(t,n,i,a,e[9],4,-640364487),a=Qa(a,t,n,i,e[12],11,-421815835),i=Qa(i,a,t,n,e[15],16,530742520),t=ka(t,n=Qa(n,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=ka(a,t,n,i,e[7],10,1126891415),i=ka(i,a,t,n,e[14],15,-1416354905),n=ka(n,i,a,t,e[5],21,-57434055),t=ka(t,n,i,a,e[12],6,1700485571),a=ka(a,t,n,i,e[3],10,-1894986606),i=ka(i,a,t,n,e[10],15,-1051523),n=ka(n,i,a,t,e[1],21,-2054922799),t=ka(t,n,i,a,e[8],6,1873313359),a=ka(a,t,n,i,e[15],10,-30611744),i=ka(i,a,t,n,e[6],15,-1560198380),n=ka(n,i,a,t,e[13],21,1309151649),t=ka(t,n,i,a,e[4],6,-145523070),a=ka(a,t,n,i,e[11],10,-1120210379),i=ka(i,a,t,n,e[2],15,718787259),n=ka(n,i,a,t,e[9],21,-343485551),r[0]=Qc(t,r[0]),r[1]=Qc(n,r[1]),r[2]=Qc(i,r[2]),r[3]=Qc(a,r[3])}function rB(r,e,t,n,i,a){return e=Qc(Qc(e,r),Qc(n,a)),Qc(e<<i|e>>>32-i,t)}function Ua(r,e,t,n,i,a,o){return rB(e&t|~e&n,r,e,i,a,o)}function Da(r,e,t,n,i,a,o){return rB(e&n|t&~n,r,e,i,a,o)}function Qa(r,e,t,n,i,a,o){return rB(e^t^n,r,e,i,a,o)}function ka(r,e,t,n,i,a,o){return rB(t^(e|~n),r,e,i,a,o)}function mG(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)cT(n,But(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(cT(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,cT(n,i),n}function But(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}uy=Xe.atob.bind(Xe),gI=Xe.btoa.bind(Xe);var F5="0123456789abcdef".split("");function but(r){for(var e="",t=0;t<4;t++)e+=F5[r>>8*t+4&15]+F5[r>>8*t&15];return e}function Tut(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function vI(r){return mG(r).map(Tut).join("")}var Sut=function(r){for(var e=0;e<r.length;e++)r[e]=but(r[e]);return r.join("")}(mG("hello"))!="5d41402abc4b2a76b9719d911017c592";function Qc(r,e){if(Sut){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 mI(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,d="";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],d+=String.fromCharCode(e.charCodeAt(A)^o);return d}/**
|
||
* @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 R5={print:4,modify:8,copy:16,"annot-forms":32};function Hp(r,e,t,n){this.v=1,this.r=2;var i=192;r.forEach(function(s){if(R5.perm!==void 0)throw new Error("Invalid permission: "+s);i+=R5[s]}),this.padding="(¿N^NuAd\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=vI(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=mI(this.encryptionKey,this.padding)}function Gp(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 M5(r){if(mn(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){Xe.console&&Bn.error("jsPDF PubSub Error",s.message,s)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function vE(r){if(!(this instanceof vE))return new vE(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 yG(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function wf(r,e,t,n,i){if(!(this instanceof wf))return new wf(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,yG.call(this,n,i)}function eg(r,e,t,n,i){if(!(this instanceof eg))return new eg(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,yG.call(this,n,i)}function We(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;mn(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=M5;var d="1.3",g=f.__private__.getPdfVersion=function(){return d};f.__private__.setPdfVersion=function(E){d=E};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 v=f.__private__.getPageFormat=function(E){return m[E]};i=i||"a4";var y={COMPAT:"compat",ADVANCED:"advanced"},w=y.COMPAT;function C(){this.saveGraphicsState(),V(new Ue(qt,0,0,-qt,0,Zs()*qt).toString()+" cm"),this.setFontSize(this.getFontSize()/qt),l="n",w=y.ADVANCED}function O(){this.restoreGraphicsState(),l="S",w=y.COMPAT}var F=f.__private__.combineFontStyleAndFontWeight=function(E,k){if(E=="bold"&&k=="normal"||E=="bold"&&k==400||E=="normal"&&k=="italic"||E=="bold"&&k=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return k&&(E=k==400||k==="normal"?E==="italic"?"italic":"normal":k!=700&&k!=="bold"||E!=="normal"?(k==700?"bold":k)+""+E:"bold"),E};f.advancedAPI=function(E){var k=w===y.COMPAT;return k&&C.call(this),typeof E!="function"||(E(this),k&&O.call(this)),this},f.compatAPI=function(E){var k=w===y.ADVANCED;return k&&O.call(this),typeof E!="function"||(E(this),k&&C.call(this)),this},f.isAdvancedAPI=function(){return w===y.ADVANCED};var I,T=function(E){if(w!==y.ADVANCED)throw new Error(E+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},L=f.roundToPrecision=f.__private__.roundToPrecision=function(E,k){var st=e||k;if(isNaN(E)||isNaN(st))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return E.toFixed(st).replace(/0+$/,"")};I=f.hpf=f.__private__.hpf=typeof A=="number"?function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,A)}:A==="smart"?function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,E>-1&&E<1?16:5)}:function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,16)};var N=f.f2=f.__private__.f2=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.f2");return L(E,2)},x=f.__private__.f3=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.f3");return L(E,3)},S=f.scale=f.__private__.scale=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.scale");return w===y.COMPAT?E*qt:w===y.ADVANCED?E:void 0},P=function(E){return w===y.COMPAT?Zs()-E:w===y.ADVANCED?E:void 0},U=function(E){return S(P(E))};f.__private__.setPrecision=f.setPrecision=function(E){typeof parseInt(E,10)=="number"&&(e=parseInt(E,10))};var tt,q="00000000000000000000000000000000",rt=f.__private__.getFileId=function(){return q},nt=f.__private__.setFileId=function(E){return q=E!==void 0&&/^[a-fA-F0-9]{32}$/.test(E)?E.toUpperCase():q.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(ta=new Hp(u.userPermissions,u.userPassword,u.ownerPassword,q)),q};f.setFileId=function(E){return nt(E),this},f.getFileId=function(){return rt()};var At=f.__private__.convertDateToPDFDate=function(E){var k=E.getTimezoneOffset(),st=k<0?"+":"-",gt=Math.floor(Math.abs(k/60)),xt=Math.abs(k%60),Ut=[st,Y(gt),"'",Y(xt),"'"].join("");return["D:",E.getFullYear(),Y(E.getMonth()+1),Y(E.getDate()),Y(E.getHours()),Y(E.getMinutes()),Y(E.getSeconds()),Ut].join("")},ct=f.__private__.convertPDFDateToDate=function(E){var k=parseInt(E.substr(2,4),10),st=parseInt(E.substr(6,2),10)-1,gt=parseInt(E.substr(8,2),10),xt=parseInt(E.substr(10,2),10),Ut=parseInt(E.substr(12,2),10),Yt=parseInt(E.substr(14,2),10);return new Date(k,st,gt,xt,Ut,Yt,0)},Tt=f.__private__.setCreationDate=function(E){var k;if(E===void 0&&(E=new Date),E instanceof Date)k=At(E);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(E))throw new Error("Invalid argument passed to jsPDF.setCreationDate");k=E}return tt=k},M=f.__private__.getCreationDate=function(E){var k=tt;return E==="jsDate"&&(k=ct(tt)),k};f.setCreationDate=function(E){return Tt(E),this},f.getCreationDate=function(E){return M(E)};var W,Y=f.__private__.padd2=function(E){return("0"+parseInt(E)).slice(-2)},H=f.__private__.padd2Hex=function(E){return("00"+(E=E.toString())).substr(E.length)},J=0,ot=[],ut=[],X=0,It=[],at=[],j=!1,Z=ut,ft=function(){J=0,X=0,ut=[],ot=[],It=[],de=Br(),_t=Br()};f.__private__.setCustomOutputDestination=function(E){j=!0,Z=E};var it=function(E){j||(Z=E)};f.__private__.resetCustomOutputDestination=function(){j=!1,Z=ut};var V=f.__private__.out=function(E){return E=E.toString(),X+=E.length+1,Z.push(E),Z},Ft=f.__private__.write=function(E){return V(arguments.length===1?E.toString():Array.prototype.join.call(arguments," "))},Mt=f.__private__.getArrayBuffer=function(E){for(var k=E.length,st=new ArrayBuffer(k),gt=new Uint8Array(st);k--;)gt[k]=E.charCodeAt(k);return st},Et=[["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 Et};var Bt=r.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(E){return Bt=w===y.ADVANCED?E/qt:E,this};var Ct,Rt=f.__private__.getFontSize=f.getFontSize=function(){return w===y.COMPAT?Bt:Bt*qt},Nt=r.R2L||!1;f.__private__.setR2L=f.setR2L=function(E){return Nt=E,this},f.__private__.getR2L=f.getR2L=function(){return Nt};var Dt,Wt=f.__private__.setZoomMode=function(E){var k=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(E))Ct=E;else if(isNaN(E)){if(k.indexOf(E)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+E+'" is not recognized.');Ct=E}else Ct=parseInt(E,10)};f.__private__.getZoomMode=function(){return Ct};var te,Ae=f.__private__.setPageMode=function(E){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(E)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+E+'" is not recognized.');Dt=E};f.__private__.getPageMode=function(){return Dt};var oe=f.__private__.setLayoutMode=function(E){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(E)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+E+'" is not recognized.');te=E};f.__private__.getLayoutMode=function(){return te},f.__private__.setDisplayMode=f.setDisplayMode=function(E,k,st){return Wt(E),oe(k),Ae(st),this};var Jt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(E){if(Object.keys(Jt).indexOf(E)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Jt[E]},f.__private__.getDocumentProperties=function(){return Jt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(E){for(var k in Jt)Jt.hasOwnProperty(k)&&E[k]&&(Jt[k]=E[k]);return this},f.__private__.setDocumentProperty=function(E,k){if(Object.keys(Jt).indexOf(E)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Jt[E]=k};var fe,qt,nr,ke,wr,Ne={},Pe={},Gr=[],se={},fi={},gr={},ei={},Wr=null,zr=0,He=[],Ir=new M5(f),$n=r.hotfixes||[],yn={},di={},pi=[],Ue=function E(k,st,gt,xt,Ut,Yt){if(!(this instanceof E))return new E(k,st,gt,xt,Ut,Yt);isNaN(k)&&(k=1),isNaN(st)&&(st=0),isNaN(gt)&&(gt=0),isNaN(xt)&&(xt=1),isNaN(Ut)&&(Ut=0),isNaN(Yt)&&(Yt=0),this._matrix=[k,st,gt,xt,Ut,Yt]};Object.defineProperty(Ue.prototype,"sx",{get:function(){return this._matrix[0]},set:function(E){this._matrix[0]=E}}),Object.defineProperty(Ue.prototype,"shy",{get:function(){return this._matrix[1]},set:function(E){this._matrix[1]=E}}),Object.defineProperty(Ue.prototype,"shx",{get:function(){return this._matrix[2]},set:function(E){this._matrix[2]=E}}),Object.defineProperty(Ue.prototype,"sy",{get:function(){return this._matrix[3]},set:function(E){this._matrix[3]=E}}),Object.defineProperty(Ue.prototype,"tx",{get:function(){return this._matrix[4]},set:function(E){this._matrix[4]=E}}),Object.defineProperty(Ue.prototype,"ty",{get:function(){return this._matrix[5]},set:function(E){this._matrix[5]=E}}),Object.defineProperty(Ue.prototype,"a",{get:function(){return this._matrix[0]},set:function(E){this._matrix[0]=E}}),Object.defineProperty(Ue.prototype,"b",{get:function(){return this._matrix[1]},set:function(E){this._matrix[1]=E}}),Object.defineProperty(Ue.prototype,"c",{get:function(){return this._matrix[2]},set:function(E){this._matrix[2]=E}}),Object.defineProperty(Ue.prototype,"d",{get:function(){return this._matrix[3]},set:function(E){this._matrix[3]=E}}),Object.defineProperty(Ue.prototype,"e",{get:function(){return this._matrix[4]},set:function(E){this._matrix[4]=E}}),Object.defineProperty(Ue.prototype,"f",{get:function(){return this._matrix[5]},set:function(E){this._matrix[5]=E}}),Object.defineProperty(Ue.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ue.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ue.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ue.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ue.prototype.join=function(E){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(I).join(E)},Ue.prototype.multiply=function(E){var k=E.sx*this.sx+E.shy*this.shx,st=E.sx*this.shy+E.shy*this.sy,gt=E.shx*this.sx+E.sy*this.shx,xt=E.shx*this.shy+E.sy*this.sy,Ut=E.tx*this.sx+E.ty*this.shx+this.tx,Yt=E.tx*this.shy+E.ty*this.sy+this.ty;return new Ue(k,st,gt,xt,Ut,Yt)},Ue.prototype.decompose=function(){var E=this.sx,k=this.shy,st=this.shx,gt=this.sy,xt=this.tx,Ut=this.ty,Yt=Math.sqrt(E*E+k*k),ce=(E/=Yt)*st+(k/=Yt)*gt;st-=E*ce,gt-=k*ce;var De=Math.sqrt(st*st+gt*gt);return ce/=De,E*(gt/=De)<k*(st/=De)&&(E=-E,k=-k,ce=-ce,Yt=-Yt),{scale:new Ue(Yt,0,0,De,0,0),translate:new Ue(1,0,0,1,xt,Ut),rotate:new Ue(E,k,-k,E,0,0),skew:new Ue(1,0,ce,1,0,0)}},Ue.prototype.toString=function(E){return this.join(" ")},Ue.prototype.inversed=function(){var E=this.sx,k=this.shy,st=this.shx,gt=this.sy,xt=this.tx,Ut=this.ty,Yt=1/(E*gt-k*st),ce=gt*Yt,De=-k*Yt,vr=-st*Yt,ir=E*Yt;return new Ue(ce,De,vr,ir,-ce*xt-vr*Ut,-De*xt-ir*Ut)},Ue.prototype.applyToPoint=function(E){var k=E.x*this.sx+E.y*this.shx+this.tx,st=E.x*this.shy+E.y*this.sy+this.ty;return new Ku(k,st)},Ue.prototype.applyToRectangle=function(E){var k=this.applyToPoint(E),st=this.applyToPoint(new Ku(E.x+E.w,E.y+E.h));return new Hh(k.x,k.y,st.x-k.x,st.y-k.y)},Ue.prototype.clone=function(){var E=this.sx,k=this.shy,st=this.shx,gt=this.sy,xt=this.tx,Ut=this.ty;return new Ue(E,k,st,gt,xt,Ut)},f.Matrix=Ue;var ri=f.matrixMult=function(E,k){return k.multiply(E)},Cn=new Ue(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Cn;var gi=function(E,k){if(!fi[E]){var st=(k instanceof wf?"Sh":"P")+(Object.keys(se).length+1).toString(10);k.id=st,fi[E]=st,se[st]=k,Ir.publish("addPattern",k)}};f.ShadingPattern=wf,f.TilingPattern=eg,f.addShadingPattern=function(E,k){return T("addShadingPattern()"),gi(E,k),this},f.beginTilingPattern=function(E){T("beginTilingPattern()"),Jd(E.boundingBox[0],E.boundingBox[1],E.boundingBox[2]-E.boundingBox[0],E.boundingBox[3]-E.boundingBox[1],E.matrix)},f.endTilingPattern=function(E,k){T("endTilingPattern()"),k.stream=at[W].join(`
|
||
`),gi(E,k),Ir.publish("endTilingPattern",k),pi.pop().restore()};var cn=f.__private__.newObject=function(){var E=Br();return _n(E,!0),E},Br=f.__private__.newObjectDeferred=function(){return J++,ot[J]=function(){return X},J},_n=function(E,k){return k=typeof k=="boolean"&&k,ot[E]=X,k&&V(E+" 0 obj"),E},eo=f.__private__.newAdditionalObject=function(){var E={objId:Br(),content:""};return It.push(E),E},de=Br(),_t=Br(),$t=f.__private__.decodeColorString=function(E){var k=E.split(" ");if(k.length!==2||k[1]!=="g"&&k[1]!=="G")k.length===5&&(k[4]==="k"||k[4]==="K")&&(k=[(1-k[0])*(1-k[3]),(1-k[1])*(1-k[3]),(1-k[2])*(1-k[3]),"r"]);else{var st=parseFloat(k[0]);k=[st,st,st,"r"]}for(var gt="#",xt=0;xt<3;xt++)gt+=("0"+Math.floor(255*parseFloat(k[xt])).toString(16)).slice(-2);return gt},ne=f.__private__.encodeColorString=function(E){var k;typeof E=="string"&&(E={ch1:E});var st=E.ch1,gt=E.ch2,xt=E.ch3,Ut=E.ch4,Yt=E.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof st=="string"&&st.charAt(0)!=="#"){var ce=new vG(st);if(ce.ok)st=ce.toHex();else if(!/^\d*\.?\d*$/.test(st))throw new Error('Invalid color "'+st+'" passed to jsPDF.encodeColorString.')}if(typeof st=="string"&&/^#[0-9A-Fa-f]{3}$/.test(st)&&(st="#"+st[1]+st[1]+st[2]+st[2]+st[3]+st[3]),typeof st=="string"&&/^#[0-9A-Fa-f]{6}$/.test(st)){var De=parseInt(st.substr(1),16);st=De>>16&255,gt=De>>8&255,xt=255&De}if(gt===void 0||Ut===void 0&&st===gt&>===xt)if(typeof st=="string")k=st+" "+Yt[0];else switch(E.precision){case 2:k=N(st/255)+" "+Yt[0];break;case 3:default:k=x(st/255)+" "+Yt[0]}else if(Ut===void 0||mn(Ut)==="object"){if(Ut&&!isNaN(Ut.a)&&Ut.a===0)return k=["1.","1.","1.",Yt[1]].join(" ");if(typeof st=="string")k=[st,gt,xt,Yt[1]].join(" ");else switch(E.precision){case 2:k=[N(st/255),N(gt/255),N(xt/255),Yt[1]].join(" ");break;default:case 3:k=[x(st/255),x(gt/255),x(xt/255),Yt[1]].join(" ")}}else if(typeof st=="string")k=[st,gt,xt,Ut,Yt[2]].join(" ");else switch(E.precision){case 2:k=[N(st),N(gt),N(xt),N(Ut),Yt[2]].join(" ");break;case 3:default:k=[x(st),x(gt),x(xt),x(Ut),Yt[2]].join(" ")}return k},Je=f.__private__.getFilters=function(){return o},Lr=f.__private__.putStream=function(E){var k=(E=E||{}).data||"",st=E.filters||Je(),gt=E.alreadyAppliedFilters||[],xt=E.addLength1||!1,Ut=k.length,Yt=E.objectId,ce=function(ea){return ea};if(u!==null&&Yt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(ce=ta.encryptor(Yt,0));var De={};st===!0&&(st=["FlateEncode"]);var vr=E.additionalKeyValues||[],ir=(De=We.API.processDataByFilters!==void 0?We.API.processDataByFilters(k,st):{data:k,reverseChain:[]}).reverseChain+(Array.isArray(gt)?gt.join(" "):gt.toString());if(De.data.length!==0&&(vr.push({key:"Length",value:De.data.length}),xt===!0&&vr.push({key:"Length1",value:Ut})),ir.length!=0)if(ir.split("/").length-1==1)vr.push({key:"Filter",value:ir});else{vr.push({key:"Filter",value:"["+ir+"]"});for(var br=0;br<vr.length;br+=1)if(vr[br].key==="DecodeParms"){for(var $i=[],jn=0;jn<De.reverseChain.split("/").length-1;jn+=1)$i.push("null");$i.push(vr[br].value),vr[br].value="["+$i.join(" ")+"]"}}V("<<");for(var ni=0;ni<vr.length;ni++)V("/"+vr[ni].key+" "+vr[ni].value);V(">>"),De.data.length!==0&&(V("stream"),V(ce(De.data)),V("endstream"))},hn=f.__private__.putPage=function(E){var k=E.number,st=E.data,gt=E.objId,xt=E.contentsObjId;_n(gt,!0),V("<</Type /Page"),V("/Parent "+E.rootDictionaryObjId+" 0 R"),V("/Resources "+E.resourceDictionaryObjId+" 0 R"),V("/MediaBox ["+parseFloat(I(E.mediaBox.bottomLeftX))+" "+parseFloat(I(E.mediaBox.bottomLeftY))+" "+I(E.mediaBox.topRightX)+" "+I(E.mediaBox.topRightY)+"]"),E.cropBox!==null&&V("/CropBox ["+I(E.cropBox.bottomLeftX)+" "+I(E.cropBox.bottomLeftY)+" "+I(E.cropBox.topRightX)+" "+I(E.cropBox.topRightY)+"]"),E.bleedBox!==null&&V("/BleedBox ["+I(E.bleedBox.bottomLeftX)+" "+I(E.bleedBox.bottomLeftY)+" "+I(E.bleedBox.topRightX)+" "+I(E.bleedBox.topRightY)+"]"),E.trimBox!==null&&V("/TrimBox ["+I(E.trimBox.bottomLeftX)+" "+I(E.trimBox.bottomLeftY)+" "+I(E.trimBox.topRightX)+" "+I(E.trimBox.topRightY)+"]"),E.artBox!==null&&V("/ArtBox ["+I(E.artBox.bottomLeftX)+" "+I(E.artBox.bottomLeftY)+" "+I(E.artBox.topRightX)+" "+I(E.artBox.topRightY)+"]"),typeof E.userUnit=="number"&&E.userUnit!==1&&V("/UserUnit "+E.userUnit),Ir.publish("putPage",{objId:gt,pageContext:He[k],pageNumber:k,page:st}),V("/Contents "+xt+" 0 R"),V(">>"),V("endobj");var Ut=st.join(`
|
||
`);return w===y.ADVANCED&&(Ut+=`
|
||
Q`),_n(xt,!0),Lr({data:Ut,filters:Je(),objectId:xt}),V("endobj"),gt},fn=f.__private__.putPages=function(){var E,k,st=[];for(E=1;E<=zr;E++)He[E].objId=Br(),He[E].contentsObjId=Br();for(E=1;E<=zr;E++)st.push(hn({number:E,data:at[E],objId:He[E].objId,contentsObjId:He[E].contentsObjId,mediaBox:He[E].mediaBox,cropBox:He[E].cropBox,bleedBox:He[E].bleedBox,trimBox:He[E].trimBox,artBox:He[E].artBox,userUnit:He[E].userUnit,rootDictionaryObjId:de,resourceDictionaryObjId:_t}));_n(de,!0),V("<</Type /Pages");var gt="/Kids [";for(k=0;k<zr;k++)gt+=st[k]+" 0 R ";V(gt+"]"),V("/Count "+zr),V(">>"),V("endobj"),Ir.publish("postPutPages")},Xo=function(E){Ir.publish("putFont",{font:E,out:V,newObject:cn,putStream:Lr}),E.isAlreadyPutted!==!0&&(E.objectNumber=cn(),V("<<"),V("/Type /Font"),V("/BaseFont /"+Gp(E.postScriptName)),V("/Subtype /Type1"),typeof E.encoding=="string"&&V("/Encoding /"+E.encoding),V("/FirstChar 32"),V("/LastChar 255"),V(">>"),V("endobj"))},vi=function(){for(var E in Ne)Ne.hasOwnProperty(E)&&(c===!1||c===!0&&h.hasOwnProperty(E))&&Xo(Ne[E])},Ws=function(E){E.objectNumber=cn();var k=[];k.push({key:"Type",value:"/XObject"}),k.push({key:"Subtype",value:"/Form"}),k.push({key:"BBox",value:"["+[I(E.x),I(E.y),I(E.x+E.width),I(E.y+E.height)].join(" ")+"]"}),k.push({key:"Matrix",value:"["+E.matrix.toString()+"]"});var st=E.pages[1].join(`
|
||
`);Lr({data:st,additionalKeyValues:k,objectId:E.objectNumber}),V("endobj")},OA=function(){for(var E in yn)yn.hasOwnProperty(E)&&Ws(yn[E])},Fh=function(E,k){var st,gt=[],xt=1/(k-1);for(st=0;st<1;st+=xt)gt.push(st);if(gt.push(1),E[0].offset!=0){var Ut={offset:0,color:E[0].color};E.unshift(Ut)}if(E[E.length-1].offset!=1){var Yt={offset:1,color:E[E.length-1].color};E.push(Yt)}for(var ce="",De=0,vr=0;vr<gt.length;vr++){for(st=gt[vr];st>E[De+1].offset;)De++;var ir=E[De].offset,br=(st-ir)/(E[De+1].offset-ir),$i=E[De].color,jn=E[De+1].color;ce+=H(Math.round((1-br)*$i[0]+br*jn[0]).toString(16))+H(Math.round((1-br)*$i[1]+br*jn[1]).toString(16))+H(Math.round((1-br)*$i[2]+br*jn[2]).toString(16))}return ce.trim()},xv=function(E,k){k||(k=21);var st=cn(),gt=Fh(E.colors,k),xt=[];xt.push({key:"FunctionType",value:"0"}),xt.push({key:"Domain",value:"[0.0 1.0]"}),xt.push({key:"Size",value:"["+k+"]"}),xt.push({key:"BitsPerSample",value:"8"}),xt.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),xt.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Lr({data:gt,additionalKeyValues:xt,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:st}),V("endobj"),E.objectNumber=cn(),V("<< /ShadingType "+E.type),V("/ColorSpace /DeviceRGB");var Ut="/Coords ["+I(parseFloat(E.coords[0]))+" "+I(parseFloat(E.coords[1]))+" ";E.type===2?Ut+=I(parseFloat(E.coords[2]))+" "+I(parseFloat(E.coords[3])):Ut+=I(parseFloat(E.coords[2]))+" "+I(parseFloat(E.coords[3]))+" "+I(parseFloat(E.coords[4]))+" "+I(parseFloat(E.coords[5])),V(Ut+="]"),E.matrix&&V("/Matrix ["+E.matrix.toString()+"]"),V("/Function "+st+" 0 R"),V("/Extend [true true]"),V(">>"),V("endobj")},Pd=function(E,k){var st=Br(),gt=cn();k.push({resourcesOid:st,objectOid:gt}),E.objectNumber=gt;var xt=[];xt.push({key:"Type",value:"/Pattern"}),xt.push({key:"PatternType",value:"1"}),xt.push({key:"PaintType",value:"1"}),xt.push({key:"TilingType",value:"1"}),xt.push({key:"BBox",value:"["+E.boundingBox.map(I).join(" ")+"]"}),xt.push({key:"XStep",value:I(E.xStep)}),xt.push({key:"YStep",value:I(E.yStep)}),xt.push({key:"Resources",value:st+" 0 R"}),E.matrix&&xt.push({key:"Matrix",value:"["+E.matrix.toString()+"]"}),Lr({data:E.stream,additionalKeyValues:xt,objectId:E.objectNumber}),V("endobj")},zs=function(E){var k;for(k in se)se.hasOwnProperty(k)&&(se[k]instanceof wf?xv(se[k]):se[k]instanceof eg&&Pd(se[k],E))},Ud=function(E){for(var k in E.objectNumber=cn(),V("<<"),E)switch(k){case"opacity":V("/ca "+N(E[k]));break;case"stroke-opacity":V("/CA "+N(E[k]))}V(">>"),V("endobj")},Iv=function(){var E;for(E in gr)gr.hasOwnProperty(E)&&Ud(gr[E])},Rh=function(){for(var E in V("/XObject <<"),yn)yn.hasOwnProperty(E)&&yn[E].objectNumber>=0&&V("/"+E+" "+yn[E].objectNumber+" 0 R");Ir.publish("putXobjectDict"),V(">>")},Lv=function(){ta.oid=cn(),V("<<"),V("/Filter /Standard"),V("/V "+ta.v),V("/R "+ta.r),V("/U <"+ta.toHexString(ta.U)+">"),V("/O <"+ta.toHexString(ta.O)+">"),V("/P "+ta.P),V(">>"),V("endobj")},Dd=function(){for(var E in V("/Font <<"),Ne)Ne.hasOwnProperty(E)&&(c===!1||c===!0&&h.hasOwnProperty(E))&&V("/"+E+" "+Ne[E].objectNumber+" 0 R");V(">>")},Qd=function(){if(Object.keys(se).length>0){for(var E in V("/Shading <<"),se)se.hasOwnProperty(E)&&se[E]instanceof wf&&se[E].objectNumber>=0&&V("/"+E+" "+se[E].objectNumber+" 0 R");Ir.publish("putShadingPatternDict"),V(">>")}},Fl=function(E){if(Object.keys(se).length>0){for(var k in V("/Pattern <<"),se)se.hasOwnProperty(k)&&se[k]instanceof f.TilingPattern&&se[k].objectNumber>=0&&se[k].objectNumber<E&&V("/"+k+" "+se[k].objectNumber+" 0 R");Ir.publish("putTilingPatternDict"),V(">>")}},Ov=function(){if(Object.keys(gr).length>0){var E;for(E in V("/ExtGState <<"),gr)gr.hasOwnProperty(E)&&gr[E].objectNumber>=0&&V("/"+E+" "+gr[E].objectNumber+" 0 R");Ir.publish("putGStateDict"),V(">>")}},Vn=function(E){_n(E.resourcesOid,!0),V("<<"),V("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Dd(),Qd(),Fl(E.objectOid),Ov(),Rh(),V(">>"),V("endobj")},kd=function(){var E=[];vi(),Iv(),OA(),zs(E),Ir.publish("putResources"),E.forEach(Vn),Vn({resourcesOid:_t,objectOid:Number.MAX_SAFE_INTEGER}),Ir.publish("postPutResources")},Hd=function(){Ir.publish("putAdditionalObjects");for(var E=0;E<It.length;E++){var k=It[E];_n(k.objId,!0),V(k.content),V("endobj")}Ir.publish("postPutAdditionalObjects")},Gd=function(E){Pe[E.fontName]=Pe[E.fontName]||{},Pe[E.fontName][E.fontStyle]=E.id},Mh=function(E,k,st,gt,xt){var Ut={id:"F"+(Object.keys(Ne).length+1).toString(10),postScriptName:E,fontName:k,fontStyle:st,encoding:gt,isStandardFont:xt||!1,metadata:{}};return Ir.publish("addFont",{font:Ut,instance:this}),Ne[Ut.id]=Ut,Gd(Ut),Ut.id},Fv=function(E){for(var k=0,st=Et.length;k<st;k++){var gt=Mh.call(this,E[k][0],E[k][1],E[k][2],Et[k][3],!0);c===!1&&(h[gt]=!0);var xt=E[k][0].split("-");Gd({id:gt,fontName:xt[0],fontStyle:xt[1]||""})}Ir.publish("addFonts",{fonts:Ne,dictionary:Pe})},qo=function(E){return E.foo=function(){try{return E.apply(this,arguments)}catch(gt){var k=gt.stack||"";~k.indexOf(" at ")&&(k=k.split(" at ")[1]);var st="Error in function "+k.split(`
|
||
`)[0].split("<")[0]+": "+gt.message;if(!Xe.console)throw new Error(st);Xe.console.error(st,gt),Xe.alert&&alert(st)}},E.foo.bar=E,E.foo},Zo=function(E,k){var st,gt,xt,Ut,Yt,ce,De,vr,ir;if(xt=(k=k||{}).sourceEncoding||"Unicode",Yt=k.outputEncoding,(k.autoencode||Yt)&&Ne[fe].metadata&&Ne[fe].metadata[xt]&&Ne[fe].metadata[xt].encoding&&(Ut=Ne[fe].metadata[xt].encoding,!Yt&&Ne[fe].encoding&&(Yt=Ne[fe].encoding),!Yt&&Ut.codePages&&(Yt=Ut.codePages[0]),typeof Yt=="string"&&(Yt=Ut[Yt]),Yt)){for(De=!1,ce=[],st=0,gt=E.length;st<gt;st++)(vr=Yt[E.charCodeAt(st)])?ce.push(String.fromCharCode(vr)):ce.push(E[st]),ce[st].charCodeAt(0)>>8&&(De=!0);E=ce.join("")}for(st=E.length;De===void 0&&st!==0;)E.charCodeAt(st-1)>>8&&(De=!0),st--;if(!De)return E;for(ce=k.noBOM?[]:[254,255],st=0,gt=E.length;st<gt;st++){if((ir=(vr=E.charCodeAt(st))>>8)>>8)throw new Error("Character at position "+st+" of string '"+E+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");ce.push(ir),ce.push(vr-(ir<<8))}return String.fromCharCode.apply(void 0,ce)},Sa=f.__private__.pdfEscape=f.pdfEscape=function(E,k){return Zo(E,k).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},$d=f.__private__.beginPage=function(E){at[++zr]=[],He[zr]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(E[0]),topRightY:Number(E[1])}},Vd(zr),it(at[W])},FA=function(E,k){var st,gt,xt;switch(t=k||t,typeof E=="string"&&(st=v(E.toLowerCase()),Array.isArray(st)&&(gt=st[0],xt=st[1])),Array.isArray(E)&&(gt=E[0]*qt,xt=E[1]*qt),isNaN(gt)&&(gt=i[0],xt=i[1]),(gt>14400||xt>14400)&&(Bn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),gt=Math.min(14400,gt),xt=Math.min(14400,xt)),i=[gt,xt],t.substr(0,1)){case"l":xt>gt&&(i=[xt,gt]);break;case"p":gt>xt&&(i=[xt,gt])}$d(i),Yd(Vu),V(ts),Qh!==0&&V(Qh+" J"),kh!==0&&V(kh+" j"),Ir.publish("addPage",{pageNumber:zr})},Rv=function(E){E>0&&E<=zr&&(at.splice(E,1),He.splice(E,1),zr--,W>zr&&(W=zr),this.setPage(W))},Vd=function(E){E>0&&E<=zr&&(W=E)},Mv=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return at.length-1},jd=function(E,k,st){var gt,xt=void 0;return st=st||{},E=E!==void 0?E:Ne[fe].fontName,k=k!==void 0?k:Ne[fe].fontStyle,gt=E.toLowerCase(),Pe[gt]!==void 0&&Pe[gt][k]!==void 0?xt=Pe[gt][k]:Pe[E]!==void 0&&Pe[E][k]!==void 0?xt=Pe[E][k]:st.disableWarning===!1&&Bn.warn("Unable to look up font label for font '"+E+"', '"+k+"'. Refer to getFontList() for available fonts."),xt||st.noFallback||(xt=Pe.times[k])==null&&(xt=Pe.times.normal),xt},Nv=f.__private__.putInfo=function(){var E=cn(),k=function(gt){return gt};for(var st in u!==null&&(k=ta.encryptor(E,0)),V("<<"),V("/Producer ("+Sa(k("jsPDF "+We.version))+")"),Jt)Jt.hasOwnProperty(st)&&Jt[st]&&V("/"+st.substr(0,1).toUpperCase()+st.substr(1)+" ("+Sa(k(Jt[st]))+")");V("/CreationDate ("+Sa(k(tt))+")"),V(">>"),V("endobj")},Nh=f.__private__.putCatalog=function(E){var k=(E=E||{}).rootDictionaryObjId||de;switch(cn(),V("<<"),V("/Type /Catalog"),V("/Pages "+k+" 0 R"),Ct||(Ct="fullwidth"),Ct){case"fullwidth":V("/OpenAction [3 0 R /FitH null]");break;case"fullheight":V("/OpenAction [3 0 R /FitV null]");break;case"fullpage":V("/OpenAction [3 0 R /Fit]");break;case"original":V("/OpenAction [3 0 R /XYZ null null 1]");break;default:var st=""+Ct;st.substr(st.length-1)==="%"&&(Ct=parseInt(Ct)/100),typeof Ct=="number"&&V("/OpenAction [3 0 R /XYZ null null "+N(Ct)+"]")}switch(te||(te="continuous"),te){case"continuous":V("/PageLayout /OneColumn");break;case"single":V("/PageLayout /SinglePage");break;case"two":case"twoleft":V("/PageLayout /TwoColumnLeft");break;case"tworight":V("/PageLayout /TwoColumnRight")}Dt&&V("/PageMode /"+Dt),Ir.publish("putCatalog"),V(">>"),V("endobj")},Ph=f.__private__.putTrailer=function(){V("trailer"),V("<<"),V("/Size "+(J+1)),V("/Root "+J+" 0 R"),V("/Info "+(J-1)+" 0 R"),u!==null&&V("/Encrypt "+ta.oid+" 0 R"),V("/ID [ <"+q+"> <"+q+"> ]"),V(">>")},RA=f.__private__.putHeader=function(){V("%PDF-"+d),V("%ºß¬à")},ku=f.__private__.putXRef=function(){var E="0000000000";V("xref"),V("0 "+(J+1)),V("0000000000 65535 f ");for(var k=1;k<=J;k++)typeof ot[k]=="function"?V((E+ot[k]()).slice(-10)+" 00000 n "):ot[k]!==void 0?V((E+ot[k]).slice(-10)+" 00000 n "):V("0000000000 00000 n ")},Ys=f.__private__.buildDocument=function(){ft(),it(ut),Ir.publish("buildDocument"),RA(),fn(),Hd(),kd(),u!==null&&Lv(),Nv(),Nh();var E=X;return ku(),Ph(),V("startxref"),V(""+E),V("%%EOF"),it(at[W]),ut.join(`
|
||
`)},Hu=f.__private__.getBlob=function(E){return new Blob([Mt(E)],{type:"application/pdf"})},Gu=f.output=f.__private__.output=qo(function(E,k){switch(typeof(k=k||{})=="string"?k={filename:k}:k.filename=k.filename||"generated.pdf",E){case void 0:return Ys();case"save":f.save(k.filename);break;case"arraybuffer":return Mt(Ys());case"blob":return Hu(Ys());case"bloburi":case"bloburl":if(Xe.URL!==void 0&&typeof Xe.URL.createObjectURL=="function")return Xe.URL&&Xe.URL.createObjectURL(Hu(Ys()))||void 0;Bn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var st="",gt=Ys();try{st=gI(gt)}catch{st=gI(unescape(encodeURIComponent(gt)))}return"data:application/pdf;filename="+k.filename+";base64,"+st;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Xe)==="[object Window]"){var xt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+(k.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(k)+");<\/script></body></html>",Ut=Xe.open();return Ut!==null&&Ut.document.write(xt),Ut}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Xe)==="[object Window]"){var Yt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(k.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+k.filename+'" width="500px" height="400px" /></body></html>',ce=Xe.open();if(ce!==null){ce.document.write(Yt);var De=this;ce.document.documentElement.querySelector("#pdfViewer").onload=function(){ce.document.title=k.filename,ce.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(De.output("bloburl"))}}return ce}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Xe)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var vr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",k)+'"></iframe></body></html>',ir=Xe.open();if(ir!==null&&(ir.document.write(vr),ir.document.title=k.filename),ir||typeof safari>"u")return ir;break;case"datauri":case"dataurl":return Xe.document.location.href=this.output("datauristring",k);default:return null}}),Kd=function(E){return Array.isArray($n)===!0&&$n.indexOf(E)>-1};switch(n){case"pt":qt=1;break;case"mm":qt=72/25.4;break;case"cm":qt=72/2.54;break;case"in":qt=72;break;case"px":qt=Kd("px_scaling")==1?.75:96/72;break;case"pc":case"em":qt=12;break;case"ex":qt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);qt=n}var ta=null;Tt(),nt();var Pv=function(E){return u!==null?ta.encryptor(E,0):function(k){return k}},$u=f.__private__.getPageInfo=f.getPageInfo=function(E){if(isNaN(E)||E%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:He[E].objId,pageNumber:E,pageContext:He[E]}},er=f.__private__.getPageInfoByObjId=function(E){if(isNaN(E)||E%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var k in He)if(He[k].objId===E)break;return $u(k)},Uv=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:He[W].objId,pageNumber:W,pageContext:He[W]}};f.addPage=function(){return FA.apply(this,arguments),this},f.setPage=function(){return Vd.apply(this,arguments),it.call(this,at[W]),this},f.insertPage=function(E){return this.addPage(),this.movePage(W,E),this},f.movePage=function(E,k){var st,gt;if(E>k){st=at[E],gt=He[E];for(var xt=E;xt>k;xt--)at[xt]=at[xt-1],He[xt]=He[xt-1];at[k]=st,He[k]=gt,this.setPage(k)}else if(E<k){st=at[E],gt=He[E];for(var Ut=E;Ut<k;Ut++)at[Ut]=at[Ut+1],He[Ut]=He[Ut+1];at[k]=st,He[k]=gt,this.setPage(k)}return this},f.deletePage=function(){return Rv.apply(this,arguments),this},f.__private__.text=f.text=function(E,k,st,gt,xt){var Ut,Yt,ce,De,vr,ir,br,$i,jn,ni=(gt=gt||{}).scope||this;if(typeof E=="number"&&typeof k=="number"&&(typeof st=="string"||Array.isArray(st))){var ea=st;st=k,k=E,E=ea}if(arguments[3]instanceof Ue?(T("The transform parameter of text() with a Matrix value"),jn=xt):(ce=arguments[4],De=arguments[5],mn(br=arguments[3])==="object"&&br!==null||(typeof ce=="string"&&(De=ce,ce=null),typeof br=="string"&&(De=br,br=null),typeof br=="number"&&(ce=br,br=null),gt={flags:br,angle:ce,align:De})),isNaN(k)||isNaN(st)||E==null)throw new Error("Invalid arguments passed to jsPDF.text");if(E.length===0)return ni;var mi="",es=!1,ro=typeof gt.lineHeightFactor=="number"?gt.lineHeightFactor:Ml,Ts=ni.internal.scaleFactor;function tp(dn){return dn=dn.split(" ").join(Array(gt.TabLen||9).join(" ")),Sa(dn,br)}function ep(dn){for(var pn,Kn=dn.concat(),yi=[],eA=Kn.length;eA--;)typeof(pn=Kn.shift())=="string"?yi.push(pn):Array.isArray(dn)&&(pn.length===1||pn[1]===void 0&&pn[2]===void 0)?yi.push(pn[0]):yi.push([pn[0],pn[1],pn[2]]);return yi}function ha(dn,pn){var Kn;if(typeof dn=="string")Kn=pn(dn)[0];else if(Array.isArray(dn)){for(var yi,eA,VA=dn.concat(),rc=[],rp=VA.length;rp--;)typeof(yi=VA.shift())=="string"?rc.push(pn(yi)[0]):Array.isArray(yi)&&typeof yi[0]=="string"&&(eA=pn(yi[0],yi[1],yi[2]),rc.push([eA[0],eA[1],eA[2]]));Kn=rc}return Kn}var Yu=!1,$h=!0;if(typeof E=="string")Yu=!0;else if(Array.isArray(E)){var Vh=E.concat();Yt=[];for(var Xu,fa=Vh.length;fa--;)(typeof(Xu=Vh.shift())!="string"||Array.isArray(Xu)&&typeof Xu[0]!="string")&&($h=!1);Yu=$h}if(Yu===!1)throw new Error('Type of text must be string or Array. "'+E+'" is not recognized.');typeof E=="string"&&(E=E.match(/[\r?\n]/)?E.split(/\r\n|\r|\n/g):[E]);var Ul=Bt/ni.internal.scaleFactor,qu=Ul*(ro-1);switch(gt.baseline){case"bottom":st-=qu;break;case"top":st+=Ul-qu;break;case"hanging":st+=Ul-2*qu;break;case"middle":st+=Ul/2-qu}if((ir=gt.maxWidth||0)>0&&(typeof E=="string"?E=ni.splitTextToSize(E,ir):Object.prototype.toString.call(E)==="[object Array]"&&(E=E.reduce(function(dn,pn){return dn.concat(ni.splitTextToSize(pn,ir))},[]))),Ut={text:E,x:k,y:st,options:gt,mutex:{pdfEscape:Sa,activeFontKey:fe,fonts:Ne,activeFontSize:Bt}},Ir.publish("preProcessText",Ut),E=Ut.text,ce=(gt=Ut.options).angle,!(jn instanceof Ue)&&ce&&typeof ce=="number"){ce*=Math.PI/180,gt.rotationDirection===0&&(ce=-ce),w===y.ADVANCED&&(ce=-ce);var Zu=Math.cos(ce),jh=Math.sin(ce);jn=new Ue(Zu,jh,-jh,Zu,0,0)}else ce&&ce instanceof Ue&&(jn=ce);w!==y.ADVANCED||jn||(jn=Cn),(vr=gt.charSpace||ju)!==void 0&&(mi+=I(S(vr))+` Tc
|
||
`,this.setCharSpace(this.getCharSpace()||0)),($i=gt.horizontalScale)!==void 0&&(mi+=I(100*$i)+` Tz
|
||
`),gt.lang;var Ia=-1,jv=gt.renderingMode!==void 0?gt.renderingMode:gt.stroke,Kh=ni.internal.getCurrentPageInfo().pageContext;switch(jv){case 0:case!1:case"fill":Ia=0;break;case 1:case!0:case"stroke":Ia=1;break;case 2:case"fillThenStroke":Ia=2;break;case 3:case"invisible":Ia=3;break;case 4:case"fillAndAddForClipping":Ia=4;break;case 5:case"strokeAndAddPathForClipping":Ia=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Ia=6;break;case 7:case"addToPathForClipping":Ia=7}var Wh=Kh.usedRenderingMode!==void 0?Kh.usedRenderingMode:-1;Ia!==-1?mi+=Ia+` Tr
|
||
`:Wh!==-1&&(mi+=`0 Tr
|
||
`),Ia!==-1&&(Kh.usedRenderingMode=Ia),De=gt.align||"left";var rs,Ju=Bt*ro,zh=ni.internal.pageSize.getWidth(),Kv=Ne[fe];vr=gt.charSpace||ju,ir=gt.maxWidth||0,br=Object.assign({autoencode:!0,noBOM:!0},gt.flags);var kA=[];if(Object.prototype.toString.call(E)==="[object Array]"){var Bo;Yt=ep(E),De!=="left"&&(rs=Yt.map(function(dn){return ni.getStringUnitWidth(dn,{font:Kv,charSpace:vr,fontSize:Bt,doKerning:!1})*Bt/Ts}));var ns,HA=0;if(De==="right"){k-=rs[0],E=[],fa=Yt.length;for(var Ss=0;Ss<fa;Ss++)Ss===0?(ns=qs(k),Bo=UA(st)):(ns=S(HA-rs[Ss]),Bo=-Ju),E.push([Yt[Ss],ns,Bo]),HA=rs[Ss]}else if(De==="center"){k-=rs[0]/2,E=[],fa=Yt.length;for(var da=0;da<fa;da++)da===0?(ns=qs(k),Bo=UA(st)):(ns=S((HA-rs[da])/2),Bo=-Ju),E.push([Yt[da],ns,Bo]),HA=rs[da]}else if(De==="left"){E=[],fa=Yt.length;for(var tc=0;tc<fa;tc++)E.push(Yt[tc])}else{if(De!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');E=[],fa=Yt.length,ir=ir!==0?ir:zh;for(var xs=0;xs<fa;xs++)Bo=xs===0?UA(st):-Ju,ns=xs===0?qs(k):0,xs<fa-1?kA.push(I(S((ir-rs[xs])/(Yt[xs].split(" ").length-1)))):kA.push(0),E.push([Yt[xs],ns,Bo])}}var La=typeof gt.R2L=="boolean"?gt.R2L:Nt;La===!0&&(E=ha(E,function(dn,pn,Kn){return[dn.split("").reverse().join(""),pn,Kn]})),Ut={text:E,x:k,y:st,options:gt,mutex:{pdfEscape:Sa,activeFontKey:fe,fonts:Ne,activeFontSize:Bt}},Ir.publish("postProcessText",Ut),E=Ut.text,es=Ut.mutex.isHex||!1;var ec=Ne[fe].encoding;ec!=="WinAnsiEncoding"&&ec!=="StandardEncoding"||(E=ha(E,function(dn,pn,Kn){return[tp(dn),pn,Kn]})),Yt=ep(E),E=[];for(var GA,is,Is,$A=0,Dl=1,Ql=Array.isArray(Yt[0])?Dl:$A,Js="",Yh=function(dn,pn,Kn){var yi="";return Kn instanceof Ue?(Kn=typeof gt.angle=="number"?ri(Kn,new Ue(1,0,0,1,dn,pn)):ri(new Ue(1,0,0,1,dn,pn),Kn),w===y.ADVANCED&&(Kn=ri(new Ue(1,0,0,-1,0,0),Kn)),yi=Kn.join(" ")+` Tm
|
||
`):yi=I(dn)+" "+I(pn)+` Td
|
||
`,yi},bo=0;bo<Yt.length;bo++){switch(Js="",Ql){case Dl:Is=(es?"<":"(")+Yt[bo][0]+(es?">":")"),GA=parseFloat(Yt[bo][1]),is=parseFloat(Yt[bo][2]);break;case $A:Is=(es?"<":"(")+Yt[bo]+(es?">":")"),GA=qs(k),is=UA(st)}kA!==void 0&&kA[bo]!==void 0&&(Js=kA[bo]+` Tw
|
||
`),bo===0?E.push(Js+Yh(GA,is,jn)+Is):Ql===$A?E.push(Js+Is):Ql===Dl&&E.push(Js+Yh(GA,is,jn)+Is)}E=Ql===$A?E.join(` Tj
|
||
T* `):E.join(` Tj
|
||
`),E+=` Tj
|
||
`;var tA=`BT
|
||
/`;return tA+=fe+" "+Bt+` Tf
|
||
`,tA+=I(Bt*ro)+` TL
|
||
`,tA+=Pl+`
|
||
`,tA+=mi,tA+=E,V(tA+="ET"),h[fe]=!0,ni};var MA=f.__private__.clip=f.clip=function(E){return V(E==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return MA("evenodd")},f.__private__.discardPath=f.discardPath=function(){return V("n"),this};var Jo=f.__private__.isValidStyle=function(E){var k=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(E)!==-1&&(k=!0),k};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(E){return Jo(E)&&(l=E),this};var Dv=f.__private__.getStyle=f.getStyle=function(E){var k=l;switch(E){case"D":case"S":k="S";break;case"F":k="f";break;case"FD":case"DF":k="B";break;case"f":case"f*":case"B":case"B*":k=E}return k},bs=f.close=function(){return V("h"),this};f.stroke=function(){return V("S"),this},f.fill=function(E){return NA("f",E),this},f.fillEvenOdd=function(E){return NA("f*",E),this},f.fillStroke=function(E){return NA("B",E),this},f.fillStrokeEvenOdd=function(E){return NA("B*",E),this};var NA=function(E,k){mn(k)==="object"?Qv(k,E):V(E)},Uh=function(E){E===null||w===y.ADVANCED&&E===void 0||(E=Dv(E),V(E))};function Wd(E,k,st,gt,xt){var Ut=new eg(k||this.boundingBox,st||this.xStep,gt||this.yStep,this.gState,xt||this.matrix);Ut.stream=this.stream;var Yt=E+"$$"+this.cloneIndex+++"$$";return gi(Yt,Ut),Ut}var Qv=function(E,k){var st=fi[E.key],gt=se[st];if(gt instanceof wf)V("q"),V(zd(k)),gt.gState&&f.setGState(gt.gState),V(E.matrix.toString()+" cm"),V("/"+st+" sh"),V("Q");else if(gt instanceof eg){var xt=new Ue(1,0,0,-1,0,Zs());E.matrix&&(xt=xt.multiply(E.matrix||Cn),st=Wd.call(gt,E.key,E.boundingBox,E.xStep,E.yStep,xt).id),V("q"),V("/Pattern cs"),V("/"+st+" scn"),gt.gState&&f.setGState(gt.gState),V(k),V("Q")}},zd=function(E){switch(E){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"}},Dh=f.moveTo=function(E,k){return V(I(S(E))+" "+I(U(k))+" m"),this},Rl=f.lineTo=function(E,k){return V(I(S(E))+" "+I(U(k))+" l"),this},PA=f.curveTo=function(E,k,st,gt,xt,Ut){return V([I(S(E)),I(U(k)),I(S(st)),I(U(gt)),I(S(xt)),I(U(Ut)),"c"].join(" ")),this};f.__private__.line=f.line=function(E,k,st,gt,xt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||!Jo(xt))throw new Error("Invalid arguments passed to jsPDF.line");return w===y.COMPAT?this.lines([[st-E,gt-k]],E,k,[1,1],xt||"S"):this.lines([[st-E,gt-k]],E,k,[1,1]).stroke()},f.__private__.lines=f.lines=function(E,k,st,gt,xt,Ut){var Yt,ce,De,vr,ir,br,$i,jn,ni,ea,mi,es;if(typeof E=="number"&&(es=st,st=k,k=E,E=es),gt=gt||[1,1],Ut=Ut||!1,isNaN(k)||isNaN(st)||!Array.isArray(E)||!Array.isArray(gt)||!Jo(xt)||typeof Ut!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Dh(k,st),Yt=gt[0],ce=gt[1],vr=E.length,ea=k,mi=st,De=0;De<vr;De++)(ir=E[De]).length===2?(ea=ir[0]*Yt+ea,mi=ir[1]*ce+mi,Rl(ea,mi)):(br=ir[0]*Yt+ea,$i=ir[1]*ce+mi,jn=ir[2]*Yt+ea,ni=ir[3]*ce+mi,ea=ir[4]*Yt+ea,mi=ir[5]*ce+mi,PA(br,$i,jn,ni,ea,mi));return Ut&&bs(),Uh(xt),this},f.path=function(E){for(var k=0;k<E.length;k++){var st=E[k],gt=st.c;switch(st.op){case"m":Dh(gt[0],gt[1]);break;case"l":Rl(gt[0],gt[1]);break;case"c":PA.apply(this,gt);break;case"h":bs()}}return this},f.__private__.rect=f.rect=function(E,k,st,gt,xt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||!Jo(xt))throw new Error("Invalid arguments passed to jsPDF.rect");return w===y.COMPAT&&(gt=-gt),V([I(S(E)),I(U(k)),I(S(st)),I(S(gt)),"re"].join(" ")),Uh(xt),this},f.__private__.triangle=f.triangle=function(E,k,st,gt,xt,Ut,Yt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||isNaN(xt)||isNaN(Ut)||!Jo(Yt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[st-E,gt-k],[xt-st,Ut-gt],[E-xt,k-Ut]],E,k,[1,1],Yt,!0),this},f.__private__.roundedRect=f.roundedRect=function(E,k,st,gt,xt,Ut,Yt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||isNaN(xt)||isNaN(Ut)||!Jo(Yt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ce=4/3*(Math.SQRT2-1);return xt=Math.min(xt,.5*st),Ut=Math.min(Ut,.5*gt),this.lines([[st-2*xt,0],[xt*ce,0,xt,Ut-Ut*ce,xt,Ut],[0,gt-2*Ut],[0,Ut*ce,-xt*ce,Ut,-xt,Ut],[2*xt-st,0],[-xt*ce,0,-xt,-Ut*ce,-xt,-Ut],[0,2*Ut-gt],[0,-Ut*ce,xt*ce,-Ut,xt,-Ut]],E+xt,k,[1,1],Yt,!0),this},f.__private__.ellipse=f.ellipse=function(E,k,st,gt,xt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||!Jo(xt))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Ut=4/3*(Math.SQRT2-1)*st,Yt=4/3*(Math.SQRT2-1)*gt;return Dh(E+st,k),PA(E+st,k-Yt,E+Ut,k-gt,E,k-gt),PA(E-Ut,k-gt,E-st,k-Yt,E-st,k),PA(E-st,k+Yt,E-Ut,k+gt,E,k+gt),PA(E+Ut,k+gt,E+st,k+Yt,E+st,k),Uh(xt),this},f.__private__.circle=f.circle=function(E,k,st,gt){if(isNaN(E)||isNaN(k)||isNaN(st)||!Jo(gt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(E,k,st,st,gt)},f.setFont=function(E,k,st){return st&&(k=F(k,st)),fe=jd(E,k,{disableWarning:!1}),this};var kv=f.__private__.getFont=f.getFont=function(){return Ne[jd.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var E,k,st={};for(E in Pe)if(Pe.hasOwnProperty(E))for(k in st[E]=[],Pe[E])Pe[E].hasOwnProperty(k)&&st[E].push(k);return st},f.addFont=function(E,k,st,gt,xt){var Ut=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Ut.indexOf(arguments[3])!==-1?xt=arguments[3]:arguments[3]&&Ut.indexOf(arguments[3])==-1&&(st=F(st,gt)),xt=xt||"Identity-H",Mh.call(this,E,k,st,xt)};var Ml,Vu=r.lineWidth||.200025,Nl=f.__private__.getLineWidth=f.getLineWidth=function(){return Vu},Yd=f.__private__.setLineWidth=f.setLineWidth=function(E){return Vu=E,V(I(S(E))+" w"),this};f.__private__.setLineDash=We.API.setLineDash=We.API.setLineDashPattern=function(E,k){if(E=E||[],k=k||0,isNaN(k)||!Array.isArray(E))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return E=E.map(function(st){return I(S(st))}).join(" "),k=I(S(k)),V("["+E+"] "+k+" d"),this};var Xs=f.__private__.getLineHeight=f.getLineHeight=function(){return Bt*Ml};f.__private__.getLineHeight=f.getLineHeight=function(){return Bt*Ml};var Xd=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(E){return typeof(E=E||1.15)=="number"&&(Ml=E),this},qd=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return Ml};Xd(r.lineHeight);var qs=f.__private__.getHorizontalCoordinate=function(E){return S(E)},UA=f.__private__.getVerticalCoordinate=function(E){return w===y.ADVANCED?E:He[W].mediaBox.topRightY-He[W].mediaBox.bottomLeftY-S(E)},Hv=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(E){return I(qs(E))},xa=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(E){return I(UA(E))},ts=r.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return $t(ts)},f.__private__.setStrokeColor=f.setDrawColor=function(E,k,st,gt){return ts=ne({ch1:E,ch2:k,ch3:st,ch4:gt,pdfColorType:"draw",precision:2}),V(ts),this};var DA=r.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return $t(DA)},f.__private__.setFillColor=f.setFillColor=function(E,k,st,gt){return DA=ne({ch1:E,ch2:k,ch3:st,ch4:gt,pdfColorType:"fill",precision:2}),V(DA),this};var Pl=r.textColor||"0 g",Gv=f.__private__.getTextColor=f.getTextColor=function(){return $t(Pl)};f.__private__.setTextColor=f.setTextColor=function(E,k,st,gt){return Pl=ne({ch1:E,ch2:k,ch3:st,ch4:gt,pdfColorType:"text",precision:3}),this};var ju=r.charSpace,$v=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(ju||0)};f.__private__.setCharSpace=f.setCharSpace=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return ju=E,this};var Qh=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(E){var k=f.CapJoinStyles[E];if(k===void 0)throw new Error("Line cap style of '"+E+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qh=k,V(k+" J"),this};var kh=0;f.__private__.setLineJoin=f.setLineJoin=function(E){var k=f.CapJoinStyles[E];if(k===void 0)throw new Error("Line join style of '"+E+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return kh=k,V(k+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(E){if(E=E||0,isNaN(E))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return V(I(S(E))+" M"),this},f.GState=vE,f.setGState=function(E){(E=typeof E=="string"?gr[ei[E]]:Zd(null,E)).equals(Wr)||(V("/"+E.id+" gs"),Wr=E)};var Zd=function(E,k){if(!E||!ei[E]){var st=!1;for(var gt in gr)if(gr.hasOwnProperty(gt)&&gr[gt].equals(k)){st=!0;break}if(st)k=gr[gt];else{var xt="GS"+(Object.keys(gr).length+1).toString(10);gr[xt]=k,k.id=xt}return E&&(ei[E]=k.id),Ir.publish("addGState",k),k}};f.addGState=function(E,k){return Zd(E,k),this},f.saveGraphicsState=function(){return V("q"),Gr.push({key:fe,size:Bt,color:Pl}),this},f.restoreGraphicsState=function(){V("Q");var E=Gr.pop();return fe=E.key,Bt=E.size,Pl=E.color,Wr=null,this},f.setCurrentTransformationMatrix=function(E){return V(E.toString()+" cm"),this},f.comment=function(E){return V("#"+E),this};var Ku=function(E,k){var st=E||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return st},set:function(Ut){isNaN(Ut)||(st=parseFloat(Ut))}});var gt=k||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return gt},set:function(Ut){isNaN(Ut)||(gt=parseFloat(Ut))}});var xt="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return xt},set:function(Ut){xt=Ut.toString()}}),this},Hh=function(E,k,st,gt){Ku.call(this,E,k),this.type="rect";var xt=st||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return xt},set:function(Yt){isNaN(Yt)||(xt=parseFloat(Yt))}});var Ut=gt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Ut},set:function(Yt){isNaN(Yt)||(Ut=parseFloat(Yt))}}),this},Gh=function(){this.page=zr,this.currentPage=W,this.pages=at.slice(0),this.pagesContext=He.slice(0),this.x=nr,this.y=ke,this.matrix=wr,this.width=Gi(W),this.height=Zs(W),this.outputDestination=Z,this.id="",this.objectNumber=-1};Gh.prototype.restore=function(){zr=this.page,W=this.currentPage,He=this.pagesContext,at=this.pages,nr=this.x,ke=this.y,wr=this.matrix,zu(W,this.width),QA(W,this.height),Z=this.outputDestination};var Jd=function(E,k,st,gt,xt){pi.push(new Gh),zr=W=0,at=[],nr=E,ke=k,wr=xt,$d([st,gt])},Vv=function(E){if(di[E])pi.pop().restore();else{var k=new Gh,st="Xo"+(Object.keys(yn).length+1).toString(10);k.id=st,di[E]=st,yn[st]=k,Ir.publish("addFormObject",k),pi.pop().restore()}};for(var Wu in f.beginFormObject=function(E,k,st,gt,xt){return Jd(E,k,st,gt,xt),this},f.endFormObject=function(E){return Vv(E),this},f.doFormObject=function(E,k){var st=yn[di[E]];return V("q"),V(k.toString()+" cm"),V("/"+st.id+" Do"),V("Q"),this},f.getFormObject=function(E){var k=yn[di[E]];return{x:k.x,y:k.y,width:k.width,height:k.height,matrix:k.matrix}},f.save=function(E,k){return E=E||"generated.pdf",(k=k||{}).returnPromise=k.returnPromise||!1,k.returnPromise===!1?(gf(Hu(Ys()),E),typeof gf.unload=="function"&&Xe.setTimeout&&setTimeout(gf.unload,911),this):new Promise(function(st,gt){try{var xt=gf(Hu(Ys()),E);typeof gf.unload=="function"&&Xe.setTimeout&&setTimeout(gf.unload,911),st(xt)}catch(Ut){gt(Ut.message)}})},We.API)We.API.hasOwnProperty(Wu)&&(Wu==="events"&&We.API.events.length?function(E,k){var st,gt,xt;for(xt=k.length-1;xt!==-1;xt--)st=k[xt][0],gt=k[xt][1],E.subscribe.apply(E,[st].concat(typeof gt=="function"?[gt]:gt))}(Ir,We.API.events):f[Wu]=We.API[Wu]);var Gi=f.getPageWidth=function(E){return(He[E=E||W].mediaBox.topRightX-He[E].mediaBox.bottomLeftX)/qt},zu=f.setPageWidth=function(E,k){He[E].mediaBox.topRightX=k*qt+He[E].mediaBox.bottomLeftX},Zs=f.getPageHeight=function(E){return(He[E=E||W].mediaBox.topRightY-He[E].mediaBox.bottomLeftY)/qt},QA=f.setPageHeight=function(E,k){He[E].mediaBox.topRightY=k*qt+He[E].mediaBox.bottomLeftY};return f.internal={pdfEscape:Sa,getStyle:Dv,getFont:kv,getFontSize:Rt,getCharSpace:$v,getTextColor:Gv,getLineHeight:Xs,getLineHeightFactor:qd,getLineWidth:Nl,write:Ft,getHorizontalCoordinate:qs,getVerticalCoordinate:UA,getCoordinateString:Hv,getVerticalCoordinateString:xa,collections:{},newObject:cn,newAdditionalObject:eo,newObjectDeferred:Br,newObjectDeferredBegin:_n,getFilters:Je,putStream:Lr,events:Ir,scaleFactor:qt,pageSize:{getWidth:function(){return Gi(W)},setWidth:function(E){zu(W,E)},getHeight:function(){return Zs(W)},setHeight:function(E){QA(W,E)}},encryptionOptions:u,encryption:ta,getEncryptor:Pv,output:Gu,getNumberOfPages:Mv,pages:at,out:V,f2:N,f3:x,getPageInfo:$u,getPageInfoByObjId:er,getCurrentPageInfo:Uv,getPDFVersion:g,Point:Ku,Rectangle:Hh,Matrix:Ue,hasHotfix:Kd},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return Gi(W)},set:function(E){zu(W,E)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return Zs(W)},set:function(E){QA(W,E)},enumerable:!0,configurable:!0}),Fv.call(f,Et),fe="F1",FA(i,t),Ir.publish("initialized"),f}Hp.prototype.lsbFirstWord=function(r){return String.fromCharCode(r>>0&255,r>>8&255,r>>16&255,r>>24&255)},Hp.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Hp.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("")},Hp.prototype.processOwnerPassword=function(r,e){return mI(vI(e).substr(0,5),r)},Hp.prototype.encryptor=function(r,e){var t=vI(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return mI(t,n)}},vE.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||mn(r)!==mn(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},We.API={events:[]},We.version="2.5.0";var oi=We.API,cR=1,Id=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},vp=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},sr=function(r){return r.toFixed(2)},vc=function(r){return r.toFixed(5)};oi.__acroform__={};var Wo=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},N5=function(r){return r*cR},XA=function(r){var e=new wG,t=be.internal.getHeight(r)||0,n=be.internal.getWidth(r)||0;return e.BBox=[0,0,Number(sr(n)),Number(sr(t))],e},xut=oi.__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},Iut=oi.__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)},Lut=oi.__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},Bi=oi.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Lut(r,e-1)},bi=oi.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return xut(r,e-1)},Ti=oi.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Iut(r,e-1)},Out=oi.__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(sr(A.lowerLeft_X)),Number(sr(A.lowerLeft_Y)),Number(sr(A.upperRight_X)),Number(sr(A.upperRight_Y))]},Fut=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,n=yI(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+" "+sr(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=XA(r);return a.scope=r.scope,a.stream=e.join(`
|
||
`),a}},yI=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(x){return x.split(`
|
||
`)}):i.map(function(x){return[x]});var a=t,o=be.internal.getHeight(r)||0;o=o<0?-o:o;var s=be.internal.getWidth(r)||0;s=s<0?-s:s;var A=function(x,S,P){if(x+1<i.length){var U=S+" "+i[x+1][0];return r1(U,r,P).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var l,u,c=r1("3",r,a).height,h=r.multiline?o-a:(o-c)/2,f=h+=2,d=0,g=0,m=0;if(a<=0){e=`(...) Tj
|
||
`,e+="% Width of Text: "+r1(e,r,a=12).width+", FieldWidth:"+s+`
|
||
`;break}for(var v="",y=0,w=0;w<i.length;w++)if(i.hasOwnProperty(w)){var C=!1;if(i[w].length!==1&&m!==i[w].length-1){if((c+2)*(y+2)+2>o)continue t;v+=i[w][m],C=!0,g=w,w--}else{v=(v+=i[w][m]+" ").substr(v.length-1)==" "?v.substr(0,v.length-1):v;var O=parseInt(w),F=A(O,v,a),I=w>=i.length-1;if(F&&!I){v+=" ",m=0;continue}if(F||I){if(I)g=O;else if(r.multiline&&(c+2)*(y+2)+2>o)continue t}else{if(!r.multiline||(c+2)*(y+2)+2>o)continue t;g=O}}for(var T="",L=d;L<=g;L++){var N=i[L];if(r.multiline){if(L===g){T+=N[m]+" ",m=(m+1)%N.length;continue}if(L===d){T+=N[N.length-1]+" ";continue}}T+=N[0]+" "}switch(T=T.substr(T.length-1)==" "?T.substr(0,T.length-1):T,u=r1(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+=sr(l)+" "+sr(f)+` Td
|
||
`,e+="("+Id(T)+`) Tj
|
||
`,e+=-sr(l)+` 0 Td
|
||
`,f=-(a+2),u=0,d=C?g:g+1,y++,v=""}break}return n.text=e,n.fontSize=a,n},r1=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}},Rut={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Mut=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)},Nut=function(r,e){for(var t in r)if(r.hasOwnProperty(t)){var n=t,i=r[t];e.internal.newObjectDeferredBegin(i.objId,!0),mn(i)==="object"&&typeof i.putStream=="function"&&i.putStream(),delete r[n]}},Put=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(xA.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(Rut)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");cR=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new EG,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&&Mut(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=Out(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=be.createDefaultAppearanceStream(s),mn(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(A=s.getKeyValueListForStream()),s.Rect=l,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=Fut(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 d=f[o];typeof d=="function"&&(d=d.call(i,s)),c+="/"+o+" "+d+" ",i.internal.acroformPlugin.xForms.indexOf(d)>=0||i.internal.acroformPlugin.xForms.push(d)}}else typeof(d=f)=="function"&&(d=d.call(i,s)),c+="/"+o+" "+d,i.internal.acroformPlugin.xForms.indexOf(d)>=0||i.internal.acroformPlugin.xForms.push(d);c+=">>"}A.push({key:"AP",value:`<<
|
||
`+c+">>"})}i.internal.putStream({additionalKeyValues:A,objectId:s.objId}),i.internal.out("endobj")}a&&Nut(i.internal.acroformPlugin.xForms,i)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},_G=oi.__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+=" "),mn(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+="("+Id(n(r[a].toString()))+")"):i+=r[a].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},hT=function(r,e,t){var n=function(i){return i};return e!==void 0&&t&&(n=t.internal.getEncryptor(e)),(r=r||"").toString(),r="("+Id(n(r))+")"},sl=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})};sl.prototype.toString=function(){return this.objId+" 0 R"},sl.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},sl.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:_G(i,this.objId,this.scope)}):i instanceof sl?(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 wG=function(){sl.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}})};Wo(wG,sl);var EG=function(){sl.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)),"("+Id(t(r))+")"}},set:function(t){r=t}})};Wo(EG,sl);var xA=function r(){sl.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(v){if(isNaN(v))throw new Error('Invalid value "'+v+'" for attribute F supplied.');e=v}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(e,3))},set:function(v){Boolean(v)===!0?this.F=bi(e,3):this.F=Ti(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(v){if(isNaN(v))throw new Error('Invalid value "'+v+'" for attribute Ff supplied.');t=v}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(v){n=v!==void 0?v:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(v){n[0]=v}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(v){n[1]=v}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(v){n[2]=v}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(v){n[3]=v}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(v){switch(v){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=v;break;default:throw new Error('Invalid value "'+v+'" 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 mE)return;a="FieldObject"+r.FieldNum++}var v=function(y){return y};return this.scope&&(v=this.scope.internal.getEncryptor(this.objId)),"("+Id(v(a))+")"},set:function(v){a=v.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(v){a=v}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(v){o=v}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(v){s=v}});var A=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return A},set:function(v){A=v}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/cR:l},set:function(v){l=v}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(v){u=v}});var c="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!c||this instanceof mE||this instanceof Hf))return hT(c,this.objId,this.scope)},set:function(v){v=v.toString(),c=v}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof sa?h:hT(h,this.objId,this.scope)},set:function(v){v=v.toString(),h=this instanceof sa?v:v.substr(0,1)==="("?vp(v.substr(1,v.length-2)):vp(v)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof sa?vp(h.substr(1,h.length-1)):h},set:function(v){v=v.toString(),h=this instanceof sa?"/"+v:v}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(v){this.V=v}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof sa?f:hT(f,this.objId,this.scope)},set:function(v){v=v.toString(),f=this instanceof sa?v:v.substr(0,1)==="("?vp(v.substr(1,v.length-2)):vp(v)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof sa?vp(f.substr(1,f.length-1)):f},set:function(v){v=v.toString(),f=this instanceof sa?"/"+v:v}}),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 d,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(v){v=Boolean(v),g=v}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(d)return d},set:function(v){d=v}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,1))},set:function(v){Boolean(v)===!0?this.Ff=bi(this.Ff,1):this.Ff=Ti(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,2))},set:function(v){Boolean(v)===!0?this.Ff=bi(this.Ff,2):this.Ff=Ti(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,3))},set:function(v){Boolean(v)===!0?this.Ff=bi(this.Ff,3):this.Ff=Ti(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(m!==null)return m},set:function(v){if([0,1,2].indexOf(v)===-1)throw new Error('Invalid value "'+v+'" for attribute Q supplied.');m=v}}),Object.defineProperty(this,"textAlign",{get:function(){var v;switch(m){case 0:default:v="left";break;case 1:v="center";break;case 2:v="right"}return v},configurable:!0,enumerable:!0,set:function(v){switch(v){case"right":case 2:m=2;break;case"center":case 1:m=1;break;case"left":case 0:default:m=0}}})};Wo(xA,sl);var dg=function(){xA.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 _G(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(Bi(this.Ff,18))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,18):this.Ff=Ti(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,19))},set:function(t){this.combo===!0&&(Boolean(t)===!0?this.Ff=bi(this.Ff,19):this.Ff=Ti(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,20))},set:function(t){Boolean(t)===!0?(this.Ff=bi(this.Ff,20),e.sort()):this.Ff=Ti(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,22))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,22):this.Ff=Ti(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,23))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,23):this.Ff=Ti(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,27))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,27):this.Ff=Ti(this.Ff,27)}}),this.hasAppearanceStream=!1};Wo(dg,xA);var pg=function(){dg.call(this),this.fontName="helvetica",this.combo=!1};Wo(pg,dg);var gg=function(){pg.call(this),this.combo=!0};Wo(gg,pg);var lw=function(){gg.call(this),this.edit=!0};Wo(lw,gg);var sa=function(){xA.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,15))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,15):this.Ff=Ti(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,16))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,16):this.Ff=Ti(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,17))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,17):this.Ff=Ti(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,26))},set:function(t){Boolean(t)===!0?this.Ff=bi(this.Ff,26):this.Ff=Ti(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+" ("+Id(t(e[n]))+")");return i.push(">>"),i.join(`
|
||
`)}},set:function(t){mn(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}})};Wo(sa,xA);var uw=function(){sa.call(this),this.pushButton=!0};Wo(uw,sa);var vg=function(){sa.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:[]}})};Wo(vg,sa);var mE=function(){var r,e;xA.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+" ("+Id(i(n[a]))+")");return o.push(">>"),o.join(`
|
||
`)},set:function(i){mn(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=be.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Wo(mE,xA),vg.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()}},vg.prototype.createOption=function(r){var e=new mE;return e.Parent=this,e.optionName=r,this.Kids.push(e),Uut.call(this.scope,e),e};var cw=function(){sa.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=be.CheckBox.createAppearanceStream()};Wo(cw,sa);var Hf=function(){xA.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,13))},set:function(e){Boolean(e)===!0?this.Ff=bi(this.Ff,13):this.Ff=Ti(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,21))},set:function(e){Boolean(e)===!0?this.Ff=bi(this.Ff,21):this.Ff=Ti(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,23))},set:function(e){Boolean(e)===!0?this.Ff=bi(this.Ff,23):this.Ff=Ti(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,24))},set:function(e){Boolean(e)===!0?this.Ff=bi(this.Ff,24):this.Ff=Ti(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,25))},set:function(e){Boolean(e)===!0?this.Ff=bi(this.Ff,25):this.Ff=Ti(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,26))},set:function(e){Boolean(e)===!0?this.Ff=bi(this.Ff,26):this.Ff=Ti(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}})};Wo(Hf,xA);var hw=function(){Hf.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(Bi(this.Ff,14))},set:function(r){Boolean(r)===!0?this.Ff=bi(this.Ff,14):this.Ff=Ti(this.Ff,14)}}),this.password=!0};Wo(hw,Hf);var be={CheckBox:{createAppearanceStream:function(){return{N:{On:be.CheckBox.YesNormal},D:{On:be.CheckBox.YesPushDown,Off:be.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=XA(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=yI(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+sr(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=XA(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=be.internal.getHeight(r),o=be.internal.getWidth(r),s=yI(r,r.caption);return i.push("1 g"),i.push("0 0 "+sr(o)+" "+sr(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+sr(o-1)+" "+sr(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+sr(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
|
||
`),e},OffPushDown:function(r){var e=XA(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
|
||
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:be.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=be.RadioButton.Circle.YesNormal,e.D[r]=be.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=XA(r);e.scope=r.scope;var t=[],n=be.internal.getWidth(r)<=be.internal.getHeight(r)?be.internal.getWidth(r)/4:be.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=be.internal.Bezier_C,a=Number((n*i).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+vc(be.internal.getWidth(r)/2)+" "+vc(be.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=XA(r);e.scope=r.scope;var t=[],n=be.internal.getWidth(r)<=be.internal.getHeight(r)?be.internal.getWidth(r)/4:be.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*be.internal.Bezier_C).toFixed(5)),o=Number((n*be.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+vc(be.internal.getWidth(r)/2)+" "+vc(be.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 "+vc(be.internal.getWidth(r)/2)+" "+vc(be.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=XA(r);e.scope=r.scope;var t=[],n=be.internal.getWidth(r)<=be.internal.getHeight(r)?be.internal.getWidth(r)/4:be.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*be.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+vc(be.internal.getWidth(r)/2)+" "+vc(be.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:be.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=be.RadioButton.Cross.YesNormal,e.D[r]=be.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=XA(r);e.scope=r.scope;var t=[],n=be.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+sr(be.internal.getWidth(r)-2)+" "+sr(be.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(sr(n.x1.x)+" "+sr(n.x1.y)+" m"),t.push(sr(n.x2.x)+" "+sr(n.x2.y)+" l"),t.push(sr(n.x4.x)+" "+sr(n.x4.y)+" m"),t.push(sr(n.x3.x)+" "+sr(n.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
|
||
`),e},YesPushDown:function(r){var e=XA(r);e.scope=r.scope;var t=be.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+sr(be.internal.getWidth(r)-2)+" "+sr(be.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(sr(t.x1.x)+" "+sr(t.x1.y)+" m"),n.push(sr(t.x2.x)+" "+sr(t.x2.y)+" l"),n.push(sr(t.x4.x)+" "+sr(t.x4.y)+" m"),n.push(sr(t.x3.x)+" "+sr(t.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
|
||
`),e},OffPushDown:function(r){var e=XA(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.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}};be.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=be.internal.getWidth(r),t=be.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}}}},be.internal.getWidth=function(r){var e=0;return mn(r)==="object"&&(e=N5(r.Rect[2])),e},be.internal.getHeight=function(r){var e=0;return mn(r)==="object"&&(e=N5(r.Rect[3])),e};var Uut=oi.addField=function(r){if(Put(this,r),!(r instanceof xA))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};oi.AcroFormChoiceField=dg,oi.AcroFormListBox=pg,oi.AcroFormComboBox=gg,oi.AcroFormEditBox=lw,oi.AcroFormButton=sa,oi.AcroFormPushButton=uw,oi.AcroFormRadioButton=vg,oi.AcroFormCheckBox=cw,oi.AcroFormTextField=Hf,oi.AcroFormPasswordField=hw,oi.AcroFormAppearance=be,oi.AcroForm={ChoiceField:dg,ListBox:pg,ComboBox:gg,EditBox:lw,Button:sa,PushButton:uw,RadioButton:vg,CheckBox:cw,TextField:Hf,PasswordField:hw,Appearance:be},We.AcroForm={ChoiceField:dg,ListBox:pg,ComboBox:gg,EditBox:lw,Button:sa,PushButton:uw,RadioButton:vg,CheckBox:cw,TextField:Hf,PasswordField:hw,Appearance:be};We.AcroForm;function CG(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(x,S){var P,U,tt,q,rt,nt=e;if((S=S||e)==="RGBA"||x.data!==void 0&&x.data instanceof Uint8ClampedArray&&"height"in x&&"width"in x)return"RGBA";if(F(x))for(rt in t)for(tt=t[rt],P=0;P<tt.length;P+=1){for(q=!0,U=0;U<tt[P].length;U+=1)if(tt[P][U]!==void 0&&tt[P][U]!==x[U]){q=!1;break}if(q===!0){nt=rt;break}}else for(rt in t)for(tt=t[rt],P=0;P<tt.length;P+=1){for(q=!0,U=0;U<tt[P].length;U+=1)if(tt[P][U]!==void 0&&tt[P][U]!==x.charCodeAt(U)){q=!1;break}if(q===!0){nt=rt;break}}return nt===e&&S!==e&&(nt=S),nt},i=function x(S){for(var P=this.internal.write,U=this.internal.putStream,tt=(0,this.internal.getFilters)();tt.indexOf("FlateEncode")!==-1;)tt.splice(tt.indexOf("FlateEncode"),1);S.objectId=this.internal.newObject();var q=[];if(q.push({key:"Type",value:"/XObject"}),q.push({key:"Subtype",value:"/Image"}),q.push({key:"Width",value:S.width}),q.push({key:"Height",value:S.height}),S.colorSpace===m.INDEXED?q.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(S.palette.length/3-1)+" "+("sMask"in S&&S.sMask!==void 0?S.objectId+2:S.objectId+1)+" 0 R]"}):(q.push({key:"ColorSpace",value:"/"+S.colorSpace}),S.colorSpace===m.DEVICE_CMYK&&q.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),q.push({key:"BitsPerComponent",value:S.bitsPerComponent}),"decodeParameters"in S&&S.decodeParameters!==void 0&&q.push({key:"DecodeParms",value:"<<"+S.decodeParameters+">>"}),"transparency"in S&&Array.isArray(S.transparency)){for(var rt="",nt=0,At=S.transparency.length;nt<At;nt++)rt+=S.transparency[nt]+" "+S.transparency[nt]+" ";q.push({key:"Mask",value:"["+rt+"]"})}S.sMask!==void 0&&q.push({key:"SMask",value:S.objectId+1+" 0 R"});var ct=S.filter!==void 0?["/"+S.filter]:void 0;if(U({data:S.data,additionalKeyValues:q,alreadyAppliedFilters:ct,objectId:S.objectId}),P("endobj"),"sMask"in S&&S.sMask!==void 0){var Tt="/Predictor "+S.predictor+" /Colors 1 /BitsPerComponent "+S.bitsPerComponent+" /Columns "+S.width,M={width:S.width,height:S.height,colorSpace:"DeviceGray",bitsPerComponent:S.bitsPerComponent,decodeParameters:Tt,data:S.sMask};"filter"in S&&(M.filter=S.filter),x.call(this,M)}if(S.colorSpace===m.INDEXED){var W=this.internal.newObject();U({data:T(new Uint8Array(S.palette)),objectId:W}),P("endobj")}},a=function(){var x=this.internal.collections.addImage_images;for(var S in x)i.call(this,x[S])},o=function(){var x,S=this.internal.collections.addImage_images,P=this.internal.write;for(var U in S)P("/I"+(x=S[U]).index,x.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 x=this.internal.collections.addImage_images;return s.call(this),x},l=function(){return Object.keys(this.internal.collections.addImage_images).length},u=function(x){return typeof r["process"+x.toUpperCase()]=="function"},c=function(x){return mn(x)==="object"&&x.nodeType===1},h=function(x,S){if(x.nodeName==="IMG"&&x.hasAttribute("src")){var P=""+x.getAttribute("src");if(P.indexOf("data:image/")===0)return uy(unescape(P).split("base64,").pop());var U=r.loadFile(P,!0);if(U!==void 0)return U}if(x.nodeName==="CANVAS"){if(x.width===0||x.height===0)throw new Error("Given canvas must have data. Canvas width: "+x.width+", height: "+x.height);var tt;switch(S){case"PNG":tt="image/png";break;case"WEBP":tt="image/webp";break;case"JPEG":case"JPG":default:tt="image/jpeg"}return uy(x.toDataURL(tt,1).split("base64,").pop())}},f=function(x){var S=this.internal.collections.addImage_images;if(S){for(var P in S)if(x===S[P].alias)return S[P]}},d=function(x,S,P){return x||S||(x=-96,S=-96),x<0&&(x=-1*P.width*72/x/this.internal.scaleFactor),S<0&&(S=-1*P.height*72/S/this.internal.scaleFactor),x===0&&(x=S*P.width/P.height),S===0&&(S=x*P.height/P.width),[x,S]},g=function(x,S,P,U,tt,q){var rt=d.call(this,P,U,tt),nt=this.internal.getCoordinateString,At=this.internal.getVerticalCoordinateString,ct=A.call(this);if(P=rt[0],U=rt[1],ct[tt.index]=tt,q){q*=Math.PI/180;var Tt=Math.cos(q),M=Math.sin(q),W=function(H){return H.toFixed(4)},Y=[W(Tt),W(M),W(-1*M),W(Tt),0,0,"cm"]}this.internal.write("q"),q?(this.internal.write([1,"0","0",1,nt(x),At(S+U),"cm"].join(" ")),this.internal.write(Y.join(" ")),this.internal.write([nt(P),"0","0",nt(U),"0","0","cm"].join(" "))):this.internal.write([nt(P),"0","0",nt(U),nt(x),At(S+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+tt.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 v=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},y=r.__addimage__.sHashCode=function(x){var S,P,U=0;if(typeof x=="string")for(P=x.length,S=0;S<P;S++)U=(U<<5)-U+x.charCodeAt(S),U|=0;else if(F(x))for(P=x.byteLength/2,S=0;S<P;S++)U=(U<<5)-U+x[S],U|=0;return U},w=r.__addimage__.validateStringAsBase64=function(x){(x=x||"").toString().trim();var S=!0;return x.length===0&&(S=!1),x.length%4!=0&&(S=!1),/^[A-Za-z0-9+/]+$/.test(x.substr(0,x.length-2))===!1&&(S=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(x.substr(-2))===!1&&(S=!1),S},C=r.__addimage__.extractImageFromDataUrl=function(x){var S=(x=x||"").split("base64,"),P=null;if(S.length===2){var U=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(S[0]);Array.isArray(U)&&(P={mimeType:U[1],charset:U[2],data:S[1]})}return P},O=r.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};r.__addimage__.isArrayBuffer=function(x){return O()&&x instanceof ArrayBuffer};var F=r.__addimage__.isArrayBufferView=function(x){return O()&&typeof Uint32Array<"u"&&(x instanceof Int8Array||x instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)},I=r.__addimage__.binaryStringToUint8Array=function(x){for(var S=x.length,P=new Uint8Array(S),U=0;U<S;U++)P[U]=x.charCodeAt(U);return P},T=r.__addimage__.arrayBufferToBinaryString=function(x){for(var S="",P=F(x)?x:new Uint8Array(x),U=0;U<P.length;U+=8192)S+=String.fromCharCode.apply(null,P.subarray(U,U+8192));return S};r.addImage=function(){var x,S,P,U,tt,q,rt,nt,At;if(typeof arguments[1]=="number"?(S=e,P=arguments[1],U=arguments[2],tt=arguments[3],q=arguments[4],rt=arguments[5],nt=arguments[6],At=arguments[7]):(S=arguments[1],P=arguments[2],U=arguments[3],tt=arguments[4],q=arguments[5],rt=arguments[6],nt=arguments[7],At=arguments[8]),mn(x=arguments[0])==="object"&&!c(x)&&"imageData"in x){var ct=x;x=ct.imageData,S=ct.format||S||e,P=ct.x||P||0,U=ct.y||U||0,tt=ct.w||ct.width||tt,q=ct.h||ct.height||q,rt=ct.alias||rt,nt=ct.compression||nt,At=ct.rotation||ct.angle||At}var Tt=this.internal.getFilters();if(nt===void 0&&Tt.indexOf("FlateEncode")!==-1&&(nt="SLOW"),isNaN(P)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var M=L.call(this,x,S,rt,nt);return g.call(this,P,U,tt,q,M,At),this};var L=function(x,S,P,U){var tt,q,rt;if(typeof x=="string"&&n(x)===e){x=unescape(x);var nt=N(x,!1);(nt!==""||(nt=r.loadFile(x,!0))!==void 0)&&(x=nt)}if(c(x)&&(x=h(x,S)),S=n(x,S),!u(S))throw new Error("addImage does not support files of type '"+S+"', please ensure that a plugin for '"+S+"' support is added.");if(((rt=P)==null||rt.length===0)&&(P=function(At){return typeof At=="string"||F(At)?y(At):F(At.data)?y(At.data):null}(x)),(tt=f.call(this,P))||(O()&&(x instanceof Uint8Array||S==="RGBA"||(q=x,x=I(x))),tt=this["process"+S.toUpperCase()](x,l.call(this),P,function(At){return At&&typeof At=="string"&&(At=At.toUpperCase()),At in r.image_compression?At:v.NONE}(U),q)),!tt)throw new Error("An unknown error occurred whilst processing the image.");return tt},N=r.__addimage__.convertBase64ToBinaryString=function(x,S){var P;S=typeof S!="boolean"||S;var U,tt="";if(typeof x=="string"){U=(P=C(x))!==null?P.data:x;try{tt=uy(U)}catch(q){if(S)throw w(U)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+q.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return tt};r.getImageProperties=function(x){var S,P,U="";if(c(x)&&(x=h(x)),typeof x=="string"&&n(x)===e&&((U=N(x,!1))===""&&(U=r.loadFile(x)||""),x=U),P=n(x),!u(P))throw new Error("addImage does not support files of type '"+P+"', please ensure that a plugin for '"+P+"' support is added.");if(!O()||x instanceof Uint8Array||(x=I(x)),!(S=this["process"+P.toUpperCase()](x)))throw new Error("An unknown error occurred whilst processing the image");return S.fileType=P,S}})(We.API),function(r){var e=function(t){if(t!==void 0&&t!="")return!0};We.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,d=this.internal.getEncryptor(t.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var g=this.internal.newAdditionalObject(),m=this.internal.newAdditionalObject(),v=this.internal.getEncryptor(g.objId),y=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(v(n.contents))+")",a+=" /Popup "+m.objId+" 0 R",a+=" /P "+A.objId+" 0 R",a+=" /T ("+f(v(y))+") >>",g.content=a;var w=g.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 "+w,n.open&&(a+=" /Open true"),a+=" >>",m.content=a,this.internal.write(g.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 C=n.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+f(d(n.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+C+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var O=this.annotations._nameMap[n.options.name];n.options.pageNumber=O.page,n.options.top=O.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(d(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 F=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+" "+F+" "+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}}(We.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(g){return e[g.charCodeAt(0)]!==void 0},o=r.__arabicParser__.isArabicLetter=function(g){return typeof g=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(g)},s=r.__arabicParser__.isArabicEndLetter=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length<=2},A=r.__arabicParser__.isArabicAlfLetter=function(g){return o(g)&&i.indexOf(g.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length>=1};var l=r.__arabicParser__.arabicLetterHasFinalForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length>=3};var u=r.__arabicParser__.arabicLetterHasMedialForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length==4},c=r.__arabicParser__.resolveLigatures=function(g){var m=0,v=t,y="",w=0;for(m=0;m<g.length;m+=1)v[g.charCodeAt(m)]!==void 0?(w++,typeof(v=v[g.charCodeAt(m)])=="number"&&(y+=String.fromCharCode(v),v=t,w=0),m===g.length-1&&(v=t,y+=g.charAt(m-(w-1)),m-=w-1,w=0)):(v=t,y+=g.charAt(m-w),m-=w,w=0);return y};r.__arabicParser__.isArabicDiacritic=function(g){return g!==void 0&&n[g.charCodeAt(0)]!==void 0};var h=r.__arabicParser__.getCorrectForm=function(g,m,v){return o(g)?a(g)===!1?-1:!l(g)||!o(m)&&!o(v)||!o(v)&&s(m)||s(g)&&!o(m)||s(g)&&A(m)||s(g)&&s(m)?0:u(g)&&o(m)&&!s(m)&&o(v)&&l(v)?3:s(g)||!o(v)?1:2:-1},f=function(g){var m=0,v=0,y=0,w="",C="",O="",F=(g=g||"").split("\\s+"),I=[];for(m=0;m<F.length;m+=1){for(I.push(""),v=0;v<F[m].length;v+=1)w=F[m][v],C=F[m][v-1],O=F[m][v+1],o(w)?(y=h(w,C,O),I[m]+=y!==-1?String.fromCharCode(e[w.charCodeAt(0)][y]):w):I[m]+=w;I[m]=c(I[m])}return I.join(" ")},d=r.__arabicParser__.processArabic=r.processArabic=function(){var g,m=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,v=[];if(Array.isArray(m)){var y=0;for(v=[],y=0;y<m.length;y+=1)Array.isArray(m[y])?v.push([f(m[y][0]),m[y][1],m[y][2]]):v.push([f(m[y])]);g=v}else g=f(m);return typeof arguments[0]=="string"?g:(arguments[0].text=g,arguments[0])};r.events.push(["preProcessText",d])}(We.API),We.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}])}(We.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(g){A=g}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(g){l=g}});var u=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return u},set:function(g){u=g}});var c=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return c},set:function(g){c=g}});var h=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return h},set:function(g){h=g}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(g){f=g}});var d=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return d},set:function(g){d=g}}),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,d=0,g=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 v=l.maxWidth;v>0?typeof A=="string"?A=this.splitTextToSize(A,v):Object.prototype.toString.call(A)==="[object Array]"&&(A=A.reduce(function(w,C){return w.concat(m.splitTextToSize(C,v))},[])):A=Array.isArray(A)?A:[A];for(var y=0;y<A.length;y++)f<(g=this.getStringUnitWidth(A[y],{font:c})*u)&&(f=g);return f!==0&&(d=A.length),{w:f/=h,h:Math.max((d*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,d,g,m,v=[],y=[],w=[],C={},O={},F=[],I=[],T=(h=h||{}).autoSize||!1,L=h.printHeaders!==!1,N=h.css&&h.css["font-size"]!==void 0?16*h.css["font-size"]:h.fontSize||12,x=h.margins||Object.assign({width:this.getPageWidth()},e),S=typeof h.padding=="number"?h.padding:3,P=h.headerBackgroundColor||"#c8c8c8",U=h.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=L,this.internal.__cell__.margins=x,this.internal.__cell__.table_font_size=N,this.internal.__cell__.padding=S,this.internal.__cell__.headerBackgroundColor=P,this.internal.__cell__.headerTextColor=U,this.setFontSize(N),c==null)y=v=Object.keys(u[0]),w=v.map(function(){return"left"});else if(Array.isArray(c)&&mn(c[0])==="object")for(v=c.map(function(ct){return ct.name}),y=c.map(function(ct){return ct.prompt||ct.name||""}),w=c.map(function(ct){return ct.align||"left"}),f=0;f<c.length;f+=1)O[c[f].name]=c[f].width*(19.049976/25.4);else Array.isArray(c)&&typeof c[0]=="string"&&(y=v=c,w=v.map(function(){return"left"}));if(T||Array.isArray(c)&&typeof c[0]=="string")for(f=0;f<v.length;f+=1){for(C[m=v[f]]=u.map(function(ct){return ct[m]}),this.setFont(void 0,"bold"),F.push(this.getTextDimensions(y[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),d=C[m],this.setFont(void 0,"normal"),g=0;g<d.length;g+=1)F.push(this.getTextDimensions(d[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);O[m]=Math.max.apply(null,F)+S+S,F=[]}if(L){var tt={};for(f=0;f<v.length;f+=1)tt[v[f]]={},tt[v[f]].text=y[f],tt[v[f]].align=w[f];var q=s.call(this,tt,O);I=v.map(function(ct){return new a(A,l,O[ct],q,tt[ct].text,void 0,tt[ct].align)}),this.setTableHeaderRow(I),this.printHeaderRow(1,!1)}var rt=c.reduce(function(ct,Tt){return ct[Tt.name]=Tt.align,ct},{});for(f=0;f<u.length;f+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:f,data:u[f]},this);var nt=s.call(this,u[f],O);for(g=0;g<v.length;g+=1){var At=u[f][v[g]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:f,col:g,data:At},this),o.call(this,new a(A,l,O[v[g]],nt,At,f+2,rt[v[g]]))}}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 d=A[f];return this.splitTextToSize(d.hasOwnProperty("text")?d.text:d,l[f]-u-u)},this).map(function(f){return this.getLineHeightFactor()*f.length*c/h+u+u},this).reduce(function(f,d){return Math.max(f,d)},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 d=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,u),this.setTextColor(d)}h.length>0&&this.setTableHeaderRow(h),this.setFont(void 0,"normal"),t=!1}}(We.API);var BG={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},bG=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],_I=CG(bG),TG=[100,200,300,400,500,600,700,800,900],Dut=CG(TG);function wI(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=function(a){return BG[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 _I[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 P5(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 Qut={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},U5={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function D5(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function kut(r,e,t){for(var n=(t=t||{}).defaultFontFamily||"times",i=Object.assign({},Qut,t.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=wI(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 '"+D5(a)+"' and default family '"+n+"'.");if(o=function(A,l){if(l[A])return l[A];var u=_I[A],c=u<=_I.normal?-1:1,h=P5(l,bG,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=BG[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=Dut[A],c=P5(l,TG,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 '"+D5(a)+"'.");return o}function Q5(r){return r.trimLeft()}function Hut(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 Gut(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 n1,k5,H5,fT=["times"];(function(r){var e,t,n,i,a,o,s,A,l,u=function(M){return M=M||{},this.isStrokeTransparent=M.isStrokeTransparent||!1,this.strokeOpacity=M.strokeOpacity||1,this.strokeStyle=M.strokeStyle||"#000000",this.fillStyle=M.fillStyle||"#000000",this.isFillTransparent=M.isFillTransparent||!1,this.fillOpacity=M.fillOpacity||1,this.font=M.font||"10px sans-serif",this.textBaseline=M.textBaseline||"alphabetic",this.textAlign=M.textAlign||"left",this.lineWidth=M.lineWidth||1,this.lineJoin=M.lineJoin||"miter",this.lineCap=M.lineCap||"butt",this.path=M.path||[],this.transform=M.transform!==void 0?M.transform.clone():new A,this.globalCompositeOperation=M.globalCompositeOperation||"normal",this.globalAlpha=M.globalAlpha||1,this.clip_path=M.clip_path||[],this.currentPoint=M.currentPoint||new o,this.miterLimit=M.miterLimit||10,this.lastPoint=M.lastPoint||new o,this.lineDashOffset=M.lineDashOffset||0,this.lineDash=M.lineDash||[],this.margin=M.margin||[0,0,0,0],this.prevPageLastElemOffset=M.prevPageLastElemOffset||0,this.ignoreClearRect=typeof M.ignoreClearRect!="boolean"||M.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(M){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var W=M;Object.defineProperty(this,"pdf",{get:function(){return W}});var Y=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return Y},set:function(it){Y=Boolean(it)}});var H=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return H},set:function(it){H=Boolean(it)}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(it){isNaN(it)||(J=it)}});var ot=0;Object.defineProperty(this,"posY",{get:function(){return ot},set:function(it){isNaN(it)||(ot=it)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(it){var V;typeof it=="number"?V=[it,it,it,it]:((V=new Array(4))[0]=it[0],V[1]=it.length>=2?it[1]:V[0],V[2]=it.length>=3?it[2]:V[0],V[3]=it.length>=4?it[3]:V[1]),l.margin=V}});var ut=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ut},set:function(it){ut=it}});var X=0;Object.defineProperty(this,"lastBreak",{get:function(){return X},set:function(it){X=it}});var It=[];Object.defineProperty(this,"pageBreaks",{get:function(){return It},set:function(it){It=it}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(it){it instanceof u&&(l=it)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(it){l.path=it}});var at=[];Object.defineProperty(this,"ctxStack",{get:function(){return at},set:function(it){at=it}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(it){var V;V=h(it),this.ctx.fillStyle=V.style,this.ctx.isFillTransparent=V.a===0,this.ctx.fillOpacity=V.a,this.pdf.setFillColor(V.r,V.g,V.b,{a:V.a}),this.pdf.setTextColor(V.r,V.g,V.b,{a:V.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(it){var V=h(it);this.ctx.strokeStyle=V.style,this.ctx.isStrokeTransparent=V.a===0,this.ctx.strokeOpacity=V.a,V.a===0?this.pdf.setDrawColor(255,255,255):(V.a,this.pdf.setDrawColor(V.r,V.g,V.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(it){["butt","round","square"].indexOf(it)!==-1&&(this.ctx.lineCap=it,this.pdf.setLineCap(it))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(it){isNaN(it)||(this.ctx.lineWidth=it,this.pdf.setLineWidth(it))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(it){["bevel","round","miter"].indexOf(it)!==-1&&(this.ctx.lineJoin=it,this.pdf.setLineJoin(it))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(it){isNaN(it)||(this.ctx.miterLimit=it,this.pdf.setMiterLimit(it))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(it){this.ctx.textBaseline=it}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(it){["right","end","center","left","start"].indexOf(it)!==-1&&(this.ctx.textAlign=it)}});var j=null;function Z(it,V){if(j===null){var Ft=function(Mt){var Et=[];return Object.keys(Mt).forEach(function(Bt){Mt[Bt].forEach(function(Ct){var Rt=null;switch(Ct){case"bold":Rt={family:Bt,weight:"bold"};break;case"italic":Rt={family:Bt,style:"italic"};break;case"bolditalic":Rt={family:Bt,weight:"bold",style:"italic"};break;case"":case"normal":Rt={family:Bt}}Rt!==null&&(Rt.ref={name:Bt,style:Ct},Et.push(Rt))})}),Et}(it.getFontList());j=function(Mt){for(var Et={},Bt=0;Bt<Mt.length;++Bt){var Ct=wI(Mt[Bt]),Rt=Ct.family,Nt=Ct.stretch,Dt=Ct.style,Wt=Ct.weight;Et[Rt]=Et[Rt]||{},Et[Rt][Nt]=Et[Rt][Nt]||{},Et[Rt][Nt][Dt]=Et[Rt][Nt][Dt]||{},Et[Rt][Nt][Dt][Wt]=Ct}return Et}(Ft.concat(V))}return j}var ft=null;Object.defineProperty(this,"fontFaces",{get:function(){return ft},set:function(it){j=null,ft=it}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(it){var V;if(this.ctx.font=it,(V=/^\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(it))!==null){var Ft=V[1],Mt=(V[2],V[3]),Et=V[4],Bt=(V[5],V[6]),Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Et)[2];Et=Math.floor(Ct==="px"?parseFloat(Et)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(Et)*this.pdf.getFontSize():parseFloat(Et)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Et);var Rt=function(Jt){var fe,qt,nr=[],ke=Jt.trim();if(ke==="")return fT;if(ke in U5)return[U5[ke]];for(;ke!=="";){switch(qt=null,fe=(ke=Q5(ke)).charAt(0)){case'"':case"'":qt=Hut(ke.substring(1),fe);break;default:qt=Gut(ke)}if(qt===null||(nr.push(qt[0]),(ke=Q5(qt[1]))!==""&&ke.charAt(0)!==","))return fT;ke=ke.replace(/^,/,"")}return nr}(Bt);if(this.fontFaces){var Nt=kut(Z(this.pdf,this.fontFaces),Rt.map(function(Jt){return{family:Jt,stretch:"normal",weight:Mt,style:Ft}}));this.pdf.setFont(Nt.ref.name,Nt.ref.style)}else{var Dt="";(Mt==="bold"||parseInt(Mt,10)>=700||Ft==="bold")&&(Dt="bold"),Ft==="italic"&&(Dt+="italic"),Dt.length===0&&(Dt="normal");for(var Wt="",te={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<Rt.length;Ae++){if(this.pdf.internal.getFont(Rt[Ae],Dt,{noFallback:!0,disableWarning:!0})!==void 0){Wt=Rt[Ae];break}if(Dt==="bolditalic"&&this.pdf.internal.getFont(Rt[Ae],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Wt=Rt[Ae],Dt="bold";else if(this.pdf.internal.getFont(Rt[Ae],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Wt=Rt[Ae],Dt="normal";break}}if(Wt===""){for(var oe=0;oe<Rt.length;oe++)if(te[Rt[oe]]){Wt=te[Rt[oe]];break}}Wt=Wt===""?"Times":Wt,this.pdf.setFont(Wt,Dt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(it){this.ctx.globalCompositeOperation=it}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(it){this.ctx.globalAlpha=it}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(it){this.ctx.lineDashOffset=it,Tt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(it){this.ctx.lineDash=it,Tt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(it){this.ctx.ignoreClearRect=Boolean(it)}})};c.prototype.setLineDash=function(M){this.lineDash=M},c.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},c.prototype.fill=function(){C.call(this,"fill",!1)},c.prototype.stroke=function(){C.call(this,"stroke",!1)},c.prototype.beginPath=function(){this.path=[{type:"begin"}]},c.prototype.moveTo=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var Y=this.ctx.transform.applyToPoint(new o(M,W));this.path.push({type:"mt",x:Y.x,y:Y.y}),this.ctx.lastPoint=new o(M,W)},c.prototype.closePath=function(){var M=new o(0,0),W=0;for(W=this.path.length-1;W!==-1;W--)if(this.path[W].type==="begin"&&mn(this.path[W+1])==="object"&&typeof this.path[W+1].x=="number"){M=new o(this.path[W+1].x,this.path[W+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(M.x,M.y)},c.prototype.lineTo=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var Y=this.ctx.transform.applyToPoint(new o(M,W));this.path.push({type:"lt",x:Y.x,y:Y.y}),this.ctx.lastPoint=new o(Y.x,Y.y)},c.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),C.call(this,null,!0)},c.prototype.quadraticCurveTo=function(M,W,Y,H){if(isNaN(Y)||isNaN(H)||isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new o(Y,H)),ot=this.ctx.transform.applyToPoint(new o(M,W));this.path.push({type:"qct",x1:ot.x,y1:ot.y,x:J.x,y:J.y}),this.ctx.lastPoint=new o(J.x,J.y)},c.prototype.bezierCurveTo=function(M,W,Y,H,J,ot){if(isNaN(J)||isNaN(ot)||isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ut=this.ctx.transform.applyToPoint(new o(J,ot)),X=this.ctx.transform.applyToPoint(new o(M,W)),It=this.ctx.transform.applyToPoint(new o(Y,H));this.path.push({type:"bct",x1:X.x,y1:X.y,x2:It.x,y2:It.y,x:ut.x,y:ut.y}),this.ctx.lastPoint=new o(ut.x,ut.y)},c.prototype.arc=function(M,W,Y,H,J,ot){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H)||isNaN(J))throw Bn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ot=Boolean(ot),!this.ctx.transform.isIdentity){var ut=this.ctx.transform.applyToPoint(new o(M,W));M=ut.x,W=ut.y;var X=this.ctx.transform.applyToPoint(new o(0,Y)),It=this.ctx.transform.applyToPoint(new o(0,0));Y=Math.sqrt(Math.pow(X.x-It.x,2)+Math.pow(X.y-It.y,2))}Math.abs(J-H)>=2*Math.PI&&(H=0,J=2*Math.PI),this.path.push({type:"arc",x:M,y:W,radius:Y,startAngle:H,endAngle:J,counterclockwise:ot})},c.prototype.arcTo=function(M,W,Y,H,J){throw new Error("arcTo not implemented.")},c.prototype.rect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(M,W),this.lineTo(M+Y,W),this.lineTo(M+Y,W+H),this.lineTo(M,W+H),this.lineTo(M,W),this.lineTo(M+Y,W),this.lineTo(M,W)},c.prototype.fillRect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(M,W,Y,H),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},c.prototype.strokeRect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");d.call(this)||(this.beginPath(),this.rect(M,W,Y,H),this.stroke())},c.prototype.clearRect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(M,W,Y,H))},c.prototype.save=function(M){M=typeof M!="boolean"||M;for(var W=this.pdf.internal.getCurrentPageInfo().pageNumber,Y=0;Y<this.pdf.internal.getNumberOfPages();Y++)this.pdf.setPage(Y+1),this.pdf.internal.out("q");if(this.pdf.setPage(W),M){this.ctx.fontSize=this.pdf.internal.getFontSize();var H=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=H}},c.prototype.restore=function(M){M=typeof M!="boolean"||M;for(var W=this.pdf.internal.getCurrentPageInfo().pageNumber,Y=0;Y<this.pdf.internal.getNumberOfPages();Y++)this.pdf.setPage(Y+1),this.pdf.internal.out("Q");this.pdf.setPage(W),M&&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(M){var W,Y,H,J;if(M.isCanvasGradient===!0&&(M=M.getColor()),!M)return{r:0,g:0,b:0,a:0,style:M};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(M))W=0,Y=0,H=0,J=0;else{var ot=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(M);if(ot!==null)W=parseInt(ot[1]),Y=parseInt(ot[2]),H=parseInt(ot[3]),J=1;else if((ot=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(M))!==null)W=parseInt(ot[1]),Y=parseInt(ot[2]),H=parseInt(ot[3]),J=parseFloat(ot[4]);else{if(J=1,typeof M=="string"&&M.charAt(0)!=="#"){var ut=new vG(M);M=ut.ok?ut.toHex():"#000000"}M.length===4?(W=M.substring(1,2),W+=W,Y=M.substring(2,3),Y+=Y,H=M.substring(3,4),H+=H):(W=M.substring(1,3),Y=M.substring(3,5),H=M.substring(5,7)),W=parseInt(W,16),Y=parseInt(Y,16),H=parseInt(H,16)}}return{r:W,g:Y,b:H,a:J,style:M}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},d=function(){return Boolean(this.ctx.isStrokeTransparent||this.globalAlpha==0)};c.prototype.fillText=function(M,W,Y,H){if(isNaN(W)||isNaN(Y)||typeof M!="string")throw Bn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(H=isNaN(H)?void 0:H,!f.call(this)){var J=nt(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;S.call(this,{text:M,x:W,y:Y,scale:ot,angle:J,align:this.textAlign,maxWidth:H})}},c.prototype.strokeText=function(M,W,Y,H){if(isNaN(W)||isNaN(Y)||typeof M!="string")throw Bn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!d.call(this)){H=isNaN(H)?void 0:H;var J=nt(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;S.call(this,{text:M,x:W,y:Y,scale:ot,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:H})}},c.prototype.measureText=function(M){if(typeof M!="string")throw Bn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var W=this.pdf,Y=this.pdf.internal.scaleFactor,H=W.internal.getFontSize(),J=W.getStringUnitWidth(M)*H/W.internal.scaleFactor,ot=function(ut){var X=(ut=ut||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return X}}),this};return new ot({width:J*=Math.round(96*Y/72*1e4)/1e4})},c.prototype.scale=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var Y=new A(M,0,0,W,0,0);this.ctx.transform=this.ctx.transform.multiply(Y)},c.prototype.rotate=function(M){if(isNaN(M))throw Bn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var W=new A(Math.cos(M),Math.sin(M),-Math.sin(M),Math.cos(M),0,0);this.ctx.transform=this.ctx.transform.multiply(W)},c.prototype.translate=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var Y=new A(1,0,0,1,M,W);this.ctx.transform=this.ctx.transform.multiply(Y)},c.prototype.transform=function(M,W,Y,H,J,ot){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H)||isNaN(J)||isNaN(ot))throw Bn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ut=new A(M,W,Y,H,J,ot);this.ctx.transform=this.ctx.transform.multiply(ut)},c.prototype.setTransform=function(M,W,Y,H,J,ot){M=isNaN(M)?1:M,W=isNaN(W)?0:W,Y=isNaN(Y)?0:Y,H=isNaN(H)?1:H,J=isNaN(J)?0:J,ot=isNaN(ot)?0:ot,this.ctx.transform=new A(M,W,Y,H,J,ot)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};c.prototype.drawImage=function(M,W,Y,H,J,ot,ut,X,It){var at=this.pdf.getImageProperties(M),j=1,Z=1,ft=1,it=1;H!==void 0&&X!==void 0&&(ft=X/H,it=It/J,j=at.width/H*X/H,Z=at.height/J*It/J),ot===void 0&&(ot=W,ut=Y,W=0,Y=0),H!==void 0&&X===void 0&&(X=H,It=J),H===void 0&&X===void 0&&(X=at.width,It=at.height);for(var V,Ft=this.ctx.transform.decompose(),Mt=nt(Ft.rotate.shx),Et=new A,Bt=(Et=(Et=(Et=Et.multiply(Ft.translate)).multiply(Ft.skew)).multiply(Ft.scale)).applyToRectangle(new s(ot-W*ft,ut-Y*it,H*j,J*Z)),Ct=m.call(this,Bt),Rt=[],Nt=0;Nt<Ct.length;Nt+=1)Rt.indexOf(Ct[Nt])===-1&&Rt.push(Ct[Nt]);if(w(Rt),this.autoPaging)for(var Dt=Rt[0],Wt=Rt[Rt.length-1],te=Dt;te<Wt+1;te++){this.pdf.setPage(te);var Ae=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],oe=te===1?this.posY+this.margin[0]:this.margin[0],Jt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],fe=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],qt=te===1?0:Jt+(te-2)*fe;if(this.ctx.clip_path.length!==0){var nr=this.path;V=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(V,this.posX+this.margin[3],-qt+oe+this.ctx.prevPageLastElemOffset),O.call(this,"fill",!0),this.path=nr}var ke=JSON.parse(JSON.stringify(Bt));ke=y([ke],this.posX+this.margin[3],-qt+oe+this.ctx.prevPageLastElemOffset)[0];var wr=(te>Dt||te<Wt)&&g.call(this);wr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ae,fe,null).clip().discardPath()),this.pdf.addImage(M,"JPEG",ke.x,ke.y,ke.w,ke.h,null,null,Mt),wr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(M,"JPEG",Bt.x,Bt.y,Bt.w,Bt.h,null,null,Mt)};var m=function(M,W,Y){var H=[];W=W||this.pdf.internal.pageSize.width,Y=Y||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(M.type){default:case"mt":case"lt":H.push(Math.floor((M.y+J)/Y)+1);break;case"arc":H.push(Math.floor((M.y+J-M.radius)/Y)+1),H.push(Math.floor((M.y+J+M.radius)/Y)+1);break;case"qct":var ot=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x,M.y);H.push(Math.floor((ot.y+J)/Y)+1),H.push(Math.floor((ot.y+ot.h+J)/Y)+1);break;case"bct":var ut=ct(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x2,M.y2,M.x,M.y);H.push(Math.floor((ut.y+J)/Y)+1),H.push(Math.floor((ut.y+ut.h+J)/Y)+1);break;case"rect":H.push(Math.floor((M.y+J)/Y)+1),H.push(Math.floor((M.y+M.h+J)/Y)+1)}for(var X=0;X<H.length;X+=1)for(;this.pdf.internal.getNumberOfPages()<H[X];)v.call(this);return H},v=function(){var M=this.fillStyle,W=this.strokeStyle,Y=this.font,H=this.lineCap,J=this.lineWidth,ot=this.lineJoin;this.pdf.addPage(),this.fillStyle=M,this.strokeStyle=W,this.font=Y,this.lineCap=H,this.lineWidth=J,this.lineJoin=ot},y=function(M,W,Y){for(var H=0;H<M.length;H++)switch(M[H].type){case"bct":M[H].x2+=W,M[H].y2+=Y;case"qct":M[H].x1+=W,M[H].y1+=Y;case"mt":case"lt":case"arc":default:M[H].x+=W,M[H].y+=Y}return M},w=function(M){return M.sort(function(W,Y){return W-Y})},C=function(M,W){for(var Y,H,J=this.fillStyle,ot=this.strokeStyle,ut=this.lineCap,X=this.lineWidth,It=Math.abs(X*this.ctx.transform.scaleX),at=this.lineJoin,j=JSON.parse(JSON.stringify(this.path)),Z=JSON.parse(JSON.stringify(this.path)),ft=[],it=0;it<Z.length;it++)if(Z[it].x!==void 0)for(var V=m.call(this,Z[it]),Ft=0;Ft<V.length;Ft+=1)ft.indexOf(V[Ft])===-1&&ft.push(V[Ft]);for(var Mt=0;Mt<ft.length;Mt++)for(;this.pdf.internal.getNumberOfPages()<ft[Mt];)v.call(this);if(w(ft),this.autoPaging)for(var Et=ft[0],Bt=ft[ft.length-1],Ct=Et;Ct<Bt+1;Ct++){this.pdf.setPage(Ct),this.fillStyle=J,this.strokeStyle=ot,this.lineCap=ut,this.lineWidth=It,this.lineJoin=at;var Rt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Nt=Ct===1?this.posY+this.margin[0]:this.margin[0],Dt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Wt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],te=Ct===1?0:Dt+(Ct-2)*Wt;if(this.ctx.clip_path.length!==0){var Ae=this.path;Y=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(Y,this.posX+this.margin[3],-te+Nt+this.ctx.prevPageLastElemOffset),O.call(this,M,!0),this.path=Ae}if(H=JSON.parse(JSON.stringify(j)),this.path=y(H,this.posX+this.margin[3],-te+Nt+this.ctx.prevPageLastElemOffset),W===!1||Ct===0){var oe=(Ct>Et||Ct<Bt)&&g.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Rt,Wt,null).clip().discardPath()),O.call(this,M,W),oe&&this.pdf.restoreGraphicsState()}this.lineWidth=X}else this.lineWidth=It,O.call(this,M,W),this.lineWidth=X;this.path=j},O=function(M,W){if((M!=="stroke"||W||!d.call(this))&&(M==="stroke"||W||!f.call(this))){for(var Y,H,J=[],ot=this.path,ut=0;ut<ot.length;ut++){var X=ot[ut];switch(X.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:X,deltas:[],abs:[]});break;case"lt":var It=J.length;if(ot[ut-1]&&!isNaN(ot[ut-1].x)&&(Y=[X.x-ot[ut-1].x,X.y-ot[ut-1].y],It>0)){for(;It>=0;It--)if(J[It-1].close!==!0&&J[It-1].begin!==!0){J[It-1].deltas.push(Y),J[It-1].abs.push(X);break}}break;case"bct":Y=[X.x1-ot[ut-1].x,X.y1-ot[ut-1].y,X.x2-ot[ut-1].x,X.y2-ot[ut-1].y,X.x-ot[ut-1].x,X.y-ot[ut-1].y],J[J.length-1].deltas.push(Y);break;case"qct":var at=ot[ut-1].x+2/3*(X.x1-ot[ut-1].x),j=ot[ut-1].y+2/3*(X.y1-ot[ut-1].y),Z=X.x+2/3*(X.x1-X.x),ft=X.y+2/3*(X.y1-X.y),it=X.x,V=X.y;Y=[at-ot[ut-1].x,j-ot[ut-1].y,Z-ot[ut-1].x,ft-ot[ut-1].y,it-ot[ut-1].x,V-ot[ut-1].y],J[J.length-1].deltas.push(Y);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(X)}}H=W?null:M==="stroke"?"stroke":"fill";for(var Ft=!1,Mt=0;Mt<J.length;Mt++)if(J[Mt].arc)for(var Et=J[Mt].abs,Bt=0;Bt<Et.length;Bt++){var Ct=Et[Bt];Ct.type==="arc"?T.call(this,Ct.x,Ct.y,Ct.radius,Ct.startAngle,Ct.endAngle,Ct.counterclockwise,void 0,W,!Ft):P.call(this,Ct.x,Ct.y),Ft=!0}else if(J[Mt].close===!0)this.pdf.internal.out("h"),Ft=!1;else if(J[Mt].begin!==!0){var Rt=J[Mt].start.x,Nt=J[Mt].start.y;U.call(this,J[Mt].deltas,Rt,Nt),Ft=!0}H&&L.call(this,H),W&&N.call(this)}},F=function(M){var W=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,Y=W*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return M-Y;case"top":return M+W-Y;case"hanging":return M+W-2*Y;case"middle":return M+W/2-Y;case"ideographic":return M;case"alphabetic":default:return M}},I=function(M){return M+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};c.prototype.createLinearGradient=function(){var M=function(){};return M.colorStops=[],M.addColorStop=function(W,Y){this.colorStops.push([W,Y])},M.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},M.isCanvasGradient=!0,M},c.prototype.createPattern=function(){return this.createLinearGradient()},c.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(M,W,Y,H,J,ot,ut,X,It){for(var at=q.call(this,Y,H,J,ot),j=0;j<at.length;j++){var Z=at[j];j===0&&(It?x.call(this,Z.x1+M,Z.y1+W):P.call(this,Z.x1+M,Z.y1+W)),tt.call(this,M,W,Z.x2,Z.y2,Z.x3,Z.y3,Z.x4,Z.y4)}X?N.call(this):L.call(this,ut)},L=function(M){switch(M){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},N=function(){this.pdf.clip(),this.pdf.discardPath()},x=function(M,W){this.pdf.internal.out(t(M)+" "+n(W)+" m")},S=function(M){var W;switch(M.align){case"right":case"end":W="right";break;case"center":W="center";break;case"left":case"start":default:W="left"}var Y=this.pdf.getTextDimensions(M.text),H=F.call(this,M.y),J=I.call(this,H)-Y.h,ot=this.ctx.transform.applyToPoint(new o(M.x,H)),ut=this.ctx.transform.decompose(),X=new A;X=(X=(X=X.multiply(ut.translate)).multiply(ut.skew)).multiply(ut.scale);for(var It,at,j,Z=this.ctx.transform.applyToRectangle(new s(M.x,H,Y.w,Y.h)),ft=X.applyToRectangle(new s(M.x,J,Y.w,Y.h)),it=m.call(this,ft),V=[],Ft=0;Ft<it.length;Ft+=1)V.indexOf(it[Ft])===-1&&V.push(it[Ft]);if(w(V),this.autoPaging)for(var Mt=V[0],Et=V[V.length-1],Bt=Mt;Bt<Et+1;Bt++){this.pdf.setPage(Bt);var Ct=Bt===1?this.posY+this.margin[0]:this.margin[0],Rt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Nt=this.pdf.internal.pageSize.height-this.margin[2],Dt=Nt-this.margin[0],Wt=this.pdf.internal.pageSize.width-this.margin[1],te=Wt-this.margin[3],Ae=Bt===1?0:Rt+(Bt-2)*Dt;if(this.ctx.clip_path.length!==0){var oe=this.path;It=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(It,this.posX+this.margin[3],-1*Ae+Ct),O.call(this,"fill",!0),this.path=oe}var Jt=y([JSON.parse(JSON.stringify(ft))],this.posX+this.margin[3],-Ae+Ct+this.ctx.prevPageLastElemOffset)[0];M.scale>=.01&&(at=this.pdf.internal.getFontSize(),this.pdf.setFontSize(at*M.scale),j=this.lineWidth,this.lineWidth=j*M.scale);var fe=this.autoPaging!=="text";if(fe||Jt.y+Jt.h<=Nt){if(fe||Jt.y>=Ct&&Jt.x<=Wt){var qt=fe?M.text:this.pdf.splitTextToSize(M.text,M.maxWidth||Wt-Jt.x)[0],nr=y([JSON.parse(JSON.stringify(Z))],this.posX+this.margin[3],-Ae+Ct+this.ctx.prevPageLastElemOffset)[0],ke=fe&&(Bt>Mt||Bt<Et)&&g.call(this);ke&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],te,Dt,null).clip().discardPath()),this.pdf.text(qt,nr.x,nr.y,{angle:M.angle,align:W,renderingMode:M.renderingMode}),ke&&this.pdf.restoreGraphicsState()}}else Jt.y<Nt&&(this.ctx.prevPageLastElemOffset+=Nt-Jt.y);M.scale>=.01&&(this.pdf.setFontSize(at),this.lineWidth=j)}else M.scale>=.01&&(at=this.pdf.internal.getFontSize(),this.pdf.setFontSize(at*M.scale),j=this.lineWidth,this.lineWidth=j*M.scale),this.pdf.text(M.text,ot.x+this.posX,ot.y+this.posY,{angle:M.angle,align:W,renderingMode:M.renderingMode,maxWidth:M.maxWidth}),M.scale>=.01&&(this.pdf.setFontSize(at),this.lineWidth=j)},P=function(M,W,Y,H){Y=Y||0,H=H||0,this.pdf.internal.out(t(M+Y)+" "+n(W+H)+" l")},U=function(M,W,Y){return this.pdf.lines(M,W,Y,null,null)},tt=function(M,W,Y,H,J,ot,ut,X){this.pdf.internal.out([e(i(Y+M)),e(a(H+W)),e(i(J+M)),e(a(ot+W)),e(i(ut+M)),e(a(X+W)),"c"].join(" "))},q=function(M,W,Y,H){for(var J=2*Math.PI,ot=Math.PI/2;W>Y;)W-=J;var ut=Math.abs(Y-W);ut<J&&H&&(ut=J-ut);for(var X=[],It=H?-1:1,at=W;ut>1e-5;){var j=at+It*Math.min(ut,ot);X.push(rt.call(this,M,at,j)),ut-=Math.abs(j-at),at=j}return X},rt=function(M,W,Y){var H=(Y-W)/2,J=M*Math.cos(H),ot=M*Math.sin(H),ut=J,X=-ot,It=ut*ut+X*X,at=It+ut*J+X*ot,j=4/3*(Math.sqrt(2*It*at)-at)/(ut*ot-X*J),Z=ut-j*X,ft=X+j*ut,it=Z,V=-ft,Ft=H+W,Mt=Math.cos(Ft),Et=Math.sin(Ft);return{x1:M*Math.cos(W),y1:M*Math.sin(W),x2:Z*Mt-ft*Et,y2:Z*Et+ft*Mt,x3:it*Mt-V*Et,y3:it*Et+V*Mt,x4:M*Math.cos(Y),y4:M*Math.sin(Y)}},nt=function(M){return 180*M/Math.PI},At=function(M,W,Y,H,J,ot){var ut=M+.5*(Y-M),X=W+.5*(H-W),It=J+.5*(Y-J),at=ot+.5*(H-ot),j=Math.min(M,J,ut,It),Z=Math.max(M,J,ut,It),ft=Math.min(W,ot,X,at),it=Math.max(W,ot,X,at);return new s(j,ft,Z-j,it-ft)},ct=function(M,W,Y,H,J,ot,ut,X){var It,at,j,Z,ft,it,V,Ft,Mt,Et,Bt,Ct,Rt,Nt,Dt=Y-M,Wt=H-W,te=J-Y,Ae=ot-H,oe=ut-J,Jt=X-ot;for(at=0;at<41;at++)Mt=(V=(j=M+(It=at/40)*Dt)+It*((ft=Y+It*te)-j))+It*(ft+It*(J+It*oe-ft)-V),Et=(Ft=(Z=W+It*Wt)+It*((it=H+It*Ae)-Z))+It*(it+It*(ot+It*Jt-it)-Ft),at==0?(Bt=Mt,Ct=Et,Rt=Mt,Nt=Et):(Bt=Math.min(Bt,Mt),Ct=Math.min(Ct,Et),Rt=Math.max(Rt,Mt),Nt=Math.max(Nt,Et));return new s(Math.round(Bt),Math.round(Ct),Math.round(Rt-Bt),Math.round(Nt-Ct))},Tt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var M,W,Y=(M=this.ctx.lineDash,W=this.ctx.lineDashOffset,JSON.stringify({lineDash:M,lineDashOffset:W}));this.prevLineDash!==Y&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=Y)}}})(We.API),function(r){var e=function(a){var o,s,A,l,u,c,h,f,d,g;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-(g=u%85))/85)-(d=u%85))/85)-(f=u%85))/85)-(h=u%85))/85)%85,s.push(c+33,h+33,f+33,d+33,g+33)):s.push(122);return function(m,v){for(var y=v;y>0;y--)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,d="charCodeAt",g="slice",m="replace";for(a[g](-2),a=a[g](0,-2)[m](/\s/g,"")[m]("z","!!!!!"),A=[],l=0,u=(a+=o="uuuuu"[g](a[h]%5||5))[h];u>l;l+=5)s=52200625*(a[d](l)-33)+614125*(a[d](l+1)-33)+7225*(a[d](l+2)-33)+85*(a[d](l+3)-33)+(a[d](l+4)-33),A.push(f&s>>24,f&s>>16,f&s>>8,f&s);return function(v,y){for(var w=y;w>0;w--)v.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=pI(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(" ")}}}(We.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(d){var g=d.length,m=[],v=String.fromCharCode;for(h=0;h<g;h+=1)m.push(v(255&d.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}(We.API),function(r){function e(){return(Xe.html2canvas?Promise.resolve(Xe.html2canvas):Promise.resolve().then(function(){return uCt})).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(Xe.DOMPurify?Promise.resolve(Xe.DOMPurify):Promise.resolve().then(function(){return RCt})).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=mn(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],d=f.src.find(function(g){return g.format==="truetype"});d&&A.addFont(d.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||We.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,We.getPageSize=function(o,s,A){if(mn(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,d=0,g=0;if(h.hasOwnProperty(c))d=h[c][1]/u,g=h[c][0]/u;else try{d=A[1],g=A[0]}catch{throw new Error("Invalid format: "+A)}if(o==="p"||o==="portrait")o="p",g>d&&(f=g,g=d,d=f);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",d>g&&(f=g,g=d,d=f)}return{width:g,height:d,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(wI):null;var A=new a(s);return s.worker?A:A.from(o).doCallback()}}(We.API),We.API.addJS=function(r){return H5=r,this.internal.events.subscribe("postPutResources",function(){n1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(n1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),k5=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+H5+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){n1!==void 0&&k5!==void 0&&this.internal.out("/Names <</JavaScript "+n1+" 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}}])}(We.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),d=c.length,g={width:0,height:0,numcomponents:1},m=4;m<d;m+=2){if(m+=f,e.indexOf(c.charCodeAt(m+1))!==-1){h=256*c.charCodeAt(m+5)+c.charCodeAt(m+6),g={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 g}(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}}(We.API);var mp,i1,G5,$5,V5,$ut=function(){var r,e,t;function n(a){var o,s,A,l,u,c,h,f,d,g,m,v,y,w;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},c=null;;){switch(o=this.readUInt32(),d=function(){var C,O;for(O=[],C=0;C<4;++C)O.push(String.fromCharCode(this.data[this.pos++]));return O}.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(d==="fdAT"&&(this.pos+=4,o-=4),a=(c!=null?c.data:void 0)||this.imgData,v=0;0<=o?v<o:v>o;0<=o?++v:--v)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((g=A-this.transparency.indexed.length)>0)for(y=0;0<=g?y<g:y>g;0<=g?++y:--y)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=(w=this.colorType)===4||w===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,d){var g,m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct=Math.ceil((l.width-c)/f),Tt=Math.ceil((l.height-h)/d),M=l.width==ct&&l.height==Tt;for(S=o*ct,N=M?s:new Uint8Array(S*Tt),C=a.length,x=0,m=0;x<Tt&&A<C;){switch(a[A++]){case 0:for(y=tt=0;tt<S;y=tt+=1)N[m++]=a[A++];break;case 1:for(y=q=0;q<S;y=q+=1)g=a[A++],w=y<o?0:N[m-o],N[m++]=(g+w)%256;break;case 2:for(y=rt=0;rt<S;y=rt+=1)g=a[A++],v=(y-y%o)/o,P=x&&N[(x-1)*S+v*o+y%o],N[m++]=(P+g)%256;break;case 3:for(y=nt=0;nt<S;y=nt+=1)g=a[A++],v=(y-y%o)/o,w=y<o?0:N[m-o],P=x&&N[(x-1)*S+v*o+y%o],N[m++]=(g+Math.floor((w+P)/2))%256;break;case 4:for(y=At=0;At<S;y=At+=1)g=a[A++],v=(y-y%o)/o,w=y<o?0:N[m-o],x===0?P=U=0:(P=N[(x-1)*S+v*o+y%o],U=v&&N[(x-1)*S+(v-1)*o+y%o]),O=w+P-U,F=Math.abs(O-w),T=Math.abs(O-P),L=Math.abs(O-U),I=F<=T&&F<=L?w:T<=L?P:U,N[m++]=(g+I)%256;break;default:throw new Error("Invalid filter algorithm: "+a[A-1])}if(!M){var W=((h+x*d)*l.width+c)*o,Y=x*S;for(y=0;y<ct;y+=1){for(var H=0;H<o;H+=1)s[W++]=N[Y++];W+=(f-1)*o}}x++}}return a=Cut(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,d,g,m,v;if(A=this.colors,g=null,s=this.hasAlphaChannel,this.palette.length&&(g=(v=this._decodedPalette)!=null?v:this._decodedPalette=this.decodePalette(),A=4,s=!0),d=(l=a.data||a).length,c=g||o,u=h=0,A===1)for(;u<d;)f=g?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<d;)f=g?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(Xe)==="[object Window]"){try{e=Xe.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,d;if(f=s++%l,d=A[f],h.renderFrame(a,f),l>1&&s/l<u)return h.animation._timeout=setTimeout(o,d.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 Vut(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,d=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,d=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((x=r[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var g=r[e++];c=r[e++]|r[e++]<<8,h=r[e++],!(1&g)&&(h=null),f=g>>2&7,e++;break;case 254:for(;;){if(!((x=r[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}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,v=r[e++]|r[e++]<<8,y=r[e++]|r[e++]<<8,w=r[e++]|r[e++]<<8,C=r[e++],O=C>>6&1,F=1<<(7&C)+1,I=s,T=A,L=!1;C>>7&&(L=!0,I=e,T=F,e+=3*F);var N=e;for(e++;;){var x;if(!((x=r[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}u.push({x:m,y:v,width:y,height:w,has_local_palette:L,palette_offset:I,palette_size:T,data_offset:N,data_length:e-N,transparent_index:h,interlaced:!!O,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 d},this.frameInfo=function(S){if(S<0||S>=u.length)throw new Error("Frame index out of range.");return u[S]},this.decodeAndBlitFrameBGRA=function(S,P){var U=this.frameInfo(S),tt=U.width*U.height,q=new Uint8Array(tt);j5(r,U.data_offset,q,tt);var rt=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var At=U.width,ct=t-At,Tt=At,M=4*(U.y*t+U.x),W=4*((U.y+U.height)*t+U.x),Y=M,H=4*ct;U.interlaced===!0&&(H+=4*t*7);for(var J=8,ot=0,ut=q.length;ot<ut;++ot){var X=q[ot];if(Tt===0&&(Tt=At,(Y+=H)>=W&&(H=4*ct+4*t*(J-1),Y=M+(At+ct)*(J<<1),J>>=1)),X===nt)Y+=4;else{var It=r[rt+3*X],at=r[rt+3*X+1],j=r[rt+3*X+2];P[Y++]=j,P[Y++]=at,P[Y++]=It,P[Y++]=255}--Tt}},this.decodeAndBlitFrameRGBA=function(S,P){var U=this.frameInfo(S),tt=U.width*U.height,q=new Uint8Array(tt);j5(r,U.data_offset,q,tt);var rt=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var At=U.width,ct=t-At,Tt=At,M=4*(U.y*t+U.x),W=4*((U.y+U.height)*t+U.x),Y=M,H=4*ct;U.interlaced===!0&&(H+=4*t*7);for(var J=8,ot=0,ut=q.length;ot<ut;++ot){var X=q[ot];if(Tt===0&&(Tt=At,(Y+=H)>=W&&(H=4*ct+4*t*(J-1),Y=M+(At+ct)*(J<<1),J>>=1)),X===nt)Y+=4;else{var It=r[rt+3*X],at=r[rt+3*X+1],j=r[rt+3*X+2];P[Y++]=It,P[Y++]=at,P[Y++]=j,P[Y++]=255}--Tt}}}function j5(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++],d=new Int32Array(4096),g=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 v=m<s?m:g,y=0,w=v;w>a;)w=d[w]>>8,++y;var C=w;if(h+y+(v!==m?1:0)>n)return void Bn.log("Warning, gif stream longer than expected.");t[h++]=C;var O=h+=y;for(v!==m&&(t[h++]=C),w=v;y--;)w=d[w],t[--O]=255&w,w>>=8;g!==null&&s<4096&&(d[s++]=g<<8|C,s>=l+1&&A<12&&(++A,l=l<<1|1)),g=m}else s=o+1,l=(1<<(A=i+1))-1,g=null}return h!==n&&Bn.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 dT(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),d=new Array(64),g=[],m=0,v=7,y=new Array(64),w=new Array(64),C=new Array(64),O=new Array(256),F=new Array(2048),I=[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],L=[0,1,2,3,4,5,6,7,8,9,10,11],N=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],x=[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],S=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],tt=[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 q(M,W){for(var Y=0,H=0,J=new Array,ot=1;ot<=16;ot++){for(var ut=1;ut<=M[ot];ut++)J[W[H]]=[],J[W[H]][0]=Y,J[W[H]][1]=ot,H++,Y++;Y*=2}return J}function rt(M){for(var W=M[0],Y=M[1]-1;Y>=0;)W&1<<Y&&(m|=1<<v),Y--,--v<0&&(m==255?(nt(255),nt(0)):nt(m),v=7,m=0)}function nt(M){g.push(M)}function At(M){nt(M>>8&255),nt(255&M)}function ct(M,W,Y,H,J){for(var ot,ut=J[0],X=J[240],It=function(Et,Bt){var Ct,Rt,Nt,Dt,Wt,te,Ae,oe,Jt,fe,qt=0;for(Jt=0;Jt<8;++Jt){Ct=Et[qt],Rt=Et[qt+1],Nt=Et[qt+2],Dt=Et[qt+3],Wt=Et[qt+4],te=Et[qt+5],Ae=Et[qt+6];var nr=Ct+(oe=Et[qt+7]),ke=Ct-oe,wr=Rt+Ae,Ne=Rt-Ae,Pe=Nt+te,Gr=Nt-te,se=Dt+Wt,fi=Dt-Wt,gr=nr+se,ei=nr-se,Wr=wr+Pe,zr=wr-Pe;Et[qt]=gr+Wr,Et[qt+4]=gr-Wr;var He=.707106781*(zr+ei);Et[qt+2]=ei+He,Et[qt+6]=ei-He;var Ir=.382683433*((gr=fi+Gr)-(zr=Ne+ke)),$n=.5411961*gr+Ir,yn=1.306562965*zr+Ir,di=.707106781*(Wr=Gr+Ne),pi=ke+di,Ue=ke-di;Et[qt+5]=Ue+$n,Et[qt+3]=Ue-$n,Et[qt+1]=pi+yn,Et[qt+7]=pi-yn,qt+=8}for(qt=0,Jt=0;Jt<8;++Jt){Ct=Et[qt],Rt=Et[qt+8],Nt=Et[qt+16],Dt=Et[qt+24],Wt=Et[qt+32],te=Et[qt+40],Ae=Et[qt+48];var ri=Ct+(oe=Et[qt+56]),Cn=Ct-oe,gi=Rt+Ae,cn=Rt-Ae,Br=Nt+te,_n=Nt-te,eo=Dt+Wt,de=Dt-Wt,_t=ri+eo,$t=ri-eo,ne=gi+Br,Je=gi-Br;Et[qt]=_t+ne,Et[qt+32]=_t-ne;var Lr=.707106781*(Je+$t);Et[qt+16]=$t+Lr,Et[qt+48]=$t-Lr;var hn=.382683433*((_t=de+_n)-(Je=cn+Cn)),fn=.5411961*_t+hn,Xo=1.306562965*Je+hn,vi=.707106781*(ne=_n+cn),Ws=Cn+vi,OA=Cn-vi;Et[qt+40]=OA+fn,Et[qt+24]=OA-fn,Et[qt+8]=Ws+Xo,Et[qt+56]=Ws-Xo,qt++}for(Jt=0;Jt<64;++Jt)fe=Et[Jt]*Bt[Jt],f[Jt]=fe>0?fe+.5|0:fe-.5|0;return f}(M,W),at=0;at<64;++at)d[I[at]]=It[at];var j=d[0]-Y;Y=d[0],j==0?rt(H[0]):(rt(H[h[ot=32767+j]]),rt(c[ot]));for(var Z=63;Z>0&&d[Z]==0;)Z--;if(Z==0)return rt(ut),Y;for(var ft,it=1;it<=Z;){for(var V=it;d[it]==0&&it<=Z;)++it;var Ft=it-V;if(Ft>=16){ft=Ft>>4;for(var Mt=1;Mt<=ft;++Mt)rt(X);Ft&=15}ot=32767+d[it],rt(J[(Ft<<4)+h[ot]]),rt(c[ot]),it++}return Z!=63&&rt(ut),Y}function Tt(M){M=Math.min(Math.max(M,1),100),a!=M&&(function(W){for(var Y=[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],H=0;H<64;H++){var J=o((Y[H]*W+50)/100);J=Math.min(Math.max(J,1),255),s[I[H]]=J}for(var ot=[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],ut=0;ut<64;ut++){var X=o((ot[ut]*W+50)/100);X=Math.min(Math.max(X,1),255),A[I[ut]]=X}for(var It=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],at=0,j=0;j<8;j++)for(var Z=0;Z<8;Z++)l[at]=1/(s[I[at]]*It[j]*It[Z]*8),u[at]=1/(A[I[at]]*It[j]*It[Z]*8),at++}(M<50?Math.floor(5e3/M):Math.floor(200-2*M)),a=M)}this.encode=function(M,W){W&&Tt(W),g=new Array,m=0,v=7,At(65496),At(65504),At(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),At(1),At(1),nt(0),nt(0),function(){At(65499),At(132),nt(0);for(var Rt=0;Rt<64;Rt++)nt(s[Rt]);nt(1);for(var Nt=0;Nt<64;Nt++)nt(A[Nt])}(),function(Rt,Nt){At(65472),At(17),nt(8),At(Nt),At(Rt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)}(M.width,M.height),function(){At(65476),At(418),nt(0);for(var Rt=0;Rt<16;Rt++)nt(T[Rt+1]);for(var Nt=0;Nt<=11;Nt++)nt(L[Nt]);nt(16);for(var Dt=0;Dt<16;Dt++)nt(N[Dt+1]);for(var Wt=0;Wt<=161;Wt++)nt(x[Wt]);nt(1);for(var te=0;te<16;te++)nt(S[te+1]);for(var Ae=0;Ae<=11;Ae++)nt(P[Ae]);nt(17);for(var oe=0;oe<16;oe++)nt(U[oe+1]);for(var Jt=0;Jt<=161;Jt++)nt(tt[Jt])}(),At(65498),At(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var Y=0,H=0,J=0;m=0,v=7,this.encode.displayName="_encode_";for(var ot,ut,X,It,at,j,Z,ft,it,V=M.data,Ft=M.width,Mt=M.height,Et=4*Ft,Bt=0;Bt<Mt;){for(ot=0;ot<Et;){for(at=Et*Bt+ot,Z=-1,ft=0,it=0;it<64;it++)j=at+(ft=it>>3)*Et+(Z=4*(7&it)),Bt+ft>=Mt&&(j-=Et*(Bt+1+ft-Mt)),ot+Z>=Et&&(j-=ot+Z-Et+4),ut=V[j++],X=V[j++],It=V[j++],y[it]=(F[ut]+F[X+256>>0]+F[It+512>>0]>>16)-128,w[it]=(F[ut+768>>0]+F[X+1024>>0]+F[It+1280>>0]>>16)-128,C[it]=(F[ut+1280>>0]+F[X+1536>>0]+F[It+1792>>0]>>16)-128;Y=ct(y,l,Y,e,n),H=ct(w,u,H,t,i),J=ct(C,u,J,t,i),ot+=32}Bt+=8}if(v>=0){var Ct=[];Ct[1]=v+1,Ct[0]=(1<<v+1)-1,rt(Ct)}return At(65497),new Uint8Array(g)},r=r||50,function(){for(var M=String.fromCharCode,W=0;W<256;W++)O[W]=M(W)}(),e=q(T,L),t=q(S,P),n=q(N,x),i=q(U,tt),function(){for(var M=1,W=2,Y=1;Y<=15;Y++){for(var H=M;H<W;H++)h[32767+H]=Y,c[32767+H]=[],c[32767+H][1]=Y,c[32767+H][0]=H;for(var J=-(W-1);J<=-M;J++)h[32767+J]=Y,c[32767+J]=[],c[32767+J][1]=Y,c[32767+J][0]=W-1+J;M<<=1,W<<=1}}(),function(){for(var M=0;M<256;M++)F[M]=19595*M,F[M+256>>0]=38470*M,F[M+512>>0]=7471*M+32768,F[M+768>>0]=-11059*M,F[M+1024>>0]=-21709*M,F[M+1280>>0]=32768*M+8421375,F[M+1536>>0]=-27439*M,F[M+1792>>0]=-5329*M}(),Tt(r)}/**
|
||
* @license
|
||
* Copyright (c) 2017 Aras Abbasi
|
||
*
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
*/function oA(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 K5(r){function e(T){if(!T)throw Error("assert :P")}function t(T,L,N){for(var x=0;4>x;x++)if(T[L+x]!=N.charCodeAt(x))return!0;return!1}function n(T,L,N,x,S){for(var P=0;P<S;P++)T[L+P]=N[x+P]}function i(T,L,N,x){for(var S=0;S<x;S++)T[L+S]=N}function a(T){return new Int32Array(T)}function o(T,L){for(var N=[],x=0;x<T;x++)N.push(new L);return N}function s(T,L){var N=[];return function x(S,P,U){for(var tt=U[P],q=0;q<tt&&(S.push(U.length>P+1?[]:new L),!(U.length<P+1));q++)x(S[q],P+1,U)}(N,0,T),N}var A=function(){var T=this;function L(p,_){for(var b=1<<_-1>>>0;p&b;)b>>>=1;return b?(p&b-1)+b:p}function N(p,_,b,R,Q){e(!(R%b));do p[_+(R-=b)]=Q;while(0<R)}function x(p,_,b,R,Q){if(e(2328>=Q),512>=Q)var G=a(512);else if((G=a(Q))==null)return 0;return function($,K,z,et,mt,Lt){var Ot,St,Vt=K,Pt=1<<z,wt=a(16),bt=a(16);for(e(mt!=0),e(et!=null),e($!=null),e(0<z),St=0;St<mt;++St){if(15<et[St])return 0;++wt[et[St]]}if(wt[0]==mt)return 0;for(bt[1]=0,Ot=1;15>Ot;++Ot){if(wt[Ot]>1<<Ot)return 0;bt[Ot+1]=bt[Ot]+wt[Ot]}for(St=0;St<mt;++St)Ot=et[St],0<et[St]&&(Lt[bt[Ot]++]=St);if(bt[15]==1)return(et=new S).g=0,et.value=Lt[0],N($,Vt,1,Pt,et),Pt;var Ht,jt=-1,Gt=Pt-1,pe=0,ie=1,Ge=1,le=1<<z;for(St=0,Ot=1,mt=2;Ot<=z;++Ot,mt<<=1){if(ie+=Ge<<=1,0>(Ge-=wt[Ot]))return 0;for(;0<wt[Ot];--wt[Ot])(et=new S).g=Ot,et.value=Lt[St++],N($,Vt+pe,mt,le,et),pe=L(pe,Ot)}for(Ot=z+1,mt=2;15>=Ot;++Ot,mt<<=1){if(ie+=Ge<<=1,0>(Ge-=wt[Ot]))return 0;for(;0<wt[Ot];--wt[Ot]){if(et=new S,(pe&Gt)!=jt){for(Vt+=le,Ht=1<<(jt=Ot)-z;15>jt&&!(0>=(Ht-=wt[jt]));)++jt,Ht<<=1;Pt+=le=1<<(Ht=jt-z),$[K+(jt=pe&Gt)].g=Ht+z,$[K+jt].value=Vt-K-jt}et.g=Ot-z,et.value=Lt[St++],N($,Vt+(pe>>z),mt,le,et),pe=L(pe,Ot)}}return ie!=2*bt[15]-1?0:Pt}(p,_,b,R,Q,G)}function S(){this.value=this.g=0}function P(){this.value=this.g=0}function U(){this.G=o(5,S),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(fa,P)}function tt(p,_,b,R){e(p!=null),e(_!=null),e(2147483648>R),p.Ca=254,p.I=0,p.b=-8,p.Ka=0,p.oa=_,p.pa=b,p.Jd=_,p.Yc=b+R,p.Zc=4<=R?b+R-4+1:b,ot(p)}function q(p,_){for(var b=0;0<_--;)b|=X(p,128)<<_;return b}function rt(p,_){var b=q(p,_);return ut(p)?-b:b}function nt(p,_,b,R){var Q,G=0;for(e(p!=null),e(_!=null),e(4294967288>R),p.Sb=R,p.Ra=0,p.u=0,p.h=0,4<R&&(R=4),Q=0;Q<R;++Q)G+=_[b+Q]<<8*Q;p.Ra=G,p.bb=R,p.oa=_,p.pa=b}function At(p){for(;8<=p.u&&p.bb<p.Sb;)p.Ra>>>=8,p.Ra+=p.oa[p.pa+p.bb]<<Zu-8>>>0,++p.bb,p.u-=8;Y(p)&&(p.h=1,p.u=0)}function ct(p,_){if(e(0<=_),!p.h&&_<=qu){var b=W(p)&Ul[_];return p.u+=_,At(p),b}return p.h=1,p.u=0}function Tt(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function M(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function W(p){return p.Ra>>>(p.u&Zu-1)>>>0}function Y(p){return e(p.bb<=p.Sb),p.h||p.bb==p.Sb&&p.u>Zu}function H(p,_){p.u=_,p.h=Y(p)}function J(p){p.u>=jh&&(e(p.u>=jh),At(p))}function ot(p){e(p!=null&&p.oa!=null),p.pa<p.Zc?(p.I=(p.oa[p.pa++]|p.I<<8)>>>0,p.b+=8):(e(p!=null&&p.oa!=null),p.pa<p.Yc?(p.b+=8,p.I=p.oa[p.pa++]|p.I<<8):p.Ka?p.b=0:(p.I<<=8,p.b+=8,p.Ka=1))}function ut(p){return q(p,1)}function X(p,_){var b=p.Ca;0>p.b&&ot(p);var R=p.b,Q=b*_>>>8,G=(p.I>>>R>Q)+0;for(G?(b-=Q,p.I-=Q+1<<R>>>0):b=Q+1,R=b,Q=0;256<=R;)Q+=8,R>>=8;return R=7^Q+Ia[R],p.b-=R,p.Ca=(b<<R)-1,G}function It(p,_,b){p[_+0]=b>>24&255,p[_+1]=b>>16&255,p[_+2]=b>>8&255,p[_+3]=b>>0&255}function at(p,_){return p[_+0]<<0|p[_+1]<<8}function j(p,_){return at(p,_)|p[_+2]<<16}function Z(p,_){return at(p,_)|at(p,_+2)<<16}function ft(p,_){var b=1<<_;return e(p!=null),e(0<_),p.X=a(b),p.X==null?0:(p.Mb=32-_,p.Xa=_,1)}function it(p,_){e(p!=null),e(_!=null),e(p.Xa==_.Xa),n(_.X,0,p.X,0,1<<_.Xa)}function V(){this.X=[],this.Xa=this.Mb=0}function Ft(p,_,b,R){e(b!=null),e(R!=null);var Q=b[0],G=R[0];return Q==0&&(Q=(p*G+_/2)/_),G==0&&(G=(_*Q+p/2)/p),0>=Q||0>=G?0:(b[0]=Q,R[0]=G,1)}function Mt(p,_){return p+(1<<_)-1>>>_}function Et(p,_){return((4278255360&p)+(4278255360&_)>>>0&4278255360)+((16711935&p)+(16711935&_)>>>0&16711935)>>>0}function Bt(p,_){T[_]=function(b,R,Q,G,$,K,z){var et;for(et=0;et<$;++et){var mt=T[p](K[z+et-1],Q,G+et);K[z+et]=Et(b[R+et],mt)}}}function Ct(){this.ud=this.hd=this.jd=0}function Rt(p,_){return((4278124286&(p^_))>>>1)+(p&_)>>>0}function Nt(p){return 0<=p&&256>p?p:0>p?0:255<p?255:void 0}function Dt(p,_){return Nt(p+(p-_+.5>>1))}function Wt(p,_,b){return Math.abs(_-b)-Math.abs(p-b)}function te(p,_,b,R,Q,G,$){for(R=G[$-1],b=0;b<Q;++b)G[$+b]=R=Et(p[_+b],R)}function Ae(p,_,b,R,Q){var G;for(G=0;G<b;++G){var $=p[_+G],K=$>>8&255,z=16711935&(z=(z=16711935&$)+((K<<16)+K));R[Q+G]=(4278255360&$)+z>>>0}}function oe(p,_){_.jd=p>>0&255,_.hd=p>>8&255,_.ud=p>>16&255}function Jt(p,_,b,R,Q,G){var $;for($=0;$<R;++$){var K=_[b+$],z=K>>>8,et=K,mt=255&(mt=(mt=K>>>16)+((p.jd<<24>>24)*(z<<24>>24)>>>5));et=255&(et=(et=et+((p.hd<<24>>24)*(z<<24>>24)>>>5))+((p.ud<<24>>24)*(mt<<24>>24)>>>5)),Q[G+$]=(4278255360&K)+(mt<<16)+et}}function fe(p,_,b,R,Q){T[_]=function(G,$,K,z,et,mt,Lt,Ot,St){for(z=Lt;z<Ot;++z)for(Lt=0;Lt<St;++Lt)et[mt++]=Q(K[R(G[$++])])},T[p]=function(G,$,K,z,et,mt,Lt){var Ot=8>>G.b,St=G.Ea,Vt=G.K[0],Pt=G.w;if(8>Ot)for(G=(1<<G.b)-1,Pt=(1<<Ot)-1;$<K;++$){var wt,bt=0;for(wt=0;wt<St;++wt)wt&G||(bt=R(z[et++])),mt[Lt++]=Q(Vt[bt&Pt]),bt>>=Ot}else T["VP8LMapColor"+b](z,et,Vt,Pt,mt,Lt,$,K,St)}}function qt(p,_,b,R,Q){for(b=_+b;_<b;){var G=p[_++];R[Q++]=G>>16&255,R[Q++]=G>>8&255,R[Q++]=G>>0&255}}function nr(p,_,b,R,Q){for(b=_+b;_<b;){var G=p[_++];R[Q++]=G>>16&255,R[Q++]=G>>8&255,R[Q++]=G>>0&255,R[Q++]=G>>24&255}}function ke(p,_,b,R,Q){for(b=_+b;_<b;){var G=($=p[_++])>>16&240|$>>12&15,$=$>>0&240|$>>28&15;R[Q++]=G,R[Q++]=$}}function wr(p,_,b,R,Q){for(b=_+b;_<b;){var G=($=p[_++])>>16&248|$>>13&7,$=$>>5&224|$>>3&31;R[Q++]=G,R[Q++]=$}}function Ne(p,_,b,R,Q){for(b=_+b;_<b;){var G=p[_++];R[Q++]=G>>0&255,R[Q++]=G>>8&255,R[Q++]=G>>16&255}}function Pe(p,_,b,R,Q,G){if(G==0)for(b=_+b;_<b;)It(R,((G=p[_++])[0]>>24|G[1]>>8&65280|G[2]<<8&16711680|G[3]<<24)>>>0),Q+=32;else n(R,Q,p,_,b)}function Gr(p,_){T[_][0]=T[p+"0"],T[_][1]=T[p+"1"],T[_][2]=T[p+"2"],T[_][3]=T[p+"3"],T[_][4]=T[p+"4"],T[_][5]=T[p+"5"],T[_][6]=T[p+"6"],T[_][7]=T[p+"7"],T[_][8]=T[p+"8"],T[_][9]=T[p+"9"],T[_][10]=T[p+"10"],T[_][11]=T[p+"11"],T[_][12]=T[p+"12"],T[_][13]=T[p+"13"],T[_][14]=T[p+"0"],T[_][15]=T[p+"0"]}function se(p){return p==nc||p==Wv||p==qh||p==lp}function fi(){this.eb=[],this.size=this.A=this.fb=0}function gr(){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 ei(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new fi,this.f.kb=new gr,this.sd=null}function Wr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function zr(){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 He(p){return alert("todo:WebPSamplerProcessPlane"),p.T}function Ir(p,_){var b=p.T,R=_.ba.f.RGBA,Q=R.eb,G=R.fb+p.ka*R.A,$=So[_.ba.S],K=p.y,z=p.O,et=p.f,mt=p.N,Lt=p.ea,Ot=p.W,St=_.cc,Vt=_.dc,Pt=_.Mc,wt=_.Nc,bt=p.ka,Ht=p.ka+p.T,jt=p.U,Gt=jt+1>>1;for(bt==0?$(K,z,null,null,et,mt,Lt,Ot,et,mt,Lt,Ot,Q,G,null,null,jt):($(_.ec,_.fc,K,z,St,Vt,Pt,wt,et,mt,Lt,Ot,Q,G-R.A,Q,G,jt),++b);bt+2<Ht;bt+=2)St=et,Vt=mt,Pt=Lt,wt=Ot,mt+=p.Rc,Ot+=p.Rc,G+=2*R.A,$(K,(z+=2*p.fa)-p.fa,K,z,St,Vt,Pt,wt,et,mt,Lt,Ot,Q,G-R.A,Q,G,jt);return z+=p.fa,p.j+Ht<p.o?(n(_.ec,_.fc,K,z,jt),n(_.cc,_.dc,et,mt,Gt),n(_.Mc,_.Nc,Lt,Ot,Gt),b--):1&Ht||$(K,z,null,null,et,mt,Lt,Ot,et,mt,Lt,Ot,Q,G+R.A,null,null,jt),b}function $n(p,_,b){var R=p.F,Q=[p.J];if(R!=null){var G=p.U,$=_.ba.S,K=$==Ap||$==qh;_=_.ba.f.RGBA;var z=[0],et=p.ka;z[0]=p.T,p.Kb&&(et==0?--z[0]:(--et,Q[0]-=p.width),p.j+p.ka+p.T==p.o&&(z[0]=p.o-p.j-et));var mt=_.eb;et=_.fb+et*_.A,p=rp(R,Q[0],p.width,G,z,mt,et+(K?0:3),_.A),e(b==z),p&&se($)&&VA(mt,et,K,G,z,_.A)}return 0}function yn(p){var _=p.ma,b=_.ba.S,R=11>b,Q=b==op||b==sp||b==Ap||b==Xh||b==12||se(b);if(_.memory=null,_.Ib=null,_.Jb=null,_.Nd=null,!$h(_.Oa,p,Q?11:12))return 0;if(Q&&se(b)&&Yt(),p.da)alert("todo:use_scaling");else{if(R){if(_.Ib=He,p.Kb){if(b=p.U+1>>1,_.memory=a(p.U+2*b),_.memory==null)return 0;_.ec=_.memory,_.fc=0,_.cc=_.ec,_.dc=_.fc+p.U,_.Mc=_.cc,_.Nc=_.dc+b,_.Ib=Ir,Yt()}}else alert("todo:EmitYUV");Q&&(_.Jb=$n,R&&xt())}if(R&&!lb){for(p=0;256>p;++p)ub[p]=89858*(p-128)+up>>nA,fb[p]=-22014*(p-128)+up,hb[p]=-45773*(p-128),cb[p]=113618*(p-128)+up>>nA;for(p=Hl;p<Jv;++p)_=76283*(p-16)+up>>nA,db[p-Hl]=ro(_,255),tf[p-Hl]=ro(_+8>>4,15);lb=1}return 1}function di(p){var _=p.ma,b=p.U,R=p.T;return e(!(1&p.ka)),0>=b||0>=R?0:(b=_.Ib(p,_),_.Jb!=null&&_.Jb(p,_,b),_.Dc+=b,1)}function pi(p){p.ma.memory=null}function Ue(p,_,b,R){return ct(p,8)!=47?0:(_[0]=ct(p,14)+1,b[0]=ct(p,14)+1,R[0]=ct(p,1),ct(p,3)!=0?0:!p.h)}function ri(p,_){if(4>p)return p+1;var b=p-2>>1;return(2+(1&p)<<b)+ct(_,b)+1}function Cn(p,_){return 120<_?_-120:1<=(b=((b=JB[_-1])>>4)*p+(8-(15&b)))?b:1;var b}function gi(p,_,b){var R=W(b),Q=p[_+=255&R].g-8;return 0<Q&&(H(b,b.u+8),R=W(b),_+=p[_].value,_+=R&(1<<Q)-1),H(b,b.u+p[_].g),p[_].value}function cn(p,_,b){return b.g+=p.g,b.value+=p.value<<_>>>0,e(8>=b.g),p.g}function Br(p,_,b){var R=p.xc;return e((_=R==0?0:p.vc[p.md*(b>>R)+(_>>R)])<p.Wb),p.Ya[_]}function _n(p,_,b,R){var Q=p.ab,G=p.c*_,$=p.C;_=$+_;var K=b,z=R;for(R=p.Ta,b=p.Ua;0<Q--;){var et=p.gc[Q],mt=$,Lt=_,Ot=K,St=z,Vt=(z=R,K=b,et.Ea);switch(e(mt<Lt),e(Lt<=et.nc),et.hc){case 2:Wh(Ot,St,(Lt-mt)*Vt,z,K);break;case 0:var Pt=mt,wt=Lt,bt=z,Ht=K,jt=(le=et).Ea;Pt==0&&(jv(Ot,St,null,null,1,bt,Ht),te(Ot,St+1,0,0,jt-1,bt,Ht+1),St+=jt,Ht+=jt,++Pt);for(var Gt=1<<le.b,pe=Gt-1,ie=Mt(jt,le.b),Ge=le.K,le=le.w+(Pt>>le.b)*ie;Pt<wt;){var mr=Ge,Xr=le,Pr=1;for(Kh(Ot,St,bt,Ht-jt,1,bt,Ht);Pr<jt;){var Tr=(Pr&~pe)+Gt;Tr>jt&&(Tr=jt),(0,kA[mr[Xr++]>>8&15])(Ot,St+ +Pr,bt,Ht+Pr-jt,Tr-Pr,bt,Ht+Pr),Pr=Tr}St+=jt,Ht+=jt,++Pt&pe||(le+=ie)}Lt!=et.nc&&n(z,K-Vt,z,K+(Lt-mt-1)*Vt,Vt);break;case 1:for(Vt=Ot,wt=St,jt=(Ot=et.Ea)-(Ht=Ot&~(bt=(St=1<<et.b)-1)),Pt=Mt(Ot,et.b),Gt=et.K,et=et.w+(mt>>et.b)*Pt;mt<Lt;){for(pe=Gt,ie=et,Ge=new Ct,le=wt+Ht,mr=wt+Ot;wt<le;)oe(pe[ie++],Ge),Bo(Ge,Vt,wt,St,z,K),wt+=St,K+=St;wt<mr&&(oe(pe[ie++],Ge),Bo(Ge,Vt,wt,jt,z,K),wt+=jt,K+=jt),++mt&bt||(et+=Pt)}break;case 3:if(Ot==z&&St==K&&0<et.b){for(wt=z,Ot=Vt=K+(Lt-mt)*Vt-(Ht=(Lt-mt)*Mt(et.Ea,et.b)),St=z,bt=K,Pt=[],Ht=(jt=Ht)-1;0<=Ht;--Ht)Pt[Ht]=St[bt+Ht];for(Ht=jt-1;0<=Ht;--Ht)wt[Ot+Ht]=Pt[Ht];rs(et,mt,Lt,z,Vt,z,K)}else rs(et,mt,Lt,Ot,St,z,K)}K=R,z=b}z!=b&&n(R,b,K,z,G)}function eo(p,_){var b=p.V,R=p.Ba+p.c*p.C,Q=_-p.C;if(e(_<=p.l.o),e(16>=Q),0<Q){var G=p.l,$=p.Ta,K=p.Ua,z=G.width;if(_n(p,Q,b,R),Q=K=[K],e((b=p.C)<(R=_)),e(G.v<G.va),R>G.o&&(R=G.o),b<G.j){var et=G.j-b;b=G.j,Q[0]+=et*z}if(b>=R?b=0:(Q[0]+=4*G.v,G.ka=b-G.j,G.U=G.va-G.v,G.T=R-b,b=1),b){if(K=K[0],11>(b=p.ca).S){var mt=b.f.RGBA,Lt=(R=b.S,Q=G.U,G=G.T,et=mt.eb,mt.A),Ot=G;for(mt=mt.fb+p.Ma*mt.A;0<Ot--;){var St=$,Vt=K,Pt=Q,wt=et,bt=mt;switch(R){case ap:ns(St,Vt,Pt,wt,bt);break;case op:HA(St,Vt,Pt,wt,bt);break;case nc:HA(St,Vt,Pt,wt,bt),VA(wt,bt,0,Pt,1,0);break;case u_:tc(St,Vt,Pt,wt,bt);break;case sp:Pe(St,Vt,Pt,wt,bt,1);break;case Wv:Pe(St,Vt,Pt,wt,bt,1),VA(wt,bt,0,Pt,1,0);break;case Ap:Pe(St,Vt,Pt,wt,bt,0);break;case qh:Pe(St,Vt,Pt,wt,bt,0),VA(wt,bt,1,Pt,1,0);break;case Xh:Ss(St,Vt,Pt,wt,bt);break;case lp:Ss(St,Vt,Pt,wt,bt),rc(wt,bt,Pt,1,0);break;case c_:da(St,Vt,Pt,wt,bt);break;default:e(0)}K+=z,mt+=Lt}p.Ma+=G}else alert("todo:EmitRescaledRowsYUVA");e(p.Ma<=b.height)}}p.C=_,e(p.C<=p.i)}function de(p){var _;if(0<p.ua)return 0;for(_=0;_<p.Wb;++_){var b=p.Ya[_].G,R=p.Ya[_].H;if(0<b[1][R[1]+0].g||0<b[2][R[2]+0].g||0<b[3][R[3]+0].g)return 0}return 1}function _t(p,_,b,R,Q,G){if(p.Z!=0){var $=p.qd,K=p.rd;for(e(os[p.Z]!=null);_<b;++_)os[p.Z]($,K,R,Q,R,Q,G),$=R,K=Q,Q+=G;p.qd=$,p.rd=K}}function $t(p,_){var b=p.l.ma,R=b.Z==0||b.Z==1?p.l.j:p.C;if(R=p.C<R?R:p.C,e(_<=p.l.o),_>R){var Q=p.l.width,G=b.ca,$=b.tb+Q*R,K=p.V,z=p.Ba+p.c*R,et=p.gc;e(p.ab==1),e(et[0].hc==3),zh(et[0],R,_,K,z,G,$),_t(b,R,_,G,$,Q)}p.C=p.Ma=_}function ne(p,_,b,R,Q,G,$){var K=p.$/R,z=p.$%R,et=p.m,mt=p.s,Lt=b+p.$,Ot=Lt;Q=b+R*Q;var St=b+R*G,Vt=280+mt.ua,Pt=p.Pb?K:16777216,wt=0<mt.ua?mt.Wa:null,bt=mt.wc,Ht=Lt<St?Br(mt,z,K):null;e(p.C<G),e(St<=Q);var jt=!1;t:for(;;){for(;jt||Lt<St;){var Gt=0;if(K>=Pt){var pe=Lt-b;e((Pt=p).Pb),Pt.wd=Pt.m,Pt.xd=pe,0<Pt.s.ua&&it(Pt.s.Wa,Pt.s.vb),Pt=K+eb}if(z&bt||(Ht=Br(mt,z,K)),e(Ht!=null),Ht.Qb&&(_[Lt]=Ht.qb,jt=!0),!jt)if(J(et),Ht.jc){Gt=et,pe=_;var ie=Lt,Ge=Ht.pd[W(Gt)&fa-1];e(Ht.jc),256>Ge.g?(H(Gt,Gt.u+Ge.g),pe[ie]=Ge.value,Gt=0):(H(Gt,Gt.u+Ge.g-256),e(256<=Ge.value),Gt=Ge.value),Gt==0&&(jt=!0)}else Gt=gi(Ht.G[0],Ht.H[0],et);if(et.h)break;if(jt||256>Gt){if(!jt)if(Ht.nd)_[Lt]=(Ht.qb|Gt<<8)>>>0;else{if(J(et),jt=gi(Ht.G[1],Ht.H[1],et),J(et),pe=gi(Ht.G[2],Ht.H[2],et),ie=gi(Ht.G[3],Ht.H[3],et),et.h)break;_[Lt]=(ie<<24|jt<<16|Gt<<8|pe)>>>0}if(jt=!1,++Lt,++z>=R&&(z=0,++K,$!=null&&K<=G&&!(K%16)&&$(p,K),wt!=null))for(;Ot<Lt;)Gt=_[Ot++],wt.X[(506832829*Gt&4294967295)>>>wt.Mb]=Gt}else if(280>Gt){if(Gt=ri(Gt-256,et),pe=gi(Ht.G[4],Ht.H[4],et),J(et),pe=Cn(R,pe=ri(pe,et)),et.h)break;if(Lt-b<pe||Q-Lt<Gt)break t;for(ie=0;ie<Gt;++ie)_[Lt+ie]=_[Lt+ie-pe];for(Lt+=Gt,z+=Gt;z>=R;)z-=R,++K,$!=null&&K<=G&&!(K%16)&&$(p,K);if(e(Lt<=Q),z&bt&&(Ht=Br(mt,z,K)),wt!=null)for(;Ot<Lt;)Gt=_[Ot++],wt.X[(506832829*Gt&4294967295)>>>wt.Mb]=Gt}else{if(!(Gt<Vt))break t;for(jt=Gt-280,e(wt!=null);Ot<Lt;)Gt=_[Ot++],wt.X[(506832829*Gt&4294967295)>>>wt.Mb]=Gt;Gt=Lt,e(!(jt>>>(pe=wt).Xa)),_[Gt]=pe.X[jt],jt=!0}jt||e(et.h==Y(et))}if(p.Pb&&et.h&&Lt<Q)e(p.m.h),p.a=5,p.m=p.wd,p.$=p.xd,0<p.s.ua&&it(p.s.vb,p.s.Wa);else{if(et.h)break t;$!=null&&$(p,K>G?G:K),p.a=0,p.$=Lt-b}return 1}return p.a=3,0}function Je(p){e(p!=null),p.vc=null,p.yc=null,p.Ya=null;var _=p.Wa;_!=null&&(_.X=null),p.vb=null,e(p!=null)}function Lr(){var p=new Vv;return p==null?null:(p.a=0,p.xb=d_,Gr("Predictor","VP8LPredictors"),Gr("Predictor","VP8LPredictors_C"),Gr("PredictorAdd","VP8LPredictorsAdd"),Gr("PredictorAdd","VP8LPredictorsAdd_C"),Wh=Ae,Bo=Jt,ns=qt,HA=nr,Ss=ke,da=wr,tc=Ne,T.VP8LMapColor32b=Ju,T.VP8LMapColor8b=Kv,p)}function hn(p,_,b,R,Q){var G=1,$=[p],K=[_],z=R.m,et=R.s,mt=null,Lt=0;t:for(;;){if(b)for(;G&&ct(z,1);){var Ot=$,St=K,Vt=R,Pt=1,wt=Vt.m,bt=Vt.gc[Vt.ab],Ht=ct(wt,2);if(Vt.Oc&1<<Ht)G=0;else{switch(Vt.Oc|=1<<Ht,bt.hc=Ht,bt.Ea=Ot[0],bt.nc=St[0],bt.K=[null],++Vt.ab,e(4>=Vt.ab),Ht){case 0:case 1:bt.b=ct(wt,3)+2,Pt=hn(Mt(bt.Ea,bt.b),Mt(bt.nc,bt.b),0,Vt,bt.K),bt.K=bt.K[0];break;case 3:var jt,Gt=ct(wt,8)+1,pe=16<Gt?0:4<Gt?1:2<Gt?2:3;if(Ot[0]=Mt(bt.Ea,pe),bt.b=pe,jt=Pt=hn(Gt,1,0,Vt,bt.K)){var ie,Ge=Gt,le=bt,mr=1<<(8>>le.b),Xr=a(mr);if(Xr==null)jt=0;else{var Pr=le.K[0],Tr=le.w;for(Xr[0]=le.K[0][0],ie=1;ie<1*Ge;++ie)Xr[ie]=Et(Pr[Tr+ie],Xr[ie-1]);for(;ie<4*mr;++ie)Xr[ie]=0;le.K[0]=null,le.K[0]=Xr,jt=1}}Pt=jt;break;case 2:break;default:e(0)}G=Pt}}if($=$[0],K=K[0],G&&ct(z,1)&&!(G=1<=(Lt=ct(z,4))&&11>=Lt)){R.a=3;break t}var gn;if(gn=G)e:{var an,or,ii,Oa=R,ai=$,pa=K,Hr=Lt,ra=b,io=Oa.m,Ri=Oa.s,Wn=[null],Fa=1,lt=0,B=tb[Hr];r:for(;;){if(ra&&ct(io,1)){var D=ct(io,3)+2,ht=Mt(ai,D),Qt=Mt(pa,D),re=ht*Qt;if(!hn(ht,Qt,0,Oa,Wn))break r;for(Wn=Wn[0],Ri.xc=D,an=0;an<re;++an){var Zt=Wn[an]>>8&65535;Wn[an]=Zt,Zt>=Fa&&(Fa=Zt+1)}}if(io.h)break r;for(or=0;5>or;++or){var Se=h_[or];!or&&0<Hr&&(Se+=1<<Hr),lt<Se&&(lt=Se)}var na=o(Fa*B,S),Ra=Fa,zn=o(Ra,U);if(zn==null)var Ma=null;else e(65536>=Ra),Ma=zn;var Na=a(lt);if(Ma==null||Na==null||na==null){Oa.a=1;break r}var KA=na;for(an=ii=0;an<Fa;++an){var ss=Ma[an],As=ss.G,cp=ss.H,cN=0,__=1,hN=0;for(or=0;5>or;++or){Se=h_[or],As[or]=KA,cp[or]=ii,!or&&0<Hr&&(Se+=1<<Hr);i:{var w_,gb=Se,E_=Oa,rm=Na,yK=KA,_K=ii,vb=0,ic=E_.m,wK=ct(ic,1);if(i(rm,0,0,gb),wK){var EK=ct(ic,1)+1,CK=ct(ic,1),fN=ct(ic,CK==0?1:8);rm[fN]=1,EK==2&&(rm[fN=ct(ic,8)]=1);var C_=1}else{var dN=a(19),pN=ct(ic,4)+4;if(19<pN){E_.a=3;var B_=0;break i}for(w_=0;w_<pN;++w_)dN[ZB[w_]]=ct(ic,3);var mb=void 0,nm=void 0,gN=E_,BK=dN,b_=gb,vN=rm,yb=0,ac=gN.m,mN=8,yN=o(128,S);n:for(;x(yN,0,7,BK,19);){if(ct(ac,1)){var bK=2+2*ct(ac,3);if((mb=2+ct(ac,bK))>b_)break n}else mb=b_;for(nm=0;nm<b_&&mb--;){J(ac);var _N=yN[0+(127&W(ac))];H(ac,ac.u+_N.g);var hp=_N.value;if(16>hp)vN[nm++]=hp,hp!=0&&(mN=hp);else{var TK=hp==16,wN=hp-16,SK=zv[wN],EN=ct(ac,Zh[wN])+SK;if(nm+EN>b_)break n;for(var xK=TK?mN:0;0<EN--;)vN[nm++]=xK}}yb=1;break n}yb||(gN.a=3),C_=yb}(C_=C_&&!ic.h)&&(vb=x(yK,_K,8,rm,gb)),C_&&vb!=0?B_=vb:(E_.a=3,B_=0)}if(B_==0)break r;if(__&&qB[or]==1&&(__=KA[ii].g==0),cN+=KA[ii].g,ii+=B_,3>=or){var im,_b=Na[0];for(im=1;im<Se;++im)Na[im]>_b&&(_b=Na[im]);hN+=_b}}if(ss.nd=__,ss.Qb=0,__&&(ss.qb=(As[3][cp[3]+0].value<<24|As[1][cp[1]+0].value<<16|As[2][cp[2]+0].value)>>>0,cN==0&&256>As[0][cp[0]+0].value&&(ss.Qb=1,ss.qb+=As[0][cp[0]+0].value<<8)),ss.jc=!ss.Qb&&6>hN,ss.jc){var T_,$l=ss;for(T_=0;T_<fa;++T_){var oc=T_,sc=$l.pd[oc],S_=$l.G[0][$l.H[0]+oc];256<=S_.value?(sc.g=S_.g+256,sc.value=S_.value):(sc.g=0,sc.value=0,oc>>=cn(S_,8,sc),oc>>=cn($l.G[1][$l.H[1]+oc],16,sc),oc>>=cn($l.G[2][$l.H[2]+oc],0,sc),cn($l.G[3][$l.H[3]+oc],24,sc))}}}Ri.vc=Wn,Ri.Wb=Fa,Ri.Ya=Ma,Ri.yc=na,gn=1;break e}gn=0}if(!(G=gn)){R.a=3;break t}if(0<Lt){if(et.ua=1<<Lt,!ft(et.Wa,Lt)){R.a=1,G=0;break t}}else et.ua=0;var wb=R,CN=$,IK=K,Eb=wb.s,Cb=Eb.xc;if(wb.c=CN,wb.i=IK,Eb.md=Mt(CN,Cb),Eb.wc=Cb==0?-1:(1<<Cb)-1,b){R.xb=sb;break t}if((mt=a($*K))==null){R.a=1,G=0;break t}G=(G=ne(R,mt,0,$,K,K,null))&&!z.h;break t}return G?(Q!=null?Q[0]=mt:(e(mt==null),e(b)),R.$=0,b||Je(et)):Je(et),G}function fn(p,_){var b=p.c*p.i,R=b+_+16*_;return e(p.c<=_),p.V=a(R),p.V==null?(p.Ta=null,p.Ua=0,p.a=1,0):(p.Ta=p.V,p.Ua=p.Ba+b+_,1)}function Xo(p,_){var b=p.C,R=_-b,Q=p.V,G=p.Ba+p.c*b;for(e(_<=p.l.o);0<R;){var $=16<R?16:R,K=p.l.ma,z=p.l.width,et=z*$,mt=K.ca,Lt=K.tb+z*b,Ot=p.Ta,St=p.Ua;_n(p,$,Q,G),Ls(Ot,St,mt,Lt,et),_t(K,b,b+$,mt,Lt,z),R-=$,Q+=$*p.c,b+=$}e(b==_),p.C=p.Ma=_}function vi(){this.ub=this.yd=this.td=this.Rb=0}function Ws(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function OA(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Fh(){this.Yb=function(){var p=[];return function _(b,R,Q){for(var G=Q[R],$=0;$<G&&(b.push(Q.length>R+1?[]:0),!(Q.length<R+1));$++)_(b[$],R+1,Q)}(p,0,[3,11]),p}()}function xv(){this.jb=a(3),this.Wc=s([4,8],Fh),this.Xc=s([4,17],Fh)}function Pd(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function zs(){this.ld=this.La=this.dd=this.tc=0}function Ud(){this.Na=this.la=0}function Iv(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Rh(){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 Lv(){this.uc=this.M=this.Nb=0,this.wa=Array(new zs),this.Y=0,this.ya=Array(new Rh),this.aa=0,this.l=new Fl}function Dd(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Qd(){this.cb=this.a=0,this.sc="",this.m=new Tt,this.Od=new vi,this.Kc=new Ws,this.ed=new Pd,this.Qa=new OA,this.Ic=this.$c=this.Aa=0,this.D=new Lv,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,Tt),this.ia=0,this.pb=o(4,Iv),this.Pa=new xv,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Dd),this.Hd=0,this.rb=Array(new Ud),this.sb=0,this.wa=Array(new zs),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 Rh),this.L=this.aa=0,this.gd=s([4,2],zs),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 Fl(){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 Ov(){var p=new Qd;return p!=null&&(p.a=0,p.sc="OK",p.cb=0,p.Xb=0,Jh||(Jh=Gd)),p}function Vn(p,_,b){return p.a==0&&(p.a=_,p.sc=b,p.cb=0),0}function kd(p,_,b){return 3<=b&&p[_+0]==157&&p[_+1]==1&&p[_+2]==42}function Hd(p,_){if(p==null)return 0;if(p.a=0,p.sc="OK",_==null)return Vn(p,2,"null VP8Io passed to VP8GetHeaders()");var b=_.data,R=_.w,Q=_.ha;if(4>Q)return Vn(p,7,"Truncated header.");var G=b[R+0]|b[R+1]<<8|b[R+2]<<16,$=p.Od;if($.Rb=!(1&G),$.td=G>>1&7,$.yd=G>>4&1,$.ub=G>>5,3<$.td)return Vn(p,3,"Incorrect keyframe parameters.");if(!$.yd)return Vn(p,4,"Frame not displayable.");R+=3,Q-=3;var K=p.Kc;if($.Rb){if(7>Q)return Vn(p,7,"cannot parse picture header");if(!kd(b,R,Q))return Vn(p,3,"Bad code word");K.c=16383&(b[R+4]<<8|b[R+3]),K.Td=b[R+4]>>6,K.i=16383&(b[R+6]<<8|b[R+5]),K.Ud=b[R+6]>>6,R+=7,Q-=7,p.za=K.c+15>>4,p.Ub=K.i+15>>4,_.width=K.c,_.height=K.i,_.Da=0,_.j=0,_.v=0,_.va=_.width,_.o=_.height,_.da=0,_.ib=_.width,_.hb=_.height,_.U=_.width,_.T=_.height,i((G=p.Pa).jb,0,255,G.jb.length),e((G=p.Qa)!=null),G.Cb=0,G.Bb=0,G.Fb=1,i(G.Zb,0,0,G.Zb.length),i(G.Lb,0,0,G.Lb)}if($.ub>Q)return Vn(p,7,"bad partition length");tt(G=p.m,b,R,$.ub),R+=$.ub,Q-=$.ub,$.Rb&&(K.Ld=ut(G),K.Kd=ut(G)),K=p.Qa;var z,et=p.Pa;if(e(G!=null),e(K!=null),K.Cb=ut(G),K.Cb){if(K.Bb=ut(G),ut(G)){for(K.Fb=ut(G),z=0;4>z;++z)K.Zb[z]=ut(G)?rt(G,7):0;for(z=0;4>z;++z)K.Lb[z]=ut(G)?rt(G,6):0}if(K.Bb)for(z=0;3>z;++z)et.jb[z]=ut(G)?q(G,8):255}else K.Bb=0;if(G.Ka)return Vn(p,3,"cannot parse segment header");if((K=p.ed).zd=ut(G),K.Tb=q(G,6),K.wb=q(G,3),K.Pc=ut(G),K.Pc&&ut(G)){for(et=0;4>et;++et)ut(G)&&(K.vd[et]=rt(G,6));for(et=0;4>et;++et)ut(G)&&(K.od[et]=rt(G,6))}if(p.L=K.Tb==0?0:K.zd?1:2,G.Ka)return Vn(p,3,"cannot parse filter header");var mt=Q;if(Q=z=R,R=z+mt,K=mt,p.Xb=(1<<q(p.m,2))-1,mt<3*(et=p.Xb))b=7;else{for(z+=3*et,K-=3*et,mt=0;mt<et;++mt){var Lt=b[Q+0]|b[Q+1]<<8|b[Q+2]<<16;Lt>K&&(Lt=K),tt(p.Jc[+mt],b,z,Lt),z+=Lt,K-=Lt,Q+=3}tt(p.Jc[+et],b,z,K),b=z<R?0:5}if(b!=0)return Vn(p,b,"cannot parse partitions");for(b=q(z=p.m,7),Q=ut(z)?rt(z,4):0,R=ut(z)?rt(z,4):0,K=ut(z)?rt(z,4):0,et=ut(z)?rt(z,4):0,z=ut(z)?rt(z,4):0,mt=p.Qa,Lt=0;4>Lt;++Lt){if(mt.Cb){var Ot=mt.Zb[Lt];mt.Fb||(Ot+=b)}else{if(0<Lt){p.pb[Lt]=p.pb[0];continue}Ot=b}var St=p.pb[Lt];St.Sc[0]=Yv[ro(Ot+Q,127)],St.Sc[1]=Xv[ro(Ot+0,127)],St.Eb[0]=2*Yv[ro(Ot+R,127)],St.Eb[1]=101581*Xv[ro(Ot+K,127)]>>16,8>St.Eb[1]&&(St.Eb[1]=8),St.Qc[0]=Yv[ro(Ot+et,117)],St.Qc[1]=Xv[ro(Ot+z,127)],St.lc=Ot+z}if(!$.Rb)return Vn(p,4,"Not a key frame.");for(ut(G),$=p.Pa,b=0;4>b;++b){for(Q=0;8>Q;++Q)for(R=0;3>R;++R)for(K=0;11>K;++K)et=X(G,ob[b][Q][R][K])?q(G,8):ib[b][Q][R][K],$.Wc[b][Q].Yb[R][K]=et;for(Q=0;17>Q;++Q)$.Xc[b][Q]=$.Wc[b][kl[Q]]}return p.kc=ut(G),p.kc&&(p.Bd=q(G,8)),p.cb=1}function Gd(p,_,b,R,Q,G,$){var K=_[Q].Yb[b];for(b=0;16>Q;++Q){if(!X(p,K[b+0]))return Q;for(;!X(p,K[b+1]);)if(K=_[++Q].Yb[0],b=0,Q==16)return 16;var z=_[Q+1].Yb;if(X(p,K[b+2])){var et=p,mt=0;if(X(et,(Ot=K)[(Lt=b)+3]))if(X(et,Ot[Lt+6])){for(K=0,Lt=2*(mt=X(et,Ot[Lt+8]))+(Ot=X(et,Ot[Lt+9+mt])),mt=0,Ot=rb[Lt];Ot[K];++K)mt+=mt+X(et,Ot[K]);mt+=3+(8<<Lt)}else X(et,Ot[Lt+7])?(mt=7+2*X(et,165),mt+=X(et,145)):mt=5+X(et,159);else mt=X(et,Ot[Lt+4])?3+X(et,Ot[Lt+5]):2;K=z[2]}else mt=1,K=z[1];z=$+nb[Q],0>(et=p).b&&ot(et);var Lt,Ot=et.b,St=(Lt=et.Ca>>1)-(et.I>>Ot)>>31;--et.b,et.Ca+=St,et.Ca|=1,et.I-=(Lt+1&St)<<Ot,G[z]=((mt^St)-St)*R[(0<Q)+0]}return 16}function Mh(p){var _=p.rb[p.sb-1];_.la=0,_.Na=0,i(p.zc,0,0,p.zc.length),p.ja=0}function Fv(p,_){if(p==null)return 0;if(_==null)return Vn(p,2,"NULL VP8Io parameter in VP8Decode().");if(!p.cb&&!Hd(p,_))return 0;if(e(p.cb),_.ac==null||_.ac(_)){_.ob&&(p.L=0);var b=em[p.L];if(p.L==2?(p.yb=0,p.zb=0):(p.yb=_.v-b>>4,p.zb=_.j-b>>4,0>p.yb&&(p.yb=0),0>p.zb&&(p.zb=0)),p.Va=_.o+15+b>>4,p.Hb=_.va+15+b>>4,p.Hb>p.za&&(p.Hb=p.za),p.Va>p.Ub&&(p.Va=p.Ub),0<p.L){var R=p.ed;for(b=0;4>b;++b){var Q;if(p.Qa.Cb){var G=p.Qa.Lb[b];p.Qa.Fb||(G+=R.Tb)}else G=R.Tb;for(Q=0;1>=Q;++Q){var $=p.gd[b][Q],K=G;if(R.Pc&&(K+=R.vd[0],Q&&(K+=R.od[0])),0<(K=0>K?0:63<K?63:K)){var z=K;0<R.wb&&(z=4<R.wb?z>>2:z>>1)>9-R.wb&&(z=9-R.wb),1>z&&(z=1),$.dd=z,$.tc=2*K+z,$.ld=40<=K?2:15<=K?1:0}else $.tc=0;$.La=Q}}}b=0}else Vn(p,6,"Frame setup failed"),b=p.a;if(b=b==0){if(b){p.$c=0,0<p.Aa||(p.Ic=pb);t:{b=p.Ic,R=4*(z=p.za);var et=32*z,mt=z+1,Lt=0<p.L?z*(0<p.Aa?2:1):0,Ot=(p.Aa==2?2:1)*z;if(($=R+832+(Q=3*(16*b+em[p.L])/2*et)+(G=p.Fa!=null&&0<p.Fa.length?p.Kc.c*p.Kc.i:0))!=$)b=0;else{if($>p.Vb){if(p.Vb=0,p.Ec=a($),p.Fc=0,p.Ec==null){b=Vn(p,1,"no memory during frame initialization.");break t}p.Vb=$}$=p.Ec,K=p.Fc,p.Ac=$,p.Bc=K,K+=R,p.Gd=o(et,Dd),p.Hd=0,p.rb=o(mt+1,Ud),p.sb=1,p.wa=Lt?o(Lt,zs):null,p.Y=0,p.D.Nb=0,p.D.wa=p.wa,p.D.Y=p.Y,0<p.Aa&&(p.D.Y+=z),e(!0),p.oc=$,p.pc=K,K+=832,p.ya=o(Ot,Rh),p.aa=0,p.D.ya=p.ya,p.D.aa=p.aa,p.Aa==2&&(p.D.aa+=z),p.R=16*z,p.B=8*z,z=(et=em[p.L])*p.R,et=et/2*p.B,p.sa=$,p.ta=K+z,p.qa=p.sa,p.ra=p.ta+16*b*p.R+et,p.Ha=p.qa,p.Ia=p.ra+8*b*p.B+et,p.$c=0,K+=Q,p.mb=G?$:null,p.nb=G?K:null,e(K+G<=p.Fc+p.Vb),Mh(p),i(p.Ac,p.Bc,0,R),b=1}}if(b){if(_.ka=0,_.y=p.sa,_.O=p.ta,_.f=p.qa,_.N=p.ra,_.ea=p.Ha,_.Vd=p.Ia,_.fa=p.R,_.Rc=p.B,_.F=null,_.J=0,!l_){for(b=-255;255>=b;++b)a_[255+b]=0>b?-b:b;for(b=-1020;1020>=b;++b)o_[1020+b]=-128>b?-128:127<b?127:b;for(b=-112;112>=b;++b)s_[112+b]=-16>b?-16:15<b?15:b;for(b=-255;510>=b;++b)A_[255+b]=0>b?0:255<b?255:b;l_=1}xs=Nv,La=Rv,GA=Vd,is=Mv,Is=jd,ec=FA,$A=DA,Dl=Pl,Ql=$v,Js=Qh,Yh=Gv,bo=ju,tA=kh,dn=Zd,pn=qd,Kn=qs,yi=UA,eA=Hv,as[0]=Jo,as[1]=Ph,as[2]=Uv,as[3]=MA,as[4]=Dv,as[5]=NA,as[6]=bs,as[7]=Uh,as[8]=Qv,as[9]=Wd,jA[0]=Kd,jA[1]=ku,jA[2]=Ys,jA[3]=Hu,jA[4]=ta,jA[5]=Pv,jA[6]=$u,rA[0]=PA,rA[1]=RA,rA[2]=zd,rA[3]=Dh,rA[4]=Ml,rA[5]=kv,rA[6]=Vu,b=1}else b=0}b&&(b=function(St,Vt){for(St.M=0;St.M<St.Va;++St.M){var Pt,wt=St.Jc[St.M&St.Xb],bt=St.m,Ht=St;for(Pt=0;Pt<Ht.za;++Pt){var jt=bt,Gt=Ht,pe=Gt.Ac,ie=Gt.Bc+4*Pt,Ge=Gt.zc,le=Gt.ya[Gt.aa+Pt];if(Gt.Qa.Bb?le.$b=X(jt,Gt.Pa.jb[0])?2+X(jt,Gt.Pa.jb[2]):X(jt,Gt.Pa.jb[1]):le.$b=0,Gt.kc&&(le.Ad=X(jt,Gt.Bd)),le.Za=!X(jt,145)+0,le.Za){var mr=le.Ob,Xr=0;for(Gt=0;4>Gt;++Gt){var Pr,Tr=Ge[0+Gt];for(Pr=0;4>Pr;++Pr){Tr=ab[pe[ie+Pr]][Tr];for(var gn=f_[X(jt,Tr[0])];0<gn;)gn=f_[2*gn+X(jt,Tr[gn])];Tr=-gn,pe[ie+Pr]=Tr}n(mr,Xr,pe,ie,4),Xr+=4,Ge[0+Gt]=Tr}}else Tr=X(jt,156)?X(jt,128)?1:3:X(jt,163)?2:0,le.Ob[0]=Tr,i(pe,ie,Tr,4),i(Ge,0,Tr,4);le.Dd=X(jt,142)?X(jt,114)?X(jt,183)?1:3:2:0}if(Ht.m.Ka)return Vn(St,7,"Premature end-of-partition0 encountered.");for(;St.ja<St.za;++St.ja){if(Ht=wt,jt=(bt=St).rb[bt.sb-1],pe=bt.rb[bt.sb+bt.ja],Pt=bt.ya[bt.aa+bt.ja],ie=bt.kc?Pt.Ad:0)jt.la=pe.la=0,Pt.Za||(jt.Na=pe.Na=0),Pt.Hc=0,Pt.Gc=0,Pt.ia=0;else{var an,or;if(jt=pe,pe=Ht,ie=bt.Pa.Xc,Ge=bt.ya[bt.aa+bt.ja],le=bt.pb[Ge.$b],Gt=Ge.ad,mr=0,Xr=bt.rb[bt.sb-1],Tr=Pr=0,i(Gt,mr,0,384),Ge.Za)var ii=0,Oa=ie[3];else{gn=a(16);var ai=jt.Na+Xr.Na;if(ai=Jh(pe,ie[1],ai,le.Eb,0,gn,0),jt.Na=Xr.Na=(0<ai)+0,1<ai)xs(gn,0,Gt,mr);else{var pa=gn[0]+3>>3;for(gn=0;256>gn;gn+=16)Gt[mr+gn]=pa}ii=1,Oa=ie[0]}var Hr=15&jt.la,ra=15&Xr.la;for(gn=0;4>gn;++gn){var io=1&ra;for(pa=or=0;4>pa;++pa)Hr=Hr>>1|(io=(ai=Jh(pe,Oa,ai=io+(1&Hr),le.Sc,ii,Gt,mr))>ii)<<7,or=or<<2|(3<ai?3:1<ai?2:Gt[mr+0]!=0),mr+=16;Hr>>=4,ra=ra>>1|io<<7,Pr=(Pr<<8|or)>>>0}for(Oa=Hr,ii=ra>>4,an=0;4>an;an+=2){for(or=0,Hr=jt.la>>4+an,ra=Xr.la>>4+an,gn=0;2>gn;++gn){for(io=1&ra,pa=0;2>pa;++pa)ai=io+(1&Hr),Hr=Hr>>1|(io=0<(ai=Jh(pe,ie[2],ai,le.Qc,0,Gt,mr)))<<3,or=or<<2|(3<ai?3:1<ai?2:Gt[mr+0]!=0),mr+=16;Hr>>=2,ra=ra>>1|io<<5}Tr|=or<<4*an,Oa|=Hr<<4<<an,ii|=(240&ra)<<an}jt.la=Oa,Xr.la=ii,Ge.Hc=Pr,Ge.Gc=Tr,Ge.ia=43690&Tr?0:le.ia,ie=!(Pr|Tr)}if(0<bt.L&&(bt.wa[bt.Y+bt.ja]=bt.gd[Pt.$b][Pt.Za],bt.wa[bt.Y+bt.ja].La|=!ie),Ht.Ka)return Vn(St,7,"Premature end-of-file encountered.")}if(Mh(St),bt=Vt,Ht=1,Pt=(wt=St).D,jt=0<wt.L&&wt.M>=wt.zb&&wt.M<=wt.Va,wt.Aa==0)t:{if(Pt.M=wt.M,Pt.uc=jt,ha(wt,Pt),Ht=1,Pt=(or=wt.D).Nb,jt=(Tr=em[wt.L])*wt.R,pe=Tr/2*wt.B,gn=16*Pt*wt.R,pa=8*Pt*wt.B,ie=wt.sa,Ge=wt.ta-jt+gn,le=wt.qa,Gt=wt.ra-pe+pa,mr=wt.Ha,Xr=wt.Ia-pe+pa,ra=(Hr=or.M)==0,Pr=Hr>=wt.Va-1,wt.Aa==2&&ha(wt,or),or.uc)for(io=(ai=wt).D.M,e(ai.D.uc),or=ai.yb;or<ai.Hb;++or){ii=or,Oa=io;var Ri=(Wn=(Se=ai).D).Nb;an=Se.R;var Wn=Wn.wa[Wn.Y+ii],Fa=Se.sa,lt=Se.ta+16*Ri*an+16*ii,B=Wn.dd,D=Wn.tc;if(D!=0)if(e(3<=D),Se.L==1)0<ii&&Kn(Fa,lt,an,D+4),Wn.La&&eA(Fa,lt,an,D),0<Oa&&pn(Fa,lt,an,D+4),Wn.La&&yi(Fa,lt,an,D);else{var ht=Se.B,Qt=Se.qa,re=Se.ra+8*Ri*ht+8*ii,Zt=Se.Ha,Se=Se.Ia+8*Ri*ht+8*ii;Ri=Wn.ld,0<ii&&(Dl(Fa,lt,an,D+4,B,Ri),Js(Qt,re,Zt,Se,ht,D+4,B,Ri)),Wn.La&&(bo(Fa,lt,an,D,B,Ri),dn(Qt,re,Zt,Se,ht,D,B,Ri)),0<Oa&&($A(Fa,lt,an,D+4,B,Ri),Ql(Qt,re,Zt,Se,ht,D+4,B,Ri)),Wn.La&&(Yh(Fa,lt,an,D,B,Ri),tA(Qt,re,Zt,Se,ht,D,B,Ri))}}if(wt.ia&&alert("todo:DitherRow"),bt.put!=null){if(or=16*Hr,Hr=16*(Hr+1),ra?(bt.y=wt.sa,bt.O=wt.ta+gn,bt.f=wt.qa,bt.N=wt.ra+pa,bt.ea=wt.Ha,bt.W=wt.Ia+pa):(or-=Tr,bt.y=ie,bt.O=Ge,bt.f=le,bt.N=Gt,bt.ea=mr,bt.W=Xr),Pr||(Hr-=Tr),Hr>bt.o&&(Hr=bt.o),bt.F=null,bt.J=null,wt.Fa!=null&&0<wt.Fa.length&&or<Hr&&(bt.J=QA(wt,bt,or,Hr-or),bt.F=wt.mb,bt.F==null&&bt.F.length==0)){Ht=Vn(wt,3,"Could not decode alpha data.");break t}or<bt.j&&(Tr=bt.j-or,or=bt.j,e(!(1&Tr)),bt.O+=wt.R*Tr,bt.N+=wt.B*(Tr>>1),bt.W+=wt.B*(Tr>>1),bt.F!=null&&(bt.J+=bt.width*Tr)),or<Hr&&(bt.O+=bt.v,bt.N+=bt.v>>1,bt.W+=bt.v>>1,bt.F!=null&&(bt.J+=bt.v),bt.ka=or-bt.j,bt.U=bt.va-bt.v,bt.T=Hr-or,Ht=bt.put(bt))}Pt+1!=wt.Ic||Pr||(n(wt.sa,wt.ta-jt,ie,Ge+16*wt.R,jt),n(wt.qa,wt.ra-pe,le,Gt+8*wt.B,pe),n(wt.Ha,wt.Ia-pe,mr,Xr+8*wt.B,pe))}if(!Ht)return Vn(St,6,"Output aborted.")}return 1}(p,_)),_.bc!=null&&_.bc(_),b&=1}return b?(p.cb=0,b):0}function qo(p,_,b,R,Q){Q=p[_+b+32*R]+(Q>>3),p[_+b+32*R]=-256&Q?0>Q?0:255:Q}function Zo(p,_,b,R,Q,G){qo(p,_,0,b,R+Q),qo(p,_,1,b,R+G),qo(p,_,2,b,R-G),qo(p,_,3,b,R-Q)}function Sa(p){return(20091*p>>16)+p}function $d(p,_,b,R){var Q,G=0,$=a(16);for(Q=0;4>Q;++Q){var K=p[_+0]+p[_+8],z=p[_+0]-p[_+8],et=(35468*p[_+4]>>16)-Sa(p[_+12]),mt=Sa(p[_+4])+(35468*p[_+12]>>16);$[G+0]=K+mt,$[G+1]=z+et,$[G+2]=z-et,$[G+3]=K-mt,G+=4,_++}for(Q=G=0;4>Q;++Q)K=(p=$[G+0]+4)+$[G+8],z=p-$[G+8],et=(35468*$[G+4]>>16)-Sa($[G+12]),qo(b,R,0,0,K+(mt=Sa($[G+4])+(35468*$[G+12]>>16))),qo(b,R,1,0,z+et),qo(b,R,2,0,z-et),qo(b,R,3,0,K-mt),G++,R+=32}function FA(p,_,b,R){var Q=p[_+0]+4,G=35468*p[_+4]>>16,$=Sa(p[_+4]),K=35468*p[_+1]>>16;Zo(b,R,0,Q+$,p=Sa(p[_+1]),K),Zo(b,R,1,Q+G,p,K),Zo(b,R,2,Q-G,p,K),Zo(b,R,3,Q-$,p,K)}function Rv(p,_,b,R,Q){$d(p,_,b,R),Q&&$d(p,_+16,b,R+4)}function Vd(p,_,b,R){La(p,_+0,b,R,1),La(p,_+32,b,R+128,1)}function Mv(p,_,b,R){var Q;for(p=p[_+0]+4,Q=0;4>Q;++Q)for(_=0;4>_;++_)qo(b,R,_,Q,p)}function jd(p,_,b,R){p[_+0]&&is(p,_+0,b,R),p[_+16]&&is(p,_+16,b,R+4),p[_+32]&&is(p,_+32,b,R+128),p[_+48]&&is(p,_+48,b,R+128+4)}function Nv(p,_,b,R){var Q,G=a(16);for(Q=0;4>Q;++Q){var $=p[_+0+Q]+p[_+12+Q],K=p[_+4+Q]+p[_+8+Q],z=p[_+4+Q]-p[_+8+Q],et=p[_+0+Q]-p[_+12+Q];G[0+Q]=$+K,G[8+Q]=$-K,G[4+Q]=et+z,G[12+Q]=et-z}for(Q=0;4>Q;++Q)$=(p=G[0+4*Q]+3)+G[3+4*Q],K=G[1+4*Q]+G[2+4*Q],z=G[1+4*Q]-G[2+4*Q],et=p-G[3+4*Q],b[R+0]=$+K>>3,b[R+16]=et+z>>3,b[R+32]=$-K>>3,b[R+48]=et-z>>3,R+=64}function Nh(p,_,b){var R,Q=_-32,G=no,$=255-p[Q-1];for(R=0;R<b;++R){var K,z=G,et=$+p[_-1];for(K=0;K<b;++K)p[_+K]=z[et+p[Q+K]];_+=32}}function Ph(p,_){Nh(p,_,4)}function RA(p,_){Nh(p,_,8)}function ku(p,_){Nh(p,_,16)}function Ys(p,_){var b;for(b=0;16>b;++b)n(p,_+32*b,p,_-32,16)}function Hu(p,_){var b;for(b=16;0<b;--b)i(p,_,p[_-1],16),_+=32}function Gu(p,_,b){var R;for(R=0;16>R;++R)i(_,b+32*R,p,16)}function Kd(p,_){var b,R=16;for(b=0;16>b;++b)R+=p[_-1+32*b]+p[_+b-32];Gu(R>>5,p,_)}function ta(p,_){var b,R=8;for(b=0;16>b;++b)R+=p[_-1+32*b];Gu(R>>4,p,_)}function Pv(p,_){var b,R=8;for(b=0;16>b;++b)R+=p[_+b-32];Gu(R>>4,p,_)}function $u(p,_){Gu(128,p,_)}function er(p,_,b){return p+2*_+b+2>>2}function Uv(p,_){var b,R=_-32;for(R=new Uint8Array([er(p[R-1],p[R+0],p[R+1]),er(p[R+0],p[R+1],p[R+2]),er(p[R+1],p[R+2],p[R+3]),er(p[R+2],p[R+3],p[R+4])]),b=0;4>b;++b)n(p,_+32*b,R,0,R.length)}function MA(p,_){var b=p[_-1],R=p[_-1+32],Q=p[_-1+64],G=p[_-1+96];It(p,_+0,16843009*er(p[_-1-32],b,R)),It(p,_+32,16843009*er(b,R,Q)),It(p,_+64,16843009*er(R,Q,G)),It(p,_+96,16843009*er(Q,G,G))}function Jo(p,_){var b,R=4;for(b=0;4>b;++b)R+=p[_+b-32]+p[_-1+32*b];for(R>>=3,b=0;4>b;++b)i(p,_+32*b,R,4)}function Dv(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1-32],$=p[_+0-32],K=p[_+1-32],z=p[_+2-32],et=p[_+3-32];p[_+0+96]=er(R,Q,p[_-1+96]),p[_+1+96]=p[_+0+64]=er(b,R,Q),p[_+2+96]=p[_+1+64]=p[_+0+32]=er(G,b,R),p[_+3+96]=p[_+2+64]=p[_+1+32]=p[_+0+0]=er($,G,b),p[_+3+64]=p[_+2+32]=p[_+1+0]=er(K,$,G),p[_+3+32]=p[_+2+0]=er(z,K,$),p[_+3+0]=er(et,z,K)}function bs(p,_){var b=p[_+1-32],R=p[_+2-32],Q=p[_+3-32],G=p[_+4-32],$=p[_+5-32],K=p[_+6-32],z=p[_+7-32];p[_+0+0]=er(p[_+0-32],b,R),p[_+1+0]=p[_+0+32]=er(b,R,Q),p[_+2+0]=p[_+1+32]=p[_+0+64]=er(R,Q,G),p[_+3+0]=p[_+2+32]=p[_+1+64]=p[_+0+96]=er(Q,G,$),p[_+3+32]=p[_+2+64]=p[_+1+96]=er(G,$,K),p[_+3+64]=p[_+2+96]=er($,K,z),p[_+3+96]=er(K,z,z)}function NA(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1-32],$=p[_+0-32],K=p[_+1-32],z=p[_+2-32],et=p[_+3-32];p[_+0+0]=p[_+1+64]=G+$+1>>1,p[_+1+0]=p[_+2+64]=$+K+1>>1,p[_+2+0]=p[_+3+64]=K+z+1>>1,p[_+3+0]=z+et+1>>1,p[_+0+96]=er(Q,R,b),p[_+0+64]=er(R,b,G),p[_+0+32]=p[_+1+96]=er(b,G,$),p[_+1+32]=p[_+2+96]=er(G,$,K),p[_+2+32]=p[_+3+96]=er($,K,z),p[_+3+32]=er(K,z,et)}function Uh(p,_){var b=p[_+0-32],R=p[_+1-32],Q=p[_+2-32],G=p[_+3-32],$=p[_+4-32],K=p[_+5-32],z=p[_+6-32],et=p[_+7-32];p[_+0+0]=b+R+1>>1,p[_+1+0]=p[_+0+64]=R+Q+1>>1,p[_+2+0]=p[_+1+64]=Q+G+1>>1,p[_+3+0]=p[_+2+64]=G+$+1>>1,p[_+0+32]=er(b,R,Q),p[_+1+32]=p[_+0+96]=er(R,Q,G),p[_+2+32]=p[_+1+96]=er(Q,G,$),p[_+3+32]=p[_+2+96]=er(G,$,K),p[_+3+64]=er($,K,z),p[_+3+96]=er(K,z,et)}function Wd(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1+96];p[_+0+0]=b+R+1>>1,p[_+2+0]=p[_+0+32]=R+Q+1>>1,p[_+2+32]=p[_+0+64]=Q+G+1>>1,p[_+1+0]=er(b,R,Q),p[_+3+0]=p[_+1+32]=er(R,Q,G),p[_+3+32]=p[_+1+64]=er(Q,G,G),p[_+3+64]=p[_+2+64]=p[_+0+96]=p[_+1+96]=p[_+2+96]=p[_+3+96]=G}function Qv(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1+96],$=p[_-1-32],K=p[_+0-32],z=p[_+1-32],et=p[_+2-32];p[_+0+0]=p[_+2+32]=b+$+1>>1,p[_+0+32]=p[_+2+64]=R+b+1>>1,p[_+0+64]=p[_+2+96]=Q+R+1>>1,p[_+0+96]=G+Q+1>>1,p[_+3+0]=er(K,z,et),p[_+2+0]=er($,K,z),p[_+1+0]=p[_+3+32]=er(b,$,K),p[_+1+32]=p[_+3+64]=er(R,b,$),p[_+1+64]=p[_+3+96]=er(Q,R,b),p[_+1+96]=er(G,Q,R)}function zd(p,_){var b;for(b=0;8>b;++b)n(p,_+32*b,p,_-32,8)}function Dh(p,_){var b;for(b=0;8>b;++b)i(p,_,p[_-1],8),_+=32}function Rl(p,_,b){var R;for(R=0;8>R;++R)i(_,b+32*R,p,8)}function PA(p,_){var b,R=8;for(b=0;8>b;++b)R+=p[_+b-32]+p[_-1+32*b];Rl(R>>4,p,_)}function kv(p,_){var b,R=4;for(b=0;8>b;++b)R+=p[_+b-32];Rl(R>>3,p,_)}function Ml(p,_){var b,R=4;for(b=0;8>b;++b)R+=p[_-1+32*b];Rl(R>>3,p,_)}function Vu(p,_){Rl(128,p,_)}function Nl(p,_,b){var R=p[_-b],Q=p[_+0],G=3*(Q-R)+np[1020+p[_-2*b]-p[_+b]],$=ip[112+(G+4>>3)];p[_-b]=no[255+R+ip[112+(G+3>>3)]],p[_+0]=no[255+Q-$]}function Yd(p,_,b,R){var Q=p[_+0],G=p[_+b];return To[255+p[_-2*b]-p[_-b]]>R||To[255+G-Q]>R}function Xs(p,_,b,R){return 4*To[255+p[_-b]-p[_+0]]+To[255+p[_-2*b]-p[_+b]]<=R}function Xd(p,_,b,R,Q){var G=p[_-3*b],$=p[_-2*b],K=p[_-b],z=p[_+0],et=p[_+b],mt=p[_+2*b],Lt=p[_+3*b];return 4*To[255+K-z]+To[255+$-et]>R?0:To[255+p[_-4*b]-G]<=Q&&To[255+G-$]<=Q&&To[255+$-K]<=Q&&To[255+Lt-mt]<=Q&&To[255+mt-et]<=Q&&To[255+et-z]<=Q}function qd(p,_,b,R){var Q=2*R+1;for(R=0;16>R;++R)Xs(p,_+R,b,Q)&&Nl(p,_+R,b)}function qs(p,_,b,R){var Q=2*R+1;for(R=0;16>R;++R)Xs(p,_+R*b,1,Q)&&Nl(p,_+R*b,1)}function UA(p,_,b,R){var Q;for(Q=3;0<Q;--Q)qd(p,_+=4*b,b,R)}function Hv(p,_,b,R){var Q;for(Q=3;0<Q;--Q)qs(p,_+=4,b,R)}function xa(p,_,b,R,Q,G,$,K){for(G=2*G+1;0<Q--;){if(Xd(p,_,b,G,$))if(Yd(p,_,b,K))Nl(p,_,b);else{var z=p,et=_,mt=b,Lt=z[et-2*mt],Ot=z[et-mt],St=z[et+0],Vt=z[et+mt],Pt=z[et+2*mt],wt=27*(Ht=np[1020+3*(St-Ot)+np[1020+Lt-Vt]])+63>>7,bt=18*Ht+63>>7,Ht=9*Ht+63>>7;z[et-3*mt]=no[255+z[et-3*mt]+Ht],z[et-2*mt]=no[255+Lt+bt],z[et-mt]=no[255+Ot+wt],z[et+0]=no[255+St-wt],z[et+mt]=no[255+Vt-bt],z[et+2*mt]=no[255+Pt-Ht]}_+=R}}function ts(p,_,b,R,Q,G,$,K){for(G=2*G+1;0<Q--;){if(Xd(p,_,b,G,$))if(Yd(p,_,b,K))Nl(p,_,b);else{var z=p,et=_,mt=b,Lt=z[et-mt],Ot=z[et+0],St=z[et+mt],Vt=ip[112+((Pt=3*(Ot-Lt))+4>>3)],Pt=ip[112+(Pt+3>>3)],wt=Vt+1>>1;z[et-2*mt]=no[255+z[et-2*mt]+wt],z[et-mt]=no[255+Lt+Pt],z[et+0]=no[255+Ot-Vt],z[et+mt]=no[255+St-wt]}_+=R}}function DA(p,_,b,R,Q,G){xa(p,_,b,1,16,R,Q,G)}function Pl(p,_,b,R,Q,G){xa(p,_,1,b,16,R,Q,G)}function Gv(p,_,b,R,Q,G){var $;for($=3;0<$;--$)ts(p,_+=4*b,b,1,16,R,Q,G)}function ju(p,_,b,R,Q,G){var $;for($=3;0<$;--$)ts(p,_+=4,1,b,16,R,Q,G)}function $v(p,_,b,R,Q,G,$,K){xa(p,_,Q,1,8,G,$,K),xa(b,R,Q,1,8,G,$,K)}function Qh(p,_,b,R,Q,G,$,K){xa(p,_,1,Q,8,G,$,K),xa(b,R,1,Q,8,G,$,K)}function kh(p,_,b,R,Q,G,$,K){ts(p,_+4*Q,Q,1,8,G,$,K),ts(b,R+4*Q,Q,1,8,G,$,K)}function Zd(p,_,b,R,Q,G,$,K){ts(p,_+4,1,Q,8,G,$,K),ts(b,R+4,1,Q,8,G,$,K)}function Ku(){this.ba=new ei,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new zr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Hh(){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 Gh(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Jd(){this.ua=0,this.Wa=new V,this.vb=new V,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new U,this.yc=new S}function Vv(){this.xb=this.a=0,this.l=new Fl,this.ca=new ei,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new M,this.Pb=0,this.wd=new M,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Jd,this.ab=0,this.gc=o(4,Gh),this.Oc=0}function Wu(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Fl,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Gi(p,_,b,R,Q,G,$){for(p=p==null?0:p[_+0],_=0;_<$;++_)Q[G+_]=p+b[R+_]&255,p=Q[G+_]}function zu(p,_,b,R,Q,G,$){var K;if(p==null)Gi(null,null,b,R,Q,G,$);else for(K=0;K<$;++K)Q[G+K]=p[_+K]+b[R+K]&255}function Zs(p,_,b,R,Q,G,$){if(p==null)Gi(null,null,b,R,Q,G,$);else{var K,z=p[_+0],et=z,mt=z;for(K=0;K<$;++K)et=mt+(z=p[_+K])-et,mt=b[R+K]+(-256&et?0>et?0:255:et)&255,et=z,Q[G+K]=mt}}function QA(p,_,b,R){var Q=_.width,G=_.o;if(e(p!=null&&_!=null),0>b||0>=R||b+R>G)return null;if(!p.Cc){if(p.ga==null){var $;if(p.ga=new Wu,($=p.ga==null)||($=_.width*_.o,e(p.Gb.length==0),p.Gb=a($),p.Uc=0,p.Gb==null?$=0:(p.mb=p.Gb,p.nb=p.Uc,p.rc=null,$=1),$=!$),!$){$=p.ga;var K=p.Fa,z=p.P,et=p.qc,mt=p.mb,Lt=p.nb,Ot=z+1,St=et-1,Vt=$.l;if(e(K!=null&&mt!=null&&_!=null),os[0]=null,os[1]=Gi,os[2]=zu,os[3]=Zs,$.ca=mt,$.tb=Lt,$.c=_.width,$.i=_.height,e(0<$.c&&0<$.i),1>=et)_=0;else if($.$a=K[z+0]>>0&3,$.Z=K[z+0]>>2&3,$.Lc=K[z+0]>>4&3,z=K[z+0]>>6&3,0>$.$a||1<$.$a||4<=$.Z||1<$.Lc||z)_=0;else if(Vt.put=di,Vt.ac=yn,Vt.bc=pi,Vt.ma=$,Vt.width=_.width,Vt.height=_.height,Vt.Da=_.Da,Vt.v=_.v,Vt.va=_.va,Vt.j=_.j,Vt.o=_.o,$.$a)t:{e($.$a==1),_=Lr();e:for(;;){if(_==null){_=0;break t}if(e($!=null),$.mc=_,_.c=$.c,_.i=$.i,_.l=$.l,_.l.ma=$,_.l.width=$.c,_.l.height=$.i,_.a=0,nt(_.m,K,Ot,St),!hn($.c,$.i,1,_,null)||(_.ab==1&&_.gc[0].hc==3&&de(_.s)?($.ic=1,K=_.c*_.i,_.Ta=null,_.Ua=0,_.V=a(K),_.Ba=0,_.V==null?(_.a=1,_=0):_=1):($.ic=0,_=fn(_,$.c)),!_))break e;_=1;break t}$.mc=null,_=0}else _=St>=$.c*$.i;$=!_}if($)return null;p.ga.Lc!=1?p.Ga=0:R=G-b}e(p.ga!=null),e(b+R<=G);t:{if(_=(K=p.ga).c,G=K.l.o,K.$a==0){if(Ot=p.rc,St=p.Vc,Vt=p.Fa,z=p.P+1+b*_,et=p.mb,mt=p.nb+b*_,e(z<=p.P+p.qc),K.Z!=0)for(e(os[K.Z]!=null),$=0;$<R;++$)os[K.Z](Ot,St,Vt,z,et,mt,_),Ot=et,St=mt,mt+=_,z+=_;else for($=0;$<R;++$)n(et,mt,Vt,z,_),Ot=et,St=mt,mt+=_,z+=_;p.rc=Ot,p.Vc=St}else{if(e(K.mc!=null),_=b+R,e(($=K.mc)!=null),e(_<=$.i),$.C>=_)_=1;else if(K.ic||xt(),K.ic){K=$.V,Ot=$.Ba,St=$.c;var Pt=$.i,wt=(Vt=1,z=$.$/St,et=$.$%St,mt=$.m,Lt=$.s,$.$),bt=St*Pt,Ht=St*_,jt=Lt.wc,Gt=wt<Ht?Br(Lt,et,z):null;e(wt<=bt),e(_<=Pt),e(de(Lt));e:for(;;){for(;!mt.h&&wt<Ht;){if(et&jt||(Gt=Br(Lt,et,z)),e(Gt!=null),J(mt),256>(Pt=gi(Gt.G[0],Gt.H[0],mt)))K[Ot+wt]=Pt,++wt,++et>=St&&(et=0,++z<=_&&!(z%16)&&$t($,z));else{if(!(280>Pt)){Vt=0;break e}Pt=ri(Pt-256,mt);var pe,ie=gi(Gt.G[4],Gt.H[4],mt);if(J(mt),!(wt>=(ie=Cn(St,ie=ri(ie,mt)))&&bt-wt>=Pt)){Vt=0;break e}for(pe=0;pe<Pt;++pe)K[Ot+wt+pe]=K[Ot+wt+pe-ie];for(wt+=Pt,et+=Pt;et>=St;)et-=St,++z<=_&&!(z%16)&&$t($,z);wt<Ht&&et&jt&&(Gt=Br(Lt,et,z))}e(mt.h==Y(mt))}$t($,z>_?_:z);break e}!Vt||mt.h&&wt<bt?(Vt=0,$.a=mt.h?5:3):$.$=wt,_=Vt}else _=ne($,$.V,$.Ba,$.c,$.i,_,Xo);if(!_){R=0;break t}}b+R>=G&&(p.Cc=1),R=1}if(!R)return null;if(p.Cc&&((R=p.ga)!=null&&(R.mc=null),p.ga=null,0<p.Ga))return alert("todo:WebPDequantizeLevels"),null}return p.nb+b*Q}function E(p,_,b,R,Q,G){for(;0<Q--;){var $,K=p,z=_+(b?1:0),et=p,mt=_+(b?0:3);for($=0;$<R;++$){var Lt=et[mt+4*$];Lt!=255&&(Lt*=32897,K[z+4*$+0]=K[z+4*$+0]*Lt>>23,K[z+4*$+1]=K[z+4*$+1]*Lt>>23,K[z+4*$+2]=K[z+4*$+2]*Lt>>23)}_+=G}}function k(p,_,b,R,Q){for(;0<R--;){var G;for(G=0;G<b;++G){var $=p[_+2*G+0],K=15&(et=p[_+2*G+1]),z=4369*K,et=(240&et|et>>4)*z>>16;p[_+2*G+0]=(240&$|$>>4)*z>>16&240|(15&$|$<<4)*z>>16>>4&15,p[_+2*G+1]=240&et|K}_+=Q}}function st(p,_,b,R,Q,G,$,K){var z,et,mt=255;for(et=0;et<Q;++et){for(z=0;z<R;++z){var Lt=p[_+z];G[$+4*z]=Lt,mt&=Lt}_+=b,$+=K}return mt!=255}function gt(p,_,b,R,Q){var G;for(G=0;G<Q;++G)b[R+G]=p[_+G]>>8}function xt(){VA=E,rc=k,rp=st,Ls=gt}function Ut(p,_,b){T[p]=function(R,Q,G,$,K,z,et,mt,Lt,Ot,St,Vt,Pt,wt,bt,Ht,jt){var Gt,pe=jt-1>>1,ie=K[z+0]|et[mt+0]<<16,Ge=Lt[Ot+0]|St[Vt+0]<<16;e(R!=null);var le=3*ie+Ge+131074>>2;for(_(R[Q+0],255&le,le>>16,Pt,wt),G!=null&&(le=3*Ge+ie+131074>>2,_(G[$+0],255&le,le>>16,bt,Ht)),Gt=1;Gt<=pe;++Gt){var mr=K[z+Gt]|et[mt+Gt]<<16,Xr=Lt[Ot+Gt]|St[Vt+Gt]<<16,Pr=ie+mr+Ge+Xr+524296,Tr=Pr+2*(mr+Ge)>>3;le=Tr+ie>>1,ie=(Pr=Pr+2*(ie+Xr)>>3)+mr>>1,_(R[Q+2*Gt-1],255&le,le>>16,Pt,wt+(2*Gt-1)*b),_(R[Q+2*Gt-0],255&ie,ie>>16,Pt,wt+(2*Gt-0)*b),G!=null&&(le=Pr+Ge>>1,ie=Tr+Xr>>1,_(G[$+2*Gt-1],255&le,le>>16,bt,Ht+(2*Gt-1)*b),_(G[$+2*Gt+0],255&ie,ie>>16,bt,Ht+(2*Gt+0)*b)),ie=mr,Ge=Xr}1&jt||(le=3*ie+Ge+131074>>2,_(R[Q+jt-1],255&le,le>>16,Pt,wt+(jt-1)*b),G!=null&&(le=3*Ge+ie+131074>>2,_(G[$+jt-1],255&le,le>>16,bt,Ht+(jt-1)*b)))}}function Yt(){So[ap]=lN,So[op]=p_,So[u_]=qv,So[sp]=g_,So[Ap]=Zv,So[Xh]=v_,So[c_]=Ab,So[nc]=p_,So[Wv]=g_,So[qh]=Zv,So[lp]=v_}function ce(p){return p&~uN?0>p?0:255:p>>tm}function De(p,_){return ce((19077*p>>8)+(26149*_>>8)-14234)}function vr(p,_,b){return ce((19077*p>>8)-(6419*_>>8)-(13320*b>>8)+8708)}function ir(p,_){return ce((19077*p>>8)+(33050*_>>8)-17685)}function br(p,_,b,R,Q){R[Q+0]=De(p,b),R[Q+1]=vr(p,_,b),R[Q+2]=ir(p,_)}function $i(p,_,b,R,Q){R[Q+0]=ir(p,_),R[Q+1]=vr(p,_,b),R[Q+2]=De(p,b)}function jn(p,_,b,R,Q){var G=vr(p,_,b);_=G<<3&224|ir(p,_)>>3,R[Q+0]=248&De(p,b)|G>>5,R[Q+1]=_}function ni(p,_,b,R,Q){var G=240&ir(p,_)|15;R[Q+0]=240&De(p,b)|vr(p,_,b)>>4,R[Q+1]=G}function ea(p,_,b,R,Q){R[Q+0]=255,br(p,_,b,R,Q+1)}function mi(p,_,b,R,Q){$i(p,_,b,R,Q),R[Q+3]=255}function es(p,_,b,R,Q){br(p,_,b,R,Q),R[Q+3]=255}function ro(p,_){return 0>p?0:p>_?_:p}function Ts(p,_,b){T[p]=function(R,Q,G,$,K,z,et,mt,Lt){for(var Ot=mt+(-2&Lt)*b;mt!=Ot;)_(R[Q+0],G[$+0],K[z+0],et,mt),_(R[Q+1],G[$+0],K[z+0],et,mt+b),Q+=2,++$,++z,mt+=2*b;1&Lt&&_(R[Q+0],G[$+0],K[z+0],et,mt)}}function tp(p,_,b){return b==0?p==0?_==0?6:5:_==0?4:0:b}function ep(p,_,b,R,Q){switch(p>>>30){case 3:La(_,b,R,Q,0);break;case 2:ec(_,b,R,Q);break;case 1:is(_,b,R,Q)}}function ha(p,_){var b,R,Q=_.M,G=_.Nb,$=p.oc,K=p.pc+40,z=p.oc,et=p.pc+584,mt=p.oc,Lt=p.pc+600;for(b=0;16>b;++b)$[K+32*b-1]=129;for(b=0;8>b;++b)z[et+32*b-1]=129,mt[Lt+32*b-1]=129;for(0<Q?$[K-1-32]=z[et-1-32]=mt[Lt-1-32]=129:(i($,K-32-1,127,21),i(z,et-32-1,127,9),i(mt,Lt-32-1,127,9)),R=0;R<p.za;++R){var Ot=_.ya[_.aa+R];if(0<R){for(b=-1;16>b;++b)n($,K+32*b-4,$,K+32*b+12,4);for(b=-1;8>b;++b)n(z,et+32*b-4,z,et+32*b+4,4),n(mt,Lt+32*b-4,mt,Lt+32*b+4,4)}var St=p.Gd,Vt=p.Hd+R,Pt=Ot.ad,wt=Ot.Hc;if(0<Q&&(n($,K-32,St[Vt].y,0,16),n(z,et-32,St[Vt].f,0,8),n(mt,Lt-32,St[Vt].ea,0,8)),Ot.Za){var bt=$,Ht=K-32+16;for(0<Q&&(R>=p.za-1?i(bt,Ht,St[Vt].y[15],4):n(bt,Ht,St[Vt+1].y,0,4)),b=0;4>b;b++)bt[Ht+128+b]=bt[Ht+256+b]=bt[Ht+384+b]=bt[Ht+0+b];for(b=0;16>b;++b,wt<<=2)bt=$,Ht=K+m_[b],as[Ot.Ob[b]](bt,Ht),ep(wt,Pt,16*+b,bt,Ht)}else if(bt=tp(R,Q,Ot.Ob[0]),jA[bt]($,K),wt!=0)for(b=0;16>b;++b,wt<<=2)ep(wt,Pt,16*+b,$,K+m_[b]);for(b=Ot.Gc,bt=tp(R,Q,Ot.Dd),rA[bt](z,et),rA[bt](mt,Lt),wt=Pt,bt=z,Ht=et,255&(Ot=b>>0)&&(170&Ot?GA(wt,256,bt,Ht):Is(wt,256,bt,Ht)),Ot=mt,wt=Lt,255&(b>>=8)&&(170&b?GA(Pt,320,Ot,wt):Is(Pt,320,Ot,wt)),Q<p.Ub-1&&(n(St[Vt].y,0,$,K+480,16),n(St[Vt].f,0,z,et+224,8),n(St[Vt].ea,0,mt,Lt+224,8)),b=8*G*p.B,St=p.sa,Vt=p.ta+16*R+16*G*p.R,Pt=p.qa,Ot=p.ra+8*R+b,wt=p.Ha,bt=p.Ia+8*R+b,b=0;16>b;++b)n(St,Vt+b*p.R,$,K+32*b,16);for(b=0;8>b;++b)n(Pt,Ot+b*p.B,z,et+32*b,8),n(wt,bt+b*p.B,mt,Lt+32*b,8)}}function Yu(p,_,b,R,Q,G,$,K,z){var et=[0],mt=[0],Lt=0,Ot=z!=null?z.kd:0,St=z??new Hh;if(p==null||12>b)return 7;St.data=p,St.w=_,St.ha=b,_=[_],b=[b],St.gb=[St.gb];t:{var Vt=_,Pt=b,wt=St.gb;if(e(p!=null),e(Pt!=null),e(wt!=null),wt[0]=0,12<=Pt[0]&&!t(p,Vt[0],"RIFF")){if(t(p,Vt[0]+8,"WEBP")){wt=3;break t}var bt=Z(p,Vt[0]+4);if(12>bt||4294967286<bt){wt=3;break t}if(Ot&&bt>Pt[0]-8){wt=7;break t}wt[0]=bt,Vt[0]+=12,Pt[0]-=12}wt=0}if(wt!=0)return wt;for(bt=0<St.gb[0],b=b[0];;){t:{var Ht=p;Pt=_,wt=b;var jt=et,Gt=mt,pe=Vt=[0];if((le=Lt=[Lt])[0]=0,8>wt[0])wt=7;else{if(!t(Ht,Pt[0],"VP8X")){if(Z(Ht,Pt[0]+4)!=10){wt=3;break t}if(18>wt[0]){wt=7;break t}var ie=Z(Ht,Pt[0]+8),Ge=1+j(Ht,Pt[0]+12);if(2147483648<=Ge*(Ht=1+j(Ht,Pt[0]+15))){wt=3;break t}pe!=null&&(pe[0]=ie),jt!=null&&(jt[0]=Ge),Gt!=null&&(Gt[0]=Ht),Pt[0]+=18,wt[0]-=18,le[0]=1}wt=0}}if(Lt=Lt[0],Vt=Vt[0],wt!=0)return wt;if(Pt=!!(2&Vt),!bt&&Lt)return 3;if(G!=null&&(G[0]=!!(16&Vt)),$!=null&&($[0]=Pt),K!=null&&(K[0]=0),$=et[0],Vt=mt[0],Lt&&Pt&&z==null){wt=0;break}if(4>b){wt=7;break}if(bt&&Lt||!bt&&!Lt&&!t(p,_[0],"ALPH")){b=[b],St.na=[St.na],St.P=[St.P],St.Sa=[St.Sa];t:{ie=p,wt=_,bt=b;var le=St.gb;jt=St.na,Gt=St.P,pe=St.Sa,Ge=22,e(ie!=null),e(bt!=null),Ht=wt[0];var mr=bt[0];for(e(jt!=null),e(pe!=null),jt[0]=null,Gt[0]=null,pe[0]=0;;){if(wt[0]=Ht,bt[0]=mr,8>mr){wt=7;break t}var Xr=Z(ie,Ht+4);if(4294967286<Xr){wt=3;break t}var Pr=8+Xr+1&-2;if(Ge+=Pr,0<le&&Ge>le){wt=3;break t}if(!t(ie,Ht,"VP8 ")||!t(ie,Ht,"VP8L")){wt=0;break t}if(mr[0]<Pr){wt=7;break t}t(ie,Ht,"ALPH")||(jt[0]=ie,Gt[0]=Ht+8,pe[0]=Xr),Ht+=Pr,mr-=Pr}}if(b=b[0],St.na=St.na[0],St.P=St.P[0],St.Sa=St.Sa[0],wt!=0)break}b=[b],St.Ja=[St.Ja],St.xa=[St.xa];t:if(le=p,wt=_,bt=b,jt=St.gb[0],Gt=St.Ja,pe=St.xa,ie=wt[0],Ht=!t(le,ie,"VP8 "),Ge=!t(le,ie,"VP8L"),e(le!=null),e(bt!=null),e(Gt!=null),e(pe!=null),8>bt[0])wt=7;else{if(Ht||Ge){if(le=Z(le,ie+4),12<=jt&&le>jt-12){wt=3;break t}if(Ot&&le>bt[0]-8){wt=7;break t}Gt[0]=le,wt[0]+=8,bt[0]-=8,pe[0]=Ge}else pe[0]=5<=bt[0]&&le[ie+0]==47&&!(le[ie+4]>>5),Gt[0]=bt[0];wt=0}if(b=b[0],St.Ja=St.Ja[0],St.xa=St.xa[0],_=_[0],wt!=0)break;if(4294967286<St.Ja)return 3;if(K==null||Pt||(K[0]=St.xa?2:1),$=[$],Vt=[Vt],St.xa){if(5>b){wt=7;break}K=$,Ot=Vt,Pt=G,p==null||5>b?p=0:5<=b&&p[_+0]==47&&!(p[_+4]>>5)?(bt=[0],le=[0],jt=[0],nt(Gt=new M,p,_,b),Ue(Gt,bt,le,jt)?(K!=null&&(K[0]=bt[0]),Ot!=null&&(Ot[0]=le[0]),Pt!=null&&(Pt[0]=jt[0]),p=1):p=0):p=0}else{if(10>b){wt=7;break}K=Vt,p==null||10>b||!kd(p,_+3,b-3)?p=0:(Ot=p[_+0]|p[_+1]<<8|p[_+2]<<16,Pt=16383&(p[_+7]<<8|p[_+6]),p=16383&(p[_+9]<<8|p[_+8]),1&Ot||3<(Ot>>1&7)||!(Ot>>4&1)||Ot>>5>=St.Ja||!Pt||!p?p=0:($&&($[0]=Pt),K&&(K[0]=p),p=1))}if(!p||($=$[0],Vt=Vt[0],Lt&&(et[0]!=$||mt[0]!=Vt)))return 3;z!=null&&(z[0]=St,z.offset=_-z.w,e(4294967286>_-z.w),e(z.offset==z.ha-b));break}return wt==0||wt==7&&Lt&&z==null?(G!=null&&(G[0]|=St.na!=null&&0<St.na.length),R!=null&&(R[0]=$),Q!=null&&(Q[0]=Vt),0):wt}function $h(p,_,b){var R=_.width,Q=_.height,G=0,$=0,K=R,z=Q;if(_.Da=p!=null&&0<p.Da,_.Da&&(K=p.cd,z=p.bd,G=p.v,$=p.j,11>b||(G&=-2,$&=-2),0>G||0>$||0>=K||0>=z||G+K>R||$+z>Q))return 0;if(_.v=G,_.j=$,_.va=G+K,_.o=$+z,_.U=K,_.T=z,_.da=p!=null&&0<p.da,_.da){if(!Ft(K,z,b=[p.ib],G=[p.hb]))return 0;_.ib=b[0],_.hb=G[0]}return _.ob=p!=null&&p.ob,_.Kb=p==null||!p.Sd,_.da&&(_.ob=_.ib<3*R/4&&_.hb<3*Q/4,_.Kb=0),1}function Vh(p){if(p==null)return 2;if(11>p.S){var _=p.f.RGBA;_.fb+=(p.height-1)*_.A,_.A=-_.A}else _=p.f.kb,p=p.height,_.O+=(p-1)*_.fa,_.fa=-_.fa,_.N+=(p-1>>1)*_.Ab,_.Ab=-_.Ab,_.W+=(p-1>>1)*_.Db,_.Db=-_.Db,_.F!=null&&(_.J+=(p-1)*_.lb,_.lb=-_.lb);return 0}function Xu(p,_,b,R){if(R==null||0>=p||0>=_)return 2;if(b!=null){if(b.Da){var Q=b.cd,G=b.bd,$=-2&b.v,K=-2&b.j;if(0>$||0>K||0>=Q||0>=G||$+Q>p||K+G>_)return 2;p=Q,_=G}if(b.da){if(!Ft(p,_,Q=[b.ib],G=[b.hb]))return 2;p=Q[0],_=G[0]}}R.width=p,R.height=_;t:{var z=R.width,et=R.height;if(p=R.S,0>=z||0>=et||!(p>=ap&&13>p))p=2;else{if(0>=R.Rd&&R.sd==null){$=G=Q=_=0;var mt=(K=z*y_[p])*et;if(11>p||(G=(et+1)/2*(_=(z+1)/2),p==12&&($=(Q=z)*et)),(et=a(mt+2*G+$))==null){p=1;break t}R.sd=et,11>p?((z=R.f.RGBA).eb=et,z.fb=0,z.A=K,z.size=mt):((z=R.f.kb).y=et,z.O=0,z.fa=K,z.Fd=mt,z.f=et,z.N=0+mt,z.Ab=_,z.Cd=G,z.ea=et,z.W=0+mt+G,z.Db=_,z.Ed=G,p==12&&(z.F=et,z.J=0+mt+2*G),z.Tc=$,z.lb=Q)}if(_=1,Q=R.S,G=R.width,$=R.height,Q>=ap&&13>Q)if(11>Q)p=R.f.RGBA,_&=(K=Math.abs(p.A))*($-1)+G<=p.size,_&=K>=G*y_[Q],_&=p.eb!=null;else{p=R.f.kb,K=(G+1)/2,mt=($+1)/2,z=Math.abs(p.fa),et=Math.abs(p.Ab);var Lt=Math.abs(p.Db),Ot=Math.abs(p.lb),St=Ot*($-1)+G;_&=z*($-1)+G<=p.Fd,_&=et*(mt-1)+K<=p.Cd,_=(_&=Lt*(mt-1)+K<=p.Ed)&z>=G&et>=K&Lt>=K,_&=p.y!=null,_&=p.f!=null,_&=p.ea!=null,Q==12&&(_&=Ot>=G,_&=St<=p.Tc,_&=p.F!=null)}else _=0;p=_?0:2}}return p!=0||b!=null&&b.fd&&(p=Vh(R)),p}var fa=64,Ul=[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],qu=24,Zu=32,jh=8,Ia=[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];Bt("Predictor0","PredictorAdd0"),T.Predictor0=function(){return 4278190080},T.Predictor1=function(p){return p},T.Predictor2=function(p,_,b){return _[b+0]},T.Predictor3=function(p,_,b){return _[b+1]},T.Predictor4=function(p,_,b){return _[b-1]},T.Predictor5=function(p,_,b){return Rt(Rt(p,_[b+1]),_[b+0])},T.Predictor6=function(p,_,b){return Rt(p,_[b-1])},T.Predictor7=function(p,_,b){return Rt(p,_[b+0])},T.Predictor8=function(p,_,b){return Rt(_[b-1],_[b+0])},T.Predictor9=function(p,_,b){return Rt(_[b+0],_[b+1])},T.Predictor10=function(p,_,b){return Rt(Rt(p,_[b-1]),Rt(_[b+0],_[b+1]))},T.Predictor11=function(p,_,b){var R=_[b+0];return 0>=Wt(R>>24&255,p>>24&255,(_=_[b-1])>>24&255)+Wt(R>>16&255,p>>16&255,_>>16&255)+Wt(R>>8&255,p>>8&255,_>>8&255)+Wt(255&R,255&p,255&_)?R:p},T.Predictor12=function(p,_,b){var R=_[b+0];return(Nt((p>>24&255)+(R>>24&255)-((_=_[b-1])>>24&255))<<24|Nt((p>>16&255)+(R>>16&255)-(_>>16&255))<<16|Nt((p>>8&255)+(R>>8&255)-(_>>8&255))<<8|Nt((255&p)+(255&R)-(255&_)))>>>0},T.Predictor13=function(p,_,b){var R=_[b-1];return(Dt((p=Rt(p,_[b+0]))>>24&255,R>>24&255)<<24|Dt(p>>16&255,R>>16&255)<<16|Dt(p>>8&255,R>>8&255)<<8|Dt(p>>0&255,R>>0&255))>>>0};var jv=T.PredictorAdd0;T.PredictorAdd1=te,Bt("Predictor2","PredictorAdd2"),Bt("Predictor3","PredictorAdd3"),Bt("Predictor4","PredictorAdd4"),Bt("Predictor5","PredictorAdd5"),Bt("Predictor6","PredictorAdd6"),Bt("Predictor7","PredictorAdd7"),Bt("Predictor8","PredictorAdd8"),Bt("Predictor9","PredictorAdd9"),Bt("Predictor10","PredictorAdd10"),Bt("Predictor11","PredictorAdd11"),Bt("Predictor12","PredictorAdd12"),Bt("Predictor13","PredictorAdd13");var Kh=T.PredictorAdd2;fe("ColorIndexInverseTransform","MapARGB","32b",function(p){return p>>8&255},function(p){return p}),fe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(p){return p},function(p){return p>>8&255});var Wh,rs=T.ColorIndexInverseTransform,Ju=T.MapARGB,zh=T.VP8LColorIndexInverseTransformAlpha,Kv=T.MapAlpha,kA=T.VP8LPredictorsAdd=[];kA.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var Bo,ns,HA,Ss,da,tc,xs,La,ec,GA,is,Is,$A,Dl,Ql,Js,Yh,bo,tA,dn,pn,Kn,yi,eA,VA,rc,rp,Ls,a_=a(511),o_=a(2041),s_=a(225),A_=a(767),l_=0,np=o_,ip=s_,no=A_,To=a_,ap=0,op=1,u_=2,sp=3,Ap=4,Xh=5,c_=6,nc=7,Wv=8,qh=9,lp=10,Zh=[2,3,7],zv=[3,3,11],h_=[280,256,256,256,40],qB=[0,1,1,1,0],ZB=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],JB=[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],tb=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],eb=8,Yv=[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],Xv=[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],Jh=null,rb=[[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]],nb=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],f_=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],ib=[[[[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]]]],ab=[[[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]]],ob=[[[[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]]]],kl=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],jA=[],as=[],rA=[],sb=1,d_=2,os=[],So=[];Ut("UpsampleRgbLinePair",br,3),Ut("UpsampleBgrLinePair",$i,3),Ut("UpsampleRgbaLinePair",es,4),Ut("UpsampleBgraLinePair",mi,4),Ut("UpsampleArgbLinePair",ea,4),Ut("UpsampleRgba4444LinePair",ni,2),Ut("UpsampleRgb565LinePair",jn,2);var lN=T.UpsampleRgbLinePair,qv=T.UpsampleBgrLinePair,p_=T.UpsampleRgbaLinePair,g_=T.UpsampleBgraLinePair,Zv=T.UpsampleArgbLinePair,v_=T.UpsampleRgba4444LinePair,Ab=T.UpsampleRgb565LinePair,nA=16,up=1<<nA-1,Hl=-227,Jv=482,tm=6,uN=(256<<tm)-1,lb=0,ub=a(256),cb=a(256),hb=a(256),fb=a(256),db=a(Jv-Hl),tf=a(Jv-Hl);Ts("YuvToRgbRow",br,3),Ts("YuvToBgrRow",$i,3),Ts("YuvToRgbaRow",es,4),Ts("YuvToBgraRow",mi,4),Ts("YuvToArgbRow",ea,4),Ts("YuvToRgba4444Row",ni,2),Ts("YuvToRgb565Row",jn,2);var m_=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],em=[0,2,8],Gl=[8,7,6,4,4,2,2,2,1,1,1,1],pb=1;this.WebPDecodeRGBA=function(p,_,b,R,Q){var G=op,$=new Ku,K=new ei;$.ba=K,K.S=G,K.width=[K.width],K.height=[K.height];var z=K.width,et=K.height,mt=new Wr;if(mt==null||p==null)var Lt=2;else e(mt!=null),Lt=Yu(p,_,b,mt.width,mt.height,mt.Pd,mt.Qd,mt.format,null);if(Lt!=0?z=0:(z!=null&&(z[0]=mt.width[0]),et!=null&&(et[0]=mt.height[0]),z=1),z){K.width=K.width[0],K.height=K.height[0],R!=null&&(R[0]=K.width),Q!=null&&(Q[0]=K.height);t:{if(R=new Fl,(Q=new Hh).data=p,Q.w=_,Q.ha=b,Q.kd=1,_=[0],e(Q!=null),((p=Yu(Q.data,Q.w,Q.ha,null,null,null,_,null,Q))==0||p==7)&&_[0]&&(p=4),(_=p)==0){if(e($!=null),R.data=Q.data,R.w=Q.w+Q.offset,R.ha=Q.ha-Q.offset,R.put=di,R.ac=yn,R.bc=pi,R.ma=$,Q.xa){if((p=Lr())==null){$=1;break t}if(function(Ot,St){var Vt=[0],Pt=[0],wt=[0];e:for(;;){if(Ot==null)return 0;if(St==null)return Ot.a=2,0;if(Ot.l=St,Ot.a=0,nt(Ot.m,St.data,St.w,St.ha),!Ue(Ot.m,Vt,Pt,wt)){Ot.a=3;break e}if(Ot.xb=d_,St.width=Vt[0],St.height=Pt[0],!hn(Vt[0],Pt[0],1,Ot,null))break e;return 1}return e(Ot.a!=0),0}(p,R)){if(R=(_=Xu(R.width,R.height,$.Oa,$.ba))==0){e:{R=p;r:for(;;){if(R==null){R=0;break e}if(e(R.s.yc!=null),e(R.s.Ya!=null),e(0<R.s.Wb),e((b=R.l)!=null),e((Q=b.ma)!=null),R.xb!=0){if(R.ca=Q.ba,R.tb=Q.tb,e(R.ca!=null),!$h(Q.Oa,b,sp)){R.a=2;break r}if(!fn(R,b.width)||b.da)break r;if((b.da||se(R.ca.S))&&xt(),11>R.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),R.ca.f.kb.F!=null&&xt()),R.Pb&&0<R.s.ua&&R.s.vb.X==null&&!ft(R.s.vb,R.s.Wa.Xa)){R.a=1;break r}R.xb=0}if(!ne(R,R.V,R.Ba,R.c,R.i,b.o,eo))break r;Q.Dc=R.Ma,R=1;break e}e(R.a!=0),R=0}R=!R}R&&(_=p.a)}else _=p.a}else{if((p=new Ov)==null){$=1;break t}if(p.Fa=Q.na,p.P=Q.P,p.qc=Q.Sa,Hd(p,R)){if((_=Xu(R.width,R.height,$.Oa,$.ba))==0){if(p.Aa=0,b=$.Oa,e((Q=p)!=null),b!=null){if(0<(z=0>(z=b.Md)?0:100<z?255:255*z/100)){for(et=mt=0;4>et;++et)12>(Lt=Q.pb[et]).lc&&(Lt.ia=z*Gl[0>Lt.lc?0:Lt.lc]>>3),mt|=Lt.ia;mt&&(alert("todo:VP8InitRandom"),Q.ia=1)}Q.Ga=b.Id,100<Q.Ga?Q.Ga=100:0>Q.Ga&&(Q.Ga=0)}Fv(p,R)||(_=p.a)}}else _=p.a}_==0&&$.Oa!=null&&$.Oa.fd&&(_=Vh($.ba))}$=_}G=$!=0?null:11>G?K.f.RGBA.eb:K.f.kb.y}else G=null;return G};var y_=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(T,L){for(var N="",x=0;x<4;x++)N+=String.fromCharCode(T[L++]);return N}function u(T,L){return(T[L+0]<<0|T[L+1]<<8|T[L+2]<<16)>>>0}function c(T,L){return(T[L+0]<<0|T[L+1]<<8|T[L+2]<<16|T[L+3]<<24)>>>0}new A;var h=[0],f=[0],d=[],g=new A,m=r,v=function(T,L){var N={},x=0,S=!1,P=0,U=0;if(N.frames=[],!function(W,Y,H,J){for(var ot=0;ot<J;ot++)if(W[Y+ot]!=H.charCodeAt(ot))return!0;return!1}(T,L,"RIFF",4)){var tt,q;for(c(T,L+=4),L+=8;L<T.length;){var rt=l(T,L),nt=c(T,L+=4);L+=4;var At=nt+(1&nt);switch(rt){case"VP8 ":case"VP8L":N.frames[x]===void 0&&(N.frames[x]={}),(M=N.frames[x]).src_off=S?U:L-8,M.src_size=P+nt+8,x++,S&&(S=!1,P=0,U=0);break;case"VP8X":(M=N.header={}).feature_flags=T[L];var ct=L+4;M.canvas_width=1+u(T,ct),ct+=3,M.canvas_height=1+u(T,ct),ct+=3;break;case"ALPH":S=!0,P=At+8,U=L-8;break;case"ANIM":(M=N.header).bgcolor=c(T,L),ct=L+4,M.loop_count=(tt=T)[(q=ct)+0]<<0|tt[q+1]<<8,ct+=2;break;case"ANMF":var Tt,M;(M=N.frames[x]={}).offset_x=2*u(T,L),L+=3,M.offset_y=2*u(T,L),L+=3,M.width=1+u(T,L),L+=3,M.height=1+u(T,L),L+=3,M.duration=u(T,L),L+=3,Tt=T[L++],M.dispose=1&Tt,M.blend=Tt>>1&1}rt!="ANMF"&&(L+=At)}return N}}(m,0);v.response=m,v.rgbaoutput=!0,v.dataurl=!1;var y=v.header?v.header:null,w=v.frames?v.frames:null;if(y){y.loop_counter=y.loop_count,h=[y.canvas_height],f=[y.canvas_width];for(var C=0;C<w.length&&w[C].blend!=0;C++);}var O=w[0],F=g.WebPDecodeRGBA(m,O.src_off,O.src_size,f,h);O.rgba=F,O.imgwidth=f[0],O.imgheight=h[0];for(var I=0;I<f[0]*h[0]*4;I++)d[I]=F[I];return this.width=f,this.height=h,this.data=d,this}(function(r){var e=function(){return typeof pI=="function"},t=function(h,f,d,g){var m=4,v=o;switch(g){case r.image_compression.FAST:m=1,v=a;break;case r.image_compression.MEDIUM:m=6,v=s;break;case r.image_compression.SLOW:m=9,v=A}h=n(h,f,d,v);var y=pI(h,{level:m});return r.__addimage__.arrayBufferToBinaryString(y)},n=function(h,f,d,g){for(var m,v,y,w=h.length/f,C=new Uint8Array(h.length+w),O=u(),F=0;F<w;F+=1){if(y=F*f,m=h.subarray(y,y+f),g)C.set(g(m,d,v),y+F);else{for(var I,T=O.length,L=[];I<T;I+=1)L[I]=O[I](m,d,v);var N=c(L.concat());C.set(L[N],y+F)}v=m}return C},i=function(h){var f=Array.apply([],h);return f.unshift(0),f},a=function(h,f){var d,g=[],m=h.length;g[0]=1;for(var v=0;v<m;v+=1)d=h[v-f]||0,g[v+1]=h[v]-d+256&255;return g},o=function(h,f,d){var g,m=[],v=h.length;m[0]=2;for(var y=0;y<v;y+=1)g=d&&d[y]||0,m[y+1]=h[y]-g+256&255;return m},s=function(h,f,d){var g,m,v=[],y=h.length;v[0]=3;for(var w=0;w<y;w+=1)g=h[w-f]||0,m=d&&d[w]||0,v[w+1]=h[w]+256-(g+m>>>1)&255;return v},A=function(h,f,d){var g,m,v,y,w=[],C=h.length;w[0]=4;for(var O=0;O<C;O+=1)g=h[O-f]||0,m=d&&d[O]||0,v=d&&d[O-f]||0,y=l(g,m,v),w[O+1]=h[O]-y+256&255;return w},l=function(h,f,d){if(h===f&&f===d)return h;var g=Math.abs(f-d),m=Math.abs(h-d),v=Math.abs(h+f-d-d);return g<=m&&g<=v?h:m<=v?f:d},u=function(){return[i,a,o,s,A]},c=function(h){var f=h.map(function(d){return d.reduce(function(g,m){return g+Math.abs(m)},0)});return f.indexOf(Math.min.apply(null,f))};r.processPNG=function(h,f,d,g){var m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt=this.decode.FLATE_DECODE,q="";if(this.__addimage__.isArrayBuffer(h)&&(h=new Uint8Array(h)),this.__addimage__.isArrayBufferView(h)){if(h=(y=new $ut(h)).imgData,v=y.bits,m=y.colorSpace,C=y.colors,[4,6].indexOf(y.colorType)!==-1){if(y.bits===8){T=(I=y.pixelBitlength==32?new Uint32Array(y.decodePixels().buffer):y.pixelBitlength==16?new Uint16Array(y.decodePixels().buffer):new Uint8Array(y.decodePixels().buffer)).length,N=new Uint8Array(T*y.colors),L=new Uint8Array(T);var rt,nt=y.pixelBitlength-y.bits;for(P=0,U=0;P<T;P++){for(S=I[P],rt=0;rt<nt;)N[U++]=S>>>rt&255,rt+=y.bits;L[P]=S>>>rt&255}}if(y.bits===16){T=(I=new Uint32Array(y.decodePixels().buffer)).length,N=new Uint8Array(T*(32/y.pixelBitlength)*y.colors),L=new Uint8Array(T*(32/y.pixelBitlength)),x=y.colors>1,P=0,U=0;for(var At=0;P<T;)S=I[P++],N[U++]=S>>>0&255,x&&(N[U++]=S>>>16&255,S=I[P++],N[U++]=S>>>0&255),L[At++]=S>>>16&255;v=8}g!==r.image_compression.NONE&&e()?(h=t(N,y.width*y.colors,y.colors,g),F=t(L,y.width,1,g)):(h=N,F=L,tt=void 0)}if(y.colorType===3&&(m=this.color_spaces.INDEXED,O=y.palette,y.transparency.indexed)){var ct=y.transparency.indexed,Tt=0;for(P=0,T=ct.length;P<T;++P)Tt+=ct[P];if((Tt/=255)===T-1&&ct.indexOf(0)!==-1)w=[ct.indexOf(0)];else if(Tt!==T){for(I=y.decodePixels(),L=new Uint8Array(I.length),P=0,T=I.length;P<T;P++)L[P]=ct[I[P]];F=t(L,y.width,1)}}var M=function(W){var Y;switch(W){case r.image_compression.FAST:Y=11;break;case r.image_compression.MEDIUM:Y=13;break;case r.image_compression.SLOW:Y=14;break;default:Y=12}return Y}(g);return tt===this.decode.FLATE_DECODE&&(q="/Predictor "+M+" "),q+="/Colors "+C+" /BitsPerComponent "+v+" /Columns "+y.width,(this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),(F&&this.__addimage__.isArrayBuffer(F)||this.__addimage__.isArrayBufferView(F))&&(F=this.__addimage__.arrayBufferToBinaryString(F)),{alias:d,data:h,index:f,filter:tt,decodeParameters:q,transparency:w,palette:O,sMask:F,predictor:M,width:y.width,height:y.height,bitsPerComponent:v,colorSpace:m}}}})(We.API),function(r){r.processGIF89A=function(e,t,n,i){var a=new Vut(e),o=a.width,s=a.height,A=[];a.decodeAndBlitFrameRGBA(0,A);var l={data:A,width:o,height:s},u=new dT(100).encode(l,100);return r.processJPEG.call(this,u,t,n,i)},r.processGIF87A=r.processGIF89A}(We.API),oA.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)},oA.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){Bn.log("bit decode error:"+t)}},oA.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)}},oA.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)}},oA.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)}},oA.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}},oA.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}},oA.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}},oA.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}},oA.prototype.getData=function(){return this.data},function(r){r.processBMP=function(e,t,n,i){var a=new oA(e,!1),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new dT(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(We.API),K5.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(e,t,n,i){var a=new K5(e),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new dT(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(We.API),We.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 d=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:d,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},We.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},mp=We.API,i1=mp.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,d=0,g=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&&mn(l[n])==="object"&&!isNaN(parseInt(l[n][d],10))?l[n][d]/u:0,m.push((s[n]||g)/A+h)),d=n;return m},G5=mp.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 mp.processArabic&&(r=mp.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,t,i)/t:i1.apply(this,arguments).reduce(function(a,o){return a+o},0)},$5=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},V5=function(r,e,t){t||(t={});var n,i,a,o,s,A,l,u=[],c=[u],h=t.textIndent||0,f=0,d=0,g=r.split(" "),m=i1.apply(this,[" ",t])[0];if(A=t.lineIndent===-1?g[0].length+2:t.lineIndent||0){var v=Array(A).join(" "),y=[];g.map(function(C){(C=C.split(/\s*\n/)).length>1?y=y.concat(C.map(function(O,F){return(F&&O.length?`
|
||
`:"")+O})):y.push(C[0])}),g=y,A=G5.apply(this,[v,t])}for(a=0,o=g.length;a<o;a++){var w=0;if(n=g[a],A&&n[0]==`
|
||
`&&(n=n.substr(1),w=1),h+f+(d=(i=i1.apply(this,[n,t])).reduce(function(C,O){return C+O},0))>e||w){if(d>e){for(s=$5.apply(this,[n,i,e-(h+f),e]),u.push(s.shift()),u=[s.pop()];s.length;)c.push([s.shift()]);d=i.slice(n.length-(u[0]?u[0].length:0)).reduce(function(C,O){return C+O},0)}else u=[n];c.push(u),h=d+A,f=m}else u.push(n),h+=f+d,f=m}return l=A?function(C,O){return(O?v:"")+C.join(" ")}:function(C){return C.join(" ")},c.map(l)},mp.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(V5.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,d,g,m=["{"];for(var v in c){if(h=c[v],isNaN(parseInt(v,10))?f="'"+v+"'":(v=parseInt(v,10),f=(f=a(v).slice(2)).slice(0,-1)+n[f.slice(-1)]),typeof h=="number")h<0?(d=a(h).slice(3),g="-"):(d=a(h).slice(2),g=""),d=g+d.slice(0,-1)+n[d.slice(-1)];else{if(mn(h)!=="object")throw new Error("Don't know what to do with value type "+mn(h)+".");d=o(h)}m.push(f+d)}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,d,g,m={},v=1,y=m,w=[],C="",O="",F=c.length-1,I=1;I<F;I+=1)(g=c[I])=="'"?h?(d=h.join(""),h=void 0):h=[]:h?h.push(g):g=="{"?(w.push([y,d]),y={},d=void 0):g=="}"?((f=w.pop())[0][f[1]]=y,d=void 0,y=f[0]):g=="-"?v=-1:d===void 0?t.hasOwnProperty(g)?(C+=t[g],d=parseInt(C,16)*v,v=1,C=""):C+=g:t.hasOwnProperty(g)?(O+=t[g],y[d]=parseInt(O,16)*v,v=1,d=void 0,O=""):O+=g;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 d=l.Unicode[h.postScriptName];d&&(h.metadata.Unicode.encoding=d,h.encoding=d.codePages[0])}])}(We.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(uy(s)),o.metadata=r.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,n)}}])}(We),function(r){function e(){return(Xe.canvg?Promise.resolve(Xe.canvg):Promise.resolve().then(function(){return HMt})).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}We.API.addSvgAsImage=function(t,n,i,a,o,s,A,l){if(isNaN(n)||isNaN(i))throw Bn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(o))throw Bn.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(d){return d.fromString(c,t,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(d){return d.render(h)}).then(function(){f.addImage(u.toDataURL("image/jpeg",1),n,i,a,o,A,l)})}}(),We.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},We.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(d,g){var m,v=!1;for(m=0;m<d.length;m+=1)d[m]===g&&(v=!0);return v}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(mn(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 d,g=[];for(d in t)t[d].explicitSet===!0&&(t[d].type==="name"?g.push("/"+d+" /"+t[d].value):g.push("/"+d+" "+t[d].value));g.length!==0&&this.internal.write(`/ViewerPreferences
|
||
<<
|
||
`+g.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}}(We.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,d){return f-d})).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="",d=0;d<h.length;d++)f+=String.fromCharCode(h[d]);var g=l();u({data:f,addLength1:!0,objectId:g}),A("endobj");var m=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:m}),A("endobj");var v=l();A("<<"),A("/Type /FontDescriptor"),A("/FontName /"+Gp(s.fontName)),A("/FontFile2 "+g+" 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 y=l();A("<<"),A("/Type /Font"),A("/BaseFont /"+Gp(s.fontName)),A("/FontDescriptor "+v+" 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 /"+Gp(s.fontName)),A("/Encoding /"+s.encoding),A("/DescendantFonts ["+y+" 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 d=l();u({data:h,addLength1:!0,objectId:d}),A("endobj");var g=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:g}),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 "+d+" 0 R"),A("/Flags 96"),A("/FontBBox "+r.API.PDFObject.convert(s.metadata.bbox)),A("/FontName /"+Gp(s.fontName)),A("/ItalicAngle "+s.metadata.italicAngle),A("/Ascent "+s.metadata.ascender),A(">>"),A("endobj"),s.objectNumber=l();for(var v=0;v<s.metadata.hmtx.widths.length;v++)s.metadata.hmtx.widths[v]=parseInt(s.metadata.hmtx.widths[v]*(1e3/s.metadata.head.unitsPerEm));A("<</Subtype/TrueType/Type/Font/ToUnicode "+g+" 0 R/BaseFont/"+Gp(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,d=c.fonts,g=f,m="",v=0,y="",w=d[g].encoding;if(d[g].encoding!=="Identity-H")return{text:s,x:A,y:l,options:u,mutex:c};for(y=s,g=f,Array.isArray(s)&&(y=s[0]),v=0;v<y.length;v+=1)d[g].metadata.hasOwnProperty("cmap")&&(o=d[g].metadata.cmap.unicode.codeMap[y[v].charCodeAt(0)]),o||y[v].charCodeAt(0)<256&&d[g].metadata.hasOwnProperty("Unicode")?m+=y[v]:m+="";var C="";return parseInt(g.slice(1))<14||w==="WinAnsiEncoding"?C=h(m,g).split("").map(function(O){return O.charCodeAt(0).toString(16)}).join(""):w==="Identity-H"&&(C=t(m,d[g])),c.isHex=!0,{text:C,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}])}(We),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}}(We.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]],d={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},g={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},m=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],v=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)$/),y=!1,w=0;this.__bidiEngine__={};var C=function(x){var S=x.charCodeAt(),P=S>>8,U=g[P];return U!==void 0?c[256*U+(255&S)]:P===252||P===253?"AL":v.test(P)?"L":P===8?"R":"N"},O=function(x){for(var S,P=0;P<x.length;P++){if((S=C(x.charAt(P)))==="L")return!1;if(S==="R")return!0}return!1},F=function(x,S,P,U){var tt,q,rt,nt,At=S[U];switch(At){case"L":case"R":y=!1;break;case"N":case"AN":break;case"EN":y&&(At="AN");break;case"AL":y=!0,At="R";break;case"WS":At="N";break;case"CS":U<1||U+1>=S.length||(tt=P[U-1])!=="EN"&&tt!=="AN"||(q=S[U+1])!=="EN"&&q!=="AN"?At="N":y&&(q="AN"),At=q===tt?q:"N";break;case"ES":At=(tt=U>0?P[U-1]:"B")==="EN"&&U+1<S.length&&S[U+1]==="EN"?"EN":"N";break;case"ET":if(U>0&&P[U-1]==="EN"){At="EN";break}if(y){At="N";break}for(rt=U+1,nt=S.length;rt<nt&&S[rt]==="ET";)rt++;At=rt<nt&&S[rt]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(nt=S.length,rt=U+1;rt<nt&&S[rt]==="NSM";)rt++;if(rt<nt){var ct=x[U],Tt=ct>=1425&&ct<=2303||ct===64286;if(tt=S[rt],Tt&&(tt==="R"||tt==="AL")){At="R";break}}}At=U<1||(tt=S[U-1])==="B"?"N":P[U-1];break;case"B":y=!1,i=!0,At=w;break;case"S":a=!0,At="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":y=!1;break;case"BN":At="N"}return At},I=function(x,S,P){var U=x.split("");return P&&T(U,P,{hiLevel:w}),U.reverse(),S&&S.reverse(),U.join("")},T=function(x,S,P){var U,tt,q,rt,nt,At=-1,ct=x.length,Tt=0,M=[],W=w?f:h,Y=[];for(y=!1,i=!1,a=!1,tt=0;tt<ct;tt++)Y[tt]=C(x[tt]);for(q=0;q<ct;q++){if(nt=Tt,M[q]=F(x,Y,M,q),U=240&(Tt=W[nt][d[M[q]]]),Tt&=15,S[q]=rt=W[Tt][5],U>0)if(U===16){for(tt=At;tt<q;tt++)S[tt]=1;At=-1}else At=-1;if(W[Tt][6])At===-1&&(At=q);else if(At>-1){for(tt=At;tt<q;tt++)S[tt]=rt;At=-1}Y[q]==="B"&&(S[q]=0),P.hiLevel|=rt}a&&function(H,J,ot){for(var ut=0;ut<ot;ut++)if(H[ut]==="S"){J[ut]=w;for(var X=ut-1;X>=0&&H[X]==="WS";X--)J[X]=w}}(Y,S,ct)},L=function(x,S,P,U,tt){if(!(tt.hiLevel<x)){if(x===1&&w===1&&!i)return S.reverse(),void(P&&P.reverse());for(var q,rt,nt,At,ct=S.length,Tt=0;Tt<ct;){if(U[Tt]>=x){for(nt=Tt+1;nt<ct&&U[nt]>=x;)nt++;for(At=Tt,rt=nt-1;At<rt;At++,rt--)q=S[At],S[At]=S[rt],S[rt]=q,P&&(q=P[At],P[At]=P[rt],P[rt]=q);Tt=nt}Tt++}}},N=function(x,S,P){var U=x.split(""),tt={hiLevel:w};return P||(P=[]),T(U,P,tt),function(q,rt,nt){if(nt.hiLevel!==0&&u)for(var At,ct=0;ct<q.length;ct++)rt[ct]===1&&(At=m.indexOf(q[ct]))>=0&&(q[ct]=m[At+1])}(U,P,tt),L(2,U,S,P,tt),L(1,U,S,P,tt),U.join("")};return this.__bidiEngine__.doBidiReorder=function(x,S,P){if(function(tt,q){if(q)for(var rt=0;rt<tt.length;rt++)q[rt]=rt;s===void 0&&(s=O(tt)),l===void 0&&(l=O(tt))}(x,S),o||!A||l)if(o&&A&&s^l)w=s?1:0,x=I(x,S,P);else if(!o&&A&&l)w=s?1:0,x=N(x,S,P),x=I(x,S);else if(!o||s||A||l){if(o&&!A&&s^l)x=I(x,S),s?(w=0,x=N(x,S,P)):(w=1,x=N(x,S,P),x=I(x,S));else if(o&&s&&!A&&l)w=1,x=N(x,S,P),x=I(x,S);else if(!o&&!A&&s^l){var U=u;s?(w=1,x=N(x,S,P),w=0,u=!1,x=N(x,S,P),u=U):(w=0,x=N(x,S,P),x=I(x,S),w=1,u=!1,x=N(x,S,P),u=U,x=I(x,S))}}else w=0,x=N(x,S,P);else w=s?1:0,x=N(x,S,P);return x},this.__bidiEngine__.setOptions=function(x){x&&(o=x.isInputVisual,A=x.isOutputVisual,s=x.isInputRtl,l=x.isOutputRtl,u=x.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})}])}(We),We.API.TTFFont=function(){function r(e){var t;if(this.rawData=e,t=this.contents=new ph(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new act(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new jut(this.contents),this.head=new Wut(this),this.name=new Zut(this),this.cmap=new SG(this),this.toUnicode={},this.hhea=new zut(this),this.maxp=new Jut(this),this.hmtx=new tct(this),this.post=new Xut(this),this.os2=new Yut(this),this.loca=new ict(this),this.glyf=new ect(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 IA,ph=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}(),jut=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,d,g;for(g 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 ph).writeInt(this.scalarType),i.writeShort(f),i.writeShort(c),i.writeShort(o),i.writeShort(u),a=16*f,l=i.pos+a,s=null,d=[],t)for(h=t[g],i.writeString(g),i.writeInt(r(h)),i.writeInt(l),i.writeInt(h.length),d=d.concat(h),g==="head"&&(s=l),l+=h.length;l%4;)d.push(0),l++;return i.write(d),n=2981146554-r(i.data),i.pos=s+8,i.writeUInt32(n),i.data},r=function(t){var n,i,a,o;for(t=xG.call(t);t.length%4;)t.push(0);for(a=new ph(t),i=0,n=0,o=t.length;n<o;n=n+=4)i+=a.readUInt32();return 4294967295&i},e}(),Kut={}.hasOwnProperty,Cl=function(r,e){for(var t in e)Kut.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};IA=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 Wut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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 ph).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}(),W5=function(){function r(e,t){var n,i,a,o,s,A,l,u,c,h,f,d,g,m,v,y,w;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 C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),e.pos+=2,g=function(){var C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),l=function(){var C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),u=function(){var C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),i=(this.length-e.pos+this.offset)/2,s=function(){var C,O;for(O=[],A=C=0;0<=i?C<i:C>i;A=0<=i?++C:--C)O.push(e.readUInt16());return O}(),A=v=0,w=a.length;v<w;A=++v)for(m=a[A],n=y=d=g[A];d<=m?y<=m:y>=m;n=d<=m?++y:--y)u[A]===0?o=n+l[A]:(o=s[u[A]/2+(n-d)-(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,d,g,m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct,Tt,M,W,Y,H,J,ot,ut,X,It,at,j;switch(U=new ph,o=Object.keys(e).sort(function(Z,ft){return Z-ft}),t){case"macroman":for(g=0,m=function(){var Z=[];for(d=0;d<256;++d)Z.push(0);return Z}(),y={0:0},a={},tt=0,At=o.length;tt<At;tt++)y[X=e[i=o[tt]]]==null&&(y[X]=++g),a[i]={old:e[i],new:y[e[i]]},m[i]=y[e[i]];return U.writeUInt16(1),U.writeUInt16(0),U.writeUInt32(12),U.writeUInt16(0),U.writeUInt16(262),U.writeUInt16(0),U.write(m),{charMap:a,subtable:U.data,maxGlyphID:g+1};case"unicode":for(S=[],c=[],w=0,y={},n={},v=l=null,q=0,ct=o.length;q<ct;q++)y[O=e[i=o[q]]]==null&&(y[O]=++w),n[i]={old:O,new:y[O]},s=y[O]-i,v!=null&&s===l||(v&&c.push(v),S.push(i),l=s),v=i;for(v&&c.push(v),c.push(65535),S.push(65535),N=2*(L=S.length),T=2*Math.pow(Math.log(L)/Math.LN2,2),h=Math.log(T/2)/Math.LN2,I=2*L-T,A=[],F=[],f=[],d=rt=0,Tt=S.length;rt<Tt;d=++rt){if(x=S[d],u=c[d],x===65535){A.push(0),F.push(0);break}if(x-(P=n[x].new)>=32768)for(A.push(0),F.push(2*(f.length+L-d)),i=nt=x;x<=u?nt<=u:nt>=u;i=x<=u?++nt:--nt)f.push(n[i].new);else A.push(P-x),F.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*L+2*f.length),U.writeUInt16(0),U.writeUInt16(N),U.writeUInt16(T),U.writeUInt16(h),U.writeUInt16(I),ot=0,M=c.length;ot<M;ot++)i=c[ot],U.writeUInt16(i);for(U.writeUInt16(0),ut=0,W=S.length;ut<W;ut++)i=S[ut],U.writeUInt16(i);for(It=0,Y=A.length;It<Y;It++)s=A[It],U.writeUInt16(s);for(at=0,H=F.length;at<H;at++)C=F[at],U.writeUInt16(C);for(j=0,J=f.length;j<J;j++)g=f[j],U.writeUInt16(g);return{charMap:n,subtable:U.data,maxGlyphID:w+1}}},r}(),SG=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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 W5(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=W5.encode(t,n),(a=new ph).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},e}(),zut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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}(),Yut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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}(),Xut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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}(),qut=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},Zut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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 qut(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}(),Jut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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}(),tct=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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}(),xG=[].slice,ect=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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 ph(n.read(a))).readShort(),u=A.readShort(),h=A.readShort(),l=A.readShort(),c=A.readShort(),this.cache[t]=s===-1?new nct(A,u,h,l,c):new rct(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}(),rct=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}(),nct=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 ph(xG.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},r}(),ict=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return Cl(e,IA),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}(),act=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,d,g,m,v;for(i in n=SG.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),f={0:0},v=n.charMap)f[(A=v[i]).old]=A.new;for(d in h=n.maxGlyphID,o)d in f||(f[d]=h++);return u=function(y){var w,C;for(w in C={},y)C[y[w]]=w;return C}(f),c=Object.keys(u).sort(function(y,w){return y-w}),g=function(){var y,w,C;for(C=[],y=0,w=c.length;y<w;y++)s=c[y],C.push(u[s]);return C}(),a=this.font.glyf.encode(o,g,f),l=this.font.loca.encode(a.offsets,g),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}();We.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 oct={name:"ol-control-printdialog",setup(r,e){const{control:t}=Xi(Qn,r,e);return t.value.on(["print","error"],function(n){if(n.image)if(n.pdf){var i=new We({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/","");lR.exports.saveAs(a,o)},n.imageType,n.quality);else console.warn("No canvas to export")}),{control:t}},props:{lang:{type:String}}};function sct(r,e,t,n,i,a){return Mr("",!0)}var EI=me(oct,[["render",sct]]),Ld=function(r){r||(r={});var e=yt.create("DIV",{className:(r.className||"ol-videorec")+" ol-unselectable ol-control"});yt.create("BUTTON",{type:"button",className:"ol-start",title:"start",click:function(){this.start()}.bind(this),parent:e}),yt.create("BUTTON",{type:"button",className:"ol-stop",title:"stop",click:function(){this.stop()}.bind(this),parent:e}),yt.create("BUTTON",{type:"button",className:"ol-pause",title:"pause",click:function(){this.pause()}.bind(this),parent:e}),yt.create("BUTTON",{type:"button",className:"ol-resume",title:"resume",click:function(){this.resume()}.bind(this),parent:e}),Nr.call(this,{element:e,target:r.target}),this.set("framerate",30),this.set("videoBitsPerSecond",5e6),r.videoTarget==="DIALOG"?(this._dialog=new Za({className:"ol-fullscreen-dialog",target:document.body,closeBox:!0}),this._videoTarget=this._dialog.getContentElement()):this._videoTarget=r.videoTarget,this._printCtrl=new Ch({target:yt.create("DIV")})};kr(Ld,Nr);Ld.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._printCtrl),this._dialog&&this.getMap().removeControl(this._dialog)),Nr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._printCtrl),this._dialog&&this.getMap().addControl(this._dialog))};Ld.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=yt.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))};Ld.prototype.stop=function(){this._mediaRecorder&&(this._mediaRecorder.stop(),this._mediaRecorder=null,this.element.setAttribute("data-state","inactive"))};Ld.prototype.pause=function(){this._mediaRecorder&&(this._mediaRecorder.pause(),this.element.setAttribute("data-state","pause"))};Ld.prototype.resume=function(){this._mediaRecorder&&(this._mediaRecorder.resume(),this.element.setAttribute("data-state","rec"))};const Act={name:"ol-control-videorecorder",emits:["start","stop"],setup(r,e){const{control:t}=Xi(Ld,r,e),{downloadName:n}=rh(r);return t.value.on("start",i=>{e.emit("start",i)}),t.value.on("stop",i=>{e.emit("stop",i),lR.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 lct(r,e,t,n,i,a){return Mr("",!0)}var CI=me(Act,[["render",lct]]),kc={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},uct=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={image:[Er.POLYGON,Er.CIRCLE,Er.LINE_STRING,Er.IMAGE,Er.TEXT],hybrid:[Er.POLYGON,Er.LINE_STRING],vector:[]},hct={hybrid:[Er.IMAGE,Er.TEXT,Er.DEFAULT],vector:[Er.POLYGON,Er.CIRCLE,Er.LINE_STRING,Er.IMAGE,Er.TEXT,Er.DEFAULT]},fct=function(r){uct(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_=xi(),n}return e.prototype.prepareTile=function(t,n,i){var a,o=t.getState();return(o===Te.LOADED||o===Te.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[In.ANIMATING]||h[In.INTERACTING]);(f||!c.wantedResolution)&&(c.wantedResolution=A);var d=this.prepareTile(c,o,l);return d&&(f||Date.now()-a.time<8)&&u.getRenderMode()!==kc.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()===kc.VECTOR?Ee(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),d=f.getTileCoordExtent(t.wrappedTileCoord),g=u.getSourceTiles(n,i,t),m=Ee(a);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],c&&(t.declutterExecutorGroups[m]=[]);for(var v=function(O,F){var I=g[O];if(I.getState()!=Te.LOADED)return"continue";var T=I.tileCoord,L=h.getTileCoordExtent(T),N=ks(d,L),x=_o(N,a.getRenderBuffer()*A,y.tmpExtent),S=vl(L,N)?null:x;l.dirty=!1;var P=new eE(0,x,A,n),U=c?new eE(0,N,A,n):void 0,tt=K8(A,n),q=function(H){var J,ot=H.getStyleFunction()||a.getStyleFunction();if(ot&&(J=ot(H,A)),J){var ut=this.renderFeature(H,tt,J,P,U);this.dirty_=this.dirty_||ut,l.dirty=l.dirty||ut}},rt=I.getFeatures();s&&s!==l.renderedRenderOrder&&rt.sort(s);for(var nt=0,At=rt.length;nt<At;++nt){var ct=rt[nt];(!S||qn(S,ct.getGeometry().getExtent()))&&q.call(y,ct)}var Tt=P.finish(),M=a.getRenderMode()!==kc.VECTOR&&c&&g.length===1?null:N,W=new rE(M,A,n,u.getOverlaps(),Tt,a.getRenderBuffer());if(t.executorGroups[m].push(W),U){var Y=new rE(null,A,n,u.getOverlaps(),U.finish(),a.getRenderBuffer());t.declutterExecutorGroups[m].push(Y)}},y=this,w=0,C=g.length;w<C;++w)v(w);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=oa([t]);_o(h,s*i,h);for(var f={},d=function(C,O,F){var I=C.getId();I===void 0&&(I=Ee(C));var T=f[I];if(T){if(T!==!0&&F<T.distanceSq){if(F===0)return f[I]=!0,o.splice(o.lastIndexOf(T),1),a(C,l,O);T.geometry=O,T.distanceSq=F}}else{if(F===0)return f[I]=!0,a(C,l,O);o.push(f[I]={feature:C,layer:l,geometry:O,distanceSq:F,callback:a})}},g=this.renderedTiles,m,v=function(C,O){var F=g[C],I=c.getTileCoordExtent(F.wrappedTileCoord);if(!qn(I,h))return"continue";var T=Ee(l),L=[F.executorGroups[T]],N=F.declutterExecutorGroups[T];N&&L.push(N),L.some(function(x){for(var S=x===N?n.declutterTree.all().map(function(q){return q.value}):null,P=0,U=x.length;P<U;++P){var tt=x[P];if(m=tt.forEachFeatureAtCoordinate(t,s,A,i,d,S),m)return!0}})},y=0,w=g.length;!m&&y<w;++y)v(y);return m},e.prototype.getFeatures=function(t){return new Promise(function(n,i){for(var a=this.getLayer(),o=Ee(a),s=a.getSource(),A=this.renderedProjection,l=A.getExtent(),u=this.renderedResolution,c=s.getTileGridForProjection(A),h=bn(this.renderedPixelToCoordinateTransform_,t.slice()),f=c.getTileCoordForCoordAndResolution(h,u),d,g=0,m=this.renderedTiles.length;g<m;++g)if(f.toString()===this.renderedTiles[g].tileCoord.toString()){if(d=this.renderedTiles[g],d.getState()===Te.LOADED){var v=c.getTileCoordExtent(d.tileCoord);s.getWrapX()&&A.canWrapX()&&!ps(l,v)&&mF(h,A);break}d=void 0}if(!d||d.loadingSourceTiles>0){n([]);return}var y=c.getTileCoordExtent(d.wrappedTileCoord),w=TA(y),C=[(h[0]-w[0])/u,(w[1]-h[1])/u],O=d.getSourceTiles().reduce(function(N,x){return N.concat(x.getFeatures())},[]),F=d.hitDetectionImageData[o];if(!F&&!this.animatingOrInteracting_){var I=Wi(c.getTileSize(c.getZForResolution(u))),T=this.renderedRotation_,L=[this.getRenderTransform(c.getTileCoordCenter(d.wrappedTileCoord),u,0,ds,I[0]*ds,I[1]*ds,0)];F=$8(I,L,O,a.getStyleFunction(),c.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(a).renderedResolution,T),d.hitDetectionImageData[o]=F}n(V8(C,O,F))}.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[In.ANIMATING]||a[In.INTERACTING]),s=this.renderedTiles,A=0,l=s.length;A<l;++A){var u=s[A],c=u.declutterExecutorGroups[Ee(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),d=t.tileCoord,g=f.getTileCoordExtent(t.wrappedTileCoord),m=f.getTileCoordExtent(d,this.tmpExtent)[0]-g[0],v=nv(ay(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(o,s,A,i,u,c,m));return v},e.prototype.renderFrame=function(t,n){var i=t.viewHints,a=!(i[In.ANIMATING]||i[In.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=hct[s],c=t.viewState,h=c.rotation,f=o.getSource(),d=f.getTileGridForProjection(c.projection),g=d.getZForResolution(c.resolution,f.zDirection),m=this.renderedTiles,v=[],y=[],w=m.length-1;w>=0;--w){var C=m[w],O=C.executorGroups[Ee(o)].filter(function(q){return q.hasExecutors(u)});if(O.length!==0){for(var F=this.getTileRenderTransform(C,t),I=C.tileCoord[0],T=!1,L=O[0].getClipCoords(F),N=0,x=v.length;N<x;++N)if(g!==I&&I<y[N]){var S=v[N];qn([L[0],L[3],L[4],L[7]],[S[0],S[3],S[4],S[7]])&&(T||(A.save(),T=!0),A.beginPath(),A.moveTo(L[0],L[1]),A.lineTo(L[2],L[3]),A.lineTo(L[4],L[5]),A.lineTo(L[6],L[7]),A.moveTo(S[6],S[7]),A.lineTo(S[4],S[5]),A.lineTo(S[2],S[3]),A.lineTo(S[0],S[1]),A.clip())}v.push(L),y.push(I);for(var P=0,U=O.length;P<U;++P){var tt=O[P];tt.execute(A,1,F,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=nE(a,t,i[A],n,this.boundHandleStyleImageChange_,void 0,o)||s;else s=nE(a,t,i,n,this.boundHandleStyleImageChange_,void 0,o);return s},e.prototype.tileImageNeedsRender_=function(t){var n=this.getLayer();if(n.getRenderMode()===kc.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[Ee(i)];a.renderedTileRevision=o;var A=t.wrappedTileCoord,l=A[0],u=i.getSource(),c=n.pixelRatio,h=n.viewState,f=h.projection,d=u.getTileGridForProjection(f),g=d.getResolution(t.tileCoord[0]),m=n.pixelRatio/t.wantedResolution*g,v=d.getResolution(l),y=t.getContext(i);c=Math.round(Math.max(c,m/c));var w=u.getTilePixelSize(l,c,f);y.canvas.width=w[0],y.canvas.height=w[1];var C=c/m;if(C!==1){var O=iy(this.tmpTransform_);ay(O,C,C),y.setTransform.apply(y,O)}var F=d.getTileCoordExtent(A,this.tmpExtent),I=m/v,T=iy(this.tmpTransform_);ay(T,I,-I),mX(T,-F[0],-F[3]);for(var L=0,N=s.length;L<N;++L){var x=s[L];x.execute(y,C,T,0,!0,cct[i.getRenderMode()])}a.renderedTileResolution=t.wantedResolution},e}(IH),dct=fct,pct=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)}}(),gct=function(r){pct(e,r);function e(t){var n=this,i=t||{},a=Ce({},i);delete a.preload,delete a.useInterimTilesOnError,n=r.call(this,a)||this,n.on,n.once,n.un,i.renderMode===kc.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var o=i.renderMode||kc.HYBRID;return Le(o==kc.HYBRID||o==kc.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 dct(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(Pc.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Pc.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(Pc.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Pc.USE_INTERIM_TILES_ON_ERROR,t)},e}(QC),vct=gct,nn=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=yt.create("DIV",{className:r.switcherClass||"ol-layerswitcher"}):(t=yt.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=yt.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=yt.create("DIV",{className:"ol-switchertopdiv",parent:t,click:function(){e.overflow("+50%")}}),this.botv=yt.create("DIV",{className:"ol-switcherbottomdiv",parent:t,click:function(){e.overflow("-50%")}})),this._noScroll=r.noScroll),this.panel_=yt.create("UL",{className:"panel"}),this.panelContainer_=yt.create("DIV",{className:"panel-container",html:this.panel_,parent:t}),!r.target&&!r.noScroll&&yt.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_=yt.create("LI",{className:"ol-header",parent:this.panel_}),Nr.call(this,{element:t,target:r.target}),this.set("drawDelay",r.drawDelay||0),this.set("selection",r.selection),r.minibar&&setTimeout(function(){var n=yt.scrollDiv(this.panelContainer_,{mousewheel:!0,vertical:!0,minibar:!0});this.on(["drawlist","toggle"],function(){n.refresh()})}.bind(this))};kr(nn,Nr);nn.prototype.tip={up:"up/down",down:"down",info:"informations...",extent:"zoom to extent",trash:"remove layer",plus:"expand/shrink"};nn.prototype.displayInLayerSwitcher=function(r){return r.get("displayInLayerSwitcher")!==!1};nn.prototype.setMap=function(r){if(Nr.prototype.setMap.call(this,r),this.drawPanel(),this._listener)for(var e in this._listener)ys(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)))};nn.prototype.show=function(){this.element.classList.add("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!1})};nn.prototype.hide=function(){this.element.classList.remove("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!0})};nn.prototype.toggle=function(){this.element.classList.toggle("ol-forceopen"),this.overflow()};nn.prototype.isOpen=function(){return this.element.classList.contains("ol-forceopen")};nn.prototype.setHeader=function(r){yt.setHTML(this.header_,r)};nn.prototype.overflow=function(r){if(this.button&&!this._noScroll){if(yt.hidden(this.panel_)){yt.setStyle(this.element,{height:"auto"});return}var e=yt.outerHeight(this.element),t=yt.outerHeight(this.panel_),n=this.button.offsetTop+yt.outerHeight(this.button),i=this.panel_.offsetTop-n;if(t>e-n){yt.setStyle(this.element,{height:"100%"});var a=this.panel_.querySelectorAll("li.visible .li-content")[0],o=a?2*yt.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,yt.hide(this.botv)):yt.show(this.botv),i>=0?(i=0,yt.hide(this.topv)):yt.show(this.topv),yt.setStyle(this.panel_,{top:i+"px"}),!0}else return yt.setStyle(this.element,{height:"auto"}),yt.setStyle(this.panel_,{top:0}),yt.hide(this.botv),yt.hide(this.topv),!1}else return!1};nn.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})};nn.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})};nn.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})};nn.prototype._clearLayerForLI=function(){this._layers.forEach(function(r){r.listeners.forEach(function(e){ys(e)})}),this._layers=[]};nn.prototype._getLayerForLI=function(r){for(var e=0,t;t=this._layers[e];e++)if(t.li===r)return t.layer;return null};nn.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))};nn.prototype.getPanel=function(){return this.panelContainer_};nn.prototype.drawPanel=function(){if(this.getMap()){var r=this;this.dcount++,setTimeout(function(){r.drawPanel_()},this.get("drawDelay")||0)}};nn.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}};nn.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())};nn.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 qn(i,n)}return!0};nn.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,d=e.getSelection()===f;if(f&&s){var g;u?g=u.getLayers():g=e._layerGroup?e._layerGroup.getLayers():e.getMap().getLayers();for(var m=g.getArray(),v=0;v<m.length;v++)if(m[v]==f){g.removeAt(v);break}for(var y=0;y<m.length;y++)if(m[y]===s){v>y?g.insertAt(y,f):g.insertAt(y+1,f);break}}d&&e.selectLayer(f),e.dispatchEvent({type:"reorder-end",layer:f,group:u})}t.parentNode.querySelectorAll("li").forEach(function(w){w.classList.remove("dropover"),w.classList.remove("dropover-after"),w.classList.remove("dropover-before")}),t.classList.remove("drag"),t.parentNode.classList.remove("drag"),e.element.classList.remove("drag"),A&&A.remove(),yt.removeListener(document,"mousemove touchmove",h),yt.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=yt.create("LI",{className:"ol-dragover",html:t.innerHTML,style:{position:"absolute","z-index":1e4,left:t.offsetLeft,opacity:.5,width:yt.outerWidth(t),height:yt.getStyle(t,"height")},parent:i}),e.element.classList.add("drag"),e.dispatchEvent({type:"reorder-start",layer:l,group:u})),!n){f.preventDefault(),f.stopPropagation(),yt.setStyle(A,{top:a-yt.offsetRect(i).top+i.scrollTop+5});var d;for(f.touches?d=document.elementFromPoint(f.touches[0].clientX,f.touches[0].clientY):d=f.target,d.classList.contains("ol-switcherbottomdiv")?e.overflow(-1):d.classList.contains("ol-switchertopdiv")&&e.overflow(1);d&&d.tagName!=="LI";)d=d.parentNode;(!d||!d.classList.contains("dropover"))&&t.parentNode.querySelectorAll("li").forEach(function(g){g.classList.remove("dropover"),g.classList.remove("dropover-after"),g.classList.remove("dropover-before")}),d&&d.parentNode.classList.contains("drag")&&d!==t?(s=e._getLayerForLI(d),s&&!s.get("allwaysOnTop")==!l.get("allwaysOnTop")?(d.classList.add("dropover"),d.classList.add(t.offsetTop<d.offsetTop?"dropover-after":"dropover-before")):s=!1,yt.show(A)):(s=!1,d===t?yt.hide(A):yt.show(A)),s?A.classList.remove("forbidden"):A.classList.add("forbidden")}}yt.addListener(document,"mousemove touchmove",h),yt.addListener(document,"mouseup touchend touchcancel",c)};nn.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=yt.getStyle(t,"left")-i;e.dragging_=!0;function o(){yt.removeListener(document,"mouseup touchend touchcancel",o),yt.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)/yt.getStyle(t.parentNode,"width"),c=Math.max(0,Math.min(1,u));yt.setStyle(t,{left:c*100+"%"}),t.parentNode.nextElementSibling.innerHTML=Math.round(c*100),n.setOpacity(c)}yt.addListener(document,"mouseup touchend touchcancel",o),yt.addListener(document,"mousemove touchmove",s)};nn.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=yt.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=yt.create("DIV",{className:"ol-layerswitcher-buttons",parent:c}),f=yt.create("DIV",{className:"li-content",parent:c});yt.create("INPUT",{type:u.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:u.getVisible(),click:i,parent:f});var d=yt.create("LABEL",{title:u.get("title")||u.get("name"),click:i,unselectable:"on",style:{userSelect:"none"},parent:f});if(d.addEventListener("selectstart",function(){return!1}),yt.create("SPAN",{html:u.get("title")||u.get("name"),click:function(C){this.get("selection")&&(C.stopPropagation(),this.selectLayer(u))}.bind(this),parent:d}),this.reordering&&(l<n.length-1&&(u.get("allwaysOnTop")||!n[l+1].get("allwaysOnTop"))||l>0&&(!u.get("allwaysOnTop")||n[l-1].get("allwaysOnTop")))&&yt.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(C){t.dragOrdering_(C)}},parent:h}),u.getLayers){var g=0;u.getLayers().forEach(function(C){t.displayInLayerSwitcher(C)&&g++}),g&&yt.create("DIV",{className:u.get("openInLayerSwitcher")?"collapse-layers":"expend-layers",title:this.tip.plus,click:function(){var C=t._getLayerForLI(this.parentNode.parentNode);C.set("openInLayerSwitcher",!C.get("openInLayerSwitcher"))},parent:h})}if(this.oninfo&&yt.create("DIV",{className:"layerInfo",title:this.tip.info,click:a,parent:h}),this.hastrash&&!u.get("noSwitcherDelete")&&yt.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]&&yt.create("DIV",{className:"layerExtent",title:this.tip.extent,click:o,parent:h})}if(this.show_progress&&u instanceof nR){var v=yt.create("DIV",{className:"layerswitcher-progress",parent:f});this.setprogress_(u),u.layerswitcher_progress=yt.create("DIV",{parent:v})}var y=yt.create("DIV",{className:"layerswitcher-opacity",click:function(C){if(C.target===this){C.stopPropagation(),C.preventDefault();var O=Math.max(0,Math.min(1,C.offsetX/yt.getStyle(this,"width")));t._getLayerForLI(this.parentNode.parentNode).setOpacity(O)}},parent:f});if(yt.create("DIV",{className:"layerswitcher-opacity-cursor ol-noscroll",style:{left:u.getOpacity()*100+"%"},on:{"mousedown touchstart":function(C){t.dragOpacity_(C)}},parent:y}),yt.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 w=yt.create("UL",{parent:c});this.drawList(w,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()};nn.prototype.getLayerClass=function(r){return r?r.getLayers?"ol-layer-group":r instanceof El?"ol-layer-vector":r instanceof vct?"ol-layer-vectortile":r instanceof nR?"ol-layer-tile":r instanceof KH?"ol-layer-image":r instanceof AG?"ol-layer-heatmap":r.getFeatures?"ol-layer-vectorimage":"unknown":"none"};nn.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})};nn.prototype.getSelection=function(){return this._selectedLayer};nn.prototype.setprogress_=function(r){if(!r.layerswitcher_progress){var e=0,t=0,n=function(){t===e?(t=e=0,yt.setStyle(r.layerswitcher_progress,{width:0})):yt.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 mct={name:"ol-layerswitcher-control",setup(r,e){const{control:t}=Xi(nn,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 yct(r,e,t,n,i,a){return Mr("",!0)}var yE=me(mct,[["render",yct]]);kC.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"};ZH.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())};UAt.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};Ed.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&&!mA(a,r)&&(r=[(a[0]+a[2])/2,(a[1]+a[3])/2]),t&&(r=uh(r,t,this.getSource().getProjection())),this.getSource&&this.getSource()?[this.getSource().getPreview(r,e)]:[]};B0.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 nB=function(r){r=r||{},r.switcherClass="ol-layerswitcher-image",r.mouseover!==!1&&(r.mouseover=!0),nn.call(this,r)};kr(nB,nn);nB.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")};yt.setStyle(r,{height:"auto"}),e.forEach(function(i){if(t.displayInLayerSwitcher(i)){var a=i.getPreview?i.getPreview():["none"],o=yt.create("LI",{className:"ol-imgcontainer"+(i.getVisible()?" ol-visible":""),on:{"touchstart click":n},parent:r});t._setLayerForLI(o,i),a.forEach(function(s){yt.create("IMG",{src:s,parent:o})}),yt.create("p",{html:i.get("title")||i.get("name"),parent:o}),t.testLayerVisibility(i)&&o.classList.add("ol-layer-hidden")}})};nB.prototype.overflow=function(){};const _ct={name:"ol-layerswitcherimage-control",extends:yE,setup(r,e){const{control:t}=Xi(nB,r,e);return{control:t}}};function wct(r,e,t,n,i,a){return Mr("",!0)}var BI=me(_ct,[["render",wct]]),za=function(r){r||(r={});var e=document.createElement("div");if(r.target)e=yt.create("DIV",{className:r.className||"ol-mapzone"});else{e=yt.create("DIV",{className:(r.className||"ol-mapzone")+" ol-unselectable ol-control ol-collapsed"});var t=yt.create("BUTTON",{type:"button",on:{click:function(){e.classList.toggle("ol-collapsed"),n.forEach(function(i){i.updateSize()})}.bind(this)},parent:e});yt.create("I",{parent:t})}Nr.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()})})};kr(za,Nr);za.prototype.setCollapsed=function(r){r?(this.element.classList.remove("ol-collapsed"),this.getMaps().forEach(function(e){e.updateSize()})):this.element.classList.add("ol-collapsed")};za.prototype.getCollapsed=function(){return this.element.classList.contains("ol-collapsed")};za.prototype.setVisible=za.prototype.setCollapsed;za.prototype.getMaps=function(){return this._maps};za.prototype.getLength=function(){return this._maps.length};za.prototype.addZone=function(r){var e=new rl({zoom:6,center:[0,0],projection:this._projection}),t;r.map?t=Xw(r.map.getView().calculateExtent(),r.map.getView().getProjection(),e.getProjection()):t=Xw(r.extent,"EPSG:4326",e.getProjection());var n=yt.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:Ya(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 GC({target:n,view:e,controls:[],interactions:[],layers:[i]});a.set("zone",r),this._maps.push(a),e.fit(t),yt.create("P",{html:r.title,parent:n})};za.prototype.removeZone=function(r){var e=this.element.querySelectorAll(".ol-mapzonezone")[r];e&&(e.remove(),this._maps.splice(r,1))};za.zones={};za.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]}];za.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]}];za.zones.DOMTOM=[{title:"Métropole",extent:[-5.318421740712579,41.16082274292913,9.73284186155716,51.21957336557702]}].concat(za.zones.DOM,za.zones.TOM);const Ect={name:"ol-zone-control",setup(r,e){const{control:t}=Xi(za,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 Cct(r,e,t,n,i,a){return Mr("",!0)}var bI=me(Ect,[["render",Cct]]);function _E(r){_E.installed||(_E.installed=!0,r.component(qx.name,qx),r.component(Zx.name,Zx),r.component(Jx.name,Jx),r.component(tI.name,tI),r.component(eI.name,eI),r.component(rI.name,rI),r.component(nI.name,nI),r.component(iI.name,iI),r.component(S5.name,S5),r.component(aI.name,aI),r.component(oI.name,oI),r.component(sI.name,sI),r.component(AI.name,AI),r.component(lI.name,lI),r.component(EI.name,EI),r.component(CI.name,CI),r.component(yE.name,yE),r.component(BI.name,BI),r.component(bI.name,bI))}var Bct=Object.freeze(Object.defineProperty({__proto__:null,default:_E,install:_E,FullScreenControl:qx,MousePositionControl:Zx,AttributionControl:Jx,OverviewMapControl:tI,ScaleLineControl:eI,ZoomControl:rI,ZoomSliderControl:nI,ZoomToExtentControl:iI,ContextMenuControl:aI,SwipeControl:oI,ControlBar:sI,ToggleControl:AI,ButtonControl:lI,PrintDialog:EI,VideoRecorderControl:CI,LayerSwitcherControl:yE,LayerSwitcherImageControl:BI,ZoneControl:bI},Symbol.toStringTag,{value:"Module"}));function lv(r,e){const t=Be("feature"),{properties:n}=Or(e);let i=Ze(()=>new r(...Object.values(n)));return ye(n,()=>{t.value.setGeometry(i.value),t.value.changed()}),ye(t,()=>{t.value.setGeometry(i.value)}),cr(()=>{t.value.setGeometry(i.value)}),pr(()=>{t.value.setGeometry(null)}),{geometry:i}}const bct={name:"ol-geom-point",setup(r){const{geometry:e}=lv(xr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Tct(r,e,t,n,i,a){return Mr("",!0)}var TI=me(bct,[["render",Tct]]);const Sct={name:"ol-geom-line-string",setup(r){const{geometry:e}=lv(en,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function xct(r,e,t,n,i,a){return Mr("",!0)}var SI=me(Sct,[["render",xct]]);const Ict={name:"ol-geom-polygon",setup(r){const{geometry:e}=lv(Dn,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Lct(r,e,t,n,i,a){return Mr("",!0)}var xI=me(Ict,[["render",Lct]]);const Oct={name:"ol-geom-multi-point",setup(r){const{geometry:e}=lv($s,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Fct(r,e,t,n,i,a){return Mr("",!0)}var II=me(Oct,[["render",Fct]]);const Rct={name:"ol-geom-multi-line-string",setup(r){const{geometry:e}=lv(Xa,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Mct(r,e,t,n,i,a){return Mr("",!0)}var LI=me(Rct,[["render",Mct]]);const Nct={name:"ol-geom-multi-polygon",setup(r){const{geometry:e}=lv(qa,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Pct(r,e,t,n,i,a){return Mr("",!0)}var OI=me(Nct,[["render",Pct]]);function wE(r){wE.installed||(wE.installed=!0,r.component(TI.name,TI),r.component(SI.name,SI),r.component(xI.name,xI),r.component(II.name,II),r.component(LI.name,LI),r.component(OI.name,OI))}var Uct=Object.freeze(Object.defineProperty({__proto__:null,default:wE,install:wE,Point:TI,LineString:SI,Polygon:xI,MultiPoint:II,MultiLineString:LI,MultiPolygon:OI},Symbol.toStringTag,{value:"Module"}));const Dct={name:"ol-style",setup(r){const e=Be("stylable",null),{properties:t}=Or(r);let n=Ze(()=>new Ea(t));const i=o=>{if(e instanceof WF||e instanceof zF){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=Ze(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return ye(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),cr(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),pr(()=>{i(null)}),Qr("style",n),Qr("styledObj",e),{style:n}},props:{zIndex:{type:Number},overrideStyleFunction:{type:Function}}};function Qct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var FI=me(Dct,[["render",Qct]]);const kct={name:"ol-style-circle",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=Or(r),i=s=>new x0(bA(Jn({},s),{fill:new Ba,stroke:new zi}));let a=Ze(()=>i(n));const o=()=>{e.value.setImage(null),e.value.setImage(a.value),t.value.changed()};ye(n,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setImage(a.value)}),pr(()=>{e.value.setImage(null)}),Qr("circle",a),Qr("styledObj",t)},props:{radius:{type:Number},scale:{type:Number}}};function Hct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var RI=me(kct,[["render",Hct]]);const Gct={name:"ol-style-stroke",setup(r){const e=Be("style",null),t=Be("circle",null),n=Be("styledObj",null),{properties:i}=Or(r);if(e!=null&&t==null){let a=new zi(i);e.value.setStroke(a);const o=()=>{e.value.setStroke(null),a=new zi(i),e.value.setStroke(a)};ye(i,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setStroke(a)}),pr(()=>{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),ye(i,o=>{a(o)}),ye(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 $ct(r,e,t,n,i,a){return Mr("",!0)}var MI=me(Gct,[["render",$ct]]);const Vct={name:"ol-style-fill",setup(r){const e=Be("style",null),t=Be("circle",null),n=Be("styledObj",null),{properties:i}=Or(r);if(e!=null&&t==null){let a=new Ba(i);e.value.setFill(a);const o=()=>{e.value.setFill(null),a=new Ba(i),e.value.setFill(a)};ye(i,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setFill(a)}),pr(()=>{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),ye(i,()=>{a(i.color)}),ye(t,()=>{a(i.color)})}},props:{color:{type:String}}};function jct(r,e,t,n,i,a){return Mr("",!0)}var NI=me(Vct,[["render",jct]]);const Kct={name:"ol-style-icon",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=Or(r);let i=Ze(()=>{let o=new O0(n);return o.load(),o});const a=()=>{e.value.setImage(null),e.value.setImage(i.value),t.value.changed()};ye(n,()=>{a()}),ye(e,()=>{a()}),cr(()=>{e.value.setImage(i.value)}),pr(()=>{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 Wct(r,e,t,n,i,a){return Mr("",!0)}var PI=me(Kct,[["render",Wct]]);const zct={name:"ol-style-text",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=Or(r),i=s=>new Bd(bA(Jn({},s),{fill:new Ba,stroke:new zi}));let a=Ze(()=>i(n));const o=()=>{e.value.setText(null),e.value.setText(a.value),t.value.changed()};ye(n,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setText(a.value)}),pr(()=>{e.value.setText(null)}),Qr("style",a),Qr("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 Yct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var UI=me(zct,[["render",Yct]]),kg=function(r,e){var t=r[0]-e[0],n=r[1]-e[1];return Math.sqrt(t*t+n*n)},dm=function(r,e){return r[0]==e[0]&&r[1]==e[1]},IG;(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))}IG=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 Dn(a[0]):new qa(a)}})();var iB=function(r,e,t,n){var i=[];n!==!1&&i.push(r);var a=kg(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};en.prototype.sampleAt=function(r){for(var e=this.getCoordinates(),t=[],n=1;n<e.length;n++)t=t.concat(iB(e[n-1],e[n],r,n===1));return new en(t)};Xa.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(iB(n[a-1],n[a],r,a===1));t.push(i)}),new Xa(t)};Dn.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(iB(n[a-1],n[a],r,a===1));t.push(i)}),new Dn(t)};qa.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(iB(a[s-1],a[s],r,s===1));i.push(o)})}),new qa(t)};GF.prototype.intersection=function(r,e){if(r.sampleAt){var t=_o(this.getCenter().concat(this.getCenter()),this.getRadius());r=IG(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=kg(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 Dn(s[0]):new qa(s):r}}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+r.getType());return r};en.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(dm(r,this.getFirstCoordinate())||dm(r,this.getLastCoordinate()))return[this];var s=this.getCoordinates(),A=[s[0]],l=[];for(t=0;t<s.length-1;t++)if(!dm(s[t],s[t+1])){if(dm(r,s[t+1]))A.push(s[t+1]),l.push(new en(A)),A=[];else if(!dm(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 en(A)),A=[r])}A.push(s[t+1])}return A.length>1&&l.push(new en(A)),l.length?l:[this]};var ki=function(r){r||(r={}),Ea.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};kr(ki,Ea);ki.prototype.setWidth=function(r){this._width=r||0};ki.prototype.setWidth2=function(r){this._width2=r};ki.prototype.getOffset=function(r){return this._offset[r]};ki.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}}};ki.prototype.setLineCap=function(r){this._lineCap=r==="round"?"round":"butt"};ki.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};ki.prototype.setColor=function(r){try{this._color=lh(r)}catch{this._color=[0,0,0,1]}};ki.prototype.setColor2=function(r){try{this._color2=lh(r)}catch{this._color2=null}};ki.prototype.setArrowColor=function(r){try{this._acolor=du(r)}catch{this._acolor=null}};ki.prototype.getColor=function(r,e){if(this._colorFn)return du(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)+")"};ki.prototype.getArrow=function(){return this._arrow};ki.prototype.setArrow=function(r){this._arrow=parseInt(r),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)};ki.prototype.getArrowSize=function(){return this._arrowSize||[16,16]};ki.prototype.setArrowSize=function(r){Array.isArray(r)?this._arrowSize=r:typeof r=="number"&&(this._arrowSize=[r,r])};ki.prototype.drawArrow=function(r,e,t,n,i){var a=this.getArrowSize()[0]*i,o=kg(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()};ki.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,d=h.length;if(a.lineJoin="round",a.lineCap=this._lineCap||"butt",h.length>1)for(f=0;f<h.length;f++){var g=f/d;for(n=h[f],a.lineWidth=this.getWidth(e.feature,g)*e.pixelRatio,a.strokeStyle=this.getColor(e.feature,g),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()}};ki.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=kg(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=kg(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]};ki.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+=kg(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 d=(l-A)/s;c.push([u[0]+h*d,u[1]+f*d]),o.push(c),u=[u[0]+h*d*a,u[1]+f*d*a],c=[u],A=0}else A+=s,u=i,c.push(u),n++,i=r[n]}return o.push(c),o};const Xct={name:"ol-style-flowline",setup(r){const e=Be("stylable",null),{properties:t}=Or(r);let n=Ze(()=>new ki(t));const i=o=>{if(e instanceof WF||e instanceof zF){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=Ze(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return ye(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),cr(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),pr(()=>{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 qct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var DI=me(Xct,[["render",qct]]);function EE(r){EE.installed||(EE.installed=!0,r.component(FI.name,FI),r.component(RI.name,RI),r.component(MI.name,MI),r.component(NI.name,NI),r.component(PI.name,PI),r.component(UI.name,UI),r.component(DI.name,DI))}var Zct=Object.freeze(Object.defineProperty({__proto__:null,default:EE,install:EE,Style:FI,Stroke:MI,Fill:NI,Icon:PI,Text:UI,FlowLine:DI,Circle:RI},Symbol.toStringTag,{value:"Module"}));const Jct={name:"ol-interaction-select",emits:["select"],setup(r,{emit:e}){const t=Be("map"),{properties:n}=Or(r);let i=Ze(()=>{let a=new HC(bA(Jn({},n),{style:new Ea}));return a.on("select",o=>{e("select",o)}),a});return ye(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),cr(()=>{t.addInteraction(i.value)}),pr(()=>{t.removeInteraction(i.value)}),Qr("stylable",i),{select:i}},props:{multi:{type:Boolean,default:!1},condition:{type:Function},filter:{type:Function},features:{type:[Ii,Object]},hitTolerance:{type:Number,default:0,validator:r=>r>=0}}};function tht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var QI=me(Jct,[["render",tht]]),bh=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 El({source:new Mu({features:new Ii,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=UC),HC.call(this,r),this.on("select",this.selectCluster.bind(this))};kr(bh,HC);bh.prototype.setMap=function(r){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&ys(this._listener),this._listener=null,HC.prototype.setMap.call(this,r),this.overlayLayer_.setMap(r),r&&r.getView()&&(this._listener=r.getView().on("change:resolution",this.clear.bind(this)))};bh.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()};bh.prototype.getLayer=function(){return this.overlayLayer_};bh.prototype.selectCluster=function(r){if(r instanceof _r&&(r={selected:[r]}),!r.selected.length){this._autoClose?this.clear():r.deselected.forEach(y=>{y.get("selectcluserfeatures").forEach(C=>{this.overlayLayer_.getSource().removeFeature(C)})});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 _r({selectclusterfeature:!0,features:[n[A]],geometry:new xr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new _r({selectclusterlink:!0,geometry:new en([i,u])}),f.push(h);else{s=0;var d=2*this.pointRadius;for(l=Math.min(this.maxObjects,n.length),A=0;A<l;A++){o=d/2+d*s/(2*Math.PI),s=s+(d+.1)/o;var g=a*o*Math.sin(s),m=a*o*Math.cos(s);u=[i[0]+g,i[1]+m],c=new _r({selectclusterfeature:!0,features:[n[A]],geometry:new xr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new _r({selectclusterlink:!0,geometry:new en([i,u])}),f.push(h)}}e.set("selectcluserfeatures",f),this.animate?this.animateCluster_(i,f):t.addFeatures(f)}}};bh.prototype.animateCluster_=function(r,e){if(this.listenerKey_&&ys(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||JC(A),u=A.frameState.pixelRatio,c=this.getMap().getView().getResolution(),h=Gs((A.frameState.time-a)/i),f=0,d;d=e[f];f++)if(d.get("features")){var g=d.getGeometry().getCoordinates();g[0]=r[0]+h*(g[0]-r[0]),g[1]=r[1]+h*(g[1]-r[1]);for(var m=new xr(g),v=n(d,c),y=0;y<v.length;y++){var w,C=GC.prototype.getFeaturesAtPixel?!1:v[y].getImage();C&&(w=C.getScale(),C.setScale(u)),l.setStyle?(l.setStyle(v[y]),l.drawGeometry(m)):(l.setImageStyle(C),l.drawPointGeometry(m)),C&&C.setScale(w)}}if(h>1){ys(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 _r(new xr(this.getMap().getView().getCenter()));s.setStyle(new Ea({image:new x0({})})),this.overlayLayer_.getSource().addFeature(s)};bh.prototype.getClusterExtent=function(r){if(!r.get("features"))return null;var e=Di();return r.get("features").forEach(function(t){e=Ah(e,t.getGeometry().getExtent())}),e[0]===e[2]&&e[1]===e[3]?null:e};const eht={name:"ol-interaction-clusterselect",emits:["select"],setup(r,{emit:e}){const t=Be("map"),{properties:n}=Or(r);let i=Ze(()=>{let a=new bh(bA(Jn({},n),{style:new Ea}));return a.on("select",o=>{e("select",o)}),a});ye(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),cr(()=>{t.addInteraction(i.value)}),pr(()=>{t.removeInteraction(i.value)}),Qr("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 rht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var kI=me(eht,[["render",rht]]);const nht={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:d,freehand:g,freehandCondition:m,wrapX:v}=rh(r);let y=()=>{let C=new WF({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:d.value,freehand:g.value,freehandCondition:m.value,wrapX:v.value});return C.on("drawstart",O=>{e("drawstart",O)}),C.on("drawend",O=>{e("drawend",O)}),C},w=y();ye([i,a,o,s,A,l,u,c,h,f,d,g,m,v],()=>{t.removeInteraction(w),w=y(),t.addInteraction(w),w.changed(),t.changed()}),cr(()=>{t.addInteraction(w)}),pr(()=>{t.removeInteraction(w)}),Qr("stylable",w)},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 iht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var HI=me(nht,[["render",iht]]);const aht={name:"ol-interaction-snap",setup(r){const e=Be("map"),t=Be("vectorSource"),{properties:n}=Or(r);let i=()=>new get(bA(Jn({},n),{source:t.value})),a=i();ye(n,()=>{e.removeInteraction(a),a=i(),e.addInteraction(a),e.changed()}),cr(()=>{e.addInteraction(a)}),pr(()=>{e.removeInteraction(a)})},props:{vertex:{type:Boolean,default:!0},edge:{type:Boolean,default:!0},pixelTolerance:{type:Number,default:10}}};function oht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var GI=me(aht,[["render",oht]]);const sht={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}=rh(r);let c=()=>{let f=new zF({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",d=>{e("modifystart",d)}),f.on("modifyend",d=>{e("modifyend",d)}),f},h=c();ye([a,o,s,A,l,u],()=>{t.removeInteraction(h),h=c(),t.addInteraction(h),h.changed(),t.changed()}),cr(()=>{t.addInteraction(h)}),pr(()=>{t.removeInteraction(h)}),Qr("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:[Ii,Object]}}};function Aht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var $I=me(sht,[["render",Aht]]),hi=function(r){r||(r={});var e=this;this.selection_=new Ii,this.handles_=new Ii,this.overlayLayer_=new El({source:new Mu({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")||"")]}}),Es.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()};kr(hi,Es);hi.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"};hi.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}Es.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())};hi.prototype.setActive=function(r){this.select(null),this.overlayLayer_.setVisible(r),Es.prototype.setActive.call(this,r)};hi.prototype.setDefaultStyle=function(r){r=r||{};var e=r.pointStroke||new zi({color:[255,0,0,1],width:1}),t=r.stroke||new zi({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=r.fill||new Ba({color:[255,0,0,.01]}),i=r.pointFill||new Ba({color:[255,255,255,.8]}),a=new J1({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 J1({fill:i,stroke:e,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),s=new J1({fill:i,stroke:e,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function A(l,u,c){return[new Ea({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_()};hi.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_()}};hi.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")})||{}};hi.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};hi.prototype._isRectangle=function(r){if(this.get("keepRectangle")&&r.getType()==="Polygon"){var e=r.getCoordinates()[0];return e.length===5}return!1};hi.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=_o(o,0),this.selection_.forEach(function(c){var h=this.getGeometryRotateToZero_(c).getExtent();Ah(o,h)}.bind(this)),r===!0)this.ispt_||(this.overlayLayer_.getSource().addFeature(new _r({geometry:new xr(this.center_),handle:"rotate0"})),n=ch(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new _r(n),this.overlayLayer_.getSource().addFeature(t));else{if(this.ispt_){var A=this.getMap().getPixelFromCoordinate([o[0],o[1]]);A&&(o=oa([this.getMap().getCoordinateFromPixel([A[0]-10,A[1]-10]),this.getMap().getCoordinateFromPixel([A[0]+10,A[1]+10])]))}n=i?new Dn([s]):ch(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new _r(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 _r({geometry:new xr([(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 _r({geometry:new xr(u[e]),handle:"scale",option:e}),l.push(t);this.get("translate")&&!this.get("translateFeature")&&(t=new _r({geometry:new xr([(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 _r({geometry:new xr(u[3]),handle:"rotate"}),l.push(t)),this.overlayLayer_.getSource().addFeatures(l)}}};hi.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_})}};hi.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_})};hi.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach(function(r){ys(r)}),this._featureListeners=[],this.selection_.forEach(function(r){this._featureListeners.push(r.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))};hi.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=Di(),a=Di(),o=0,s;s=this.selection_.item(o);o++)if(this.geoms_.push(s.getGeometry().clone()),i=Ah(i,s.getGeometry().getExtent()),this.get("enableRotatedTransform")&&n!==0){var A=this.getGeometryRotateToZero_(s,!0);this.rotatedGeoms_.push(A),a=Ah(a,A.getExtent())}if(this.extent_=ch(i).getCoordinates()[0],this.get("enableRotatedTransform")&&n!==0&&(this.rotatedExtent_=ch(a).getCoordinates()[0]),this.mode_==="rotate"){this.center_=this.getCenter()||Ya(i);var l=r.map.getTargetElement();l.style.cursor=this.Cursors.rotate0,this.previousCursor_=l.style.cursor}else this.center_=Ya(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}}};hi.prototype.getFeatures=function(){return this.selection_};hi.prototype.getCenter=function(){return this.get("center")};hi.prototype.setCenter=function(r){return this.set("center",r)};function zl(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 xo(r,e){return[e[0]-r[0],e[1]-r[1]]}function ao(r,e){return[r[0]+e[0],r[1]+e[1]]}hi.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]),d=this.constraint_,g=this.opt_,m=this.coordinate_,v=r.coordinate;if(this.get("enableRotatedTransform")&&e!==0){var y=new xr(this.coordinate_);y.rotate(e*-1,c),m=y.getCoordinates();var w=new xr(r.coordinate);w.rotate(e*-1,c),v=w.getCoordinates()}var C=(v[0]-c[0])/(m[0]-c[0]),O=(v[1]-c[1])/(m[1]-c[1]),F=[v[0]-m[0],v[1]-m[1]];if(this.get("enableRotatedTransform")&&e!==0){var I=new xr(c);I.rotate(e*-1,this.getMap().getView().getCenter()),c=I.getCoordinates()}for(this.get("noFlip")&&(C<0&&(C=-C),O<0&&(O=-O)),this.constraint_?this.constraint_=="h"?C=1:O=1:this.get("keepAspectRatio")(r)&&(C=O=Math.min(C,O)),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,L,N){if(N<2)return L;if(f){var x=[[6],[0,8],[2],[4]],S=[T[0],T[1]],P=[T[2],T[3]],U=[T[4],T[5]],tt=[T[6],T[7]],q=[T[8],T[9]];if(d){var rt=g%2===0?xo(S,P):xo(tt,S),nt=zl(F,rt),At=g+1<x.length?g+1:0,ct=[...x[g],...x[At]];for(n=0;n<T.length;n+=N)L[n]=ct.includes(n)?T[n]+nt[0]:T[n],L[n+1]=ct.includes(n)?T[n+1]+nt[1]:T[n+1]}else{var Tt,M;switch(g){case 0:F=xo(tt,v),Tt=zl(F,xo(U,tt)),M=zl(F,xo(S,tt)),[L[0],L[1]]=ao(S,Tt),[L[4],L[5]]=ao(U,M),[L[6],L[7]]=ao(tt,F),[L[8],L[9]]=ao(q,Tt);break;case 1:F=xo(S,v),Tt=zl(F,xo(tt,S)),M=zl(F,xo(P,S)),[L[0],L[1]]=ao(S,F),[L[2],L[3]]=ao(P,Tt),[L[6],L[7]]=ao(tt,M),[L[8],L[9]]=ao(q,F);break;case 2:F=xo(P,v),Tt=zl(F,xo(S,P)),M=zl(F,xo(U,P)),[L[0],L[1]]=ao(S,M),[L[2],L[3]]=ao(P,F),[L[4],L[5]]=ao(U,Tt),[L[8],L[9]]=ao(q,M);break;case 3:F=xo(U,v),Tt=zl(F,xo(P,U)),M=zl(F,xo(tt,U)),[L[2],L[3]]=ao(P,M),[L[4],L[5]]=ao(U,F),[L[6],L[7]]=ao(tt,Tt);break}}}else for(n=0;n<T.length;n+=N)C!=1&&(L[n]=c[0]+(T[n]-c[0])*C),O!=1&&(L[n+1]=c[1]+(T[n+1]-c[1])*O);return a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),L}),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:[C,O],pixel:r.pixel,coordinate:r.coordinate});break}}this.isUpdating_=!1}};hi.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}};hi.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};hi.prototype.getFeatures=function(){return this.selection_};const lht={name:"ol-interaction-transform",setup(r){const e=Be("map"),{properties:t}=Or(r);let n=Ze(()=>new hi(Jn({},t)));ye(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),cr(()=>{e.addInteraction(n.value)}),pr(()=>{e.removeInteraction(n.value)}),Qr("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 uht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var VI=me(lht,[["render",uht]]);const cht={name:"ol-interaction-dragrotatezoom",setup(r){const e=Be("map"),{properties:t}=Or(r);let n=Ze(()=>new hJ(Jn({},t)));ye(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),cr(()=>{e.addInteraction(n.value)}),pr(()=>{e.removeInteraction(n.value)})},props:{condition:{type:Function},duration:{type:Number,default:400}}};function hht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var jI=me(cht,[["render",hht]]);function CE(r){CE.installed||(CE.installed=!0,r.component(QI.name,QI),r.component(kI.name,kI),r.component(HI.name,HI),r.component(GI.name,GI),r.component($I.name,$I),r.component(VI.name,VI),r.component(jI.name,jI))}var fht=Object.freeze(Object.defineProperty({__proto__:null,default:CE,install:CE,SelectInteraction:QI,ClusterSelectInteraction:kI,DrawInteraction:HI,SnapInteraction:GI,ModifyInteraction:$I,TransformInteraction:VI,DragRotateAndZoomInteraction:jI},Symbol.toStringTag,{value:"Module"}));const dht={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:Gs}}};function pht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var wA=me(dht,[["render",pht]]),Zi=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:TF;r.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=r.hiddenStyle,Oi.call(this)};kr(Zi,Oi);Zi.hiddenStyle=new Ea({image:new x0({}),stroke:new zi({color:"transparent"})});Zi.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||JC(r),o=Ux(r,n[i]);a.setStyle(o),o.getZIndex()<0?a.drawGeometry(t||e):a.drawGeometry(e)}catch{}};Zi.prototype.animate=function(){return!1};GC.prototype.animateFeature=function(r,e){var t=this._featureAnimationLayer;t||(t=this._featureAnimationLayer=new El({source:new Mu}),t.setMap(this)),t.getSource().addFeature(r);var n=e.on("animationend",function(i){i.feature===r&&(t.getSource().removeFeature(r),ys(n))});t.animateFeature(r,e)};pF.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:Ya(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(g){s.type=g.type;try{s.vectorContext=g.vectorContext||JC(g)}catch{}if(s.frameState=g.frameState,s.inversePixelTransform=g.inversePixelTransform,s.extent||(s.extent=g.frameState.extent,s.start=g.frameState.time,s.context=g.context),s.time=g.frameState.time-s.start,s.elapsed=s.time/e[u].duration_,s.elapsed>1&&(s.elapsed=1),g.context.save(),c.forEach(function(v){v.get("active")&&v.precompose(g)}),this.getOpacity&&(g.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(v){v.get("active")&&v.postcompose(g)}),g.context.restore(),g.frameState.animate=!0}function f(g){ys(i),i=null,r.setStyle(a);var m={type:"animationend",feature:r};if(g)for(var v in g)g.hasOwnProperty(v)&&(m[v]=g[v]);e[u].dispatchEvent(m),n.dispatchEvent(m)}function d(g){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||Zi.hiddenStyle);var m={type:"animationstart",feature:r};if(g)for(var v in g)g.hasOwnProperty(v)&&(m[v]=g[v]);e[u].dispatchEvent(m),n.dispatchEvent(m)}}return d(),{start:d,stop:f,isPlaying:function(){return!!i}}};var hR=function(r){r=r||{},this.speed_=r.speed||0,Zi.call(this,r),this.side_=r.side||"top"};kr(hR,Zi);hR.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 Od(r,e){const{map:t,vectorLayer:n}=wA.setup(),{properties:i}=Or(e),a=Ze(()=>new r(Jn({},i)));return Qr("animation",a),{map:t,vectorLayer:n,animation:a,properties:i}}const ght={name:"ol-animation-drop",extends:wA,setup(r){const{map:e,vectorLayer:t,properties:n}=Od(hR,r);return{map:e,vectorLayer:t,properties:n}},props:{side:{type:Number,default:0},speed:{type:Number,default:0}}};function vht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var KI=me(ght,[["render",vht]]),fR=function(r){r=r||{},Zi.call(this,r),this.amplitude_=r.amplitude||40,this.bounce_=-Math.PI*(r.bounce||6),this.horizontal_=r.horizontal};kr(fR,Zi);fR.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 mht={name:"ol-animation-shake",extends:wA,setup(r){const{map:e,vectorLayer:t,properties:n,animation:i}=Od(fR,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 yht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var WI=me(mht,[["render",yht]]),U0=function(r){r=r||{},Zi.call(this,r),this.set("zoomout",r.zoomOut)};kr(U0,Zi);var _ht=function(r){r=r||{},r.zoomOut=!0,U0.call(this,r)};kr(_ht,U0);U0.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 wht={name:"ol-animation-zoom",extends:wA,setup(r){const{map:e,vectorLayer:t,properties:n}=Od(U0,r);return{map:e,vectorLayer:t,properties:n}},props:{zoomOut:{type:Boolean,default:!1}}};function Eht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var zI=me(wht,[["render",Eht]]),dR=function(r){Zi.call(this,r)};kr(dR,Zi);dR.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 Cht={name:"ol-animation-teleport",extends:wA,setup(r){const{map:e,vectorLayer:t,properties:n}=Od(dR,r);return{map:e,vectorLayer:t,properties:n}},props:{}};function Bht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var YI=me(Cht,[["render",Bht]]),pR=function(r){r=r||{},this.speed_=r.speed||0,Zi.call(this,r)};kr(pR,Zi);pR.prototype.animate=function(r){return r.context.globalAlpha=this.easing_(r.elapsed),this.drawGeom_(r,r.geom),r.time<=this.duration_};const bht={name:"ol-animation-fade",extends:wA,setup(r){const{map:e,vectorLayer:t,properties:n}=Od(pR,r);return{map:e,vectorLayer:t,properties:n}}};function Tht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var XI=me(bht,[["render",Tht]]),gR=function(r){r=r||{},this.speed_=r.speed||0,Zi.call(this,r),this.side_=r.side||"left"};kr(gR,Zi);gR.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 Sht={name:"ol-animation-slide",extends:wA,setup(r){const{map:e,vectorLayer:t,properties:n}=Od(gR,r);return{map:e,vectorLayer:t,properties:n}},props:{speed:{type:Number,default:0}}};function xht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var qI=me(Sht,[["render",xht]]),vR=function(r){switch(r=r||{},Zi.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_)};kr(vR,Zi);vR.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 Iht={name:"ol-animation-path",extends:wA,setup(r){const{map:e,vectorLayer:t,properties:n}=Od(vR,r);return{map:e,vectorLayer:t,properties:n}},props:{rotate:{type:Boolean,default:!1},speed:{type:Number,default:0},path:{type:Object}}};function Lht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var ZI=me(Iht,[["render",Lht]]);function BE(r){BE.installed||(BE.installed=!0,r.component(wA.name,wA),r.component(KI.name,KI),r.component(WI.name,WI),r.component(zI.name,zI),r.component(YI.name,YI),r.component(XI.name,XI),r.component(qI.name,qI),r.component(ZI.name,ZI))}var Oht=Object.freeze(Object.defineProperty({__proto__:null,default:BE,install:BE,FeatureAnimation:wA,DropAnimation:KI,ShakeAnimation:WI,ZoomAnimation:zI,TeleportAnimation:YI,FadeAnimation:XI,PathAnimation:ZI,SlideAnimation:qI},Symbol.toStringTag,{value:"Module"})),Fht=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)}}(),Rht=function(r){Fht(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(Yr),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(je(this.geometries_[t],xe.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<_h(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){wh(t);for(var n=this.geometries_,i=0,a=n.length;i<a;++i)Ah(t,n[i].getExtent());return t},e.prototype.getGeometries=function(){return z5(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 pt.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=Ya(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(z5(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}(FC);function z5(r){for(var e=[],t=0,n=r.length;t<n;++t)e.push(r[t].clone());return e}var Ca=Rht,Mht=Object.freeze(Object.defineProperty({__proto__:null,Circle:GF,Geometry:FC,GeometryCollection:Ca,LinearRing:Mg,LineString:en,MultiLineString:Xa,MultiPoint:$s,MultiPolygon:qa,Point:xr,Polygon:Dn,SimpleGeometry:_A},Symbol.toStringTag,{value:"Module"})),Nht=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?Ve(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()===ho.TILE_PIXELS&&(i=Ve(i),i.setWorldExtent(t.extent)),n={dataProjection:i,featureProjection:t.featureProjection}}return this.adaptOptions(n)},r.prototype.adaptOptions=function(e){return Ce({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)},r.prototype.getType=function(){return Re()},r.prototype.readFeature=function(e,t){return Re()},r.prototype.readFeatures=function(e,t){return Re()},r.prototype.readGeometry=function(e,t){return Re()},r.prototype.readProjection=function(e){return Re()},r.prototype.writeFeature=function(e,t){return Re()},r.prototype.writeFeatures=function(e,t){return Re()},r.prototype.writeGeometry=function(e,t){return Re()},r}(),D0=Nht;function Gn(r,e,t){var n=t?Ve(t.featureProjection):null,i=t?Ve(t.dataProjection):null,a;if(n&&i&&!el(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 mR(r,e){var t=e?Ve(e.featureProjection):null,n=e?Ve(e.dataProjection):null;return t&&n&&!el(t,n)?Xw(r,n,t):r}var Pht=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)}}(),Uht=function(r){Pht(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return dA.JSON},e.prototype.readFeature=function(t,n){return this.readFeatureFromObject(a1(t),this.getReadOptions(t,n))},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(a1(t),this.getReadOptions(t,n))},e.prototype.readFeatureFromObject=function(t,n){return Re()},e.prototype.readFeaturesFromObject=function(t,n){return Re()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(a1(t),this.getReadOptions(t,n))},e.prototype.readGeometryFromObject=function(t,n){return Re()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(a1(t))},e.prototype.readProjectionFromObject=function(t){return Re()},e.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},e.prototype.writeFeatureObject=function(t,n){return Re()},e.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},e.prototype.writeFeaturesObject=function(t,n){return Re()},e.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},e.prototype.writeGeometryObject=function(t,n){return Re()},e}(D0);function a1(r){if(typeof r=="string"){var e=JSON.parse(r);return e||null}else return r!==null?r:null}var yR=Uht,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)}}(),Fd={};Fd[pt.POINT]=Hht;Fd[pt.LINE_STRING]=Ght;Fd[pt.POLYGON]=Kht;Fd[pt.MULTI_POINT]=Vht;Fd[pt.MULTI_LINE_STRING]=$ht;Fd[pt.MULTI_POLYGON]=jht;var Rd={};Rd[pt.POINT]=Wht;Rd[pt.LINE_STRING]=zht;Rd[pt.POLYGON]=Yht;Rd[pt.MULTI_POINT]=qht;Rd[pt.MULTI_LINE_STRING]=Xht;Rd[pt.MULTI_POLYGON]=Zht;var Qht=function(r){Dht(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=Y5(a.geometry,n),s=new _r;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 Y5(t,n)},e.prototype.readProjectionFromObject=function(t){if(t.spatialReference&&t.spatialReference.wkid!==void 0){var n=t.spatialReference,i=n.wkid;return Ve("EPSG:"+i)}else return null},e.prototype.writeGeometryObject=function(t,n){return X5(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=X5(o,n);var s=n&&(n.dataProjection||n.featureProjection);s&&(i.geometry.spatialReference={wkid:Number(Ve(s).getCode().split(":").pop())}),delete a[t.getGeometryName()]}return rd(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}(yR);function Y5(r,e){var t,n;if(!r)return null;var i;if(typeof r.x=="number"&&typeof r.y=="number")i=pt.POINT;else if(r.points)i=pt.MULTI_POINT;else if(r.paths){var a=r;a.paths.length===1?i=pt.LINE_STRING:i=pt.MULTI_LINE_STRING}else if(r.rings){var o=r,s=uv(o),A=kht(o.rings,s);A.length===1?(i=pt.POLYGON,r=Ce({},r,(t={},t.rings=A[0],t))):(i=pt.MULTI_POLYGON,r=Ce({},r,(n={},n.rings=A,n)))}var l=Fd[i];return Gn(l(r),!1,e)}function kht(r,e){var t=[],n=[],i=[],a,o;for(a=0,o=r.length;a<o;++a){t.length=0,T0(t,0,r[a],e.length);var s=MC(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=ps(new Mg(u).getExtent(),new Mg(A).getExtent());if(c){n[a].push(A),l=!0;break}}l||n.push([A.reverse()])}return n}function Hht(r){var e;return r.m!==void 0&&r.z!==void 0?e=new xr([r.x,r.y,r.z,r.m],ae.XYZM):r.z!==void 0?e=new xr([r.x,r.y,r.z],ae.XYZ):r.m!==void 0?e=new xr([r.x,r.y,r.m],ae.XYM):e=new xr([r.x,r.y]),e}function Ght(r){var e=uv(r);return new en(r.paths[0],e)}function $ht(r){var e=uv(r);return new Xa(r.paths,e)}function uv(r){var e=ae.XY;return r.hasZ===!0&&r.hasM===!0?e=ae.XYZM:r.hasZ===!0?e=ae.XYZ:r.hasM===!0&&(e=ae.XYM),e}function Vht(r){var e=uv(r);return new $s(r.points,e)}function jht(r){var e=uv(r);return new qa(r.rings,e)}function Kht(r){var e=uv(r);return new Dn(r.rings,e)}function Wht(r,e){var t=r.getCoordinates(),n,i=r.getLayout();return i===ae.XYZ?n={x:t[0],y:t[1],z:t[2]}:i===ae.XYM?n={x:t[0],y:t[1],m:t[2]}:i===ae.XYZM?n={x:t[0],y:t[1],z:t[2],m:t[3]}:i===ae.XY?n={x:t[0],y:t[1]}:Le(!1,34),n}function Q0(r){var e=r.getLayout();return{hasZ:e===ae.XYZ||e===ae.XYZM,hasM:e===ae.XYM||e===ae.XYZM}}function zht(r,e){var t=Q0(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:[r.getCoordinates()]}}function Yht(r,e){var t=Q0(r);return{hasZ:t.hasZ,hasM:t.hasM,rings:r.getCoordinates(!1)}}function Xht(r,e){var t=Q0(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:r.getCoordinates()}}function qht(r,e){var t=Q0(r);return{hasZ:t.hasZ,hasM:t.hasM,points:r.getCoordinates()}}function Zht(r,e){for(var t=Q0(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 X5(r,e){var t=Rd[r.getType()];return t(Gn(r,!0,e),e)}var Jht=Qht,tft=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)}}(),eft=function(r){tft(e,r);function e(t){var n=this,i=t||{};return n=r.call(this)||this,n.dataProjection=Ve(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(n.defaultFeatureProjection=Ve(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=JI(i.geometry,n),o=new _r;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 JI(t,n)},e.prototype.readProjectionFromObject=function(t){var n=t.crs,i;return n?n.type=="name"?i=Ve(n.properties.name):n.type==="EPSG"?i=Ve("EPSG:"+n.properties.code):Le(!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=tL(s,n),delete o[t.getGeometryName()]),rd(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 tL(t,this.adaptOptions(n))},e}(yR);function JI(r,e){if(!r)return null;var t;switch(r.type){case pt.POINT:{t=nft(r);break}case pt.LINE_STRING:{t=ift(r);break}case pt.POLYGON:{t=Aft(r);break}case pt.MULTI_POINT:{t=oft(r);break}case pt.MULTI_LINE_STRING:{t=aft(r);break}case pt.MULTI_POLYGON:{t=sft(r);break}case pt.GEOMETRY_COLLECTION:{t=rft(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return Gn(t,!1,e)}function rft(r,e){var t=r.geometries.map(function(n){return JI(n,e)});return new Ca(t)}function nft(r){return new xr(r.coordinates)}function ift(r){return new en(r.coordinates)}function aft(r){return new Xa(r.coordinates)}function oft(r){return new $s(r.coordinates)}function sft(r){return new qa(r.coordinates)}function Aft(r){return new Dn(r.coordinates)}function tL(r,e){r=Gn(r,!0,e);var t=r.getType(),n;switch(t){case pt.POINT:{n=dft(r);break}case pt.LINE_STRING:{n=uft(r);break}case pt.POLYGON:{n=pft(r,e);break}case pt.MULTI_POINT:{n=hft(r);break}case pt.MULTI_LINE_STRING:{n=cft(r);break}case pt.MULTI_POLYGON:{n=fft(r,e);break}case pt.GEOMETRY_COLLECTION:{n=lft(r,e);break}case pt.CIRCLE:{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return n}function lft(r,e){var t=r.getGeometriesArray().map(function(n){var i=Ce({},e);return delete i.featureProjection,tL(n,i)});return{type:"GeometryCollection",geometries:t}}function uft(r,e){return{type:"LineString",coordinates:r.getCoordinates()}}function cft(r,e){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function hft(r,e){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function fft(r,e){var t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(t)}}function dft(r,e){return{type:"Point",coordinates:r.getCoordinates()}}function pft(r,e){var t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(t)}}var gft=eft,Ad="http://www.w3.org/2001/XMLSchema-instance";function tr(r,e){return cv().createElementNS(r,e)}function Eo(r,e){return LG(r,e,[]).join("")}function LG(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)LG(n,e,t)}return t}function Al(r){return"documentElement"in r}function vft(r,e,t){return r.getAttributeNS(e,t)||""}function ll(r){return new DOMParser().parseFromString(r,"application/xml")}function q5(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];tn(a,i)}}}function Ie(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 $e(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 xn(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 dt(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 vt(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 OG(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=Zn(i.localName)}FG(t,n,a,o)}}function Zn(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 tr(l,A)}}var la=Zn();function $o(r,e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=r[e[i]];return n}function kt(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 Do(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),Do(e,t,n,i),n.pop()}function FG(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 qe(r,e,t,n,i,a,o){return i.push(r),FG(e,t,n,i,a,o),i.pop()}var pT=void 0;function mft(){return pT===void 0&&typeof XMLSerializer<"u"&&(pT=new XMLSerializer),pT}var gT=void 0;function cv(){return gT===void 0&&typeof document<"u"&&(gT=document.implementation.createDocument("","",null)),gT}var yft=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)}}(),_ft=function(r){yft(e,r);function e(){var t=r.call(this)||this;return t.xmlSerializer_=mft(),t}return e.prototype.getType=function(){return dA.XML},e.prototype.readFeature=function(t,n){if(t)if(typeof t=="string"){var i=ll(t);return this.readFeatureFromDocument(i,n)}else return Al(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=ll(t);return this.readFeaturesFromDocument(i,n)}else return Al(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&&tn(i,this.readFeaturesFromNode(a,n));return i},e.prototype.readFeaturesFromNode=function(t,n){return Re()},e.prototype.readGeometry=function(t,n){if(t)if(typeof t=="string"){var i=ll(t);return this.readGeometryFromDocument(i,n)}else return Al(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=ll(t);return this.readProjectionFromDocument(n)}else return Al(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}(D0),k0=_ft,wft=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)}}(),vu="http://www.opengis.net/gml",Eft=/^[\s\xa0]*$/,ui=function(r){wft(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:Ie(n.readFeaturesInternal),featureMembers:$e(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 d=f.nodeName.split(":").pop();if(s.indexOf(d)===-1){var g="",m=0,v=f.namespaceURI;for(var y in A){if(A[y]===v){g=y;break}++m}g||(g=l+m,A[g]=v),s.push(g+":"+d)}}}i!="featureMember"&&(o.featureType=s,o.featureNS=A)}if(typeof A=="string"){var w=A;A={},A[u]=w}var C={},O=Array.isArray(s)?s:[s];for(var F in A){for(var I={},c=0,h=O.length;c<h;++c){var T=O[c].indexOf(":")===-1?u:O[c].split(":")[0];T===F&&(I[O[c].split(":").pop()]=i=="featureMembers"?Ie(this.readFeatureElement,this):$e(this.readFeatureElement,this))}C[A[F]]=I}i=="featureMember"||i=="member"?a=Kt(void 0,C,t,n):a=Kt([],C,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?mR(a,i):void 0},e.prototype.readGeometryElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?Gn(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=Eo(s,!1),Eft.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 _r(o);a&&f.setGeometryName(a);var d=t.getAttribute("fid")||vft(t,this.namespace,"id");return d&&f.setId(d),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 xr(i,ae.XYZ)},e.prototype.readMultiPoint=function(t,n){var i=Kt([],this.MULTIPOINT_PARSERS,t,n,this);if(i)return new $s(i)},e.prototype.readMultiLineString=function(t,n){var i=Kt([],this.MULTILINESTRING_PARSERS,t,n,this);if(i)return new Xa(i)},e.prototype.readMultiPolygon=function(t,n){var i=Kt([],this.MULTIPOLYGON_PARSERS,t,n,this);if(i)return new qa(i)},e.prototype.pointMemberParser=function(t,n){Do(this.POINTMEMBER_PARSERS,t,n,this)},e.prototype.lineStringMemberParser=function(t,n){Do(this.LINESTRINGMEMBER_PARSERS,t,n,this)},e.prototype.polygonMemberParser=function(t,n){Do(this.POLYGONMEMBER_PARSERS,t,n,this)},e.prototype.readLineString=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i){var a=new en(i,ae.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 Mg(i,ae.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)tn(a,i[s]),o.push(a.length);return new Dn(a,ae.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&&Ce(i,this.getReadOptions(t,n));var a=this.readFeaturesInternal(t,[i]);return a||[]},e.prototype.readProjectionFromNode=function(t){return Ve(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(k0);ui.prototype.namespace=vu;ui.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}};ui.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}};ui.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}};ui.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:Ie(ui.prototype.pointMemberParser),pointMembers:Ie(ui.prototype.pointMemberParser)}};ui.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:Ie(ui.prototype.lineStringMemberParser),lineStringMembers:Ie(ui.prototype.lineStringMemberParser)}};ui.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:Ie(ui.prototype.polygonMemberParser),polygonMembers:Ie(ui.prototype.polygonMemberParser)}};ui.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:Ie(ui.prototype.readFlatCoordinatesFromNode)}};ui.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Ie(ui.prototype.readLineString)}};ui.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Ie(ui.prototype.readPolygon)}};ui.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:$e(ui.prototype.readFlatLinearRing)}};var Cr=ui;function gh(r){var e=Eo(r,!1);return Gf(e)}function Gf(r){var e=/^\s*(true|1)|(false|0)\s*$/.exec(r);if(e)return e[1]!==void 0||!1}function _R(r){var e=Eo(r,!1),t=Date.parse(e);return isNaN(t)?void 0:t/1e3}function jr(r){var e=Eo(r,!1);return su(e)}function su(r){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(r);if(e)return parseFloat(e[1])}function Si(r){var e=Eo(r,!1);return uu(e)}function uu(r){var e=/^\s*(\d+)\s*$/.exec(r);if(e)return parseInt(e[1],10)}function Xt(r){return Eo(r,!1).trim()}function Hg(r,e){ze(r,e?"1":"0")}function Cft(r,e){r.appendChild(cv().createCDATASection(e))}function Bft(r,e){var t=new Date(e*1e3),n=t.getUTCFullYear()+"-"+sm(t.getUTCMonth()+1,2)+"-"+sm(t.getUTCDate(),2)+"T"+sm(t.getUTCHours(),2)+":"+sm(t.getUTCMinutes(),2)+":"+sm(t.getUTCSeconds(),2)+"Z";r.appendChild(cv().createTextNode(n))}function Ro(r,e){var t=e.toPrecision();r.appendChild(cv().createTextNode(t))}function bE(r,e){var t=e.toString();r.appendChild(cv().createTextNode(t))}function ze(r,e){r.appendChild(cv().createTextNode(e))}var bft=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)}}(),Tft=vu+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",Sft={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Ur=function(r){bft(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.FEATURE_COLLECTION_PARSERS[vu].featureMember=Ie(n.readFeaturesInternal),n.schemaLocation=i.schemaLocation?i.schemaLocation:Tft,n}return e.prototype.readFlatCoordinates=function(t,n){var i=Eo(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s="enu";if(o){var A=Ve(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(/,+/),d=parseFloat(f[0]),g=parseFloat(f[1]),m=f.length===3?parseFloat(f[2]):0;s.substr(0,2)==="en"?u.push(d,g,m):u.push(g,d,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")),tr("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]=vt(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=vt(ze)))}}var d=Ce({},o);d.node=t,qe(d,o.serializers,Zn(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=tr(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();qe({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=Ce({},a);o.node=t;var s;Array.isArray(n)?s=mR(n,a):s=Gn(n,!0,a),qe(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var n=tr(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)}ze(t,u.join(" "))},e.prototype.writeCurveSegments_=function(t,n,i){var a=tr(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();qe({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=tr(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),tr(o.namespaceURI,s!==void 0?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,n,i){var a=tr(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeRing=function(t,n,i){var a=tr(t.namespaceURI,"LinearRing");t.appendChild(a),this.writeLinearRing(a,n,i)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Ve(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);ze(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();qe({node:t,hasZ:o,srsName:s},this.POINTMEMBER_SERIALIZERS,Zn("pointMember"),A,i,void 0,this)},e.prototype.writePointMember=function(t,n,i){var a=tr(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();qe({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]];qe({node:t},this.ENVELOPE_SERIALIZERS,la,A,i,s,this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return tr("http://www.opengis.net/gml",Sft[a.nodeName])},e}(Cr);Ur.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:$e(Ur.prototype.readFlatCoordinates)}};Ur.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:Ur.prototype.innerBoundaryIsParser,outerBoundaryIs:Ur.prototype.outerBoundaryIsParser}};Ur.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:Ie(Ur.prototype.readFlatCoordinates)}};Ur.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:$e(Cr.prototype.readPoint),MultiPoint:$e(Cr.prototype.readMultiPoint),LineString:$e(Cr.prototype.readLineString),MultiLineString:$e(Cr.prototype.readMultiLineString),LinearRing:$e(Cr.prototype.readLinearRing),Polygon:$e(Cr.prototype.readPolygon),MultiPolygon:$e(Cr.prototype.readMultiPolygon),Box:$e(Ur.prototype.readBox)}};Ur.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:vt(Ur.prototype.writeCurveOrLineString),MultiCurve:vt(Ur.prototype.writeMultiCurveOrLineString),Point:vt(Ur.prototype.writePoint),MultiPoint:vt(Ur.prototype.writeMultiPoint),LineString:vt(Ur.prototype.writeCurveOrLineString),MultiLineString:vt(Ur.prototype.writeMultiCurveOrLineString),LinearRing:vt(Ur.prototype.writeLinearRing),Polygon:vt(Ur.prototype.writeSurfaceOrPolygon),MultiPolygon:vt(Ur.prototype.writeMultiSurfaceOrPolygon),Surface:vt(Ur.prototype.writeSurfaceOrPolygon),MultiSurface:vt(Ur.prototype.writeMultiSurfaceOrPolygon),Envelope:vt(Ur.prototype.writeEnvelope)}};Ur.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:vt(Ur.prototype.writeLineStringOrCurveMember),curveMember:vt(Ur.prototype.writeLineStringOrCurveMember)}};Ur.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:vt(Ur.prototype.writeRing),innerBoundaryIs:vt(Ur.prototype.writeRing)}};Ur.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:vt(Ur.prototype.writePointMember)}};Ur.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:vt(Ur.prototype.writeSurfaceOrPolygonMember),polygonMember:vt(Ur.prototype.writeSurfaceOrPolygonMember)}};Ur.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:vt(ze),upperCorner:vt(ze)}};var hv=Ur,xft=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)}}(),Ift=vu+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",Lft={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Fe=function(r){xft(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:Ift,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 Xa(i);return a}else return},e.prototype.readMultiSurface=function(t,n){var i=Kt([],this.MULTISURFACE_PARSERS,t,n,this);if(i)return new qa(i)},e.prototype.curveMemberParser=function(t,n){Do(this.CURVEMEMBER_PARSERS,t,n,this)},e.prototype.surfaceMemberParser=function(t,n){Do(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)tn(a,i[s]),o.push(a.length);return new Dn(a,ae.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 en(i,ae.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=Eo(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=Ve(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 d=o[h],g=o[h+1];o[h]=g,o[h+1]=d}}var m=o.length;if(m==2&&o.push(0),m!==0)return o}},e.prototype.readFlatPosList=function(t,n){var i=Eo(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s=a.srsDimension,A="enu";if(o){var l=Ve(o);A=l.getAxisOrientation()}var u=i.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=uu(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=uu(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=uu(t.parentNode.getAttribute("srsDimension")):s&&(c=uu(s));for(var h,f,d,g=[],m=0,v=u.length;m<v;m+=c)h=parseFloat(u[m]),f=parseFloat(u[m+1]),d=c===3?parseFloat(u[m+2]):0,A.substr(0,2)==="en"?g.push(h,f,d):g.push(f,h,d);return g},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=Ve(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}ze(t,c)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Ve(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);ze(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=tr(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]];qe({node:t},this.ENVELOPE_SERIALIZERS,la,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=tr(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),tr(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();qe({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=tr(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=tr(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,n,i)}else if(t.nodeName==="Curve"){var A=tr(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();qe({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();qe({node:t,hasZ:s,srsName:o},this.POINTMEMBER_SERIALIZERS,Zn("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();qe({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=tr(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=tr(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=tr(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeCurveSegments_=function(t,n,i){var a=tr(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=Ce({},a);o.node=t;var s;Array.isArray(n)?s=mR(n,a):s=Gn(n,!0,a),qe(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]=vt(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=vt(ze)))}}var d=Ce({},o);d.node=t,qe(d,o.serializers,Zn(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]=vt(this.writeFeatureElement,this);var l=Ce({},a);l.node=t,qe(l,A,Zn(o,s),n,i)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return tr(this.namespace,Lft[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")),tr(this.namespace,u)},e.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var i=tr(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&&Ce(a,n),this.writeGeometryElement(i,t,[a]),i},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=tr(this.namespace,"featureMembers");i.setAttributeNS(Ad,"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&&Ce(a,n),this.writeFeatureMembers_(i,t,[a]),i},e}(Cr);Fe.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:$e(Fe.prototype.readFlatPos),posList:$e(Fe.prototype.readFlatPosList),coordinates:$e(hv.prototype.readFlatCoordinates)}};Fe.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:Fe.prototype.interiorParser,exterior:Fe.prototype.exteriorParser}};Fe.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:$e(Cr.prototype.readPoint),MultiPoint:$e(Cr.prototype.readMultiPoint),LineString:$e(Cr.prototype.readLineString),MultiLineString:$e(Cr.prototype.readMultiLineString),LinearRing:$e(Cr.prototype.readLinearRing),Polygon:$e(Cr.prototype.readPolygon),MultiPolygon:$e(Cr.prototype.readMultiPolygon),Surface:$e(Fe.prototype.readSurface),MultiSurface:$e(Fe.prototype.readMultiSurface),Curve:$e(Fe.prototype.readCurve),MultiCurve:$e(Fe.prototype.readMultiCurve),Envelope:$e(Fe.prototype.readEnvelope)}};Fe.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:Ie(Fe.prototype.curveMemberParser),curveMembers:Ie(Fe.prototype.curveMemberParser)}};Fe.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:Ie(Fe.prototype.surfaceMemberParser),surfaceMembers:Ie(Fe.prototype.surfaceMemberParser)}};Fe.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Ie(Cr.prototype.readLineString),Curve:Ie(Fe.prototype.readCurve)}};Fe.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Ie(Cr.prototype.readPolygon),Surface:Ie(Fe.prototype.readSurface)}};Fe.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:$e(Fe.prototype.readPatch)}};Fe.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:$e(Fe.prototype.readSegment)}};Fe.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:Ie(Fe.prototype.readFlatPosList),upperCorner:Ie(Fe.prototype.readFlatPosList)}};Fe.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:$e(Fe.prototype.readPolygonPatch)}};Fe.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:$e(Fe.prototype.readLineStringSegment)}};Fe.prototype.writeFeatures;Fe.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:vt(Fe.prototype.writeRing),interior:vt(Fe.prototype.writeRing)}};Fe.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:vt(ze),upperCorner:vt(ze)}};Fe.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:vt(Fe.prototype.writeSurfaceOrPolygonMember),polygonMember:vt(Fe.prototype.writeSurfaceOrPolygonMember)}};Fe.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:vt(Fe.prototype.writePointMember)}};Fe.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:vt(Fe.prototype.writeLineStringOrCurveMember),curveMember:vt(Fe.prototype.writeLineStringOrCurveMember)}};Fe.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:vt(Fe.prototype.writeCurveOrLineString),MultiCurve:vt(Fe.prototype.writeMultiCurveOrLineString),Point:vt(Fe.prototype.writePoint),MultiPoint:vt(Fe.prototype.writeMultiPoint),LineString:vt(Fe.prototype.writeCurveOrLineString),MultiLineString:vt(Fe.prototype.writeMultiCurveOrLineString),LinearRing:vt(Fe.prototype.writeLinearRing),Polygon:vt(Fe.prototype.writeSurfaceOrPolygon),MultiPolygon:vt(Fe.prototype.writeMultiSurfaceOrPolygon),Surface:vt(Fe.prototype.writeSurfaceOrPolygon),MultiSurface:vt(Fe.prototype.writeMultiSurfaceOrPolygon),Envelope:vt(Fe.prototype.writeEnvelope)}};var fr=Fe,wR=fr;wR.prototype.writeFeatures;wR.prototype.writeFeaturesNode;var Oft=wR,Fft=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)}}(),Qi=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Rft="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd",Mft={rte:RG,trk:MG,wpt:NG},Nft=kt(Qi,{rte:Ie(RG),trk:Ie(MG),wpt:Ie(NG)}),Pft=kt(Qi,{text:dt(Xt,"linkText"),type:dt(Xt,"linkType")}),Uft=kt(Qi,{rte:vt(sdt),trk:vt(Adt),wpt:vt(udt)}),Dft=function(r){Fft(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ve("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(!Pi(Qi,t.namespaceURI))return null;var i=Mft[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(!Pi(Qi,t.namespaceURI))return[];if(t.localName=="gpx"){var i=Kt([],Nft,t,[this.getReadOptions(t,n)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=tr("http://www.topografix.com/GPX/1/1","gpx"),a="http://www.w3.org/2000/xmlns/";return i.setAttributeNS(a,"xmlns:xsi",Ad),i.setAttributeNS(Ad,"xsi:schemaLocation",Rft),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),qe({node:i},Uft,ndt,t,[n]),i},e}(k0),Qft=kt(Qi,{name:dt(Xt),cmt:dt(Xt),desc:dt(Xt),src:dt(Xt),link:BR,number:dt(Si),extensions:bR,type:dt(Xt),rtept:idt}),kft=kt(Qi,{ele:dt(jr),time:dt(_R)}),Hft=kt(Qi,{name:dt(Xt),cmt:dt(Xt),desc:dt(Xt),src:dt(Xt),link:BR,number:dt(Si),type:dt(Xt),extensions:bR,trkseg:odt}),Gft=kt(Qi,{trkpt:adt}),$ft=kt(Qi,{ele:dt(jr),time:dt(_R)}),Vft=kt(Qi,{ele:dt(jr),time:dt(_R),magvar:dt(jr),geoidheight:dt(jr),name:dt(Xt),cmt:dt(Xt),desc:dt(Xt),src:dt(Xt),link:BR,sym:dt(Xt),type:dt(Xt),fix:dt(Xt),sat:dt(Si),hdop:dt(jr),vdop:dt(jr),pdop:dt(jr),ageofdgpsdata:dt(jr),dgpsid:dt(Si),extensions:bR}),jft=["text","type"],Kft=kt(Qi,{text:vt(ze),type:vt(ze)}),Wft=kt(Qi,["name","cmt","desc","src","link","number","type","rtept"]),zft=kt(Qi,{name:vt(ze),cmt:vt(ze),desc:vt(ze),src:vt(ze),link:vt(TR),number:vt(bE),type:vt(ze),rtept:OG(vt(SR))}),Yft=kt(Qi,["ele","time"]),Xft=kt(Qi,["name","cmt","desc","src","link","number","type","trkseg"]),qft=kt(Qi,{name:vt(ze),cmt:vt(ze),desc:vt(ze),src:vt(ze),link:vt(TR),number:vt(bE),type:vt(ze),trkseg:OG(vt(ldt))}),Zft=Zn("trkpt"),Jft=kt(Qi,{trkpt:vt(SR)}),tdt=kt(Qi,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),edt=kt(Qi,{ele:vt(Ro),time:vt(Bft),magvar:vt(Ro),geoidheight:vt(Ro),name:vt(ze),cmt:vt(ze),desc:vt(ze),src:vt(ze),link:vt(TR),sym:vt(ze),type:vt(ze),fix:vt(ze),sat:vt(bE),hdop:vt(Ro),vdop:vt(Ro),pdop:vt(Ro),ageofdgpsdata:vt(Ro),dgpsid:vt(bE)}),rdt={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function ndt(r,e,t){var n=r.getGeometry();if(n){var i=rdt[n.getType()];if(i){var a=e[e.length-1].node;return tr(a.namespaceURI,i)}}}function ER(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 CR(r,e,t){var n=ae.XY,i=2;if(r.hasZ&&r.hasM?(n=ae.XYZM,i=4):r.hasZ?(n=ae.XYZ,i=3):r.hasM&&(n=ae.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 BR(r,e){var t=e[e.length-1],n=r.getAttribute("href");n!==null&&(t.link=n),Do(Pft,r,e)}function bR(r,e){var t=e[e.length-1];t.extensionsNode_=r}function idt(r,e){var t=Kt({},kft,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;ER(i,a,r,t)}}function adt(r,e){var t=Kt({},$ft,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;ER(i,a,r,t)}}function odt(r,e){var t=e[e.length-1];Do(Gft,r,e);var n=t.flatCoordinates,i=t.ends;i.push(n.length)}function RG(r,e){var t=e[0],n=Kt({flatCoordinates:[],layoutOptions:{}},Qft,r,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var a=n.layoutOptions;delete n.layoutOptions;var o=CR(a,i),s=new en(i,o);Gn(s,!1,t);var A=new _r(s);return A.setProperties(n,!0),A}}function MG(r,e){var t=e[0],n=Kt({flatCoordinates:[],ends:[],layoutOptions:{}},Hft,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=CR(o,i,a),A=new Xa(i,s,a);Gn(A,!1,t);var l=new _r(A);return l.setProperties(n,!0),l}}function NG(r,e){var t=e[0],n=Kt({},Vft,r,e);if(n){var i={},a=ER([],i,r,n),o=CR(i,a),s=new xr(a,o);Gn(s,!1,t);var A=new _r(s);return A.setProperties(n,!0),A}}function TR(r,e,t){r.setAttribute("href",e);var n=t[t.length-1],i=n.properties,a=[i.linkText,i.linkType];qe({node:r},Kft,la,a,t,jft)}function SR(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 ae.XYZM:e[3]!==0&&(o.time=e[3]);case ae.XYZ:e[2]!==0&&(o.ele=e[2]);break;case ae.XYM:e[2]!==0&&(o.time=e[2]);break}var A=r.nodeName=="rtept"?Yft[a]:tdt[a],l=$o(o,A);qe({node:r,properties:o},edt,la,l,t,A)}function sdt(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==pt.LINE_STRING){var s=Gn(o,!0,n);a.geometryLayout=s.getLayout(),i.rtept=s.getCoordinates()}var A=t[t.length-1].node,l=Wft[A.namespaceURI],u=$o(i,l);qe(a,zft,la,u,t,l)}function Adt(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==pt.MULTI_LINE_STRING){var s=Gn(o,!0,n);i.trkseg=s.getLineStrings()}var A=t[t.length-1].node,l=Xft[A.namespaceURI],u=$o(i,l);qe(a,qft,la,u,t,l)}function ldt(r,e,t){var n={node:r};n.geometryLayout=e.getLayout(),n.properties={},qe(n,Jft,Zft,e.getCoordinates(),t)}function udt(r,e,t){var n=t[0],i=t[t.length-1];i.properties=e.getProperties();var a=e.getGeometry();if(a.getType()==pt.POINT){var o=Gn(a,!0,n);i.geometryLayout=o.getLayout(),SR(r,o.getCoordinates(),t)}}var cdt=Dft,hdt=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)}}(),fdt=function(r){hdt(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return dA.TEXT},e.prototype.readFeature=function(t,n){return this.readFeatureFromText(o1(t),this.adaptOptions(n))},e.prototype.readFeatureFromText=function(t,n){return Re()},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(o1(t),this.adaptOptions(n))},e.prototype.readFeaturesFromText=function(t,n){return Re()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromText(o1(t),this.adaptOptions(n))},e.prototype.readGeometryFromText=function(t,n){return Re()},e.prototype.readProjection=function(t){return this.readProjectionFromText(o1(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 Re()},e.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},e.prototype.writeFeaturesText=function(t,n){return Re()},e.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},e.prototype.writeGeometryText=function(t,n){return Re()},e}(D0);function o1(r){return typeof r=="string"?r:""}var xR=fdt,ddt=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={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},pdt=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,gdt=/^H.([A-Z]{3}).*?:(.*)/,vdt=/^HFDTE(\d{2})(\d{2})(\d{2})/,mdt=/\r\n|\r|\n/,ydt=function(r){ddt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ve("EPSG:4326"),n.altitudeMode_=i.altitudeMode?i.altitudeMode:pm.NONE,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.altitudeMode_,a=t.split(mdt),o={},s=[],A=2e3,l=0,u=1,c=-1,h,f;for(h=0,f=a.length;h<f;++h){var d=a[h],g=void 0;if(d.charAt(0)=="B"){if(g=pdt.exec(d),g){var m=parseInt(g[1],10),v=parseInt(g[2],10),y=parseInt(g[3],10),w=parseInt(g[4],10)+parseInt(g[5],10)/6e4;g[6]=="S"&&(w=-w);var C=parseInt(g[7],10)+parseInt(g[8],10)/6e4;if(g[9]=="W"&&(C=-C),s.push(C,w),i!=pm.NONE){var O=void 0;i==pm.GPS?O=parseInt(g[11],10):i==pm.BAROMETRIC?O=parseInt(g[12],10):O=0,s.push(O)}var F=Date.UTC(A,l,u,m,v,y);F<c&&(F=Date.UTC(A,l,u+1,m,v,y)),s.push(F/1e3),c=F}}else d.charAt(0)=="H"&&(g=vdt.exec(d),g?(u=parseInt(g[1],10),l=parseInt(g[2],10)-1,A=2e3+parseInt(g[3],10)):(g=gdt.exec(d),g&&(o[g[1]]=g[2].trim())))}if(s.length===0)return null;var I=i==pm.NONE?ae.XYM:ae.XYZM,T=new en(s,I),L=new _r(Gn(T,!1,n));return L.setProperties(o,!0),L},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return i?[i]:[]},e}(xR),_dt=ydt,wdt=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)}}(),Uu=["http://www.google.com/kml/ext/2.2"],Me=[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"],Edt="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",Z5={fraction:uo.FRACTION,pixels:uo.PIXELS,insetPixels:uo.PIXELS},Cdt=kt(Me,{ExtendedData:XG,Region:qG,MultiGeometry:dt(WG,"geometry"),LineString:dt(jG,"geometry"),LinearRing:dt(KG,"geometry"),Point:dt(zG,"geometry"),Polygon:dt(YG,"geometry"),Style:dt(OR),StyleMap:apt,address:dt(Xt),description:dt(Xt),name:dt(Xt),open:dt(gh),phoneNumber:dt(Xt),styleUrl:dt(kG),visibility:dt(gh)},kt(Uu,{MultiTrack:dt(Kdt,"geometry"),Track:dt(VG,"geometry")})),Bdt=kt(Me,{ExtendedData:XG,Region:qG,Link:vpt,address:dt(Xt),description:dt(Xt),name:dt(Xt),open:dt(gh),phoneNumber:dt(Xt),visibility:dt(gh)}),bdt=kt(Me,{href:dt(QG)}),PG=kt(Me,{LatLonAltBox:upt,Lod:hpt}),Tdt=kt(Me,["Document","Placemark"]),Sdt=kt(Me,{Document:vt(bpt),Placemark:vt(t7)}),mg,fw=null,eL,cy,hy,fy,TE,rL=null,IR,nL=null,iL,xf=null,J5=null,aL=null;function SE(r){return 32/Math.min(r[0],r[1])}function xdt(){mg=[255,255,255,1],fw=new Ba({color:mg}),eL=[20,2],cy=uo.PIXELS,hy=uo.PIXELS,fy=[64,64],TE="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",rL=new O0({anchor:eL,anchorOrigin:Vi.BOTTOM_LEFT,anchorXUnits:cy,anchorYUnits:hy,crossOrigin:"anonymous",rotation:0,scale:SE(fy),size:fy,src:TE}),IR="NO_IMAGE",nL=new zi({color:mg,width:1}),iL=new zi({color:[51,51,51,1],width:2}),xf=new Bd({font:"bold 16px Helvetica",fill:fw,stroke:iL,scale:.8}),J5=new Ea({fill:fw,image:rL,text:xf,stroke:nL,zIndex:0}),aL=[J5]}var s1;function Idt(r){return r}var Ldt=function(r){wdt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return aL||xdt(),n.dataProjection=Ve("EPSG:4326"),n.defaultStyle_=i.defaultStyle?i.defaultStyle:aL,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:Idt,n.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],n}return e.prototype.readDocumentOrFolder_=function(t,n){var i=kt(Me,{Document:q5(this.readDocumentOrFolder_,this),Folder:q5(this.readDocumentOrFolder_,this),Placemark:Ie(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},Cdt,t,n,this);if(i){var a=new _r,o=t.getAttribute("id");o!==null&&a.setId(o);var s=n[0],A=i.geometry;if(A&&Gn(A,!1,s),a.setGeometry(A),delete i.geometry,this.extractStyles_){var l=i.Style,u=i.styleUrl,c=Fdt(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=OR.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=GG.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(!Pi(Me,t.namespaceURI))return null;var i=this.readPlacemark_(t,[this.getReadOptions(t,n)]);return i||null},e.prototype.readFeaturesFromNode=function(t,n){if(!Pi(Me,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&&tn(i,A)}return i}else return[]},e.prototype.readName=function(t){if(t)if(typeof t=="string"){var n=ll(t);return this.readNameFromDocument(n)}else return Al(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(Pi(Me,n.namespaceURI)&&n.localName=="name")return Xt(n);for(var n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(Pi(Me,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=ll(t);tn(n,this.readNetworkLinksFromDocument(i))}else Al(t)?tn(n,this.readNetworkLinksFromDocument(t)):tn(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&&tn(n,this.readNetworkLinksFromNode(i));return n},e.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(Pi(Me,i.namespaceURI)&&i.localName=="NetworkLink"){var a=Kt({},Bdt,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;Pi(Me,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&tn(n,this.readNetworkLinksFromNode(i))}return n},e.prototype.readRegion=function(t){var n=[];if(typeof t=="string"){var i=ll(t);tn(n,this.readRegionFromDocument(i))}else Al(t)?tn(n,this.readRegionFromDocument(t)):tn(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&&tn(n,this.readRegionFromNode(i));return n},e.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(Pi(Me,i.namespaceURI)&&i.localName=="Region"){var a=Kt({},PG,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;Pi(Me,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&tn(n,this.readRegionFromNode(i))}return n},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=tr(Me[4],"kml"),a="http://www.w3.org/2000/xmlns/";i.setAttributeNS(a,"xmlns:gx",Uu[0]),i.setAttributeNS(a,"xmlns:xsi",Ad),i.setAttributeNS(Ad,"xsi:schemaLocation",Edt);var o={node:i},s={};t.length>1?s.Document=t:t.length==1&&(s.Placemark=t[0]);var A=Tdt[i.namespaceURI],l=$o(s,A);return qe(o,Sdt,la,l,[n],A,this),i},e}(k0);function Odt(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()||xf.getFont()),A.setScale(A.getScale()||xf.getScale()),A.setFill(A.getFill()||xf.getFill()),A.setStroke(A.getStroke()||iL)):A=xf.clone(),A.setText(e),A.setOffsetX(t[0]),A.setOffsetY(t[1]),A.setTextAlign(n);var l=new Ea({image:i,text:A});return l}function Fdt(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 Ca)l=u.getGeometriesArrayRecursive().filter(function(g){var m=g.getType();return m===pt.POINT||m===pt.MULTI_POINT}),s=l.length>0;else{var c=u.getType();s=c===pt.POINT||c===pt.MULTI_POINT}}s&&(A=a.get("name"),s=s&&!!A,s&&A.search(/&[^&]+;/)>-1&&(s1||(s1=document.createElement("textarea")),s1.innerHTML=A,A=s1.value));var h=t;if(r?h=r:e&&(h=UG(e,t,n)),s){var f=Odt(h[0],A);if(l.length>0){f.setGeometry(new Ca(l));var d=new Ea({geometry:h[0].getGeometry(),image:null,fill:h[0].getFill(),stroke:h[0].getStroke(),text:null});return[f,d].concat(h.slice(1))}return f}return h}}function UG(r,e,t){return Array.isArray(r)?r:typeof r=="string"?UG(t[r],e,t):e}function aB(r){var e=Eo(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 DG(r){var e=Eo(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 QG(r){var e=Eo(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 kG(r){var e=Eo(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 Rdt(r){var e=r.getAttribute("xunits"),t=r.getAttribute("yunits"),n;return e!=="insetPixels"?t!=="insetPixels"?n=Vi.BOTTOM_LEFT:n=Vi.TOP_LEFT:t!=="insetPixels"?n=Vi.BOTTOM_RIGHT:n=Vi.TOP_RIGHT,{x:parseFloat(r.getAttribute("x")),xunits:Z5[e],y:parseFloat(r.getAttribute("y")),yunits:Z5[t],origin:n}}function HG(r){return jr(r)}var Mdt=kt(Me,{Pair:ipt});function GG(r,e){return Kt(void 0,Mdt,r,e,this)}var Ndt=kt(Me,{Icon:dt(Ydt),color:dt(aB),heading:dt(jr),hotSpot:dt(Rdt),scale:dt(HG)});function Pdt(r,e){var t=Kt({},Ndt,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=TE);var A,l,u,c=Vi.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=eL,l=cy,u=hy):/arrow-reverse/.test(o)?(A=[54,42],l=cy,u=hy):/paddle/.test(o)&&(A=[32,1],l=cy,u=hy));var f,d=i.x,g=i.y;d!==void 0&&g!==void 0&&(f=[d,g]);var m,v=i.w,y=i.h;v!==void 0&&y!==void 0&&(m=[v,y]);var w,C=t.heading;C!==void 0&&(w=Kc(C));var O=t.scale,F=t.color;if(a){o==TE&&(m=fy);var I=new O0({anchor:A,anchorOrigin:c,anchorXUnits:l,anchorYUnits:u,crossOrigin:this.crossOrigin_,offset:f,offsetOrigin:Vi.BOTTOM_LEFT,rotation:w,scale:O,size:m,src:this.iconUrlFunction_(o),color:F}),T=I.getScaleArray()[0],L=I.getSize();if(L===null){var N=I.getImageState();if(N===rr.IDLE||N===rr.LOADING){var x=function(){var P=I.getImageState();if(!(P===rr.IDLE||P===rr.LOADING)){var U=I.getSize();if(U&&U.length==2){var tt=SE(U);I.setScale(T*tt)}I.unlistenImageChange(x)}};I.listenImageChange(x),N===rr.IDLE&&I.load()}}else if(L.length==2){var S=SE(L);I.setScale(T*S)}n.imageStyle=I}else n.imageStyle=IR}}var Udt=kt(Me,{color:dt(aB),scale:dt(HG)});function Ddt(r,e){var t=Kt({},Udt,r,e);if(t){var n=e[e.length-1],i=new Bd({fill:new Ba({color:"color"in t?t.color:mg}),scale:t.scale});n.textStyle=i}}var Qdt=kt(Me,{color:dt(aB),width:dt(jr)});function kdt(r,e){var t=Kt({},Qdt,r,e);if(t){var n=e[e.length-1],i=new zi({color:"color"in t?t.color:mg,width:"width"in t?t.width:1});n.strokeStyle=i}}var Hdt=kt(Me,{color:dt(aB),fill:dt(gh),outline:dt(gh)});function Gdt(r,e){var t=Kt({},Hdt,r,e);if(t){var n=e[e.length-1],i=new Ba({color:"color"in t?t.color:mg});n.fillStyle=i;var a=t.fill;a!==void 0&&(n.fill=a);var o=t.outline;o!==void 0&&(n.outline=o)}}var $dt=kt(Me,{coordinates:$e(DG)});function $G(r,e){return Kt(null,$dt,r,e)}function Vdt(r,e){var t=e[e.length-1],n=t.coordinates,i=Eo(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 jdt=kt(Uu,{Track:Ie(VG)});function Kdt(r,e){var t=Kt([],jdt,r,e);if(t)return new Xa(t)}var Wdt=kt(Me,{when:mpt},kt(Uu,{coord:Vdt}));function VG(r,e){var t=Kt({coordinates:[],whens:[]},Wdt,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 en(n,ae.XYZM)}}var zdt=kt(Me,{href:dt(QG)},kt(Uu,{x:dt(jr),y:dt(jr),w:dt(jr),h:dt(jr)}));function Ydt(r,e){var t=Kt({},zdt,r,e);return t||null}var Xdt=kt(Me,{coordinates:$e(DG)});function LR(r,e){return Kt(null,Xdt,r,e)}var oB=kt(Me,{extrude:dt(gh),tessellate:dt(gh),altitudeMode:dt(Xt)});function jG(r,e){var t=Kt({},oB,r,e),n=LR(r,e);if(n){var i=new en(n,ae.XYZ);return i.setProperties(t,!0),i}else return}function KG(r,e){var t=Kt({},oB,r,e),n=LR(r,e);if(n){var i=new Dn(n,ae.XYZ,[n.length]);return i.setProperties(t,!0),i}else return}var qdt=kt(Me,{LineString:Ie(jG),LinearRing:Ie(KG),MultiGeometry:Ie(WG),Point:Ie(zG),Polygon:Ie(YG)});function WG(r,e){var t=Kt([],qdt,r,e);if(!t)return null;if(t.length===0)return new Ca(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==pt.POINT){var c=t[0];l=c.getLayout(),u=c.getFlatCoordinates();for(var s=1,A=t.length;s<A;++s)o=t[s],tn(u,o.getFlatCoordinates());n=new $s(u,l),vT(n,t)}else a==pt.LINE_STRING?(n=new Xa(t),vT(n,t)):a==pt.POLYGON?(n=new qa(t),vT(n,t)):a==pt.GEOMETRY_COLLECTION?n=new Ca(t):Le(!1,37)}else n=new Ca(t);return n}function zG(r,e){var t=Kt({},oB,r,e),n=LR(r,e);if(n){var i=new xr(n,ae.XYZ);return i.setProperties(t,!0),i}else return}var Zdt=kt(Me,{innerBoundaryIs:dpt,outerBoundaryIs:gpt});function YG(r,e){var t=Kt({},oB,r,e),n=Kt([null],Zdt,r,e);if(n&&n[0]){for(var i=n[0],a=[i.length],o=1,s=n.length;o<s;++o)tn(i,n[o]),a.push(i.length);var A=new Dn(i,ae.XYZ,a);return A.setProperties(t,!0),A}else return}var Jdt=kt(Me,{IconStyle:Pdt,LabelStyle:Ddt,LineStyle:kdt,PolyStyle:Gdt});function OR(r,e){var t=Kt({},Jdt,r,e,this);if(!t)return null;var n="fillStyle"in t?t.fillStyle:fw,i=t.fill;i!==void 0&&!i&&(n=null);var a;"imageStyle"in t?t.imageStyle!=IR&&(a=t.imageStyle):a=rL;var o="textStyle"in t?t.textStyle:xf,s="strokeStyle"in t?t.strokeStyle:nL,A=t.outline;return A!==void 0&&!A?[new Ea({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===pt.GEOMETRY_COLLECTION){var h=u;return new Ca(h.getGeometriesArrayRecursive().filter(function(f){var d=f.getType();return d!==pt.POLYGON&&d!==pt.MULTI_POLYGON}))}else if(c!==pt.POLYGON&&c!==pt.MULTI_POLYGON)return u},fill:n,image:a,stroke:s,text:o,zIndex:void 0}),new Ea({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===pt.GEOMETRY_COLLECTION){var h=u;return new Ca(h.getGeometriesArrayRecursive().filter(function(f){var d=f.getType();return d===pt.POLYGON||d===pt.MULTI_POLYGON}))}else if(c===pt.POLYGON||c===pt.MULTI_POLYGON)return u},fill:n,stroke:null,zIndex:void 0})]:[new Ea({fill:n,image:a,stroke:s,text:o,zIndex:void 0})]}function vT(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 tpt=kt(Me,{displayName:dt(Xt),value:dt(Xt)});function ept(r,e){var t=r.getAttribute("name");Do(tpt,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 rpt=kt(Me,{Data:ept,SchemaData:spt});function XG(r,e){Do(rpt,r,e)}function qG(r,e){Do(PG,r,e)}var npt=kt(Me,{Style:dt(OR),key:dt(Xt),styleUrl:dt(kG)});function ipt(r,e){var t=Kt({},npt,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 apt(r,e){var t=GG.call(this,r,e);if(t){var n=e[e.length-1];Array.isArray(t)?n.Style=t:typeof t=="string"?n.styleUrl=t:Le(!1,38)}}var opt=kt(Me,{SimpleData:Apt});function spt(r,e){Do(opt,r,e)}function Apt(r,e){var t=r.getAttribute("name");if(t!==null){var n=Xt(r),i=e[e.length-1];i[t]=n}}var lpt=kt(Me,{altitudeMode:dt(Xt),minAltitude:dt(jr),maxAltitude:dt(jr),north:dt(jr),south:dt(jr),east:dt(jr),west:dt(jr)});function upt(r,e){var t=Kt({},lpt,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 cpt=kt(Me,{minLodPixels:dt(jr),maxLodPixels:dt(jr),minFadeExtent:dt(jr),maxFadeExtent:dt(jr)});function hpt(r,e){var t=Kt({},cpt,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 fpt=kt(Me,{LinearRing:Ie($G)});function dpt(r,e){var t=Kt([],fpt,r,e);if(t.length>0){var n=e[e.length-1];n.push.apply(n,t)}}var ppt=kt(Me,{LinearRing:$e($G)});function gpt(r,e){var t=Kt(void 0,ppt,r,e);if(t){var n=e[e.length-1];n[0]=t}}function vpt(r,e){Do(bdt,r,e)}function mpt(r,e){var t=e[e.length-1],n=t.whens,i=Eo(r,!1),a=Date.parse(i);n.push(isNaN(a)?0:a)}function sB(r,e){for(var t=lh(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}ze(r,i.join(""))}function ypt(r,e,t){var n=t[t.length-1],i=n.layout,a=n.stride,o;i==ae.XY||i==ae.XYM?o=2:i==ae.XYZ||i==ae.XYZM?o=3:Le(!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]}}ze(r,A)}var dw=kt(Me,{Data:vt(_pt),value:vt(Ept),displayName:vt(wpt)});function _pt(r,e,t){r.setAttribute("name",e.name);var n={node:r},i=e.value;typeof i=="object"?(i!==null&&i.displayName&&qe(n,dw,la,[i.displayName],t,["displayName"]),i!==null&&i.value&&qe(n,dw,la,[i.value],t,["value"])):qe(n,dw,la,[i],t,["value"])}function wpt(r,e){Cft(r,e)}function Ept(r,e){ze(r,e)}var Cpt=kt(Me,{Placemark:vt(t7)}),Bpt=function(r,e,t){var n=e[e.length-1].node;return tr(n.namespaceURI,"Placemark")};function bpt(r,e,t){var n={node:r};qe(n,Cpt,Bpt,e,t,void 0,this)}var Tpt=Zn("Data");function Spt(r,e,t){for(var n={node:r},i=e.names,a=e.values,o=i.length,s=0;s<o;s++)qe(n,dw,Tpt,[{name:i[s],value:a[s]}],t)}var tU=kt(Me,["href"],kt(Uu,["x","y","w","h"])),eU=kt(Me,{href:vt(ze)},kt(Uu,{x:vt(Ro),y:vt(Ro),w:vt(Ro),h:vt(Ro)})),xpt=function(r,e,t){return tr(Uu[0],"gx:"+t)};function Ipt(r,e,t){var n={node:r},i=t[t.length-1].node,a=tU[i.namespaceURI],o=$o(e,a);qe(n,eU,la,o,t,a),a=tU[Uu[0]],o=$o(e,a),qe(n,eU,xpt,o,t,a)}var Lpt=kt(Me,["scale","heading","Icon","color","hotSpot"]),Opt=kt(Me,{Icon:vt(Ipt),color:vt(sB),heading:vt(Ro),hotSpot:vt(igt),scale:vt(r7)});function Fpt(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:uo.PIXELS,y:o[1]-l[1],yunits:uo.PIXELS};i.hotSpot=c}}i.Icon=A;var h=e.getScaleArray()[0],f=o;if(f===null&&(f=fy),f.length==2){var d=SE(f);h=h/d}h!==1&&(i.scale=h);var g=e.getRotation();g!==0&&(i.heading=g);var m=e.getColor();m&&(i.color=m);var v=t[t.length-1].node,y=Lpt[v.namespaceURI],w=$o(i,y);qe(n,Opt,la,w,t,y)}var Rpt=kt(Me,["color","scale"]),Mpt=kt(Me,{color:vt(sB),scale:vt(r7)});function Npt(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=Rpt[s.namespaceURI],l=$o(i,A);qe(n,Mpt,la,l,t,A)}var Ppt=kt(Me,["color","width"]),Upt=kt(Me,{color:vt(sB),width:vt(Ro)});function Dpt(r,e,t){var n={node:r},i={color:e.getColor(),width:Number(e.getWidth())||1},a=t[t.length-1].node,o=Ppt[a.namespaceURI],s=$o(i,o);qe(n,Upt,la,s,t,o)}var Qpt={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},ZG=function(r,e,t){if(r){var n=e[e.length-1].node;return tr(n.namespaceURI,Qpt[r.getType()])}},kpt=Zn("Point"),Hpt=Zn("LineString"),Gpt=Zn("LinearRing"),$pt=Zn("Polygon"),Vpt=kt(Me,{LineString:vt(yg),Point:vt(yg),Polygon:vt(e7),GeometryCollection:vt(JG)});function JG(r,e,t){var n={node:r},i=e.getType(),a=[],o;i===pt.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach(function(s){var A=s.getType();A===pt.MULTI_POINT?a=a.concat(s.getPoints()):A===pt.MULTI_LINE_STRING?a=a.concat(s.getLineStrings()):A===pt.MULTI_POLYGON?a=a.concat(s.getPolygons()):A===pt.POINT||A===pt.LINE_STRING||A===pt.POLYGON?a.push(s):Le(!1,39)}),o=ZG):i===pt.MULTI_POINT?(a=e.getPoints(),o=kpt):i===pt.MULTI_LINE_STRING?(a=e.getLineStrings(),o=Hpt):i===pt.MULTI_POLYGON?(a=e.getPolygons(),o=$pt):Le(!1,39),qe(n,Vpt,o,a,t)}var jpt=kt(Me,{LinearRing:vt(yg)});function rU(r,e,t){var n={node:r};qe(n,jpt,Gpt,[e],t)}var mT=kt(Me,{ExtendedData:vt(Spt),MultiGeometry:vt(JG),LineString:vt(yg),LinearRing:vt(yg),Point:vt(yg),Polygon:vt(e7),Style:vt(ngt),address:vt(ze),description:vt(ze),name:vt(ze),open:vt(Hg),phoneNumber:vt(ze),styleUrl:vt(ze),visibility:vt(Hg)}),Kpt=kt(Me,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Wpt=Zn("ExtendedData");function t7(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(O){return!a[O]}),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(O){var F=O.getGeometryFunction()(e);if(F){var I=F.getType();return I===pt.GEOMETRY_COLLECTION?F.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===pt.POINT||L===pt.MULTI_POINT}).length:I===pt.POINT||I===pt.MULTI_POINT}})),this.writeStyles_){var c=l,h=l;e.getGeometry()&&(c=l.filter(function(O){var F=O.getGeometryFunction()(e);if(F){var I=F.getType();return I===pt.GEOMETRY_COLLECTION?F.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===pt.LINE_STRING||L===pt.MULTI_LINE_STRING}).length:I===pt.LINE_STRING||I===pt.MULTI_LINE_STRING}}),h=l.filter(function(O){var F=O.getGeometryFunction()(e);if(F){var I=F.getType();return I===pt.GEOMETRY_COLLECTION?F.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===pt.POLYGON||L===pt.MULTI_POLYGON}).length:I===pt.POLYGON||I===pt.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 d=t[t.length-1].node,g=Kpt[d.namespaceURI],m=$o(i,g);if(qe(n,mT,la,m,t,g),o.length>0){var v=$o(i,o),y={names:o,values:v};qe(n,mT,Wpt,[y],t)}var w=t[0],C=e.getGeometry();C&&(C=Gn(C,!0,w)),qe(n,mT,ZG,[C],t)}var zpt=kt(Me,["extrude","tessellate","altitudeMode","coordinates"]),Ypt=kt(Me,{extrude:vt(Hg),tessellate:vt(Hg),altitudeMode:vt(ze),coordinates:vt(ypt)});function yg(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=zpt[o.namespaceURI],A=$o(a,s);qe(i,Ypt,la,A,t,s)}var Xpt=kt(Me,["color","fill","outline"]),nU=kt(Me,{outerBoundaryIs:vt(rU),innerBoundaryIs:vt(rU)}),qpt=Zn("innerBoundaryIs"),Zpt=Zn("outerBoundaryIs");function e7(r,e,t){var n=e.getLinearRings(),i=n.shift(),a={node:r};qe(a,nU,qpt,n,t),qe(a,nU,Zpt,[i],t)}var Jpt=kt(Me,{color:vt(sB),fill:vt(Hg),outline:vt(Hg)});function tgt(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=Xpt[s.namespaceURI],l=$o(o,A);qe(n,Jpt,la,l,t,A)}function r7(r,e){Ro(r,Math.round(e*1e6)/1e6)}var egt=kt(Me,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),rgt=kt(Me,{IconStyle:vt(Fpt),LabelStyle:vt(Npt),LineStyle:vt(Dpt),PolyStyle:vt(tgt)});function ngt(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=egt[A.namespaceURI],u=$o(i,l);qe(n,rgt,la,u,t,l)}function igt(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 agt=Ldt,FR={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */FR.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)};FR.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,d=n?1:-1,g=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+=d,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;r[t+f]=o&255,f+=d,o/=256,l-=8);r[t+f-d]|=g*128};var ogt=qr,A1=FR;function qr(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}qr.Varint=0;qr.Fixed64=1;qr.Bytes=2;qr.Fixed32=5;var oL=(1<<16)*(1<<16),iU=1/oL,sgt=12,n7=typeof TextDecoder>"u"?null:new TextDecoder("utf8");qr.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=l1(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=oU(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=l1(this.buf,this.pos)+l1(this.buf,this.pos+4)*oL;return this.pos+=8,r},readSFixed64:function(){var r=l1(this.buf,this.pos)+oU(this.buf,this.pos+4)*oL;return this.pos+=8,r},readFloat:function(){var r=A1.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=A1.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,Agt(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>=sgt&&n7?Egt(this.buf,e,r):wgt(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!==qr.Bytes)return r.push(this.readVarint(e));var t=Yl(this);for(r=r||[];this.pos<t;)r.push(this.readVarint(e));return r},readPackedSVarint:function(r){if(this.type!==qr.Bytes)return r.push(this.readSVarint());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readSVarint());return r},readPackedBoolean:function(r){if(this.type!==qr.Bytes)return r.push(this.readBoolean());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readBoolean());return r},readPackedFloat:function(r){if(this.type!==qr.Bytes)return r.push(this.readFloat());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readFloat());return r},readPackedDouble:function(r){if(this.type!==qr.Bytes)return r.push(this.readDouble());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readDouble());return r},readPackedFixed32:function(r){if(this.type!==qr.Bytes)return r.push(this.readFixed32());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readFixed32());return r},readPackedSFixed32:function(r){if(this.type!==qr.Bytes)return r.push(this.readSFixed32());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed32());return r},readPackedFixed64:function(r){if(this.type!==qr.Bytes)return r.push(this.readFixed64());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readFixed64());return r},readPackedSFixed64:function(r){if(this.type!==qr.Bytes)return r.push(this.readSFixed64());var e=Yl(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed64());return r},skip:function(r){var e=r&7;if(e===qr.Varint)for(;this.buf[this.pos++]>127;);else if(e===qr.Bytes)this.pos=this.readVarint()+this.pos;else if(e===qr.Fixed32)this.pos+=4;else if(e===qr.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),_p(this.buf,r,this.pos),this.pos+=4},writeSFixed32:function(r){this.realloc(4),_p(this.buf,r,this.pos),this.pos+=4},writeFixed64:function(r){this.realloc(8),_p(this.buf,r&-1,this.pos),_p(this.buf,Math.floor(r*iU),this.pos+4),this.pos+=8},writeSFixed64:function(r){this.realloc(8),_p(this.buf,r&-1,this.pos),_p(this.buf,Math.floor(r*iU),this.pos+4),this.pos+=8},writeVarint:function(r){if(r=+r||0,r>268435455||r<0){lgt(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=Cgt(this.buf,r,this.pos);var t=this.pos-e;t>=128&&aU(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(r){this.realloc(4),A1.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),A1.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&&aU(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeMessage:function(r,e,t){this.writeTag(r,qr.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,hgt,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,fgt,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,ggt,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,dgt,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,pgt,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,vgt,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,mgt,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,ygt,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,_gt,e)},writeBytesField:function(r,e){this.writeTag(r,qr.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,qr.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,qr.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,qr.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,qr.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,qr.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,qr.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,qr.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,qr.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,qr.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};function Agt(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 yp(r,i,e);throw new Error("Expected varint not more than 10 bytes")}function Yl(r){return r.type===qr.Bytes?r.readVarint()+r.pos:r.pos+1}function yp(r,e,t){return t?e*4294967296+(r>>>0):(e>>>0)*4294967296+(r>>>0)}function lgt(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),ugt(t,n,e),cgt(n,e)}function ugt(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 cgt(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 aU(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 hgt(r,e){for(var t=0;t<r.length;t++)e.writeVarint(r[t])}function fgt(r,e){for(var t=0;t<r.length;t++)e.writeSVarint(r[t])}function dgt(r,e){for(var t=0;t<r.length;t++)e.writeFloat(r[t])}function pgt(r,e){for(var t=0;t<r.length;t++)e.writeDouble(r[t])}function ggt(r,e){for(var t=0;t<r.length;t++)e.writeBoolean(r[t])}function vgt(r,e){for(var t=0;t<r.length;t++)e.writeFixed32(r[t])}function mgt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed32(r[t])}function ygt(r,e){for(var t=0;t<r.length;t++)e.writeFixed64(r[t])}function _gt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed64(r[t])}function l1(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+r[e+3]*16777216}function _p(r,e,t){r[t]=e,r[t+1]=e>>>8,r[t+2]=e>>>16,r[t+3]=e>>>24}function oU(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function wgt(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 Egt(r,e,t){return n7.decode(r.subarray(e,t))}function Cgt(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 sU=xi(),Jy=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_===pt.POINT?Pf(this.flatCoordinates_):xC(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},r.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var e=Ya(this.getExtent());this.flatInteriorPoints_=NF(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_},r.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var e=M8(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=f8(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_},r.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=Jw(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=Jw(e,t,o,2,.5);tn(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=Ve(e);var t=e.getExtent(),n=e.getWorldExtent();if(t&&n){var i=Li(n)/Li(t);yo(sU,n[0],n[3],i,-i,0,0,0),zc(this.flatCoordinates_,0,this.flatCoordinates_.length,2,sU,this.flatCoordinates_)}},r.prototype.getEnds=function(){return this.ends_},r}();Jy.prototype.getEndss=Jy.prototype.getEnds;Jy.prototype.getFlatCoordinates=Jy.prototype.getOrientedFlatCoordinates;var AU=Jy,Bgt=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)}}(),bgt=function(r){Bgt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=new Ru({code:"",units:ho.TILE_PIXELS}),n.featureClass_=i.featureClass?i.featureClass:AU,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):Le(!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=Lgt(a,u.length);if(this.featureClass_===AU)o=new this.featureClass_(c,l,u,s,A),o.transform(i.dataProjection);else{var h=void 0;if(c==pt.POLYGON){var f=b3(l,u);h=f.length>1?new qa(l,ae.XY,f):new Dn(l,ae.XY,u)}else h=c===pt.POINT?new xr(l,ae.XY):c===pt.LINE_STRING?new en(l,ae.XY):c===pt.POLYGON?new Dn(l,ae.XY,u):c===pt.MULTI_POINT?new $s(l,ae.XY):c===pt.MULTI_LINE_STRING?new Xa(l,ae.XY,u):null;var d=this.featureClass_;o=new d,this.geometryName_&&o.setGeometryName(this.geometryName_);var g=Gn(h,!1,i);o.setGeometry(g),A!==void 0&&o.setId(A),o.setProperties(s,!0)}return o},e.prototype.getType=function(){return dA.ARRAY_BUFFER},e.prototype.readFeatures=function(t,n){var i=this.layers_,a=this.adaptOptions(n),o=Ve(a.dataProjection);o.setWorldExtent(a.extent),a.dataProjection=o;var s=new ogt(t),A=s.readFields(Tgt,{}),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,d=c.length;f<d;++f){var g=Igt(s,c,f),m=this.createFeature_(s,g,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}(D0);function Tgt(r,e,t){if(r===3){var n={keys:[],values:[],features:[]},i=t.readVarint()+t.pos;t.readFields(Sgt,n,i),n.length=n.features.length,n.length&&(e[n.name]=n)}}function Sgt(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 xgt(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 Igt(r,e,t){r.pos=e.features[t];var n=r.readVarint()+r.pos,i={layer:e,type:0,properties:{}};return r.readFields(xgt,i,n),i}function Lgt(r,e){var t;return r===1?t=e===1?pt.POINT:pt.MULTI_POINT:r===2?t=e===1?pt.LINE_STRING:pt.MULTI_LINE_STRING:r===3&&(t=pt.POLYGON),t}var Ogt=bgt,Fgt=function(){function r(){}return r.prototype.read=function(e){if(e)if(typeof e=="string"){var t=ll(e);return this.readFromDocument(t)}else return Al(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}(),RR=Fgt,Rgt="http://www.w3.org/1999/xlink";function fv(r){return r.getAttributeNS(Rgt,"href")}var Mgt=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)}}(),zo=[null,"http://www.opengis.net/ows/1.1"],Ngt=kt(zo,{ServiceIdentification:dt(ovt),ServiceProvider:dt(Avt),OperationsMetadata:dt(ivt)}),Pgt=function(r){Mgt(e,r);function e(){return r.call(this)||this}return e.prototype.readFromNode=function(t){var n=Kt({},Ngt,t,[]);return n||null},e}(RR),Ugt=kt(zo,{DeliveryPoint:dt(Xt),City:dt(Xt),AdministrativeArea:dt(Xt),PostalCode:dt(Xt),Country:dt(Xt),ElectronicMailAddress:dt(Xt)}),Dgt=kt(zo,{Value:xn(lvt)}),Qgt=kt(zo,{AllowedValues:dt(qgt)}),kgt=kt(zo,{Phone:dt(avt),Address:dt(Xgt)}),Hgt=kt(zo,{HTTP:dt(rvt)}),Ggt=kt(zo,{Get:xn(evt),Post:void 0}),$gt=kt(zo,{DCP:dt(tvt)}),Vgt=kt(zo,{Operation:nvt}),jgt=kt(zo,{Voice:dt(Xt),Facsimile:dt(Xt)}),Kgt=kt(zo,{Constraint:xn(Zgt)}),Wgt=kt(zo,{IndividualName:dt(Xt),PositionName:dt(Xt),ContactInfo:dt(Jgt)}),zgt=kt(zo,{Abstract:dt(Xt),AccessConstraints:dt(Xt),Fees:dt(Xt),Title:dt(Xt),ServiceTypeVersion:dt(Xt),ServiceType:dt(Xt)}),Ygt=kt(zo,{ProviderName:dt(Xt),ProviderSite:dt(fv),ServiceContact:dt(svt)});function Xgt(r,e){return Kt({},Ugt,r,e)}function qgt(r,e){return Kt({},Dgt,r,e)}function Zgt(r,e){var t=r.getAttribute("name");if(t)return Kt({name:t},Qgt,r,e)}function Jgt(r,e){return Kt({},kgt,r,e)}function tvt(r,e){return Kt({},Hgt,r,e)}function evt(r,e){var t=fv(r);if(t)return Kt({href:t},Kgt,r,e)}function rvt(r,e){return Kt({},Ggt,r,e)}function nvt(r,e){var t=r.getAttribute("name"),n=Kt({},$gt,r,e);if(n){var i=e[e.length-1];i[t]=n}}function ivt(r,e){return Kt({},Vgt,r,e)}function avt(r,e){return Kt({},jgt,r,e)}function ovt(r,e){return Kt({},zgt,r,e)}function svt(r,e){return Kt({},Wgt,r,e)}function Avt(r,e){return Kt({},Ygt,r,e)}function lvt(r,e){return Xt(r)}var i7=Pgt;function lU(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 uvt=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)}}(),cvt=function(r){uvt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ve("EPSG:4326"),n.factor_=i.factor?i.factor:1e5,n.geometryLayout_=i.geometryLayout?i.geometryLayout:ae.XY,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new _r(i)},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return[i]},e.prototype.readGeometryFromText=function(t,n){var i=px(this.geometryLayout_),a=fvt(t,i,this.factor_);lU(a,0,a.length,i,a);var o=lu(a,0,a.length,i),s=new en(o,this.geometryLayout_);return Gn(s,!1,this.adaptOptions(n))},e.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(Le(!1,40),"")},e.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},e.prototype.writeGeometryText=function(t,n){t=Gn(t,!0,this.adaptOptions(n));var i=t.getFlatCoordinates(),a=t.getStride();return lU(i,0,i.length,a,i),hvt(i,a,this.factor_)},e}(xR);function hvt(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 dvt(r,n)}function fvt(r,e,t){var n=t||1e5,i,a=new Array(e);for(i=0;i<e;++i)a[i]=0;for(var o=pvt(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 dvt(r,e){for(var t=e||1e5,n=0,i=r.length;n<i;++n)r[n]=Math.round(r[n]*t);return gvt(r)}function pvt(r,e){for(var t=e||1e5,n=vvt(r),i=0,a=n.length;i<a;++i)n[i]/=t;return n}function gvt(r){for(var e=0,t=r.length;e<t;++e){var n=r[e];r[e]=n<0?~(n<<1):n<<1}return mvt(r)}function vvt(r){for(var e=yvt(r),t=0,n=e.length;t<n;++t){var i=e[t];e[t]=i&1?~(i>>1):i>>1}return e}function mvt(r){for(var e="",t=0,n=r.length;t<n;++t)e+=_vt(r[t]);return e}function yvt(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 _vt(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 wvt=cvt,Evt=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)}}(),Cvt=function(r){Evt(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=Ve(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&&Fvt(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,Ovt(h,A,o,s,c,f,n))):(h=u[f],l.push(a7(h,A,o,s,c,f,n))));return l}else return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(yR),Bvt={Point:bvt,LineString:Svt,Polygon:Ivt,MultiPoint:Tvt,MultiLineString:xvt,MultiPolygon:Lvt};function AB(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 bvt(r,e,t){var n=r.coordinates;return e&&t&&MR(n,e,t),new xr(n)}function Tvt(r,e,t){var n=r.coordinates;if(e&&t)for(var i=0,a=n.length;i<a;++i)MR(n[i],e,t);return new $s(n)}function Svt(r,e){var t=AB(r.arcs,e);return new en(t)}function xvt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=AB(r.arcs[n],e);return new Xa(t)}function Ivt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=AB(r.arcs[n],e);return new Dn(t)}function Lvt(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]=AB(a[s],e);t[n]=o}return new qa(t)}function Ovt(r,e,t,n,i,a,o){for(var s=r.geometries,A=[],l=0,u=s.length;l<u;++l)A[l]=a7(s[l],e,t,n,i,a,o);return A}function a7(r,e,t,n,i,a,o){var s=null,A=r.type;if(A){var l=Bvt[A];A==="Point"||A==="MultiPoint"?s=l(r,t,n):s=l(r,e),s=Gn(s,!1,o)}var u=new _r({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 Fvt(r,e,t){for(var n=0,i=r.length;n<i;++n)Rvt(r[n],e,t)}function Rvt(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,MR(s,e,t)}}function MR(r,e,t){r[0]=r[0]*e[0]+t[0],r[1]=r[1]*e[1]+t[1]}var Mvt=Cvt,Nvt=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=function(r){Nvt(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}(fr);rn.prototype.namespace="http://www.opengis.net/gml/3.2";rn.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:$e(fr.prototype.readFlatPos),posList:$e(fr.prototype.readFlatPosList),coordinates:$e(hv.prototype.readFlatCoordinates)}};rn.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:fr.prototype.interiorParser,exterior:fr.prototype.exteriorParser}};rn.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:$e(Cr.prototype.readPoint),MultiPoint:$e(Cr.prototype.readMultiPoint),LineString:$e(Cr.prototype.readLineString),MultiLineString:$e(Cr.prototype.readMultiLineString),LinearRing:$e(Cr.prototype.readLinearRing),Polygon:$e(Cr.prototype.readPolygon),MultiPolygon:$e(Cr.prototype.readMultiPolygon),Surface:$e(rn.prototype.readSurface),MultiSurface:$e(fr.prototype.readMultiSurface),Curve:$e(rn.prototype.readCurve),MultiCurve:$e(fr.prototype.readMultiCurve),Envelope:$e(rn.prototype.readEnvelope)}};rn.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:Ie(fr.prototype.curveMemberParser),curveMembers:Ie(fr.prototype.curveMemberParser)}};rn.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Ie(fr.prototype.surfaceMemberParser),surfaceMembers:Ie(fr.prototype.surfaceMemberParser)}};rn.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Ie(Cr.prototype.readLineString),Curve:Ie(fr.prototype.readCurve)}};rn.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Ie(Cr.prototype.readPolygon),Surface:Ie(fr.prototype.readSurface)}};rn.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:$e(fr.prototype.readPatch)}};rn.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:$e(fr.prototype.readSegment)}};rn.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Ie(fr.prototype.readFlatPosList),upperCorner:Ie(fr.prototype.readFlatPosList)}};rn.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:$e(fr.prototype.readPolygonPatch)}};rn.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:$e(fr.prototype.readLineStringSegment)}};rn.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:Ie(Cr.prototype.pointMemberParser),pointMembers:Ie(Cr.prototype.pointMemberParser)}};rn.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Ie(Cr.prototype.lineStringMemberParser),lineStringMembers:Ie(Cr.prototype.lineStringMemberParser)}};rn.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:Ie(Cr.prototype.polygonMemberParser),polygonMembers:Ie(Cr.prototype.polygonMemberParser)}};rn.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Ie(Cr.prototype.readFlatCoordinatesFromNode)}};rn.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Ie(Cr.prototype.readLineString)}};rn.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Ie(Cr.prototype.readPolygon)}};rn.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:$e(Cr.prototype.readFlatLinearRing)}};rn.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:vt(fr.prototype.writeRing),interior:vt(fr.prototype.writeRing)}};rn.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:vt(ze),upperCorner:vt(ze)}};rn.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:vt(fr.prototype.writeSurfaceOrPolygonMember),polygonMember:vt(fr.prototype.writeSurfaceOrPolygonMember)}};rn.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:vt(fr.prototype.writePointMember)}};rn.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:vt(fr.prototype.writeLineStringOrCurveMember),curveMember:vt(fr.prototype.writeLineStringOrCurveMember)}};rn.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:vt(fr.prototype.writeCurveOrLineString),MultiCurve:vt(fr.prototype.writeMultiCurveOrLineString),Point:vt(rn.prototype.writePoint),MultiPoint:vt(fr.prototype.writeMultiPoint),LineString:vt(fr.prototype.writeCurveOrLineString),MultiLineString:vt(fr.prototype.writeMultiCurveOrLineString),LinearRing:vt(fr.prototype.writeLinearRing),Polygon:vt(fr.prototype.writeSurfaceOrPolygon),MultiPolygon:vt(fr.prototype.writeMultiSurfaceOrPolygon),Surface:vt(fr.prototype.writeSurfaceOrPolygon),MultiSurface:vt(fr.prototype.writeMultiSurfaceOrPolygon),Envelope:vt(fr.prototype.writeEnvelope)}};var NR=rn,Pvt=function(){function r(e){this.tagName_=e}return r.prototype.getTagName=function(){return this.tagName_},r}(),o7=Pvt,Uvt=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)}}(),Dvt=function(r){Uvt(e,r);function e(t,n){var i=r.call(this,t)||this;return i.conditions=n,Le(i.conditions.length>=2,57),i}return e}(o7),Qvt=Dvt,kvt=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)}}(),Hvt=function(r){kvt(e,r);function e(t){return r.call(this,"And",Array.prototype.slice.call(arguments))||this}return e}(Qvt),Gvt=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)}}(),Vvt=function(r){$vt(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}(o7),jvt=Vvt;function Kvt(r){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Gvt,e))}function Wvt(r,e,t){return new jvt(r,e,t)}var zvt=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)}}(),uU={"http://www.opengis.net/gml":{boundedBy:dt(Cr.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:Ie(Cr.prototype.readFeaturesInternal)}},Yvt={"http://www.opengis.net/wfs":{totalInserted:dt(Si),totalUpdated:dt(Si),totalDeleted:dt(Si)},"http://www.opengis.net/wfs/2.0":{totalInserted:dt(Si),totalUpdated:dt(Si),totalDeleted:dt(Si)}},Xvt={"http://www.opengis.net/wfs":{TransactionSummary:dt(hU,"transactionSummary"),InsertResults:dt(dU,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:dt(hU,"transactionSummary"),InsertResults:dt(dU,"insertIds")}},qvt={"http://www.opengis.net/wfs":{PropertyName:vt(ze)},"http://www.opengis.net/wfs/2.0":{PropertyName:vt(ze)}},s7={"http://www.opengis.net/wfs":{Insert:vt(pU),Update:vt(vU),Delete:vt(gU),Property:vt(mU),Native:vt(yU)},"http://www.opengis.net/wfs/2.0":{Insert:vt(pU),Update:vt(vU),Delete:vt(gU),Property:vt(mU),Native:vt(yU)}},A7="feature",PR="http://www.w3.org/2000/xmlns/",UR={"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"},sL={"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"},DR={"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"},cU={"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"},QR={"2.0.0":NR,"1.1.0":fr,"1.0.0":hv},Zvt="1.1.0",Jvt=function(r){zvt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.version_=i.version?i.version:Zvt,n.featureType_=i.featureType,n.featureNS_=i.featureNS,n.gmlFormat_=i.gmlFormat?i.gmlFormat:new QR[n.version_],n.schemaLocation_=i.schemaLocation?i.schemaLocation:cU[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};Ce(i,{featureType:this.featureType_,featureNS:this.featureNS_}),Ce(i,this.getReadOptions(t,n||{}));var a=[i],o;this.version_==="2.0.0"?o=uU: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=ll(t);return this.readTransactionResponseFromDocument(n)}else return Al(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t);else return},e.prototype.readFeatureCollectionMetadata=function(t){if(t)if(typeof t=="string"){var n=ll(t);return this.readFeatureCollectionMetadataFromDocument(n)}else return Al(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=uu(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,Kt(n,uU,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({},Xvt,t,[])},e.prototype.writeGetFeature=function(t){var n=this,i=tr(sL[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(Ad,"xsi:schemaLocation",this.schemaLocation_);var a={node:i};if(Ce(a,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),Le(Array.isArray(t.featureTypes),11),typeof t.featureTypes[0]=="string"){var o=t.filter;t.bbox&&(Le(t.geometryName,12),o=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,o)),Ce(a,{geometryName:t.geometryName,filter:o}),IU(i,t.featureTypes,[a])}else t.featureTypes.forEach(function(s){var A=n.combineBboxAndFilter(s.geometryName,s.bbox,t.srsName,t.filter);Ce(a,{geometryName:s.geometryName,filter:A}),IU(i,[s.name],[a])});return i},e.prototype.combineBboxAndFilter=function(t,n,i,a){var o=Wvt(t,n,i);return a?Kvt(a,o):o},e.prototype.writeTransaction=function(t,n,i,a){var o=[],s=a.version?a.version:this.version_,A=tr(sL[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(Ad,"xsi:schemaLocation",cU[s]);var u=tmt(A,l,s,a);return t&&u1("Insert",t,o,u),n&&u1("Update",n,o,u),i&&u1("Delete",i,o,u),a.nativeElements&&u1("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),Ve(i.pop().srsName)}}return null},e}(k0);function tmt(r,e,t,n){var i=n.featurePrefix?n.featurePrefix:A7,a;t==="1.0.0"?a=2:t==="1.1.0"?a=3:t==="2.0.0"&&(a=3.2);var o=Ce({node:r},{version:t,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:i,gmlVersion:a,hasZ:n.hasZ,srsName:n.srsName},e);return o}function u1(r,e,t,n){qe(n,s7,Zn(r),e,t)}function hU(r,e){return Kt({},Yvt,r,e)}var emt={"http://www.opengis.net/ogc":{FeatureId:Ie(function(r,e){return r.getAttribute("fid")})},"http://www.opengis.net/ogc/1.1":{FeatureId:Ie(function(r,e){return r.getAttribute("fid")})}};function fU(r,e){Do(emt,r,e)}var rmt={"http://www.opengis.net/wfs":{Feature:fU},"http://www.opengis.net/wfs/2.0":{Feature:fU}};function dU(r,e){return Kt([],rmt,r,e)}function pU(r,e,t){var n=t[t.length-1],i=n.featureType,a=n.featureNS,o=n.gmlVersion,s=tr(a,i);r.appendChild(s),o===2?hv.prototype.writeFeatureElement(s,e,t):o===3?fr.prototype.writeFeatureElement(s,e,t):NR.prototype.writeFeatureElement(s,e,t)}function l7(r,e,t){var n=t[t.length-1],i=n.version,a=UR[i],o=tr(a,"Filter"),s=tr(a,"FeatureId");o.appendChild(s),s.setAttribute("fid",e),r.appendChild(o)}function kR(r,e){r=r||A7;var t=r+":";return e.indexOf(t)===0?e:t+e}function gU(r,e,t){var n=t[t.length-1];Le(e.getId()!==void 0,26);var i=n.featureType,a=n.featurePrefix,o=n.featureNS,s=kR(a,i);r.setAttribute("typeName",s),r.setAttributeNS(PR,"xmlns:"+a,o);var A=e.getId();A!==void 0&&l7(r,A,t)}function vU(r,e,t){var n=t[t.length-1];Le(e.getId()!==void 0,27);var i=n.version,a=n.featureType,o=n.featurePrefix,s=n.featureNS,A=kR(o,a),l=e.getGeometryName();r.setAttribute("typeName",A),r.setAttributeNS(PR,"xmlns:"+o,s);var u=e.getId();if(u!==void 0){for(var c=e.getKeys(),h=[],f=0,d=c.length;f<d;f++){var g=e.get(c[f]);if(g!==void 0){var m=c[f];g&&typeof g.getSimplifiedGeometry=="function"&&(m=l),h.push({name:m,value:g})}}qe({version:i,gmlVersion:n.gmlVersion,node:r,hasZ:n.hasZ,srsName:n.srsName},s7,Zn("Property"),h,t),l7(r,u,t)}}function mU(r,e,t){var n=t[t.length-1],i=n.version,a=sL[i],o=tr(a,"Name"),s=n.gmlVersion;if(r.appendChild(o),ze(o,e.name),e.value!==void 0&&e.value!==null){var A=tr(a,"Value");r.appendChild(A),e.value&&typeof e.value.getSimplifiedGeometry=="function"?s===2?hv.prototype.writeGeometryElement(A,e.value,t):s===3?fr.prototype.writeGeometryElement(A,e.value,t):NR.prototype.writeGeometryElement(A,e.value,t):ze(A,e.value)}}function yU(r,e,t){e.vendorId&&r.setAttribute("vendorId",e.vendorId),e.safeToIgnore!==void 0&&r.setAttribute("safeToIgnore",String(e.safeToIgnore)),e.value!==void 0&&ze(r,e.value)}var lB={"http://www.opengis.net/wfs":{Query:vt(_U)},"http://www.opengis.net/wfs/2.0":{Query:vt(_U)},"http://www.opengis.net/ogc":{During:vt(CU),And:vt(c1),Or:vt(c1),Not:vt(BU),BBOX:vt(wU),Contains:vt(Ec),Intersects:vt(Ec),Within:vt(Ec),DWithin:vt(EU),PropertyIsEqualTo:vt(Fs),PropertyIsNotEqualTo:vt(Fs),PropertyIsLessThan:vt(Fs),PropertyIsLessThanOrEqualTo:vt(Fs),PropertyIsGreaterThan:vt(Fs),PropertyIsGreaterThanOrEqualTo:vt(Fs),PropertyIsNull:vt(bU),PropertyIsBetween:vt(TU),PropertyIsLike:vt(SU)},"http://www.opengis.net/fes/2.0":{During:vt(CU),And:vt(c1),Or:vt(c1),Not:vt(BU),BBOX:vt(wU),Contains:vt(Ec),Disjoint:vt(Ec),Intersects:vt(Ec),ResourceId:vt(imt),Within:vt(Ec),DWithin:vt(EU),PropertyIsEqualTo:vt(Fs),PropertyIsNotEqualTo:vt(Fs),PropertyIsLessThan:vt(Fs),PropertyIsLessThanOrEqualTo:vt(Fs),PropertyIsGreaterThan:vt(Fs),PropertyIsGreaterThanOrEqualTo:vt(Fs),PropertyIsNull:vt(bU),PropertyIsBetween:vt(TU),PropertyIsLike:vt(SU)}};function _U(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=kR(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(PR,"xmlns:"+a,o);var c=Ce({},n);c.node=r,qe(c,qvt,Zn("PropertyName"),s,t);var h=n.filter;if(h){var f=tr(uB(i),"Filter");r.appendChild(f),nmt(f,h,t)}}function nmt(r,e,t){var n=t[t.length-1],i={node:r};Ce(i,{context:n}),qe(i,lB,Zn(e.getTagName()),[e],t)}function wU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=QR[a];dv(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.extent,t)}function imt(r,e,t){r.setAttribute("rid",e.rid)}function Ec(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=QR[a];dv(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.geometry,t)}function EU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;Ec(r,e,t);var o=tr(uB(a),"Distance");ze(o,e.distance.toString()),a==="2.0.0"?o.setAttribute("uom",e.unit):o.setAttribute("units",e.unit),r.appendChild(o)}function CU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;xE(DR[a],"ValueReference",r,e.propertyName);var o=tr(vu,"TimePeriod");r.appendChild(o);var s=tr(vu,"begin");o.appendChild(s),xU(s,e.begin);var A=tr(vu,"end");o.appendChild(A),xU(A,e.end)}function c1(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};Ce(a,{context:i});for(var o=e.conditions,s=0,A=o.length;s<A;++s){var l=o[s];qe(a,lB,Zn(l.getTagName()),[l],t)}}function BU(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};Ce(a,{context:i});var o=e.condition;qe(a,lB,Zn(o.getTagName()),[o],t)}function Fs(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()),dv(a,r,e.propertyName),IE(a,r,""+e.expression)}function bU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;dv(a,r,e.propertyName)}function TU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version,o=uB(a);dv(a,r,e.propertyName);var s=tr(o,"LowerBoundary");r.appendChild(s),IE(a,s,""+e.lowerBoundary);var A=tr(o,"UpperBoundary");r.appendChild(A),IE(a,A,""+e.upperBoundary)}function SU(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()),dv(a,r,e.propertyName),IE(a,r,""+e.pattern)}function xE(r,e,t,n){var i=tr(r,e);ze(i,n),t.appendChild(i)}function IE(r,e,t){xE(uB(r),"Literal",e,t)}function dv(r,e,t){r==="2.0.0"?xE(DR[r],"ValueReference",e,t):xE(UR[r],"PropertyName",e,t)}function xU(r,e){var t=tr(vu,"TimeInstant");r.appendChild(t);var n=tr(vu,"timePosition");t.appendChild(n),ze(n,e)}function IU(r,e,t){var n=t[t.length-1],i=Ce({},n);i.node=r,qe(i,lB,Zn("Query"),e,t)}function uB(r){var e;return r==="2.0.0"?e=DR[r]:e=UR[r],e}var amt=Jvt,omt=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)}}(),sn={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},LU=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_=ae.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 sn.POINT:return this.readPoint();case sn.LINE_STRING:return this.readLineString();case sn.POLYGON:case sn.TRIANGLE:return this.readPolygon();case sn.MULTI_POINT:return this.readMultiPoint();case sn.MULTI_LINE_STRING:return this.readMultiLineString();case sn.MULTI_POLYGON:case sn.POLYHEDRAL_SURFACE:case sn.TIN:return this.readMultiPolygon();case sn.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,sn.POINT)},r.prototype.readMultiLineString=function(){return this.readWkbCollection(this.readWkbBlock,sn.LINE_STRING)},r.prototype.readMultiPolygon=function(){return this.readWkbCollection(this.readWkbBlock,sn.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 sn.POINT:return new xr(t,this.layout_);case sn.LINE_STRING:return new en(t,this.layout_);case sn.POLYGON:case sn.TRIANGLE:return new Dn(t,this.layout_);case sn.MULTI_POINT:return new $s(t,this.layout_);case sn.MULTI_LINE_STRING:return new Xa(t,this.layout_);case sn.MULTI_POLYGON:case sn.POLYHEDRAL_SURFACE:case sn.TIN:return new qa(t,this.layout_);case sn.GEOMETRY_COLLECTION:return new Ca(t);default:return null}},r.prototype.getSrid=function(){return this.srid_},r}(),smt=function(){function r(e){e=e||{},this.layout_=e.layout,this.isLittleEndian_=e.littleEndian!==!1,this.isEWKB_=e.ewkb!==!1,this.writeQueue_=[],this.nodata_=Ce({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=Ce.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=ae.XYZM);var n=function(o,s){return o===s?o:o===ae.XYZM?s:s===ae.XYZM?o:ae.XY};if(e instanceof _A)return n(e.getLayout(),t);if(e instanceof Ca)for(var i=e.getGeometriesArray(),a=0;a<i.length&&t!==ae.XY;a++)t=this.findMinimumLayout(i[a],t);return t},r.prototype.writeGeometry=function(e,t){var n,i,a=(n={},n[pt.POINT]=sn.POINT,n[pt.LINE_STRING]=sn.LINE_STRING,n[pt.POLYGON]=sn.POLYGON,n[pt.MULTI_POINT]=sn.MULTI_POINT,n[pt.MULTI_LINE_STRING]=sn.MULTI_LINE_STRING,n[pt.MULTI_POLYGON]=sn.MULTI_POLYGON,n[pt.GEOMETRY_COLLECTION]=sn.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 _A){var A=(i={},i[pt.POINT]=this.writePoint,i[pt.LINE_STRING]=this.writeLineString,i[pt.POLYGON]=this.writePolygon,i[pt.MULTI_POINT]=this.writeMultiPoint,i[pt.MULTI_LINE_STRING]=this.writeMultiLineString,i[pt.MULTI_POLYGON]=this.writeMultiPolygon,i);A[o].call(this,e.getCoordinates(),e.getLayout())}else e instanceof Ca&&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}(),Amt=function(r){omt(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_?dA.TEXT:dA.ARRAY_BUFFER},e.prototype.readFeature=function(t,n){return new _r({geometry:this.readGeometry(t,n)})},e.prototype.readFeatures=function(t,n){var i=[],a=this.readGeometry(t,n);return this.splitCollection&&a instanceof Ca?i=a.getGeometriesArray():i=[a],i.map(function(o){return new _r({geometry:o})})},e.prototype.readGeometry=function(t,n){var i=OU(t);if(!i)return null;var a=new LU(i),o=a.readGeometry();this.viewCache_=i;var s=this.getReadOptions(t,n);return this.viewCache_=null,Gn(o,!1,s)},e.prototype.readProjection=function(t){var n=this.viewCache_||OU(t);if(n){var i=new LU(n);return i.readWkbHeader(),i.getSrid()&&Ve("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 Ca(t.map(function(i){return i.getGeometry()})),n)},e.prototype.writeGeometry=function(t,n){var i=this.adaptOptions(n),a=new smt({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&&Ve(i.dataProjection);if(s){var A=s.getCode();A.indexOf("EPSG:")===0&&(o=Number(A.substring(5)))}}a.writeGeometry(Gn(t,!0,i),o);var l=a.getBuffer();return this.hex_?lmt(l):l},e}(D0);function lmt(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 umt(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 OU(r){return typeof r=="string"?umt(r):ArrayBuffer.isView(r)?r instanceof DataView?r:new DataView(r.buffer,r.byteOffset,r.byteLength):r instanceof ArrayBuffer?new DataView(r):null}var cmt=Amt,hmt=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)}}(),fmt={POINT:xr,LINESTRING:en,POLYGON:Dn,MULTIPOINT:$s,MULTILINESTRING:Xa,MULTIPOLYGON:qa},u7="EMPTY",c7="Z",h7="M",dmt="ZM",Zr={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6};for(var pmt in pt)pt[pmt].toUpperCase();var gmt=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=Zr.LEFT_PAREN;else if(e==",")i=Zr.COMMA;else if(e==")")i=Zr.RIGHT_PAREN;else if(this.isNumeric_(e)||e=="-")i=Zr.NUMBER,n=this.readNumber_();else if(this.isAlpha_(e))i=Zr.TEXT,n=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(e==="")i=Zr.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}(),vmt=function(){function r(e){this.lexer_=e,this.token_={position:0,type:Zr.START},this.layout_=ae.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=ae.XY,t=this.token_;if(this.isTokenType(Zr.TEXT)){var n=t.value;n===c7?e=ae.XYZ:n===h7?e=ae.XYM:n===dmt&&(e=ae.XYZM),e!==ae.XY&&this.consume_()}return e},r.prototype.parseGeometryCollectionText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=[];do e.push(this.parseGeometry_());while(this.match(Zr.COMMA));if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePointText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parsePoint_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseLineStringText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parsePointList_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePolygonText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPointText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=void 0;if(this.token_.type==Zr.LEFT_PAREN?e=this.parsePointTextList_():e=this.parsePointList_(),this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiLineStringText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPolygonText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parsePolygonTextList_();if(this.match(Zr.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(Zr.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(Zr.COMMA);)e.push(this.parsePoint_());return e},r.prototype.parsePointTextList_=function(){for(var e=[this.parsePointText_()];this.match(Zr.COMMA);)e.push(this.parsePointText_());return e},r.prototype.parseLineStringTextList_=function(){for(var e=[this.parseLineStringText_()];this.match(Zr.COMMA);)e.push(this.parseLineStringText_());return e},r.prototype.parsePolygonTextList_=function(){for(var e=[this.parsePolygonText_()];this.match(Zr.COMMA);)e.push(this.parsePolygonText_());return e},r.prototype.isEmptyGeometry_=function(){var e=this.isTokenType(Zr.TEXT)&&this.token_.value==u7;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(Zr.TEXT)){var t=e.value;this.layout_=this.parseGeometryLayout_();var n=this.isEmptyGeometry_();if(t=="GEOMETRYCOLLECTION"){if(n)return new Ca([]);var i=this.parseGeometryCollectionText_();return new Ca(i)}else{var a=fmt[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}(),mmt=function(r){hmt(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 gmt(t),i=new vmt(n);return i.parse()},e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n),a=new _r;return a.setGeometry(i),a},e.prototype.readFeaturesFromText=function(t,n){var i=[],a=this.readGeometryFromText(t,n);this.splitCollection_&&a.getType()==pt.GEOMETRY_COLLECTION?i=a.getGeometriesArray():i=[a];for(var o=[],s=0,A=i.length;s<A;++s){var l=new _r;l.setGeometry(i[s]),o.push(l)}return o},e.prototype.readGeometryFromText=function(t,n){var i=this.parse_(t);return Gn(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 Ca(i);return this.writeGeometryText(s,n)},e.prototype.writeGeometryText=function(t,n){return p7(Gn(t,!0,n))},e}(xR);function f7(r){var e=r.getCoordinates();return e.length===0?"":e.join(" ")}function ymt(r){for(var e=[],t=r.getPoints(),n=0,i=t.length;n<i;++n)e.push("("+f7(t[n])+")");return e.join(",")}function _mt(r){for(var e=[],t=r.getGeometries(),n=0,i=t.length;n<i;++n)e.push(p7(t[n]));return e.join(",")}function HR(r){for(var e=r.getCoordinates(),t=[],n=0,i=e.length;n<i;++n)t.push(e[n].join(" "));return t.join(",")}function wmt(r){for(var e=[],t=r.getLineStrings(),n=0,i=t.length;n<i;++n)e.push("("+HR(t[n])+")");return e.join(",")}function d7(r){for(var e=[],t=r.getLinearRings(),n=0,i=t.length;n<i;++n)e.push("("+HR(t[n])+")");return e.join(",")}function Emt(r){for(var e=[],t=r.getPolygons(),n=0,i=t.length;n<i;++n)e.push("("+d7(t[n])+")");return e.join(",")}function Cmt(r){var e=r.getLayout(),t="";return(e===ae.XYZ||e===ae.XYZM)&&(t+=c7),(e===ae.XYM||e===ae.XYZM)&&(t+=h7),t}var Bmt={Point:f7,LineString:HR,Polygon:d7,MultiPoint:ymt,MultiLineString:wmt,MultiPolygon:Emt,GeometryCollection:_mt};function p7(r){var e=r.getType(),t=Bmt[e],n=t(r);if(e=e.toUpperCase(),typeof r.getFlatCoordinates=="function"){var i=Cmt(r);i.length>0&&(e+=" "+i)}return n.length===0?e+" "+u7:e+"("+n+")"}var bmt=mmt,Tmt=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)}}(),Ta=[null,"http://www.opengis.net/wms"],Smt=kt(Ta,{Service:dt(zmt),Capability:dt(Wmt)}),xmt=kt(Ta,{Request:dt(eyt),Exception:dt(Zmt),Layer:dt(Jmt)}),Imt=function(r){Tmt(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},Smt,t,[]);return n||null},e}(RR),Lmt=kt(Ta,{Name:dt(Xt),Title:dt(Xt),Abstract:dt(Xt),KeywordList:dt(y7),OnlineResource:dt(fv),ContactInformation:dt(Ymt),Fees:dt(Xt),AccessConstraints:dt(Xt),LayerLimit:dt(Si),MaxWidth:dt(Si),MaxHeight:dt(Si)}),Omt=kt(Ta,{ContactPersonPrimary:dt(Xmt),ContactPosition:dt(Xt),ContactAddress:dt(qmt),ContactVoiceTelephone:dt(Xt),ContactFacsimileTelephone:dt(Xt),ContactElectronicMailAddress:dt(Xt)}),Fmt=kt(Ta,{ContactPerson:dt(Xt),ContactOrganization:dt(Xt)}),Rmt=kt(Ta,{AddressType:dt(Xt),Address:dt(Xt),City:dt(Xt),StateOrProvince:dt(Xt),PostCode:dt(Xt),Country:dt(Xt)}),Mmt=kt(Ta,{Format:Ie(Xt)}),g7=kt(Ta,{Name:dt(Xt),Title:dt(Xt),Abstract:dt(Xt),KeywordList:dt(y7),CRS:xn(Xt),EX_GeographicBoundingBox:dt(Kmt),BoundingBox:xn(jmt),Dimension:xn(tyt),Attribution:dt(Vmt),AuthorityURL:xn(iyt),Identifier:xn(Xt),MetadataURL:xn(ayt),DataURL:xn(Cu),FeatureListURL:xn(Cu),Style:xn(oyt),MinScaleDenominator:dt(jr),MaxScaleDenominator:dt(jr),Layer:xn(v7)}),Nmt=kt(Ta,{Title:dt(Xt),OnlineResource:dt(fv),LogoURL:dt(m7)}),Pmt=kt(Ta,{westBoundLongitude:dt(jr),eastBoundLongitude:dt(jr),southBoundLatitude:dt(jr),northBoundLatitude:dt(jr)}),Umt=kt(Ta,{GetCapabilities:dt(yT),GetMap:dt(yT),GetFeatureInfo:dt(yT)}),Dmt=kt(Ta,{Format:xn(Xt),DCPType:xn(ryt)}),Qmt=kt(Ta,{HTTP:dt(nyt)}),kmt=kt(Ta,{Get:dt(Cu),Post:dt(Cu)}),Hmt=kt(Ta,{Name:dt(Xt),Title:dt(Xt),Abstract:dt(Xt),LegendURL:xn(m7),StyleSheetURL:dt(Cu),StyleURL:dt(Cu)}),Gmt=kt(Ta,{Format:dt(Xt),OnlineResource:dt(fv)}),$mt=kt(Ta,{Keyword:Ie(Xt)});function Vmt(r,e){return Kt({},Nmt,r,e)}function jmt(r,e){var t=[su(r.getAttribute("minx")),su(r.getAttribute("miny")),su(r.getAttribute("maxx")),su(r.getAttribute("maxy"))],n=[su(r.getAttribute("resx")),su(r.getAttribute("resy"))];return{crs:r.getAttribute("CRS"),extent:t,res:n}}function Kmt(r,e){var t=Kt({},Pmt,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 Wmt(r,e){return Kt({},xmt,r,e)}function zmt(r,e){return Kt({},Lmt,r,e)}function Ymt(r,e){return Kt({},Omt,r,e)}function Xmt(r,e){return Kt({},Fmt,r,e)}function qmt(r,e){return Kt({},Rmt,r,e)}function Zmt(r,e){return Kt([],Mmt,r,e)}function Jmt(r,e){var t=Kt({},g7,r,e);return t.Layer===void 0?Object.assign(t,v7(r,e)):t}function v7(r,e){var t=e[e.length-1],n=Kt({},g7,r,e);if(n){var i=Gf(r.getAttribute("queryable"));i===void 0&&(i=t.queryable),n.queryable=i!==void 0?i:!1;var a=uu(r.getAttribute("cascaded"));a===void 0&&(a=t.cascaded),n.cascaded=a;var o=Gf(r.getAttribute("opaque"));o===void 0&&(o=t.opaque),n.opaque=o!==void 0?o:!1;var s=Gf(r.getAttribute("noSubsets"));s===void 0&&(s=t.noSubsets),n.noSubsets=s!==void 0?s:!1;var A=su(r.getAttribute("fixedWidth"));A||(A=t.fixedWidth),n.fixedWidth=A;var l=su(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 tyt(r,e){var t={name:r.getAttribute("name"),units:r.getAttribute("units"),unitSymbol:r.getAttribute("unitSymbol"),default:r.getAttribute("default"),multipleValues:Gf(r.getAttribute("multipleValues")),nearestValue:Gf(r.getAttribute("nearestValue")),current:Gf(r.getAttribute("current")),values:Xt(r)};return t}function Cu(r,e){return Kt({},Gmt,r,e)}function eyt(r,e){return Kt({},Umt,r,e)}function ryt(r,e){return Kt({},Qmt,r,e)}function nyt(r,e){return Kt({},kmt,r,e)}function yT(r,e){return Kt({},Dmt,r,e)}function m7(r,e){var t=Cu(r,e);if(t){var n=[uu(r.getAttribute("width")),uu(r.getAttribute("height"))];return t.size=n,t}}function iyt(r,e){var t=Cu(r,e);if(t)return t.name=r.getAttribute("name"),t}function ayt(r,e){var t=Cu(r,e);if(t)return t.type=r.getAttribute("type"),t}function oyt(r,e){return Kt({},Hmt,r,e)}function y7(r,e){return Kt([],$mt,r,e)}var syt=Imt,Ayt=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)}}(),lyt="_feature",uyt="_layer",cyt=function(r){Ayt(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 hv,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=uyt,h=l.localName.replace(c,"");if(!(this.layers_&&!Pi(this.layers_,h))){var f=h+lyt;u.featureType=f,u.featureNS=this.featureNS_;var d={};d[f]=Ie(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var g=kt([u.featureNS,null],d);l.setAttribute("namespaceURI",this.featureNS_);var m=Kt([],g,l,n,this.gmlFormat_);m&&tn(a,m)}}}if(i=="FeatureCollection"){var v=Kt([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);v&&(a=v)}return a},e.prototype.readFeaturesFromNode=function(t,n){var i={};return n&&Ce(i,this.getReadOptions(t,n)),this.readFeatures_(t,[i])},e}(k0),hyt=cyt,fyt=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=[null,"http://www.opengis.net/wmts/1.0"],pv=[null,"http://www.opengis.net/ows/1.1"],dyt=kt(Bl,{Contents:dt(Tyt)}),pyt=function(r){fyt(e,r);function e(){var t=r.call(this)||this;return t.owsParser_=new i7,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,dyt,t,[]),i||null):null},e}(RR),gyt=kt(Bl,{Layer:xn(Syt),TileMatrixSet:xn(xyt)}),vyt=kt(Bl,{Style:xn(Iyt),Format:xn(Xt),TileMatrixSetLink:xn(Lyt),Dimension:xn(Oyt),ResourceURL:xn(Fyt)},kt(pv,{Title:dt(Xt),Abstract:dt(Xt),WGS84BoundingBox:dt(_7),Identifier:dt(Xt)})),myt=kt(Bl,{LegendURL:xn(Ryt)},kt(pv,{Title:dt(Xt),Identifier:dt(Xt)})),yyt=kt(Bl,{TileMatrixSet:dt(Xt),TileMatrixSetLimits:dt(Nyt)}),_yt=kt(Bl,{TileMatrixLimits:Ie(Pyt)}),wyt=kt(Bl,{TileMatrix:dt(Xt),MinTileRow:dt(Si),MaxTileRow:dt(Si),MinTileCol:dt(Si),MaxTileCol:dt(Si)}),Eyt=kt(Bl,{Default:dt(Xt),Value:xn(Xt)},kt(pv,{Identifier:dt(Xt)})),Cyt=kt(pv,{LowerCorner:Ie(AL),UpperCorner:Ie(AL)}),Byt=kt(Bl,{WellKnownScaleSet:dt(Xt),TileMatrix:xn(Myt)},kt(pv,{SupportedCRS:dt(Xt),Identifier:dt(Xt),BoundingBox:dt(_7)})),byt=kt(Bl,{TopLeftCorner:dt(AL),ScaleDenominator:dt(jr),TileWidth:dt(Si),TileHeight:dt(Si),MatrixWidth:dt(Si),MatrixHeight:dt(Si)},kt(pv,{Identifier:dt(Xt)}));function Tyt(r,e){return Kt({},gyt,r,e)}function Syt(r,e){return Kt({},vyt,r,e)}function xyt(r,e){return Kt({},Byt,r,e)}function Iyt(r,e){var t=Kt({},myt,r,e);if(t){var n=r.getAttribute("isDefault")==="true";return t.isDefault=n,t}}function Lyt(r,e){return Kt({},yyt,r,e)}function Oyt(r,e){return Kt({},Eyt,r,e)}function Fyt(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 _7(r,e){var t=Kt([],Cyt,r,e);if(t.length==2)return oa(t)}function Ryt(r,e){var t={};return t.format=r.getAttribute("format"),t.href=fv(r),t}function AL(r,e){var t=Xt(r).split(/\s+/);if(!(!t||t.length!=2)){var n=+t[0],i=+t[1];if(!(isNaN(n)||isNaN(i)))return[n,i]}}function Myt(r,e){return Kt({},byt,r,e)}function Nyt(r,e){return Kt([],_yt,r,e)}function Pyt(r,e){return Kt({},wyt,r,e)}var Uyt=pyt,Dyt=Object.freeze(Object.defineProperty({__proto__:null,EsriJSON:Jht,GeoJSON:gft,GML:Oft,GPX:cdt,IGC:_dt,IIIFInfo:yAt,KML:agt,MVT:Ogt,OWS:i7,Polyline:wvt,TopoJSON:Mvt,WFS:amt,WKB:cmt,WKT:bmt,WMSCapabilities:syt,WMSGetFeatureInfo:hyt,WMTSCapabilities:Uyt},Symbol.toStringTag,{value:"Module"}));function lL(r){if(lL.installed){console.error("OPENLAYERS MAP ALREADY INSTALLED");return}lL.installed=!0,r.use(fot),r.use(Alt),r.use(Ilt),r.use(Bct),r.use(Uct),r.use(Zct),r.use(fht),r.use(Oht),r.provide("ol-feature",_r),r.provide("ol-geom",Mht),r.provide("ol-animations",Jq),r.provide("ol-format",Dyt),r.provide("ol-loadingstrategy",Jtt),r.provide("ol-selectconditions",FZ),r.provide("ol-extent",xX)}/*!
|
||
* 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 uL=function(r,e){return uL=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])},uL(r,e)};function LA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");uL(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var cL=function(){return cL=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},cL.apply(this,arguments)};function so(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 Ha(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 h1(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 Bu=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}(),cB=function(r,e){return Bu.fromClientRect(r,e.getBoundingClientRect())},Qyt=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 Bu(0,0,n,i)},hB=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},FU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kyt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var f1=0;f1<FU.length;f1++)kyt[FU.charCodeAt(f1)]=f1;var RU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",km=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var d1=0;d1<RU.length;d1++)km[RU.charCodeAt(d1)]=d1;var Hyt=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=km[r.charCodeAt(n)],o=km[r.charCodeAt(n+1)],s=km[r.charCodeAt(n+2)],A=km[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},Gyt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},$yt=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},$f=5,GR=6+5,_T=2,Vyt=GR-$f,w7=65536>>$f,jyt=1<<$f,wT=jyt-1,Kyt=1024>>$f,Wyt=w7+Kyt,zyt=Wyt,Yyt=32,Xyt=zyt+Yyt,qyt=65536>>GR,Zyt=1<<Vyt,Jyt=Zyt-1,MU=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},t0t=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},e0t=function(r,e){var t=Hyt(r),n=Array.isArray(t)?$yt(t):new Uint32Array(t),i=Array.isArray(t)?Gyt(t):new Uint16Array(t),a=24,o=MU(i,a/2,n[4]/2),s=n[5]===2?MU(i,(a+n[4])/2):t0t(n,Math.ceil((a+n[4])/4));return new r0t(n[0],n[1],n[2],n[3],o,s)},r0t=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>>$f],t=(t<<_T)+(e&wT),this.data[t];if(e<=65535)return t=this.index[w7+(e-55296>>$f)],t=(t<<_T)+(e&wT),this.data[t];if(e<this.highStart)return t=Xyt-qyt+(e>>GR),t=this.index[t],t+=e>>$f&Jyt,t=this.index[t],t=(t<<_T)+(e&wT),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),NU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n0t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var p1=0;p1<NU.length;p1++)n0t[NU.charCodeAt(p1)]=p1;var i0t="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==",PU=50,a0t=1,E7=2,C7=3,o0t=4,s0t=5,UU=7,B7=8,DU=9,Hc=10,hL=11,QU=12,fL=13,A0t=14,Hm=15,dL=16,g1=17,gm=18,l0t=19,kU=20,pL=21,vm=22,ET=23,wp=24,us=25,Gm=26,$m=27,Ep=28,u0t=29,Ef=30,c0t=31,v1=32,m1=33,gL=34,vL=35,mL=36,t0=37,yL=38,pw=39,gw=40,CT=41,b7=42,h0t=43,f0t=[9001,65288],T7="!",Fr="×",y1="÷",_L=e0t(i0t),Xl=[Ef,mL],wL=[a0t,E7,C7,s0t],S7=[Hc,B7],HU=[$m,Gm],d0t=wL.concat(S7),GU=[yL,pw,gw,gL,vL],p0t=[Hm,fL],g0t=function(r,e){e===void 0&&(e="strict");var t=[],n=[],i=[];return r.forEach(function(a,o){var s=_L.get(a);if(s>PU?(i.push(!0),s-=PU):i.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(a)!==-1)return n.push(o),t.push(dL);if(s===o0t||s===hL){if(o===0)return n.push(o),t.push(Ef);var A=t[o-1];return d0t.indexOf(A)===-1?(n.push(n[o-1]),t.push(A)):(n.push(o),t.push(Ef))}if(n.push(o),s===c0t)return t.push(e==="strict"?pL:t0);if(s===b7||s===u0t)return t.push(Ef);if(s===h0t)return a>=131072&&a<=196605||a>=196608&&a<=262141?t.push(t0):t.push(Ef);t.push(s)}),[n,t,i]},BT=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!==Hc)break}if(i===Hc)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!==Hc)break}if(s!==Hc)break}return!1},$U=function(r,e){for(var t=r;t>=0;){var n=e[t];if(n===Hc)t--;else return n}return 0},v0t=function(r,e,t,n,i){if(t[n]===0)return Fr;var a=n-1;if(Array.isArray(i)&&i[a]===!0)return Fr;var o=a-1,s=a+1,A=e[a],l=o>=0?e[o]:0,u=e[s];if(A===E7&&u===C7)return Fr;if(wL.indexOf(A)!==-1)return T7;if(wL.indexOf(u)!==-1||S7.indexOf(u)!==-1)return Fr;if($U(a,e)===B7)return y1;if(_L.get(r[a])===hL||(A===v1||A===m1)&&_L.get(r[s])===hL||A===UU||u===UU||A===DU||[Hc,fL,Hm].indexOf(A)===-1&&u===DU||[g1,gm,l0t,wp,Ep].indexOf(u)!==-1||$U(a,e)===vm||BT(ET,vm,a,e)||BT([g1,gm],pL,a,e)||BT(QU,QU,a,e))return Fr;if(A===Hc)return y1;if(A===ET||u===ET)return Fr;if(u===dL||A===dL)return y1;if([fL,Hm,pL].indexOf(u)!==-1||A===A0t||l===mL&&p0t.indexOf(A)!==-1||A===Ep&&u===mL||u===kU||Xl.indexOf(u)!==-1&&A===us||Xl.indexOf(A)!==-1&&u===us||A===$m&&[t0,v1,m1].indexOf(u)!==-1||[t0,v1,m1].indexOf(A)!==-1&&u===Gm||Xl.indexOf(A)!==-1&&HU.indexOf(u)!==-1||HU.indexOf(A)!==-1&&Xl.indexOf(u)!==-1||[$m,Gm].indexOf(A)!==-1&&(u===us||[vm,Hm].indexOf(u)!==-1&&e[s+1]===us)||[vm,Hm].indexOf(A)!==-1&&u===us||A===us&&[us,Ep,wp].indexOf(u)!==-1)return Fr;if([us,Ep,wp,g1,gm].indexOf(u)!==-1)for(var c=a;c>=0;){var h=e[c];if(h===us)return Fr;if([Ep,wp].indexOf(h)!==-1)c--;else break}if([$m,Gm].indexOf(u)!==-1)for(var c=[g1,gm].indexOf(A)!==-1?o:a;c>=0;){var h=e[c];if(h===us)return Fr;if([Ep,wp].indexOf(h)!==-1)c--;else break}if(yL===A&&[yL,pw,gL,vL].indexOf(u)!==-1||[pw,gL].indexOf(A)!==-1&&[pw,gw].indexOf(u)!==-1||[gw,vL].indexOf(A)!==-1&&u===gw||GU.indexOf(A)!==-1&&[kU,Gm].indexOf(u)!==-1||GU.indexOf(u)!==-1&&A===$m||Xl.indexOf(A)!==-1&&Xl.indexOf(u)!==-1||A===wp&&Xl.indexOf(u)!==-1||Xl.concat(us).indexOf(A)!==-1&&u===vm&&f0t.indexOf(r[s])===-1||Xl.concat(us).indexOf(u)!==-1&&A===gm)return Fr;if(A===CT&&u===CT){for(var f=t[a],d=1;f>0&&(f--,e[f]===CT);)d++;if(d%2!==0)return Fr}return A===v1&&u===m1?Fr:y1},m0t=function(r,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=g0t(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[us,Ef,b7].indexOf(s)!==-1?t0: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]},y0t=function(){function r(e,t,n,i){this.codePoints=e,this.required=t===T7,this.start=n,this.end=i}return r.prototype.slice=function(){return Ei.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),_0t=function(r,e){var t=hB(r),n=m0t(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=Fr;l<s&&(u=v0t(t,a,i,++l,o))===Fr;);if(u!==Fr||l===s){var c=new y0t(t,u,A,l);return A=l,{value:c,done:!1}}return{done:!0,value:null}}}},w0t=1<<0,E0t=1<<1,H0=1<<2,VU=1<<3,LE=10,jU=47,dy=92,C0t=9,B0t=32,_1=34,mm=61,b0t=35,T0t=36,S0t=37,w1=39,E1=40,ym=41,x0t=95,Mo=45,I0t=33,L0t=60,O0t=62,F0t=64,R0t=91,M0t=93,N0t=61,P0t=123,C1=63,U0t=125,KU=124,D0t=126,Q0t=128,WU=65533,bT=42,If=43,k0t=44,H0t=58,G0t=59,e0=46,$0t=0,V0t=8,j0t=11,K0t=14,W0t=31,z0t=127,zA=-1,x7=48,I7=97,L7=101,Y0t=102,X0t=117,q0t=122,O7=65,F7=69,R7=70,Z0t=85,J0t=90,$a=function(r){return r>=x7&&r<=57},t_t=function(r){return r>=55296&&r<=57343},Cp=function(r){return $a(r)||r>=O7&&r<=R7||r>=I7&&r<=Y0t},e_t=function(r){return r>=I7&&r<=q0t},r_t=function(r){return r>=O7&&r<=J0t},n_t=function(r){return e_t(r)||r_t(r)},i_t=function(r){return r>=Q0t},B1=function(r){return r===LE||r===C0t||r===B0t},OE=function(r){return n_t(r)||i_t(r)||r===x0t},zU=function(r){return OE(r)||$a(r)||r===Mo},a_t=function(r){return r>=$0t&&r<=V0t||r===j0t||r>=K0t&&r<=W0t||r===z0t},Sc=function(r,e){return r!==dy?!1:e!==LE},b1=function(r,e,t){return r===Mo?OE(e)||Sc(e,t):OE(r)?!0:!!(r===dy&&Sc(r,e))},TT=function(r,e,t){return r===If||r===Mo?$a(e)?!0:e===e0&&$a(t):$a(r===e0?e:r)},o_t=function(r){var e=0,t=1;(r[e]===If||r[e]===Mo)&&(r[e]===Mo&&(t=-1),e++);for(var n=[];$a(r[e]);)n.push(r[e++]);var i=n.length?parseInt(Ei.apply(void 0,n),10):0;r[e]===e0&&e++;for(var a=[];$a(r[e]);)a.push(r[e++]);var o=a.length,s=o?parseInt(Ei.apply(void 0,a),10):0;(r[e]===F7||r[e]===L7)&&e++;var A=1;(r[e]===If||r[e]===Mo)&&(r[e]===Mo&&(A=-1),e++);for(var l=[];$a(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)},s_t={type:2},A_t={type:3},l_t={type:4},u_t={type:13},c_t={type:8},h_t={type:21},f_t={type:9},d_t={type:10},p_t={type:11},g_t={type:12},v_t={type:14},T1={type:23},m_t={type:1},y_t={type:25},__t={type:24},w_t={type:26},E_t={type:27},C_t={type:28},B_t={type:29},b_t={type:31},EL={type:32},M7=function(){function r(){this._value=[]}return r.prototype.write=function(e){this._value=this._value.concat(hB(e))},r.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==EL;)e.push(t),t=this.consumeToken();return e},r.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case _1:return this.consumeStringToken(_1);case b0t:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),i=this.peekCodePoint(2);if(zU(t)||Sc(n,i)){var a=b1(t,n,i)?E0t:w0t,o=this.consumeName();return{type:5,value:o,flags:a}}break;case T0t:if(this.peekCodePoint(0)===mm)return this.consumeCodePoint(),u_t;break;case w1:return this.consumeStringToken(w1);case E1:return s_t;case ym:return A_t;case bT:if(this.peekCodePoint(0)===mm)return this.consumeCodePoint(),v_t;break;case If:if(TT(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case k0t:return l_t;case Mo:var s=e,A=this.peekCodePoint(0),l=this.peekCodePoint(1);if(TT(s,A,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(b1(s,A,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(A===Mo&&l===O0t)return this.consumeCodePoint(),this.consumeCodePoint(),__t;break;case e0:if(TT(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case jU:if(this.peekCodePoint(0)===bT)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===bT&&(u=this.consumeCodePoint(),u===jU))return this.consumeToken();if(u===zA)return this.consumeToken()}break;case H0t:return w_t;case G0t:return E_t;case L0t:if(this.peekCodePoint(0)===I0t&&this.peekCodePoint(1)===Mo&&this.peekCodePoint(2)===Mo)return this.consumeCodePoint(),this.consumeCodePoint(),y_t;break;case F0t:var c=this.peekCodePoint(0),h=this.peekCodePoint(1),f=this.peekCodePoint(2);if(b1(c,h,f)){var o=this.consumeName();return{type:7,value:o}}break;case R0t:return C_t;case dy:if(Sc(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case M0t:return B_t;case N0t:if(this.peekCodePoint(0)===mm)return this.consumeCodePoint(),c_t;break;case P0t:return p_t;case U0t:return g_t;case X0t:case Z0t:var d=this.peekCodePoint(0),g=this.peekCodePoint(1);return d===If&&(Cp(g)||g===C1)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case KU:if(this.peekCodePoint(0)===mm)return this.consumeCodePoint(),f_t;if(this.peekCodePoint(0)===KU)return this.consumeCodePoint(),h_t;break;case D0t:if(this.peekCodePoint(0)===mm)return this.consumeCodePoint(),d_t;break;case zA:return EL}return B1(e)?(this.consumeWhiteSpace(),b_t):$a(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):OE(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();Cp(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===C1&&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===C1?x7:A})),16),a=parseInt(Ei.apply(void 0,e.map(function(A){return A===C1?R7:A})),16);return{type:30,start:i,end:a}}var o=parseInt(Ei.apply(void 0,e),16);if(this.peekCodePoint(0)===Mo&&Cp(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];Cp(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)===E1?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===E1?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},r.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===zA)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===w1||t===_1){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===zA||this.peekCodePoint(0)===ym)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),T1)}for(;;){var i=this.consumeCodePoint();if(i===zA||i===ym)return{type:22,value:Ei.apply(void 0,e)};if(B1(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===zA||this.peekCodePoint(0)===ym?(this.consumeCodePoint(),{type:22,value:Ei.apply(void 0,e)}):(this.consumeBadUrlRemnants(),T1);if(i===_1||i===w1||i===E1||a_t(i))return this.consumeBadUrlRemnants(),T1;if(i===dy)if(Sc(i,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),T1;else e.push(i)}},r.prototype.consumeWhiteSpace=function(){for(;B1(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===ym||e===zA)return;Sc(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===zA||i===void 0||i===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(i===LE)return this._value.splice(0,n),m_t;if(i===dy){var a=this._value[n+1];a!==zA&&a!==void 0&&(a===LE?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):Sc(i,a)&&(t+=this.consumeStringSlice(n),t+=Ei(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var e=[],t=H0,n=this.peekCodePoint(0);for((n===If||n===Mo)&&e.push(this.consumeCodePoint());$a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(n===e0&&$a(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=VU;$a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),i=this.peekCodePoint(1);var a=this.peekCodePoint(2);if((n===F7||n===L7)&&((i===If||i===Mo)&&$a(a)||$a(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=VU;$a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[o_t(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(b1(i,a,o)){var s=this.consumeName();return{type:15,number:t,flags:n,unit:s}}return i===S0t?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Cp(e)){for(var t=Ei(e);Cp(this.peekCodePoint(0))&&t.length<6;)t+=Ei(this.consumeCodePoint());B1(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||t_t(n)||n>1114111?WU:n}return e===zA?WU:e},r.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(zU(t))e+=Ei(t);else if(Sc(t,this.peekCodePoint(0)))e+=Ei(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},r}(),N7=function(){function r(e){this._tokens=e}return r.create=function(e){var t=new M7;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||S_t(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"?EL:e},r.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},r}(),G0=function(r){return r.type===15},gv=function(r){return r.type===17},En=function(r){return r.type===20},T_t=function(r){return r.type===0},CL=function(r,e){return En(r)&&r.value===e},P7=function(r){return r.type!==31},Gg=function(r){return r.type!==31&&r.type!==4},bl=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},S_t=function(r,e){return e===11&&r.type===12||e===28&&r.type===29?!0:e===2&&r.type===3},vh=function(r){return r.type===17||r.type===15},Ui=function(r){return r.type===16||vh(r)},U7=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},wa={type:17,number:0,flags:H0},$R={type:16,number:50,flags:H0},Gc={type:16,number:100,flags:H0},Vm=function(r,e,t){var n=r[0],i=r[1];return[Ln(n,e),Ln(typeof i<"u"?i:n,t)]},Ln=function(r,e){if(r.type===16)return r.number/100*e;if(G0(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},D7="deg",Q7="grad",k7="rad",H7="turn",fB={name:"angle",parse:function(r,e){if(e.type===15)switch(e.unit){case D7:return Math.PI*e.number/180;case Q7:return Math.PI/200*e.number;case k7:return e.number;case H7:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},G7=function(r){return r.type===15&&(r.unit===D7||r.unit===Q7||r.unit===k7||r.unit===H7)},$7=function(r){var e=r.filter(En).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[wa,wa];case"to top":case"bottom":return Ds(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[wa,Gc];case"to right":case"left":return Ds(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Gc,Gc];case"to bottom":case"top":return Ds(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Gc,wa];case"to left":case"right":return Ds(270)}return 0},Ds=function(r){return Math.PI*r/180},Xc={name:"color",parse:function(r,e){if(e.type===18){var t=x_t[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 $c(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 $c(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 $c(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 $c(parseInt(n,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(e.type===20){var s=mu[e.value.toUpperCase()];if(typeof s<"u")return s}return mu.TRANSPARENT}},qc=function(r){return(255&r)===0},ia=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+")"},$c=function(r,e,t,n){return(r<<24|e<<16|t<<8|Math.round(n*255)<<0)>>>0},YU=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},XU=function(r,e){var t=e.filter(Gg);if(t.length===3){var n=t.map(YU),i=n[0],a=n[1],o=n[2];return $c(i,a,o,1)}if(t.length===4){var s=t.map(YU),i=s[0],a=s[1],o=s[2],A=s[3];return $c(i,a,o,A)}return 0};function ST(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 qU=function(r,e){var t=e.filter(Gg),n=t[0],i=t[1],a=t[2],o=t[3],s=(n.type===17?Ds(n.number):fB.parse(r,n))/(Math.PI*2),A=Ui(i)?i.number/100:0,l=Ui(a)?a.number/100:0,u=typeof o<"u"&&Ui(o)?Ln(o,1):1;if(A===0)return $c(l*255,l*255,l*255,1);var c=l<=.5?l*(A+1):l+A-l*A,h=l*2-c,f=ST(h,c,s+1/3),d=ST(h,c,s),g=ST(h,c,s-1/3);return $c(f*255,d*255,g*255,u)},x_t={hsl:qU,hsla:qU,rgb:XU,rgba:XU},py=function(r,e){return Xc.parse(r,N7.create(e).parseComponentValue())},mu={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},I_t={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(En(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},L_t={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},dB=function(r,e){var t=Xc.parse(r,e[0]),n=e[1];return n&&Ui(n)?{color:t,stop:n}:{color:t,stop:null}},ZU=function(r,e){var t=r[0],n=r[r.length-1];t.stop===null&&(t.stop=wa),n.stop===null&&(n.stop=Gc);for(var i=[],a=0,o=0;o<r.length;o++){var s=r[o].stop;if(s!==null){var A=Ln(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),d=1;d<=c;d++)i[l+d-1]=f*d;l=null}}return r.map(function(g,m){var v=g.color;return{color:v,stop:Math.max(Math.min(1,i[m]/e),0)}})},O_t=function(r,e,t){var n=e/2,i=t/2,a=Ln(r[0],e)-n,o=i-Ln(r[1],t);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},F_t=function(r,e,t){var n=typeof r=="number"?r:O_t(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]},AA=function(r,e){return Math.sqrt(r*r+e*e)},JU=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=AA(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},R_t=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(AA(e,t),AA(e,t-i),AA(e-n,t),AA(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=JU(n,i,e,t,!0),l=A[0],u=A[1];a=AA(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(AA(e,t),AA(e,t-i),AA(e-n,t),AA(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=JU(n,i,e,t,!1),l=c[0],u=c[1];a=AA(l-e,(u-t)/s),o=s*a}break}return Array.isArray(r.size)&&(a=Ln(r.size[0],n),o=r.size.length===2?Ln(r.size[1],i):a),[a,o]},M_t=function(r,e){var t=Ds(180),n=[];return bl(e).forEach(function(i,a){if(a===0){var o=i[0];if(o.type===20&&o.value==="to"){t=$7(i);return}else if(G7(o)){t=fB.parse(r,o);return}}var s=dB(r,i);n.push(s)}),{angle:t,stops:n,type:1}},S1=function(r,e){var t=Ds(180),n=[];return bl(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=$7(i);return}else if(G7(o)){t=(fB.parse(r,o)+Ds(270))%Ds(360);return}}var s=dB(r,i);n.push(s)}),{angle:t,stops:n,type:1}},N_t=function(r,e){var t=Ds(180),n=[],i=1,a=0,o=3,s=[];return bl(e).forEach(function(A,l){var u=A[0];if(l===0){if(En(u)&&u.value==="linear"){i=1;return}else if(En(u)&&u.value==="radial"){i=2;return}}if(u.type===18){if(u.name==="from"){var c=Xc.parse(r,u.values[0]);n.push({stop:wa,color:c})}else if(u.name==="to"){var c=Xc.parse(r,u.values[0]);n.push({stop:Gc,color:c})}else if(u.name==="color-stop"){var h=u.values.filter(Gg);if(h.length===2){var c=Xc.parse(r,h[1]),f=h[0];gv(f)&&n.push({stop:{type:16,number:f.number*100,flags:f.flags},color:c})}}}}),i===1?{angle:(t+Ds(180))%Ds(360),stops:n,type:i}:{size:o,shape:a,stops:n,position:s,type:i}},V7="closest-side",j7="farthest-side",K7="closest-corner",W7="farthest-corner",z7="circle",Y7="ellipse",X7="cover",q7="contain",P_t=function(r,e){var t=0,n=3,i=[],a=[];return bl(e).forEach(function(o,s){var A=!0;if(s===0){var l=!1;A=o.reduce(function(c,h){if(l)if(En(h))switch(h.value){case"center":return a.push($R),c;case"top":case"left":return a.push(wa),c;case"right":case"bottom":return a.push(Gc),c}else(Ui(h)||vh(h))&&a.push(h);else if(En(h))switch(h.value){case z7:return t=0,!1;case Y7:return t=1,!1;case"at":return l=!0,!1;case V7:return n=0,!1;case X7:case j7:return n=1,!1;case q7:case K7:return n=2,!1;case W7:return n=3,!1}else if(vh(h)||Ui(h))return Array.isArray(n)||(n=[]),n.push(h),!1;return c},A)}if(A){var u=dB(r,o);i.push(u)}}),{size:n,shape:t,stops:i,position:a,type:2}},x1=function(r,e){var t=0,n=3,i=[],a=[];return bl(e).forEach(function(o,s){var A=!0;if(s===0?A=o.reduce(function(u,c){if(En(c))switch(c.value){case"center":return a.push($R),!1;case"top":case"left":return a.push(wa),!1;case"right":case"bottom":return a.push(Gc),!1}else if(Ui(c)||vh(c))return a.push(c),!1;return u},A):s===1&&(A=o.reduce(function(u,c){if(En(c))switch(c.value){case z7:return t=0,!1;case Y7:return t=1,!1;case q7:case V7:return n=0,!1;case j7:return n=1,!1;case K7:return n=2,!1;case X7:case W7:return n=3,!1}else if(vh(c)||Ui(c))return Array.isArray(n)||(n=[]),n.push(c),!1;return u},A)),A){var l=dB(r,o);i.push(l)}}),{size:n,shape:t,stops:i,position:a,type:2}},U_t=function(r){return r.type===1},D_t=function(r){return r.type===2},VR={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=Z7[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 Q_t(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!Z7[r.name])}var Z7={"linear-gradient":M_t,"-moz-linear-gradient":S1,"-ms-linear-gradient":S1,"-o-linear-gradient":S1,"-webkit-linear-gradient":S1,"radial-gradient":P_t,"-moz-radial-gradient":x1,"-ms-radial-gradient":x1,"-o-radial-gradient":x1,"-webkit-radial-gradient":x1,"-webkit-gradient":N_t},k_t={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 Gg(n)&&Q_t(n)}).map(function(n){return VR.parse(r,n)})}},H_t={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(En(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},G_t={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,e){return bl(e).map(function(t){return t.filter(Ui)}).map(U7)}},$_t={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,e){return bl(e).map(function(t){return t.filter(En).map(function(n){return n.value}).join(" ")}).map(V_t)}},V_t=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}},_g;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(_g||(_g={}));var j_t={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,e){return bl(e).map(function(t){return t.filter(K_t)})}},K_t=function(r){return En(r)||Ui(r)},pB=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},W_t=pB("top"),z_t=pB("right"),Y_t=pB("bottom"),X_t=pB("left"),gB=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return U7(t.filter(Ui))}}},q_t=gB("top-left"),Z_t=gB("top-right"),J_t=gB("bottom-right"),t1t=gB("bottom-left"),vB=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}}},e1t=vB("top"),r1t=vB("right"),n1t=vB("bottom"),i1t=vB("left"),mB=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return G0(t)?t.number:0}}},a1t=mB("top"),o1t=mB("right"),s1t=mB("bottom"),A1t=mB("left"),l1t={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},u1t={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},c1t={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,e){return e.filter(En).reduce(function(t,n){return t|h1t(n.value)},0)}},h1t=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},f1t={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}},d1t={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}},FE;(function(r){r.NORMAL="normal",r.STRICT="strict"})(FE||(FE={}));var p1t={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"strict":return FE.STRICT;case"normal":default:return FE.NORMAL}}},g1t={name:"line-height",initialValue:"normal",prefix:!1,type:4},t2=function(r,e){return En(r)&&r.value==="normal"?1.2*e:r.type===17?e*r.number:Ui(r)?Ln(r,e):e},v1t={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,e){return e.type===20&&e.value==="none"?null:VR.parse(r,e)}},m1t={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}}},BL={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}}},yB=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},y1t=yB("top"),_1t=yB("right"),w1t=yB("bottom"),E1t=yB("left"),C1t={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,e){return e.filter(En).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}})}},B1t={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"}}},_B=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},b1t=_B("top"),T1t=_B("right"),S1t=_B("bottom"),x1t=_B("left"),I1t={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}}},L1t={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}},O1t={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&CL(e[0],"none")?[]:bl(e).map(function(t){for(var n={color:mu.TRANSPARENT,offsetX:wa,offsetY:wa,blur:wa},i=0,a=0;a<t.length;a++){var o=t[a];vh(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:n.blur=o,i++):n.color=Xc.parse(r,o)}return n})}},F1t={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}},R1t={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=P1t[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},M1t=function(r){var e=r.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},N1t=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},P1t={matrix:M1t,matrix3d:N1t},e2={type:16,number:50,flags:H0},U1t=[e2,e2],D1t={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,e){var t=e.filter(Ui);return t.length!==2?U1t:[t[0],t[1]]}},Q1t={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}}},gy;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(gy||(gy={}));var k1t={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-all":return gy.BREAK_ALL;case"keep-all":return gy.KEEP_ALL;case"normal":default:return gy.NORMAL}}},H1t={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,e){if(e.type===20)return{auto:!0,order:0};if(gv(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},J7={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")}},G1t={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,e){return gv(e)?e.number:1}},$1t={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},V1t={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,e){return e.filter(En).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})}},j1t={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+"'"})}},K1t={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},W1t={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,e){if(gv(e))return e.number;if(En(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},z1t={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.filter(En).map(function(t){return t.value})}},Y1t={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"}}},Ki=function(r,e){return(r&e)!==0},X1t={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}},q1t={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(P7),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(o.type===20){var A=s&&gv(s)?s.number:1;n.push({counter:o.value,increment:A})}}return n}},Z1t={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return[];for(var t=[],n=e.filter(P7),i=0;i<n.length;i++){var a=n[i],o=n[i+1];if(En(a)&&a.value!=="none"){var s=o&&gv(o)?o.number:0;t.push({counter:a.value,reset:s})}}return t}},J1t={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(r,e){return e.filter(G0).map(function(t){return J7.parse(r,t)})}},twt={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(T_t);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}},r2=function(r,e,t){if(!r)return"";var n=r[Math.min(e,r.length-1)];return n?t?n.open:n.close:""},ewt={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&CL(e[0],"none")?[]:bl(e).map(function(t){for(var n={color:255,offsetX:wa,offsetY:wa,blur:wa,spread:wa,inset:!1},i=0,a=0;a<t.length;a++){var o=t[a];CL(o,"inset")?n.inset=!0:vh(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:i===2?n.blur=o:n.spread=o,i++):n.color=Xc.parse(r,o)}return n})}},rwt={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(r,e){var t=[0,1,2],n=[];return e.filter(En).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}},nwt={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},iwt={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(r,e){return G0(e)?e.number:0}},awt=function(){function r(e,t){var n,i;this.animationDuration=_e(e,J1t,t.animationDuration),this.backgroundClip=_e(e,I_t,t.backgroundClip),this.backgroundColor=_e(e,L_t,t.backgroundColor),this.backgroundImage=_e(e,k_t,t.backgroundImage),this.backgroundOrigin=_e(e,H_t,t.backgroundOrigin),this.backgroundPosition=_e(e,G_t,t.backgroundPosition),this.backgroundRepeat=_e(e,$_t,t.backgroundRepeat),this.backgroundSize=_e(e,j_t,t.backgroundSize),this.borderTopColor=_e(e,W_t,t.borderTopColor),this.borderRightColor=_e(e,z_t,t.borderRightColor),this.borderBottomColor=_e(e,Y_t,t.borderBottomColor),this.borderLeftColor=_e(e,X_t,t.borderLeftColor),this.borderTopLeftRadius=_e(e,q_t,t.borderTopLeftRadius),this.borderTopRightRadius=_e(e,Z_t,t.borderTopRightRadius),this.borderBottomRightRadius=_e(e,J_t,t.borderBottomRightRadius),this.borderBottomLeftRadius=_e(e,t1t,t.borderBottomLeftRadius),this.borderTopStyle=_e(e,e1t,t.borderTopStyle),this.borderRightStyle=_e(e,r1t,t.borderRightStyle),this.borderBottomStyle=_e(e,n1t,t.borderBottomStyle),this.borderLeftStyle=_e(e,i1t,t.borderLeftStyle),this.borderTopWidth=_e(e,a1t,t.borderTopWidth),this.borderRightWidth=_e(e,o1t,t.borderRightWidth),this.borderBottomWidth=_e(e,s1t,t.borderBottomWidth),this.borderLeftWidth=_e(e,A1t,t.borderLeftWidth),this.boxShadow=_e(e,ewt,t.boxShadow),this.color=_e(e,l1t,t.color),this.direction=_e(e,u1t,t.direction),this.display=_e(e,c1t,t.display),this.float=_e(e,f1t,t.cssFloat),this.fontFamily=_e(e,j1t,t.fontFamily),this.fontSize=_e(e,K1t,t.fontSize),this.fontStyle=_e(e,Y1t,t.fontStyle),this.fontVariant=_e(e,z1t,t.fontVariant),this.fontWeight=_e(e,W1t,t.fontWeight),this.letterSpacing=_e(e,d1t,t.letterSpacing),this.lineBreak=_e(e,p1t,t.lineBreak),this.lineHeight=_e(e,g1t,t.lineHeight),this.listStyleImage=_e(e,v1t,t.listStyleImage),this.listStylePosition=_e(e,m1t,t.listStylePosition),this.listStyleType=_e(e,BL,t.listStyleType),this.marginTop=_e(e,y1t,t.marginTop),this.marginRight=_e(e,_1t,t.marginRight),this.marginBottom=_e(e,w1t,t.marginBottom),this.marginLeft=_e(e,E1t,t.marginLeft),this.opacity=_e(e,G1t,t.opacity);var a=_e(e,C1t,t.overflow);this.overflowX=a[0],this.overflowY=a[a.length>1?1:0],this.overflowWrap=_e(e,B1t,t.overflowWrap),this.paddingTop=_e(e,b1t,t.paddingTop),this.paddingRight=_e(e,T1t,t.paddingRight),this.paddingBottom=_e(e,S1t,t.paddingBottom),this.paddingLeft=_e(e,x1t,t.paddingLeft),this.paintOrder=_e(e,rwt,t.paintOrder),this.position=_e(e,L1t,t.position),this.textAlign=_e(e,I1t,t.textAlign),this.textDecorationColor=_e(e,$1t,(n=t.textDecorationColor)!==null&&n!==void 0?n:t.color),this.textDecorationLine=_e(e,V1t,(i=t.textDecorationLine)!==null&&i!==void 0?i:t.textDecoration),this.textShadow=_e(e,O1t,t.textShadow),this.textTransform=_e(e,F1t,t.textTransform),this.transform=_e(e,R1t,t.transform),this.transformOrigin=_e(e,D1t,t.transformOrigin),this.visibility=_e(e,Q1t,t.visibility),this.webkitTextStrokeColor=_e(e,nwt,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=_e(e,iwt,t.webkitTextStrokeWidth),this.wordBreak=_e(e,k1t,t.wordBreak),this.zIndex=_e(e,H1t,t.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return qc(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 Ki(this.display,4)||Ki(this.display,33554432)||Ki(this.display,268435456)||Ki(this.display,536870912)||Ki(this.display,67108864)||Ki(this.display,134217728)},r}(),owt=function(){function r(e,t){this.content=_e(e,X1t,t.content),this.quotes=_e(e,twt,t.quotes)}return r}(),n2=function(){function r(e,t){this.counterIncrement=_e(e,q1t,t.counterIncrement),this.counterReset=_e(e,Z1t,t.counterReset)}return r}(),_e=function(r,e,t){var n=new M7,i=t!==null&&typeof t<"u"?t.toString():e.initialValue;n.write(i);var a=new N7(n.read());switch(e.type){case 2:var o=a.parseComponentValue();return e.parse(r,En(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 fB.parse(r,a.parseComponentValue());case"color":return Xc.parse(r,a.parseComponentValue());case"image":return VR.parse(r,a.parseComponentValue());case"length":var s=a.parseComponentValue();return vh(s)?s:wa;case"length-percentage":var A=a.parseComponentValue();return Ui(A)?A:wa;case"time":return J7.parse(r,a.parseComponentValue())}break}},swt="data-html2canvas-debug",Awt=function(r){var e=r.getAttribute(swt);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},bL=function(r,e){var t=Awt(r);return t===1||e===t},Tl=function(){function r(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,bL(t,3))debugger;this.styles=new awt(e,window.getComputedStyle(t,null)),xL(t)&&(this.styles.animationDuration.some(function(n){return n>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=cB(this.context,t),bL(t,4)&&(this.flags|=16)}return r}(),lwt="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",i2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var I1=0;I1<i2.length;I1++)jm[i2.charCodeAt(I1)]=I1;var uwt=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=jm[r.charCodeAt(n)],o=jm[r.charCodeAt(n+1)],s=jm[r.charCodeAt(n+2)],A=jm[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},cwt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},hwt=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},Vf=5,jR=6+5,xT=2,fwt=jR-Vf,t$=65536>>Vf,dwt=1<<Vf,IT=dwt-1,pwt=1024>>Vf,gwt=t$+pwt,vwt=gwt,mwt=32,ywt=vwt+mwt,_wt=65536>>jR,wwt=1<<fwt,Ewt=wwt-1,a2=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},Cwt=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},Bwt=function(r,e){var t=uwt(r),n=Array.isArray(t)?hwt(t):new Uint32Array(t),i=Array.isArray(t)?cwt(t):new Uint16Array(t),a=24,o=a2(i,a/2,n[4]/2),s=n[5]===2?a2(i,(a+n[4])/2):Cwt(n,Math.ceil((a+n[4])/4));return new bwt(n[0],n[1],n[2],n[3],o,s)},bwt=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>>Vf],t=(t<<xT)+(e&IT),this.data[t];if(e<=65535)return t=this.index[t$+(e-55296>>Vf)],t=(t<<xT)+(e&IT),this.data[t];if(e<this.highStart)return t=ywt-_wt+(e>>jR),t=this.index[t],t+=e>>Vf&Ewt,t=this.index[t],t=(t<<xT)+(e&IT),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),o2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Twt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var L1=0;L1<o2.length;L1++)Twt[o2.charCodeAt(L1)]=L1;var Swt=1,LT=2,OT=3,s2=4,A2=5,xwt=7,l2=8,FT=9,RT=10,u2=11,c2=12,h2=13,f2=14,MT=15,Iwt=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},Lwt=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},Owt=Bwt(lwt),Ms="×",NT="÷",Fwt=function(r){return Owt.get(r)},Rwt=function(r,e,t){var n=t-2,i=e[n],a=e[t-1],o=e[t];if(a===LT&&o===OT)return Ms;if(a===LT||a===OT||a===s2||o===LT||o===OT||o===s2)return NT;if(a===l2&&[l2,FT,u2,c2].indexOf(o)!==-1||(a===u2||a===FT)&&(o===FT||o===RT)||(a===c2||a===RT)&&o===RT||o===h2||o===A2||o===xwt||a===Swt)return Ms;if(a===h2&&o===f2){for(;i===A2;)i=e[--n];if(i===f2)return Ms}if(a===MT&&o===MT){for(var s=0;i===MT;)s++,i=e[--n];if(s%2===0)return Ms}return NT},Mwt=function(r){var e=Iwt(r),t=e.length,n=0,i=0,a=e.map(Fwt);return{next:function(){if(n>=t)return{done:!0,value:null};for(var o=Ms;n<t&&(o=Rwt(e,a,++n))===Ms;);if(o!==Ms||n===t){var s=Lwt.apply(null,e.slice(i,n));return i=n,{value:s,done:!1}}return{done:!0,value:null}}}},Nwt=function(r){for(var e=Mwt(r),t=[],n;!(n=e.next()).done;)n.value&&t.push(n.value.slice());return t},Pwt=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},Uwt=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"?"👨".repeat(10):"";var n=e.firstChild,i=hB(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},Dwt=function(){return typeof new Image().crossOrigin<"u"},Qwt=function(){return typeof new XMLHttpRequest().responseType=="string"},kwt=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},d2=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},Hwt=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=TL(t,t,0,0,i);return n.fillStyle="red",n.fillRect(0,0,t,t),p2(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",d2(A)?p2(TL(t,t,0,0,l)):Promise.reject(!1)}).then(function(s){return n.drawImage(s,0,0),d2(n.getImageData(0,0,t,t).data)}).catch(function(){return!1})},TL=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},p2=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))})},ma={get SUPPORT_RANGE_BOUNDS(){var r=Pwt(document);return Object.defineProperty(ma,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=ma.SUPPORT_RANGE_BOUNDS&&Uwt(document);return Object.defineProperty(ma,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=kwt(document);return Object.defineProperty(ma,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?Hwt(document):Promise.resolve(!1);return Object.defineProperty(ma,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=Dwt();return Object.defineProperty(ma,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=Qwt();return Object.defineProperty(ma,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ma,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(ma,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},vy=function(){function r(e,t){this.text=e,this.bounds=t}return r}(),Gwt=function(r,e,t,n){var i=jwt(e,t),a=[],o=0;return i.forEach(function(s){if(t.textDecorationLine.length||s.trim().length>0)if(ma.SUPPORT_RANGE_BOUNDS){var A=g2(n,o,s.length).getClientRects();if(A.length>1){var l=KR(s),u=0;l.forEach(function(h){a.push(new vy(h,Bu.fromDOMRectList(r,g2(n,u+o,h.length).getClientRects()))),u+=h.length})}else a.push(new vy(s,Bu.fromDOMRectList(r,A)))}else{var c=n.splitText(s.length);a.push(new vy(s,$wt(r,n))),n=c}else ma.SUPPORT_RANGE_BOUNDS||(n=n.splitText(s.length));o+=s.length}),a},$wt=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=cB(r,n);return n.firstChild&&i.replaceChild(n.firstChild,n),a}}return Bu.EMPTY},g2=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},KR=function(r){if(ma.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 Nwt(r)},Vwt=function(r,e){if(ma.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 Wwt(r,e)},jwt=function(r,e){return e.letterSpacing!==0?KR(r):Vwt(r,e)},Kwt=[32,160,4961,65792,65793,4153,4241],Wwt=function(r,e){for(var t=_0t(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=hB(o),A="";s.forEach(function(l){Kwt.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},zwt=function(){function r(e,t,n){this.text=Ywt(t.data,n.textTransform),this.textBounds=Gwt(e,this.text,n,t)}return r}(),Ywt=function(r,e){switch(e){case 1:return r.toLowerCase();case 3:return r.replace(Xwt,qwt);case 2:return r.toUpperCase();default:return r}},Xwt=/(^|\s|:|-|\(|\))([a-z])/g,qwt=function(r,e,t){return r.length>0?e+t.toUpperCase():r},e$=function(r){LA(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}(Tl),r$=function(r){LA(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}(Tl),n$=function(r){LA(e,r);function e(t,n){var i=r.call(this,t,n)||this,a=new XMLSerializer,o=cB(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}(Tl),i$=function(r){LA(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(Tl),SL=function(r){LA(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}(Tl),Zwt=[{type:15,flags:0,unit:"px",number:3}],Jwt=[{type:16,flags:0,number:50}],tEt=function(r){return r.width>r.height?new Bu(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new Bu(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r},eEt=function(r){var e=r.type===rEt?new Array(r.value.length+1).join("•"):r.value;return e.length===0?r.placeholder||"":e},RE="checkbox",ME="radio",rEt="password",v2=707406591,WR=function(r){LA(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=eEt(n),(i.type===RE||i.type===ME)&&(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=tEt(i.bounds)),i.type){case RE:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=Zwt;break;case ME:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=Jwt;break}return i}return e}(Tl),a$=function(r){LA(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}(Tl),o$=function(r){LA(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(Tl),s$=function(r){LA(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=l$(t,n.contentWindow.document.documentElement);var a=n.contentWindow.document.documentElement?py(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):mu.TRANSPARENT,o=n.contentWindow.document.body?py(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):mu.TRANSPARENT;i.backgroundColor=qc(a)?qc(o)?i.styles.backgroundColor:o:a}}catch{}return i}return e}(Tl),nEt=["OL","UL","MENU"],vw=function(r,e,t,n){for(var i=e.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,u$(i)&&i.data.trim().length>0)t.textNodes.push(new zwt(r,i,t.styles));else if(rg(i))if(d$(i)&&i.assignedNodes)i.assignedNodes().forEach(function(s){return vw(r,s,t,n)});else{var o=A$(r,i);o.styles.isVisible()&&(iEt(i,o,n)?o.flags|=4:aEt(o.styles)&&(o.flags|=2),nEt.indexOf(i.tagName)!==-1&&(o.flags|=8),t.elements.push(o),i.slot,i.shadowRoot?vw(r,i.shadowRoot,o,n):!NE(i)&&!c$(i)&&!PE(i)&&vw(r,i,o,n))}},A$=function(r,e){return IL(e)?new e$(r,e):h$(e)?new r$(r,e):c$(e)?new n$(r,e):oEt(e)?new i$(r,e):sEt(e)?new SL(r,e):AEt(e)?new WR(r,e):PE(e)?new a$(r,e):NE(e)?new o$(r,e):f$(e)?new s$(r,e):new Tl(r,e)},l$=function(r,e){var t=A$(r,e);return t.flags|=4,vw(r,e,t,t),t},iEt=function(r,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||zR(r)&&t.styles.isTransparent()},aEt=function(r){return r.isPositioned()||r.isFloating()},u$=function(r){return r.nodeType===Node.TEXT_NODE},rg=function(r){return r.nodeType===Node.ELEMENT_NODE},xL=function(r){return rg(r)&&typeof r.style<"u"&&!mw(r)},mw=function(r){return typeof r.className=="object"},oEt=function(r){return r.tagName==="LI"},sEt=function(r){return r.tagName==="OL"},AEt=function(r){return r.tagName==="INPUT"},lEt=function(r){return r.tagName==="HTML"},c$=function(r){return r.tagName==="svg"},zR=function(r){return r.tagName==="BODY"},h$=function(r){return r.tagName==="CANVAS"},m2=function(r){return r.tagName==="VIDEO"},IL=function(r){return r.tagName==="IMG"},f$=function(r){return r.tagName==="IFRAME"},y2=function(r){return r.tagName==="STYLE"},uEt=function(r){return r.tagName==="SCRIPT"},NE=function(r){return r.tagName==="TEXTAREA"},PE=function(r){return r.tagName==="SELECT"},d$=function(r){return r.tagName==="SLOT"},_2=function(r){return r.tagName.indexOf("-")>0},cEt=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}(),w2={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"]},E2={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},hEt={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},fEt={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Bp=function(r,e,t,n,i,a){return r<e||r>t?r0(r,i,a.length>0):n.integers.reduce(function(o,s,A){for(;r>=s;)r-=s,o+=n.values[A];return o},"")+a},p$=function(r,e,t,n){var i="";do t||r--,i=n(r)+i,r/=e;while(r*e>=e);return i},_i=function(r,e,t,n,i){var a=t-e+1;return(r<0?"-":"")+(p$(Math.abs(r),a,n,function(o){return Ei(Math.floor(o%a)+e)})+i)},sf=function(r,e,t){t===void 0&&(t=". ");var n=e.length;return p$(Math.abs(r),n,!1,function(i){return e[Math.floor(i%n)]})+t},$p=1<<0,Cc=1<<1,Bc=1<<2,Km=1<<3,ql=function(r,e,t,n,i,a){if(r<-9999||r>9999)return r0(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&&Ki(a,$p)&&s!==""?s=e[l]+s:l>1||l===1&&A===0||l===1&&A===1&&Ki(a,Cc)||l===1&&A===1&&Ki(a,Bc)&&r>100||l===1&&A>1&&Ki(a,Km)?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},C2="十百千萬",B2="拾佰仟萬",b2="マイナス",PT="마이너스",r0=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=_i(r,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return sf(r,"〇一二三四五六七八九",i);case 6:return Bp(r,1,3999,w2,3,n).toLowerCase();case 7:return Bp(r,1,3999,w2,3,n);case 8:return _i(r,945,969,!1,n);case 9:return _i(r,97,122,!1,n);case 10:return _i(r,65,90,!1,n);case 11:return _i(r,1632,1641,!0,n);case 12:case 49:return Bp(r,1,9999,E2,3,n);case 35:return Bp(r,1,9999,E2,3,n).toLowerCase();case 13:return _i(r,2534,2543,!0,n);case 14:case 30:return _i(r,6112,6121,!0,n);case 15:return sf(r,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return sf(r,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return ql(r,"零一二三四五六七八九",C2,"負",i,Cc|Bc|Km);case 47:return ql(r,"零壹貳參肆伍陸柒捌玖",B2,"負",i,$p|Cc|Bc|Km);case 42:return ql(r,"零一二三四五六七八九",C2,"负",i,Cc|Bc|Km);case 41:return ql(r,"零壹贰叁肆伍陆柒捌玖",B2,"负",i,$p|Cc|Bc|Km);case 26:return ql(r,"〇一二三四五六七八九","十百千万",b2,i,0);case 25:return ql(r,"零壱弐参四伍六七八九","拾百千万",b2,i,$p|Cc|Bc);case 31:return ql(r,"영일이삼사오육칠팔구","십백천만",PT,a,$p|Cc|Bc);case 33:return ql(r,"零一二三四五六七八九","十百千萬",PT,a,0);case 32:return ql(r,"零壹貳參四五六七八九","拾百千",PT,a,$p|Cc|Bc);case 18:return _i(r,2406,2415,!0,n);case 20:return Bp(r,1,19999,fEt,3,n);case 21:return _i(r,2790,2799,!0,n);case 22:return _i(r,2662,2671,!0,n);case 22:return Bp(r,1,10999,hEt,3,n);case 23:return sf(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return sf(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return _i(r,3302,3311,!0,n);case 28:return sf(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return sf(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return _i(r,3792,3801,!0,n);case 37:return _i(r,6160,6169,!0,n);case 38:return _i(r,4160,4169,!0,n);case 39:return _i(r,2918,2927,!0,n);case 40:return _i(r,1776,1785,!0,n);case 43:return _i(r,3046,3055,!0,n);case 44:return _i(r,3174,3183,!0,n);case 45:return _i(r,3664,3673,!0,n);case 46:return _i(r,3872,3881,!0,n);case 3:default:return _i(r,48,57,!0,n)}},g$="data-html2canvas-ignore",T2=function(){function r(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new cEt,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=dEt(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=vEt(i).then(function(){return so(n,void 0,void 0,function(){var u,c;return Ha(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(wEt),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,gEt(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(yEt(document.doctype)+"<html></html>"),_Et(this.referenceElement.ownerDocument,a,o),A.replaceChild(A.adoptNode(this.documentElement),A.documentElement),A.close(),l},r.prototype.createElementClone=function(e){if(bL(e,2))debugger;if(h$(e))return this.createCanvasClone(e);if(m2(e))return this.createVideoClone(e);if(y2(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return IL(t)&&(IL(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),_2(t)?this.createCustomElementClone(t):t},r.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return UT(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){(!rg(t)||!uEt(t)&&!t.hasAttribute(g$)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!rg(t)||!y2(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(rg(a)&&d$(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(u$(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&rg(e)&&(xL(e)||mw(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&&xL(i)&&(this.clonedReferenceElement=i),zR(i)&&BEt(i);var A=this.counters.parse(new n2(this.context,a)),l=this.resolvePseudoContent(e,i,o,my.BEFORE);_2(e)&&(t=!0),m2(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var u=this.resolvePseudoContent(e,i,s,my.AFTER);return u&&i.appendChild(u),this.counters.pop(A),(a&&(this.options.copyStyles||mw(e))&&!f$(e)||t)&&UT(a,i),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(NE(e)||PE(e))&&(NE(i)||PE(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 n2(this.context,n));var A=new owt(this.context,n),l=s.createElement("html2canvaspseudoelement");UT(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(En);f.length&&l.appendChild(s.createTextNode(e.getAttribute(f[0].value)||""))}else if(c.name==="counter"){var d=c.values.filter(Gg),g=d[0],m=d[1];if(g&&En(g)){var v=a.counters.getCounterValue(g.value),y=m&&En(m)?BL.parse(a.context,m.value):3;l.appendChild(s.createTextNode(r0(v,y,!1)))}}else if(c.name==="counters"){var w=c.values.filter(Gg),g=w[0],C=w[1],m=w[2];if(g&&En(g)){var O=a.counters.getCounterValues(g.value),F=m&&En(m)?BL.parse(a.context,m.value):3,I=C&&C.type===0?C.value:"",T=O.map(function(x){return r0(x,F,!1)}).join(I);l.appendChild(s.createTextNode(T))}}}else if(c.type===20)switch(c.value){case"open-quote":l.appendChild(s.createTextNode(r2(A.quotes,a.quoteDepth++,!0)));break;case"close-quote":l.appendChild(s.createTextNode(r2(A.quotes,--a.quoteDepth,!1)));break;default:l.appendChild(s.createTextNode(c.value))}}),l.className=LL+" "+OL;var u=i===my.BEFORE?" "+LL:" "+OL;return mw(t)?t.className.baseValue+=u:t.className+=u,l}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r}(),my;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(my||(my={}));var dEt=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(g$,"true"),r.body.appendChild(t),t},pEt=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},gEt=function(r){return Promise.all([].slice.call(r.images,0).map(pEt))},vEt=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)}})},mEt=["all","d","content"],UT=function(r,e){for(var t=r.length-1;t>=0;t--){var n=r.item(t);mEt.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},yEt=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},_Et=function(r,e,t){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||t!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,t)},wEt=function(r){var e=r[0],t=r[1],n=r[2];e.scrollLeft=t,e.scrollTop=n},EEt=":before",CEt=":after",LL="___html2canvas___pseudoelement_before",OL="___html2canvas___pseudoelement_after",S2=`{
|
||
content: "" !important;
|
||
display: none !important;
|
||
}`,BEt=function(r){bEt(r,"."+LL+EEt+S2+`
|
||
.`+OL+CEt+S2)},bEt=function(r,e){var t=r.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,r.appendChild(n)}},v$=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}(),TEt=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)||(QT(e)||LEt(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 so(this,void 0,void 0,function(){var t,n,i,a,o=this;return Ha(this,function(s){switch(s.label){case 0:return t=v$.isSameOrigin(e),n=!DT(e)&&this._options.useCORS===!0&&ma.SUPPORT_CORS_IMAGES&&!t,i=!DT(e)&&!t&&!QT(e)&&typeof this._options.proxy=="string"&&ma.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!DT(e)&&!QT(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,(OEt(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=ma.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}(),SEt=/^data:image\/svg\+xml/i,xEt=/^data:image\/.*;base64,/i,IEt=/^data:image\/.*/i,LEt=function(r){return ma.SUPPORT_SVG_DRAWING||!FEt(r)},DT=function(r){return IEt.test(r)},OEt=function(r){return xEt.test(r)},QT=function(r){return r.substr(0,4)==="blob"},FEt=function(r){return r.substr(-3).toLowerCase()==="svg"||SEt.test(r)},ge=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}(),bp=function(r,e,t){return new ge(r.x+(e.x-r.x)*t,r.y+(e.y-r.y)*t)},O1=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=bp(this.start,this.startControl,e),i=bp(this.startControl,this.endControl,e),a=bp(this.endControl,this.end,e),o=bp(n,i,e),s=bp(i,a,e),A=bp(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}(),Ps=function(r){return r.type===1},REt=function(){function r(e){var t=e.styles,n=e.bounds,i=Vm(t.borderTopLeftRadius,n.width,n.height),a=i[0],o=i[1],s=Vm(t.borderTopRightRadius,n.width,n.height),A=s[0],l=s[1],u=Vm(t.borderBottomRightRadius,n.width,n.height),c=u[0],h=u[1],f=Vm(t.borderBottomLeftRadius,n.width,n.height),d=f[0],g=f[1],m=[];m.push((a+A)/n.width),m.push((d+c)/n.width),m.push((o+g)/n.height),m.push((l+h)/n.height);var v=Math.max.apply(Math,m);v>1&&(a/=v,o/=v,A/=v,l/=v,c/=v,h/=v,d/=v,g/=v);var y=n.width-A,w=n.height-h,C=n.width-c,O=n.height-g,F=t.borderTopWidth,I=t.borderRightWidth,T=t.borderBottomWidth,L=t.borderLeftWidth,N=Ln(t.paddingTop,e.bounds.width),x=Ln(t.paddingRight,e.bounds.width),S=Ln(t.paddingBottom,e.bounds.width),P=Ln(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?kn(n.left+L/3,n.top+F/3,a-L/3,o-F/3,on.TOP_LEFT):new ge(n.left+L/3,n.top+F/3),this.topRightBorderDoubleOuterBox=a>0||o>0?kn(n.left+y,n.top+F/3,A-I/3,l-F/3,on.TOP_RIGHT):new ge(n.left+n.width-I/3,n.top+F/3),this.bottomRightBorderDoubleOuterBox=c>0||h>0?kn(n.left+C,n.top+w,c-I/3,h-T/3,on.BOTTOM_RIGHT):new ge(n.left+n.width-I/3,n.top+n.height-T/3),this.bottomLeftBorderDoubleOuterBox=d>0||g>0?kn(n.left+L/3,n.top+O,d-L/3,g-T/3,on.BOTTOM_LEFT):new ge(n.left+L/3,n.top+n.height-T/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?kn(n.left+L*2/3,n.top+F*2/3,a-L*2/3,o-F*2/3,on.TOP_LEFT):new ge(n.left+L*2/3,n.top+F*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?kn(n.left+y,n.top+F*2/3,A-I*2/3,l-F*2/3,on.TOP_RIGHT):new ge(n.left+n.width-I*2/3,n.top+F*2/3),this.bottomRightBorderDoubleInnerBox=c>0||h>0?kn(n.left+C,n.top+w,c-I*2/3,h-T*2/3,on.BOTTOM_RIGHT):new ge(n.left+n.width-I*2/3,n.top+n.height-T*2/3),this.bottomLeftBorderDoubleInnerBox=d>0||g>0?kn(n.left+L*2/3,n.top+O,d-L*2/3,g-T*2/3,on.BOTTOM_LEFT):new ge(n.left+L*2/3,n.top+n.height-T*2/3),this.topLeftBorderStroke=a>0||o>0?kn(n.left+L/2,n.top+F/2,a-L/2,o-F/2,on.TOP_LEFT):new ge(n.left+L/2,n.top+F/2),this.topRightBorderStroke=a>0||o>0?kn(n.left+y,n.top+F/2,A-I/2,l-F/2,on.TOP_RIGHT):new ge(n.left+n.width-I/2,n.top+F/2),this.bottomRightBorderStroke=c>0||h>0?kn(n.left+C,n.top+w,c-I/2,h-T/2,on.BOTTOM_RIGHT):new ge(n.left+n.width-I/2,n.top+n.height-T/2),this.bottomLeftBorderStroke=d>0||g>0?kn(n.left+L/2,n.top+O,d-L/2,g-T/2,on.BOTTOM_LEFT):new ge(n.left+L/2,n.top+n.height-T/2),this.topLeftBorderBox=a>0||o>0?kn(n.left,n.top,a,o,on.TOP_LEFT):new ge(n.left,n.top),this.topRightBorderBox=A>0||l>0?kn(n.left+y,n.top,A,l,on.TOP_RIGHT):new ge(n.left+n.width,n.top),this.bottomRightBorderBox=c>0||h>0?kn(n.left+C,n.top+w,c,h,on.BOTTOM_RIGHT):new ge(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=d>0||g>0?kn(n.left,n.top+O,d,g,on.BOTTOM_LEFT):new ge(n.left,n.top+n.height),this.topLeftPaddingBox=a>0||o>0?kn(n.left+L,n.top+F,Math.max(0,a-L),Math.max(0,o-F),on.TOP_LEFT):new ge(n.left+L,n.top+F),this.topRightPaddingBox=A>0||l>0?kn(n.left+Math.min(y,n.width-I),n.top+F,y>n.width+I?0:Math.max(0,A-I),Math.max(0,l-F),on.TOP_RIGHT):new ge(n.left+n.width-I,n.top+F),this.bottomRightPaddingBox=c>0||h>0?kn(n.left+Math.min(C,n.width-L),n.top+Math.min(w,n.height-T),Math.max(0,c-I),Math.max(0,h-T),on.BOTTOM_RIGHT):new ge(n.left+n.width-I,n.top+n.height-T),this.bottomLeftPaddingBox=d>0||g>0?kn(n.left+L,n.top+Math.min(O,n.height-T),Math.max(0,d-L),Math.max(0,g-T),on.BOTTOM_LEFT):new ge(n.left+L,n.top+n.height-T),this.topLeftContentBox=a>0||o>0?kn(n.left+L+P,n.top+F+N,Math.max(0,a-(L+P)),Math.max(0,o-(F+N)),on.TOP_LEFT):new ge(n.left+L+P,n.top+F+N),this.topRightContentBox=A>0||l>0?kn(n.left+Math.min(y,n.width+L+P),n.top+F+N,y>n.width+L+P?0:A-L+P,l-(F+N),on.TOP_RIGHT):new ge(n.left+n.width-(I+x),n.top+F+N),this.bottomRightContentBox=c>0||h>0?kn(n.left+Math.min(C,n.width-(L+P)),n.top+Math.min(w,n.height+F+N),Math.max(0,c-(I+x)),h-(T+S),on.BOTTOM_RIGHT):new ge(n.left+n.width-(I+x),n.top+n.height-(T+S)),this.bottomLeftContentBox=d>0||g>0?kn(n.left+L+P,n.top+O,Math.max(0,d-(L+P)),g-(T+S),on.BOTTOM_LEFT):new ge(n.left+L+P,n.top+n.height-(T+S))}return r}(),on;(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"})(on||(on={}));var kn=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 on.TOP_LEFT:return new O1(new ge(r,l),new ge(r,l-s),new ge(A-o,e),new ge(A,e));case on.TOP_RIGHT:return new O1(new ge(r,e),new ge(r+o,e),new ge(A,l-s),new ge(A,l));case on.BOTTOM_RIGHT:return new O1(new ge(A,e),new ge(A,e+s),new ge(r+o,l),new ge(r,l));case on.BOTTOM_LEFT:default:return new O1(new ge(A,l),new ge(A-o,l),new ge(r,e+s),new ge(r,e))}},UE=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},MEt=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},DE=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},NEt=function(){function r(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return r}(),F1=function(){function r(e,t){this.path=e,this.target=t,this.type=1}return r}(),PEt=function(){function r(e){this.opacity=e,this.type=2,this.target=6}return r}(),UEt=function(r){return r.type===0},m$=function(r){return r.type===1},DEt=function(r){return r.type===2},x2=function(r,e){return r.length===e.length?r.some(function(t,n){return t===e[n]}):!1},QEt=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})},y$=function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),_$=function(){function r(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new REt(this.container),this.container.styles.opacity<1&&this.effects.push(new PEt(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 NEt(n,i,a))}if(this.container.styles.overflowX!==0){var o=UE(this.curves),s=DE(this.curves);x2(o,s)?this.effects.push(new F1(o,6)):(this.effects.push(new F1(o,2)),this.effects.push(new F1(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!m$(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=UE(n.curves),s=DE(n.curves);x2(o,s)||i.unshift(new F1(s,6))}}else i.unshift.apply(i,a);n=n.parent}return i.filter(function(A){return Ki(A.target,e)})},r}(),FL=function(r,e,t,n){r.container.elements.forEach(function(i){var a=Ki(i.flags,4),o=Ki(i.flags,2),s=new _$(i,r);Ki(i.styles.display,2048)&&n.push(s);var A=Ki(i.flags,8)?[]:n;if(a||o){var l=a||i.styles.isPositioned()?t:e,u=new y$(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(d,g){return c>d.element.container.styles.zIndex.order?(h=g,!1):h>0}),l.negativeZIndex.splice(h,0,u)}else if(c>0){var f=0;l.positiveZIndex.some(function(d,g){return c>=d.element.container.styles.zIndex.order?(f=g+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);FL(s,u,a?u:t,A)}else i.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),FL(s,e,t,A);Ki(i.flags,8)&&w$(i,A)})},w$=function(r,e){for(var t=r instanceof SL?r.start:1,n=r instanceof SL?r.reversed:!1,i=0;i<e.length;i++){var a=e[i];a.container instanceof i$&&typeof a.container.value=="number"&&a.container.value!==0&&(t=a.container.value),a.listValue=r0(t,a.container.styles.listStyleType,!0),t+=n?-1:1}},kEt=function(r){var e=new _$(r,null),t=new y$(e),n=[];return FL(e,t,t,n),w$(e.container,n),t},I2=function(r,e){switch(e){case 0:return Qs(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return Qs(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return Qs(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return Qs(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},HEt=function(r,e){switch(e){case 0:return Qs(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return Qs(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return Qs(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return Qs(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},GEt=function(r,e){switch(e){case 0:return Qs(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return Qs(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return Qs(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return Qs(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},$Et=function(r,e){switch(e){case 0:return R1(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return R1(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return R1(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return R1(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},R1=function(r,e){var t=[];return Ps(r)?t.push(r.subdivide(.5,!1)):t.push(r),Ps(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Qs=function(r,e,t,n){var i=[];return Ps(r)?i.push(r.subdivide(.5,!1)):i.push(r),Ps(t)?i.push(t.subdivide(.5,!0)):i.push(t),Ps(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),Ps(e)?i.push(e.subdivide(.5,!1).reverse()):i.push(e),i},E$=function(r){var e=r.bounds,t=r.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},QE=function(r){var e=r.styles,t=r.bounds,n=Ln(e.paddingLeft,t.width),i=Ln(e.paddingRight,t.width),a=Ln(e.paddingTop,t.width),o=Ln(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))},VEt=function(r,e){return r===0?e.bounds:r===2?QE(e):E$(e)},jEt=function(r,e){return r===0?e.bounds:r===2?QE(e):E$(e)},kT=function(r,e,t){var n=VEt(Vp(r.styles.backgroundOrigin,e),r),i=jEt(Vp(r.styles.backgroundClip,e),r),a=KEt(Vp(r.styles.backgroundSize,e),t,n),o=a[0],s=a[1],A=Vm(Vp(r.styles.backgroundPosition,e),n.width-o,n.height-s),l=WEt(Vp(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]},Tp=function(r){return En(r)&&r.value===_g.AUTO},M1=function(r){return typeof r=="number"},KEt=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(Ui(o)&&s&&Ui(s))return[Ln(o,t.width),Ln(s,t.height)];var A=M1(a);if(En(o)&&(o.value===_g.CONTAIN||o.value===_g.COVER)){if(M1(a)){var l=t.width/t.height;return l<a!=(o.value===_g.COVER)?[t.width,t.width/a]:[t.height*a,t.height]}return[t.width,t.height]}var u=M1(n),c=M1(i),h=u||c;if(Tp(o)&&(!s||Tp(s))){if(u&&c)return[n,i];if(!A&&!h)return[t.width,t.height];if(h&&A){var f=u?n:i*a,d=c?i:n/a;return[f,d]}var g=u?n:t.width,m=c?i:t.height;return[g,m]}if(A){var v=0,y=0;return Ui(o)?v=Ln(o,t.width):Ui(s)&&(y=Ln(s,t.height)),Tp(o)?v=y*a:(!s||Tp(s))&&(y=v/a),[v,y]}var w=null,C=null;if(Ui(o)?w=Ln(o,t.width):s&&Ui(s)&&(C=Ln(s,t.height)),w!==null&&(!s||Tp(s))&&(C=u&&c?w/n*i:t.height),C!==null&&Tp(o)&&(w=u&&c?C/i*n:t.width),w!==null&&C!==null)return[w,C];throw new Error("Unable to calculate background-size for element")},Vp=function(r,e){var t=r[e];return typeof t>"u"?r[0]:t},WEt=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 ge(Math.round(n.left),Math.round(n.top+o)),new ge(Math.round(n.left+n.width),Math.round(n.top+o)),new ge(Math.round(n.left+n.width),Math.round(A+n.top+o)),new ge(Math.round(n.left),Math.round(A+n.top+o))];case 3:return[new ge(Math.round(n.left+a),Math.round(n.top)),new ge(Math.round(n.left+a+s),Math.round(n.top)),new ge(Math.round(n.left+a+s),Math.round(n.height+n.top)),new ge(Math.round(n.left+a),Math.round(n.height+n.top))];case 1:return[new ge(Math.round(n.left+a),Math.round(n.top+o)),new ge(Math.round(n.left+a+s),Math.round(n.top+o)),new ge(Math.round(n.left+a+s),Math.round(n.top+o+A)),new ge(Math.round(n.left+a),Math.round(n.top+o+A))];default:return[new ge(Math.round(i.left),Math.round(i.top)),new ge(Math.round(i.left+i.width),Math.round(i.top)),new ge(Math.round(i.left+i.width),Math.round(i.height+i.top)),new ge(Math.round(i.left),Math.round(i.height+i.top))]}},zEt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",L2="Hidden Text",YEt=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=zEt,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(L2)),n.appendChild(a),n.appendChild(i);var s=i.offsetTop-a.offsetTop+2;n.removeChild(a),n.appendChild(this._document.createTextNode(L2)),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}(),C$=function(){function r(e,t){this.context=e,this.options=t}return r}(),XEt=1e4,qEt=function(r){LA(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 YEt(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(),DEt(t)&&(this.ctx.globalAlpha=t.opacity),UEt(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)),m$(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 so(this,void 0,void 0,function(){var n;return Ha(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 so(this,void 0,void 0,function(){return Ha(this,function(n){switch(n.label){case 0:if(Ki(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=KR(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=rCt(t.fontFamily).join(", "),a=G0(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 so(this,void 0,void 0,function(){var i,a,o,s,A,l,u,c,h=this;return Ha(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(d){c.forEach(function(g){switch(g){case 0:h.ctx.fillStyle=ia(n.color),h.renderTextWithLetterSpacing(d,n.letterSpacing,l);var m=n.textShadow;m.length&&d.text.trim().length&&(m.slice(0).reverse().forEach(function(v){h.ctx.shadowColor=ia(v.color),h.ctx.shadowOffsetX=v.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=v.offsetY.number*h.options.scale,h.ctx.shadowBlur=v.blur.number,h.renderTextWithLetterSpacing(d,n.letterSpacing,l)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),n.textDecorationLine.length&&(h.ctx.fillStyle=ia(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(v){switch(v){case 1:h.ctx.fillRect(d.bounds.left,Math.round(d.bounds.top+l),d.bounds.width,1);break;case 2:h.ctx.fillRect(d.bounds.left,Math.round(d.bounds.top),d.bounds.width,1);break;case 3:h.ctx.fillRect(d.bounds.left,Math.ceil(d.bounds.top+u),d.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&d.text.trim().length&&(h.ctx.strokeStyle=ia(n.webkitTextStrokeColor),h.ctx.lineWidth=n.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(d.text,d.bounds.left,d.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=QE(t),o=DE(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 so(this,void 0,void 0,function(){var n,i,a,o,s,A,y,y,l,u,c,h,C,f,d,O,g,m,v,y,w,C,O;return Ha(this,function(F){switch(F.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,i=t.curves,a=n.styles,o=0,s=n.textNodes,F.label=1;case 1:return o<s.length?(A=s[o],[4,this.renderTextNode(A,a)]):[3,4];case 2:F.sent(),F.label=3;case 3:return o++,[3,1];case 4:if(!(n instanceof e$))return[3,8];F.label=5;case 5:return F.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return y=F.sent(),this.renderReplacedElement(n,i,y),[3,8];case 7:return F.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof r$&&this.renderReplacedElement(n,i,n.canvas),!(n instanceof n$))return[3,12];F.label=9;case 9:return F.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return y=F.sent(),this.renderReplacedElement(n,i,y),[3,12];case 11:return F.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof s$&&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=F.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),F.label=14;case 14:if(n instanceof WR&&(c=Math.min(n.bounds.width,n.bounds.height),n.type===RE?n.checked&&(this.ctx.save(),this.path([new ge(n.bounds.left+c*.39363,n.bounds.top+c*.79),new ge(n.bounds.left+c*.16,n.bounds.top+c*.5549),new ge(n.bounds.left+c*.27347,n.bounds.top+c*.44071),new ge(n.bounds.left+c*.39694,n.bounds.top+c*.5649),new ge(n.bounds.left+c*.72983,n.bounds.top+c*.23),new ge(n.bounds.left+c*.84,n.bounds.top+c*.34085),new ge(n.bounds.left+c*.39363,n.bounds.top+c*.79)]),this.ctx.fillStyle=ia(v2),this.ctx.fill(),this.ctx.restore()):n.type===ME&&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=ia(v2),this.ctx.fill(),this.ctx.restore())),ZEt(n)&&n.value.length){switch(h=this.createFontStyle(a),C=h[0],f=h[1],d=this.fontMetrics.getMetrics(C,f).baseline,this.ctx.font=C,this.ctx.fillStyle=ia(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=tCt(n.styles.textAlign),O=QE(n),g=0,n.styles.textAlign){case 1:g+=O.width/2;break;case 2:g+=O.width;break}m=O.add(g,0,0,-O.height/2+1),this.ctx.save(),this.path([new ge(O.left,O.top),new ge(O.left+O.width,O.top),new ge(O.left+O.width,O.top+O.height),new ge(O.left,O.top+O.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new vy(n.value,m),a.letterSpacing,d),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ki(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(v=n.styles.listStyleImage,v.type!==0)return[3,18];y=void 0,w=v.url,F.label=15;case 15:return F.trys.push([15,17,,18]),[4,this.context.cache.match(w)];case 16:return y=F.sent(),this.ctx.drawImage(y,n.bounds.left-(y.width+10),n.bounds.top),[3,18];case 17:return F.sent(),this.context.logger.error("Error loading list-style-image "+w),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==-1&&(C=this.createFontStyle(a)[0],this.ctx.font=C,this.ctx.fillStyle=ia(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",O=new Bu(n.bounds.left,n.bounds.top+Ln(n.styles.paddingTop,n.bounds.width),n.bounds.width,t2(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new vy(t.listValue,O),a.letterSpacing,t2(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),F.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return so(this,void 0,void 0,function(){var n,i,v,a,o,v,s,A,v,l,u,v,c,h,v,f,d,v,g,m,v;return Ha(this,function(y){switch(y.label){case 0:if(Ki(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:y.sent(),n=0,i=t.negativeZIndex,y.label=2;case 2:return n<i.length?(v=i[n],[4,this.renderStack(v)]):[3,5];case 3:y.sent(),y.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:y.sent(),a=0,o=t.nonInlineLevel,y.label=7;case 7:return a<o.length?(v=o[a],[4,this.renderNode(v)]):[3,10];case 8:y.sent(),y.label=9;case 9:return a++,[3,7];case 10:s=0,A=t.nonPositionedFloats,y.label=11;case 11:return s<A.length?(v=A[s],[4,this.renderStack(v)]):[3,14];case 12:y.sent(),y.label=13;case 13:return s++,[3,11];case 14:l=0,u=t.nonPositionedInlineLevel,y.label=15;case 15:return l<u.length?(v=u[l],[4,this.renderStack(v)]):[3,18];case 16:y.sent(),y.label=17;case 17:return l++,[3,15];case 18:c=0,h=t.inlineLevel,y.label=19;case 19:return c<h.length?(v=h[c],[4,this.renderNode(v)]):[3,22];case 20:y.sent(),y.label=21;case 21:return c++,[3,19];case 22:f=0,d=t.zeroOrAutoZIndexOrTransformedOrOpacity,y.label=23;case 23:return f<d.length?(v=d[f],[4,this.renderStack(v)]):[3,26];case 24:y.sent(),y.label=25;case 25:return f++,[3,23];case 26:g=0,m=t.positiveZIndex,y.label=27;case 27:return g<m.length?(v=m[g],[4,this.renderStack(v)]):[3,30];case 28:y.sent(),y.label=29;case 29:return g++,[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=Ps(i)?i.start:i;a===0?n.ctx.moveTo(o.x,o.y):n.ctx.lineTo(o.x,o.y),Ps(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 so(this,void 0,void 0,function(){var n,i,a,o,s,A;return Ha(this,function(l){switch(l.label){case 0:n=t.styles.backgroundImage.length-1,i=function(u){var c,h,f,N,q,rt,P,U,T,d,N,q,rt,P,U,g,m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct,Tt,M,W,Y,H;return Ha(this,function(J){switch(J.label){case 0:if(u.type!==0)return[3,5];c=void 0,h=u.url,J.label=1;case 1:return J.trys.push([1,3,,4]),[4,a.context.cache.match(h)];case 2:return c=J.sent(),[3,4];case 3:return J.sent(),a.context.logger.error("Error loading background-image "+h),[3,4];case 4:return c&&(f=kT(t,n,[c.width,c.height,c.width/c.height]),N=f[0],q=f[1],rt=f[2],P=f[3],U=f[4],T=a.ctx.createPattern(a.resizeImage(c,P,U),"repeat"),a.renderRepeat(N,T,q,rt)),[3,6];case 5:U_t(u)?(d=kT(t,n,[null,null,null]),N=d[0],q=d[1],rt=d[2],P=d[3],U=d[4],g=F_t(u.angle,P,U),m=g[0],v=g[1],y=g[2],w=g[3],C=g[4],O=document.createElement("canvas"),O.width=P,O.height=U,F=O.getContext("2d"),I=F.createLinearGradient(v,w,y,C),ZU(u.stops,m).forEach(function(ot){return I.addColorStop(ot.stop,ia(ot.color))}),F.fillStyle=I,F.fillRect(0,0,P,U),P>0&&U>0&&(T=a.ctx.createPattern(O,"repeat"),a.renderRepeat(N,T,q,rt))):D_t(u)&&(L=kT(t,n,[null,null,null]),N=L[0],x=L[1],S=L[2],P=L[3],U=L[4],tt=u.position.length===0?[$R]:u.position,q=Ln(tt[0],P),rt=Ln(tt[tt.length-1],U),nt=R_t(u,q,rt,P,U),At=nt[0],ct=nt[1],At>0&&ct>0&&(Tt=a.ctx.createRadialGradient(x+q,S+rt,0,x+q,S+rt,At),ZU(u.stops,At*2).forEach(function(ot){return Tt.addColorStop(ot.stop,ia(ot.color))}),a.path(N),a.ctx.fillStyle=Tt,At!==ct?(M=t.bounds.left+.5*t.bounds.width,W=t.bounds.top+.5*t.bounds.height,Y=ct/At,H=1/Y,a.ctx.save(),a.ctx.translate(M,W),a.ctx.transform(1,0,0,Y,0,0),a.ctx.translate(-M,-W),a.ctx.fillRect(x,H*(S-W)+W,P,U*H),a.ctx.restore()):a.ctx.fill())),J.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 so(this,void 0,void 0,function(){return Ha(this,function(a){return this.path(I2(i,n)),this.ctx.fillStyle=ia(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,i,a){return so(this,void 0,void 0,function(){var o,s;return Ha(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=HEt(a,i),this.path(o),this.ctx.fillStyle=ia(t),this.ctx.fill(),s=GEt(a,i),this.path(s),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return so(this,void 0,void 0,function(){var n,i,a,o,s,A,l,u,c=this;return Ha(this,function(h){switch(h.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,i=!qc(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=JEt(Vp(n.backgroundClip,0),t.curves),i||n.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),qc(n.backgroundColor)||(this.ctx.fillStyle=ia(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 d=UE(t.curves),g=f.inset?0:XEt,m=QEt(d,-g+(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(d),c.ctx.clip(),c.mask(m)):(c.mask(d),c.ctx.clip(),c.path(m)),c.ctx.shadowOffsetX=f.offsetX.number+g,c.ctx.shadowOffsetY=f.offsetY.number,c.ctx.shadowColor=ia(f.color),c.ctx.shadowBlur=f.blur.number,c.ctx.fillStyle=f.inset?ia(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&&!qc(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 so(this,void 0,void 0,function(){var s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,F,O,F;return Ha(this,function(I){return this.ctx.save(),s=$Et(a,i),A=I2(a,i),o===2&&(this.path(A),this.ctx.clip()),Ps(A[0])?(l=A[0].start.x,u=A[0].start.y):(l=A[0].x,u=A[0].y),Ps(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)),d=n<3?n*3:n*2,g=n<3?n*2:n,o===3&&(d=n,g=n),m=!0,f<=d*2?m=!1:f<=d*2+g?(v=f/(2*d+g),d*=v,g*=v):(y=Math.floor((f+g)/(d+g)),w=(f-y*d)/(y-1),C=(f-(y+1)*d)/y,g=C<=0||Math.abs(g-w)<Math.abs(g-C)?w:C),m&&(o===3?this.ctx.setLineDash([0,d+g]):this.ctx.setLineDash([d,g])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=ia(t),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(Ps(A[0])&&(O=A[3],F=A[0],this.ctx.beginPath(),this.formatPath([new ge(O.end.x,O.end.y),new ge(F.start.x,F.start.y)]),this.ctx.stroke()),Ps(A[1])&&(O=A[1],F=A[2],this.ctx.beginPath(),this.formatPath([new ge(O.end.x,O.end.y),new ge(F.start.x,F.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return so(this,void 0,void 0,function(){var n;return Ha(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ia(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=kEt(t),[4,this.renderStack(n)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(C$),ZEt=function(r){return r instanceof o$||r instanceof a$?!0:r instanceof WR&&r.type!==ME&&r.type!==RE},JEt=function(r,e){switch(r){case 0:return UE(e);case 2:return MEt(e);case 1:default:return DE(e)}},tCt=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},eCt=["-apple-system","system-ui"],rCt=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(e){return eCt.indexOf(e)===-1}):r},nCt=function(r){LA(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 so(this,void 0,void 0,function(){var n,i;return Ha(this,function(a){switch(a.label){case 0:return n=TL(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,iCt(n)];case 1:return i=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ia(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}(C$),iCt=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))})},aCt=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,h1([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,h1([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,h1([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,h1([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.instances={},r}(),oCt=function(){function r(e,t){var n;this.windowBounds=t,this.instanceName="#"+r.instanceCount++,this.logger=new aCt({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new TEt(this,e)}return r.instanceCount=1,r}(),sCt=function(r,e){return e===void 0&&(e={}),ACt(r,e)};typeof window<"u"&&v$.setContext(window);var ACt=function(r,e){return so(void 0,void 0,void 0,function(){var t,n,i,a,o,s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,I,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct,Tt,M,W,Y;return Ha(this,function(H){switch(H.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:(L=e.imageTimeout)!==null&&L!==void 0?L:15e3,proxy:e.proxy,useCORS:(N=e.useCORS)!==null&&N!==void 0?N:!1},a=cL({logging:(x=e.logging)!==null&&x!==void 0?x:!0,cache:e.cache},i),o={windowWidth:(S=e.windowWidth)!==null&&S!==void 0?S:n.innerWidth,windowHeight:(P=e.windowHeight)!==null&&P!==void 0?P:n.innerHeight,scrollX:(U=e.scrollX)!==null&&U!==void 0?U:n.pageXOffset,scrollY:(tt=e.scrollY)!==null&&tt!==void 0?tt:n.pageYOffset},s=new Bu(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),A=new oCt(a,s),l=(q=e.foreignObjectRendering)!==null&&q!==void 0?q:!1,u={allowTaint:(rt=e.allowTaint)!==null&&rt!==void 0?rt:!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 T2(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=H.sent(),d=zR(h)||lEt(h)?Qyt(h.ownerDocument):cB(A,h),g=d.width,m=d.height,v=d.left,y=d.top,w=lCt(A,h,e.backgroundColor),C={canvas:e.canvas,backgroundColor:w,scale:(At=(nt=e.scale)!==null&&nt!==void 0?nt:n.devicePixelRatio)!==null&&At!==void 0?At:1,x:((ct=e.x)!==null&&ct!==void 0?ct:0)+v,y:((Tt=e.y)!==null&&Tt!==void 0?Tt:0)+y,width:(M=e.width)!==null&&M!==void 0?M:Math.ceil(g),height:(W=e.height)!==null&&W!==void 0?W:Math.ceil(m)},l?(A.logger.debug("Document cloned, using foreign object rendering"),I=new nCt(A,C),[4,I.render(h)]):[3,3];case 2:return O=H.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+v+","+y+" with size "+g+"x"+m+" using computed rendering"),A.logger.debug("Starting DOM parsing"),F=l$(A,h),w===F.styles.backgroundColor&&(F.styles.backgroundColor=mu.TRANSPARENT),A.logger.debug("Starting renderer for element at "+C.x+","+C.y+" with size "+C.width+"x"+C.height),I=new qEt(A,C),[4,I.render(F)];case 4:O=H.sent(),H.label=5;case 5:return(!((Y=e.removeContainer)!==null&&Y!==void 0)||Y)&&(T2.destroy(f)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,O]}})})},lCt=function(r,e,t){var n=e.ownerDocument,i=n.documentElement?py(r,getComputedStyle(n.documentElement).backgroundColor):mu.TRANSPARENT,a=n.body?py(r,getComputedStyle(n.body).backgroundColor):mu.TRANSPARENT,o=typeof t=="string"?py(r,t):t===null?mu.TRANSPARENT:4294967295;return e===n.documentElement?qc(i)?qc(a)?o:a:i:o},uCt=Object.freeze(Object.defineProperty({__proto__:null,default:sCt},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 cCt(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 hCt=Object.hasOwnProperty,O2=Object.setPrototypeOf,fCt=Object.isFrozen,dCt=Object.getPrototypeOf,pCt=Object.getOwnPropertyDescriptor,Co=Object.freeze,bu=Object.seal,gCt=Object.create,B$=typeof Reflect<"u"&&Reflect,kE=B$.apply,RL=B$.construct;kE||(kE=function(e,t,n){return e.apply(t,n)});Co||(Co=function(e){return e});bu||(bu=function(e){return e});RL||(RL=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(cCt(t))))});var vCt=EA(Array.prototype.forEach),F2=EA(Array.prototype.pop),_m=EA(Array.prototype.push),yw=EA(String.prototype.toLowerCase),R2=EA(String.prototype.match),mc=EA(String.prototype.replace),mCt=EA(String.prototype.indexOf),yCt=EA(String.prototype.trim),ls=EA(RegExp.prototype.test),HT=_Ct(TypeError);function EA(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 kE(r,e,n)}}function _Ct(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return RL(r,t)}}function Sr(r,e){O2&&O2(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=yw(n);i!==n&&(fCt(e)||(e[t]=i),n=i)}r[n]=!0}return r}function Af(r){var e=gCt(null),t=void 0;for(t in r)kE(hCt,r,[t])&&(e[t]=r[t]);return e}function N1(r,e){for(;r!==null;){var t=pCt(r,e);if(t){if(t.get)return EA(t.get);if(typeof t.value=="function")return EA(t.value)}r=dCt(r)}function n(i){return console.warn("fallback value for",i),null}return n}var M2=Co(["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"]),GT=Co(["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"]),$T=Co(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wCt=Co(["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"]),VT=Co(["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"]),ECt=Co(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N2=Co(["#text"]),P2=Co(["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"]),jT=Co(["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"]),U2=Co(["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"]),P1=Co(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),CCt=bu(/\{\{[\s\S]*|[\s\S]*\}\}/gm),BCt=bu(/<%[\s\S]*|[\s\S]*%>/gm),bCt=bu(/^data-[\-\w.\u00B7-\uFFFF]/),TCt=bu(/^aria-[\-\w]+$/),SCt=bu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xCt=bu(/^(?:\w+script|data):/i),ICt=bu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wm=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 YA(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 LCt=function(){return typeof window>"u"?null:window},OCt=function(e,t){if((typeof e>"u"?"undefined":Wm(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 b$(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:LCt(),e=function(_t){return b$(_t)};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,d=s.prototype,g=N1(d,"cloneNode"),m=N1(d,"nextSibling"),v=N1(d,"childNodes"),y=N1(d,"parentNode");if(typeof a=="function"){var w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}var C=OCt(f,t),O=C?C.createHTML(""):"",F=n,I=F.implementation,T=F.createNodeIterator,L=F.createDocumentFragment,N=F.getElementsByTagName,x=t.importNode,S={};try{S=Af(n).documentMode?n.documentMode:{}}catch{}var P={};e.isSupported=typeof y=="function"&&I&&typeof I.createHTMLDocument<"u"&&S!==9;var U=CCt,tt=BCt,q=bCt,rt=TCt,nt=xCt,At=ICt,ct=SCt,Tt=null,M=Sr({},[].concat(YA(M2),YA(GT),YA($T),YA(VT),YA(N2))),W=null,Y=Sr({},[].concat(YA(P2),YA(jT),YA(U2),YA(P1))),H=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}})),J=null,ot=null,ut=!0,X=!0,It=!1,at=!1,j=!1,Z=!1,ft=!1,it=!1,V=!1,Ft=!1,Mt=!0,Et=!0,Bt=!1,Ct={},Rt=null,Nt=Sr({},["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"]),Dt=null,Wt=Sr({},["audio","video","img","source","image","track"]),te=null,Ae=Sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml",qt=fe,nr=!1,ke=void 0,wr=["application/xhtml+xml","text/html"],Ne="text/html",Pe=void 0,Gr=null,se=n.createElement("form"),fi=function(_t){return _t instanceof RegExp||_t instanceof Function},gr=function(_t){Gr&&Gr===_t||((!_t||(typeof _t>"u"?"undefined":Wm(_t))!=="object")&&(_t={}),_t=Af(_t),Tt="ALLOWED_TAGS"in _t?Sr({},_t.ALLOWED_TAGS):M,W="ALLOWED_ATTR"in _t?Sr({},_t.ALLOWED_ATTR):Y,te="ADD_URI_SAFE_ATTR"in _t?Sr(Af(Ae),_t.ADD_URI_SAFE_ATTR):Ae,Dt="ADD_DATA_URI_TAGS"in _t?Sr(Af(Wt),_t.ADD_DATA_URI_TAGS):Wt,Rt="FORBID_CONTENTS"in _t?Sr({},_t.FORBID_CONTENTS):Nt,J="FORBID_TAGS"in _t?Sr({},_t.FORBID_TAGS):{},ot="FORBID_ATTR"in _t?Sr({},_t.FORBID_ATTR):{},Ct="USE_PROFILES"in _t?_t.USE_PROFILES:!1,ut=_t.ALLOW_ARIA_ATTR!==!1,X=_t.ALLOW_DATA_ATTR!==!1,It=_t.ALLOW_UNKNOWN_PROTOCOLS||!1,at=_t.SAFE_FOR_TEMPLATES||!1,j=_t.WHOLE_DOCUMENT||!1,it=_t.RETURN_DOM||!1,V=_t.RETURN_DOM_FRAGMENT||!1,Ft=_t.RETURN_TRUSTED_TYPE||!1,ft=_t.FORCE_BODY||!1,Mt=_t.SANITIZE_DOM!==!1,Et=_t.KEEP_CONTENT!==!1,Bt=_t.IN_PLACE||!1,ct=_t.ALLOWED_URI_REGEXP||ct,qt=_t.NAMESPACE||fe,_t.CUSTOM_ELEMENT_HANDLING&&fi(_t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=_t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_t.CUSTOM_ELEMENT_HANDLING&&fi(_t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=_t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_t.CUSTOM_ELEMENT_HANDLING&&typeof _t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=_t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke=wr.indexOf(_t.PARSER_MEDIA_TYPE)===-1?ke=Ne:ke=_t.PARSER_MEDIA_TYPE,Pe=ke==="application/xhtml+xml"?function($t){return $t}:yw,at&&(X=!1),V&&(it=!0),Ct&&(Tt=Sr({},[].concat(YA(N2))),W=[],Ct.html===!0&&(Sr(Tt,M2),Sr(W,P2)),Ct.svg===!0&&(Sr(Tt,GT),Sr(W,jT),Sr(W,P1)),Ct.svgFilters===!0&&(Sr(Tt,$T),Sr(W,jT),Sr(W,P1)),Ct.mathMl===!0&&(Sr(Tt,VT),Sr(W,U2),Sr(W,P1))),_t.ADD_TAGS&&(Tt===M&&(Tt=Af(Tt)),Sr(Tt,_t.ADD_TAGS)),_t.ADD_ATTR&&(W===Y&&(W=Af(W)),Sr(W,_t.ADD_ATTR)),_t.ADD_URI_SAFE_ATTR&&Sr(te,_t.ADD_URI_SAFE_ATTR),_t.FORBID_CONTENTS&&(Rt===Nt&&(Rt=Af(Rt)),Sr(Rt,_t.FORBID_CONTENTS)),Et&&(Tt["#text"]=!0),j&&Sr(Tt,["html","head","body"]),Tt.table&&(Sr(Tt,["tbody"]),delete J.tbody),Co&&Co(_t),Gr=_t)},ei=Sr({},["mi","mo","mn","ms","mtext"]),Wr=Sr({},["foreignobject","desc","title","annotation-xml"]),zr=Sr({},GT);Sr(zr,$T),Sr(zr,wCt);var He=Sr({},VT);Sr(He,ECt);var Ir=function(_t){var $t=y(_t);(!$t||!$t.tagName)&&($t={namespaceURI:fe,tagName:"template"});var ne=yw(_t.tagName),Je=yw($t.tagName);if(_t.namespaceURI===Jt)return $t.namespaceURI===fe?ne==="svg":$t.namespaceURI===oe?ne==="svg"&&(Je==="annotation-xml"||ei[Je]):Boolean(zr[ne]);if(_t.namespaceURI===oe)return $t.namespaceURI===fe?ne==="math":$t.namespaceURI===Jt?ne==="math"&&Wr[Je]:Boolean(He[ne]);if(_t.namespaceURI===fe){if($t.namespaceURI===Jt&&!Wr[Je]||$t.namespaceURI===oe&&!ei[Je])return!1;var Lr=Sr({},["title","style","font","a","script"]);return!He[ne]&&(Lr[ne]||!zr[ne])}return!1},$n=function(_t){_m(e.removed,{element:_t});try{_t.parentNode.removeChild(_t)}catch{try{_t.outerHTML=O}catch{_t.remove()}}},yn=function(_t,$t){try{_m(e.removed,{attribute:$t.getAttributeNode(_t),from:$t})}catch{_m(e.removed,{attribute:null,from:$t})}if($t.removeAttribute(_t),_t==="is"&&!W[_t])if(it||V)try{$n($t)}catch{}else try{$t.setAttribute(_t,"")}catch{}},di=function(_t){var $t=void 0,ne=void 0;if(ft)_t="<remove></remove>"+_t;else{var Je=R2(_t,/^[\r\n\t ]+/);ne=Je&&Je[0]}ke==="application/xhtml+xml"&&(_t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_t+"</body></html>");var Lr=C?C.createHTML(_t):_t;if(qt===fe)try{$t=new h().parseFromString(Lr,ke)}catch{}if(!$t||!$t.documentElement){$t=I.createDocument(qt,"template",null);try{$t.documentElement.innerHTML=nr?"":Lr}catch{}}var hn=$t.body||$t.documentElement;return _t&&ne&&hn.insertBefore(n.createTextNode(ne),hn.childNodes[0]||null),qt===fe?N.call($t,j?"html":"body")[0]:j?$t.documentElement:hn},pi=function(_t){return T.call(_t.ownerDocument||_t,_t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT,null,!1)},Ue=function(_t){return _t instanceof c&&(typeof _t.nodeName!="string"||typeof _t.textContent!="string"||typeof _t.removeChild!="function"||!(_t.attributes instanceof u)||typeof _t.removeAttribute!="function"||typeof _t.setAttribute!="function"||typeof _t.namespaceURI!="string"||typeof _t.insertBefore!="function")},ri=function(_t){return(typeof o>"u"?"undefined":Wm(o))==="object"?_t instanceof o:_t&&(typeof _t>"u"?"undefined":Wm(_t))==="object"&&typeof _t.nodeType=="number"&&typeof _t.nodeName=="string"},Cn=function(_t,$t,ne){P[_t]&&vCt(P[_t],function(Je){Je.call(e,$t,ne,Gr)})},gi=function(_t){var $t=void 0;if(Cn("beforeSanitizeElements",_t,null),Ue(_t)||R2(_t.nodeName,/[\u0080-\uFFFF]/))return $n(_t),!0;var ne=Pe(_t.nodeName);if(Cn("uponSanitizeElement",_t,{tagName:ne,allowedTags:Tt}),!ri(_t.firstElementChild)&&(!ri(_t.content)||!ri(_t.content.firstElementChild))&&ls(/<[/\w]/g,_t.innerHTML)&&ls(/<[/\w]/g,_t.textContent)||ne==="select"&&ls(/<template/i,_t.innerHTML))return $n(_t),!0;if(!Tt[ne]||J[ne]){if(Et&&!Rt[ne]){var Je=y(_t)||_t.parentNode,Lr=v(_t)||_t.childNodes;if(Lr&&Je)for(var hn=Lr.length,fn=hn-1;fn>=0;--fn)Je.insertBefore(g(Lr[fn],!0),m(_t))}return!J[ne]&&Br(ne)&&(H.tagNameCheck instanceof RegExp&&ls(H.tagNameCheck,ne)||H.tagNameCheck instanceof Function&&H.tagNameCheck(ne))?!1:($n(_t),!0)}return _t instanceof s&&!Ir(_t)||(ne==="noscript"||ne==="noembed")&&ls(/<\/no(script|embed)/i,_t.innerHTML)?($n(_t),!0):(at&&_t.nodeType===3&&($t=_t.textContent,$t=mc($t,U," "),$t=mc($t,tt," "),_t.textContent!==$t&&(_m(e.removed,{element:_t.cloneNode()}),_t.textContent=$t)),Cn("afterSanitizeElements",_t,null),!1)},cn=function(_t,$t,ne){if(Mt&&($t==="id"||$t==="name")&&(ne in n||ne in se))return!1;if(!(X&&!ot[$t]&&ls(q,$t))){if(!(ut&&ls(rt,$t))){if(!W[$t]||ot[$t]){if(!(Br(_t)&&(H.tagNameCheck instanceof RegExp&&ls(H.tagNameCheck,_t)||H.tagNameCheck instanceof Function&&H.tagNameCheck(_t))&&(H.attributeNameCheck instanceof RegExp&&ls(H.attributeNameCheck,$t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck($t))||$t==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&ls(H.tagNameCheck,ne)||H.tagNameCheck instanceof Function&&H.tagNameCheck(ne))))return!1}else if(!te[$t]){if(!ls(ct,mc(ne,At,""))){if(!(($t==="src"||$t==="xlink:href"||$t==="href")&&_t!=="script"&&mCt(ne,"data:")===0&&Dt[_t])){if(!(It&&!ls(nt,mc(ne,At,"")))){if(ne)return!1}}}}}}return!0},Br=function(_t){return _t.indexOf("-")>0},_n=function(_t){var $t=void 0,ne=void 0,Je=void 0,Lr=void 0;Cn("beforeSanitizeAttributes",_t,null);var hn=_t.attributes;if(hn){var fn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W};for(Lr=hn.length;Lr--;){$t=hn[Lr];var Xo=$t,vi=Xo.name,Ws=Xo.namespaceURI;if(ne=yCt($t.value),Je=Pe(vi),fn.attrName=Je,fn.attrValue=ne,fn.keepAttr=!0,fn.forceKeepAttr=void 0,Cn("uponSanitizeAttribute",_t,fn),ne=fn.attrValue,!fn.forceKeepAttr&&(yn(vi,_t),!!fn.keepAttr)){if(ls(/\/>/i,ne)){yn(vi,_t);continue}at&&(ne=mc(ne,U," "),ne=mc(ne,tt," "));var OA=Pe(_t.nodeName);if(cn(OA,Je,ne))try{Ws?_t.setAttributeNS(Ws,vi,ne):_t.setAttribute(vi,ne),F2(e.removed)}catch{}}}Cn("afterSanitizeAttributes",_t,null)}},eo=function de(_t){var $t=void 0,ne=pi(_t);for(Cn("beforeSanitizeShadowDOM",_t,null);$t=ne.nextNode();)Cn("uponSanitizeShadowNode",$t,null),!gi($t)&&($t.content instanceof i&&de($t.content),_n($t));Cn("afterSanitizeShadowDOM",_t,null)};return e.sanitize=function(de,_t){var $t=void 0,ne=void 0,Je=void 0,Lr=void 0,hn=void 0;if(nr=!de,nr&&(de="<!-->"),typeof de!="string"&&!ri(de)){if(typeof de.toString!="function")throw HT("toString is not a function");if(de=de.toString(),typeof de!="string")throw HT("dirty is not a string, aborting")}if(!e.isSupported){if(Wm(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof de=="string")return r.toStaticHTML(de);if(ri(de))return r.toStaticHTML(de.outerHTML)}return de}if(Z||gr(_t),e.removed=[],typeof de=="string"&&(Bt=!1),Bt){if(de.nodeName){var fn=Pe(de.nodeName);if(!Tt[fn]||J[fn])throw HT("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof o)$t=di("<!---->"),ne=$t.ownerDocument.importNode(de,!0),ne.nodeType===1&&ne.nodeName==="BODY"||ne.nodeName==="HTML"?$t=ne:$t.appendChild(ne);else{if(!it&&!at&&!j&&de.indexOf("<")===-1)return C&&Ft?C.createHTML(de):de;if($t=di(de),!$t)return it?null:Ft?O:""}$t&&ft&&$n($t.firstChild);for(var Xo=pi(Bt?de:$t);Je=Xo.nextNode();)Je.nodeType===3&&Je===Lr||gi(Je)||(Je.content instanceof i&&eo(Je.content),_n(Je),Lr=Je);if(Lr=null,Bt)return de;if(it){if(V)for(hn=L.call($t.ownerDocument);$t.firstChild;)hn.appendChild($t.firstChild);else hn=$t;return W.shadowroot&&(hn=x.call(t,hn,!0)),hn}var vi=j?$t.outerHTML:$t.innerHTML;return at&&(vi=mc(vi,U," "),vi=mc(vi,tt," ")),C&&Ft?C.createHTML(vi):vi},e.setConfig=function(de){gr(de),Z=!0},e.clearConfig=function(){Gr=null,Z=!1},e.isValidAttribute=function(de,_t,$t){Gr||gr({});var ne=Pe(de),Je=Pe(_t);return cn(ne,Je,$t)},e.addHook=function(de,_t){typeof _t=="function"&&(P[de]=P[de]||[],_m(P[de],_t))},e.removeHook=function(de){P[de]&&F2(P[de])},e.removeHooks=function(de){P[de]&&(P[de]=[])},e.removeAllHooks=function(){P={}},e}var FCt=b$(),RCt=Object.freeze(Object.defineProperty({__proto__:null,default:FCt},Symbol.toStringTag,{value:"Module"})),U1=function(r){return r&&r.Math==Math&&r},hr=U1(typeof globalThis=="object"&&globalThis)||U1(typeof window=="object"&&window)||U1(typeof self=="object"&&self)||U1(typeof nl=="object"&&nl)||function(){return this}()||Function("return this")(),vv={},Hi=function(r){try{return!!r()}catch{return!0}},MCt=Hi,Du=!MCt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),NCt=Hi,wB=!NCt(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),PCt=wB,D1=Function.prototype.call,Bs=PCt?D1.bind(D1):function(){return D1.apply(D1,arguments)},T$={},S$={}.propertyIsEnumerable,x$=Object.getOwnPropertyDescriptor,UCt=x$&&!S$.call({1:2},1);T$.f=UCt?function(e){var t=x$(this,e);return!!t&&t.enumerable}:S$;var EB=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}},I$=wB,L$=Function.prototype,DCt=L$.bind,ML=L$.call,QCt=I$&&DCt.bind(ML,ML),Rn=I$?function(r){return r&&QCt(r)}:function(r){return r&&function(){return ML.apply(r,arguments)}},O$=Rn,kCt=O$({}.toString),HCt=O$("".slice),mv=function(r){return HCt(kCt(r),8,-1)},GCt=hr,$Ct=Rn,VCt=Hi,jCt=mv,KT=GCt.Object,KCt=$Ct("".split),F$=VCt(function(){return!KT("z").propertyIsEnumerable(0)})?function(r){return jCt(r)=="String"?KCt(r,""):KT(r)}:KT,WCt=hr,zCt=WCt.TypeError,Sl=function(r){if(r==null)throw zCt("Can't call method on "+r);return r},YCt=F$,XCt=Sl,$0=function(r){return YCt(XCt(r))},Ji=function(r){return typeof r=="function"},qCt=Ji,Th=function(r){return typeof r=="object"?r!==null:qCt(r)},WT=hr,ZCt=Ji,JCt=function(r){return ZCt(r)?r:void 0},Md=function(r,e){return arguments.length<2?JCt(WT[r]):WT[r]&&WT[r][e]},tBt=Rn,CB=tBt({}.isPrototypeOf),eBt=Md,BB=eBt("navigator","userAgent")||"",R$=hr,zT=BB,D2=R$.process,Q2=R$.Deno,k2=D2&&D2.versions||Q2&&Q2.version,H2=k2&&k2.v8,cA,HE;H2&&(cA=H2.split("."),HE=cA[0]>0&&cA[0]<4?1:+(cA[0]+cA[1]));!HE&&zT&&(cA=zT.match(/Edge\/(\d+)/),(!cA||cA[1]>=74)&&(cA=zT.match(/Chrome\/(\d+)/),cA&&(HE=+cA[1])));var YR=HE,G2=YR,rBt=Hi,M$=!!Object.getOwnPropertySymbols&&!rBt(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&G2&&G2<41}),nBt=M$,N$=nBt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",iBt=hr,aBt=Md,oBt=Ji,sBt=CB,ABt=N$,lBt=iBt.Object,P$=ABt?function(r){return typeof r=="symbol"}:function(r){var e=aBt("Symbol");return oBt(e)&&sBt(e.prototype,lBt(r))},uBt=hr,cBt=uBt.String,bB=function(r){try{return cBt(r)}catch{return"Object"}},hBt=hr,fBt=Ji,dBt=bB,pBt=hBt.TypeError,yv=function(r){if(fBt(r))return r;throw pBt(dBt(r)+" is not a function")},gBt=yv,_v=function(r,e){var t=r[e];return t==null?void 0:gBt(t)},vBt=hr,YT=Bs,XT=Ji,qT=Th,mBt=vBt.TypeError,yBt=function(r,e){var t,n;if(e==="string"&&XT(t=r.toString)&&!qT(n=YT(t,r))||XT(t=r.valueOf)&&!qT(n=YT(t,r))||e!=="string"&&XT(t=r.toString)&&!qT(n=YT(t,r)))return n;throw mBt("Can't convert object to primitive value")},TB={exports:{}},$2=hr,_Bt=Object.defineProperty,XR=function(r,e){try{_Bt($2,r,{value:e,configurable:!0,writable:!0})}catch{$2[r]=e}return e},wBt=hr,EBt=XR,V2="__core-js_shared__",CBt=wBt[V2]||EBt(V2,{}),qR=CBt,j2=qR;(TB.exports=function(r,e){return j2[r]||(j2[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 BBt=hr,bBt=Sl,TBt=BBt.Object,SB=function(r){return TBt(bBt(r))},SBt=Rn,xBt=SB,IBt=SBt({}.hasOwnProperty),xl=Object.hasOwn||function(e,t){return IBt(xBt(e),t)},LBt=Rn,OBt=0,FBt=Math.random(),RBt=LBt(1 .toString),U$=function(r){return"Symbol("+(r===void 0?"":r)+")_"+RBt(++OBt+FBt,36)},MBt=hr,NBt=TB.exports,K2=xl,PBt=U$,W2=M$,D$=N$,Sp=NBt("wks"),jf=MBt.Symbol,z2=jf&&jf.for,UBt=D$?jf:jf&&jf.withoutSetter||PBt,ca=function(r){if(!K2(Sp,r)||!(W2||typeof Sp[r]=="string")){var e="Symbol."+r;W2&&K2(jf,r)?Sp[r]=jf[r]:D$&&z2?Sp[r]=z2(e):Sp[r]=UBt(e)}return Sp[r]},DBt=hr,QBt=Bs,Y2=Th,X2=P$,kBt=_v,HBt=yBt,GBt=ca,$Bt=DBt.TypeError,VBt=GBt("toPrimitive"),jBt=function(r,e){if(!Y2(r)||X2(r))return r;var t=kBt(r,VBt),n;if(t){if(e===void 0&&(e="default"),n=QBt(t,r,e),!Y2(n)||X2(n))return n;throw $Bt("Can't convert object to primitive value")}return e===void 0&&(e="number"),HBt(r,e)},KBt=jBt,WBt=P$,ZR=function(r){var e=KBt(r,"string");return WBt(e)?e:e+""},zBt=hr,q2=Th,NL=zBt.document,YBt=q2(NL)&&q2(NL.createElement),xB=function(r){return YBt?NL.createElement(r):{}},XBt=Du,qBt=Hi,ZBt=xB,Q$=!XBt&&!qBt(function(){return Object.defineProperty(ZBt("div"),"a",{get:function(){return 7}}).a!=7}),JBt=Du,tbt=Bs,ebt=T$,rbt=EB,nbt=$0,ibt=ZR,abt=xl,obt=Q$,Z2=Object.getOwnPropertyDescriptor;vv.f=JBt?Z2:function(e,t){if(e=nbt(e),t=ibt(t),obt)try{return Z2(e,t)}catch{}if(abt(e,t))return rbt(!tbt(ebt.f,e,t),e[t])};var Qu={},sbt=Du,Abt=Hi,k$=sbt&&Abt(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),H$=hr,lbt=Th,ubt=H$.String,cbt=H$.TypeError,to=function(r){if(lbt(r))return r;throw cbt(ubt(r)+" is not an object")},hbt=hr,fbt=Du,dbt=Q$,pbt=k$,Q1=to,J2=ZR,gbt=hbt.TypeError,ZT=Object.defineProperty,vbt=Object.getOwnPropertyDescriptor,JT="enumerable",tS="configurable",eS="writable";Qu.f=fbt?pbt?function(e,t,n){if(Q1(e),t=J2(t),Q1(n),typeof e=="function"&&t==="prototype"&&"value"in n&&eS in n&&!n[eS]){var i=vbt(e,t);i&&i[eS]&&(e[t]=n.value,n={configurable:tS in n?n[tS]:i[tS],enumerable:JT in n?n[JT]:i[JT],writable:!1})}return ZT(e,t,n)}:ZT:function(e,t,n){if(Q1(e),t=J2(t),Q1(n),dbt)try{return ZT(e,t,n)}catch{}if("get"in n||"set"in n)throw gbt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var mbt=Du,ybt=Qu,_bt=EB,wv=mbt?function(r,e,t){return ybt.f(r,e,_bt(1,t))}:function(r,e,t){return r[e]=t,r},Sh={exports:{}},wbt=Rn,Ebt=Ji,PL=qR,Cbt=wbt(Function.toString);Ebt(PL.inspectSource)||(PL.inspectSource=function(r){return Cbt(r)});var IB=PL.inspectSource,Bbt=hr,bbt=Ji,Tbt=IB,tD=Bbt.WeakMap,Sbt=bbt(tD)&&/native code/.test(Tbt(tD)),xbt=TB.exports,Ibt=U$,eD=xbt("keys"),JR=function(r){return eD[r]||(eD[r]=Ibt(r))},tM={},Lbt=Sbt,G$=hr,rS=Rn,Obt=Th,Fbt=wv,nS=xl,iS=qR,Rbt=JR,Mbt=tM,rD="Object already initialized",UL=G$.TypeError,Nbt=G$.WeakMap,GE,n0,$E,Pbt=function(r){return $E(r)?n0(r):GE(r,{})},Ubt=function(r){return function(e){var t;if(!Obt(e)||(t=n0(e)).type!==r)throw UL("Incompatible receiver, "+r+" required");return t}};if(Lbt||iS.state){var lf=iS.state||(iS.state=new Nbt),Dbt=rS(lf.get),nD=rS(lf.has),Qbt=rS(lf.set);GE=function(r,e){if(nD(lf,r))throw new UL(rD);return e.facade=r,Qbt(lf,r,e),e},n0=function(r){return Dbt(lf,r)||{}},$E=function(r){return nD(lf,r)}}else{var xp=Rbt("state");Mbt[xp]=!0,GE=function(r,e){if(nS(r,xp))throw new UL(rD);return e.facade=r,Fbt(r,xp,e),e},n0=function(r){return nS(r,xp)?r[xp]:{}},$E=function(r){return nS(r,xp)}}var LB={set:GE,get:n0,has:$E,enforce:Pbt,getterFor:Ubt},DL=Du,kbt=xl,$$=Function.prototype,Hbt=DL&&Object.getOwnPropertyDescriptor,eM=kbt($$,"name"),Gbt=eM&&function(){}.name==="something",$bt=eM&&(!DL||DL&&Hbt($$,"name").configurable),OB={EXISTS:eM,PROPER:Gbt,CONFIGURABLE:$bt},Vbt=hr,iD=Ji,jbt=xl,aD=wv,Kbt=XR,Wbt=IB,V$=LB,zbt=OB.CONFIGURABLE,Ybt=V$.get,Xbt=V$.enforce,qbt=String(String).split("String");(Sh.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(iD(t)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!jbt(t,"name")||zbt&&t.name!==s)&&aD(t,"name",s),A=Xbt(t),A.source||(A.source=qbt.join(typeof s=="string"?s:""))),r===Vbt){a?r[e]=t:Kbt(e,t);return}else i?!o&&r[e]&&(a=!0):delete r[e];a?r[e]=t:aD(r,e,t)})(Function.prototype,"toString",function(){return iD(this)&&Ybt(this).source||Wbt(this)});var j$={},Zbt=Math.ceil,Jbt=Math.floor,FB=function(r){var e=+r;return e!==e||e===0?0:(e>0?Jbt:Zbt)(e)},tTt=FB,eTt=Math.max,rTt=Math.min,K$=function(r,e){var t=tTt(r);return t<0?eTt(t+e,0):rTt(t,e)},nTt=FB,iTt=Math.min,Ev=function(r){return r>0?iTt(nTt(r),9007199254740991):0},aTt=Ev,RB=function(r){return aTt(r.length)},oTt=$0,sTt=K$,ATt=RB,oD=function(r){return function(e,t,n){var i=oTt(e),a=ATt(i),o=sTt(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}},W$={includes:oD(!0),indexOf:oD(!1)},lTt=Rn,aS=xl,uTt=$0,cTt=W$.indexOf,hTt=tM,sD=lTt([].push),z$=function(r,e){var t=uTt(r),n=0,i=[],a;for(a in t)!aS(hTt,a)&&aS(t,a)&&sD(i,a);for(;e.length>n;)aS(t,a=e[n++])&&(~cTt(i,a)||sD(i,a));return i},rM=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fTt=z$,dTt=rM,pTt=dTt.concat("length","prototype");j$.f=Object.getOwnPropertyNames||function(e){return fTt(e,pTt)};var Y$={};Y$.f=Object.getOwnPropertySymbols;var gTt=Md,vTt=Rn,mTt=j$,yTt=Y$,_Tt=to,wTt=vTt([].concat),ETt=gTt("Reflect","ownKeys")||function(e){var t=mTt.f(_Tt(e)),n=yTt.f;return n?wTt(t,n(e)):t},AD=xl,CTt=ETt,BTt=vv,bTt=Qu,TTt=function(r,e,t){for(var n=CTt(e),i=bTt.f,a=BTt.f,o=0;o<n.length;o++){var s=n[o];!AD(r,s)&&!(t&&AD(t,s))&&i(r,s,a(e,s))}},STt=Hi,xTt=Ji,ITt=/#|\.prototype\./,V0=function(r,e){var t=OTt[LTt(r)];return t==RTt?!0:t==FTt?!1:xTt(e)?STt(e):!!e},LTt=V0.normalize=function(r){return String(r).replace(ITt,".").toLowerCase()},OTt=V0.data={},FTt=V0.NATIVE="N",RTt=V0.POLYFILL="P",X$=V0,oS=hr,MTt=vv.f,NTt=wv,PTt=Sh.exports,UTt=XR,DTt=TTt,QTt=X$,Il=function(r,e){var t=r.target,n=r.global,i=r.stat,a,o,s,A,l,u;if(n?o=oS:i?o=oS[t]||UTt(t,{}):o=(oS[t]||{}).prototype,o)for(s in e){if(l=e[s],r.noTargetGet?(u=MTt(o,s),A=u&&u.value):A=o[s],a=QTt(n?s:t+(i?".":"#")+s,r.forced),!a&&A!==void 0){if(typeof l==typeof A)continue;DTt(l,A)}(r.sham||A&&A.sham)&&NTt(l,"sham",!0),PTt(o,s,l,r)}},kTt=hr,HTt=kTt.Promise,GTt=Sh.exports,$Tt=function(r,e,t){for(var n in e)GTt(r,n,e[n],t);return r},q$=hr,VTt=Ji,jTt=q$.String,KTt=q$.TypeError,WTt=function(r){if(typeof r=="object"||VTt(r))return r;throw KTt("Can't set "+jTt(r)+" as a prototype")},zTt=Rn,YTt=to,XTt=WTt,Z$=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=zTt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(e,[]),r=e instanceof Array}catch{}return function(i,a){return YTt(i),XTt(a),r?t(i,a):i.__proto__=a,i}}():void 0),qTt=Qu.f,ZTt=xl,JTt=ca,lD=JTt("toStringTag"),nM=function(r,e,t){r&&!t&&(r=r.prototype),r&&!ZTt(r,lD)&&qTt(r,lD,{configurable:!0,value:e})},tSt=Md,eSt=Qu,rSt=ca,nSt=Du,uD=rSt("species"),iSt=function(r){var e=tSt(r),t=eSt.f;nSt&&e&&!e[uD]&&t(e,uD,{configurable:!0,get:function(){return this}})},aSt=hr,oSt=CB,sSt=aSt.TypeError,ASt=function(r,e){if(oSt(e,r))return r;throw sSt("Incorrect invocation")},cD=Rn,lSt=yv,uSt=wB,cSt=cD(cD.bind),iM=function(r,e){return lSt(r),e===void 0?r:uSt?cSt(r,e):function(){return r.apply(e,arguments)}},j0={},hSt=ca,fSt=j0,dSt=hSt("iterator"),pSt=Array.prototype,gSt=function(r){return r!==void 0&&(fSt.Array===r||pSt[dSt]===r)},vSt=ca,mSt=vSt("toStringTag"),J$={};J$[mSt]="z";var ySt=String(J$)==="[object z]",_St=hr,wSt=ySt,ESt=Ji,_w=mv,CSt=ca,BSt=CSt("toStringTag"),bSt=_St.Object,TSt=_w(function(){return arguments}())=="Arguments",SSt=function(r,e){try{return r[e]}catch{}},aM=wSt?_w:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=SSt(e=bSt(r),BSt))=="string"?t:TSt?_w(e):(n=_w(e))=="Object"&&ESt(e.callee)?"Arguments":n},xSt=aM,hD=_v,ISt=j0,LSt=ca,OSt=LSt("iterator"),t9=function(r){if(r!=null)return hD(r,OSt)||hD(r,"@@iterator")||ISt[xSt(r)]},FSt=hr,RSt=Bs,MSt=yv,NSt=to,PSt=bB,USt=t9,DSt=FSt.TypeError,QSt=function(r,e){var t=arguments.length<2?USt(r):e;if(MSt(t))return NSt(RSt(t,r));throw DSt(PSt(r)+" is not iterable")},kSt=Bs,fD=to,HSt=_v,GSt=function(r,e,t){var n,i;fD(r);try{if(n=HSt(r,"return"),!n){if(e==="throw")throw t;return t}n=kSt(n,r)}catch(a){i=!0,n=a}if(e==="throw")throw t;if(i)throw n;return fD(n),t},$St=hr,VSt=iM,jSt=Bs,KSt=to,WSt=bB,zSt=gSt,YSt=RB,dD=CB,XSt=QSt,qSt=t9,pD=GSt,ZSt=$St.TypeError,ww=function(r,e){this.stopped=r,this.result=e},gD=ww.prototype,JSt=function(r,e,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_ITERATOR),o=!!(t&&t.INTERRUPTED),s=VSt(e,n),A,l,u,c,h,f,d,g=function(v){return A&&pD(A,"normal",v),new ww(!0,v)},m=function(v){return i?(KSt(v),o?s(v[0],v[1],g):s(v[0],v[1])):o?s(v,g):s(v)};if(a)A=r;else{if(l=qSt(r),!l)throw ZSt(WSt(r)+" is not iterable");if(zSt(l)){for(u=0,c=YSt(r);c>u;u++)if(h=m(r[u]),h&&dD(gD,h))return h;return new ww(!1)}A=XSt(r,l)}for(f=A.next;!(d=jSt(f,A)).done;){try{h=m(d.value)}catch(v){pD(A,"throw",v)}if(typeof h=="object"&&h&&dD(gD,h))return h}return new ww(!1)},txt=ca,e9=txt("iterator"),r9=!1;try{var ext=0,vD={next:function(){return{done:!!ext++}},return:function(){r9=!0}};vD[e9]=function(){return this},Array.from(vD,function(){throw 2})}catch{}var rxt=function(r,e){if(!e&&!r9)return!1;var t=!1;try{var n={};n[e9]=function(){return{next:function(){return{done:t=!0}}}},r(n)}catch{}return t},nxt=Rn,ixt=Hi,n9=Ji,axt=aM,oxt=Md,sxt=IB,i9=function(){},Axt=[],a9=oxt("Reflect","construct"),oM=/^\s*(?:class|function)\b/,lxt=nxt(oM.exec),uxt=!oM.exec(i9),wm=function(e){if(!n9(e))return!1;try{return a9(i9,Axt,e),!0}catch{return!1}},o9=function(e){if(!n9(e))return!1;switch(axt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return uxt||!!lxt(oM,sxt(e))}catch{return!0}};o9.sham=!0;var cxt=!a9||ixt(function(){var r;return wm(wm.call)||!wm(Object)||!wm(function(){r=!0})||r})?o9:wm,hxt=hr,fxt=cxt,dxt=bB,pxt=hxt.TypeError,gxt=function(r){if(fxt(r))return r;throw pxt(dxt(r)+" is not a constructor")},mD=to,vxt=gxt,mxt=ca,yxt=mxt("species"),s9=function(r,e){var t=mD(r).constructor,n;return t===void 0||(n=mD(t)[yxt])==null?e:vxt(n)},_xt=wB,A9=Function.prototype,yD=A9.apply,_D=A9.call,sM=typeof Reflect=="object"&&Reflect.apply||(_xt?_D.bind(yD):function(){return _D.apply(yD,arguments)}),wxt=Md,l9=wxt("document","documentElement"),Ext=Rn,Cxt=Ext([].slice),Bxt=BB,u9=/(?:ipad|iphone|ipod).*applewebkit/i.test(Bxt),bxt=mv,Txt=hr,MB=bxt(Txt.process)=="process",vs=hr,Sxt=sM,xxt=iM,wD=Ji,Ixt=xl,Lxt=Hi,ED=l9,Oxt=Cxt,CD=xB,Fxt=u9,Rxt=MB,QL=vs.setImmediate,kL=vs.clearImmediate,Mxt=vs.process,sS=vs.Dispatch,Nxt=vs.Function,BD=vs.MessageChannel,Pxt=vs.String,AS=0,yy={},bD="onreadystatechange",i0,uf,lS,uS;try{i0=vs.location}catch{}var AM=function(r){if(Ixt(yy,r)){var e=yy[r];delete yy[r],e()}},cS=function(r){return function(){AM(r)}},TD=function(r){AM(r.data)},SD=function(r){vs.postMessage(Pxt(r),i0.protocol+"//"+i0.host)};(!QL||!kL)&&(QL=function(e){var t=Oxt(arguments,1);return yy[++AS]=function(){Sxt(wD(e)?e:Nxt(e),void 0,t)},uf(AS),AS},kL=function(e){delete yy[e]},Rxt?uf=function(r){Mxt.nextTick(cS(r))}:sS&&sS.now?uf=function(r){sS.now(cS(r))}:BD&&!Fxt?(lS=new BD,uS=lS.port2,lS.port1.onmessage=TD,uf=xxt(uS.postMessage,uS)):vs.addEventListener&&wD(vs.postMessage)&&!vs.importScripts&&i0&&i0.protocol!=="file:"&&!Lxt(SD)?(uf=SD,vs.addEventListener("message",TD,!1)):bD in CD("script")?uf=function(r){ED.appendChild(CD("script"))[bD]=function(){ED.removeChild(this),AM(r)}}:uf=function(r){setTimeout(cS(r),0)});var c9={set:QL,clear:kL},Uxt=BB,Dxt=hr,Qxt=/ipad|iphone|ipod/i.test(Uxt)&&Dxt.Pebble!==void 0,kxt=BB,Hxt=/web0s(?!.*chrome)/i.test(kxt),ld=hr,xD=iM,Gxt=vv.f,hS=c9.set,$xt=u9,Vxt=Qxt,jxt=Hxt,fS=MB,ID=ld.MutationObserver||ld.WebKitMutationObserver,LD=ld.document,OD=ld.process,k1=ld.Promise,FD=Gxt(ld,"queueMicrotask"),h9=FD&&FD.value,Em,Cf,_y,jp,dS,pS,H1,RD;h9||(Em=function(){var r,e;for(fS&&(r=OD.domain)&&r.exit();Cf;){e=Cf.fn,Cf=Cf.next;try{e()}catch(t){throw Cf?jp():_y=void 0,t}}_y=void 0,r&&r.enter()},!$xt&&!fS&&!jxt&&ID&&LD?(dS=!0,pS=LD.createTextNode(""),new ID(Em).observe(pS,{characterData:!0}),jp=function(){pS.data=dS=!dS}):!Vxt&&k1&&k1.resolve?(H1=k1.resolve(void 0),H1.constructor=k1,RD=xD(H1.then,H1),jp=function(){RD(Em)}):fS?jp=function(){OD.nextTick(Em)}:(hS=xD(hS,ld),jp=function(){hS(Em)}));var Kxt=h9||function(r){var e={fn:r,next:void 0};_y&&(_y.next=e),Cf||(Cf=e,jp()),_y=e},lM={},MD=yv,Wxt=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=MD(e),this.reject=MD(t)};lM.f=function(r){return new Wxt(r)};var zxt=to,Yxt=Th,Xxt=lM,qxt=function(r,e){if(zxt(r),Yxt(e)&&e.constructor===r)return e;var t=Xxt.f(r),n=t.resolve;return n(e),t.promise},Zxt=hr,Jxt=function(r,e){var t=Zxt.console;t&&t.error&&(arguments.length==1?t.error(r):t.error(r,e))},tIt=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}},f9=function(){this.head=null,this.tail=null};f9.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 eIt=f9,rIt=typeof window=="object",NB=Il,Tu=hr,nIt=Md,Su=Bs,VE=HTt,ND=Sh.exports,iIt=$Tt,PD=Z$,aIt=nM,oIt=iSt,HL=yv,wy=Ji,sIt=Th,AIt=ASt,lIt=IB,UD=JSt,uIt=rxt,cIt=s9,d9=c9.set,uM=Kxt,hIt=qxt,fIt=Jxt,p9=lM,GL=tIt,dIt=eIt,cM=LB,pIt=X$,gIt=ca,vIt=rIt,jE=MB,DD=YR,mIt=gIt("species"),Ll="Promise",QD=cM.getterFor(Ll),yIt=cM.set,_It=cM.getterFor(Ll),vf=VE&&VE.prototype,pA=VE,Cm=vf,g9=Tu.TypeError,$L=Tu.document,hM=Tu.process,$g=p9.f,wIt=$g,EIt=!!($L&&$L.createEvent&&Tu.dispatchEvent),v9=wy(Tu.PromiseRejectionEvent),m9="unhandledrejection",CIt="rejectionhandled",kD=0,y9=1,BIt=2,fM=1,_9=2,VL=!1,G1,HD,w9,GD,K0=pIt(Ll,function(){var r=lIt(pA),e=r!==String(pA);if(!e&&DD===66)return!0;if(DD>=51&&/native code/.test(r))return!1;var t=new pA(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=t.constructor={};return i[mIt]=n,VL=t.then(function(){})instanceof n,VL?!e&&vIt&&!v9:!0}),bIt=K0||!uIt(function(r){pA.all(r).catch(function(){})}),E9=function(r){var e;return sIt(r)&&wy(e=r.then)?e:!1},C9=function(r,e){var t=e.value,n=e.state==y9,i=n?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,A,l,u;try{i?(n||(e.rejection===_9&&SIt(e),e.rejection=fM),i===!0?A=t:(s&&s.enter(),A=i(t),s&&(s.exit(),u=!0)),A===r.promise?o(g9("Promise-chain cycle")):(l=E9(A))?Su(l,A,a,o):a(A)):o(t)}catch(c){s&&!u&&s.exit(),o(c)}},B9=function(r,e){r.notified||(r.notified=!0,uM(function(){for(var t=r.reactions,n;n=t.get();)C9(n,r);r.notified=!1,e&&!r.rejection&&TIt(r)}))},b9=function(r,e,t){var n,i;EIt?(n=$L.createEvent("Event"),n.promise=e,n.reason=t,n.initEvent(r,!1,!0),Tu.dispatchEvent(n)):n={promise:e,reason:t},!v9&&(i=Tu["on"+r])?i(n):r===m9&&fIt("Unhandled promise rejection",t)},TIt=function(r){Su(d9,Tu,function(){var e=r.facade,t=r.value,n=$D(r),i;if(n&&(i=GL(function(){jE?hM.emit("unhandledRejection",t,e):b9(m9,e,t)}),r.rejection=jE||$D(r)?_9:fM,i.error))throw i.value})},$D=function(r){return r.rejection!==fM&&!r.parent},SIt=function(r){Su(d9,Tu,function(){var e=r.facade;jE?hM.emit("rejectionHandled",e):b9(CIt,e,r.value)})},ng=function(r,e,t){return function(n){r(e,n,t)}},wg=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=BIt,B9(r,!0))},jL=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw g9("Promise can't be resolved itself");var n=E9(e);n?uM(function(){var i={done:!1};try{Su(n,e,ng(jL,i,r),ng(wg,i,r))}catch(a){wg(i,a,r)}}):(r.value=e,r.state=y9,B9(r,!1))}catch(i){wg({done:!1},i,r)}}};if(K0&&(pA=function(e){AIt(this,Cm),HL(e),Su(G1,this);var t=QD(this);try{e(ng(jL,t),ng(wg,t))}catch(n){wg(t,n)}},Cm=pA.prototype,G1=function(e){yIt(this,{type:Ll,done:!1,notified:!1,parent:!1,reactions:new dIt,rejection:!1,state:kD,value:void 0})},G1.prototype=iIt(Cm,{then:function(e,t){var n=_It(this),i=$g(cIt(this,pA));return n.parent=!0,i.ok=wy(e)?e:!0,i.fail=wy(t)&&t,i.domain=jE?hM.domain:void 0,n.state==kD?n.reactions.add(i):uM(function(){C9(i,n)}),i.promise},catch:function(r){return this.then(void 0,r)}}),HD=function(){var r=new G1,e=QD(r);this.promise=r,this.resolve=ng(jL,e),this.reject=ng(wg,e)},p9.f=$g=function(r){return r===pA||r===w9?new HD(r):wIt(r)},wy(VE)&&vf!==Object.prototype)){GD=vf.then,VL||(ND(vf,"then",function(e,t){var n=this;return new pA(function(i,a){Su(GD,n,i,a)}).then(e,t)},{unsafe:!0}),ND(vf,"catch",Cm.catch,{unsafe:!0}));try{delete vf.constructor}catch{}PD&&PD(vf,Cm)}NB({global:!0,wrap:!0,forced:K0},{Promise:pA});aIt(pA,Ll,!1);oIt(Ll);w9=nIt(Ll);NB({target:Ll,stat:!0,forced:K0},{reject:function(e){var t=$g(this);return Su(t.reject,void 0,e),t.promise}});NB({target:Ll,stat:!0,forced:K0},{resolve:function(e){return hIt(this,e)}});NB({target:Ll,stat:!0,forced:bIt},{all:function(e){var t=this,n=$g(t),i=n.resolve,a=n.reject,o=GL(function(){var s=HL(t.resolve),A=[],l=0,u=1;UD(e,function(c){var h=l++,f=!1;u++,Su(s,t,c).then(function(d){f||(f=!0,A[h]=d,--u||i(A))},a)}),--u||i(A)});return o.error&&a(o.value),n.promise},race:function(e){var t=this,n=$g(t),i=n.reject,a=GL(function(){var o=HL(t.resolve);UD(e,function(s){Su(o,t,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});function VD(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 xu(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(A){VD(a,n,i,o,s,"next",A)}function s(A){VD(a,n,i,o,s,"throw",A)}o(void 0)})}}var xIt=hr,IIt=aM,LIt=xIt.String,Ol=function(r){if(IIt(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return LIt(r)},OIt=to,T9=function(){var r=OIt(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},dM=Hi,FIt=hr,pM=FIt.RegExp,gM=dM(function(){var r=pM("a","y");return r.lastIndex=2,r.exec("abcd")!=null}),RIt=gM||dM(function(){return!pM("a","y").sticky}),MIt=gM||dM(function(){var r=pM("^r","gy");return r.lastIndex=2,r.exec("str")!=null}),S9={BROKEN_CARET:MIt,MISSED_STICKY:RIt,UNSUPPORTED_Y:gM},x9={},NIt=z$,PIt=rM,UIt=Object.keys||function(e){return NIt(e,PIt)},DIt=Du,QIt=k$,kIt=Qu,HIt=to,GIt=$0,$It=UIt;x9.f=DIt&&!QIt?Object.defineProperties:function(e,t){HIt(e);for(var n=GIt(t),i=$It(t),a=i.length,o=0,s;a>o;)kIt.f(e,s=i[o++],n[s]);return e};var VIt=to,jIt=x9,jD=rM,KIt=tM,WIt=l9,zIt=xB,YIt=JR,KD=">",WD="<",KL="prototype",WL="script",I9=YIt("IE_PROTO"),gS=function(){},L9=function(r){return WD+WL+KD+r+WD+"/"+WL+KD},zD=function(r){r.write(L9("")),r.close();var e=r.parentWindow.Object;return r=null,e},XIt=function(){var r=zIt("iframe"),e="java"+WL+":",t;return r.style.display="none",WIt.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(L9("document.F=Object")),t.close(),t.F},$1,Ew=function(){try{$1=new ActiveXObject("htmlfile")}catch{}Ew=typeof document<"u"?document.domain&&$1?zD($1):XIt():zD($1);for(var r=jD.length;r--;)delete Ew[KL][jD[r]];return Ew()};KIt[I9]=!0;var vM=Object.create||function(e,t){var n;return e!==null?(gS[KL]=VIt(e),n=new gS,gS[KL]=null,n[I9]=e):n=Ew(),t===void 0?n:jIt.f(n,t)},qIt=Hi,ZIt=hr,JIt=ZIt.RegExp,tLt=qIt(function(){var r=JIt(".","s");return!(r.dotAll&&r.exec(`
|
||
`)&&r.flags==="s")}),eLt=Hi,rLt=hr,nLt=rLt.RegExp,iLt=eLt(function(){var r=nLt("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),ig=Bs,PB=Rn,aLt=Ol,oLt=T9,sLt=S9,ALt=TB.exports,lLt=vM,uLt=LB.get,cLt=tLt,hLt=iLt,fLt=ALt("native-string-replace",String.prototype.replace),KE=RegExp.prototype.exec,zL=KE,dLt=PB("".charAt),pLt=PB("".indexOf),gLt=PB("".replace),vS=PB("".slice),YL=function(){var r=/a/,e=/b*/g;return ig(KE,r,"a"),ig(KE,e,"a"),r.lastIndex!==0||e.lastIndex!==0}(),O9=sLt.BROKEN_CARET,XL=/()??/.exec("")[1]!==void 0,vLt=YL||XL||O9||cLt||hLt;vLt&&(zL=function(e){var t=this,n=uLt(t),i=aLt(e),a=n.raw,o,s,A,l,u,c,h;if(a)return a.lastIndex=t.lastIndex,o=ig(zL,a,i),t.lastIndex=a.lastIndex,o;var f=n.groups,d=O9&&t.sticky,g=ig(oLt,t),m=t.source,v=0,y=i;if(d&&(g=gLt(g,"y",""),pLt(g,"g")===-1&&(g+="g"),y=vS(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&dLt(i,t.lastIndex-1)!==`
|
||
`)&&(m="(?: "+m+")",y=" "+y,v++),s=new RegExp("^(?:"+m+")",g)),XL&&(s=new RegExp("^"+m+"$(?!\\s)",g)),YL&&(A=t.lastIndex),l=ig(KE,d?s:t,y),d?l?(l.input=vS(l.input,v),l[0]=vS(l[0],v),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:YL&&l&&(t.lastIndex=t.global?l.index+l[0].length:A),XL&&l&&l.length>1&&ig(fLt,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=lLt(null),u=0;u<f.length;u++)h=f[u],c[h[0]]=l[h[1]];return l});var UB=zL,mLt=Il,YD=UB;mLt({target:"RegExp",proto:!0,forced:/./.exec!==YD},{exec:YD});var XD=Rn,qD=Sh.exports,yLt=UB,ZD=Hi,F9=ca,_Lt=wv,wLt=F9("species"),mS=RegExp.prototype,mM=function(r,e,t,n){var i=F9(r),a=!ZD(function(){var l={};return l[i]=function(){return 7},""[r](l)!=7}),o=a&&!ZD(function(){var l=!1,u=/a/;return r==="split"&&(u={},u.constructor={},u.constructor[wLt]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return l=!0,null},u[i](""),!l});if(!a||!o||t){var s=XD(/./[i]),A=e(i,""[r],function(l,u,c,h,f){var d=XD(l),g=u.exec;return g===yLt||g===mS.exec?a&&!f?{done:!0,value:s(u,c,h)}:{done:!0,value:d(c,u,h)}:{done:!1}});qD(String.prototype,r,A[0]),qD(mS,i,A[1])}n&&_Lt(mS[i],"sham",!0)},yM=Rn,ELt=FB,CLt=Ol,BLt=Sl,bLt=yM("".charAt),JD=yM("".charCodeAt),TLt=yM("".slice),tQ=function(r){return function(e,t){var n=CLt(BLt(e)),i=ELt(t),a=n.length,o,s;return i<0||i>=a?r?"":void 0:(o=JD(n,i),o<55296||o>56319||i+1===a||(s=JD(n,i+1))<56320||s>57343?r?bLt(n,i):o:r?TLt(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},SLt={codeAt:tQ(!1),charAt:tQ(!0)},xLt=SLt.charAt,_M=function(r,e,t){return e+(t?xLt(r,e).length:1)},ILt=hr,eQ=Bs,LLt=to,OLt=Ji,FLt=mv,RLt=UB,MLt=ILt.TypeError,wM=function(r,e){var t=r.exec;if(OLt(t)){var n=eQ(t,r,e);return n!==null&&LLt(n),n}if(FLt(r)==="RegExp")return eQ(RLt,r,e);throw MLt("RegExp#exec called on incompatible receiver")},NLt=Bs,PLt=mM,ULt=to,DLt=Ev,yS=Ol,QLt=Sl,kLt=_v,HLt=_M,rQ=wM;PLt("match",function(r,e,t){return[function(i){var a=QLt(this),o=i==null?void 0:kLt(i,r);return o?NLt(o,i,a):new RegExp(i)[r](yS(a))},function(n){var i=ULt(this),a=yS(n),o=t(e,i,a);if(o.done)return o.value;if(!i.global)return rQ(i,a);var s=i.unicode;i.lastIndex=0;for(var A=[],l=0,u;(u=rQ(i,a))!==null;){var c=yS(u[0]);A[l]=c,c===""&&(i.lastIndex=HLt(a,DLt(i.lastIndex),s)),l++}return l===0?null:A}]});var EM=Rn,GLt=SB,$Lt=Math.floor,_S=EM("".charAt),VLt=EM("".replace),wS=EM("".slice),jLt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,KLt=/\$([$&'`]|\d{1,2})/g,WLt=function(r,e,t,n,i,a){var o=t+r.length,s=n.length,A=KLt;return i!==void 0&&(i=GLt(i),A=jLt),VLt(a,A,function(l,u){var c;switch(_S(u,0)){case"$":return"$";case"&":return r;case"`":return wS(e,0,t);case"'":return wS(e,o);case"<":c=i[wS(u,1,-1)];break;default:var h=+u;if(h===0)return l;if(h>s){var f=$Lt(h/10);return f===0?l:f<=s?n[f-1]===void 0?_S(u,1):n[f-1]+_S(u,1):l}c=n[h-1]}return c===void 0?"":c})},zLt=sM,nQ=Bs,DB=Rn,YLt=mM,XLt=Hi,qLt=to,ZLt=Ji,JLt=FB,tOt=Ev,Ip=Ol,eOt=Sl,rOt=_M,nOt=_v,iOt=WLt,aOt=wM,oOt=ca,qL=oOt("replace"),sOt=Math.max,AOt=Math.min,lOt=DB([].concat),ES=DB([].push),iQ=DB("".indexOf),aQ=DB("".slice),uOt=function(r){return r===void 0?r:String(r)},cOt=function(){return"a".replace(/./,"$0")==="$0"}(),oQ=function(){return/./[qL]?/./[qL]("a","$0")==="":!1}(),hOt=!XLt(function(){var r=/./;return r.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(r,"$<a>")!=="7"});YLt("replace",function(r,e,t){var n=oQ?"$":"$0";return[function(a,o){var s=eOt(this),A=a==null?void 0:nOt(a,qL);return A?nQ(A,a,s,o):nQ(e,Ip(s),a,o)},function(i,a){var o=qLt(this),s=Ip(i);if(typeof a=="string"&&iQ(a,n)===-1&&iQ(a,"$<")===-1){var A=t(e,o,s,a);if(A.done)return A.value}var l=ZLt(a);l||(a=Ip(a));var u=o.global;if(u){var c=o.unicode;o.lastIndex=0}for(var h=[];;){var f=aOt(o,s);if(f===null||(ES(h,f),!u))break;var d=Ip(f[0]);d===""&&(o.lastIndex=rOt(s,tOt(o.lastIndex),c))}for(var g="",m=0,v=0;v<h.length;v++){f=h[v];for(var y=Ip(f[0]),w=sOt(AOt(JLt(f.index),s.length),0),C=[],O=1;O<f.length;O++)ES(C,uOt(f[O]));var F=f.groups;if(l){var I=lOt([y],C,w,s);F!==void 0&&ES(I,F);var T=Ip(zLt(a,void 0,I))}else T=iOt(y,s,w,C,F,a);w>=m&&(g+=aQ(s,m,w)+T,m=w+y.length)}return g+aQ(s,m)}]},!hOt||!cOt||oQ);var fOt=Th,dOt=mv,pOt=ca,gOt=pOt("match"),R9=function(r){var e;return fOt(r)&&((e=r[gOt])!==void 0?!!e:dOt(r)=="RegExp")},vOt=hr,mOt=R9,yOt=vOt.TypeError,CM=function(r){if(mOt(r))throw yOt("The method doesn't accept regular expressions");return r},_Ot=ca,wOt=_Ot("match"),BM=function(r){var e=/./;try{"/./"[r](e)}catch{try{return e[wOt]=!1,"/./"[r](e)}catch{}}return!1},EOt=Il,M9=Rn,COt=vv.f,BOt=Ev,sQ=Ol,bOt=CM,TOt=Sl,SOt=BM,AQ=M9("".startsWith),xOt=M9("".slice),IOt=Math.min,N9=SOt("startsWith"),LOt=!N9&&!!function(){var r=COt(String.prototype,"startsWith");return r&&!r.writable}();EOt({target:"String",proto:!0,forced:!LOt&&!N9},{startsWith:function(e){var t=sQ(TOt(this));bOt(e);var n=BOt(IOt(arguments.length>1?arguments[1]:void 0,t.length)),i=sQ(e);return AQ?AQ(t,i,n):xOt(t,n,n+i.length)===i}});var OOt=ca,FOt=vM,ROt=Qu,ZL=OOt("unscopables"),JL=Array.prototype;JL[ZL]==null&&ROt.f(JL,ZL,{configurable:!0,value:FOt(null)});var MOt=function(r){JL[ZL][r]=!0},NOt=Hi,POt=!NOt(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),UOt=hr,DOt=xl,QOt=Ji,kOt=SB,HOt=JR,GOt=POt,lQ=HOt("IE_PROTO"),tO=UOt.Object,$Ot=tO.prototype,P9=GOt?tO.getPrototypeOf:function(r){var e=kOt(r);if(DOt(e,lQ))return e[lQ];var t=e.constructor;return QOt(t)&&e instanceof t?t.prototype:e instanceof tO?$Ot:null},VOt=Hi,jOt=Ji,uQ=P9,KOt=Sh.exports,WOt=ca,eO=WOt("iterator"),U9=!1,ud,CS,BS;[].keys&&(BS=[].keys(),"next"in BS?(CS=uQ(uQ(BS)),CS!==Object.prototype&&(ud=CS)):U9=!0);var zOt=ud==null||VOt(function(){var r={};return ud[eO].call(r)!==r});zOt&&(ud={});jOt(ud[eO])||KOt(ud,eO,function(){return this});var D9={IteratorPrototype:ud,BUGGY_SAFARI_ITERATORS:U9},YOt=D9.IteratorPrototype,XOt=vM,qOt=EB,ZOt=nM,JOt=j0,tFt=function(){return this},eFt=function(r,e,t,n){var i=e+" Iterator";return r.prototype=XOt(YOt,{next:qOt(+!n,t)}),ZOt(r,i,!1),JOt[i]=tFt,r},rFt=Il,nFt=Bs,Q9=OB,iFt=Ji,aFt=eFt,cQ=P9,hQ=Z$,oFt=nM,sFt=wv,bS=Sh.exports,AFt=ca,lFt=j0,k9=D9,uFt=Q9.PROPER,cFt=Q9.CONFIGURABLE,fQ=k9.IteratorPrototype,V1=k9.BUGGY_SAFARI_ITERATORS,Bm=AFt("iterator"),dQ="keys",bm="values",pQ="entries",hFt=function(){return this},fFt=function(r,e,t,n,i,a,o){aFt(t,e,n);var s=function(v){if(v===i&&h)return h;if(!V1&&v in u)return u[v];switch(v){case dQ:return function(){return new t(this,v)};case bm:return function(){return new t(this,v)};case pQ:return function(){return new t(this,v)}}return function(){return new t(this)}},A=e+" Iterator",l=!1,u=r.prototype,c=u[Bm]||u["@@iterator"]||i&&u[i],h=!V1&&c||s(i),f=e=="Array"&&u.entries||c,d,g,m;if(f&&(d=cQ(f.call(new r)),d!==Object.prototype&&d.next&&(cQ(d)!==fQ&&(hQ?hQ(d,fQ):iFt(d[Bm])||bS(d,Bm,hFt)),oFt(d,A,!0))),uFt&&i==bm&&c&&c.name!==bm&&(cFt?sFt(u,"name",bm):(l=!0,h=function(){return nFt(c,this)})),i)if(g={values:s(bm),keys:a?h:s(dQ),entries:s(pQ)},o)for(m in g)(V1||l||!(m in u))&&bS(u,m,g[m]);else rFt({target:e,proto:!0,forced:V1||l},g);return u[Bm]!==h&&bS(u,Bm,h,{name:i}),lFt[e]=h,g},dFt=$0,bM=MOt,gQ=j0,H9=LB,pFt=Qu.f,gFt=fFt,vFt=Du,G9="Array Iterator",mFt=H9.set,yFt=H9.getterFor(G9),_Ft=gFt(Array,"Array",function(r,e){mFt(this,{type:G9,target:dFt(r),index:0,kind:e})},function(){var r=yFt(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"),vQ=gQ.Arguments=gQ.Array;bM("keys");bM("values");bM("entries");if(vFt&&vQ.name!=="values")try{pFt(vQ,"name",{value:"values"})}catch{}var wFt={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},EFt=xB,TS=EFt("span").classList,mQ=TS&&TS.constructor&&TS.constructor.prototype,CFt=mQ===Object.prototype?void 0:mQ,yQ=hr,$9=wFt,BFt=CFt,zm=_Ft,SS=wv,V9=ca,xS=V9("iterator"),_Q=V9("toStringTag"),IS=zm.values,j9=function(r,e){if(r){if(r[xS]!==IS)try{SS(r,xS,IS)}catch{r[xS]=IS}if(r[_Q]||SS(r,_Q,e),$9[e]){for(var t in zm)if(r[t]!==zm[t])try{SS(r,t,zm[t])}catch{r[t]=zm[t]}}}};for(var LS in $9)j9(yQ[LS]&&yQ[LS].prototype,LS);j9(BFt,"DOMTokenList");function TM(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var bFt=hr,TFt=yv,SFt=SB,xFt=F$,IFt=RB,LFt=bFt.TypeError,wQ=function(r){return function(e,t,n,i){TFt(t);var a=SFt(e),o=xFt(a),s=IFt(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 LFt("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}},OFt={left:wQ(!1),right:wQ(!0)},FFt=Hi,K9=function(r,e){var t=[][r];return!!t&&FFt(function(){t.call(null,e||function(){throw 1},1)})},RFt=Il,MFt=OFt.left,NFt=K9,EQ=YR,PFt=MB,UFt=NFt("reduce"),DFt=!PFt&&EQ>79&&EQ<83;RFt({target:"Array",proto:!0,forced:!UFt||DFt},{reduce:function(e){var t=arguments.length;return MFt(this,e,t,t>1?arguments[1]:void 0)}});var QFt=Il,W9=Rn,kFt=vv.f,HFt=Ev,CQ=Ol,GFt=CM,$Ft=Sl,VFt=BM,BQ=W9("".endsWith),jFt=W9("".slice),KFt=Math.min,z9=VFt("endsWith"),WFt=!z9&&!!function(){var r=kFt(String.prototype,"endsWith");return r&&!r.writable}();QFt({target:"String",proto:!0,forced:!WFt&&!z9},{endsWith:function(e){var t=CQ($Ft(this));GFt(e);var n=arguments.length>1?arguments[1]:void 0,i=t.length,a=n===void 0?i:KFt(HFt(n),i),o=CQ(e);return BQ?BQ(t,o,a):jFt(t,a-o.length,a)===o}});var zFt=ZR,YFt=Qu,XFt=EB,qFt=function(r,e,t){var n=zFt(e);n in r?YFt.f(r,n,XFt(0,t)):r[n]=t},ZFt=hr,bQ=K$,JFt=RB,tRt=qFt,eRt=ZFt.Array,rRt=Math.max,nRt=function(r,e,t){for(var n=JFt(r),i=bQ(e,n),a=bQ(t===void 0?n:t,n),o=eRt(rRt(a-i,0)),s=0;i<a;i++,s++)tRt(o,s,r[i]);return o.length=s,o},iRt=sM,Tm=Bs,SM=Rn,aRt=mM,oRt=R9,sRt=to,TQ=Sl,ARt=s9,lRt=_M,uRt=Ev,OS=Ol,cRt=_v,SQ=nRt,xQ=wM,hRt=UB,fRt=S9,dRt=Hi,Lp=fRt.UNSUPPORTED_Y,IQ=4294967295,pRt=Math.min,Y9=[].push,gRt=SM(/./.exec),Op=SM(Y9),Sm=SM("".slice),vRt=!dRt(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"});aRt("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=OS(TQ(this)),s=a===void 0?IQ:a>>>0;if(s===0)return[];if(i===void 0)return[o];if(!oRt(i))return Tm(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,d;(h=Tm(hRt,c,o))&&(f=c.lastIndex,!(f>u&&(Op(A,Sm(o,u,h.index)),h.length>1&&h.index<o.length&&iRt(Y9,A,SQ(h,1)),d=h[0].length,u=f,A.length>=s)));)c.lastIndex===h.index&&c.lastIndex++;return u===o.length?(d||!gRt(c,""))&&Op(A,""):Op(A,Sm(o,u)),A.length>s?SQ(A,0,s):A}:"0".split(void 0,0).length?n=function(i,a){return i===void 0&&a===0?[]:Tm(e,this,i,a)}:n=e,[function(a,o){var s=TQ(this),A=a==null?void 0:cRt(a,r);return A?Tm(A,a,s,o):Tm(n,OS(s),a,o)},function(i,a){var o=sRt(this),s=OS(i),A=t(n,o,s,a,n!==e);if(A.done)return A.value;var l=ARt(o,RegExp),u=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Lp?"g":"y"),h=new l(Lp?"^(?:"+o.source+")":o,c),f=a===void 0?IQ:a>>>0;if(f===0)return[];if(s.length===0)return xQ(h,s)===null?[s]:[];for(var d=0,g=0,m=[];g<s.length;){h.lastIndex=Lp?0:g;var v=xQ(h,Lp?Sm(s,g):s),y;if(v===null||(y=pRt(uRt(h.lastIndex+(Lp?g:0)),s.length))===d)g=lRt(s,g,u);else{if(Op(m,Sm(s,d,g)),m.length===f)return m;for(var w=1;w<=v.length-1;w++)if(Op(m,v[w]),m.length===f)return m;g=d=y}}return Op(m,Sm(s,d)),m}]},!vRt,Lp);var QB={exports:{}},Ym={exports:{}};(function(){var r,e,t,n,i,a;typeof performance<"u"&&performance!==null&&performance.now?Ym.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Ym.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?(Ym.exports=function(){return Date.now()-t},t=Date.now()):(Ym.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(nl);var mRt=Ym.exports,yu=typeof window>"u"?nl:window,j1=["moz","webkit"],Eg="AnimationFrame",Vg=yu["request"+Eg],a0=yu["cancel"+Eg]||yu["cancelRequest"+Eg];for(var xm=0;!Vg&&xm<j1.length;xm++)Vg=yu[j1[xm]+"Request"+Eg],a0=yu[j1[xm]+"Cancel"+Eg]||yu[j1[xm]+"CancelRequest"+Eg];if(!Vg||!a0){var FS=0,LQ=0,cf=[],yRt=1e3/60;Vg=function(r){if(cf.length===0){var e=mRt(),t=Math.max(0,yRt-(e-FS));FS=t+e,setTimeout(function(){var n=cf.slice(0);cf.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(FS)}catch(a){setTimeout(function(){throw a},0)}},Math.round(t))}return cf.push({handle:++LQ,callback:r,cancelled:!1}),LQ},a0=function(r){for(var e=0;e<cf.length;e++)cf[e].handle===r&&(cf[e].cancelled=!0)}}QB.exports=function(r){return Vg.call(yu,r)};QB.exports.cancel=function(){a0.apply(yu,arguments)};QB.exports.polyfill=function(r){r||(r=yu),r.requestAnimationFrame=Vg,r.cancelAnimationFrame=a0};var RS=QB.exports,X9=`
|
||
\v\f\r \u2028\u2029\uFEFF`,_Rt=Rn,wRt=Sl,ERt=Ol,CRt=X9,OQ=_Rt("".replace),WE="["+CRt+"]",BRt=RegExp("^"+WE+WE+"*"),bRt=RegExp(WE+WE+"*$"),MS=function(r){return function(e){var t=ERt(wRt(e));return r&1&&(t=OQ(t,BRt,"")),r&2&&(t=OQ(t,bRt,"")),t}},TRt={start:MS(1),end:MS(2),trim:MS(3)},SRt=OB.PROPER,xRt=Hi,FQ=X9,RQ="
",IRt=function(r){return xRt(function(){return!!FQ[r]()||RQ[r]()!==RQ||SRt&&FQ[r].name!==r})},LRt=Il,ORt=TRt.trim,FRt=IRt;LRt({target:"String",proto:!0,forced:FRt("trim")},{trim:function(){return ORt(this)}});var rO=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 d=document.createElement("li"),g=new RGBColor(A[l]),m=document.createElement("div");m.style.cssText="margin: 3px; border: 1px solid black; background:"+g.toHex()+"; color:"+g.toHex(),m.appendChild(document.createTextNode("test"));var v=document.createTextNode(" "+A[l]+" -> "+g.toRGB()+" -> "+g.toHex());d.appendChild(m),d.appendChild(v),f.appendChild(d)}catch{}return f}},RRt=Il,MRt=Rn,NRt=CM,PRt=Sl,MQ=Ol,URt=BM,DRt=MRt("".indexOf);RRt({target:"String",proto:!0,forced:!URt("includes")},{includes:function(e){return!!~DRt(MQ(PRt(this)),MQ(NRt(e)),arguments.length>1?arguments[1]:void 0)}});var QRt=Il,kRt=Rn,HRt=W$.indexOf,GRt=K9,nO=kRt([].indexOf),NQ=!!nO&&1/nO([1],1,-0)<0,$Rt=GRt("indexOf");QRt({target:"Array",proto:!0,forced:NQ||!$Rt},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NQ?nO(this,e,t)||0:HRt(this,e,t)}});var VRt=mv,jRt=Array.isArray||function(e){return VRt(e)=="Array"},KRt=Il,WRt=Rn,zRt=jRt,YRt=WRt([].reverse),PQ=[1,2];KRt({target:"Array",proto:!0,forced:String(PQ)===String(PQ.reverse())},{reverse:function(){return zRt(this)&&(this.length=this.length),YRt(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 q9=function(r,e){return(q9=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 Z9(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}q9(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function XRt(r){var e="";Array.isArray(r)||(r=[r]);for(var t=0;t<r.length;t++){var n=r[t];if(n.type===zt.CLOSE_PATH)e+="z";else if(n.type===zt.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===zt.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===zt.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===zt.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===zt.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===zt.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===zt.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===zt.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==zt.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 iO(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 lA(){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 xc=Math.PI;function NS(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=iO([(e-a)/2,(t-o)/2],-r.xRot/180*xc),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,d=-i*A/n*h,g=iO([f,d],r.xRot/180*xc);r.cX=g[0]+(e+a)/2,r.cY=g[1]+(t+o)/2,r.phi1=Math.atan2((l-d)/i,(A-f)/n),r.phi2=Math.atan2((-l-d)/i,(-A-f)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*xc),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*xc),r.phi1*=180/xc,r.phi2*=180/xc}function UQ(r,e,t){lA(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 Ni,Zl=Math.PI/180;function DQ(r,e,t){return(1-t)*r+t*e}function QQ(r,e,t,n){return r+Math.cos(n/180*xc)*e+Math.sin(n/180*xc)*t}function kQ(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 d=Math.sqrt(f);return[-u/2-d,-u/2+d]}(A/s,l/s,i)}function HQ(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&zt.SMOOTH_CURVE_TO&&(c.type=zt.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&zt.CURVE_TO?(s=c.relative?h+c.x2:c.x2,A=c.relative?f+c.y2:c.y2):(s=NaN,A=NaN),c.type&zt.SMOOTH_QUAD_TO&&(c.type=zt.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&zt.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&zt.SMOOTH_QUAD_TO&&(l.type=zt.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&zt.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=zt.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&zt.MOVE_TO))throw new Error("path must start with moveto");var f=s(h,A,l,u,c);return h.type&zt.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&zt.MOVE_TO&&(u=A,c=l),f}}function a(s,A,l,u,c,h){return lA(s,A,l,u,c,h),i(function(f,d,g,m){var v=f.x1,y=f.x2,w=f.relative&&!isNaN(m),C=f.x!==void 0?f.x:w?0:d,O=f.y!==void 0?f.y:w?0:g;function F(M){return M*M}f.type&zt.HORIZ_LINE_TO&&A!==0&&(f.type=zt.LINE_TO,f.y=f.relative?0:g),f.type&zt.VERT_LINE_TO&&l!==0&&(f.type=zt.LINE_TO,f.x=f.relative?0:d),f.x!==void 0&&(f.x=f.x*s+O*l+(w?0:c)),f.y!==void 0&&(f.y=C*A+f.y*u+(w?0:h)),f.x1!==void 0&&(f.x1=f.x1*s+f.y1*l+(w?0:c)),f.y1!==void 0&&(f.y1=v*A+f.y1*u+(w?0:h)),f.x2!==void 0&&(f.x2=f.x2*s+f.y2*l+(w?0:c)),f.y2!==void 0&&(f.y2=y*A+f.y2*u+(w?0:h));var I=s*u-A*l;if(f.xRot!==void 0&&(s!==1||A!==0||l!==0||u!==1))if(I===0)delete f.rX,delete f.rY,delete f.xRot,delete f.lArcFlag,delete f.sweepFlag,f.type=zt.LINE_TO;else{var T=f.xRot*Math.PI/180,L=Math.sin(T),N=Math.cos(T),x=1/F(f.rX),S=1/F(f.rY),P=F(N)*x+F(L)*S,U=2*L*N*(x-S),tt=F(L)*x+F(N)*S,q=P*u*u-U*A*u+tt*A*A,rt=U*(s*u+A*l)-2*(P*l*u+tt*s*A),nt=P*l*l-U*s*l+tt*s*s,At=(Math.atan2(rt,q-nt)+Math.PI)%Math.PI/2,ct=Math.sin(At),Tt=Math.cos(At);f.rX=Math.abs(I)/Math.sqrt(q*F(Tt)+rt*ct*Tt+nt*F(ct)),f.rY=Math.abs(I)/Math.sqrt(q*F(ct)-rt*ct*Tt+nt*F(Tt)),f.xRot=180*At/Math.PI}return f.sweepFlag!==void 0&&0>I&&(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),lA(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,d){if(isNaN(f)&&!(u.type&zt.MOVE_TO))throw new Error("path must start with moveto");return A&&u.type&zt.HORIZ_LINE_TO&&(u.type=zt.LINE_TO,u.y=u.relative?0:h),l&&u.type&zt.VERT_LINE_TO&&(u.type=zt.LINE_TO,u.x=u.relative?0:c),s&&u.type&zt.CLOSE_PATH&&(u.type=zt.LINE_TO,u.x=u.relative?f-c:f,u.y=u.relative?d-h:d),u.type&zt.ARC&&(u.rX===0||u.rY===0)&&(u.type=zt.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),lA(s);var A=NaN,l=NaN,u=NaN,c=NaN;return i(function(h,f,d,g,m){var v=Math.abs,y=!1,w=0,C=0;if(h.type&zt.SMOOTH_CURVE_TO&&(w=isNaN(A)?0:f-A,C=isNaN(l)?0:d-l),h.type&(zt.CURVE_TO|zt.SMOOTH_CURVE_TO)?(A=h.relative?f+h.x2:h.x2,l=h.relative?d+h.y2:h.y2):(A=NaN,l=NaN),h.type&zt.SMOOTH_QUAD_TO?(u=isNaN(u)?f:2*f-u,c=isNaN(c)?d:2*d-c):h.type&zt.QUAD_TO?(u=h.relative?f+h.x1:h.x1,c=h.relative?d+h.y1:h.y2):(u=NaN,c=NaN),h.type&zt.LINE_COMMANDS||h.type&zt.ARC&&(h.rX===0||h.rY===0||!h.lArcFlag)||h.type&zt.CURVE_TO||h.type&zt.SMOOTH_CURVE_TO||h.type&zt.QUAD_TO||h.type&zt.SMOOTH_QUAD_TO){var O=h.x===void 0?0:h.relative?h.x:h.x-f,F=h.y===void 0?0:h.relative?h.y:h.y-d;w=isNaN(u)?h.x1===void 0?w:h.relative?h.x:h.x1-f:u-f,C=isNaN(c)?h.y1===void 0?C:h.relative?h.y:h.y1-d:c-d;var I=h.x2===void 0?0:h.relative?h.x:h.x2-f,T=h.y2===void 0?0:h.relative?h.y:h.y2-d;v(O)<=s&&v(F)<=s&&v(w)<=s&&v(C)<=s&&v(I)<=s&&v(T)<=s&&(y=!0)}return h.type&zt.CLOSE_PATH&&v(f-g)<=s&&v(d-m)<=s&&(y=!0),y?[]:h})},r.MATRIX=a,r.ROTATE=function(s,A,l){A===void 0&&(A=0),l===void 0&&(l=0),lA(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),lA(s,A),a(1,0,0,1,s,A)},r.SCALE=function(s,A){return A===void 0&&(A=s),lA(s,A),a(s,0,0,A,0,0)},r.SKEW_X=function(s){return lA(s),a(1,0,Math.atan(s),1,0,0)},r.SKEW_Y=function(s){return lA(s),a(1,Math.atan(s),0,1,0,0)},r.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),lA(s),a(-1,0,0,1,s,0)},r.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),lA(s),a(1,0,0,-1,0,s)},r.A_TO_C=function(){return i(function(s,A,l){return zt.ARC===s.type?function(u,c,h){var f,d,g,m;u.cX||NS(u,c,h);for(var v=Math.min(u.phi1,u.phi2),y=Math.max(u.phi1,u.phi2)-v,w=Math.ceil(y/90),C=new Array(w),O=c,F=h,I=0;I<w;I++){var T=DQ(u.phi1,u.phi2,I/w),L=DQ(u.phi1,u.phi2,(I+1)/w),N=L-T,x=4/3*Math.tan(N*Zl/4),S=[Math.cos(T*Zl)-x*Math.sin(T*Zl),Math.sin(T*Zl)+x*Math.cos(T*Zl)],P=S[0],U=S[1],tt=[Math.cos(L*Zl),Math.sin(L*Zl)],q=tt[0],rt=tt[1],nt=[q+x*Math.sin(L*Zl),rt-x*Math.cos(L*Zl)],At=nt[0],ct=nt[1];C[I]={relative:u.relative,type:zt.CURVE_TO};var Tt=function(M,W){var Y=iO([M*u.rX,W*u.rY],u.xRot),H=Y[0],J=Y[1];return[u.cX+H,u.cY+J]};f=Tt(P,U),C[I].x1=f[0],C[I].y1=f[1],d=Tt(At,ct),C[I].x2=d[0],C[I].y2=d[1],g=Tt(q,rt),C[I].x=g[0],C[I].y=g[1],u.relative&&(C[I].x1-=O,C[I].y1-=F,C[I].x2-=O,C[I].y2-=F,C[I].x-=O,C[I].y-=F),O=(m=[C[I].x,C[I].y])[0],F=m[1]}return C}(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),zt.ARC===s.type&&NS(s,A,l),s})},r.CLONE=o,r.CALCULATE_BOUNDS=function(){var s=function(h){var f={};for(var d in h)f[d]=h[d];return f},A=e(),l=n(),u=t(),c=i(function(h,f,d){var g=u(l(A(s(h))));function m(ct){ct>c.maxX&&(c.maxX=ct),ct<c.minX&&(c.minX=ct)}function v(ct){ct>c.maxY&&(c.maxY=ct),ct<c.minY&&(c.minY=ct)}if(g.type&zt.DRAWING_COMMANDS&&(m(f),v(d)),g.type&zt.HORIZ_LINE_TO&&m(g.x),g.type&zt.VERT_LINE_TO&&v(g.y),g.type&zt.LINE_TO&&(m(g.x),v(g.y)),g.type&zt.CURVE_TO){m(g.x),v(g.y);for(var y=0,w=kQ(f,g.x1,g.x2,g.x);y<w.length;y++)0<(At=w[y])&&1>At&&m(HQ(f,g.x1,g.x2,g.x,At));for(var C=0,O=kQ(d,g.y1,g.y2,g.y);C<O.length;C++)0<(At=O[C])&&1>At&&v(HQ(d,g.y1,g.y2,g.y,At))}if(g.type&zt.ARC){m(g.x),v(g.y),NS(g,f,d);for(var F=g.xRot/180*Math.PI,I=Math.cos(F)*g.rX,T=Math.sin(F)*g.rX,L=-Math.sin(F)*g.rY,N=Math.cos(F)*g.rY,x=g.phi1<g.phi2?[g.phi1,g.phi2]:-180>g.phi2?[g.phi2+360,g.phi1+360]:[g.phi2,g.phi1],S=x[0],P=x[1],U=function(ct){var Tt=ct[0],M=ct[1],W=180*Math.atan2(M,Tt)/Math.PI;return W<S?W+360:W},tt=0,q=UQ(L,-I,0).map(U);tt<q.length;tt++)(At=q[tt])>S&&At<P&&m(QQ(g.cX,I,L,At));for(var rt=0,nt=UQ(N,-T,0).map(U);rt<nt.length;rt++){var At;(At=nt[rt])>S&&At<P&&v(QQ(g.cY,T,N,At))}}return h});return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}})(Ni||(Ni={}));var sA,J9=function(){function r(){}return r.prototype.round=function(e){return this.transform(Ni.ROUND(e))},r.prototype.toAbs=function(){return this.transform(Ni.TO_ABS())},r.prototype.toRel=function(){return this.transform(Ni.TO_REL())},r.prototype.normalizeHVZ=function(e,t,n){return this.transform(Ni.NORMALIZE_HVZ(e,t,n))},r.prototype.normalizeST=function(){return this.transform(Ni.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(Ni.QT_TO_C())},r.prototype.aToC=function(){return this.transform(Ni.A_TO_C())},r.prototype.sanitize=function(e){return this.transform(Ni.SANITIZE(e))},r.prototype.translate=function(e,t){return this.transform(Ni.TRANSLATE(e,t))},r.prototype.scale=function(e,t){return this.transform(Ni.SCALE(e,t))},r.prototype.rotate=function(e,t,n){return this.transform(Ni.ROTATE(e,t,n))},r.prototype.matrix=function(e,t,n,i,a,o){return this.transform(Ni.MATRIX(e,t,n,i,a,o))},r.prototype.skewX=function(e){return this.transform(Ni.SKEW_X(e))},r.prototype.skewY=function(e){return this.transform(Ni.SKEW_Y(e))},r.prototype.xSymmetry=function(e){return this.transform(Ni.X_AXIS_SYMMETRY(e))},r.prototype.ySymmetry=function(e){return this.transform(Ni.Y_AXIS_SYMMETRY(e))},r.prototype.annotateArcs=function(){return this.transform(Ni.ANNOTATE_ARCS())},r}(),qRt=function(r){return r===" "||r===" "||r==="\r"||r===`
|
||
`},GQ=function(r){return"0".charCodeAt(0)<=r.charCodeAt(0)&&r.charCodeAt(0)<="9".charCodeAt(0)},ZRt=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 Z9(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!==zt.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=GQ(s)&&(this.curNumber==="0"&&s==="0"||A);if(!GQ(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===zt.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===JRt[this.curCommandType]&&(zt.HORIZ_LINE_TO===this.curCommandType?a({type:zt.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):zt.VERT_LINE_TO===this.curCommandType?a({type:zt.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===zt.MOVE_TO||this.curCommandType===zt.LINE_TO||this.curCommandType===zt.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),zt.MOVE_TO===this.curCommandType&&(this.curCommandType=zt.LINE_TO)):this.curCommandType===zt.CURVE_TO?a({type:zt.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===zt.SMOOTH_CURVE_TO?a({type:zt.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===zt.QUAD_TO?a({type:zt.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===zt.ARC&&a({type:zt.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(!qRt(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=zt.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=zt.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=zt.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=zt.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=zt.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=zt.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=zt.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=zt.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=zt.ARC,this.curCommandRelative=s==="a"}else n.push({type:zt.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}(J9),zt=function(r){function e(t){var n=r.call(this)||this;return n.commands=typeof t=="string"?e.parse(t):t,n}return Z9(e,r),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=Ni.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 XRt(t)},e.parse=function(t){var n=new ZRt,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}(J9),JRt=((sA={})[zt.MOVE_TO]=2,sA[zt.LINE_TO]=2,sA[zt.HORIZ_LINE_TO]=1,sA[zt.VERT_LINE_TO]=1,sA[zt.CLOSE_PATH]=0,sA[zt.QUAD_TO]=4,sA[zt.SMOOTH_QUAD_TO]=2,sA[zt.CURVE_TO]=6,sA[zt.SMOOTH_CURVE_TO]=4,sA[zt.ARC]=7,sA),tMt=Rn,eMt=OB.PROPER,rMt=Sh.exports,nMt=to,iMt=CB,$Q=Ol,aMt=Hi,oMt=T9,xM="toString",aO=RegExp.prototype,tV=aO[xM],sMt=tMt(oMt),AMt=aMt(function(){return tV.call({source:"a",flags:"b"})!="/a/b"}),lMt=eMt&&tV.name!=xM;(AMt||lMt)&&rMt(RegExp.prototype,xM,function(){var e=nMt(this),t=$Q(e.source),n=e.flags,i=$Q(n===void 0&&iMt(aO,e)&&!("flags"in aO)?sMt(e):n);return"/"+t+"/"+i},{unsafe:!0});function Cw(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cw=function(e){return typeof e}:Cw=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cw(r)}function uMt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var cMt=[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],hMt=[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 fMt(r,e,t,n,i){if(typeof r=="string"&&(r=document.getElementById(r)),!r||Cw(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 dMt(r,e,t,n,i,a){if(!(isNaN(a)||a<1)){a|=0;var o=fMt(r,e,t,n,i);o=pMt(o,e,t,n,i,a),r.getContext("2d").putImageData(o,e,t)}}function pMt(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 VQ,f=h,d,g=1;g<s;g++)f=f.next=new VQ,g===u&&(d=f);f.next=h;for(var m=null,v=null,y=0,w=0,C=cMt[a],O=hMt[a],F=0;F<i;F++){f=h;for(var I=o[w],T=o[w+1],L=o[w+2],N=o[w+3],x=0;x<u;x++)f.r=I,f.g=T,f.b=L,f.a=N,f=f.next;for(var S=0,P=0,U=0,tt=0,q=u*I,rt=u*T,nt=u*L,At=u*N,ct=c*I,Tt=c*T,M=c*L,W=c*N,Y=1;Y<u;Y++){var H=w+((A<Y?A:Y)<<2),J=o[H],ot=o[H+1],ut=o[H+2],X=o[H+3],It=u-Y;ct+=(f.r=J)*It,Tt+=(f.g=ot)*It,M+=(f.b=ut)*It,W+=(f.a=X)*It,S+=J,P+=ot,U+=ut,tt+=X,f=f.next}m=h,v=d;for(var at=0;at<n;at++){var j=W*C>>O;if(o[w+3]=j,j!==0){var Z=255/j;o[w]=(ct*C>>O)*Z,o[w+1]=(Tt*C>>O)*Z,o[w+2]=(M*C>>O)*Z}else o[w]=o[w+1]=o[w+2]=0;ct-=q,Tt-=rt,M-=nt,W-=At,q-=m.r,rt-=m.g,nt-=m.b,At-=m.a;var ft=at+a+1;ft=y+(ft<A?ft:A)<<2,S+=m.r=o[ft],P+=m.g=o[ft+1],U+=m.b=o[ft+2],tt+=m.a=o[ft+3],ct+=S,Tt+=P,M+=U,W+=tt,m=m.next;var it=v,V=it.r,Ft=it.g,Mt=it.b,Et=it.a;q+=V,rt+=Ft,nt+=Mt,At+=Et,S-=V,P-=Ft,U-=Mt,tt-=Et,v=v.next,w+=4}y+=n}for(var Bt=0;Bt<n;Bt++){w=Bt<<2;var Ct=o[w],Rt=o[w+1],Nt=o[w+2],Dt=o[w+3],Wt=u*Ct,te=u*Rt,Ae=u*Nt,oe=u*Dt,Jt=c*Ct,fe=c*Rt,qt=c*Nt,nr=c*Dt;f=h;for(var ke=0;ke<u;ke++)f.r=Ct,f.g=Rt,f.b=Nt,f.a=Dt,f=f.next;for(var wr=n,Ne=0,Pe=0,Gr=0,se=0,fi=1;fi<=a;fi++){w=wr+Bt<<2;var gr=u-fi;Jt+=(f.r=Ct=o[w])*gr,fe+=(f.g=Rt=o[w+1])*gr,qt+=(f.b=Nt=o[w+2])*gr,nr+=(f.a=Dt=o[w+3])*gr,se+=Ct,Ne+=Rt,Pe+=Nt,Gr+=Dt,f=f.next,fi<l&&(wr+=n)}w=Bt,m=h,v=d;for(var ei=0;ei<i;ei++){var Wr=w<<2;o[Wr+3]=Dt=nr*C>>O,Dt>0?(Dt=255/Dt,o[Wr]=(Jt*C>>O)*Dt,o[Wr+1]=(fe*C>>O)*Dt,o[Wr+2]=(qt*C>>O)*Dt):o[Wr]=o[Wr+1]=o[Wr+2]=0,Jt-=Wt,fe-=te,qt-=Ae,nr-=oe,Wt-=m.r,te-=m.g,Ae-=m.b,oe-=m.a,Wr=Bt+((Wr=ei+u)<l?Wr:l)*n<<2,Jt+=se+=m.r=o[Wr],fe+=Ne+=m.g=o[Wr+1],qt+=Pe+=m.b=o[Wr+2],nr+=Gr+=m.a=o[Wr+3],m=m.next,Wt+=Ct=v.r,te+=Rt=v.g,Ae+=Nt=v.b,oe+=Dt=v.a,se-=Ct,Ne-=Rt,Pe-=Nt,Gr-=Dt,v=v.next,w+=n}}return r}var VQ=function r(){uMt(this,r),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function gMt(){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 xu(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 vMt(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 mMt=Object.freeze({__proto__:null,offscreen:gMt,node:vMt});function Nd(r){return r.replace(/(?!\u3000)\s+/gm," ")}function eV(r){return r.replace(/^[\n \t]+/,"")}function rV(r){return r.replace(/[\n \t]+$/,"")}function Qo(r){var e=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var yMt=/^[A-Z-]+$/;function nV(r){return yMt.test(r)?r.toLowerCase():r}function IM(r){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return e[2]||e[3]||e[4]}function iV(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 _Mt=/(\[[^\]]+\])/g,wMt=/(#[^\s+>~.[:]+)/g,EMt=/(\.[^\s+>~.[:]+)/g,CMt=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,BMt=/(:[\w-]+\([^)]*\))/gi,bMt=/(:[^\s+>~.[:]+)/g,TMt=/([^\s+>~.[:]+)/g;function hf(r,e){var t=e.exec(r);return t?[r.replace(e," "),t.length]:[r,0]}function aV(r){var e=[0,0,0],t=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[t,n]=hf(t,_Mt),e[1]+=n,[t,n]=hf(t,wMt),e[0]+=n,[t,n]=hf(t,EMt),e[1]+=n,[t,n]=hf(t,CMt),e[2]+=n,[t,n]=hf(t,BMt),e[1]+=n,[t,n]=hf(t,bMt),e[1]+=n,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,n]=hf(t,TMt),e[2]+=n,e.join("")}var Kf=1e-8;function oO(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function zE(r,e){return(r[0]*e[0]+r[1]*e[1])/(oO(r)*oO(e))}function sO(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(zE(r,e))}function AO(r){return r*r*r}function lO(r){return 3*r*r*(1-r)}function uO(r){return 3*r*(1-r)*(1-r)}function cO(r){return(1-r)*(1-r)*(1-r)}function hO(r){return r*r}function fO(r){return 2*r*(1-r)}function dO(r){return(1-r)*(1-r)}class Qe{constructor(e,t,n){this.document=e,this.name=t,this.value=n,this.isNormalizedColor=!1}static empty(e){return new Qe(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:n}=this;return Nd(this.getString()).trim().split(e).map(i=>new Qe(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=iV(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()?Qe.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 rO(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new Qe(this.document,this.name,t)}}Qe.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 oV{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 Ai{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]=Qo(e);return new Ai(n,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=t,i=n]=Qo(e);return new Ai(n,i)}static parsePath(e){for(var t=Qo(e),n=t.length,i=[],a=0;a<n;a+=2)i.push(new Ai(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 sV{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 Ai(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 AV=typeof window<"u"?window:null,lV=typeof fetch<"u"?fetch.bind(void 0):null;class W0{constructor(e){var{fetch:t=lV,window:n=AV}=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 oV,this.mouse=new sV(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:d=0,clipY:g=0}=e,m=Nd(i).replace(/^defer\s/,""),[v,y]=m.split(" "),w=v||"xMidYMid",C=y||"meet",O=a/o,F=s/A,I=Math.min(O,F),T=Math.max(O,F),L=o,N=A;C==="meet"&&(L*=I,N*=I),C==="slice"&&(L*=T,N*=T);var x=new Qe(t,"refX",c),S=new Qe(t,"refY",h),P=x.hasValue()&&S.hasValue();if(P&&n.translate(-I*x.getPixels("x"),-I*S.getPixels("y")),f){var U=I*d,tt=I*g;n.beginPath(),n.moveTo(U,tt),n.lineTo(a,tt),n.lineTo(a,s),n.lineTo(U,s),n.closePath(),n.clip()}if(!P){var q=C==="meet"&&I===F,rt=C==="slice"&&T===F,nt=C==="meet"&&I===O,At=C==="slice"&&T===O;w.startsWith("xMid")&&(q||rt)&&n.translate(a/2-L/2,0),w.endsWith("YMid")&&(nt||At)&&n.translate(0,s/2-N/2),w.startsWith("xMax")&&(q||rt)&&n.translate(a-L,0),w.endsWith("YMax")&&(nt||At)&&n.translate(0,s-N)}switch(!0){case w==="none":n.scale(O,F);break;case C==="meet":n.scale(I,I);break;case C==="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,d=1e3/h;if(this.frameDuration=d,this.readyPromise=new Promise(w=>{this.resolveReady=w}),this.isReady()&&this.render(e,a,o,A,l,u,c),!!t){var g=Date.now(),m=g,v=0,y=()=>{g=Date.now(),v=g-m,v>=d&&(m=g-v%d,this.shouldUpdate(i,s)&&(this.render(e,a,o,A,l,u,c),f.runEvents())),this.intervalId=RS(y)};n||f.start(),this.intervalId=RS(y)}}stop(){this.intervalId&&(RS.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 d=e.getStyle("width"),g=e.getStyle("height");!t&&(h||typeof i!="number"&&typeof a!="number")&&(d.hasValue()&&(f.width=d.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),g.hasValue()&&(f.height=g.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var m=f.clientWidth||f.width,v=f.clientHeight||f.height;if(t&&d.hasValue()&&g.hasValue()&&(m=d.getPixels("x"),v=g.getPixels("y")),u.setCurrent(m,v),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 y=Qo(e.getAttribute("viewBox").getString()),w=0,C=0;if(typeof i=="number"){var O=e.getStyle("width");O.hasValue()?w=O.getPixels("x")/i:isNaN(y[2])||(w=y[2]/i)}if(typeof a=="number"){var F=e.getStyle("height");F.hasValue()?C=F.getPixels("y")/a:isNaN(y[3])||(C=y[3]/a)}w||(w=C),C||(C=w),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(a);var I=e.getStyle("transform",!0,!0);I.setValue("".concat(I.getString()," scale(").concat(1/w,", ").concat(1/C,")"))}n||c.clearRect(0,0,m,v),e.render(c),h&&(this.isFirstRender=!1)}}W0.defaultWindow=AV;W0.defaultFetch=lV;var{defaultFetch:SMt}=W0,xMt=typeof DOMParser<"u"?DOMParser:null;class Bw{constructor(){var{fetch:e=SMt,DOMParser:t=xMt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return xu(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 xu(function*(){var n=yield t.fetch(e),i=yield n.text();return t.parseFromString(i)})()}}class uV{constructor(e,t){this.type="translate",this.point=null,this.point=Ai.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 cV{constructor(e,t,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=Qo(t);this.angle=new Qe(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 hV{constructor(e,t,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=Ai.parseScale(t);(i.x===0||i.y===0)&&(i.x=Kf,i.y=Kf),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 LM{constructor(e,t,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Qo(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,d=1/(a*(l*f-u*h)-o*(A*f-u*c)+s*(A*h-l*c)),g=t.getPixels("x"),m=n.getPixels("y");e.translate(g,m),e.transform(d*(l*f-u*h),d*(u*c-A*f),d*(s*h-o*f),d*(a*f-s*c),d*(o*u-s*l),d*(s*A-a*u)),e.translate(-g,-m)}applyToPoint(e){e.applyTransform(this.matrix)}}class OM extends LM{constructor(e,t,n){super(e,t,n),this.type="skew",this.angle=null,this.angle=new Qe(e,"angle",t)}}class fV extends OM{constructor(e,t,n){super(e,t,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class dV extends OM{constructor(e,t,n){super(e,t,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function IMt(r){return Nd(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function LMt(r){var[e,t]=r.split("(");return[e.trim(),t.trim().replace(")","")]}class mh{constructor(e,t,n){this.document=e,this.transforms=[];var i=IMt(t);i.forEach(a=>{if(a!=="none"){var[o,s]=LMt(a),A=mh.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 mh(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)}}mh.transformTypes={translate:uV,rotate:cV,scale:hV,matrix:LM,skewX:fV,skewY:dV};class On{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=nV(s.nodeName);this.attributes[A]=new Qe(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 Qe(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 Qe(this.document,e,"");return this.attributes[e]=i,i}return n||Qe.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return Qe.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 Qe(this.document,e,"");return this.styles[e]=A,A}return i||Qe.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=mh.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 On?e:this.document.createElement(e);t.parent=this,On.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)})}}On.ignoreChildTypes=["title"];class pV extends On{constructor(e,t,n){super(e,t,n)}}function OMt(r){var e=r.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function FMt(r){return typeof process>"u"?r:r.trim().split(",").map(OMt).join(",")}function RMt(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 MMt(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 Ka{constructor(e,t,n,i,a,o){var s=o?typeof o=="string"?Ka.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=Nd(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return A.forEach(u=>{switch(!0){case(!l.fontStyle&&Ka.styles.includes(u)):u!=="inherit"&&(n=u),l.fontStyle=!0;break;case(!l.fontVariant&&Ka.variants.includes(u)):u!=="inherit"&&(i=u),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&Ka.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 Ka(n,i,a,o,s,t)}toString(){return[RMt(this.fontStyle),this.fontVariant,MMt(this.fontWeight),this.fontSize,FMt(this.fontFamily)].join(" ").trim()}}Ka.styles="normal|italic|oblique|inherit";Ka.variants="normal|small-caps|inherit";Ka.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class js{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 lr extends zt{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 Ai(0,0),this.control=new Ai(0,0),this.current=new Ai(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 Ai(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!==zt.CURVE_TO&&e!==zt.SMOOTH_CURVE_TO&&e!==zt.QUAD_TO&&e!==zt.SMOOTH_QUAD_TO)return this.current;var{current:{x:t,y:n},control:{x:i,y:a}}=this,o=new Ai(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 xh extends On{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 Qe(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 Qe(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=h}var f=this.getStyle("stroke-width");if(f.hasValue()){var d=f.getPixels();e.lineWidth=d||Kf}var g=this.getStyle("stroke-linecap"),m=this.getStyle("stroke-linejoin"),v=this.getStyle("stroke-miterlimit"),y=this.getStyle("stroke-dasharray"),w=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(e.lineCap=g.getString()),m.hasValue()&&(e.lineJoin=m.getString()),v.hasValue()&&(e.miterLimit=v.getNumber()),y.hasValue()&&y.getString()!=="none"){var C=Qo(y.getString());typeof e.setLineDash<"u"?e.setLineDash(C):typeof e.webkitLineDash<"u"?e.webkitLineDash=C:typeof e.mozDash<"u"&&!(C.length===1&&C[0]===0)&&(e.mozDash=C);var O=w.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=O:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=O:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=O)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var F=this.getStyle("font"),I=this.getStyle("font-style"),T=this.getStyle("font-variant"),L=this.getStyle("font-weight"),N=this.getStyle("font-size"),x=this.getStyle("font-family"),S=new Ka(I.getString(),T.getString(),L.getString(),N.hasValue()?"".concat(N.getPixels(!0),"px"):"",x.getString(),Ka.parse(F.getString(),e.font));I.setValue(S.fontStyle),T.setValue(S.fontVariant),L.setValue(S.fontWeight),N.setValue(S.fontSize),x.setValue(S.fontFamily),e.font=S.toString(),N.isPixels()&&(this.document.emSize=N.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class un extends xh{constructor(e,t,n){super(e,t,n),this.type="path",this.pathParser=null,this.pathParser=new lr(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,n=new js;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case lr.MOVE_TO:this.pathM(e,n);break;case lr.LINE_TO:this.pathL(e,n);break;case lr.HORIZ_LINE_TO:this.pathH(e,n);break;case lr.VERT_LINE_TO:this.pathV(e,n);break;case lr.CURVE_TO:this.pathC(e,n);break;case lr.SMOOTH_CURVE_TO:this.pathS(e,n);break;case lr.QUAD_TO:this.pathQ(e,n);break;case lr.SMOOTH_QUAD_TO:this.pathT(e,n);break;case lr.ARC:this.pathA(e,n);break;case lr.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,d]=n[h];c.render(e,f,d)}if(s.isUrlDefinition()){var g=s.getDefinition(),[m,v]=n[i];g.render(e,m,v)}}}static pathM(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}pathM(e,t){var{pathParser:n}=this,{point:i}=un.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}=un.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 Ai((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}=un.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 Ai(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}=un.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}=un.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}=un.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}=un.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}=un.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 Ai(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 d=new Ai(f*i*c.y/a,f*-a*c.x/i),g=new Ai((t.x+u.x)/2+Math.cos(l)*d.x-Math.sin(l)*d.y,(t.y+u.y)/2+Math.sin(l)*d.x+Math.cos(l)*d.y),m=sO([1,0],[(c.x-d.x)/i,(c.y-d.y)/a]),v=[(c.x-d.x)/i,(c.y-d.y)/a],y=[(-c.x-d.x)/i,(-c.y-d.y)/a],w=sO(v,y);return zE(v,y)<=-1&&(w=Math.PI),zE(v,y)>=1&&(w=0),{currentPoint:u,rX:i,rY:a,sweepFlag:A,xAxisRotation:l,centp:g,a1:m,ad:w}}pathA(e,t){var{pathParser:n}=this,{currentPoint:i,rX:a,rY:o,sweepFlag:s,xAxisRotation:A,centp:l,a1:u,ad:c}=un.pathA(n),h=1-s?1:-1,f=u+h*(c/2),d=new Ai(l.x+a*Math.cos(f),l.y+o*Math.sin(f));if(n.addMarkerAngle(d,f-h*Math.PI/2),n.addMarkerAngle(i,f-h*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(u)&&!isNaN(c)){var g=a>o?a:o,m=a>o?1:a/o,v=a>o?o/a:1;e.translate(l.x,l.y),e.rotate(A),e.scale(m,v),e.arc(0,0,g,u,u+c,Boolean(1-s)),e.scale(1/m,1/v),e.rotate(-A),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){un.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class FM extends un{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 Ih extends xh{constructor(e,t,n){super(e,t,new.target===Ih?!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=Ka.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(n);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new js(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 FM?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=Nd(t.textContent||"");return i===0&&(o=eV(o)),i===a&&(o=rV(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=Ka.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=Qo(n.getAttribute("dx").getString()),f=c.length,d=0;d<f;d++){var g=this.getGlyph(a,c,d);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),g.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*(g.horizAdvX||a.horizAdvX)/o,typeof h[d]<"u"&&!isNaN(h[d])&&(this.x+=h[d])}return}var{x:v,y}=this;e.fillStyle&&e.fillText(i,v,y),e.strokeStyle&&e.strokeText(i,v,y)}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=Qo(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 z0 extends Ih{constructor(e,t,n){super(e,t,new.target===z0?!0:n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class NMt extends z0{constructor(){super(...arguments),this.type="textNode"}}let Cv=class extends xh{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 Qe(n,"fontSize",Ka.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()?Qo(h.getString()):null,d=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,m=0,v=0,y=0;f&&(g=f[0],m=f[1]),this.root||(A=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(v=g,y=m,g=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:g,minY:m,refX:u.getValue(),refY:c.getValue(),clip:d,clipX:v,clipY:y}),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 RM extends un{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 js(t,n,t+i,n+a)}getMarkers(){return null}}class gV extends un{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 js(t-i,n-i,t+i,n+i)}getMarkers(){return null}}class vV extends un{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 js(a-n,o-i,a+n,o+i)}getMarkers(){return null}}class mV extends un{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Ai(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Ai(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 js(t,n,i,a)}getMarkers(){var[e,t]=this.getPoints(),n=e.angleTo(t);return[[e,n],[t,n]]}}class MM extends un{constructor(e,t,n){super(e,t,n),this.type="polyline",this.points=[],this.points=Ai.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:n,y:i}]=t,a=new js(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 yV extends MM{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 _V extends On{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 Cv(this.document,null);o.attributes.viewBox=new Qe(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new Qe(this.document,"width","".concat(i,"px")),o.attributes.height=new Qe(this.document,"height","".concat(a,"px")),o.attributes.transform=new Qe(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 Qe(this.document,"x",c*s.width),o.attributes.y=new Qe(this.document,"y",h*s.height),o.render(A),A.restore();var f=e.createPattern(s,"repeat");return f}}class wV extends On{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 Cv(this.document,null);A.type=this.type,A.attributes.viewBox=new Qe(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.refX=new Qe(this.document,"refX",this.getAttribute("refX").getValue()),A.attributes.refY=new Qe(this.document,"refY",this.getAttribute("refY").getValue()),A.attributes.width=new Qe(this.document,"width",this.getAttribute("markerWidth").getValue()),A.attributes.height=new Qe(this.document,"height",this.getAttribute("markerHeight").getValue()),A.attributes.overflow=new Qe(this.document,"overflow",this.getAttribute("overflow").getValue()),A.attributes.fill=new Qe(this.document,"fill",this.getAttribute("fill").getColor("black")),A.attributes.stroke=new Qe(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 EV extends On{constructor(){super(...arguments),this.type="defs"}render(){}}class kB extends xh{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new js;return this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),t}}class NM extends On{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 RM(s,null);c.attributes.x=new Qe(s,"x",-A/3),c.attributes.y=new Qe(s,"y",-A/3),c.attributes.width=new Qe(s,"width",A),c.attributes.height=new Qe(s,"height",A);var h=new kB(s,null);h.attributes.transform=new Qe(s,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[c];var f=new Cv(s,null);f.attributes.x=new Qe(s,"x",0),f.attributes.y=new Qe(s,"y",0),f.attributes.width=new Qe(s,"width",u.width),f.attributes.height=new Qe(s,"height",u.height),f.children=[h];var d=s.createCanvas(u.width,u.height),g=d.getContext("2d");return g.fillStyle=o,f.render(g),g.createPattern(d,"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 Qe(this.document,"color",t);return n.addOpacity(e).getColor()}return t}}class CV extends NM{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 BV extends NM{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 bV extends On{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 HB extends On{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 Qe(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 Qe(e,"from",parseFloat(t.getValue()[a])),n.to=new Qe(e,"to",parseFloat(t.getValue()[o])),n.progress=(i-a)/(o-a)}else n.from=this.from,n.to=this.to;return n}}class TV extends HB{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=new rO(t.getColor()),a=new rO(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 SV extends HB{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=Qo(t.getString()),a=Qo(n.getString()),o=i.map((s,A)=>{var l=a[A];return s+(l-s)*e}).join(" ");return o}}class xV extends On{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 IV extends On{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 LV extends un{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class OV extends Ih{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 FV extends Ih{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 Qe(t,"fontSize",Ka.parse(t.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new js(n,i-o.getPixels("y"),n+this.measureText(e),i))}else if(this.children.length>0){var s=new kB(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 jQ(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 K1(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?jQ(Object(t),!0).forEach(function(n){TM(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):jQ(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class RV extends Ih{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 lr.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case lr.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case lr.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case lr.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case lr.ARC:{var[o,s,A,l,u,c,h,f]=a,d=A>l?A:l,g=A>l?1:A/l,m=A>l?l/A:1;e&&(e.translate(o,s),e.rotate(h),e.scale(g,m),e.arc(0,0,d,u,u+c,Boolean(1-f)),e.scale(1/g,1/m),e.rotate(-h),e.translate(-o,-s));break}case lr.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),d=this.getEquidistantPointOnPath(u+c,h,0),g={p0:f,p1:d},m=f&&d?Math.atan2(d.y-f.y,d.x-f.x):0;if(s){var v=Math.cos(Math.PI/2+m)*s,y=Math.cos(-m)*s;g.p0=K1(K1({},f),{},{x:f.x+v,y:f.y+y}),g.p1=K1(K1({},d),{},{x:d.x+v,y:d.y+y})}return u+=c,{offset:u,segment:g,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(C=>C.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 d=c.reduce((C,O,F)=>F===0?0:C+O||0,0),g=this.measureText(e),m=Math.max(g+d,0);this.textWidth=g,this.textHeight=this.getFontSize(),this.glyphInfo=[];var v=this.getPathLength(),y=this.getStyle("startOffset").getNumber(0)*v,w=0;(s==="middle"||s==="center")&&(w=-m/2),(s==="end"||s==="right")&&(w=-m),w+=y,n.forEach((C,O)=>{var{offset:F,segment:I,rotation:T}=this.findSegmentToFitChar(e,s,m,v,i,w,o,C,O);w=F,!(!I.p0||!I.p1)&&this.glyphInfo.push({text:n[O],p0:I.p0,p1:I.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 lr.MOVE_TO:this.pathM(n,l);break;case lr.LINE_TO:A=this.pathL(n,l);break;case lr.HORIZ_LINE_TO:A=this.pathH(n,l);break;case lr.VERT_LINE_TO:A=this.pathV(n,l);break;case lr.CURVE_TO:this.pathC(n,l);break;case lr.SMOOTH_CURVE_TO:A=this.pathS(n,l);break;case lr.QUAD_TO:this.pathQ(n,l);break;case lr.SMOOTH_QUAD_TO:A=this.pathT(n,l);break;case lr.ARC:l=this.pathA(n);break;case lr.CLOSE_PATH:un.pathZ(n);break}s.type!==lr.CLOSE_PATH?t.push({type:A,points:l,start:{x:a,y:o},pathLength:this.calcLength(a,o,A,l)}):t.push({type:lr.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:n,y:i}=un.pathM(e).point;t.push(n,i)}pathL(e,t){var{x:n,y:i}=un.pathL(e).point;return t.push(n,i),lr.LINE_TO}pathH(e,t){var{x:n,y:i}=un.pathH(e).point;return t.push(n,i),lr.LINE_TO}pathV(e,t){var{x:n,y:i}=un.pathV(e).point;return t.push(n,i),lr.LINE_TO}pathC(e,t){var{point:n,controlPoint:i,currentPoint:a}=un.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}=un.pathS(e);return t.push(n.x,n.y,i.x,i.y,a.x,a.y),lr.CURVE_TO}pathQ(e,t){var{controlPoint:n,currentPoint:i}=un.pathQ(e);t.push(n.x,n.y,i.x,i.y)}pathT(e,t){var{controlPoint:n,currentPoint:i}=un.pathT(e);return t.push(n.x,n.y,i.x,i.y),lr.QUAD_TO}pathA(e){var{rX:t,rY:n,sweepFlag:i,xAxisRotation:a,centp:o,a1:s,ad:A}=un.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 lr.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case lr.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 lr.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 lr.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+Kf),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+Kf)===A)c={x:o+l,y:s+u};else{var h=0,f=0,d=this.getLineLength(t,n,i,a);if(d<Kf)return null;var g=(o-t)*(i-t)+(s-n)*(a-n);g/=d*d,h=t+g*(i-t),f=n+g*(a-n);var m=this.getLineLength(o,s,h,f),v=Math.sqrt(e*e-m*m);l=Math.sqrt(v*v/(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 lr.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 lr.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 lr.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 lr.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*AO(e)+o*lO(e)+i*uO(e)+t*cO(e),c=l*AO(e)+s*lO(e)+a*uO(e)+n*cO(e);return{x:u,y:c}}getPointOnQuadraticBezier(e,t,n,i,a,o,s){var A=o*hO(e)+i*fO(e)+t*dO(e),l=s*hO(e)+a*fO(e)+n*dO(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 PMt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class MV extends xh{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 xu(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 xu(function*(){var n=PMt.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 js(e,t,e+n,t+i)}}class NV extends xh{constructor(){super(...arguments),this.type="symbol"}render(e){}}class PV{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var n=this;return xu(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 PM extends On{constructor(e,t,n){super(e,t,n),this.type="style";var i=Nd(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 v=m.indexOf(":"),y=m.substr(0,v).trim(),w=m.substr(v+1,m.length-v).trim();y&&w&&(f[y]=new Qe(e,y,w))}),e.styles[h]=f,e.stylesSpecificity[h]=aV(h),h==="@font-face"){var d=f["font-family"].getString().replace(/"|'/g,""),g=f.src.getString().split(",");g.forEach(m=>{if(m.indexOf('format("svg")')>0){var v=IM(m);v&&new PV(e).load(d,v)}})}}})}})}}PM.parseExternalUrl=IM;class UV extends xh{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 Cv(t,null),i.attributes.viewBox=new Qe(t,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new Qe(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new Qe(t,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new Qe(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 Qe(t,"width",a.getString())),o.hasValue()&&(i.attributes.height=new Qe(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 mh.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function W1(r,e,t,n,i,a){return r[t*n*4+e*4+a]}function z1(r,e,t,n,i,a,o){r[t*n*4+e*4+a]=o}function Mi(r,e,t){var n=r[e];return n*t}function Jl(r,e,t,n){return e+Math.cos(r)*t+Math.sin(r)*n}class UM extends On{constructor(e,t,n){super(e,t,n),this.type="feColorMatrix";var i=Qo(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=[Jl(o,.213,.787,-.213),Jl(o,.715,-.715,-.715),Jl(o,.072,-.072,.928),0,0,Jl(o,.213,-.213,.143),Jl(o,.715,.285,.14),Jl(o,.072,-.072,-.283),0,0,Jl(o,.213,-.213,-.787),Jl(o,.715,-.715,.715),Jl(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=W1(A.data,u,l,i,a,0),h=W1(A.data,u,l,i,a,1),f=W1(A.data,u,l,i,a,2),d=W1(A.data,u,l,i,a,3),g=Mi(s,0,c)+Mi(s,1,h)+Mi(s,2,f)+Mi(s,3,d)+Mi(s,4,1),m=Mi(s,5,c)+Mi(s,6,h)+Mi(s,7,f)+Mi(s,8,d)+Mi(s,9,1),v=Mi(s,10,c)+Mi(s,11,h)+Mi(s,12,f)+Mi(s,13,d)+Mi(s,14,1),y=Mi(s,15,c)+Mi(s,16,h)+Mi(s,17,f)+Mi(s,18,d)+Mi(s,19,1);o&&(g=0,m=0,v=0,y*=d/255),z1(A.data,u,l,i,a,0,g),z1(A.data,u,l,i,a,1,m),z1(A.data,u,l,i,a,2,v),z1(A.data,u,l,i,a,3,y)}e.clearRect(0,0,i,a),e.putImageData(A,0,0)}}class Y0 extends On{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 js;this.children.forEach(d=>{A.addBoundingBox(d.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,Y0.ignoreStyles),u=n.createCanvas(i+o,a+s),c=u.getContext("2d");n.screen.setDefaults(c),this.renderChildren(c),new UM(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){}}Y0.ignoreStyles=["mask","transform","clip-path"];var KQ=()=>{};class DV extends On{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,n=Reflect.getPrototypeOf(e),{beginPath:i,closePath:a}=e;n&&(n.beginPath=KQ,n.closePath=KQ),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=mh.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 X0 extends On{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(v=>{var y=v.extraFilterDistance||0;o=Math.max(o,y),s=Math.max(s,y)});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),d=this.removeStyles(t,X0.ignoreStyles),g=n.createCanvas(u,c),m=g.getContext("2d");n.screen.setDefaults(m),m.translate(-h+o,-f+s),t.render(m),i.forEach(v=>{typeof v.apply=="function"&&v.apply(m,0,0,u,c)}),e.drawImage(g,0,0,u,c,h-o,f-s,u,c),this.restoreStyles(t,d)}}}render(e){}}X0.ignoreStyles=["filter","transform","clip-path"];class QV extends On{constructor(e,t,n){super(e,t,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,n,i,a){}}class kV extends On{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,n,i,a){}}class HV extends On{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,n,i,a){}}class GV extends On{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)),dMt(l,t,n,i,a,s),A&&A.removeChild(l)}}class $V extends On{constructor(){super(...arguments),this.type="title"}}class VV extends On{constructor(){super(...arguments),this.type="desc"}}var UMt={svg:Cv,rect:RM,circle:gV,ellipse:vV,line:mV,polyline:MM,polygon:yV,path:un,pattern:_V,marker:wV,defs:EV,linearGradient:CV,radialGradient:BV,stop:bV,animate:HB,animateColor:TV,animateTransform:SV,font:xV,"font-face":IV,"missing-glyph":LV,glyph:FM,text:Ih,tspan:z0,tref:OV,a:FV,textPath:RV,image:MV,g:kB,symbol:NV,style:PM,use:UV,mask:Y0,clipPath:DV,filter:X0,feDropShadow:QV,feMorphology:kV,feComposite:HV,feColorMatrix:UM,feGaussianBlur:GV,title:$V,desc:VV};function WQ(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 DMt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?WQ(Object(t),!0).forEach(function(n){TM(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):WQ(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function QMt(r,e){var t=document.createElement("canvas");return t.width=r,t.height=e,t}function kMt(r){return pO.apply(this,arguments)}function pO(){return pO=xu(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})}),pO.apply(this,arguments)}class _u{constructor(e){var{rootEmSize:t=12,emSize:n=12,createCanvas:i=_u.createCanvas,createImage:a=_u.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=_u.elementTypes[t];return typeof n<"u"?new n(this,e):new pV(this,e)}createTextNode(e){return new NMt(this,e)}setViewBox(e){this.screen.setViewBox(DMt({document:this},e))}}_u.createCanvas=QMt;_u.createImage=kMt;_u.elementTypes=UMt;function zQ(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 ff(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?zQ(Object(t),!0).forEach(function(n){TM(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):zQ(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class Lf{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Bw(n),this.screen=new W0(e,n),this.options=n;var i=new _u(this,n),a=i.createDocumentElement(t);this.document=i,this.documentElement=a}static from(e,t){var n=arguments;return xu(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:{},a=new Bw(i),o=yield a.parse(t);return new Lf(e,o,i)})()}static fromString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new Bw(n),a=i.parseFromString(t);return new Lf(e,a,n)}fork(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Lf.from(e,t,ff(ff({},this.options),n))}forkString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Lf.fromString(e,t,ff(ff({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return xu(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};t.start(ff({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,ff(ff({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 HMt=Object.freeze(Object.defineProperty({__proto__:null,default:Lf,AElement:FV,AnimateColorElement:TV,AnimateElement:HB,AnimateTransformElement:SV,BoundingBox:js,CB1:AO,CB2:lO,CB3:uO,CB4:cO,Canvg:Lf,CircleElement:gV,ClipPathElement:DV,DefsElement:EV,DescElement:VV,Document:_u,Element:On,EllipseElement:vV,FeColorMatrixElement:UM,FeCompositeElement:HV,FeDropShadowElement:QV,FeGaussianBlurElement:GV,FeMorphologyElement:kV,FilterElement:X0,Font:Ka,FontElement:xV,FontFaceElement:IV,GElement:kB,GlyphElement:FM,GradientElement:NM,ImageElement:MV,LineElement:mV,LinearGradientElement:CV,MarkerElement:wV,MaskElement:Y0,Matrix:LM,MissingGlyphElement:LV,Mouse:sV,PSEUDO_ZERO:Kf,Parser:Bw,PathElement:un,PathParser:lr,PatternElement:_V,Point:Ai,PolygonElement:yV,PolylineElement:MM,Property:Qe,QB1:hO,QB2:fO,QB3:dO,RadialGradientElement:BV,RectElement:RM,RenderedElement:xh,Rotate:cV,SVGElement:Cv,SVGFontLoader:PV,Scale:hV,Screen:W0,Skew:OM,SkewX:fV,SkewY:dV,StopElement:bV,StyleElement:PM,SymbolElement:NV,TRefElement:OV,TSpanElement:z0,TextElement:Ih,TextPathElement:RV,TitleElement:$V,Transform:mh,Translate:uV,UnknownElement:pV,UseElement:UV,ViewPort:oV,compressSpaces:Nd,getSelectorSpecificity:aV,normalizeAttributeName:nV,normalizeColor:iV,parseExternalUrl:IM,presets:mMt,toNumbers:Qo,trimLeft:eV,trimRight:rV,vectorMagnitude:oO,vectorsAngle:sO,vectorsRatio:zE},Symbol.toStringTag,{value:"Module"}));var jV=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function BDt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function KV(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 gO={},GMt={get exports(){return gO},set exports(r){gO=r}};const $Mt=KV(KY);(function(r,e){(function(n,i){r.exports=i($Mt)})(jV,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:()=>H,LoadingPlugin:()=>ot,default:()=>ut,useLoading:()=>J});var s=a(976);function A(X){var It;typeof X.remove<"u"?X.remove():(It=X.parentNode)==null||It.removeChild(X)}function l(X,It,at){let j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const Z=(0,s.h)(X,It,j),ft=document.createElement("div");return ft.classList.add("vld-container"),at.appendChild(ft),(0,s.render)(Z,ft),Z.component}function u(){return typeof window<"u"}const c=u()?window.HTMLElement:Object,h=["aria-busy"],f={class:"vl-icon"};function d(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createBlock)(s.Transition,{name:X.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":X.isFullPage}]),"aria-busy":X.isActive,"aria-label":"Loading",style:(0,s.normalizeStyle)({zIndex:X.zIndex})},[(0,s.createElementVNode)("div",{class:"vl-background",onClick:It[0]||(It[0]=(0,s.withModifiers)(function(){return X.cancel&&X.cancel(...arguments)},["prevent"])),style:(0,s.normalizeStyle)(X.bgStyle)},null,4),(0,s.createElementVNode)("div",f,[(0,s.renderSlot)(X.$slots,"before"),(0,s.renderSlot)(X.$slots,"default",{},()=>[((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(X.loader),{color:X.color,width:X.width,height:X.height},null,8,["color","width","height"]))]),(0,s.renderSlot)(X.$slots,"after")])],14,h),[[s.vShow,X.isActive]])]),_:3},8,["name"])}const g={mounted(){this.enforceFocus&&document.addEventListener("focusin",this.focusIn)},methods:{focusIn(X){if(!this.isActive||X.target===this.$el||this.$el.contains(X.target))return;let It=this.container?this.container:this.isFullPage?null:this.$el.parentElement;(this.isFullPage||It&&It.contains(X.target))&&(X.preventDefault(),this.$el.focus())}},beforeUnmount(){document.removeEventListener("focusin",this.focusIn)}},m=["width","height","stroke"],y=[(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 w(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",width:X.width,height:X.height,stroke:X.color},y,8,m)}const C=(0,s.defineComponent)({name:"spinner",props:{color:{type:String,default:"#000"},height:{type:Number,default:64},width:{type:Number,default:64}}});var O=a(657);const I=(0,O.default)(C,[["render",w]]),T=["fill","width","height"],N=[(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 x(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:X.color,width:X.width,height:X.height},N,8,T)}const S=(0,s.defineComponent)({name:"dots",props:{color:{type:String,default:"#000"},height:{type:Number,default:240},width:{type:Number,default:60}}}),U=(0,O.default)(S,[["render",x]]),tt=["height","width","fill"],rt=[(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 nt(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",height:X.height,width:X.width,fill:X.color},rt,8,tt)}const At=(0,s.defineComponent)({name:"bars",props:{color:{type:String,default:"#000"},height:{type:Number,default:40},width:{type:Number,default:40}}}),M={Spinner:I,Dots:U,Bars:(0,O.default)(At,[["render",nt]])},W=(0,s.defineComponent)({name:"VueLoading",mixins:[g],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:M,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 X=this.$el.parentElement;(0,s.render)(null,X),A(X)},150))},disableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.add("vl-shown")},enableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.remove("vl-shown")},keyPress(X){X.keyCode===27&&this.cancel()}},watch:{active(X){this.isActive=X},isActive(X){X?this.disableScroll():this.enableScroll()}},computed:{bgStyle(){return{background:this.backgroundColor,opacity:this.opacity}}},beforeUnmount(){document.removeEventListener("keyup",this.keyPress)}}),H=(0,O.default)(W,[["render",d]]);function J(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{show(){let at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It;const ft={...X,...at,...{programmatic:!0,lockScroll:!0,isFullPage:!1,active:!0}};let it=ft.container;ft.container||(it=document.body,ft.isFullPage=!0);const V={...It,...j};return{hide:l(H,ft,it,V).ctx.hide}}}}const ot=function(X){let It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const j=J(It,at);X.config.globalProperties.$loading=j,X.provide("$loading",j)},ut=H})(),o})())})(GMt);/*!
|
||
* vue-router v4.1.6
|
||
* (c) 2022 Eduardo San Martin Morote
|
||
* @license MIT
|
||
*/const Kp=typeof window<"u";function VMt(r){return r.__esModule||r[Symbol.toStringTag]==="Module"}const vn=Object.assign;function PS(r,e){const t={};for(const n in e){const i=e[n];t[n]=CA(i)?i.map(r):r(i)}return t}const Ey=()=>{},CA=Array.isArray,jMt=/\/$/,KMt=r=>r.replace(jMt,"");function US(r,e,t="/"){let n,i={},a="",o="";const s=e.indexOf("#");let A=e.indexOf("?");return s<A&&s>=0&&(A=-1),A>-1&&(n=e.slice(0,A),a=e.slice(A+1,s>-1?s:e.length),i=r(a)),s>-1&&(n=n||e.slice(0,s),o=e.slice(s,e.length)),n=XMt(n??e,t),{fullPath:n+(a&&"?")+a+o,path:n,query:i,hash:o}}function WMt(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function YQ(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function zMt(r,e,t){const n=e.matched.length-1,i=t.matched.length-1;return n>-1&&n===i&&jg(e.matched[n],t.matched[i])&&WV(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function jg(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function WV(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!YMt(r[t],e[t]))return!1;return!0}function YMt(r,e){return CA(r)?XQ(r,e):CA(e)?XQ(e,r):r===e}function XQ(r,e){return CA(e)?r.length===e.length&&r.every((t,n)=>t===e[n]):r.length===1&&r[0]===e}function XMt(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),n=r.split("/");let i=t.length-1,a,o;for(a=0;a<n.length;a++)if(o=n[a],o!==".")if(o==="..")i>1&&i--;else break;return t.slice(0,i).join("/")+"/"+n.slice(a-(a===n.length?1:0)).join("/")}var o0;(function(r){r.pop="pop",r.push="push"})(o0||(o0={}));var Cy;(function(r){r.back="back",r.forward="forward",r.unknown=""})(Cy||(Cy={}));function qMt(r){if(!r)if(Kp){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),KMt(r)}const ZMt=/^[^#]+#/;function JMt(r,e){return r.replace(ZMt,"#")+e}function tNt(r,e){const t=document.documentElement.getBoundingClientRect(),n=r.getBoundingClientRect();return{behavior:e.behavior,left:n.left-t.left-(e.left||0),top:n.top-t.top-(e.top||0)}}const GB=()=>({left:window.pageXOffset,top:window.pageYOffset});function eNt(r){let e;if("el"in r){const t=r.el,n=typeof t=="string"&&t.startsWith("#"),i=typeof t=="string"?n?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!i)return;e=tNt(i,r)}else e=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function qQ(r,e){return(history.state?history.state.position-e:-1)+r}const vO=new Map;function rNt(r,e){vO.set(r,e)}function nNt(r){const e=vO.get(r);return vO.delete(r),e}let iNt=()=>location.protocol+"//"+location.host;function zV(r,e){const{pathname:t,search:n,hash:i}=e,a=r.indexOf("#");if(a>-1){let s=i.includes(r.slice(a))?r.slice(a).length:1,A=i.slice(s);return A[0]!=="/"&&(A="/"+A),YQ(A,"")}return YQ(t,r)+n+i}function aNt(r,e,t,n){let i=[],a=[],o=null;const s=({state:h})=>{const f=zV(r,location),d=t.value,g=e.value;let m=0;if(h){if(t.value=f,e.value=h,o&&o===d){o=null;return}m=g?h.position-g.position:0}else n(f);i.forEach(v=>{v(t.value,d,{delta:m,type:o0.pop,direction:m?m>0?Cy.forward:Cy.back:Cy.unknown})})};function A(){o=t.value}function l(h){i.push(h);const f=()=>{const d=i.indexOf(h);d>-1&&i.splice(d,1)};return a.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(vn({},h.state,{scroll:GB()}),"")}function c(){for(const h of a)h();a=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",u),{pauseListeners:A,listen:l,destroy:c}}function ZQ(r,e,t,n=!1,i=!1){return{back:r,current:e,forward:t,replaced:n,position:window.history.length,scroll:i?GB():null}}function oNt(r){const{history:e,location:t}=window,n={value:zV(r,t)},i={value:e.state};i.value||a(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function a(A,l,u){const c=r.indexOf("#"),h=c>-1?(t.host&&document.querySelector("base")?r:r.slice(c))+A:iNt()+r+A;try{e[u?"replaceState":"pushState"](l,"",h),i.value=l}catch(f){console.error(f),t[u?"replace":"assign"](h)}}function o(A,l){const u=vn({},e.state,ZQ(i.value.back,A,i.value.forward,!0),l,{position:i.value.position});a(A,u,!0),n.value=A}function s(A,l){const u=vn({},i.value,e.state,{forward:A,scroll:GB()});a(u.current,u,!0);const c=vn({},ZQ(n.value,A,null),{position:u.position+1},l);a(A,c,!1),n.value=A}return{location:n,state:i,push:s,replace:o}}function sNt(r){r=qMt(r);const e=oNt(r),t=aNt(r,e.state,e.location,e.replace);function n(a,o=!0){o||t.pauseListeners(),history.go(a)}const i=vn({location:"",base:r,go:n,createHref:JMt.bind(null,r)},e,t);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function ANt(r){return typeof r=="string"||r&&typeof r=="object"}function YV(r){return typeof r=="string"||typeof r=="symbol"}const yc={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},XV=Symbol("");var JQ;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(JQ||(JQ={}));function Kg(r,e){return vn(new Error,{type:r,[XV]:!0},e)}function tu(r,e){return r instanceof Error&&XV in r&&(e==null||!!(r.type&e))}const t6="[^/]+?",lNt={sensitive:!1,strict:!1,start:!0,end:!0},uNt=/[.+*?^${}()[\]/\\]/g;function cNt(r,e){const t=vn({},lNt,e),n=[];let i=t.start?"^":"";const a=[];for(const l of r){const u=l.length?[]:[90];t.strict&&!l.length&&(i+="/");for(let c=0;c<l.length;c++){const h=l[c];let f=40+(t.sensitive?.25:0);if(h.type===0)c||(i+="/"),i+=h.value.replace(uNt,"\\$&"),f+=40;else if(h.type===1){const{value:d,repeatable:g,optional:m,regexp:v}=h;a.push({name:d,repeatable:g,optional:m});const y=v||t6;if(y!==t6){f+=10;try{new RegExp(`(${y})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${d}" (${y}): `+C.message)}}let w=g?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;c||(w=m&&l.length<2?`(?:/${w})`:"/"+w),m&&(w+="?"),i+=w,f+=20,m&&(f+=-8),g&&(f+=-20),y===".*"&&(f+=-50)}u.push(f)}n.push(u)}if(t.strict&&t.end){const l=n.length-1;n[l][n[l].length-1]+=.7000000000000001}t.strict||(i+="/?"),t.end?i+="$":t.strict&&(i+="(?:/|$)");const o=new RegExp(i,t.sensitive?"":"i");function s(l){const u=l.match(o),c={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",d=a[h-1];c[d.name]=f&&d.repeatable?f.split("/"):f}return c}function A(l){let u="",c=!1;for(const h of r){(!c||!u.endsWith("/"))&&(u+="/"),c=!1;for(const f of h)if(f.type===0)u+=f.value;else if(f.type===1){const{value:d,repeatable:g,optional:m}=f,v=d in l?l[d]:"";if(CA(v)&&!g)throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);const y=CA(v)?v.join("/"):v;if(!y)if(m)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):c=!0);else throw new Error(`Missing required param "${d}"`);u+=y}}return u||"/"}return{re:o,score:n,keys:a,parse:s,stringify:A}}function hNt(r,e){let t=0;for(;t<r.length&&t<e.length;){const n=e[t]-r[t];if(n)return n;t++}return r.length<e.length?r.length===1&&r[0]===40+40?-1:1:r.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function fNt(r,e){let t=0;const n=r.score,i=e.score;for(;t<n.length&&t<i.length;){const a=hNt(n[t],i[t]);if(a)return a;t++}if(Math.abs(i.length-n.length)===1){if(e6(n))return 1;if(e6(i))return-1}return i.length-n.length}function e6(r){const e=r[r.length-1];return r.length>0&&e[e.length-1]<0}const dNt={type:0,value:""},pNt=/[a-zA-Z0-9_]/;function gNt(r){if(!r)return[[]];if(r==="/")return[[dNt]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,n=t;const i=[];let a;function o(){a&&i.push(a),a=[]}let s=0,A,l="",u="";function c(){l&&(t===0?a.push({type:0,value:l}):t===1||t===2||t===3?(a.length>1&&(A==="*"||A==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:A==="*"||A==="+",optional:A==="*"||A==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=A}for(;s<r.length;){if(A=r[s++],A==="\\"&&t!==2){n=t,t=4;continue}switch(t){case 0:A==="/"?(l&&c(),o()):A===":"?(c(),t=1):h();break;case 4:h(),t=n;break;case 1:A==="("?t=2:pNt.test(A)?h():(c(),t=0,A!=="*"&&A!=="?"&&A!=="+"&&s--);break;case 2:A===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+A:t=3:u+=A;break;case 3:c(),t=0,A!=="*"&&A!=="?"&&A!=="+"&&s--,u="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${l}"`),c(),o(),i}function vNt(r,e,t){const n=cNt(gNt(r.path),t),i=vn(n,{record:r,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function mNt(r,e){const t=[],n=new Map;e=i6({strict:!1,end:!0,sensitive:!1},e);function i(u){return n.get(u)}function a(u,c,h){const f=!h,d=yNt(u);d.aliasOf=h&&h.record;const g=i6(e,u),m=[d];if("alias"in u){const w=typeof u.alias=="string"?[u.alias]:u.alias;for(const C of w)m.push(vn({},d,{components:h?h.record.components:d.components,path:C,aliasOf:h?h.record:d}))}let v,y;for(const w of m){const{path:C}=w;if(c&&C[0]!=="/"){const O=c.record.path,F=O[O.length-1]==="/"?"":"/";w.path=c.record.path+(C&&F+C)}if(v=vNt(w,c,g),h?h.alias.push(v):(y=y||v,y!==v&&y.alias.push(v),f&&u.name&&!n6(v)&&o(u.name)),d.children){const O=d.children;for(let F=0;F<O.length;F++)a(O[F],v,h&&h.children[F])}h=h||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&A(v)}return y?()=>{o(y)}:Ey}function o(u){if(YV(u)){const c=n.get(u);c&&(n.delete(u),t.splice(t.indexOf(c),1),c.children.forEach(o),c.alias.forEach(o))}else{const c=t.indexOf(u);c>-1&&(t.splice(c,1),u.record.name&&n.delete(u.record.name),u.children.forEach(o),u.alias.forEach(o))}}function s(){return t}function A(u){let c=0;for(;c<t.length&&fNt(u,t[c])>=0&&(u.record.path!==t[c].record.path||!qV(u,t[c]));)c++;t.splice(c,0,u),u.record.name&&!n6(u)&&n.set(u.record.name,u)}function l(u,c){let h,f={},d,g;if("name"in u&&u.name){if(h=n.get(u.name),!h)throw Kg(1,{location:u});g=h.record.name,f=vn(r6(c.params,h.keys.filter(y=>!y.optional).map(y=>y.name)),u.params&&r6(u.params,h.keys.map(y=>y.name))),d=h.stringify(f)}else if("path"in u)d=u.path,h=t.find(y=>y.re.test(d)),h&&(f=h.parse(d),g=h.record.name);else{if(h=c.name?n.get(c.name):t.find(y=>y.re.test(c.path)),!h)throw Kg(1,{location:u,currentLocation:c});g=h.record.name,f=vn({},c.params,u.params),d=h.stringify(f)}const m=[];let v=h;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:d,params:f,matched:m,meta:wNt(m)}}return r.forEach(u=>a(u)),{addRoute:a,resolve:l,removeRoute:o,getRoutes:s,getRecordMatcher:i}}function r6(r,e){const t={};for(const n of e)n in r&&(t[n]=r[n]);return t}function yNt(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:_Nt(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}}}function _Nt(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const n in r.components)e[n]=typeof t=="boolean"?t:t[n];return e}function n6(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function wNt(r){return r.reduce((e,t)=>vn(e,t.meta),{})}function i6(r,e){const t={};for(const n in r)t[n]=n in e?e[n]:r[n];return t}function qV(r,e){return e.children.some(t=>t===r||qV(r,t))}const ZV=/#/g,ENt=/&/g,CNt=/\//g,BNt=/=/g,bNt=/\?/g,JV=/\+/g,TNt=/%5B/g,SNt=/%5D/g,tj=/%5E/g,xNt=/%60/g,ej=/%7B/g,INt=/%7C/g,rj=/%7D/g,LNt=/%20/g;function DM(r){return encodeURI(""+r).replace(INt,"|").replace(TNt,"[").replace(SNt,"]")}function ONt(r){return DM(r).replace(ej,"{").replace(rj,"}").replace(tj,"^")}function mO(r){return DM(r).replace(JV,"%2B").replace(LNt,"+").replace(ZV,"%23").replace(ENt,"%26").replace(xNt,"`").replace(ej,"{").replace(rj,"}").replace(tj,"^")}function FNt(r){return mO(r).replace(BNt,"%3D")}function RNt(r){return DM(r).replace(ZV,"%23").replace(bNt,"%3F")}function MNt(r){return r==null?"":RNt(r).replace(CNt,"%2F")}function YE(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function NNt(r){const e={};if(r===""||r==="?")return e;const n=(r[0]==="?"?r.slice(1):r).split("&");for(let i=0;i<n.length;++i){const a=n[i].replace(JV," "),o=a.indexOf("="),s=YE(o<0?a:a.slice(0,o)),A=o<0?null:YE(a.slice(o+1));if(s in e){let l=e[s];CA(l)||(l=e[s]=[l]),l.push(A)}else e[s]=A}return e}function a6(r){let e="";for(let t in r){const n=r[t];if(t=FNt(t),n==null){n!==void 0&&(e+=(e.length?"&":"")+t);continue}(CA(n)?n.map(a=>a&&mO(a)):[n&&mO(n)]).forEach(a=>{a!==void 0&&(e+=(e.length?"&":"")+t,a!=null&&(e+="="+a))})}return e}function PNt(r){const e={};for(const t in r){const n=r[t];n!==void 0&&(e[t]=CA(n)?n.map(i=>i==null?null:""+i):n==null?n:""+n)}return e}const UNt=Symbol(""),o6=Symbol(""),QM=Symbol(""),nj=Symbol(""),yO=Symbol("");function Im(){let r=[];function e(n){return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}function t(){r=[]}return{add:e,list:()=>r,reset:t}}function Ic(r,e,t,n,i){const a=n&&(n.enterCallbacks[i]=n.enterCallbacks[i]||[]);return()=>new Promise((o,s)=>{const A=c=>{c===!1?s(Kg(4,{from:t,to:e})):c instanceof Error?s(c):ANt(c)?s(Kg(2,{from:e,to:c})):(a&&n.enterCallbacks[i]===a&&typeof c=="function"&&a.push(c),o())},l=r.call(n&&n.instances[i],e,t,A);let u=Promise.resolve(l);r.length<3&&(u=u.then(A)),u.catch(c=>s(c))})}function DS(r,e,t,n){const i=[];for(const a of r)for(const o in a.components){let s=a.components[o];if(!(e!=="beforeRouteEnter"&&!a.instances[o]))if(DNt(s)){const l=(s.__vccOpts||s)[e];l&&i.push(Ic(l,t,n,a,o))}else{let A=s();i.push(()=>A.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${a.path}"`));const u=VMt(l)?l.default:l;a.components[o]=u;const h=(u.__vccOpts||u)[e];return h&&Ic(h,t,n,a,o)()}))}}return i}function DNt(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function s6(r){const e=Be(QM),t=Be(nj),n=Ze(()=>e.resolve(Rf(r.to))),i=Ze(()=>{const{matched:A}=n.value,{length:l}=A,u=A[l-1],c=t.matched;if(!u||!c.length)return-1;const h=c.findIndex(jg.bind(null,u));if(h>-1)return h;const f=A6(A[l-2]);return l>1&&A6(u)===f&&c[c.length-1].path!==f?c.findIndex(jg.bind(null,A[l-2])):h}),a=Ze(()=>i.value>-1&&GNt(t.params,n.value.params)),o=Ze(()=>i.value>-1&&i.value===t.matched.length-1&&WV(t.params,n.value.params));function s(A={}){return HNt(A)?e[Rf(r.replace)?"replace":"push"](Rf(r.to)).catch(Ey):Promise.resolve()}return{route:n,href:Ze(()=>n.value.href),isActive:a,isExactActive:o,navigate:s}}const QNt=v0({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:s6,setup(r,{slots:e}){const t=vd(s6(r)),{options:n}=Be(QM),i=Ze(()=>({[l6(r.activeClass,n.linkActiveClass,"router-link-active")]:t.isActive,[l6(r.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const a=e.default&&e.default(t);return r.custom?a:EC("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:i.value},a)}}}),kNt=QNt;function HNt(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function GNt(r,e){for(const t in e){const n=e[t],i=r[t];if(typeof n=="string"){if(n!==i)return!1}else if(!CA(i)||i.length!==n.length||n.some((a,o)=>a!==i[o]))return!1}return!0}function A6(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const l6=(r,e,t)=>r??e??t,$Nt=v0({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const n=Be(yO),i=Ze(()=>r.route||n.value),a=Be(o6,0),o=Ze(()=>{let l=Rf(a);const{matched:u}=i.value;let c;for(;(c=u[l])&&!c.components;)l++;return l}),s=Ze(()=>i.value.matched[o.value]);Qr(o6,Ze(()=>o.value+1)),Qr(UNt,s),Qr(yO,i);const A=Fo();return ye(()=>[A.value,s.value,r.name],([l,u,c],[h,f,d])=>{u&&(u.instances[c]=l,f&&f!==u&&l&&l===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),l&&u&&(!f||!jg(u,f)||!h)&&(u.enterCallbacks[c]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=i.value,u=r.name,c=s.value,h=c&&c.components[u];if(!h)return u6(t.default,{Component:h,route:l});const f=c.props[u],d=f?f===!0?l.params:typeof f=="function"?f(l):f:null,m=EC(h,vn({},d,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(c.instances[u]=null)},ref:A}));return u6(t.default,{Component:m,route:l})||m}}});function u6(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const VNt=$Nt;function jNt(r){const e=mNt(r.routes,r),t=r.parseQuery||NNt,n=r.stringifyQuery||a6,i=r.history,a=Im(),o=Im(),s=Im(),A=c4(yc);let l=yc;Kp&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=PS.bind(null,H=>""+H),c=PS.bind(null,MNt),h=PS.bind(null,YE);function f(H,J){let ot,ut;return YV(H)?(ot=e.getRecordMatcher(H),ut=J):ut=H,e.addRoute(ut,ot)}function d(H){const J=e.getRecordMatcher(H);J&&e.removeRoute(J)}function g(){return e.getRoutes().map(H=>H.record)}function m(H){return!!e.getRecordMatcher(H)}function v(H,J){if(J=vn({},J||A.value),typeof H=="string"){const j=US(t,H,J.path),Z=e.resolve({path:j.path},J),ft=i.createHref(j.fullPath);return vn(j,Z,{params:h(Z.params),hash:YE(j.hash),redirectedFrom:void 0,href:ft})}let ot;if("path"in H)ot=vn({},H,{path:US(t,H.path,J.path).path});else{const j=vn({},H.params);for(const Z in j)j[Z]==null&&delete j[Z];ot=vn({},H,{params:c(H.params)}),J.params=c(J.params)}const ut=e.resolve(ot,J),X=H.hash||"";ut.params=u(h(ut.params));const It=WMt(n,vn({},H,{hash:ONt(X),path:ut.path})),at=i.createHref(It);return vn({fullPath:It,hash:X,query:n===a6?PNt(H.query):H.query||{}},ut,{redirectedFrom:void 0,href:at})}function y(H){return typeof H=="string"?US(t,H,A.value.path):vn({},H)}function w(H,J){if(l!==H)return Kg(8,{from:J,to:H})}function C(H){return I(H)}function O(H){return C(vn(y(H),{replace:!0}))}function F(H){const J=H.matched[H.matched.length-1];if(J&&J.redirect){const{redirect:ot}=J;let ut=typeof ot=="function"?ot(H):ot;return typeof ut=="string"&&(ut=ut.includes("?")||ut.includes("#")?ut=y(ut):{path:ut},ut.params={}),vn({query:H.query,hash:H.hash,params:"path"in ut?{}:H.params},ut)}}function I(H,J){const ot=l=v(H),ut=A.value,X=H.state,It=H.force,at=H.replace===!0,j=F(ot);if(j)return I(vn(y(j),{state:typeof j=="object"?vn({},X,j.state):X,force:It,replace:at}),J||ot);const Z=ot;Z.redirectedFrom=J;let ft;return!It&&zMt(n,ut,ot)&&(ft=Kg(16,{to:Z,from:ut}),ct(ut,ut,!0,!1)),(ft?Promise.resolve(ft):L(Z,ut)).catch(it=>tu(it)?tu(it,2)?it:At(it):rt(it,Z,ut)).then(it=>{if(it){if(tu(it,2))return I(vn({replace:at},y(it.to),{state:typeof it.to=="object"?vn({},X,it.to.state):X,force:It}),J||Z)}else it=x(Z,ut,!0,at,X);return N(Z,ut,it),it})}function T(H,J){const ot=w(H,J);return ot?Promise.reject(ot):Promise.resolve()}function L(H,J){let ot;const[ut,X,It]=KNt(H,J);ot=DS(ut.reverse(),"beforeRouteLeave",H,J);for(const j of ut)j.leaveGuards.forEach(Z=>{ot.push(Ic(Z,H,J))});const at=T.bind(null,H,J);return ot.push(at),Fp(ot).then(()=>{ot=[];for(const j of a.list())ot.push(Ic(j,H,J));return ot.push(at),Fp(ot)}).then(()=>{ot=DS(X,"beforeRouteUpdate",H,J);for(const j of X)j.updateGuards.forEach(Z=>{ot.push(Ic(Z,H,J))});return ot.push(at),Fp(ot)}).then(()=>{ot=[];for(const j of H.matched)if(j.beforeEnter&&!J.matched.includes(j))if(CA(j.beforeEnter))for(const Z of j.beforeEnter)ot.push(Ic(Z,H,J));else ot.push(Ic(j.beforeEnter,H,J));return ot.push(at),Fp(ot)}).then(()=>(H.matched.forEach(j=>j.enterCallbacks={}),ot=DS(It,"beforeRouteEnter",H,J),ot.push(at),Fp(ot))).then(()=>{ot=[];for(const j of o.list())ot.push(Ic(j,H,J));return ot.push(at),Fp(ot)}).catch(j=>tu(j,8)?j:Promise.reject(j))}function N(H,J,ot){for(const ut of s.list())ut(H,J,ot)}function x(H,J,ot,ut,X){const It=w(H,J);if(It)return It;const at=J===yc,j=Kp?history.state:{};ot&&(ut||at?i.replace(H.fullPath,vn({scroll:at&&j&&j.scroll},X)):i.push(H.fullPath,X)),A.value=H,ct(H,J,ot,at),At()}let S;function P(){S||(S=i.listen((H,J,ot)=>{if(!Y.listening)return;const ut=v(H),X=F(ut);if(X){I(vn(X,{replace:!0}),ut).catch(Ey);return}l=ut;const It=A.value;Kp&&rNt(qQ(It.fullPath,ot.delta),GB()),L(ut,It).catch(at=>tu(at,12)?at:tu(at,2)?(I(at.to,ut).then(j=>{tu(j,20)&&!ot.delta&&ot.type===o0.pop&&i.go(-1,!1)}).catch(Ey),Promise.reject()):(ot.delta&&i.go(-ot.delta,!1),rt(at,ut,It))).then(at=>{at=at||x(ut,It,!1),at&&(ot.delta&&!tu(at,8)?i.go(-ot.delta,!1):ot.type===o0.pop&&tu(at,20)&&i.go(-1,!1)),N(ut,It,at)}).catch(Ey)}))}let U=Im(),tt=Im(),q;function rt(H,J,ot){At(H);const ut=tt.list();return ut.length?ut.forEach(X=>X(H,J,ot)):console.error(H),Promise.reject(H)}function nt(){return q&&A.value!==yc?Promise.resolve():new Promise((H,J)=>{U.add([H,J])})}function At(H){return q||(q=!H,P(),U.list().forEach(([J,ot])=>H?ot(H):J()),U.reset()),H}function ct(H,J,ot,ut){const{scrollBehavior:X}=r;if(!Kp||!X)return Promise.resolve();const It=!ot&&nNt(qQ(H.fullPath,0))||(ut||!ot)&&history.state&&history.state.scroll||null;return cC().then(()=>X(H,J,It)).then(at=>at&&eNt(at)).catch(at=>rt(at,H,J))}const Tt=H=>i.go(H);let M;const W=new Set,Y={currentRoute:A,listening:!0,addRoute:f,removeRoute:d,hasRoute:m,getRoutes:g,resolve:v,options:r,push:C,replace:O,go:Tt,back:()=>Tt(-1),forward:()=>Tt(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:tt.add,isReady:nt,install(H){const J=this;H.component("RouterLink",kNt),H.component("RouterView",VNt),H.config.globalProperties.$router=J,Object.defineProperty(H.config.globalProperties,"$route",{enumerable:!0,get:()=>Rf(A)}),Kp&&!M&&A.value===yc&&(M=!0,C(i.location).catch(X=>{}));const ot={};for(const X in yc)ot[X]=Ze(()=>A.value[X]);H.provide(QM,J),H.provide(nj,vd(ot)),H.provide(yO,A);const ut=H.unmount;W.add(H),H.unmount=function(){W.delete(H),W.size<1&&(l=yc,S&&S(),S=null,A.value=yc,M=!1,q=!1),ut()}}};return Y}function Fp(r){return r.reduce((e,t)=>e.then(()=>t()),Promise.resolve())}function KNt(r,e){const t=[],n=[],i=[],a=Math.max(e.matched.length,r.matched.length);for(let o=0;o<a;o++){const s=e.matched[o];s&&(r.matched.find(l=>jg(l,s))?n.push(s):t.push(s));const A=r.matched[o];A&&(e.matched.find(l=>jg(l,A))||i.push(A))}return[t,n,i]}const WNt="modulepreload",zNt=function(r){return"/"+r},c6={},Rp=function(e,t,n){if(!t||t.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(t.map(a=>{if(a=zNt(a),a in c6)return;c6[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const c=i[u];if(c.href===a&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":WNt,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((u,c)=>{l.addEventListener("load",u),l.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e())},YNt=(r,e)=>{const t=r[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))})};/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*//**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const ij=function(r){const e=[];let t=0;for(let n=0;n<r.length;n++){let i=r.charCodeAt(n);i<128?e[t++]=i:i<2048?(e[t++]=i>>6|192,e[t++]=i&63|128):(i&64512)===55296&&n+1<r.length&&(r.charCodeAt(n+1)&64512)===56320?(i=65536+((i&1023)<<10)+(r.charCodeAt(++n)&1023),e[t++]=i>>18|240,e[t++]=i>>12&63|128,e[t++]=i>>6&63|128,e[t++]=i&63|128):(e[t++]=i>>12|224,e[t++]=i>>6&63|128,e[t++]=i&63|128)}return e},XNt=function(r){const e=[];let t=0,n=0;for(;t<r.length;){const i=r[t++];if(i<128)e[n++]=String.fromCharCode(i);else if(i>191&&i<224){const a=r[t++];e[n++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){const a=r[t++],o=r[t++],s=r[t++],A=((i&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;e[n++]=String.fromCharCode(55296+(A>>10)),e[n++]=String.fromCharCode(56320+(A&1023))}else{const a=r[t++],o=r[t++];e[n++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return e.join("")},aj={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(r,e){if(!Array.isArray(r))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<r.length;i+=3){const a=r[i],o=i+1<r.length,s=o?r[i+1]:0,A=i+2<r.length,l=A?r[i+2]:0,u=a>>2,c=(a&3)<<4|s>>4;let h=(s&15)<<2|l>>6,f=l&63;A||(f=64,o||(h=64)),n.push(t[u],t[c],t[h],t[f])}return n.join("")},encodeString(r,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(r):this.encodeByteArray(ij(r),e)},decodeString(r,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(r):XNt(this.decodeStringToByteArray(r,e))},decodeStringToByteArray(r,e){this.init_();const t=e?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<r.length;){const a=t[r.charAt(i++)],s=i<r.length?t[r.charAt(i)]:0;++i;const l=i<r.length?t[r.charAt(i)]:64;++i;const c=i<r.length?t[r.charAt(i)]:64;if(++i,a==null||s==null||l==null||c==null)throw Error();const h=a<<2|s>>4;if(n.push(h),l!==64){const f=s<<4&240|l>>2;if(n.push(f),c!==64){const d=l<<6&192|c;n.push(d)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let r=0;r<this.ENCODED_VALS.length;r++)this.byteToCharMap_[r]=this.ENCODED_VALS.charAt(r),this.charToByteMap_[this.byteToCharMap_[r]]=r,this.byteToCharMapWebSafe_[r]=this.ENCODED_VALS_WEBSAFE.charAt(r),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[r]]=r,r>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(r)]=r,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(r)]=r)}}},qNt=function(r){const e=ij(r);return aj.encodeByteArray(e,!0)},oj=function(r){return qNt(r).replace(/\./g,"")},sj=function(r){try{return aj.decodeString(r,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
|
||
* @license
|
||
* Copyright 2022 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function ZNt(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
|
||
* @license
|
||
* Copyright 2022 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const JNt=()=>ZNt().__FIREBASE_DEFAULTS__,tPt=()=>{if(typeof process>"u"||typeof process.env>"u")return;const r={}.__FIREBASE_DEFAULTS__;if(r)return JSON.parse(r)},ePt=()=>{if(typeof document>"u")return;let r;try{r=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=r&&sj(r[1]);return e&&JSON.parse(e)},kM=()=>{try{return JNt()||tPt()||ePt()}catch(r){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${r}`);return}},Aj=r=>{var e,t;return(t=(e=kM())===null||e===void 0?void 0:e.emulatorHosts)===null||t===void 0?void 0:t[r]},bDt=r=>{const e=Aj(r);if(!e)return;const t=e.lastIndexOf(":");if(t<=0||t+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const n=parseInt(e.substring(t+1),10);return e[0]==="["?[e.substring(1,t-1),n]:[e.substring(0,t),n]},rPt=()=>{var r;return(r=kM())===null||r===void 0?void 0:r.config},lj=r=>{var e;return(e=kM())===null||e===void 0?void 0:e[`_${r}`]};/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class nPt{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,n))}}}/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function Ja(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function iPt(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ja())}function aPt(){const r=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof r=="object"&&r.id!==void 0}function oPt(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function sPt(){const r=Ja();return r.indexOf("MSIE ")>=0||r.indexOf("Trident/")>=0}function APt(){try{return typeof indexedDB=="object"}catch{return!1}}function lPt(){return new Promise((r,e)=>{try{let t=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),t||self.indexedDB.deleteDatabase(n),r(!0)},i.onupgradeneeded=()=>{t=!1},i.onerror=()=>{var a;e(((a=i.error)===null||a===void 0?void 0:a.message)||"")}}catch(t){e(t)}})}/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const uPt="FirebaseError";class Lh extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name=uPt,Object.setPrototypeOf(this,Lh.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,q0.prototype.create)}}class q0{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},i=`${this.service}/${e}`,a=this.errors[e],o=a?cPt(a,n):"Error",s=`${this.serviceName}: ${o} (${i}).`;return new Lh(i,s,n)}}function cPt(r,e){return r.replace(hPt,(t,n)=>{const i=e[n];return i!=null?String(i):`<${n}?>`})}const hPt=/\{\$([^}]+)}/g;function fPt(r){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e))return!1;return!0}function XE(r,e){if(r===e)return!0;const t=Object.keys(r),n=Object.keys(e);for(const i of t){if(!n.includes(i))return!1;const a=r[i],o=e[i];if(h6(a)&&h6(o)){if(!XE(a,o))return!1}else if(a!==o)return!1}for(const i of n)if(!t.includes(i))return!1;return!0}function h6(r){return r!==null&&typeof r=="object"}/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function Z0(r){const e=[];for(const[t,n]of Object.entries(r))Array.isArray(n)?n.forEach(i=>{e.push(encodeURIComponent(t)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));return e.length?"&"+e.join("&"):""}function Xm(r){const e={};return r.replace(/^\?/,"").split("&").forEach(n=>{if(n){const[i,a]=n.split("=");e[decodeURIComponent(i)]=decodeURIComponent(a)}}),e}function qm(r){const e=r.indexOf("?");if(!e)return"";const t=r.indexOf("#",e);return r.substring(e,t>0?t:void 0)}function dPt(r,e){const t=new pPt(r,e);return t.subscribe.bind(t)}class pPt{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(n=>{this.error(n)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let i;if(e===void 0&&t===void 0&&n===void 0)throw new Error("Missing Observer.");gPt(e,["next","error","complete"])?i=e:i={next:e,error:t,complete:n},i.next===void 0&&(i.next=QS),i.error===void 0&&(i.error=QS),i.complete===void 0&&(i.complete=QS);const a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),a}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function gPt(r,e){if(typeof r!="object"||r===null)return!1;for(const t of e)if(t in r&&typeof r[t]=="function")return!0;return!1}function QS(){}/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function Yo(r){return r&&r._delegate?r._delegate:r}class Wg{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const mf="[DEFAULT]";/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class vPt{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const n=new nPt;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:t});i&&n.resolve(i)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(t=e==null?void 0:e.optional)!==null&&t!==void 0?t:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(a){if(i)return null;throw a}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(yPt(e))try{this.getOrInitializeService({instanceIdentifier:mf})}catch{}for(const[t,n]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(t);try{const a=this.getOrInitializeService({instanceIdentifier:i});n.resolve(a)}catch{}}}}clearInstance(e=mf){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...e.filter(t=>"_delete"in t).map(t=>t._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=mf){return this.instances.has(e)}getOptions(e=mf){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[a,o]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(a);n===s&&o.resolve(i)}return i}onInit(e,t){var n;const i=this.normalizeInstanceIdentifier(t),a=(n=this.onInitCallbacks.get(i))!==null&&n!==void 0?n:new Set;a.add(e),this.onInitCallbacks.set(i,a);const o=this.instances.get(i);return o&&e(o,i),()=>{a.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:mPt(e),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=mf){return this.component?this.component.multipleInstances?e:mf:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function mPt(r){return r===mf?void 0:r}function yPt(r){return r.instantiationMode==="EAGER"}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class _Pt{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new vPt(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/var Sn;(function(r){r[r.DEBUG=0]="DEBUG",r[r.VERBOSE=1]="VERBOSE",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.SILENT=5]="SILENT"})(Sn||(Sn={}));const wPt={debug:Sn.DEBUG,verbose:Sn.VERBOSE,info:Sn.INFO,warn:Sn.WARN,error:Sn.ERROR,silent:Sn.SILENT},EPt=Sn.INFO,CPt={[Sn.DEBUG]:"log",[Sn.VERBOSE]:"log",[Sn.INFO]:"info",[Sn.WARN]:"warn",[Sn.ERROR]:"error"},BPt=(r,e,...t)=>{if(e<r.logLevel)return;const n=new Date().toISOString(),i=CPt[e];if(i)console[i](`[${n}] ${r.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class uj{constructor(e){this.name=e,this._logLevel=EPt,this._logHandler=BPt,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Sn))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?wPt[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Sn.DEBUG,...e),this._logHandler(this,Sn.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Sn.VERBOSE,...e),this._logHandler(this,Sn.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Sn.INFO,...e),this._logHandler(this,Sn.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Sn.WARN,...e),this._logHandler(this,Sn.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Sn.ERROR,...e),this._logHandler(this,Sn.ERROR,...e)}}const bPt=(r,e)=>e.some(t=>r instanceof t);let f6,d6;function TPt(){return f6||(f6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function SPt(){return d6||(d6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cj=new WeakMap,_O=new WeakMap,hj=new WeakMap,kS=new WeakMap,HM=new WeakMap;function xPt(r){const e=new Promise((t,n)=>{const i=()=>{r.removeEventListener("success",a),r.removeEventListener("error",o)},a=()=>{t(Zc(r.result)),i()},o=()=>{n(r.error),i()};r.addEventListener("success",a),r.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&cj.set(t,r)}).catch(()=>{}),HM.set(e,r),e}function IPt(r){if(_O.has(r))return;const e=new Promise((t,n)=>{const i=()=>{r.removeEventListener("complete",a),r.removeEventListener("error",o),r.removeEventListener("abort",o)},a=()=>{t(),i()},o=()=>{n(r.error||new DOMException("AbortError","AbortError")),i()};r.addEventListener("complete",a),r.addEventListener("error",o),r.addEventListener("abort",o)});_O.set(r,e)}let wO={get(r,e,t){if(r instanceof IDBTransaction){if(e==="done")return _O.get(r);if(e==="objectStoreNames")return r.objectStoreNames||hj.get(r);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Zc(r[e])},set(r,e,t){return r[e]=t,!0},has(r,e){return r instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in r}};function LPt(r){wO=r(wO)}function OPt(r){return r===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=r.call(HS(this),e,...t);return hj.set(n,e.sort?e.sort():[e]),Zc(n)}:SPt().includes(r)?function(...e){return r.apply(HS(this),e),Zc(cj.get(this))}:function(...e){return Zc(r.apply(HS(this),e))}}function FPt(r){return typeof r=="function"?OPt(r):(r instanceof IDBTransaction&&IPt(r),bPt(r,TPt())?new Proxy(r,wO):r)}function Zc(r){if(r instanceof IDBRequest)return xPt(r);if(kS.has(r))return kS.get(r);const e=FPt(r);return e!==r&&(kS.set(r,e),HM.set(e,r)),e}const HS=r=>HM.get(r);function RPt(r,e,{blocked:t,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(r,e),s=Zc(o);return n&&o.addEventListener("upgradeneeded",A=>{n(Zc(o.result),A.oldVersion,A.newVersion,Zc(o.transaction))}),t&&o.addEventListener("blocked",()=>t()),s.then(A=>{a&&A.addEventListener("close",()=>a()),i&&A.addEventListener("versionchange",()=>i())}).catch(()=>{}),s}const MPt=["get","getKey","getAll","getAllKeys","count"],NPt=["put","add","delete","clear"],GS=new Map;function p6(r,e){if(!(r instanceof IDBDatabase&&!(e in r)&&typeof e=="string"))return;if(GS.get(e))return GS.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,i=NPt.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(i||MPt.includes(t)))return;const a=async function(o,...s){const A=this.transaction(o,i?"readwrite":"readonly");let l=A.store;return n&&(l=l.index(s.shift())),(await Promise.all([l[t](...s),i&&A.done]))[0]};return GS.set(e,a),a}LPt(r=>({...r,get:(e,t,n)=>p6(e,t)||r.get(e,t,n),has:(e,t)=>!!p6(e,t)||r.has(e,t)}));/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class PPt{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(UPt(t)){const n=t.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(t=>t).join(" ")}}function UPt(r){const e=r.getComponent();return(e==null?void 0:e.type)==="VERSION"}const EO="@firebase/app",g6="0.9.3";/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const cd=new uj("@firebase/app"),DPt="@firebase/app-compat",QPt="@firebase/analytics-compat",kPt="@firebase/analytics",HPt="@firebase/app-check-compat",GPt="@firebase/app-check",$Pt="@firebase/auth",VPt="@firebase/auth-compat",jPt="@firebase/database",KPt="@firebase/database-compat",WPt="@firebase/functions",zPt="@firebase/functions-compat",YPt="@firebase/installations",XPt="@firebase/installations-compat",qPt="@firebase/messaging",ZPt="@firebase/messaging-compat",JPt="@firebase/performance",t5t="@firebase/performance-compat",e5t="@firebase/remote-config",r5t="@firebase/remote-config-compat",n5t="@firebase/storage",i5t="@firebase/storage-compat",a5t="@firebase/firestore",o5t="@firebase/firestore-compat",s5t="firebase",A5t="9.17.1";/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const CO="[DEFAULT]",l5t={[EO]:"fire-core",[DPt]:"fire-core-compat",[kPt]:"fire-analytics",[QPt]:"fire-analytics-compat",[GPt]:"fire-app-check",[HPt]:"fire-app-check-compat",[$Pt]:"fire-auth",[VPt]:"fire-auth-compat",[jPt]:"fire-rtdb",[KPt]:"fire-rtdb-compat",[WPt]:"fire-fn",[zPt]:"fire-fn-compat",[YPt]:"fire-iid",[XPt]:"fire-iid-compat",[qPt]:"fire-fcm",[ZPt]:"fire-fcm-compat",[JPt]:"fire-perf",[t5t]:"fire-perf-compat",[e5t]:"fire-rc",[r5t]:"fire-rc-compat",[n5t]:"fire-gcs",[i5t]:"fire-gcs-compat",[a5t]:"fire-fst",[o5t]:"fire-fst-compat","fire-js":"fire-js",[s5t]:"fire-js-all"};/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const qE=new Map,BO=new Map;function u5t(r,e){try{r.container.addComponent(e)}catch(t){cd.debug(`Component ${e.name} failed to register with FirebaseApp ${r.name}`,t)}}function s0(r){const e=r.name;if(BO.has(e))return cd.debug(`There were multiple attempts to register component ${e}.`),!1;BO.set(e,r);for(const t of qE.values())u5t(t,r);return!0}function fj(r,e){const t=r.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),r.container.getProvider(e)}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const c5t={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},Jc=new q0("app","Firebase",c5t);/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class h5t{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Wg("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Jc.create("app-deleted",{appName:this._name})}}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const $B=A5t;function dj(r,e={}){let t=r;typeof e!="object"&&(e={name:e});const n=Object.assign({name:CO,automaticDataCollectionEnabled:!1},e),i=n.name;if(typeof i!="string"||!i)throw Jc.create("bad-app-name",{appName:String(i)});if(t||(t=rPt()),!t)throw Jc.create("no-options");const a=qE.get(i);if(a){if(XE(t,a.options)&&XE(n,a.config))return a;throw Jc.create("duplicate-app",{appName:i})}const o=new _Pt(i);for(const A of BO.values())o.addComponent(A);const s=new h5t(t,n,o);return qE.set(i,s),s}function f5t(r=CO){const e=qE.get(r);if(!e&&r===CO)return dj();if(!e)throw Jc.create("no-app",{appName:r});return e}function Cg(r,e,t){var n;let i=(n=l5t[r])!==null&&n!==void 0?n:r;t&&(i+=`-${t}`);const a=i.match(/\s|\//),o=e.match(/\s|\//);if(a||o){const s=[`Unable to register library "${i}" with version "${e}":`];a&&s.push(`library name "${i}" contains illegal characters (whitespace or "/")`),a&&o&&s.push("and"),o&&s.push(`version name "${e}" contains illegal characters (whitespace or "/")`),cd.warn(s.join(" "));return}s0(new Wg(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const d5t="firebase-heartbeat-database",p5t=1,A0="firebase-heartbeat-store";let $S=null;function pj(){return $S||($S=RPt(d5t,p5t,{upgrade:(r,e)=>{switch(e){case 0:r.createObjectStore(A0)}}}).catch(r=>{throw Jc.create("idb-open",{originalErrorMessage:r.message})})),$S}async function g5t(r){try{return(await pj()).transaction(A0).objectStore(A0).get(gj(r))}catch(e){if(e instanceof Lh)cd.warn(e.message);else{const t=Jc.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});cd.warn(t.message)}}}async function v6(r,e){try{const n=(await pj()).transaction(A0,"readwrite");return await n.objectStore(A0).put(e,gj(r)),n.done}catch(t){if(t instanceof Lh)cd.warn(t.message);else{const n=Jc.create("idb-set",{originalErrorMessage:t==null?void 0:t.message});cd.warn(n.message)}}}function gj(r){return`${r.name}!${r.options.appId}`}/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const v5t=1024,m5t=30*24*60*60*1e3;class y5t{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new w5t(t),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}async triggerHeartbeat(){const t=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),n=m6();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(i=>i.date===n)))return this._heartbeatsCache.heartbeats.push({date:n,agent:t}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const a=new Date(i.date).valueOf();return Date.now()-a<=m5t}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=m6(),{heartbeatsToSend:t,unsentEntries:n}=_5t(this._heartbeatsCache.heartbeats),i=oj(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function m6(){return new Date().toISOString().substring(0,10)}function _5t(r,e=v5t){const t=[];let n=r.slice();for(const i of r){const a=t.find(o=>o.agent===i.agent);if(a){if(a.dates.push(i.date),y6(t)>e){a.dates.pop();break}}else if(t.push({agent:i.agent,dates:[i.date]}),y6(t)>e){t.pop();break}n=n.slice(1)}return{heartbeatsToSend:t,unsentEntries:n}}class w5t{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return APt()?lPt().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await g5t(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return v6(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return v6(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function y6(r){return oj(JSON.stringify({version:2,heartbeats:r})).length}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function E5t(r){s0(new Wg("platform-logger",e=>new PPt(e),"PRIVATE")),s0(new Wg("heartbeat",e=>new y5t(e),"PRIVATE")),Cg(EO,g6,r),Cg(EO,g6,"esm2017"),Cg("fire-js","")}E5t("");function GM(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t}function vj(){return{["dependent-sdk-initialized-before-auth"]:"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const C5t=vj,mj=new q0("auth","Firebase",vj());/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const _6=new uj("@firebase/auth");function bw(r,...e){_6.logLevel<=Sn.ERROR&&_6.error(`Auth (${$B}): ${r}`,...e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function BA(r,...e){throw $M(r,...e)}function fl(r,...e){return $M(r,...e)}function B5t(r,e,t){const n=Object.assign(Object.assign({},C5t()),{[e]:t});return new q0("auth","Firebase",n).create(e,{appName:r.name})}function $M(r,...e){if(typeof r!="string"){const t=e[0],n=[...e.slice(1)];return n[0]&&(n[0].appName=r.name),r._errorFactory.create(t,...n)}return mj.create(r,...e)}function Ke(r,e,...t){if(!r)throw $M(e,...t)}function cu(r){const e="INTERNAL ASSERTION FAILED: "+r;throw bw(e),new Error(e)}function Iu(r,e){r||cu(e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const w6=new Map;function hu(r){Iu(r instanceof Function,"Expected a class definition");let e=w6.get(r);return e?(Iu(e instanceof r,"Instance stored in cache mismatched with class"),e):(e=new r,w6.set(r,e),e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function b5t(r,e){const t=fj(r,"auth");if(t.isInitialized()){const i=t.getImmediate(),a=t.getOptions();if(XE(a,e??{}))return i;BA(i,"already-initialized")}return t.initialize({options:e})}function T5t(r,e){const t=(e==null?void 0:e.persistence)||[],n=(Array.isArray(t)?t:[t]).map(hu);e!=null&&e.errorMap&&r._updateErrorMap(e.errorMap),r._initializeWithPersistence(n,e==null?void 0:e.popupRedirectResolver)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function bO(){var r;return typeof self<"u"&&((r=self.location)===null||r===void 0?void 0:r.href)||""}function S5t(){return E6()==="http:"||E6()==="https:"}function E6(){var r;return typeof self<"u"&&((r=self.location)===null||r===void 0?void 0:r.protocol)||null}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function x5t(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(S5t()||aPt()||"connection"in navigator)?navigator.onLine:!0}function I5t(){if(typeof navigator>"u")return null;const r=navigator;return r.languages&&r.languages[0]||r.language||null}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class J0{constructor(e,t){this.shortDelay=e,this.longDelay=t,Iu(t>e,"Short delay should be less than long delay!"),this.isMobile=iPt()||oPt()}get(){return x5t()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function VM(r,e){Iu(r.emulator,"Emulator should always be set here");const{url:t}=r.emulator;return e?`${t}${e.startsWith("/")?e.slice(1):e}`:t}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class yj{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;cu("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;cu("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;cu("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const L5t={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error"};/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const O5t=new J0(3e4,6e4);function Bv(r,e){return r.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:r.tenantId}):e}async function bv(r,e,t,n,i={}){return _j(r,i,async()=>{let a={},o={};n&&(e==="GET"?o=n:a={body:JSON.stringify(n)});const s=Z0(Object.assign({key:r.config.apiKey},o)).slice(1),A=await r._getAdditionalHeaders();return A["Content-Type"]="application/json",r.languageCode&&(A["X-Firebase-Locale"]=r.languageCode),yj.fetch()(wj(r,r.config.apiHost,t,s),Object.assign({method:e,headers:A,referrerPolicy:"no-referrer"},a))})}async function _j(r,e,t){r._canInitEmulator=!1;const n=Object.assign(Object.assign({},L5t),e);try{const i=new F5t(r),a=await Promise.race([t(),i.promise]);i.clearNetworkTimeout();const o=await a.json();if("needConfirmation"in o)throw Y1(r,"account-exists-with-different-credential",o);if(a.ok&&!("errorMessage"in o))return o;{const s=a.ok?o.errorMessage:o.error.message,[A,l]=s.split(" : ");if(A==="FEDERATED_USER_ID_ALREADY_LINKED")throw Y1(r,"credential-already-in-use",o);if(A==="EMAIL_EXISTS")throw Y1(r,"email-already-in-use",o);if(A==="USER_DISABLED")throw Y1(r,"user-disabled",o);const u=n[A]||A.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw B5t(r,u,l);BA(r,u)}}catch(i){if(i instanceof Lh)throw i;BA(r,"network-request-failed")}}async function t_(r,e,t,n,i={}){const a=await bv(r,e,t,n,i);return"mfaPendingCredential"in a&&BA(r,"multi-factor-auth-required",{_serverResponse:a}),a}function wj(r,e,t,n){const i=`${e}${t}?${n}`;return r.config.emulator?VM(r.config,i):`${r.config.apiScheme}://${i}`}class F5t{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((t,n)=>{this.timer=setTimeout(()=>n(fl(this.auth,"network-request-failed")),O5t.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Y1(r,e,t){const n={appName:r.name};t.email&&(n.email=t.email),t.phoneNumber&&(n.phoneNumber=t.phoneNumber);const i=fl(r,e,n);return i.customData._tokenResponse=t,i}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function R5t(r,e){return bv(r,"POST","/v1/accounts:delete",e)}async function M5t(r,e){return bv(r,"POST","/v1/accounts:lookup",e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function By(r){if(r)try{const e=new Date(Number(r));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function N5t(r,e=!1){const t=Yo(r),n=await t.getIdToken(e),i=jM(n);Ke(i&&i.exp&&i.auth_time&&i.iat,t.auth,"internal-error");const a=typeof i.firebase=="object"?i.firebase:void 0,o=a==null?void 0:a.sign_in_provider;return{claims:i,token:n,authTime:By(VS(i.auth_time)),issuedAtTime:By(VS(i.iat)),expirationTime:By(VS(i.exp)),signInProvider:o||null,signInSecondFactor:(a==null?void 0:a.sign_in_second_factor)||null}}function VS(r){return Number(r)*1e3}function jM(r){const[e,t,n]=r.split(".");if(e===void 0||t===void 0||n===void 0)return bw("JWT malformed, contained fewer than 3 sections"),null;try{const i=sj(t);return i?JSON.parse(i):(bw("Failed to decode base64 JWT payload"),null)}catch(i){return bw("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function P5t(r){const e=jM(r);return Ke(e,"internal-error"),Ke(typeof e.exp<"u","internal-error"),Ke(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function zg(r,e,t=!1){if(t)return e;try{return await e}catch(n){throw n instanceof Lh&&U5t(n)&&r.auth.currentUser===r&&await r.auth.signOut(),n}}function U5t({code:r}){return r==="auth/user-disabled"||r==="auth/user-token-expired"}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class D5t{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const i=((t=this.user.stsTokenManager.expirationTime)!==null&&t!==void 0?t:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Ej{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=By(this.lastLoginAt),this.creationTime=By(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function ZE(r){var e;const t=r.auth,n=await r.getIdToken(),i=await zg(r,M5t(t,{idToken:n}));Ke(i==null?void 0:i.users.length,t,"internal-error");const a=i.users[0];r._notifyReloadListener(a);const o=!((e=a.providerUserInfo)===null||e===void 0)&&e.length?H5t(a.providerUserInfo):[],s=k5t(r.providerData,o),A=r.isAnonymous,l=!(r.email&&a.passwordHash)&&!(s!=null&&s.length),u=A?l:!1,c={uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:s,metadata:new Ej(a.createdAt,a.lastLoginAt),isAnonymous:u};Object.assign(r,c)}async function Q5t(r){const e=Yo(r);await ZE(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function k5t(r,e){return[...r.filter(n=>!e.some(i=>i.providerId===n.providerId)),...e]}function H5t(r){return r.map(e=>{var{providerId:t}=e,n=GM(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function G5t(r,e){const t=await _j(r,{},async()=>{const n=Z0({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:a}=r.config,o=wj(r,i,"/v1/token",`key=${a}`),s=await r._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",yj.fetch()(o,{method:"POST",headers:s,body:n})});return{accessToken:t.access_token,expiresIn:t.expires_in,refreshToken:t.refresh_token}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class l0{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ke(e.idToken,"internal-error"),Ke(typeof e.idToken<"u","internal-error"),Ke(typeof e.refreshToken<"u","internal-error");const t="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):P5t(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return Ke(!this.accessToken||this.refreshToken,e,"user-token-expired"),!t&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:i,expiresIn:a}=await G5t(e,t);this.updateTokensAndExpiration(n,i,Number(a))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(e,t){const{refreshToken:n,accessToken:i,expirationTime:a}=t,o=new l0;return n&&(Ke(typeof n=="string","internal-error",{appName:e}),o.refreshToken=n),i&&(Ke(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),a&&(Ke(typeof a=="number","internal-error",{appName:e}),o.expirationTime=a),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new l0,this.toJSON())}_performRefresh(){return cu("not implemented")}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function _c(r,e){Ke(typeof r=="string"||typeof r>"u","internal-error",{appName:e})}class Wf{constructor(e){var{uid:t,auth:n,stsTokenManager:i}=e,a=GM(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new D5t(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?[...a.providerData]:[],this.metadata=new Ej(a.createdAt||void 0,a.lastLoginAt||void 0)}async getIdToken(e){const t=await zg(this,this.stsTokenManager.getToken(this.auth,e));return Ke(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return N5t(this,e)}reload(){return Q5t(this)}_assign(e){this!==e&&(Ke(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(t=>Object.assign({},t)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new Wf(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){Ke(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await ZE(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await zg(this,R5t(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,i,a,o,s,A,l,u;const c=(n=t.displayName)!==null&&n!==void 0?n:void 0,h=(i=t.email)!==null&&i!==void 0?i:void 0,f=(a=t.phoneNumber)!==null&&a!==void 0?a:void 0,d=(o=t.photoURL)!==null&&o!==void 0?o:void 0,g=(s=t.tenantId)!==null&&s!==void 0?s:void 0,m=(A=t._redirectEventId)!==null&&A!==void 0?A:void 0,v=(l=t.createdAt)!==null&&l!==void 0?l:void 0,y=(u=t.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:w,emailVerified:C,isAnonymous:O,providerData:F,stsTokenManager:I}=t;Ke(w&&I,e,"internal-error");const T=l0.fromJSON(this.name,I);Ke(typeof w=="string",e,"internal-error"),_c(c,e.name),_c(h,e.name),Ke(typeof C=="boolean",e,"internal-error"),Ke(typeof O=="boolean",e,"internal-error"),_c(f,e.name),_c(d,e.name),_c(g,e.name),_c(m,e.name),_c(v,e.name),_c(y,e.name);const L=new Wf({uid:w,auth:e,email:h,emailVerified:C,displayName:c,isAnonymous:O,photoURL:d,phoneNumber:f,tenantId:g,stsTokenManager:T,createdAt:v,lastLoginAt:y});return F&&Array.isArray(F)&&(L.providerData=F.map(N=>Object.assign({},N))),m&&(L._redirectEventId=m),L}static async _fromIdTokenResponse(e,t,n=!1){const i=new l0;i.updateFromServerResponse(t);const a=new Wf({uid:t.localId,auth:e,stsTokenManager:i,isAnonymous:n});return await ZE(a),a}}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Cj{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return t===void 0?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}Cj.type="NONE";const C6=Cj;/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function Tw(r,e,t){return`firebase:${r}:${e}:${t}`}class Bg{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:i,name:a}=this.auth;this.fullUserKey=Tw(this.userKey,i.apiKey,a),this.fullPersistenceKey=Tw("persistence",i.apiKey,a),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Wf._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new Bg(hu(C6),e,n);const i=(await Promise.all(t.map(async l=>{if(await l._isAvailable())return l}))).filter(l=>l);let a=i[0]||hu(C6);const o=Tw(n,e.config.apiKey,e.name);let s=null;for(const l of t)try{const u=await l._get(o);if(u){const c=Wf._fromJSON(e,u);l!==a&&(s=c),a=l;break}}catch{}const A=i.filter(l=>l._shouldAllowMigration);return!a._shouldAllowMigration||!A.length?new Bg(a,e,n):(a=A[0],s&&await a._set(o,s.toJSON()),await Promise.all(t.map(async l=>{if(l!==a)try{await l._remove(o)}catch{}})),new Bg(a,e,n))}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function B6(r){const e=r.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Tj(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Bj(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(xj(e))return"Blackberry";if(Ij(e))return"Webos";if(KM(e))return"Safari";if((e.includes("chrome/")||bj(e))&&!e.includes("edge/"))return"Chrome";if(Sj(e))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=r.match(t);if((n==null?void 0:n.length)===2)return n[1]}return"Other"}function Bj(r=Ja()){return/firefox\//i.test(r)}function KM(r=Ja()){const e=r.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function bj(r=Ja()){return/crios\//i.test(r)}function Tj(r=Ja()){return/iemobile/i.test(r)}function Sj(r=Ja()){return/android/i.test(r)}function xj(r=Ja()){return/blackberry/i.test(r)}function Ij(r=Ja()){return/webos/i.test(r)}function VB(r=Ja()){return/iphone|ipad|ipod/i.test(r)||/macintosh/i.test(r)&&/mobile/i.test(r)}function $5t(r=Ja()){var e;return VB(r)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function V5t(){return sPt()&&document.documentMode===10}function Lj(r=Ja()){return VB(r)||Sj(r)||Ij(r)||xj(r)||/windows phone/i.test(r)||Tj(r)}function j5t(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function Oj(r,e=[]){let t;switch(r){case"Browser":t=B6(Ja());break;case"Worker":t=`${B6(Ja())}-${r}`;break;default:t=r}const n=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${$B}/${n}`}/**
|
||
* @license
|
||
* Copyright 2022 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class K5t{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=a=>new Promise((o,s)=>{try{const A=e(a);o(A)}catch(A){s(A)}});n.onAbort=t,this.queue.push(n);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(n){t.reverse();for(const i of t)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n==null?void 0:n.message})}}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class W5t{constructor(e,t,n){this.app=e,this.heartbeatServiceProvider=t,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new b6(this),this.idTokenSubscription=new b6(this),this.beforeStateQueue=new K5t(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=mj,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=hu(t)),this._initializationPromise=this.queue(async()=>{var n,i;if(!this._deleted&&(this.persistenceManager=await Bg.create(this,e),!this._deleted)){if(!((n=this._popupRedirectResolver)===null||n===void 0)&&n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(t),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;const n=await this.assertedPersistence.getCurrentUser();let i=n,a=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(t=this.redirectUser)===null||t===void 0?void 0:t._redirectEventId,s=i==null?void 0:i._redirectEventId,A=await this.tryRedirectSignIn(e);(!o||o===s)&&(A!=null&&A.user)&&(i=A.user,a=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(a)try{await this.beforeStateQueue.runMiddleware(i)}catch(o){i=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return Ke(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await ZE(e)}catch(t){if((t==null?void 0:t.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=I5t()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?Yo(e):null;return t&&Ke(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Ke(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(hu(e))})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new q0("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return e===null?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&hu(e)||this._popupRedirectResolver;Ke(t,this,"argument-error"),this.redirectPersistenceManager=await Bg.create(this,[hu(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue(async()=>{}),((t=this._currentUser)===null||t===void 0?void 0:t._redirectEventId)===e?this._currentUser:((n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=(t=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&t!==void 0?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,i){if(this._deleted)return()=>{};const a=typeof t=="function"?t:t.next.bind(t),o=this._isInitialized?Promise.resolve():this._initializationPromise;return Ke(o,this,"internal-error"),o.then(()=>a(this.currentUser)),typeof t=="function"?e.addObserver(t,n,i):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Ke(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Oj(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={["X-Client-Version"]:this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());return n&&(t["X-Firebase-Client"]=n),t}}function e_(r){return Yo(r)}class b6{constructor(e){this.auth=e,this.observer=null,this.addObserver=dPt(t=>this.observer=t)}get next(){return Ke(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function z5t(r,e,t){const n=e_(r);Ke(n._canInitEmulator,n,"emulator-config-failed"),Ke(/^https?:\/\//.test(e),n,"invalid-emulator-scheme");const i=!!(t!=null&&t.disableWarnings),a=Fj(e),{host:o,port:s}=Y5t(e),A=s===null?"":`:${s}`;n.config.emulator={url:`${a}//${o}${A}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:o,port:s,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||X5t()}function Fj(r){const e=r.indexOf(":");return e<0?"":r.substr(0,e+1)}function Y5t(r){const e=Fj(r),t=/(\/\/)?([^?#/]+)/.exec(r.substr(e.length));if(!t)return{host:"",port:null};const n=t[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){const a=i[1];return{host:a,port:T6(n.substr(a.length+1))}}else{const[a,o]=n.split(":");return{host:a,port:T6(o)}}}function T6(r){if(!r)return null;const e=Number(r);return isNaN(e)?null:e}function X5t(){function r(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",r):r())}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class WM{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return cu("not implemented")}_getIdTokenResponse(e){return cu("not implemented")}_linkToIdToken(e,t){return cu("not implemented")}_getReauthenticationResolver(e){return cu("not implemented")}}async function Rj(r,e){return bv(r,"POST","/v1/accounts:update",e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function q5t(r,e){return t_(r,"POST","/v1/accounts:signInWithPassword",Bv(r,e))}async function Z5t(r,e){return bv(r,"POST","/v1/accounts:sendOobCode",Bv(r,e))}async function J5t(r,e){return Z5t(r,e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function tUt(r,e){return t_(r,"POST","/v1/accounts:signInWithEmailLink",Bv(r,e))}async function eUt(r,e){return t_(r,"POST","/v1/accounts:signInWithEmailLink",Bv(r,e))}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class u0 extends WM{constructor(e,t,n,i=null){super("password",n),this._email=e,this._password=t,this._tenantId=i}static _fromEmailAndPassword(e,t){return new u0(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new u0(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t=typeof e=="string"?JSON.parse(e):e;if(t!=null&&t.email&&(t!=null&&t.password)){if(t.signInMethod==="password")return this._fromEmailAndPassword(t.email,t.password);if(t.signInMethod==="emailLink")return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return q5t(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return tUt(e,{email:this._email,oobCode:this._password});default:BA(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return Rj(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return eUt(e,{idToken:t,email:this._email,oobCode:this._password});default:BA(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function bg(r,e){return t_(r,"POST","/v1/accounts:signInWithIdp",Bv(r,e))}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const rUt="http://localhost";class hd extends WM{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new hd(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):BA("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t=typeof e=="string"?JSON.parse(e):e,{providerId:n,signInMethod:i}=t,a=GM(t,["providerId","signInMethod"]);if(!n||!i)return null;const o=new hd(n,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}_getIdTokenResponse(e){const t=this.buildRequest();return bg(e,t)}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,bg(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,bg(e,t)}buildRequest(){const e={requestUri:rUt,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=Z0(t)}return e}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function nUt(r){switch(r){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function iUt(r){const e=Xm(qm(r)).link,t=e?Xm(qm(e)).deep_link_id:null,n=Xm(qm(r)).deep_link_id;return(n?Xm(qm(n)).link:null)||n||t||e||r}class zM{constructor(e){var t,n,i,a,o,s;const A=Xm(qm(e)),l=(t=A.apiKey)!==null&&t!==void 0?t:null,u=(n=A.oobCode)!==null&&n!==void 0?n:null,c=nUt((i=A.mode)!==null&&i!==void 0?i:null);Ke(l&&u&&c,"argument-error"),this.apiKey=l,this.operation=c,this.code=u,this.continueUrl=(a=A.continueUrl)!==null&&a!==void 0?a:null,this.languageCode=(o=A.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(s=A.tenantId)!==null&&s!==void 0?s:null}static parseLink(e){const t=iUt(e);try{return new zM(t)}catch{return null}}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Tv{constructor(){this.providerId=Tv.PROVIDER_ID}static credential(e,t){return u0._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=zM.parseLink(t);return Ke(n,"argument-error"),u0._fromEmailAndCode(e,n.code,n.tenantId)}}Tv.PROVIDER_ID="password";Tv.EMAIL_PASSWORD_SIGN_IN_METHOD="password";Tv.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Mj{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class r_ extends Mj{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Lc extends r_{constructor(){super("facebook.com")}static credential(e){return hd._fromParams({providerId:Lc.PROVIDER_ID,signInMethod:Lc.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Lc.credentialFromTaggedObject(e)}static credentialFromError(e){return Lc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Lc.credential(e.oauthAccessToken)}catch{return null}}}Lc.FACEBOOK_SIGN_IN_METHOD="facebook.com";Lc.PROVIDER_ID="facebook.com";/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Oc extends r_{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return hd._fromParams({providerId:Oc.PROVIDER_ID,signInMethod:Oc.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Oc.credentialFromTaggedObject(e)}static credentialFromError(e){return Oc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return Oc.credential(t,n)}catch{return null}}}Oc.GOOGLE_SIGN_IN_METHOD="google.com";Oc.PROVIDER_ID="google.com";/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Fc extends r_{constructor(){super("github.com")}static credential(e){return hd._fromParams({providerId:Fc.PROVIDER_ID,signInMethod:Fc.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Fc.credentialFromTaggedObject(e)}static credentialFromError(e){return Fc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Fc.credential(e.oauthAccessToken)}catch{return null}}}Fc.GITHUB_SIGN_IN_METHOD="github.com";Fc.PROVIDER_ID="github.com";/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Rc extends r_{constructor(){super("twitter.com")}static credential(e,t){return hd._fromParams({providerId:Rc.PROVIDER_ID,signInMethod:Rc.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Rc.credentialFromTaggedObject(e)}static credentialFromError(e){return Rc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return Rc.credential(t,n)}catch{return null}}}Rc.TWITTER_SIGN_IN_METHOD="twitter.com";Rc.PROVIDER_ID="twitter.com";/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function aUt(r,e){return t_(r,"POST","/v1/accounts:signUp",Bv(r,e))}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class fd{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,i=!1){const a=await Wf._fromIdTokenResponse(e,n,i),o=S6(n);return new fd({user:a,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const i=S6(n);return new fd({user:e,providerId:i,_tokenResponse:n,operationType:t})}}function S6(r){return r.providerId?r.providerId:"phoneNumber"in r?"phone":null}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class JE extends Lh{constructor(e,t,n,i){var a;super(t.code,t.message),this.operationType=n,this.user=i,Object.setPrototypeOf(this,JE.prototype),this.customData={appName:e.name,tenantId:(a=e.tenantId)!==null&&a!==void 0?a:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,i){return new JE(e,t,n,i)}}function Nj(r,e,t,n){return(e==="reauthenticate"?t._getReauthenticationResolver(r):t._getIdTokenResponse(r)).catch(a=>{throw a.code==="auth/multi-factor-auth-required"?JE._fromErrorAndOperation(r,a,e,n):a})}async function oUt(r,e,t=!1){const n=await zg(r,e._linkToIdToken(r.auth,await r.getIdToken()),t);return fd._forOperation(r,"link",n)}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function Pj(r,e,t=!1){const{auth:n}=r,i="reauthenticate";try{const a=await zg(r,Nj(n,i,e,r),t);Ke(a.idToken,n,"internal-error");const o=jM(a.idToken);Ke(o,n,"internal-error");const{sub:s}=o;return Ke(r.uid===s,n,"user-mismatch"),fd._forOperation(r,i,a)}catch(a){throw(a==null?void 0:a.code)==="auth/user-not-found"&&BA(n,"user-mismatch"),a}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function Uj(r,e,t=!1){const n="signIn",i=await Nj(r,n,e),a=await fd._fromIdTokenResponse(r,n,i);return t||await r._updateCurrentUser(a.user),a}async function sUt(r,e){return Uj(e_(r),e)}async function TDt(r,e){return Pj(Yo(r),e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function AUt(r,e,t){var n;Ke(((n=t.url)===null||n===void 0?void 0:n.length)>0,r,"invalid-continue-uri"),Ke(typeof t.dynamicLinkDomain>"u"||t.dynamicLinkDomain.length>0,r,"invalid-dynamic-link-domain"),e.continueUrl=t.url,e.dynamicLinkDomain=t.dynamicLinkDomain,e.canHandleCodeInApp=t.handleCodeInApp,t.iOS&&(Ke(t.iOS.bundleId.length>0,r,"missing-ios-bundle-id"),e.iOSBundleId=t.iOS.bundleId),t.android&&(Ke(t.android.packageName.length>0,r,"missing-android-pkg-name"),e.androidInstallApp=t.android.installApp,e.androidMinimumVersionCode=t.android.minimumVersion,e.androidPackageName=t.android.packageName)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function SDt(r,e,t){const n=Yo(r),i={requestType:"PASSWORD_RESET",email:e};t&&AUt(n,i,t),await J5t(n,i)}async function xDt(r,e,t){const n=e_(r),i=await aUt(n,{returnSecureToken:!0,email:e,password:t}),a=await fd._fromIdTokenResponse(n,"signIn",i);return await n._updateCurrentUser(a.user),a}function IDt(r,e,t){return sUt(Yo(r),Tv.credential(e,t))}function LDt(r,e){return Dj(Yo(r),e,null)}function ODt(r,e){return Dj(Yo(r),null,e)}async function Dj(r,e,t){const{auth:n}=r,a={idToken:await r.getIdToken(),returnSecureToken:!0};e&&(a.email=e),t&&(a.password=t);const o=await zg(r,Rj(n,a));await r._updateTokensIfNecessary(o,!0)}function lUt(r,e,t,n){return Yo(r).onIdTokenChanged(e,t,n)}function uUt(r,e,t){return Yo(r).beforeAuthStateChanged(e,t)}function cUt(r,e,t,n){return Yo(r).onAuthStateChanged(e,t,n)}function FDt(r){return Yo(r).signOut()}async function RDt(r){return Yo(r).delete()}const tC="__sak";/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Qj{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(tC,"1"),this.storage.removeItem(tC),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function hUt(){const r=Ja();return KM(r)||VB(r)}const fUt=1e3,dUt=10;class kj extends Qj{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=hUt()&&j5t(),this.fallbackToPolling=Lj(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),i=this.localCache[t];n!==i&&e(t,i,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((o,s,A)=>{this.notifyListeners(o,A)});return}const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(n);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}const i=()=>{const o=this.storage.getItem(n);!t&&this.localCache[n]===o||this.notifyListeners(n,o)},a=this.storage.getItem(n);V5t()&&a!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,dUt):i()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const i of Array.from(n))i(t&&JSON.parse(t))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},fUt)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}kj.type="LOCAL";const pUt=kj;/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Hj extends Qj{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Hj.type="SESSION";const Gj=Hj;/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function gUt(r){return Promise.all(r.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}}))}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class jB{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find(i=>i.isListeningto(e));if(t)return t;const n=new jB(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:i,data:a}=t.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:i});const s=Array.from(o).map(async l=>l(t.origin,a)),A=await gUt(s);t.ports[0].postMessage({status:"done",eventId:n,eventType:i,response:A})}_subscribe(e,t){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),(!t||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}jB.receivers=[];/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function YM(r="",e=10){let t="";for(let n=0;n<e;n++)t+=Math.floor(Math.random()*10);return r+t}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class vUt{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let a,o;return new Promise((s,A)=>{const l=YM("",20);i.port1.start();const u=setTimeout(()=>{A(new Error("unsupported_event"))},n);o={messageChannel:i,onMessage(c){const h=c;if(h.data.eventId===l)switch(h.data.status){case"ack":clearTimeout(u),a=setTimeout(()=>{A(new Error("timeout"))},3e3);break;case"done":clearTimeout(a),s(h.data.response);break;default:clearTimeout(u),clearTimeout(a),A(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function dl(){return window}function mUt(r){dl().location.href=r}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function $j(){return typeof dl().WorkerGlobalScope<"u"&&typeof dl().importScripts=="function"}async function yUt(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function _Ut(){var r;return((r=navigator==null?void 0:navigator.serviceWorker)===null||r===void 0?void 0:r.controller)||null}function wUt(){return $j()?self:null}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const Vj="firebaseLocalStorageDb",EUt=1,eC="firebaseLocalStorage",jj="fbase_key";class n_{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function KB(r,e){return r.transaction([eC],e?"readwrite":"readonly").objectStore(eC)}function CUt(){const r=indexedDB.deleteDatabase(Vj);return new n_(r).toPromise()}function TO(){const r=indexedDB.open(Vj,EUt);return new Promise((e,t)=>{r.addEventListener("error",()=>{t(r.error)}),r.addEventListener("upgradeneeded",()=>{const n=r.result;try{n.createObjectStore(eC,{keyPath:jj})}catch(i){t(i)}}),r.addEventListener("success",async()=>{const n=r.result;n.objectStoreNames.contains(eC)?e(n):(n.close(),await CUt(),e(await TO()))})})}async function x6(r,e,t){const n=KB(r,!0).put({[jj]:e,value:t});return new n_(n).toPromise()}async function BUt(r,e){const t=KB(r,!1).get(e),n=await new n_(t).toPromise();return n===void 0?null:n.value}function I6(r,e){const t=KB(r,!0).delete(e);return new n_(t).toPromise()}const bUt=800,TUt=3;class Kj{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await TO(),this.db)}async _withRetries(e){let t=0;for(;;)try{const n=await this._openDb();return await e(n)}catch(n){if(t++>TUt)throw n;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return $j()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=jB._getInstance(wUt()),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await yUt(),!this.activeServiceWorker)return;this.sender=new vUt(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&!((e=n[0])===null||e===void 0)&&e.fulfilled&&!((t=n[0])===null||t===void 0)&&t.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||_Ut()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await TO();return await x6(e,tC,"1"),await I6(e,tC),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>x6(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){const t=await this._withRetries(n=>BUt(n,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>I6(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const a=KB(i,!1).getAll();return new n_(a).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const t=[],n=new Set;for(const{fbase_key:i,value:a}of e)n.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(a)&&(this.notifyListeners(i,a),t.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!n.has(i)&&(this.notifyListeners(i,null),t.push(i));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const i of Array.from(n))i(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),bUt)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}Kj.type="LOCAL";const SUt=Kj;/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function xUt(){var r,e;return(e=(r=document.getElementsByTagName("head"))===null||r===void 0?void 0:r[0])!==null&&e!==void 0?e:document}function IUt(r){return new Promise((e,t)=>{const n=document.createElement("script");n.setAttribute("src",r),n.onload=e,n.onerror=i=>{const a=fl("internal-error");a.customData=i,t(a)},n.type="text/javascript",n.charset="UTF-8",xUt().appendChild(n)})}function LUt(r){return`__${r}${Math.floor(Math.random()*1e6)}`}new J0(3e4,6e4);/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function OUt(r,e){return e?hu(e):(Ke(r._popupRedirectResolver,r,"argument-error"),r._popupRedirectResolver)}/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class XM extends WM{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return bg(e,this._buildIdpRequest())}_linkToIdToken(e,t){return bg(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return bg(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function FUt(r){return Uj(r.auth,new XM(r),r.bypassAuthState)}function RUt(r){const{auth:e,user:t}=r;return Ke(t,e,"internal-error"),Pj(t,new XM(r),r.bypassAuthState)}async function MUt(r){const{auth:e,user:t}=r;return Ke(t,e,"internal-error"),oUt(t,new XM(r),r.bypassAuthState)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class Wj{constructor(e,t,n,i,a=!1){this.auth=e,this.resolver=n,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}})}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:i,tenantId:a,error:o,type:s}=e;if(o){this.reject(o);return}const A={auth:this.auth,requestUri:t,sessionId:n,tenantId:a||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(A))}catch(l){this.reject(l)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return FUt;case"linkViaPopup":case"linkViaRedirect":return MUt;case"reauthViaPopup":case"reauthViaRedirect":return RUt;default:BA(this.auth,"internal-error")}}resolve(e){Iu(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Iu(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const NUt=new J0(2e3,1e4);class ag extends Wj{constructor(e,t,n,i,a){super(e,t,i,a),this.provider=n,this.authWindow=null,this.pollId=null,ag.currentPopupAction&&ag.currentPopupAction.cancel(),ag.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ke(e,this.auth,"internal-error"),e}async onExecution(){Iu(this.filter.length===1,"Popup operations only handle one event");const e=YM();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(t=>{this.reject(t)}),this.resolver._isIframeWebStorageSupported(this.auth,t=>{t||this.reject(fl(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(fl(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,ag.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;if(!((n=(t=this.authWindow)===null||t===void 0?void 0:t.window)===null||n===void 0)&&n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(fl(this.auth,"popup-closed-by-user"))},2e3);return}this.pollId=window.setTimeout(e,NUt.get())};e()}}ag.currentPopupAction=null;/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const PUt="pendingRedirect",Sw=new Map;class UUt extends Wj{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=Sw.get(this.auth._key());if(!e){try{const n=await DUt(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(n)}catch(t){e=()=>Promise.reject(t)}Sw.set(this.auth._key(),e)}return this.bypassAuthState||Sw.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function DUt(r,e){const t=HUt(e),n=kUt(r);if(!await n._isAvailable())return!1;const i=await n._get(t)==="true";return await n._remove(t),i}function QUt(r,e){Sw.set(r._key(),e)}function kUt(r){return hu(r._redirectPersistence)}function HUt(r){return Tw(PUt,r.config.apiKey,r.name)}async function GUt(r,e,t=!1){const n=e_(r),i=OUt(n,e),o=await new UUt(n,i,t).execute();return o&&!t&&(delete o.user._redirectEventId,await n._persistUserIfCurrent(o.user),await n._setRedirectUser(null,e)),o}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const $Ut=10*60*1e3;class VUt{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!jUt(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!zj(e)){const i=((n=e.error.code)===null||n===void 0?void 0:n.split("auth/")[1])||"internal-error";t.onError(fl(this.auth,i))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=t.eventId===null||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=$Ut&&this.cachedEventUids.clear(),this.cachedEventUids.has(L6(e))}saveEventToCache(e){this.cachedEventUids.add(L6(e)),this.lastProcessedEventTime=Date.now()}}function L6(r){return[r.type,r.eventId,r.sessionId,r.tenantId].filter(e=>e).join("-")}function zj({type:r,error:e}){return r==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function jUt(r){switch(r.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return zj(r);default:return!1}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/async function KUt(r,e={}){return bv(r,"GET","/v1/projects",e)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const WUt=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,zUt=/^https?/;async function YUt(r){if(r.config.emulator)return;const{authorizedDomains:e}=await KUt(r);for(const t of e)try{if(XUt(t))return}catch{}BA(r,"unauthorized-domain")}function XUt(r){const e=bO(),{protocol:t,hostname:n}=new URL(e);if(r.startsWith("chrome-extension://")){const o=new URL(r);return o.hostname===""&&n===""?t==="chrome-extension:"&&r.replace("chrome-extension://","")===e.replace("chrome-extension://",""):t==="chrome-extension:"&&o.hostname===n}if(!zUt.test(t))return!1;if(WUt.test(r))return n===r;const i=r.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const qUt=new J0(3e4,6e4);function O6(){const r=dl().___jsl;if(r!=null&&r.H){for(const e of Object.keys(r.H))if(r.H[e].r=r.H[e].r||[],r.H[e].L=r.H[e].L||[],r.H[e].r=[...r.H[e].L],r.CP)for(let t=0;t<r.CP.length;t++)r.CP[t]=null}}function ZUt(r){return new Promise((e,t)=>{var n,i,a;function o(){O6(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{O6(),t(fl(r,"network-request-failed"))},timeout:qUt.get()})}if(!((i=(n=dl().gapi)===null||n===void 0?void 0:n.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((a=dl().gapi)===null||a===void 0)&&a.load)o();else{const s=LUt("iframefcb");return dl()[s]=()=>{gapi.load?o():t(fl(r,"network-request-failed"))},IUt(`https://apis.google.com/js/api.js?onload=${s}`).catch(A=>t(A))}}).catch(e=>{throw xw=null,e})}let xw=null;function JUt(r){return xw=xw||ZUt(r),xw}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const t2t=new J0(5e3,15e3),e2t="__/auth/iframe",r2t="emulator/auth/iframe",n2t={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},i2t=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function a2t(r){const e=r.config;Ke(e.authDomain,r,"auth-domain-config-required");const t=e.emulator?VM(e,r2t):`https://${r.config.authDomain}/${e2t}`,n={apiKey:e.apiKey,appName:r.name,v:$B},i=i2t.get(r.config.apiHost);i&&(n.eid=i);const a=r._getFrameworks();return a.length&&(n.fw=a.join(",")),`${t}?${Z0(n).slice(1)}`}async function o2t(r){const e=await JUt(r),t=dl().gapi;return Ke(t,r,"internal-error"),e.open({where:document.body,url:a2t(r),messageHandlersFilter:t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:n2t,dontclear:!0},n=>new Promise(async(i,a)=>{await n.restyle({setHideOnLeave:!1});const o=fl(r,"network-request-failed"),s=dl().setTimeout(()=>{a(o)},t2t.get());function A(){dl().clearTimeout(s),i(n)}n.ping(A).then(A,()=>{a(o)})}))}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC.
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const s2t={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},A2t=500,l2t=600,u2t="_blank",c2t="http://localhost";class F6{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function h2t(r,e,t,n=A2t,i=l2t){const a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString();let s="";const A=Object.assign(Object.assign({},s2t),{width:n.toString(),height:i.toString(),top:a,left:o}),l=Ja().toLowerCase();t&&(s=bj(l)?u2t:t),Bj(l)&&(e=e||c2t,A.scrollbars="yes");const u=Object.entries(A).reduce((h,[f,d])=>`${h}${f}=${d},`,"");if($5t(l)&&s!=="_self")return f2t(e||"",s),new F6(null);const c=window.open(e||"",s,u);Ke(c,r,"popup-blocked");try{c.focus()}catch{}return new F6(c)}function f2t(r,e){const t=document.createElement("a");t.href=r,t.target=e;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),t.dispatchEvent(n)}/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const d2t="__/auth/handler",p2t="emulator/auth/handler";function R6(r,e,t,n,i,a){Ke(r.config.authDomain,r,"auth-domain-config-required"),Ke(r.config.apiKey,r,"invalid-api-key");const o={apiKey:r.config.apiKey,appName:r.name,authType:t,redirectUrl:n,v:$B,eventId:i};if(e instanceof Mj){e.setDefaultLanguage(r.languageCode),o.providerId=e.providerId||"",fPt(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[A,l]of Object.entries(a||{}))o[A]=l}if(e instanceof r_){const A=e.getScopes().filter(l=>l!=="");A.length>0&&(o.scopes=A.join(","))}r.tenantId&&(o.tid=r.tenantId);const s=o;for(const A of Object.keys(s))s[A]===void 0&&delete s[A];return`${g2t(r)}?${Z0(s).slice(1)}`}function g2t({config:r}){return r.emulator?VM(r,p2t):`https://${r.authDomain}/${d2t}`}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const jS="webStorageSupport";class v2t{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Gj,this._completeRedirectFn=GUt,this._overrideRedirectResult=QUt}async _openPopup(e,t,n,i){var a;Iu((a=this.eventManagers[e._key()])===null||a===void 0?void 0:a.manager,"_initialize() not called before _openPopup()");const o=R6(e,t,n,bO(),i);return h2t(e,o,YM())}async _openRedirect(e,t,n,i){return await this._originValidation(e),mUt(R6(e,t,n,bO(),i)),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:i,promise:a}=this.eventManagers[t];return i?Promise.resolve(i):(Iu(a,"If manager is not set, promise should be"),a)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){const t=await o2t(e),n=new VUt(e);return t.register("authEvent",i=>(Ke(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:n.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(jS,{type:jS},i=>{var a;const o=(a=i==null?void 0:i[0])===null||a===void 0?void 0:a[jS];o!==void 0&&t(!!o),BA(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=YUt(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Lj()||KM()||VB()}}const m2t=v2t;var M6="@firebase/auth",N6="0.21.3";/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/class y2t{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged(n=>{e((n==null?void 0:n.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Ke(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/function _2t(r){switch(r){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}function w2t(r){s0(new Wg("auth",(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),{apiKey:a,authDomain:o}=n.options;return((s,A)=>{Ke(a&&!a.includes(":"),"invalid-api-key",{appName:s.name}),Ke(!(o!=null&&o.includes(":")),"argument-error",{appName:s.name});const l={apiKey:a,authDomain:o,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Oj(r)},u=new W5t(s,A,l);return T5t(u,t),u})(n,i)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),s0(new Wg("auth-internal",e=>{const t=e_(e.getProvider("auth").getImmediate());return(n=>new y2t(n))(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),Cg(M6,N6,_2t(r)),Cg(M6,N6,"esm2017")}/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/const E2t=5*60,C2t=lj("authIdTokenMaxAge")||E2t;let P6=null;const B2t=r=>async e=>{const t=e&&await e.getIdTokenResult(),n=t&&(new Date().getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>C2t)return;const i=t==null?void 0:t.token;P6!==i&&(P6=i,await fetch(r,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function b2t(r=f5t()){const e=fj(r,"auth");if(e.isInitialized())return e.getImmediate();const t=b5t(r,{popupRedirectResolver:m2t,persistence:[SUt,pUt,Gj]}),n=lj("authTokenSyncURL");if(n){const a=B2t(n);uUt(t,a,()=>a(t.currentUser)),lUt(t,o=>a(o))}const i=Aj("auth");return i&&z5t(t,`http://${i}`),t}w2t("Browser");var T2t="firebase",S2t="9.17.1";/**
|
||
* @license
|
||
* Copyright 2020 Google LLC
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/Cg(T2t,S2t,"app");const x2t={apiKey:"AIzaSyBsP9SNH1FuRBpbhcvo9flXbAQWydpctd4",authDomain:"irishrailtracker.firebaseapp.com",projectId:"irishrailtracker",storageBucket:"irishrailtracker.appspot.com",messagingSenderId:"753565032771",appId:"1:753565032771:web:092121cc9d3e254084cff6"},I2t=dj(x2t);function L2t(r,e,t){const n=b2t(I2t);cUt(n,i=>i?t():t({path:"/"}))}function Mp(r){return()=>YNt(Object.assign({"../pages/404Page.vue":()=>Rp(()=>import("./404Page-3090e8b5.js"),["assets/404Page-3090e8b5.js","assets/Navbar-fcee2b9c.js","assets/Navbar-0f051f5e.css"]),"../pages/AccountPage.vue":()=>Rp(()=>import("./AccountPage-edc2add1.js"),["assets/AccountPage-edc2add1.js","assets/index.esm2017-54994bc5.js","assets/style-1561178c.js","assets/style-4629487b.css","assets/Navbar-fcee2b9c.js","assets/Navbar-0f051f5e.css","assets/AccountPage-a368ab8c.css"]),"../pages/InsightsPage.vue":()=>Rp(()=>import("./InsightsPage-ba74d16b.js"),["assets/InsightsPage-ba74d16b.js","assets/Navbar-fcee2b9c.js","assets/Navbar-0f051f5e.css","assets/index.esm2017-54994bc5.js","assets/style-1561178c.js","assets/style-4629487b.css","assets/InsightsPage-9ac0e67d.css"]),"../pages/LoginPage.vue":()=>Rp(()=>import("./LoginPage-8a330df8.js"),["assets/LoginPage-8a330df8.js","assets/style-1561178c.js","assets/style-4629487b.css","assets/Navbar-fcee2b9c.js","assets/Navbar-0f051f5e.css","assets/315220_eye_icon-30328a0f.js","assets/LoginPage-1a8e9e77.css"]),"../pages/MapPage.vue":()=>Rp(()=>import("./MapPage-bc88e829.js"),["assets/MapPage-bc88e829.js","assets/Navbar-fcee2b9c.js","assets/Navbar-0f051f5e.css","assets/index.esm2017-54994bc5.js","assets/style-1561178c.js","assets/style-4629487b.css","assets/MapPage-8a77fcaf.css"]),"../pages/SignUpPage.vue":()=>Rp(()=>import("./SignUpPage-52535c8d.js"),["assets/SignUpPage-52535c8d.js","assets/style-1561178c.js","assets/style-4629487b.css","assets/Navbar-fcee2b9c.js","assets/Navbar-0f051f5e.css","assets/315220_eye_icon-30328a0f.js","assets/SignUpPage-839a656f.css"])}),`../pages/${r}.vue`)}const O2t=[{path:"/",component:Mp("MapPage")},{path:"/insights",component:Mp("InsightsPage")},{path:"/account",component:Mp("AccountPage"),beforeEnter:L2t},{path:"/signup",component:Mp("SignUpPage")},{path:"/login",component:Mp("LoginPage")},{path:"/:catchAll(.*)",component:Mp("404Page")}];var U6={},F2t={get exports(){return U6},set exports(r){U6=r}},vo="top",_s="bottom",ws="right",mo="left",WB="auto",Sv=[vo,_s,ws,mo],dd="start",Yg="end",Yj="clippingParents",qM="viewport",Wp="popper",Xj="reference",SO=Sv.reduce(function(r,e){return r.concat([e+"-"+dd,e+"-"+Yg])},[]),ZM=[].concat(Sv,[WB]).reduce(function(r,e){return r.concat([e,e+"-"+dd,e+"-"+Yg])},[]),qj="beforeRead",Zj="read",Jj="afterRead",tK="beforeMain",eK="main",rK="afterMain",nK="beforeWrite",iK="write",aK="afterWrite",oK=[qj,Zj,Jj,tK,eK,rK,nK,iK,aK];function wl(r){return r?(r.nodeName||"").toLowerCase():null}function Ks(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function pd(r){var e=Ks(r).Element;return r instanceof e||r instanceof Element}function Hs(r){var e=Ks(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function JM(r){if(typeof ShadowRoot>"u")return!1;var e=Ks(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function R2t(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},a=e.elements[t];!Hs(a)||!wl(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function M2t(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],a=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),s=o.reduce(function(A,l){return A[l]="",A},{});!Hs(i)||!wl(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(A){i.removeAttribute(A)}))})}}const tN={name:"applyStyles",enabled:!0,phase:"write",fn:R2t,effect:M2t,requires:["computeStyles"]};function pl(r){return r.split("-")[0]}var zf=Math.max,rC=Math.min,Xg=Math.round;function xO(){var r=navigator.userAgentData;return r!=null&&r.brands?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function sK(){return!/^((?!chrome|android).)*safari/i.test(xO())}function qg(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=r.getBoundingClientRect(),i=1,a=1;e&&Hs(r)&&(i=r.offsetWidth>0&&Xg(n.width)/r.offsetWidth||1,a=r.offsetHeight>0&&Xg(n.height)/r.offsetHeight||1);var o=pd(r)?Ks(r):window,s=o.visualViewport,A=!sK()&&t,l=(n.left+(A&&s?s.offsetLeft:0))/i,u=(n.top+(A&&s?s.offsetTop:0))/a,c=n.width/i,h=n.height/a;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l,x:l,y:u}}function eN(r){var e=qg(r),t=r.offsetWidth,n=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:n}}function AK(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&JM(t)){var n=e;do{if(n&&r.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Lu(r){return Ks(r).getComputedStyle(r)}function N2t(r){return["table","td","th"].indexOf(wl(r))>=0}function Oh(r){return((pd(r)?r.ownerDocument:r.document)||window.document).documentElement}function zB(r){return wl(r)==="html"?r:r.assignedSlot||r.parentNode||(JM(r)?r.host:null)||Oh(r)}function D6(r){return!Hs(r)||Lu(r).position==="fixed"?null:r.offsetParent}function P2t(r){var e=/firefox/i.test(xO()),t=/Trident/i.test(xO());if(t&&Hs(r)){var n=Lu(r);if(n.position==="fixed")return null}var i=zB(r);for(JM(i)&&(i=i.host);Hs(i)&&["html","body"].indexOf(wl(i))<0;){var a=Lu(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function i_(r){for(var e=Ks(r),t=D6(r);t&&N2t(t)&&Lu(t).position==="static";)t=D6(t);return t&&(wl(t)==="html"||wl(t)==="body"&&Lu(t).position==="static")?e:t||P2t(r)||e}function rN(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function by(r,e,t){return zf(r,rC(e,t))}function U2t(r,e,t){var n=by(r,e,t);return n>t?t:n}function lK(){return{top:0,right:0,bottom:0,left:0}}function uK(r){return Object.assign({},lK(),r)}function cK(r,e){return e.reduce(function(t,n){return t[n]=r,t},{})}var D2t=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,uK(typeof e!="number"?e:cK(e,Sv))};function Q2t(r){var e,t=r.state,n=r.name,i=r.options,a=t.elements.arrow,o=t.modifiersData.popperOffsets,s=pl(t.placement),A=rN(s),l=[mo,ws].indexOf(s)>=0,u=l?"height":"width";if(!(!a||!o)){var c=D2t(i.padding,t),h=eN(a),f=A==="y"?vo:mo,d=A==="y"?_s:ws,g=t.rects.reference[u]+t.rects.reference[A]-o[A]-t.rects.popper[u],m=o[A]-t.rects.reference[A],v=i_(a),y=v?A==="y"?v.clientHeight||0:v.clientWidth||0:0,w=g/2-m/2,C=c[f],O=y-h[u]-c[d],F=y/2-h[u]/2+w,I=by(C,F,O),T=A;t.modifiersData[n]=(e={},e[T]=I,e.centerOffset=I-F,e)}}function k2t(r){var e=r.state,t=r.options,n=t.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||AK(e.elements.popper,i)&&(e.elements.arrow=i))}const hK={name:"arrow",enabled:!0,phase:"main",fn:Q2t,effect:k2t,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Zg(r){return r.split("-")[1]}var H2t={top:"auto",right:"auto",bottom:"auto",left:"auto"};function G2t(r){var e=r.x,t=r.y,n=window,i=n.devicePixelRatio||1;return{x:Xg(e*i)/i||0,y:Xg(t*i)/i||0}}function Q6(r){var e,t=r.popper,n=r.popperRect,i=r.placement,a=r.variation,o=r.offsets,s=r.position,A=r.gpuAcceleration,l=r.adaptive,u=r.roundOffsets,c=r.isFixed,h=o.x,f=h===void 0?0:h,d=o.y,g=d===void 0?0:d,m=typeof u=="function"?u({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var v=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),w=mo,C=vo,O=window;if(l){var F=i_(t),I="clientHeight",T="clientWidth";if(F===Ks(t)&&(F=Oh(t),Lu(F).position!=="static"&&s==="absolute"&&(I="scrollHeight",T="scrollWidth")),F=F,i===vo||(i===mo||i===ws)&&a===Yg){C=_s;var L=c&&F===O&&O.visualViewport?O.visualViewport.height:F[I];g-=L-n.height,g*=A?1:-1}if(i===mo||(i===vo||i===_s)&&a===Yg){w=ws;var N=c&&F===O&&O.visualViewport?O.visualViewport.width:F[T];f-=N-n.width,f*=A?1:-1}}var x=Object.assign({position:s},l&&H2t),S=u===!0?G2t({x:f,y:g}):{x:f,y:g};if(f=S.x,g=S.y,A){var P;return Object.assign({},x,(P={},P[C]=y?"0":"",P[w]=v?"0":"",P.transform=(O.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",P))}return Object.assign({},x,(e={},e[C]=y?g+"px":"",e[w]=v?f+"px":"",e.transform="",e))}function $2t(r){var e=r.state,t=r.options,n=t.gpuAcceleration,i=n===void 0?!0:n,a=t.adaptive,o=a===void 0?!0:a,s=t.roundOffsets,A=s===void 0?!0:s,l={placement:pl(e.placement),variation:Zg(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Q6(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:A})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Q6(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:A})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const nN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$2t,data:{}};var X1={passive:!0};function V2t(r){var e=r.state,t=r.instance,n=r.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,A=Ks(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&l.forEach(function(u){u.addEventListener("scroll",t.update,X1)}),s&&A.addEventListener("resize",t.update,X1),function(){a&&l.forEach(function(u){u.removeEventListener("scroll",t.update,X1)}),s&&A.removeEventListener("resize",t.update,X1)}}const iN={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:V2t,data:{}};var j2t={left:"right",right:"left",bottom:"top",top:"bottom"};function Iw(r){return r.replace(/left|right|bottom|top/g,function(e){return j2t[e]})}var K2t={start:"end",end:"start"};function k6(r){return r.replace(/start|end/g,function(e){return K2t[e]})}function aN(r){var e=Ks(r),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function oN(r){return qg(Oh(r)).left+aN(r).scrollLeft}function W2t(r,e){var t=Ks(r),n=Oh(r),i=t.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,A=0;if(i){a=i.width,o=i.height;var l=sK();(l||!l&&e==="fixed")&&(s=i.offsetLeft,A=i.offsetTop)}return{width:a,height:o,x:s+oN(r),y:A}}function z2t(r){var e,t=Oh(r),n=aN(r),i=(e=r.ownerDocument)==null?void 0:e.body,a=zf(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=zf(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+oN(r),A=-n.scrollTop;return Lu(i||t).direction==="rtl"&&(s+=zf(t.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:A}}function sN(r){var e=Lu(r),t=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+n)}function fK(r){return["html","body","#document"].indexOf(wl(r))>=0?r.ownerDocument.body:Hs(r)&&sN(r)?r:fK(zB(r))}function Ty(r,e){var t;e===void 0&&(e=[]);var n=fK(r),i=n===((t=r.ownerDocument)==null?void 0:t.body),a=Ks(n),o=i?[a].concat(a.visualViewport||[],sN(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(Ty(zB(o)))}function IO(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function Y2t(r,e){var t=qg(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function H6(r,e,t){return e===qM?IO(W2t(r,t)):pd(e)?Y2t(e,t):IO(z2t(Oh(r)))}function X2t(r){var e=Ty(zB(r)),t=["absolute","fixed"].indexOf(Lu(r).position)>=0,n=t&&Hs(r)?i_(r):r;return pd(n)?e.filter(function(i){return pd(i)&&AK(i,n)&&wl(i)!=="body"}):[]}function q2t(r,e,t,n){var i=e==="clippingParents"?X2t(r):[].concat(e),a=[].concat(i,[t]),o=a[0],s=a.reduce(function(A,l){var u=H6(r,l,n);return A.top=zf(u.top,A.top),A.right=rC(u.right,A.right),A.bottom=rC(u.bottom,A.bottom),A.left=zf(u.left,A.left),A},H6(r,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function dK(r){var e=r.reference,t=r.element,n=r.placement,i=n?pl(n):null,a=n?Zg(n):null,o=e.x+e.width/2-t.width/2,s=e.y+e.height/2-t.height/2,A;switch(i){case vo:A={x:o,y:e.y-t.height};break;case _s:A={x:o,y:e.y+e.height};break;case ws:A={x:e.x+e.width,y:s};break;case mo:A={x:e.x-t.width,y:s};break;default:A={x:e.x,y:e.y}}var l=i?rN(i):null;if(l!=null){var u=l==="y"?"height":"width";switch(a){case dd:A[l]=A[l]-(e[u]/2-t[u]/2);break;case Yg:A[l]=A[l]+(e[u]/2-t[u]/2);break}}return A}function Jg(r,e){e===void 0&&(e={});var t=e,n=t.placement,i=n===void 0?r.placement:n,a=t.strategy,o=a===void 0?r.strategy:a,s=t.boundary,A=s===void 0?Yj:s,l=t.rootBoundary,u=l===void 0?qM:l,c=t.elementContext,h=c===void 0?Wp:c,f=t.altBoundary,d=f===void 0?!1:f,g=t.padding,m=g===void 0?0:g,v=uK(typeof m!="number"?m:cK(m,Sv)),y=h===Wp?Xj:Wp,w=r.rects.popper,C=r.elements[d?y:h],O=q2t(pd(C)?C:C.contextElement||Oh(r.elements.popper),A,u,o),F=qg(r.elements.reference),I=dK({reference:F,element:w,strategy:"absolute",placement:i}),T=IO(Object.assign({},w,I)),L=h===Wp?T:F,N={top:O.top-L.top+v.top,bottom:L.bottom-O.bottom+v.bottom,left:O.left-L.left+v.left,right:L.right-O.right+v.right},x=r.modifiersData.offset;if(h===Wp&&x){var S=x[i];Object.keys(N).forEach(function(P){var U=[ws,_s].indexOf(P)>=0?1:-1,tt=[vo,_s].indexOf(P)>=0?"y":"x";N[P]+=S[tt]*U})}return N}function Z2t(r,e){e===void 0&&(e={});var t=e,n=t.placement,i=t.boundary,a=t.rootBoundary,o=t.padding,s=t.flipVariations,A=t.allowedAutoPlacements,l=A===void 0?ZM:A,u=Zg(n),c=u?s?SO:SO.filter(function(d){return Zg(d)===u}):Sv,h=c.filter(function(d){return l.indexOf(d)>=0});h.length===0&&(h=c);var f=h.reduce(function(d,g){return d[g]=Jg(r,{placement:g,boundary:i,rootBoundary:a,padding:o})[pl(g)],d},{});return Object.keys(f).sort(function(d,g){return f[d]-f[g]})}function J2t(r){if(pl(r)===WB)return[];var e=Iw(r);return[k6(r),e,k6(e)]}function tDt(r){var e=r.state,t=r.options,n=r.name;if(!e.modifiersData[n]._skip){for(var i=t.mainAxis,a=i===void 0?!0:i,o=t.altAxis,s=o===void 0?!0:o,A=t.fallbackPlacements,l=t.padding,u=t.boundary,c=t.rootBoundary,h=t.altBoundary,f=t.flipVariations,d=f===void 0?!0:f,g=t.allowedAutoPlacements,m=e.options.placement,v=pl(m),y=v===m,w=A||(y||!d?[Iw(m)]:J2t(m)),C=[m].concat(w).reduce(function(Y,H){return Y.concat(pl(H)===WB?Z2t(e,{placement:H,boundary:u,rootBoundary:c,padding:l,flipVariations:d,allowedAutoPlacements:g}):H)},[]),O=e.rects.reference,F=e.rects.popper,I=new Map,T=!0,L=C[0],N=0;N<C.length;N++){var x=C[N],S=pl(x),P=Zg(x)===dd,U=[vo,_s].indexOf(S)>=0,tt=U?"width":"height",q=Jg(e,{placement:x,boundary:u,rootBoundary:c,altBoundary:h,padding:l}),rt=U?P?ws:mo:P?_s:vo;O[tt]>F[tt]&&(rt=Iw(rt));var nt=Iw(rt),At=[];if(a&&At.push(q[S]<=0),s&&At.push(q[rt]<=0,q[nt]<=0),At.every(function(Y){return Y})){L=x,T=!1;break}I.set(x,At)}if(T)for(var ct=d?3:1,Tt=function(H){var J=C.find(function(ot){var ut=I.get(ot);if(ut)return ut.slice(0,H).every(function(X){return X})});if(J)return L=J,"break"},M=ct;M>0;M--){var W=Tt(M);if(W==="break")break}e.placement!==L&&(e.modifiersData[n]._skip=!0,e.placement=L,e.reset=!0)}}const pK={name:"flip",enabled:!0,phase:"main",fn:tDt,requiresIfExists:["offset"],data:{_skip:!1}};function G6(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function $6(r){return[vo,ws,_s,mo].some(function(e){return r[e]>=0})}function eDt(r){var e=r.state,t=r.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=Jg(e,{elementContext:"reference"}),s=Jg(e,{altBoundary:!0}),A=G6(o,n),l=G6(s,i,a),u=$6(A),c=$6(l);e.modifiersData[t]={referenceClippingOffsets:A,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:c},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":c})}const gK={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eDt};function rDt(r,e,t){var n=pl(r),i=[mo,vo].indexOf(n)>=0?-1:1,a=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[mo,ws].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function nDt(r){var e=r.state,t=r.options,n=r.name,i=t.offset,a=i===void 0?[0,0]:i,o=ZM.reduce(function(u,c){return u[c]=rDt(c,e.rects,a),u},{}),s=o[e.placement],A=s.x,l=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=A,e.modifiersData.popperOffsets.y+=l),e.modifiersData[n]=o}const vK={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:nDt};function iDt(r){var e=r.state,t=r.name;e.modifiersData[t]=dK({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const AN={name:"popperOffsets",enabled:!0,phase:"read",fn:iDt,data:{}};function aDt(r){return r==="x"?"y":"x"}function oDt(r){var e=r.state,t=r.options,n=r.name,i=t.mainAxis,a=i===void 0?!0:i,o=t.altAxis,s=o===void 0?!1:o,A=t.boundary,l=t.rootBoundary,u=t.altBoundary,c=t.padding,h=t.tether,f=h===void 0?!0:h,d=t.tetherOffset,g=d===void 0?0:d,m=Jg(e,{boundary:A,rootBoundary:l,padding:c,altBoundary:u}),v=pl(e.placement),y=Zg(e.placement),w=!y,C=rN(v),O=aDt(C),F=e.modifiersData.popperOffsets,I=e.rects.reference,T=e.rects.popper,L=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,N=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(F){if(a){var P,U=C==="y"?vo:mo,tt=C==="y"?_s:ws,q=C==="y"?"height":"width",rt=F[C],nt=rt+m[U],At=rt-m[tt],ct=f?-T[q]/2:0,Tt=y===dd?I[q]:T[q],M=y===dd?-T[q]:-I[q],W=e.elements.arrow,Y=f&&W?eN(W):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:lK(),J=H[U],ot=H[tt],ut=by(0,I[q],Y[q]),X=w?I[q]/2-ct-ut-J-N.mainAxis:Tt-ut-J-N.mainAxis,It=w?-I[q]/2+ct+ut+ot+N.mainAxis:M+ut+ot+N.mainAxis,at=e.elements.arrow&&i_(e.elements.arrow),j=at?C==="y"?at.clientTop||0:at.clientLeft||0:0,Z=(P=x==null?void 0:x[C])!=null?P:0,ft=rt+X-Z-j,it=rt+It-Z,V=by(f?rC(nt,ft):nt,rt,f?zf(At,it):At);F[C]=V,S[C]=V-rt}if(s){var Ft,Mt=C==="x"?vo:mo,Et=C==="x"?_s:ws,Bt=F[O],Ct=O==="y"?"height":"width",Rt=Bt+m[Mt],Nt=Bt-m[Et],Dt=[vo,mo].indexOf(v)!==-1,Wt=(Ft=x==null?void 0:x[O])!=null?Ft:0,te=Dt?Rt:Bt-I[Ct]-T[Ct]-Wt+N.altAxis,Ae=Dt?Bt+I[Ct]+T[Ct]-Wt-N.altAxis:Nt,oe=f&&Dt?U2t(te,Bt,Ae):by(f?te:Rt,Bt,f?Ae:Nt);F[O]=oe,S[O]=oe-Bt}e.modifiersData[n]=S}}const mK={name:"preventOverflow",enabled:!0,phase:"main",fn:oDt,requiresIfExists:["offset"]};function sDt(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function ADt(r){return r===Ks(r)||!Hs(r)?aN(r):sDt(r)}function lDt(r){var e=r.getBoundingClientRect(),t=Xg(e.width)/r.offsetWidth||1,n=Xg(e.height)/r.offsetHeight||1;return t!==1||n!==1}function uDt(r,e,t){t===void 0&&(t=!1);var n=Hs(e),i=Hs(e)&&lDt(e),a=Oh(e),o=qg(r,i,t),s={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(n||!n&&!t)&&((wl(e)!=="body"||sN(a))&&(s=ADt(e)),Hs(e)?(A=qg(e,!0),A.x+=e.clientLeft,A.y+=e.clientTop):a&&(A.x=oN(a))),{x:o.left+s.scrollLeft-A.x,y:o.top+s.scrollTop-A.y,width:o.width,height:o.height}}function cDt(r){var e=new Map,t=new Set,n=[];r.forEach(function(a){e.set(a.name,a)});function i(a){t.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!t.has(s)){var A=e.get(s);A&&i(A)}}),n.push(a)}return r.forEach(function(a){t.has(a.name)||i(a)}),n}function hDt(r){var e=cDt(r);return oK.reduce(function(t,n){return t.concat(e.filter(function(i){return i.phase===n}))},[])}function fDt(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function dDt(r){var e=r.reduce(function(t,n){var i=t[n.name];return t[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var V6={placement:"bottom",modifiers:[],strategy:"absolute"};function j6(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function YB(r){r===void 0&&(r={});var e=r,t=e.defaultModifiers,n=t===void 0?[]:t,i=e.defaultOptions,a=i===void 0?V6:i;return function(s,A,l){l===void 0&&(l=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},V6,a),modifiersData:{},elements:{reference:s,popper:A},attributes:{},styles:{}},c=[],h=!1,f={state:u,setOptions:function(v){var y=typeof v=="function"?v(u.options):v;g(),u.options=Object.assign({},a,u.options,y),u.scrollParents={reference:pd(s)?Ty(s):s.contextElement?Ty(s.contextElement):[],popper:Ty(A)};var w=hDt(dDt([].concat(n,u.options.modifiers)));return u.orderedModifiers=w.filter(function(C){return C.enabled}),d(),f.update()},forceUpdate:function(){if(!h){var v=u.elements,y=v.reference,w=v.popper;if(j6(y,w)){u.rects={reference:uDt(y,i_(w),u.options.strategy==="fixed"),popper:eN(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(N){return u.modifiersData[N.name]=Object.assign({},N.data)});for(var C=0;C<u.orderedModifiers.length;C++){if(u.reset===!0){u.reset=!1,C=-1;continue}var O=u.orderedModifiers[C],F=O.fn,I=O.options,T=I===void 0?{}:I,L=O.name;typeof F=="function"&&(u=F({state:u,options:T,name:L,instance:f})||u)}}}},update:fDt(function(){return new Promise(function(m){f.forceUpdate(),m(u)})}),destroy:function(){g(),h=!0}};if(!j6(s,A))return f;f.setOptions(l).then(function(m){!h&&l.onFirstUpdate&&l.onFirstUpdate(m)});function d(){u.orderedModifiers.forEach(function(m){var v=m.name,y=m.options,w=y===void 0?{}:y,C=m.effect;if(typeof C=="function"){var O=C({state:u,name:v,instance:f,options:w}),F=function(){};c.push(O||F)}})}function g(){c.forEach(function(m){return m()}),c=[]}return f}}var pDt=YB(),gDt=[iN,AN,nN,tN],vDt=YB({defaultModifiers:gDt}),mDt=[iN,AN,nN,tN,vK,pK,mK,hK,gK],yDt=YB({defaultModifiers:mDt});const _Dt=Object.freeze(Object.defineProperty({__proto__:null,afterMain:rK,afterRead:Jj,afterWrite:aK,applyStyles:tN,arrow:hK,auto:WB,basePlacements:Sv,beforeMain:tK,beforeRead:qj,beforeWrite:nK,bottom:_s,clippingParents:Yj,computeStyles:nN,createPopper:yDt,createPopperBase:pDt,createPopperLite:vDt,detectOverflow:Jg,end:Yg,eventListeners:iN,flip:pK,hide:gK,left:mo,main:eK,modifierPhases:oK,offset:vK,placements:ZM,popper:Wp,popperGenerator:YB,popperOffsets:AN,preventOverflow:mK,read:Zj,reference:Xj,right:ws,start:dd,top:vo,variationPlacements:SO,viewport:qM,write:iK},Symbol.toStringTag,{value:"Module"})),wDt=KV(_Dt);/*!
|
||
* Bootstrap v5.2.3 (https://getbootstrap.com/)
|
||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||
*/(function(r,e){(function(t,n){r.exports=n(wDt)})(jV,function(t){function n(lt){if(lt&<.__esModule)return lt;const B=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(lt){for(const D in lt)if(D!=="default"){const ht=Object.getOwnPropertyDescriptor(lt,D);Object.defineProperty(B,D,ht.get?ht:{enumerable:!0,get:()=>lt[D]})}}return B.default=lt,Object.freeze(B)}const i=n(t),a=1e6,o=1e3,s="transitionend",A=lt=>lt==null?`${lt}`:Object.prototype.toString.call(lt).match(/\s([a-z]+)/i)[1].toLowerCase(),l=lt=>{do lt+=Math.floor(Math.random()*a);while(document.getElementById(lt));return lt},u=lt=>{let B=lt.getAttribute("data-bs-target");if(!B||B==="#"){let D=lt.getAttribute("href");if(!D||!D.includes("#")&&!D.startsWith("."))return null;D.includes("#")&&!D.startsWith("#")&&(D=`#${D.split("#")[1]}`),B=D&&D!=="#"?D.trim():null}return B},c=lt=>{const B=u(lt);return B&&document.querySelector(B)?B:null},h=lt=>{const B=u(lt);return B?document.querySelector(B):null},f=lt=>{if(!lt)return 0;let{transitionDuration:B,transitionDelay:D}=window.getComputedStyle(lt);const ht=Number.parseFloat(B),Qt=Number.parseFloat(D);return!ht&&!Qt?0:(B=B.split(",")[0],D=D.split(",")[0],(Number.parseFloat(B)+Number.parseFloat(D))*o)},d=lt=>{lt.dispatchEvent(new Event(s))},g=lt=>!lt||typeof lt!="object"?!1:(typeof lt.jquery<"u"&&(lt=lt[0]),typeof lt.nodeType<"u"),m=lt=>g(lt)?lt.jquery?lt[0]:lt:typeof lt=="string"&<.length>0?document.querySelector(lt):null,v=lt=>{if(!g(lt)||lt.getClientRects().length===0)return!1;const B=getComputedStyle(lt).getPropertyValue("visibility")==="visible",D=lt.closest("details:not([open])");if(!D)return B;if(D!==lt){const ht=lt.closest("summary");if(ht&&ht.parentNode!==D||ht===null)return!1}return B},y=lt=>!lt||lt.nodeType!==Node.ELEMENT_NODE||lt.classList.contains("disabled")?!0:typeof lt.disabled<"u"?lt.disabled:lt.hasAttribute("disabled")&<.getAttribute("disabled")!=="false",w=lt=>{if(!document.documentElement.attachShadow)return null;if(typeof lt.getRootNode=="function"){const B=lt.getRootNode();return B instanceof ShadowRoot?B:null}return lt instanceof ShadowRoot?lt:lt.parentNode?w(lt.parentNode):null},C=()=>{},O=lt=>{lt.offsetHeight},F=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,I=[],T=lt=>{document.readyState==="loading"?(I.length||document.addEventListener("DOMContentLoaded",()=>{for(const B of I)B()}),I.push(lt)):lt()},L=()=>document.documentElement.dir==="rtl",N=lt=>{T(()=>{const B=F();if(B){const D=lt.NAME,ht=B.fn[D];B.fn[D]=lt.jQueryInterface,B.fn[D].Constructor=lt,B.fn[D].noConflict=()=>(B.fn[D]=ht,lt.jQueryInterface)}})},x=lt=>{typeof lt=="function"&<()},S=(lt,B,D=!0)=>{if(!D){x(lt);return}const ht=5,Qt=f(B)+ht;let re=!1;const Zt=({target:Se})=>{Se===B&&(re=!0,B.removeEventListener(s,Zt),x(lt))};B.addEventListener(s,Zt),setTimeout(()=>{re||d(B)},Qt)},P=(lt,B,D,ht)=>{const Qt=lt.length;let re=lt.indexOf(B);return re===-1?!D&&ht?lt[Qt-1]:lt[0]:(re+=D?1:-1,ht&&(re=(re+Qt)%Qt),lt[Math.max(0,Math.min(re,Qt-1))])},U=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,q=/::\d+$/,rt={};let nt=1;const At={mouseenter:"mouseover",mouseleave:"mouseout"},ct=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Tt(lt,B){return B&&`${B}::${nt++}`||lt.uidEvent||nt++}function M(lt){const B=Tt(lt);return lt.uidEvent=B,rt[B]=rt[B]||{},rt[B]}function W(lt,B){return function D(ht){return j(ht,{delegateTarget:lt}),D.oneOff&&at.off(lt,ht.type,B),B.apply(lt,[ht])}}function Y(lt,B,D){return function ht(Qt){const re=lt.querySelectorAll(B);for(let{target:Zt}=Qt;Zt&&Zt!==this;Zt=Zt.parentNode)for(const Se of re)if(Se===Zt)return j(Qt,{delegateTarget:Zt}),ht.oneOff&&at.off(lt,Qt.type,B,D),D.apply(Zt,[Qt])}}function H(lt,B,D=null){return Object.values(lt).find(ht=>ht.callable===B&&ht.delegationSelector===D)}function J(lt,B,D){const ht=typeof B=="string",Qt=ht?D:B||D;let re=It(lt);return ct.has(re)||(re=lt),[ht,Qt,re]}function ot(lt,B,D,ht,Qt){if(typeof B!="string"||!lt)return;let[re,Zt,Se]=J(B,D,ht);B in At&&(Zt=(ss=>function(As){if(!As.relatedTarget||As.relatedTarget!==As.delegateTarget&&!As.delegateTarget.contains(As.relatedTarget))return ss.call(this,As)})(Zt));const na=M(lt),Ra=na[Se]||(na[Se]={}),zn=H(Ra,Zt,re?D:null);if(zn){zn.oneOff=zn.oneOff&&Qt;return}const Ma=Tt(Zt,B.replace(U,"")),Na=re?Y(lt,D,Zt):W(lt,Zt);Na.delegationSelector=re?D:null,Na.callable=Zt,Na.oneOff=Qt,Na.uidEvent=Ma,Ra[Ma]=Na,lt.addEventListener(Se,Na,re)}function ut(lt,B,D,ht,Qt){const re=H(B[D],ht,Qt);re&&(lt.removeEventListener(D,re,Boolean(Qt)),delete B[D][re.uidEvent])}function X(lt,B,D,ht){const Qt=B[D]||{};for(const re of Object.keys(Qt))if(re.includes(ht)){const Zt=Qt[re];ut(lt,B,D,Zt.callable,Zt.delegationSelector)}}function It(lt){return lt=lt.replace(tt,""),At[lt]||lt}const at={on(lt,B,D,ht){ot(lt,B,D,ht,!1)},one(lt,B,D,ht){ot(lt,B,D,ht,!0)},off(lt,B,D,ht){if(typeof B!="string"||!lt)return;const[Qt,re,Zt]=J(B,D,ht),Se=Zt!==B,na=M(lt),Ra=na[Zt]||{},zn=B.startsWith(".");if(typeof re<"u"){if(!Object.keys(Ra).length)return;ut(lt,na,Zt,re,Qt?D:null);return}if(zn)for(const Ma of Object.keys(na))X(lt,na,Ma,B.slice(1));for(const Ma of Object.keys(Ra)){const Na=Ma.replace(q,"");if(!Se||B.includes(Na)){const KA=Ra[Ma];ut(lt,na,Zt,KA.callable,KA.delegationSelector)}}},trigger(lt,B,D){if(typeof B!="string"||!lt)return null;const ht=F(),Qt=It(B),re=B!==Qt;let Zt=null,Se=!0,na=!0,Ra=!1;re&&ht&&(Zt=ht.Event(B,D),ht(lt).trigger(Zt),Se=!Zt.isPropagationStopped(),na=!Zt.isImmediatePropagationStopped(),Ra=Zt.isDefaultPrevented());let zn=new Event(B,{bubbles:Se,cancelable:!0});return zn=j(zn,D),Ra&&zn.preventDefault(),na&<.dispatchEvent(zn),zn.defaultPrevented&&Zt&&Zt.preventDefault(),zn}};function j(lt,B){for(const[D,ht]of Object.entries(B||{}))try{lt[D]=ht}catch{Object.defineProperty(lt,D,{configurable:!0,get(){return ht}})}return lt}const Z=new Map,ft={set(lt,B,D){Z.has(lt)||Z.set(lt,new Map);const ht=Z.get(lt);if(!ht.has(B)&&ht.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(ht.keys())[0]}.`);return}ht.set(B,D)},get(lt,B){return Z.has(lt)&&Z.get(lt).get(B)||null},remove(lt,B){if(!Z.has(lt))return;const D=Z.get(lt);D.delete(B),D.size===0&&Z.delete(lt)}};function it(lt){if(lt==="true")return!0;if(lt==="false")return!1;if(lt===Number(lt).toString())return Number(lt);if(lt===""||lt==="null")return null;if(typeof lt!="string")return lt;try{return JSON.parse(decodeURIComponent(lt))}catch{return lt}}function V(lt){return lt.replace(/[A-Z]/g,B=>`-${B.toLowerCase()}`)}const Ft={setDataAttribute(lt,B,D){lt.setAttribute(`data-bs-${V(B)}`,D)},removeDataAttribute(lt,B){lt.removeAttribute(`data-bs-${V(B)}`)},getDataAttributes(lt){if(!lt)return{};const B={},D=Object.keys(lt.dataset).filter(ht=>ht.startsWith("bs")&&!ht.startsWith("bsConfig"));for(const ht of D){let Qt=ht.replace(/^bs/,"");Qt=Qt.charAt(0).toLowerCase()+Qt.slice(1,Qt.length),B[Qt]=it(lt.dataset[ht])}return B},getDataAttribute(lt,B){return it(lt.getAttribute(`data-bs-${V(B)}`))}};class Mt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(B){return B=this._mergeConfigObj(B),B=this._configAfterMerge(B),this._typeCheckConfig(B),B}_configAfterMerge(B){return B}_mergeConfigObj(B,D){const ht=g(D)?Ft.getDataAttribute(D,"config"):{};return{...this.constructor.Default,...typeof ht=="object"?ht:{},...g(D)?Ft.getDataAttributes(D):{},...typeof B=="object"?B:{}}}_typeCheckConfig(B,D=this.constructor.DefaultType){for(const ht of Object.keys(D)){const Qt=D[ht],re=B[ht],Zt=g(re)?"element":A(re);if(!new RegExp(Qt).test(Zt))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${ht}" provided type "${Zt}" but expected type "${Qt}".`)}}}const Et="5.2.3";class Bt extends Mt{constructor(B,D){super(),B=m(B),B&&(this._element=B,this._config=this._getConfig(D),ft.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ft.remove(this._element,this.constructor.DATA_KEY),at.off(this._element,this.constructor.EVENT_KEY);for(const B of Object.getOwnPropertyNames(this))this[B]=null}_queueCallback(B,D,ht=!0){S(B,D,ht)}_getConfig(B){return B=this._mergeConfigObj(B,this._element),B=this._configAfterMerge(B),this._typeCheckConfig(B),B}static getInstance(B){return ft.get(m(B),this.DATA_KEY)}static getOrCreateInstance(B,D={}){return this.getInstance(B)||new this(B,typeof D=="object"?D:null)}static get VERSION(){return Et}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(B){return`${B}${this.EVENT_KEY}`}}const Ct=(lt,B="hide")=>{const D=`click.dismiss${lt.EVENT_KEY}`,ht=lt.NAME;at.on(document,D,`[data-bs-dismiss="${ht}"]`,function(Qt){if(["A","AREA"].includes(this.tagName)&&Qt.preventDefault(),y(this))return;const re=h(this)||this.closest(`.${ht}`);lt.getOrCreateInstance(re)[B]()})},Rt="alert",Dt=".bs.alert",Wt=`close${Dt}`,te=`closed${Dt}`,Ae="fade",oe="show";class Jt extends Bt{static get NAME(){return Rt}close(){if(at.trigger(this._element,Wt).defaultPrevented)return;this._element.classList.remove(oe);const D=this._element.classList.contains(Ae);this._queueCallback(()=>this._destroyElement(),this._element,D)}_destroyElement(){this._element.remove(),at.trigger(this._element,te),this.dispose()}static jQueryInterface(B){return this.each(function(){const D=Jt.getOrCreateInstance(this);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B](this)}})}}Ct(Jt,"close"),N(Jt);const fe="button",nr=".bs.button",ke=".data-api",wr="active",Ne='[data-bs-toggle="button"]',Pe=`click${nr}${ke}`;class Gr extends Bt{static get NAME(){return fe}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(wr))}static jQueryInterface(B){return this.each(function(){const D=Gr.getOrCreateInstance(this);B==="toggle"&&D[B]()})}}at.on(document,Pe,Ne,lt=>{lt.preventDefault();const B=lt.target.closest(Ne);Gr.getOrCreateInstance(B).toggle()}),N(Gr);const se={find(lt,B=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(B,lt))},findOne(lt,B=document.documentElement){return Element.prototype.querySelector.call(B,lt)},children(lt,B){return[].concat(...lt.children).filter(D=>D.matches(B))},parents(lt,B){const D=[];let ht=lt.parentNode.closest(B);for(;ht;)D.push(ht),ht=ht.parentNode.closest(B);return D},prev(lt,B){let D=lt.previousElementSibling;for(;D;){if(D.matches(B))return[D];D=D.previousElementSibling}return[]},next(lt,B){let D=lt.nextElementSibling;for(;D;){if(D.matches(B))return[D];D=D.nextElementSibling}return[]},focusableChildren(lt){const B=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(D=>`${D}:not([tabindex^="-"])`).join(",");return this.find(B,lt).filter(D=>!y(D)&&v(D))}},fi="swipe",gr=".bs.swipe",ei=`touchstart${gr}`,Wr=`touchmove${gr}`,zr=`touchend${gr}`,He=`pointerdown${gr}`,Ir=`pointerup${gr}`,$n="touch",yn="pen",di="pointer-event",pi=40,Ue={endCallback:null,leftCallback:null,rightCallback:null},ri={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Cn extends Mt{constructor(B,D){super(),this._element=B,!(!B||!Cn.isSupported())&&(this._config=this._getConfig(D),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ue}static get DefaultType(){return ri}static get NAME(){return fi}dispose(){at.off(this._element,gr)}_start(B){if(!this._supportPointerEvents){this._deltaX=B.touches[0].clientX;return}this._eventIsPointerPenTouch(B)&&(this._deltaX=B.clientX)}_end(B){this._eventIsPointerPenTouch(B)&&(this._deltaX=B.clientX-this._deltaX),this._handleSwipe(),x(this._config.endCallback)}_move(B){this._deltaX=B.touches&&B.touches.length>1?0:B.touches[0].clientX-this._deltaX}_handleSwipe(){const B=Math.abs(this._deltaX);if(B<=pi)return;const D=B/this._deltaX;this._deltaX=0,D&&x(D>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(at.on(this._element,He,B=>this._start(B)),at.on(this._element,Ir,B=>this._end(B)),this._element.classList.add(di)):(at.on(this._element,ei,B=>this._start(B)),at.on(this._element,Wr,B=>this._move(B)),at.on(this._element,zr,B=>this._end(B)))}_eventIsPointerPenTouch(B){return this._supportPointerEvents&&(B.pointerType===yn||B.pointerType===$n)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const gi="carousel",Br=".bs.carousel",_n=".data-api",eo="ArrowLeft",de="ArrowRight",_t=500,$t="next",ne="prev",Je="left",Lr="right",hn=`slide${Br}`,fn=`slid${Br}`,Xo=`keydown${Br}`,vi=`mouseenter${Br}`,Ws=`mouseleave${Br}`,OA=`dragstart${Br}`,Fh=`load${Br}${_n}`,xv=`click${Br}${_n}`,Pd="carousel",zs="active",Ud="slide",Iv="carousel-item-end",Rh="carousel-item-start",Lv="carousel-item-next",Dd="carousel-item-prev",Qd=".active",Fl=".carousel-item",Ov=Qd+Fl,Vn=".carousel-item img",kd=".carousel-indicators",Hd="[data-bs-slide], [data-bs-slide-to]",Gd='[data-bs-ride="carousel"]',Mh={[eo]:Lr,[de]:Je},Fv={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},qo={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Zo extends Bt{constructor(B,D){super(B,D),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=se.findOne(kd,this._element),this._addEventListeners(),this._config.ride===Pd&&this.cycle()}static get Default(){return Fv}static get DefaultType(){return qo}static get NAME(){return gi}next(){this._slide($t)}nextWhenVisible(){!document.hidden&&v(this._element)&&this.next()}prev(){this._slide(ne)}pause(){this._isSliding&&d(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){at.one(this._element,fn,()=>this.cycle());return}this.cycle()}}to(B){const D=this._getItems();if(B>D.length-1||B<0)return;if(this._isSliding){at.one(this._element,fn,()=>this.to(B));return}const ht=this._getItemIndex(this._getActive());if(ht===B)return;const Qt=B>ht?$t:ne;this._slide(Qt,D[B])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(B){return B.defaultInterval=B.interval,B}_addEventListeners(){this._config.keyboard&&at.on(this._element,Xo,B=>this._keydown(B)),this._config.pause==="hover"&&(at.on(this._element,vi,()=>this.pause()),at.on(this._element,Ws,()=>this._maybeEnableCycle())),this._config.touch&&Cn.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const ht of se.find(Vn,this._element))at.on(ht,OA,Qt=>Qt.preventDefault());const D={leftCallback:()=>this._slide(this._directionToOrder(Je)),rightCallback:()=>this._slide(this._directionToOrder(Lr)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),_t+this._config.interval))}};this._swipeHelper=new Cn(this._element,D)}_keydown(B){if(/input|textarea/i.test(B.target.tagName))return;const D=Mh[B.key];D&&(B.preventDefault(),this._slide(this._directionToOrder(D)))}_getItemIndex(B){return this._getItems().indexOf(B)}_setActiveIndicatorElement(B){if(!this._indicatorsElement)return;const D=se.findOne(Qd,this._indicatorsElement);D.classList.remove(zs),D.removeAttribute("aria-current");const ht=se.findOne(`[data-bs-slide-to="${B}"]`,this._indicatorsElement);ht&&(ht.classList.add(zs),ht.setAttribute("aria-current","true"))}_updateInterval(){const B=this._activeElement||this._getActive();if(!B)return;const D=Number.parseInt(B.getAttribute("data-bs-interval"),10);this._config.interval=D||this._config.defaultInterval}_slide(B,D=null){if(this._isSliding)return;const ht=this._getActive(),Qt=B===$t,re=D||P(this._getItems(),ht,Qt,this._config.wrap);if(re===ht)return;const Zt=this._getItemIndex(re),Se=KA=>at.trigger(this._element,KA,{relatedTarget:re,direction:this._orderToDirection(B),from:this._getItemIndex(ht),to:Zt});if(Se(hn).defaultPrevented||!ht||!re)return;const Ra=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Zt),this._activeElement=re;const zn=Qt?Rh:Iv,Ma=Qt?Lv:Dd;re.classList.add(Ma),O(re),ht.classList.add(zn),re.classList.add(zn);const Na=()=>{re.classList.remove(zn,Ma),re.classList.add(zs),ht.classList.remove(zs,Ma,zn),this._isSliding=!1,Se(fn)};this._queueCallback(Na,ht,this._isAnimated()),Ra&&this.cycle()}_isAnimated(){return this._element.classList.contains(Ud)}_getActive(){return se.findOne(Ov,this._element)}_getItems(){return se.find(Fl,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(B){return L()?B===Je?ne:$t:B===Je?$t:ne}_orderToDirection(B){return L()?B===ne?Je:Lr:B===ne?Lr:Je}static jQueryInterface(B){return this.each(function(){const D=Zo.getOrCreateInstance(this,B);if(typeof B=="number"){D.to(B);return}if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B]()}})}}at.on(document,xv,Hd,function(lt){const B=h(this);if(!B||!B.classList.contains(Pd))return;lt.preventDefault();const D=Zo.getOrCreateInstance(B),ht=this.getAttribute("data-bs-slide-to");if(ht){D.to(ht),D._maybeEnableCycle();return}if(Ft.getDataAttribute(this,"slide")==="next"){D.next(),D._maybeEnableCycle();return}D.prev(),D._maybeEnableCycle()}),at.on(window,Fh,()=>{const lt=se.find(Gd);for(const B of lt)Zo.getOrCreateInstance(B)}),N(Zo);const Sa="collapse",FA=".bs.collapse",Rv=".data-api",Vd=`show${FA}`,Mv=`shown${FA}`,jd=`hide${FA}`,Nv=`hidden${FA}`,Nh=`click${FA}${Rv}`,Ph="show",RA="collapse",ku="collapsing",Ys="collapsed",Hu=`:scope .${RA} .${RA}`,Gu="collapse-horizontal",Kd="width",ta="height",Pv=".collapse.show, .collapse.collapsing",$u='[data-bs-toggle="collapse"]',er={parent:null,toggle:!0},Uv={parent:"(null|element)",toggle:"boolean"};class MA extends Bt{constructor(B,D){super(B,D),this._isTransitioning=!1,this._triggerArray=[];const ht=se.find($u);for(const Qt of ht){const re=c(Qt),Zt=se.find(re).filter(Se=>Se===this._element);re!==null&&Zt.length&&this._triggerArray.push(Qt)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return er}static get DefaultType(){return Uv}static get NAME(){return Sa}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let B=[];if(this._config.parent&&(B=this._getFirstLevelChildren(Pv).filter(Se=>Se!==this._element).map(Se=>MA.getOrCreateInstance(Se,{toggle:!1}))),B.length&&B[0]._isTransitioning||at.trigger(this._element,Vd).defaultPrevented)return;for(const Se of B)Se.hide();const ht=this._getDimension();this._element.classList.remove(RA),this._element.classList.add(ku),this._element.style[ht]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const Qt=()=>{this._isTransitioning=!1,this._element.classList.remove(ku),this._element.classList.add(RA,Ph),this._element.style[ht]="",at.trigger(this._element,Mv)},Zt=`scroll${ht[0].toUpperCase()+ht.slice(1)}`;this._queueCallback(Qt,this._element,!0),this._element.style[ht]=`${this._element[Zt]}px`}hide(){if(this._isTransitioning||!this._isShown()||at.trigger(this._element,jd).defaultPrevented)return;const D=this._getDimension();this._element.style[D]=`${this._element.getBoundingClientRect()[D]}px`,O(this._element),this._element.classList.add(ku),this._element.classList.remove(RA,Ph);for(const Qt of this._triggerArray){const re=h(Qt);re&&!this._isShown(re)&&this._addAriaAndCollapsedClass([Qt],!1)}this._isTransitioning=!0;const ht=()=>{this._isTransitioning=!1,this._element.classList.remove(ku),this._element.classList.add(RA),at.trigger(this._element,Nv)};this._element.style[D]="",this._queueCallback(ht,this._element,!0)}_isShown(B=this._element){return B.classList.contains(Ph)}_configAfterMerge(B){return B.toggle=Boolean(B.toggle),B.parent=m(B.parent),B}_getDimension(){return this._element.classList.contains(Gu)?Kd:ta}_initializeChildren(){if(!this._config.parent)return;const B=this._getFirstLevelChildren($u);for(const D of B){const ht=h(D);ht&&this._addAriaAndCollapsedClass([D],this._isShown(ht))}}_getFirstLevelChildren(B){const D=se.find(Hu,this._config.parent);return se.find(B,this._config.parent).filter(ht=>!D.includes(ht))}_addAriaAndCollapsedClass(B,D){if(B.length)for(const ht of B)ht.classList.toggle(Ys,!D),ht.setAttribute("aria-expanded",D)}static jQueryInterface(B){const D={};return typeof B=="string"&&/show|hide/.test(B)&&(D.toggle=!1),this.each(function(){const ht=MA.getOrCreateInstance(this,D);if(typeof B=="string"){if(typeof ht[B]>"u")throw new TypeError(`No method named "${B}"`);ht[B]()}})}}at.on(document,Nh,$u,function(lt){(lt.target.tagName==="A"||lt.delegateTarget&<.delegateTarget.tagName==="A")&<.preventDefault();const B=c(this),D=se.find(B);for(const ht of D)MA.getOrCreateInstance(ht,{toggle:!1}).toggle()}),N(MA);const Jo="dropdown",bs=".bs.dropdown",NA=".data-api",Uh="Escape",Wd="Tab",Qv="ArrowUp",zd="ArrowDown",Dh=2,Rl=`hide${bs}`,PA=`hidden${bs}`,kv=`show${bs}`,Ml=`shown${bs}`,Vu=`click${bs}${NA}`,Nl=`keydown${bs}${NA}`,Yd=`keyup${bs}${NA}`,Xs="show",Xd="dropup",qd="dropend",qs="dropstart",UA="dropup-center",Hv="dropdown-center",xa='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',ts=`${xa}.${Xs}`,DA=".dropdown-menu",Pl=".navbar",Gv=".navbar-nav",ju=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",$v=L()?"top-end":"top-start",Qh=L()?"top-start":"top-end",kh=L()?"bottom-end":"bottom-start",Zd=L()?"bottom-start":"bottom-end",Ku=L()?"left-start":"right-start",Hh=L()?"right-start":"left-start",Gh="top",Jd="bottom",Vv={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Wu={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Gi extends Bt{constructor(B,D){super(B,D),this._popper=null,this._parent=this._element.parentNode,this._menu=se.next(this._element,DA)[0]||se.prev(this._element,DA)[0]||se.findOne(DA,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vv}static get DefaultType(){return Wu}static get NAME(){return Jo}toggle(){return this._isShown()?this.hide():this.show()}show(){if(y(this._element)||this._isShown())return;const B={relatedTarget:this._element};if(!at.trigger(this._element,kv,B).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Gv))for(const ht of[].concat(...document.body.children))at.on(ht,"mouseover",C);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Xs),this._element.classList.add(Xs),at.trigger(this._element,Ml,B)}}hide(){if(y(this._element)||!this._isShown())return;const B={relatedTarget:this._element};this._completeHide(B)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(B){if(!at.trigger(this._element,Rl,B).defaultPrevented){if("ontouchstart"in document.documentElement)for(const ht of[].concat(...document.body.children))at.off(ht,"mouseover",C);this._popper&&this._popper.destroy(),this._menu.classList.remove(Xs),this._element.classList.remove(Xs),this._element.setAttribute("aria-expanded","false"),Ft.removeDataAttribute(this._menu,"popper"),at.trigger(this._element,PA,B)}}_getConfig(B){if(B=super._getConfig(B),typeof B.reference=="object"&&!g(B.reference)&&typeof B.reference.getBoundingClientRect!="function")throw new TypeError(`${Jo.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return B}_createPopper(){if(typeof i>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let B=this._element;this._config.reference==="parent"?B=this._parent:g(this._config.reference)?B=m(this._config.reference):typeof this._config.reference=="object"&&(B=this._config.reference);const D=this._getPopperConfig();this._popper=i.createPopper(B,this._menu,D)}_isShown(){return this._menu.classList.contains(Xs)}_getPlacement(){const B=this._parent;if(B.classList.contains(qd))return Ku;if(B.classList.contains(qs))return Hh;if(B.classList.contains(UA))return Gh;if(B.classList.contains(Hv))return Jd;const D=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return B.classList.contains(Xd)?D?Qh:$v:D?Zd:kh}_detectNavbar(){return this._element.closest(Pl)!==null}_getOffset(){const{offset:B}=this._config;return typeof B=="string"?B.split(",").map(D=>Number.parseInt(D,10)):typeof B=="function"?D=>B(D,this._element):B}_getPopperConfig(){const B={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Ft.setDataAttribute(this._menu,"popper","static"),B.modifiers=[{name:"applyStyles",enabled:!1}]),{...B,...typeof this._config.popperConfig=="function"?this._config.popperConfig(B):this._config.popperConfig}}_selectMenuItem({key:B,target:D}){const ht=se.find(ju,this._menu).filter(Qt=>v(Qt));ht.length&&P(ht,D,B===zd,!ht.includes(D)).focus()}static jQueryInterface(B){return this.each(function(){const D=Gi.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B]()}})}static clearMenus(B){if(B.button===Dh||B.type==="keyup"&&B.key!==Wd)return;const D=se.find(ts);for(const ht of D){const Qt=Gi.getInstance(ht);if(!Qt||Qt._config.autoClose===!1)continue;const re=B.composedPath(),Zt=re.includes(Qt._menu);if(re.includes(Qt._element)||Qt._config.autoClose==="inside"&&!Zt||Qt._config.autoClose==="outside"&&Zt||Qt._menu.contains(B.target)&&(B.type==="keyup"&&B.key===Wd||/input|select|option|textarea|form/i.test(B.target.tagName)))continue;const Se={relatedTarget:Qt._element};B.type==="click"&&(Se.clickEvent=B),Qt._completeHide(Se)}}static dataApiKeydownHandler(B){const D=/input|textarea/i.test(B.target.tagName),ht=B.key===Uh,Qt=[Qv,zd].includes(B.key);if(!Qt&&!ht||D&&!ht)return;B.preventDefault();const re=this.matches(xa)?this:se.prev(this,xa)[0]||se.next(this,xa)[0]||se.findOne(xa,B.delegateTarget.parentNode),Zt=Gi.getOrCreateInstance(re);if(Qt){B.stopPropagation(),Zt.show(),Zt._selectMenuItem(B);return}Zt._isShown()&&(B.stopPropagation(),Zt.hide(),re.focus())}}at.on(document,Nl,xa,Gi.dataApiKeydownHandler),at.on(document,Nl,DA,Gi.dataApiKeydownHandler),at.on(document,Vu,Gi.clearMenus),at.on(document,Yd,Gi.clearMenus),at.on(document,Vu,xa,function(lt){lt.preventDefault(),Gi.getOrCreateInstance(this).toggle()}),N(Gi);const zu=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Zs=".sticky-top",QA="padding-right",E="margin-right";class k{constructor(){this._element=document.body}getWidth(){const B=document.documentElement.clientWidth;return Math.abs(window.innerWidth-B)}hide(){const B=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,QA,D=>D+B),this._setElementAttributes(zu,QA,D=>D+B),this._setElementAttributes(Zs,E,D=>D-B)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,QA),this._resetElementAttributes(zu,QA),this._resetElementAttributes(Zs,E)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(B,D,ht){const Qt=this.getWidth(),re=Zt=>{if(Zt!==this._element&&window.innerWidth>Zt.clientWidth+Qt)return;this._saveInitialAttribute(Zt,D);const Se=window.getComputedStyle(Zt).getPropertyValue(D);Zt.style.setProperty(D,`${ht(Number.parseFloat(Se))}px`)};this._applyManipulationCallback(B,re)}_saveInitialAttribute(B,D){const ht=B.style.getPropertyValue(D);ht&&Ft.setDataAttribute(B,D,ht)}_resetElementAttributes(B,D){const ht=Qt=>{const re=Ft.getDataAttribute(Qt,D);if(re===null){Qt.style.removeProperty(D);return}Ft.removeDataAttribute(Qt,D),Qt.style.setProperty(D,re)};this._applyManipulationCallback(B,ht)}_applyManipulationCallback(B,D){if(g(B)){D(B);return}for(const ht of se.find(B,this._element))D(ht)}}const st="backdrop",gt="fade",xt="show",Ut=`mousedown.bs.${st}`,Yt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ce={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class De extends Mt{constructor(B){super(),this._config=this._getConfig(B),this._isAppended=!1,this._element=null}static get Default(){return Yt}static get DefaultType(){return ce}static get NAME(){return st}show(B){if(!this._config.isVisible){x(B);return}this._append();const D=this._getElement();this._config.isAnimated&&O(D),D.classList.add(xt),this._emulateAnimation(()=>{x(B)})}hide(B){if(!this._config.isVisible){x(B);return}this._getElement().classList.remove(xt),this._emulateAnimation(()=>{this.dispose(),x(B)})}dispose(){this._isAppended&&(at.off(this._element,Ut),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const B=document.createElement("div");B.className=this._config.className,this._config.isAnimated&&B.classList.add(gt),this._element=B}return this._element}_configAfterMerge(B){return B.rootElement=m(B.rootElement),B}_append(){if(this._isAppended)return;const B=this._getElement();this._config.rootElement.append(B),at.on(B,Ut,()=>{x(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(B){S(B,this._getElement(),this._config.isAnimated)}}const vr="focustrap",br=".bs.focustrap",$i=`focusin${br}`,jn=`keydown.tab${br}`,ni="Tab",ea="forward",mi="backward",es={autofocus:!0,trapElement:null},ro={autofocus:"boolean",trapElement:"element"};class Ts extends Mt{constructor(B){super(),this._config=this._getConfig(B),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return es}static get DefaultType(){return ro}static get NAME(){return vr}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),at.off(document,br),at.on(document,$i,B=>this._handleFocusin(B)),at.on(document,jn,B=>this._handleKeydown(B)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,at.off(document,br))}_handleFocusin(B){const{trapElement:D}=this._config;if(B.target===document||B.target===D||D.contains(B.target))return;const ht=se.focusableChildren(D);ht.length===0?D.focus():this._lastTabNavDirection===mi?ht[ht.length-1].focus():ht[0].focus()}_handleKeydown(B){B.key===ni&&(this._lastTabNavDirection=B.shiftKey?mi:ea)}}const tp="modal",ha=".bs.modal",Yu=".data-api",$h="Escape",Vh=`hide${ha}`,Xu=`hidePrevented${ha}`,fa=`hidden${ha}`,Ul=`show${ha}`,qu=`shown${ha}`,Zu=`resize${ha}`,jh=`click.dismiss${ha}`,Ia=`mousedown.dismiss${ha}`,jv=`keydown.dismiss${ha}`,Kh=`click${ha}${Yu}`,Wh="modal-open",rs="fade",Ju="show",zh="modal-static",Kv=".modal.show",kA=".modal-dialog",Bo=".modal-body",ns='[data-bs-toggle="modal"]',HA={backdrop:!0,focus:!0,keyboard:!0},Ss={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class da extends Bt{constructor(B,D){super(B,D),this._dialog=se.findOne(kA,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new k,this._addEventListeners()}static get Default(){return HA}static get DefaultType(){return Ss}static get NAME(){return tp}toggle(B){return this._isShown?this.hide():this.show(B)}show(B){this._isShown||this._isTransitioning||at.trigger(this._element,Ul,{relatedTarget:B}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Wh),this._adjustDialog(),this._backdrop.show(()=>this._showElement(B)))}hide(){!this._isShown||this._isTransitioning||at.trigger(this._element,Vh).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ju),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){for(const B of[window,this._dialog])at.off(B,ha);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new De({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ts({trapElement:this._element})}_showElement(B){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const D=se.findOne(Bo,this._dialog);D&&(D.scrollTop=0),O(this._element),this._element.classList.add(Ju);const ht=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,at.trigger(this._element,qu,{relatedTarget:B})};this._queueCallback(ht,this._dialog,this._isAnimated())}_addEventListeners(){at.on(this._element,jv,B=>{if(B.key===$h){if(this._config.keyboard){B.preventDefault(),this.hide();return}this._triggerBackdropTransition()}}),at.on(window,Zu,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),at.on(this._element,Ia,B=>{at.one(this._element,jh,D=>{if(!(this._element!==B.target||this._element!==D.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Wh),this._resetAdjustments(),this._scrollBar.reset(),at.trigger(this._element,fa)})}_isAnimated(){return this._element.classList.contains(rs)}_triggerBackdropTransition(){if(at.trigger(this._element,Xu).defaultPrevented)return;const D=this._element.scrollHeight>document.documentElement.clientHeight,ht=this._element.style.overflowY;ht==="hidden"||this._element.classList.contains(zh)||(D||(this._element.style.overflowY="hidden"),this._element.classList.add(zh),this._queueCallback(()=>{this._element.classList.remove(zh),this._queueCallback(()=>{this._element.style.overflowY=ht},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const B=this._element.scrollHeight>document.documentElement.clientHeight,D=this._scrollBar.getWidth(),ht=D>0;if(ht&&!B){const Qt=L()?"paddingLeft":"paddingRight";this._element.style[Qt]=`${D}px`}if(!ht&&B){const Qt=L()?"paddingRight":"paddingLeft";this._element.style[Qt]=`${D}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(B,D){return this.each(function(){const ht=da.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof ht[B]>"u")throw new TypeError(`No method named "${B}"`);ht[B](D)}})}}at.on(document,Kh,ns,function(lt){const B=h(this);["A","AREA"].includes(this.tagName)&<.preventDefault(),at.one(B,Ul,Qt=>{Qt.defaultPrevented||at.one(B,fa,()=>{v(this)&&this.focus()})});const D=se.findOne(Kv);D&&da.getInstance(D).hide(),da.getOrCreateInstance(B).toggle(this)}),Ct(da),N(da);const tc="offcanvas",La=".bs.offcanvas",ec=".data-api",GA=`load${La}${ec}`,is="Escape",Is="show",$A="showing",Dl="hiding",Ql="offcanvas-backdrop",Js=".offcanvas.show",Yh=`show${La}`,bo=`shown${La}`,tA=`hide${La}`,dn=`hidePrevented${La}`,pn=`hidden${La}`,Kn=`resize${La}`,yi=`click${La}${ec}`,eA=`keydown.dismiss${La}`,VA='[data-bs-toggle="offcanvas"]',rc={backdrop:!0,keyboard:!0,scroll:!1},rp={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ls extends Bt{constructor(B,D){super(B,D),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return rc}static get DefaultType(){return rp}static get NAME(){return tc}toggle(B){return this._isShown?this.hide():this.show(B)}show(B){if(this._isShown||at.trigger(this._element,Yh,{relatedTarget:B}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new k().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add($A);const ht=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Is),this._element.classList.remove($A),at.trigger(this._element,bo,{relatedTarget:B})};this._queueCallback(ht,this._element,!0)}hide(){if(!this._isShown||at.trigger(this._element,tA).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Dl),this._backdrop.hide();const D=()=>{this._element.classList.remove(Is,Dl),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new k().reset(),at.trigger(this._element,pn)};this._queueCallback(D,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const B=()=>{if(this._config.backdrop==="static"){at.trigger(this._element,dn);return}this.hide()},D=Boolean(this._config.backdrop);return new De({className:Ql,isVisible:D,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:D?B:null})}_initializeFocusTrap(){return new Ts({trapElement:this._element})}_addEventListeners(){at.on(this._element,eA,B=>{if(B.key===is){if(!this._config.keyboard){at.trigger(this._element,dn);return}this.hide()}})}static jQueryInterface(B){return this.each(function(){const D=Ls.getOrCreateInstance(this,B);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B](this)}})}}at.on(document,yi,VA,function(lt){const B=h(this);if(["A","AREA"].includes(this.tagName)&<.preventDefault(),y(this))return;at.one(B,pn,()=>{v(this)&&this.focus()});const D=se.findOne(Js);D&&D!==B&&Ls.getInstance(D).hide(),Ls.getOrCreateInstance(B).toggle(this)}),at.on(window,GA,()=>{for(const lt of se.find(Js))Ls.getOrCreateInstance(lt).show()}),at.on(window,Kn,()=>{for(const lt of se.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(lt).position!=="fixed"&&Ls.getOrCreateInstance(lt).hide()}),Ct(Ls),N(Ls);const a_=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),o_=/^aria-[\w-]*$/i,s_=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,A_=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,l_=(lt,B)=>{const D=lt.nodeName.toLowerCase();return B.includes(D)?a_.has(D)?Boolean(s_.test(lt.nodeValue)||A_.test(lt.nodeValue)):!0:B.filter(ht=>ht instanceof RegExp).some(ht=>ht.test(D))},np={"*":["class","dir","id","lang","role",o_],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function ip(lt,B,D){if(!lt.length)return lt;if(D&&typeof D=="function")return D(lt);const Qt=new window.DOMParser().parseFromString(lt,"text/html"),re=[].concat(...Qt.body.querySelectorAll("*"));for(const Zt of re){const Se=Zt.nodeName.toLowerCase();if(!Object.keys(B).includes(Se)){Zt.remove();continue}const na=[].concat(...Zt.attributes),Ra=[].concat(B["*"]||[],B[Se]||[]);for(const zn of na)l_(zn,Ra)||Zt.removeAttribute(zn.nodeName)}return Qt.body.innerHTML}const no="TemplateFactory",To={allowList:np,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},ap={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},op={entry:"(string|element|function|null)",selector:"(string|element)"};class u_ extends Mt{constructor(B){super(),this._config=this._getConfig(B)}static get Default(){return To}static get DefaultType(){return ap}static get NAME(){return no}getContent(){return Object.values(this._config.content).map(B=>this._resolvePossibleFunction(B)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(B){return this._checkContent(B),this._config.content={...this._config.content,...B},this}toHtml(){const B=document.createElement("div");B.innerHTML=this._maybeSanitize(this._config.template);for(const[Qt,re]of Object.entries(this._config.content))this._setContent(B,re,Qt);const D=B.children[0],ht=this._resolvePossibleFunction(this._config.extraClass);return ht&&D.classList.add(...ht.split(" ")),D}_typeCheckConfig(B){super._typeCheckConfig(B),this._checkContent(B.content)}_checkContent(B){for(const[D,ht]of Object.entries(B))super._typeCheckConfig({selector:D,entry:ht},op)}_setContent(B,D,ht){const Qt=se.findOne(ht,B);if(Qt){if(D=this._resolvePossibleFunction(D),!D){Qt.remove();return}if(g(D)){this._putElementInTemplate(m(D),Qt);return}if(this._config.html){Qt.innerHTML=this._maybeSanitize(D);return}Qt.textContent=D}}_maybeSanitize(B){return this._config.sanitize?ip(B,this._config.allowList,this._config.sanitizeFn):B}_resolvePossibleFunction(B){return typeof B=="function"?B(this):B}_putElementInTemplate(B,D){if(this._config.html){D.innerHTML="",D.append(B);return}D.textContent=B.textContent}}const sp="tooltip",Ap=new Set(["sanitize","allowList","sanitizeFn"]),Xh="fade",c_="modal",nc="show",Wv=".tooltip-inner",qh=`.${c_}`,lp="hide.bs.modal",Zh="hover",zv="focus",h_="click",qB="manual",ZB="hide",JB="hidden",tb="show",eb="shown",Yv="inserted",Xv="click",Jh="focusin",rb="focusout",nb="mouseenter",f_="mouseleave",ib={AUTO:"auto",TOP:"top",RIGHT:L()?"left":"right",BOTTOM:"bottom",LEFT:L()?"right":"left"},ab={allowList:np,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ob={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class kl extends Bt{constructor(B,D){if(typeof i>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(B,D),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ab}static get DefaultType(){return ob}static get NAME(){return sp}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),at.off(this._element.closest(qh),lp,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const B=at.trigger(this._element,this.constructor.eventName(tb)),ht=(w(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(B.defaultPrevented||!ht)return;this._disposePopper();const Qt=this._getTipElement();this._element.setAttribute("aria-describedby",Qt.getAttribute("id"));const{container:re}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(re.append(Qt),at.trigger(this._element,this.constructor.eventName(Yv))),this._popper=this._createPopper(Qt),Qt.classList.add(nc),"ontouchstart"in document.documentElement)for(const Se of[].concat(...document.body.children))at.on(Se,"mouseover",C);const Zt=()=>{at.trigger(this._element,this.constructor.eventName(eb)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Zt,this.tip,this._isAnimated())}hide(){if(!this._isShown()||at.trigger(this._element,this.constructor.eventName(ZB)).defaultPrevented)return;if(this._getTipElement().classList.remove(nc),"ontouchstart"in document.documentElement)for(const Qt of[].concat(...document.body.children))at.off(Qt,"mouseover",C);this._activeTrigger[h_]=!1,this._activeTrigger[zv]=!1,this._activeTrigger[Zh]=!1,this._isHovered=null;const ht=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),at.trigger(this._element,this.constructor.eventName(JB)))};this._queueCallback(ht,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(B){const D=this._getTemplateFactory(B).toHtml();if(!D)return null;D.classList.remove(Xh,nc),D.classList.add(`bs-${this.constructor.NAME}-auto`);const ht=l(this.constructor.NAME).toString();return D.setAttribute("id",ht),this._isAnimated()&&D.classList.add(Xh),D}setContent(B){this._newContent=B,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(B){return this._templateFactory?this._templateFactory.changeContent(B):this._templateFactory=new u_({...this._config,content:B,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Wv]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(B){return this.constructor.getOrCreateInstance(B.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Xh)}_isShown(){return this.tip&&this.tip.classList.contains(nc)}_createPopper(B){const D=typeof this._config.placement=="function"?this._config.placement.call(this,B,this._element):this._config.placement,ht=ib[D.toUpperCase()];return i.createPopper(this._element,B,this._getPopperConfig(ht))}_getOffset(){const{offset:B}=this._config;return typeof B=="string"?B.split(",").map(D=>Number.parseInt(D,10)):typeof B=="function"?D=>B(D,this._element):B}_resolvePossibleFunction(B){return typeof B=="function"?B.call(this._element):B}_getPopperConfig(B){const D={placement:B,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:ht=>{this._getTipElement().setAttribute("data-popper-placement",ht.state.placement)}}]};return{...D,...typeof this._config.popperConfig=="function"?this._config.popperConfig(D):this._config.popperConfig}}_setListeners(){const B=this._config.trigger.split(" ");for(const D of B)if(D==="click")at.on(this._element,this.constructor.eventName(Xv),this._config.selector,ht=>{this._initializeOnDelegatedTarget(ht).toggle()});else if(D!==qB){const ht=D===Zh?this.constructor.eventName(nb):this.constructor.eventName(Jh),Qt=D===Zh?this.constructor.eventName(f_):this.constructor.eventName(rb);at.on(this._element,ht,this._config.selector,re=>{const Zt=this._initializeOnDelegatedTarget(re);Zt._activeTrigger[re.type==="focusin"?zv:Zh]=!0,Zt._enter()}),at.on(this._element,Qt,this._config.selector,re=>{const Zt=this._initializeOnDelegatedTarget(re);Zt._activeTrigger[re.type==="focusout"?zv:Zh]=Zt._element.contains(re.relatedTarget),Zt._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},at.on(this._element.closest(qh),lp,this._hideModalHandler)}_fixTitle(){const B=this._element.getAttribute("title");B&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",B),this._element.setAttribute("data-bs-original-title",B),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(B,D){clearTimeout(this._timeout),this._timeout=setTimeout(B,D)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(B){const D=Ft.getDataAttributes(this._element);for(const ht of Object.keys(D))Ap.has(ht)&&delete D[ht];return B={...D,...typeof B=="object"&&B?B:{}},B=this._mergeConfigObj(B),B=this._configAfterMerge(B),this._typeCheckConfig(B),B}_configAfterMerge(B){return B.container=B.container===!1?document.body:m(B.container),typeof B.delay=="number"&&(B.delay={show:B.delay,hide:B.delay}),typeof B.title=="number"&&(B.title=B.title.toString()),typeof B.content=="number"&&(B.content=B.content.toString()),B}_getDelegateConfig(){const B={};for(const D in this._config)this.constructor.Default[D]!==this._config[D]&&(B[D]=this._config[D]);return B.selector=!1,B.trigger="manual",B}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(B){return this.each(function(){const D=kl.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B]()}})}}N(kl);const jA="popover",as=".popover-header",rA=".popover-body",sb={...kl.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},d_={...kl.DefaultType,content:"(null|string|element|function)"};class os extends kl{static get Default(){return sb}static get DefaultType(){return d_}static get NAME(){return jA}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[as]:this._getTitle(),[rA]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(B){return this.each(function(){const D=os.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B]()}})}}N(os);const So="scrollspy",qv=".bs.scrollspy",p_=".data-api",g_=`activate${qv}`,Zv=`click${qv}`,v_=`load${qv}${p_}`,Ab="dropdown-item",nA="active",up='[data-bs-spy="scroll"]',Hl="[href]",Jv=".nav, .list-group",tm=".nav-link",ub=`${tm}, .nav-item > ${tm}, .list-group-item`,cb=".dropdown",hb=".dropdown-toggle",fb={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},db={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class tf extends Bt{constructor(B,D){super(B,D),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return fb}static get DefaultType(){return db}static get NAME(){return So}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const B of this._observableSections.values())this._observer.observe(B)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(B){return B.target=m(B.target)||document.body,B.rootMargin=B.offset?`${B.offset}px 0px -30%`:B.rootMargin,typeof B.threshold=="string"&&(B.threshold=B.threshold.split(",").map(D=>Number.parseFloat(D))),B}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(at.off(this._config.target,Zv),at.on(this._config.target,Zv,Hl,B=>{const D=this._observableSections.get(B.target.hash);if(D){B.preventDefault();const ht=this._rootElement||window,Qt=D.offsetTop-this._element.offsetTop;if(ht.scrollTo){ht.scrollTo({top:Qt,behavior:"smooth"});return}ht.scrollTop=Qt}}))}_getNewObserver(){const B={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(D=>this._observerCallback(D),B)}_observerCallback(B){const D=Zt=>this._targetLinks.get(`#${Zt.target.id}`),ht=Zt=>{this._previousScrollData.visibleEntryTop=Zt.target.offsetTop,this._process(D(Zt))},Qt=(this._rootElement||document.documentElement).scrollTop,re=Qt>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=Qt;for(const Zt of B){if(!Zt.isIntersecting){this._activeTarget=null,this._clearActiveClass(D(Zt));continue}const Se=Zt.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(re&&Se){if(ht(Zt),!Qt)return;continue}!re&&!Se&&ht(Zt)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const B=se.find(Hl,this._config.target);for(const D of B){if(!D.hash||y(D))continue;const ht=se.findOne(D.hash,this._element);v(ht)&&(this._targetLinks.set(D.hash,D),this._observableSections.set(D.hash,ht))}}_process(B){this._activeTarget!==B&&(this._clearActiveClass(this._config.target),this._activeTarget=B,B.classList.add(nA),this._activateParents(B),at.trigger(this._element,g_,{relatedTarget:B}))}_activateParents(B){if(B.classList.contains(Ab)){se.findOne(hb,B.closest(cb)).classList.add(nA);return}for(const D of se.parents(B,Jv))for(const ht of se.prev(D,ub))ht.classList.add(nA)}_clearActiveClass(B){B.classList.remove(nA);const D=se.find(`${Hl}.${nA}`,B);for(const ht of D)ht.classList.remove(nA)}static jQueryInterface(B){return this.each(function(){const D=tf.getOrCreateInstance(this,B);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B]()}})}}at.on(window,v_,()=>{for(const lt of se.find(up))tf.getOrCreateInstance(lt)}),N(tf);const m_="tab",Gl=".bs.tab",pb=`hide${Gl}`,y_=`hidden${Gl}`,p=`show${Gl}`,_=`shown${Gl}`,b=`click${Gl}`,R=`keydown${Gl}`,Q=`load${Gl}`,G="ArrowLeft",$="ArrowRight",K="ArrowUp",z="ArrowDown",et="active",mt="fade",Lt="show",Ot="dropdown",St=".dropdown-toggle",Vt=".dropdown-menu",Pt=":not(.dropdown-toggle)",wt='.list-group, .nav, [role="tablist"]',bt=".nav-item, .list-group-item",Ht=`.nav-link${Pt}, .list-group-item${Pt}, [role="tab"]${Pt}`,jt='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Gt=`${Ht}, ${jt}`,pe=`.${et}[data-bs-toggle="tab"], .${et}[data-bs-toggle="pill"], .${et}[data-bs-toggle="list"]`;class ie extends Bt{constructor(B){super(B),this._parent=this._element.closest(wt),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),at.on(this._element,R,D=>this._keydown(D)))}static get NAME(){return m_}show(){const B=this._element;if(this._elemIsActive(B))return;const D=this._getActiveElem(),ht=D?at.trigger(D,pb,{relatedTarget:B}):null;at.trigger(B,p,{relatedTarget:D}).defaultPrevented||ht&&ht.defaultPrevented||(this._deactivate(D,B),this._activate(B,D))}_activate(B,D){if(!B)return;B.classList.add(et),this._activate(h(B));const ht=()=>{if(B.getAttribute("role")!=="tab"){B.classList.add(Lt);return}B.removeAttribute("tabindex"),B.setAttribute("aria-selected",!0),this._toggleDropDown(B,!0),at.trigger(B,_,{relatedTarget:D})};this._queueCallback(ht,B,B.classList.contains(mt))}_deactivate(B,D){if(!B)return;B.classList.remove(et),B.blur(),this._deactivate(h(B));const ht=()=>{if(B.getAttribute("role")!=="tab"){B.classList.remove(Lt);return}B.setAttribute("aria-selected",!1),B.setAttribute("tabindex","-1"),this._toggleDropDown(B,!1),at.trigger(B,y_,{relatedTarget:D})};this._queueCallback(ht,B,B.classList.contains(mt))}_keydown(B){if(![G,$,K,z].includes(B.key))return;B.stopPropagation(),B.preventDefault();const D=[$,z].includes(B.key),ht=P(this._getChildren().filter(Qt=>!y(Qt)),B.target,D,!0);ht&&(ht.focus({preventScroll:!0}),ie.getOrCreateInstance(ht).show())}_getChildren(){return se.find(Gt,this._parent)}_getActiveElem(){return this._getChildren().find(B=>this._elemIsActive(B))||null}_setInitialAttributes(B,D){this._setAttributeIfNotExists(B,"role","tablist");for(const ht of D)this._setInitialAttributesOnChild(ht)}_setInitialAttributesOnChild(B){B=this._getInnerElement(B);const D=this._elemIsActive(B),ht=this._getOuterElement(B);B.setAttribute("aria-selected",D),ht!==B&&this._setAttributeIfNotExists(ht,"role","presentation"),D||B.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(B,"role","tab"),this._setInitialAttributesOnTargetPanel(B)}_setInitialAttributesOnTargetPanel(B){const D=h(B);D&&(this._setAttributeIfNotExists(D,"role","tabpanel"),B.id&&this._setAttributeIfNotExists(D,"aria-labelledby",`#${B.id}`))}_toggleDropDown(B,D){const ht=this._getOuterElement(B);if(!ht.classList.contains(Ot))return;const Qt=(re,Zt)=>{const Se=se.findOne(re,ht);Se&&Se.classList.toggle(Zt,D)};Qt(St,et),Qt(Vt,Lt),ht.setAttribute("aria-expanded",D)}_setAttributeIfNotExists(B,D,ht){B.hasAttribute(D)||B.setAttribute(D,ht)}_elemIsActive(B){return B.classList.contains(et)}_getInnerElement(B){return B.matches(Gt)?B:se.findOne(Gt,B)}_getOuterElement(B){return B.closest(bt)||B}static jQueryInterface(B){return this.each(function(){const D=ie.getOrCreateInstance(this);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B]()}})}}at.on(document,b,jt,function(lt){["A","AREA"].includes(this.tagName)&<.preventDefault(),!y(this)&&ie.getOrCreateInstance(this).show()}),at.on(window,Q,()=>{for(const lt of se.find(pe))ie.getOrCreateInstance(lt)}),N(ie);const Ge="toast",mr=".bs.toast",Xr=`mouseover${mr}`,Pr=`mouseout${mr}`,Tr=`focusin${mr}`,gn=`focusout${mr}`,an=`hide${mr}`,or=`hidden${mr}`,ii=`show${mr}`,Oa=`shown${mr}`,ai="fade",pa="hide",Hr="show",ra="showing",io={animation:"boolean",autohide:"boolean",delay:"number"},Ri={animation:!0,autohide:!0,delay:5e3};class Wn extends Bt{constructor(B,D){super(B,D),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ri}static get DefaultType(){return io}static get NAME(){return Ge}show(){if(at.trigger(this._element,ii).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(ai);const D=()=>{this._element.classList.remove(ra),at.trigger(this._element,Oa),this._maybeScheduleHide()};this._element.classList.remove(pa),O(this._element),this._element.classList.add(Hr,ra),this._queueCallback(D,this._element,this._config.animation)}hide(){if(!this.isShown()||at.trigger(this._element,an).defaultPrevented)return;const D=()=>{this._element.classList.add(pa),this._element.classList.remove(ra,Hr),at.trigger(this._element,or)};this._element.classList.add(ra),this._queueCallback(D,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Hr),super.dispose()}isShown(){return this._element.classList.contains(Hr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(B,D){switch(B.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=D;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=D;break}}if(D){this._clearTimeout();return}const ht=B.relatedTarget;this._element===ht||this._element.contains(ht)||this._maybeScheduleHide()}_setListeners(){at.on(this._element,Xr,B=>this._onInteraction(B,!0)),at.on(this._element,Pr,B=>this._onInteraction(B,!1)),at.on(this._element,Tr,B=>this._onInteraction(B,!0)),at.on(this._element,gn,B=>this._onInteraction(B,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(B){return this.each(function(){const D=Wn.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B](this)}})}}return Ct(Wn),N(Wn),{Alert:Jt,Button:Gr,Carousel:Zo,Collapse:MA,Dropdown:Gi,Modal:da,Offcanvas:Ls,Popover:os,ScrollSpy:tf,Tab:ie,Toast:Wn,Tooltip:kl}})})(F2t);let EDt=jNt({history:sNt(),routes:O2t});const XB=Sk(XY);XB.use(EDt);XB.use(lL);XB.use(gO.LoadingPlugin);XB.mount("#app");export{IDt as $,Yo as A,bDt as B,Wg as C,f5t as D,Tv as E,ya as F,Lh as G,v0 as H,yC as I,Fo as J,cr as K,pr as L,Ze as M,E4 as N,Rr as O,lx as P,c4 as Q,mC as R,ye as S,iF as T,EC as U,Dr as V,lk as W,DO as X,aF as Y,fz as Z,WY as _,Pn as a,BDt as a0,$Mt as a1,QY as a2,xDt as a3,eF as b,Yi as c,vd as d,I2t as e,cUt as f,b2t as g,rF as h,Mr as i,VW as j,TDt as k,ODt as l,RDt as m,SDt as n,ti as o,$W as p,lz as q,N4 as r,FDt as s,kK as t,LDt as u,Dw as v,jO as w,s0 as x,Cg as y,fj as z};
|