@zyzgroup/core-web 0.1.63 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zyzgroup_core_web.iife.js +17 -17
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +2544 -2438
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +17 -17
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/Context.d.ts +24 -12
- package/types/Context.d.ts.map +1 -1
- package/types/axios.d.ts +5 -0
- package/types/axios.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ZYZGroupCoreWeb=function(m){"use strict";const
|
|
1
|
+
var ZYZGroupCoreWeb=function(m){"use strict";const _l={};function Sl(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this||_l}const Tt=Sl(),Cl="@YZ/";function li(s,t=Cl){return s.startsWith(t)?s:`${t}${s}`}function fi(s){return typeof s=="string"&&s.startsWith("Symbol(")&&s.endsWith(")")}function di(s){return fi(s)&&(s=s.slice(7,-1)),s}function ns(s){return s=di(s),s=li(s),typeof Symbol=="function"?Symbol(s):`Symbol(${s})`}const wn=ns("TIMESTAMP"),Tl=ns("META");function El(s,t){const e=t.toString();if(!fi(e))return!1;if(s&&typeof s=="object"){if(di(e)=="")return t in s;for(const n of Reflect.ownKeys(s))if(n.toString()==e)return!0;return!1}return!1}function na(s){if(!fi(s))return s;switch(s=di(s),s){case li("TIMESTAMP"):return wn;case li("META"):return Tl;default:return ns(s)}}function mi(s){if(Array.isArray(s))return s.map(mi);if(s&&typeof s=="object"){const t={};for(const e of Reflect.ownKeys(s)){const n=s[e];t[typeof e=="symbol"?e.toString():e]=typeof n=="symbol"?n.toString():mi(n)}return t}return typeof s=="symbol"?s.toString():s}function pi(s){if(Array.isArray(s))return s.map(pi);if(s&&typeof s=="object"){const t={};for(const e of Object.keys(s))t[na(e)]=pi(s[e]);return t}return na(s)}function gi(s){return JSON.stringify(mi(s))}const yi=gi;function sa(s){return pi(JSON.parse(s))}var Et=(s=>(s.UNKNOWN="",s.TEXT="text/plain",s.MD="text/plain",s.HTML="text/html",s.XML_TEXT="text/xml",s.CSS="text/css",s.JPEG="image/jpeg",s.PNG="image/png",s.GIF="image/gif",s.BMP="image/bmp",s.WEBP="image/webp",s.SVG="image/svg+xml",s.ICON="image/x-icon",s.MICROSOFT_ICON="image/vnd.microsoft.icon",s.MPEG="audio/mpeg",s.MP3="audio/mpeg",s.MP4="video/mp4",s.OGG="audio/ogg",s.WAV="audio/wav",s.MIDI="audio/midi",s.WEBM="video/webm",s.VIDEO_OGG="video/ogg",s.OCTET_STREAM="application/octet-stream",s.JAVASCRIPT="application/javascript",s.ECMASCRIPT="application/ecmascript",s.JSON="application/json",s.XML="application/xml",s.XHTML="application/xhtml+xml",s.XWWW="application/x-www-form-urlencoded",s.DOC="application/msword",s.CSV="application/x-csv",s.EXCEL="application/vnb.ms-excel",s.PPT="application/vnb.mspowerpoint",s.PDF="application/pdf",s.ZIP="application/zip",s.TGZ="application/x-gtar",s.TAR_GZ="application/x-gzip",s.EOT="appliaction/vnd.ms-fontobject",s.TTF="aplication/font-sfnt",s.PKCS12="aplication/pkcs12",s))(Et||{}),ss=(s=>(s.ascii="ascii",s.utf8="utf8",s.utf16le="utf16le",s.ucs2="ucs2",s.base64="base64",s.base64url="base64url",s.latin1="latin1",s.binary="binary",s.hex="hex",s))(ss||{}),Xt=(s=>(s.text="text",s.dataURL="dataURL",s.binaryString="binaryString",s.arraybuffer="arraybuffer",s))(Xt||{});function Pl(s,t=(e,n)=>e<=n){const e=s.length;let n=Math.floor(e/2);for(;n>0;){for(let i=n;i<e;i++){const r=s[i];let o=i;for(;o>=n&&!t(s[o-n],r);)s[o]=s[o-n],o-=n;s[o]=r}n=Math.floor(n/2)}}const is=s=>{let t=null;switch(s){case"any-character":t=/[^]/;break;case"bin":t=/^(0b)?[0-1]+$/i;break;case"oct":t=/^(0o)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"ascii":t=/^[\x00-\xFF]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"number-single":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/i;break;case"split":t=/\s*,\s*/gi;break;case"trim":t=/^\s+|\s+$/g;break;case"regexp":t=/[\\^$.*+?()[\]{}|]/g;break;case"regexp-flags":t=/\w*$/;break;case"native-method":t=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(is("regexp"),"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");break;case"svg-segment":t=/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi;break;case"mobile-china":t=/^[1]{1}[0-9]{10}$/;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+\@[A-Za-z0-9._-]+\.[A-Za-z0-9]+$/gm;break;case"ip":t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;break;case"url":t=/^http[s]?:\/\/([\w-]+\.)+[\w-]+([\w-./?%&=]*)?$/;break;case"element-url":t=/^url\(['"]?(.+?)['"]?\)$/i;break;case"date":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})$/;break;case"time":t=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"datetime":t=/^\d{4}(\-|\/|\.)(\d{1,2})(\-|\/|\.)(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"color":t=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i;break;case"whitespace":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/g;break;case"commaSpaces":t=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"bezier":t=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
|
|
2
2
|
[\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
|
|
3
3
|
|[\u{4E00}-\u{9FCC}]
|
|
4
4
|
|[\u{3400}-\u{4DB5}]
|
|
@@ -7,24 +7,24 @@ var ZYZGroupCoreWeb=function(m){"use strict";const xl={};function vl(){return ty
|
|
|
7
7
|
|[\u{2B740}-\u{2B81D}]
|
|
8
8
|
|[\u{2B820}-\u{2CEAF}]
|
|
9
9
|
|[\u{2CEB0}-\u{2EBEF}]
|
|
10
|
-
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},ae=(s,t)=>(typeof s=="string"&&(s=is(s)||new RegExp(s)),s.test(t)),na=(s,t)=>{typeof s=="string"&&(s=is(s)||new RegExp(s));const e=t.match(s);return e?s.flags.toLowerCase().indexOf("g")>=0?e.map(n=>({matchIndex:-1,fullMatch:n,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},sa=(s,t)=>{typeof s=="string"&&(s=is(s)||new RegExp(s));const e=[],n=t.matchAll(s);for(const i of n)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function El(s){const t=s.match(/[\s\S]/gu);return t?t.length:0}function ia(s,t){const e=s.codePointAt(t);return e?String.fromCodePoint(e):void 0}function rs(s=12){const t="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",e=t.length;let n="";for(let i=0;i<s;i++)n+=t[Math.floor(Math.random()*e)];return n}function Pl(s){return s.replace(/(^\w)/g,t=>t.toLowerCase())}const bt=(s,t="-")=>{let e=s.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function Ml(s){return s.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function ra(s){return Pl(Ml(s))}function oa(s){let t="";for(let e=0,n=s.length;e<n;e++){const i=s.charCodeAt(e);i>=1&&i<=127?t+=s.charAt(e):i>2047?(t+=String.fromCharCode(224|i>>12&15),t+=String.fromCharCode(128|i>>6&63),t+=String.fromCharCode(128|i>>0&63)):(t+=String.fromCharCode(192|i>>6&31),t+=String.fromCharCode(128|i>>0&63))}return t}function Al(s){return s.slice(0)}function kl(s,t=!0){const e=t?Al(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.length)}const Il="[object Undefined]",Dl="[object Null]",Rl="[object Boolean]",Ll="[object Number]",Ol="[object BigInt]",aa="[object String]",ca="[object Symbol]",zl="[object Array]";function os(s){return Object.prototype.toString.call(s)}function Fl(s){return s!=null}function Bl(s){return os(s)===aa}function Nl(s){return s===s+0}function Yl(s){return os(s)===ca}function Xl(s){const t=os(s);return t===Il||t===Dl||t===Rl||t===Ll||t===aa||t===ca||t===Ol}function Ul(s){return os(s)===zl}function $l(s){return!!s&&typeof s=="object"}function ha(s){return $l(s)&&!Ul(s)}function ua(s,...t){return new s.constructor(...t)}function xn(s){if(!ha(s))return""+s;const t=[];for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&(ha(s[e])?t.push(xn(s[e])):t.push(`${e}: ${s[e]}`));return`{ ${t.join(", ")} }`}function Vl(s,t="",e=["","sign","key"]){return Object.keys(s).filter(n=>{for(let i=0,r=e.length;i<r;i++)if(s[n]==e[i])return!1;return!0}).sort().map(n=>`${n}=${s[n]}`).join("&")+t}function Gl(s=[],t=[]){const e=s.length,n=t.length;for(let r=0;r<n;r++)s[r]=t[r];let i=Math.max(0,e-n);for(;i>0;)s.pop(),i--;return s}function en(s,t){const e=s.findIndex(n=>n===t);return e>=0&&s.splice(e,1),s}function la(s,t){return s.findIndex(e=>e==t)>=0}function ql(s,...t){return t.forEach(e=>{la(s,e)||s.push(e)}),s}let fa;try{fa=Map}catch{fa=function(){}}let da;try{da=Set}catch{da=function(){}}function Ht(s,t){const e=parseFloat(s);if(Number.isNaN(e)){if(typeof t=="number")return t;throw new Error(`"${s}" is NaN!`)}return e}function ma(s,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(s-t)<e}function B(s,t,e){const n=Math.min(t,e),i=Math.max(t,e);return s<n?n:s>i?i:s}function jl(s,t){return(s%t+t)%t}function as(s,t,e){return(1-e)*s+e*t}function Hl(s,t,e){const n=s.length,i=new Array(n);for(let r=0;r<n;r++)i[r]=Q(as(s[r],t[r],e),6);return i}const Wl=(s,t,e)=>n=>{const i=B(n,s,t);return e==0?i:t-i<e?t:Math.round(i/e)*e};function Jl(s,t=12){return Ht(s,0).toFixed(t)}function Q(s,t=12){return+Jl(s,t)}function Zl(s,t){const e=na("number-single",String(s));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):Fl(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(e.matchIndex+e.fullMatch.length):""}}function yi(s){const t=na("number",s);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}const nn=(s,t=16)=>{let e=s.toLowerCase();const n=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(n||i||r)&&(e=e.slice(2)),n&&(t=2),i&&(t=8),r&&(t=16);const o=parseInt(e,t);if(isNaN(o))throw new Error(`radixStringToNumber(${s}, ${t}) 无法解析!`);return o};function Ql(s){return new TextEncoder().encode(s)}function Kl(s){return String.fromCharCode.apply(null,new Uint16Array(s))}const wi=(s,t,e)=>t?e===ss.base64?new Blob([s],{type:`${t};${e}`}):e===ss.utf8?new Blob([s],{type:`${t};charset=${e}`}):new Blob([s],{type:`${t}`}):new Blob([s]),tf=s=>{let t=Tt.UNKNOWN;switch(new DataView(s).getUint32(0,ef()).toString(16).toUpperCase()){case"FFD8FFDB":t=Tt.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Tt.JPEG;break;case"89504E47":t=Tt.PNG;break;case"47494638":t=Tt.GIF;break;case"52494646":t=Tt.WEBP;break;case"25504446":t=Tt.PDF;break;case"504B0304":t=Tt.ZIP;break}return t};function ef(){const s=Uint32Array.of(305419896),t=new Uint8Array(s.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function K(){return(performance||Date).now()}function cs(s=new Date){return s.getTime()}function nf(s,t=3){const e=Math.max(s.length,6);let n="";for(let r=0;r<e-4;r++)n+=s[r]||"0";const i=[n,""+(s[e-4]||"0")+(s[e-3]||"0"),""+(s[e-2]||"0")+(s[e-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+":"+i[1];case 3:return i[0]+":"+i[1]+":"+i[2]}}function sf(s){const t=Math.max(s.length,6);let e=0;e+=(s[t-2]||0)*10+(s[t-1]||0),e+=((s[t-4]||0)*10+(s[t-3]||0))*60;let n=0;for(let i=0;i<t-4;i++)n=n*10+(s[i]||0);return e+=n*60*60,Math.floor(Math.max(0,e))}function rf(s,t=!1){let e=0;typeof s=="number"?e=s:e=sf(s);const n=[],i=e%60;n.unshift(i%10),n.unshift(Math.floor(i/10)),e=Math.floor(e/60);const r=e%60;if(n.unshift(r%10),n.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(n.unshift(o%10),n.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)n.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;n.unshift(o%10),n.unshift(Math.floor(o/10))}return n}function of(s,t=1,e=!1){return s[s.length-1]+=t,rf(s,e)}const af=1,cf=3,bi=4;function hf(s=10,t=bi){let e=new Array(s),n=0,i=0,r=0;const o=u=>{e[i]=u,i=(i+1)%s,n++},a=u=>{if(n<s)return o(u);{let l;switch(t){case af:throw new Error(`RingQueue limit(${s}) overflow!`);case cf:o(u),n--,r=i;break;case bi:l=2*s,e=h(),n=e.length,i=e.length,r=0,e.length=l,s=l,o(u);break}}},c=()=>{if(n!=0){const u=e[r];return e[r]=void 0,n--,r=(r+1)%s,u}},h=()=>{const u=[];let l;for(;l=c();)u.push(l);return u};return{queue:e,length:n,isEmpty:()=>n==0,enqueue:a,push:a,put:a,dequeue:c,pop:c,take:c,peek:()=>e[r],top:()=>e[r],flush:h,clear:()=>{e=[],n=0,i=0,r=0}}}const pa=s=>hf(s,bi);class Le{_maps=new Map;_mapsAddedDuringUpdate=new Map;_overflow;constructor(t){this._overflow=()=>{if(!t)return!1;const e=this.length;return e==0?!1:t?.overflow?t.overflow():!!t.size&&t.size>0&&e>=t.size}}entries(){return Array.from(this._maps.entries())}keys(){return Array.from(this._maps.keys())}values(){return Array.from(this._maps.values())}json(){return this.entries().reduce((t,[e,n])=>((Bl(e)||Nl(e)||Yl(e))&&(t[e]=n),t),{})}get length(){return this.entries().length}set(t,e){for(;this._overflow();){const n=this._maps.keys().next();n.done||this.delete(n.value)}this._maps.set(t,e),this._mapsAddedDuringUpdate.set(t,e)}get(t){return this._maps.get(t)}has(t){return this._maps.has(t)}getIndex(t){const e=this.entries();if(e.length&&e[t])return e[t]}top(){return this.getIndex(0)}shift(){const t=this.top();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this._mapsAddedDuringUpdate.delete(t),this._maps.delete(t)}clear(){this._maps.clear(),this._mapsAddedDuringUpdate.clear()}flush(){this.clear()}filter(t){let e=Array.from(this._maps.entries());for(;e.length>0;){this._mapsAddedDuringUpdate.clear();for(let n=0,i=e.length;n<i;n++){const[r,o]=e[n];t(r,o)===!1&&this.delete(r)}e=Array.from(this._mapsAddedDuringUpdate.entries())}}}function ga(){return Xt.OPEN_LOG||!1}function ya(s,t){const e=Xt.LOG_UPLOAD_FN;e&&e(s,t)}function be(s){ya("info",s),ga()&&(!console||typeof console!="object"||typeof console.log!="function"||console.log(s))}function uf(s){ya("warn",s),ga()&&(!console||typeof console!="object"||typeof console.warn!="function"||console.warn(s))}const wa=()=>{};function ba(s,t=3,e){return async function(...n){let i;for(let r=0;r<t;r++)try{return await s.call(this,...n)}catch(o){be(`(${s.name}) attempt ${r+1} failed, retrying...`),i=o,await new Promise(a=>setTimeout(a,typeof e=="number"?e:300*Math.pow(2,r)))}throw be(`(${s.name}) max retries reached. Last error: ${i.message}`),i}}function xa(s,t=6e4,e=new Le,n=new Le){return async function(...i){const r=`${s.name}(${i.map(xn)})`,o=Date.now();e.filter((h,u)=>{const l=o-u.timestamp<t;return l||n.delete(h),l});const a=JSON.stringify(i),c=e.get(a);if(c){if(o-c.timestamp<t)return be(`${r} cache hit: ${xn(c.value)}`),c.value;e.delete(a)}try{let h;const u=n.get(a);if(u)be(`${r} cache waiting previous!`),h=await u,n.delete(a),be(`${r} cache waited: ${xn(h)}`);else{be(`${r} cache miss, await fetching fresh data...`);const l=await s.call(this,...i);n.set(a,l),h=await l,be(`${r} cache settled: ${xn(h)}`)}return e.set(a,{value:h,timestamp:Date.now()}),n.delete(a),h}catch(h){throw be(`${r} returns error: ${h}`),h}}}var xi=function(s,t){return xi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},xi(s,t)};function vi(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xi(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function va(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _i(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Si(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function ce(s){return typeof s=="function"}function lf(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ci=lf(function(s){return function(t){s(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
10
|
+
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t},ae=(s,t)=>(typeof s=="string"&&(s=is(s)||new RegExp(s)),s.test(t)),ia=(s,t)=>{typeof s=="string"&&(s=is(s)||new RegExp(s));const e=t.match(s);return e?s.flags.toLowerCase().indexOf("g")>=0?e.map(n=>({matchIndex:-1,fullMatch:n,groupMatchs:[]})):{matchIndex:typeof e.index=="number"?e.index:-1,fullMatch:e[0],groupMatchs:e.slice(1)}:null},ra=(s,t)=>{typeof s=="string"&&(s=is(s)||new RegExp(s));const e=[],n=t.matchAll(s);for(const i of n)e.push({matchIndex:typeof i.index=="number"?i.index:-1,fullMatch:i[0],groupMatchs:i.slice(1)});return e};function Ml(s){const t=s.match(/[\s\S]/gu);return t?t.length:0}function oa(s,t){const e=s.codePointAt(t);return e?String.fromCodePoint(e):void 0}function rs(s=12){const t="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghijklmnopqrstuvwxyz0123456789",e=t.length;let n="";for(let i=0;i<s;i++)n+=t[Math.floor(Math.random()*e)];return n}function Al(s){return s.replace(/(^\w)/g,t=>t.toLowerCase())}const bt=(s,t="-")=>{let e=s.replace(new RegExp(`${t}?([A-Z])`,"g"),t+"$1").toLowerCase();return e=e.replace(new RegExp(`^${t}`),""),e};function kl(s){return s.replace(/(^\w|[_-]\w)/g,t=>t.slice(-1).toUpperCase())}function aa(s){return Al(kl(s))}function ca(s){let t="";for(let e=0,n=s.length;e<n;e++){const i=s.charCodeAt(e);i>=1&&i<=127?t+=s.charAt(e):i>2047?(t+=String.fromCharCode(224|i>>12&15),t+=String.fromCharCode(128|i>>6&63),t+=String.fromCharCode(128|i>>0&63)):(t+=String.fromCharCode(192|i>>6&31),t+=String.fromCharCode(128|i>>0&63))}return t}function Il(s){return s.slice(0)}function Dl(s,t=!0){const e=t?Il(s.buffer):s.buffer;return new s.constructor(e,s.byteOffset,s.length)}const Rl="[object Undefined]",Ll="[object Null]",Ol="[object Boolean]",zl="[object Number]",Fl="[object BigInt]",ha="[object String]",ua="[object Symbol]",Nl="[object Array]";function os(s){return Object.prototype.toString.call(s)}function Bl(s){return s!=null}function Yl(s){return os(s)===ha}function Ul(s){return s===s+0}function Xl(s){return os(s)===ua}function $l(s){const t=os(s);return t===Rl||t===Ll||t===Ol||t===zl||t===ha||t===ua||t===Fl}function Vl(s){return os(s)===Nl}function Gl(s){return!!s&&typeof s=="object"}function la(s){return Gl(s)&&!Vl(s)}function fa(s,...t){return new s.constructor(...t)}function bn(s){if(!la(s))return""+s;const t=[];for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&(la(s[e])?t.push(bn(s[e])):t.push(`${e}: ${s[e]}`));return`{ ${t.join(", ")} }`}function ql(s,t="",e=["","sign","key"]){return Object.keys(s).filter(n=>{for(let i=0,r=e.length;i<r;i++)if(s[n]==e[i])return!1;return!0}).sort().map(n=>`${n}=${s[n]}`).join("&")+t}function jl(s=[],t=[]){const e=s.length,n=t.length;for(let r=0;r<n;r++)s[r]=t[r];let i=Math.max(0,e-n);for(;i>0;)s.pop(),i--;return s}function Re(s,t){const e=s.findIndex(n=>n===t);return e>=0&&s.splice(e,1),s}function da(s,t){return s.findIndex(e=>e==t)>=0}function Hl(s,...t){return t.forEach(e=>{da(s,e)||s.push(e)}),s}let ma;try{ma=Map}catch{ma=function(){}}let pa;try{pa=Set}catch{pa=function(){}}function Ht(s,t){const e=parseFloat(s);if(Number.isNaN(e)){if(typeof t=="number")return t;throw new Error(`"${s}" is NaN!`)}return e}function ga(s,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(s-t)<e}function N(s,t,e){const n=Math.min(t,e),i=Math.max(t,e);return s<n?n:s>i?i:s}function Wl(s,t){return(s%t+t)%t}function as(s,t,e){return(1-e)*s+e*t}function Jl(s,t,e){const n=s.length,i=new Array(n);for(let r=0;r<n;r++)i[r]=Q(as(s[r],t[r],e),6);return i}const Zl=(s,t,e)=>n=>{const i=N(n,s,t);return e==0?i:t-i<e?t:Math.round(i/e)*e};function Ql(s,t=12){return Ht(s,0).toFixed(t)}function Q(s,t=12){return+Ql(s,t)}function Kl(s,t){const e=ia("number-single",String(s));return{hasNumber:!!e,number:e&&!Array.isArray(e)&&e.fullMatch?parseFloat(e.fullMatch):Bl(t)?t:NaN,prefix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(0,e.matchIndex):"",suffix:e&&!Array.isArray(e)&&e.fullMatch?s.substring(e.matchIndex+e.fullMatch.length):""}}function wi(s){const t=ia("number",s);return t?Array.isArray(t)?t.map(e=>Number(e.fullMatch)):[Number(t.fullMatch)]:[]}const tn=(s,t=16)=>{let e=s.toLowerCase();const n=e.indexOf("0b")==0,i=e.indexOf("0o")==0,r=e.indexOf("0x")==0;(n||i||r)&&(e=e.slice(2)),n&&(t=2),i&&(t=8),r&&(t=16);const o=parseInt(e,t);if(isNaN(o))throw new Error(`radixStringToNumber(${s}, ${t}) 无法解析!`);return o};function tf(s){return new TextEncoder().encode(s)}function ef(s){return String.fromCharCode.apply(null,new Uint16Array(s))}const bi=(s,t,e)=>t?e===ss.base64?new Blob([s],{type:`${t};${e}`}):e===ss.utf8?new Blob([s],{type:`${t};charset=${e}`}):new Blob([s],{type:`${t}`}):new Blob([s]),nf=s=>{let t=Et.UNKNOWN;switch(new DataView(s).getUint32(0,sf()).toString(16).toUpperCase()){case"FFD8FFDB":t=Et.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Et.JPEG;break;case"89504E47":t=Et.PNG;break;case"47494638":t=Et.GIF;break;case"52494646":t=Et.WEBP;break;case"25504446":t=Et.PDF;break;case"504B0304":t=Et.ZIP;break}return t};function sf(){const s=Uint32Array.of(305419896),t=new Uint8Array(s.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}function K(){return(performance||Date).now()}function cs(s=new Date){return s.getTime()}function rf(s,t=3){const e=Math.max(s.length,6);let n="";for(let r=0;r<e-4;r++)n+=s[r]||"0";const i=[n,""+(s[e-4]||"0")+(s[e-3]||"0"),""+(s[e-2]||"0")+(s[e-1]||"0")];switch(t){case 1:return i[0];case 2:return i[0]+":"+i[1];case 3:return i[0]+":"+i[1]+":"+i[2]}}function of(s){const t=Math.max(s.length,6);let e=0;e+=(s[t-2]||0)*10+(s[t-1]||0),e+=((s[t-4]||0)*10+(s[t-3]||0))*60;let n=0;for(let i=0;i<t-4;i++)n=n*10+(s[i]||0);return e+=n*60*60,Math.floor(Math.max(0,e))}function af(s,t=!1){let e=0;typeof s=="number"?e=s:e=of(s);const n=[],i=e%60;n.unshift(i%10),n.unshift(Math.floor(i/10)),e=Math.floor(e/60);const r=e%60;if(n.unshift(r%10),n.unshift(Math.floor(r/10)),e=Math.floor(e/60),t){const o=e%100;for(n.unshift(o%10),n.unshift(Math.floor(o/10)),e=Math.floor(e/100);e;)n.unshift(e%10),e=Math.floor(e/10)}else{const o=e%24;n.unshift(o%10),n.unshift(Math.floor(o/10))}return n}function cf(s,t=1,e=!1){return s[s.length-1]+=t,af(s,e)}const hf=1,uf=3,xi=4;function lf(s=10,t=xi){let e=new Array(s),n=0,i=0,r=0;const o=u=>{e[i]=u,i=(i+1)%s,n++},a=u=>{if(n<s)return o(u);{let l;switch(t){case hf:throw new Error(`RingQueue limit(${s}) overflow!`);case uf:o(u),n--,r=i;break;case xi:l=2*s,e=h(),n=e.length,i=e.length,r=0,e.length=l,s=l,o(u);break}}},c=()=>{if(n!=0){const u=e[r];return e[r]=void 0,n--,r=(r+1)%s,u}},h=()=>{const u=[];let l;for(;l=c();)u.push(l);return u};return{queue:e,length:n,isEmpty:()=>n==0,enqueue:a,push:a,put:a,dequeue:c,pop:c,take:c,peek:()=>e[r],top:()=>e[r],flush:h,clear:()=>{e=[],n=0,i=0,r=0}}}const ya=s=>lf(s,xi);class xn{_maps=new Map;_mapsAddedDuringUpdate=new Map;_overflow;constructor(t){this._overflow=()=>{if(!t)return!1;const e=this.length;return e==0?!1:t?.overflow?t.overflow():!!t.size&&t.size>0&&e>=t.size}}entries(){return Array.from(this._maps.entries())}keys(){return Array.from(this._maps.keys())}values(){return Array.from(this._maps.values())}json(){return this.entries().reduce((t,[e,n])=>((Yl(e)||Ul(e)||Xl(e))&&(t[e]=n),t),{})}get length(){return this.entries().length}set(t,e){for(;this._overflow();){const n=this._maps.keys().next();n.done||this.delete(n.value)}this._maps.set(t,e),this._mapsAddedDuringUpdate.set(t,e)}get(t){return this._maps.get(t)}has(t){return this._maps.has(t)}getIndex(t){const e=this.entries();if(e.length&&e[t])return e[t]}top(){return this.getIndex(0)}shift(){const t=this.top();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this._mapsAddedDuringUpdate.delete(t),this._maps.delete(t)}clear(){this._maps.clear(),this._mapsAddedDuringUpdate.clear()}flush(){this.clear()}filter(t){let e=Array.from(this._maps.entries());for(;e.length>0;){this._mapsAddedDuringUpdate.clear();for(let n=0,i=e.length;n<i;n++){const[r,o]=e[n];t(r,o)===!1&&this.delete(r)}e=Array.from(this._mapsAddedDuringUpdate.entries())}}}class wa{maps=new Map;mapsAddedDuringUpdate=new Map;constructor(){}entries(){return Array.from(this.maps.entries())}keys(){return Array.from(this.maps.keys())}values(){return Array.from(this.maps.values())}json(){return this.entries().reduce((t,[e,n])=>(t[e]=n,t),{})}get length(){return this.entries().length}set(t,e){this.maps.set(t,e),this.mapsAddedDuringUpdate.set(t,e)}get(t){return this.maps.get(t)}has(t){return this.maps.has(t)}getEntryFromIndex(t){return this.entries()[t]}firstEntry(){return this.getEntryFromIndex(0)}shift(){const t=this.firstEntry();if(t){const[e]=t;this.delete(e)}return t}delete(t){return this.mapsAddedDuringUpdate.delete(t),this.maps.delete(t)}clear(){this.mapsAddedDuringUpdate.clear(),this.maps.clear()}async update(t){let e=Array.from(this.maps.entries());for(;e.length>0;){this.mapsAddedDuringUpdate.clear();for(let n=0,i=e.length;n<i;n++){const[r,o]=e[n];await t(r,o)===!1&&this.delete(r)}e=Array.from(this.mapsAddedDuringUpdate.entries())}}}function ff(){Tt.OPEN_LOG=!0}function df(){Tt.OPEN_LOG=!1}function mf(s){Tt.LOG_UPLOAD_FN=s}function ba(){return Tt.OPEN_LOG||!1}function xa(s,t){const e=Tt.LOG_UPLOAD_FN;e&&e(s,t)}function en(s){xa("info",s),ba()&&(!console||typeof console!="object"||typeof console.log!="function"||console.log(s))}function pf(s){xa("warn",s),ba()&&(!console||typeof console!="object"||typeof console.warn!="function"||console.warn(s))}const va=()=>{};function vi(s,t=3,e){return async function(...n){const i=`retry(${s.name})(${n.map(bn)})`;let r;for(let o=0;o<t;o++)try{return await s.call(this,...n)}catch(a){en(`(${i}) 第 ${o+1} 次尝试失败, retrying...`),r=a,await new Promise(c=>setTimeout(c,typeof e=="number"?e:300*Math.pow(2,o)))}throw en(`(${i}) 已 ${t} 次失败,不再重试。 Last error: ${bn(r)}`),r}}function _i(s,t=60,e=new wa){return async function(...n){const i=`cache(${s.name})(${n.map(bn)})`,r=Date.now();e.update((c,h)=>r-h.timestamp<t*1e3);const o=yi(n),a=e.get(o);if(a){if(r-a.timestamp<t*1e3)return en(`${i} 击中缓存`),a.value;e.delete(o)}try{en(`${i} 没有缓存, 尝试立即执行...`);const c=await s.call(this,...n);return en(`${i} 缓存设置成功`),e.set(o,{value:c,timestamp:Date.now()}),c}catch(c){throw en(`${i} 执行失败 : ${bn(c)}`),c}}}var Si=function(s,t){return Si=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Si(s,t)};function Ci(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Si(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function _a(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ti(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Ei(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function ce(s){return typeof s=="function"}function gf(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Pi=gf(function(s){return function(t){s(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
11
11
|
`+t.map(function(e,n){return n+1+") "+e.toString()}).join(`
|
|
12
|
-
`):"",this.name="UnsubscriptionError",this.errors=t}});function _a(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var Ti=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=va(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(w){t={error:w}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(ce(u))try{u()}catch(w){r=w instanceof Ci?w.errors:[w]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=va(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{Ca(p)}catch(w){r=r??[],w instanceof Ci?r=Si(Si([],_i(r)),_i(w.errors)):r.push(w)}}}catch(w){n={error:w}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(r)throw new Ci(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ca(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&_a(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&_a(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}();Ti.EMPTY;function Sa(s){return s instanceof Ti||s&&"closed"in s&&ce(s.remove)&&ce(s.add)&&ce(s.unsubscribe)}function Ca(s){ce(s)?s():s.unsubscribe()}var Ta={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ff={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,Si([s,t],_i(e)))},clearTimeout:function(s){return clearTimeout(s)},delegate:void 0};function df(s){ff.setTimeout(function(){throw s})}function Ea(){}function mf(s){s()}var Ei=function(s){vi(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Sa(e)&&e.add(n)):n.destination=wf,n}return t.create=function(e,n,i){return new Mi(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ti),pf=Function.prototype.bind;function Pi(s,t){return pf.call(s,t)}var gf=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){hs(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){hs(n)}else hs(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){hs(e)}},s}(),Mi=function(s){vi(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(ce(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Ta.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&Pi(e.next,a),error:e.error&&Pi(e.error,a),complete:e.complete&&Pi(e.complete,a)}):o=e}return r.destination=new gf(o),r}return t}(Ei);function hs(s){df(s)}function yf(s){throw s}var wf={closed:!0,next:Ea,error:yf,complete:Ea},bf=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function xf(s){return s}function vf(s){return s.length===0?xf:s.length===1?s[0]:function(t){return s.reduce(function(e,n){return n(e)},t)}}(function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=Sf(t)?t:new Mi(t,e,n);return mf(function(){var o=i,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=Pa(e),new e(function(i,r){var o=new Mi({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[bf]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return vf(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=Pa(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s})();function Pa(s){var t;return(t=s??Ta.Promise)!==null&&t!==void 0?t:Promise}function _f(s){return s&&ce(s.next)&&ce(s.error)&&ce(s.complete)}function Sf(s){return s&&s instanceof Ei||_f(s)&&Sa(s)}(function(s){vi(t,s);function t(e,n,i,r,o,a){var c=s.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(h){try{n(h)}catch(u){e.error(u)}}:s.prototype._next,c._error=r?function(h){try{r(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,c._complete=i?function(){try{i()}catch(h){e.error(h)}finally{this.unsubscribe()}}:s.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Ei);let vn;function Wt(s){vn=s,s(),vn=null}class Cf{subscribers=new Set;add(){vn&&!this.subscribers.has(vn)&&this.subscribers.add(vn)}notify(){this.subscribers.forEach(t=>t())}}const Ma=new WeakMap;function us(s,t){let e=Ma.get(s);e||(e=new Map,Ma.set(s,e));let n=e.get(t);return n||(n=new Cf,e.set(t,n)),n}function Tf(s,t=!1){return Object.keys(s).forEach(e=>{let n=s[e];if(t&&typeof n=="object"&&n!==null)s[e]=ki(n,t);else{const i=us(s,e);Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get(){return i.add(),n},set(r){n!=r&&(n=r,i.notify())}})}}),s}function Ai(s,t=!1){return Tf({value:s},t)}function ki(s,t=!1){const e={get(n,i,r){const o=Reflect.get(n,i,r);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const a=ki(o,t);a.YZReactiveProxyParentTarget=n,a.YZReactiveProxyParentKey=i,Reflect.set(r,i,a)}return us(n,i).add(),Reflect.get(n,i,r)},set(n,i,r,o){const a=Reflect.get(n,i,o),c=Reflect.set(n,i,r,o);return Array.isArray(n)?us(n.YZReactiveProxyParentTarget,n.YZReactiveProxyParentKey).notify():a!=r&&us(n,i).notify(),c},has(n,i){return i==="isYZReactiveProxy"||i in n}};return new Proxy(s,e)}const Aa=ki;class Ii{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(e),this}addListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this}on(t,e){return this.addListener(t,e),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(n=>n!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(n=>{n(...e)}),this}once(t,e){const n=(()=>{let i=!1;return(...r)=>{i||(i=!0,e(...r),this.off(t,n))}})();return this.on(t,n),this}}function ka(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ia={exports:{}};(function(s,t){(function(e){s.exports=e()})(function(e){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(b,g){var v=b[0],_=b[1],E=b[2],C=b[3];v+=(_&E|~_&C)+g[0]-680876936|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[1]-389564586|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[2]+606105819|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[3]-1044525330|0,_=(_<<22|_>>>10)+E|0,v+=(_&E|~_&C)+g[4]-176418897|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[5]+1200080426|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[6]-1473231341|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[7]-45705983|0,_=(_<<22|_>>>10)+E|0,v+=(_&E|~_&C)+g[8]+1770035416|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[9]-1958414417|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[10]-42063|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[11]-1990404162|0,_=(_<<22|_>>>10)+E|0,v+=(_&E|~_&C)+g[12]+1804603682|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[13]-40341101|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[14]-1502002290|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[15]+1236535329|0,_=(_<<22|_>>>10)+E|0,v+=(_&C|E&~C)+g[1]-165796510|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[6]-1069501632|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[11]+643717713|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[0]-373897302|0,_=(_<<20|_>>>12)+E|0,v+=(_&C|E&~C)+g[5]-701558691|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[10]+38016083|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[15]-660478335|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[4]-405537848|0,_=(_<<20|_>>>12)+E|0,v+=(_&C|E&~C)+g[9]+568446438|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[14]-1019803690|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[3]-187363961|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[8]+1163531501|0,_=(_<<20|_>>>12)+E|0,v+=(_&C|E&~C)+g[13]-1444681467|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[2]-51403784|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[7]+1735328473|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[12]-1926607734|0,_=(_<<20|_>>>12)+E|0,v+=(_^E^C)+g[5]-378558|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[8]-2022574463|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[11]+1839030562|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[14]-35309556|0,_=(_<<23|_>>>9)+E|0,v+=(_^E^C)+g[1]-1530992060|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[4]+1272893353|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[7]-155497632|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[10]-1094730640|0,_=(_<<23|_>>>9)+E|0,v+=(_^E^C)+g[13]+681279174|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[0]-358537222|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[3]-722521979|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[6]+76029189|0,_=(_<<23|_>>>9)+E|0,v+=(_^E^C)+g[9]-640364487|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[12]-421815835|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[15]+530742520|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[2]-995338651|0,_=(_<<23|_>>>9)+E|0,v+=(E^(_|~C))+g[0]-198630844|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[7]+1126891415|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[14]-1416354905|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[5]-57434055|0,_=(_<<21|_>>>11)+E|0,v+=(E^(_|~C))+g[12]+1700485571|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[3]-1894986606|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[10]-1051523|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[1]-2054922799|0,_=(_<<21|_>>>11)+E|0,v+=(E^(_|~C))+g[8]+1873313359|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[15]-30611744|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[6]-1560198380|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[13]+1309151649|0,_=(_<<21|_>>>11)+E|0,v+=(E^(_|~C))+g[4]-145523070|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[11]-1120210379|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[2]+718787259|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[9]-343485551|0,_=(_<<21|_>>>11)+E|0,b[0]=v+b[0]|0,b[1]=_+b[1]|0,b[2]=E+b[2]|0,b[3]=C+b[3]|0}function r(b){var g=[],v;for(v=0;v<64;v+=4)g[v>>2]=b.charCodeAt(v)+(b.charCodeAt(v+1)<<8)+(b.charCodeAt(v+2)<<16)+(b.charCodeAt(v+3)<<24);return g}function o(b){var g=[],v;for(v=0;v<64;v+=4)g[v>>2]=b[v]+(b[v+1]<<8)+(b[v+2]<<16)+(b[v+3]<<24);return g}function a(b){var g=b.length,v=[1732584193,-271733879,-1732584194,271733878],_,E,C,I,F,N;for(_=64;_<=g;_+=64)i(v,r(b.substring(_-64,_)));for(b=b.substring(_-64),E=b.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<E;_+=1)C[_>>2]|=b.charCodeAt(_)<<(_%4<<3);if(C[_>>2]|=128<<(_%4<<3),_>55)for(i(v,C),_=0;_<16;_+=1)C[_]=0;return I=g*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),F=parseInt(I[2],16),N=parseInt(I[1],16)||0,C[14]=F,C[15]=N,i(v,C),v}function c(b){var g=b.length,v=[1732584193,-271733879,-1732584194,271733878],_,E,C,I,F,N;for(_=64;_<=g;_+=64)i(v,o(b.subarray(_-64,_)));for(b=_-64<g?b.subarray(_-64):new Uint8Array(0),E=b.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<E;_+=1)C[_>>2]|=b[_]<<(_%4<<3);if(C[_>>2]|=128<<(_%4<<3),_>55)for(i(v,C),_=0;_<16;_+=1)C[_]=0;return I=g*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),F=parseInt(I[2],16),N=parseInt(I[1],16)||0,C[14]=F,C[15]=N,i(v,C),v}function h(b){var g="",v;for(v=0;v<4;v+=1)g+=n[b>>v*8+4&15]+n[b>>v*8&15];return g}function u(b){var g;for(g=0;g<b.length;g+=1)b[g]=h(b[g]);return b.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function b(g,v){return g=g|0||0,g<0?Math.max(g+v,0):Math.min(g,v)}ArrayBuffer.prototype.slice=function(g,v){var _=this.byteLength,E=b(g,_),C=_,I,F,N,$;return v!==e&&(C=b(v,_)),E>C?new ArrayBuffer(0):(I=C-E,F=new ArrayBuffer(I),N=new Uint8Array(F),$=new Uint8Array(this,E,I),N.set($),F)}}();function l(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function d(b,g){var v=b.length,_=new ArrayBuffer(v),E=new Uint8Array(_),C;for(C=0;C<v;C+=1)E[C]=b.charCodeAt(C);return g?E:_}function f(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function p(b,g,v){var _=new Uint8Array(b.byteLength+g.byteLength);return _.set(new Uint8Array(b)),_.set(new Uint8Array(g),b.byteLength),v?_:_.buffer}function w(b){var g=[],v=b.length,_;for(_=0;_<v-1;_+=2)g.push(parseInt(b.substr(_,2),16));return String.fromCharCode.apply(String,g)}function x(){this.reset()}return x.prototype.append=function(b){return this.appendBinary(l(b)),this},x.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var g=this._buff.length,v;for(v=64;v<=g;v+=64)i(this._hash,r(this._buff.substring(v-64,v)));return this._buff=this._buff.substring(v-64),this},x.prototype.end=function(b){var g=this._buff,v=g.length,_,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C;for(_=0;_<v;_+=1)E[_>>2]|=g.charCodeAt(_)<<(_%4<<3);return this._finish(E,v),C=u(this._hash),b&&(C=w(C)),this.reset(),C},x.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},x.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(b,g){var v=g,_,E,C;if(b[v>>2]|=128<<(v%4<<3),v>55)for(i(this._hash,b),v=0;v<16;v+=1)b[v]=0;_=this._length*8,_=_.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(_[2],16),C=parseInt(_[1],16)||0,b[14]=E,b[15]=C,i(this._hash,b)},x.hash=function(b,g){return x.hashBinary(l(b),g)},x.hashBinary=function(b,g){var v=a(b),_=u(v);return g?w(_):_},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(b){var g=p(this._buff.buffer,b,!0),v=g.length,_;for(this._length+=b.byteLength,_=64;_<=v;_+=64)i(this._hash,o(g.subarray(_-64,_)));return this._buff=_-64<v?new Uint8Array(g.buffer.slice(_-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(b){var g=this._buff,v=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,C;for(E=0;E<v;E+=1)_[E>>2]|=g[E]<<(E%4<<3);return this._finish(_,v),C=u(this._hash),b&&(C=w(C)),this.reset(),C},x.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.ArrayBuffer.prototype.getState=function(){var b=x.prototype.getState.call(this);return b.buff=f(b.buff),b},x.ArrayBuffer.prototype.setState=function(b){return b.buff=d(b.buff,!0),x.prototype.setState.call(this,b)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(b,g){var v=c(new Uint8Array(b)),_=u(v);return g?w(_):_},x})})(Ia);var Ef=Ia.exports;const Pf=ka(Ef);function Da(s,t){return function(){return s.apply(t,arguments)}}const{toString:Mf}=Object.prototype,{getPrototypeOf:Di}=Object,ls=(s=>t=>{const e=Mf.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=s=>(s=s.toLowerCase(),t=>ls(t)===s),fs=s=>t=>typeof t===s,{isArray:sn}=Array,_n=fs("undefined");function Af(s){return s!==null&&!_n(s)&&s.constructor!==null&&!_n(s.constructor)&&Ot(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Ra=Jt("ArrayBuffer");function kf(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&Ra(s.buffer),t}const If=fs("string"),Ot=fs("function"),La=fs("number"),ds=s=>s!==null&&typeof s=="object",Df=s=>s===!0||s===!1,ms=s=>{if(ls(s)!=="object")return!1;const t=Di(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},Rf=Jt("Date"),Lf=Jt("File"),Of=Jt("Blob"),zf=Jt("FileList"),Ff=s=>ds(s)&&Ot(s.pipe),Bf=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||Ot(s.append)&&((t=ls(s))==="formdata"||t==="object"&&Ot(s.toString)&&s.toString()==="[object FormData]"))},Nf=Jt("URLSearchParams"),[Yf,Xf,Uf,$f]=["ReadableStream","Request","Response","Headers"].map(Jt),Vf=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(s,t,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),sn(s))for(n=0,i=s.length;n<i;n++)t.call(null,s[n],n,s);else{const r=e?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let a;for(n=0;n<o;n++)a=r[n],t.call(null,s[a],a,s)}}function Oa(s,t){t=t.toLowerCase();const e=Object.keys(s);let n=e.length,i;for(;n-- >0;)if(i=e[n],t===i.toLowerCase())return i;return null}const Oe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),za=s=>!_n(s)&&s!==Oe;function Ri(){const{caseless:s}=za(this)&&this||{},t={},e=(n,i)=>{const r=s&&Oa(t,i)||i;ms(t[r])&&ms(n)?t[r]=Ri(t[r],n):ms(n)?t[r]=Ri({},n):sn(n)?t[r]=n.slice():t[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Sn(arguments[n],e);return t}const Gf=(s,t,e,{allOwnKeys:n}={})=>(Sn(t,(i,r)=>{e&&Ot(i)?s[r]=Da(i,e):s[r]=i},{allOwnKeys:n}),s),qf=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),jf=(s,t,e,n)=>{s.prototype=Object.create(t.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:t.prototype}),e&&Object.assign(s.prototype,e)},Hf=(s,t,e,n)=>{let i,r,o;const a={};if(t=t||{},s==null)return t;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,t))&&!a[o]&&(t[o]=s[o],a[o]=!0);s=e!==!1&&Di(s)}while(s&&(!e||e(s,t))&&s!==Object.prototype);return t},Wf=(s,t,e)=>{s=String(s),(e===void 0||e>s.length)&&(e=s.length),e-=t.length;const n=s.indexOf(t,e);return n!==-1&&n===e},Jf=s=>{if(!s)return null;if(sn(s))return s;let t=s.length;if(!La(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=s[t];return e},Zf=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&Di(Uint8Array)),Qf=(s,t)=>{const n=(s&&s[Symbol.iterator]).call(s);let i;for(;(i=n.next())&&!i.done;){const r=i.value;t.call(s,r[0],r[1])}},Kf=(s,t)=>{let e;const n=[];for(;(e=s.exec(t))!==null;)n.push(e);return n},td=Jt("HTMLFormElement"),ed=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),Fa=(({hasOwnProperty:s})=>(t,e)=>s.call(t,e))(Object.prototype),nd=Jt("RegExp"),Ba=(s,t)=>{const e=Object.getOwnPropertyDescriptors(s),n={};Sn(e,(i,r)=>{let o;(o=t(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},sd=s=>{Ba(s,(t,e)=>{if(Ot(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=s[e];if(Ot(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},id=(s,t)=>{const e={},n=i=>{i.forEach(r=>{e[r]=!0})};return sn(s)?n(s):n(String(s).split(t)),e},rd=()=>{},od=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t;function ad(s){return!!(s&&Ot(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const cd=s=>{const t=new Array(10),e=(n,i)=>{if(ds(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const r=sn(n)?[]:{};return Sn(n,(o,a)=>{const c=e(o,i+1);!_n(c)&&(r[a]=c)}),t[i]=void 0,r}}return n};return e(s,0)},hd=Jt("AsyncFunction"),ud=s=>s&&(ds(s)||Ot(s))&&Ot(s.then)&&Ot(s.catch),Na=((s,t)=>s?setImmediate:t?((e,n)=>(Oe.addEventListener("message",({source:i,data:r})=>{i===Oe&&r===e&&n.length&&n.shift()()},!1),i=>{n.push(i),Oe.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Ot(Oe.postMessage)),ld=typeof queueMicrotask<"u"?queueMicrotask.bind(Oe):typeof process<"u"&&process.nextTick||Na,A={isArray:sn,isArrayBuffer:Ra,isBuffer:Af,isFormData:Bf,isArrayBufferView:kf,isString:If,isNumber:La,isBoolean:Df,isObject:ds,isPlainObject:ms,isReadableStream:Yf,isRequest:Xf,isResponse:Uf,isHeaders:$f,isUndefined:_n,isDate:Rf,isFile:Lf,isBlob:Of,isRegExp:nd,isFunction:Ot,isStream:Ff,isURLSearchParams:Nf,isTypedArray:Zf,isFileList:zf,forEach:Sn,merge:Ri,extend:Gf,trim:Vf,stripBOM:qf,inherits:jf,toFlatObject:Hf,kindOf:ls,kindOfTest:Jt,endsWith:Wf,toArray:Jf,forEachEntry:Qf,matchAll:Kf,isHTMLForm:td,hasOwnProperty:Fa,hasOwnProp:Fa,reduceDescriptors:Ba,freezeMethods:sd,toObjectSet:id,toCamelCase:ed,noop:rd,toFiniteNumber:od,findKey:Oa,global:Oe,isContextDefined:za,isSpecCompliantForm:ad,toJSONObject:cd,isAsyncFn:hd,isThenable:ud,setImmediate:Na,asap:ld};function Y(s,t,e,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}A.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Ya=Y.prototype,Xa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{Xa[s]={value:s}}),Object.defineProperties(Y,Xa),Object.defineProperty(Ya,"isAxiosError",{value:!0}),Y.from=(s,t,e,n,i,r)=>{const o=Object.create(Ya);return A.toFlatObject(s,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Y.call(o,s.message,t,e,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const fd=null;function Li(s){return A.isPlainObject(s)||A.isArray(s)}function Ua(s){return A.endsWith(s,"[]")?s.slice(0,-2):s}function $a(s,t,e){return s?s.concat(t).map(function(i,r){return i=Ua(i),!e&&r?"["+i+"]":i}).join(e?".":""):t}function dd(s){return A.isArray(s)&&!s.some(Li)}const md=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function ps(s,t,e){if(!A.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,e=A.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,x){return!A.isUndefined(x[w])});const n=e.metaTokens,i=e.visitor||u,r=e.dots,o=e.indexes,c=(e.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function h(p){if(p===null)return"";if(A.isDate(p))return p.toISOString();if(!c&&A.isBlob(p))throw new Y("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(p)||A.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,w,x){let b=p;if(p&&!x&&typeof p=="object"){if(A.endsWith(w,"{}"))w=n?w:w.slice(0,-2),p=JSON.stringify(p);else if(A.isArray(p)&&dd(p)||(A.isFileList(p)||A.endsWith(w,"[]"))&&(b=A.toArray(p)))return w=Ua(w),b.forEach(function(v,_){!(A.isUndefined(v)||v===null)&&t.append(o===!0?$a([w],_,r):o===null?w:w+"[]",h(v))}),!1}return Li(p)?!0:(t.append($a(x,w,r),h(p)),!1)}const l=[],d=Object.assign(md,{defaultVisitor:u,convertValue:h,isVisitable:Li});function f(p,w){if(!A.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+w.join("."));l.push(p),A.forEach(p,function(b,g){(!(A.isUndefined(b)||b===null)&&i.call(t,b,A.isString(g)?g.trim():g,w,d))===!0&&f(b,w?w.concat(g):[g])}),l.pop()}}if(!A.isObject(s))throw new TypeError("data must be an object");return f(s),t}function Va(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Oi(s,t){this._pairs=[],s&&ps(s,this,t)}const Ga=Oi.prototype;Ga.append=function(t,e){this._pairs.push([t,e])},Ga.toString=function(t){const e=t?function(n){return t.call(this,n,Va)}:Va;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function pd(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qa(s,t,e){if(!t)return s;const n=e&&e.encode||pd;A.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=A.isURLSearchParams(t)?t.toString():new Oi(t,e).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class gd{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(n){n!==null&&t(n)})}}const ja=gd,Ha={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Oi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},zi=typeof window<"u"&&typeof document<"u",Fi=typeof navigator=="object"&&navigator||void 0,wd=zi&&(!Fi||["ReactNative","NativeScript","NS"].indexOf(Fi.product)<0),bd=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),xd=zi&&window.location.href||"http://localhost",xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zi,hasStandardBrowserEnv:wd,hasStandardBrowserWebWorkerEnv:bd,navigator:Fi,origin:xd},Symbol.toStringTag,{value:"Module"})),...yd};function vd(s,t){return ps(s,new xt.classes.URLSearchParams,Object.assign({visitor:function(e,n,i,r){return xt.isNode&&A.isBuffer(e)?(this.append(n,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function _d(s){return A.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Sd(s){const t={},e=Object.keys(s);let n;const i=e.length;let r;for(n=0;n<i;n++)r=e[n],t[r]=s[r];return t}function Wa(s){function t(e,n,i,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=r>=e.length;return o=!o&&A.isArray(i)?i.length:o,c?(A.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!A.isObject(i[o]))&&(i[o]=[]),t(e,n,i[o],r)&&A.isArray(i[o])&&(i[o]=Sd(i[o])),!a)}if(A.isFormData(s)&&A.isFunction(s.entries)){const e={};return A.forEachEntry(s,(n,i)=>{t(_d(n),i,e,0)}),e}return null}function Cd(s,t,e){if(A.isString(s))try{return(t||JSON.parse)(s),A.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(s)}const Bi={transitional:Ha,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=A.isObject(t);if(r&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return i?JSON.stringify(Wa(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return vd(t,this.formSerializer).toString();if((a=A.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ps(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Cd(t)):t}],transformResponse:[function(t){const e=this.transitional||Bi.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(n&&!this.responseType||i)){const o=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],s=>{Bi.headers[s]={}});const Ni=Bi,Td=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ed=s=>{const t={};let e,n,i;return s&&s.split(`
|
|
13
|
-
`).forEach(function(o){i=o.indexOf(":"),e=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!e||t[e]&&
|
|
14
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Ja]=this[Ja]={accessors:{}}).accessors,i=this.prototype;function r(o){const a=Cn(o);n[a]||(kd(i,o),n[a]=!0)}return A.isArray(t)?t.forEach(r):r(t),this}}ys.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(ys.prototype,({value:s},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[e]=n}}}),A.freezeMethods(ys);const Zt=ys;function Xi(s,t){const e=this||Ni,n=t||e,i=Zt.from(n.headers);let r=n.data;return A.forEach(s,function(a){r=a.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function Za(s){return!!(s&&s.__CANCEL__)}function rn(s,t,e){Y.call(this,s??"canceled",Y.ERR_CANCELED,t,e),this.name="CanceledError"}A.inherits(rn,Y,{__CANCEL__:!0});function Qa(s,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?s(e):t(new Y("Request failed with status code "+e.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Id(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function Dd(s,t){s=s||10;const e=new Array(s),n=new Array(s);let i=0,r=0,o;return t=t!==void 0?t:1e3,function(c){const h=Date.now(),u=n[r];o||(o=h),e[i]=c,n[i]=h;let l=r,d=0;for(;l!==i;)d+=e[l++],l=l%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),h-o<t)return;const f=u&&h-u;return f?Math.round(d*1e3/f):void 0}}function Rd(s,t){let e=0,n=1e3/t,i,r;const o=(h,u=Date.now())=>{e=u,i=null,r&&(clearTimeout(r),r=null),s.apply(null,h)};return[(...h)=>{const u=Date.now(),l=u-e;l>=n?o(h,u):(i=h,r||(r=setTimeout(()=>{r=null,o(i)},n-l)))},()=>i&&o(i)]}const ws=(s,t,e=3)=>{let n=0;const i=Dd(50,250);return Rd(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,c=o-n,h=i(c),u=o<=a;n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&u?(a-o)/h:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};s(l)},e)},Ka=(s,t)=>{const e=s!=null;return[n=>t[0]({lengthComputable:e,total:s,loaded:n}),t[1]]},tc=s=>(...t)=>A.asap(()=>s(...t)),Ld=xt.hasStandardBrowserEnv?((s,t)=>e=>(e=new URL(e,xt.origin),s.protocol===e.protocol&&s.host===e.host&&(t||s.port===e.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,Od=xt.hasStandardBrowserEnv?{write(s,t,e,n,i,r){const o=[s+"="+encodeURIComponent(t)];A.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),A.isString(n)&&o.push("path="+n),A.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const t=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zd(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Fd(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function ec(s,t,e){let n=!zd(t);return s&&(n||e==!1)?Fd(s,t):t}const nc=s=>s instanceof Zt?{...s}:s;function ze(s,t){t=t||{};const e={};function n(h,u,l,d){return A.isPlainObject(h)&&A.isPlainObject(u)?A.merge.call({caseless:d},h,u):A.isPlainObject(u)?A.merge({},u):A.isArray(u)?u.slice():u}function i(h,u,l,d){if(A.isUndefined(u)){if(!A.isUndefined(h))return n(void 0,h,l,d)}else return n(h,u,l,d)}function r(h,u){if(!A.isUndefined(u))return n(void 0,u)}function o(h,u){if(A.isUndefined(u)){if(!A.isUndefined(h))return n(void 0,h)}else return n(void 0,u)}function a(h,u,l){if(l in t)return n(h,u);if(l in s)return n(void 0,h)}const c={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,u,l)=>i(nc(h),nc(u),l,!0)};return A.forEach(Object.keys(Object.assign({},s,t)),function(u){const l=c[u]||i,d=l(s[u],t[u],u);A.isUndefined(d)&&l!==a||(e[u]=d)}),e}const sc=s=>{const t=ze({},s);let{data:e,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=Zt.from(o),t.url=qa(ec(t.baseURL,t.url,t.allowAbsoluteUrls),s.params,s.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(A.isFormData(e)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...u]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...u].join("; "))}}if(xt.hasStandardBrowserEnv&&(n&&A.isFunction(n)&&(n=n(t)),n||n!==!1&&Ld(t.url))){const h=i&&r&&Od.read(r);h&&o.set(i,h)}return t},Bd=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(e,n){const i=sc(s);let r=i.data;const o=Zt.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:h}=i,u,l,d,f,p;function w(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function b(){if(!x)return;const v=Zt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:s,request:x};Qa(function(I){e(I),w()},function(I){n(I),w()},E),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new Y("Request aborted",Y.ECONNABORTED,s,x)),x=null)},x.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,s,x)),x=null},x.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Ha;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),n(new Y(_,E.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,s,x)),x=null},r===void 0&&o.setContentType(null),"setRequestHeader"in x&&A.forEach(o.toJSON(),function(_,E){x.setRequestHeader(E,_)}),A.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),a&&a!=="json"&&(x.responseType=i.responseType),h&&([d,p]=ws(h,!0),x.addEventListener("progress",d)),c&&x.upload&&([l,f]=ws(c),x.upload.addEventListener("progress",l),x.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=v=>{x&&(n(!v||v.type?new rn(null,s,x):v),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const g=Id(i.url);if(g&&xt.protocols.indexOf(g)===-1){n(new Y("Unsupported protocol "+g+":",Y.ERR_BAD_REQUEST,s));return}x.send(r||null)})},Nd=(s,t)=>{const{length:e}=s=s?s.filter(Boolean):[];if(t||e){let n=new AbortController,i;const r=function(h){if(!i){i=!0,a();const u=h instanceof Error?h:this.reason;n.abort(u instanceof Y?u:new rn(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,r(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const a=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(h=>{h.unsubscribe?h.unsubscribe(r):h.removeEventListener("abort",r)}),s=null)};s.forEach(h=>h.addEventListener("abort",r));const{signal:c}=n;return c.unsubscribe=()=>A.asap(a),c}},Yd=function*(s,t){let e=s.byteLength;if(!t||e<t){yield s;return}let n=0,i;for(;n<e;)i=n+t,yield s.slice(n,i),n=i},Xd=async function*(s,t){for await(const e of Ud(s))yield*Yd(e,t)},Ud=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const t=s.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ic=(s,t,e,n)=>{const i=Xd(s,t);let r=0,o,a=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:h,value:u}=await i.next();if(h){a(),c.close();return}let l=u.byteLength;if(e){let d=r+=l;e(d)}c.enqueue(new Uint8Array(u))}catch(h){throw a(h),h}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},bs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",rc=bs&&typeof ReadableStream=="function",$d=bs&&(typeof TextEncoder=="function"?(s=>t=>s.encode(t))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),oc=(s,...t)=>{try{return!!s(...t)}catch{return!1}},Vd=rc&&oc(()=>{let s=!1;const t=new Request(xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!t}),ac=64*1024,Ui=rc&&oc(()=>A.isReadableStream(new Response("").body)),xs={stream:Ui&&(s=>s.body)};bs&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xs[t]&&(xs[t]=A.isFunction(s[t])?e=>e[t]():(e,n)=>{throw new Y(`Response type '${t}' is not supported`,Y.ERR_NOT_SUPPORT,n)})})})(new Response);const Gd=async s=>{if(s==null)return 0;if(A.isBlob(s))return s.size;if(A.isSpecCompliantForm(s))return(await new Request(xt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(A.isArrayBufferView(s)||A.isArrayBuffer(s))return s.byteLength;if(A.isURLSearchParams(s)&&(s=s+""),A.isString(s))return(await $d(s)).byteLength},qd=async(s,t)=>{const e=A.toFiniteNumber(s.getContentLength());return e??Gd(t)},$i={http:fd,xhr:Bd,fetch:bs&&(async s=>{let{url:t,method:e,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:u,withCredentials:l="same-origin",fetchOptions:d}=sc(s);h=h?(h+"").toLowerCase():"text";let f=Nd([i,r&&r.toAbortSignal()],o),p;const w=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let x;try{if(c&&Vd&&e!=="get"&&e!=="head"&&(x=await qd(u,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(A.isFormData(n)&&(C=E.headers.get("content-type"))&&u.setContentType(C),E.body){const[I,F]=Ka(x,ws(tc(c)));n=ic(E.body,ac,I,F)}}A.isString(l)||(l=l?"include":"omit");const b="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:b?l:void 0});let g=await fetch(p);const v=Ui&&(h==="stream"||h==="response");if(Ui&&(a||v&&w)){const E={};["status","statusText","headers"].forEach(N=>{E[N]=g[N]});const C=A.toFiniteNumber(g.headers.get("content-length")),[I,F]=a&&Ka(C,ws(tc(a),!0))||[];g=new Response(ic(g.body,ac,I,()=>{F&&F(),w&&w()}),E)}h=h||"text";let _=await xs[A.findKey(xs,h)||"text"](g,s);return!v&&w&&w(),await new Promise((E,C)=>{Qa(E,C,{data:_,headers:Zt.from(g.headers),status:g.status,statusText:g.statusText,config:s,request:p})})}catch(b){throw w&&w(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,s,p),{cause:b.cause||b}):Y.from(b,b&&b.code,s,p)}})};A.forEach($i,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const cc=s=>`- ${s}`,jd=s=>A.isFunction(s)||s===null||s===!1,hc={getAdapter:s=>{s=A.isArray(s)?s:[s];const{length:t}=s;let e,n;const i={};for(let r=0;r<t;r++){e=s[r];let o;if(n=e,!jd(e)&&(n=$i[(o=String(e)).toLowerCase()],n===void 0))throw new Y(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
|
|
15
|
-
`+r.map(
|
|
16
|
-
`):" "+
|
|
17
|
-
`+r):n.stack=r}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ze(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;n!==void 0&&_s.assertOptions(n,{silentJSONParsing:se.transitional(se.boolean),forcedJSONParsing:se.transitional(se.boolean),clarifyTimeoutError:se.transitional(se.boolean)},!1),i!=null&&(A.isFunction(i)?e.paramsSerializer={serialize:i}:_s.assertOptions(i,{encode:se.function,serialize:se.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),_s.assertOptions(e,{baseUrl:se.spelling("baseURL"),withXsrfToken:se.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&A.merge(r.common,r[e.method]);r&&A.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=Zt.concat(o,r);const a=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(e)===!1||(c=c&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const h=[];this.interceptors.response.forEach(function(w){h.push(w.fulfilled,w.rejected)});let u,l=0,d;if(!c){const p=[uc.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),d=p.length,u=Promise.resolve(e);l<d;)u=u.then(p[l++],p[l++]);return u}d=a.length;let f=e;for(l=0;l<d;){const p=a[l++],w=a[l++];try{f=p(f)}catch(x){w.call(this,x);break}}try{u=uc.call(this,f)}catch(p){return Promise.reject(p)}for(l=0,d=h.length;l<d;)u=u.then(h[l++],h[l++]);return u}getUri(t){t=ze(this.defaults,t);const e=ec(t.baseURL,t.url,t.allowAbsoluteUrls);return qa(e,t.params,t.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(t){Ss.prototype[t]=function(e,n){return this.request(ze(n||{},{method:t,url:e,data:(n||{}).data}))}}),A.forEach(["post","put","patch"],function(t){function e(n){return function(r,o,a){return this.request(ze(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}Ss.prototype[t]=e(),Ss.prototype[t+"Form"]=e(!0)});const Cs=Ss;class Gi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const n=this;this.promise.then(i=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](i);n._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(a=>{n.subscribe(a),r=a}).then(i);return o.cancel=function(){n.unsubscribe(r)},o},t(function(r,o,a){n.reason||(n.reason=new rn(r,o,a),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=n=>{t.abort(n)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Gi(function(i){t=i}),cancel:t}}}const Wd=Gi;function Jd(s){return function(e){return s.apply(null,e)}}function Zd(s){return A.isObject(s)&&s.isAxiosError===!0}const qi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qi).forEach(([s,t])=>{qi[t]=s});const Qd=qi;function dc(s){const t=new Cs(s),e=Da(Cs.prototype.request,t);return A.extend(e,Cs.prototype,t,{allOwnKeys:!0}),A.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return dc(ze(s,i))},e}const ct=dc(Ni);ct.Axios=Cs,ct.CanceledError=rn,ct.CancelToken=Wd,ct.isCancel=Za,ct.VERSION=lc,ct.toFormData=ps,ct.AxiosError=Y,ct.Cancel=ct.CanceledError,ct.all=function(t){return Promise.all(t)},ct.spread=Jd,ct.isAxiosError=Zd,ct.mergeConfig=ze,ct.AxiosHeaders=Zt,ct.formToJSON=s=>Wa(A.isHTMLForm(s)?new FormData(s):s),ct.getAdapter=hc.getAdapter,ct.HttpStatusCode=Qd,ct.default=ct;const Kd=ct;class ji{instance;canceler;constructor(t){this.instance=Kd.create(t),this.canceler=new tm,this.instance.interceptors.request.use(e=>(this.canceler.pendingRequest(e),t?.interceptor?.request?.(e),e),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.requestError?.(e),e)),this.instance.interceptors.response.use(e=>(this.canceler.confirmRequest(e.config),t?.interceptor?.response?.(e),e.status==200?Promise.resolve(e):Promise.reject(e)),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.responseError?.(e),Promise.reject(e.response)))}request(t){return this.instance.request(t)}cancel(t){this.canceler.cancelRequest(t)}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,n){return this.request({...n,method:"post",url:t,data:e})}postBlob(t,e,n){return n={...n,headers:{...n?.headers,"Content-Type":"multipart/form-data"}},this.request({...n,method:"post",url:t,data:e})}postForm(t,e,n){return this.instance.postForm(t,e,{...n})}put(t,e,n){return this.request({...n,method:"put",url:t,data:e})}patch(t,e,n){return this.request({...n,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}class tm{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}getRequestId(t){const{method:e,url:n,params:i,data:r}=t;return ta({method:e,url:n,params:i,data:r})}pendingRequest(t){const e=this.getRequestId(t);if(this.pendingRequestMap.has(e))t.signal=this.pendingRequestMap.get(e)?.signal;else{const n=new AbortController;t.signal=n.signal,this.pendingRequestMap.set(e,n)}}confirmRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&this.pendingRequestMap.delete(e)}cancelRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&(this.pendingRequestMap.get(e)?.abort(),this.pendingRequestMap.delete(e))}cancelAllRequest(){const t=this.pendingRequestMap.values();for(const e of t)e.abort();this.pendingRequestMap.clear()}}const Hi=s=>new XMLSerializer().serializeToString(s),em=(s,t="text/html")=>new DOMParser().parseFromString(s,t),Wi=(s,t=Tt.SVG,e=ss.utf8)=>wi(Hi(s),t,e);async function Ji(s=["*"],t){let e=[];const n=document.createElement("input");return n.setAttribute("type","file"),n.setAttribute("visibility","hidden"),n.setAttribute("accept",s.join(",")),t&&n.setAttribute("multiple","true"),n.addEventListener("click",i=>{n.value=""},!1),new Promise((i,r)=>{n.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?r(new Error("Cancel")):i(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),n.click()}).then(i=>(n.remove(),i)).catch(i=>{throw n.remove(),i})}function Tn(s,t=Ut.text,e){return new Promise((n,i)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{n(o.target?.result)}),r.addEventListener("error",o=>{i(o)}),t){case Ut.dataURL:r.readAsDataURL(s);break;case Ut.binaryString:r.readAsBinaryString(s);break;case Ut.arraybuffer:r.readAsArrayBuffer(s);break;case Ut.text:default:r.readAsText(s)}})}async function nm(s){const t=await Tn(s,Ut.arraybuffer);return tf(t)}const sm=s=>{let t;return s instanceof File?t=s.name:t=s,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function im(s){switch(s.toLowerCase()){case"jpg":case"jpeg":return Tt.JPEG;case"gif":return Tt.GIF;case"svg":return Tt.SVG;case"pdf":return Tt.PDF;case"png":default:return Tt.PNG}}function mc(s,t,e,n,i,r,o){const a=new FileReader;a.addEventListener("load",c=>{if(!c.target||!c.target.result)return t(c);if(e.append(c.target.result),o<n.size)mc(s,t,e,n,i,o,Math.min(o+i,n.size));else return s(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(n.slice(r,o))}async function pc(s,t=1048576){return await new Promise((e,n)=>mc(e,n,new Pf.ArrayBuffer,s,t,0,Math.min(t,s.size)))}class rm{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new ji({baseURL:t.baseURL,interceptor:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1048576,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await pc(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postBlob(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{of(this.time,1),this.onTime?.(nf(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}var gc={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
12
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function Sa(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var Mi=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=_a(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(w){t={error:w}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(ce(u))try{u()}catch(w){r=w instanceof Pi?w.errors:[w]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=_a(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{Ta(p)}catch(w){r=r??[],w instanceof Pi?r=Ei(Ei([],Ti(r)),Ti(w.errors)):r.push(w)}}}catch(w){n={error:w}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(r)throw new Pi(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ta(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Sa(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&Sa(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}();Mi.EMPTY;function Ca(s){return s instanceof Mi||s&&"closed"in s&&ce(s.remove)&&ce(s.add)&&ce(s.unsubscribe)}function Ta(s){ce(s)?s():s.unsubscribe()}var Ea={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yf={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,Ei([s,t],Ti(e)))},clearTimeout:function(s){return clearTimeout(s)},delegate:void 0};function wf(s){yf.setTimeout(function(){throw s})}function Pa(){}function bf(s){s()}var Ai=function(s){Ci(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Ca(e)&&e.add(n)):n.destination=Sf,n}return t.create=function(e,n,i){return new Ii(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Mi),xf=Function.prototype.bind;function ki(s,t){return xf.call(s,t)}var vf=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){hs(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){hs(n)}else hs(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){hs(e)}},s}(),Ii=function(s){Ci(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(ce(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Ea.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&ki(e.next,a),error:e.error&&ki(e.error,a),complete:e.complete&&ki(e.complete,a)}):o=e}return r.destination=new vf(o),r}return t}(Ai);function hs(s){wf(s)}function _f(s){throw s}var Sf={closed:!0,next:Pa,error:_f,complete:Pa},Cf=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Tf(s){return s}function Ef(s){return s.length===0?Tf:s.length===1?s[0]:function(t){return s.reduce(function(e,n){return n(e)},t)}}(function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=Mf(t)?t:new Ii(t,e,n);return bf(function(){var o=i,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=Ma(e),new e(function(i,r){var o=new Ii({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[Cf]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ef(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=Ma(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s})();function Ma(s){var t;return(t=s??Ea.Promise)!==null&&t!==void 0?t:Promise}function Pf(s){return s&&ce(s.next)&&ce(s.error)&&ce(s.complete)}function Mf(s){return s&&s instanceof Ai||Pf(s)&&Ca(s)}(function(s){Ci(t,s);function t(e,n,i,r,o,a){var c=s.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(h){try{n(h)}catch(u){e.error(u)}}:s.prototype._next,c._error=r?function(h){try{r(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,c._complete=i?function(){try{i()}catch(h){e.error(h)}finally{this.unsubscribe()}}:s.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Ai);let vn;function Wt(s){vn=s,s(),vn=null}class Af{subscribers=new Set;add(){vn&&!this.subscribers.has(vn)&&this.subscribers.add(vn)}notify(){this.subscribers.forEach(t=>t())}}const Aa=new WeakMap;function us(s,t){let e=Aa.get(s);e||(e=new Map,Aa.set(s,e));let n=e.get(t);return n||(n=new Af,e.set(t,n)),n}function kf(s,t=!1){return Object.keys(s).forEach(e=>{let n=s[e];if(t&&typeof n=="object"&&n!==null)s[e]=Ri(n,t);else{const i=us(s,e);Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get(){return i.add(),n},set(r){n!=r&&(n=r,i.notify())}})}}),s}function Di(s,t=!1){return kf({value:s},t)}function Ri(s,t=!1){const e={get(n,i,r){const o=Reflect.get(n,i,r);if(t&&typeof o=="object"&&o!==null&&!("isYZReactiveProxy"in o)){const a=Ri(o,t);a.YZReactiveProxyParentTarget=n,a.YZReactiveProxyParentKey=i,Reflect.set(r,i,a)}return us(n,i).add(),Reflect.get(n,i,r)},set(n,i,r,o){const a=Reflect.get(n,i,o),c=Reflect.set(n,i,r,o);return Array.isArray(n)?us(n.YZReactiveProxyParentTarget,n.YZReactiveProxyParentKey).notify():a!=r&&us(n,i).notify(),c},has(n,i){return i==="isYZReactiveProxy"||i in n}};return new Proxy(s,e)}const ka=Ri;class Li{events;constructor(){this.events={}}isEmpty(t){return this.events[t]==null||this.events[t].length==0}has(t,e){return this.events[t]!==void 0&&this.events[t].indexOf(e)!==-1}prependListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(e),this}addListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this}on(t,e){return this.addListener(t,e),this}removeListener(t,e){return this.events[t]&&(this.events[t]=this.events[t].filter(n=>n!==e)),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].slice(0).forEach(n=>{n(...e)}),this}once(t,e){const n=(()=>{let i=!1;return(...r)=>{i||(i=!0,e(...r),this.off(t,n))}})();return this.on(t,n),this}}function Ia(s,t={},e){if(typeof t=="function"&&(e=t,t={}),e)return e(Ia)(s,t);let n=t;const i=[],r=h=>(i.push(h),()=>{Re(i,h)}),o=h=>{n=s(n,h),i.forEach(u=>u())},a=()=>n,c=h=>{s=h,o({type:Symbol()})};return o({type:Symbol()}),{getState:a,dispatch:o,subscribe:r,replaceReducer:c}}function Da(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ra={exports:{}};(function(s,t){(function(e){s.exports=e()})(function(e){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(b,g){var v=b[0],_=b[1],E=b[2],C=b[3];v+=(_&E|~_&C)+g[0]-680876936|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[1]-389564586|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[2]+606105819|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[3]-1044525330|0,_=(_<<22|_>>>10)+E|0,v+=(_&E|~_&C)+g[4]-176418897|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[5]+1200080426|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[6]-1473231341|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[7]-45705983|0,_=(_<<22|_>>>10)+E|0,v+=(_&E|~_&C)+g[8]+1770035416|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[9]-1958414417|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[10]-42063|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[11]-1990404162|0,_=(_<<22|_>>>10)+E|0,v+=(_&E|~_&C)+g[12]+1804603682|0,v=(v<<7|v>>>25)+_|0,C+=(v&_|~v&E)+g[13]-40341101|0,C=(C<<12|C>>>20)+v|0,E+=(C&v|~C&_)+g[14]-1502002290|0,E=(E<<17|E>>>15)+C|0,_+=(E&C|~E&v)+g[15]+1236535329|0,_=(_<<22|_>>>10)+E|0,v+=(_&C|E&~C)+g[1]-165796510|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[6]-1069501632|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[11]+643717713|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[0]-373897302|0,_=(_<<20|_>>>12)+E|0,v+=(_&C|E&~C)+g[5]-701558691|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[10]+38016083|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[15]-660478335|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[4]-405537848|0,_=(_<<20|_>>>12)+E|0,v+=(_&C|E&~C)+g[9]+568446438|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[14]-1019803690|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[3]-187363961|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[8]+1163531501|0,_=(_<<20|_>>>12)+E|0,v+=(_&C|E&~C)+g[13]-1444681467|0,v=(v<<5|v>>>27)+_|0,C+=(v&E|_&~E)+g[2]-51403784|0,C=(C<<9|C>>>23)+v|0,E+=(C&_|v&~_)+g[7]+1735328473|0,E=(E<<14|E>>>18)+C|0,_+=(E&v|C&~v)+g[12]-1926607734|0,_=(_<<20|_>>>12)+E|0,v+=(_^E^C)+g[5]-378558|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[8]-2022574463|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[11]+1839030562|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[14]-35309556|0,_=(_<<23|_>>>9)+E|0,v+=(_^E^C)+g[1]-1530992060|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[4]+1272893353|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[7]-155497632|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[10]-1094730640|0,_=(_<<23|_>>>9)+E|0,v+=(_^E^C)+g[13]+681279174|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[0]-358537222|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[3]-722521979|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[6]+76029189|0,_=(_<<23|_>>>9)+E|0,v+=(_^E^C)+g[9]-640364487|0,v=(v<<4|v>>>28)+_|0,C+=(v^_^E)+g[12]-421815835|0,C=(C<<11|C>>>21)+v|0,E+=(C^v^_)+g[15]+530742520|0,E=(E<<16|E>>>16)+C|0,_+=(E^C^v)+g[2]-995338651|0,_=(_<<23|_>>>9)+E|0,v+=(E^(_|~C))+g[0]-198630844|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[7]+1126891415|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[14]-1416354905|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[5]-57434055|0,_=(_<<21|_>>>11)+E|0,v+=(E^(_|~C))+g[12]+1700485571|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[3]-1894986606|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[10]-1051523|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[1]-2054922799|0,_=(_<<21|_>>>11)+E|0,v+=(E^(_|~C))+g[8]+1873313359|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[15]-30611744|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[6]-1560198380|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[13]+1309151649|0,_=(_<<21|_>>>11)+E|0,v+=(E^(_|~C))+g[4]-145523070|0,v=(v<<6|v>>>26)+_|0,C+=(_^(v|~E))+g[11]-1120210379|0,C=(C<<10|C>>>22)+v|0,E+=(v^(C|~_))+g[2]+718787259|0,E=(E<<15|E>>>17)+C|0,_+=(C^(E|~v))+g[9]-343485551|0,_=(_<<21|_>>>11)+E|0,b[0]=v+b[0]|0,b[1]=_+b[1]|0,b[2]=E+b[2]|0,b[3]=C+b[3]|0}function r(b){var g=[],v;for(v=0;v<64;v+=4)g[v>>2]=b.charCodeAt(v)+(b.charCodeAt(v+1)<<8)+(b.charCodeAt(v+2)<<16)+(b.charCodeAt(v+3)<<24);return g}function o(b){var g=[],v;for(v=0;v<64;v+=4)g[v>>2]=b[v]+(b[v+1]<<8)+(b[v+2]<<16)+(b[v+3]<<24);return g}function a(b){var g=b.length,v=[1732584193,-271733879,-1732584194,271733878],_,E,C,I,F,B;for(_=64;_<=g;_+=64)i(v,r(b.substring(_-64,_)));for(b=b.substring(_-64),E=b.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<E;_+=1)C[_>>2]|=b.charCodeAt(_)<<(_%4<<3);if(C[_>>2]|=128<<(_%4<<3),_>55)for(i(v,C),_=0;_<16;_+=1)C[_]=0;return I=g*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),F=parseInt(I[2],16),B=parseInt(I[1],16)||0,C[14]=F,C[15]=B,i(v,C),v}function c(b){var g=b.length,v=[1732584193,-271733879,-1732584194,271733878],_,E,C,I,F,B;for(_=64;_<=g;_+=64)i(v,o(b.subarray(_-64,_)));for(b=_-64<g?b.subarray(_-64):new Uint8Array(0),E=b.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<E;_+=1)C[_>>2]|=b[_]<<(_%4<<3);if(C[_>>2]|=128<<(_%4<<3),_>55)for(i(v,C),_=0;_<16;_+=1)C[_]=0;return I=g*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),F=parseInt(I[2],16),B=parseInt(I[1],16)||0,C[14]=F,C[15]=B,i(v,C),v}function h(b){var g="",v;for(v=0;v<4;v+=1)g+=n[b>>v*8+4&15]+n[b>>v*8&15];return g}function u(b){var g;for(g=0;g<b.length;g+=1)b[g]=h(b[g]);return b.join("")}u(a("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function b(g,v){return g=g|0||0,g<0?Math.max(g+v,0):Math.min(g,v)}ArrayBuffer.prototype.slice=function(g,v){var _=this.byteLength,E=b(g,_),C=_,I,F,B,$;return v!==e&&(C=b(v,_)),E>C?new ArrayBuffer(0):(I=C-E,F=new ArrayBuffer(I),B=new Uint8Array(F),$=new Uint8Array(this,E,I),B.set($),F)}}();function l(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function d(b,g){var v=b.length,_=new ArrayBuffer(v),E=new Uint8Array(_),C;for(C=0;C<v;C+=1)E[C]=b.charCodeAt(C);return g?E:_}function f(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function p(b,g,v){var _=new Uint8Array(b.byteLength+g.byteLength);return _.set(new Uint8Array(b)),_.set(new Uint8Array(g),b.byteLength),v?_:_.buffer}function w(b){var g=[],v=b.length,_;for(_=0;_<v-1;_+=2)g.push(parseInt(b.substr(_,2),16));return String.fromCharCode.apply(String,g)}function x(){this.reset()}return x.prototype.append=function(b){return this.appendBinary(l(b)),this},x.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var g=this._buff.length,v;for(v=64;v<=g;v+=64)i(this._hash,r(this._buff.substring(v-64,v)));return this._buff=this._buff.substring(v-64),this},x.prototype.end=function(b){var g=this._buff,v=g.length,_,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C;for(_=0;_<v;_+=1)E[_>>2]|=g.charCodeAt(_)<<(_%4<<3);return this._finish(E,v),C=u(this._hash),b&&(C=w(C)),this.reset(),C},x.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},x.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(b,g){var v=g,_,E,C;if(b[v>>2]|=128<<(v%4<<3),v>55)for(i(this._hash,b),v=0;v<16;v+=1)b[v]=0;_=this._length*8,_=_.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(_[2],16),C=parseInt(_[1],16)||0,b[14]=E,b[15]=C,i(this._hash,b)},x.hash=function(b,g){return x.hashBinary(l(b),g)},x.hashBinary=function(b,g){var v=a(b),_=u(v);return g?w(_):_},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(b){var g=p(this._buff.buffer,b,!0),v=g.length,_;for(this._length+=b.byteLength,_=64;_<=v;_+=64)i(this._hash,o(g.subarray(_-64,_)));return this._buff=_-64<v?new Uint8Array(g.buffer.slice(_-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(b){var g=this._buff,v=g.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,C;for(E=0;E<v;E+=1)_[E>>2]|=g[E]<<(E%4<<3);return this._finish(_,v),C=u(this._hash),b&&(C=w(C)),this.reset(),C},x.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.ArrayBuffer.prototype.getState=function(){var b=x.prototype.getState.call(this);return b.buff=f(b.buff),b},x.ArrayBuffer.prototype.setState=function(b){return b.buff=d(b.buff,!0),x.prototype.setState.call(this,b)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(b,g){var v=c(new Uint8Array(b)),_=u(v);return g?w(_):_},x})})(Ra);var If=Ra.exports;const Df=Da(If);function La(s,t){return function(){return s.apply(t,arguments)}}const{toString:Rf}=Object.prototype,{getPrototypeOf:Oi}=Object,ls=(s=>t=>{const e=Rf.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=s=>(s=s.toLowerCase(),t=>ls(t)===s),fs=s=>t=>typeof t===s,{isArray:nn}=Array,_n=fs("undefined");function Lf(s){return s!==null&&!_n(s)&&s.constructor!==null&&!_n(s.constructor)&&zt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Oa=Jt("ArrayBuffer");function Of(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&Oa(s.buffer),t}const zf=fs("string"),zt=fs("function"),za=fs("number"),ds=s=>s!==null&&typeof s=="object",Ff=s=>s===!0||s===!1,ms=s=>{if(ls(s)!=="object")return!1;const t=Oi(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},Nf=Jt("Date"),Bf=Jt("File"),Yf=Jt("Blob"),Uf=Jt("FileList"),Xf=s=>ds(s)&&zt(s.pipe),$f=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||zt(s.append)&&((t=ls(s))==="formdata"||t==="object"&&zt(s.toString)&&s.toString()==="[object FormData]"))},Vf=Jt("URLSearchParams"),[Gf,qf,jf,Hf]=["ReadableStream","Request","Response","Headers"].map(Jt),Wf=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(s,t,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),nn(s))for(n=0,i=s.length;n<i;n++)t.call(null,s[n],n,s);else{const r=e?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let a;for(n=0;n<o;n++)a=r[n],t.call(null,s[a],a,s)}}function Fa(s,t){t=t.toLowerCase();const e=Object.keys(s);let n=e.length,i;for(;n-- >0;)if(i=e[n],t===i.toLowerCase())return i;return null}const Le=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Na=s=>!_n(s)&&s!==Le;function zi(){const{caseless:s}=Na(this)&&this||{},t={},e=(n,i)=>{const r=s&&Fa(t,i)||i;ms(t[r])&&ms(n)?t[r]=zi(t[r],n):ms(n)?t[r]=zi({},n):nn(n)?t[r]=n.slice():t[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Sn(arguments[n],e);return t}const Jf=(s,t,e,{allOwnKeys:n}={})=>(Sn(t,(i,r)=>{e&&zt(i)?s[r]=La(i,e):s[r]=i},{allOwnKeys:n}),s),Zf=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Qf=(s,t,e,n)=>{s.prototype=Object.create(t.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:t.prototype}),e&&Object.assign(s.prototype,e)},Kf=(s,t,e,n)=>{let i,r,o;const a={};if(t=t||{},s==null)return t;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,t))&&!a[o]&&(t[o]=s[o],a[o]=!0);s=e!==!1&&Oi(s)}while(s&&(!e||e(s,t))&&s!==Object.prototype);return t},td=(s,t,e)=>{s=String(s),(e===void 0||e>s.length)&&(e=s.length),e-=t.length;const n=s.indexOf(t,e);return n!==-1&&n===e},ed=s=>{if(!s)return null;if(nn(s))return s;let t=s.length;if(!za(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=s[t];return e},nd=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&Oi(Uint8Array)),sd=(s,t)=>{const n=(s&&s[Symbol.iterator]).call(s);let i;for(;(i=n.next())&&!i.done;){const r=i.value;t.call(s,r[0],r[1])}},id=(s,t)=>{let e;const n=[];for(;(e=s.exec(t))!==null;)n.push(e);return n},rd=Jt("HTMLFormElement"),od=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),Ba=(({hasOwnProperty:s})=>(t,e)=>s.call(t,e))(Object.prototype),ad=Jt("RegExp"),Ya=(s,t)=>{const e=Object.getOwnPropertyDescriptors(s),n={};Sn(e,(i,r)=>{let o;(o=t(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},cd=s=>{Ya(s,(t,e)=>{if(zt(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=s[e];if(zt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},hd=(s,t)=>{const e={},n=i=>{i.forEach(r=>{e[r]=!0})};return nn(s)?n(s):n(String(s).split(t)),e},ud=()=>{},ld=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t;function fd(s){return!!(s&&zt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const dd=s=>{const t=new Array(10),e=(n,i)=>{if(ds(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const r=nn(n)?[]:{};return Sn(n,(o,a)=>{const c=e(o,i+1);!_n(c)&&(r[a]=c)}),t[i]=void 0,r}}return n};return e(s,0)},md=Jt("AsyncFunction"),pd=s=>s&&(ds(s)||zt(s))&&zt(s.then)&&zt(s.catch),Ua=((s,t)=>s?setImmediate:t?((e,n)=>(Le.addEventListener("message",({source:i,data:r})=>{i===Le&&r===e&&n.length&&n.shift()()},!1),i=>{n.push(i),Le.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",zt(Le.postMessage)),gd=typeof queueMicrotask<"u"?queueMicrotask.bind(Le):typeof process<"u"&&process.nextTick||Ua,A={isArray:nn,isArrayBuffer:Oa,isBuffer:Lf,isFormData:$f,isArrayBufferView:Of,isString:zf,isNumber:za,isBoolean:Ff,isObject:ds,isPlainObject:ms,isReadableStream:Gf,isRequest:qf,isResponse:jf,isHeaders:Hf,isUndefined:_n,isDate:Nf,isFile:Bf,isBlob:Yf,isRegExp:ad,isFunction:zt,isStream:Xf,isURLSearchParams:Vf,isTypedArray:nd,isFileList:Uf,forEach:Sn,merge:zi,extend:Jf,trim:Wf,stripBOM:Zf,inherits:Qf,toFlatObject:Kf,kindOf:ls,kindOfTest:Jt,endsWith:td,toArray:ed,forEachEntry:sd,matchAll:id,isHTMLForm:rd,hasOwnProperty:Ba,hasOwnProp:Ba,reduceDescriptors:Ya,freezeMethods:cd,toObjectSet:hd,toCamelCase:od,noop:ud,toFiniteNumber:ld,findKey:Fa,global:Le,isContextDefined:Na,isSpecCompliantForm:fd,toJSONObject:dd,isAsyncFn:md,isThenable:pd,setImmediate:Ua,asap:gd};function Y(s,t,e,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}A.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Xa=Y.prototype,$a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{$a[s]={value:s}}),Object.defineProperties(Y,$a),Object.defineProperty(Xa,"isAxiosError",{value:!0}),Y.from=(s,t,e,n,i,r)=>{const o=Object.create(Xa);return A.toFlatObject(s,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Y.call(o,s.message,t,e,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const yd=null;function Fi(s){return A.isPlainObject(s)||A.isArray(s)}function Va(s){return A.endsWith(s,"[]")?s.slice(0,-2):s}function Ga(s,t,e){return s?s.concat(t).map(function(i,r){return i=Va(i),!e&&r?"["+i+"]":i}).join(e?".":""):t}function wd(s){return A.isArray(s)&&!s.some(Fi)}const bd=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function ps(s,t,e){if(!A.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,e=A.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,x){return!A.isUndefined(x[w])});const n=e.metaTokens,i=e.visitor||u,r=e.dots,o=e.indexes,c=(e.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function h(p){if(p===null)return"";if(A.isDate(p))return p.toISOString();if(!c&&A.isBlob(p))throw new Y("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(p)||A.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,w,x){let b=p;if(p&&!x&&typeof p=="object"){if(A.endsWith(w,"{}"))w=n?w:w.slice(0,-2),p=JSON.stringify(p);else if(A.isArray(p)&&wd(p)||(A.isFileList(p)||A.endsWith(w,"[]"))&&(b=A.toArray(p)))return w=Va(w),b.forEach(function(v,_){!(A.isUndefined(v)||v===null)&&t.append(o===!0?Ga([w],_,r):o===null?w:w+"[]",h(v))}),!1}return Fi(p)?!0:(t.append(Ga(x,w,r),h(p)),!1)}const l=[],d=Object.assign(bd,{defaultVisitor:u,convertValue:h,isVisitable:Fi});function f(p,w){if(!A.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+w.join("."));l.push(p),A.forEach(p,function(b,g){(!(A.isUndefined(b)||b===null)&&i.call(t,b,A.isString(g)?g.trim():g,w,d))===!0&&f(b,w?w.concat(g):[g])}),l.pop()}}if(!A.isObject(s))throw new TypeError("data must be an object");return f(s),t}function qa(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ni(s,t){this._pairs=[],s&&ps(s,this,t)}const ja=Ni.prototype;ja.append=function(t,e){this._pairs.push([t,e])},ja.toString=function(t){const e=t?function(n){return t.call(this,n,qa)}:qa;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function xd(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ha(s,t,e){if(!t)return s;const n=e&&e.encode||xd;A.isFunction(e)&&(e={serialize:e});const i=e&&e.serialize;let r;if(i?r=i(t,e):r=A.isURLSearchParams(t)?t.toString():new Ni(t,e).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class vd{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Wa=vd,Ja={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_d={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ni,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Bi=typeof window<"u"&&typeof document<"u",Yi=typeof navigator=="object"&&navigator||void 0,Sd=Bi&&(!Yi||["ReactNative","NativeScript","NS"].indexOf(Yi.product)<0),Cd=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Td=Bi&&window.location.href||"http://localhost",xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bi,hasStandardBrowserEnv:Sd,hasStandardBrowserWebWorkerEnv:Cd,navigator:Yi,origin:Td},Symbol.toStringTag,{value:"Module"})),..._d};function Ed(s,t){return ps(s,new xt.classes.URLSearchParams,Object.assign({visitor:function(e,n,i,r){return xt.isNode&&A.isBuffer(e)?(this.append(n,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Pd(s){return A.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Md(s){const t={},e=Object.keys(s);let n;const i=e.length;let r;for(n=0;n<i;n++)r=e[n],t[r]=s[r];return t}function Za(s){function t(e,n,i,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=r>=e.length;return o=!o&&A.isArray(i)?i.length:o,c?(A.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!A.isObject(i[o]))&&(i[o]=[]),t(e,n,i[o],r)&&A.isArray(i[o])&&(i[o]=Md(i[o])),!a)}if(A.isFormData(s)&&A.isFunction(s.entries)){const e={};return A.forEachEntry(s,(n,i)=>{t(Pd(n),i,e,0)}),e}return null}function Ad(s,t,e){if(A.isString(s))try{return(t||JSON.parse)(s),A.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(s)}const Ui={transitional:Ja,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=A.isObject(t);if(r&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return i?JSON.stringify(Za(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ed(t,this.formSerializer).toString();if((a=A.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ps(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Ad(t)):t}],transformResponse:[function(t){const e=this.transitional||Ui.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(n&&!this.responseType||i)){const o=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],s=>{Ui.headers[s]={}});const Xi=Ui,kd=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Id=s=>{const t={};let e,n,i;return s&&s.split(`
|
|
13
|
+
`).forEach(function(o){i=o.indexOf(":"),e=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!e||t[e]&&kd[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},Qa=Symbol("internals");function Cn(s){return s&&String(s).trim().toLowerCase()}function gs(s){return s===!1||s==null?s:A.isArray(s)?s.map(gs):String(s)}function Dd(s){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=e.exec(s);)t[n[1]]=n[2];return t}const Rd=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function $i(s,t,e,n,i){if(A.isFunction(n))return n.call(this,t,e);if(i&&(t=e),!!A.isString(t)){if(A.isString(n))return t.indexOf(n)!==-1;if(A.isRegExp(n))return n.test(t)}}function Ld(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function Od(s,t){const e=A.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+e,{value:function(i,r,o){return this[n].call(this,t,i,r,o)},configurable:!0})})}class ys{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(a,c,h){const u=Cn(c);if(!u)throw new Error("header name must be a non-empty string");const l=A.findKey(i,u);(!l||i[l]===void 0||h===!0||h===void 0&&i[l]!==!1)&&(i[l||c]=gs(a))}const o=(a,c)=>A.forEach(a,(h,u)=>r(h,u,c));if(A.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(A.isString(t)&&(t=t.trim())&&!Rd(t))o(Id(t),e);else if(A.isHeaders(t))for(const[a,c]of t.entries())r(c,a,n);else t!=null&&r(e,t,n);return this}get(t,e){if(t=Cn(t),t){const n=A.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return Dd(i);if(A.isFunction(e))return e.call(this,i,n);if(A.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Cn(t),t){const n=A.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||$i(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function r(o){if(o=Cn(o),o){const a=A.findKey(n,o);a&&(!e||$i(n,n[a],a,e))&&(delete n[a],i=!0)}}return A.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];(!t||$i(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return A.forEach(this,(i,r)=>{const o=A.findKey(n,r);if(o){e[o]=gs(i),delete e[r];return}const a=t?Ld(r):String(r).trim();a!==r&&delete e[r],e[a]=gs(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return A.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&A.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
14
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Qa]=this[Qa]={accessors:{}}).accessors,i=this.prototype;function r(o){const a=Cn(o);n[a]||(Od(i,o),n[a]=!0)}return A.isArray(t)?t.forEach(r):r(t),this}}ys.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(ys.prototype,({value:s},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[e]=n}}}),A.freezeMethods(ys);const Zt=ys;function Vi(s,t){const e=this||Xi,n=t||e,i=Zt.from(n.headers);let r=n.data;return A.forEach(s,function(a){r=a.call(e,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function Ka(s){return!!(s&&s.__CANCEL__)}function sn(s,t,e){Y.call(this,s??"canceled",Y.ERR_CANCELED,t,e),this.name="CanceledError"}A.inherits(sn,Y,{__CANCEL__:!0});function tc(s,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?s(e):t(new Y("Request failed with status code "+e.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function zd(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function Fd(s,t){s=s||10;const e=new Array(s),n=new Array(s);let i=0,r=0,o;return t=t!==void 0?t:1e3,function(c){const h=Date.now(),u=n[r];o||(o=h),e[i]=c,n[i]=h;let l=r,d=0;for(;l!==i;)d+=e[l++],l=l%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),h-o<t)return;const f=u&&h-u;return f?Math.round(d*1e3/f):void 0}}function Nd(s,t){let e=0,n=1e3/t,i,r;const o=(h,u=Date.now())=>{e=u,i=null,r&&(clearTimeout(r),r=null),s.apply(null,h)};return[(...h)=>{const u=Date.now(),l=u-e;l>=n?o(h,u):(i=h,r||(r=setTimeout(()=>{r=null,o(i)},n-l)))},()=>i&&o(i)]}const ws=(s,t,e=3)=>{let n=0;const i=Fd(50,250);return Nd(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,c=o-n,h=i(c),u=o<=a;n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:h||void 0,estimated:h&&a&&u?(a-o)/h:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};s(l)},e)},ec=(s,t)=>{const e=s!=null;return[n=>t[0]({lengthComputable:e,total:s,loaded:n}),t[1]]},nc=s=>(...t)=>A.asap(()=>s(...t)),Bd=xt.hasStandardBrowserEnv?((s,t)=>e=>(e=new URL(e,xt.origin),s.protocol===e.protocol&&s.host===e.host&&(t||s.port===e.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,Yd=xt.hasStandardBrowserEnv?{write(s,t,e,n,i,r){const o=[s+"="+encodeURIComponent(t)];A.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),A.isString(n)&&o.push("path="+n),A.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const t=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ud(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Xd(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function sc(s,t,e){let n=!Ud(t);return s&&(n||e==!1)?Xd(s,t):t}const ic=s=>s instanceof Zt?{...s}:s;function Oe(s,t){t=t||{};const e={};function n(h,u,l,d){return A.isPlainObject(h)&&A.isPlainObject(u)?A.merge.call({caseless:d},h,u):A.isPlainObject(u)?A.merge({},u):A.isArray(u)?u.slice():u}function i(h,u,l,d){if(A.isUndefined(u)){if(!A.isUndefined(h))return n(void 0,h,l,d)}else return n(h,u,l,d)}function r(h,u){if(!A.isUndefined(u))return n(void 0,u)}function o(h,u){if(A.isUndefined(u)){if(!A.isUndefined(h))return n(void 0,h)}else return n(void 0,u)}function a(h,u,l){if(l in t)return n(h,u);if(l in s)return n(void 0,h)}const c={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(h,u,l)=>i(ic(h),ic(u),l,!0)};return A.forEach(Object.keys(Object.assign({},s,t)),function(u){const l=c[u]||i,d=l(s[u],t[u],u);A.isUndefined(d)&&l!==a||(e[u]=d)}),e}const rc=s=>{const t=Oe({},s);let{data:e,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:a}=t;t.headers=o=Zt.from(o),t.url=Ha(sc(t.baseURL,t.url,t.allowAbsoluteUrls),s.params,s.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(A.isFormData(e)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[h,...u]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...u].join("; "))}}if(xt.hasStandardBrowserEnv&&(n&&A.isFunction(n)&&(n=n(t)),n||n!==!1&&Bd(t.url))){const h=i&&r&&Yd.read(r);h&&o.set(i,h)}return t},$d=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(e,n){const i=rc(s);let r=i.data;const o=Zt.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:h}=i,u,l,d,f,p;function w(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function b(){if(!x)return;const v=Zt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:v,config:s,request:x};tc(function(I){e(I),w()},function(I){n(I),w()},E),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(n(new Y("Request aborted",Y.ECONNABORTED,s,x)),x=null)},x.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,s,x)),x=null},x.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Ja;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),n(new Y(_,E.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,s,x)),x=null},r===void 0&&o.setContentType(null),"setRequestHeader"in x&&A.forEach(o.toJSON(),function(_,E){x.setRequestHeader(E,_)}),A.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),a&&a!=="json"&&(x.responseType=i.responseType),h&&([d,p]=ws(h,!0),x.addEventListener("progress",d)),c&&x.upload&&([l,f]=ws(c),x.upload.addEventListener("progress",l),x.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=v=>{x&&(n(!v||v.type?new sn(null,s,x):v),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const g=zd(i.url);if(g&&xt.protocols.indexOf(g)===-1){n(new Y("Unsupported protocol "+g+":",Y.ERR_BAD_REQUEST,s));return}x.send(r||null)})},Vd=(s,t)=>{const{length:e}=s=s?s.filter(Boolean):[];if(t||e){let n=new AbortController,i;const r=function(h){if(!i){i=!0,a();const u=h instanceof Error?h:this.reason;n.abort(u instanceof Y?u:new sn(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,r(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const a=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(h=>{h.unsubscribe?h.unsubscribe(r):h.removeEventListener("abort",r)}),s=null)};s.forEach(h=>h.addEventListener("abort",r));const{signal:c}=n;return c.unsubscribe=()=>A.asap(a),c}},Gd=function*(s,t){let e=s.byteLength;if(!t||e<t){yield s;return}let n=0,i;for(;n<e;)i=n+t,yield s.slice(n,i),n=i},qd=async function*(s,t){for await(const e of jd(s))yield*Gd(e,t)},jd=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const t=s.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},oc=(s,t,e,n)=>{const i=qd(s,t);let r=0,o,a=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:h,value:u}=await i.next();if(h){a(),c.close();return}let l=u.byteLength;if(e){let d=r+=l;e(d)}c.enqueue(new Uint8Array(u))}catch(h){throw a(h),h}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},bs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ac=bs&&typeof ReadableStream=="function",Hd=bs&&(typeof TextEncoder=="function"?(s=>t=>s.encode(t))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),cc=(s,...t)=>{try{return!!s(...t)}catch{return!1}},Wd=ac&&cc(()=>{let s=!1;const t=new Request(xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!t}),hc=64*1024,Gi=ac&&cc(()=>A.isReadableStream(new Response("").body)),xs={stream:Gi&&(s=>s.body)};bs&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xs[t]&&(xs[t]=A.isFunction(s[t])?e=>e[t]():(e,n)=>{throw new Y(`Response type '${t}' is not supported`,Y.ERR_NOT_SUPPORT,n)})})})(new Response);const Jd=async s=>{if(s==null)return 0;if(A.isBlob(s))return s.size;if(A.isSpecCompliantForm(s))return(await new Request(xt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(A.isArrayBufferView(s)||A.isArrayBuffer(s))return s.byteLength;if(A.isURLSearchParams(s)&&(s=s+""),A.isString(s))return(await Hd(s)).byteLength},Zd=async(s,t)=>{const e=A.toFiniteNumber(s.getContentLength());return e??Jd(t)},qi={http:yd,xhr:$d,fetch:bs&&(async s=>{let{url:t,method:e,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:h,headers:u,withCredentials:l="same-origin",fetchOptions:d}=rc(s);h=h?(h+"").toLowerCase():"text";let f=Vd([i,r&&r.toAbortSignal()],o),p;const w=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let x;try{if(c&&Wd&&e!=="get"&&e!=="head"&&(x=await Zd(u,n))!==0){let E=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(A.isFormData(n)&&(C=E.headers.get("content-type"))&&u.setContentType(C),E.body){const[I,F]=ec(x,ws(nc(c)));n=oc(E.body,hc,I,F)}}A.isString(l)||(l=l?"include":"omit");const b="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:e.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:b?l:void 0});let g=await fetch(p);const v=Gi&&(h==="stream"||h==="response");if(Gi&&(a||v&&w)){const E={};["status","statusText","headers"].forEach(B=>{E[B]=g[B]});const C=A.toFiniteNumber(g.headers.get("content-length")),[I,F]=a&&ec(C,ws(nc(a),!0))||[];g=new Response(oc(g.body,hc,I,()=>{F&&F(),w&&w()}),E)}h=h||"text";let _=await xs[A.findKey(xs,h)||"text"](g,s);return!v&&w&&w(),await new Promise((E,C)=>{tc(E,C,{data:_,headers:Zt.from(g.headers),status:g.status,statusText:g.statusText,config:s,request:p})})}catch(b){throw w&&w(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,s,p),{cause:b.cause||b}):Y.from(b,b&&b.code,s,p)}})};A.forEach(qi,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const uc=s=>`- ${s}`,Qd=s=>A.isFunction(s)||s===null||s===!1,lc={getAdapter:s=>{s=A.isArray(s)?s:[s];const{length:t}=s;let e,n;const i={};for(let r=0;r<t;r++){e=s[r];let o;if(n=e,!Qd(e)&&(n=qi[(o=String(e)).toLowerCase()],n===void 0))throw new Y(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?r.length>1?`since :
|
|
15
|
+
`+r.map(uc).join(`
|
|
16
|
+
`):" "+uc(r[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:qi};function ji(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new sn(null,s)}function fc(s){return ji(s),s.headers=Zt.from(s.headers),s.data=Vi.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),lc.getAdapter(s.adapter||Xi.adapter)(s).then(function(n){return ji(s),n.data=Vi.call(s,s.transformResponse,n),n.headers=Zt.from(n.headers),n},function(n){return Ka(n)||(ji(s),n&&n.response&&(n.response.data=Vi.call(s,s.transformResponse,n.response),n.response.headers=Zt.from(n.response.headers))),Promise.reject(n)})}const dc="1.8.4",vs={};["object","boolean","number","function","string","symbol"].forEach((s,t)=>{vs[s]=function(n){return typeof n===s||"a"+(t<1?"n ":" ")+s}});const mc={};vs.transitional=function(t,e,n){function i(r,o){return"[Axios v"+dc+"] Transitional option '"+r+"'"+o+(n?". "+n:"")}return(r,o,a)=>{if(t===!1)throw new Y(i(o," has been removed"+(e?" in "+e:"")),Y.ERR_DEPRECATED);return e&&!mc[o]&&(mc[o]=!0,console.warn(i(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,o,a):!0}},vs.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Kd(s,t,e){if(typeof s!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const n=Object.keys(s);let i=n.length;for(;i-- >0;){const r=n[i],o=t[r];if(o){const a=s[r],c=a===void 0||o(a,r,s);if(c!==!0)throw new Y("option "+r+" must be "+c,Y.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Y("Unknown option "+r,Y.ERR_BAD_OPTION)}}const _s={assertOptions:Kd,validators:vs},se=_s.validators;class Ss{constructor(t){this.defaults=t,this.interceptors={request:new Wa,response:new Wa}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
17
|
+
`+r):n.stack=r}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Oe(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;n!==void 0&&_s.assertOptions(n,{silentJSONParsing:se.transitional(se.boolean),forcedJSONParsing:se.transitional(se.boolean),clarifyTimeoutError:se.transitional(se.boolean)},!1),i!=null&&(A.isFunction(i)?e.paramsSerializer={serialize:i}:_s.assertOptions(i,{encode:se.function,serialize:se.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),_s.assertOptions(e,{baseUrl:se.spelling("baseURL"),withXsrfToken:se.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&A.merge(r.common,r[e.method]);r&&A.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),e.headers=Zt.concat(o,r);const a=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(e)===!1||(c=c&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const h=[];this.interceptors.response.forEach(function(w){h.push(w.fulfilled,w.rejected)});let u,l=0,d;if(!c){const p=[fc.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,h),d=p.length,u=Promise.resolve(e);l<d;)u=u.then(p[l++],p[l++]);return u}d=a.length;let f=e;for(l=0;l<d;){const p=a[l++],w=a[l++];try{f=p(f)}catch(x){w.call(this,x);break}}try{u=fc.call(this,f)}catch(p){return Promise.reject(p)}for(l=0,d=h.length;l<d;)u=u.then(h[l++],h[l++]);return u}getUri(t){t=Oe(this.defaults,t);const e=sc(t.baseURL,t.url,t.allowAbsoluteUrls);return Ha(e,t.params,t.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(t){Ss.prototype[t]=function(e,n){return this.request(Oe(n||{},{method:t,url:e,data:(n||{}).data}))}}),A.forEach(["post","put","patch"],function(t){function e(n){return function(r,o,a){return this.request(Oe(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}Ss.prototype[t]=e(),Ss.prototype[t+"Form"]=e(!0)});const Cs=Ss;class Hi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const n=this;this.promise.then(i=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](i);n._listeners=null}),this.promise.then=i=>{let r;const o=new Promise(a=>{n.subscribe(a),r=a}).then(i);return o.cancel=function(){n.unsubscribe(r)},o},t(function(r,o,a){n.reason||(n.reason=new sn(r,o,a),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=n=>{t.abort(n)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Hi(function(i){t=i}),cancel:t}}}const tm=Hi;function em(s){return function(e){return s.apply(null,e)}}function nm(s){return A.isObject(s)&&s.isAxiosError===!0}const Wi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Wi).forEach(([s,t])=>{Wi[t]=s});const sm=Wi;function pc(s){const t=new Cs(s),e=La(Cs.prototype.request,t);return A.extend(e,Cs.prototype,t,{allOwnKeys:!0}),A.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return pc(Oe(s,i))},e}const ct=pc(Xi);ct.Axios=Cs,ct.CanceledError=sn,ct.CancelToken=tm,ct.isCancel=Ka,ct.VERSION=dc,ct.toFormData=ps,ct.AxiosError=Y,ct.Cancel=ct.CanceledError,ct.all=function(t){return Promise.all(t)},ct.spread=em,ct.isAxiosError=nm,ct.mergeConfig=Oe,ct.AxiosHeaders=Zt,ct.formToJSON=s=>Za(A.isHTMLForm(s)?new FormData(s):s),ct.getAdapter=lc.getAdapter,ct.HttpStatusCode=sm,ct.default=ct;const im=ct;class Ji{instance;canceler;retryCount=0;cacheTime=0;caches=new wa;constructor(t){this.instance=im.create(t),this.canceler=new rm,this.retryCount=t?.retry||0,this.cacheTime=t?.cache||0,this.instance.interceptors.request.use(e=>(this.canceler.pendingRequest(e),t?.interceptor?.request?.(e),e),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.requestError?.(e),e)),this.instance.interceptors.response.use(e=>(this.canceler.confirmRequest(e.config),t?.interceptor?.response?.(e),e.status==200?Promise.resolve(e):Promise.reject(e)),e=>(this.canceler.cancelRequest(e.config),t?.interceptor?.responseError?.(e),Promise.reject(e.response)))}request(t){let e=this.instance.request;const n=t.retry||this.retryCount;n&&(e=vi(e,n));const i=t.cache||this.cacheTime;return i&&(e=_i(e,i,this.caches)),e(t)}cancel(t){this.canceler.cancelRequest(t)}get(t,e){return this.request({...e,method:"get",url:t})}delete(t,e){return this.request({...e,method:"delete",url:t})}head(t,e){return this.request({...e,method:"head",url:t})}options(t,e){return this.request({...e,method:"options",url:t})}post(t,e,n){return this.request({...n,method:"post",url:t,data:e})}postBlob(t,e,n){return n={...n,headers:{...n?.headers,"Content-Type":"multipart/form-data"}},this.request({...n,method:"post",url:t,data:e})}postForm(t,e,n){return this.instance.postForm(t,e,{...n})}put(t,e,n){return this.request({...n,method:"put",url:t,data:e})}patch(t,e,n){return this.request({...n,method:"patch",url:t,data:e})}getUri(t){return this.instance.getUri(t)}}class rm{pendingRequestMap;constructor(){this.pendingRequestMap=new Map}getRequestId(t){const{method:e,url:n,params:i,data:r}=t;return yi({method:e,url:n,params:i,data:r})}pendingRequest(t){const e=this.getRequestId(t);if(this.pendingRequestMap.has(e))t.signal=this.pendingRequestMap.get(e)?.signal;else{const n=new AbortController;t.signal=n.signal,this.pendingRequestMap.set(e,n)}}confirmRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&this.pendingRequestMap.delete(e)}cancelRequest(t){if(this.pendingRequestMap.size===0)return;const e=this.getRequestId(t);this.pendingRequestMap.has(e)&&(this.pendingRequestMap.get(e)?.abort(),this.pendingRequestMap.delete(e))}cancelAllRequest(){const t=this.pendingRequestMap.values();for(const e of t)e.abort();this.pendingRequestMap.clear()}}const Zi=s=>new XMLSerializer().serializeToString(s),om=(s,t="text/html")=>new DOMParser().parseFromString(s,t),Qi=(s,t=Et.SVG,e=ss.utf8)=>bi(Zi(s),t,e);async function Ki(s=["*"],t){let e=[];const n=document.createElement("input");return n.setAttribute("type","file"),n.setAttribute("visibility","hidden"),n.setAttribute("accept",s.join(",")),t&&n.setAttribute("multiple","true"),n.addEventListener("click",i=>{n.value=""},!1),new Promise((i,r)=>{n.addEventListener("change",o=>{e=Array.from(o.target.files||[]),e.length===0?r(new Error("Cancel")):i(e)},!1),window.addEventListener("focus",()=>{setTimeout(()=>{e.length===0&&r(new Error("Cancel"))},1e3)},{once:!0}),n.click()}).then(i=>(n.remove(),i)).catch(i=>{throw n.remove(),i})}function Tn(s,t=Xt.text,e){return new Promise((n,i)=>{const r=new FileReader;switch(r.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),r.addEventListener("load",o=>{n(o.target?.result)}),r.addEventListener("error",o=>{i(o)}),t){case Xt.dataURL:r.readAsDataURL(s);break;case Xt.binaryString:r.readAsBinaryString(s);break;case Xt.arraybuffer:r.readAsArrayBuffer(s);break;case Xt.text:default:r.readAsText(s)}})}async function am(s){const t=await Tn(s,Xt.arraybuffer);return nf(t)}const cm=s=>{let t;return s instanceof File?t=s.name:t=s,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]||""};function hm(s){switch(s.toLowerCase()){case"jpg":case"jpeg":return Et.JPEG;case"gif":return Et.GIF;case"svg":return Et.SVG;case"pdf":return Et.PDF;case"png":default:return Et.PNG}}function gc(s,t,e,n,i,r,o){const a=new FileReader;a.addEventListener("load",c=>{if(!c.target||!c.target.result)return t(c);if(e.append(c.target.result),o<n.size)gc(s,t,e,n,i,o,Math.min(o+i,n.size));else return s(e.end())}),a.addEventListener("error",c=>t(c)),a.readAsArrayBuffer(n.slice(r,o))}async function yc(s,t=1048576){return await new Promise((e,n)=>gc(e,n,new Df.ArrayBuffer,s,t,0,Math.min(t,s.size)))}class um{axios;checkURL;uploadURL;file;fileHash;chunkSize;chunks;currentChunk=0;isUploading=!1;begin=0;end=0;timer;time=[0,0,0,0,0,0];onExist;onStart;onProgress;onComplete;onTime;constructor(t){this.axios=new Ji({baseURL:t.baseURL,interceptor:{response:e=>{e.config.url==this.uploadURL&&e.status==200&&(this.onProgress?.(this.currentChunk++,this.chunks),this.end==this.file.size?(this.isUploading=!1,this.stopTimeCount(),this.onComplete?.()):this.isUploading&&this.uploadChunk())}}}),this.checkURL=t.checkURL,this.uploadURL=t.uploadURL,this.file=t.file,this.chunkSize=t.chunkSize||1048576,this.chunks=Math.ceil(this.file.size/this.chunkSize),this.onExist=t.onExist,this.onStart=t.onStart,this.onProgress=t.onProgress,this.onComplete=t.onComplete,this.onTime=t.onTime}async start(){this.fileHash||(this.fileHash=await yc(this.file,this.chunkSize)),(await this.axios.post(this.checkURL,{fileName:this.file.name,fileHash:this.fileHash})).data.isExist?(this.isUploading=!1,this.onExist?.()):this.isUploading||(this.onStart?.(),this.startTimeCount(),await this.uploadChunk())}pause(){this.isUploading&&(this.isUploading=!1,this.stopTimeCount())}async uploadChunk(){this.isUploading=!0,this.begin=this.currentChunk*this.chunkSize,this.end=Math.min(this.begin+this.chunkSize,this.file.size);const t=this.file.slice(this.begin,this.end),e=new FormData;e.append("fileData",t),e.append("fileName",this.file.name),e.append("fileHash",this.fileHash),e.append("chunkIndex",String(this.currentChunk)),e.append("chunks",String(this.chunks)),await this.axios.postBlob(this.uploadURL,e)}startTimeCount(){this.stopTimeCount(),this.timer=setInterval(()=>{cf(this.time,1),this.onTime?.(rf(this.time))},1e3)}stopTimeCount(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}}var wc={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
18
18
|
* http://hammerjs.github.io/
|
|
19
19
|
*
|
|
20
20
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
21
21
|
* Licensed under the MIT license */(function(s){(function(t,e,n,i){var r=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",c=Math.round,h=Math.abs,u=Date.now;function l(y,S,P){return setTimeout(v(y,P),S)}function d(y,S,P){return Array.isArray(y)?(f(y,P[S],P),!0):!1}function f(y,S,P){var M;if(y)if(y.forEach)y.forEach(S,P);else if(y.length!==i)for(M=0;M<y.length;)S.call(P,y[M],M,y),M++;else for(M in y)y.hasOwnProperty(M)&&S.call(P,y[M],M,y)}function p(y,S,P){var M="DEPRECATED METHOD: "+S+`
|
|
22
22
|
`+P+` AT
|
|
23
|
-
`;return function(){var D=new Error("get-stack-trace"),z=D&&D.stack?D.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",G=t.console&&(t.console.warn||t.console.log);return G&&G.call(t.console,M,z),y.apply(this,arguments)}}var w;typeof Object.assign!="function"?w=function(S){if(S===i||S===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(S),M=1;M<arguments.length;M++){var D=arguments[M];if(D!==i&&D!==null)for(var z in D)D.hasOwnProperty(z)&&(P[z]=D[z])}return P}:w=Object.assign;var x=p(function(S,P,M){for(var D=Object.keys(P),z=0;z<D.length;)(!M||M&&S[D[z]]===i)&&(S[D[z]]=P[D[z]]),z++;return S},"extend","Use `assign`."),b=p(function(S,P){return x(S,P,!0)},"merge","Use `assign`.");function g(y,S,P){var M=S.prototype,D;D=y.prototype=Object.create(M),D.constructor=y,D._super=M,P&&w(D,P)}function v(y,S){return function(){return y.apply(S,arguments)}}function _(y,S){return typeof y==a?y.apply(S&&S[0]||i,S):y}function E(y,S){return y===i?S:y}function C(y,S,P){f($(S),function(M){y.addEventListener(M,P,!1)})}function I(y,S,P){f($(S),function(M){y.removeEventListener(M,P,!1)})}function F(y,S){for(;y;){if(y==S)return!0;y=y.parentNode}return!1}function N(y,S){return y.indexOf(S)>-1}function $(y){return y.trim().split(/\s+/g)}function V(y,S,P){if(y.indexOf&&!P)return y.indexOf(S);for(var M=0;M<y.length;){if(P&&y[M][P]==S||!P&&y[M]===S)return M;M++}return-1}function W(y){return Array.prototype.slice.call(y,0)}function et(y,S,P){for(var M=[],D=[],z=0;z<y.length;){var G=S?y[z][S]:y[z];V(D,G)<0&&M.push(y[z]),D[z]=G,z++}return P&&(S?M=M.sort(function(wt,It){return wt[S]>It[S]}):M=M.sort()),M}function Z(y,S){for(var P,M,D=S[0].toUpperCase()+S.slice(1),z=0;z<r.length;){if(P=r[z],M=P?P+D:S,M in y)return M;z++}return i}var Gt=1;function mt(){return Gt++}function At(y){var S=y.ownerDocument||y;return S.defaultView||S.parentWindow||t}var Lt=/mobile|tablet|ip(ad|hone|od)|android/i,L="ontouchstart"in t,R=Z(t,"PointerEvent")!==i,X=L&&Lt.test(navigator.userAgent),H="touch",kt="pen",ee="mouse",ti="kinect",ei=25,pt=1,ie=2,rt=4,Ct=8,yn=1,Ze=2,Qe=4,De=8,k=16,at=Ze|Qe,Ke=De|k,el=at|Ke,nl=["x","y"],ni=["clientX","clientY"];function qt(y,S){var P=this;this.manager=y,this.callback=S,this.element=y.element,this.target=y.options.inputTarget,this.domHandler=function(M){_(y.options.enable,[y])&&P.handler(M)},this.init()}qt.prototype={handler:function(){},init:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(At(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(At(this.element),this.evWin,this.domHandler)}};function b2(y){var S,P=y.options.inputClass;return P?S=P:R?S=$o:X?S=ri:L?S=Vo:S=ii,new S(y,x2)}function x2(y,S,P){var M=P.pointers.length,D=P.changedPointers.length,z=S&pt&&M-D===0,G=S&(rt|Ct)&&M-D===0;P.isFirst=!!z,P.isFinal=!!G,z&&(y.session={}),P.eventType=S,v2(y,P),y.emit("hammer.input",P),y.recognize(P),y.session.prevInput=P}function v2(y,S){var P=y.session,M=S.pointers,D=M.length;P.firstInput||(P.firstInput=sl(S)),D>1&&!P.firstMultiple?P.firstMultiple=sl(S):D===1&&(P.firstMultiple=!1);var z=P.firstInput,G=P.firstMultiple,gt=G?G.center:z.center,wt=S.center=il(M);S.timeStamp=u(),S.deltaTime=S.timeStamp-z.timeStamp,S.angle=Uo(gt,wt),S.distance=si(gt,wt),_2(P,S),S.offsetDirection=ol(S.deltaX,S.deltaY);var It=rl(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=It.x,S.overallVelocityY=It.y,S.overallVelocity=h(It.x)>h(It.y)?It.x:It.y,S.scale=G?T2(G.pointers,M):1,S.rotation=G?C2(G.pointers,M):0,S.maxPointers=P.prevInput?S.pointers.length>P.prevInput.maxPointers?S.pointers.length:P.prevInput.maxPointers:S.pointers.length,S2(P,S);var oe=y.element;F(S.srcEvent.target,oe)&&(oe=S.srcEvent.target),S.target=oe}function _2(y,S){var P=S.center,M=y.offsetDelta||{},D=y.prevDelta||{},z=y.prevInput||{};(S.eventType===pt||z.eventType===rt)&&(D=y.prevDelta={x:z.deltaX||0,y:z.deltaY||0},M=y.offsetDelta={x:P.x,y:P.y}),S.deltaX=D.x+(P.x-M.x),S.deltaY=D.y+(P.y-M.y)}function S2(y,S){var P=y.lastInterval||S,M=S.timeStamp-P.timeStamp,D,z,G,gt;if(S.eventType!=Ct&&(M>ei||P.velocity===i)){var wt=S.deltaX-P.deltaX,It=S.deltaY-P.deltaY,oe=rl(M,wt,It);z=oe.x,G=oe.y,D=h(oe.x)>h(oe.y)?oe.x:oe.y,gt=ol(wt,It),y.lastInterval=S}else D=P.velocity,z=P.velocityX,G=P.velocityY,gt=P.direction;S.velocity=D,S.velocityX=z,S.velocityY=G,S.direction=gt}function sl(y){for(var S=[],P=0;P<y.pointers.length;)S[P]={clientX:c(y.pointers[P].clientX),clientY:c(y.pointers[P].clientY)},P++;return{timeStamp:u(),pointers:S,center:il(S),deltaX:y.deltaX,deltaY:y.deltaY}}function il(y){var S=y.length;if(S===1)return{x:c(y[0].clientX),y:c(y[0].clientY)};for(var P=0,M=0,D=0;D<S;)P+=y[D].clientX,M+=y[D].clientY,D++;return{x:c(P/S),y:c(M/S)}}function rl(y,S,P){return{x:S/y||0,y:P/y||0}}function ol(y,S){return y===S?yn:h(y)>=h(S)?y<0?Ze:Qe:S<0?De:k}function si(y,S,P){P||(P=nl);var M=S[P[0]]-y[P[0]],D=S[P[1]]-y[P[1]];return Math.sqrt(M*M+D*D)}function Uo(y,S,P){P||(P=nl);var M=S[P[0]]-y[P[0]],D=S[P[1]]-y[P[1]];return Math.atan2(D,M)*180/Math.PI}function C2(y,S){return Uo(S[1],S[0],ni)+Uo(y[1],y[0],ni)}function T2(y,S){return si(S[0],S[1],ni)/si(y[0],y[1],ni)}var E2={mousedown:pt,mousemove:ie,mouseup:rt},P2="mousedown",M2="mousemove mouseup";function ii(){this.evEl=P2,this.evWin=M2,this.pressed=!1,qt.apply(this,arguments)}g(ii,qt,{handler:function(S){var P=E2[S.type];P&pt&&S.button===0&&(this.pressed=!0),P&ie&&S.which!==1&&(P=rt),this.pressed&&(P&rt&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:ee,srcEvent:S}))}});var A2={pointerdown:pt,pointermove:ie,pointerup:rt,pointercancel:Ct,pointerout:Ct},k2={2:H,3:kt,4:ee,5:ti},al="pointerdown",cl="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(al="MSPointerDown",cl="MSPointerMove MSPointerUp MSPointerCancel");function $o(){this.evEl=al,this.evWin=cl,qt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}g($o,qt,{handler:function(S){var P=this.store,M=!1,D=S.type.toLowerCase().replace("ms",""),z=A2[D],G=k2[S.pointerType]||S.pointerType,gt=G==H,wt=V(P,S.pointerId,"pointerId");z&pt&&(S.button===0||gt)?wt<0&&(P.push(S),wt=P.length-1):z&(rt|Ct)&&(M=!0),!(wt<0)&&(P[wt]=S,this.callback(this.manager,z,{pointers:P,changedPointers:[S],pointerType:G,srcEvent:S}),M&&P.splice(wt,1))}});var I2={touchstart:pt,touchmove:ie,touchend:rt,touchcancel:Ct},D2="touchstart",R2="touchstart touchmove touchend touchcancel";function hl(){this.evTarget=D2,this.evWin=R2,this.started=!1,qt.apply(this,arguments)}g(hl,qt,{handler:function(S){var P=I2[S.type];if(P===pt&&(this.started=!0),!!this.started){var M=L2.call(this,S,P);P&(rt|Ct)&&M[0].length-M[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}}});function L2(y,S){var P=W(y.touches),M=W(y.changedTouches);return S&(rt|Ct)&&(P=et(P.concat(M),"identifier",!0)),[P,M]}var O2={touchstart:pt,touchmove:ie,touchend:rt,touchcancel:Ct},z2="touchstart touchmove touchend touchcancel";function ri(){this.evTarget=z2,this.targetIds={},qt.apply(this,arguments)}g(ri,qt,{handler:function(S){var P=O2[S.type],M=F2.call(this,S,P);M&&this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}});function F2(y,S){var P=W(y.touches),M=this.targetIds;if(S&(pt|ie)&&P.length===1)return M[P[0].identifier]=!0,[P,P];var D,z,G=W(y.changedTouches),gt=[],wt=this.target;if(z=P.filter(function(It){return F(It.target,wt)}),S===pt)for(D=0;D<z.length;)M[z[D].identifier]=!0,D++;for(D=0;D<G.length;)M[G[D].identifier]&>.push(G[D]),S&(rt|Ct)&&delete M[G[D].identifier],D++;if(gt.length)return[et(z.concat(gt),"identifier",!0),gt]}var B2=2500,ul=25;function Vo(){qt.apply(this,arguments);var y=v(this.handler,this);this.touch=new ri(this.manager,y),this.mouse=new ii(this.manager,y),this.primaryTouch=null,this.lastTouches=[]}g(Vo,qt,{handler:function(S,P,M){var D=M.pointerType==H,z=M.pointerType==ee;if(!(z&&M.sourceCapabilities&&M.sourceCapabilities.firesTouchEvents)){if(D)N2.call(this,P,M);else if(z&&Y2.call(this,M))return;this.callback(S,P,M)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function N2(y,S){y&pt?(this.primaryTouch=S.changedPointers[0].identifier,ll.call(this,S)):y&(rt|Ct)&&ll.call(this,S)}function ll(y){var S=y.changedPointers[0];if(S.identifier===this.primaryTouch){var P={x:S.clientX,y:S.clientY};this.lastTouches.push(P);var M=this.lastTouches,D=function(){var z=M.indexOf(P);z>-1&&M.splice(z,1)};setTimeout(D,B2)}}function Y2(y){for(var S=y.srcEvent.clientX,P=y.srcEvent.clientY,M=0;M<this.lastTouches.length;M++){var D=this.lastTouches[M],z=Math.abs(S-D.x),G=Math.abs(P-D.y);if(z<=ul&&G<=ul)return!0}return!1}var fl=Z(o.style,"touchAction"),dl=fl!==i,ml="compute",pl="auto",Go="manipulation",tn="none",Qn="pan-x",Kn="pan-y",oi=U2();function qo(y,S){this.manager=y,this.set(S)}qo.prototype={set:function(y){y==ml&&(y=this.compute()),dl&&this.manager.element.style&&oi[y]&&(this.manager.element.style[fl]=y),this.actions=y.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var y=[];return f(this.manager.recognizers,function(S){_(S.options.enable,[S])&&(y=y.concat(S.getTouchAction()))}),X2(y.join(" "))},preventDefaults:function(y){var S=y.srcEvent,P=y.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var M=this.actions,D=N(M,tn)&&!oi[tn],z=N(M,Kn)&&!oi[Kn],G=N(M,Qn)&&!oi[Qn];if(D){var gt=y.pointers.length===1,wt=y.distance<2,It=y.deltaTime<250;if(gt&&wt&&It)return}if(!(G&&z)&&(D||z&&P&at||G&&P&Ke))return this.preventSrc(S)},preventSrc:function(y){this.manager.session.prevented=!0,y.preventDefault()}};function X2(y){if(N(y,tn))return tn;var S=N(y,Qn),P=N(y,Kn);return S&&P?tn:S||P?S?Qn:Kn:N(y,Go)?Go:pl}function U2(){if(!dl)return!1;var y={},S=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){y[P]=S?t.CSS.supports("touch-action",P):!0}),y}var ai=1,jt=2,wn=4,Re=8,pe=Re,ts=16,re=32;function ge(y){this.options=w({},this.defaults,y||{}),this.id=mt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=ai,this.simultaneous={},this.requireFail=[]}ge.prototype={defaults:{},set:function(y){return w(this.options,y),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(y){if(d(y,"recognizeWith",this))return this;var S=this.simultaneous;return y=ci(y,this),S[y.id]||(S[y.id]=y,y.recognizeWith(this)),this},dropRecognizeWith:function(y){return d(y,"dropRecognizeWith",this)?this:(y=ci(y,this),delete this.simultaneous[y.id],this)},requireFailure:function(y){if(d(y,"requireFailure",this))return this;var S=this.requireFail;return y=ci(y,this),V(S,y)===-1&&(S.push(y),y.requireFailure(this)),this},dropRequireFailure:function(y){if(d(y,"dropRequireFailure",this))return this;y=ci(y,this);var S=V(this.requireFail,y);return S>-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(y){return!!this.simultaneous[y.id]},emit:function(y){var S=this,P=this.state;function M(D){S.manager.emit(D,y)}P<Re&&M(S.options.event+gl(P)),M(S.options.event),y.additionalEvent&&M(y.additionalEvent),P>=Re&&M(S.options.event+gl(P))},tryEmit:function(y){if(this.canEmit())return this.emit(y);this.state=re},canEmit:function(){for(var y=0;y<this.requireFail.length;){if(!(this.requireFail[y].state&(re|ai)))return!1;y++}return!0},recognize:function(y){var S=w({},y);if(!_(this.options.enable,[this,S])){this.reset(),this.state=re;return}this.state&(pe|ts|re)&&(this.state=ai),this.state=this.process(S),this.state&(jt|wn|Re|ts)&&this.tryEmit(S)},process:function(y){},getTouchAction:function(){},reset:function(){}};function gl(y){return y&ts?"cancel":y&Re?"end":y&wn?"move":y&jt?"start":""}function yl(y){return y==k?"down":y==De?"up":y==Ze?"left":y==Qe?"right":""}function ci(y,S){var P=S.manager;return P?P.get(y):y}function ne(){ge.apply(this,arguments)}g(ne,ge,{defaults:{pointers:1},attrTest:function(y){var S=this.options.pointers;return S===0||y.pointers.length===S},process:function(y){var S=this.state,P=y.eventType,M=S&(jt|wn),D=this.attrTest(y);return M&&(P&Ct||!D)?S|ts:M||D?P&rt?S|Re:S&jt?S|wn:jt:re}});function hi(){ne.apply(this,arguments),this.pX=null,this.pY=null}g(hi,ne,{defaults:{event:"pan",threshold:10,pointers:1,direction:el},getTouchAction:function(){var y=this.options.direction,S=[];return y&at&&S.push(Kn),y&Ke&&S.push(Qn),S},directionTest:function(y){var S=this.options,P=!0,M=y.distance,D=y.direction,z=y.deltaX,G=y.deltaY;return D&S.direction||(S.direction&at?(D=z===0?yn:z<0?Ze:Qe,P=z!=this.pX,M=Math.abs(y.deltaX)):(D=G===0?yn:G<0?De:k,P=G!=this.pY,M=Math.abs(y.deltaY))),y.direction=D,P&&M>S.threshold&&D&S.direction},attrTest:function(y){return ne.prototype.attrTest.call(this,y)&&(this.state&jt||!(this.state&jt)&&this.directionTest(y))},emit:function(y){this.pX=y.deltaX,this.pY=y.deltaY;var S=yl(y.direction);S&&(y.additionalEvent=this.options.event+S),this._super.emit.call(this,y)}});function jo(){ne.apply(this,arguments)}g(jo,ne,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[tn]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.scale-1)>this.options.threshold||this.state&jt)},emit:function(y){if(y.scale!==1){var S=y.scale<1?"in":"out";y.additionalEvent=this.options.event+S}this._super.emit.call(this,y)}});function Ho(){ge.apply(this,arguments),this._timer=null,this._input=null}g(Ho,ge,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[pl]},process:function(y){var S=this.options,P=y.pointers.length===S.pointers,M=y.distance<S.threshold,D=y.deltaTime>S.time;if(this._input=y,!M||!P||y.eventType&(rt|Ct)&&!D)this.reset();else if(y.eventType&pt)this.reset(),this._timer=l(function(){this.state=pe,this.tryEmit()},S.time,this);else if(y.eventType&rt)return pe;return re},reset:function(){clearTimeout(this._timer)},emit:function(y){this.state===pe&&(y&&y.eventType&rt?this.manager.emit(this.options.event+"up",y):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function Wo(){ne.apply(this,arguments)}g(Wo,ne,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[tn]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.rotation)>this.options.threshold||this.state&jt)}});function Jo(){ne.apply(this,arguments)}g(Jo,ne,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:at|Ke,pointers:1},getTouchAction:function(){return hi.prototype.getTouchAction.call(this)},attrTest:function(y){var S=this.options.direction,P;return S&(at|Ke)?P=y.overallVelocity:S&at?P=y.overallVelocityX:S&Ke&&(P=y.overallVelocityY),this._super.attrTest.call(this,y)&&S&y.offsetDirection&&y.distance>this.options.threshold&&y.maxPointers==this.options.pointers&&h(P)>this.options.velocity&&y.eventType&rt},emit:function(y){var S=yl(y.offsetDirection);S&&this.manager.emit(this.options.event+S,y),this.manager.emit(this.options.event,y)}});function ui(){ge.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}g(ui,ge,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Go]},process:function(y){var S=this.options,P=y.pointers.length===S.pointers,M=y.distance<S.threshold,D=y.deltaTime<S.time;if(this.reset(),y.eventType&pt&&this.count===0)return this.failTimeout();if(M&&D&&P){if(y.eventType!=rt)return this.failTimeout();var z=this.pTime?y.timeStamp-this.pTime<S.interval:!0,G=!this.pCenter||si(this.pCenter,y.center)<S.posThreshold;this.pTime=y.timeStamp,this.pCenter=y.center,!G||!z?this.count=1:this.count+=1,this._input=y;var gt=this.count%S.taps;if(gt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=pe,this.tryEmit()},S.interval,this),jt):pe}return re},failTimeout:function(){return this._timer=l(function(){this.state=re},this.options.interval,this),re},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==pe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ye(y,S){return S=S||{},S.recognizers=E(S.recognizers,ye.defaults.preset),new Zo(y,S)}ye.VERSION="2.0.7",ye.defaults={domEvents:!1,touchAction:ml,enable:!0,inputTarget:null,inputClass:null,preset:[[Wo,{enable:!1}],[jo,{enable:!1},["rotate"]],[Jo,{direction:at}],[hi,{direction:at},["swipe"]],[ui],[ui,{event:"doubletap",taps:2},["tap"]],[Ho]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var $2=1,wl=2;function Zo(y,S){this.options=w({},ye.defaults,S||{}),this.options.inputTarget=this.options.inputTarget||y,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=y,this.input=b2(this),this.touchAction=new qo(this,this.options.touchAction),bl(this,!0),f(this.options.recognizers,function(P){var M=this.add(new P[0](P[1]));P[2]&&M.recognizeWith(P[2]),P[3]&&M.requireFailure(P[3])},this)}Zo.prototype={set:function(y){return w(this.options,y),y.touchAction&&this.touchAction.update(),y.inputTarget&&(this.input.destroy(),this.input.target=y.inputTarget,this.input.init()),this},stop:function(y){this.session.stopped=y?wl:$2},recognize:function(y){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(y);var P,M=this.recognizers,D=S.curRecognizer;(!D||D&&D.state&pe)&&(D=S.curRecognizer=null);for(var z=0;z<M.length;)P=M[z],S.stopped!==wl&&(!D||P==D||P.canRecognizeWith(D))?P.recognize(y):P.reset(),!D&&P.state&(jt|wn|Re)&&(D=S.curRecognizer=P),z++}},get:function(y){if(y instanceof ge)return y;for(var S=this.recognizers,P=0;P<S.length;P++)if(S[P].options.event==y)return S[P];return null},add:function(y){if(d(y,"add",this))return this;var S=this.get(y.options.event);return S&&this.remove(S),this.recognizers.push(y),y.manager=this,this.touchAction.update(),y},remove:function(y){if(d(y,"remove",this))return this;if(y=this.get(y),y){var S=this.recognizers,P=V(S,y);P!==-1&&(S.splice(P,1),this.touchAction.update())}return this},on:function(y,S){if(y!==i&&S!==i){var P=this.handlers;return f($(y),function(M){P[M]=P[M]||[],P[M].push(S)}),this}},off:function(y,S){if(y!==i){var P=this.handlers;return f($(y),function(M){S?P[M]&&P[M].splice(V(P[M],S),1):delete P[M]}),this}},emit:function(y,S){this.options.domEvents&&V2(y,S);var P=this.handlers[y]&&this.handlers[y].slice();if(!(!P||!P.length)){S.type=y,S.preventDefault=function(){S.srcEvent.preventDefault()};for(var M=0;M<P.length;)P[M](S),M++}},destroy:function(){this.element&&bl(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function bl(y,S){var P=y.element;if(P.style){var M;f(y.options.cssProps,function(D,z){M=Z(P.style,z),S?(y.oldCssProps[M]=P.style[M],P.style[M]=D):P.style[M]=y.oldCssProps[M]||""}),S||(y.oldCssProps={})}}function V2(y,S){var P=e.createEvent("Event");P.initEvent(y,!0,!0),P.gesture=S,S.target.dispatchEvent(P)}w(ye,{INPUT_START:pt,INPUT_MOVE:ie,INPUT_END:rt,INPUT_CANCEL:Ct,STATE_POSSIBLE:ai,STATE_BEGAN:jt,STATE_CHANGED:wn,STATE_ENDED:Re,STATE_RECOGNIZED:pe,STATE_CANCELLED:ts,STATE_FAILED:re,DIRECTION_NONE:yn,DIRECTION_LEFT:Ze,DIRECTION_RIGHT:Qe,DIRECTION_UP:De,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:at,DIRECTION_VERTICAL:Ke,DIRECTION_ALL:el,Manager:Zo,Input:qt,TouchAction:qo,TouchInput:ri,MouseInput:ii,PointerEventInput:$o,TouchMouseInput:Vo,SingleTouchInput:hl,Recognizer:ge,AttrRecognizer:ne,Tap:ui,Pan:hi,Swipe:Jo,Pinch:jo,Rotate:Wo,Press:Ho,on:C,off:I,each:f,merge:b,extend:x,assign:w,inherit:g,bindFn:v,prefixed:Z});var G2=typeof t<"u"?t:typeof self<"u"?self:{};G2.Hammer=ye,typeof i=="function"&&i.amd?i(function(){return ye}):s.exports?s.exports=ye:t[n]=ye})(window,document,"Hammer")})(gc);var om=gc.exports;const nt=ka(om);var Zi=function(s,t){return Zi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Zi(s,t)};function xe(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zi(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function am(s,t,e,n){function i(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(u){try{h(n.next(u))}catch(l){o(l)}}function c(u){try{h(n.throw(u))}catch(l){o(l)}}function h(u){u.done?r(u.value):i(u.value).then(a,c)}h((n=n.apply(s,t||[])).next())})}function yc(s,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(h){return function(u){return c([h,u])}}function c(h){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(n=1,i&&(r=h[0]&2?i.return:h[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,h[1])).done)return r;switch(i=0,r&&(h=[h[0]&2,r.value]),h[0]){case 0:case 1:r=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,i=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!r||h[1]>r[0]&&h[1]<r[3])){e.label=h[1];break}if(h[0]===6&&e.label<r[1]){e.label=r[1],r=h;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(h);break}r[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(s,e)}catch(u){h=[6,u],i=0}finally{n=r=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function Fe(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ve(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Be(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function on(s){return this instanceof on?(this.v=s,this):new on(s)}function cm(s,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(s,t||[]),i,r=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(f){return function(p){return Promise.resolve(p).then(f,l)}}function a(f,p){n[f]&&(i[f]=function(w){return new Promise(function(x,b){r.push([f,w,x,b])>1||c(f,w)})},p&&(i[f]=p(i[f])))}function c(f,p){try{h(n[f](p))}catch(w){d(r[0][3],w)}}function h(f){f.value instanceof on?Promise.resolve(f.value.v).then(u,l):d(r[0][2],f)}function u(f){c("next",f)}function l(f){c("throw",f)}function d(f,p){f(p),r.shift(),r.length&&c(r[0][0],r[0][1])}}function hm(s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=s[Symbol.asyncIterator],e;return t?t.call(s):(s=typeof Fe=="function"?Fe(s):s[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=s[r]&&function(o){return new Promise(function(a,c){o=s[r](o),i(a,c,o.done,o.value)})}}function i(r,o,a,c){Promise.resolve(c).then(function(h){r({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function q(s){return typeof s=="function"}function Qi(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ki=Qi(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
23
|
+
`;return function(){var D=new Error("get-stack-trace"),z=D&&D.stack?D.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",G=t.console&&(t.console.warn||t.console.log);return G&&G.call(t.console,M,z),y.apply(this,arguments)}}var w;typeof Object.assign!="function"?w=function(S){if(S===i||S===null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(S),M=1;M<arguments.length;M++){var D=arguments[M];if(D!==i&&D!==null)for(var z in D)D.hasOwnProperty(z)&&(P[z]=D[z])}return P}:w=Object.assign;var x=p(function(S,P,M){for(var D=Object.keys(P),z=0;z<D.length;)(!M||M&&S[D[z]]===i)&&(S[D[z]]=P[D[z]]),z++;return S},"extend","Use `assign`."),b=p(function(S,P){return x(S,P,!0)},"merge","Use `assign`.");function g(y,S,P){var M=S.prototype,D;D=y.prototype=Object.create(M),D.constructor=y,D._super=M,P&&w(D,P)}function v(y,S){return function(){return y.apply(S,arguments)}}function _(y,S){return typeof y==a?y.apply(S&&S[0]||i,S):y}function E(y,S){return y===i?S:y}function C(y,S,P){f($(S),function(M){y.addEventListener(M,P,!1)})}function I(y,S,P){f($(S),function(M){y.removeEventListener(M,P,!1)})}function F(y,S){for(;y;){if(y==S)return!0;y=y.parentNode}return!1}function B(y,S){return y.indexOf(S)>-1}function $(y){return y.trim().split(/\s+/g)}function V(y,S,P){if(y.indexOf&&!P)return y.indexOf(S);for(var M=0;M<y.length;){if(P&&y[M][P]==S||!P&&y[M]===S)return M;M++}return-1}function W(y){return Array.prototype.slice.call(y,0)}function et(y,S,P){for(var M=[],D=[],z=0;z<y.length;){var G=S?y[z][S]:y[z];V(D,G)<0&&M.push(y[z]),D[z]=G,z++}return P&&(S?M=M.sort(function(wt,Dt){return wt[S]>Dt[S]}):M=M.sort()),M}function Z(y,S){for(var P,M,D=S[0].toUpperCase()+S.slice(1),z=0;z<r.length;){if(P=r[z],M=P?P+D:S,M in y)return M;z++}return i}var Gt=1;function mt(){return Gt++}function kt(y){var S=y.ownerDocument||y;return S.defaultView||S.parentWindow||t}var Ot=/mobile|tablet|ip(ad|hone|od)|android/i,L="ontouchstart"in t,R=Z(t,"PointerEvent")!==i,U=L&&Ot.test(navigator.userAgent),H="touch",It="pen",ee="mouse",ti="kinect",ei=25,pt=1,ie=2,rt=4,Ct=8,gn=1,Je=2,Ze=4,Ie=8,k=16,at=Je|Ze,Qe=Ie|k,sl=at|Qe,il=["x","y"],ni=["clientX","clientY"];function qt(y,S){var P=this;this.manager=y,this.callback=S,this.element=y.element,this.target=y.options.inputTarget,this.domHandler=function(M){_(y.options.enable,[y])&&P.handler(M)},this.init()}qt.prototype={handler:function(){},init:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(kt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(kt(this.element),this.evWin,this.domHandler)}};function C2(y){var S,P=y.options.inputClass;return P?S=P:R?S=qo:U?S=ri:L?S=jo:S=ii,new S(y,T2)}function T2(y,S,P){var M=P.pointers.length,D=P.changedPointers.length,z=S&pt&&M-D===0,G=S&(rt|Ct)&&M-D===0;P.isFirst=!!z,P.isFinal=!!G,z&&(y.session={}),P.eventType=S,E2(y,P),y.emit("hammer.input",P),y.recognize(P),y.session.prevInput=P}function E2(y,S){var P=y.session,M=S.pointers,D=M.length;P.firstInput||(P.firstInput=rl(S)),D>1&&!P.firstMultiple?P.firstMultiple=rl(S):D===1&&(P.firstMultiple=!1);var z=P.firstInput,G=P.firstMultiple,gt=G?G.center:z.center,wt=S.center=ol(M);S.timeStamp=u(),S.deltaTime=S.timeStamp-z.timeStamp,S.angle=Go(gt,wt),S.distance=si(gt,wt),P2(P,S),S.offsetDirection=cl(S.deltaX,S.deltaY);var Dt=al(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=Dt.x,S.overallVelocityY=Dt.y,S.overallVelocity=h(Dt.x)>h(Dt.y)?Dt.x:Dt.y,S.scale=G?k2(G.pointers,M):1,S.rotation=G?A2(G.pointers,M):0,S.maxPointers=P.prevInput?S.pointers.length>P.prevInput.maxPointers?S.pointers.length:P.prevInput.maxPointers:S.pointers.length,M2(P,S);var oe=y.element;F(S.srcEvent.target,oe)&&(oe=S.srcEvent.target),S.target=oe}function P2(y,S){var P=S.center,M=y.offsetDelta||{},D=y.prevDelta||{},z=y.prevInput||{};(S.eventType===pt||z.eventType===rt)&&(D=y.prevDelta={x:z.deltaX||0,y:z.deltaY||0},M=y.offsetDelta={x:P.x,y:P.y}),S.deltaX=D.x+(P.x-M.x),S.deltaY=D.y+(P.y-M.y)}function M2(y,S){var P=y.lastInterval||S,M=S.timeStamp-P.timeStamp,D,z,G,gt;if(S.eventType!=Ct&&(M>ei||P.velocity===i)){var wt=S.deltaX-P.deltaX,Dt=S.deltaY-P.deltaY,oe=al(M,wt,Dt);z=oe.x,G=oe.y,D=h(oe.x)>h(oe.y)?oe.x:oe.y,gt=cl(wt,Dt),y.lastInterval=S}else D=P.velocity,z=P.velocityX,G=P.velocityY,gt=P.direction;S.velocity=D,S.velocityX=z,S.velocityY=G,S.direction=gt}function rl(y){for(var S=[],P=0;P<y.pointers.length;)S[P]={clientX:c(y.pointers[P].clientX),clientY:c(y.pointers[P].clientY)},P++;return{timeStamp:u(),pointers:S,center:ol(S),deltaX:y.deltaX,deltaY:y.deltaY}}function ol(y){var S=y.length;if(S===1)return{x:c(y[0].clientX),y:c(y[0].clientY)};for(var P=0,M=0,D=0;D<S;)P+=y[D].clientX,M+=y[D].clientY,D++;return{x:c(P/S),y:c(M/S)}}function al(y,S,P){return{x:S/y||0,y:P/y||0}}function cl(y,S){return y===S?gn:h(y)>=h(S)?y<0?Je:Ze:S<0?Ie:k}function si(y,S,P){P||(P=il);var M=S[P[0]]-y[P[0]],D=S[P[1]]-y[P[1]];return Math.sqrt(M*M+D*D)}function Go(y,S,P){P||(P=il);var M=S[P[0]]-y[P[0]],D=S[P[1]]-y[P[1]];return Math.atan2(D,M)*180/Math.PI}function A2(y,S){return Go(S[1],S[0],ni)+Go(y[1],y[0],ni)}function k2(y,S){return si(S[0],S[1],ni)/si(y[0],y[1],ni)}var I2={mousedown:pt,mousemove:ie,mouseup:rt},D2="mousedown",R2="mousemove mouseup";function ii(){this.evEl=D2,this.evWin=R2,this.pressed=!1,qt.apply(this,arguments)}g(ii,qt,{handler:function(S){var P=I2[S.type];P&pt&&S.button===0&&(this.pressed=!0),P&ie&&S.which!==1&&(P=rt),this.pressed&&(P&rt&&(this.pressed=!1),this.callback(this.manager,P,{pointers:[S],changedPointers:[S],pointerType:ee,srcEvent:S}))}});var L2={pointerdown:pt,pointermove:ie,pointerup:rt,pointercancel:Ct,pointerout:Ct},O2={2:H,3:It,4:ee,5:ti},hl="pointerdown",ul="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(hl="MSPointerDown",ul="MSPointerMove MSPointerUp MSPointerCancel");function qo(){this.evEl=hl,this.evWin=ul,qt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}g(qo,qt,{handler:function(S){var P=this.store,M=!1,D=S.type.toLowerCase().replace("ms",""),z=L2[D],G=O2[S.pointerType]||S.pointerType,gt=G==H,wt=V(P,S.pointerId,"pointerId");z&pt&&(S.button===0||gt)?wt<0&&(P.push(S),wt=P.length-1):z&(rt|Ct)&&(M=!0),!(wt<0)&&(P[wt]=S,this.callback(this.manager,z,{pointers:P,changedPointers:[S],pointerType:G,srcEvent:S}),M&&P.splice(wt,1))}});var z2={touchstart:pt,touchmove:ie,touchend:rt,touchcancel:Ct},F2="touchstart",N2="touchstart touchmove touchend touchcancel";function ll(){this.evTarget=F2,this.evWin=N2,this.started=!1,qt.apply(this,arguments)}g(ll,qt,{handler:function(S){var P=z2[S.type];if(P===pt&&(this.started=!0),!!this.started){var M=B2.call(this,S,P);P&(rt|Ct)&&M[0].length-M[1].length===0&&(this.started=!1),this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}}});function B2(y,S){var P=W(y.touches),M=W(y.changedTouches);return S&(rt|Ct)&&(P=et(P.concat(M),"identifier",!0)),[P,M]}var Y2={touchstart:pt,touchmove:ie,touchend:rt,touchcancel:Ct},U2="touchstart touchmove touchend touchcancel";function ri(){this.evTarget=U2,this.targetIds={},qt.apply(this,arguments)}g(ri,qt,{handler:function(S){var P=Y2[S.type],M=X2.call(this,S,P);M&&this.callback(this.manager,P,{pointers:M[0],changedPointers:M[1],pointerType:H,srcEvent:S})}});function X2(y,S){var P=W(y.touches),M=this.targetIds;if(S&(pt|ie)&&P.length===1)return M[P[0].identifier]=!0,[P,P];var D,z,G=W(y.changedTouches),gt=[],wt=this.target;if(z=P.filter(function(Dt){return F(Dt.target,wt)}),S===pt)for(D=0;D<z.length;)M[z[D].identifier]=!0,D++;for(D=0;D<G.length;)M[G[D].identifier]&>.push(G[D]),S&(rt|Ct)&&delete M[G[D].identifier],D++;if(gt.length)return[et(z.concat(gt),"identifier",!0),gt]}var $2=2500,fl=25;function jo(){qt.apply(this,arguments);var y=v(this.handler,this);this.touch=new ri(this.manager,y),this.mouse=new ii(this.manager,y),this.primaryTouch=null,this.lastTouches=[]}g(jo,qt,{handler:function(S,P,M){var D=M.pointerType==H,z=M.pointerType==ee;if(!(z&&M.sourceCapabilities&&M.sourceCapabilities.firesTouchEvents)){if(D)V2.call(this,P,M);else if(z&&G2.call(this,M))return;this.callback(S,P,M)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function V2(y,S){y&pt?(this.primaryTouch=S.changedPointers[0].identifier,dl.call(this,S)):y&(rt|Ct)&&dl.call(this,S)}function dl(y){var S=y.changedPointers[0];if(S.identifier===this.primaryTouch){var P={x:S.clientX,y:S.clientY};this.lastTouches.push(P);var M=this.lastTouches,D=function(){var z=M.indexOf(P);z>-1&&M.splice(z,1)};setTimeout(D,$2)}}function G2(y){for(var S=y.srcEvent.clientX,P=y.srcEvent.clientY,M=0;M<this.lastTouches.length;M++){var D=this.lastTouches[M],z=Math.abs(S-D.x),G=Math.abs(P-D.y);if(z<=fl&&G<=fl)return!0}return!1}var ml=Z(o.style,"touchAction"),pl=ml!==i,gl="compute",yl="auto",Ho="manipulation",Ke="none",Qn="pan-x",Kn="pan-y",oi=j2();function Wo(y,S){this.manager=y,this.set(S)}Wo.prototype={set:function(y){y==gl&&(y=this.compute()),pl&&this.manager.element.style&&oi[y]&&(this.manager.element.style[ml]=y),this.actions=y.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var y=[];return f(this.manager.recognizers,function(S){_(S.options.enable,[S])&&(y=y.concat(S.getTouchAction()))}),q2(y.join(" "))},preventDefaults:function(y){var S=y.srcEvent,P=y.offsetDirection;if(this.manager.session.prevented){S.preventDefault();return}var M=this.actions,D=B(M,Ke)&&!oi[Ke],z=B(M,Kn)&&!oi[Kn],G=B(M,Qn)&&!oi[Qn];if(D){var gt=y.pointers.length===1,wt=y.distance<2,Dt=y.deltaTime<250;if(gt&&wt&&Dt)return}if(!(G&&z)&&(D||z&&P&at||G&&P&Qe))return this.preventSrc(S)},preventSrc:function(y){this.manager.session.prevented=!0,y.preventDefault()}};function q2(y){if(B(y,Ke))return Ke;var S=B(y,Qn),P=B(y,Kn);return S&&P?Ke:S||P?S?Qn:Kn:B(y,Ho)?Ho:yl}function j2(){if(!pl)return!1;var y={},S=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(P){y[P]=S?t.CSS.supports("touch-action",P):!0}),y}var ai=1,jt=2,yn=4,De=8,pe=De,ts=16,re=32;function ge(y){this.options=w({},this.defaults,y||{}),this.id=mt(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=ai,this.simultaneous={},this.requireFail=[]}ge.prototype={defaults:{},set:function(y){return w(this.options,y),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(y){if(d(y,"recognizeWith",this))return this;var S=this.simultaneous;return y=ci(y,this),S[y.id]||(S[y.id]=y,y.recognizeWith(this)),this},dropRecognizeWith:function(y){return d(y,"dropRecognizeWith",this)?this:(y=ci(y,this),delete this.simultaneous[y.id],this)},requireFailure:function(y){if(d(y,"requireFailure",this))return this;var S=this.requireFail;return y=ci(y,this),V(S,y)===-1&&(S.push(y),y.requireFailure(this)),this},dropRequireFailure:function(y){if(d(y,"dropRequireFailure",this))return this;y=ci(y,this);var S=V(this.requireFail,y);return S>-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(y){return!!this.simultaneous[y.id]},emit:function(y){var S=this,P=this.state;function M(D){S.manager.emit(D,y)}P<De&&M(S.options.event+wl(P)),M(S.options.event),y.additionalEvent&&M(y.additionalEvent),P>=De&&M(S.options.event+wl(P))},tryEmit:function(y){if(this.canEmit())return this.emit(y);this.state=re},canEmit:function(){for(var y=0;y<this.requireFail.length;){if(!(this.requireFail[y].state&(re|ai)))return!1;y++}return!0},recognize:function(y){var S=w({},y);if(!_(this.options.enable,[this,S])){this.reset(),this.state=re;return}this.state&(pe|ts|re)&&(this.state=ai),this.state=this.process(S),this.state&(jt|yn|De|ts)&&this.tryEmit(S)},process:function(y){},getTouchAction:function(){},reset:function(){}};function wl(y){return y&ts?"cancel":y&De?"end":y&yn?"move":y&jt?"start":""}function bl(y){return y==k?"down":y==Ie?"up":y==Je?"left":y==Ze?"right":""}function ci(y,S){var P=S.manager;return P?P.get(y):y}function ne(){ge.apply(this,arguments)}g(ne,ge,{defaults:{pointers:1},attrTest:function(y){var S=this.options.pointers;return S===0||y.pointers.length===S},process:function(y){var S=this.state,P=y.eventType,M=S&(jt|yn),D=this.attrTest(y);return M&&(P&Ct||!D)?S|ts:M||D?P&rt?S|De:S&jt?S|yn:jt:re}});function hi(){ne.apply(this,arguments),this.pX=null,this.pY=null}g(hi,ne,{defaults:{event:"pan",threshold:10,pointers:1,direction:sl},getTouchAction:function(){var y=this.options.direction,S=[];return y&at&&S.push(Kn),y&Qe&&S.push(Qn),S},directionTest:function(y){var S=this.options,P=!0,M=y.distance,D=y.direction,z=y.deltaX,G=y.deltaY;return D&S.direction||(S.direction&at?(D=z===0?gn:z<0?Je:Ze,P=z!=this.pX,M=Math.abs(y.deltaX)):(D=G===0?gn:G<0?Ie:k,P=G!=this.pY,M=Math.abs(y.deltaY))),y.direction=D,P&&M>S.threshold&&D&S.direction},attrTest:function(y){return ne.prototype.attrTest.call(this,y)&&(this.state&jt||!(this.state&jt)&&this.directionTest(y))},emit:function(y){this.pX=y.deltaX,this.pY=y.deltaY;var S=bl(y.direction);S&&(y.additionalEvent=this.options.event+S),this._super.emit.call(this,y)}});function Jo(){ne.apply(this,arguments)}g(Jo,ne,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ke]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.scale-1)>this.options.threshold||this.state&jt)},emit:function(y){if(y.scale!==1){var S=y.scale<1?"in":"out";y.additionalEvent=this.options.event+S}this._super.emit.call(this,y)}});function Zo(){ge.apply(this,arguments),this._timer=null,this._input=null}g(Zo,ge,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[yl]},process:function(y){var S=this.options,P=y.pointers.length===S.pointers,M=y.distance<S.threshold,D=y.deltaTime>S.time;if(this._input=y,!M||!P||y.eventType&(rt|Ct)&&!D)this.reset();else if(y.eventType&pt)this.reset(),this._timer=l(function(){this.state=pe,this.tryEmit()},S.time,this);else if(y.eventType&rt)return pe;return re},reset:function(){clearTimeout(this._timer)},emit:function(y){this.state===pe&&(y&&y.eventType&rt?this.manager.emit(this.options.event+"up",y):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function Qo(){ne.apply(this,arguments)}g(Qo,ne,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ke]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.rotation)>this.options.threshold||this.state&jt)}});function Ko(){ne.apply(this,arguments)}g(Ko,ne,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:at|Qe,pointers:1},getTouchAction:function(){return hi.prototype.getTouchAction.call(this)},attrTest:function(y){var S=this.options.direction,P;return S&(at|Qe)?P=y.overallVelocity:S&at?P=y.overallVelocityX:S&Qe&&(P=y.overallVelocityY),this._super.attrTest.call(this,y)&&S&y.offsetDirection&&y.distance>this.options.threshold&&y.maxPointers==this.options.pointers&&h(P)>this.options.velocity&&y.eventType&rt},emit:function(y){var S=bl(y.offsetDirection);S&&this.manager.emit(this.options.event+S,y),this.manager.emit(this.options.event,y)}});function ui(){ge.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}g(ui,ge,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ho]},process:function(y){var S=this.options,P=y.pointers.length===S.pointers,M=y.distance<S.threshold,D=y.deltaTime<S.time;if(this.reset(),y.eventType&pt&&this.count===0)return this.failTimeout();if(M&&D&&P){if(y.eventType!=rt)return this.failTimeout();var z=this.pTime?y.timeStamp-this.pTime<S.interval:!0,G=!this.pCenter||si(this.pCenter,y.center)<S.posThreshold;this.pTime=y.timeStamp,this.pCenter=y.center,!G||!z?this.count=1:this.count+=1,this._input=y;var gt=this.count%S.taps;if(gt===0)return this.hasRequireFailures()?(this._timer=l(function(){this.state=pe,this.tryEmit()},S.interval,this),jt):pe}return re},failTimeout:function(){return this._timer=l(function(){this.state=re},this.options.interval,this),re},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==pe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ye(y,S){return S=S||{},S.recognizers=E(S.recognizers,ye.defaults.preset),new ta(y,S)}ye.VERSION="2.0.7",ye.defaults={domEvents:!1,touchAction:gl,enable:!0,inputTarget:null,inputClass:null,preset:[[Qo,{enable:!1}],[Jo,{enable:!1},["rotate"]],[Ko,{direction:at}],[hi,{direction:at},["swipe"]],[ui],[ui,{event:"doubletap",taps:2},["tap"]],[Zo]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var H2=1,xl=2;function ta(y,S){this.options=w({},ye.defaults,S||{}),this.options.inputTarget=this.options.inputTarget||y,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=y,this.input=C2(this),this.touchAction=new Wo(this,this.options.touchAction),vl(this,!0),f(this.options.recognizers,function(P){var M=this.add(new P[0](P[1]));P[2]&&M.recognizeWith(P[2]),P[3]&&M.requireFailure(P[3])},this)}ta.prototype={set:function(y){return w(this.options,y),y.touchAction&&this.touchAction.update(),y.inputTarget&&(this.input.destroy(),this.input.target=y.inputTarget,this.input.init()),this},stop:function(y){this.session.stopped=y?xl:H2},recognize:function(y){var S=this.session;if(!S.stopped){this.touchAction.preventDefaults(y);var P,M=this.recognizers,D=S.curRecognizer;(!D||D&&D.state&pe)&&(D=S.curRecognizer=null);for(var z=0;z<M.length;)P=M[z],S.stopped!==xl&&(!D||P==D||P.canRecognizeWith(D))?P.recognize(y):P.reset(),!D&&P.state&(jt|yn|De)&&(D=S.curRecognizer=P),z++}},get:function(y){if(y instanceof ge)return y;for(var S=this.recognizers,P=0;P<S.length;P++)if(S[P].options.event==y)return S[P];return null},add:function(y){if(d(y,"add",this))return this;var S=this.get(y.options.event);return S&&this.remove(S),this.recognizers.push(y),y.manager=this,this.touchAction.update(),y},remove:function(y){if(d(y,"remove",this))return this;if(y=this.get(y),y){var S=this.recognizers,P=V(S,y);P!==-1&&(S.splice(P,1),this.touchAction.update())}return this},on:function(y,S){if(y!==i&&S!==i){var P=this.handlers;return f($(y),function(M){P[M]=P[M]||[],P[M].push(S)}),this}},off:function(y,S){if(y!==i){var P=this.handlers;return f($(y),function(M){S?P[M]&&P[M].splice(V(P[M],S),1):delete P[M]}),this}},emit:function(y,S){this.options.domEvents&&W2(y,S);var P=this.handlers[y]&&this.handlers[y].slice();if(!(!P||!P.length)){S.type=y,S.preventDefault=function(){S.srcEvent.preventDefault()};for(var M=0;M<P.length;)P[M](S),M++}},destroy:function(){this.element&&vl(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function vl(y,S){var P=y.element;if(P.style){var M;f(y.options.cssProps,function(D,z){M=Z(P.style,z),S?(y.oldCssProps[M]=P.style[M],P.style[M]=D):P.style[M]=y.oldCssProps[M]||""}),S||(y.oldCssProps={})}}function W2(y,S){var P=e.createEvent("Event");P.initEvent(y,!0,!0),P.gesture=S,S.target.dispatchEvent(P)}w(ye,{INPUT_START:pt,INPUT_MOVE:ie,INPUT_END:rt,INPUT_CANCEL:Ct,STATE_POSSIBLE:ai,STATE_BEGAN:jt,STATE_CHANGED:yn,STATE_ENDED:De,STATE_RECOGNIZED:pe,STATE_CANCELLED:ts,STATE_FAILED:re,DIRECTION_NONE:gn,DIRECTION_LEFT:Je,DIRECTION_RIGHT:Ze,DIRECTION_UP:Ie,DIRECTION_DOWN:k,DIRECTION_HORIZONTAL:at,DIRECTION_VERTICAL:Qe,DIRECTION_ALL:sl,Manager:ta,Input:qt,TouchAction:Wo,TouchInput:ri,MouseInput:ii,PointerEventInput:qo,TouchMouseInput:jo,SingleTouchInput:ll,Recognizer:ge,AttrRecognizer:ne,Tap:ui,Pan:hi,Swipe:Ko,Pinch:Jo,Rotate:Qo,Press:Zo,on:C,off:I,each:f,merge:b,extend:x,assign:w,inherit:g,bindFn:v,prefixed:Z});var J2=typeof t<"u"?t:typeof self<"u"?self:{};J2.Hammer=ye,typeof i=="function"&&i.amd?i(function(){return ye}):s.exports?s.exports=ye:t[n]=ye})(window,document,"Hammer")})(wc);var lm=wc.exports;const nt=Da(lm);var tr=function(s,t){return tr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},tr(s,t)};function be(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");tr(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function fm(s,t,e,n){function i(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(u){try{h(n.next(u))}catch(l){o(l)}}function c(u){try{h(n.throw(u))}catch(l){o(l)}}function h(u){u.done?r(u.value):i(u.value).then(a,c)}h((n=n.apply(s,t||[])).next())})}function bc(s,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(h){return function(u){return c([h,u])}}function c(h){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(e=0)),e;)try{if(n=1,i&&(r=h[0]&2?i.return:h[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,h[1])).done)return r;switch(i=0,r&&(h=[h[0]&2,r.value]),h[0]){case 0:case 1:r=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,i=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!r||h[1]>r[0]&&h[1]<r[3])){e.label=h[1];break}if(h[0]===6&&e.label<r[1]){e.label=r[1],r=h;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(h);break}r[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(s,e)}catch(u){h=[6,u],i=0}finally{n=r=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function ze(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],n=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&n>=s.length&&(s=void 0),{value:s&&s[n++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function xe(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var n=e.call(s),i,r=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)r.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return r}function Fe(s,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,r;n<i;n++)(r||!(n in t))&&(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return s.concat(r||Array.prototype.slice.call(t))}function rn(s){return this instanceof rn?(this.v=s,this):new rn(s)}function dm(s,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(s,t||[]),i,r=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(f){return function(p){return Promise.resolve(p).then(f,l)}}function a(f,p){n[f]&&(i[f]=function(w){return new Promise(function(x,b){r.push([f,w,x,b])>1||c(f,w)})},p&&(i[f]=p(i[f])))}function c(f,p){try{h(n[f](p))}catch(w){d(r[0][3],w)}}function h(f){f.value instanceof rn?Promise.resolve(f.value.v).then(u,l):d(r[0][2],f)}function u(f){c("next",f)}function l(f){c("throw",f)}function d(f,p){f(p),r.shift(),r.length&&c(r[0][0],r[0][1])}}function mm(s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=s[Symbol.asyncIterator],e;return t?t.call(s):(s=typeof ze=="function"?ze(s):s[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=s[r]&&function(o){return new Promise(function(a,c){o=s[r](o),i(a,c,o.done,o.value)})}}function i(r,o,a,c){Promise.resolve(c).then(function(h){r({value:h,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function q(s){return typeof s=="function"}function er(s){var t=function(n){Error.call(n),n.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var nr=er(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
24
24
|
`+e.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
25
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function En(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var an=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Fe(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(w){t={error:w}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(q(u))try{u()}catch(w){r=w instanceof Ki?w.errors:[w]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=Fe(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{xc(p)}catch(w){r=r??[],w instanceof Ki?r=Be(Be([],ve(r)),ve(w.errors)):r.push(w)}}}catch(w){n={error:w}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(r)throw new Ki(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)xc(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&En(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&En(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),wc=an.EMPTY;function bc(s){return s instanceof an||s&&"closed"in s&&q(s.remove)&&q(s.add)&&q(s.unsubscribe)}function xc(s){q(s)?s():s.unsubscribe()}var vc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},tr={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=tr.delegate;return i?.setTimeout?i.setTimeout.apply(i,Be([s,t],ve(e))):setTimeout.apply(void 0,Be([s,t],ve(e)))},clearTimeout:function(s){var t=tr.delegate;return(t?.clearTimeout||clearTimeout)(s)},delegate:void 0};function _c(s){tr.setTimeout(function(){throw s})}function Pn(){}function Ts(s){s()}var er=function(s){xe(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,bc(e)&&e.add(n)):n.destination=dm,n}return t.create=function(e,n,i){return new Es(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(an),um=Function.prototype.bind;function nr(s,t){return um.call(s,t)}var lm=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){Ps(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){Ps(n)}else Ps(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Ps(e)}},s}(),Es=function(s){xe(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(q(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&vc.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&nr(e.next,a),error:e.error&&nr(e.error,a),complete:e.complete&&nr(e.complete,a)}):o=e}return r.destination=new lm(o),r}return t}(er);function Ps(s){_c(s)}function fm(s){throw s}var dm={closed:!0,next:Pn,error:fm,complete:Pn},sr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ne(s){return s}function mm(s){return s.length===0?Ne:s.length===1?s[0]:function(e){return s.reduce(function(n,i){return i(n)},e)}}var st=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=gm(t)?t:new Es(t,e,n);return Ts(function(){var o=i,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=Sc(e),new e(function(i,r){var o=new Es({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[sr]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mm(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=Sc(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s}();function Sc(s){var t;return(t=s??vc.Promise)!==null&&t!==void 0?t:Promise}function pm(s){return s&&q(s.next)&&q(s.error)&&q(s.complete)}function gm(s){return s&&s instanceof er||pm(s)&&bc(s)}function ym(s){return q(s?.lift)}function zt(s){return function(t){if(ym(t))return t.lift(function(e){try{return s(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function ut(s,t,e,n,i){return new wm(s,t,e,n,i)}var wm=function(s){xe(t,s);function t(e,n,i,r,o,a){var c=s.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(h){try{n(h)}catch(u){e.error(u)}}:s.prototype._next,c._error=r?function(h){try{r(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,c._complete=i?function(){try{i()}catch(h){e.error(h)}finally{this.unsubscribe()}}:s.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(er),bm=Qi(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Mn=function(s){xe(t,s);function t(){var e=s.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var n=new Cc(this,this);return n.operator=e,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new bm},t.prototype.next=function(e){var n=this;Ts(function(){var i,r;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=Fe(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){i={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var n=this;Ts(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=e;for(var i=n.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ts(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var n=e.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var n=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?wc:(this.currentObservers=null,a.push(e),new an(function(){n.currentObservers=null,En(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var n=this,i=n.hasError,r=n.thrownError,o=n.isStopped;i?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new st;return e.source=this,e},t.create=function(e,n){return new Cc(e,n)},t}(st),Cc=function(s){xe(t,s);function t(e,n){var i=s.call(this)||this;return i.destination=e,i.source=n,i}return t.prototype.next=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,e)},t.prototype.error=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,e)},t.prototype.complete=function(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)},t.prototype._subscribe=function(e){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&i!==void 0?i:wc},t}(Mn),Tc={now:function(){return(Tc.delegate||Date).now()},delegate:void 0},xm=function(s){xe(t,s);function t(e,n){return s.call(this)||this}return t.prototype.schedule=function(e,n){return this},t}(an),Ms={setInterval:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=Ms.delegate;return i?.setInterval?i.setInterval.apply(i,Be([s,t],ve(e))):setInterval.apply(void 0,Be([s,t],ve(e)))},clearInterval:function(s){var t=Ms.delegate;return(t?.clearInterval||clearInterval)(s)},delegate:void 0},vm=function(s){xe(t,s);function t(e,n){var i=s.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(e,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(e,n,i){return i===void 0&&(i=0),Ms.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Ms.clearInterval(n)},t.prototype.execute=function(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,n){var i=!1,r;try{this.work(e)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,n=e.id,i=e.scheduler,r=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,En(r,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},t}(xm),Ec=function(){function s(t,e){e===void 0&&(e=s.now),this.schedulerActionCtor=t,this.now=e}return s.prototype.schedule=function(t,e,n){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},s.now=Tc.now,s}(),_m=function(s){xe(t,s);function t(e,n){n===void 0&&(n=Ec.now);var i=s.call(this,e,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var n=this.actions;if(this._active){n.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,i){for(;e=n.shift();)e.unsubscribe();throw i}},t}(Ec),ir=new _m(vm),Sm=ir,Pc=new st(function(s){return s.complete()});function Mc(s){return s&&q(s.schedule)}function rr(s){return s[s.length-1]}function Cm(s){return q(rr(s))?s.pop():void 0}function An(s){return Mc(rr(s))?s.pop():void 0}function Tm(s,t){return typeof rr(s)=="number"?s.pop():t}var or=function(s){return s&&typeof s.length=="number"&&typeof s!="function"};function Ac(s){return q(s?.then)}function kc(s){return q(s[sr])}function Ic(s){return Symbol.asyncIterator&&q(s?.[Symbol.asyncIterator])}function Dc(s){return new TypeError("You provided "+(s!==null&&typeof s=="object"?"an invalid object":"'"+s+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Em(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Rc=Em();function Lc(s){return q(s?.[Rc])}function Oc(s){return cm(this,arguments,function(){var e,n,i,r;return yc(this,function(o){switch(o.label){case 0:e=s.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,on(e.read())];case 3:return n=o.sent(),i=n.value,r=n.done,r?[4,on(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,on(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function zc(s){return q(s?.getReader)}function vt(s){if(s instanceof st)return s;if(s!=null){if(kc(s))return Pm(s);if(or(s))return Mm(s);if(Ac(s))return Am(s);if(Ic(s))return Fc(s);if(Lc(s))return km(s);if(zc(s))return Im(s)}throw Dc(s)}function Pm(s){return new st(function(t){var e=s[sr]();if(q(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Mm(s){return new st(function(t){for(var e=0;e<s.length&&!t.closed;e++)t.next(s[e]);t.complete()})}function Am(s){return new st(function(t){s.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,_c)})}function km(s){return new st(function(t){var e,n;try{for(var i=Fe(s),r=i.next();!r.done;r=i.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}t.complete()})}function Fc(s){return new st(function(t){Dm(s,t).catch(function(e){return t.error(e)})})}function Im(s){return Fc(Oc(s))}function Dm(s,t){var e,n,i,r;return am(this,void 0,void 0,function(){var o,a;return yc(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=hm(s),c.label=1;case 1:return[4,e.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function he(s,t,e,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?s.add(this.schedule(null,n)):this.unsubscribe()},n);if(s.add(r),!i)return r}function Bc(s,t){return t===void 0&&(t=0),zt(function(e,n){e.subscribe(ut(n,function(i){return he(n,s,function(){return n.next(i)},t)},function(){return he(n,s,function(){return n.complete()},t)},function(i){return he(n,s,function(){return n.error(i)},t)}))})}function ar(s,t){return t===void 0&&(t=0),zt(function(e,n){n.add(s.schedule(function(){return e.subscribe(n)},t))})}function Rm(s,t){return vt(s).pipe(ar(t),Bc(t))}function Lm(s,t){return vt(s).pipe(ar(t),Bc(t))}function Om(s,t){return new st(function(e){var n=0;return t.schedule(function(){n===s.length?e.complete():(e.next(s[n++]),e.closed||this.schedule())})})}function zm(s,t){return new st(function(e){var n;return he(e,t,function(){n=s[Rc](),he(e,t,function(){var i,r,o;try{i=n.next(),r=i.value,o=i.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return q(n?.return)&&n.return()}})}function Nc(s,t){if(!s)throw new Error("Iterable cannot be null");return new st(function(e){he(e,t,function(){var n=s[Symbol.asyncIterator]();he(e,t,function(){n.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function Fm(s,t){return Nc(Oc(s),t)}function Bm(s,t){if(s!=null){if(kc(s))return Rm(s,t);if(or(s))return Om(s,t);if(Ac(s))return Lm(s,t);if(Ic(s))return Nc(s,t);if(Lc(s))return zm(s,t);if(zc(s))return Fm(s,t)}throw Dc(s)}function kn(s,t){return t?Bm(s,t):vt(s)}function Nm(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s);return kn(s,e)}var Ym=Qi(function(s){return function(){s(this),this.name="EmptyError",this.message="no elements in sequence"}});function Xm(s,t){var e=typeof t=="object";return new Promise(function(n,i){var r=new Es({next:function(o){n(o),r.unsubscribe()},error:i,complete:function(){e?n(t.defaultValue):i(new Ym)}});s.subscribe(r)})}function Um(s){return s instanceof Date&&!isNaN(s)}function ot(s,t){return zt(function(e,n){var i=0;e.subscribe(ut(n,function(r){n.next(s.call(t,r,i++))}))})}var $m=Array.isArray;function Vm(s,t){return $m(t)?s.apply(void 0,Be([],ve(t))):s(t)}function cr(s){return ot(function(t){return Vm(s,t)})}var Gm=Array.isArray,qm=Object.getPrototypeOf,jm=Object.prototype,Hm=Object.keys;function Wm(s){if(s.length===1){var t=s[0];if(Gm(t))return{args:t,keys:null};if(Jm(t)){var e=Hm(t);return{args:e.map(function(n){return t[n]}),keys:e}}}return{args:s,keys:null}}function Jm(s){return s&&typeof s=="object"&&qm(s)===jm}function Zm(s,t){return s.reduce(function(e,n,i){return e[n]=t[i],e},{})}function Qm(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s),n=Cm(s),i=Wm(s),r=i.args,o=i.keys;if(r.length===0)return kn([],e);var a=new st(Km(r,e,o?function(c){return Zm(o,c)}:Ne));return n?a.pipe(cr(n)):a}function Km(s,t,e){return e===void 0&&(e=Ne),function(n){Yc(t,function(){for(var i=s.length,r=new Array(i),o=i,a=i,c=function(u){Yc(t,function(){var l=kn(s[u],t),d=!1;l.subscribe(ut(n,function(f){r[u]=f,d||(d=!0,a--),a||n.next(e(r.slice()))},function(){--o||n.complete()}))},n)},h=0;h<i;h++)c(h)},n)}}function Yc(s,t,e){s?he(e,s,t):t()}function tp(s,t,e,n,i,r,o,a){var c=[],h=0,u=0,l=!1,d=function(){l&&!c.length&&!h&&t.complete()},f=function(w){return h<n?p(w):c.push(w)},p=function(w){r&&t.next(w),h++;var x=!1;vt(e(w,u++)).subscribe(ut(t,function(b){i?.(b),r?f(b):t.next(b)},function(){x=!0},void 0,function(){if(x)try{h--;for(var b=function(){var g=c.shift();o?he(t,o,function(){return p(g)}):p(g)};c.length&&h<n;)b();d()}catch(g){t.error(g)}}))};return s.subscribe(ut(t,f,function(){l=!0,d()})),function(){a?.()}}function hr(s,t,e){return e===void 0&&(e=1/0),q(t)?hr(function(n,i){return ot(function(r,o){return t(n,r,i,o)})(vt(s(n,i)))},e):(typeof t=="number"&&(e=t),zt(function(n,i){return tp(n,i,s,e)}))}function Xc(s){return s===void 0&&(s=1/0),hr(Ne,s)}function ep(){return Xc(1)}function Uc(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return ep()(kn(s,An(s)))}var np=["addListener","removeListener"],sp=["addEventListener","removeEventListener"],ip=["on","off"];function ur(s,t,e,n){if(q(e)&&(n=e,e=void 0),n)return ur(s,t,e).pipe(cr(n));var i=ve(cp(s)?sp.map(function(a){return function(c){return s[a](t,c,e)}}):rp(s)?np.map($c(s,t)):op(s)?ip.map($c(s,t)):[],2),r=i[0],o=i[1];if(!r&&or(s))return hr(function(a){return ur(a,t,e)})(vt(s));if(!r)throw new TypeError("Invalid event target");return new st(function(a){var c=function(){for(var h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return a.next(1<h.length?h:h[0])};return r(c),function(){return o(c)}})}function $c(s,t){return function(e){return function(n){return s[e](t,n)}}}function rp(s){return q(s.addListener)&&q(s.removeListener)}function op(s){return q(s.on)&&q(s.off)}function cp(s){return q(s.addEventListener)&&q(s.removeEventListener)}function it(s,t,e){return e?it(s,t).pipe(cr(e)):new st(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},r=s(i);return q(t)?function(){return t(i,r)}:void 0})}function hp(s,t,e){s===void 0&&(s=0),e===void 0&&(e=Sm);var n=-1;return t!=null&&(Mc(t)?e=t:n=t),new st(function(i){var r=Um(s)?+s-e.now():s;r<0&&(r=0);var o=0;return e.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},r)})}function up(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s),n=Tm(s,1/0),i=s;return i.length?i.length===1?vt(i[0]):Xc(n)(kn(i,e)):Pc}var lp=Array.isArray;function fp(s){return s.length===1&&lp(s[0])?s[0]:s}function Vc(s,t){return zt(function(e,n){var i=0;e.subscribe(ut(n,function(r){return s.call(t,r,i++)&&n.next(r)}))})}function lr(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return s=fp(s),s.length===1?vt(s[0]):new st(dp(s))}function dp(s){return function(t){for(var e=[],n=function(r){e.push(vt(s[r]).subscribe(ut(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==r&&e[a].unsubscribe();e=null}t.next(o)})))},i=0;e&&!t.closed&&i<s.length;i++)n(i)}}function _e(s,t){return t===void 0&&(t=Ne),s=s??mp,zt(function(e,n){var i,r=!0;e.subscribe(ut(n,function(o){var a=t(o);(r||!s(i,a))&&(r=!1,i=a,n.next(o))}))})}function mp(s,t){return s===t}function Gc(s,t){return t?function(e){return e.pipe(Gc(function(n,i){return vt(s(n,i)).pipe(ot(function(r,o){return t(n,r,i,o)}))}))}:zt(function(e,n){var i=0,r=null,o=!1;e.subscribe(ut(n,function(a){r||(r=ut(n,void 0,function(){r=null,o&&n.complete()}),vt(s(a,i++)).subscribe(r))},function(){o=!0,!r&&n.complete()}))})}function Se(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s);return zt(function(n,i){(e?Uc(s,n,e):Uc(s,n)).subscribe(i)})}function As(s,t){return zt(function(e,n){var i=null,r=0,o=!1,a=function(){return o&&!i&&n.complete()};e.subscribe(ut(n,function(c){i?.unsubscribe();var h=0,u=r++;vt(s(c,u)).subscribe(i=ut(n,function(l){return n.next(t?t(c,l,u,h++):l)},function(){i=null,a()}))},function(){o=!0,a()}))})}function pp(){return As(Ne)}function fr(s){return zt(function(t,e){vt(s).subscribe(ut(e,function(){return e.complete()},Pn)),!e.closed&&t.subscribe(e)})}function Ye(s,t,e){var n=q(s)||t||e?{next:s,error:t,complete:e}:s;return n?zt(function(i,r){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(ut(r,function(c){var h;(h=n.next)===null||h===void 0||h.call(n,c),r.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),r.complete()},function(c){var h;a=!1,(h=n.error)===null||h===void 0||h.call(n,c),r.error(c)},function(){var c,h;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(h=n.finalize)===null||h===void 0||h.call(n)}))}):Ne}function gp(s,t){return zt(function(e,n){var i=t??{},r=i.leading,o=r===void 0?!0:r,a=i.trailing,c=a===void 0?!1:a,h=!1,u=null,l=null,d=!1,f=function(){l?.unsubscribe(),l=null,c&&(x(),d&&n.complete())},p=function(){l=null,d&&n.complete()},w=function(b){return l=vt(s(b)).subscribe(ut(n,f,p))},x=function(){if(h){h=!1;var b=u;u=null,n.next(b),!d&&w(b)}};e.subscribe(ut(n,function(b){h=!0,u=b,!(l&&!l.closed)&&(o?x():w(b))},function(){d=!0,!(c&&h&&l&&!l.closed)&&n.complete()}))})}function yp(s,t,e){t===void 0&&(t=ir);var n=hp(s,t);return gp(function(){return n},e)}function wp(s,t){return zt(function(e,n){var i=[],r=function(o){for(;0<i.length;)i.shift().error(o);n.error(o)};vt(s).subscribe(ut(n,function(o){var a=new Mn;i.push(a);var c=new an,h=function(){En(i,a),a.complete(),c.unsubscribe()},u;try{u=vt(t(o))}catch(l){r(l);return}n.next(a.asObservable()),c.add(u.subscribe(ut(n,h,Pn,r)))},Pn)),e.subscribe(ut(n,function(o){var a,c,h=i.slice();try{for(var u=Fe(h),l=u.next();!l.done;l=u.next()){var d=l.value;d.next(o)}}catch(f){a={error:f}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},r,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function j(s,t,e,n=!1){const i=async r=>{await e(r)};try{s.addEventListener(t,i,n)}catch{s.attachEvent("on"+t,i)}return()=>{try{s.removeEventListener(t,i,n)}catch{s.detachEvent("on"+t,i)}}}function U(s,t,e=!1){return ur(s,t,{capture:e})}function Ce(s){if(s.preventDefault){s.preventDefault();return}try{s.returnValue=!1}catch{}}function qc(s){if(s.stopPropagation){s.stopPropagation();return}try{s.cancelBubble=!0}catch{}}const bp=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],xp=["keydown","keyup","keypress"],vp=["touchstart","touchend","touchcancel","touchmove"],_p=["pointerdown","pointerup","pointercancel","pointermove"],Sp=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Cp=["change"];function Tp(s,t,e={bubbles:!0,detail:{}}){if(!s)return;let n;try{bp.includes(t)?n=new MouseEvent(t,e):xp.includes(t)?n=new KeyboardEvent(t,e):vp.includes(t)?n=new TouchEvent(t,e):_p.includes(t)?n=new PointerEvent(t,e):Sp.includes(t)?n=new DragEvent(t,e):Cp.includes(t)?n=new Event(t,e):n=new CustomEvent(t,e)}catch{document.createEvent?n=document.createEvent("HTMLEvents").initEvent(t,!0,!0):document.createEventObject&&(n=document.createEventObject())}if(s.dispatchEvent)s.dispatchEvent(n);else if(s.fireEvent&&document.createEventObject)s.fireEvent("on"+t,n);else throw new Error(`Can't fire event : ${t}`)}function Ep(s,t){const e=s.changedTouches[0];return new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function Pp(s,t){let e=document.createElement(s);t="on"+t;let n=t in e;return n||(e.setAttribute(t,"return;"),n=typeof e[t]=="function"),e=null,n}const ks=()=>{const s=navigator.userAgent.toLowerCase();let t="Unknown";return/iphone|ipad|ipod/i.test(s)?t="iOS":/android/i.test(s)?t="Android":/BlackBerry/i.test(s)?t="BlackBerry":/mac/i.test(s)?t="macOS":/win/i.test(s)?t="Windows":/linux/i.test(s)?t="Linux":/bsd/i.test(s)&&(t="BSD"),t.toLowerCase()};function Mp(s=navigator.userAgent){let t="Unknown";if(/iPhone|iPad|iPod/i.test(s)){const e=s.match(/OS (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Android/i.test(s)){const e=s.match(/Android (\d+\.\d+)/i);e&&(t=e[1])}else if(/Mac OS X/i.test(s)){const e=s.match(/Mac OS X (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Windows NT/i.test(s)){const e=s.match(/Windows NT (\d+\.\d+)/i);e&&(t=e[1])}return t.toLowerCase()}function Ap(s,t){const e=s.split("."),n=t.split(".");for(let i=0,r=e.length;i<r;i++){if(n.length==i)return 1;if(e[i]!=n[i])return e[i]>n[i]?1:-1}return e.length!=n.length?-1:0}function dr(){const s=navigator.userAgent.toLowerCase();let t="Unknown";return/opr/i.test(s)||/opera/i.test(s)?t="Opera":/chrome/i.test(s)?t="Chrome":/firefox/i.test(s)?t="Firefox":/safari/i.test(s)?t="Safari":/edge/i.test(s)?t="Edge":/msie|trident/i.test(s)?t="IE":/MicroMessenger/i.test(s)?t="Wechat":/alipay/i.test(s)&&(t="Ali"),t.toLowerCase()}const kp=()=>{const s=navigator.userAgent;let t="Unknown";if(/Chrome/.test(s)){const e=s.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(s)){const e=s.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(s)){const e=s.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(s)){const e=s.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(s)){const e=s.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t};function Ip(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function Dp(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function mr(){return ks()==="ios"}function jc(){return ks()==="macos"}function Rp(){return mr()|jc()}function Hc(){return ks()==="android"}function Lp(){return mr()||Hc()}function Wc(){const s=window.navigator.userAgent,t=s.indexOf("MSIE ");if(t>0)return parseInt(s.substring(t+5,s.indexOf(".",t)),10);if(s.indexOf("Trident/")>0){const i=s.indexOf("rv:");return parseInt(s.substring(i+3,s.indexOf(".",i)),10)}const n=s.indexOf("Edge/");return n>0?parseInt(s.substring(n+5,s.indexOf(".",n)),10):-1}const Op=Wc()!==-1,zp=document.documentMode?document.documentMode===9:!1,Fp=document.documentMode?document.documentMode===10:!1,Bp=document.documentMode?document.documentMode===11:!1;function Jc(){return dr()==="wechat"}function Zc(){return dr()==="ali"}function Np(){return Jc()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function Yp(){return Zc()&&navigator.userAgent.match(/miniprogram/i)}const Xp=typeof document<"u",Qc=typeof window<"u",Up=typeof history<"u",$p=Qc&&window.File&&window.FileReader&&window.FileList&&window.Blob,Kc=(()=>!!(Xt.Worker&&Xt.Blob&&Xt.Promise&&Xt.OffscreenCanvas&&Xt.OffscreenCanvasRenderingContext2D&&Xt.HTMLCanvasElement&&Xt.HTMLCanvasElement.prototype.transferControlToOffscreen&&Xt.URL&&Xt.URL.createObjectURL))(),Vp=typeof Path2D=="function"&&typeof DOMMatrix=="function",th=function(){if(!Xt.OffscreenCanvas)return!1;const s=new OffscreenCanvas(1,1),t=s.getContext("2d");t.fillRect(0,0,1,1);const e=s.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0}(),Gp=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},qp="webkit moz ms o".split(" ");function Is(s){return typeof s=="function"&&/native code/.test(s.toString())}function jp(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}(function(){if(!window.requestAnimationFrame){let s=K();window.requestAnimationFrame=function(t){const e=K(),n=Math.max(0,16-(e-s)),i=window.setTimeout(function(){t(e+n)},n);return s=e+n,i}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(s){clearTimeout(s)})})();function pr(s){let t=!1;return window.requestAnimationFrame(function e(n){!t&&s(n)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function gr(s,t=0){if(t==0)return s(K()),()=>{};{const e=K();return pr(n=>n-e>=t?(s(n),!1):!0)}}function Hp(s,t=0){let e=!1,n=0;const i=K(),r=o=>{if(e)return;n++;const a=o-i-n*t;s(o,n,t<=a),gr(r,Math.max(0,t-a))};return gr(r,t),()=>{e=!0}}function Wp(s,t=20){const e=1e3/t;let n=0,i;return()=>(K()-n>=e&&(n=K(),i=s()),i)}window.requestIdleCallback=window.requestIdleCallback||function(s,t){const e=K();return setTimeout(function(){s({didTimeout:K()-e>50,timeRemaining:()=>Math.max(0,50-(K()-e))})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(s){clearTimeout(s)};function eh(s,t){requestIdleCallback(e=>{e.timeRemaining()>0||t?s():eh(s,t)},{timeout:t})}const yr=new Le;let wr=!1;function br(s,t,e){s&&t&&yr.set(s,{cb:t,startTime:K(),timeout:e}),!wr&&(wr=!0,Zp(n=>{wr=!1;let i=n.timeRemaining();yr.filter((r,o)=>{let a=!1;const c=K();(i>0||o.timeout&&K()-o.startTime>=o.timeout)&&(o.cb(),a=!0);const h=K();return i-=h-c,!a}),yr.length>0&&br()}))}let Ds=0,Xe=33,Te=33,xr;const nh=new MessageChannel,Jp=nh.port2;nh.port1.onmessage=s=>{xr!==null&&xr({didTimeout:Ds<=K(),timeRemaining:()=>Math.max(0,Ds-K())})};function Zp(s){return xr=s,requestAnimationFrame(t=>{let e=t-Ds+Te;e<Te&&Xe<Te?(e<8&&(e=8),Te=e<Xe?Xe:e):e>Te&&Xe>Te?Te=e<Xe?Xe:e:Xe=e,Ds=t+Te,Jp.postMessage(null)})}function Qp(s){if(typeof setImmediate<"u"&&Is(setImmediate))setImmediate(s);else if(typeof MessageChannel<"u"&&(Is(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;e.onmessage=s,t.postMessage(null)}else typeof Promise<"u"&&Is(Promise)?Promise.resolve().then(s):setTimeout(s,0)}function Kp(s){typeof queueMicrotask=="function"?queueMicrotask(s):Promise.resolve().then(s).catch(t=>setTimeout(()=>{throw t}))}class In{static _nextId=0;static nextId(){return In._nextId++}}const O={Linear:{None:function(s){return s}},Ease:{In:function(s){return Math.pow(s,1.7)}},Quadratic:{In:function(s){return s*s},Out:function(s){return s*(2-s)},InOut:function(s){return(s*=2)<1?.5*s*s:-.5*(--s*(s-2)-1)}},Cubic:{In:function(s){return s*s*s},Out:function(s){return--s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s:.5*((s-=2)*s*s+2)}},Quartic:{In:function(s){return s*s*s*s},Out:function(s){return 1- --s*s*s*s},InOut:function(s){return(s*=2)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2)}},Quintic:{In:function(s){return s*s*s*s*s},Out:function(s){return--s*s*s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2)}},Sinusoidal:{In:function(s){return 1-Math.sin((1-s)*Math.PI/2)},Out:function(s){return Math.sin(s*Math.PI/2)},InOut:function(s){return .5*(1-Math.sin(Math.PI*(.5-s)))}},Exponential:{In:function(s){return s===0?0:Math.pow(1024,s-1)},Out:function(s){return s===1?1:1-Math.pow(2,-10*s)},InOut:function(s){return s===0?0:s===1?1:(s*=2)<1?.5*Math.pow(1024,s-1):.5*(-Math.pow(2,-10*(s-1))+2)}},Circular:{In:function(s){return 1-Math.sqrt(1-s*s)},Out:function(s){return Math.sqrt(1- --s*s)},InOut:function(s){return(s*=2)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1)}},Elastic:{In:function(s){return s===0?0:s===1?1:-Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI)},Out:function(s){return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s-.1)*5*Math.PI)+1},InOut:function(s){return s===0?0:s===1?1:(s*=2,s<1?-.5*Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI):.5*Math.pow(2,-10*(s-1))*Math.sin((s-1.1)*5*Math.PI)+1)}},Back:{In:function(s){return s===1?1:s*s*((1.70158+1)*s-1.70158)},Out:function(s){return s===0?0:--s*s*((1.70158+1)*s+1.70158)+1},InOut:function(s){const t=2.5949095;return(s*=2)<1?.5*(s*s*((t+1)*s-t)):.5*((s-=2)*s*((t+1)*s+t)+2)}},Bounce:{In:function(s){return 1-O.Bounce.Out(1-s)},Out:function(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},InOut:function(s){return s<.5?O.Bounce.In(s*2)*.5:O.Bounce.Out(s*2-1)*.5+.5}},generatePow:function(s=4){return s=s<Number.EPSILON?Number.EPSILON:s,s=s>1e4?1e4:s,{In:function(t){return t**s},Out:function(t){return 1-(1-t)**s},InOut:function(t){return t<.5?(t*2)**s/2:(1-(2-t*2)**s)/2+.5}}},random:function(s){return Math.random()},createStep:function(s){return function(t){return Math.floor(t*s)/s}},createNoisyEasing:function(s,t=.1){const e=1-t;return function(n){return t*Math.random()+e*s(n)}},swing:function(s){return s+Math.sin(s*Math.PI*2)/2},causeSeizures:function(s){return s+.2*Math.random()-.1}};function sh(s){switch(s){case O.Quadratic.In:return O.Quadratic.Out;case O.Quadratic.Out:return O.Quadratic.In;case O.Quadratic.InOut:return O.Quadratic.InOut;case O.Cubic.In:return O.Cubic.Out;case O.Cubic.Out:return O.Cubic.In;case O.Cubic.InOut:return O.Cubic.InOut;case O.Quartic.In:return O.Quartic.Out;case O.Quartic.Out:return O.Quartic.In;case O.Quartic.InOut:return O.Quartic.InOut;case O.Quintic.In:return O.Quintic.Out;case O.Quintic.Out:return O.Quintic.In;case O.Quintic.InOut:return O.Quintic.InOut;case O.Sinusoidal.In:return O.Sinusoidal.Out;case O.Sinusoidal.Out:return O.Sinusoidal.In;case O.Sinusoidal.InOut:return O.Sinusoidal.InOut;case O.Exponential.In:return O.Exponential.Out;case O.Exponential.Out:return O.Exponential.In;case O.Exponential.InOut:return O.Exponential.InOut;case O.Circular.In:return O.Circular.Out;case O.Circular.Out:return O.Circular.In;case O.Circular.InOut:return O.Circular.InOut;case O.Elastic.In:return O.Elastic.Out;case O.Elastic.Out:return O.Elastic.In;case O.Elastic.InOut:return O.Elastic.InOut;case O.Back.In:return O.Back.Out;case O.Back.Out:return O.Back.In;case O.Back.InOut:return O.Back.InOut;case O.Bounce.In:return O.Bounce.Out;case O.Bounce.Out:return O.Bounce.In;case O.Bounce.InOut:return O.Bounce.InOut;default:return s}}const tg=4,eg=.001,ng=1e-7,sg=10,Dn=11,Rs=1/(Dn-1),ig=typeof Float32Array=="function";function ih(s,t){return 1-3*t+3*s}function rh(s,t){return 3*t-6*s}function oh(s){return 3*s}function Ls(s,t,e){return((ih(t,e)*s+rh(t,e))*s+oh(t))*s}function ah(s,t,e){return 3*ih(t,e)*s*s+2*rh(t,e)*s+oh(t)}function rg(s,t,e,n,i){let r,o,a=0;do o=t+(e-t)/2,r=Ls(o,n,i)-s,r>0?e=o:t=o;while(Math.abs(r)>ng&&++a<sg);return o}function og(s,t,e,n){for(let i=0;i<tg;++i){const r=ah(t,e,n);if(r===0)return t;const o=Ls(t,e,n)-s;t-=o/r}return t}function ag(s){return s}function vr(s,t,e,n){if(!(0<=s&&s<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(s===t&&e===n)return ag;const i=ig?new Float32Array(Dn):new Array(Dn);for(let o=0;o<Dn;++o)i[o]=Ls(o*Rs,s,e);function r(o){let a=0,c=1;const h=Dn-1;for(;c!==h&&i[c]<=o;++c)a+=Rs;--c;const u=(o-i[c])/(i[c+1]-i[c]),l=a+u*Rs,d=ah(l,s,e);return d>=eg?og(o,l,s,e):d===0?l:rg(o,a,a+Rs,s,e)}return o=>o===0||o===1?o:Ls(r(o),t,n)}function _r(s){switch(s){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function ch(s){const[t,e,n,i]=_r(s);return[1-n,1-i,1-t,1-e]}function cg(s){return vr(..._r(s))}function hg(s){return vr(...ch(s))}const ue={Utils:{Linear:function(s,t,e){return(t-s)*e+s},Factorial:function(){const s=[1];return function(t){let e=1;if(s[t])return s[t];for(let n=t;n>1;n--)e*=n;return s[t]=e,e}}(),Bernstein:function(s,t){const e=ue.Utils.Factorial;return e(s)/e(t)/e(s-t)},CatmullRom:function(s,t,e,n,i){const r=(e-s)*.5,o=(n-t)*.5,a=i*i,c=i*a;return(2*t-2*e+r+o)*c+(-3*t+3*e-2*r-o)*a+r*i+t},QuadraticBezier:(s,t,e,n)=>{const i=1-n;return i*i*s+2*i*n*t+n*n*e},CubicBezier:(s,t,e,n,i)=>{const r=1-i;return r*r*r*s+3*r*r*i*t+3*r*i*i*e+i*i*i*n}},Linear:function(s,t){const e=s.length-1,n=e*t,i=Math.floor(n),r=ue.Utils.Linear;return t<0?r(s[0],s[1],n):t>1?r(s[e],s[e-1],e-n):r(s[i],s[i+1>e?e:i+1],n-i)},Bezier:function(s,t){let e=0;const n=s.length-1,i=Math.pow,r=ue.Utils.Bernstein;for(let o=0;o<=n;o++)e+=i(1-t,n-o)*i(t,o)*s[o]*r(n,o);return e},CatmullRom:function(s,t){const e=s.length-1;let n=e*t,i=Math.floor(n);const r=ue.Utils.CatmullRom;return s[0]===s[e]?(t<0&&(i=Math.floor(n=e*(1+t))),r(s[(i-1+e)%e],s[i],s[(i+1)%e],s[(i+2)%e],n-i)):t<0?s[0]-(r(s[0],s[0],s[1],s[1],-n)-s[0]):t>1?s[e]-(r(s[e],s[e],s[e-1],s[e-1],n-e)-s[e]):r(s[i?i-1:0],s[i],s[e<i+1?e:i+1],s[e<i+2?e:i+2],n-i)}};class hh{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=K(),e=!1){const n=Object.keys(this._tweens);for(let i=0;i<n.length;i++){const r=this._tweens[n[i]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[n[i]]}return!!Object.keys(this._tweens).length}}const $t=new hh;class Sr{constructor(t,e=$t){this._object=t,this._group=e}_id=In.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=O.Linear.None;_interpolationFunction=ue.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=K()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,n,i){for(const r in n){const o=t[r],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(n[r]);if(!(c==="undefined"||c==="function")){if(h){let u=n[r];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),n[r]=[o].concat(u)}if((c==="object"||a)&&o&&!h){e[r]=a?[]:{};for(const u in o)e[r][u]=o[u];i[r]=a?[]:{},this._setupProperties(o,e[r],n[r],i[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),h?i[r]=n[r].slice().reverse():i[r]=e[r]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=K()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=K()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=$t){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=O.Linear.None){return this._easingFunction=t,this}interpolation(t=ue.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=K(),e=!0){if(this._isPaused)return!0;let n,i;const r=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(t-this._startTime)/this._durationTime,i=this._durationTime===0||i>1?1:i;const o=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,n,i){for(const r in n){if(e[r]===void 0)continue;const o=e[r]||0;let a=n[r];const c=Array.isArray(t[r]),h=Array.isArray(a);!c&&h?t[r]=this._interpolationFunction(a,i):typeof a=="object"&&a?this._updateProperties(t[r],o,a,i):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[r]=o+(a-o)*i))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=n,this._valuesEnd[t]=e}}const ug=In.nextId,lg=$t.getAll.bind($t),fg=$t.removeAll.bind($t),dg=$t.add.bind($t),mg=$t.remove.bind($t),pg=$t.update.bind($t),gg={now:K,Sequence:In,Easing:O,Interpolation:ue,Group:hh,Tween:Sr,nextId:ug,getAll:lg,removeAll:fg,add:dg,remove:mg,update:pg};class Cr{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=K(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=K();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Rn{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){Tl(this.tweens,(e,n)=>t?e.delay>n.delay:e.delay<=n.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(n=>{const i={...n};delete i.tween,i.fromValues={...i.fromValues},i.toValues={...i.toValues},e.push(i)}),e}addTween(t,e,n){const i={fromValues:t,toValues:e,frames:typeof n?.frames=="number"?n.frames:1,delay:typeof n?.delay=="number"?n.delay:this.tweens.length,easeFunction:n?.easeFunction||O.Linear.None,interpolationFunction:n?.interpolationFunction||ue.Linear,repeat:typeof n?.repeat=="number"?n.repeat:0,yoyo:n?.yoyo||!1,onStart:n?.onStart||(()=>{}),onUpdate:n?.onUpdate||(()=>{}),onComplete:n?.onComplete||(()=>{})};return this.tweens.push(i),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Cr,n=this.frameDuration;return new Promise(i=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=pr(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*n<=c).forEach(h=>{h.tween||(h.tween=new Sr({...h.fromValues}).to({...h.toValues},h.frames*n).easing(h.easeFunction).interpolation(h.interpolationFunction).repeat(h.repeat).yoyo(h.yoyo).onStart(h.onStart).onUpdate(h.onUpdate).onComplete(h.onComplete),h.tween.start(a)),(h.delay+h.frames*(h.repeat+1))*n>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),en(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),i()),o})})}isPaused=!1;pausedClock=new Cr;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(n=>{e=Math.max(e,n.delay+n.frames),n.easeFunction=sh(n.easeFunction);const i={...n.toValues};n.toValues={...n.fromValues},n.fromValues={...i}}),t.forEach(n=>{n.delay=e-n.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}const Os=new Le,uh=(s=!0)=>{Os.filter((t,e)=>(e.alternate&&(Zs(e,e.alternate),s&&Os.set(t,e.alternate),e.alternate=void 0),s))};function Tr(s){let t=Os.get(s);return t||(t=Js(s),Os.set(s,t)),t}function lh(s){const t=Tr(s);return t.alternate||(t.alternate=Js(s)),t.alternate}function yg(s,t,e=!0){t(lh(s)),uh(e)}function Er(s,t,e=!0){t(lh(s)),br("FLUSH_DOM_ACTION",()=>uh(e),50)}function J(s){return s*Math.PI/180}function Et(s){return s*180/Math.PI}function cn(s,t,e=0){return Math.sqrt(s*s+t*t+e*e)}function Ee(s,t,e,n){return cn(e-s,n-t)}function Qt(s,t,e,n){let i=Math.atan2(n-t,e-s);return i<0&&(i+=Math.PI*2),i}function hn(s,t){return{dx:Math.cos(s)*t,dy:Math.sin(s)*t}}function wg(s,t,e){if(typeof e=="number"){const n=cn(s,t,e);return{x:s/=n,y:t/=n,z:e/=n}}else{const n=cn(s,t);return{x:s/=n,y:t/=n}}}function bg(s,t,e,n,i=10){if(Math.abs(e-s)<i&&Math.abs(n-t)<i)return"no";const r=Et(Qt(s,t,e,n));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}const fh=xg("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function xg(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Pt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function zs(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function vg(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function _g(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const Ln={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let Fs=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Pt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}},Pr=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},dh=class Qo{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Ln);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=Ln[i].canvas}}__getStyleState(){const t={},e=Object.keys(Ln);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Ln);for(let r=0;r<i.length;r++){const o=Ln[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Pr){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Fs)e.setAttribute(o.apply,Pt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,Pt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(i[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(fh);for(let r=0,o=i.length;r<o;r++){const a=i[r],c=fh[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Pt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Pt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Pt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Pt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Pt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Pt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Pt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Pt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([n-t,i-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(l/2),p=t+f*d[0],w=e+f*d[1],x=[-c[1],c[0]],b=[h[1],-h[0]],g=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},v=g(x),_=g(b);this.lineTo(p+x[0]*r,w+x[1]*r),this.arc(p,w,r,v,_)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:zs(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Fs(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:zs(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Fs(a,this)}__parseFont(){const e=/^\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[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":vg(this.textAlign),"dominant-baseline":_g(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),c=e+n*Math.sin(r),h=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(Pt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=zs(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Pt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,c=0,h,u,l,d,f,p,w,x;if(t.length===3)n=t[1],i=t[2],h=e.width,u=e.height,r=h,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const b=this.__closestGroupOrSvg();this.__currentElement;const g="translate("+n+", "+i+")";if(e instanceof Qo){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)x=d.childNodes[0].getAttribute("id"),this.__ids[x]=x,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const v=f.getAttribute("transform");let _;v?_=v+" "+g:_=g,f.setAttribute("transform",_),b.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(w=this.__document.createElement("canvas"),w.width=r,w.height=o,w.getContext("2d")?.drawImage(e,a,c,h,u,0,0,r,o),e=w),p.setAttribute("transform",g),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),b.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=zs(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof Qo&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Pr(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Mr=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new dh({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,c){return this.context.ellipse(t,e,n,i,r,o,a,c),this.currentPath2D.ellipse(t,e,n,i,r,o,a,c),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,n,i,r,o,a){const c=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},Ar=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Qt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const c=(this.toY-n)/o,h=(t.y-r)/a;if(o){if(!a)return{x:i,y:c*(i-e)+n}}else return{x:e,y:h*(e-i)+r};const u=(-h*i+r+c*e-n)/(c-h),l=c*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const Sg=class extends Ar{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,c,!this.sweepFlag)}convert(t,e,n,i,r,o,a,c,h){const u=a/180*Math.PI,l=(t-n)/2,d=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,w=f*f/(r*r)+p*p/(o*o);if(w>1){const V=Math.sqrt(w);throw r=V*r,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const x=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),b=c!=h?1:-1,g=b*x*r*p/o,v=b*x*-o*f/r,_=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*g-Math.sin(u)*v+_,I=Math.sin(u)*g+Math.cos(u)*v+E,F=(V,W,et,Z)=>(V*Z>=W*et?1:-1)*Math.acos((V*et+W*Z)/(Math.sqrt(V*V+W*W)*Math.sqrt(et*et+Z*Z))),N=F(1,0,t-C,e-I)-u,$=F(t-C,e-I,n-C,i-I);return[C,I,r,o,u,N,N+$]}},Cg=class extends Ar{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let h=0;h<2;++h)n=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=h==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][h].push(n*o*o+i*o+r));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},c={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},Pe=class es extends Ar{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const u=[],l=h.length;for(let p=0;p<l;p++){for(let w=p+1;w<l;w++)h[p].X===h[w].X&&h[p].Y===h[w].Y&&(w=++p);u.push({X:h[p].X,Y:h[p].Y})}const d={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const w=u*l[p]+u,x=this.base3(w,t,n,r,a),b=this.base3(w,e,i,o,c);f+=d[p]*Math.sqrt(x*x+b*b)}return u*f}length(t=1){return es.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||es.bezlen(e,n,i,r,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=es.bezlen(e,n,i,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=es.bezlen(e,n,i,r,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,c=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,h=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,w=n*this.y+e*this.c1y,x=n*this.c2x+e*this.toX,b=n*this.c2y+e*this.toY,g=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:w},end:{x,y:b},alpha:g}}},On=Math.PI*2;function mh(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function Tg(s,t,e,n,i,r,o,a,c,h){const u=h*(s-e)/2+c*(t-n)/2,l=-c*(s-e)/2+h*(t-n)/2,d=o*o,f=a*a,p=u*u,w=l*l;let x=d*f-d*w-f*p;x<0&&(x=0),x/=d*w+f*p,x=Math.sqrt(x)*(i===r?-1:1);const b=x*o/a*l,g=x*-a/o*u,v=h*b-c*g+(s+e)/2,_=c*b+h*g+(t+n)/2,E=(u-b)/o,C=(l-g)/a,I=(-u-b)/o,F=(-l-g)/a,N=mh(1,0,E,C);let $=mh(E,C,I,F);return r===0&&$>0&&($-=On),r===1&&$<0&&($+=On),[v,_,N,$]}function Eg(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function ph(s,t,e,n,i,r,o,a,c){const h=Math.sin(c*On/360),u=Math.cos(c*On/360),l=u*(s-e)/2+h*(t-n)/2,d=-h*(s-e)/2+u*(t-n)/2;if(l===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=Tg(s,t,e,n,i,r,o,a,h,u),w=[];let x=p[2],b=p[3];const g=Math.max(Math.ceil(Math.abs(b)/(On/4)),1);b/=g;for(let v=0;v<g;v++)w.push(Eg(x,b)),x+=b;return w.map(v=>{for(let _=0;_<v.length;_+=2){let E=v[_+0],C=v[_+1];E*=o,C*=a;const I=u*E-h*C,F=h*E+u*C;v[_+0]=I+p[0],v[_+1]=F+p[1]}return v})}function kr(s,t,e,n,i,r){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,i/3+.6666666666666666*e,r/3+.6666666666666666*n,i,r]}function zn(s,t,e,n){return[s,t,e,n,e,n]}const Fn={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class Ue{static createSVGElement(t="path",e){const n=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&Ve(n,e),n}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||rs()})}static downloadFromSVGElement(t,e="shape"){return Us(Wi(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return Us(wi(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return Hi(t)}static isSVGPath(t){return typeof t!="string"?!1:(t=t.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(t)&&/[\dz]$/i.test(t))}static SVGPathDataToD(t){return t.map(e=>{if(!e[0])return"";switch(e[0].toLowerCase()){case"a":return`${e[0]} ${e[1]},${e[2]} ${e[3]} ${e[4]},${e[5]} ${e[6]},${e[7]}`;case"c":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]} ${e[5]},${e[6]}`;case"s":case"q":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]}`;default:return e[0]+" "+e.slice(1).join(",")}}).join(" ")}static parseSVGPath(t){const e=[];return Ue.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(n,i,r)=>{let o=i.toLowerCase();const a=yi(r);for(o=="m"&&a.length>Fn[o]&&(e.push([i,...a.splice(0,Fn[o])]),o="l",i=i=="m"?"l":"L");a.length;){if(a.length<Fn[o])throw new Error(`parseSVGPath substring:{ ${n} } command:{ ${i} } args:{ ${a} }`);e.push([i,...a.splice(0,Fn[o])])}return o=="z"&&e.push([i]),""}),e}static absolutizeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],c=a.toUpperCase();if(a!=c)switch(o[0]=c,a){case"a":o[6]+=i,o[7]+=r;break;case"v":o[1]+=r;break;case"h":o[1]+=i;break;default:for(let h=1;h<o.length;)o[h++]+=i,o[h++]+=r}switch(c){case"Z":i=e,r=n;break;case"H":i=o[1];break;case"V":r=o[1];break;case"M":i=e=o[1],r=n=o[2];break;default:i=o[o.length-2],r=o[o.length-1]}return o})}static relativeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],c=a.toLowerCase();if(a!=c)switch(o[0]=c,a){case"A":o[6]-=i,o[7]-=r;break;case"V":o[1]-=r;break;case"H":o[1]-=i;break;default:for(let h=1;h<o.length;)o[h++]-=i,o[h++]-=r}switch(c){case"z":i=e,r=n;break;case"h":i+=o[1];break;case"v":r+=o[1];break;case"m":i+=o[1],r+=o[2],e+=o[1],n+=o[2];break;default:i+=o[o.length-2],r+=o[o.length-1]}return o})}static normalizeSVGPath(t){const e=[];let n=0,i=0,r=0,o=0,a=0,c=0,h=0,u=0,l;for(let d=0,f=t.length;d<f;d++){let p=t[d];const w=p[0];switch(w){case"M":n=p[1],i=p[2];break;case"A":const x=ph(r,o,p[6],p[7],p[4],p[5],p[1],p[2],p[3]);if(!x.length)continue;x.forEach((v,_)=>{const[E,C,I,F,N,$,V,W]=v;p=["C",I,F,N,$,V,W],_<x.length-1&&e.push(p)});break;case"S":let b=r,g=o;(l=="C"||l=="S")&&(b+=b-h,g+=g-u),p=["C",b,g,p[1],p[2],p[3],p[4]];break;case"T":l=="Q"||l=="T"?(a=r*2-a,c=o*2-c):(a=r,c=o),p=["C",...kr(r,o,a,c,p[1],p[2])];break;case"Q":a=p[1],c=p[2],p=["C",...kr(r,o,p[1],p[2],p[3],p[4])];break;case"L":p=["C",...zn(r,o,p[1],p[2])];break;case"H":p=["C",...zn(r,o,p[1],o)];break;case"V":p=["C",...zn(r,o,r,p[1])];break;case"Z":p=["C",...zn(r,o,n,i)];break}l=w,r=p[p.length-2],o=p[p.length-1],p.length>4?(h=p[p.length-4],u=p[p.length-3]):(h=r,u=o),e.push(p)}return e}static catmullRom2bezier(t){const e=[];for(let n=0,i=t.length;i-2>n;n+=2){let r;n==0?r=[{x:t[n],y:t[n+1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}]:i-4==n?r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+2],y:t[n+3]}]:r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}];const o=[{x:r[1].x,y:r[1].y},{x:(-r[0].x+6*r[1].x+r[2].x)/6,y:(-r[0].y+6*r[1].y+r[2].y)/6},{x:(r[1].x+6*r[2].x-r[3].x)/6,y:(r[1].y+6*r[2].y-r[3].y)/6},{x:r[2].x,y:r[2].y}];e.push(["C",o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y])}return e}static zvhToLSVGPath(t){const e=[];let n=["L",0,0],i;for(let r=0,o=t.length;r<o;r++){const a=t[r];switch(a[0]){case"M":n=["L",a[1],a[2]],e.push(a);break;case"Z":e.push(n);break;case"H":i=e[e.length-1]||["L",0,0],e.push(["L",a[1],i[i.length-1]]);break;case"V":i=e[e.length-1]||["L",0,0],e.push(["L",i[i.length-2],a[1]]);break;default:e.push(a)}}return e}static longhandSVGPath(t){const e={S:{to:"C",x:3},T:{to:"Q",x:1}};let n,i=0,r=0;for(let o=0,a=t.length;o<a;o++){const c=t[o],h=e[c[0]];h&&(c[0]=h.to,n&&(n[0]===h.to?(i=2*Number(n[h.x+2])-Number(n[h.x]),r=2*Number(n[h.x+3])-Number(n[h.x+1])):(i=Number(n[n.length-2]),r=Number(n[n.length-1]))),c.splice(1,0,i,r)),n=c}return t}}let Pg=class we{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(Ue.parseSVGPath(t),e):t instanceof we?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const n=Ue.normalizeSVGPath(Ue.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];if(a[0]=="M"){i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new Pe({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(r=>{({x:r.x,y:r.y}=e.transformPoint({x:r.x,y:r.y})),{x:r.c1x,y:r.c1y}=e.transformPoint({x:r.c1x,y:r.c1y}),{x:r.c2x,y:r.c2y}=e.transformPoint({x:r.c2x,y:r.c2y}),{x:r.toX,y:r.toY}=e.transformPoint({x:r.toX,y:r.toY})}))}static fromPolymorphPoints(t){const e=new we;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e.appendLine(new Pe({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new we;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e.appendLine(t[n]);return e}appendLine(t){if(t instanceof Sg){ph(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,w,x,b]=h;this.normalizedLines.push(new Pe({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:w,toX:x,toY:b})),this.prevPathX=x,this.prevPathY=b});return}let e,n,i,r,o,a;t instanceof Pe?(e=t.c1x,n=t.c1y,i=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof Cg?[e,n,i,r,o,a]=kr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=zn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Pe({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform(),i=[];i.push(["M",t,e]);for(let r=0,o=n.length;r<o;r++)i.push(...n[r].toSVGPathData());return i}toSVGPathD(){return Ue.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform();t.beginPath(),t.moveTo(e,n),i.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],n=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min.apply(0,e),r=Math.min.apply(0,n),o=Math.max.apply(0,e),a=Math.max.apply(0,n);return{x:i,y:r,width:o-i,height:a-r}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new _t;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,n=this.startPathY;({x:e,y:n}=t.transformPoint({x:e,y:n}));const i=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,c=r.c1x,h=r.c1y,u=r.c2x,l=r.c2y,d=r.toX,f=r.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:c,y:h}=t.transformPoint({x:c,y:h}),{x:u,y:l}=t.transformPoint({x:u,y:l}),{x:d,y:f}=t.transformPoint({x:d,y:f}),i.push(new Pe({x:o,y:a,c1x:c,c1y:h,c2x:u,c2y:l,toX:d,toY:f}))}),{startPathX:e,startPathY:n,normalizedLines:i}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,n)=>e+=n.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let n=0;const i=e.length;for(let r=0;r<i;r++){const o=e[r],a=o.length();if(n+a>=t)return o.getPointAtSegmentLength(t-n);n+=a}return e[i-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform(),r=i.length;if(r===0)return{x:e,y:n};if(r===1)return i[0].interpolate(t);{let o=t*r,a=i[0];if(o--,o>1)for(let c=1;c<r&&(a=i[c],o>1);c++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const n=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(n,t):n}}getSubpathsAtLength(t,e,n){const{startPathX:i,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new we;h.prevPathX=h.startPathX=i,h.prevPathY=h.startPathY=r;for(let u=0,l=o.length;u<l;u++){const d=o[u],f=d.length();if(c+f>e&&!a){const p=d.getPointAtSegmentLength(e-c);if(h.appendLine(new Pe({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),n)return h;a=h,h.appendLine(new Pe({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=n;h+=a){const u=this.getPointAtLength(h),l=Math.pow(Ee(u.x,u.y,t,e),2);l<o&&(i=u,r=h,o=l)}for(a/=2;a>.5;){const h=r-a,u=this.getPointAtLength(h),l=Math.pow(Ee(u.x,u.y,t,e),2),d=r+a,f=this.getPointAtLength(d),p=Math.pow(Ee(f.x,f.y,t,e),2);h>=0&&l<o?(i=u,r=h,o=l):d<=n&&p<o?(i=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Qt(c.x,c.y,i.x,i.y):Qt(i.x,i.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform();return[t,e].concat(n.reduce((i,r)=>i.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Ee(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,u,l,d,f]);let p=0;for(;p<r&&i>0;)o.push(["C",d,f,d,f,d,f]),i-=6,p++}return o}static mixPoints(t,e,n){const i=t.length,r=new Array(i);for(let o=0;o<i;o++)r[o]=Q(t[o]+(e[o]-t[o])*n,6);return r}static getPathInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?t:Math.abs(n-1)<Number.EPSILON?e:we.fromPolymorphPoints(we.mixPoints(new we({d:t}).polymorphPoints,new we({d:e}).polymorphPoints,n)).toSVGPathData()}},Mg=class extends Ii{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];constructor(t){if(super(),this.id=rs(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const n=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",n),this.strokeDashTotalLength=yi(n).reduce((i,r)=>i+r,0)}return Aa(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new Pg,Wt(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(n=>{const i=n.originMatrix?n.originMatrix.clone():new _t;i.translate(-t.x+n.x,-t.y+n.y),n.originMatrix=i});const e=this.originMatrix?this.originMatrix.clone():new _t;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,n){if(n instanceof Mr)return n.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(i);{const r=this.getBoundingClientRect();if(r)return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height}return!1}isPointInStroke(t,e,n){if(n instanceof Mr)return n.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(i):!1}clone(){return ua(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([n,i])=>[bt(n),i]))):e&&(this.attrs[bt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[bt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[bt(t)]}distance(t){return Ee(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Et(Qt(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:n,dy:i}=hn(J(this.degree),e);this.vx=n,this.vy=i,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:n,dy:i}=hn(J(this.degree),e);this.ax=n,this.ay=i,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,c=o*n/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=Ht(t?.gravity,0);this.vy+=e;const n=Ht(t?.friction,1);this.vx*=n,this.vy*=n,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const n=Ht(e?.easing,.05),i=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=i*n,this.vy=r*n,this.run(e)}runSpringTo(t,e){const n=Ht(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.cX-this.x,o=i.y-this.cY-this.y,a=r*n,c=o*n;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const n=Ht(e?.springLength,100),i=Ht(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const c=r*i,h=o*i;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/n}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const n=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*n),this.getPointAtLength(e*n)}strokeDashTween(t=1e3,e){const n=this.initPathD(),i=Q(n.getTotalLength(),0);this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const r=e?.onUpdate,o=new Rn({frameDuration:t});o.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+Q(a.offset,2)),r?.(a,c)}})),o.play()}};class Ag extends Mg{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,n){this.cX=t,this.cY=e,this.cZ=n}rotateX(t){({x:this.y,y:this.z}=te(J(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=te(J(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=te(J(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return cn(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,n=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+n*n+i*i)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y,i=this.z;return{x:n*t.z-i*t.y,y:i*t.x-e*t.z,z:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const Bs=Ag;class Ir{_x;_y;_z;_w;constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,o,a){let c=n[i+0],h=n[i+1],u=n[i+2],l=n[i+3];const d=r[o+0],f=r[o+1],p=r[o+2],w=r[o+3];if(a===0){t[e+0]=c,t[e+1]=h,t[e+2]=u,t[e+3]=l;return}if(a===1){t[e+0]=d,t[e+1]=f,t[e+2]=p,t[e+3]=w;return}if(l!==w||c!==d||h!==f||u!==p){let x=1-a;const b=c*d+h*f+u*p+l*w,g=b>=0?1:-1,v=1-b*b;if(v>Number.EPSILON){const E=Math.sqrt(v),C=Math.atan2(E,b*g);x=Math.sin(x*C)/E,a=Math.sin(a*C)/E}const _=a*g;if(c=c*x+d*_,h=h*x+f*_,u=u*x+p*_,l=l*x+w*_,x===1-a){const E=1/Math.sqrt(c*c+h*h+u*u+l*l);c*=E,h*=E,u*=E,l*=E}}t[e]=c,t[e+1]=h,t[e+2]=u,t[e+3]=l}static multiplyQuaternionsFlat(t,e,n,i,r,o){const a=n[i],c=n[i+1],h=n[i+2],u=n[i+3],l=r[o],d=r[o+1],f=r[o+2],p=r[o+3];return t[e]=a*p+u*l+c*f-h*d,t[e+1]=c*p+u*d+h*l-a*f,t[e+2]=h*p+u*f+a*d-c*l,t[e+3]=u*p-a*l-c*d-h*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t=this._x,e=this._y,n=this._z,i=this._w){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new Ir(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t.x,i=t.y,r=t.z,o=t.order,a=Math.cos,c=Math.sin,h=a(n/2),u=a(i/2),l=a(r/2),d=c(n/2),f=c(i/2),p=c(r/2);switch(o){case"XYZ":this._x=d*u*l+h*f*p,this._y=h*f*l-d*u*p,this._z=h*u*p+d*f*l,this._w=h*u*l-d*f*p;break;case"YXZ":this._x=d*u*l+h*f*p,this._y=h*f*l-d*u*p,this._z=h*u*p-d*f*l,this._w=h*u*l+d*f*p;break;case"ZXY":this._x=d*u*l-h*f*p,this._y=h*f*l+d*u*p,this._z=h*u*p+d*f*l,this._w=h*u*l-d*f*p;break;case"ZYX":this._x=d*u*l-h*f*p,this._y=h*f*l+d*u*p,this._z=h*u*p-d*f*l,this._w=h*u*l+d*f*p;break;case"YZX":this._x=d*u*l+h*f*p,this._y=h*f*l+d*u*p,this._z=h*u*p-d*f*l,this._w=h*u*l-d*f*p;break;case"XZY":this._x=d*u*l-h*f*p,this._y=h*f*l-d*u*p,this._z=h*u*p+d*f*l,this._w=h*u*l+d*f*p;break;default:console.warn("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix4(t){const e=t.value,n=e[0],i=e[4],r=e[8],o=e[1],a=e[5],c=e[9],h=e[2],u=e[6],l=e[10],d=n+a+l;if(d>0){const f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(u-c)*f,this._y=(r-h)*f,this._z=(o-i)*f}else if(n>a&&n>l){const f=2*Math.sqrt(1+n-a-l);this._w=(u-c)/f,this._x=.25*f,this._y=(i+o)/f,this._z=(r+h)/f}else if(a>l){const f=2*Math.sqrt(1+a-n-l);this._w=(r-h)/f,this._x=(i+o)/f,this._y=.25*f,this._z=(c+u)/f}else{const f=2*Math.sqrt(1+l-n-a);this._w=(o-i)/f,this._x=(r+h)/f,this._y=(c+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(B(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(n===0)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,o=t._w,a=e._x,c=e._y,h=e._z,u=e._w;return this._x=n*u+o*a+i*h-r*c,this._y=i*u+o*c+r*a-n*h,this._z=r*u+o*h+n*c-i*a,this._w=o*u-n*a-i*c-r*h,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const c=1-a*a;if(c<=Number.EPSILON){const f=1-e;return this._w=f*o+e*this._w,this._x=f*n+e*this._x,this._y=f*i+e*this._y,this._z=f*r+e*this._z,this.normalize(),this}const h=Math.sqrt(c),u=Math.atan2(h,a),l=Math.sin((1-e)*u)/h,d=Math.sin(e*u)/h;return this._w=o*l+this._w*d,this._x=n*l+this._x*d,this._y=i*l+this._y*d,this._z=r*l+this._z*d,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Bn{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new Bn(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y;return this.x=t.m11*e+t.m21*n+t.m31,this.y=t.m12*e+t.m22*n+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=B(this.x,t.x,e.x),this.y=B(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=B(this.x,t,e),this.y=B(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return gh.copy(this).projectOnVector(t),this.sub(gh)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(B(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ft{x=0;y=0;z=0;constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t=0,e=0,n=0){return this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new Ft(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(yh.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(yh.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.value,o=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,o=t.y,a=t.z,c=t.w,h=2*(o*i-a*n),u=2*(a*e-r*i),l=2*(r*n-o*e);return this.x=e+c*h+o*l-a*u,this.y=n+c*u+a*h-r*l,this.z=i+c*l+r*u-o*h,this}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=B(this.x,t.x,e.x),this.y=B(this.y,t.y,e.y),this.z=B(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=B(this.x,t,e),this.y=B(this.y,t,e),this.z=B(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,o=e.x,a=e.y,c=e.z;return this.x=i*c-r*a,this.y=r*o-n*c,this.z=n*a-i*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return Rr.copy(this).projectOnVector(t),this.sub(Rr)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(Rr.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(B(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),n=this.setFromMatrix4Column(t,1).length(),i=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}setFromEuler(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Dr{x=0;y=0;z=0;w=1;constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,n=0,i=1){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Dr(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix4(t){let e,n,i,r;const c=t.value,h=c[0],u=c[4],l=c[8],d=c[1],f=c[5],p=c[9],w=c[2],x=c[6],b=c[10];if(Math.abs(u-d)<.01&&Math.abs(l-w)<.01&&Math.abs(p-x)<.01){if(Math.abs(u+d)<.1&&Math.abs(l+w)<.1&&Math.abs(p+x)<.1&&Math.abs(h+f+b-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const v=(h+1)/2,_=(f+1)/2,E=(b+1)/2,C=(u+d)/4,I=(l+w)/4,F=(p+x)/4;return v>_&&v>E?v<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(v),i=C/n,r=I/n):_>E?_<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(_),n=C/i,r=F/i):E<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),n=I/r,i=F/r),this.set(n,i,r,e),this}let g=Math.sqrt((x-p)*(x-p)+(l-w)*(l-w)+(d-u)*(d-u));return Math.abs(g)<.001&&(g=1),this.x=(x-p)/g,this.y=(l-w)/g,this.z=(d-u)/g,this.w=Math.acos((h+f+b-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=B(this.x,t.x,e.x),this.y=B(this.y,t.y,e.y),this.z=B(this.z,t.z,e.z),this.w=B(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=B(this.x,t,e),this.y=B(this.y,t,e),this.z=B(this.z,t,e),this.w=B(this.w,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(B(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const gh=new Bn,Rr=new Ft,yh=new Ir,Nn=2e3,Lr=2001,wh=[1,0,0,1],bh=[1,0,0,1,0,0],xh=[1,0,0,0,1,0,0,0,1],vh=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Or{value;constructor(t=wh){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,n=0,i=1){return this.m11=t,this.m21=e,this.m12=n,this.m22=i,this}identity(){return this.value=Array.from(wh),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new Or(this.value)}fromArray(t,e=0){for(let n=0;n<4;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[2],c=n[1],h=n[3],u=i[0],l=i[2],d=i[1],f=i[3];return r[0]=o*u+a*d,r[2]=o*l+a*f,r[1]=c*u+h*d,r[3]=c*l+h*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class un{value;constructor(t=xh){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,n=0,i=0,r=1,o=0,a=0,c=0,h=1){const u=this.value;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=r,u[5]=c,u[6]=n,u[7]=o,u[8]=h,this}identity(){return this.value=Array.from(xh),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new un(this.value)}fromArray(t,e=0){for(let n=0;n<9;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[3],c=n[6],h=n[1],u=n[4],l=n[7],d=n[2],f=n[5],p=n[8],w=i[0],x=i[3],b=i[6],g=i[1],v=i[4],_=i[7],E=i[2],C=i[5],I=i[8];return r[0]=o*w+a*g+c*E,r[3]=o*x+a*v+c*C,r[6]=o*b+a*_+c*I,r[1]=h*w+u*g+l*E,r[4]=h*x+u*v+l*C,r[7]=h*b+u*_+l*I,r[2]=d*w+f*g+p*E,r[5]=d*x+f*v+p*C,r[8]=d*b+f*_+p*I,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8];return e*o*u-e*a*h-n*r*u+n*a*c+i*r*h-i*o*c}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=u*o-a*h,d=a*c-u*r,f=h*r-o*c,p=e*l+n*d+i*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/p;return t[0]=l*w,t[1]=(i*h-u*n)*w,t[2]=(a*n-i*o)*w,t[3]=d*w,t[4]=(u*e-i*c)*w,t[5]=(i*r-a*e)*w,t[6]=f*w,t[7]=(n*c-h*e)*w,t[8]=(o*e-n*r)*w,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,o,a){const c=Math.cos(r),h=Math.sin(r);return this.set(n*c,n*h,-n*(c*o+h*a)+o+t,-i*h,i*c,-i*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(zr.makeScale(t,e)),this}rotate(t){return this.premultiply(zr.makeRotation(-t)),this}translate(t,e){return this.premultiply(zr.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class Dt{value;is3dSpecial=!1;constructor(t=vh){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,n=0,i=0,r=0,o=1,a=0,c=0,h=0,u=0,l=1,d=0,f=0,p=0,w=0,x=1){const b=this.value;return b[0]=t,b[4]=e,b[8]=n,b[12]=i,b[1]=r,b[5]=o,b[9]=a,b[13]=c,b[2]=h,b[6]=u,b[10]=l,b[14]=d,b[3]=f,b[7]=p,b[11]=w,b[15]=x,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(vh),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new Dt(this.value)}static fromString(t){const e=new Dt,n=sa("number",t);return n.length===16&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}fromArray(t,e=0){for(let n=0;n<16;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.value;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}copyPosition(t){const e=this.value,n=t.value;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),n.setFromMatrix4Column(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,n=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+n*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+n*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+n*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+n*this.m44}}toMatrix(t){const{scalarX:e,scalarY:n,skewX:i,skewY:r,x:o,y:a}=this.split(),c=[e,r,i,n,o,a];return t?(t.value=c,t):new _t(c)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>Q(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),n=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),i=Et(B(Math.asin(-this.m13),-1,1));let r=Et(Math.atan2(this.m23,this.m33));Math.cos(J(i))===0&&(r=Et(Math.atan2(-this.m31,this.m22)));let o=Et(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:n,degreeX:r,degreeY:i,degreeZ:o,skewX:Et(this.m14),skewY:Et(this.m24),skewZ:Et(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,n=t.value,i=1/ln.setFromMatrix4Column(t,0).length(),r=1/ln.setFromMatrix4Column(t,1).length(),o=1/ln.setFromMatrix4Column(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.value,n=t.x,i=t.y,r=t.z,o=Math.cos(n),a=Math.sin(n),c=Math.cos(i),h=Math.sin(i),u=Math.cos(r),l=Math.sin(r);if(t.order==="XYZ"){const d=o*u,f=o*l,p=a*u,w=a*l;e[0]=c*u,e[4]=-c*l,e[8]=h,e[1]=f+p*h,e[5]=d-w*h,e[9]=-a*c,e[2]=w-d*h,e[6]=p+f*h,e[10]=o*c}else if(t.order==="YXZ"){const d=c*u,f=c*l,p=h*u,w=h*l;e[0]=d+w*a,e[4]=p*a-f,e[8]=o*h,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=f*a-p,e[6]=w+d*a,e[10]=o*c}else if(t.order==="ZXY"){const d=c*u,f=c*l,p=h*u,w=h*l;e[0]=d-w*a,e[4]=-o*l,e[8]=p+f*a,e[1]=f+p*a,e[5]=o*u,e[9]=w-d*a,e[2]=-o*h,e[6]=a,e[10]=o*c}else if(t.order==="ZYX"){const d=o*u,f=o*l,p=a*u,w=a*l;e[0]=c*u,e[4]=p*h-f,e[8]=d*h+w,e[1]=c*l,e[5]=w*h+d,e[9]=f*h-p,e[2]=-h,e[6]=a*c,e[10]=o*c}else if(t.order==="YZX"){const d=o*c,f=o*h,p=a*c,w=a*h;e[0]=c*u,e[4]=w-d*l,e[8]=p*l+f,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-h*u,e[6]=f*l+p,e[10]=d-w*l}else if(t.order==="XZY"){const d=o*c,f=o*h,p=a*c,w=a*h;e[0]=c*u,e[4]=-l,e[8]=h*u,e[1]=d*l+w,e[5]=o*u,e[9]=f*l-p,e[2]=p*l-f,e[6]=a*u,e[10]=w*l+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(kg,t,Ig)}lookAt(t,e,n){const i=this.value;return Bt.subVectors(t,e),Bt.lengthSq()===0&&(Bt.z=1),Bt.normalize(),Me.crossVectors(n,Bt),Me.lengthSq()===0&&(Math.abs(n.z)===1?Bt.x+=1e-4:Bt.z+=1e-4,Bt.normalize(),Me.crossVectors(n,Bt)),Me.normalize(),Ns.crossVectors(Bt,Me),i[0]=Me.x,i[4]=Ns.x,i[8]=Bt.x,i[1]=Me.y,i[5]=Ns.y,i[9]=Bt.y,i[2]=Me.z,i[6]=Ns.z,i[10]=Bt.z,this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[4],c=n[8],h=n[12],u=n[1],l=n[5],d=n[9],f=n[13],p=n[2],w=n[6],x=n[10],b=n[14],g=n[3],v=n[7],_=n[11],E=n[15],C=i[0],I=i[4],F=i[8],N=i[12],$=i[1],V=i[5],W=i[9],et=i[13],Z=i[2],Gt=i[6],mt=i[10],At=i[14],Lt=i[3],L=i[7],R=i[11],X=i[15];return r[0]=o*C+a*$+c*Z+h*Lt,r[4]=o*I+a*V+c*Gt+h*L,r[8]=o*F+a*W+c*mt+h*R,r[12]=o*N+a*et+c*At+h*X,r[1]=u*C+l*$+d*Z+f*Lt,r[5]=u*I+l*V+d*Gt+f*L,r[9]=u*F+l*W+d*mt+f*R,r[13]=u*N+l*et+d*At+f*X,r[2]=p*C+w*$+x*Z+b*Lt,r[6]=p*I+w*V+x*Gt+b*L,r[10]=p*F+w*W+x*mt+b*R,r[14]=p*N+w*et+x*At+b*X,r[3]=g*C+v*$+_*Z+E*Lt,r[7]=g*I+v*V+_*Gt+E*L,r[11]=g*F+v*W+_*mt+E*R,r[15]=g*N+v*et+_*At+E*X,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],n=t[4],i=t[8],r=t[12],o=t[1],a=t[5],c=t[9],h=t[13],u=t[2],l=t[6],d=t[10],f=t[14],p=t[3],w=t[7],x=t[11],b=t[15];return p*(+r*c*l-i*h*l-r*a*d+n*h*d+i*a*f-n*c*f)+w*(+e*c*f-e*h*d+r*o*d-i*o*f+i*h*u-r*c*u)+x*(+e*h*l-e*a*f-r*o*l+n*o*f+r*a*u-n*h*u)+b*(-i*a*u-e*c*l+e*a*d+i*o*l-n*o*d+n*c*u)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.value;return t instanceof Ft?(i[12]=t.x,i[13]=t.y,i[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=t[9],d=t[10],f=t[11],p=t[12],w=t[13],x=t[14],b=t[15],g=l*x*h-w*d*h+w*c*f-a*x*f-l*c*b+a*d*b,v=p*d*h-u*x*h-p*c*f+o*x*f+u*c*b-o*d*b,_=u*w*h-p*l*h+p*a*f-o*w*f-u*a*b+o*l*b,E=p*l*c-u*w*c-p*a*d+o*w*d+u*a*x-o*l*x,C=e*g+n*v+i*_+r*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/C;return t[0]=g*I,t[1]=(w*d*r-l*x*r-w*i*f+n*x*f+l*i*b-n*d*b)*I,t[2]=(a*x*r-w*c*r+w*i*h-n*x*h-a*i*b+n*c*b)*I,t[3]=(l*c*r-a*d*r-l*i*h+n*d*h+a*i*f-n*c*f)*I,t[4]=v*I,t[5]=(u*x*r-p*d*r+p*i*f-e*x*f-u*i*b+e*d*b)*I,t[6]=(p*c*r-o*x*r-p*i*h+e*x*h+o*i*b-e*c*b)*I,t[7]=(o*d*r-u*c*r+u*i*h-e*d*h-o*i*f+e*c*f)*I,t[8]=_*I,t[9]=(p*l*r-u*w*r-p*n*f+e*w*f+u*n*b-e*l*b)*I,t[10]=(o*w*r-p*a*r+p*n*h-e*w*h-o*n*b+e*a*b)*I,t[11]=(u*a*r-o*l*r-u*n*h+e*l*h+o*n*f-e*a*f)*I,t[12]=E*I,t[13]=(u*w*i-p*l*i+p*n*d-e*w*d-u*n*x+e*l*x)*I,t[14]=(p*a*i-o*w*i-p*n*c+e*w*c+o*n*x-e*a*x)*I,t[15]=(o*l*i-u*a*i+u*n*c-e*l*c-o*n*d+e*a*d)*I,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t instanceof Ft?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,o=t.x,a=t.y,c=t.z,h=r*o,u=r*a;return this.set(h*o+n,h*a-i*c,h*c+i*a,0,h*a+i*c,u*a+n,u*c-i*o,0,h*c-i*a,u*c+i*o,r*c*c+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,o){return this.set(1,n,r,0,t,1,o,0,e,i,1,0,0,0,0,1),this}makePerspective(t,e,n,i,r,o,a=Nn){const c=this.value,h=2*r/(e-t),u=2*r/(n-i),l=(e+t)/(e-t),d=(n+i)/(n-i);let f,p;if(a===Nn)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===Lr)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=l,c[12]=0,c[1]=0,c[5]=u,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,n,i,r,o,a=Nn){const c=this.value,h=1/(e-t),u=1/(n-i),l=1/(o-r),d=(e+t)*h,f=(n+i)*u;let p,w;if(a===Nn)p=(o+r)*l,w=-2*l;else if(a===Lr)p=r*l,w=-1*l;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*h,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=w,c[14]=-p,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}compose(t,e,n){const i=this.value,r=e.x,o=e.y,a=e.z,c=e.w,h=r+r,u=o+o,l=a+a,d=r*h,f=r*u,p=r*l,w=o*u,x=o*l,b=a*l,g=c*h,v=c*u,_=c*l,E=n.x,C=n.y,I=n.z;return i[0]=(1-(w+b))*E,i[1]=(f+_)*E,i[2]=(p-v)*E,i[3]=0,i[4]=(f-_)*C,i[5]=(1-(d+b))*C,i[6]=(x+g)*C,i[7]=0,i[8]=(p+v)*I,i[9]=(x-g)*I,i[10]=(1-(d+w))*I,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.value;let r=ln.set(i[0],i[1],i[2]).length();const o=ln.set(i[4],i[5],i[6]).length(),a=ln.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Kt.copy(this);const h=1/r,u=1/o,l=1/a;return Kt.value[0]*=h,Kt.value[1]*=h,Kt.value[2]*=h,Kt.value[4]*=u,Kt.value[5]*=u,Kt.value[6]*=u,Kt.value[8]*=l,Kt.value[9]*=l,Kt.value[10]*=l,e.setFromRotationMatrix4(Kt),n.x=r,n.y=o,n.z=a,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,n=0){return this.multiply(new Dt([1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1]))}scale(t=1,e=1,n=1){return this.multiply(new Dt([t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1]))}scaleVector3(t){const e=this.value,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}rotateX(t){const e=J(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Dt([1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1]))}rotateY(t){const e=J(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Dt([n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=J(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Dt([n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,n=0){return this.multiply(new Dt([1,0,0,J(t),0,1,0,J(e),0,0,1,J(n),0,0,0,1]))}perspective(t){return this.multiply(new Dt([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,n=t.x*this.m12+t.y*this.m22+this.m42,i=t.x*this.m13+t.y*this.m23+this.m43,r=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=n+this.m32,c=i+this.m33,h=r+this.m34;r==0&&(r=1e-4),e/=r,n/=r,i/=r,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const u=c-i;if(u==0)return{x:e,y:n,z:i,mass:r};const l=-i/u;return e+=l*(o-e),n+=l*(a-n),{x:e,y:n,z:i,mass:r}}project(t){const e=t.z;let n=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,i=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,r=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return r==0&&(r=1e-4),n/=r,i/=r,r<0&&(n-=this.m41,i-=this.m42,n*=1/r,i*=1/r,n+=this.m41,i+=this.m42),{x:n,y:i,z:e,mass:r}}bounds(t,e,n,i){const r=new Bs({x:t,y:e}),o=new Bs({x:t+n,y:e}),a=new Bs({x:t+n,y:e+i}),c=new Bs({x:t,y:e+i});({x:r.x,y:r.y,z:r.z,mass:r.mass}=this.project(r)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(r.x,o.x,a.x,c.x),u=Math.min(r.y,o.y,a.y,c.y),l=Math.max(r.x,o.x,a.x,c.x)-h,d=Math.max(r.y,o.y,a.y,c.y)-u;return{x:h,y:u,width:l,height:d}}}class _t{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=bh){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new _t,n=sa("number",t);return n.length===6&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new Dt(e)}identity(){return this.value=Array.from(bh),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new _t(this.value)}multiply(t){const e=this.clone(),n=t instanceof _t?t:new _t(t);return this.m11=n.m11*e.m11+n.m12*e.m21+n.m13*e.m31,this.m12=n.m11*e.m12+n.m12*e.m22+n.m13*e.m32,this.m13=n.m11*e.m13+n.m12*e.m23+n.m13*e.m33,this.m21=n.m21*e.m11+n.m22*e.m21+n.m23*e.m31,this.m22=n.m21*e.m12+n.m22*e.m22+n.m23*e.m32,this.m23=n.m21*e.m13+n.m22*e.m23+n.m23*e.m33,this.m31=n.m31*e.m11+n.m32*e.m21+n.m33*e.m31,this.m32=n.m31*e.m12+n.m32*e.m22+n.m33*e.m32,this.m33=n.m31*e.m13+n.m32*e.m23+n.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}invert(){const t=this.m11,e=this.m12,n=this.m13,i=this.m21,r=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,u=h*r-o*c,l=-h*i+o*a,d=c*i-r*a;let f=t*u+e*l+n*d;return f?(f=1/f,this.m11=u*f,this.m12=(-h*e+n*c)*f,this.m13=(o*e-n*r)*f,this.m21=l*f,this.m22=(h*t-n*a)*f,this.m23=(-o*t+n*i)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(r*t-e*i)*f,this):null}adjugate(){const t=new _t;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=Et(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:Et(Math.atan2(-this.m21,this.m22)),skewY:Et(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],n=this.value[1],i=this.value[2],r=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],u=t.value[2],l=t.value[3],d=t.value[4],f=t.value[5],p=c*l,w=h*u,x=(u*n-e*l)/(w-p),b=(c*n-e*h)/(p-w),g=(u*r-i*l)/(w-p),v=(c*r-i*h)/(p-w),_=(u*(a-f)+l*(d-o))/(w-p),E=(c*(a-f)+h*(d-o))/(p-w),C=[x,b,g,v,_,E];return new _t(C)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>Q(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,n){return this.matrix4.translate(t,e,n),this.matrix4.toMatrix(this),this}translate3dTo(t,e,n){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,n-this.matrix4.m43),this}rotate(t,e=0,n=0){const i=J(t),r=Math.cos(i),o=Math.sin(i);return this.translate(e,n),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-n),this.toMatrix4(),this}rotateTo(t,e=0,n=0){const{degree:i}=this.split();return this.rotate(t-i,e,n),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,n){return this.matrix4.rotateX(t).rotateY(e).rotateZ(n),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,n){const{degreeX:i,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-i,e-r,n-o),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.multiply([t,0,0,e,0,0]),this.translate(-n,-i),this.toMatrix4(),this}scaleTo(t,e=t,n=0,i=0){return this.scale(t/this.m11,e/this.m22,n,i)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,n=t){return this.matrix4.scale(t,e,n),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,n=t){const{scalarX:i,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/i,e/r,n/o),this}skew(t,e=t){return this.multiply([Math.cos(J(e)),Math.sin(J(e)),-Math.sin(J(t)),Math.cos(J(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:n,skewY:i}=this.split();return this.skew(t-n,e-i)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,n){return this}skew3dTo(t,e,n){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const kg=new Ft(0,0,0),Ig=new Ft(1,1,1),Me=new Ft,Ns=new Ft,Bt=new Ft,ln=new Ft,zr=new un,Kt=new Dt;function Fr(s){const t=new _t;return s.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,n,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const r=[];for(let o=0,a=i.length;o<a;o++)i[o].trim()&&r.push(parseFloat(""+i[o]));switch(n.toLowerCase()){case"t":case"translate":t.translate(r[0],r[1]);break;case"translatex":t.translateX(r[0]);break;case"translatey":t.translateY(r[0]);break;case"translatez":t.translateZ(r[0]);break;case"translate3d":t.translate3d(r[0],r[1],r[2]);break;case"r":case"rotate":t.rotate(r[0],r[1]??0,r[2]??0);break;case"rotatex":t.rotateX(r[0]);break;case"rotatey":t.rotateY(r[0]);break;case"rotatez":t.rotateZ(r[0]);break;case"rotate3d":t.rotate3d(r[0],r[1],r[2]);break;case"s":case"scale":t.scale(r[0],r[1]??r[0]);break;case"scalex":t.scaleX(r[0]);break;case"scaley":t.scaleY(r[0]);break;case"scalez":t.scaleZ(r[0]);break;case"scale3d":t.scale3d(r[0],r[1],r[2]);break;case"skew":t.skew(r[0],r[1]??0);break;case"skewx":t.skewX(r[0]);break;case"skewy":t.skewY(r[0]);break;case"skewz":t.skewZ(r[0]);break;case"skew3d":t.skew3d(r[0],r[1],r[2]);break;case"m":case"matrix":t.multiply([r[0],r[1],r[2],r[3],r[4],r[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new Dt(r)),t.matrix4.toMatrix(t);break}return""}),t}function te(s,t,e){const n=new _t;return n.rotate(Et(s)),n.transformPoint({x:t,y:e})}function Br(s){const t=typeof s?.x=="number"?s?.x:0,e=typeof s?.y=="number"?s?.y:0,n=typeof s?.degree=="number"?s?.degree:0,i=typeof s?.scalarX=="number"?s?.scalarX:1,r=typeof s?.scalarY=="number"?s?.scalarY:1,o=J(n),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*i,c*i,-c*r,a*r,t,e]);return h.multiplySelf(new DOMMatrix(s?.originMatrix||"")),h}function Dg(s,t){const e=new Path2D(s),n=new Path2D;return n.addPath(e,Br(t)),n}function $e(s,t,e){const n=Tr(s);return n.props.style=n.props.style||{},t?n.props.style[t]||n.props.style[ra(t)]||n.props.style[bt(t)]||"":n.props.style}function Nr(s,t,e){Er(s,n=>{n.props.style=n.props.style||{},typeof t=="string"&&e?n.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(i=>{n.props.style[i]=t[i]})},!0)}function Yr(s){const t={};if(getComputedStyle){const e=getComputedStyle(s);for(let n=0,i=e.length;n<i;n++)t[e[n]]=e.getPropertyValue(t[n])}else{const e=s.currentStyle;for(const n in e)t[n]=e[n]}return s.style.cssText&&s.style.cssText.split(";").filter(e=>!!e).forEach(e=>{const[n,i]=e.split(":");n&&i&&(t[n.trim()]=i.trim())}),t}function Rg(s,t,e){let n=s.style[t]||"";if(!n&&getComputedStyle){t=bt(t);const i=getComputedStyle(s,e),r=i.getPropertyPriority(t);n=i.getPropertyValue(t).trim()+(r?"!"+r:"")}return n||(n=s.currentStyle[t]||""),n}function Ys(s,t,e){typeof t=="string"&&e?s.style.setProperty(bt(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(n=>{Ys(s,n,t[n])})}function Xr(s,t){typeof t=="string"?s.style.removeProperty(bt(t)):Object.keys(t).forEach(e=>{Xr(s,e)})}function _h(s,t){let e;if(typeof t=="string"){const n=document.querySelector(t)?.shadowRoot;n?e=n:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const n=document.createElement("style");return n.innerHTML=s,e.appendChild(n),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(n)}}else{const n=document.styleSheets[0].insertRule(s);return()=>{document.styleSheets[0].deleteRule(n)}}}function Lg(s,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:$e(s,"transform")||""});const n=Fr(e.transform),i={};for(const r in t){const o=t[r];switch(r){case"transform":break;case"translate":n.translate(o[0]||0,o[1]||0);break;case"translateTo":n.translateTo(o[0]||0,o[1]||0);break;case"translateX":n.translateX(o||0);break;case"translateXTo":n.translateXTo(o||0);break;case"translateY":n.translateY(o||0);break;case"translateYTo":n.translateYTo(o||0);break;case"translateZ":n.translateZ(o||0);break;case"translateZTo":n.translateZTo(o||0);break;case"translate3d":n.translate3d(o[0]||0,o[1]||0,o[2]||0);break;case"translate3dTo":n.translate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotate":typeof o=="number"?n.rotate(o||0):n.rotate(o[0]||0,o[1]||0,o[2]||0);break;case"rotateTo":typeof o=="number"?n.rotateTo(o||0):n.rotateTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotateX":n.rotateX(o||0);break;case"rotateXTo":n.rotateXTo(o||0);break;case"rotateY":n.rotateY(o||0);break;case"rotateYTo":n.rotateYTo(o||0);break;case"rotateZ":n.rotateZ(o||0);break;case"rotateZTo":n.rotateZTo(o||0);break;case"rotate3d":n.rotate3d(o[0]||0,o[1]||0,o[2]||0);break;case"rotate3dTo":n.rotate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"scale":typeof o=="number"?n.scale(o||1):n.scale(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleTo":typeof o=="number"?n.scaleTo(o||1):n.scaleTo(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleX":n.scaleX(o||1);break;case"scaleXTo":n.scaleXTo(o||1);break;case"scaleY":n.scaleY(o||1);break;case"scaleYTo":n.scaleYTo(o||1);break;case"scaleZ":n.scaleZ(o||1);break;case"scaleZTo":n.scaleZTo(o||1);break;case"scale3d":typeof o=="number"?n.scale3d(o||1):n.scale3d(o[0]||1,o[1]||1,o[2]||1);break;case"scale3dTo":typeof o=="number"?n.scale3dTo(o||1):n.scale3dTo(o[0]||1,o[1]||1,o[2]||1);break;case"skew":typeof o=="number"?n.skew(o||0):n.skew(o[0]||0,o[1]||0);break;case"skewTo":typeof o=="number"?n.skewTo(o||0):n.skewTo(o[0]||0,o[1]||0);break;case"skewX":n.skewX(o||0);break;case"skewXTo":n.skewXTo(o||0);break;case"skewY":n.skewY(o||0);break;case"skewYTo":n.skewYTo(o||0);break;case"skewZ":break;case"skewZTo":break;case"skew3d":break;case"skew3dTo":break;case"perspective":n.perspective(o||0);break;default:Object.prototype.hasOwnProperty.call(e,r)||(e[r]=$e(s,r)),Object.assign(i,{[r]:`${o}`});break}}return Object.assign(i,{transform:n.toString()}),i}function Ve(s,t,e){if(t===void 0&&e===void 0)return Ur(s);if(typeof t=="string"&&e===void 0)return Sh(s,t);let n={};typeof t=="object"?n=t:typeof t=="string"&&typeof e=="string"&&(n[t]=""+e),Er(s,i=>{Object.entries(n).forEach(([r,o])=>{i.props[r]=""+o})})}const Og=["-o-","-ms-","-moz-","-webkit-",""];function Ur(s){const t={};for(let e=0,n=s.attributes,i=n.length;e<i;e++){const r=n[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=Yr(s):t[r.nodeName]=r.nodeValue)}return t}function Sh(s,t){return t==="style"?Yr(s):s.getAttribute(bt(t))}function fn(s,t,e){return s.setAttribute(bt(t),""+e)}function zg(s,t){t.split(/[,\s]+/i).forEach(e=>{const n=bt(e.trim());n!=""&&s.removeAttribute(n)})}function Ch(s,t){for(const e in t){const n=t[e];switch(e){case"fill":n!=="none"&&(s.fillStyle=n);break;case"stroke":n!=="none"&&(s.strokeStyle=n);break;case"stroke-width":case"strokeWidth":s.lineWidth=Number(n);break;case"stroke-linecap":case"strokeLinecap":s.lineCap=n;break;case"stroke-linejoin":case"strokeLinejoin":switch(n){case"round":case"bevel":case"miter":s.lineJoin=n;break;default:s.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":s.miterLimit=Number(n);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":s.lineDashOffset=Number(n);break;case"stroke-dasharray":case"strokeDasharray":typeof n=="string"&&s.setLineDash(n.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof n=="string"&&(s.font=n);break;case"font-size":case"fontSize":s.font+=` ${n}`;break;case"font-family":case"fontFamily":s.font+=` ${n}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(n){case"middle":s.textAlign="center";break;case"end":s.textAlign="end";break;case"start":s.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(n){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":s.textBaseline=n;break;default:s.textBaseline="alphabetic";break}break}}}function Fg(s,t,e,n,i){const r=t/e;let o=0,a=0;switch(s){case"aspectFit":r>=1?(o=n,a=o/r,a>i&&(a=i,o=a*r)):(a=i,o=a*r,o>n&&(o=n,a=o/r));break;case"aspectFill":r>=1?(a=i,o=a*r):(o=n,a=o/r);break;case"widthFix":o=n,a=o/r;break;case"heightFix":a=i,o=a*r;break;case"scaleToFill":default:o=n,a=i;break}return{width:o,height:a}}function Th(s){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=s.width,t.height=s.height,e.drawImage(s,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(s.width,s.height)}}const Bg=s=>{const t=s.width,e=s.height,n=t*e*3,i=n+54,r=[66,77,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,n&255,n>>8&255,n>>16&255,n>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,c=s.data;let h="";const u=t<<2;let l=e;const d=String.fromCharCode;do{const p=u*(l-1);let w="";for(let x=0;x<t;x++){const b=x<<2;w+=d(c[p+b+2])+d(c[p+b+1])+d(c[p+b])}for(let x=0;x<a;x++)w+=String.fromCharCode(0);h+=w}while(--l);function f(p){if(!window.btoa)throw"btoa undefined";let w="";if(typeof p=="string")w=p;else for(let x=0;x<p.length;x++)w+=String.fromCharCode(p[x]);return btoa(w)}return f(r.concat(o))+f(h)};function Ng(s){const{width:t,height:e}=s,n=document.createElement("canvas"),i=n.getContext("2d");return n.width=t,n.height=e,i.putImageData(s,0,0,0,0,t,e),n.toDataURL("image/png")}const Yg=(s,t,e)=>{const{width:n,height:i}=s,r=document.createElement("canvas"),o=r.getContext("2d");r.width=n,r.height=i,o.putImageData(s,0,0,0,0,n,i);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(c=>{e?.(null,c)},a,1)};function Xg(s,t){return createImageBitmap(s,t)}function Ug(s){const t=[],e=[],n=[];let i=0;for(let c=0,h=s.data.length;c<h;c+=4)t[i]=s.data[c],e[i]=s.data[c+1],n[i]=s.data[c+2],i+=1;const r=$r(t),o=$r(e),a=$r(n);return"rgb("+r+","+o+","+a+")"}function $r(s){const t={},e=[],n=[];for(let a=0;a<s.length;a++)t[s[a]]?e.push(s[a]):t[s[a]]=1;let i=0;for(let a=0;a<e.length;a++){i=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(i+=1),n[a]=i}const r=Math.max.apply(null,n);let o=0;for(;o<n.length;o++)if(n[o]===r)return;return e[o]}const $g=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[(o*e+e-a-1)*4],i[c+1]=t[(o*e+e-a-1)*4+1],i[c+2]=t[(o*e+e-a-1)*4+2],i[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(i,e,n)},Vg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[((n-o-1)*e+a)*4],i[c+1]=t[((n-o-1)*e+a)*4+1],i[c+2]=t[((n-o-1)*e+a)*4+2],i[c+3]=t[((n-o-1)*e+a)*4+3]}return new ImageData(i,e,n)},Gg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const c=(o*n+a)*4;i[c]=t[(a*e+e-o-1)*4],i[c+1]=t[(a*e+e-o-1)*4+1],i[c+2]=t[(a*e+e-o-1)*4+2],i[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(i,n,e)},qg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const c=(o*n+a)*4;i[c]=t[((n-a-1)*e+o)*4],i[c+1]=t[((n-a-1)*e+o)*4+1],i[c+2]=t[((n-a-1)*e+o)*4+2],i[c+3]=t[((n-a-1)*e+o)*4+3]}return new ImageData(i,n,e)},jg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;i[c]=h,i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},Hg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=.2126*t[c]+.7152*t[c+1]+.0722*t[c+2];i[c]=h,i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},Wg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,u=(t[c]+t[c+1]+t[c+2])/3>127?255:0;i[c]=u,i[c+1]=u,i[c+2]=u,i[c+3]=t[c+3]}return new ImageData(i,e,n)},Jg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=255-t[c],i[c+1]=255-t[c+1],i[c+2]=255-t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,n)},Zg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=0,i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,n)},Qg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=t[c+1],i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,n)},Kg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=0,i[c+2]=t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,n)},t0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=t[c+1],i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,n)},e0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=0,i[c+2]=t[c+1],i[c+3]=t[c+3]}return new ImageData(i,e,n)},n0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=t[c+1],i[c+2]=t[c+1],i[c+3]=t[c+3]}return new ImageData(i,e,n)},s0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;i[c]=t[c],i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},i0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;i[c]=h,i[c+1]=t[c+1],i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},r0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;i[c]=h,i[c+1]=h,i[c+2]=t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,n)},o0=s=>Eh(s,[-1,-1,-1,-1,9,-1,-1,-1,-1]),a0=s=>Eh(s,[-1,-1,-1,-1,8,-1,-1,-1,-1]),c0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=t[c+1],i[c+2]=t[c+2],i[c+3]=255}return new ImageData(i,e,n)},h0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)i[c]=255,i[c+1]=255,i[c+2]=255,i[c+3]=255;else{const h=Ph([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);i[c]=h[0],i[c+1]=h[1],i[c+2]=h[2],i[c+3]=h[3]}}return new ImageData(i,e,n)};function u0(s,t,e,n,i,r=!1,o){const{data:a,width:c,height:h}=s;let u=i,l=n,d=t,f=e;if(u<0?u=0:u>c&&(u=c),l<0?l=0:l>h&&(l=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),u+d>c&&(d=c-u),l+f>h&&(f=h-l),r){const p=new Uint8ClampedArray(a.length);for(let x=0;x<h;x++)for(let b=0;b<c;b++){const g=(x*c+b)*4;b>=u&&b<=u+d&&x>=l&&x<=l+f?(p[g]=a[g],p[g+1]=a[g+1],p[g+2]=a[g+2],p[g+3]=a[g+3]):(p[g]=255,p[g+1]=255,p[g+2]=255,p[g+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,c,h)}else{const p=new Uint8ClampedArray(d*f*4);for(let x=l;x<=l+f;x++)for(let b=u;b<=u+d;b++){const g=((x-l)*d+b-u)*4,v=(x*c+b)*4;p[g]=a[v],p[g+1]=a[v+1],p[g+2]=a[v+2],p[g+3]=a[v+3]}return new ImageData(p,d,f)}}function l0(s,t,e,n){const{data:i,width:r,height:o}=s;let a=t;a>Math.floor(r/2)&&(a=Math.floor(r/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const c=new Uint8ClampedArray(i.length);for(let u=0;u<o;u++)for(let l=0;l<r;l++){const d=(u*r+l)*4;let f=-1;l<a?u<a?f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>r-a-1&&(u<a?f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(u-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=n||e.toUpperCase()==="PNG"?0:255):(c[d]=i[d],c[d+1]=i[d+1],c[d+2]=i[d+2],c[d+3]=n||e.toUpperCase()==="PNG"?i[d+3]:255)}return new ImageData(c,r,o)}function f0(s,t,e,n,i,r=1e4){const o=new Image;o.src=s;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=r,a.height=r,c.drawImage(o,0,0,t,e,0,0,n,i),c.getImageData(0,0,n,i)}function d0(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let c=0;c<n;c++){const h=(a*n+c)*4;r[h]=Math.max(Math.min(e[h]+t,255),0),r[h+1]=Math.max(Math.min(e[h+1]+t,255),0),r[h+2]=Math.max(Math.min(e[h+2]+t,255),0),r[h+3]=e[h+3]}return new ImageData(r,n,i)}function m0(s,t,e=!1){const{data:n,width:i,height:r}=s,o=new Uint8ClampedArray(n.length);for(let c=0;c<r;c++)for(let h=0;h<i;h++){const u=(c*i+h)*4;n[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=n[u],o[u+1]=n[u+1],o[u+2]=n[u+2]);let l=n[u+3];e?l=Math.max(Math.min(Math.floor(255*t),255),0):l=Math.max(Math.min(Math.floor(l+255*t),255),0),o[u+3]=l}return new ImageData(o,i,r)}function p0(s,t,e,n){const{data:i,width:r,height:o}=s,{data:a,width:c,height:h}=t;let u=e,l=n;e+h>o&&(u=o-h),n+c>r&&(l=r-c);const d=new Uint8ClampedArray(i.length);for(let p=0;p<o;p++)for(let w=0;w<r;w++){const x=(p*r+w)*4;if(w<l||w>l+c||p<=u||p>=u+h)d[x]=i[x],d[x+1]=i[x+1],d[x+2]=i[x+2],d[x+3]=i[x+3];else{const b=(p*r+w-((u+1)*r+(p-(u+1))*(r-c))+c-l-1)*4,g=[a[b],a[b+1],a[b+2],a[b+3]],v=[i[x],i[x+1],i[x+2],i[x+3]],_=Ph(g,v);d[x]=_[0],d[x+1]=_[1],d[x+2]=_[2],d[x+3]=_[3]}}return new ImageData(d,r,o)}function g0(s,t,e,n,i,r=10){const{data:o,width:a,height:c}=s;let h=i,u=n,l=t,d=e;h<0?h=0:h>a&&(h=a),u<0?u=0:u>c&&(u=c),l<1?l=1:l>a&&(l=a),d<1?d=1:d>c&&(d=c),h+l>a&&(l=a-h),u+d>c&&(d=c-u);const f=new Uint8ClampedArray(o.length);for(let w=0;w<c;w++)for(let x=0;x<a;x++){const b=(w*a+x)*4;if(x>=h&&x<=h+l&&w>=u&&w<=u+d){const g=Math.floor((x-h)/r),v=Math.floor((w-u)/r);let _=Math.floor(r*(g+1)-r/2+h),E=Math.floor(r*(v+1)-r/2+u);_>a-1&&(_=a-1),E>c-1&&(E=c-1);const C=(E*a+_)*4;f[b]=o[C],f[b+1]=o[C+1],f[b+2]=o[C+2],f[b+3]=o[C+3]}else f[b]=o[b],f[b+1]=o[b+1],f[b+2]=o[b+2],f[b+3]=o[b+3]}return new ImageData(f,a,c)}function y0(s,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:n,width:i,height:r}=s,{data:o}=t,a=new Uint8ClampedArray(n.length),{backgroundColor:c,changeIntoColor:h}=e;for(let l=0;l<r;l++)for(let d=0;d<i;d++){const f=(l*i+d)*4,p=o[f],w=o[f+1],x=o[f+2],b=o[f+3];p===c.r&&w===c.g&&x===c.b&&b===c.a&&h.a!==0?(a[f]=h.r,a[f+1]=h.g,a[f+2]=h.b,a[f+3]=h.a):(a[f]=n[f],a[f+1]=n[f+1],a[f+2]=n[f+2],a[f+3]=n[f+3])}return new ImageData(a,i,r)}return s}function Eh(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let c=0;c<n;c++){const h=(a*n+c)*4;for(let u=0;u<3;u++){const l=h+u;c===0||c===n-1||a===0||a===i-1?r[l]=e[l]:r[l]=t[0]*e[l-n*4-4]+t[1]*e[l-n*4]+t[2]*e[l-n*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+n*4-4]+t[7]*e[l+n*4]+t[8]*e[l+n*4+4]}r[h+3]=e[h+3]}return new ImageData(r,n,i)}function Ph(s,t){if(s&&s.length===4&&t&&t.length===4){const e=s[3],n=t[3];if(e===255||n===0)return s;if(e===0)return t;{const i=e/255,r=n/255,o=Math.max(Math.min(Math.floor(s[0]*i+t[0]*r*(1-i)),255),0),a=Math.max(Math.min(Math.floor(s[1]*i+t[1]*r*(1-i)),255),0),c=Math.max(Math.min(Math.floor(s[2]*i+t[2]*r*(1-i)),255),0),h=Math.max(Math.min(Math.floor((i+r*(1-i))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const Vr=function(){const s=[];return{writeByte(t){s.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,n=t.length){for(let i=0;i<n;i++)this.writeByte(t[i+e])},writeString(t){for(let e=0,n=t.length;e<n;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return s},toString(){let t="[";for(let e=0,n=s.length;e<n;e++)e>0&&(t+=","),t+=s[e];return t+="]",t}}},Mh=function(){let s=0,t=0,e=0,n="";const i=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},r=function(o){n+=String.fromCharCode(i(o&63))};return{writeByte(o){for(s=s<<8|o&255,t+=8,e+=1;t>=6;)r(s>>>t-6),t-=6},flush(){if(t>0&&(r(s<<6-t),s=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)n+="="}},toString(){return n}}},Ah=function(s,t,e){const n=new Array(s*s),i=function(a){const c=a;let h=0,u=0;return{write(l,d){if(l>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(l<<h|u)),d-=8-h,l>>>=8-h,u=0,h=0;u=l<<h|u,h=h+d},flush(){h>0&&c.writeByte(u)}}},r=function(a){const c=1<<a,h=(1<<a)+1;let u=a+1;const l=o();for(let x=0;x<c;x++)l.add(String.fromCharCode(x));l.add(String.fromCharCode(c)),l.add(String.fromCharCode(h));const d=Vr(),f=i(d);f.write(c,u);let p=0,w=String.fromCharCode(n[p]);for(p+=1;p<n.length;){const x=String.fromCharCode(n[p]);p+=1,l.contains(w+x)?w=w+x:(f.write(l.indexOf(w),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(w+x)),w=x)}return f.write(l.indexOf(w),u),f.write(h,u),f.flush(),d.toByteArray()},o=function(){const a={};let c=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);a[h]=c,c+=1},size(){return c},indexOf(h){return a[h]},contains(h){return typeof a[h]<"u"}}};return{setPixel(a,c,h){n[c*s+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(s),a.writeShort(s),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(nn("0x"+t[1]+t[2])),a.writeByte(nn("0x"+t[3]+t[4])),a.writeByte(nn("0x"+t[5]+t[6])),a.writeByte(nn("0x"+e[1]+e[2])),a.writeByte(nn("0x"+e[3]+e[4])),a.writeByte(nn("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(s),a.writeShort(s),a.writeByte(0);const c=2,h=r(c);a.writeByte(c);let u=0;for(;h.length-u>255;)a.writeByte(255),a.writeBytes(h,u,255),u+=255;a.writeByte(h.length-u),a.writeBytes(h,u,h.length-u),a.writeByte(0),a.writeString(";")}}},kh=function(s,t,e,n){const i=Ah(s,t,e);for(let h=0;h<s;h++)for(let u=0;u<s;u++)i.setPixel(u,h,n(u,h));const r=Vr();i.write(r);const o=Mh(),a=r.toByteArray();for(let h=0,u=a.length;h<u;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},Nt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Yn={M:0,L:1,H:2,Q:3},Ae={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},dt={glog:function(s){if(s<1)throw new Error("glog("+s+")");return dt.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return dt.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let s=0;s<8;s++)dt.EXP_TABLE[s]=1<<s;for(let s=8;s<256;s++)dt.EXP_TABLE[s]=dt.EXP_TABLE[s-4]^dt.EXP_TABLE[s-5]^dt.EXP_TABLE[s-6]^dt.EXP_TABLE[s-8];for(let s=0;s<255;s++)dt.LOG_TABLE[dt.EXP_TABLE[s]]=s;const tt={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){let t=s<<10;for(;tt.getBCHDigit(t)-tt.getBCHDigit(tt.G15)>=0;)t^=tt.G15<<tt.getBCHDigit(t)-tt.getBCHDigit(tt.G15);return(s<<10|t)^tt.G15_MASK},getBCHTypeNumber:function(s){let t=s<<12;for(;tt.getBCHDigit(t)-tt.getBCHDigit(tt.G18)>=0;)t^=tt.G18<<tt.getBCHDigit(t)-tt.getBCHDigit(tt.G18);return s<<12|t},getBCHDigit:function(s){let t=0;for(;s!=0;)t++,s>>>=1;return t},getPatternPosition:function(s){return tt.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,t,e){switch(s){case Ae.PATTERN000:return(t+e)%2==0;case Ae.PATTERN001:return t%2==0;case Ae.PATTERN010:return e%3==0;case Ae.PATTERN011:return(t+e)%3==0;case Ae.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case Ae.PATTERN101:return t*e%2+t*e%3==0;case Ae.PATTERN110:return(t*e%2+t*e%3)%2==0;case Ae.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){let t=new dn([1],0);for(let e=0;e<s;e++)t=t.multiply(new dn([1,dt.gexp(e)],0));return t},getLengthInBits:function(s,t){if(1<=t&&t<10)switch(s){case Nt.MODE_NUMBER:return 10;case Nt.MODE_ALPHA_NUM:return 9;case Nt.MODE_8BIT_BYTE:return 8;case Nt.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(t<27)switch(s){case Nt.MODE_NUMBER:return 12;case Nt.MODE_ALPHA_NUM:return 11;case Nt.MODE_8BIT_BYTE:return 16;case Nt.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(t<41)switch(s){case Nt.MODE_NUMBER:return 14;case Nt.MODE_ALPHA_NUM:return 13;case Nt.MODE_8BIT_BYTE:return 16;case Nt.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+t)},getLostPoint:function(s){const t=s.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const c=s.isDark(r,o);for(let h=-1;h<=1;h++)if(!(r+h<0||t<=r+h))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||h==0&&u==0||c==s.isDark(r+h,o+u)&&a++;a>5&&(e+=3+a-5)}for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){let a=0;s.isDark(r,o)&&a++,s.isDark(r+1,o)&&a++,s.isDark(r,o+1)&&a++,s.isDark(r+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(r,o)&&!s.isDark(r,o+1)&&s.isDark(r,o+2)&&s.isDark(r,o+3)&&s.isDark(r,o+4)&&!s.isDark(r,o+5)&&s.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(o,r)&&!s.isDark(o+1,r)&&s.isDark(o+2,r)&&s.isDark(o+3,r)&&s.isDark(o+4,r)&&!s.isDark(o+5,r)&&s.isDark(o+6,r)&&(e+=40);let n=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)s.isDark(o,r)&&n++;const i=Math.abs(100*n/t/t-50)/5;return e+=i*10,e}};class dn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let n=0;for(;n<t.length&&t[n]==0;)n++;this.num=new Array(t.length-n+e);for(let i=0;i<t.length-n;i++)this.num[i]=t[i+n]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let n=0;n<this.getLength();n++)for(let i=0;i<t.getLength();i++)e[n+i]^=dt.gexp(dt.glog(this.get(n))+dt.glog(t.get(i)));return new dn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=dt.glog(this.get(0))-dt.glog(t.get(0)),n=new Array(this.getLength());for(let i=0;i<this.getLength();i++)n[i]=this.get(i);for(let i=0;i<t.getLength();i++)n[i]^=dt.gexp(dt.glog(t.get(i))+e);return new dn(n,0).mod(t)}}class le{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const n=le.getRsBlockTable(t,e);if(n==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const i=n.length/3,r=[];for(let o=0;o<i;o++){const a=n[o*3+0],c=n[o*3+1],h=n[o*3+2];for(let u=0;u<a;u++)r.push(new le(c,h))}return r}static getRsBlockTable(t,e){switch(e){case Yn.L:return le.RS_BLOCK_TABLE[(t-1)*4+0];case Yn.M:return le.RS_BLOCK_TABLE[(t-1)*4+1];case Yn.Q:return le.RS_BLOCK_TABLE[(t-1)*4+2];case Yn.H:return le.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Ih{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class w0{mode;data;constructor(t){this.mode=Nt.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data.charCodeAt(e),8)}}class ke{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Yn[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new w0(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=le.getRSBlocks(t,this.errorCorrectLevel),n=new Ih;let i=0;for(let r=0;r<e.length;r++)i+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const o=this.dataList[r];n.put(o.mode,4),n.put(o.getLength(),tt.getLengthInBits(o.mode,t)),o.write(n)}if(n.getLengthInBits()<=i*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=ke.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(0<=n&&n<=6&&(i==0||i==6)||0<=i&&i<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=i&&i<=4?this.modules[t+n][e+i]=!0:this.modules[t+n][e+i]=!1)}getBestMaskPattern(){let t=0,e=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const i=tt.getLostPoint(this);(n==0||t>i)&&(t=i,e=n)}return e}createMovieClip(t,e,n){const i=t.createEmptyMovieClip(e,n),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let c=0;c<this.modules[o].length;c++){const h=c*r;this.modules[o][c]&&(i.beginFill(0,100),i.moveTo(h,a),i.lineTo(h+r,a),i.lineTo(h+r,a+r),i.lineTo(h,a+r),i.endFill())}}return i}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=tt.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let n=0;n<t.length;n++){const i=t[e],r=t[n];if(this.modules[i][r]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[i+o][r+a]=!0:this.modules[i+o][r+a]=!1}}setupTypeNumber(t){const e=tt.getBCHTypeNumber(this.typeNumber);for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i}}setupTypeInfo(t,e){const n=this.errorCorrectLevel<<3|e,i=tt.getBCHTypeInfo(n);for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<6?this.modules[r][8]=o:r<8?this.modules[r+1][8]=o:this.modules[this.moduleCount-15+r][8]=o}for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=o:r<9?this.modules[8][15-r-1+1]=o:this.modules[8][15-r-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let n=-1,i=this.moduleCount-1,r=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let c=0;c<2;c++)if(this.modules[i][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>r&1)==1),tt.getMask(e,i,a-c)&&(h=!h),this.modules[i][a-c]=h,r--,r==-1&&(o++,r=7)}if(i+=n,i<0||this.moduleCount<=i){i-=n,n=-n;break}}}static createData(t,e,n){const i=le.getRSBlocks(t,e),r=new Ih;for(let a=0;a<n.length;a++){const c=n[a];r.put(c.mode,4),r.put(c.getLength(),tt.getLengthInBits(c.mode,t)),c.write(r)}let o=0;for(let a=0;a<i.length;a++)o+=i[a].dataCount;if(r.getLengthInBits()>o*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+o*8+")");for(r.getLengthInBits()+4<=o*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=o*8||(r.put(ke.PAD0,8),r.getLengthInBits()>=o*8));)r.put(ke.PAD1,8);return ke.createBytes(r,i)}static createBytes(t,e){let n=0,i=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const d=e[l].dataCount,f=e[l].totalCount-d;i=Math.max(i,d),r=Math.max(r,f),o[l]=new Array(d);for(let b=0;b<o[l].length;b++)o[l][b]=255&t.buffer[b+n];n+=d;const p=tt.getErrorCorrectPolynomial(f),x=new dn(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let b=0;b<a[l].length;b++){const g=b+x.getLength()-a[l].length;a[l][b]=g>=0?x.get(g):0}}let c=0;for(let l=0;l<e.length;l++)c+=e[l].totalCount;const h=new Array(c);let u=0;for(let l=0;l<i;l++)for(let d=0;d<e.length;d++)l<o[d].length&&(h[u++]=o[d][l]);for(let l=0;l<r;l++)for(let d=0;d<e.length;d++)l<a[d].length&&(h[u++]=a[d][l]);return h}}const Dh=Math.ceil,Xn=Math.floor,Rh=Math.round;function b0(s,t){const e=oa(s),n=t?.ecc||"H",i=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new ke(r,n);h.addData(e),h.make();const u=h.getModuleCount(),l=(i-o*2)/u,d=o,f=i-o;return kh(i,a,c,function(p,w){if(d<=p&&p<f&&d<=w&&w<f){const x=Xn((p-d)/l),b=Xn((w-d)/l);return h.isDark(b,x)?0:1}else return 1})}function x0(s,t){const e=t.x||0,n=t.y||0,i=oa(s),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Xn(t.size):256,c=t.padding||0,h=-1,u=t.color||"#000000",l=t.background||"#ffffff",d=new ke(h,o);d.addData(i),d.make();const f=d.getModuleCount(),p=(a-c*2)/f;r.fillStyle=l,r.fillRect(e,n,a,a);for(let w=0;w<f;w++)for(let x=0;x<f;x++){const b=Dh((x+1)*p)-Xn(x*p),g=Dh((w+1)*p)-Xn(w*p);r.fillStyle=d.isDark(w,x)?u:l,r.fillRect(e+Rh(x*p)+c,n+Rh(w*p)+c,b,g)}}const Xs=new Bn,ht=new Ft;function Un(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function Rt(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}class fe{array;itemSize;count;normalized;updateRanges;version;constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("BufferAttribute: array should be a Typed Array.");this.array=t,this.itemSize=e,this.count=t.length/e,this.normalized=n,this.updateRanges=[],this.version=0}_onChangeCallback(){}set needsUpdate(t){t===!0&&this.version++}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=kl(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)Xs.fromBufferAttribute(this,e),Xs.applyMatrix3(t),this.setXY(e,Xs.x,Xs.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.applyMatrix3(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.applyMatrix4(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.applyNormalMatrix(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.transformDirection(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Un(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Rt(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Un(e,this.array)),e}setX(t,e){return this.normalized&&(e=Rt(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Un(e,this.array)),e}setY(t,e){return this.normalized&&(e=Rt(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Un(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Rt(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Un(e,this.array)),e}setW(t,e){return this.normalized&&(e=Rt(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Rt(e,this.array),n=Rt(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Rt(e,this.array),n=Rt(n,this.array),i=Rt(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.normalized&&(e=Rt(e,this.array),n=Rt(n,this.array),i=Rt(i,this.array),r=Rt(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onChange(t){return this._onChangeCallback=t,this}clone(){return ua(this,this.array,this.itemSize,this.normalized).copy(this)}toJSON(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized}}}class v0 extends fe{constructor(t,e,n=!1){super(new Int8Array(t),e,n)}}class _0 extends fe{constructor(t,e,n=!1){super(new Uint8Array(t),e,n)}}class S0 extends fe{constructor(t,e,n=!1){super(new Uint8ClampedArray(t),e,n)}}class C0 extends fe{constructor(t,e,n=!1){super(new Int16Array(t),e,n)}}class T0 extends fe{constructor(t,e,n=!1){super(new Uint16Array(t),e,n)}}class E0 extends fe{constructor(t,e,n=!1){super(new Int32Array(t),e,n)}}class P0 extends fe{constructor(t,e,n=!1){super(new Uint32Array(t),e,n)}}class M0 extends fe{constructor(t,e,n=!1){super(new Float32Array(t),e,n)}}const Lh={map:new Map,transform:function(s){if(th)return s;if(this.map.has(s))return this.map.get(s);const t=new OffscreenCanvas(s.width,s.height);return t.getContext("2d")?.drawImage(s,0,0),this.map.set(s,t),t},clear:function(){this.map.clear()}};function A0(s,t,e){const n=new OffscreenCanvas(s,t),i=n.getContext("2d");if(i)return e(i),n.transferToImageBitmap()}function k0(s,t,e){const n=s.createPattern(Lh.transform(t),"no-repeat");if(n){const i=Br(e);n.setTransform(i),s.fillStyle=n}}function Oh(s){return window.URL.createObjectURL(s)}function I0(s){return window.URL.revokeObjectURL(s)}function zh(s){let t=!1,e;function n(){document.readyState==="loading"||t||(s(),e?.(),t=!0)}try{e=j(document,"DOMContentLoaded",n)}catch{e=j(window,"load",n)}return n(),()=>{t||e()}}function Fh(s){return j(window,"beforeunload",t=>{s(t)})}async function D0(s,t=6e4){return new Promise((e,n)=>{const i=document.createElement("script");i.type="text/javascript",i.async=!1,i.onload=o=>{clearTimeout(r),e(o),i.onerror=i.onload=null},i.onerror=o=>{clearTimeout(r),n(o)},i.src=s;const r=setTimeout(()=>{n("Timeout!")},t);document.body.appendChild(i)})}function Us(s,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof s=="string"?e.href=s:e.href=window.URL.createObjectURL(s),e.click()}async function R0(s,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((n,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),n(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),i(a)},r.setAttribute("href",s);const o=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function L0(){return new Promise(s=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const n=()=>e>=t.length?(s(),!0):!1;n()||t.forEach(i=>{i.onload=()=>{e+=1,n()}})})}const Bh=new Le;async function Nh(s,t=6e4){return new Promise((e,n)=>{const i=typeof s=="string"?s:Oh(s),r=Bh.get(i);if(r)return e(r);const o=document.createElement("img");o.onload=()=>{clearTimeout(a);const c=o.naturalWidth||o.width,h=o.naturalHeight||o.height,u={width:c,height:h,aspectRatio:c/h,element:o,imageData:Th(o)};Bh.set(i,u),e(u),o.onerror=o.onload=null},o.onerror=c=>{clearTimeout(a),n(c)},o.src=i;const a=setTimeout(()=>{n("Timeout!")},t)})}async function Yh(s=Ut.text,t=["*"]){const n=(await Ji(t))[0],i=await Tn(n,s);return{type:n.type,name:n.name,size:n.size,data:i}}async function O0(s=["image/*"]){const e=(await Ji(s))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const n=await Tn(e,Ut.arraybuffer),i=wi(n),r=await Nh(i);return{type:e.type,name:e.name,size:e.size,data:n,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function z0(){return window.getSelection()?.toString()||""}function F0(s){document.getElementsByTagName("title")[0].innerText=s,document.title=s}function B0(s=200){"vibrate"in navigator?window.navigator.vibrate(s):console.error("Your device is not support vibrate on this browser.")}async function N0(s){if(navigator.clipboard)return await navigator.clipboard.writeText(s);{const t=document.createElement("textarea");return t.value=s,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function Y0(s,t){window.scrollTo(s,t)}function X0(){let s=wa,t=wa;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",s=Fh(()=>{window.history.scrollRestoration="auto"}),t=zh(()=>{window.history.scrollRestoration="manual"})),()=>{s(),t()}}function U0(s){return/(html|body)/i.test(s.tagName)||s===document.documentElement}const $0=s=>s===document.activeElement&&(s.type||s.href),Gr=function(){return parseFloat(getComputedStyle(document.documentElement).fontSize)};function V0(s){return s*Gr()}function G0(s){return s.parentElement?parseFloat(getComputedStyle(s.parentElement).fontSize):Gr()}const q0=s=>{let t=s;for(;t&&t.nodeType!==1&&t.parentElement;)t=t.parentElement;return t},j0=s=>s.parentElement,qr=(s,t=[])=>!s||s.parentElement===null&&s.parentNode===null?t:qr(s.parentElement,t.concat([s]));function H0(s){const t=qr(s);for(let e=0,n=t.length;e<n;e++)if(/(auto|scroll)/.test($e(t[e],"overflow")+$e(t[e],"overflow-y")+$e(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const W0=(s,t)=>s.contains?s!=t&&s.contains(t):!!(s.compareDocumentPosition(t)&16),J0=s=>Array.prototype.slice.call(s.parentElement?.children).filter(t=>t!==s),Z0=s=>s.nextElementSibling,Q0=s=>s.previousElementSibling,K0=(s,t)=>s.closest(t),t1=s=>s.shadowRoot,$n=s=>s.tagName==="INPUT"||s instanceof HTMLInputElement,jr=s=>s.tagName==="SELECT"||s instanceof HTMLSelectElement,e1=s=>s.tagName==="TEXTAREA"||s instanceof HTMLTextAreaElement,Hr=s=>$n(s)&&s.getAttribute("type")==="checkbox",Wr=s=>$n(s)&&s.getAttribute("type")==="radio",n1=s=>$n(s)&&s.getAttribute("type")==="text",s1=s=>$n(s)&&s.getAttribute("type")==="number";function i1(s,t){if(jr(s)){const e=s.options;for(let n=0,i=e.length;n<i;n++)e[n].selected=e[n].value==t}}function r1(s,t){if(Wr(s)){const e=document.getElementsByName(s.name);for(let n=0,i=e.length;n<i;n++){const r=e[n];r.checked=r.value==t}}}function o1(s,t){Hr(s)&&(s.checked=t)}const Vn=(s,t,e="append")=>{typeof t=="string"?s[e](Gh(t)):s[e](t)},Xh=function(s,t){if(typeof t=="string"){s.innerHTML=t;const e=jh(s);e!=s&&(s=e)}else Vn(t,"replaceWith")},Uh=function(s){Xh(s,"")},a1=(s,t)=>{s.textContent=t},c1=s=>{if(s instanceof SVGElement)return"";let t=s.innerText;if(!t){const e=s.querySelector("slot")?.assignedNodes()||[];let n=0;for(;!t&&n<=e.length-1;)"innerText"in e[n]&&(t=e[n].innerText),n++}return t},h1=s=>s.remove();function u1(s,t){$e(s,"display")=="none"&&t===void 0||t===!0?$h(s):Vh(s)}function $h(s){Nr(s,"display",s instanceof HTMLTableRowElement?"table-row":s instanceof HTMLTableCellElement?"table-cell":"block")}function Vh(s){Nr(s,"display","none")}function Jr(s,t,e="toggle"){const n=t.split(/[,\s]+/);if(s.classList)n.forEach(i=>{const r=i.trim();r!==""&&s.classList[e](r)});else{const i=s.className.split(/ +/);let r=!1;n.forEach(o=>{const a=o.trim();if(a!==""){const c=i.indexOf(a);switch(e){case"add":c===-1&&(i.push(a),r=!0);break;case"remove":c!==-1&&(i.splice(c,1),r=!0);break;case"toggle":c===-1?i.push(a):i.splice(c,1),r=!0;break}}}),r&&Ve(s,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function l1(s,t){Jr(s,t,"add")}function f1(s,t){Jr(s,t,"remove")}function d1(s,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(s.className)||!1}function Gh(s,t=!1){const e=document.createElement("template");return e.innerHTML=s,t&&e.content.childNodes.forEach(n=>{const i=jh(n);i!=n&&e.content.replaceChild(i,n)}),e.content}function qh(s){return document.createElement.call(document,s)}function m1(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function p1(s){return document.createTextNode.call(document,s)}function jh(s){return s.tagName=="SCRIPT"&&(s=Hh(s)),s.querySelectorAll&&s.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(Hh(t),t)}),s}function Hh(s){const t=s.ownerDocument.createElement("script");t.text=s.text;const e=s.attributes;for(let n=0,i=e.length;n<i;n++)t.setAttribute(e[n].name,e[n].value);return t}function g1(s,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(s,t)},4e3),setTimeout(function(){e.remove()},6e3)}function y1(s){const t=new Proxy(window,{get(e,n,i){if(typeof n=="string"&&["open","location","document"].includes(n))throw new Error(`禁止访问 key: ${n}`);return n==="window"?t:Reflect.get(e,n,i)},set(e,n,i,r){return Reflect.set(e,n,i,r)}});new Function("window",`with(window) { ${s} }`)(t,null)}function Zr(){return{x:0,y:0,isDown:!1}}function Ge(){const s=Zr(),t=Zr();return{start:s,current:t,setStart:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,n)},setCurrent:(e,n)=>{t.x=e.x,t.y=e.y,t.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1}}}function $s(s=document.documentElement,t=!1){return U(s,"mousemove",t)}function Wh(s=document.documentElement,t=!1){return U(s,"mousedown",t)}function Jh(s=document.documentElement,t=!1){return U(s,"mouseup",t)}function w1(s=document.documentElement,t=!1){return U(s,"mouseover",t)}function b1(s=document.documentElement,t=!1){return U(s,"mouseout",t)}function x1(s=document.documentElement,t=!1){return U(s,"mouseenter",t)}function v1(s=document.documentElement,t=!1){return U(s,"mouseleave",t)}function _1(s=document.documentElement,t=!1){return U(s,"click",t)}function S1(s=document.documentElement,t=!1){return U(s,"dblclick",t)}function C1(s=document.documentElement,t=!1){return U(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function T1(s=document.documentElement,t=!1){return U(s,"contextmenu",t)}function Zh(s=document.documentElement,t=!1){return U(s,"touchmove",t)}function Qh(s=document.documentElement,t=!1){return U(s,"touchstart",t)}function Kh(s=document.documentElement,t=!1){return U(s,"touchend",t)}function tu(s=document.documentElement,t=!1){return U(s,"touchcancel",t)}function Qr(s=document.documentElement,t=!1){return U(s,"pointermove",t)}function Kr(s=document.documentElement,t=!1){return U(s,"pointerdown",t)}function to(s=document.documentElement,t=!1){return U(s,"pointerup",t)}function eo(s=document.documentElement,t=!1){return U(s,"pointercancel",t)}function E1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function P1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function M1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function A1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function k1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function I1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function D1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function R1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function L1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function O1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function z1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function F1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function B1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("press",e)},e=>{t.off("press",e)})}function N1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function Y1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function X1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function U1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function $1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function V1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function G1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function q1(s=document.documentElement){const t=new nt(document.documentElement);return it(e=>{const n=i=>{!i.target||s==i.target||s.contains(i.target)||e(i)};return t.on("tap",n),n},(e,n)=>{t.off("tap",n)})}function j1(s=document.documentElement,t=!1){return U(s,"transitionstart",t)}function H1(s=document.documentElement,t=!1){return U(s,"transitionend",t)}function W1(s=document.documentElement,t=!1){return U(s,"animationstart",t)}function J1(s=document.documentElement,t=!1){return U(s,"animationend",t)}function eu(s=document.documentElement,t=!1){return U(s,"drag",t)}function nu(s=document.documentElement,t=!1){return U(s,"dragstart",t)}function su(s=document.documentElement,t=!1){return U(s,"dragend",t)}function iu(s=document.documentElement,t=!1){return U(s,"drop",t)}function ru(s=document.documentElement,t=!1){return U(s,"dragenter",t)}function ou(s=document.documentElement,t=!1){return U(s,"dragleave",t)}function au(s=document.documentElement,t=!1){return U(s,"dragover",t)}function cu(s=document.documentElement,t=!1){return U(s,"keydown",t)}function hu(s=document.documentElement,t=!1){return U(s,"keyup",t)}function Z1(s=document.documentElement,t=!1){return U(s,"keypress",t)}function Q1(s=document.documentElement,t){const e=t?.useMousePoint||Ge();return $s(s).pipe(ot(n=>(e.setCurrent(lt(n,s)),e)))}function K1(s=document.documentElement,t){const e=t?.useMousePoint||Ge();return $s(s).pipe(wp(Wh(s).pipe(Ye(n=>{e.setStart(lt(n,s),!0),t?.start?.(n,e)})),()=>Jh(s).pipe(Ye(n=>{e.setCurrent(lt(n,s),!1),t?.end?.(n,e)}))),pp(),ot(n=>(e.setCurrent(lt(n,s),!0),e)))}function ty(s=document.documentElement,t){const e=t?.useMousePoint||Ge();return Qh(s).pipe(Ye(n=>{const i=n.changedTouches[0];e.setStart(lt(i,s),!0),t?.start?.(i,e)}),As(()=>Zh(s).pipe(fr(lr(Kh(s),tu(s)).pipe(Ye(n=>{const i=n.changedTouches[0];e.setCurrent(lt(i,s),!1),t?.end?.(i,e)}))))),ot(n=>{const i=n.changedTouches[0];return e.setCurrent(lt(i,s),!0),e}))}function uu(s=document.documentElement,t){const e=t?.useMousePoint||Ge();return Kr(s).pipe(Ye(n=>{e.setStart(lt(n,s),!0),t?.start?.(n,e)}),As(()=>Qr(s).pipe(fr(lr(to(s),eo(s)).pipe(Ye(n=>{e.setCurrent(lt(n,s),!1),t?.end?.(n,e)}))))),ot(n=>(e.setCurrent(lt(n,s),!0),e)))}function lu(s=document.documentElement,t){const e=t?.useMousePoint||Ge();return up($s(s),Kr(s)).pipe(Gc(n=>n instanceof PointerEvent?(e.setStart(lt(n,s),!0),t?.start?.(n,e),Qr(s).pipe(fr(lr(to(s),eo(s)).pipe(Ye(i=>{e.setCurrent(lt(i,s),!1),t?.end?.(i,e)}))))):n instanceof MouseEvent?Nm(n):Pc),ot(n=>(e.setCurrent(lt(n,s),n instanceof PointerEvent),e)))}function ey(s){return new st(t=>uu(s,{start:()=>{t.next(0)},end:(n,i)=>{t.next(i.current.x-i.start.x)}}).subscribe(n=>{t.next(n.current.y-n.start.y)}).unsubscribe).pipe(_e())}function ny(s,t){fn(s,"draggable","true");const e=nu(s,!0).subscribe(r=>{Ce(r),qc(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),n=eu(s).subscribe(r=>{Ce(r),t?.onDrag?.(r)}),i=su(s).subscribe(r=>{Ce(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe()}}function sy(s,t){const e=ru(s).subscribe(o=>{Ce(o),t?.onEnter?.(o)}),n=au(s).subscribe(o=>{Ce(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),i=ou(s).subscribe(o=>{Ce(o),t?.onLeave?.(o)}),r=iu(s).subscribe(o=>{Ce(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe(),r.unsubscribe()}}function fu(s=100){return U(document,"scroll",!0).pipe(yp(s))}function iy(){return U(window,"visibilitychange",!0).pipe(ot(()=>!document.hidden),_e())}function ry(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Gn(){const s=document.documentElement;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function oy(){const s=document.body;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function du(){return typeof window.innerWidth=="number"?{width:window.innerWidth,height:window.innerHeight}:document.compatMode==="CSS1Compat"?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.body.clientWidth,height:document.body.clientHeight}}function ay(){const{scrollWidth:s,scrollHeight:t}=Gn();return{width:s,height:t}}function no(s){const{top:t,left:e,width:n,height:i}=s.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=Gn();return{x:e+r,y:t+o,width:n,height:i}}function cy(s){let t=s,e=0,n=0;for(;t!==null;)e+=t.offsetLeft,n+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:n,width:s.offsetWidth,height:s.offsetHeight}}function mu(s){return s.getBoundingClientRect()}function hy(s){const t=s.getBoundingClientRect();return{x:s.offsetLeft,y:s.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function uy(){const{clientHeight:s,scrollTop:t,scrollHeight:e}=Gn(),n=e-s;return n<=0?0:t/n*100}function ly(s){if("center"in s){const t=s.center,e=mu(s.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:s.clientX,y:s.clientY}}function so(s){if("center"in s)return s.center;if(typeof s.pageX=="number"&&typeof s.pageY=="number")return{x:s.pageX,y:s.pageY};const{scrollLeft:t,scrollTop:e}=Gn();return{x:s.clientX+t,y:s.clientY+e}}function lt(s,t){const e={x:0,y:0};if(t){const n=so(s),i=no(t);e.x=B(n.x-i.x,0,i.width),e.y=B(n.y-i.y,0,i.height)}else{let n=0,i=0;if("currentTarget"in s&&s.currentTarget&&s.target&&s.currentTarget!=s.target){const r=s.currentTarget.getBoundingClientRect(),o=s.target.getBoundingClientRect();n=o.left-r.left,i=o.top-r.top}if("offsetX"in s)e.x=s.offsetX+n,e.y=s.offsetY+i;else{const r=so(s),o=no(s.target);e.x=B(r.x-o.x+n,0,o.width),e.y=B(r.y-o.y+i,0,o.height)}}return e}function fy(s){if(document.implementation.hasFeature("MouseEvents","2.0"))return s.button;switch(s.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const dy={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function my(s){if(s.key)return s.key;if(s.keyCode)return s.keyCode;if(s.which)return s.which}function pu(s,t){const e=t.ctrl||!1,n=t.shift||!1,i=t.alt||!1;return(e===s.metaKey||e===s.ctrlKey)&&n===s.shiftKey&&i===s.altKey&&t.keys.map(r=>r.toLowerCase()).includes(s.key.toLowerCase())}function gu(s){return cu(s.target||document||window).pipe(Vc(t=>pu(t,s)),ot(t=>{t.stopPropagation(),t.preventDefault()}))}function py(s){return hu(s.target||document||window).pipe(Vc(t=>pu(t,s)),ot(t=>{t.stopPropagation(),t.preventDefault()}))}function yu(s={keys:["o"]},t=Ut.text){return gu(s).pipe(As(async()=>await Yh(t)))}async function gy(s={keys:["o"]},t=Ut.text){return Xm(yu(s,t))}async function wu(s,t){return new Promise(e=>{const n=new ResizeObserver(i=>{const o=i[0].contentRect;t(o),e(()=>{n.unobserve(s)})});n.observe(s)})}function io(s=document.documentElement,t){let e,n,i,r;return new st(o=>{const a=new ResizeObserver(c=>{const u=c[0].contentRect;(e!=u.x||n!=u.y||i!=u.width||r!=u.height)&&(e=u.x,n=u.y,i=u.width,r=u.height,o.next(u))});return a.observe(s,t),()=>{a.unobserve(s),a.disconnect()}})}function yy(s){return s(window.innerWidth,window.innerHeight),j(window,"orientationchange"in window?"orientationchange":"resize",t=>{const e=t.target.innerWidth,n=t.target.innerHeight;s(e,n)})}function wy(){return U(window,"orientationchange"in window?"orientationchange":"resize").pipe(ot(s=>({width:s.target.innerWidth,height:s.target.innerHeight})),Se({width:window.innerWidth,height:window.innerHeight}))}function by(){const s={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:!1,this.setCurrentMousePoint(e,n)},setCurrentMousePoint:(e,n)=>{const i=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-i,t.dy=t.y-r,t.dStartX=t.x-s.x,t.dStartY=t.y-s.y,t.isDown=typeof n=="boolean"?n:!1}}}function xy(s=document.documentElement){const t=new Ii,e=new nt(s);let n=[];const i=by(),r=i.mousePoint,o=k=>{t.emit("mouseDown",k)},a=k=>{t.emit("mouseUp",k)},c=k=>{r.isDown||i.setCurrentMousePoint(lt(k,s)),t.emit("mouseMove",k)},h=k=>{t.emit("mouseOver",k)},u=k=>{t.emit("mouseOut",k)},l=k=>{t.emit("mouseEnter",k)},d=k=>{t.emit("mouseLeave",k)},f=k=>{t.emit("mouseClick",k)},p=k=>{t.emit("mouseDoubleClick",k)},w=k=>{t.emit("mouseWheel",k)},x=k=>{t.emit("mouseContextMenu",k)},b=k=>{t.emit("touchStart",k)},g=k=>{t.emit("touchEnd",k)},v=k=>{t.emit("touchCancel",k)},_=k=>{const at=k.changedTouches[0];r.isDown||i.setCurrentMousePoint(lt(at,s)),t.emit("touchMove",k)},E=k=>{t.emit("pointerDown",k)},C=k=>{t.emit("pointerUp",k)},I=k=>{t.emit("pointerCancel",k)},F=k=>{t.emit("pointerMove",k)},N=k=>{t.emit("pan",k)},$=k=>{t.emit("panStart",k)},V=k=>{t.emit("panMove",k)},W=k=>{t.emit("panEnd",k)},et=k=>{t.emit("panCancel",k)},Z=k=>{t.emit("panLeft",k)},Gt=k=>{t.emit("panRight",k)},mt=k=>{t.emit("panUp",k)},At=k=>{t.emit("panDown",k)},Lt=k=>{t.emit("pinch",k)},L=k=>{t.emit("pinchin",k)},R=k=>{t.emit("pinchout",k)},X=k=>{t.emit("press",k)},H=k=>{t.emit("rotate",k)},kt=k=>{t.emit("swipe",k)},ee=k=>{t.emit("swipeLeft",k)},ti=k=>{t.emit("swipeRight",k)},ei=k=>{t.emit("swipeUp",k)},pt=k=>{t.emit("swipeDown",k)},ie=k=>{t.emit("tap",k)},rt=k=>{!k.target||s==k.target||s.contains(k.target)||t.emit("tapOutSide",k)},Ct=k=>{t.emit("transitionstart",k)},yn=k=>{t.emit("transitionend",k)},Ze=k=>{t.emit("animationstart",k)},Qe=k=>{t.emit("animationend",k)};let De={...s.getBoundingClientRect(),width:s.offsetWidth,height:s.offsetHeight};return{el:s,get rect(){return De},mousePoint:r,eb:t,start:async function(){n.push(j(s,"mousedown",o)),n.push(j(s,"mouseup",a)),n.push(j(s,"mousemove",c)),n.push(j(s,"mouseover",h)),n.push(j(s,"mouseout",u)),n.push(j(s,"mouseenter",l)),n.push(j(s,"mouseleave",d)),n.push(j(s,"click",f)),n.push(j(s,"dblclick",p)),n.push(j(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",w)),n.push(j(s,"contextmenu",x)),n.push(j(s,"touchstart",b)),n.push(j(s,"touchend",g)),n.push(j(s,"touchcancel",v)),n.push(j(s,"touchmove",_)),n.push(j(s,"pointerdown",E)),n.push(j(s,"pointerup",C)),n.push(j(s,"pointercancel",I)),n.push(j(s,"pointermove",F)),e.on("pan",N),e.on("panstart",$),e.on("panmove",V),e.on("panend",W),e.on("pancancel",et),e.on("panleft",Z),e.on("panright",Gt),e.on("panup",mt),e.on("pandown",At),e.on("pinch",Lt),e.on("pinchin",L),e.on("pinchout",R),e.on("press",X),e.on("rotate",H),e.on("swipe",kt),e.on("swipeleft",ee),e.on("swiperight",ti),e.on("swipeup",ei),e.on("swipedown",pt),e.on("tap",ie),n.push(j(document,"pointerdown",rt)),n.push(j(s,"transitionstart",Ct)),n.push(j(s,"transitionend",yn)),n.push(j(s,"animationstart",Ze)),n.push(j(s,"animationend",Qe));const k=await wu(s,at=>{De=at,t.emit("resize",at)});n.push(k),n.push(bu(this,{start:at=>{i.setStartMousePoint(lt(at,s),!0)},move:at=>{i.setCurrentMousePoint(lt(at,s))},end:at=>{i.setCurrentMousePoint(lt(at,s),!1)}}))},end:()=>{t.removeAllListeners(),n.forEach(k=>k()),n=[],e.off("pan",N),e.off("panstart",$),e.off("panmove",V),e.off("panend",W),e.off("pancancel",et),e.off("panleft",Z),e.off("panright",Gt),e.off("panup",mt),e.off("pandown",At),e.off("pinch",Lt),e.off("pinchin",L),e.off("pinchout",R),e.off("press",X),e.off("rotate",H),e.off("swipe",kt),e.off("swipeleft",ee),e.off("swiperight",ti),e.off("swipeup",ei),e.off("swipedown",pt),e.off("tap",ie)}}}function bu(s,t){return xu(s,t)}function xu(s,t){const e=s.eb,n=o=>{e.on("pointerMove",r),e.on("pointerUp",i),e.on("pointerCancel",i),t?.start?.(o)},i=o=>{e.off("pointerMove",r),e.off("pointerUp",i),e.off("pointerCancel",i),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("pointerDown",n),()=>e.off("pointerDown",n)}function vy(s,t){const e=s.eb,n=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",i,!1),t?.start?.(o)},i=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",i,!1),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("mouseDown",n),()=>e.off("mouseDown",n)}function _y(s,t){const e=s.eb,n=o=>{e.on("touchMove",r),e.on("touchEnd",i),e.on("touchCancel",i);const a=o.changedTouches[0];t?.start?.(a)},i=o=>{e.off("touchMove",r),e.off("touchEnd",i),e.off("touchCancel",i);const a=o.changedTouches[0];t?.end?.(a)},r=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",n),()=>e.off("touchStart",n)}class Sy{multicast;buffer;handlers=pa(10);constructor(t){this.buffer=t?.buffer||pa(10),this.multicast=typeof t?.multicast=="boolean"?t?.multicast:!1}put(t){if(this.multicast){this.handlers.flush().forEach(n=>n(t));return}if(this.handlers.length===0)return this.buffer.put(t);const e=this.handlers.take();e&&e(t)}take(t){if(!this.multicast){const e=this.buffer.take();if(e){t(e);return}}this.handlers.put(t)}flush(t){this.multicast||this.buffer.flush().forEach(t)}}let ro=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Qt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const c=(this.toY-n)/o,h=(t.y-r)/a;if(o){if(!a)return{x:i,y:c*(i-e)+n}}else return{x:e,y:h*(e-i)+r};const u=(-h*i+r+c*e-n)/(c-h),l=c*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class oo extends ro{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,c,!this.sweepFlag)}convert(t,e,n,i,r,o,a,c,h){const u=a/180*Math.PI,l=(t-n)/2,d=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,w=f*f/(r*r)+p*p/(o*o);if(w>1){const V=Math.sqrt(w);throw r=V*r,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const x=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),b=c!=h?1:-1,g=b*x*r*p/o,v=b*x*-o*f/r,_=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*g-Math.sin(u)*v+_,I=Math.sin(u)*g+Math.cos(u)*v+E,F=(V,W,et,Z)=>(V*Z>=W*et?1:-1)*Math.acos((V*et+W*Z)/(Math.sqrt(V*V+W*W)*Math.sqrt(et*et+Z*Z))),N=F(1,0,t-C,e-I)-u,$=F(t-C,e-I,n-C,i-I);return[C,I,r,o,u,N,N+$]}}class Cy extends ro{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let h=0;h<2;++h)n=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=h==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][h].push(n*o*o+i*o+r));const a={x:Math.min(0,...t),y:Math.min(0,...e)},c={x:Math.max(0,...t),y:Math.max(0,...e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const Ty=Cy;class yt extends ro{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}clone(){return new yt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const u=[],l=h.length;for(let p=0;p<l;p++){for(let w=p+1;w<l;w++)h[p].X===h[w].X&&h[p].Y===h[w].Y&&(w=++p);u.push({X:h[p].X,Y:h[p].Y})}const d={x:Math.min(...a),y:Math.min(...o)},f={x:Math.max(...a),y:Math.max(...o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const w=u*l[p]+u,x=yt.base3(w,t,n,r,a),b=yt.base3(w,e,i,o,c);f+=d[p]*Math.sqrt(x*x+b*b)}return u*f}length(t=1){return yt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||yt.bezlen(e,n,i,r,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=yt.bezlen(e,n,i,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=yt.bezlen(e,n,i,r,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,c=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,h=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,w=n*this.y+e*this.c1y,x=n*this.c2x+e*this.toX,b=n*this.c2y+e*this.toY,g=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:w},end:{x,y:b},alpha:g}}}const qn=Math.PI*2;function vu(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function Ey(s,t,e,n,i,r,o,a,c,h){const u=h*(s-e)/2+c*(t-n)/2,l=-c*(s-e)/2+h*(t-n)/2,d=o*o,f=a*a,p=u*u,w=l*l;let x=d*f-d*w-f*p;x<0&&(x=0),x/=d*w+f*p,x=Math.sqrt(x)*(i===r?-1:1);const b=x*o/a*l,g=x*-a/o*u,v=h*b-c*g+(s+e)/2,_=c*b+h*g+(t+n)/2,E=(u-b)/o,C=(l-g)/a,I=(-u-b)/o,F=(-l-g)/a,N=vu(1,0,E,C);let $=vu(E,C,I,F);return r===0&&$>0&&($-=qn),r===1&&$<0&&($+=qn),[v,_,N,$]}function Py(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function _u(s,t,e,n,i,r,o,a,c){const h=Math.sin(c*qn/360),u=Math.cos(c*qn/360),l=u*(s-e)/2+h*(t-n)/2,d=-h*(s-e)/2+u*(t-n)/2;if(l===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=Ey(s,t,e,n,i,r,o,a,h,u),w=[];let x=p[2],b=p[3];const g=Math.max(Math.ceil(Math.abs(b)/(qn/4)),1);b/=g;for(let v=0;v<g;v++)w.push(Py(x,b)),x+=b;return w.map(v=>{for(let _=0;_<v.length;_+=2){let E=v[_+0],C=v[_+1];E*=o,C*=a;const I=u*E-h*C,F=h*E+u*C;v[_+0]=I+p[0],v[_+1]=F+p[1]}return v})}function ao(s,t,e,n,i,r){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,i/3+.6666666666666666*e,r/3+.6666666666666666*n,i,r]}function jn(s,t,e,n){return[s,t,e,n,e,n]}const Vs={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Su(s="path",t){const e=document.createElementNS.call(document,"http://www.w3.org/2000/svg",s);return t&&Ve(e,t),e}function My(s,t){return Su("path",{d:s,id:t||rs()})}function Ay(s,t="shape"){return Us(Wi(s),`${t}.svg`)}function Cu(s){return typeof s!="string"?!1:(s=s.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(s)&&/[\dz]$/i.test(s))}function ky(s){return s.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function Tu(s){const t=[];return Cu(s)&&s.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,n,i)=>{let r=n.toLowerCase();const o=yi(i);for(r=="m"&&o.length>Vs[r]&&(t.push([n,...o.splice(0,Vs[r])]),r="l",n=n=="m"?"l":"L");o.length;){if(o.length<Vs[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${n} } args:{ ${o} }`);t.push([n,...o.splice(0,Vs[r])])}return r=="z"&&t.push([n]),""}),t}function Eu(s){let t=0,e=0,n=0,i=0;return s.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=n,r[7]+=i;break;case"v":r[1]+=i;break;case"h":r[1]+=n;break;default:for(let c=1;c<r.length;)r[c++]+=n,r[c++]+=i}switch(a){case"Z":n=t,i=e;break;case"H":n=r[1];break;case"V":i=r[1];break;case"M":n=t=r[1],i=e=r[2];break;default:n=r[r.length-2],i=r[r.length-1]}return r})}function Iy(s){const t=[];let e=0,n=0,i=0,r=0,o=0,a=0,c=0,h=0,u;for(let l=0,d=s.length;l<d;l++){let f=s[l];const p=f[0];switch(p){case"M":e=f[1],n=f[2];break;case"A":const w=_u(i,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!w.length)continue;w.forEach((g,v)=>{const[_,E,C,I,F,N,$,V]=g;f=["C",C,I,F,N,$,V],v<w.length-1&&t.push(f)});break;case"S":let x=i,b=r;(u=="C"||u=="S")&&(x+=x-c,b+=b-h),f=["C",x,b,f[1],f[2],f[3],f[4]];break;case"T":u=="Q"||u=="T"?(o=i*2-o,a=r*2-a):(o=i,a=r),f=["C",...ao(i,r,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...ao(i,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...jn(i,r,f[1],f[2])];break;case"H":f=["C",...jn(i,r,f[1],r)];break;case"V":f=["C",...jn(i,r,i,f[1])];break;case"Z":f=["C",...jn(i,r,e,n)];break}u=p,i=f[f.length-2],r=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=i,h=r),t.push(f)}return t}class Hn{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),n=document.createElement("video"),i=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),i.src=URL.createObjectURL(r),i.media="(min-width:10px)",n.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(n),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{Hn.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class co extends Ii{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=El(this.source);if(t===0){this.emit("finish");return}let e,n,i=ia(this.source,0);for(let r=1;r<t;r++)e=n,n=i,i=ia(this.source,r),this.raw+=n,n&&this.step(n,i,e);i&&this.step(i,void 0,n),this.emit("finish")}step(t,e,n){t==`
|
|
26
|
-
`&&this.emit("newline"),this.act(t,e,n)}act(t,e,n){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":ae("whitespace",t)?(this.textchunk+=
|
|
27
|
-
`);n=~X?L.length-X:n+L.length}function r(){var L={line:e,column:n};return function(R){return R.position=new o(L),p(),R}}function o(L){this.start=L,this.end={line:e,column:n},this.source=t.source}o.prototype.content=s;var a=[];function c(L){var R=new Error(t.source+":"+e+":"+n+": "+L);if(R.reason=L,R.filename=t.source,R.line=e,R.column=n,R.source=s,t.silent)a.push(R);else throw R}function h(){var L=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:L,parsingErrors:a}}}function u(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var L,R=[];for(p(),w(R);s.length&&s.charAt(0)!="}"&&(L=At()||Lt());)L!==!1&&(R.push(L),w(R));return R}function f(L){var R=L.exec(s);if(R){var X=R[0];return i(X),s=s.slice(X.length),R}}function p(){f(/^\s*/)}function w(L){var R;for(L=L||[];R=x();)R!==!1&&L.push(R);return L}function x(){var L=r();if(!(s.charAt(0)!="/"||s.charAt(1)!="*")){for(var R=2;s.charAt(R)!=""&&(s.charAt(R)!="*"||s.charAt(R+1)!="/");)++R;if(R+=2,s.charAt(R-1)==="")return c("End of comment missing");var X=s.slice(2,R-2);return n+=2,i(X),s=s.slice(R),n+=2,L({type:"comment",comment:X})}}function b(){var L=f(/^([^{]+)/);if(L)return de(L[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(R){return R.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(R){return R.replace(/\u200C/g,",")})}function g(){var L=r(),R=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(R){if(R=de(R[0]),!f(/^:\s*/))return c("property missing ':'");var X=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),H=L({type:"declaration",property:R.replace(Mu,""),value:X?de(X[0]).replace(Mu,""):""});return f(/^[;\s]*/),H}}function v(){var L=[];if(!u())return c("missing '{'");w(L);for(var R;R=g();)R!==!1&&(L.push(R),w(L));return l()?L:c("missing '}'")}function _(){for(var L,R=[],X=r();L=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)R.push(L[1]),f(/^,\s*/);if(R.length)return X({type:"keyframe",values:R,declarations:v()})}function E(){var L=r(),R=f(/^@([-\w]+)?keyframes\s*/);if(R){var X=R[1];if(R=f(/^([-\w]+)\s*/),!R)return c("@keyframes missing name");var H=R[1];if(!u())return c("@keyframes missing '{'");for(var kt,ee=w();kt=_();)ee.push(kt),ee=ee.concat(w());return l()?L({type:"keyframes",name:H,vendor:X,keyframes:ee}):c("@keyframes missing '}'")}}function C(){var L=r(),R=f(/^@supports *([^{]+)/);if(R){var X=de(R[1]);if(!u())return c("@supports missing '{'");var H=w().concat(d());return l()?L({type:"supports",supports:X,rules:H}):c("@supports missing '}'")}}function I(){var L=r(),R=f(/^@host\s*/);if(R){if(!u())return c("@host missing '{'");var X=w().concat(d());return l()?L({type:"host",rules:X}):c("@host missing '}'")}}function F(){var L=r(),R=f(/^@media *([^{]+)/);if(R){var X=de(R[1]);if(!u())return c("@media missing '{'");var H=w().concat(d());return l()?L({type:"media",media:X,rules:H}):c("@media missing '}'")}}function N(){var L=r(),R=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(R)return L({type:"custom-media",name:de(R[1]),media:de(R[2])})}function $(){var L=r(),R=f(/^@page */);if(R){var X=b()||[];if(!u())return c("@page missing '{'");for(var H=w(),kt;kt=g();)H.push(kt),H=H.concat(w());return l()?L({type:"page",selectors:X,declarations:H}):c("@page missing '}'")}}function V(){var L=r(),R=f(/^@([-\w]+)?document *([^{]+)/);if(R){var X=de(R[1]),H=de(R[2]);if(!u())return c("@document missing '{'");var kt=w().concat(d());return l()?L({type:"document",document:H,vendor:X,rules:kt}):c("@document missing '}'")}}function W(){var L=r(),R=f(/^@font-face\s*/);if(R){if(!u())return c("@font-face missing '{'");for(var X=w(),H;H=g();)X.push(H),X=X.concat(w());return l()?L({type:"font-face",declarations:X}):c("@font-face missing '}'")}}var et=mt("import"),Z=mt("charset"),Gt=mt("namespace");function mt(L){var R=new RegExp("^@"+L+"\\s*([^;]+);");return function(){var X=r(),H=f(R);if(H){var kt={type:L};return kt[L]=H[1].trim(),X(kt)}}}function At(){if(s[0]=="@")return E()||F()||N()||C()||et()||Z()||Gt()||V()||$()||I()||W()}function Lt(){var L=r(),R=b();return R?(w(),L({type:"rule",selectors:R,declarations:v()})):c("selector missing")}return uo(h())}function de(s){return s?s.replace(/^\s+|\s+$/g,""):""}function uo(s,t){var e=s&&typeof s.type=="string",n=e?s:t;for(var i in s){var r=s[i];Array.isArray(r)?r.forEach(function(o){uo(o,n)}):r&&typeof r=="object"&&uo(r,n)}return e&&Object.defineProperty(s,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),s}let Dy=class extends co{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=ho(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),fo(this.currentItem.style,this.currentItem,mo)}switch(this.processAttrs(e,n),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&fo(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+lo(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(mo.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&fo(o,this.currentItem,mo),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}};function lo(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return lo(s,t,i,r)-lo(e,n,i,r)}function fo(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),c=a[0].replace(i,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(i,""))}}const mo=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class St{startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){const e=typeof t=="string"?Tu(t):t||[],n=Iy(Eu(e));let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];a[0]=="M"?(i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2]):this._appendLine(new yt({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}}_appendLine(t){if(t instanceof oo){_u(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,w,x,b]=h;this.normalizedLines.push(new yt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:w,toX:x,toY:b})),this.prevPathX=x,this.prevPathY=b});return}if(t instanceof yt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,n,i,r,o,a;t instanceof Ty?[e,n,i,r,o,a]=ao(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=jn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new yt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new St;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e._appendLine(new yt({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new St;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e._appendLine(t[n]);return e}clone(){return St.fromLines(this.normalizedLines)}toSVGPathData(){const t=[];t.push(["M",this.startPathX,this.startPathY]);for(let e=0,n=this.normalizedLines.length;e<n;e++)t.push(...this.normalizedLines[e].toSVGPathData());return t}toSVGPathD(){return ky(this.toSVGPathData())}toCanvasContext(t){t.beginPath(),t.moveTo(this.startPathX,this.startPathY),this.normalizedLines.forEach(e=>{e.toCanvasContext(t)})}getBoundingClientRect(t=2){const e=[],n=[];if(this.normalizedLines.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Q(i,t),y:Q(r,t),width:Q(o-i,t),height:Q(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Q(e.x+e.width*.5,t),y:Q(e.y+e.height*.5,t)}}transform(t,e,n,i,r,o,a){const c=new _t;return c.translate(t,e),c.rotate(r,n,i),c.scale(o,a,n,i),c.isIdentity?this.clone():St.fromLines(this.normalizedLines.map(h=>{let u=h.x,l=h.y,d=h.c1x,f=h.c1y,p=h.c2x,w=h.c2y,x=h.toX,b=h.toY;return{x:u,y:l}=c.transformPoint({x:u,y:l}),{x:d,y:f}=c.transformPoint({x:d,y:f}),{x:p,y:w}=c.transformPoint({x:p,y:w}),{x,y:b}=c.transformPoint({x,y:b}),new yt({x:u,y:l,c1x:d,c1y:f,c2x:p,c2y:w,toX:x,toY:b})}))}getTotalLength(){return this.normalizedLines.reduce((t,e)=>t+=e.length(),0)}getPointAtLength(t){let e=0,n=0;const i=this.normalizedLines.length;for(let r=0;r<i;r++){const o=this.normalizedLines[r];if(n=o.length(),e+n>=t)return o.getPointAtSegmentLength(t-e);e+=n}return this.normalizedLines[i-1].getPointAtSegmentLength(n)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let n=t*e,i=this.normalizedLines[0];if(n--,n>1)for(let r=1;r<e&&(i=this.normalizedLines[r],n>1);r++)n-=1;return i.interpolate(n)}}getSubPathD(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubPathDAtLength(this,t);{const n=this.getSubPathDAtLength(this,e,1);return t?this.getSubPathDAtLength(n,t):n}}getSubPathDAtLength(t,e,n){let i=null,r=0;const o=new St;o.prevPathX=o.startPathX=t.startPathX,o.prevPathY=o.startPathY=t.startPathY;for(let a=0,c=this.normalizedLines.length;a<c;a++){const h=this.normalizedLines[a],u=h.length();if(r+u>e&&!i){const l=h.getPointAtSegmentLength(e-r);if(o._appendLine(new yt({c1x:l.start.x,c1y:l.start.y,c2x:l.m.x,c2y:l.m.y,toX:l.x,toY:l.y})),n)return o;i=o,o._appendLine(new yt({c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:h.x,toY:h.y})),r+=u;continue}r+=u,o._appendLine(h)}return o}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=n;h+=a){const u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(i=u,r=h,o=l)}for(a/=2;a>.5;){const h=r-a,u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),d=r+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&l<o?(i=u,r=h,o=l):d<=n&&p<o?(i=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Qt(c.x,c.y,i.x,i.y):Qt(i.x,i.y,c.x,c.y),distance:Math.sqrt(o)}}getPolymorphPoints(){return[this.startPathX,this.startPathY].concat(this.normalizedLines.reduce((t,e)=>t.concat([e.c1x,e.c1y,e.c2x,e.c2y,e.toX,e.toY]),[]))}getPolymorphPointsPerimeter(){const t=this.getPolymorphPoints(),e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Ee(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}getExpendedPolymorphPointsPathD(t){const e=this.getPolymorphPoints(),n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,u,l,d,f]);let p=0;for(;p<r&&i>0;)o.push(["C",d,f,d,f,d,f]),i-=6,p++}return new St(o)}static getInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?new St(t.toSVGPathD()):Math.abs(n-1)<Number.EPSILON?new St(e.toSVGPathD()):St.fromPolymorphPoints(Hl(t.getPolymorphPoints(),e.getPolymorphPoints(),n))}}const Au=Ry("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Ry(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Mt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function Gs(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function Ly(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function Oy(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const Wn={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class po{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Mt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}}class ku{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class qs{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Wn);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=Wn[i].canvas}}__getStyleState(){const t={},e=Object.keys(Wn);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Wn);for(let r=0;r<i.length;r++){const o=Wn[i[r]],a=this[i[r]];if(o.apply){if(a instanceof ku){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof po)e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,Mt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(i[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(Au);for(let r=0,o=i.length;r<o;r++){const a=i[r],c=Au[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Mt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Mt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Mt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Mt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Mt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Mt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Mt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([n-t,i-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(l/2),p=t+f*d[0],w=e+f*d[1],x=[-c[1],c[0]],b=[h[1],-h[0]],g=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},v=g(x),_=g(b);this.lineTo(p+x[0]*r,w+x[1]*r),this.arc(p,w,r,v,_)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:Gs(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new po(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:Gs(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new po(a,this)}__parseFont(){const e=/^\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[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":Ly(this.textAlign),"dominant-baseline":Oy(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),c=e+n*Math.sin(r),h=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(Mt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=Gs(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Mt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,c=0,h,u,l,d,f,p,w,x;if(t.length===3)n=t[1],i=t[2],h=e.width,u=e.height,r=h,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const b=this.__closestGroupOrSvg();this.__currentElement;const g="translate("+n+", "+i+")";if(e instanceof qs){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)x=d.childNodes[0].getAttribute("id"),this.__ids[x]=x,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const v=f.getAttribute("transform");let _;v?_=v+" "+g:_=g,f.setAttribute("transform",_),b.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(w=this.__document.createElement("canvas"),w.width=r,w.height=o,w.getContext("2d")?.drawImage(e,a,c,h,u,0,0,r,o),e=w),p.setAttribute("transform",g),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),b.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=Gs(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof qs&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new ku(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class go{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new qs({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,c){return this.context.ellipse(t,e,n,i,r,o,a,c),this.currentPath2D.ellipse(t,e,n,i,r,o,a,c),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,n,i,r,o,a){const c=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}const Jn={1:705234,2:8108026,3:6346665,4:16630114,5:16607842,6:16158139,7:2542847,8:10640125,9:16735870,10:8978266,11:16580418,12:16754221,13:16725759,14:14436630,15:6844849,16:13744437,17:1817755,18:16744272,19:4964291,20:16750848,d:14540253,aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};class Vt{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color: Unknown color(${t}) type(${typeof t})`;if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let n;if(n=/^(\w+)\(([^)]*)\)/.exec(t)){const i=n[2];let r;switch(n[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=parseInt(r[1],10),this.g=parseInt(r[2],10),this.b=parseInt(r[3],10),this.a=r[4]?parseFloat(r[4]):1):(r=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=B(parseFloat(r[1]),0,100)*255/100,this.g=B(parseFloat(r[2]),0,100)*255/100,this.b=B(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;default:console.warn(e)}}else if(n=/#([A-Fa-f0-9]+)/.exec(t)){const i=n[1],r=i.length;r===3?this.setRGB(parseInt(i.charAt(0),16),parseInt(i.charAt(1),16),parseInt(i.charAt(2),16),1):r===6||r===8?this.setHEX(parseInt(i,16)):console.warn(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{console.warn(e)}else console.warn(e)}else t instanceof Vt?this.setRGB(t.r,t.g,t.b,t.a):Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):console.warn(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){try{this._color.r=B(Math.round(Ht(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=B(Math.round(Ht(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=B(Math.round(Ht(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=B(Ht(t),0,1)}catch{}}setAlpha(t){return this.a=t,this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,n=this.g,i=this.b,r=t.value;return this.r=r[0]*e+r[3]*n+r[6]*i,this.g=r[1]*e+r[4]*n+r[7]*i,this.b=r[2]*e+r[5]*n+r[8]*i,this}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${Q(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}toColorSpaceString(t=He){bo.fromWorkingColorSpace(me.copy(this),t);const e=me.r,n=me.g,i=me.b;return t!==He?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Vt(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=qe(t.r),this.g=qe(t.g),this.b=qe(t.b),this}copyLinearToSRGB(t){return this.r=je(t.r),this.g=je(t.g),this.b=je(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",n="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:n);{const{r:i,g:r,b:o}=this.color;return this.r=255-i,this.g=255-r,this.b=255-o,this}}lighten(t){t=B(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e+(255-e)*t,this.g=n+(255-n)*t,this.b=i+(255-i)*t,this}darken(t){t=B(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e*(1-t),this.g=n*(1-t),this.b=i*(1-t),this}lerp(t,e){e=B(e,0,1);const{r:n,g:i,b:r}=this.color;return this.r=n+(t.r-n)*e,this.g=i+(t.g-i)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,n){return n=B(n,0,1),this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}static gradient(t,e,n){try{return me.lerpColors(new Vt(t),new Vt(e),n).toString()}catch{return e}}static random(){return me.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Vt.nextIndex){Vt.nextIndex=t;const e=Object.keys(Jn),n=e.length;return me.setHEX(Jn[e[Vt.nextIndex++%n]]).toString()}setColorName(t){const e=Jn[t.toLowerCase()];return e!==void 0?this.setHEX(e):t==="none"?this.a=0:(this.a=1,console.warn("Color.setColorName: Unknown color "+t)),this}static getColors(){return Object.values(Jn).map(t=>me.setHEX(t).toString())}setRGB(t,e,n,i=1){return this.r=t,this.g=e,this.b=n,this.a=i,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,n,i=1){const r=jl(t,1),o=B(e,0,1),a=B(n,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const c=a<=.5?a*(1+o):a+o-a*o,h=2*a-c;this.r=xo(h,c,r+.3333333333333333)*255,this.g=xo(h,c,r)*255,this.b=xo(h,c,r-.3333333333333333)*255}return this.a=i,this}getHSL(t){const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i)/255,o=Math.min(e,n,i)/255;let a,c;const h=(o+r)/2;if(o===r)a=0,c=0;else{const u=r-o;switch(c=h<=.5?u/(r+o):u/(2-r-o),r){case e:a=(n-i)/u+(n<i?6:0);break;case n:a=(i-e)/u+2;break;case i:default:a=(e-n)/u+4;break}a/=6}return t&&t.setHSL(a,c,h,this.a),{h:a,s:c,l:h,a:this.a}}offsetHSL(t,e,n){const i=this.getHSL();return this.setHSL(i.h+t,i.s+e,i.l+n)}lerpHSL(t,e){const n=this.getHSL(),i=t.getHSL(),r=as(n.h,i.h,e),o=as(n.s,i.s,e),a=as(n.l,i.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,n,i=1){const r=B(t,0,1)*360,o=B(e,0,1),a=B(n,0,1),c=Math.floor(r/60)%6,h=r/60-Math.floor(r/60),u=a*(1-o),l=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,u],[l,a,u],[u,a,d],[u,l,a],[d,u,a],[a,u,l]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=i,this}setHSB(t,e,n,i=1){this.setHSV(t,e,n,i)}getHSV(t){const{r:e,g:n,b:i,a:r}=this.color,o=Math.max(e,n,i),a=Math.min(e,n,i),c=o-a;let h;e===o?h=(n-i)/c:n===o?h=2+(i-e)/c:h=4+(e-n)/c,h/=6,h<0&&(h+=1);const u=c==0?0:h,l=o===0?0:c/o,d=o/255;return t&&t.setHSV(u,l,d,r),{h:u,s:l,v:d,a:r}}getHSB(t){const{h:e,s:n,v:i,a:r}=this.getHSV(t);return{h:e,s:n,b:i,a:r}}}const me=new Vt;function qe(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function je(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}const Iu="",He="srgb",yo="srgb-linear",wo="linear",js="srgb",Du=new un().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Ru=new un().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),Lu=[.64,.33,.3,.6,.15,.06],Ou=[.2126,.7152,.0722],zu=[.3127,.329],bo={enabled:!0,workingColorSpace:yo,spaces:{},convert:function(s,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===js&&(s.r=qe(s.r),s.g=qe(s.g),s.b=qe(s.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(s.applyMatrix3(this.spaces[t].toXYZ),s.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===js&&(s.r=je(s.r),s.g=je(s.g),s.b=je(s.b))),s},fromWorkingColorSpace:function(s,t){return this.convert(s,this.workingColorSpace,t)},toWorkingColorSpace:function(s,t){return this.convert(s,t,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Iu?wo:this.spaces[s].transfer},getLuminanceCoefficients:function(s,t=this.workingColorSpace){return s.fromArray(this.spaces[t].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,t,e){return s.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}};bo.define({[yo]:{primaries:Lu,whitePoint:zu,transfer:wo,toXYZ:Du,fromXYZ:Ru,luminanceCoefficients:Ou,workingColorSpaceConfig:{unpackColorSpace:He},outputColorSpaceConfig:{drawingBufferColorSpace:He}},[He]:{primaries:Lu,whitePoint:zu,transfer:js,toXYZ:Du,fromXYZ:Ru,luminanceCoefficients:Ou,outputColorSpaceConfig:{drawingBufferColorSpace:He}}});function xo(s,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<.16666666666666666?s+(t-s)*6*e:e<.5?t:e<.6666666666666666?s+(t-s)*6*(.6666666666666666-e):s}class ft{id;d;parent;attrs;_centerX;_centerY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;show;followMouse;drag;transform$=new Mn;isMouseIn=!1;isDragging=!1;el;constructor(t){this.id=rs(),this.d=t?.d,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this._centerX=t?.centerX,this._centerY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.show=typeof t?.show=="boolean"?t?.show:!0,this.followMouse=typeof t?.followMouse=="boolean"?t?.followMouse:!1,this.drag=t?.drag}destroy(){}moveTo(t,e){const n=this._x,i=this._y;(n!==t||i!==e)&&(this._x=t,this._y=e,this.transform$.next({dx:t-n,dy:e-i}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x=t}get y(){return this._y}set y(t){this._y=t}rotateTo(t){this._degree=t}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree=t}scaleTo(t,e){this._scaleX=t,this._scaleY=e||t}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX=t}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY=t}pathD(){return this.d?(this.d instanceof St||(this.d=new St(this.d)),this.d):new St(this.toSVGPathData())}forcePathD(t){this.d=t}getBaseOptions(){return{d:this.d,attrs:this.getAttrs(),centerX:this._centerX,centerY:this._centerY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,followMouse:this.followMouse,drag:this.drag}}clone(){const t=this.cloneShape();return this.parent&&(t.parent={...this.parent}),t}cloneShape(){return new ft(this.getBaseOptions())}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let n=this._centerX||0,i=this._centerY||0;if(typeof this._centerX>"u"&&typeof this._centerY>"u"){const r=this.getBoundingClientRectCenter(e);if(t||!this.parent)n=r.x,i=r.y;else{const o=this.parent.combo.getBoundingClientRectCenter(e);n=o.x-this.parent.dx,i=o.y-this.parent.dy}}return{x:n,y:i}}isPointInPath(t,e,n){if(t instanceof go)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInFill({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}isPointInStroke(t,e,n){if(t instanceof go)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInStroke({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}setAttr(t,e){if(typeof t!="string")for(const n in t){const i=t[n];i&&(this.attrs[bt(n)]=i)}else e&&(this.attrs[bt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[bt(t)]||e}hasAttr(t){return!!this.getAttr(t)}getAttrs(){return{...this.attrs}}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const n=t?.friction||1;this.vx*=n,this.vy*=n,this.moveTo(this.x+this.vx,this.y+this.vy)}animateEaseTo(t,e){const n=e?.easing||.05,i=t.x-this.x,r=t.y-this.y;this.vx=i*n,this.vy=r*n,this.animate(e)}animateSpringTo(t,e){const n=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.x,o=i.y-this.y,a=r*n,c=o*n;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}animateSpringMassTo(t,e){const n=e?.springLength||100,i=e?.spring||1e-4,r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const c=r*i,h=o*i;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/n}return 0}distance(t){return Ee(this.x,this.y,t.x,t.y)}rotateToTarget(t){this.rotateTo(Et(Qt(this.x,this.y,t.x,t.y)))}followTo(t,e=3){this.rotateToTarget(t);const{dx:n,dy:i}=hn(J(this.degree),e);this.vx=n,this.vy=i,this.animate()}followAccelerationTo(t,e=.05){this.rotateToTarget(t);const{dx:n,dy:i}=hn(J(this.degree),e);this.ax=n,this.ay=i,this.animate()}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,c=o*n/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}checkCollision(t){}checkWall(t){}getTotalLength(){return this.pathD().getTotalLength()}interpolate(t){return this.pathD().interpolate(t)}getPointAtLength(t){return this.pathD().getPointAtLength(t)}trailPath(t=0){const e=this.getTotalLength();return{subPathD:this.pathD().getSubPathD(0,t*e),point:this.getPointAtLength(t*e)}}strokeDashTween(t=1e3,e){const n=Q(this.pathD().getTotalLength(),0);this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const i=e?.onUpdate,r=new Rn({frameDuration:t});r.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+Q(o.offset,2)),i?.(o,a)}})),r.play()}}class Yt{options;commonChildShapeOptions;shapes=[];x=0;y=0;degree=0;scaleX=1;scaleY=1;constructor(t,e){if(this.options=t,this.commonChildShapeOptions=e,t?.svg){let n=0,i=0,r=0,o=0;const a=new Dy(t.svg).parse();for(let c=0,h=a.length;c<h;c++){const u=a[c];if(u.type=="viewbox"&&u.width&&u.height){if(n=parseFloat(u.width),i=parseFloat(u.height),t.forceWidth){const w=n/i;r=t.forceWidth,o=r/w}else r=n,o=i;continue}if(u.type!="path"||!Cu(u.path))continue;const l={};for(const w in u)w==="type"||w==="path"||w==="transform"||(l[w]=u[w]);const d=Eu(Tu(u.path)),f=[];let p=[];for(let w=0,x=d.length;w<x;w++){const b=d[w];p.push(b),b[0].toLowerCase()=="z"&&(f.push(p),p=[])}p.length&&f.push(p),f.forEach(w=>{const x=new ft({...e,d:w,attrs:{...e?.attrs,...l}});if(u.transform){const g=Fr(u.transform).split();x.moveTo(g.x,g.y),x.rotateTo(g.degree),x.scaleTo(g.scaleX,g.scaleY)}r&&n&&o&&i&&x.scaleTo(x.scaleX*(r/n),x.scaleY*(o/i)),this.addShape(x)})}}}destroy(){this.shapes.forEach(t=>t.destroy())}clone(){const t=this.cloneShapeCombo();return t.x=this.x,t.y=this.y,t.degree=this.degree,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.shapes=this.shapes.map(e=>{const n=e.clone();return n.parent&&(n.parent.combo=t),n}),t}cloneShapeCombo(){return new Yt(this.options,this.commonChildShapeOptions)}addShape(t,e=0,n=0){t.parent={combo:this,dx:e||t.x,dy:n||t.y},this.shapes.push(t)}comboMove(t,e){this.x+=t,this.y+=e,this.shapes.forEach(n=>{n.move(t,e)})}comboRotate(t){this.degree+=t,this.shapes.forEach(e=>{e.rotate(t)})}comboScale(t,e){this.scaleX*=t,this.scaleY*=e||t,this.shapes.forEach(n=>{n.scale(t,e)})}comboTransform(t){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1)}getBoundingClientRect(t=2){const e=[],n=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Q(i,t),y:Q(r,t),width:Q(o-i,t),height:Q(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Q(e.x+e.width*.5,t),y:Q(e.y+e.height*.5,t)}}setAttr(t,e){typeof t!="string"?this.shapes.forEach(n=>{n.setAttr(t)}):e&&this.shapes.forEach(n=>{n.setAttr(t,e)})}sort(){this.shapes=this.shapes.map(t=>({shape:t,perimeter:t.pathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,n=this.shapes.length;if(e<n)return t.expendTo(this);for(let i=n;i<e;i++)this.addShape(t.shapes[i].clone())}strokeDashTween(t,e){const n=this.shapes.length-1;switch(e?.type){case"sequence":this.shapes.forEach((a,c)=>{a.strokeDashTween(t,{...e,delay:c,onStart:()=>{c==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{c==n&&e?.onGroupComplete?.()}})});break;case"parallel":default:const i=new Rn({frameDuration:t}),r={},o={};this.shapes.forEach((a,c)=>{const h=Q(a.getTotalLength(),0);r[`offset_${c}`]=h,o[`offset_${c}`]=0,a.setAttr({strokeDasharray:`${h} ${h}`,strokeDashoffset:`${h}`})}),i.addTween(r,o,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(a,c)=>{for(const h in a){const u=Zl(h).number;this.shapes[u].setAttr("strokeDashoffset",""+Q(a[h],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),i.play();break}}}function zy(s,t){s.forEach(n=>{n.animate(),t?.wall&&n.checkWall({wall:t.wall,bounce:t.bounce})});const e=s.length;for(let n=0,i=e-1;n<i;n++)for(let r=n+1;r<e;r++)s[n].checkCollision(s[r])}function Fy(s){const t=s.length;s.forEach((e,n)=>{e.animate();for(let i=n+1;i<t;i++)e.checkCollision(s[i]),e.gravitateTo(s[i])})}function By(s,t){s.forEach((e,n)=>{n>0&&e.animateSpringTo(s[n-1],t)})}function Ny(s,t){const e=t?.springLength||100;s.forEach(n=>{n.isDragging||s.filter(i=>i.id!==n.id).forEach(i=>{const r=Qt(n.x,n.y,i.x,i.y);n.animateSpringTo({x:i.x-Math.cos(r)*e,y:i.y-Math.sin(r)*e},t)})})}function Yy(s,t,e){const n=s.length,i=[];return s.forEach((r,o)=>{r.animate(e),r.x>t.x+t.width?r.moveXTo(t.x):r.x<t.x&&r.moveXTo(t.x+t.width),r.y>t.y+t.height?r.moveYTo(t.y):r.y<t.y&&r.moveYTo(t.y+t.height);for(let a=o+1;a<n;a++)i.push([r.x,r.y,s[a].x,s[a].y,r.animateSpringMassTo(s[a],e)])}),i}function vo(s){if(s.length<2)throw new Error("shapes个数必须大于等于2");const t=s.length-1,e=new Array(t);for(let n=0;n<t;n++){const i=s[n].pathD(),r=s[n+1].pathD(),o=Math.max(i.getPolymorphPoints().length,r.getPolymorphPoints().length);e[n]=St.getInterpolator(i.getExpendedPolymorphPointsPathD(o),r.getExpendedPolymorphPointsPathD(o))}return n=>{const i=Q(t*n,6),r=Math.min(Math.floor(i),t-1),o=Q(i-r,6),a=new ft({d:e[r](o)}),c=s[r].getAttr("fill","none"),h=s[r+1].getAttr("fill","none");typeof c=="string"&&typeof h=="string"&&a.setAttr("fill",Vt.gradient(c,h,o).toString());const u=s[r].getAttr("stroke","none"),l=s[r+1].getAttr("stroke","none");return typeof u=="string"&&typeof l=="string"&&a.setAttr("stroke",Vt.gradient(u,l,o).toString()),a}}function Fu(s){if(s.length<2)throw new Error("shapeCombos个数必须大于等于2");let t=0,e;const n=[];s.forEach(o=>{let a;o instanceof Yt?(a=o,a.sort()):(a=new Yt,a.addShape(o)),n.push(a),t<a.shapes.length&&(t=a.shapes.length,e=a)}),n.forEach(o=>{o!==e&&o.expendTo(e)});const i=[];n.forEach((o,a)=>{o.shapes.forEach((c,h)=>{i[h]=i[h]||[],i[h][a]=c})});const r=[];return i.forEach(o=>{r.push(vo(o))}),o=>{const a=new Yt;return r.forEach(c=>{a.addShape(c(o))}),a}}function Xy(s,t=6e3,e){const n=s.findIndex(a=>a instanceof Yt)>=0?Fu(s):vo(s),i=n(0),r=e?.onUpdate,o=new Rn({frameDuration:t});o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{n(a.t),r?.(a,c),i instanceof ft?e?.shape?.(i):i instanceof Yt&&i.shapes.forEach(h=>{e?.shape?.(h)})}})),o.play()}function Uy(s,t,e,n,i){if(i==0)throw new Error("no dividing by zero, please");const r=[],o=360/i;for(let c=0;c<i;c+=1){const h=o*c*Math.PI/180,u=s+2*e*Math.cos(h),l=t+2*e*Math.sin(h);r.push(new oo({x:s,y:t,rx:e,ry:n,xAxisRotate:o*c,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),r.push(new oo({x:u,y:l,rx:e,ry:n,xAxisRotate:o*c,largeArcFlag:1,sweepFlag:1,toX:s,toY:t}))}return new ft({d:St.fromLines(r)})}function $y(s=document.documentElement,t="canvas"){Uh(s);let e=null,n=null,i=null;t=="svg"&&(e=Su("svg"),Vn(s,e)),t=="canvas"&&(n=qh("canvas"),Vn(s,n));const r={x:0,y:0,width:0,height:0},o=io(s).subscribe(x=>{r.x=x.x,r.y=x.y,r.width=x.width,r.height=x.height,e&&Ve(e,{viewBox:`0 0 ${r.width} ${r.height}`,width:`${r.width}`,height:`${r.height}`}),n&&(Ve(n,{width:`${r.width}`,height:`${r.height}`}),i=new go(n,r.width,r.height,!1))}),a=[];let c="",h="",u="default";const l=(x="default")=>{x!=u&&(s.style.cursor=x,u=x)},d=Ge(),f=lu(e||n||s,{useMousePoint:d}).subscribe(()=>{}),p=x=>{x.followMouse&&(!ma(x.x,d.current.x,5)||!ma(x.y,d.current.y,5))&&x.followTo(d.current),x.drag&&x.drag.enable&&x.drag.targetToAfterDrop&&(x.isDragging||x.animateEaseTo(x.drag.targetToAfterDrop,{easing:x.drag.easing}))},w=(...x)=>{const b=[];x.forEach(g=>{g instanceof Yt?b.push(...g.shapes):b.push(g)}),e&&a.filter(g=>b.findIndex(v=>v.id==g.id)==-1).forEach(g=>{g.el&&(g.el.remove(),delete g.el)}),i&&i.clearRect(),Gl(a,b),c="",d.current.isDown||(h="");for(const g of a){if(!g.show)continue;p(g);const v=g.transformOrigin(),_=v.x,E=v.y;if(e){const C=g.toSVGPathD();g.el||(g.el=My(C,g.id),Vn(e,g.el));const I=new _t;I.translate(g.x,g.y),I.rotate(g.degree,_,E),I.scale(g.scaleX,g.scaleY,_,E),Ve(g.el,{d:C,transform:I.toString(),...g.getAttrs()})}if(i&&(i.save(),i.translate(g.x,g.y),i.rotate(J(g.degree),_,E),i.scale(g.scaleX,g.scaleY,_,E),g.toCanvasContext(i),Ch(i,g.getAttrs()),i.hasSetCustomStrokeStyle&&i.stroke(),i.hasSetCustomFillStyle&&i.fill()),e?g.isMouseIn=g.isPointInPath(e,d.current.x,d.current.y)||g.isPointInStroke(e,d.current.x,d.current.y):i?g.isMouseIn=g.isPointInPath(i,d.current.x,d.current.y)||g.isPointInStroke(i,d.current.x,d.current.y):g.isMouseIn=!1,g.isMouseIn&&(l("pointer"),c=g.id),g.isDragging=g.id==h,d.current.isDown&&(g.isDragging||!h&&g.isMouseIn&&g.drag&&g.drag.enable)){l("grabbing"),g.isDragging=!0,h=g.id;let C=d.current.x-d.start.x,I=d.current.y-d.start.y;if(C||I){if(g.drag&&g.drag.enable&&g.drag.alongPath){const F=g.parent?g.parent.combo.x:g.x,N=g.parent?g.parent.combo.y:g.y,$=_+(g.parent?.dx||0),V=E+(g.parent?.dy||0),W=g.parent?g.parent.combo.degree:g.degree,et=g.parent?g.parent.combo.scaleX:g.scaleX,Z=g.parent?g.parent.combo.scaleY:g.scaleY,mt=g.drag.alongPath.transform(F,N,$,V,W,et,Z).closestPoint(d.current.x,d.current.y),At=g.x,Lt=g.y;console.log(mt.point.x,mt.point.y,At,Lt),C=mt.point.x-At,I=mt.point.y-Lt,console.log(C,I)}(C||I)&&(g.move(C,I),g.parent?.combo.shapes.forEach(F=>{F.drag?.followSibling&&F!==g&&F.move(C,I)}))}d.setStart(d.current)}else g.isMouseIn&&g.drag&&g.drag.enable&&l("grab");i&&i.restore()}!c&&!h&&l("default")};return{rect:r,mousePoint:d.current,shapes:a,draw:w,ctx:i,unsubscribe:()=>{o.unsubscribe(),f.unsubscribe()},downloadSVG:()=>{e&&Ay(e)}}}class mn extends ft{dx;dy;constructor(t){if(super(t),t?.lineLength){const e=hn(J(t?.lineDegree||0),t.lineLength);this.dx=e.dx,this.dy=e.dy}else t?.lineDx||t?.lineDy?(this.dx=t?.lineDx||0,this.dy=t?.lineDy||0):(this.dx=0,this.dy=0)}cloneShape(){return new mn({...super.getBaseOptions(),lineDx:this.dx,lineDy:this.dy})}toSVGPathData(){return[["m",0,0],["l",this.dx,this.dy]]}toCanvasContext(t){t.beginPath(),t.moveTo(0,0),t.lineTo(this.dx,this.dy)}lineToAbsolutePoint(t){this.dx=t.x-this.x,this.dy=t.y-this.y}intersection(t){const e=this.transformOrigin(),i=this.pathD().transform(this.x,this.y,e.x,e.y,this.degree,this.scaleX,this.scaleY).normalizedLines[0],r=t.transformOrigin(),a=t.pathD().transform(this.x,this.y,r.x,r.y,t.degree,t.scaleX,t.scaleY).normalizedLines[0];return i.intersection(a)}}class _o extends Yt{constructor(t,e){super(t,e);const n=new mn({...e,drag:{...e?.drag,followSibling:!0},lineLength:100,lineDegree:90});this.addShape(n);const i=new mn({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(i);const r=new mn({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(r)}cloneShapeCombo(){return new _o(this.options,this.commonChildShapeOptions)}}class pn extends ft{radius;constructor(t){super(t),this.radius=t?.ballRadius||0}cloneShape(){return new pn({...super.getBaseOptions(),ballRadius:this.radius})}getBoundingClientRect(){return{x:-this.radius,y:-this.radius,width:this.radius*2,height:this.radius*2}}toSVGPathData(){return this.radius?[["m",0,-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.radius===t.radius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return cn(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y;return{x:n*t.x-e*t.y,y:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}checkCollision(t){const e=t.x-this.x,n=t.y-this.y;if(Math.sqrt(e*e+n*n)<this.radius+t.radius){const r=Math.atan2(n,e),o={x:0,y:0},a=te(-r,e,n),c=te(-r,this.vx,this.vy),h=te(-r,t.vx,t.vy),u=c.x-h.x;c.x=((this.mass-t.mass)*c.x+2*t.mass*h.x)/(this.mass+t.mass),h.x=u+c.x;const l=Math.abs(c.x)+Math.abs(h.x),d=this.radius+t.radius-Math.abs(o.x-a.x);o.x+=c.x/l*d,a.x+=h.x/l*d;const f=te(r,o.x,o.y),p=te(r,a.x,a.y);t.moveTo(this.x+p.x,this.y+p.y),this.moveTo(this.x+f.x,this.y+f.y);const w=te(r,c.x,c.y),x=te(r,h.x,h.y);this.vx=w.x,this.vy=w.y,t.vx=x.x,t.vy=x.y}}checkWall(t){const e=typeof t?.bounce=="number"?t.bounce:-1,n=t.wall.x,i=t.wall.y,r=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height;this.x+this.radius>r?(this.moveXTo(r-this.radius),this.vx*=e):this.x-this.radius<n&&(this.moveXTo(n+this.radius),this.vx*=e),this.y+this.radius>o?(this.moveYTo(o-this.radius),this.vy*=e):this.y-this.radius<i&&(this.moveYTo(i+this.radius),this.vy*=e)}}class So extends ft{constructor(t){super(t)}cloneShape(){return new So({...super.getBaseOptions()})}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class We extends ft{width;height;borderRadius;constructor(t){super(t),this.width=t.rectWidth,this.height=t.rectHeight,this.borderRadius=t.rectBorderRadius||0}cloneShape(){return new We({...super.getBaseOptions(),rectWidth:this.width,rectHeight:this.height,rectBorderRadius:this.borderRadius})}static fromCubicBezier(t,e,n,i,r,o,a,c){const u=new yt({x:t,y:e,c1x:n,c1y:i,c2x:r,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new We({x:u.x,y:u.y,rectWidth:u.width,rectHeight:u.height})}toSVGPathData(){return this.borderRadius?[["m",this.borderRadius,0],["l",this.width-this.borderRadius*2,0],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,this.borderRadius],["l",0,this.height-this.borderRadius*2],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,this.borderRadius],["l",this.borderRadius*2-this.width,0],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,-this.borderRadius],["l",0,this.borderRadius*2-this.height],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,-this.borderRadius],["z"]]:[["m",0,0],["l",this.width,0],["l",0,this.height],["l",-this.width,0],["z"]]}toCanvasContext(t){t.beginPath(),this.borderRadius<=0?t.rect(0,0,this.width,this.height):(t.moveTo(0,this.borderRadius),t.lineTo(0,this.height-this.borderRadius),t.quadraticCurveTo(0,this.height,this.borderRadius,this.height),t.lineTo(this.width-this.borderRadius,this.height),t.quadraticCurveTo(this.width,this.height,this.width,this.height-this.borderRadius),t.lineTo(this.width,this.borderRadius),t.quadraticCurveTo(this.width,0,this.width-this.borderRadius,0),t.lineTo(this.borderRadius,0),t.quadraticCurveTo(0,0,0,this.borderRadius)),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.borderRadius===t.borderRadius}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t){return t.x>=this.x&&t.x<=this.x+this.width&&t.y>=this.y&&t.y<=this.y+this.height}}class Co extends ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Co({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class To extends ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx??50,this.ry=t?.heartRy??50}cloneShape(){return new To({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class Eo extends ft{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Eo({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const n=288+e*144,i=this.r*Math.cos(J(n)),r=this.r*Math.sin(J(n));t.push(["l",i,r])}return t}}class Po extends ft{constructor(t){super(t)}cloneShape(){return new Po({...super.getBaseOptions()})}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class Mo extends ft{constructor(t){super(t)}cloneShape(){return new Mo({...super.getBaseOptions()})}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,30],["a",15,15,0,1,1,0,-30]]}}class Ao extends ft{constructor(t){super(t),this.d="m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"}cloneShape(){return new Ao({...super.getBaseOptions()})}}class ko extends Yt{constructor(t,e){super(t,e);const n=new ft({...e,drag:{...e?.drag,followSibling:!0},show:typeof t?.showFlame=="boolean"?t.showFlame:!1,d:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]]});this.addShape(n);const i=new ft({...e,drag:{...e?.drag,followSibling:!0},d:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]]});this.addShape(i)}cloneShapeCombo(){return new ko({...this.options,showFlame:this.showFlame},this.commonChildShapeOptions)}set showFlame(t){this.shapes[0].show=t}get showFlame(){return this.shapes[0].show}}class Io extends Yt{width;height;cornerRadius;constructor(t,e){super(t,e),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const n=new We({...e,drag:{...e?.drag,followSibling:!0},x:0-this.cornerRadius,y:0-this.height*.5,rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(n);const i=new pn({...e,drag:{...e?.drag,followSibling:!0},x:0,y:0,ballRadius:2});this.addShape(i);const r=new pn({...e,drag:{...e?.drag,followSibling:!0},x:0+this.width,y:0,ballRadius:2});this.addShape(r)}cloneShapeCombo(){return new Io({...this.options,segmentWidth:this.width,segmentHeight:this.height},this.commonChildShapeOptions)}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(J(t.degree))*this.width,y:t.y+Math.sin(J(t.degree))*this.width}}}class Do extends Yt{value$=new Mn;subscription;constructor(t,e){super(t,e);const n=t?.sliderMin||0,i=t?.sliderMax||100,r=t?.sliderStep||1,o=Wl(n,i,r),a=o(typeof t?.sliderDefaultValue=="number"?B(t.sliderDefaultValue,n,i):n);this.value$.next(a);const c=a/(i-n),h=t?.sliderWidth||100,u=t?.sliderHeight||4,l=u*.5,d=u*2.5,f=t?.sliderBackgroundColor||"#f5f5f5",p=t?.sliderForegroundColor||"#5a82f0",w=new We({...e,rectWidth:h,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:f},drag:{...e?.drag,enable:!1}});this.addShape(w);const x=new We({...e,rectWidth:h*c,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!1}});this.addShape(x);const b=new pn({...e,x:h*c,y:l,ballRadius:d,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!0,alongPath:new St([["m",0,0],["l",h,0]])}});this.addShape(b),this.subscription=b.transform$.subscribe(({dx:g})=>{x.width=B(x.width+(g||0),0,h),this.value$.next(o((b.x-w.x)/h*(i-n)+n))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new Do({...this.options},this.commonChildShapeOptions)}}async function Vy(s,t){return new Promise(e=>{new MutationObserver((i,r)=>{t(i,r),e(()=>{r.disconnect()})}).observe(s,{attributes:!0,childList:!0,subtree:!0})})}function Bu(s,t={attributes:!0,childList:!0,subtree:!0}){return new st(e=>{const n=new MutationObserver(i=>{e.next(i)});return n.observe(s,t),()=>{n.disconnect()}})}async function Gy(s,t,e={threshold:.5}){return new Promise(n=>{new IntersectionObserver((r,o)=>{t(r,o),n(()=>{o.unobserve(s)})},e).observe(s)})}function Nu(s,t={threshold:.5}){return new st(e=>{const n=new IntersectionObserver((i,r)=>{e.next(i)},t);return n.observe(s),()=>{n.unobserve(s),n.disconnect()}})}function qy(s,t){return fu().pipe(Se(null),ot(()=>{const{width:e,height:n}=t?.root?.getBoundingClientRect()||du(),{top:i,left:r,right:o,bottom:a}=s.getBoundingClientRect();return(i>=0&&i<=n||a>=0&&a<=n)&&(r>=0&&r<=e||o>=0&&o<=e)}),_e())}function jy(s,t){const e=typeof t?.threshold=="number"?t.threshold:.5;return Nu(s,{threshold:e,root:t?.root}).pipe(ot(n=>{let i=n[0];if(n.length>1){const r=n.find(o=>o.isIntersecting);r&&(i=r)}return i.isIntersecting&&i.intersectionRatio>=e}),_e())}let Yu=!1;function Hy(){Yu||(Yu=!0,_h(`
|
|
25
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function En(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var on=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,n,i,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ze(o),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(w){t={error:w}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(q(u))try{u()}catch(w){r=w instanceof nr?w.errors:[w]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=ze(l),f=d.next();!f.done;f=d.next()){var p=f.value;try{_c(p)}catch(w){r=r??[],w instanceof nr?r=Fe(Fe([],xe(r)),xe(w.errors)):r.push(w)}}}catch(w){n={error:w}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(r)throw new nr(r)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)_c(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&En(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&En(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),xc=on.EMPTY;function vc(s){return s instanceof on||s&&"closed"in s&&q(s.remove)&&q(s.add)&&q(s.unsubscribe)}function _c(s){q(s)?s():s.unsubscribe()}var Sc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},sr={setTimeout:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=sr.delegate;return i?.setTimeout?i.setTimeout.apply(i,Fe([s,t],xe(e))):setTimeout.apply(void 0,Fe([s,t],xe(e)))},clearTimeout:function(s){var t=sr.delegate;return(t?.clearTimeout||clearTimeout)(s)},delegate:void 0};function Cc(s){sr.setTimeout(function(){throw s})}function Pn(){}function Ts(s){s()}var ir=function(s){be(t,s);function t(e){var n=s.call(this)||this;return n.isStopped=!1,e?(n.destination=e,vc(e)&&e.add(n)):n.destination=wm,n}return t.create=function(e,n,i){return new Es(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,s.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(on),pm=Function.prototype.bind;function rr(s,t){return pm.call(s,t)}var gm=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){Ps(n)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){Ps(n)}else Ps(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Ps(e)}},s}(),Es=function(s){be(t,s);function t(e,n,i){var r=s.call(this)||this,o;if(q(e)||!e)o={next:e??void 0,error:n??void 0,complete:i??void 0};else{var a;r&&Sc.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return r.unsubscribe()},o={next:e.next&&rr(e.next,a),error:e.error&&rr(e.error,a),complete:e.complete&&rr(e.complete,a)}):o=e}return r.destination=new gm(o),r}return t}(ir);function Ps(s){Cc(s)}function ym(s){throw s}var wm={closed:!0,next:Pn,error:ym,complete:Pn},or=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ne(s){return s}function bm(s){return s.length===0?Ne:s.length===1?s[0]:function(e){return s.reduce(function(n,i){return i(n)},e)}}var st=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,n){var i=this,r=vm(t)?t:new Es(t,e,n);return Ts(function(){var o=i,a=o.operator,c=o.source;r.add(a?a.call(r,c):c?i._subscribe(r):i._trySubscribe(r))}),r},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var n=this;return e=Tc(e),new e(function(i,r){var o=new Es({next:function(a){try{t(a)}catch(c){r(c),o.unsubscribe()}},error:r,complete:i});n.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[or]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return bm(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=Tc(t),new t(function(n,i){var r;e.subscribe(function(o){return r=o},function(o){return i(o)},function(){return n(r)})})},s.create=function(t){return new s(t)},s}();function Tc(s){var t;return(t=s??Sc.Promise)!==null&&t!==void 0?t:Promise}function xm(s){return s&&q(s.next)&&q(s.error)&&q(s.complete)}function vm(s){return s&&s instanceof ir||xm(s)&&vc(s)}function _m(s){return q(s?.lift)}function Ft(s){return function(t){if(_m(t))return t.lift(function(e){try{return s(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function ut(s,t,e,n,i){return new Sm(s,t,e,n,i)}var Sm=function(s){be(t,s);function t(e,n,i,r,o,a){var c=s.call(this,e)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(h){try{n(h)}catch(u){e.error(u)}}:s.prototype._next,c._error=r?function(h){try{r(h)}catch(u){e.error(u)}finally{this.unsubscribe()}}:s.prototype._error,c._complete=i?function(){try{i()}catch(h){e.error(h)}finally{this.unsubscribe()}}:s.prototype._complete,c}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;s.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(ir),Cm=er(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Mn=function(s){be(t,s);function t(){var e=s.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var n=new Ec(this,this);return n.operator=e,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Cm},t.prototype.next=function(e){var n=this;Ts(function(){var i,r;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=ze(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){i={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var n=this;Ts(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=e;for(var i=n.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ts(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var n=e.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),s.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var n=this,i=this,r=i.hasError,o=i.isStopped,a=i.observers;return r||o?xc:(this.currentObservers=null,a.push(e),new on(function(){n.currentObservers=null,En(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var n=this,i=n.hasError,r=n.thrownError,o=n.isStopped;i?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new st;return e.source=this,e},t.create=function(e,n){return new Ec(e,n)},t}(st),Ec=function(s){be(t,s);function t(e,n){var i=s.call(this)||this;return i.destination=e,i.source=n,i}return t.prototype.next=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,e)},t.prototype.error=function(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,e)},t.prototype.complete=function(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)},t.prototype._subscribe=function(e){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&i!==void 0?i:xc},t}(Mn),Pc={now:function(){return(Pc.delegate||Date).now()},delegate:void 0},Tm=function(s){be(t,s);function t(e,n){return s.call(this)||this}return t.prototype.schedule=function(e,n){return this},t}(on),Ms={setInterval:function(s,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var i=Ms.delegate;return i?.setInterval?i.setInterval.apply(i,Fe([s,t],xe(e))):setInterval.apply(void 0,Fe([s,t],xe(e)))},clearInterval:function(s){var t=Ms.delegate;return(t?.clearInterval||clearInterval)(s)},delegate:void 0},Em=function(s){be(t,s);function t(e,n){var i=s.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(e,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=e;var r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(e,n,i){return i===void 0&&(i=0),Ms.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&Ms.clearInterval(n)},t.prototype.execute=function(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,n){var i=!1,r;try{this.work(e)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,n=e.id,i=e.scheduler,r=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,En(r,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},t}(Tm),Mc=function(){function s(t,e){e===void 0&&(e=s.now),this.schedulerActionCtor=t,this.now=e}return s.prototype.schedule=function(t,e,n){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},s.now=Pc.now,s}(),Pm=function(s){be(t,s);function t(e,n){n===void 0&&(n=Mc.now);var i=s.call(this,e,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var n=this.actions;if(this._active){n.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,i){for(;e=n.shift();)e.unsubscribe();throw i}},t}(Mc),ar=new Pm(Em),Mm=ar,Ac=new st(function(s){return s.complete()});function kc(s){return s&&q(s.schedule)}function cr(s){return s[s.length-1]}function Am(s){return q(cr(s))?s.pop():void 0}function An(s){return kc(cr(s))?s.pop():void 0}function km(s,t){return typeof cr(s)=="number"?s.pop():t}var hr=function(s){return s&&typeof s.length=="number"&&typeof s!="function"};function Ic(s){return q(s?.then)}function Dc(s){return q(s[or])}function Rc(s){return Symbol.asyncIterator&&q(s?.[Symbol.asyncIterator])}function Lc(s){return new TypeError("You provided "+(s!==null&&typeof s=="object"?"an invalid object":"'"+s+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Im(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Oc=Im();function zc(s){return q(s?.[Oc])}function Fc(s){return dm(this,arguments,function(){var e,n,i,r;return bc(this,function(o){switch(o.label){case 0:e=s.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,rn(e.read())];case 3:return n=o.sent(),i=n.value,r=n.done,r?[4,rn(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,rn(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Nc(s){return q(s?.getReader)}function vt(s){if(s instanceof st)return s;if(s!=null){if(Dc(s))return Dm(s);if(hr(s))return Rm(s);if(Ic(s))return Lm(s);if(Rc(s))return Bc(s);if(zc(s))return Om(s);if(Nc(s))return zm(s)}throw Lc(s)}function Dm(s){return new st(function(t){var e=s[or]();if(q(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Rm(s){return new st(function(t){for(var e=0;e<s.length&&!t.closed;e++)t.next(s[e]);t.complete()})}function Lm(s){return new st(function(t){s.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Cc)})}function Om(s){return new st(function(t){var e,n;try{for(var i=ze(s),r=i.next();!r.done;r=i.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}t.complete()})}function Bc(s){return new st(function(t){Fm(s,t).catch(function(e){return t.error(e)})})}function zm(s){return Bc(Fc(s))}function Fm(s,t){var e,n,i,r;return fm(this,void 0,void 0,function(){var o,a;return bc(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),e=mm(s),c.label=1;case 1:return[4,e.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function he(s,t,e,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var r=t.schedule(function(){e(),i?s.add(this.schedule(null,n)):this.unsubscribe()},n);if(s.add(r),!i)return r}function Yc(s,t){return t===void 0&&(t=0),Ft(function(e,n){e.subscribe(ut(n,function(i){return he(n,s,function(){return n.next(i)},t)},function(){return he(n,s,function(){return n.complete()},t)},function(i){return he(n,s,function(){return n.error(i)},t)}))})}function ur(s,t){return t===void 0&&(t=0),Ft(function(e,n){n.add(s.schedule(function(){return e.subscribe(n)},t))})}function Nm(s,t){return vt(s).pipe(ur(t),Yc(t))}function Bm(s,t){return vt(s).pipe(ur(t),Yc(t))}function Ym(s,t){return new st(function(e){var n=0;return t.schedule(function(){n===s.length?e.complete():(e.next(s[n++]),e.closed||this.schedule())})})}function Um(s,t){return new st(function(e){var n;return he(e,t,function(){n=s[Oc](),he(e,t,function(){var i,r,o;try{i=n.next(),r=i.value,o=i.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return q(n?.return)&&n.return()}})}function Uc(s,t){if(!s)throw new Error("Iterable cannot be null");return new st(function(e){he(e,t,function(){var n=s[Symbol.asyncIterator]();he(e,t,function(){n.next().then(function(i){i.done?e.complete():e.next(i.value)})},0,!0)})})}function Xm(s,t){return Uc(Fc(s),t)}function $m(s,t){if(s!=null){if(Dc(s))return Nm(s,t);if(hr(s))return Ym(s,t);if(Ic(s))return Bm(s,t);if(Rc(s))return Uc(s,t);if(zc(s))return Um(s,t);if(Nc(s))return Xm(s,t)}throw Lc(s)}function kn(s,t){return t?$m(s,t):vt(s)}function Vm(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s);return kn(s,e)}var Gm=er(function(s){return function(){s(this),this.name="EmptyError",this.message="no elements in sequence"}});function qm(s,t){var e=typeof t=="object";return new Promise(function(n,i){var r=new Es({next:function(o){n(o),r.unsubscribe()},error:i,complete:function(){e?n(t.defaultValue):i(new Gm)}});s.subscribe(r)})}function jm(s){return s instanceof Date&&!isNaN(s)}function ot(s,t){return Ft(function(e,n){var i=0;e.subscribe(ut(n,function(r){n.next(s.call(t,r,i++))}))})}var Hm=Array.isArray;function Wm(s,t){return Hm(t)?s.apply(void 0,Fe([],xe(t))):s(t)}function lr(s){return ot(function(t){return Wm(s,t)})}var Jm=Array.isArray,Zm=Object.getPrototypeOf,Qm=Object.prototype,Km=Object.keys;function tp(s){if(s.length===1){var t=s[0];if(Jm(t))return{args:t,keys:null};if(ep(t)){var e=Km(t);return{args:e.map(function(n){return t[n]}),keys:e}}}return{args:s,keys:null}}function ep(s){return s&&typeof s=="object"&&Zm(s)===Qm}function np(s,t){return s.reduce(function(e,n,i){return e[n]=t[i],e},{})}function sp(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s),n=Am(s),i=tp(s),r=i.args,o=i.keys;if(r.length===0)return kn([],e);var a=new st(ip(r,e,o?function(c){return np(o,c)}:Ne));return n?a.pipe(lr(n)):a}function ip(s,t,e){return e===void 0&&(e=Ne),function(n){Xc(t,function(){for(var i=s.length,r=new Array(i),o=i,a=i,c=function(u){Xc(t,function(){var l=kn(s[u],t),d=!1;l.subscribe(ut(n,function(f){r[u]=f,d||(d=!0,a--),a||n.next(e(r.slice()))},function(){--o||n.complete()}))},n)},h=0;h<i;h++)c(h)},n)}}function Xc(s,t,e){s?he(e,s,t):t()}function rp(s,t,e,n,i,r,o,a){var c=[],h=0,u=0,l=!1,d=function(){l&&!c.length&&!h&&t.complete()},f=function(w){return h<n?p(w):c.push(w)},p=function(w){r&&t.next(w),h++;var x=!1;vt(e(w,u++)).subscribe(ut(t,function(b){i?.(b),r?f(b):t.next(b)},function(){x=!0},void 0,function(){if(x)try{h--;for(var b=function(){var g=c.shift();o?he(t,o,function(){return p(g)}):p(g)};c.length&&h<n;)b();d()}catch(g){t.error(g)}}))};return s.subscribe(ut(t,f,function(){l=!0,d()})),function(){a?.()}}function fr(s,t,e){return e===void 0&&(e=1/0),q(t)?fr(function(n,i){return ot(function(r,o){return t(n,r,i,o)})(vt(s(n,i)))},e):(typeof t=="number"&&(e=t),Ft(function(n,i){return rp(n,i,s,e)}))}function $c(s){return s===void 0&&(s=1/0),fr(Ne,s)}function op(){return $c(1)}function Vc(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return op()(kn(s,An(s)))}var cp=["addListener","removeListener"],hp=["addEventListener","removeEventListener"],up=["on","off"];function dr(s,t,e,n){if(q(e)&&(n=e,e=void 0),n)return dr(s,t,e).pipe(lr(n));var i=xe(dp(s)?hp.map(function(a){return function(c){return s[a](t,c,e)}}):lp(s)?cp.map(Gc(s,t)):fp(s)?up.map(Gc(s,t)):[],2),r=i[0],o=i[1];if(!r&&hr(s))return fr(function(a){return dr(a,t,e)})(vt(s));if(!r)throw new TypeError("Invalid event target");return new st(function(a){var c=function(){for(var h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return a.next(1<h.length?h:h[0])};return r(c),function(){return o(c)}})}function Gc(s,t){return function(e){return function(n){return s[e](t,n)}}}function lp(s){return q(s.addListener)&&q(s.removeListener)}function fp(s){return q(s.on)&&q(s.off)}function dp(s){return q(s.addEventListener)&&q(s.removeEventListener)}function it(s,t,e){return e?it(s,t).pipe(lr(e)):new st(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},r=s(i);return q(t)?function(){return t(i,r)}:void 0})}function mp(s,t,e){s===void 0&&(s=0),e===void 0&&(e=Mm);var n=-1;return t!=null&&(kc(t)?e=t:n=t),new st(function(i){var r=jm(s)?+s-e.now():s;r<0&&(r=0);var o=0;return e.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},r)})}function pp(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s),n=km(s,1/0),i=s;return i.length?i.length===1?vt(i[0]):$c(n)(kn(i,e)):Ac}var gp=Array.isArray;function yp(s){return s.length===1&&gp(s[0])?s[0]:s}function qc(s,t){return Ft(function(e,n){var i=0;e.subscribe(ut(n,function(r){return s.call(t,r,i++)&&n.next(r)}))})}function mr(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];return s=yp(s),s.length===1?vt(s[0]):new st(wp(s))}function wp(s){return function(t){for(var e=[],n=function(r){e.push(vt(s[r]).subscribe(ut(t,function(o){if(e){for(var a=0;a<e.length;a++)a!==r&&e[a].unsubscribe();e=null}t.next(o)})))},i=0;e&&!t.closed&&i<s.length;i++)n(i)}}function ve(s,t){return t===void 0&&(t=Ne),s=s??bp,Ft(function(e,n){var i,r=!0;e.subscribe(ut(n,function(o){var a=t(o);(r||!s(i,a))&&(r=!1,i=a,n.next(o))}))})}function bp(s,t){return s===t}function jc(s,t){return t?function(e){return e.pipe(jc(function(n,i){return vt(s(n,i)).pipe(ot(function(r,o){return t(n,r,i,o)}))}))}:Ft(function(e,n){var i=0,r=null,o=!1;e.subscribe(ut(n,function(a){r||(r=ut(n,void 0,function(){r=null,o&&n.complete()}),vt(s(a,i++)).subscribe(r))},function(){o=!0,!r&&n.complete()}))})}function _e(){for(var s=[],t=0;t<arguments.length;t++)s[t]=arguments[t];var e=An(s);return Ft(function(n,i){(e?Vc(s,n,e):Vc(s,n)).subscribe(i)})}function As(s,t){return Ft(function(e,n){var i=null,r=0,o=!1,a=function(){return o&&!i&&n.complete()};e.subscribe(ut(n,function(c){i?.unsubscribe();var h=0,u=r++;vt(s(c,u)).subscribe(i=ut(n,function(l){return n.next(t?t(c,l,u,h++):l)},function(){i=null,a()}))},function(){o=!0,a()}))})}function xp(){return As(Ne)}function pr(s){return Ft(function(t,e){vt(s).subscribe(ut(e,function(){return e.complete()},Pn)),!e.closed&&t.subscribe(e)})}function Be(s,t,e){var n=q(s)||t||e?{next:s,error:t,complete:e}:s;return n?Ft(function(i,r){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(ut(r,function(c){var h;(h=n.next)===null||h===void 0||h.call(n,c),r.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),r.complete()},function(c){var h;a=!1,(h=n.error)===null||h===void 0||h.call(n,c),r.error(c)},function(){var c,h;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(h=n.finalize)===null||h===void 0||h.call(n)}))}):Ne}function vp(s,t){return Ft(function(e,n){var i=t??{},r=i.leading,o=r===void 0?!0:r,a=i.trailing,c=a===void 0?!1:a,h=!1,u=null,l=null,d=!1,f=function(){l?.unsubscribe(),l=null,c&&(x(),d&&n.complete())},p=function(){l=null,d&&n.complete()},w=function(b){return l=vt(s(b)).subscribe(ut(n,f,p))},x=function(){if(h){h=!1;var b=u;u=null,n.next(b),!d&&w(b)}};e.subscribe(ut(n,function(b){h=!0,u=b,!(l&&!l.closed)&&(o?x():w(b))},function(){d=!0,!(c&&h&&l&&!l.closed)&&n.complete()}))})}function _p(s,t,e){t===void 0&&(t=ar);var n=mp(s,t);return vp(function(){return n},e)}function Sp(s,t){return Ft(function(e,n){var i=[],r=function(o){for(;0<i.length;)i.shift().error(o);n.error(o)};vt(s).subscribe(ut(n,function(o){var a=new Mn;i.push(a);var c=new on,h=function(){En(i,a),a.complete(),c.unsubscribe()},u;try{u=vt(t(o))}catch(l){r(l);return}n.next(a.asObservable()),c.add(u.subscribe(ut(n,h,Pn,r)))},Pn)),e.subscribe(ut(n,function(o){var a,c,h=i.slice();try{for(var u=ze(h),l=u.next();!l.done;l=u.next()){var d=l.value;d.next(o)}}catch(f){a={error:f}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},r,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function j(s,t,e,n=!1){const i=async r=>{await e(r)};try{s.addEventListener(t,i,n)}catch{s.attachEvent("on"+t,i)}return()=>{try{s.removeEventListener(t,i,n)}catch{s.detachEvent("on"+t,i)}}}function X(s,t,e=!1){return dr(s,t,{capture:e})}function Se(s){if(s.preventDefault){s.preventDefault();return}try{s.returnValue=!1}catch{}}function Hc(s){if(s.stopPropagation){s.stopPropagation();return}try{s.cancelBubble=!0}catch{}}const Cp=["click","dblclick","wheel","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],Tp=["keydown","keyup","keypress"],Ep=["touchstart","touchend","touchcancel","touchmove"],Pp=["pointerdown","pointerup","pointercancel","pointermove"],Mp=["dragstart","drag","dragend","dragenter","dragover","dragleave","drop"],Ap=["change"];function kp(s,t,e={bubbles:!0,detail:{}}){if(!s)return;let n;try{Cp.includes(t)?n=new MouseEvent(t,e):Tp.includes(t)?n=new KeyboardEvent(t,e):Ep.includes(t)?n=new TouchEvent(t,e):Pp.includes(t)?n=new PointerEvent(t,e):Mp.includes(t)?n=new DragEvent(t,e):Ap.includes(t)?n=new Event(t,e):n=new CustomEvent(t,e)}catch{document.createEvent?n=document.createEvent("HTMLEvents").initEvent(t,!0,!0):document.createEventObject&&(n=document.createEventObject())}if(s.dispatchEvent)s.dispatchEvent(n);else if(s.fireEvent&&document.createEventObject)s.fireEvent("on"+t,n);else throw new Error(`Can't fire event : ${t}`)}function Ip(s,t){const e=s.changedTouches[0];return new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null})}function Dp(s,t){let e=document.createElement(s);t="on"+t;let n=t in e;return n||(e.setAttribute(t,"return;"),n=typeof e[t]=="function"),e=null,n}const ks=()=>{const s=navigator.userAgent.toLowerCase();let t="Unknown";return/iphone|ipad|ipod/i.test(s)?t="iOS":/android/i.test(s)?t="Android":/BlackBerry/i.test(s)?t="BlackBerry":/mac/i.test(s)?t="macOS":/win/i.test(s)?t="Windows":/linux/i.test(s)?t="Linux":/bsd/i.test(s)&&(t="BSD"),t.toLowerCase()};function Rp(s=navigator.userAgent){let t="Unknown";if(/iPhone|iPad|iPod/i.test(s)){const e=s.match(/OS (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Android/i.test(s)){const e=s.match(/Android (\d+\.\d+)/i);e&&(t=e[1])}else if(/Mac OS X/i.test(s)){const e=s.match(/Mac OS X (\d+_\d+)/i);e&&(t=e[1].replace("_","."))}else if(/Windows NT/i.test(s)){const e=s.match(/Windows NT (\d+\.\d+)/i);e&&(t=e[1])}return t.toLowerCase()}function Lp(s,t){const e=s.split("."),n=t.split(".");for(let i=0,r=e.length;i<r;i++){if(n.length==i)return 1;if(e[i]!=n[i])return e[i]>n[i]?1:-1}return e.length!=n.length?-1:0}function gr(){const s=navigator.userAgent.toLowerCase();let t="Unknown";return/opr/i.test(s)||/opera/i.test(s)?t="Opera":/chrome/i.test(s)?t="Chrome":/firefox/i.test(s)?t="Firefox":/safari/i.test(s)?t="Safari":/edge/i.test(s)?t="Edge":/msie|trident/i.test(s)?t="IE":/MicroMessenger/i.test(s)?t="Wechat":/alipay/i.test(s)&&(t="Ali"),t.toLowerCase()}const Op=()=>{const s=navigator.userAgent;let t="Unknown";if(/Chrome/.test(s)){const e=s.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(s)){const e=s.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(s)){const e=s.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(s)){const e=s.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(s)){const e=s.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t};function zp(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function Fp(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function yr(){return ks()==="ios"}function Wc(){return ks()==="macos"}function Np(){return yr()|Wc()}function Jc(){return ks()==="android"}function Bp(){return yr()||Jc()}function Zc(){const s=window.navigator.userAgent,t=s.indexOf("MSIE ");if(t>0)return parseInt(s.substring(t+5,s.indexOf(".",t)),10);if(s.indexOf("Trident/")>0){const i=s.indexOf("rv:");return parseInt(s.substring(i+3,s.indexOf(".",i)),10)}const n=s.indexOf("Edge/");return n>0?parseInt(s.substring(n+5,s.indexOf(".",n)),10):-1}const Yp=Zc()!==-1,Up=document.documentMode?document.documentMode===9:!1,Xp=document.documentMode?document.documentMode===10:!1,$p=document.documentMode?document.documentMode===11:!1;function Qc(){return gr()==="wechat"}function Kc(){return gr()==="ali"}function Vp(){return Qc()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function Gp(){return Kc()&&navigator.userAgent.match(/miniprogram/i)}const qp=typeof document<"u",th=typeof window<"u",jp=typeof history<"u",Hp=th&&window.File&&window.FileReader&&window.FileList&&window.Blob,eh=(()=>!!(Tt.Worker&&Tt.Blob&&Tt.Promise&&Tt.OffscreenCanvas&&Tt.OffscreenCanvasRenderingContext2D&&Tt.HTMLCanvasElement&&Tt.HTMLCanvasElement.prototype.transferControlToOffscreen&&Tt.URL&&Tt.URL.createObjectURL))(),Wp=typeof Path2D=="function"&&typeof DOMMatrix=="function",nh=function(){if(!Tt.OffscreenCanvas)return!1;const s=new OffscreenCanvas(1,1),t=s.getContext("2d");t.fillRect(0,0,1,1);const e=s.transferToImageBitmap();try{t.createPattern(e,"no-repeat")}catch{return!1}return!0}(),Jp=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},Zp="webkit moz ms o".split(" ");function Is(s){return typeof s=="function"&&/native code/.test(s.toString())}function Qp(){return"ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0}(function(){if(!window.requestAnimationFrame){let s=K();window.requestAnimationFrame=function(t){const e=K(),n=Math.max(0,16-(e-s)),i=window.setTimeout(function(){t(e+n)},n);return s=e+n,i}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(s){clearTimeout(s)})})();function wr(s){let t=!1;return window.requestAnimationFrame(function e(n){!t&&s(n)&&window.requestAnimationFrame(e)}),()=>{t=!0}}function br(s,t=0){if(t==0)return s(K()),()=>{};{const e=K();return wr(n=>n-e>=t?(s(n),!1):!0)}}function Kp(s,t=0){let e=!1,n=0;const i=K(),r=o=>{if(e)return;n++;const a=o-i-n*t;s(o,n,t<=a),br(r,Math.max(0,t-a))};return br(r,t),()=>{e=!0}}function tg(s,t=20){const e=1e3/t;let n=0,i;return()=>(K()-n>=e&&(n=K(),i=s()),i)}window.requestIdleCallback=window.requestIdleCallback||function(s,t){const e=K();return setTimeout(function(){s({didTimeout:K()-e>50,timeRemaining:()=>Math.max(0,50-(K()-e))})},t?.timeout)},window.cancelIdleCallback=window.cancelIdleCallback||function(s){clearTimeout(s)};function sh(s,t){requestIdleCallback(e=>{e.timeRemaining()>0||t?s():sh(s,t)},{timeout:t})}const xr=new xn;let vr=!1;function _r(s,t,e){s&&t&&xr.set(s,{cb:t,startTime:K(),timeout:e}),!vr&&(vr=!0,ng(n=>{vr=!1;let i=n.timeRemaining();xr.filter((r,o)=>{let a=!1;const c=K();(i>0||o.timeout&&K()-o.startTime>=o.timeout)&&(o.cb(),a=!0);const h=K();return i-=h-c,!a}),xr.length>0&&_r()}))}let Ds=0,Ye=33,Ce=33,Sr;const ih=new MessageChannel,eg=ih.port2;ih.port1.onmessage=s=>{Sr!==null&&Sr({didTimeout:Ds<=K(),timeRemaining:()=>Math.max(0,Ds-K())})};function ng(s){return Sr=s,requestAnimationFrame(t=>{let e=t-Ds+Ce;e<Ce&&Ye<Ce?(e<8&&(e=8),Ce=e<Ye?Ye:e):e>Ce&&Ye>Ce?Ce=e<Ye?Ye:e:Ye=e,Ds=t+Ce,eg.postMessage(null)})}function sg(s){if(typeof setImmediate<"u"&&Is(setImmediate))setImmediate(s);else if(typeof MessageChannel<"u"&&(Is(MessageChannel)||MessageChannel.toString()==="[object MessageChannelConstructor]")){const{port1:t,port2:e}=new MessageChannel;e.onmessage=s,t.postMessage(null)}else typeof Promise<"u"&&Is(Promise)?Promise.resolve().then(s):setTimeout(s,0)}function ig(s){typeof queueMicrotask=="function"?queueMicrotask(s):Promise.resolve().then(s).catch(t=>setTimeout(()=>{throw t}))}class In{static _nextId=0;static nextId(){return In._nextId++}}const O={Linear:{None:function(s){return s}},Ease:{In:function(s){return Math.pow(s,1.7)}},Quadratic:{In:function(s){return s*s},Out:function(s){return s*(2-s)},InOut:function(s){return(s*=2)<1?.5*s*s:-.5*(--s*(s-2)-1)}},Cubic:{In:function(s){return s*s*s},Out:function(s){return--s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s:.5*((s-=2)*s*s+2)}},Quartic:{In:function(s){return s*s*s*s},Out:function(s){return 1- --s*s*s*s},InOut:function(s){return(s*=2)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2)}},Quintic:{In:function(s){return s*s*s*s*s},Out:function(s){return--s*s*s*s*s+1},InOut:function(s){return(s*=2)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2)}},Sinusoidal:{In:function(s){return 1-Math.sin((1-s)*Math.PI/2)},Out:function(s){return Math.sin(s*Math.PI/2)},InOut:function(s){return .5*(1-Math.sin(Math.PI*(.5-s)))}},Exponential:{In:function(s){return s===0?0:Math.pow(1024,s-1)},Out:function(s){return s===1?1:1-Math.pow(2,-10*s)},InOut:function(s){return s===0?0:s===1?1:(s*=2)<1?.5*Math.pow(1024,s-1):.5*(-Math.pow(2,-10*(s-1))+2)}},Circular:{In:function(s){return 1-Math.sqrt(1-s*s)},Out:function(s){return Math.sqrt(1- --s*s)},InOut:function(s){return(s*=2)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1)}},Elastic:{In:function(s){return s===0?0:s===1?1:-Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI)},Out:function(s){return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s-.1)*5*Math.PI)+1},InOut:function(s){return s===0?0:s===1?1:(s*=2,s<1?-.5*Math.pow(2,10*(s-1))*Math.sin((s-1.1)*5*Math.PI):.5*Math.pow(2,-10*(s-1))*Math.sin((s-1.1)*5*Math.PI)+1)}},Back:{In:function(s){return s===1?1:s*s*((1.70158+1)*s-1.70158)},Out:function(s){return s===0?0:--s*s*((1.70158+1)*s+1.70158)+1},InOut:function(s){const t=2.5949095;return(s*=2)<1?.5*(s*s*((t+1)*s-t)):.5*((s-=2)*s*((t+1)*s+t)+2)}},Bounce:{In:function(s){return 1-O.Bounce.Out(1-s)},Out:function(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},InOut:function(s){return s<.5?O.Bounce.In(s*2)*.5:O.Bounce.Out(s*2-1)*.5+.5}},generatePow:function(s=4){return s=s<Number.EPSILON?Number.EPSILON:s,s=s>1e4?1e4:s,{In:function(t){return t**s},Out:function(t){return 1-(1-t)**s},InOut:function(t){return t<.5?(t*2)**s/2:(1-(2-t*2)**s)/2+.5}}},random:function(s){return Math.random()},createStep:function(s){return function(t){return Math.floor(t*s)/s}},createNoisyEasing:function(s,t=.1){const e=1-t;return function(n){return t*Math.random()+e*s(n)}},swing:function(s){return s+Math.sin(s*Math.PI*2)/2},causeSeizures:function(s){return s+.2*Math.random()-.1}};function rh(s){switch(s){case O.Quadratic.In:return O.Quadratic.Out;case O.Quadratic.Out:return O.Quadratic.In;case O.Quadratic.InOut:return O.Quadratic.InOut;case O.Cubic.In:return O.Cubic.Out;case O.Cubic.Out:return O.Cubic.In;case O.Cubic.InOut:return O.Cubic.InOut;case O.Quartic.In:return O.Quartic.Out;case O.Quartic.Out:return O.Quartic.In;case O.Quartic.InOut:return O.Quartic.InOut;case O.Quintic.In:return O.Quintic.Out;case O.Quintic.Out:return O.Quintic.In;case O.Quintic.InOut:return O.Quintic.InOut;case O.Sinusoidal.In:return O.Sinusoidal.Out;case O.Sinusoidal.Out:return O.Sinusoidal.In;case O.Sinusoidal.InOut:return O.Sinusoidal.InOut;case O.Exponential.In:return O.Exponential.Out;case O.Exponential.Out:return O.Exponential.In;case O.Exponential.InOut:return O.Exponential.InOut;case O.Circular.In:return O.Circular.Out;case O.Circular.Out:return O.Circular.In;case O.Circular.InOut:return O.Circular.InOut;case O.Elastic.In:return O.Elastic.Out;case O.Elastic.Out:return O.Elastic.In;case O.Elastic.InOut:return O.Elastic.InOut;case O.Back.In:return O.Back.Out;case O.Back.Out:return O.Back.In;case O.Back.InOut:return O.Back.InOut;case O.Bounce.In:return O.Bounce.Out;case O.Bounce.Out:return O.Bounce.In;case O.Bounce.InOut:return O.Bounce.InOut;default:return s}}const rg=4,og=.001,ag=1e-7,cg=10,Dn=11,Rs=1/(Dn-1),hg=typeof Float32Array=="function";function oh(s,t){return 1-3*t+3*s}function ah(s,t){return 3*t-6*s}function ch(s){return 3*s}function Ls(s,t,e){return((oh(t,e)*s+ah(t,e))*s+ch(t))*s}function hh(s,t,e){return 3*oh(t,e)*s*s+2*ah(t,e)*s+ch(t)}function ug(s,t,e,n,i){let r,o,a=0;do o=t+(e-t)/2,r=Ls(o,n,i)-s,r>0?e=o:t=o;while(Math.abs(r)>ag&&++a<cg);return o}function lg(s,t,e,n){for(let i=0;i<rg;++i){const r=hh(t,e,n);if(r===0)return t;const o=Ls(t,e,n)-s;t-=o/r}return t}function fg(s){return s}function Cr(s,t,e,n){if(!(0<=s&&s<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(s===t&&e===n)return fg;const i=hg?new Float32Array(Dn):new Array(Dn);for(let o=0;o<Dn;++o)i[o]=Ls(o*Rs,s,e);function r(o){let a=0,c=1;const h=Dn-1;for(;c!==h&&i[c]<=o;++c)a+=Rs;--c;const u=(o-i[c])/(i[c+1]-i[c]),l=a+u*Rs,d=hh(l,s,e);return d>=og?lg(o,l,s,e):d===0?l:ug(o,a,a+Rs,s,e)}return o=>o===0||o===1?o:Ls(r(o),t,n)}function Tr(s){switch(s){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}function uh(s){const[t,e,n,i]=Tr(s);return[1-n,1-i,1-t,1-e]}function dg(s){return Cr(...Tr(s))}function mg(s){return Cr(...uh(s))}const ue={Utils:{Linear:function(s,t,e){return(t-s)*e+s},Factorial:function(){const s=[1];return function(t){let e=1;if(s[t])return s[t];for(let n=t;n>1;n--)e*=n;return s[t]=e,e}}(),Bernstein:function(s,t){const e=ue.Utils.Factorial;return e(s)/e(t)/e(s-t)},CatmullRom:function(s,t,e,n,i){const r=(e-s)*.5,o=(n-t)*.5,a=i*i,c=i*a;return(2*t-2*e+r+o)*c+(-3*t+3*e-2*r-o)*a+r*i+t},QuadraticBezier:(s,t,e,n)=>{const i=1-n;return i*i*s+2*i*n*t+n*n*e},CubicBezier:(s,t,e,n,i)=>{const r=1-i;return r*r*r*s+3*r*r*i*t+3*r*i*i*e+i*i*i*n}},Linear:function(s,t){const e=s.length-1,n=e*t,i=Math.floor(n),r=ue.Utils.Linear;return t<0?r(s[0],s[1],n):t>1?r(s[e],s[e-1],e-n):r(s[i],s[i+1>e?e:i+1],n-i)},Bezier:function(s,t){let e=0;const n=s.length-1,i=Math.pow,r=ue.Utils.Bernstein;for(let o=0;o<=n;o++)e+=i(1-t,n-o)*i(t,o)*s[o]*r(n,o);return e},CatmullRom:function(s,t){const e=s.length-1;let n=e*t,i=Math.floor(n);const r=ue.Utils.CatmullRom;return s[0]===s[e]?(t<0&&(i=Math.floor(n=e*(1+t))),r(s[(i-1+e)%e],s[i],s[(i+1)%e],s[(i+2)%e],n-i)):t<0?s[0]-(r(s[0],s[0],s[1],s[1],-n)-s[0]):t>1?s[e]-(r(s[e],s[e],s[e-1],s[e-1],n-e)-s[e]):r(s[i?i-1:0],s[i],s[e<i+1?e:i+1],s[e<i+2?e:i+2],n-i)}};class lh{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=K(),e=!1){const n=Object.keys(this._tweens);for(let i=0;i<n.length;i++){const r=this._tweens[n[i]],o=!e;r&&r.update(t,o)===!1&&!e&&delete this._tweens[n[i]]}return!!Object.keys(this._tweens).length}}const $t=new lh;class Er{constructor(t,e=$t){this._object=t,this._group=e}_id=In.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=O.Linear.None;_interpolationFunction=ue.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=K()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,n,i){for(const r in n){const o=t[r],a=Array.isArray(o),c=a?"array":typeof o,h=!a&&Array.isArray(n[r]);if(!(c==="undefined"||c==="function")){if(h){let u=n[r];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,o)),n[r]=[o].concat(u)}if((c==="object"||a)&&o&&!h){e[r]=a?[]:{};for(const u in o)e[r][u]=o[u];i[r]=a?[]:{},this._setupProperties(o,e[r],n[r],i[r])}else typeof e[r]>"u"&&(e[r]=o),a||(e[r]*=1),h?i[r]=n[r].slice().reverse():i[r]=e[r]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=K()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=K()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=$t){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=O.Linear.None){return this._easingFunction=t,this}interpolation(t=ue.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=K(),e=!0){if(this._isPaused)return!0;let n,i;const r=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(t-this._startTime)/this._durationTime,i=this._durationTime===0||i>1?1:i;const o=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,c=this._chainedTweens.length;a<c;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,n,i){for(const r in n){if(e[r]===void 0)continue;const o=e[r]||0;let a=n[r];const c=Array.isArray(t[r]),h=Array.isArray(a);!c&&h?t[r]=this._interpolationFunction(a,i):typeof a=="object"&&a?this._updateProperties(t[r],o,a,i):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[r]=o+(a-o)*i))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=n,this._valuesEnd[t]=e}}const pg=In.nextId,gg=$t.getAll.bind($t),yg=$t.removeAll.bind($t),wg=$t.add.bind($t),bg=$t.remove.bind($t),xg=$t.update.bind($t),vg={now:K,Sequence:In,Easing:O,Interpolation:ue,Group:lh,Tween:Er,nextId:pg,getAll:gg,removeAll:yg,add:wg,remove:bg,update:xg};class Pr{autoStart;startTime;oldTime;elapsedTime;running;constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=K(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=K();t=e-this.oldTime,this.oldTime=e,this.elapsedTime+=t}return t}}class Rn{tweens=[];frameDuration;onGroupStart;onGroupComplete;constructor(t){this.frameDuration=t?.frameDuration||1e3,this.onGroupStart=t?.onGroupStart,this.onGroupComplete=t?.onGroupComplete}get count(){return this.tweens.length}clear(){this.tweens=[]}sort(t=!1){Pl(this.tweens,(e,n)=>t?e.delay>n.delay:e.delay<=n.delay)}cloneTweens(t=this.tweens){const e=[];return t.forEach(n=>{const i={...n};delete i.tween,i.fromValues={...i.fromValues},i.toValues={...i.toValues},e.push(i)}),e}addTween(t,e,n){const i={fromValues:t,toValues:e,frames:typeof n?.frames=="number"?n.frames:1,delay:typeof n?.delay=="number"?n.delay:this.tweens.length,easeFunction:n?.easeFunction||O.Linear.None,interpolationFunction:n?.interpolationFunction||ue.Linear,repeat:typeof n?.repeat=="number"?n.repeat:0,yoyo:n?.yoyo||!1,onStart:n?.onStart||(()=>{}),onUpdate:n?.onUpdate||(()=>{}),onComplete:n?.onComplete||(()=>{})};return this.tweens.push(i),this}cancelRequestAnimationCycle=()=>{};runTweens(t){this.cancelRequestAnimationCycle();const e=new Pr,n=this.frameDuration;return new Promise(i=>{this.onGroupStart?.(),this.cancelRequestAnimationCycle=wr(r=>{if(!this.isPaused){const a=Math.max(0,r-this.pausedDuration),c=Math.max(0,e.getElapsedTime()-this.pausedDuration);t.filter(h=>h.delay*n<=c).forEach(h=>{h.tween||(h.tween=new Er({...h.fromValues}).to({...h.toValues},h.frames*n).easing(h.easeFunction).interpolation(h.interpolationFunction).repeat(h.repeat).yoyo(h.yoyo).onStart(h.onStart).onUpdate(h.onUpdate).onComplete(h.onComplete),h.tween.start(a)),(h.delay+h.frames*(h.repeat+1))*n>c?h.tween.update(a):(h.tween.isPlaying()&&h.tween.end(),Re(t,h))})}const o=!!t.length;return o||(this.onGroupComplete?.(),i()),o})})}isPaused=!1;pausedClock=new Pr;pausedDuration=0;play(t=this.cloneTweens(this.tweens)){this.isPaused=!1,this.pausedDuration=0,this.runTweens(t)}reverse(){const t=this.cloneTweens(this.tweens);let e=0;t.forEach(n=>{e=Math.max(e,n.delay+n.frames),n.easeFunction=rh(n.easeFunction);const i={...n.toValues};n.toValues={...n.fromValues},n.fromValues={...i}}),t.forEach(n=>{n.delay=e-n.frames}),this.play(t)}pause(){this.pausedClock.start(),this.isPaused=!0}resume(){this.pausedDuration+=this.pausedClock.getElapsedTime(),this.pausedClock.stop(),this.isPaused=!1}}const Os=new xn,fh=(s=!0)=>{Os.filter((t,e)=>(e.alternate&&(Zs(e,e.alternate),s&&Os.set(t,e.alternate),e.alternate=void 0),s))};function Mr(s){let t=Os.get(s);return t||(t=Js(s),Os.set(s,t)),t}function dh(s){const t=Mr(s);return t.alternate||(t.alternate=Js(s)),t.alternate}function _g(s,t,e=!0){t(dh(s)),fh(e)}function Ar(s,t,e=!0){t(dh(s)),_r("FLUSH_DOM_ACTION",()=>fh(e),50)}function J(s){return s*Math.PI/180}function Pt(s){return s*180/Math.PI}function an(s,t,e=0){return Math.sqrt(s*s+t*t+e*e)}function Te(s,t,e,n){return an(e-s,n-t)}function Qt(s,t,e,n){let i=Math.atan2(n-t,e-s);return i<0&&(i+=Math.PI*2),i}function cn(s,t){return{dx:Math.cos(s)*t,dy:Math.sin(s)*t}}function Sg(s,t,e){if(typeof e=="number"){const n=an(s,t,e);return{x:s/=n,y:t/=n,z:e/=n}}else{const n=an(s,t);return{x:s/=n,y:t/=n}}}function Cg(s,t,e,n,i=10){if(Math.abs(e-s)<i&&Math.abs(n-t)<i)return"no";const r=Pt(Qt(s,t,e,n));return r>=-135&&r<=-45?"up":r>45&&r<135?"down":r>=135&&r<=180||r>=-180&&r<-135?"left":"right"}const mh=Tg("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Tg(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function Mt(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function zs(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function Eg(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function Pg(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const Ln={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};let Fs=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",Mt("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}},kr=class{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}},ph=class ea{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Ln);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=Ln[i].canvas}}__getStyleState(){const t={},e=Object.keys(Ln);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Ln);for(let r=0;r<i.length;r++){const o=Ln[i[r]],a=this[i[r]];if(o.apply){if(a instanceof kr){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Fs)e.setAttribute(o.apply,Mt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,Mt("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(i[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(mh);for(let r=0,o=i.length;r<o;r++){const a=i[r],c=mh[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Mt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Mt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Mt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(Mt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Mt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Mt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(Mt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(Mt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([n-t,i-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(l/2),p=t+f*d[0],w=e+f*d[1],x=[-c[1],c[0]],b=[h[1],-h[0]],g=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},v=g(x),_=g(b);this.lineTo(p+x[0]*r,w+x[1]*r),this.arc(p,w,r,v,_)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:zs(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new Fs(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:zs(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Fs(a,this)}__parseFont(){const e=/^\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[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":Eg(this.textAlign),"dominant-baseline":Pg(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),c=e+n*Math.sin(r),h=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(Mt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=zs(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Mt("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,c=0,h,u,l,d,f,p,w,x;if(t.length===3)n=t[1],i=t[2],h=e.width,u=e.height,r=h,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const b=this.__closestGroupOrSvg();this.__currentElement;const g="translate("+n+", "+i+")";if(e instanceof ea){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)x=d.childNodes[0].getAttribute("id"),this.__ids[x]=x,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const v=f.getAttribute("transform");let _;v?_=v+" "+g:_=g,f.setAttribute("transform",_),b.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(w=this.__document.createElement("canvas"),w.width=r,w.height=o,w.getContext("2d")?.drawImage(e,a,c,h,u,0,0,r,o),e=w),p.setAttribute("transform",g),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),b.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=zs(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof ea&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new kr(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}},Ir=class{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new ph({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,c){return this.context.ellipse(t,e,n,i,r,o,a,c),this.currentPath2D.ellipse(t,e,n,i,r,o,a,c),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,n,i,r,o,a){const c=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}},Dr=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Qt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const c=(this.toY-n)/o,h=(t.y-r)/a;if(o){if(!a)return{x:i,y:c*(i-e)+n}}else return{x:e,y:h*(e-i)+r};const u=(-h*i+r+c*e-n)/(c-h),l=c*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};const Mg=class extends Dr{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,c,!this.sweepFlag)}convert(t,e,n,i,r,o,a,c,h){const u=a/180*Math.PI,l=(t-n)/2,d=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,w=f*f/(r*r)+p*p/(o*o);if(w>1){const V=Math.sqrt(w);throw r=V*r,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const x=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),b=c!=h?1:-1,g=b*x*r*p/o,v=b*x*-o*f/r,_=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*g-Math.sin(u)*v+_,I=Math.sin(u)*g+Math.cos(u)*v+E,F=(V,W,et,Z)=>(V*Z>=W*et?1:-1)*Math.acos((V*et+W*Z)/(Math.sqrt(V*V+W*W)*Math.sqrt(et*et+Z*Z))),B=F(1,0,t-C,e-I)-u,$=F(t-C,e-I,n-C,i-I);return[C,I,r,o,u,B,B+$]}},Ag=class extends Dr{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let h=0;h<2;++h)n=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=h==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][h].push(n*o*o+i*o+r));const a={x:Math.min.apply(0,t),y:Math.min.apply(0,e)},c={x:Math.max.apply(0,t),y:Math.max.apply(0,e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}},Ee=class es extends Dr{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const u=[],l=h.length;for(let p=0;p<l;p++){for(let w=p+1;w<l;w++)h[p].X===h[w].X&&h[p].Y===h[w].Y&&(w=++p);u.push({X:h[p].X,Y:h[p].Y})}const d={x:Math.min.apply(Math,a),y:Math.min.apply(Math,o)},f={x:Math.max.apply(Math,a),y:Math.max.apply(Math,o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const w=u*l[p]+u,x=this.base3(w,t,n,r,a),b=this.base3(w,e,i,o,c);f+=d[p]*Math.sqrt(x*x+b*b)}return u*f}length(t=1){return es.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||es.bezlen(e,n,i,r,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=es.bezlen(e,n,i,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=es.bezlen(e,n,i,r,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,c=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,h=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,w=n*this.y+e*this.c1y,x=n*this.c2x+e*this.toX,b=n*this.c2y+e*this.toY,g=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:w},end:{x,y:b},alpha:g}}},On=Math.PI*2;function gh(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function kg(s,t,e,n,i,r,o,a,c,h){const u=h*(s-e)/2+c*(t-n)/2,l=-c*(s-e)/2+h*(t-n)/2,d=o*o,f=a*a,p=u*u,w=l*l;let x=d*f-d*w-f*p;x<0&&(x=0),x/=d*w+f*p,x=Math.sqrt(x)*(i===r?-1:1);const b=x*o/a*l,g=x*-a/o*u,v=h*b-c*g+(s+e)/2,_=c*b+h*g+(t+n)/2,E=(u-b)/o,C=(l-g)/a,I=(-u-b)/o,F=(-l-g)/a,B=gh(1,0,E,C);let $=gh(E,C,I,F);return r===0&&$>0&&($-=On),r===1&&$<0&&($+=On),[v,_,B,$]}function Ig(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function yh(s,t,e,n,i,r,o,a,c){const h=Math.sin(c*On/360),u=Math.cos(c*On/360),l=u*(s-e)/2+h*(t-n)/2,d=-h*(s-e)/2+u*(t-n)/2;if(l===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=kg(s,t,e,n,i,r,o,a,h,u),w=[];let x=p[2],b=p[3];const g=Math.max(Math.ceil(Math.abs(b)/(On/4)),1);b/=g;for(let v=0;v<g;v++)w.push(Ig(x,b)),x+=b;return w.map(v=>{for(let _=0;_<v.length;_+=2){let E=v[_+0],C=v[_+1];E*=o,C*=a;const I=u*E-h*C,F=h*E+u*C;v[_+0]=I+p[0],v[_+1]=F+p[1]}return v})}function Rr(s,t,e,n,i,r){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,i/3+.6666666666666666*e,r/3+.6666666666666666*n,i,r]}function zn(s,t,e,n){return[s,t,e,n,e,n]}const Fn={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};class Ue{static createSVGElement(t="path",e){const n=document.createElementNS.call(document,"http://www.w3.org/2000/svg",t);return e&&$e(n,e),n}static createSvgPath(t,e){return this.createSVGElement("path",{d:t,id:e||rs()})}static downloadFromSVGElement(t,e="shape"){return Xs(Qi(t),`${e}.svg`)}static downloadFromSVGString(t,e="shape"){return Xs(bi(t),`${e}.svg`)}static getSVGRawStringFromElement(t){return Zi(t)}static isSVGPath(t){return typeof t!="string"?!1:(t=t.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(t)&&/[\dz]$/i.test(t))}static SVGPathDataToD(t){return t.map(e=>{if(!e[0])return"";switch(e[0].toLowerCase()){case"a":return`${e[0]} ${e[1]},${e[2]} ${e[3]} ${e[4]},${e[5]} ${e[6]},${e[7]}`;case"c":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]} ${e[5]},${e[6]}`;case"s":case"q":return`${e[0]} ${e[1]},${e[2]} ${e[3]},${e[4]}`;default:return e[0]+" "+e.slice(1).join(",")}}).join(" ")}static parseSVGPath(t){const e=[];return Ue.isSVGPath(t)&&t.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(n,i,r)=>{let o=i.toLowerCase();const a=wi(r);for(o=="m"&&a.length>Fn[o]&&(e.push([i,...a.splice(0,Fn[o])]),o="l",i=i=="m"?"l":"L");a.length;){if(a.length<Fn[o])throw new Error(`parseSVGPath substring:{ ${n} } command:{ ${i} } args:{ ${a} }`);e.push([i,...a.splice(0,Fn[o])])}return o=="z"&&e.push([i]),""}),e}static absolutizeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],c=a.toUpperCase();if(a!=c)switch(o[0]=c,a){case"a":o[6]+=i,o[7]+=r;break;case"v":o[1]+=r;break;case"h":o[1]+=i;break;default:for(let h=1;h<o.length;)o[h++]+=i,o[h++]+=r}switch(c){case"Z":i=e,r=n;break;case"H":i=o[1];break;case"V":r=o[1];break;case"M":i=e=o[1],r=n=o[2];break;default:i=o[o.length-2],r=o[o.length-1]}return o})}static relativeSVGPath(t){let e=0,n=0,i=0,r=0;return t.map(function(o){const a=o[0],c=a.toLowerCase();if(a!=c)switch(o[0]=c,a){case"A":o[6]-=i,o[7]-=r;break;case"V":o[1]-=r;break;case"H":o[1]-=i;break;default:for(let h=1;h<o.length;)o[h++]-=i,o[h++]-=r}switch(c){case"z":i=e,r=n;break;case"h":i+=o[1];break;case"v":r+=o[1];break;case"m":i+=o[1],r+=o[2],e+=o[1],n+=o[2];break;default:i+=o[o.length-2],r+=o[o.length-1]}return o})}static normalizeSVGPath(t){const e=[];let n=0,i=0,r=0,o=0,a=0,c=0,h=0,u=0,l;for(let d=0,f=t.length;d<f;d++){let p=t[d];const w=p[0];switch(w){case"M":n=p[1],i=p[2];break;case"A":const x=yh(r,o,p[6],p[7],p[4],p[5],p[1],p[2],p[3]);if(!x.length)continue;x.forEach((v,_)=>{const[E,C,I,F,B,$,V,W]=v;p=["C",I,F,B,$,V,W],_<x.length-1&&e.push(p)});break;case"S":let b=r,g=o;(l=="C"||l=="S")&&(b+=b-h,g+=g-u),p=["C",b,g,p[1],p[2],p[3],p[4]];break;case"T":l=="Q"||l=="T"?(a=r*2-a,c=o*2-c):(a=r,c=o),p=["C",...Rr(r,o,a,c,p[1],p[2])];break;case"Q":a=p[1],c=p[2],p=["C",...Rr(r,o,p[1],p[2],p[3],p[4])];break;case"L":p=["C",...zn(r,o,p[1],p[2])];break;case"H":p=["C",...zn(r,o,p[1],o)];break;case"V":p=["C",...zn(r,o,r,p[1])];break;case"Z":p=["C",...zn(r,o,n,i)];break}l=w,r=p[p.length-2],o=p[p.length-1],p.length>4?(h=p[p.length-4],u=p[p.length-3]):(h=r,u=o),e.push(p)}return e}static catmullRom2bezier(t){const e=[];for(let n=0,i=t.length;i-2>n;n+=2){let r;n==0?r=[{x:t[n],y:t[n+1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}]:i-4==n?r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+2],y:t[n+3]}]:r=[{x:t[n-2],y:t[n-1]},{x:t[n],y:t[n+1]},{x:t[n+2],y:t[n+3]},{x:t[n+4],y:t[n+5]}];const o=[{x:r[1].x,y:r[1].y},{x:(-r[0].x+6*r[1].x+r[2].x)/6,y:(-r[0].y+6*r[1].y+r[2].y)/6},{x:(r[1].x+6*r[2].x-r[3].x)/6,y:(r[1].y+6*r[2].y-r[3].y)/6},{x:r[2].x,y:r[2].y}];e.push(["C",o[1].x,o[1].y,o[2].x,o[2].y,o[3].x,o[3].y])}return e}static zvhToLSVGPath(t){const e=[];let n=["L",0,0],i;for(let r=0,o=t.length;r<o;r++){const a=t[r];switch(a[0]){case"M":n=["L",a[1],a[2]],e.push(a);break;case"Z":e.push(n);break;case"H":i=e[e.length-1]||["L",0,0],e.push(["L",a[1],i[i.length-1]]);break;case"V":i=e[e.length-1]||["L",0,0],e.push(["L",i[i.length-2],a[1]]);break;default:e.push(a)}}return e}static longhandSVGPath(t){const e={S:{to:"C",x:3},T:{to:"Q",x:1}};let n,i=0,r=0;for(let o=0,a=t.length;o<a;o++){const c=t[o],h=e[c[0]];h&&(c[0]=h.to,n&&(n[0]===h.to?(i=2*Number(n[h.x+2])-Number(n[h.x]),r=2*Number(n[h.x+3])-Number(n[h.x+1])):(i=Number(n[n.length-2]),r=Number(n[n.length-1]))),c.splice(1,0,i,r)),n=c}return t}}let Dg=class we{cX;cY;x;y;degree;scalarX;scalarY;startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){this.cX=0,this.cY=0,this.x=t?.x||0,this.y=t?.y||0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&(this.cX=t.centerX-this.x,this.cY=t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.reset(t?.d,t?.originMatrix)}reset(t,e){typeof t=="string"?this.resetFromSVGPathData(Ue.parseSVGPath(t),e):t instanceof we?this.resetFromSVGPathData(t.toSVGPathData(),e):this.resetFromSVGPathData(t||[],e)}resetFromSVGPathData(t,e){this.normalizedLines=[];const n=Ue.normalizeSVGPath(Ue.absolutizeSVGPath(t));this.prevPathX=this.startPathX=0,this.prevPathY=this.startPathY=0;let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];if(a[0]=="M"){i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2];continue}this.appendLine(new Ee({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}e&&({x:this.startPathX,y:this.startPathY}=e.transformPoint({x:this.startPathX,y:this.startPathY}),{x:this.prevPathX,y:this.prevPathY}=e.transformPoint({x:this.prevPathX,y:this.prevPathY}),this.normalizedLines.forEach(r=>{({x:r.x,y:r.y}=e.transformPoint({x:r.x,y:r.y})),{x:r.c1x,y:r.c1y}=e.transformPoint({x:r.c1x,y:r.c1y}),{x:r.c2x,y:r.c2y}=e.transformPoint({x:r.c2x,y:r.c2y}),{x:r.toX,y:r.toY}=e.transformPoint({x:r.toX,y:r.toY})}))}static fromPolymorphPoints(t){const e=new we;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e.appendLine(new Ee({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new we;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e.appendLine(t[n]);return e}appendLine(t){if(t instanceof Mg){yh(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,w,x,b]=h;this.normalizedLines.push(new Ee({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:w,toX:x,toY:b})),this.prevPathX=x,this.prevPathY=b});return}let e,n,i,r,o,a;t instanceof Ee?(e=t.c1x,n=t.c1y,i=t.c2x,r=t.c2y,o=t.toX,a=t.toY):t instanceof Ag?[e,n,i,r,o,a]=Rr(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=zn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new Ee({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}toSVGPathData(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform(),i=[];i.push(["M",t,e]);for(let r=0,o=n.length;r<o;r++)i.push(...n[r].toSVGPathData());return i}toSVGPathD(){return Ue.SVGPathDataToD(this.toSVGPathData())}toCanvasContext(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform();t.beginPath(),t.moveTo(e,n),i.forEach(r=>{r.toCanvasContext(t)})}getBoundingClientRect(){const{normalizedLines:t}=this.updateTransform(),e=[],n=[];if(t.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0};const i=Math.min.apply(0,e),r=Math.min.apply(0,n),o=Math.max.apply(0,e),a=Math.max.apply(0,n);return{x:i,y:r,width:o-i,height:a-r}}update(t){this.cX=typeof t.cX=="number"?t.cX:this.cX,this.cY=typeof t.cY=="number"?t.cY:this.cY,this.x=t.x,this.y=t.y,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY}updateTransform(){const t=new _t;if(t.translate(this.x+this.cX,this.y+this.cY),t.rotate(this.degree),t.scale(this.scalarX,this.scalarY),t.translate(-this.cX,-this.cY),t.isIdentity)return{startPathX:this.startPathX,startPathY:this.startPathY,normalizedLines:this.normalizedLines};{let e=this.startPathX,n=this.startPathY;({x:e,y:n}=t.transformPoint({x:e,y:n}));const i=[];return this.normalizedLines.forEach(r=>{let o=r.x,a=r.y,c=r.c1x,h=r.c1y,u=r.c2x,l=r.c2y,d=r.toX,f=r.toY;({x:o,y:a}=t.transformPoint({x:o,y:a})),{x:c,y:h}=t.transformPoint({x:c,y:h}),{x:u,y:l}=t.transformPoint({x:u,y:l}),{x:d,y:f}=t.transformPoint({x:d,y:f}),i.push(new Ee({x:o,y:a,c1x:c,c1y:h,c2x:u,c2y:l,toX:d,toY:f}))}),{startPathX:e,startPathY:n,normalizedLines:i}}}getTotalLength(){const{normalizedLines:t}=this.updateTransform();return t.reduce((e,n)=>e+=n.length(),0)}getPointAtLength(t){const{normalizedLines:e}=this.updateTransform();let n=0;const i=e.length;for(let r=0;r<i;r++){const o=e[r],a=o.length();if(n+a>=t)return o.getPointAtSegmentLength(t-n);n+=a}return e[i-1].getPointAtSegmentLength(1)}interpolate(t){const{startPathX:e,startPathY:n,normalizedLines:i}=this.updateTransform(),r=i.length;if(r===0)return{x:e,y:n};if(r===1)return i[0].interpolate(t);{let o=t*r,a=i[0];if(o--,o>1)for(let c=1;c<r&&(a=i[c],o>1);c++)o-=1;return a.interpolate(o)}}getSubpath(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubpathsAtLength(this,t);{const n=this.getSubpathsAtLength(this,e,1);return t?this.getSubpathsAtLength(n,t):n}}getSubpathsAtLength(t,e,n){const{startPathX:i,startPathY:r,normalizedLines:o}=t.updateTransform();let a=null,c=0;const h=new we;h.prevPathX=h.startPathX=i,h.prevPathY=h.startPathY=r;for(let u=0,l=o.length;u<l;u++){const d=o[u],f=d.length();if(c+f>e&&!a){const p=d.getPointAtSegmentLength(e-c);if(h.appendLine(new Ee({c1x:p.start.x,c1y:p.start.y,c2x:p.m.x,c2y:p.m.y,toX:p.x,toY:p.y})),n)return h;a=h,h.appendLine(new Ee({c1x:p.n.x,c1y:p.n.y,c2x:p.end.x,c2y:p.end.y,toX:d.x,toY:d.y})),c+=f;continue}c+=f,h.appendLine(d)}return h}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=n;h+=a){const u=this.getPointAtLength(h),l=Math.pow(Te(u.x,u.y,t,e),2);l<o&&(i=u,r=h,o=l)}for(a/=2;a>.5;){const h=r-a,u=this.getPointAtLength(h),l=Math.pow(Te(u.x,u.y,t,e),2),d=r+a,f=this.getPointAtLength(d),p=Math.pow(Te(f.x,f.y,t,e),2);h>=0&&l<o?(i=u,r=h,o=l):d<=n&&p<o?(i=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Qt(c.x,c.y,i.x,i.y):Qt(i.x,i.y,c.x,c.y),distance:Math.sqrt(o)}}get polymorphPoints(){const{startPathX:t,startPathY:e,normalizedLines:n}=this.updateTransform();return[t,e].concat(n.reduce((i,r)=>i.concat([r.c1x,r.c1y,r.c2x,r.c2y,r.toX,r.toY]),[]))}perimeterPoints(){const t=this.polymorphPoints,e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Te(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}expendFill(t){const e=this.polymorphPoints,n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,u,l,d,f]);let p=0;for(;p<r&&i>0;)o.push(["C",d,f,d,f,d,f]),i-=6,p++}return o}static mixPoints(t,e,n){const i=t.length,r=new Array(i);for(let o=0;o<i;o++)r[o]=Q(t[o]+(e[o]-t[o])*n,6);return r}static getPathInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?t:Math.abs(n-1)<Number.EPSILON?e:we.fromPolymorphPoints(we.mixPoints(new we({d:t}).polymorphPoints,new we({d:e}).polymorphPoints,n)).toSVGPathData()}},Rg=class extends Li{id;originD;originMatrix;independentTransformInGroup;forceCXY=!1;cX;cY;x;y;degree;scalarX;scalarY;diffXInGroup;diffYInGroup;diffDegreeInGroup;diffScalarXInGroup;diffScalarYInGroup;vx;vy;ax;ay;mass;attrs;enableDrag;alongPath;isDragging=!1;isMouseIn=!1;targetToAfterDragFree;followMouse;strokeArmyAnts;strokeArmyAntsOffset=0;strokeDashTotalLength=0;isShow=!0;el;pathd;usePathDtoCanvasContext=!1;parent;shapes=[];constructor(t){if(super(),this.id=rs(),t?.d&&(this.originD=t?.d),t?.originMatrix&&(this.originMatrix=t.originMatrix),this.independentTransformInGroup=typeof t?.independentTransformInGroup=="boolean"?t.independentTransformInGroup:!1,this.x=t?.x||0,this.y=t?.y||0,this.cX=0,this.cY=0,typeof t?.centerX=="number"&&typeof t?.centerY=="number"&&this.forceSetCXY(t.centerX-this.x,t.centerY-this.y),this.degree=t?.degree||0,this.scalarX=1,this.scalarY=1,t?.scalar!==void 0&&(this.scalarX=t.scalar,this.scalarY=t.scalar),t?.scalarX!==void 0&&(this.scalarX=t.scalarX),t?.scalarY!==void 0&&(this.scalarY=t.scalarY),this.diffXInGroup=t?.diffXInGroup||0,this.diffYInGroup=t?.diffYInGroup||0,this.diffDegreeInGroup=t?.diffDegreeInGroup||0,this.diffScalarXInGroup=t?.diffScalarXInGroup||1,this.diffScalarYInGroup=t?.diffScalarYInGroup||1,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this.enableDrag=t?.enableDrag||!1,this.alongPath=t?.alongPath,this.targetToAfterDragFree=t?.targetToAfterDragFree,this.followMouse=t?.followMouse||!1,this.isShow=typeof t?.isShow=="boolean"?t?.isShow:!0,this.strokeArmyAnts=t?.strokeArmyAnts||!1,this.strokeArmyAnts){const n=this.getAttr("stroke-dasharray","4 4");this.setAttr("stroke-dasharray",n),this.strokeDashTotalLength=wi(n).reduce((i,r)=>i+r,0)}return ka(this)}forceSetCXY(t,e){this.cX=t,this.cY=e,this.forceCXY=!0}shapeInit(){}initPathD(){if(!this.pathd){if(this.pathd=new Dg,Wt(()=>{this.pathd?.reset(this.originD||this.toSVGPathData(),this.originMatrix)}),this.pathd&&!this.forceCXY){const t=this.shapes.length==0?this.pathd.getBoundingClientRect():this.getBoundingClientRect();t&&(this.pathd.cX=this.cX=t.x+t.width/2-this.pathd.x,this.pathd.cY=this.cY=t.y+t.height/2-this.pathd.y)}this.shapeInit()}return this.pathd}frameStart(t){}frameUpdate(t,e){this.pathd=this.initPathD(),this.pathd.update(this),this.strokeArmyAnts&&(this.isMouseIn||(this.setAttr("stroke-dashoffset",String(this.strokeArmyAntsOffset++)),this.strokeArmyAntsOffset>this.strokeDashTotalLength&&(this.strokeArmyAntsOffset=0)))}frameEnd(t){}toSVGPathData(){return[]}toSVGPathD(){return this.pathd?.toSVGPathD()||""}toCanvasContext(t){this.usePathDtoCanvasContext=!0,this.pathd?.toCanvasContext(t)}getBoundingClientRect(){return this.pathd?.getBoundingClientRect()||null}get center(){const t=this.getBoundingClientRect(),e={x:this.x,y:this.y};return t&&(e.x=t.x+t.width/2,e.y=t.y+t.height/2),e}trim(){if(this.parent)return;const t=this.getBoundingClientRect();if(!t)return;this.shapes.forEach(n=>{const i=n.originMatrix?n.originMatrix.clone():new _t;i.translate(-t.x+n.x,-t.y+n.y),n.originMatrix=i});const e=this.originMatrix?this.originMatrix.clone():new _t;e.translate(-t.x+this.x,-t.y+this.y),this.originMatrix=e}isPointInPath(t,e,n){if(n instanceof Ir)return n.isPointInPath(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}if(this.el instanceof SVGGeometryElement)return this.el.isPointInFill(i);{const r=this.getBoundingClientRect();if(r)return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height}return!1}isPointInStroke(t,e,n){if(n instanceof Ir)return n.isPointInStroke(new Path2D(this.toSVGPathD()),t,e);let i;try{i=new SVGPoint(t,e)}catch{i=n.createSVGPoint(),i.x=t,i.y=e}return this.el instanceof SVGGeometryElement?this.el.isPointInStroke(i):!1}clone(){return fa(this).copy(this)}copy(t){return this.id=t.id,this.originD=t.originD,this.originMatrix=t.originMatrix,this.independentTransformInGroup=t.independentTransformInGroup,this.x=t.x,this.y=t.y,this.cX=t.cX,this.cY=t.cY,this.degree=t.degree,this.scalarX=t.scalarX,this.scalarY=t.scalarY,this.diffXInGroup=t.diffXInGroup,this.diffYInGroup=t.diffYInGroup,this.diffDegreeInGroup=t.diffDegreeInGroup,this.diffScalarXInGroup=t.diffScalarXInGroup,this.diffScalarYInGroup=t.diffScalarYInGroup,this.vx=t.vx,this.vy=t.vy,this.ax=t.ax,this.ay=t.ay,this.mass=t.mass,this.attrs={...t.attrs},this.enableDrag=t.enableDrag,this.alongPath=t.alongPath,this.targetToAfterDragFree=t.targetToAfterDragFree,this.followMouse=t.followMouse,this.isShow=t.isShow,this.strokeArmyAnts=t.strokeArmyAnts,this.strokeDashTotalLength=t.strokeDashTotalLength,this}save(){}restore(){}setAttr(t,e){typeof t!="string"?Object.assign(this.attrs,Object.fromEntries(Object.entries(t).map(([n,i])=>[bt(n),i]))):e&&(this.attrs[bt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[bt(t)]||e}getAttrs(){return this.attrs}hasAttr(t){return!!this.attrs[t]||!!this.attrs[bt(t)]}distance(t){return Te(this.x,this.y,t.x,t.y)}rotateTo(t){this.degree=Pt(Qt(this.x,this.y,t.x,t.y))}followTo(t,e=3){this.rotateTo(t);const{dx:n,dy:i}=cn(J(this.degree),e);this.vx=n,this.vy=i,this.run()}followAccelerationTo(t,e=.05){this.rotateTo(t);const{dx:n,dy:i}=cn(J(this.degree),e);this.ax=n,this.ay=i,this.run()}checkCollision(t){}checkWall(t){}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,c=o*n/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}run(t){this.vx+=this.ax,this.vy+=this.ay;const e=Ht(t?.gravity,0);this.vy+=e;const n=Ht(t?.friction,1);this.vx*=n,this.vy*=n,this.x+=this.vx,this.y+=this.vy}runEaseTo(t,e){const n=Ht(e?.easing,.05),i=t.x-this.cX-this.x,r=t.y-this.cY-this.y;this.vx=i*n,this.vy=r*n,this.run(e)}runSpringTo(t,e){const n=Ht(e?.spring,.03);(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.cX-this.x,o=i.y-this.cY-this.y,a=r*n,c=o*n;this.vx+=a,this.vy+=c}),this.run({friction:.9,...e})}springMassTo(t,e){const n=Ht(e?.springLength,100),i=Ht(e?.spring,1e-4),r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const c=r*i,h=o*i;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/n}return 0}getTotalLength(){return this.initPathD().getTotalLength()}interpolate(t){return this.initPathD().interpolate(t)}getPointAtLength(t){return this.initPathD().getPointAtLength(t)}trailPath(t,e=0){const n=this.getTotalLength();return t.originD=this.initPathD().getSubpath(0,e*n),this.getPointAtLength(e*n)}strokeDashTween(t=1e3,e){const n=this.initPathD(),i=Q(n.getTotalLength(),0);this.setAttr({strokeDasharray:`${i} ${i}`,strokeDashoffset:`${i}`});const r=e?.onUpdate,o=new Rn({frameDuration:t});o.addTween({offset:i},{offset:0},Object.assign(e||{},{onUpdate:(a,c)=>{this.setAttr("strokeDashoffset",""+Q(a.offset,2)),r?.(a,c)}})),o.play()}};class Lg extends Rg{x;y;z;fl;vpX;vpY;cX;cY;cZ;radius;constructor(t){super(t),this.x=t?.x||0,this.y=t?.y||0,this.z=t?.z||0,this.fl=t?.fl||250,this.vpX=t?.vpX||0,this.vpY=t?.vpY||0,this.cX=t?.cX||0,this.cY=t?.cY||0,this.cZ=t?.cZ||0,this.radius=t?.radius||0}toSVGPathData(){return this.radius?[["M",this.getScreenX(),this.getScreenY()-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["M",this.getScreenX(),this.getScreenY()]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,n){this.cX=t,this.cY=e,this.cZ=n}rotateX(t){({x:this.y,y:this.z}=te(J(t),this.y,this.z))}rotateY(t){({x:this.x,y:this.z}=te(J(t),this.x,this.z))}rotateZ(t){({x:this.x,y:this.y}=te(J(t),this.x,this.y))}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}eq(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.radius===t.radius&&this.mass===t.mass}length(){return an(this.x,this.y,this.z)}distance(t){const e=t.x-this.x,n=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+n*n+i*i)}scalar(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y,i=this.z;return{x:n*t.z-i*t.y,y:i*t.x-e*t.z,z:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y,z:this.z*t.z}}div(t){return{x:this.x/t.x,y:this.y/t.y,z:this.z/t.z}}add(t){return{x:this.x+t.x,y:this.y+t.y,z:this.z+t.z}}sub(t){return{x:this.x-t.x,y:this.y-t.y,z:this.z-t.z}}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y,z:this.z-2*e*t.z}}}const Ns=Lg;class Lr{_x;_y;_z;_w;constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,o,a){let c=n[i+0],h=n[i+1],u=n[i+2],l=n[i+3];const d=r[o+0],f=r[o+1],p=r[o+2],w=r[o+3];if(a===0){t[e+0]=c,t[e+1]=h,t[e+2]=u,t[e+3]=l;return}if(a===1){t[e+0]=d,t[e+1]=f,t[e+2]=p,t[e+3]=w;return}if(l!==w||c!==d||h!==f||u!==p){let x=1-a;const b=c*d+h*f+u*p+l*w,g=b>=0?1:-1,v=1-b*b;if(v>Number.EPSILON){const E=Math.sqrt(v),C=Math.atan2(E,b*g);x=Math.sin(x*C)/E,a=Math.sin(a*C)/E}const _=a*g;if(c=c*x+d*_,h=h*x+f*_,u=u*x+p*_,l=l*x+w*_,x===1-a){const E=1/Math.sqrt(c*c+h*h+u*u+l*l);c*=E,h*=E,u*=E,l*=E}}t[e]=c,t[e+1]=h,t[e+2]=u,t[e+3]=l}static multiplyQuaternionsFlat(t,e,n,i,r,o){const a=n[i],c=n[i+1],h=n[i+2],u=n[i+3],l=r[o],d=r[o+1],f=r[o+2],p=r[o+3];return t[e]=a*p+u*l+c*f-h*d,t[e+1]=c*p+u*d+h*l-a*f,t[e+2]=h*p+u*f+a*d-c*l,t[e+3]=u*p-a*l-c*d-h*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t=this._x,e=this._y,n=this._z,i=this._w){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new Lr(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t.x,i=t.y,r=t.z,o=t.order,a=Math.cos,c=Math.sin,h=a(n/2),u=a(i/2),l=a(r/2),d=c(n/2),f=c(i/2),p=c(r/2);switch(o){case"XYZ":this._x=d*u*l+h*f*p,this._y=h*f*l-d*u*p,this._z=h*u*p+d*f*l,this._w=h*u*l-d*f*p;break;case"YXZ":this._x=d*u*l+h*f*p,this._y=h*f*l-d*u*p,this._z=h*u*p-d*f*l,this._w=h*u*l+d*f*p;break;case"ZXY":this._x=d*u*l-h*f*p,this._y=h*f*l+d*u*p,this._z=h*u*p+d*f*l,this._w=h*u*l-d*f*p;break;case"ZYX":this._x=d*u*l-h*f*p,this._y=h*f*l+d*u*p,this._z=h*u*p-d*f*l,this._w=h*u*l+d*f*p;break;case"YZX":this._x=d*u*l+h*f*p,this._y=h*f*l+d*u*p,this._z=h*u*p-d*f*l,this._w=h*u*l-d*f*p;break;case"XZY":this._x=d*u*l-h*f*p,this._y=h*f*l-d*u*p,this._z=h*u*p+d*f*l,this._w=h*u*l+d*f*p;break;default:console.warn("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix4(t){const e=t.value,n=e[0],i=e[4],r=e[8],o=e[1],a=e[5],c=e[9],h=e[2],u=e[6],l=e[10],d=n+a+l;if(d>0){const f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(u-c)*f,this._y=(r-h)*f,this._z=(o-i)*f}else if(n>a&&n>l){const f=2*Math.sqrt(1+n-a-l);this._w=(u-c)/f,this._x=.25*f,this._y=(i+o)/f,this._z=(r+h)/f}else if(a>l){const f=2*Math.sqrt(1+a-n-l);this._w=(r-h)/f,this._x=(i+o)/f,this._y=.25*f,this._z=(c+u)/f}else{const f=2*Math.sqrt(1+l-n-a);this._w=(o-i)/f,this._x=(r+h)/f,this._y=(c+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(N(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(n===0)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,o=t._w,a=e._x,c=e._y,h=e._z,u=e._w;return this._x=n*u+o*a+i*h-r*c,this._y=i*u+o*c+r*a-n*h,this._z=r*u+o*h+n*c-i*a,this._w=o*u-n*a-i*c-r*h,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const c=1-a*a;if(c<=Number.EPSILON){const f=1-e;return this._w=f*o+e*this._w,this._x=f*n+e*this._x,this._y=f*i+e*this._y,this._z=f*r+e*this._z,this.normalize(),this}const h=Math.sqrt(c),u=Math.atan2(h,a),l=Math.sin((1-e)*u)/h,d=Math.sin(e*u)/h;return this._w=o*l+this._w*d,this._x=n*l+this._x*d,this._y=i*l+this._y*d,this._z=r*l+this._z*d,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Nn{x=0;y=0;constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t=0,e=0){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}copy(t){return this.x=t.x,this.y=t.y,this}clone(){return new Nn(this.x,this.y)}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y;return this.x=t.m11*e+t.m21*n+t.m31,this.y=t.m12*e+t.m22*n+t.m32,this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return wh.copy(this).projectOnVector(t),this.sub(wh)}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(N(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Nt{x=0;y=0;z=0;constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t=0,e=0,n=0){return this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new Nt(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(bh.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(bh.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.value,o=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,o=t.y,a=t.z,c=t.w,h=2*(o*i-a*n),u=2*(a*e-r*i),l=2*(r*n-o*e);return this.x=e+c*h+o*l-a*u,this.y=n+c*u+a*h-r*l,this.z=i+c*l+r*u-o*h,this}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.value;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this.z=N(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this.z=N(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,o=e.x,a=e.y,c=e.z;return this.x=i*c-r*a,this.y=r*o-n*c,this.z=n*a-i*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}perpendOnVector(t){return zr.copy(this).projectOnVector(t),this.sub(zr)}projectOnPlane(t){return this.perpendOnVector(t)}reflect(t){return this.sub(zr.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(N(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrix4Scale(t){const e=this.setFromMatrix4Column(t,0).length(),n=this.setFromMatrix4Column(t,1).length(),i=this.setFromMatrix4Column(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrix4Column(t,e){return this.fromArray(t.value,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.value,e*3)}setFromEuler(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}class Or{x=0;y=0;z=0;w=1;constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t=0,e=0,n=0,i=1){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new Or(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,o=t.value;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix4(t){let e,n,i,r;const c=t.value,h=c[0],u=c[4],l=c[8],d=c[1],f=c[5],p=c[9],w=c[2],x=c[6],b=c[10];if(Math.abs(u-d)<.01&&Math.abs(l-w)<.01&&Math.abs(p-x)<.01){if(Math.abs(u+d)<.1&&Math.abs(l+w)<.1&&Math.abs(p+x)<.1&&Math.abs(h+f+b-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const v=(h+1)/2,_=(f+1)/2,E=(b+1)/2,C=(u+d)/4,I=(l+w)/4,F=(p+x)/4;return v>_&&v>E?v<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(v),i=C/n,r=I/n):_>E?_<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(_),n=C/i,r=F/i):E<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(E),n=I/r,i=F/r),this.set(n,i,r,e),this}let g=Math.sqrt((x-p)*(x-p)+(l-w)*(l-w)+(d-u)*(d-u));return Math.abs(g)<.001&&(g=1),this.x=(x-p)/g,this.y=(l-w)/g,this.z=(d-u)/g,this.w=Math.acos((h+f+b-1)/2),this}setFromMatrix4Position(t){const e=t.value;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=N(this.x,t.x,e.x),this.y=N(this.y,t.y,e.y),this.z=N(this.z,t.z,e.z),this.w=N(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=N(this.x,t,e),this.y=N(this.y,t,e),this.z=N(this.z,t,e),this.w=N(this.w,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(N(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0,1);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}const wh=new Nn,zr=new Nt,bh=new Lr,Bn=2e3,Fr=2001,xh=[1,0,0,1],vh=[1,0,0,1,0,0],_h=[1,0,0,0,1,0,0,0,1],Sh=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Nr{value;constructor(t=xh){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m21(){return this.value[2]}get m22(){return this.value[3]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set(t=1,e=0,n=0,i=1){return this.m11=t,this.m21=e,this.m12=n,this.m22=i,this}identity(){return this.value=Array.from(xh),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m21==0&&this.m22==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m21=t.m21,this.m22=t.m22,this}clone(){return new Nr(this.value)}fromArray(t,e=0){for(let n=0;n<4;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m21,t[e+3]=this.m22,t}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[2],c=n[1],h=n[3],u=i[0],l=i[2],d=i[1],f=i[3];return r[0]=o*u+a*d,r[2]=o*l+a*f,r[1]=c*u+h*d,r[3]=c*l+h*f,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m21*=t,this.m22*=t,this}determinant(){return this.m11*this.m22-this.m21*this.m12}}class hn{value;constructor(t=_h){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m21(){return this.value[3]}get m22(){return this.value[4]}get m23(){return this.value[5]}get m31(){return this.value[6]}get m32(){return this.value[7]}get m33(){return this.value[8]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m21(t){this.value[3]=t}set m22(t){this.value[4]=t}set m23(t){this.value[5]=t}set m31(t){this.value[6]=t}set m32(t){this.value[7]=t}set m33(t){this.value[8]=t}set(t=1,e=0,n=0,i=0,r=1,o=0,a=0,c=0,h=1){const u=this.value;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=r,u[5]=c,u[6]=n,u[7]=o,u[8]=h,this}identity(){return this.value=Array.from(_h),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this}clone(){return new hn(this.value)}fromArray(t,e=0){for(let n=0;n<9;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){return t[e]=this.m11,t[e+1]=this.m12,t[e+2]=this.m13,t[e+3]=this.m21,t[e+4]=this.m22,t[e+5]=this.m23,t[e+6]=this.m31,t[e+7]=this.m32,t[e+8]=this.m33,t}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){return this.set(t.m11,t.m21,t.m31,t.m12,t.m22,t.m32,t.m13,t.m23,t.m33),this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[3],c=n[6],h=n[1],u=n[4],l=n[7],d=n[2],f=n[5],p=n[8],w=i[0],x=i[3],b=i[6],g=i[1],v=i[4],_=i[7],E=i[2],C=i[5],I=i[8];return r[0]=o*w+a*g+c*E,r[3]=o*x+a*v+c*C,r[6]=o*b+a*_+c*I,r[1]=h*w+u*g+l*E,r[4]=h*x+u*v+l*C,r[7]=h*b+u*_+l*I,r[2]=d*w+f*g+p*E,r[5]=d*x+f*v+p*C,r[8]=d*b+f*_+p*I,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}determinant(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8];return e*o*u-e*a*h-n*r*u+n*a*c+i*r*h-i*o*c}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=u*o-a*h,d=a*c-u*r,f=h*r-o*c,p=e*l+n*d+i*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/p;return t[0]=l*w,t[1]=(i*h-u*n)*w,t[2]=(a*n-i*o)*w,t[3]=d*w,t[4]=(u*e-i*c)*w,t[5]=(i*r-a*e)*w,t[6]=f*w,t[7]=(n*c-h*e)*w,t[8]=(o*e-n*r)*w,this}transpose(){let t;const e=this.value;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.value;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,o,a){const c=Math.cos(r),h=Math.sin(r);return this.set(n*c,n*h,-n*(c*o+h*a)+o+t,-i*h,i*c,-i*(-h*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Br.makeScale(t,e)),this}rotate(t){return this.premultiply(Br.makeRotation(-t)),this}translate(t,e){return this.premultiply(Br.makeTranslation(t,e)),this}makeTranslation(t,e){return typeof t=="number"?this.set(1,0,t,0,1,e,0,0,1):this.set(1,0,t.x,0,1,t.y,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){for(let e=0;e<9;e++)if(this.value[e]!==t.value[e])return!1;return!0}}class Rt{value;is3dSpecial=!1;constructor(t=Sh){this.value=Array.from(t)}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this.value[2]}get m14(){return this.value[3]}get m21(){return this.value[4]}get m22(){return this.value[5]}get m23(){return this.value[6]}get m24(){return this.value[7]}get m31(){return this.value[8]}get m32(){return this.value[9]}get m33(){return this.value[10]}get m34(){return this.value[11]}get m41(){return this.value[12]}get m42(){return this.value[13]}get m43(){return this.value[14]}get m44(){return this.value[15]}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this.value[2]=t}set m14(t){this.value[3]=t}set m21(t){this.value[4]=t}set m22(t){this.value[5]=t}set m23(t){this.value[6]=t}set m24(t){this.value[7]=t}set m31(t){this.value[8]=t}set m32(t){this.value[9]=t}set m33(t){this.value[10]=t}set m34(t){this.value[11]=t}set m41(t){this.value[12]=t}set m42(t){this.value[13]=t}set m43(t){this.value[14]=t}set m44(t){this.value[15]=t}set(t=1,e=0,n=0,i=0,r=0,o=1,a=0,c=0,h=0,u=0,l=1,d=0,f=0,p=0,w=0,x=1){const b=this.value;return b[0]=t,b[4]=e,b[8]=n,b[12]=i,b[1]=r,b[5]=o,b[9]=a,b[13]=c,b[2]=h,b[6]=u,b[10]=l,b[14]=d,b[3]=f,b[7]=p,b[11]=w,b[15]=x,this}is2D(){return!this.is3dSpecial&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m43==0&&this.m44==1}is3D(){return!this.is2D()}identity(){return this.value=Array.from(Sh),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m14==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m24==0&&this.m31==0&&this.m32==0&&this.m33==1&&this.m34==0&&this.m41==0&&this.m42==0&&this.m43==0&&this.m44==1}copy(t){return this.m11=t.m11,this.m12=t.m12,this.m13=t.m13,this.m14=t.m14,this.m21=t.m21,this.m22=t.m22,this.m23=t.m23,this.m24=t.m24,this.m31=t.m31,this.m32=t.m32,this.m33=t.m33,this.m34=t.m34,this.m41=t.m41,this.m42=t.m42,this.m43=t.m43,this.m44=t.m44,this}clone(){return new Rt(this.value)}static fromString(t){const e=new Rt,n=ra("number",t);return n.length===16&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}fromArray(t,e=0){for(let n=0;n<16;n++)this.value[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.value;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}copyPosition(t){const e=this.value,n=t.value;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.value;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrix4Column(this,0),e.setFromMatrix4Column(this,1),n.setFromMatrix4Column(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}normalize(){return this.multiplyScalar(1/(this.m44||1e-4))}transformPoint(t){const e=t.z||1,n=t.w||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31+n*this.m41,y:t.x*this.m12+t.y*this.m22+e*this.m32+n*this.m42,z:t.x*this.m13+t.y*this.m23+e*this.m33+n*this.m43,w:t.x*this.m14+t.y*this.m24+e*this.m34+n*this.m44}}toMatrix(t){const{scalarX:e,scalarY:n,skewX:i,skewY:r,x:o,y:a}=this.split(),c=[e,r,i,n,o,a];return t?(t.value=c,t):new _t(c)}flatten(){return this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m14=0,this.m24=0,this.m43=0,this.m44=1,this}toString(t=6){return`matrix3d(${this.value.map(e=>Q(e,t)).join(",")})`}split(){const t=Math.sqrt(this.m11*this.m11+this.m12*this.m12+this.m13*this.m13),e=Math.sqrt(this.m21*this.m21+this.m22*this.m22+this.m23*this.m23),n=Math.sqrt(this.m31*this.m31+this.m32*this.m32+this.m33*this.m33),i=Pt(N(Math.asin(-this.m13),-1,1));let r=Pt(Math.atan2(this.m23,this.m33));Math.cos(J(i))===0&&(r=Pt(Math.atan2(-this.m31,this.m22)));let o=Pt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(o+=180),{x:this.m41,y:this.m42,z:this.m43,scalarX:t,scalarY:e,scalarZ:n,degreeX:r,degreeY:i,degreeZ:o,skewX:Pt(this.m14),skewY:Pt(this.m24),skewZ:Pt(this.m34),skewW:this.m44,perspective:this.m34?-(1/this.m34):0}}extractRotation(t){const e=this.value,n=t.value,i=1/un.setFromMatrix4Column(t,0).length(),r=1/un.setFromMatrix4Column(t,1).length(),o=1/un.setFromMatrix4Column(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.value,n=t.x,i=t.y,r=t.z,o=Math.cos(n),a=Math.sin(n),c=Math.cos(i),h=Math.sin(i),u=Math.cos(r),l=Math.sin(r);if(t.order==="XYZ"){const d=o*u,f=o*l,p=a*u,w=a*l;e[0]=c*u,e[4]=-c*l,e[8]=h,e[1]=f+p*h,e[5]=d-w*h,e[9]=-a*c,e[2]=w-d*h,e[6]=p+f*h,e[10]=o*c}else if(t.order==="YXZ"){const d=c*u,f=c*l,p=h*u,w=h*l;e[0]=d+w*a,e[4]=p*a-f,e[8]=o*h,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=f*a-p,e[6]=w+d*a,e[10]=o*c}else if(t.order==="ZXY"){const d=c*u,f=c*l,p=h*u,w=h*l;e[0]=d-w*a,e[4]=-o*l,e[8]=p+f*a,e[1]=f+p*a,e[5]=o*u,e[9]=w-d*a,e[2]=-o*h,e[6]=a,e[10]=o*c}else if(t.order==="ZYX"){const d=o*u,f=o*l,p=a*u,w=a*l;e[0]=c*u,e[4]=p*h-f,e[8]=d*h+w,e[1]=c*l,e[5]=w*h+d,e[9]=f*h-p,e[2]=-h,e[6]=a*c,e[10]=o*c}else if(t.order==="YZX"){const d=o*c,f=o*h,p=a*c,w=a*h;e[0]=c*u,e[4]=w-d*l,e[8]=p*l+f,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-h*u,e[6]=f*l+p,e[10]=d-w*l}else if(t.order==="XZY"){const d=o*c,f=o*h,p=a*c,w=a*h;e[0]=c*u,e[4]=-l,e[8]=h*u,e[1]=d*l+w,e[5]=o*u,e[9]=f*l-p,e[2]=p*l-f,e[6]=a*u,e[10]=w*l+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Og,t,zg)}lookAt(t,e,n){const i=this.value;return Bt.subVectors(t,e),Bt.lengthSq()===0&&(Bt.z=1),Bt.normalize(),Pe.crossVectors(n,Bt),Pe.lengthSq()===0&&(Math.abs(n.z)===1?Bt.x+=1e-4:Bt.z+=1e-4,Bt.normalize(),Pe.crossVectors(n,Bt)),Pe.normalize(),Bs.crossVectors(Bt,Pe),i[0]=Pe.x,i[4]=Bs.x,i[8]=Bt.x,i[1]=Pe.y,i[5]=Bs.y,i[9]=Bt.y,i[2]=Pe.z,i[6]=Bs.z,i[10]=Bt.z,this}multiplyMatrices(t,e){const n=t.value,i=e.value,r=this.value,o=n[0],a=n[4],c=n[8],h=n[12],u=n[1],l=n[5],d=n[9],f=n[13],p=n[2],w=n[6],x=n[10],b=n[14],g=n[3],v=n[7],_=n[11],E=n[15],C=i[0],I=i[4],F=i[8],B=i[12],$=i[1],V=i[5],W=i[9],et=i[13],Z=i[2],Gt=i[6],mt=i[10],kt=i[14],Ot=i[3],L=i[7],R=i[11],U=i[15];return r[0]=o*C+a*$+c*Z+h*Ot,r[4]=o*I+a*V+c*Gt+h*L,r[8]=o*F+a*W+c*mt+h*R,r[12]=o*B+a*et+c*kt+h*U,r[1]=u*C+l*$+d*Z+f*Ot,r[5]=u*I+l*V+d*Gt+f*L,r[9]=u*F+l*W+d*mt+f*R,r[13]=u*B+l*et+d*kt+f*U,r[2]=p*C+w*$+x*Z+b*Ot,r[6]=p*I+w*V+x*Gt+b*L,r[10]=p*F+w*W+x*mt+b*R,r[14]=p*B+w*et+x*kt+b*U,r[3]=g*C+v*$+_*Z+E*Ot,r[7]=g*I+v*V+_*Gt+E*L,r[11]=g*F+v*W+_*mt+E*R,r[15]=g*B+v*et+_*kt+E*U,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m14*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m24*=t,this.m31*=t,this.m32*=t,this.m33*=t,this.m34*=t,this}determinant(){const t=this.value,e=t[0],n=t[4],i=t[8],r=t[12],o=t[1],a=t[5],c=t[9],h=t[13],u=t[2],l=t[6],d=t[10],f=t[14],p=t[3],w=t[7],x=t[11],b=t[15];return p*(+r*c*l-i*h*l-r*a*d+n*h*d+i*a*f-n*c*f)+w*(+e*c*f-e*h*d+r*o*d-i*o*f+i*h*u-r*c*u)+x*(+e*h*l-e*a*f-r*o*l+n*o*f+r*a*u-n*h*u)+b*(-i*a*u-e*c*l+e*a*d+i*o*l-n*o*d+n*c*u)}transpose(){const t=this.value;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.value;return t instanceof Nt?(i[12]=t.x,i[13]=t.y,i[14]=t.z):typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.value,e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],c=t[6],h=t[7],u=t[8],l=t[9],d=t[10],f=t[11],p=t[12],w=t[13],x=t[14],b=t[15],g=l*x*h-w*d*h+w*c*f-a*x*f-l*c*b+a*d*b,v=p*d*h-u*x*h-p*c*f+o*x*f+u*c*b-o*d*b,_=u*w*h-p*l*h+p*a*f-o*w*f-u*a*b+o*l*b,E=p*l*c-u*w*c-p*a*d+o*w*d+u*a*x-o*l*x,C=e*g+n*v+i*_+r*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/C;return t[0]=g*I,t[1]=(w*d*r-l*x*r-w*i*f+n*x*f+l*i*b-n*d*b)*I,t[2]=(a*x*r-w*c*r+w*i*h-n*x*h-a*i*b+n*c*b)*I,t[3]=(l*c*r-a*d*r-l*i*h+n*d*h+a*i*f-n*c*f)*I,t[4]=v*I,t[5]=(u*x*r-p*d*r+p*i*f-e*x*f-u*i*b+e*d*b)*I,t[6]=(p*c*r-o*x*r-p*i*h+e*x*h+o*i*b-e*c*b)*I,t[7]=(o*d*r-u*c*r+u*i*h-e*d*h-o*i*f+e*c*f)*I,t[8]=_*I,t[9]=(p*l*r-u*w*r-p*n*f+e*w*f+u*n*b-e*l*b)*I,t[10]=(o*w*r-p*a*r+p*n*h-e*w*h-o*n*b+e*a*b)*I,t[11]=(u*a*r-o*l*r-u*n*h+e*l*h+o*n*f-e*a*f)*I,t[12]=E*I,t[13]=(u*w*i-p*l*i+p*n*d-e*w*d-u*n*x+e*l*x)*I,t[14]=(p*a*i-o*w*i-p*n*c+e*w*c+o*n*x-e*a*x)*I,t[15]=(o*l*i-u*a*i+u*n*c-e*l*c-o*n*d+e*a*d)*I,this}getMaxScaleOnAxis(){const t=this.value,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t instanceof Nt?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,o=t.x,a=t.y,c=t.z,h=r*o,u=r*a;return this.set(h*o+n,h*a-i*c,h*c+i*a,0,h*a+i*c,u*a+n,u*c-i*o,0,h*c-i*a,u*c+i*o,r*c*c+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,o){return this.set(1,n,r,0,t,1,o,0,e,i,1,0,0,0,0,1),this}makePerspective(t,e,n,i,r,o,a=Bn){const c=this.value,h=2*r/(e-t),u=2*r/(n-i),l=(e+t)/(e-t),d=(n+i)/(n-i);let f,p;if(a===Bn)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===Fr)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=h,c[4]=0,c[8]=l,c[12]=0,c[1]=0,c[5]=u,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=f,c[14]=p,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,n,i,r,o,a=Bn){const c=this.value,h=1/(e-t),u=1/(n-i),l=1/(o-r),d=(e+t)*h,f=(n+i)*u;let p,w;if(a===Bn)p=(o+r)*l,w=-2*l;else if(a===Fr)p=r*l,w=-1*l;else throw new Error("Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*h,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-f,c[2]=0,c[6]=0,c[10]=w,c[14]=-p,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}compose(t,e,n){const i=this.value,r=e.x,o=e.y,a=e.z,c=e.w,h=r+r,u=o+o,l=a+a,d=r*h,f=r*u,p=r*l,w=o*u,x=o*l,b=a*l,g=c*h,v=c*u,_=c*l,E=n.x,C=n.y,I=n.z;return i[0]=(1-(w+b))*E,i[1]=(f+_)*E,i[2]=(p-v)*E,i[3]=0,i[4]=(f-_)*C,i[5]=(1-(d+b))*C,i[6]=(x+g)*C,i[7]=0,i[8]=(p+v)*I,i[9]=(x-g)*I,i[10]=(1-(d+w))*I,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.value;let r=un.set(i[0],i[1],i[2]).length();const o=un.set(i[4],i[5],i[6]).length(),a=un.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Kt.copy(this);const h=1/r,u=1/o,l=1/a;return Kt.value[0]*=h,Kt.value[1]*=h,Kt.value[2]*=h,Kt.value[4]*=u,Kt.value[5]*=u,Kt.value[6]*=u,Kt.value[8]*=l,Kt.value[9]*=l,Kt.value[10]*=l,e.setFromRotationMatrix4(Kt),n.x=r,n.y=o,n.z=a,this}equals(t){for(let e=0;e<16;e++)if(this.value[e]!==t.value[e])return!1;return!0}translate(t=0,e=0,n=0){return this.multiply(new Rt([1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1]))}scale(t=1,e=1,n=1){return this.multiply(new Rt([t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1]))}scaleVector3(t){const e=this.value,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}rotateX(t){const e=J(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Rt([1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1]))}rotateY(t){const e=J(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Rt([n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1]))}rotateZ(t){this.is3dSpecial=!0;const e=J(t),n=Math.cos(e),i=Math.sin(e);return this.multiply(new Rt([n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1]))}skew(t=0,e=0,n=0){return this.multiply(new Rt([1,0,0,J(t),0,1,0,J(e),0,0,1,J(n),0,0,0,1]))}perspective(t){return this.multiply(new Rt([1,0,0,0,0,1,0,0,0,0,1,t?-(1/t):0,0,0,0,1]))}unproject(t){let e=t.x*this.m11+t.y*this.m21+this.m41,n=t.x*this.m12+t.y*this.m22+this.m42,i=t.x*this.m13+t.y*this.m23+this.m43,r=t.x*this.m14+t.y*this.m24+this.m44,o=e+this.m31,a=n+this.m32,c=i+this.m33,h=r+this.m34;r==0&&(r=1e-4),e/=r,n/=r,i/=r,h==0&&(h=1e-4),o/=h,a/=h,c/=h;const u=c-i;if(u==0)return{x:e,y:n,z:i,mass:r};const l=-i/u;return e+=l*(o-e),n+=l*(a-n),{x:e,y:n,z:i,mass:r}}project(t){const e=t.z;let n=t.x*this.m11+t.y*this.m21+e*this.m31+this.m41,i=t.x*this.m12+t.y*this.m22+e*this.m32+this.m42,r=t.x*this.m14+t.y*this.m24+e*this.m34+this.m44;return r==0&&(r=1e-4),n/=r,i/=r,r<0&&(n-=this.m41,i-=this.m42,n*=1/r,i*=1/r,n+=this.m41,i+=this.m42),{x:n,y:i,z:e,mass:r}}bounds(t,e,n,i){const r=new Ns({x:t,y:e}),o=new Ns({x:t+n,y:e}),a=new Ns({x:t+n,y:e+i}),c=new Ns({x:t,y:e+i});({x:r.x,y:r.y,z:r.z,mass:r.mass}=this.project(r)),{x:o.x,y:o.y,z:o.z,mass:o.mass}=this.project(o),{x:a.x,y:a.y,z:a.z,mass:a.mass}=this.project(a),{x:c.x,y:c.y,z:c.z,mass:c.mass}=this.project(c);const h=Math.min(r.x,o.x,a.x,c.x),u=Math.min(r.y,o.y,a.y,c.y),l=Math.max(r.x,o.x,a.x,c.x)-h,d=Math.max(r.y,o.y,a.y,c.y)-u;return{x:h,y:u,width:l,height:d}}}class _t{value;_m13=0;_m23=0;_m33=1;matrix4;constructor(t=vh){this.value=Array.from(t),this.matrix4=this.toMatrix4()}get m11(){return this.value[0]}get m12(){return this.value[1]}get m13(){return this._m13}get m21(){return this.value[2]}get m22(){return this.value[3]}get m23(){return this._m23}get m31(){return this.value[4]}get m32(){return this.value[5]}get m33(){return this._m33}set m11(t){this.value[0]=t}set m12(t){this.value[1]=t}set m13(t){this._m13=t}set m21(t){this.value[2]=t}set m22(t){this.value[3]=t}set m23(t){this._m23=t}set m31(t){this.value[4]=t}set m32(t){this.value[5]=t}set m33(t){this._m33=t}static fromString(t){const e=new _t,n=ra("number",t);return n.length===6&&n.forEach((i,r)=>{i.fullMatch&&(e.value[r]=parseFloat(i.fullMatch))}),e}toMatrix4(t=this.matrix4){const e=[this.m11,this.m12,0,this.m13,this.m21,this.m22,0,this.m23,0,0,1,0,this.m31,this.m32,0,this.m33];return t?(t.value=e,t):new Rt(e)}identity(){return this.value=Array.from(vh),this.m13=0,this.m23=0,this.m33=1,this.matrix4=this.toMatrix4(),this}get isIdentity(){return this.m11==1&&this.m12==0&&this.m13==0&&this.m21==0&&this.m22==1&&this.m23==0&&this.m31==0&&this.m32==0&&this.m33==1}multiplyScalar(t){return this.m11*=t,this.m12*=t,this.m13*=t,this.m21*=t,this.m22*=t,this.m23*=t,this.m31*=t,this.m32*=t,this.m33*=t,this}normalize(){const t=this.m33||1e-4;return this.multiplyScalar(1/t)}transformPoint(t){const e=t.z||1;return{x:t.x*this.m11+t.y*this.m21+e*this.m31,y:t.x*this.m12+t.y*this.m22+e*this.m32,z:t.x*this.m13+t.y*this.m23+e*this.m33}}clone(){return new _t(this.value)}multiply(t){const e=this.clone(),n=t instanceof _t?t:new _t(t);return this.m11=n.m11*e.m11+n.m12*e.m21+n.m13*e.m31,this.m12=n.m11*e.m12+n.m12*e.m22+n.m13*e.m32,this.m13=n.m11*e.m13+n.m12*e.m23+n.m13*e.m33,this.m21=n.m21*e.m11+n.m22*e.m21+n.m23*e.m31,this.m22=n.m21*e.m12+n.m22*e.m22+n.m23*e.m32,this.m23=n.m21*e.m13+n.m22*e.m23+n.m23*e.m33,this.m31=n.m31*e.m11+n.m32*e.m21+n.m33*e.m31,this.m32=n.m31*e.m12+n.m32*e.m22+n.m33*e.m32,this.m33=n.m31*e.m13+n.m32*e.m23+n.m33*e.m33,this}append(t){return this.multiply(t)}prepend(t){return t.multiply(this),this}invert(){const t=this.m11,e=this.m12,n=this.m13,i=this.m21,r=this.m22,o=this.m23,a=this.m31,c=this.m32,h=this.m33,u=h*r-o*c,l=-h*i+o*a,d=c*i-r*a;let f=t*u+e*l+n*d;return f?(f=1/f,this.m11=u*f,this.m12=(-h*e+n*c)*f,this.m13=(o*e-n*r)*f,this.m21=l*f,this.m22=(h*t-n*a)*f,this.m23=(-o*t+n*i)*f,this.m31=d*f,this.m32=(-c*t+e*a)*f,this.m33=(r*t-e*i)*f,this):null}adjugate(){const t=new _t;return t.m11=this.m22*this.m33-this.m32*this.m23,t.m12=this.m32*this.m13-this.m12*this.m33,t.m13=this.m12*this.m23-this.m22*this.m13,t.m21=this.m31*this.m23-this.m21*this.m33,t.m22=this.m11*this.m33-this.m31*this.m13,t.m23=this.m21*this.m13-this.m11*this.m23,t.m31=this.m21*this.m32-this.m31*this.m22,t.m32=this.m31*this.m12-this.m11*this.m32,t.m33=this.m11*this.m22-this.m21*this.m12,t}split(){let t=Pt(Math.atan2(this.m12,this.m11));return this.m11<0&&this.m22>=0&&(t+=180),{x:this.m31,y:this.m32,degree:t,scaleX:Math.sqrt(this.m11*this.m11+this.m12*this.m12),scaleY:Math.sqrt(this.m21*this.m21+this.m22*this.m22),skewX:Pt(Math.atan2(-this.m21,this.m22)),skewY:Pt(Math.atan2(this.m12,this.m11))}}getGroupCoords(t){const e=this.value[0],n=this.value[1],i=this.value[2],r=this.value[3],o=this.value[4],a=this.value[5],c=t.value[0],h=t.value[1],u=t.value[2],l=t.value[3],d=t.value[4],f=t.value[5],p=c*l,w=h*u,x=(u*n-e*l)/(w-p),b=(c*n-e*h)/(p-w),g=(u*r-i*l)/(w-p),v=(c*r-i*h)/(p-w),_=(u*(a-f)+l*(d-o))/(w-p),E=(c*(a-f)+h*(d-o))/(p-w),C=[x,b,g,v,_,E];return new _t(C)}toString(t=6){return this.matrix4.is2D()?`matrix(${this.value.map(e=>Q(e,t)).join(",")})`:this.matrix4.toString()}translate(t,e){return this.multiply([1,0,0,1,t,e]),this.toMatrix4(),this}translateTo(t,e){return this.translate(t-this.m31,e-this.m32)}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.m32)}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.m31,t)}translateZ(t){return this.matrix4.translate(0,0,t),this.matrix4.toMatrix(this),this}translateZTo(t){return this.translateZ(t-this.matrix4.m43),this}translate3d(t,e,n){return this.matrix4.translate(t,e,n),this.matrix4.toMatrix(this),this}translate3dTo(t,e,n){return this.translate3d(t-this.matrix4.m41,e-this.matrix4.m42,n-this.matrix4.m43),this}rotate(t,e=0,n=0){const i=J(t),r=Math.cos(i),o=Math.sin(i);return this.translate(e,n),this.multiply([r,o,-o,r,0,0]),this.translate(-e,-n),this.toMatrix4(),this}rotateTo(t,e=0,n=0){const{degree:i}=this.split();return this.rotate(t-i,e,n),this}rotateX(t){return this.matrix4.rotateX(t),this.matrix4.toMatrix(this),this}rotateXTo(t){const{degreeX:e}=this.matrix4.split();return this.rotateX(t-e),this}rotateY(t){return this.matrix4.rotateY(t),this.matrix4.toMatrix(this),this}rotateYTo(t){const{degreeY:e}=this.matrix4.split();return this.rotateY(t-e),this}rotateZ(t){return this.matrix4.rotateZ(t),this.matrix4.toMatrix(this),this}rotateZTo(t){const{degreeZ:e}=this.matrix4.split();return this.rotateZ(t-e),this}rotate3d(t,e,n){return this.matrix4.rotateX(t).rotateY(e).rotateZ(n),this.matrix4.toMatrix(this),this}rotate3dTo(t,e,n){const{degreeX:i,degreeY:r,degreeZ:o}=this.matrix4.split();return this.rotate3d(t-i,e-r,n-o),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.multiply([t,0,0,e,0,0]),this.translate(-n,-i),this.toMatrix4(),this}scaleTo(t,e=t,n=0,i=0){return this.scale(t/this.m11,e/this.m22,n,i)}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.m11,1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.m22)}scaleZ(t){return this.matrix4.scale(1,1,t),this.matrix4.toMatrix(this),this}scaleZTo(t){const{scalarZ:e}=this.matrix4.split();return this.scaleZ(t/e),this}scale3d(t,e=t,n=t){return this.matrix4.scale(t,e,n),this.matrix4.toMatrix(this),this}scale3dTo(t,e=t,n=t){const{scalarX:i,scalarY:r,scalarZ:o}=this.matrix4.split();return this.scale3d(t/i,e/r,n/o),this}skew(t,e=t){return this.multiply([Math.cos(J(e)),Math.sin(J(e)),-Math.sin(J(t)),Math.cos(J(t)),0,0]),this.toMatrix4(),this}skewTo(t,e=t){const{skewX:n,skewY:i}=this.split();return this.skew(t-n,e-i)}skewX(t){const{skewY:e}=this.split();return this.skew(t,e)}skewXTo(t){const{skewY:e}=this.split();return this.skewTo(t,e)}skewY(t){const{skewX:e}=this.split();return this.skew(e,t)}skewYTo(t){const{skewX:e}=this.split();return this.skewTo(e,t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,n){return this}skew3dTo(t,e,n){return this}perspective(t){return this.matrix4.perspective(t),this.matrix4.toMatrix(this),this}}const Og=new Nt(0,0,0),zg=new Nt(1,1,1),Pe=new Nt,Bs=new Nt,Bt=new Nt,un=new Nt,Br=new hn,Kt=new Rt;function Yr(s){const t=new _t;return s.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,n,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const r=[];for(let o=0,a=i.length;o<a;o++)i[o].trim()&&r.push(parseFloat(""+i[o]));switch(n.toLowerCase()){case"t":case"translate":t.translate(r[0],r[1]);break;case"translatex":t.translateX(r[0]);break;case"translatey":t.translateY(r[0]);break;case"translatez":t.translateZ(r[0]);break;case"translate3d":t.translate3d(r[0],r[1],r[2]);break;case"r":case"rotate":t.rotate(r[0],r[1]??0,r[2]??0);break;case"rotatex":t.rotateX(r[0]);break;case"rotatey":t.rotateY(r[0]);break;case"rotatez":t.rotateZ(r[0]);break;case"rotate3d":t.rotate3d(r[0],r[1],r[2]);break;case"s":case"scale":t.scale(r[0],r[1]??r[0]);break;case"scalex":t.scaleX(r[0]);break;case"scaley":t.scaleY(r[0]);break;case"scalez":t.scaleZ(r[0]);break;case"scale3d":t.scale3d(r[0],r[1],r[2]);break;case"skew":t.skew(r[0],r[1]??0);break;case"skewx":t.skewX(r[0]);break;case"skewy":t.skewY(r[0]);break;case"skewz":t.skewZ(r[0]);break;case"skew3d":t.skew3d(r[0],r[1],r[2]);break;case"m":case"matrix":t.multiply([r[0],r[1],r[2],r[3],r[4],r[5]]),t.toMatrix4();break;case"matrix3d":t.matrix4.multiply(new Rt(r)),t.matrix4.toMatrix(t);break}return""}),t}function te(s,t,e){const n=new _t;return n.rotate(Pt(s)),n.transformPoint({x:t,y:e})}function Ur(s){const t=typeof s?.x=="number"?s?.x:0,e=typeof s?.y=="number"?s?.y:0,n=typeof s?.degree=="number"?s?.degree:0,i=typeof s?.scalarX=="number"?s?.scalarX:1,r=typeof s?.scalarY=="number"?s?.scalarY:1,o=J(n),a=Math.cos(o),c=Math.sin(o),h=new DOMMatrix([a*i,c*i,-c*r,a*r,t,e]);return h.multiplySelf(new DOMMatrix(s?.originMatrix||"")),h}function Fg(s,t){const e=new Path2D(s),n=new Path2D;return n.addPath(e,Ur(t)),n}function Xe(s,t,e){const n=Mr(s);return n.props.style=n.props.style||{},t?n.props.style[t]||n.props.style[aa(t)]||n.props.style[bt(t)]||"":n.props.style}function Xr(s,t,e){Ar(s,n=>{n.props.style=n.props.style||{},typeof t=="string"&&e?n.props.style[t]=e:t instanceof Object&&Object.keys(t).forEach(i=>{n.props.style[i]=t[i]})},!0)}function $r(s){const t={};if(getComputedStyle){const e=getComputedStyle(s);for(let n=0,i=e.length;n<i;n++)t[e[n]]=e.getPropertyValue(t[n])}else{const e=s.currentStyle;for(const n in e)t[n]=e[n]}return s.style.cssText&&s.style.cssText.split(";").filter(e=>!!e).forEach(e=>{const[n,i]=e.split(":");n&&i&&(t[n.trim()]=i.trim())}),t}function Ng(s,t,e){let n=s.style[t]||"";if(!n&&getComputedStyle){t=bt(t);const i=getComputedStyle(s,e),r=i.getPropertyPriority(t);n=i.getPropertyValue(t).trim()+(r?"!"+r:"")}return n||(n=s.currentStyle[t]||""),n}function Ys(s,t,e){typeof t=="string"&&e?s.style.setProperty(bt(t),e.replace(/!important/i,""),e.toLowerCase().includes("!important")?"important":""):t instanceof Object&&Object.keys(t).forEach(n=>{Ys(s,n,t[n])})}function Vr(s,t){typeof t=="string"?s.style.removeProperty(bt(t)):Object.keys(t).forEach(e=>{Vr(s,e)})}function Ch(s,t){let e;if(typeof t=="string"){const n=document.querySelector(t)?.shadowRoot;n?e=n:e=document.querySelector(t)}else e=t||document.getElementsByTagName("head")[0];if(e){const n=document.createElement("style");return n.innerHTML=s,e.appendChild(n),()=>{(e instanceof HTMLElement||e instanceof ShadowRoot)&&e.removeChild(n)}}else{const n=document.styleSheets[0].insertRule(s);return()=>{document.styleSheets[0].deleteRule(n)}}}function Bg(s,t,e={}){Object.prototype.hasOwnProperty.call(e,"transform")||Object.assign(e,{transform:Xe(s,"transform")||""});const n=Yr(e.transform),i={};for(const r in t){const o=t[r];switch(r){case"transform":break;case"translate":n.translate(o[0]||0,o[1]||0);break;case"translateTo":n.translateTo(o[0]||0,o[1]||0);break;case"translateX":n.translateX(o||0);break;case"translateXTo":n.translateXTo(o||0);break;case"translateY":n.translateY(o||0);break;case"translateYTo":n.translateYTo(o||0);break;case"translateZ":n.translateZ(o||0);break;case"translateZTo":n.translateZTo(o||0);break;case"translate3d":n.translate3d(o[0]||0,o[1]||0,o[2]||0);break;case"translate3dTo":n.translate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotate":typeof o=="number"?n.rotate(o||0):n.rotate(o[0]||0,o[1]||0,o[2]||0);break;case"rotateTo":typeof o=="number"?n.rotateTo(o||0):n.rotateTo(o[0]||0,o[1]||0,o[2]||0);break;case"rotateX":n.rotateX(o||0);break;case"rotateXTo":n.rotateXTo(o||0);break;case"rotateY":n.rotateY(o||0);break;case"rotateYTo":n.rotateYTo(o||0);break;case"rotateZ":n.rotateZ(o||0);break;case"rotateZTo":n.rotateZTo(o||0);break;case"rotate3d":n.rotate3d(o[0]||0,o[1]||0,o[2]||0);break;case"rotate3dTo":n.rotate3dTo(o[0]||0,o[1]||0,o[2]||0);break;case"scale":typeof o=="number"?n.scale(o||1):n.scale(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleTo":typeof o=="number"?n.scaleTo(o||1):n.scaleTo(o[0]||1,o[1]||1,o[2]||0,o[3]||0);break;case"scaleX":n.scaleX(o||1);break;case"scaleXTo":n.scaleXTo(o||1);break;case"scaleY":n.scaleY(o||1);break;case"scaleYTo":n.scaleYTo(o||1);break;case"scaleZ":n.scaleZ(o||1);break;case"scaleZTo":n.scaleZTo(o||1);break;case"scale3d":typeof o=="number"?n.scale3d(o||1):n.scale3d(o[0]||1,o[1]||1,o[2]||1);break;case"scale3dTo":typeof o=="number"?n.scale3dTo(o||1):n.scale3dTo(o[0]||1,o[1]||1,o[2]||1);break;case"skew":typeof o=="number"?n.skew(o||0):n.skew(o[0]||0,o[1]||0);break;case"skewTo":typeof o=="number"?n.skewTo(o||0):n.skewTo(o[0]||0,o[1]||0);break;case"skewX":n.skewX(o||0);break;case"skewXTo":n.skewXTo(o||0);break;case"skewY":n.skewY(o||0);break;case"skewYTo":n.skewYTo(o||0);break;case"skewZ":break;case"skewZTo":break;case"skew3d":break;case"skew3dTo":break;case"perspective":n.perspective(o||0);break;default:Object.prototype.hasOwnProperty.call(e,r)||(e[r]=Xe(s,r)),Object.assign(i,{[r]:`${o}`});break}}return Object.assign(i,{transform:n.toString()}),i}function $e(s,t,e){if(t===void 0&&e===void 0)return Gr(s);if(typeof t=="string"&&e===void 0)return Th(s,t);let n={};typeof t=="object"?n=t:typeof t=="string"&&typeof e=="string"&&(n[t]=""+e),Ar(s,i=>{Object.entries(n).forEach(([r,o])=>{i.props[r]=""+o})})}const Yg=["-o-","-ms-","-moz-","-webkit-",""];function Gr(s){const t={};for(let e=0,n=s.attributes,i=n.length;e<i;e++){const r=n[e];r.nodeName&&r.nodeValue&&(r.nodeName==="style"?t[r.nodeName]=$r(s):t[r.nodeName]=r.nodeValue)}return t}function Th(s,t){return t==="style"?$r(s):s.getAttribute(bt(t))}function ln(s,t,e){return s.setAttribute(bt(t),""+e)}function Ug(s,t){t.split(/[,\s]+/i).forEach(e=>{const n=bt(e.trim());n!=""&&s.removeAttribute(n)})}function Eh(s,t){for(const e in t){const n=t[e];switch(e){case"fill":n!=="none"&&(s.fillStyle=n);break;case"stroke":n!=="none"&&(s.strokeStyle=n);break;case"stroke-width":case"strokeWidth":s.lineWidth=Number(n);break;case"stroke-linecap":case"strokeLinecap":s.lineCap=n;break;case"stroke-linejoin":case"strokeLinejoin":switch(n){case"round":case"bevel":case"miter":s.lineJoin=n;break;default:s.lineJoin="miter";break}break;case"stroke-miterlimit":case"strokeMiterlimit":s.miterLimit=Number(n);break;case"stroke-opacity":case"strokeOpacity":break;case"stroke-dashoffset":case"strokeDashoffset":s.lineDashOffset=Number(n);break;case"stroke-dasharray":case"strokeDasharray":typeof n=="string"&&s.setLineDash(n.split(/\s+/).map(i=>Number(i)));break;case"cursor":break;case"font":typeof n=="string"&&(s.font=n);break;case"font-size":case"fontSize":s.font+=` ${n}`;break;case"font-family":case"fontFamily":s.font+=` ${n}`;break;case"font-weight":case"fontWeight":break;case"font-style":case"fontStyle":break;case"text-anchor":case"textAnchor":switch(n){case"middle":s.textAlign="center";break;case"end":s.textAlign="end";break;case"start":s.textAlign="start";break}break;case"alignment-baseline":case"alignmentBaseline":switch(n){case"middle":case"bottom":case"top":case"alphabetic":case"hanging":case"ideographic":s.textBaseline=n;break;default:s.textBaseline="alphabetic";break}break}}}function Xg(s,t,e,n,i){const r=t/e;let o=0,a=0;switch(s){case"aspectFit":r>=1?(o=n,a=o/r,a>i&&(a=i,o=a*r)):(a=i,o=a*r,o>n&&(o=n,a=o/r));break;case"aspectFill":r>=1?(a=i,o=a*r):(o=n,a=o/r);break;case"widthFix":o=n,a=o/r;break;case"heightFix":a=i,o=a*r;break;case"scaleToFill":default:o=n,a=i;break}return{width:o,height:a}}function Ph(s){try{const t=document.createElement("canvas"),e=t.getContext("2d");return t.width=s.width,t.height=s.height,e.drawImage(s,0,0,t.width,t.height),e.getImageData(0,0,t.width,t.height)}catch{return new ImageData(s.width,s.height)}}const $g=s=>{const t=s.width,e=s.height,n=t*e*3,i=n+54,r=[66,77,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,n&255,n>>8&255,n>>16&255,n>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,c=s.data;let h="";const u=t<<2;let l=e;const d=String.fromCharCode;do{const p=u*(l-1);let w="";for(let x=0;x<t;x++){const b=x<<2;w+=d(c[p+b+2])+d(c[p+b+1])+d(c[p+b])}for(let x=0;x<a;x++)w+=String.fromCharCode(0);h+=w}while(--l);function f(p){if(!window.btoa)throw"btoa undefined";let w="";if(typeof p=="string")w=p;else for(let x=0;x<p.length;x++)w+=String.fromCharCode(p[x]);return btoa(w)}return f(r.concat(o))+f(h)};function Vg(s){const{width:t,height:e}=s,n=document.createElement("canvas"),i=n.getContext("2d");return n.width=t,n.height=e,i.putImageData(s,0,0,0,0,t,e),n.toDataURL("image/png")}const Gg=(s,t,e)=>{const{width:n,height:i}=s,r=document.createElement("canvas"),o=r.getContext("2d");r.width=n,r.height=i,o.putImageData(s,0,0,0,0,n,i);const a=`image/${t?t.toLowerCase():"png"}`;r.toBlob(c=>{e?.(null,c)},a,1)};function qg(s,t){return createImageBitmap(s,t)}function jg(s){const t=[],e=[],n=[];let i=0;for(let c=0,h=s.data.length;c<h;c+=4)t[i]=s.data[c],e[i]=s.data[c+1],n[i]=s.data[c+2],i+=1;const r=qr(t),o=qr(e),a=qr(n);return"rgb("+r+","+o+","+a+")"}function qr(s){const t={},e=[],n=[];for(let a=0;a<s.length;a++)t[s[a]]?e.push(s[a]):t[s[a]]=1;let i=0;for(let a=0;a<e.length;a++){i=0;for(let c=0;c<e.length;c++)e[a]===e[c]&&(i+=1),n[a]=i}const r=Math.max.apply(null,n);let o=0;for(;o<n.length;o++)if(n[o]===r)return;return e[o]}const Hg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[(o*e+e-a-1)*4],i[c+1]=t[(o*e+e-a-1)*4+1],i[c+2]=t[(o*e+e-a-1)*4+2],i[c+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(i,e,n)},Wg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[((n-o-1)*e+a)*4],i[c+1]=t[((n-o-1)*e+a)*4+1],i[c+2]=t[((n-o-1)*e+a)*4+2],i[c+3]=t[((n-o-1)*e+a)*4+3]}return new ImageData(i,e,n)},Jg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const c=(o*n+a)*4;i[c]=t[(a*e+e-o-1)*4],i[c+1]=t[(a*e+e-o-1)*4+1],i[c+2]=t[(a*e+e-o-1)*4+2],i[c+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(i,n,e)},Zg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const c=(o*n+a)*4;i[c]=t[((n-a-1)*e+o)*4],i[c+1]=t[((n-a-1)*e+o)*4+1],i[c+2]=t[((n-a-1)*e+o)*4+2],i[c+3]=t[((n-a-1)*e+o)*4+3]}return new ImageData(i,n,e)},Qg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1]+t[c+2])/3;i[c]=h,i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},Kg=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=.2126*t[c]+.7152*t[c+1]+.0722*t[c+2];i[c]=h,i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},t0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,u=(t[c]+t[c+1]+t[c+2])/3>127?255:0;i[c]=u,i[c+1]=u,i[c+2]=u,i[c+3]=t[c+3]}return new ImageData(i,e,n)},e0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=255-t[c],i[c+1]=255-t[c+1],i[c+2]=255-t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,n)},n0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=0,i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,n)},s0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=t[c+1],i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,n)},i0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=0,i[c+2]=t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,n)},r0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=t[c+1],i[c+2]=0,i[c+3]=t[c+3]}return new ImageData(i,e,n)},o0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=0,i[c+2]=t[c+1],i[c+3]=t[c+3]}return new ImageData(i,e,n)},a0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=0,i[c+1]=t[c+1],i[c+2]=t[c+1],i[c+3]=t[c+3]}return new ImageData(i,e,n)},c0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c+1]+t[c+2])/2;i[c]=t[c],i[c+1]=h,i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},h0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+2])/2;i[c]=h,i[c+1]=t[c+1],i[c+2]=h,i[c+3]=t[c+3]}return new ImageData(i,e,n)},u0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4,h=(t[c]+t[c+1])/2;i[c]=h,i[c+1]=h,i[c+2]=t[c+2],i[c+3]=t[c+3]}return new ImageData(i,e,n)},l0=s=>Mh(s,[-1,-1,-1,-1,9,-1,-1,-1,-1]),f0=s=>Mh(s,[-1,-1,-1,-1,8,-1,-1,-1,-1]),d0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;i[c]=t[c],i[c+1]=t[c+1],i[c+2]=t[c+2],i[c+3]=255}return new ImageData(i,e,n)},m0=s=>{const{data:t,width:e,height:n}=s,i=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const c=(o*e+a)*4;if(t[c+3]===0)i[c]=255,i[c+1]=255,i[c+2]=255,i[c+3]=255;else{const h=Ah([t[c],t[c+1],t[c+2],t[c+3]],[255,255,255,255]);i[c]=h[0],i[c+1]=h[1],i[c+2]=h[2],i[c+3]=h[3]}}return new ImageData(i,e,n)};function p0(s,t,e,n,i,r=!1,o){const{data:a,width:c,height:h}=s;let u=i,l=n,d=t,f=e;if(u<0?u=0:u>c&&(u=c),l<0?l=0:l>h&&(l=h),d<1?d=1:d>c&&(d=c),f<1?f=1:f>h&&(f=h),u+d>c&&(d=c-u),l+f>h&&(f=h-l),r){const p=new Uint8ClampedArray(a.length);for(let x=0;x<h;x++)for(let b=0;b<c;b++){const g=(x*c+b)*4;b>=u&&b<=u+d&&x>=l&&x<=l+f?(p[g]=a[g],p[g+1]=a[g+1],p[g+2]=a[g+2],p[g+3]=a[g+3]):(p[g]=255,p[g+1]=255,p[g+2]=255,p[g+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(p,c,h)}else{const p=new Uint8ClampedArray(d*f*4);for(let x=l;x<=l+f;x++)for(let b=u;b<=u+d;b++){const g=((x-l)*d+b-u)*4,v=(x*c+b)*4;p[g]=a[v],p[g+1]=a[v+1],p[g+2]=a[v+2],p[g+3]=a[v+3]}return new ImageData(p,d,f)}}function g0(s,t,e,n){const{data:i,width:r,height:o}=s;let a=t;a>Math.floor(r/2)&&(a=Math.floor(r/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const c=new Uint8ClampedArray(i.length);for(let u=0;u<o;u++)for(let l=0;l<r;l++){const d=(u*r+l)*4;let f=-1;l<a?u<a?f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(a-l-1,2)+Math.pow(u-(o-a),2))):l>r-a-1&&(u<a?f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(a-u-1,2)):u>o-a-1&&(f=Math.sqrt(Math.pow(l-(r-a),2)+Math.pow(u-(o-a),2)))),Math.round(f)>a?(c[d]=255,c[d+1]=255,c[d+2]=255,c[d+3]=n||e.toUpperCase()==="PNG"?0:255):(c[d]=i[d],c[d+1]=i[d+1],c[d+2]=i[d+2],c[d+3]=n||e.toUpperCase()==="PNG"?i[d+3]:255)}return new ImageData(c,r,o)}function y0(s,t,e,n,i,r=1e4){const o=new Image;o.src=s;const a=document.createElement("canvas"),c=a.getContext("2d");return a.width=r,a.height=r,c.drawImage(o,0,0,t,e,0,0,n,i),c.getImageData(0,0,n,i)}function w0(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let c=0;c<n;c++){const h=(a*n+c)*4;r[h]=Math.max(Math.min(e[h]+t,255),0),r[h+1]=Math.max(Math.min(e[h+1]+t,255),0),r[h+2]=Math.max(Math.min(e[h+2]+t,255),0),r[h+3]=e[h+3]}return new ImageData(r,n,i)}function b0(s,t,e=!1){const{data:n,width:i,height:r}=s,o=new Uint8ClampedArray(n.length);for(let c=0;c<r;c++)for(let h=0;h<i;h++){const u=(c*i+h)*4;n[u+3]===0?(o[u]=255,o[u+1]=255,o[u+2]=255):(o[u]=n[u],o[u+1]=n[u+1],o[u+2]=n[u+2]);let l=n[u+3];e?l=Math.max(Math.min(Math.floor(255*t),255),0):l=Math.max(Math.min(Math.floor(l+255*t),255),0),o[u+3]=l}return new ImageData(o,i,r)}function x0(s,t,e,n){const{data:i,width:r,height:o}=s,{data:a,width:c,height:h}=t;let u=e,l=n;e+h>o&&(u=o-h),n+c>r&&(l=r-c);const d=new Uint8ClampedArray(i.length);for(let p=0;p<o;p++)for(let w=0;w<r;w++){const x=(p*r+w)*4;if(w<l||w>l+c||p<=u||p>=u+h)d[x]=i[x],d[x+1]=i[x+1],d[x+2]=i[x+2],d[x+3]=i[x+3];else{const b=(p*r+w-((u+1)*r+(p-(u+1))*(r-c))+c-l-1)*4,g=[a[b],a[b+1],a[b+2],a[b+3]],v=[i[x],i[x+1],i[x+2],i[x+3]],_=Ah(g,v);d[x]=_[0],d[x+1]=_[1],d[x+2]=_[2],d[x+3]=_[3]}}return new ImageData(d,r,o)}function v0(s,t,e,n,i,r=10){const{data:o,width:a,height:c}=s;let h=i,u=n,l=t,d=e;h<0?h=0:h>a&&(h=a),u<0?u=0:u>c&&(u=c),l<1?l=1:l>a&&(l=a),d<1?d=1:d>c&&(d=c),h+l>a&&(l=a-h),u+d>c&&(d=c-u);const f=new Uint8ClampedArray(o.length);for(let w=0;w<c;w++)for(let x=0;x<a;x++){const b=(w*a+x)*4;if(x>=h&&x<=h+l&&w>=u&&w<=u+d){const g=Math.floor((x-h)/r),v=Math.floor((w-u)/r);let _=Math.floor(r*(g+1)-r/2+h),E=Math.floor(r*(v+1)-r/2+u);_>a-1&&(_=a-1),E>c-1&&(E=c-1);const C=(E*a+_)*4;f[b]=o[C],f[b+1]=o[C+1],f[b+2]=o[C+2],f[b+3]=o[C+3]}else f[b]=o[b],f[b+1]=o[b+1],f[b+2]=o[b+2],f[b+3]=o[b+3]}return new ImageData(f,a,c)}function _0(s,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}}){if(t&&e){const{data:n,width:i,height:r}=s,{data:o}=t,a=new Uint8ClampedArray(n.length),{backgroundColor:c,changeIntoColor:h}=e;for(let l=0;l<r;l++)for(let d=0;d<i;d++){const f=(l*i+d)*4,p=o[f],w=o[f+1],x=o[f+2],b=o[f+3];p===c.r&&w===c.g&&x===c.b&&b===c.a&&h.a!==0?(a[f]=h.r,a[f+1]=h.g,a[f+2]=h.b,a[f+3]=h.a):(a[f]=n[f],a[f+1]=n[f+1],a[f+2]=n[f+2],a[f+3]=n[f+3])}return new ImageData(a,i,r)}return s}function Mh(s,t){const{data:e,width:n,height:i}=s,r=new Uint8ClampedArray(e.length);for(let a=0;a<i;a++)for(let c=0;c<n;c++){const h=(a*n+c)*4;for(let u=0;u<3;u++){const l=h+u;c===0||c===n-1||a===0||a===i-1?r[l]=e[l]:r[l]=t[0]*e[l-n*4-4]+t[1]*e[l-n*4]+t[2]*e[l-n*4+4]+t[3]*e[l-4]+t[4]*e[l]+t[5]*e[l+4]+t[6]*e[l+n*4-4]+t[7]*e[l+n*4]+t[8]*e[l+n*4+4]}r[h+3]=e[h+3]}return new ImageData(r,n,i)}function Ah(s,t){if(s&&s.length===4&&t&&t.length===4){const e=s[3],n=t[3];if(e===255||n===0)return s;if(e===0)return t;{const i=e/255,r=n/255,o=Math.max(Math.min(Math.floor(s[0]*i+t[0]*r*(1-i)),255),0),a=Math.max(Math.min(Math.floor(s[1]*i+t[1]*r*(1-i)),255),0),c=Math.max(Math.min(Math.floor(s[2]*i+t[2]*r*(1-i)),255),0),h=Math.max(Math.min(Math.floor((i+r*(1-i))*255),255),0);return[o,a,c,h]}}return[255,255,255,255]}const jr=function(){const s=[];return{writeByte(t){s.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,n=t.length){for(let i=0;i<n;i++)this.writeByte(t[i+e])},writeString(t){for(let e=0,n=t.length;e<n;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return s},toString(){let t="[";for(let e=0,n=s.length;e<n;e++)e>0&&(t+=","),t+=s[e];return t+="]",t}}},kh=function(){let s=0,t=0,e=0,n="";const i=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},r=function(o){n+=String.fromCharCode(i(o&63))};return{writeByte(o){for(s=s<<8|o&255,t+=8,e+=1;t>=6;)r(s>>>t-6),t-=6},flush(){if(t>0&&(r(s<<6-t),s=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)n+="="}},toString(){return n}}},Ih=function(s,t,e){const n=new Array(s*s),i=function(a){const c=a;let h=0,u=0;return{write(l,d){if(l>>>d)throw new Error("length over");for(;h+d>=8;)c.writeByte(255&(l<<h|u)),d-=8-h,l>>>=8-h,u=0,h=0;u=l<<h|u,h=h+d},flush(){h>0&&c.writeByte(u)}}},r=function(a){const c=1<<a,h=(1<<a)+1;let u=a+1;const l=o();for(let x=0;x<c;x++)l.add(String.fromCharCode(x));l.add(String.fromCharCode(c)),l.add(String.fromCharCode(h));const d=jr(),f=i(d);f.write(c,u);let p=0,w=String.fromCharCode(n[p]);for(p+=1;p<n.length;){const x=String.fromCharCode(n[p]);p+=1,l.contains(w+x)?w=w+x:(f.write(l.indexOf(w),u),l.size()<4095&&(l.size()==1<<u&&(u+=1),l.add(w+x)),w=x)}return f.write(l.indexOf(w),u),f.write(h,u),f.flush(),d.toByteArray()},o=function(){const a={};let c=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);a[h]=c,c+=1},size(){return c},indexOf(h){return a[h]},contains(h){return typeof a[h]<"u"}}};return{setPixel(a,c,h){n[c*s+a]=h},write(a){a.writeString("GIF87a"),a.writeShort(s),a.writeShort(s),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(tn("0x"+t[1]+t[2])),a.writeByte(tn("0x"+t[3]+t[4])),a.writeByte(tn("0x"+t[5]+t[6])),a.writeByte(tn("0x"+e[1]+e[2])),a.writeByte(tn("0x"+e[3]+e[4])),a.writeByte(tn("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(s),a.writeShort(s),a.writeByte(0);const c=2,h=r(c);a.writeByte(c);let u=0;for(;h.length-u>255;)a.writeByte(255),a.writeBytes(h,u,255),u+=255;a.writeByte(h.length-u),a.writeBytes(h,u,h.length-u),a.writeByte(0),a.writeString(";")}}},Dh=function(s,t,e,n){const i=Ih(s,t,e);for(let h=0;h<s;h++)for(let u=0;u<s;u++)i.setPixel(u,h,n(u,h));const r=jr();i.write(r);const o=kh(),a=r.toByteArray();for(let h=0,u=a.length;h<u;h++)o.writeByte(a[h]);o.flush();let c="";return c+="data:image/gif;base64,",c+=o,c},Yt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Yn={M:0,L:1,H:2,Q:3},Me={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},dt={glog:function(s){if(s<1)throw new Error("glog("+s+")");return dt.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return dt.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let s=0;s<8;s++)dt.EXP_TABLE[s]=1<<s;for(let s=8;s<256;s++)dt.EXP_TABLE[s]=dt.EXP_TABLE[s-4]^dt.EXP_TABLE[s-5]^dt.EXP_TABLE[s-6]^dt.EXP_TABLE[s-8];for(let s=0;s<255;s++)dt.LOG_TABLE[dt.EXP_TABLE[s]]=s;const tt={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){let t=s<<10;for(;tt.getBCHDigit(t)-tt.getBCHDigit(tt.G15)>=0;)t^=tt.G15<<tt.getBCHDigit(t)-tt.getBCHDigit(tt.G15);return(s<<10|t)^tt.G15_MASK},getBCHTypeNumber:function(s){let t=s<<12;for(;tt.getBCHDigit(t)-tt.getBCHDigit(tt.G18)>=0;)t^=tt.G18<<tt.getBCHDigit(t)-tt.getBCHDigit(tt.G18);return s<<12|t},getBCHDigit:function(s){let t=0;for(;s!=0;)t++,s>>>=1;return t},getPatternPosition:function(s){return tt.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,t,e){switch(s){case Me.PATTERN000:return(t+e)%2==0;case Me.PATTERN001:return t%2==0;case Me.PATTERN010:return e%3==0;case Me.PATTERN011:return(t+e)%3==0;case Me.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case Me.PATTERN101:return t*e%2+t*e%3==0;case Me.PATTERN110:return(t*e%2+t*e%3)%2==0;case Me.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){let t=new fn([1],0);for(let e=0;e<s;e++)t=t.multiply(new fn([1,dt.gexp(e)],0));return t},getLengthInBits:function(s,t){if(1<=t&&t<10)switch(s){case Yt.MODE_NUMBER:return 10;case Yt.MODE_ALPHA_NUM:return 9;case Yt.MODE_8BIT_BYTE:return 8;case Yt.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(t<27)switch(s){case Yt.MODE_NUMBER:return 12;case Yt.MODE_ALPHA_NUM:return 11;case Yt.MODE_8BIT_BYTE:return 16;case Yt.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(t<41)switch(s){case Yt.MODE_NUMBER:return 14;case Yt.MODE_ALPHA_NUM:return 13;case Yt.MODE_8BIT_BYTE:return 16;case Yt.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+t)},getLostPoint:function(s){const t=s.getModuleCount();let e=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++){let a=0;const c=s.isDark(r,o);for(let h=-1;h<=1;h++)if(!(r+h<0||t<=r+h))for(let u=-1;u<=1;u++)o+u<0||t<=o+u||h==0&&u==0||c==s.isDark(r+h,o+u)&&a++;a>5&&(e+=3+a-5)}for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){let a=0;s.isDark(r,o)&&a++,s.isDark(r+1,o)&&a++,s.isDark(r,o+1)&&a++,s.isDark(r+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(r,o)&&!s.isDark(r,o+1)&&s.isDark(r,o+2)&&s.isDark(r,o+3)&&s.isDark(r,o+4)&&!s.isDark(r,o+5)&&s.isDark(r,o+6)&&(e+=40);for(let r=0;r<t;r++)for(let o=0;o<t-6;o++)s.isDark(o,r)&&!s.isDark(o+1,r)&&s.isDark(o+2,r)&&s.isDark(o+3,r)&&s.isDark(o+4,r)&&!s.isDark(o+5,r)&&s.isDark(o+6,r)&&(e+=40);let n=0;for(let r=0;r<t;r++)for(let o=0;o<t;o++)s.isDark(o,r)&&n++;const i=Math.abs(100*n/t/t-50)/5;return e+=i*10,e}};class fn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let n=0;for(;n<t.length&&t[n]==0;)n++;this.num=new Array(t.length-n+e);for(let i=0;i<t.length-n;i++)this.num[i]=t[i+n]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let n=0;n<this.getLength();n++)for(let i=0;i<t.getLength();i++)e[n+i]^=dt.gexp(dt.glog(this.get(n))+dt.glog(t.get(i)));return new fn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=dt.glog(this.get(0))-dt.glog(t.get(0)),n=new Array(this.getLength());for(let i=0;i<this.getLength();i++)n[i]=this.get(i);for(let i=0;i<t.getLength();i++)n[i]^=dt.gexp(dt.glog(t.get(i))+e);return new fn(n,0).mod(t)}}class le{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const n=le.getRsBlockTable(t,e);if(n==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const i=n.length/3,r=[];for(let o=0;o<i;o++){const a=n[o*3+0],c=n[o*3+1],h=n[o*3+2];for(let u=0;u<a;u++)r.push(new le(c,h))}return r}static getRsBlockTable(t,e){switch(e){case Yn.L:return le.RS_BLOCK_TABLE[(t-1)*4+0];case Yn.M:return le.RS_BLOCK_TABLE[(t-1)*4+1];case Yn.Q:return le.RS_BLOCK_TABLE[(t-1)*4+2];case Yn.H:return le.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Rh{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class S0{mode;data;constructor(t){this.mode=Yt.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data.charCodeAt(e),8)}}class Ae{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Yn[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new S0(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=le.getRSBlocks(t,this.errorCorrectLevel),n=new Rh;let i=0;for(let r=0;r<e.length;r++)i+=e[r].dataCount;for(let r=0;r<this.dataList.length;r++){const o=this.dataList[r];n.put(o.mode,4),n.put(o.getLength(),tt.getLengthInBits(o.mode,t)),o.write(n)}if(n.getLengthInBits()<=i*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=Ae.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(let i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(0<=n&&n<=6&&(i==0||i==6)||0<=i&&i<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=i&&i<=4?this.modules[t+n][e+i]=!0:this.modules[t+n][e+i]=!1)}getBestMaskPattern(){let t=0,e=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const i=tt.getLostPoint(this);(n==0||t>i)&&(t=i,e=n)}return e}createMovieClip(t,e,n){const i=t.createEmptyMovieClip(e,n),r=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*r;for(let c=0;c<this.modules[o].length;c++){const h=c*r;this.modules[o][c]&&(i.beginFill(0,100),i.moveTo(h,a),i.lineTo(h+r,a),i.lineTo(h+r,a+r),i.lineTo(h,a+r),i.endFill())}}return i}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=tt.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let n=0;n<t.length;n++){const i=t[e],r=t[n];if(this.modules[i][r]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[i+o][r+a]=!0:this.modules[i+o][r+a]=!1}}setupTypeNumber(t){const e=tt.getBCHTypeNumber(this.typeNumber);for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(let n=0;n<18;n++){const i=!t&&(e>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i}}setupTypeInfo(t,e){const n=this.errorCorrectLevel<<3|e,i=tt.getBCHTypeInfo(n);for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<6?this.modules[r][8]=o:r<8?this.modules[r+1][8]=o:this.modules[this.moduleCount-15+r][8]=o}for(let r=0;r<15;r++){const o=!t&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=o:r<9?this.modules[8][15-r-1+1]=o:this.modules[8][15-r-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let n=-1,i=this.moduleCount-1,r=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let c=0;c<2;c++)if(this.modules[i][a-c]==null){let h=!1;o<t.length&&(h=(t[o]>>>r&1)==1),tt.getMask(e,i,a-c)&&(h=!h),this.modules[i][a-c]=h,r--,r==-1&&(o++,r=7)}if(i+=n,i<0||this.moduleCount<=i){i-=n,n=-n;break}}}static createData(t,e,n){const i=le.getRSBlocks(t,e),r=new Rh;for(let a=0;a<n.length;a++){const c=n[a];r.put(c.mode,4),r.put(c.getLength(),tt.getLengthInBits(c.mode,t)),c.write(r)}let o=0;for(let a=0;a<i.length;a++)o+=i[a].dataCount;if(r.getLengthInBits()>o*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+o*8+")");for(r.getLengthInBits()+4<=o*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=o*8||(r.put(Ae.PAD0,8),r.getLengthInBits()>=o*8));)r.put(Ae.PAD1,8);return Ae.createBytes(r,i)}static createBytes(t,e){let n=0,i=0,r=0;const o=new Array(e.length),a=new Array(e.length);for(let l=0;l<e.length;l++){const d=e[l].dataCount,f=e[l].totalCount-d;i=Math.max(i,d),r=Math.max(r,f),o[l]=new Array(d);for(let b=0;b<o[l].length;b++)o[l][b]=255&t.buffer[b+n];n+=d;const p=tt.getErrorCorrectPolynomial(f),x=new fn(o[l],p.getLength()-1).mod(p);a[l]=new Array(p.getLength()-1);for(let b=0;b<a[l].length;b++){const g=b+x.getLength()-a[l].length;a[l][b]=g>=0?x.get(g):0}}let c=0;for(let l=0;l<e.length;l++)c+=e[l].totalCount;const h=new Array(c);let u=0;for(let l=0;l<i;l++)for(let d=0;d<e.length;d++)l<o[d].length&&(h[u++]=o[d][l]);for(let l=0;l<r;l++)for(let d=0;d<e.length;d++)l<a[d].length&&(h[u++]=a[d][l]);return h}}const Lh=Math.ceil,Un=Math.floor,Oh=Math.round;function C0(s,t){const e=ca(s),n=t?.ecc||"H",i=t?.size||256,r=-1,o=t?.padding||0,a=t?.color||"#000000",c=t?.background||"#ffffff",h=new Ae(r,n);h.addData(e),h.make();const u=h.getModuleCount(),l=(i-o*2)/u,d=o,f=i-o;return Dh(i,a,c,function(p,w){if(d<=p&&p<f&&d<=w&&w<f){const x=Un((p-d)/l),b=Un((w-d)/l);return h.isDark(b,x)?0:1}else return 1})}function T0(s,t){const e=t.x||0,n=t.y||0,i=ca(s),r=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?Un(t.size):256,c=t.padding||0,h=-1,u=t.color||"#000000",l=t.background||"#ffffff",d=new Ae(h,o);d.addData(i),d.make();const f=d.getModuleCount(),p=(a-c*2)/f;r.fillStyle=l,r.fillRect(e,n,a,a);for(let w=0;w<f;w++)for(let x=0;x<f;x++){const b=Lh((x+1)*p)-Un(x*p),g=Lh((w+1)*p)-Un(w*p);r.fillStyle=d.isDark(w,x)?u:l,r.fillRect(e+Oh(x*p)+c,n+Oh(w*p)+c,b,g)}}const Us=new Nn,ht=new Nt;function Xn(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function Lt(s,t){switch(t.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}class fe{array;itemSize;count;normalized;updateRanges;version;constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("BufferAttribute: array should be a Typed Array.");this.array=t,this.itemSize=e,this.count=t.length/e,this.normalized=n,this.updateRanges=[],this.version=0}_onChangeCallback(){}set needsUpdate(t){t===!0&&this.version++}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=Dl(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)Us.fromBufferAttribute(this,e),Us.applyMatrix3(t),this.setXY(e,Us.x,Us.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.applyMatrix3(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.applyMatrix4(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.applyNormalMatrix(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)ht.fromBufferAttribute(this,e),ht.transformDirection(t),this.setXYZ(e,ht.x,ht.y,ht.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Xn(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Lt(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Xn(e,this.array)),e}setX(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Xn(e,this.array)),e}setY(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Xn(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Xn(e,this.array)),e}setW(t,e){return this.normalized&&(e=Lt(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Lt(e,this.array),n=Lt(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Lt(e,this.array),n=Lt(n,this.array),i=Lt(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.normalized&&(e=Lt(e,this.array),n=Lt(n,this.array),i=Lt(i,this.array),r=Lt(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onChange(t){return this._onChangeCallback=t,this}clone(){return fa(this,this.array,this.itemSize,this.normalized).copy(this)}toJSON(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized}}}class E0 extends fe{constructor(t,e,n=!1){super(new Int8Array(t),e,n)}}class P0 extends fe{constructor(t,e,n=!1){super(new Uint8Array(t),e,n)}}class M0 extends fe{constructor(t,e,n=!1){super(new Uint8ClampedArray(t),e,n)}}class A0 extends fe{constructor(t,e,n=!1){super(new Int16Array(t),e,n)}}class k0 extends fe{constructor(t,e,n=!1){super(new Uint16Array(t),e,n)}}class I0 extends fe{constructor(t,e,n=!1){super(new Int32Array(t),e,n)}}class D0 extends fe{constructor(t,e,n=!1){super(new Uint32Array(t),e,n)}}class R0 extends fe{constructor(t,e,n=!1){super(new Float32Array(t),e,n)}}const zh={map:new Map,transform:function(s){if(nh)return s;if(this.map.has(s))return this.map.get(s);const t=new OffscreenCanvas(s.width,s.height);return t.getContext("2d")?.drawImage(s,0,0),this.map.set(s,t),t},clear:function(){this.map.clear()}};function L0(s,t,e){const n=new OffscreenCanvas(s,t),i=n.getContext("2d");if(i)return e(i),n.transferToImageBitmap()}function O0(s,t,e){const n=s.createPattern(zh.transform(t),"no-repeat");if(n){const i=Ur(e);n.setTransform(i),s.fillStyle=n}}function Fh(s){return window.URL.createObjectURL(s)}function z0(s){return window.URL.revokeObjectURL(s)}function Nh(s){let t=!1,e;function n(){document.readyState==="loading"||t||(s(),e?.(),t=!0)}try{e=j(document,"DOMContentLoaded",n)}catch{e=j(window,"load",n)}return n(),()=>{t||e()}}function Bh(s){return j(window,"beforeunload",t=>{s(t)})}async function F0(s,t=6e4){return new Promise((e,n)=>{const i=document.createElement("script");i.type="text/javascript",i.async=!1,i.onload=o=>{clearTimeout(r),e(o),i.onerror=i.onload=null},i.onerror=o=>{clearTimeout(r),n(o)},i.src=s;const r=setTimeout(()=>{n("Timeout!")},t);document.body.appendChild(i)})}function Xs(s,t){const e=document.createElement("a");e.style.visibility="hidden",e.download=t,typeof s=="string"?e.href=s:e.href=window.URL.createObjectURL(s),e.click()}async function N0(s,t=document.getElementsByTagName("head")[0],e=6e4){return new Promise((n,i)=>{const r=document.createElement("link");r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=a=>{clearTimeout(o),n(a),r.onerror=r.onload=null},r.onerror=a=>{clearTimeout(o),i(a)},r.setAttribute("href",s);const o=setTimeout(()=>{i("Timeout!")},e);t.appendChild(r)})}function B0(){return new Promise(s=>{const t=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let e=document.styleSheets.length||0;const n=()=>e>=t.length?(s(),!0):!1;n()||t.forEach(i=>{i.onload=()=>{e+=1,n()}})})}const Yh=new xn;async function Uh(s,t=6e4){return new Promise((e,n)=>{const i=typeof s=="string"?s:Fh(s),r=Yh.get(i);if(r)return e(r);const o=document.createElement("img");o.onload=()=>{clearTimeout(a);const c=o.naturalWidth||o.width,h=o.naturalHeight||o.height,u={width:c,height:h,aspectRatio:c/h,element:o,imageData:Ph(o)};Yh.set(i,u),e(u),o.onerror=o.onload=null},o.onerror=c=>{clearTimeout(a),n(c)},o.src=i;const a=setTimeout(()=>{n("Timeout!")},t)})}async function Xh(s=Xt.text,t=["*"]){const n=(await Ki(t))[0],i=await Tn(n,s);return{type:n.type,name:n.name,size:n.size,data:i}}async function Y0(s=["image/*"]){const e=(await Ki(s))[0];if(!e.type.match(/image\/*/))return new Error("Not Image Type!");const n=await Tn(e,Xt.arraybuffer),i=bi(n),r=await Uh(i);return{type:e.type,name:e.name,size:e.size,data:n,width:r.width,height:r.height,aspectRatio:r.aspectRatio,imageData:r.imageData}}function U0(){return window.getSelection()?.toString()||""}function X0(s){document.getElementsByTagName("title")[0].innerText=s,document.title=s}function $0(s=200){"vibrate"in navigator?window.navigator.vibrate(s):console.error("Your device is not support vibrate on this browser.")}async function V0(s){if(navigator.clipboard)return await navigator.clipboard.writeText(s);{const t=document.createElement("textarea");return t.value=s,t.style.opacity="0",t.style.position="fixed",t.style.top="0",t.style.left="0",t.focus(),t.select(),document.execCommand("copy")}}function G0(s,t){window.scrollTo(s,t)}function q0(){let s=va,t=va;return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual",s=Bh(()=>{window.history.scrollRestoration="auto"}),t=Nh(()=>{window.history.scrollRestoration="manual"})),()=>{s(),t()}}function j0(s){return/(html|body)/i.test(s.tagName)||s===document.documentElement}const H0=s=>s===document.activeElement&&(s.type||s.href),Hr=function(){return parseFloat(getComputedStyle(document.documentElement).fontSize)};function W0(s){return s*Hr()}function J0(s){return s.parentElement?parseFloat(getComputedStyle(s.parentElement).fontSize):Hr()}const Z0=s=>{let t=s;for(;t&&t.nodeType!==1&&t.parentElement;)t=t.parentElement;return t},Q0=s=>s.parentElement,Wr=(s,t=[])=>!s||s.parentElement===null&&s.parentNode===null?t:Wr(s.parentElement,t.concat([s]));function K0(s){const t=Wr(s);for(let e=0,n=t.length;e<n;e++)if(/(auto|scroll)/.test(Xe(t[e],"overflow")+Xe(t[e],"overflow-y")+Xe(t[e],"overflow-x")))return t[e];return document.scrollingElement||document.documentElement}const t1=(s,t)=>s.contains?s!=t&&s.contains(t):!!(s.compareDocumentPosition(t)&16),e1=s=>Array.prototype.slice.call(s.parentElement?.children).filter(t=>t!==s),n1=s=>s.nextElementSibling,s1=s=>s.previousElementSibling,i1=(s,t)=>s.closest(t),r1=s=>s.shadowRoot,$n=s=>s.tagName==="INPUT"||s instanceof HTMLInputElement,Jr=s=>s.tagName==="SELECT"||s instanceof HTMLSelectElement,o1=s=>s.tagName==="TEXTAREA"||s instanceof HTMLTextAreaElement,Zr=s=>$n(s)&&s.getAttribute("type")==="checkbox",Qr=s=>$n(s)&&s.getAttribute("type")==="radio",a1=s=>$n(s)&&s.getAttribute("type")==="text",c1=s=>$n(s)&&s.getAttribute("type")==="number";function h1(s,t){if(Jr(s)){const e=s.options;for(let n=0,i=e.length;n<i;n++)e[n].selected=e[n].value==t}}function u1(s,t){if(Qr(s)){const e=document.getElementsByName(s.name);for(let n=0,i=e.length;n<i;n++){const r=e[n];r.checked=r.value==t}}}function l1(s,t){Zr(s)&&(s.checked=t)}const Vn=(s,t,e="append")=>{typeof t=="string"?s[e](jh(t)):s[e](t)},$h=function(s,t){if(typeof t=="string"){s.innerHTML=t;const e=Wh(s);e!=s&&(s=e)}else Vn(t,"replaceWith")},Vh=function(s){$h(s,"")},f1=(s,t)=>{s.textContent=t},d1=s=>{if(s instanceof SVGElement)return"";let t=s.innerText;if(!t){const e=s.querySelector("slot")?.assignedNodes()||[];let n=0;for(;!t&&n<=e.length-1;)"innerText"in e[n]&&(t=e[n].innerText),n++}return t},m1=s=>s.remove();function p1(s,t){Xe(s,"display")=="none"&&t===void 0||t===!0?Gh(s):qh(s)}function Gh(s){Xr(s,"display",s instanceof HTMLTableRowElement?"table-row":s instanceof HTMLTableCellElement?"table-cell":"block")}function qh(s){Xr(s,"display","none")}function Kr(s,t,e="toggle"){const n=t.split(/[,\s]+/);if(s.classList)n.forEach(i=>{const r=i.trim();r!==""&&s.classList[e](r)});else{const i=s.className.split(/ +/);let r=!1;n.forEach(o=>{const a=o.trim();if(a!==""){const c=i.indexOf(a);switch(e){case"add":c===-1&&(i.push(a),r=!0);break;case"remove":c!==-1&&(i.splice(c,1),r=!0);break;case"toggle":c===-1?i.push(a):i.splice(c,1),r=!0;break}}}),r&&$e(s,"class",i.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}}function g1(s,t){Kr(s,t,"add")}function y1(s,t){Kr(s,t,"remove")}function w1(s,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(s.className)||!1}function jh(s,t=!1){const e=document.createElement("template");return e.innerHTML=s,t&&e.content.childNodes.forEach(n=>{const i=Wh(n);i!=n&&e.content.replaceChild(i,n)}),e.content}function Hh(s){return document.createElement.call(document,s)}function b1(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function x1(s){return document.createTextNode.call(document,s)}function Wh(s){return s.tagName=="SCRIPT"&&(s=Jh(s)),s.querySelectorAll&&s.querySelectorAll("script").forEach(t=>{t.parentNode?.replaceChild(Jh(t),t)}),s}function Jh(s){const t=s.ownerDocument.createElement("script");t.text=s.text;const e=s.attributes;for(let n=0,i=e.length;n<i;n++)t.setAttribute(e[n].name,e[n].value);return t}function v1(s,t="http://test.com/localstorage.html"){const e=document.createElement("iframe");e.src=t,document.body.append(e),setTimeout(function(){e.contentWindow?.postMessage(s,t)},4e3),setTimeout(function(){e.remove()},6e3)}function _1(s){const t=new Proxy(window,{get(e,n,i){if(typeof n=="string"&&["open","location","document"].includes(n))throw new Error(`禁止访问 key: ${n}`);return n==="window"?t:Reflect.get(e,n,i)},set(e,n,i,r){return Reflect.set(e,n,i,r)}});new Function("window",`with(window) { ${s} }`)(t,null)}function to(){return{x:0,y:0,isDown:!1}}function Ve(){const s=to(),t=to();return{start:s,current:t,setStart:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1,this.setCurrent(e,n)},setCurrent:(e,n)=>{t.x=e.x,t.y=e.y,t.isDown=typeof n=="boolean"?n:typeof e.isDown=="boolean"?e.isDown:!1}}}function $s(s=document.documentElement,t=!1){return X(s,"mousemove",t)}function Zh(s=document.documentElement,t=!1){return X(s,"mousedown",t)}function Qh(s=document.documentElement,t=!1){return X(s,"mouseup",t)}function S1(s=document.documentElement,t=!1){return X(s,"mouseover",t)}function C1(s=document.documentElement,t=!1){return X(s,"mouseout",t)}function T1(s=document.documentElement,t=!1){return X(s,"mouseenter",t)}function E1(s=document.documentElement,t=!1){return X(s,"mouseleave",t)}function P1(s=document.documentElement,t=!1){return X(s,"click",t)}function M1(s=document.documentElement,t=!1){return X(s,"dblclick",t)}function A1(s=document.documentElement,t=!1){return X(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t)}function k1(s=document.documentElement,t=!1){return X(s,"contextmenu",t)}function Kh(s=document.documentElement,t=!1){return X(s,"touchmove",t)}function tu(s=document.documentElement,t=!1){return X(s,"touchstart",t)}function eu(s=document.documentElement,t=!1){return X(s,"touchend",t)}function nu(s=document.documentElement,t=!1){return X(s,"touchcancel",t)}function eo(s=document.documentElement,t=!1){return X(s,"pointermove",t)}function no(s=document.documentElement,t=!1){return X(s,"pointerdown",t)}function so(s=document.documentElement,t=!1){return X(s,"pointerup",t)}function io(s=document.documentElement,t=!1){return X(s,"pointercancel",t)}function I1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pan",e)},e=>{t.off("pan",e)})}function D1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panmove",e)},e=>{t.off("panmove",e)})}function R1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panstart",e)},e=>{t.off("panstart",e)})}function L1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panend",e)},e=>{t.off("panend",e)})}function O1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pancancel",e)},e=>{t.off("pancancel",e)})}function z1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panleft",e)},e=>{t.off("panleft",e)})}function F1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panright",e)},e=>{t.off("panright",e)})}function N1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("panup",e)},e=>{t.off("panup",e)})}function B1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pandown",e)},e=>{t.off("pandown",e)})}function Y1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pinch",e)},e=>{t.off("pinch",e)})}function U1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pinchin",e)},e=>{t.off("pinchin",e)})}function X1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("pinchout",e)},e=>{t.off("pinchout",e)})}function $1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("press",e)},e=>{t.off("press",e)})}function V1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("rotate",e)},e=>{t.off("rotate",e)})}function G1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipe",e)},e=>{t.off("swipe",e)})}function q1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipeleft",e)},e=>{t.off("swipeleft",e)})}function j1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swiperight",e)},e=>{t.off("swiperight",e)})}function H1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipeup",e)},e=>{t.off("swipeup",e)})}function W1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("swipedown",e)},e=>{t.off("swipedown",e)})}function J1(s=document.documentElement){const t=new nt(s);return it(e=>{t.on("tap",e)},e=>{t.off("tap",e)})}function Z1(s=document.documentElement){const t=new nt(document.documentElement);return it(e=>{const n=i=>{!i.target||s==i.target||s.contains(i.target)||e(i)};return t.on("tap",n),n},(e,n)=>{t.off("tap",n)})}function Q1(s=document.documentElement,t=!1){return X(s,"transitionstart",t)}function K1(s=document.documentElement,t=!1){return X(s,"transitionend",t)}function ty(s=document.documentElement,t=!1){return X(s,"animationstart",t)}function ey(s=document.documentElement,t=!1){return X(s,"animationend",t)}function su(s=document.documentElement,t=!1){return X(s,"drag",t)}function iu(s=document.documentElement,t=!1){return X(s,"dragstart",t)}function ru(s=document.documentElement,t=!1){return X(s,"dragend",t)}function ou(s=document.documentElement,t=!1){return X(s,"drop",t)}function au(s=document.documentElement,t=!1){return X(s,"dragenter",t)}function cu(s=document.documentElement,t=!1){return X(s,"dragleave",t)}function hu(s=document.documentElement,t=!1){return X(s,"dragover",t)}function uu(s=document.documentElement,t=!1){return X(s,"keydown",t)}function lu(s=document.documentElement,t=!1){return X(s,"keyup",t)}function ny(s=document.documentElement,t=!1){return X(s,"keypress",t)}function sy(s=document.documentElement,t){const e=t?.useMousePoint||Ve();return $s(s).pipe(ot(n=>(e.setCurrent(lt(n,s)),e)))}function iy(s=document.documentElement,t){const e=t?.useMousePoint||Ve();return $s(s).pipe(Sp(Zh(s).pipe(Be(n=>{e.setStart(lt(n,s),!0),t?.start?.(n,e)})),()=>Qh(s).pipe(Be(n=>{e.setCurrent(lt(n,s),!1),t?.end?.(n,e)}))),xp(),ot(n=>(e.setCurrent(lt(n,s),!0),e)))}function ry(s=document.documentElement,t){const e=t?.useMousePoint||Ve();return tu(s).pipe(Be(n=>{const i=n.changedTouches[0];e.setStart(lt(i,s),!0),t?.start?.(i,e)}),As(()=>Kh(s).pipe(pr(mr(eu(s),nu(s)).pipe(Be(n=>{const i=n.changedTouches[0];e.setCurrent(lt(i,s),!1),t?.end?.(i,e)}))))),ot(n=>{const i=n.changedTouches[0];return e.setCurrent(lt(i,s),!0),e}))}function fu(s=document.documentElement,t){const e=t?.useMousePoint||Ve();return no(s).pipe(Be(n=>{e.setStart(lt(n,s),!0),t?.start?.(n,e)}),As(()=>eo(s).pipe(pr(mr(so(s),io(s)).pipe(Be(n=>{e.setCurrent(lt(n,s),!1),t?.end?.(n,e)}))))),ot(n=>(e.setCurrent(lt(n,s),!0),e)))}function du(s=document.documentElement,t){const e=t?.useMousePoint||Ve();return pp($s(s),no(s)).pipe(jc(n=>n instanceof PointerEvent?(e.setStart(lt(n,s),!0),t?.start?.(n,e),eo(s).pipe(pr(mr(so(s),io(s)).pipe(Be(i=>{e.setCurrent(lt(i,s),!1),t?.end?.(i,e)}))))):n instanceof MouseEvent?Vm(n):Ac),ot(n=>(e.setCurrent(lt(n,s),n instanceof PointerEvent),e)))}function oy(s){return new st(t=>fu(s,{start:()=>{t.next(0)},end:(n,i)=>{t.next(i.current.x-i.start.x)}}).subscribe(n=>{t.next(n.current.y-n.start.y)}).unsubscribe).pipe(ve())}function ay(s,t){ln(s,"draggable","true");const e=iu(s,!0).subscribe(r=>{Se(r),Hc(r);const o=r.dataTransfer;o&&(o.effectAllowed="move",o.setData("text/plain","some-data")),t?.onStart?.(r)}),n=su(s).subscribe(r=>{Se(r),t?.onDrag?.(r)}),i=ru(s).subscribe(r=>{Se(r),t?.onEnd?.(r)});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe()}}function cy(s,t){const e=au(s).subscribe(o=>{Se(o),t?.onEnter?.(o)}),n=hu(s).subscribe(o=>{Se(o);const a=o.dataTransfer;a&&(a.dropEffect="move"),t?.onOver?.(o)}),i=cu(s).subscribe(o=>{Se(o),t?.onLeave?.(o)}),r=ou(s).subscribe(o=>{Se(o);const a=o.dataTransfer;if(!a){t?.onDrop?.(o,[]);return}t?.onDrop?.(o,[...a.files])});return()=>{e.unsubscribe(),n.unsubscribe(),i.unsubscribe(),r.unsubscribe()}}function mu(s=100){return X(document,"scroll",!0).pipe(_p(s))}function hy(){return X(window,"visibilitychange",!0).pipe(ot(()=>!document.hidden),ve())}function uy(){return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenX:window.screenX,screenY:window.screenY}}function Gn(){const s=document.documentElement;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function ly(){const s=document.body;return{clientWidth:s.clientWidth,clientHeight:s.clientHeight,clientTop:s.clientTop,clientLeft:s.clientLeft,scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft,offsetParent:s.offsetParent}}function pu(){return typeof window.innerWidth=="number"?{width:window.innerWidth,height:window.innerHeight}:document.compatMode==="CSS1Compat"?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.body.clientWidth,height:document.body.clientHeight}}function fy(){const{scrollWidth:s,scrollHeight:t}=Gn();return{width:s,height:t}}function ro(s){const{top:t,left:e,width:n,height:i}=s.getBoundingClientRect(),{scrollLeft:r,scrollTop:o}=Gn();return{x:e+r,y:t+o,width:n,height:i}}function dy(s){let t=s,e=0,n=0;for(;t!==null;)e+=t.offsetLeft,n+=t.offsetTop,t.offsetParent instanceof HTMLElement?t=t.offsetParent:t=null;return{x:e,y:n,width:s.offsetWidth,height:s.offsetHeight}}function gu(s){return s.getBoundingClientRect()}function my(s){const t=s.getBoundingClientRect();return{x:s.offsetLeft,y:s.offsetTop,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function py(){const{clientHeight:s,scrollTop:t,scrollHeight:e}=Gn(),n=e-s;return n<=0?0:t/n*100}function gy(s){if("center"in s){const t=s.center,e=gu(s.target);return{x:t.x-e.x,y:t.y-e.y}}return{x:s.clientX,y:s.clientY}}function oo(s){if("center"in s)return s.center;if(typeof s.pageX=="number"&&typeof s.pageY=="number")return{x:s.pageX,y:s.pageY};const{scrollLeft:t,scrollTop:e}=Gn();return{x:s.clientX+t,y:s.clientY+e}}function lt(s,t){const e={x:0,y:0};if(t){const n=oo(s),i=ro(t);e.x=N(n.x-i.x,0,i.width),e.y=N(n.y-i.y,0,i.height)}else{let n=0,i=0;if("currentTarget"in s&&s.currentTarget&&s.target&&s.currentTarget!=s.target){const r=s.currentTarget.getBoundingClientRect(),o=s.target.getBoundingClientRect();n=o.left-r.left,i=o.top-r.top}if("offsetX"in s)e.x=s.offsetX+n,e.y=s.offsetY+i;else{const r=oo(s),o=ro(s.target);e.x=N(r.x-o.x+n,0,o.width),e.y=N(r.y-o.y+i,0,o.height)}}return e}function yy(s){if(document.implementation.hasFeature("MouseEvents","2.0"))return s.button;switch(s.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}const wy={BACKSPACE:8,TAB:9,COMMA:188,DELETE:46,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,UP:38,DOWN:40,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32};function by(s){if(s.key)return s.key;if(s.keyCode)return s.keyCode;if(s.which)return s.which}function yu(s,t){const e=t.ctrl||!1,n=t.shift||!1,i=t.alt||!1;return(e===s.metaKey||e===s.ctrlKey)&&n===s.shiftKey&&i===s.altKey&&t.keys.map(r=>r.toLowerCase()).includes(s.key.toLowerCase())}function wu(s){return uu(s.target||document||window).pipe(qc(t=>yu(t,s)),ot(t=>{t.stopPropagation(),t.preventDefault()}))}function xy(s){return lu(s.target||document||window).pipe(qc(t=>yu(t,s)),ot(t=>{t.stopPropagation(),t.preventDefault()}))}function bu(s={keys:["o"]},t=Xt.text){return wu(s).pipe(As(async()=>await Xh(t)))}async function vy(s={keys:["o"]},t=Xt.text){return qm(bu(s,t))}async function xu(s,t){return new Promise(e=>{const n=new ResizeObserver(i=>{const o=i[0].contentRect;t(o),e(()=>{n.unobserve(s)})});n.observe(s)})}function ao(s=document.documentElement,t){let e,n,i,r;return new st(o=>{const a=new ResizeObserver(c=>{const u=c[0].contentRect;(e!=u.x||n!=u.y||i!=u.width||r!=u.height)&&(e=u.x,n=u.y,i=u.width,r=u.height,o.next(u))});return a.observe(s,t),()=>{a.unobserve(s),a.disconnect()}})}function _y(s){return s(window.innerWidth,window.innerHeight),j(window,"orientationchange"in window?"orientationchange":"resize",t=>{const e=t.target.innerWidth,n=t.target.innerHeight;s(e,n)})}function Sy(){return X(window,"orientationchange"in window?"orientationchange":"resize").pipe(ot(s=>({width:s.target.innerWidth,height:s.target.innerHeight})),_e({width:window.innerWidth,height:window.innerHeight}))}function Cy(){const s={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1},t={x:0,y:0,dx:0,dy:0,dStartX:0,dStartY:0,isDown:!1};return{mousePoint:t,setStartMousePoint:function(e,n){s.x=e.x,s.y=e.y,s.isDown=typeof n=="boolean"?n:!1,this.setCurrentMousePoint(e,n)},setCurrentMousePoint:(e,n)=>{const i=t.x,r=t.y;t.x=e.x,t.y=e.y,t.dx=t.x-i,t.dy=t.y-r,t.dStartX=t.x-s.x,t.dStartY=t.y-s.y,t.isDown=typeof n=="boolean"?n:!1}}}function Ty(s=document.documentElement){const t=new Li,e=new nt(s);let n=[];const i=Cy(),r=i.mousePoint,o=k=>{t.emit("mouseDown",k)},a=k=>{t.emit("mouseUp",k)},c=k=>{r.isDown||i.setCurrentMousePoint(lt(k,s)),t.emit("mouseMove",k)},h=k=>{t.emit("mouseOver",k)},u=k=>{t.emit("mouseOut",k)},l=k=>{t.emit("mouseEnter",k)},d=k=>{t.emit("mouseLeave",k)},f=k=>{t.emit("mouseClick",k)},p=k=>{t.emit("mouseDoubleClick",k)},w=k=>{t.emit("mouseWheel",k)},x=k=>{t.emit("mouseContextMenu",k)},b=k=>{t.emit("touchStart",k)},g=k=>{t.emit("touchEnd",k)},v=k=>{t.emit("touchCancel",k)},_=k=>{const at=k.changedTouches[0];r.isDown||i.setCurrentMousePoint(lt(at,s)),t.emit("touchMove",k)},E=k=>{t.emit("pointerDown",k)},C=k=>{t.emit("pointerUp",k)},I=k=>{t.emit("pointerCancel",k)},F=k=>{t.emit("pointerMove",k)},B=k=>{t.emit("pan",k)},$=k=>{t.emit("panStart",k)},V=k=>{t.emit("panMove",k)},W=k=>{t.emit("panEnd",k)},et=k=>{t.emit("panCancel",k)},Z=k=>{t.emit("panLeft",k)},Gt=k=>{t.emit("panRight",k)},mt=k=>{t.emit("panUp",k)},kt=k=>{t.emit("panDown",k)},Ot=k=>{t.emit("pinch",k)},L=k=>{t.emit("pinchin",k)},R=k=>{t.emit("pinchout",k)},U=k=>{t.emit("press",k)},H=k=>{t.emit("rotate",k)},It=k=>{t.emit("swipe",k)},ee=k=>{t.emit("swipeLeft",k)},ti=k=>{t.emit("swipeRight",k)},ei=k=>{t.emit("swipeUp",k)},pt=k=>{t.emit("swipeDown",k)},ie=k=>{t.emit("tap",k)},rt=k=>{!k.target||s==k.target||s.contains(k.target)||t.emit("tapOutSide",k)},Ct=k=>{t.emit("transitionstart",k)},gn=k=>{t.emit("transitionend",k)},Je=k=>{t.emit("animationstart",k)},Ze=k=>{t.emit("animationend",k)};let Ie={...s.getBoundingClientRect(),width:s.offsetWidth,height:s.offsetHeight};return{el:s,get rect(){return Ie},mousePoint:r,eb:t,start:async function(){n.push(j(s,"mousedown",o)),n.push(j(s,"mouseup",a)),n.push(j(s,"mousemove",c)),n.push(j(s,"mouseover",h)),n.push(j(s,"mouseout",u)),n.push(j(s,"mouseenter",l)),n.push(j(s,"mouseleave",d)),n.push(j(s,"click",f)),n.push(j(s,"dblclick",p)),n.push(j(s,"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",w)),n.push(j(s,"contextmenu",x)),n.push(j(s,"touchstart",b)),n.push(j(s,"touchend",g)),n.push(j(s,"touchcancel",v)),n.push(j(s,"touchmove",_)),n.push(j(s,"pointerdown",E)),n.push(j(s,"pointerup",C)),n.push(j(s,"pointercancel",I)),n.push(j(s,"pointermove",F)),e.on("pan",B),e.on("panstart",$),e.on("panmove",V),e.on("panend",W),e.on("pancancel",et),e.on("panleft",Z),e.on("panright",Gt),e.on("panup",mt),e.on("pandown",kt),e.on("pinch",Ot),e.on("pinchin",L),e.on("pinchout",R),e.on("press",U),e.on("rotate",H),e.on("swipe",It),e.on("swipeleft",ee),e.on("swiperight",ti),e.on("swipeup",ei),e.on("swipedown",pt),e.on("tap",ie),n.push(j(document,"pointerdown",rt)),n.push(j(s,"transitionstart",Ct)),n.push(j(s,"transitionend",gn)),n.push(j(s,"animationstart",Je)),n.push(j(s,"animationend",Ze));const k=await xu(s,at=>{Ie=at,t.emit("resize",at)});n.push(k),n.push(vu(this,{start:at=>{i.setStartMousePoint(lt(at,s),!0)},move:at=>{i.setCurrentMousePoint(lt(at,s))},end:at=>{i.setCurrentMousePoint(lt(at,s),!1)}}))},end:()=>{t.removeAllListeners(),n.forEach(k=>k()),n=[],e.off("pan",B),e.off("panstart",$),e.off("panmove",V),e.off("panend",W),e.off("pancancel",et),e.off("panleft",Z),e.off("panright",Gt),e.off("panup",mt),e.off("pandown",kt),e.off("pinch",Ot),e.off("pinchin",L),e.off("pinchout",R),e.off("press",U),e.off("rotate",H),e.off("swipe",It),e.off("swipeleft",ee),e.off("swiperight",ti),e.off("swipeup",ei),e.off("swipedown",pt),e.off("tap",ie)}}}function vu(s,t){return _u(s,t)}function _u(s,t){const e=s.eb,n=o=>{e.on("pointerMove",r),e.on("pointerUp",i),e.on("pointerCancel",i),t?.start?.(o)},i=o=>{e.off("pointerMove",r),e.off("pointerUp",i),e.off("pointerCancel",i),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("pointerDown",n),()=>e.off("pointerDown",n)}function Ey(s,t){const e=s.eb,n=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",i,!1),t?.start?.(o)},i=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",i,!1),t?.end?.(o)},r=o=>{t?.move?.(o)};return e.on("mouseDown",n),()=>e.off("mouseDown",n)}function Py(s,t){const e=s.eb,n=o=>{e.on("touchMove",r),e.on("touchEnd",i),e.on("touchCancel",i);const a=o.changedTouches[0];t?.start?.(a)},i=o=>{e.off("touchMove",r),e.off("touchEnd",i),e.off("touchCancel",i);const a=o.changedTouches[0];t?.end?.(a)},r=o=>{const a=o.changedTouches[0];t?.move?.(a)};return e.on("touchStart",n),()=>e.off("touchStart",n)}class My{multicast;buffer;handlers=ya(10);constructor(t){this.buffer=t?.buffer||ya(10),this.multicast=typeof t?.multicast=="boolean"?t?.multicast:!1}put(t){if(this.multicast){this.handlers.flush().forEach(n=>n(t));return}if(this.handlers.length===0)return this.buffer.put(t);const e=this.handlers.take();e&&e(t)}take(t){if(!this.multicast){const e=this.buffer.take();if(e){t(e);return}}this.handlers.put(t)}flush(t){this.multicast||this.buffer.flush().forEach(t)}}let co=class{x;y;toX;toY;constructor(t){this.x=t?.x||0,this.y=t?.y||0,this.toX=t?.toX||0,this.toY=t?.toY||0}toSVGPathData(){return[["L",this.toX,this.toY]]}toCanvasContext(t){t.lineTo(this.toX,this.toY)}getBoundingClientRect(){const t=Qt(this.x,this.y,this.toX,this.toY);if(t===0){const e=Math.min(this.x,this.toX),n=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return{x:e,y:n,width:i-e,height:r-n}}else{const e=Math.sin(t),n=Math.cos(t),i=n*this.x-e*this.y,r=n*this.toX-e*this.toY,o=n*this.y+e*this.x,a=n*this.toY+e*this.toX;return{x:Math.min(i,r),y:Math.min(o,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(o,a)-Math.min(o,a)}}}interpolate(t){return{x:this.x+t*(this.toX-this.x),y:this.y+t*(this.toY-this.y)}}intersection(t){const e=this.x,n=this.y,i=t.toX,r=t.toY,o=this.toX-e,a=t.x-i;if(!o&&!a)return null;const c=(this.toY-n)/o,h=(t.y-r)/a;if(o){if(!a)return{x:i,y:c*(i-e)+n}}else return{x:e,y:h*(e-i)+r};const u=(-h*i+r+c*e-n)/(c-h),l=c*(u-e)+n;return isNaN(u)||isNaN(l)?null:{x:u,y:l}}};class ho extends co{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=typeof t?.xAxisRotate=="number"?t?.xAxisRotate:0,this.largeArcFlag=typeof t?.largeArcFlag=="number"?t?.largeArcFlag:1,this.sweepFlag=typeof t?.sweepFlag=="number"?t?.sweepFlag:1,this.toX=t.toX,this.toY=t.toY}toSVGPathData(){return[["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.toX,this.toY]]}toCanvasContext(t){const[e,n,i,r,o,a,c]=this.convert(this.x,this.y,this.toX,this.toY,this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag);t.ellipse(e,n,i,r,o,a,c,!this.sweepFlag)}convert(t,e,n,i,r,o,a,c,h){const u=a/180*Math.PI,l=(t-n)/2,d=(e-i)/2,f=Math.cos(u)*l+Math.sin(u)*d,p=-Math.sin(u)*l+Math.cos(u)*d,w=f*f/(r*r)+p*p/(o*o);if(w>1){const V=Math.sqrt(w);throw r=V*r,o=V*o,new Error(`Radii are too small to build an arc. Correcting them to ${r}/${o}.`)}const x=Math.sqrt((r*r*o*o-r*r*p*p-o*o*f*f)/(r*r*p*p+o*o*f*f)),b=c!=h?1:-1,g=b*x*r*p/o,v=b*x*-o*f/r,_=(t+n)/2,E=(e+i)/2,C=Math.cos(u)*g-Math.sin(u)*v+_,I=Math.sin(u)*g+Math.cos(u)*v+E,F=(V,W,et,Z)=>(V*Z>=W*et?1:-1)*Math.acos((V*et+W*Z)/(Math.sqrt(V*V+W*W)*Math.sqrt(et*et+Z*Z))),B=F(1,0,t-C,e-I)-u,$=F(t-C,e-I,n-C,i-I);return[C,I,r,o,u,B,B+$]}}class Ay extends co{cx;cy;isLineThrough;constructor(t){super(t),this.cx=t.cx,this.cy=t.cy,this.isLineThrough=typeof t.isLineThrough=="boolean"?t.isLineThrough:!1}toSVGPathData(){if(this.isLineThrough){const t=this.cx*2-(this.x+this.toX)/2,e=this.cy*2-(this.y+this.toY)/2;return[["Q",t,e,this.toX,this.toY]]}else return[["Q",this.cx,this.cy,this.toX,this.toY]]}toCanvasContext(t){if(this.isLineThrough){const e=this.cx*2-(this.x+this.toX)/2,n=this.cy*2-(this.y+this.toY)/2;t.quadraticCurveTo(e,n,this.toX,this.toY)}else t.quadraticCurveTo(this.cx,this.cy,this.toX,this.toY)}getBoundingClientRect(){const t=[this.x,this.toX],e=[this.y,this.toY];let n,i,r,o;for(let h=0;h<2;++h)n=h==0?this.x-2*this.cx+this.toX:this.y-2*this.cy+this.toY,i=h==0?-2*this.x+2*this.cx:-2*this.y+2*this.cy,r=h==0?this.x:this.y,Math.abs(n)>1e-12&&(o=-i/(2*n),0<o&&o<1&&[t,e][h].push(n*o*o+i*o+r));const a={x:Math.min(0,...t),y:Math.min(0,...e)},c={x:Math.max(0,...t),y:Math.max(0,...e)};return{x:a.x,y:a.y,width:c.x-a.x,height:c.y-a.y}}interpolate(t){return{x:(1-t)*(1-t)*this.x+2*(1-t)*t*this.cx+t*t*this.toX,y:(1-t)*(1-t)*this.y+2*(1-t)*t*this.cy+t*t*this.toY}}}const ky=Ay;class yt extends co{c1x;c1y;c2x;c2y;constructor(t){super(t),this.c1x=t.c1x,this.c1y=t.c1y,this.c2x=t.c2x,this.c2y=t.c2y}clone(){return new yt({x:this.x,y:this.y,c1x:this.c1x,c1y:this.c1y,c2x:this.c2x,c2y:this.c2y,toX:this.toX,toY:this.toY})}toSVGPathData(){return[["C",this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY]]}toCanvasContext(t){t.bezierCurveTo(this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY)}getBoundingClientRect(){let t=this.c2x-2*this.c1x+this.x-(this.toX-2*this.c2x+this.c1x),e=2*(this.c1x-this.x)-2*(this.c2x-this.c1x),n=this.x-this.c1x,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t;const o=[this.y,this.toY],a=[this.x,this.toX];let c;const h=[];Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),t=this.c2y-2*this.c1y+this.y-(this.toY-2*this.c2y+this.c1y),e=2*(this.c1y-this.y)-2*(this.c2y-this.c1y),n=this.y-this.c1y,i=(-e+Math.sqrt(e*e-4*t*n))/2/t,r=(-e-Math.sqrt(e*e-4*t*n))/2/t,Math.abs(i)>1e12&&(i=.5),Math.abs(r)>1e12&&(r=.5),i>=0&&i<=1&&(c=this.interpolate(i),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y})),r>=0&&r<=1&&(c=this.interpolate(r),a.push(c.x),o.push(c.y),h.push({X:c.x,Y:c.y}));const u=[],l=h.length;for(let p=0;p<l;p++){for(let w=p+1;w<l;w++)h[p].X===h[w].X&&h[p].Y===h[w].Y&&(w=++p);u.push({X:h[p].X,Y:h[p].Y})}const d={x:Math.min(...a),y:Math.min(...o)},f={x:Math.max(...a),y:Math.max(...o)};return{x:d.x,y:d.y,width:f.x-d.x,height:f.y-d.y,dots:u}}interpolate(t){return{x:Math.pow(1-t,3)*this.x+3*Math.pow(1-t,2)*t*this.c1x+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2x+Math.pow(t,3)*this.toX,y:Math.pow(1-t,3)*this.y+3*Math.pow(1-t,2)*t*this.c1y+3*Math.pow(1-t,1)*Math.pow(t,2)*this.c2y+Math.pow(t,3)*this.toY}}static base3(t,e,n,i,r){const o=-3*e+9*n-9*i+3*r,a=t*o+6*e-12*n+6*i;return t*a-3*e+3*n}static bezlen(t,e,n,i,r,o,a,c,h=1){h=Math.max(0,Math.min(h,1));const u=h/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let f=0;for(let p=0;p<12;p++){const w=u*l[p]+u,x=yt.base3(w,t,n,r,a),b=yt.base3(w,e,i,o,c);f+=d[p]*Math.sqrt(x*x+b*b)}return u*f}length(t=1){return yt.bezlen(this.x,this.y,this.c1x,this.c1y,this.c2x,this.c2y,this.toX,this.toY,t)}getTatLen(t){const e=this.x,n=this.y,i=this.c1x,r=this.c1y,o=this.c2x,a=this.c2y,c=this.toX,h=this.toY;if(t<0||yt.bezlen(e,n,i,r,o,a,c,h)<t)return 0;const u=1;let l=u/2,d=u-l,f=yt.bezlen(e,n,i,r,o,a,c,h,d);for(;Math.abs(f-t)>.01;)l/=2,d+=(f<t?1:-1)*l,f=yt.bezlen(e,n,i,r,o,a,c,h,d);return d}getPointAtSegmentLength(t){const e=this.getTatLen(t),n=1-e,i=Math.pow(n,3),r=Math.pow(n,2),o=e*e,a=o*e,c=i*this.x+r*3*e*this.c1x+n*3*e*e*this.c2x+a*this.toX,h=i*this.y+r*3*e*this.c1y+n*3*e*e*this.c2y+a*this.toY,u=this.x+2*e*(this.c1x-this.x)+o*(this.c2x-2*this.c1x+this.x),l=this.y+2*e*(this.c1y-this.y)+o*(this.c2y-2*this.c1y+this.y),d=this.c1x+2*e*(this.c2x-this.c1x)+o*(this.toX-2*this.c2x+this.c1x),f=this.c1y+2*e*(this.c2y-this.c1y)+o*(this.toY-2*this.c2y+this.c1y),p=n*this.x+e*this.c1x,w=n*this.y+e*this.c1y,x=n*this.c2x+e*this.toX,b=n*this.c2y+e*this.toY,g=90-Math.atan2(u-d,l-f)*180/Math.PI;return{x:c,y:h,m:{x:u,y:l},n:{x:d,y:f},start:{x:p,y:w},end:{x,y:b},alpha:g}}}const qn=Math.PI*2;function Su(s,t,e,n){const i=s*n-t*e<0?-1:1;let r=s*e+t*n;return r>1&&(r=1),r<-1&&(r=-1),i*Math.acos(r)}function Iy(s,t,e,n,i,r,o,a,c,h){const u=h*(s-e)/2+c*(t-n)/2,l=-c*(s-e)/2+h*(t-n)/2,d=o*o,f=a*a,p=u*u,w=l*l;let x=d*f-d*w-f*p;x<0&&(x=0),x/=d*w+f*p,x=Math.sqrt(x)*(i===r?-1:1);const b=x*o/a*l,g=x*-a/o*u,v=h*b-c*g+(s+e)/2,_=c*b+h*g+(t+n)/2,E=(u-b)/o,C=(l-g)/a,I=(-u-b)/o,F=(-l-g)/a,B=Su(1,0,E,C);let $=Su(E,C,I,F);return r===0&&$>0&&($-=qn),r===1&&$<0&&($+=qn),[v,_,B,$]}function Dy(s,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(s),i=Math.sin(s),r=Math.cos(s+t),o=Math.sin(s+t);return[n,i,n-i*e,i+n*e,r+o*e,o-r*e,r,o]}function Cu(s,t,e,n,i,r,o,a,c){const h=Math.sin(c*qn/360),u=Math.cos(c*qn/360),l=u*(s-e)/2+h*(t-n)/2,d=-h*(s-e)/2+u*(t-n)/2;if(l===0&&d===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const f=l*l/(o*o)+d*d/(a*a);f>1&&(o*=Math.sqrt(f),a*=Math.sqrt(f));const p=Iy(s,t,e,n,i,r,o,a,h,u),w=[];let x=p[2],b=p[3];const g=Math.max(Math.ceil(Math.abs(b)/(qn/4)),1);b/=g;for(let v=0;v<g;v++)w.push(Dy(x,b)),x+=b;return w.map(v=>{for(let _=0;_<v.length;_+=2){let E=v[_+0],C=v[_+1];E*=o,C*=a;const I=u*E-h*C,F=h*E+u*C;v[_+0]=I+p[0],v[_+1]=F+p[1]}return v})}function uo(s,t,e,n,i,r){return[s/3+.6666666666666666*e,t/3+.6666666666666666*n,i/3+.6666666666666666*e,r/3+.6666666666666666*n,i,r]}function jn(s,t,e,n){return[s,t,e,n,e,n]}const Vs={a:7,c:6,s:4,q:4,t:2,m:2,l:2,h:1,v:1,z:0};function Tu(s="path",t){const e=document.createElementNS.call(document,"http://www.w3.org/2000/svg",s);return t&&$e(e,t),e}function Ry(s,t){return Tu("path",{d:s,id:t||rs()})}function Ly(s,t="shape"){return Xs(Qi(s),`${t}.svg`)}function Eu(s){return typeof s!="string"?!1:(s=s.trim(),/^[mlhvzaqtcs]\s*[-+.0-9][^mlhvzaqtcs]+/i.test(s)&&/[\dz]$/i.test(s))}function Oy(s){return s.map(t=>{if(!t[0])return"";switch(t[0].toLowerCase()){case"a":return`${t[0]} ${t[1]},${t[2]} ${t[3]} ${t[4]},${t[5]} ${t[6]},${t[7]}`;case"c":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]} ${t[5]},${t[6]}`;case"s":case"q":return`${t[0]} ${t[1]},${t[2]} ${t[3]},${t[4]}`;default:return t[0]+" "+t.slice(1).join(",")}}).join(" ")}function Pu(s){const t=[];return Eu(s)&&s.replace(/([mlhvzaqtcs])([^mlhvzaqtcs]*)/gi,(e,n,i)=>{let r=n.toLowerCase();const o=wi(i);for(r=="m"&&o.length>Vs[r]&&(t.push([n,...o.splice(0,Vs[r])]),r="l",n=n=="m"?"l":"L");o.length;){if(o.length<Vs[r])throw new Error(`parseSVGPath substring:{ ${e} } command:{ ${n} } args:{ ${o} }`);t.push([n,...o.splice(0,Vs[r])])}return r=="z"&&t.push([n]),""}),t}function Mu(s){let t=0,e=0,n=0,i=0;return s.map(function(r){const o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=n,r[7]+=i;break;case"v":r[1]+=i;break;case"h":r[1]+=n;break;default:for(let c=1;c<r.length;)r[c++]+=n,r[c++]+=i}switch(a){case"Z":n=t,i=e;break;case"H":n=r[1];break;case"V":i=r[1];break;case"M":n=t=r[1],i=e=r[2];break;default:n=r[r.length-2],i=r[r.length-1]}return r})}function zy(s){const t=[];let e=0,n=0,i=0,r=0,o=0,a=0,c=0,h=0,u;for(let l=0,d=s.length;l<d;l++){let f=s[l];const p=f[0];switch(p){case"M":e=f[1],n=f[2];break;case"A":const w=Cu(i,r,f[6],f[7],f[4],f[5],f[1],f[2],f[3]);if(!w.length)continue;w.forEach((g,v)=>{const[_,E,C,I,F,B,$,V]=g;f=["C",C,I,F,B,$,V],v<w.length-1&&t.push(f)});break;case"S":let x=i,b=r;(u=="C"||u=="S")&&(x+=x-c,b+=b-h),f=["C",x,b,f[1],f[2],f[3],f[4]];break;case"T":u=="Q"||u=="T"?(o=i*2-o,a=r*2-a):(o=i,a=r),f=["C",...uo(i,r,o,a,f[1],f[2])];break;case"Q":o=f[1],a=f[2],f=["C",...uo(i,r,f[1],f[2],f[3],f[4])];break;case"L":f=["C",...jn(i,r,f[1],f[2])];break;case"H":f=["C",...jn(i,r,f[1],r)];break;case"V":f=["C",...jn(i,r,i,f[1])];break;case"Z":f=["C",...jn(i,r,e,n)];break}u=p,i=f[f.length-2],r=f[f.length-1],f.length>4?(c=f[f.length-4],h=f[f.length-3]):(c=i,h=r),t.push(f)}return t}class Hn{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),n=document.createElement("video"),i=document.createElement("source"),r=new MediaSource;r.addEventListener("sourceopen",()=>t(!0)),i.src=URL.createObjectURL(r),i.media="(min-width:10px)",n.append(i),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(n),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{Hn.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class lo extends Li{source;raw="";mode="text";tagname="";nodename="";textchunk="";entity="";quote="";attrs={};constructor(t){super(),this.source=t}parse(){const t=Ml(this.source);if(t===0){this.emit("finish");return}let e,n,i=oa(this.source,0);for(let r=1;r<t;r++)e=n,n=i,i=oa(this.source,r),this.raw+=n,n&&this.step(n,i,e);i&&this.step(i,void 0,n),this.emit("finish")}step(t,e,n){t==`
|
|
26
|
+
`&&this.emit("newline"),this.act(t,e,n)}act(t,e,n){switch(this.mode){case"text":switch(t){case"<":case"eof":this.nodename="",this.attrs={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.emit("text",this.textchunk),this.raw+=t,this.textchunk="";break;case"&":this.mode="entity",this.entity="";break;default:this.textchunk+=t;break}break;case"entity":ae("whitespace",t)?(this.textchunk+=Au(this.entity),this.mode="text"):t==";"?(this.textchunk+=Au(this.entity+t),this.mode="text"):this.entity+=t;break;case"special":if(n=="!"&&t=="-"&&e=="-"){this.mode="comment start";break}if(this.textchunk=="[CDATA"&&t=="["){this.mode="cdata",this.textchunk="";break}if(t==">"||t=="eof"){this.emit("special",this.textchunk),this.mode="text",this.textchunk="";break}this.textchunk+=t;break;case"cdata":if(n=="]"&&t=="]"&&e==">"){this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1);break}t=="eof"&&(this.mode="cdata end",this.act(t,e,n)),this.textchunk+=t;break;case"cdata end":this.emit("cdata",this.textchunk),this.textchunk="",this.mode="text";break;case"comment start":e==">"||t=="eof"?(this.emit("comment",""),this.mode="skip"):this.mode="comment";break;case"skip":this.mode="text";break;case"comment":t=="-"&&n=="-"&&e==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):t=="eof"?this.emit("comment",this.textchunk):this.textchunk+=t;break;case"comment end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"declaration":if(t=="?"&&e==">"){this.mode="declaration end";break}t=="eof"&&this.emit("comment",this.textchunk),this.textchunk+=t;break;case"declaration end":this.emit("comment",this.textchunk),this.textchunk="",this.mode="text";break;case"tag name start":if(t=="eof"){this.emit("text","<");break}if(!ae("whitespace",t)){if(this.mode="tag name",t=="/"){this.mode="close tag name start";break}else if(t=="!"){this.mode="special",this.textchunk="";break}else if(t=="?"){this.mode="declaration";break}this.act(t,e,n)}break;case"close tag name start":ae("whitespace",t)||(this.mode="close tag name",this.tagname="",this.nodename="",this.act(t,e,n));break;case"close tag name":if(ae("whitespace",t))this.tagname=this.nodename;else switch(t){case">":this.emit("/tag",this.tagname||this.nodename,this.attrs),this.mode="text";break;default:!this.tagname&&(this.nodename+=t);break}break;case"tag name":if(ae("whitespace",t))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(t){case">":this.emit("tag",this.nodename,this.attrs),this.mode="text";break;case"/":this.raw+=e,this.emit("tag",this.nodename,this.attrs),this.emit("/tag",this.nodename,this.attrs),this.mode="skip";break;default:this.nodename+=t;break}break;case"attr start":ae("whitespace",t)||(this.mode="attr",this.nodename="",this.act(t,e,n));break;case"attr":if(ae("whitespace",t)||t=="=")this.attrs[this.nodename]="",this.mode="attr value start";else switch(t){case">":this.nodename=="/"?(delete this.attrs["/"],this.emit("tag",this.tagname,this.attrs),this.emit("/tag",this.tagname,this.attrs)):(this.nodename&&(this.attrs[this.nodename]=""),this.emit("tag",this.tagname,this.attrs)),this.mode="text";break;default:this.nodename+=t;break}break;case"attr value start":if(!ae("whitespace",t)){if(this.mode="attr value",this.quote="",t=="'"||t=='"'){this.quote=t;return}this.act(t,e,n)}break;case"attr value":if(ae("whitespace",t)&&!this.quote)this.mode="attr start";else if(t==">"&&!this.quote)this.emit("tag",this.tagname,this.attrs),this.mode="text";else switch(t){case'"':case"'":this.quote==t&&n!="\\"&&(this.mode="attr start");break;default:this.attrs[this.nodename]+=t;break}break}}}function Au(s){const t={lt:60,"lt;":60,"AMP;":38,AMP:38,"GT;":62,GT:62,"QUOT;":34,QUOT:34,"apos;":39,"bull;":8226,"bullet;":8226,"copy;":169,copy:169,"deg;":176,deg:176};let e;return s.charAt(0)=="#"?s.charAt(1).toLowerCase()=="x"?e=parseInt(s.substring(2),16):e=parseInt(s.substring(1),10):e=t[s],e?String.fromCharCode(e):"&"+s}var ku=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function fo(s,t={}){var e=1,n=1;function i(L){var R=L.match(/\n/g);R&&(e+=R.length);var U=L.lastIndexOf(`
|
|
27
|
+
`);n=~U?L.length-U:n+L.length}function r(){var L={line:e,column:n};return function(R){return R.position=new o(L),p(),R}}function o(L){this.start=L,this.end={line:e,column:n},this.source=t.source}o.prototype.content=s;var a=[];function c(L){var R=new Error(t.source+":"+e+":"+n+": "+L);if(R.reason=L,R.filename=t.source,R.line=e,R.column=n,R.source=s,t.silent)a.push(R);else throw R}function h(){var L=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:L,parsingErrors:a}}}function u(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var L,R=[];for(p(),w(R);s.length&&s.charAt(0)!="}"&&(L=kt()||Ot());)L!==!1&&(R.push(L),w(R));return R}function f(L){var R=L.exec(s);if(R){var U=R[0];return i(U),s=s.slice(U.length),R}}function p(){f(/^\s*/)}function w(L){var R;for(L=L||[];R=x();)R!==!1&&L.push(R);return L}function x(){var L=r();if(!(s.charAt(0)!="/"||s.charAt(1)!="*")){for(var R=2;s.charAt(R)!=""&&(s.charAt(R)!="*"||s.charAt(R+1)!="/");)++R;if(R+=2,s.charAt(R-1)==="")return c("End of comment missing");var U=s.slice(2,R-2);return n+=2,i(U),s=s.slice(R),n+=2,L({type:"comment",comment:U})}}function b(){var L=f(/^([^{]+)/);if(L)return de(L[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(R){return R.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(R){return R.replace(/\u200C/g,",")})}function g(){var L=r(),R=f(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(R){if(R=de(R[0]),!f(/^:\s*/))return c("property missing ':'");var U=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),H=L({type:"declaration",property:R.replace(ku,""),value:U?de(U[0]).replace(ku,""):""});return f(/^[;\s]*/),H}}function v(){var L=[];if(!u())return c("missing '{'");w(L);for(var R;R=g();)R!==!1&&(L.push(R),w(L));return l()?L:c("missing '}'")}function _(){for(var L,R=[],U=r();L=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)R.push(L[1]),f(/^,\s*/);if(R.length)return U({type:"keyframe",values:R,declarations:v()})}function E(){var L=r(),R=f(/^@([-\w]+)?keyframes\s*/);if(R){var U=R[1];if(R=f(/^([-\w]+)\s*/),!R)return c("@keyframes missing name");var H=R[1];if(!u())return c("@keyframes missing '{'");for(var It,ee=w();It=_();)ee.push(It),ee=ee.concat(w());return l()?L({type:"keyframes",name:H,vendor:U,keyframes:ee}):c("@keyframes missing '}'")}}function C(){var L=r(),R=f(/^@supports *([^{]+)/);if(R){var U=de(R[1]);if(!u())return c("@supports missing '{'");var H=w().concat(d());return l()?L({type:"supports",supports:U,rules:H}):c("@supports missing '}'")}}function I(){var L=r(),R=f(/^@host\s*/);if(R){if(!u())return c("@host missing '{'");var U=w().concat(d());return l()?L({type:"host",rules:U}):c("@host missing '}'")}}function F(){var L=r(),R=f(/^@media *([^{]+)/);if(R){var U=de(R[1]);if(!u())return c("@media missing '{'");var H=w().concat(d());return l()?L({type:"media",media:U,rules:H}):c("@media missing '}'")}}function B(){var L=r(),R=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(R)return L({type:"custom-media",name:de(R[1]),media:de(R[2])})}function $(){var L=r(),R=f(/^@page */);if(R){var U=b()||[];if(!u())return c("@page missing '{'");for(var H=w(),It;It=g();)H.push(It),H=H.concat(w());return l()?L({type:"page",selectors:U,declarations:H}):c("@page missing '}'")}}function V(){var L=r(),R=f(/^@([-\w]+)?document *([^{]+)/);if(R){var U=de(R[1]),H=de(R[2]);if(!u())return c("@document missing '{'");var It=w().concat(d());return l()?L({type:"document",document:H,vendor:U,rules:It}):c("@document missing '}'")}}function W(){var L=r(),R=f(/^@font-face\s*/);if(R){if(!u())return c("@font-face missing '{'");for(var U=w(),H;H=g();)U.push(H),U=U.concat(w());return l()?L({type:"font-face",declarations:U}):c("@font-face missing '}'")}}var et=mt("import"),Z=mt("charset"),Gt=mt("namespace");function mt(L){var R=new RegExp("^@"+L+"\\s*([^;]+);");return function(){var U=r(),H=f(R);if(H){var It={type:L};return It[L]=H[1].trim(),U(It)}}}function kt(){if(s[0]=="@")return E()||F()||B()||C()||et()||Z()||Gt()||V()||$()||I()||W()}function Ot(){var L=r(),R=b();return R?(w(),L({type:"rule",selectors:R,declarations:v()})):c("selector missing")}return mo(h())}function de(s){return s?s.replace(/^\s+|\s+$/g,""):""}function mo(s,t){var e=s&&typeof s.type=="string",n=e?s:t;for(var i in s){var r=s[i];Array.isArray(r)?r.forEach(function(o){mo(o,n)}):r&&typeof r=="object"&&mo(r,n)}return e&&Object.defineProperty(s,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),s}let Fy=class extends lo{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=fo(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),go(this.currentItem.style,this.currentItem,yo)}switch(this.processAttrs(e,n),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&go(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+po(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if(yo.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&go(o,this.currentItem,yo),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}};function po(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return po(s,t,i,r)-po(e,n,i,r)}function go(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),c=a[0].replace(i,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(i,""))}}const yo=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class St{startPathX=0;startPathY=0;prevPathX=0;prevPathY=0;normalizedLines=[];constructor(t){const e=typeof t=="string"?Pu(t):t||[],n=zy(Mu(e));let i=!1;for(let r=0,o=n.length;r<o;r++){const a=n[r];a[0]=="M"?(i||(i=!0,this.startPathX=a[1],this.startPathY=a[2]),this.prevPathX=a[1],this.prevPathY=a[2]):this._appendLine(new yt({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],toX:a[5],toY:a[6]}))}}_appendLine(t){if(t instanceof ho){Cu(this.prevPathX,this.prevPathY,t.toX,t.toY,t.largeArcFlag,t.sweepFlag,t.rx,t.ry,t.xAxisRotate).forEach(h=>{const[u,l,d,f,p,w,x,b]=h;this.normalizedLines.push(new yt({x:this.prevPathX,y:this.prevPathY,c1x:d,c1y:f,c2x:p,c2y:w,toX:x,toY:b})),this.prevPathX=x,this.prevPathY=b});return}if(t instanceof yt){this.normalizedLines.push(t.clone()),this.prevPathX=t.toX,this.prevPathY=t.toY;return}let e,n,i,r,o,a;t instanceof ky?[e,n,i,r,o,a]=uo(this.prevPathX,this.prevPathY,t.cx,t.cy,t.toX,t.toY):[e,n,i,r,o,a]=jn(this.prevPathX,this.prevPathY,t.toX,t.toY),this.normalizedLines.push(new yt({x:this.prevPathX,y:this.prevPathY,c1x:e,c1y:n,c2x:i,c2y:r,toX:o,toY:a})),this.prevPathX=o,this.prevPathY=a}static fromPolymorphPoints(t){const e=new St;e.prevPathX=e.startPathX=t[0]||0,e.prevPathY=e.startPathY=t[1]||0;for(let n=2,i=t.length;n+5<i;n+=6)e._appendLine(new yt({c1x:t[n],c1y:t[n+1],c2x:t[n+2],c2y:t[n+3],toX:t[n+4],toY:t[n+5]}));return e}static fromLines(t){const e=new St;e.prevPathX=e.startPathX=t[0].x||0,e.prevPathY=e.startPathY=t[0].y||0;for(let n=0,i=t.length;n<i;n++)e._appendLine(t[n]);return e}clone(){return St.fromLines(this.normalizedLines)}toSVGPathData(){const t=[];t.push(["M",this.startPathX,this.startPathY]);for(let e=0,n=this.normalizedLines.length;e<n;e++)t.push(...this.normalizedLines[e].toSVGPathData());return t}toSVGPathD(){return Oy(this.toSVGPathData())}toCanvasContext(t){t.beginPath(),t.moveTo(this.startPathX,this.startPathY),this.normalizedLines.forEach(e=>{e.toCanvasContext(t)})}getBoundingClientRect(t=2){const e=[],n=[];if(this.normalizedLines.forEach(c=>{const h=c.getBoundingClientRect();e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Q(i,t),y:Q(r,t),width:Q(o-i,t),height:Q(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Q(e.x+e.width*.5,t),y:Q(e.y+e.height*.5,t)}}transform(t,e,n,i,r,o,a){const c=new _t;return c.translate(t,e),c.rotate(r,n,i),c.scale(o,a,n,i),c.isIdentity?this.clone():St.fromLines(this.normalizedLines.map(h=>{let u=h.x,l=h.y,d=h.c1x,f=h.c1y,p=h.c2x,w=h.c2y,x=h.toX,b=h.toY;return{x:u,y:l}=c.transformPoint({x:u,y:l}),{x:d,y:f}=c.transformPoint({x:d,y:f}),{x:p,y:w}=c.transformPoint({x:p,y:w}),{x,y:b}=c.transformPoint({x,y:b}),new yt({x:u,y:l,c1x:d,c1y:f,c2x:p,c2y:w,toX:x,toY:b})}))}getTotalLength(){return this.normalizedLines.reduce((t,e)=>t+=e.length(),0)}getPointAtLength(t){let e=0,n=0;const i=this.normalizedLines.length;for(let r=0;r<i;r++){const o=this.normalizedLines[r];if(n=o.length(),e+n>=t)return o.getPointAtSegmentLength(t-e);e+=n}return this.normalizedLines[i-1].getPointAtSegmentLength(n)}interpolate(t){const e=this.normalizedLines.length;if(e===0)return{x:0,y:0};if(e===1)return this.normalizedLines[0].interpolate(t);{let n=t*e,i=this.normalizedLines[0];if(n--,n>1)for(let r=1;r<e&&(i=this.normalizedLines[r],n>1);r++)n-=1;return i.interpolate(n)}}getSubPathD(t,e){if(this.getTotalLength()-e<1e-6)return this.getSubPathDAtLength(this,t);{const n=this.getSubPathDAtLength(this,e,1);return t?this.getSubPathDAtLength(n,t):n}}getSubPathDAtLength(t,e,n){let i=null,r=0;const o=new St;o.prevPathX=o.startPathX=t.startPathX,o.prevPathY=o.startPathY=t.startPathY;for(let a=0,c=this.normalizedLines.length;a<c;a++){const h=this.normalizedLines[a],u=h.length();if(r+u>e&&!i){const l=h.getPointAtSegmentLength(e-r);if(o._appendLine(new yt({c1x:l.start.x,c1y:l.start.y,c2x:l.m.x,c2y:l.m.y,toX:l.x,toY:l.y})),n)return o;i=o,o._appendLine(new yt({c1x:l.n.x,c1y:l.n.y,c2x:l.end.x,c2y:l.end.y,toX:h.x,toY:h.y})),r+=u;continue}r+=u,o._appendLine(h)}return o}closestPoint(t,e){const n=this.getTotalLength();let i={x:t,y:e},r=0,o=1/0,a=8;for(let h=0;h<=n;h+=a){const u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y);l<o&&(i=u,r=h,o=l)}for(a/=2;a>.5;){const h=r-a,u=this.getPointAtLength(h),l=(t-u.x)*(t-u.x)+(e-u.y)*(e-u.y),d=r+a,f=this.getPointAtLength(d),p=(t-f.x)*(t-f.x)+(e-f.y)*(e-f.y);h>=0&&l<o?(i=u,r=h,o=l):d<=n&&p<o?(i=f,r=d,o=p):a/=2}const c=this.getPointAtLength(r+(r===n?-.1:.1));return{point:i,rotation:r>=n?Qt(c.x,c.y,i.x,i.y):Qt(i.x,i.y,c.x,c.y),distance:Math.sqrt(o)}}getPolymorphPoints(){return[this.startPathX,this.startPathY].concat(this.normalizedLines.reduce((t,e)=>t.concat([e.c1x,e.c1y,e.c2x,e.c2y,e.toX,e.toY]),[]))}getPolymorphPointsPerimeter(){const t=this.getPolymorphPoints(),e=t.length;let n=t[e-2],i=t[e-1],r=0;for(let o=0;o<e;o+=6)r+=Te(t[o],t[o+1],n,i),n=t[o],i=t[o+1];return Math.floor(r)}getExpendedPolymorphPointsPathD(t){const e=this.getPolymorphPoints(),n=e.length;let i=t-n;const r=Math.ceil(t/n),o=[];o.push(["M",e[0],e[1]]);let a=2;for(;a+5<=n-1;){const c=e[a++],h=e[a++],u=e[a++],l=e[a++],d=e[a++],f=e[a++];o.push(["C",c,h,u,l,d,f]);let p=0;for(;p<r&&i>0;)o.push(["C",d,f,d,f,d,f]),i-=6,p++}return new St(o)}static getInterpolator(t,e){return n=>Math.abs(n-0)<Number.EPSILON?new St(t.toSVGPathD()):Math.abs(n-1)<Number.EPSILON?new St(e.toSVGPathD()):St.fromPolymorphPoints(Jl(t.getPolymorphPoints(),e.getPolymorphPoints(),n))}}const Iu=Ny("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Ny(s,t=10){const e={},n=s.split(",");for(let i=0;i<n.length;i+=2){const r="&"+n[i+1]+";",o=parseInt(n[i],t);e[r]="&#"+o+";"}return e["\\xa0"]=" ",e}function At(s,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)s=s.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return s}function Gs(s){let t,e;if(!s)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(s[t]);return t}function By(s){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[s]||t.start}function Yy(s){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[s]||t.alphabetic}const Wn={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"},lineDashOffset:{svgAttr:"stroke-dashoffset",canvas:0,svg:0,apply:"stroke"}};class wo{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const r=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);r&&(n.setAttribute("stop-color",At("rgb({r},{g},{b})",{r:r[1],g:r[2],b:r[3]})),n.setAttribute("stop-opacity",r[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}}class Du{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class qs{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500}){t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(Wn);for(let e=0,n=t.length;e<n;e++){const i=t[e];this[i]=Wn[i].canvas}}__getStyleState(){const t={},e=Object.keys(Wn);for(let n=0,i=e.length;n<i;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){const r=e[n];this[r]=t[r]}}__createElement(t,e={},n=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),r=Object.keys(e);n&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let o=0;o<r.length;o++){const a=r[o];i.setAttribute(a,e[a])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(r=>{r.setAttribute(t,"")}));const i=Object.keys(Wn);for(let r=0;r<i.length;r++){const o=Wn[i[r]],a=this[i[r]];if(o.apply){if(a instanceof Du){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const c=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[c]=c,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,At("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof wo)e.setAttribute(o.apply,At("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);if(h){e.setAttribute(o.svgAttr,At("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let u=parseFloat(h[4]);const l=this.globalAlpha;l!=null&&(u*=l),e.setAttribute(o.svgAttr+"-opacity",""+u)}}else{let c=o.svgAttr;if(i[r]==="globalAlpha"&&(c=t+"-"+o.svgAttr,e.getAttribute(c)))continue;c&&e.setAttribute(c,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const i=Object.keys(Iu);for(let r=0,o=i.length;r<o;r++){const a=i[r],c=Iu[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,c))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const i=this.__createElement("g");e.appendChild(i),this.__currentElement=i}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(At("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(At("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(At("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,i,r,o){this.__addTransform(At("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:i,e:r,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"&&t.setAttribute("d",this.__currentDefaultPath)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(At("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(At("L {x} {y}",this.__currentPosition)):this.__addPathCommand(At("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,i,r,o){this.__currentPosition={x:r,y:o},this.__addPathCommand(At("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:i,x:r,y:o}))}quadraticCurveTo(t,e,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(At("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:i}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,i,r){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(r<0)throw new Error("IndexSizeError: The radius provided ("+r+") is negative.");if(o===t&&a===e||t===n&&e===i||r===0){this.lineTo(t,e);return}const c=this.normalize([o-t,a-e]),h=this.normalize([n-t,i-e]);if(c[0]*h[1]===c[1]*h[0]){this.lineTo(t,e);return}const u=c[0]*h[0]+c[1]*h[1],l=Math.acos(Math.abs(u)),d=this.normalize([c[0]+h[0],c[1]+h[1]]),f=r/Math.sin(l/2),p=t+f*d[0],w=e+f*d[1],x=[-c[1],c[0]],b=[h[1],-h[0]],g=function(E){const C=E[0];return E[1]>=0?Math.acos(C):-Math.acos(C)},v=g(x),_=g(b);this.lineTo(p+x[0]*r,w+x[1]*r),this.arc(p,w,r,v,_)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,i){const r=this.__createElement("rect",{x:t,y:e,width:n,height:i},!0);this.__closestGroupOrSvg().appendChild(r),this.__currentElement=r,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],i=n.childNodes;for(let r=i.length-1;r>=0;r--)i[r]&&n.removeChild(i[r]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,i){if(t===0&&e===0&&n===this.width&&i===this.height){this.__clearCanvas();return}const r=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:i,fill:"#FFFFFF"},!0);r.appendChild(o)}createLinearGradient(t,e,n,i){const r=this.__createElement("linearGradient",{id:Gs(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(r),new wo(r,this)}createRadialGradient(t,e,n,i,r,o){const a=this.__createElement("radialGradient",{id:Gs(this.__ids),cx:i+"px",cy:r+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new wo(a,this)}__parseFont(){const e=/^\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[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,i){const r=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":r.family,"font-size":r.size,"font-style":r.style,"font-weight":r.weight,"text-decoration":r.decoration,x:e,y:n,"text-anchor":By(this.textAlign),"dominant-baseline":Yy(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(r,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,i,r,o){if(i===r)return;i=i%(2*Math.PI),r=r%(2*Math.PI),i===r&&(r=(r+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(r),c=e+n*Math.sin(r),h=t+n*Math.cos(i),u=e+n*Math.sin(i),l=o?0:1;let d=0,f=r-i;f<0&&(f+=2*Math.PI),o?d=f>Math.PI?0:1:d=f>Math.PI?1:0,this.lineTo(h,u),this.__addPathCommand(At("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:d,sweepFlag:l,endX:a,endY:c})),this.__currentPosition={x:a,y:c}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=Gs(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",At("url(#{id})",{id:n})),t.appendChild(i),this.__currentElement=i}drawImage(...t){let e=t[0],n,i,r,o,a=0,c=0,h,u,l,d,f,p,w,x;if(t.length===3)n=t[1],i=t[2],h=e.width,u=e.height,r=h,o=u;else if(t.length===5)n=t[1],i=t[2],r=t[3],o=t[4],h=e.width,u=e.height;else if(t.length===9)a=t[1],c=t[2],h=t[3],u=t[4],n=t[5],i=t[6],r=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const b=this.__closestGroupOrSvg();this.__currentElement;const g="translate("+n+", "+i+")";if(e instanceof qs){if(l=e.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(d=l.childNodes[0];d.childNodes.length;)x=d.childNodes[0].getAttribute("id"),this.__ids[x]=x,this.__SVGdefs.appendChild(d.childNodes[0]);if(f=l.childNodes[1],f){const v=f.getAttribute("transform");let _;v?_=v+" "+g:_=g,f.setAttribute("transform",_),b.appendChild(f)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",r),p.setAttribute("height",o),p.setAttribute("preserveAspectRatio","none"),(a||c||h!==e.width||u!==e.height)&&(w=this.__document.createElement("canvas"),w.width=r,w.height=o,w.getContext("2d")?.drawImage(e,a,c,h,u,0,0,r,o),e=w),p.setAttribute("transform",g),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),b.appendChild(p))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=Gs(this.__ids);let r;return n.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(r=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(r),this.__SVGdefs.appendChild(n)):t instanceof qs&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new Du(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}class bo{canvas;context;customContext;currentPath2D=new Path2D;path2Ds=[];currentMatrix=new DOMMatrix;hasSetCustomStrokeStyle=!1;hasSetCustomFillStyle=!1;constructor(t,e,n,i=!1){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),i&&(this.customContext=new qs({canvas:this.canvas,width:e||this.canvas.width,height:n||this.canvas.height}))}set lineWidth(t){this.hasSetCustomStrokeStyle=!0,this.context.lineWidth=t,this.customContext&&(this.customContext.lineWidth=t)}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.hasSetCustomStrokeStyle=!0,this.context.lineCap=t,this.customContext&&(this.customContext.lineCap=t)}get lineCap(){return this.context.lineCap}set lineJoin(t){this.hasSetCustomStrokeStyle=!0,this.context.lineJoin=t,this.customContext&&(this.customContext.lineCap=t)}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.hasSetCustomStrokeStyle=!0,this.context.lineDashOffset=t,this.customContext&&(this.customContext.lineDashOffset=t)}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.hasSetCustomStrokeStyle=!0,this.context.miterLimit=t,this.customContext&&(this.customContext.miterLimit=t)}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext&&(this.customContext.globalAlpha=t)}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){this.hasSetCustomFillStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext&&(this.customContext.fillStyle=t)):(this.context.fillStyle=t.gradient,this.customContext&&(this.customContext.fillStyle=t.gradientCustom))}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){this.hasSetCustomStrokeStyle=!0,typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext&&(this.customContext.strokeStyle=t)):(this.context.strokeStyle=t.gradient,this.customContext&&(this.customContext.strokeStyle=t.gradientCustom))}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext&&(this.customContext.font=t)}get font(){return this.context.font}set textBaseline(t){this.context.textBaseline=t,this.customContext&&(this.customContext.textBaseline=t)}get textBaseline(){return this.context.textBaseline}set textAlign(t){this.context.textAlign=t,this.customContext&&(this.customContext.textAlign=t)}get textAlign(){return this.context.textAlign}fill(t){return t?this.context.fill(t):(this.context.fill(),this.customContext&&this.customContext.fill()),this}fillRect(t,e,n,i){return this.context.fillRect(t,e,n,i),this.customContext&&this.customContext.fillRect(t,e,n,i),this}fillText(t,e,n,i){return this.hasSetCustomFillStyle=!1,this.context.fillText(t,e,n,i),this.customContext&&this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext&&this.customContext.setLineDash(t),this}stroke(t){return t?this.context.stroke(t):(this.context.stroke(),this.customContext&&this.customContext.stroke()),this}strokeText(t,e,n,i){return this.context.strokeText(t,e,n,i),this.customContext&&this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,i){return this.context.strokeRect(t,e,n,i),this.customContext&&this.customContext.strokeRect(t,e,n,i),this}measureText(t){return this.context.measureText(t)}clearRect(t=0,e=0,n=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,n,i),this.customContext&&this.customContext.clearRect(t,e,n,i),this}save(){return this.context.save(),this.customContext&&this.customContext.save(),this.currentMatrix=new DOMMatrix,this.path2Ds.push(this.currentPath2D),this.currentPath2D=new Path2D,this}restore(){return this.context.restore(),this.customContext&&this.customContext.restore(),this.hasSetCustomStrokeStyle=!1,this.hasSetCustomFillStyle=!1,this.currentMatrix=new DOMMatrix,this.currentPath2D=this.path2Ds.pop()||new Path2D,this}beginPath(){return this.context.beginPath(),this.customContext&&this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext&&this.customContext.closePath(),this.currentPath2D.closePath(),this}changePath2D(t=this.currentPath2D,e=this.currentMatrix){const n=new Path2D;n.addPath(t,e),this.currentPath2D=n}isPointInStroke(...t){return t[0]instanceof Path2D?this.context.isPointInStroke(t[0],t[1],t[2]):this.context.isPointInStroke(t[0],t[1])}isPointInPath(...t){return t[0]instanceof Path2D?this.context.isPointInPath(t[0],t[1],t[2]):this.context.isPointInPath(t[0],t[1])}translate(t,e){return this.context.translate(t,e),this.customContext&&this.customContext.translate(t,e),this.currentMatrix.translate(t,e),this.changePath2D(),this}rotate(t,e=0,n=0){return this.translate(e,n),this.context.rotate(t),this.customContext&&this.customContext.rotate(t),this.currentMatrix.rotate(t),this.translate(-e,-n),this.changePath2D(),this}scale(t,e=t,n=0,i=0){return this.translate(n,i),this.context.scale(t,e),this.customContext&&this.customContext.scale(t,e),this.currentMatrix.scale(t,e),this.translate(-n,-i),this.changePath2D(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext&&this.customContext.moveTo(t,e),this.currentPath2D.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext&&this.customContext.lineTo(t,e),this.currentPath2D.lineTo(t,e),this}arc(t,e,n,i,r,o){return this.context.arc(t,e,n,i,r,o),this.customContext&&this.customContext.arc(t,e,n,i,r,o?-1:1),this.currentPath2D.arc(t,e,n,i,r,o),this}arcTo(t,e,n,i,r){return this.context.arcTo(t,e,n,i,r),this.customContext&&this.customContext.arcTo(t,e,n,i,r),this.currentPath2D.arcTo(t,e,n,i,r),this}ellipse(t,e,n,i,r,o,a,c){return this.context.ellipse(t,e,n,i,r,o,a,c),this.currentPath2D.ellipse(t,e,n,i,r,o,a,c),this}quadraticCurveTo(t,e,n,i){return this.context.quadraticCurveTo(t,e,n,i),this.customContext&&this.customContext.quadraticCurveTo(t,e,n,i),this.currentPath2D.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,o){return this.context.bezierCurveTo(t,e,n,i,r,o),this.customContext&&this.customContext.bezierCurveTo(t,e,n,i,r,o),this.currentPath2D.bezierCurveTo(t,e,n,i,r,o),this}rect(t,e,n,i){return this.context.rect(t,e,n,i),this.customContext&&this.customContext.rect(t,e,n,i),this.currentPath2D.rect(t,e,n,i),this}createLinearGradient(t,e,n,i,r){const o=this.context.createLinearGradient(t,e,n,i);return r&&Object.entries(r).forEach(([a,c])=>{o.addColorStop(parseFloat(a),c)}),o}createRadialGradient(t,e,n,i,r,o,a){const c=this.context.createRadialGradient(t,e,n,i,r,o);return a&&Object.entries(a).forEach(([h,u])=>{c.addColorStop(parseFloat(h),u)}),c}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],i=e[1];this.context.drawImage(t,n,i)}else if(e.length===4){const n=e[0],i=e[1],r=e[2],o=e[3];this.context.drawImage(t,n,i,r,o)}else if(e.length===8){const n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],c=e[5],h=e[6],u=e[7];this.context.drawImage(t,n,i,r,o,a,c,h,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext&&this.customContext.drawImage(t,...e),this}getImageData(t=0,e=0,n=this.canvas.width,i=this.canvas.height,r){return this.context.getImageData(t,e,n,i,r)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}createPattern(t,e){return this.context.createPattern(t,e)}toRawSVG(){if(this.customContext){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}else return{raw:"",element:null}}}const Jn={1:705234,2:8108026,3:6346665,4:16630114,5:16607842,6:16158139,7:2542847,8:10640125,9:16735870,10:8978266,11:16580418,12:16754221,13:16725759,14:14436630,15:6844849,16:13744437,17:1817755,18:16744272,19:4964291,20:16750848,d:14540253,aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};class Vt{_color={r:0,g:0,b:0,a:1};constructor(t,e){t&&this.setColor(t),this.setAlpha(e)}get color(){return this._color}set color(t){const e=`Color: Unknown color(${t}) type(${typeof t})`;if(typeof t=="number")this.setHEX(t);else if(typeof t=="string"){let n;if(n=/^(\w+)\(([^)]*)\)/.exec(t)){const i=n[2];let r;switch(n[1]){case"rgb":case"rgba":(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=parseInt(r[1],10),this.g=parseInt(r[2],10),this.b=parseInt(r[3],10),this.a=r[4]?parseFloat(r[4]):1):(r=/^\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?(this.r=N(parseFloat(r[1]),0,100)*255/100,this.g=N(parseFloat(r[2]),0,100)*255/100,this.b=N(parseFloat(r[3]),0,100)*255/100,this.a=r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsl":case"hsla":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;case"hsv":case"hsva":case"hsb":case"hsba":(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)%\s*,\s*(\d*\.?\d+)%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))?this.setHSV(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,r[4]?parseFloat(r[4]):1):console.warn(e);break;default:console.warn(e)}}else if(n=/#([A-Fa-f0-9]+)/.exec(t)){const i=n[1],r=i.length;r===3?this.setRGB(parseInt(i.charAt(0),16),parseInt(i.charAt(1),16),parseInt(i.charAt(2),16),1):r===6||r===8?this.setHEX(parseInt(i,16)):console.warn(e)}else if(t&&t.length>0)try{this.setColorName(t)}catch{console.warn(e)}else console.warn(e)}else t instanceof Vt?this.setRGB(t.r,t.g,t.b,t.a):Object.prototype.hasOwnProperty.call(t,"r")&&Object.prototype.hasOwnProperty.call(t,"g")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setRGB(t.r,t.g,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"l")?this.setHSL(t.h,t.s,t.l,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"v")?this.setHSV(t.h,t.s,t.v,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):Object.prototype.hasOwnProperty.call(t,"h")&&Object.prototype.hasOwnProperty.call(t,"s")&&Object.prototype.hasOwnProperty.call(t,"b")?this.setHSV(t.h,t.s,t.b,Object.prototype.hasOwnProperty.call(t,"a")?t.a:1):console.warn(e)}setColor(t){return this.color=t,this}set(t){return this.setColor(t)}get r(){return this._color.r}set r(t){try{this._color.r=N(Math.round(Ht(t)),0,255)}catch{}}get g(){return this._color.g}set g(t){try{this._color.g=N(Math.round(Ht(t)),0,255)}catch{}}get b(){return this._color.b}set b(t){try{this._color.b=N(Math.round(Ht(t)),0,255)}catch{}}get a(){return this._color.a}set a(t){try{this._color.a=N(Ht(t),0,1)}catch{}}setAlpha(t){return this.a=t,this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,n=this.g,i=this.b,r=t.value;return this.r=r[0]*e+r[3]*n+r[6]*i,this.g=r[1]*e+r[4]*n+r[7]*i,this.b=r[2]*e+r[5]*n+r[8]*i,this}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}toRGBString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${Q(this.a,6)})`}toHexString(){return this.a===1?("000000"+this.hex.toString(16)).slice(-6):("00000000"+this.hex.toString(16)).slice(-8)}toString(){return this.a===1?"#"+this.toHexString():this.toRGBString()}toColorSpaceString(t=je){_o.fromWorkingColorSpace(me.copy(this),t);const e=me.r,n=me.g,i=me.b;return t!==je?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:this.toRGBString()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b,yield this.a}clone(){return new Vt(this.color)}copy(t){return this.setColor(t.color),this}copySRGBToLinear(t){return this.r=Ge(t.r),this.g=Ge(t.g),this.b=Ge(t.b),this}copyLinearToSRGB(t){return this.r=qe(t.r),this.g=qe(t.g),this.b=qe(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}add(t){return this.r=this.r+t.r,this.g=this.g+t.g,this.b=this.b+t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r=this.r+t,this.g=this.g+t,this.b=this.b+t,this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}sub(t){return this.r=this.r-t.r,this.g=this.g-t.g,this.b=this.b-t.b,this}multiply(t){return this.r=this.r*t.r,this.g=this.g*t.g,this.b=this.b*t.b,this}multiplyScalar(t){return this.r=this.r*t,this.g=this.g*t,this.b=this.b*t,this}opposite(t=!0,e="#000000",n="#ffffff"){if(t)return this.setColor(this.r*.299+this.g*.587+this.b*.114>186?e:n);{const{r:i,g:r,b:o}=this.color;return this.r=255-i,this.g=255-r,this.b=255-o,this}}lighten(t){t=N(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e+(255-e)*t,this.g=n+(255-n)*t,this.b=i+(255-i)*t,this}darken(t){t=N(t,0,1);const{r:e,g:n,b:i}=this.color;return this.r=e*(1-t),this.g=n*(1-t),this.b=i*(1-t),this}lerp(t,e){e=N(e,0,1);const{r:n,g:i,b:r}=this.color;return this.r=n+(t.r-n)*e,this.g=i+(t.g-i)*e,this.b=r+(t.b-r)*e,this}lerpColors(t,e,n){return n=N(n,0,1),this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}static gradient(t,e,n){try{return me.lerpColors(new Vt(t),new Vt(e),n).toString()}catch{return e}}static random(){return me.setHEX(Math.random()*16777215).toString()}static nextIndex=0;static next(t=Vt.nextIndex){Vt.nextIndex=t;const e=Object.keys(Jn),n=e.length;return me.setHEX(Jn[e[Vt.nextIndex++%n]]).toString()}setColorName(t){const e=Jn[t.toLowerCase()];return e!==void 0?this.setHEX(e):t==="none"?this.a=0:(this.a=1,console.warn("Color.setColorName: Unknown color "+t)),this}static getColors(){return Object.values(Jn).map(t=>me.setHEX(t).toString())}setRGB(t,e,n,i=1){return this.r=t,this.g=e,this.b=n,this.a=i,this}get rgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}setHEX(t){return t=Math.floor(t),t<16777216?(this.r=t>>16&255,this.g=t>>8&255,this.b=t&255,this.a=1):(this.r=t>>24&255,this.g=t>>16&255,this.b=t>>8&255,this.a=(t&255)/255),this}get hex(){let t=(this.r<<16)+(this.g<<8)+this.b;return this.a!==1&&(t=t<<8,t+=Math.round(this.a*255)),t}setHSL(t,e,n,i=1){const r=Wl(t,1),o=N(e,0,1),a=N(n,0,1);if(o===0)this.r=a*255,this.g=a*255,this.b=a*255;else{const c=a<=.5?a*(1+o):a+o-a*o,h=2*a-c;this.r=So(h,c,r+.3333333333333333)*255,this.g=So(h,c,r)*255,this.b=So(h,c,r-.3333333333333333)*255}return this.a=i,this}getHSL(t){const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i)/255,o=Math.min(e,n,i)/255;let a,c;const h=(o+r)/2;if(o===r)a=0,c=0;else{const u=r-o;switch(c=h<=.5?u/(r+o):u/(2-r-o),r){case e:a=(n-i)/u+(n<i?6:0);break;case n:a=(i-e)/u+2;break;case i:default:a=(e-n)/u+4;break}a/=6}return t&&t.setHSL(a,c,h,this.a),{h:a,s:c,l:h,a:this.a}}offsetHSL(t,e,n){const i=this.getHSL();return this.setHSL(i.h+t,i.s+e,i.l+n)}lerpHSL(t,e){const n=this.getHSL(),i=t.getHSL(),r=as(n.h,i.h,e),o=as(n.s,i.s,e),a=as(n.l,i.l,e);return this.setHSL(r,o,a),this}setHSV(t,e,n,i=1){const r=N(t,0,1)*360,o=N(e,0,1),a=N(n,0,1),c=Math.floor(r/60)%6,h=r/60-Math.floor(r/60),u=a*(1-o),l=a*(1-h*o),d=a*(1-(1-h)*o),f=[[a,d,u],[l,a,u],[u,a,d],[u,l,a],[d,u,a],[a,u,l]][c];return this.r=f[0]*255,this.g=f[1]*255,this.b=f[2]*255,this.a=i,this}setHSB(t,e,n,i=1){this.setHSV(t,e,n,i)}getHSV(t){const{r:e,g:n,b:i,a:r}=this.color,o=Math.max(e,n,i),a=Math.min(e,n,i),c=o-a;let h;e===o?h=(n-i)/c:n===o?h=2+(i-e)/c:h=4+(e-n)/c,h/=6,h<0&&(h+=1);const u=c==0?0:h,l=o===0?0:c/o,d=o/255;return t&&t.setHSV(u,l,d,r),{h:u,s:l,v:d,a:r}}getHSB(t){const{h:e,s:n,v:i,a:r}=this.getHSV(t);return{h:e,s:n,b:i,a:r}}}const me=new Vt;function Ge(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function qe(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}const Ru="",je="srgb",xo="srgb-linear",vo="linear",js="srgb",Lu=new hn().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Ou=new hn().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),zu=[.64,.33,.3,.6,.15,.06],Fu=[.2126,.7152,.0722],Nu=[.3127,.329],_o={enabled:!0,workingColorSpace:xo,spaces:{},convert:function(s,t,e){return this.enabled===!1||t===e||!t||!e||(this.spaces[t].transfer===js&&(s.r=Ge(s.r),s.g=Ge(s.g),s.b=Ge(s.b)),this.spaces[t].primaries!==this.spaces[e].primaries&&(s.applyMatrix3(this.spaces[t].toXYZ),s.applyMatrix3(this.spaces[e].fromXYZ)),this.spaces[e].transfer===js&&(s.r=qe(s.r),s.g=qe(s.g),s.b=qe(s.b))),s},fromWorkingColorSpace:function(s,t){return this.convert(s,this.workingColorSpace,t)},toWorkingColorSpace:function(s,t){return this.convert(s,t,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Ru?vo:this.spaces[s].transfer},getLuminanceCoefficients:function(s,t=this.workingColorSpace){return s.fromArray(this.spaces[t].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,t,e){return s.copy(this.spaces[t].toXYZ).multiply(this.spaces[e].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}};_o.define({[xo]:{primaries:zu,whitePoint:Nu,transfer:vo,toXYZ:Lu,fromXYZ:Ou,luminanceCoefficients:Fu,workingColorSpaceConfig:{unpackColorSpace:je},outputColorSpaceConfig:{drawingBufferColorSpace:je}},[je]:{primaries:zu,whitePoint:Nu,transfer:js,toXYZ:Lu,fromXYZ:Ou,luminanceCoefficients:Fu,outputColorSpaceConfig:{drawingBufferColorSpace:je}}});function So(s,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<.16666666666666666?s+(t-s)*6*e:e<.5?t:e<.6666666666666666?s+(t-s)*6*(.6666666666666666-e):s}class ft{id;d;parent;attrs;_centerX;_centerY;_x;_y;_degree;_scaleX;_scaleY;vx;vy;ax;ay;mass;show;followMouse;drag;transform$=new Mn;isMouseIn=!1;isDragging=!1;el;constructor(t){this.id=rs(),this.d=t?.d,this.attrs={stroke:"none",fill:"none"},t?.attrs&&this.setAttr(t?.attrs),this._centerX=t?.centerX,this._centerY=t?.centerY,this._x=t?.x||0,this._y=t?.y||0,this._degree=t?.degree||0,this._scaleX=1,this._scaleY=1,t?.scale!==void 0&&(this._scaleX=t.scale,this._scaleY=t.scale),t?.scaleX!==void 0&&(this._scaleX=t.scaleX),t?.scaleY!==void 0&&(this._scaleY=t.scaleY),this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||1,this.show=typeof t?.show=="boolean"?t?.show:!0,this.followMouse=typeof t?.followMouse=="boolean"?t?.followMouse:!1,this.drag=t?.drag}destroy(){}moveTo(t,e){const n=this._x,i=this._y;(n!==t||i!==e)&&(this._x=t,this._y=e,this.transform$.next({dx:t-n,dy:e-i}))}move(t,e=0){this.moveTo(this._x+t,this._y+e)}moveXTo(t){this.moveTo(t,this._y)}moveX(t){this.moveTo(this._x+t,this._y)}moveYTo(t){this.moveTo(this._x,t)}moveY(t){this.moveTo(this._x,this._y+t)}get x(){return this._x}set x(t){this._x=t}get y(){return this._y}set y(t){this._y=t}rotateTo(t){this._degree=t}rotate(t){this.rotateTo(this._degree+t)}get degree(){return this._degree}set degree(t){this._degree=t}scaleTo(t,e){this._scaleX=t,this._scaleY=e||t}scale(t,e){this.scaleTo(this._scaleX*t,this._scaleY*(e||t))}get scaleX(){return this._scaleX}set scaleX(t){this._scaleX=t}get scaleY(){return this._scaleY}set scaleY(t){this._scaleY=t}pathD(){return this.d?(this.d instanceof St||(this.d=new St(this.d)),this.d):new St(this.toSVGPathData())}forcePathD(t){this.d=t}getBaseOptions(){return{d:this.d,attrs:this.getAttrs(),centerX:this._centerX,centerY:this._centerY,x:this._x,y:this._y,degree:this._degree,scaleX:this._scaleX,scaleY:this._scaleY,vx:this.vx,vy:this.vy,ax:this.ax,ay:this.ay,mass:this.mass,followMouse:this.followMouse,drag:this.drag}}clone(){const t=this.cloneShape();return this.parent&&(t.parent={...this.parent}),t}cloneShape(){return new ft(this.getBaseOptions())}toSVGPathData(){return[]}toSVGPathD(){return this.pathD().toSVGPathD()}toCanvasContext(t){this.pathD().toCanvasContext(t)}getBoundingClientRect(t=2){return this.pathD().getBoundingClientRect(t)}getBoundingClientRectCenter(t=2){return this.pathD().getBoundingClientRectCenter(t)}transformOrigin(t=!1,e=2){let n=this._centerX||0,i=this._centerY||0;if(typeof this._centerX>"u"&&typeof this._centerY>"u"){const r=this.getBoundingClientRectCenter(e);if(t||!this.parent)n=r.x,i=r.y;else{const o=this.parent.combo.getBoundingClientRectCenter(e);n=o.x-this.parent.dx,i=o.y-this.parent.dy}}return{x:n,y:i}}isPointInPath(t,e,n){if(t instanceof bo)return t.isPointInPath(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInFill({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}isPointInStroke(t,e,n){if(t instanceof bo)return t.isPointInStroke(new Path2D(this.toSVGPathD()),e,n);if(this.el instanceof SVGGeometryElement){const i=this.el.getCTM();if(i){const r=i.inverse();return this.el.isPointInStroke({x:r.a*e+r.c*n+r.e,y:r.b*e+r.d*n+r.f})}}return!1}setAttr(t,e){if(typeof t!="string")for(const n in t){const i=t[n];i&&(this.attrs[bt(n)]=i)}else e&&(this.attrs[bt(t)]=e)}getAttr(t,e){return this.attrs[t]||this.attrs[bt(t)]||e}hasAttr(t){return!!this.getAttr(t)}getAttrs(){return{...this.attrs}}animate(t){this.vx+=this.ax,this.vy+=this.ay;const e=t?.gravity||0;this.vy+=e;const n=t?.friction||1;this.vx*=n,this.vy*=n,this.moveTo(this.x+this.vx,this.y+this.vy)}animateEaseTo(t,e){const n=e?.easing||.05,i=t.x-this.x,r=t.y-this.y;this.vx=i*n,this.vy=r*n,this.animate(e)}animateSpringTo(t,e){const n=e?.spring||.03;(Array.isArray(t)?t:[t]).forEach(i=>{const r=i.x-this.x,o=i.y-this.y,a=r*n,c=o*n;this.vx+=a,this.vy+=c}),this.animate({friction:.9,...e})}animateSpringMassTo(t,e){const n=e?.springLength||100,i=e?.spring||1e-4,r=t.x-this.x,o=t.y-this.y,a=Math.sqrt(r*r+o*o);if(a<n){const c=r*i,h=o*i;return this.vx+=c/this.mass,this.vy+=h/this.mass,t.vx-=c/t.mass,t.vy-=h/t.mass,1-a/n}return 0}distance(t){return Te(this.x,this.y,t.x,t.y)}rotateToTarget(t){this.rotateTo(Pt(Qt(this.x,this.y,t.x,t.y)))}followTo(t,e=3){this.rotateToTarget(t);const{dx:n,dy:i}=cn(J(this.degree),e);this.vx=n,this.vy=i,this.animate()}followAccelerationTo(t,e=.05){this.rotateToTarget(t);const{dx:n,dy:i}=cn(J(this.degree),e);this.ax=n,this.ay=i,this.animate()}gravitateTo(t){const e=t.x-this.x,n=t.y-this.y,i=e*e+n*n,r=Math.sqrt(i),o=this.mass*t.mass/i,a=o*e/r,c=o*n/r;this.vx+=a/this.mass,this.vy+=c/this.mass,t.vx-=a/t.mass,t.vy-=c/t.mass}checkCollision(t){}checkWall(t){}getTotalLength(){return this.pathD().getTotalLength()}interpolate(t){return this.pathD().interpolate(t)}getPointAtLength(t){return this.pathD().getPointAtLength(t)}trailPath(t=0){const e=this.getTotalLength();return{subPathD:this.pathD().getSubPathD(0,t*e),point:this.getPointAtLength(t*e)}}strokeDashTween(t=1e3,e){const n=Q(this.pathD().getTotalLength(),0);this.setAttr({strokeDasharray:`${n} ${n}`,strokeDashoffset:`${n}`});const i=e?.onUpdate,r=new Rn({frameDuration:t});r.addTween({offset:n},{offset:0},Object.assign(e||{},{onUpdate:(o,a)=>{this.setAttr("strokeDashoffset",""+Q(o.offset,2)),i?.(o,a)}})),r.play()}}class Ut{options;commonChildShapeOptions;shapes=[];x=0;y=0;degree=0;scaleX=1;scaleY=1;constructor(t,e){if(this.options=t,this.commonChildShapeOptions=e,t?.svg){let n=0,i=0,r=0,o=0;const a=new Fy(t.svg).parse();for(let c=0,h=a.length;c<h;c++){const u=a[c];if(u.type=="viewbox"&&u.width&&u.height){if(n=parseFloat(u.width),i=parseFloat(u.height),t.forceWidth){const w=n/i;r=t.forceWidth,o=r/w}else r=n,o=i;continue}if(u.type!="path"||!Eu(u.path))continue;const l={};for(const w in u)w==="type"||w==="path"||w==="transform"||(l[w]=u[w]);const d=Mu(Pu(u.path)),f=[];let p=[];for(let w=0,x=d.length;w<x;w++){const b=d[w];p.push(b),b[0].toLowerCase()=="z"&&(f.push(p),p=[])}p.length&&f.push(p),f.forEach(w=>{const x=new ft({...e,d:w,attrs:{...e?.attrs,...l}});if(u.transform){const g=Yr(u.transform).split();x.moveTo(g.x,g.y),x.rotateTo(g.degree),x.scaleTo(g.scaleX,g.scaleY)}r&&n&&o&&i&&x.scaleTo(x.scaleX*(r/n),x.scaleY*(o/i)),this.addShape(x)})}}}destroy(){this.shapes.forEach(t=>t.destroy())}clone(){const t=this.cloneShapeCombo();return t.x=this.x,t.y=this.y,t.degree=this.degree,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.shapes=this.shapes.map(e=>{const n=e.clone();return n.parent&&(n.parent.combo=t),n}),t}cloneShapeCombo(){return new Ut(this.options,this.commonChildShapeOptions)}addShape(t,e=0,n=0){t.parent={combo:this,dx:e||t.x,dy:n||t.y},this.shapes.push(t)}comboMove(t,e){this.x+=t,this.y+=e,this.shapes.forEach(n=>{n.move(t,e)})}comboRotate(t){this.degree+=t,this.shapes.forEach(e=>{e.rotate(t)})}comboScale(t,e){this.scaleX*=t,this.scaleY*=e||t,this.shapes.forEach(n=>{n.scale(t,e)})}comboTransform(t){(typeof t?.x=="number"||typeof t?.y=="number")&&this.comboMove(t?.x||0,t?.y||0),typeof t?.degree=="number"&&this.comboRotate(t?.degree||0),(typeof t?.scale=="number"||typeof t?.scaleX=="number"||typeof t?.scaleY=="number")&&this.comboScale(t?.scaleX||t?.scale||1,t?.scaleY||t?.scale||1)}getBoundingClientRect(t=2){const e=[],n=[];if(this.shapes.forEach(c=>{const h=c.getBoundingClientRect(t);e.push(h.x,h.x+h.width),n.push(h.y,h.y+h.height)}),e.length==0||n.length==0)return{x:0,y:0,width:0,height:0,center:{x:0,y:0}};const i=Math.min(...e),r=Math.min(...n),o=Math.max(...e),a=Math.max(...n);return{x:Q(i,t),y:Q(r,t),width:Q(o-i,t),height:Q(a-r,t)}}getBoundingClientRectCenter(t=2){const e=this.getBoundingClientRect(t);return{x:Q(e.x+e.width*.5,t),y:Q(e.y+e.height*.5,t)}}setAttr(t,e){typeof t!="string"?this.shapes.forEach(n=>{n.setAttr(t)}):e&&this.shapes.forEach(n=>{n.setAttr(t,e)})}sort(){this.shapes=this.shapes.map(t=>({shape:t,perimeter:t.pathD().getPolymorphPointsPerimeter()})).sort((t,e)=>e.perimeter-t.perimeter).map(t=>t.shape)}expendTo(t){const e=t.shapes.length,n=this.shapes.length;if(e<n)return t.expendTo(this);for(let i=n;i<e;i++)this.addShape(t.shapes[i].clone())}strokeDashTween(t,e){const n=this.shapes.length-1;switch(e?.type){case"sequence":this.shapes.forEach((a,c)=>{a.strokeDashTween(t,{...e,delay:c,onStart:()=>{c==0&&e?.onGroupStart?.()},onUpdate:()=>{e?.onGroupUpdate?.()},onComplete:()=>{c==n&&e?.onGroupComplete?.()}})});break;case"parallel":default:const i=new Rn({frameDuration:t}),r={},o={};this.shapes.forEach((a,c)=>{const h=Q(a.getTotalLength(),0);r[`offset_${c}`]=h,o[`offset_${c}`]=0,a.setAttr({strokeDasharray:`${h} ${h}`,strokeDashoffset:`${h}`})}),i.addTween(r,o,Object.assign(e||{},{onStart:()=>{e?.onGroupStart?.()},onUpdate:(a,c)=>{for(const h in a){const u=Kl(h).number;this.shapes[u].setAttr("strokeDashoffset",""+Q(a[h],2))}e?.onGroupUpdate?.()},onComplete:()=>{e?.onGroupComplete?.()}})),i.play();break}}}function Uy(s,t){s.forEach(n=>{n.animate(),t?.wall&&n.checkWall({wall:t.wall,bounce:t.bounce})});const e=s.length;for(let n=0,i=e-1;n<i;n++)for(let r=n+1;r<e;r++)s[n].checkCollision(s[r])}function Xy(s){const t=s.length;s.forEach((e,n)=>{e.animate();for(let i=n+1;i<t;i++)e.checkCollision(s[i]),e.gravitateTo(s[i])})}function $y(s,t){s.forEach((e,n)=>{n>0&&e.animateSpringTo(s[n-1],t)})}function Vy(s,t){const e=t?.springLength||100;s.forEach(n=>{n.isDragging||s.filter(i=>i.id!==n.id).forEach(i=>{const r=Qt(n.x,n.y,i.x,i.y);n.animateSpringTo({x:i.x-Math.cos(r)*e,y:i.y-Math.sin(r)*e},t)})})}function Gy(s,t,e){const n=s.length,i=[];return s.forEach((r,o)=>{r.animate(e),r.x>t.x+t.width?r.moveXTo(t.x):r.x<t.x&&r.moveXTo(t.x+t.width),r.y>t.y+t.height?r.moveYTo(t.y):r.y<t.y&&r.moveYTo(t.y+t.height);for(let a=o+1;a<n;a++)i.push([r.x,r.y,s[a].x,s[a].y,r.animateSpringMassTo(s[a],e)])}),i}function Co(s){if(s.length<2)throw new Error("shapes个数必须大于等于2");const t=s.length-1,e=new Array(t);for(let n=0;n<t;n++){const i=s[n].pathD(),r=s[n+1].pathD(),o=Math.max(i.getPolymorphPoints().length,r.getPolymorphPoints().length);e[n]=St.getInterpolator(i.getExpendedPolymorphPointsPathD(o),r.getExpendedPolymorphPointsPathD(o))}return n=>{const i=Q(t*n,6),r=Math.min(Math.floor(i),t-1),o=Q(i-r,6),a=new ft({d:e[r](o)}),c=s[r].getAttr("fill","none"),h=s[r+1].getAttr("fill","none");typeof c=="string"&&typeof h=="string"&&a.setAttr("fill",Vt.gradient(c,h,o).toString());const u=s[r].getAttr("stroke","none"),l=s[r+1].getAttr("stroke","none");return typeof u=="string"&&typeof l=="string"&&a.setAttr("stroke",Vt.gradient(u,l,o).toString()),a}}function Bu(s){if(s.length<2)throw new Error("shapeCombos个数必须大于等于2");let t=0,e;const n=[];s.forEach(o=>{let a;o instanceof Ut?(a=o,a.sort()):(a=new Ut,a.addShape(o)),n.push(a),t<a.shapes.length&&(t=a.shapes.length,e=a)}),n.forEach(o=>{o!==e&&o.expendTo(e)});const i=[];n.forEach((o,a)=>{o.shapes.forEach((c,h)=>{i[h]=i[h]||[],i[h][a]=c})});const r=[];return i.forEach(o=>{r.push(Co(o))}),o=>{const a=new Ut;return r.forEach(c=>{a.addShape(c(o))}),a}}function qy(s,t=6e3,e){const n=s.findIndex(a=>a instanceof Ut)>=0?Bu(s):Co(s),i=n(0),r=e?.onUpdate,o=new Rn({frameDuration:t});o.addTween({t:0},{t:1},Object.assign(e||{},{onUpdate:(a,c)=>{n(a.t),r?.(a,c),i instanceof ft?e?.shape?.(i):i instanceof Ut&&i.shapes.forEach(h=>{e?.shape?.(h)})}})),o.play()}function jy(s,t,e,n,i){if(i==0)throw new Error("no dividing by zero, please");const r=[],o=360/i;for(let c=0;c<i;c+=1){const h=o*c*Math.PI/180,u=s+2*e*Math.cos(h),l=t+2*e*Math.sin(h);r.push(new ho({x:s,y:t,rx:e,ry:n,xAxisRotate:o*c,largeArcFlag:1,sweepFlag:1,toX:u,toY:l})),r.push(new ho({x:u,y:l,rx:e,ry:n,xAxisRotate:o*c,largeArcFlag:1,sweepFlag:1,toX:s,toY:t}))}return new ft({d:St.fromLines(r)})}function Hy(s=document.documentElement,t="canvas"){Vh(s);let e=null,n=null,i=null;t=="svg"&&(e=Tu("svg"),Vn(s,e)),t=="canvas"&&(n=Hh("canvas"),Vn(s,n));const r={x:0,y:0,width:0,height:0},o=ao(s).subscribe(x=>{r.x=x.x,r.y=x.y,r.width=x.width,r.height=x.height,e&&$e(e,{viewBox:`0 0 ${r.width} ${r.height}`,width:`${r.width}`,height:`${r.height}`}),n&&($e(n,{width:`${r.width}`,height:`${r.height}`}),i=new bo(n,r.width,r.height,!1))}),a=[];let c="",h="",u="default";const l=(x="default")=>{x!=u&&(s.style.cursor=x,u=x)},d=Ve(),f=du(e||n||s,{useMousePoint:d}).subscribe(()=>{}),p=x=>{x.followMouse&&(!ga(x.x,d.current.x,5)||!ga(x.y,d.current.y,5))&&x.followTo(d.current),x.drag&&x.drag.enable&&x.drag.targetToAfterDrop&&(x.isDragging||x.animateEaseTo(x.drag.targetToAfterDrop,{easing:x.drag.easing}))},w=(...x)=>{const b=[];x.forEach(g=>{g instanceof Ut?b.push(...g.shapes):b.push(g)}),e&&a.filter(g=>b.findIndex(v=>v.id==g.id)==-1).forEach(g=>{g.el&&(g.el.remove(),delete g.el)}),i&&i.clearRect(),jl(a,b),c="",d.current.isDown||(h="");for(const g of a){if(!g.show)continue;p(g);const v=g.transformOrigin(),_=v.x,E=v.y;if(e){const C=g.toSVGPathD();g.el||(g.el=Ry(C,g.id),Vn(e,g.el));const I=new _t;I.translate(g.x,g.y),I.rotate(g.degree,_,E),I.scale(g.scaleX,g.scaleY,_,E),$e(g.el,{d:C,transform:I.toString(),...g.getAttrs()})}if(i&&(i.save(),i.translate(g.x,g.y),i.rotate(J(g.degree),_,E),i.scale(g.scaleX,g.scaleY,_,E),g.toCanvasContext(i),Eh(i,g.getAttrs()),i.hasSetCustomStrokeStyle&&i.stroke(),i.hasSetCustomFillStyle&&i.fill()),e?g.isMouseIn=g.isPointInPath(e,d.current.x,d.current.y)||g.isPointInStroke(e,d.current.x,d.current.y):i?g.isMouseIn=g.isPointInPath(i,d.current.x,d.current.y)||g.isPointInStroke(i,d.current.x,d.current.y):g.isMouseIn=!1,g.isMouseIn&&(l("pointer"),c=g.id),g.isDragging=g.id==h,d.current.isDown&&(g.isDragging||!h&&g.isMouseIn&&g.drag&&g.drag.enable)){l("grabbing"),g.isDragging=!0,h=g.id;let C=d.current.x-d.start.x,I=d.current.y-d.start.y;if(C||I){if(g.drag&&g.drag.enable&&g.drag.alongPath){const F=g.parent?g.parent.combo.x:g.x,B=g.parent?g.parent.combo.y:g.y,$=_+(g.parent?.dx||0),V=E+(g.parent?.dy||0),W=g.parent?g.parent.combo.degree:g.degree,et=g.parent?g.parent.combo.scaleX:g.scaleX,Z=g.parent?g.parent.combo.scaleY:g.scaleY,mt=g.drag.alongPath.transform(F,B,$,V,W,et,Z).closestPoint(d.current.x,d.current.y),kt=g.x,Ot=g.y;console.log(mt.point.x,mt.point.y,kt,Ot),C=mt.point.x-kt,I=mt.point.y-Ot,console.log(C,I)}(C||I)&&(g.move(C,I),g.parent?.combo.shapes.forEach(F=>{F.drag?.followSibling&&F!==g&&F.move(C,I)}))}d.setStart(d.current)}else g.isMouseIn&&g.drag&&g.drag.enable&&l("grab");i&&i.restore()}!c&&!h&&l("default")};return{rect:r,mousePoint:d.current,shapes:a,draw:w,ctx:i,unsubscribe:()=>{o.unsubscribe(),f.unsubscribe()},downloadSVG:()=>{e&&Ly(e)}}}class dn extends ft{dx;dy;constructor(t){if(super(t),t?.lineLength){const e=cn(J(t?.lineDegree||0),t.lineLength);this.dx=e.dx,this.dy=e.dy}else t?.lineDx||t?.lineDy?(this.dx=t?.lineDx||0,this.dy=t?.lineDy||0):(this.dx=0,this.dy=0)}cloneShape(){return new dn({...super.getBaseOptions(),lineDx:this.dx,lineDy:this.dy})}toSVGPathData(){return[["m",0,0],["l",this.dx,this.dy]]}toCanvasContext(t){t.beginPath(),t.moveTo(0,0),t.lineTo(this.dx,this.dy)}lineToAbsolutePoint(t){this.dx=t.x-this.x,this.dy=t.y-this.y}intersection(t){const e=this.transformOrigin(),i=this.pathD().transform(this.x,this.y,e.x,e.y,this.degree,this.scaleX,this.scaleY).normalizedLines[0],r=t.transformOrigin(),a=t.pathD().transform(this.x,this.y,r.x,r.y,t.degree,t.scaleX,t.scaleY).normalizedLines[0];return i.intersection(a)}}class To extends Ut{constructor(t,e){super(t,e);const n=new dn({...e,drag:{...e?.drag,followSibling:!0},lineLength:100,lineDegree:90});this.addShape(n);const i=new dn({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(i);const r=new dn({...e,drag:{...e?.drag,followSibling:!0},y:10+Math.random()*30,lineLength:10+Math.random()*30,lineDegree:Math.random()*120-150});this.addShape(r)}cloneShapeCombo(){return new To(this.options,this.commonChildShapeOptions)}}class mn extends ft{radius;constructor(t){super(t),this.radius=t?.ballRadius||0}cloneShape(){return new mn({...super.getBaseOptions(),ballRadius:this.radius})}getBoundingClientRect(){return{x:-this.radius,y:-this.radius,width:this.radius*2,height:this.radius*2}}toSVGPathData(){return this.radius?[["m",0,-this.radius],["a",this.radius,this.radius,0,1,1,0,2*this.radius],["a",this.radius,this.radius,0,1,1,0,-2*this.radius],["z"]]:[["m",0,0]]}toCanvasContext(t){t.beginPath(),t.arc(0,0,this.radius,0,Math.PI*2,!0),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.radius===t.radius&&this.mass===t.mass}midPointBtw(t){return{x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2}}length(){return an(this.x,this.y)}scalar(t){return this.moveTo(this.x*t,this.y*t),this}normalize(t=1){const e=this.length();if(e){const n=t/e;this.scalar(n)}return this}clamp(t){const e=this.length();return e&&e>t&&this.scalar(t/e),this}cross(t){const e=this.x,n=this.y;return{x:n*t.x-e*t.y,y:e*t.y-n*t.x}}multiply(t){return{x:this.x*t.x,y:this.y*t.y}}div(t){return{x:this.x/t.x,y:this.y/t.y}}add(t){return{x:this.x+t.x,y:this.y+t.y}}sub(t){return{x:this.x-t.x,y:this.y-t.y}}dot(t){return this.x*t.x+this.y*t.y}reflect(t){const e=this.dot(t);return{x:this.x-2*e*t.x,y:this.y-2*e*t.y}}checkCollision(t){const e=t.x-this.x,n=t.y-this.y;if(Math.sqrt(e*e+n*n)<this.radius+t.radius){const r=Math.atan2(n,e),o={x:0,y:0},a=te(-r,e,n),c=te(-r,this.vx,this.vy),h=te(-r,t.vx,t.vy),u=c.x-h.x;c.x=((this.mass-t.mass)*c.x+2*t.mass*h.x)/(this.mass+t.mass),h.x=u+c.x;const l=Math.abs(c.x)+Math.abs(h.x),d=this.radius+t.radius-Math.abs(o.x-a.x);o.x+=c.x/l*d,a.x+=h.x/l*d;const f=te(r,o.x,o.y),p=te(r,a.x,a.y);t.moveTo(this.x+p.x,this.y+p.y),this.moveTo(this.x+f.x,this.y+f.y);const w=te(r,c.x,c.y),x=te(r,h.x,h.y);this.vx=w.x,this.vy=w.y,t.vx=x.x,t.vy=x.y}}checkWall(t){const e=typeof t?.bounce=="number"?t.bounce:-1,n=t.wall.x,i=t.wall.y,r=t.wall.x+t.wall.width,o=t.wall.y+t.wall.height;this.x+this.radius>r?(this.moveXTo(r-this.radius),this.vx*=e):this.x-this.radius<n&&(this.moveXTo(n+this.radius),this.vx*=e),this.y+this.radius>o?(this.moveYTo(o-this.radius),this.vy*=e):this.y-this.radius<i&&(this.moveYTo(i+this.radius),this.vy*=e)}}class Eo extends ft{constructor(t){super(t)}cloneShape(){return new Eo({...super.getBaseOptions()})}toSVGPathData(){return[["m",-50,-25],["l",50,0],["l",0,-25],["l",50,50],["l",-50,50],["l",0,-25],["l",-50,0],["l",0,-50],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(-50,-25),t.lineTo(0,-25),t.lineTo(0,-50),t.lineTo(50,0),t.lineTo(0,50),t.lineTo(0,25),t.lineTo(-50,25),t.lineTo(-50,-25),t.closePath()}}class He extends ft{width;height;borderRadius;constructor(t){super(t),this.width=t.rectWidth,this.height=t.rectHeight,this.borderRadius=t.rectBorderRadius||0}cloneShape(){return new He({...super.getBaseOptions(),rectWidth:this.width,rectHeight:this.height,rectBorderRadius:this.borderRadius})}static fromCubicBezier(t,e,n,i,r,o,a,c){const u=new yt({x:t,y:e,c1x:n,c1y:i,c2x:r,c2y:o,toX:a,toY:c}).getBoundingClientRect();return new He({x:u.x,y:u.y,rectWidth:u.width,rectHeight:u.height})}toSVGPathData(){return this.borderRadius?[["m",this.borderRadius,0],["l",this.width-this.borderRadius*2,0],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,this.borderRadius],["l",0,this.height-this.borderRadius*2],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,this.borderRadius],["l",this.borderRadius*2-this.width,0],["a",this.borderRadius,this.borderRadius,0,0,1,-this.borderRadius,-this.borderRadius],["l",0,this.borderRadius*2-this.height],["a",this.borderRadius,this.borderRadius,0,0,1,this.borderRadius,-this.borderRadius],["z"]]:[["m",0,0],["l",this.width,0],["l",0,this.height],["l",-this.width,0],["z"]]}toCanvasContext(t){t.beginPath(),this.borderRadius<=0?t.rect(0,0,this.width,this.height):(t.moveTo(0,this.borderRadius),t.lineTo(0,this.height-this.borderRadius),t.quadraticCurveTo(0,this.height,this.borderRadius,this.height),t.lineTo(this.width-this.borderRadius,this.height),t.quadraticCurveTo(this.width,this.height,this.width,this.height-this.borderRadius),t.lineTo(this.width,this.borderRadius),t.quadraticCurveTo(this.width,0,this.width-this.borderRadius,0),t.lineTo(this.borderRadius,0),t.quadraticCurveTo(0,0,0,this.borderRadius)),t.closePath()}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.borderRadius===t.borderRadius}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t){return t.x>=this.x&&t.x<=this.x+this.width&&t.y>=this.y&&t.y<=this.y+this.height}}class Po extends ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx||10,this.ry=t?.heartRy||10}cloneShape(){return new Po({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0],["l",this.rx*2.4,-this.ry*3.14],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,-this.ry*1.5],["a",this.rx/2,this.ry/2,0,0,0,-this.rx*2.4,this.ry*1.5],["l",this.rx*2.4,this.ry*3.14],["z"]]}}class Mo extends ft{rx;ry;constructor(t){super(t),this.rx=t?.heartRx??50,this.ry=t?.heartRy??50}cloneShape(){return new Mo({...super.getBaseOptions(),heartRx:this.rx,heartRy:this.ry})}toSVGPathData(){return[["m",0,0+this.ry*.3],["C",0,0,0-this.rx/2,0,0-this.rx/2,0+this.ry*.3],["C",0-this.rx/2,0+(this.ry+this.ry*.3)/2,0,0+(this.ry+this.ry*.3)/1.4,0,0+this.ry],["C",0,0+(this.ry+this.ry*.3)/1.8,0+this.rx/2,0+(this.ry+this.ry*.3)/2,0+this.rx/2,0+this.ry*.3],["C",0+this.rx/2,0,0,0,0,0+this.ry*.3],["z"]]}}class Ao extends ft{r;constructor(t){super(t),this.r=t?.starR||20}cloneShape(){return new Ao({...super.getBaseOptions(),starR:this.r})}toSVGPathData(){const t=[["m",0,-this.r]];for(let e=0;e<6;e+=1){const n=288+e*144,i=this.r*Math.cos(J(n)),r=this.r*Math.sin(J(n));t.push(["l",i,r])}return t}}class ko extends ft{constructor(t){super(t)}cloneShape(){return new ko({...super.getBaseOptions()})}toSVGPathData(){return[["m",4,24],["l",4,-8],["l",6,-6],["l",1,-10],["l",-6,-10],["l",-7,10],["l",-4,0],["l",-7,-10],["l",-6,10],["l",1,10],["l",6,6],["l",4,8],["z"]]}toCanvasContext(t){t.beginPath(),t.moveTo(4,24),t.lineTo(8,16),t.lineTo(14,10),t.lineTo(15,0),t.lineTo(9,-10),t.lineTo(2,0),t.lineTo(-2,0),t.lineTo(-9,-10),t.lineTo(-15,0),t.lineTo(-14,10),t.lineTo(-8,16),t.lineTo(-4,24),t.closePath()}}class Io extends ft{constructor(t){super(t)}cloneShape(){return new Io({...super.getBaseOptions()})}toSVGPathData(){return[["M",0,0],["C",15,0,15,-40,5,-30],["L",0,0],["C",-15,0,-15,-40,-5,-30],["L",0,0],["a",15,15,0,1,1,0,30],["a",15,15,0,1,1,0,-30]]}}class Do extends ft{constructor(t){super(t),this.d="m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"}cloneShape(){return new Do({...super.getBaseOptions()})}}class Ro extends Ut{constructor(t,e){super(t,e);const n=new ft({...e,drag:{...e?.drag,followSibling:!0},show:typeof t?.showFlame=="boolean"?t.showFlame:!1,d:[["M",-15,0],["L",-2.5,-5],["L",-2.5,5],["Z"]]});this.addShape(n);const i=new ft({...e,drag:{...e?.drag,followSibling:!0},d:[["M",10,0],["L",-10,10],["L",-5,0],["L",-10,-10],["L",10,0],["Z"]]});this.addShape(i)}cloneShapeCombo(){return new Ro({...this.options,showFlame:this.showFlame},this.commonChildShapeOptions)}set showFlame(t){this.shapes[0].show=t}get showFlame(){return this.shapes[0].show}}class Lo extends Ut{width;height;cornerRadius;constructor(t,e){super(t,e),this.width=t.segmentWidth,this.height=t.segmentHeight,this.cornerRadius=typeof t.segmentCornerRadius=="number"?t.segmentCornerRadius:this.height*.5;const n=new He({...e,drag:{...e?.drag,followSibling:!0},x:0-this.cornerRadius,y:0-this.height*.5,rectWidth:this.width+this.cornerRadius*2,rectHeight:this.height,rectBorderRadius:this.cornerRadius});this.addShape(n);const i=new mn({...e,drag:{...e?.drag,followSibling:!0},x:0,y:0,ballRadius:2});this.addShape(i);const r=new mn({...e,drag:{...e?.drag,followSibling:!0},x:0+this.width,y:0,ballRadius:2});this.addShape(r)}cloneShapeCombo(){return new Lo({...this.options,segmentWidth:this.width,segmentHeight:this.height},this.commonChildShapeOptions)}getBoundingClientRectCenter(){return{x:0,y:0}}getPin(){const t=this.shapes[1];return{x:t.x+Math.cos(J(t.degree))*this.width,y:t.y+Math.sin(J(t.degree))*this.width}}}class Oo extends Ut{value$=new Mn;subscription;constructor(t,e){super(t,e);const n=t?.sliderMin||0,i=t?.sliderMax||100,r=t?.sliderStep||1,o=Zl(n,i,r),a=o(typeof t?.sliderDefaultValue=="number"?N(t.sliderDefaultValue,n,i):n);this.value$.next(a);const c=a/(i-n),h=t?.sliderWidth||100,u=t?.sliderHeight||4,l=u*.5,d=u*2.5,f=t?.sliderBackgroundColor||"#f5f5f5",p=t?.sliderForegroundColor||"#5a82f0",w=new He({...e,rectWidth:h,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:f},drag:{...e?.drag,enable:!1}});this.addShape(w);const x=new He({...e,rectWidth:h*c,rectHeight:u,rectBorderRadius:l,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!1}});this.addShape(x);const b=new mn({...e,x:h*c,y:l,ballRadius:d,attrs:{...e?.attrs,fill:p},drag:{...e?.drag,enable:!0,alongPath:new St([["m",0,0],["l",h,0]])}});this.addShape(b),this.subscription=b.transform$.subscribe(({dx:g})=>{x.width=N(x.width+(g||0),0,h),this.value$.next(o((b.x-w.x)/h*(i-n)+n))})}destroy(){super.destroy(),this.subscription.unsubscribe()}cloneShapeCombo(){return new Oo({...this.options},this.commonChildShapeOptions)}}async function Wy(s,t){return new Promise(e=>{new MutationObserver((i,r)=>{t(i,r),e(()=>{r.disconnect()})}).observe(s,{attributes:!0,childList:!0,subtree:!0})})}function Yu(s,t={attributes:!0,childList:!0,subtree:!0}){return new st(e=>{const n=new MutationObserver(i=>{e.next(i)});return n.observe(s,t),()=>{n.disconnect()}})}async function Jy(s,t,e={threshold:.5}){return new Promise(n=>{new IntersectionObserver((r,o)=>{t(r,o),n(()=>{o.unobserve(s)})},e).observe(s)})}function Uu(s,t={threshold:.5}){return new st(e=>{const n=new IntersectionObserver((i,r)=>{e.next(i)},t);return n.observe(s),()=>{n.unobserve(s),n.disconnect()}})}function Zy(s,t){return mu().pipe(_e(null),ot(()=>{const{width:e,height:n}=t?.root?.getBoundingClientRect()||pu(),{top:i,left:r,right:o,bottom:a}=s.getBoundingClientRect();return(i>=0&&i<=n||a>=0&&a<=n)&&(r>=0&&r<=e||o>=0&&o<=e)}),ve())}function Qy(s,t){const e=typeof t?.threshold=="number"?t.threshold:.5;return Uu(s,{threshold:e,root:t?.root}).pipe(ot(n=>{let i=n[0];if(n.length>1){const r=n.find(o=>o.isIntersecting);r&&(i=r)}return i.isIntersecting&&i.intersectionRatio>=e}),ve())}let Xu=!1;function Ky(){Xu||(Xu=!0,Ch(`
|
|
28
28
|
:root {
|
|
29
29
|
--sat:env(safe-area-inset-top, 0px);
|
|
30
30
|
--sar:env(safe-area-inset-right, 0px);
|
|
@@ -37,15 +37,15 @@ var ZYZGroupCoreWeb=function(m){"use strict";const xl={};function vl(){return ty
|
|
|
37
37
|
--sab:env(safe-area-inset-bottom, 0px);
|
|
38
38
|
--sal:env(safe-area-inset-left, 0px);
|
|
39
39
|
}
|
|
40
|
-
`))}Hy();function Wy(){return io(document.documentElement).pipe(ar(ir),ot(()=>{const s=getComputedStyle(document.documentElement);return{bottom:s.getPropertyValue("--sab"),top:s.getPropertyValue("--sat"),right:s.getPropertyValue("--sar"),left:s.getPropertyValue("--sal")}}))}function Jy(s={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new st(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((n,i)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),n()},r=>{i(r)})}).then(()=>{e=navigator.geolocation.watchPosition(n=>{t.next({longitude:n.coords.longitude,latitude:n.coords.latitude})},n=>{t.error(n)},s)}).catch(n=>{t.error(n)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function Xu(s="(prefers-color-scheme: dark)"){const t=window.matchMedia(s);return U(t,"change").pipe(ot(e=>e.matches),Se(t.matches),_e())}function Uu(){return Bu(document).pipe(ot(()=>location),Se(location))}function Zy(){return Uu().pipe(ot(s=>s.href),Se(location.href),_e())}function Qy(){return U(window,"hashchange").pipe(ot(s=>s.target.location.hash.replace("#","")),Se(window.location.hash.replace("#","")),_e())}function Ky(){return U(window,"popstate").pipe(ot(s=>s.state),Se(null),_e())}function tw(s,t,e){if(typeof t=="string"&&(t=ra(t)),(typeof t=="string"||t===void 0)&&e===void 0){const n=Object.assign({},s.dataset);return Object.keys(n).forEach(i=>{if(n[i]?.startsWith("[")||n[i]?.startsWith("{"))try{n[i]=JSON.parse(n[i]||"")}catch{}}),typeof t=="string"?n[t]:n}else{let n={};typeof t=="object"?n=t:typeof t=="string"&&(n[t]=e),Object.entries(n).forEach(([i,r])=>{r?s.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete s.dataset[i]})}}function ew(s,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete s.dataset[e.trim()]})}function Ro(s,t){const e=Math.max(t?.aliveInSeconds||0,0),n=Math.max(t?.aliveUntilTimestamp||0,0);function i(o,a=!1){return Xl(o)||!Cl(o,bn)?{v:o,[bn]:cs()}:a?o:{...o,[bn]:cs()}}let r=i(s,!0);return{get:()=>{let o=r.v;return(e&&cs()>r[bn]+e*1e3||n&&cs()>n)&&(o=void 0),{value:typeof o<"u"?r:void 0,rawValue:o}},set:o=>r=i(o)}}function $u(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.localStorage.getItem(e);a&&(n=ea(a))}catch{}const{get:i,set:r}=Ro(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Ai(i().value);return Wt(()=>{if(typeof o.value<"u")try{window.localStorage.setItem(e,gi(o.value))}catch{}else window.localStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function nw(){window.localStorage.clear()}const{get:Vu,set:sw}=$u(ns("theme")),Gu=new Mn,iw=Gu.pipe(Se(void 0));function qu(s){switch(sw(s),s){case"dark":document.documentElement.classList.add("dark"),fn(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),fn(document.documentElement,"data-theme","light");break}return Gu.next(s),s}function rw(){return qu(Vu()=="dark"?"light":"dark")}function ow(){return Qm([iw,Xu("(prefers-color-scheme: dark)")]).pipe(ot(([s,t])=>{if(s)return s;const e=Vu();return e||(t?"dark":"light")}))}function aw(s,t=""){return getComputedStyle(document.documentElement).getPropertyValue(s)||t}function cw(s,t){document.documentElement.style.setProperty(s,t)}function hw(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.sessionStorage.getItem(e);a&&(n=ea(a))}catch{}const{get:i,set:r}=Ro(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Ai(i().value);return Wt(()=>{if(typeof o.value<"u")try{window.sessionStorage.setItem(e,gi(o.value))}catch{}else window.sessionStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function uw(){window.sessionStorage.clear()}function lw(s,t){const e=Ai(t?.value||"");if(!e.value){const n=`; ${document.cookie}`.split(`; ${s}=`).pop()?.split(";").shift();n&&(e.value=decodeURIComponent(n))}return Wt(()=>{if(e.value&&t?.days){const n="; expires="+new Date(Date.now()+t.days*864e5).toUTCString(),i=t?.domain?"; domain="+t?.domain:"",r=t?.path?"; path="+t?.path:"",o=t?.secure==!0?"; secure":"";document.cookie=s+"="+encodeURIComponent(e.value)+n+i+r+o}}),{get:()=>e.value,set:n=>e.value=n}}function fw(){const s=document.cookie.split("; ");for(let t=0;t<s.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const n=encodeURIComponent(s[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",i=location.pathname.split("/");for(document.cookie=n+"/";i.length>0;)document.cookie=n+i.join("/"),i.pop();e.shift()}}}function dw(s,t){let e;return s.objectStoreNames.contains(t)||(e=s.createObjectStore(t,{keyPath:"id"})),e}function mw(s,t=1,e){return new Promise((n,i)=>{let r;const o=window.indexedDB.open(s,t);o.onerror=()=>{i("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,dw(r,e),n(r)}})}function pw(s,t,e={id:1,name:"xxx"}){return new Promise((n,i)=>{const r=s.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{n(a)},r.onerror=a=>{i(a)}})}const Lo=new Le;function Oo(s,t){return ta({url:s,...t})}async function Hs(s,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=Oo(s,t),n=new AbortController;Lo.set(e,n);const{responseType:i,onProgress:r,timeout:o}={responseType:"json",timeout:6e4,...t},a=setTimeout(()=>{throw n.abort(),new Error(`${o} ms Timeout!`)},o);let c=await fetch(new Request(s,{...t,signal:n.signal}));if(Lo.delete(e),clearTimeout(a),c.status===200||c.status===0){if(c.status===0&&uf("useFetch: HTTP Status 0 received."),typeof ReadableStream<"u"&&c.body&&c.body.getReader&&r){const h=c.body.getReader(),u=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),l=u?parseInt(u):0,d=l!==0;let f=0;const p=new ReadableStream({start(w){function x(){h.read().then(({done:b,value:g})=>{b?w.close():(f+=g.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:d,loaded:f,total:l})),w.enqueue(g),x())}).catch(b=>{w.error(b)})}x()}});c=new Response(p)}switch(i){case"arraybuffer":return await c.arrayBuffer();case"blob":return await c.blob();case"json":return await c.json();case"text":default:return await c.text()}}else return Promise.reject(c)}function gw(s,t){const e=Lo.get(Oo(s,t));e&&e.abort()}function yw(s=3,t){return ba(Hs,s,t)}function ww(s=6e4){return xa(Hs,s)}function bw(s=6e4,t=3,e){return xa(ba(Hs,t,e),s)}const xw={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(s,t)=>{switch(t){case"W":return`${s}周`;default:return`${s}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(s,t)=>{const e=s*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},vw={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:s=>{const t=["th","st","nd","rd"],e=s%100;return`[${s}${t[(e-20)%10]||t[e]||t[0]}]`}},Ie=new Le;let Ws="zh-cn";zo(vw),zo(xw);function zo(s,t){if(!s)return Ie.get(Ws);let e;if(typeof s=="string"){const n=s.toLowerCase();if(Ie.get(n))e=n;else if(t)Ie.set(n,t),e=n;else return Ie.get(Ws)}else{const{name:n}=s;Ie.set(n,s),e=n}return e&&(Ws=e),Ie.get(e)||Ie.get(Ws)}function Je(s,t={},e=[],n){return{tag:s,props:t,children:e,el:n}}function Js(s){return Je(s.tagName,Ur(s),Array.from(s.children).map(t=>Js(t)),s)}function gn(s,t=document.documentElement){if(s.el)return s.el;if(s.el=document.createElement(s.tag),s.props)for(const e in s.props){const n=s.props[e];e.startsWith("on")?s.el.addEventListener(e.slice(2).toLowerCase(),n):e==="style"?Ys(s.el,s.props[e]):fn(s.el,e,n)}return s.children&&(typeof s.children=="string"?s.el.appendChild(document.createTextNode(s.children)):s.children.forEach(e=>{gn(e,s.el)})),t.appendChild(s.el),s.el}function Zs(s,t){if(!s.el)return;if(s.tag!==t.tag){(s.el.parentElement||document.body).replaceChild(gn(t),s.el);return}const e=t.el=s.el,n=s.props,i=t.props;for(const a in n)a in i||(a.startsWith("on")?e.removeEventListener(a.slice(2).toLowerCase(),n[a]):e.removeAttribute(a));for(const a in i){const c=n[a],h=i[a];if(h!=c)if(a.startsWith("on")){const u=a.slice(2).toLowerCase();e.removeEventListener(u,c),e.addEventListener(u,h)}else if(a==="style"){for(const u in c)u in h||Xr(e,u);Ys(e,h)}else fn(e,a,h)}const r=s.children||[],o=t.children||[];if(typeof o=="string")e.innerHTML=o;else if(typeof r=="string")e.innerHTML="",o.forEach(a=>{gn(a,e)});else{const a=Math.min(r.length,o.length);for(let c=0;c<a;c++)Zs(r[c],o[c]);o.length>r.length&&o.slice(r.length).forEach(c=>{gn(c,e)}),o.length<r.length&&r.slice(o.length).forEach(c=>{c.el&&e.removeChild(c.el)})}}class _w{state;el;constructor(t,e){this.state=Aa(t,!0),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const n=e;[...n.attributes].forEach(a=>{const c=a.name,h=a.value;if(c==="v-model")if(Wr(n)){const u=n;Wt(()=>{u.checked=this.getStateValue(h)==u.value}),u.addEventListener("change",l=>{this.setStateValue(h,l.target.value)})}else if(Hr(n)){const u=n;Wt(()=>{u.checked=la(this.getStateValue(h),u.value)}),u.addEventListener("change",l=>{const d=l.target,f=d.value;d.checked?ql(this.getStateValue(h),f):en(this.getStateValue(h),f)})}else if(jr(n)){const u=n;Wt(()=>{u.value=this.getStateValue(h)}),u.addEventListener("change",l=>{this.setStateValue(h,l.target.value)})}else{const u=n;Wt(()=>{u.value=this.getStateValue(h)});const l=d=>{this.setStateValue(h,d.target.value)};u.addEventListener("input",l)}else c==="v-text"?Wt(()=>{n.innerText=this.getStateValue(h)}):c==="v-html"&&Wt(()=>{n.innerHTML=this.getStateValue(h)})}),n.childNodes.length>0&&this.compile(n);break;case 3:const i=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,o=r.exec(i);o&&o[1]&&Wt(()=>{e.textContent=i.replace(r,this.getStateValue(o[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(n=>{e=e[n]}),e}setStateValue(t,e){let n=this.state;const i=t.split("."),r=i.length;for(let o=0;o<r-1;o++)n=n[i[o]];n[i[r-1]]=e}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
|
|
40
|
+
`))}Ky();function tw(){return ao(document.documentElement).pipe(ur(ar),ot(()=>{const s=getComputedStyle(document.documentElement);return{bottom:s.getPropertyValue("--sab"),top:s.getPropertyValue("--sat"),right:s.getPropertyValue("--sar"),left:s.getPropertyValue("--sal")}}))}function ew(s={enableHighAccuracy:!0,timeout:5e3,maximumAge:0}){return new st(t=>{if(!("geolocation"in navigator))return t.error("navigator.geolocation is not available.");let e;return new Promise((n,i)=>{navigator.geolocation.getCurrentPosition(r=>{t.next({longitude:r.coords.longitude,latitude:r.coords.latitude}),n()},r=>{i(r)})}).then(()=>{e=navigator.geolocation.watchPosition(n=>{t.next({longitude:n.coords.longitude,latitude:n.coords.latitude})},n=>{t.error(n)},s)}).catch(n=>{t.error(n)}),()=>{typeof e=="number"&&navigator.geolocation.clearWatch(e)}})}function $u(s="(prefers-color-scheme: dark)"){const t=window.matchMedia(s);return X(t,"change").pipe(ot(e=>e.matches),_e(t.matches),ve())}function Vu(){return Yu(document).pipe(ot(()=>location),_e(location))}function nw(){return Vu().pipe(ot(s=>s.href),_e(location.href),ve())}function sw(){return X(window,"hashchange").pipe(ot(s=>s.target.location.hash.replace("#","")),_e(window.location.hash.replace("#","")),ve())}function iw(){return X(window,"popstate").pipe(ot(s=>s.state),_e(null),ve())}function rw(s,t,e){if(typeof t=="string"&&(t=aa(t)),(typeof t=="string"||t===void 0)&&e===void 0){const n=Object.assign({},s.dataset);return Object.keys(n).forEach(i=>{if(n[i]?.startsWith("[")||n[i]?.startsWith("{"))try{n[i]=JSON.parse(n[i]||"")}catch{}}),typeof t=="string"?n[t]:n}else{let n={};typeof t=="object"?n=t:typeof t=="string"&&(n[t]=e),Object.entries(n).forEach(([i,r])=>{r?s.dataset[i]=r instanceof Object?JSON.stringify(r):r:delete s.dataset[i]})}}function ow(s,t){t.split(/[,\s]+/).forEach(e=>{e.trim()!=""&&delete s.dataset[e.trim()]})}function zo(s,t){const e=Math.max(t?.aliveInSeconds||0,0),n=Math.max(t?.aliveUntilTimestamp||0,0);function i(o,a=!1){return $l(o)||!El(o,wn)?{v:o,[wn]:cs()}:a?o:{...o,[wn]:cs()}}let r=i(s,!0);return{get:()=>{let o=r.v;return(e&&cs()>r[wn]+e*1e3||n&&cs()>n)&&(o=void 0),{value:typeof o<"u"?r:void 0,rawValue:o}},set:o=>r=i(o)}}function Gu(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.localStorage.getItem(e);a&&(n=sa(a))}catch{}const{get:i,set:r}=zo(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Di(i().value);return Wt(()=>{if(typeof o.value<"u")try{window.localStorage.setItem(e,gi(o.value))}catch{}else window.localStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function aw(){window.localStorage.clear()}const{get:qu,set:cw}=Gu(ns("theme")),ju=new Mn,hw=ju.pipe(_e(void 0));function Hu(s){switch(cw(s),s){case"dark":document.documentElement.classList.add("dark"),ln(document.documentElement,"data-theme","dark");break;case"light":default:document.documentElement.classList.remove("dark"),ln(document.documentElement,"data-theme","light");break}return ju.next(s),s}function uw(){return Hu(qu()=="dark"?"light":"dark")}function lw(){return sp([hw,$u("(prefers-color-scheme: dark)")]).pipe(ot(([s,t])=>{if(s)return s;const e=qu();return e||(t?"dark":"light")}))}function fw(s,t=""){return getComputedStyle(document.documentElement).getPropertyValue(s)||t}function dw(s,t){document.documentElement.style.setProperty(s,t)}function mw(s,t){const e=typeof s=="string"?s:s.toString();let n=t?.initValue;if(typeof n>"u")try{const a=window.sessionStorage.getItem(e);a&&(n=sa(a))}catch{}const{get:i,set:r}=zo(n,{aliveInSeconds:t?.aliveInSeconds,aliveUntilTimestamp:t?.aliveUntilTimestamp}),o=Di(i().value);return Wt(()=>{if(typeof o.value<"u")try{window.sessionStorage.setItem(e,gi(o.value))}catch{}else window.sessionStorage.removeItem(e)}),{get:()=>{const a=i();return o.value=a.value,a.rawValue},set:a=>o.value=r(a)}}function pw(){window.sessionStorage.clear()}function gw(s,t){const e=Di(t?.value||"");if(!e.value){const n=`; ${document.cookie}`.split(`; ${s}=`).pop()?.split(";").shift();n&&(e.value=decodeURIComponent(n))}return Wt(()=>{if(e.value&&t?.days){const n="; expires="+new Date(Date.now()+t.days*864e5).toUTCString(),i=t?.domain?"; domain="+t?.domain:"",r=t?.path?"; path="+t?.path:"",o=t?.secure==!0?"; secure":"";document.cookie=s+"="+encodeURIComponent(e.value)+n+i+r+o}}),{get:()=>e.value,set:n=>e.value=n}}function yw(){const s=document.cookie.split("; ");for(let t=0;t<s.length;t++){const e=window.location.hostname.split(".");for(;e.length>0;){const n=encodeURIComponent(s[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+e.join(".")+" ;path=",i=location.pathname.split("/");for(document.cookie=n+"/";i.length>0;)document.cookie=n+i.join("/"),i.pop();e.shift()}}}function ww(s,t){let e;return s.objectStoreNames.contains(t)||(e=s.createObjectStore(t,{keyPath:"id"})),e}function bw(s,t=1,e){return new Promise((n,i)=>{let r;const o=window.indexedDB.open(s,t);o.onerror=()=>{i("无法使用IndexDB!")},o.onsuccess=a=>{r=a.target.result,ww(r,e),n(r)}})}function xw(s,t,e={id:1,name:"xxx"}){return new Promise((n,i)=>{const r=s.transaction([t],"readwrite");r.objectStore(t).add(e),r.oncomplete=a=>{n(a)},r.onerror=a=>{i(a)}})}const Fo=new xn;function No(s,t){return yi({url:s,...t})}async function Hs(s,t){if(typeof fetch>"u")throw new Error("fetch() not supported!");if(typeof AbortController>"u")throw new Error("AbortController not supported!");const e=No(s,t),n=new AbortController;Fo.set(e,n);const{responseType:i,onProgress:r,timeout:o}={responseType:"json",timeout:6e4,...t},a=setTimeout(()=>{throw n.abort(),new Error(`${o} ms Timeout!`)},o);let c=await fetch(new Request(s,{...t,signal:n.signal}));if(Fo.delete(e),clearTimeout(a),c.status===200||c.status===0){if(c.status===0&&pf("useFetch: HTTP Status 0 received."),typeof ReadableStream<"u"&&c.body&&c.body.getReader&&r){const h=c.body.getReader(),u=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),l=u?parseInt(u):0,d=l!==0;let f=0;const p=new ReadableStream({start(w){function x(){h.read().then(({done:b,value:g})=>{b?w.close():(f+=g.byteLength,r?.(new ProgressEvent("progress",{lengthComputable:d,loaded:f,total:l})),w.enqueue(g),x())}).catch(b=>{w.error(b)})}x()}});c=new Response(p)}switch(i){case"arraybuffer":return await c.arrayBuffer();case"blob":return await c.blob();case"json":return await c.json();case"text":default:return await c.text()}}else return Promise.reject(c)}function vw(s,t){const e=Fo.get(No(s,t));e&&e.abort()}function _w(s=3,t){return vi(Hs,s,t)}function Sw(s=6e4){return _i(Hs,s)}function Cw(s=6e4,t=3,e){return _i(vi(Hs,t,e),s)}const Tw={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:(s,t)=>{switch(t){case"W":return`${s}周`;default:return`${s}日`}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:(s,t)=>{const e=s*100+t;return e<600?"凌晨":e<900?"早上":e<1100?"上午":e<1300?"中午":e<1800?"下午":"晚上"}},Ew={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:s=>{const t=["th","st","nd","rd"],e=s%100;return`[${s}${t[(e-20)%10]||t[e]||t[0]}]`}},ke=new xn;let Ws="zh-cn";Bo(Ew),Bo(Tw);function Bo(s,t){if(!s)return ke.get(Ws);let e;if(typeof s=="string"){const n=s.toLowerCase();if(ke.get(n))e=n;else if(t)ke.set(n,t),e=n;else return ke.get(Ws)}else{const{name:n}=s;ke.set(n,s),e=n}return e&&(Ws=e),ke.get(e)||ke.get(Ws)}function We(s,t={},e=[],n){return{tag:s,props:t,children:e,el:n}}function Js(s){return We(s.tagName,Gr(s),Array.from(s.children).map(t=>Js(t)),s)}function pn(s,t=document.documentElement){if(s.el)return s.el;if(s.el=document.createElement(s.tag),s.props)for(const e in s.props){const n=s.props[e];e.startsWith("on")?s.el.addEventListener(e.slice(2).toLowerCase(),n):e==="style"?Ys(s.el,s.props[e]):ln(s.el,e,n)}return s.children&&(typeof s.children=="string"?s.el.appendChild(document.createTextNode(s.children)):s.children.forEach(e=>{pn(e,s.el)})),t.appendChild(s.el),s.el}function Zs(s,t){if(!s.el)return;if(s.tag!==t.tag){(s.el.parentElement||document.body).replaceChild(pn(t),s.el);return}const e=t.el=s.el,n=s.props,i=t.props;for(const a in n)a in i||(a.startsWith("on")?e.removeEventListener(a.slice(2).toLowerCase(),n[a]):e.removeAttribute(a));for(const a in i){const c=n[a],h=i[a];if(h!=c)if(a.startsWith("on")){const u=a.slice(2).toLowerCase();e.removeEventListener(u,c),e.addEventListener(u,h)}else if(a==="style"){for(const u in c)u in h||Vr(e,u);Ys(e,h)}else ln(e,a,h)}const r=s.children||[],o=t.children||[];if(typeof o=="string")e.innerHTML=o;else if(typeof r=="string")e.innerHTML="",o.forEach(a=>{pn(a,e)});else{const a=Math.min(r.length,o.length);for(let c=0;c<a;c++)Zs(r[c],o[c]);o.length>r.length&&o.slice(r.length).forEach(c=>{pn(c,e)}),o.length<r.length&&r.slice(o.length).forEach(c=>{c.el&&e.removeChild(c.el)})}}class Pw{state;el;constructor(t,e){this.state=ka(t,!0),this.el=e,this.compile(this.el)}compile(t){t.childNodes.forEach(e=>{switch(e.nodeType){case 1:const n=e;[...n.attributes].forEach(a=>{const c=a.name,h=a.value;if(c==="v-model")if(Qr(n)){const u=n;Wt(()=>{u.checked=this.getStateValue(h)==u.value}),u.addEventListener("change",l=>{this.setStateValue(h,l.target.value)})}else if(Zr(n)){const u=n;Wt(()=>{u.checked=da(this.getStateValue(h),u.value)}),u.addEventListener("change",l=>{const d=l.target,f=d.value;d.checked?Hl(this.getStateValue(h),f):Re(this.getStateValue(h),f)})}else if(Jr(n)){const u=n;Wt(()=>{u.value=this.getStateValue(h)}),u.addEventListener("change",l=>{this.setStateValue(h,l.target.value)})}else{const u=n;Wt(()=>{u.value=this.getStateValue(h)});const l=d=>{this.setStateValue(h,d.target.value)};u.addEventListener("input",l)}else c==="v-text"?Wt(()=>{n.innerText=this.getStateValue(h)}):c==="v-html"&&Wt(()=>{n.innerHTML=this.getStateValue(h)})}),n.childNodes.length>0&&this.compile(n);break;case 3:const i=e.textContent||"",r=/\{\{\s*([^{}\s]+)\s*\}\}/g,o=r.exec(i);o&&o[1]&&Wt(()=>{e.textContent=i.replace(r,this.getStateValue(o[1]))});break}})}getStateValue(t){let e=this.state;return t.split(".").forEach(n=>{e=e[n]}),e}setStateValue(t,e){let n=this.state;const i=t.split("."),r=i.length;for(let o=0;o<r-1;o++)n=n[i[o]];n[i[r-1]]=e}static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
|
|
41
41
|
let output = "";
|
|
42
42
|
function echo(html){
|
|
43
43
|
output += html;
|
|
44
44
|
}
|
|
45
45
|
${t}
|
|
46
46
|
return output;
|
|
47
|
-
})`}}class
|
|
48
|
-
`)):d.send(Object.entries(r).map(([v,_])=>`${encodeURIComponent(v)}=${encodeURIComponent(_)}`).join("&"));break}})}async function
|
|
47
|
+
})`}}class Mw{requestid=0;url;socket;waitings={};messageQueue=[];constructor(t){this.url=t,this._connect()}_connect(){this.socket=new WebSocket(this.url),this.socket.onopen=()=>{const t=this.messageQueue.slice();this.messageQueue=[],t.forEach(this._send)},this.socket.onclose=t=>{const{code:e,reason:n,wasClean:i}=t;console.log(`ws(${this.url}) closed : ${e} ${n} ${i}`)},this.socket.onerror=t=>{console.log(`ws(${this.url}) error : ${t.type}`)},this.socket.onmessage=t=>{if(typeof t.data=="string")try{const e=JSON.parse(t.data);if(Object.prototype.hasOwnProperty.call(e,"requestid")){const n=this.waitings[e.requestid];n&&n.resolve?.(e)}}catch{}else t.data instanceof ArrayBuffer||t.data instanceof Blob}}_send(t){this.socket?.readyState===WebSocket.OPEN?this.socket.send(t):(this.messageQueue.push(t),this._connect())}open(){this._connect()}close(){this.socket&&this.socket.close()}async send(t,e=5e3){this.requestid++;const n=this.waitings[this.requestid]={requestid:this.requestid};let i;t instanceof Blob||t instanceof ArrayBuffer||typeof t=="string"?i=t:i=JSON.stringify({...n,...t});const r=await new Promise((o,a)=>{n.resolve=o,this._send(i),setTimeout(()=>{a("Timeout!")},e)});return delete this.waitings[this.requestid],r}}function Aw(s){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let n=100;const i=function(){const r=Math.min(t.clientWidth,s);t.dataset.width=r,t.dataset.rem=n=Math.round(100*(r/s)),t.style.fontSize=n+"px"};i(),window.rem2px=function(r){return r=parseFloat(r),r*n},window.px2rem=function(r){return r=parseFloat(r),r/n},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",i,!1)}function Qs(s=window.location.href){try{return new URL(s)}catch{const e="(?<protocol>https?:)",n="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",o="(?<hash>(?:#.*)?)",c=new RegExp(`^${e}//${n}${i}${r}${o}$`).exec(s);return{href:s,protocol:c?.groups?.protocol??"",host:c?.groups?.host??"",hostname:c?.groups?.hostname??"",port:c?.groups?.port??"",pathname:c?.groups?.pathname??"",search:c?.groups?.search??"",hash:c?.groups?.hash??""}}}function kw(s){const t=Qs(s);return t.protocol==="http:"||t.protocol==="https:"}function Wu(s=window.location.href){const t=Qs(s),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function Iw(s=Qs().search){s=decodeURIComponent(s).replace(/^[#?&]/,"");const t={};if(!s)return t;const e=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let n=e.exec(s);for(;n;)t[n[1]]=n[2],n=e.exec(s);return t}const Dw=(s=window.location.href)=>JSON.parse('{"'+decodeURI(s.split("?")[1]).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}');function Ks(s){return"?"+Object.entries(s).map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&")}function Ju(s){return"?"+[...s.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function Zu(s,t){return s.replace(/(?:\?.*)?$/,t.replace(/^[&?]/,"?"))}function Rw(s,t){return Zu(s,Ks(t))}function Yo(s,t){return s+t.replace(/^[&?]/,s.indexOf("?")>=0?"&":"?")}function Lw(s,t){return Yo(s,Ks(t))}class Ow{worker;cbs={};constructor(t){if(eh)try{this.worker=new Worker(URL.createObjectURL(new Blob([t])))}catch(e){throw typeof console!==void 0&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",e),e}else throw new Error("Your environment do not support Worker !")}postMessage(t,e=[]){this.worker.postMessage(t,e)}onmessage(t){this.worker.addEventListener("message",t)}offmessage(t){this.worker.removeEventListener("message",t)}onmessageerror(t){this.worker.addEventListener("messageerror",t)}offmessageerror(t){this.worker.removeEventListener("messageerror",t)}postCanvas(t){const e=t.transferControlToOffscreen();this.worker.postMessage({canvas:e},[e])}postPort(t){this.worker.postMessage({port:t},[t])}postReset(){this.worker.postMessage({reset:!0});for(const t in this.cbs)this.cbs[t](),delete this.cbs[t]}fire(t,e){return new Promise(n=>{if(e){const i=Math.random().toString(36).slice(2),r=o=>{o.data.id===i&&(this.worker.removeEventListener("message",r),delete this.cbs[i],e(),n())};this.cbs[i]=r.bind(this,{data:{id:i}}),this.worker.addEventListener("message",r),this.worker.postMessage({...t,id:i})}else this.worker.postMessage(t),n()})}}class zw{port1;port2;port1MessageCbs=[];port2MessageCbs=[];port1MessageErrorCbs=[];port2MessageErrorCbs=[];constructor(){const{port1:t,port2:e}=new MessageChannel;this.port1=t,this.port2=e,this.port1.addEventListener("message",n=>{this.port1MessageCbs.forEach(i=>i(this.port1,n))}),this.port1.addEventListener("messageerror",n=>{this.port1MessageErrorCbs.forEach(i=>i(this.port1,n))}),this.port1.start(),this.port2.addEventListener("message",n=>{this.port2MessageCbs.forEach(i=>i(this.port2,n))}),this.port2.addEventListener("messageerror",n=>{this.port2MessageErrorCbs.forEach(i=>i(this.port2,n))}),this.port2.start()}close(){this.port1.close(),this.port2.close()}onPort1Message(t){this.port1MessageCbs.push(t)}onPort1MessageError(t){this.port1MessageErrorCbs.push(t)}offPort1Message(t){Re(this.port1MessageCbs,t)}offPort1MessageError(t){Re(this.port1MessageErrorCbs,t)}onPort2Message(t){this.port2MessageCbs.push(t)}onPort2MessageError(t){this.port2MessageErrorCbs.push(t)}offPort2Message(t){Re(this.port2MessageCbs,t)}offPort2MessageError(t){Re(this.port2MessageErrorCbs,t)}}function Qu(){let s=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0,n=t.length;e<n;e++)try{s=new window.ActiveXObject(t[e]);break}catch{continue}}else s=new XMLHttpRequest;return s}function Fw(s,t){return new Promise((e,n)=>{const{method:i="GET",data:r={},multipartFormDataString:o="",boundary:a="",headers:c={},withCredentials:h=!1,responseType:u="json",timeout:l=3e4}=t||{},d=Qu();d.timeout=l,d.responseType=u,d.onreadystatechange=function(g){d.readyState===4&&(d.status===200?e(d.response):n(d.statusText))},d.ontimeout=()=>{n(`${s} is timed out for ${l}ms.`)},d.addEventListener("load",g=>t?.load?.(g,d),!1),d.addEventListener("loadstart",g=>t?.loadstart?.(g,d),!1),d.addEventListener("loadend",g=>t?.loadend?.(g,d),!1),d.addEventListener("progress",g=>{if(g.lengthComputable){const v=Math.round(g.loaded*100/g.total);t?.progress?.(g,d,v)}},!1),d.addEventListener("error",g=>t?.error?.(g,d),!1),d.addEventListener("abort",g=>t?.abort?.(g,d),!1);const f=i.toUpperCase();Object.assign(c,{Accept:"*/*"});let p=!1,w=!1,x=!1;function b(){h&&(d.withCredentials=!0);for(const g in c)bt(g).toLowerCase()=="content-type"&&c[g].toLowerCase()=="multipart/form-data"?(p=!0,d.setRequestHeader("Content-Type","multipart/form-data; boundary="+a)):(bt(g).toLowerCase()=="content-type"&&(c[g].toLowerCase().indexOf("text/plain")>=0?w=!0:c[g].toLowerCase().indexOf("application/json")>=0&&(x=!0)),d.setRequestHeader(g,c[g]))}switch(f){case"GET":let g="";r instanceof FormData?g=Ju(r):g=Ks(r),d.open("GET",Yo(s,g),!0),b(),d.send(null);break;default:d.open(f,s,!0),b(),p?d.sendAsBinary(o):x?d.send(JSON.stringify(r)):w?d.send(Object.entries(r).map(([v,_])=>`${v}=${_}`).join(`\r
|
|
48
|
+
`)):d.send(Object.entries(r).map(([v,_])=>`${encodeURIComponent(v)}=${encodeURIComponent(_)}`).join("&"));break}})}async function Nw(s){const t={url:s.action||"",data:{},contentType:s.method.toLowerCase()==="post"&&s.enctype?s.enctype:"application/x-www-form-urlencoded",multipartFormDataString:"",boundary:"---------------------------"+Date.now().toString(16)},e=[],n=t.contentType=="multipart/form-data";for(let i=0;i<s.elements.length;i++){const r=s.elements[i];if(!r.hasAttribute("name"))continue;const o=r.getAttribute("type");switch(r.nodeName.toUpperCase()==="INPUT"&&o?o.toUpperCase():""){case"FILE":const c=r;if(n)for(let l=0,d=c.files?.length||0;l<d;l++){const f=c.files?.[l];if(f){const p=await Tn(f,Xt.binaryString);e.push('Content-Disposition: form-data; name="'+c.name+'"; filename="'+f.name+`"\r
|
|
49
49
|
Content-Type: `+f.type+`\r
|
|
50
50
|
\r
|
|
51
51
|
`+p+`\r
|
|
@@ -55,9 +55,9 @@ Content-Type: `+f.type+`\r
|
|
|
55
55
|
`):t.data[u.name]=u.value;break}}return t.multipartFormDataString="--"+t.boundary+`\r
|
|
56
56
|
`+e.join("--"+t.boundary+`\r
|
|
57
57
|
`)+"--"+t.boundary+`--\r
|
|
58
|
-
`,t}class
|
|
58
|
+
`,t}class Bw extends lo{currentItem={};items=[];groups=[];globalStyles={};grad={};idtops={};text="";constructor(t){super(t),this.on("tag",(e,n)=>{switch(this.text="",this.currentItem={type:e},e){case"g":this.groups.push(this.currentItem);break}this.processAttrs(e,n)}),this.on("text",e=>{if(this.currentItem.type=="style"){try{const n=fo(e);for(const i of n.stylesheet.rules)for(const r of i.declarations)for(const o of i.selectors)this.globalStyles[o]=this.globalStyles[o]||[],this.globalStyles[o].push(`${r.property}:${r.value}`)}catch{console.error("CAN'T parse css text: "+e)}return}this.text+=e}),this.on("/tag",(e,n)=>{let i=this.groups.length;for(;i--;)if(this.groups[i]!=this.currentItem){let r="",o="";for(const a in this.groups[i])a=="transform"?r=this.groups[i].transform:a=="class"&&this.globalStyles["."+this.groups[i][a]]?o=this.globalStyles["."+this.groups[i][a]].join(";")+";"+o:a=="id"&&this.globalStyles["#"+this.groups[i][a]]?o=this.globalStyles["#"+this.groups[i][a]].join(";")+";"+o:typeof this.currentItem[a]>"u"&&(this.currentItem[a]=this.groups[i][a]);typeof this.currentItem.transform>"u"?this.currentItem.transform=r:this.currentItem.transform+=" "+r,typeof this.currentItem.style>"u"?this.currentItem.style=o:this.currentItem.style=o+this.currentItem.style,this.currentItem.class&&this.globalStyles["."+this.currentItem.class]?this.currentItem.style=this.globalStyles["."+this.currentItem.class].join(";")+";"+this.currentItem.style:this.currentItem.id&&this.globalStyles["#"+this.currentItem.id]&&(this.currentItem.style=this.globalStyles["#"+this.currentItem.id].join(";")+";"+this.currentItem.style),Xo(this.currentItem.style,this.currentItem,$o)}switch(this.processAttrs(e,n),e){case"g":this.groups.pop();break;case"cirlce":this.addToItems();break;case"ellipse":this.addToItems();break;case"polygon":this.addToItems();break;case"path":this.addToItems();break;case"line":this.addToItems();break;case"rect":this.addToItems();break;case"image":this.addToItems();break;case"text":this.currentItem.text=this.text,this.currentItem["text-anchor"]=this.currentItem["text-anchor"]||"start",this.addToItems();break}}),this.on("finish",()=>{this.emit("result",this.items)})}parse(){return super.parse(),this.items}processAttrs(t,e){let n=[],i;switch(t){case"svg":let r="",o="";if(e.width&&e.height)r=e.width,o=e.height;else if(e.viewBox){const a=e.viewBox.split(/\s+/gi);a.length==4&&(r=String(parseFloat(a[2])-parseFloat(a[0])),o=String(parseFloat(a[3])-parseFloat(a[1])))}r&&o&&this.items.push({type:"viewbox",width:r,height:o});break;case"line":typeof e.x1=="number"&&typeof e.y1=="number"&&typeof e.x2=="number"&&typeof e.y2=="number"&&(this.currentItem.path="M"+[e.x1,e.y1,e.x2,e.y2]);break;case"stop":i={},e.style&&Xo(e.style,i),i.offset=i.offset||e.offset,i.color=i["stop-color"]||e["stop-color"],i.opacity=i["stop-opacity"]||e["stop-opacity"],~(i.offset+"").indexOf("%")?i.offset=parseFloat(i.offset):i.offset=parseFloat(i.offset)*100,i.offset=+i.offset.toFixed(2),this.grad.stops.push(i);break;case"linearGradient":this.grad.angle=(360+Uo(parseFloat(e.x1),parseFloat(e.y1),parseFloat(e.x2),parseFloat(e.y2),parseFloat(e.x1)+100,parseFloat(e.y1))).toFixed(2),n=[this.grad.angle];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break;case"radialGradient":n=[];for(let a=0,c=this.grad.stops.length;a<c;a++)i=this.grad.stops[a],a&&a!=c-1?n.push(i.color+":"+i.offset):n.push(i.color);this.idtops[this.grad.id]=n.join("-"),this.items.forEach(a=>{a.fillid==this.grad.id&&(a.fill=this.idtops[this.grad.id])});break}for(const r in e){const o=e[r];if($o.includes(r)&&(this.currentItem[r]=o),r==="id"&&(this.currentItem.type==="linearGradient"&&(this.grad={id:r,stops:[]}),this.currentItem.type==="radialGradient"&&(this.grad={id:r,stops:[]})),r==="style"&&Xo(o,this.currentItem,$o),r==="transform"&&(this.currentItem.transform=o+(this.currentItem.transform||" ")),r==="fill"){const a=o.match(/url\(#([^)]+)\)/);if(a){const c=a[1];this.currentItem.fillid=c,this.idtops[c]&&(this.currentItem.fill=this.idtops[c])}}r==="points"&&this.currentItem.type=="polygon"&&(this.currentItem.path="M"+o+"z"),r==="d"&&this.currentItem.type=="path"&&(this.currentItem.path=o),r==="xlink:href"&&this.currentItem.type=="image"&&(this.currentItem.src=o)}}addToItems(){this.items.push(this.currentItem)}}function Uo(s,t,e,n,i,r){if(typeof i>"u"||typeof r>"u"){const o=s-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Uo(s,t,i,r)-Uo(e,n,i,r)}function Xo(s,t,e){const n=(s+"").split(";"),i=/^\s+|\s+$/g;for(let r=0,o=n.length;r<o;r++){const a=n[r].split(":"),c=a[0].replace(i,"").replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});(!e||e.includes(c))&&(t[c]=a[1].replace(i,""))}}const $o=["id","class","viewBox","width","height","x","y","cx","cy","r","rx","ry","cursor","opacity","src","fill","fill-opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","font","font-family","font-size","font-style","font-weight","letter-spacing"];class Yw{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new Hn(t),this.remoteVideoUtil=new Hn(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(n=>{this.localVideoUtil.setSrcObject(n),t(n)}).catch(n=>{this.trace(`navigator.getUserMedia error: ${n}.`),e(n)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),n=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),n.length>0&&this.trace(`Using audio device: ${n[0].label}.`);const i=void 0,r=new RTCPeerConnection(i);this.localPeerConnection=r,this.trace("Created local peer connection object localPeerConnection."),r.addEventListener("icecandidate",this.handleConnection),r.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const o=new RTCPeerConnection(i);this.remotePeerConnection=o,this.trace("Created remote peer connection object remotePeerConnection."),o.addEventListener("icecandidate",this.handleConnection),o.addEventListener("iceconnectionstatechange",this.handleConnectionChange),o.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),r.addTrack(e[0],t),r.addTrack(n[0],t),this.trace("localPeerConnection createOffer start."),r.createOffer({offerToReceiveVideo:!0}).then(a=>this.createdOffer(a)).catch(a=>this.setSessionDescriptionError(a))}handleConnection(t){const e=t.target,n=t.candidate;if(e&&n){const i=new RTCIceCandidate(n),r=this.getOtherPeer(e);r&&(r.addIceCandidate(i).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
59
59
|
${t.candidate.candidate}.`))}}handleConnectionSuccess(t){this.trace(`${this.getPeerName(t)} addIceCandidate success.`)}handleConnectionFailure(t,e){this.trace(`${this.getPeerName(t)} failed to add ICE Candidate:
|
|
60
60
|
${e.toString()}.`)}handleConnectionChange(t){const e=t.target;console.log("ICE state change event: ",t),e&&this.trace(`${this.getPeerName(e)} ICE state: ${e.iceConnectionState}.`)}createdOffer(t){this.trace(`Offer from localPeerConnection:
|
|
61
61
|
${t.sdp}`),this.localPeerConnection&&(this.trace("localPeerConnection setLocalDescription start."),this.localPeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.remotePeerConnection&&(this.trace("remotePeerConnection setRemoteDescription start."),this.remotePeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e)),this.trace("remotePeerConnection createAnswer start."),this.remotePeerConnection.createAnswer().then(e=>this.createdAnswer(e)).catch(e=>this.setSessionDescriptionError(e)))}createdAnswer(t){this.trace(`Answer from remotePeerConnection:
|
|
62
|
-
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const n=this.getPeerName(t);this.trace(`${n} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const n=document.createElement("div");n.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(n)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class zw{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const Zu=[],Qu={};function Xo(s){Zu.push(s)}function Fw(s,t=!1){const e=ju();if(Qu[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{Zu.forEach(r=>r())});const n=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],i=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(s,{debug:t,jsApiList:n,openTagList:i})),Qu[e]=!0}function Bw(s){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[s],success:function(n){n.checkResult[s]?t(!0):e(!1)},fail:function(){e(!1)}})})}function Nw(s){Xo(function(){wx.updateAppMessageShareData(s)})}function Yw(s){Xo(function(){wx.updateTimelineShareData(s)})}function Xw(s){wx.chooseImage(s)}function Uw(s){wx.previewImage(s)}function $w(s){wx.uploadImage(s)}function Vw(s){wx.downloadImage(s)}function Gw(s){wx.getLocalImgData(s)}function qw(){wx.startRecord()}function jw(s){wx.stopRecord(s)}function Hw(s){wx.onVoiceRecordEnd(s)}function Ww(s){wx.playVoice(s)}function Jw(s){wx.pauseVoice(s)}function Zw(s){wx.stopVoice(s)}function Qw(s){wx.onVoicePlayEnd(s)}function Kw(s){wx.uploadVoice(s)}function t2(s){wx.downloadVoice(s)}function e2(s){wx.translateVoice(s)}function n2(s){wx.getNetworkType(s)}function s2(s){wx.openLocation(s)}function i2(s){wx.getLocation(s)}function r2(s){wx.scanQRCode(s)}function o2(s,t,e){function n(){WeixinJSBridge.invoke("getBrandWCPayRequest",s,function(i){i.err_msg=="get_brand_wcpay_request:ok"?t():e(i.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",n,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",n),document.attachEvent("onWeixinJSBridgeReady",n)):n()}function a2(s,t,e="snsapi_userinfo",n=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${s}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${n}#wechat_redirect`}function c2(s){window.AlipayJSBridge?s&&s():document.addEventListener("AlipayJSBridgeReady",s,!1)}function Zn(s,t){let e="未知错误";switch(s.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${s.error}(${e}): ${s.errorMessage}`}function h2(s,t,e){ap.tradePay(Object.assign(s,{}),function(n){let i="未知错误";switch(n.resultCode){case 9e3:return i="订单支付成功",t?.(i);case 8e3:i="正在处理中";break;case 4e3:i="订单支付失败";break;case 6001:i="用户中途取消";break;case 6002:i="网络连接出错";break;case 99:i="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(i)})}function u2(s,t,e){ap.scan(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(n){t?.(n.code)})}function l2(s,t,e){ap.getLocation(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(n){t?.(n)})}function f2(s,t,e){ap.openLocation(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(){t?.()})}function d2(s,t,e){ap.chooseImage(Object.assign(s,{fail:n=>{e?.(Zn(n,"chooseImage"))}}),function(n){t?.(n)})}function m2(s,t,e){ap.previewImage(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(){t?.()})}class p2{map;constructor(t,e=120.619585,n=31.299379,i=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,n),i)}}const Ku=window.crypto.subtle;Ku||console.warn("Crypto API not supported");async function tl(s,t="SHA-256"){const e=await Ku.digest(t,Ql(s));return Kl(e)}async function g2(s,t="SHA-256"){const e=JSON.stringify(Vl(s));return tl(e,t)}class y2{currentPage;itemsPerPage;entriesInterval;entriesEdge;linkTo;prevText;nextText;ellipseText;prevShowAlways;nextShowAlways;callback;totalPages;parentVNode;constructor(t,e,n){this.currentPage=n?.currentPage||0,this.itemsPerPage=n?.itemsPerPage||10,this.entriesInterval=n?.entriesInterval||5,this.entriesEdge=n?.entriesEdge||1,this.linkTo=n?.linkTo||"javascript:;",this.prevText=n?.prevText||"上一页",this.nextText=n?.nextText||"下一页",this.ellipseText=n?.ellipseText||"...",this.prevShowAlways=typeof n?.prevShowAlways=="boolean"?n?.prevShowAlways:!0,this.nextShowAlways=typeof n?.nextShowAlways=="boolean"?n?.nextShowAlways:!0,this.callback=n?.callback||(i=>!1),this.totalPages=Math.ceil(e/this.itemsPerPage),this.parentVNode=this.createParentVNode(),gn(this.parentVNode,t),this.selectPage(this.currentPage)}createParentVNode(){return Je("div",{class:"pagination"},[])}appendVNode(t,e,n){e=e<0?0:e<this.totalPages?e:this.totalPages-1;const i=n?.text||String(e+1),r=n?.classes||"";t.children.push(e==this.currentPage&&r.indexOf("prev")==-1&&r.indexOf("next")==-1?Je("span",{class:`current ${r}`},i):Je("a",{class:r,href:this.linkTo.replace(/__id__/,String(e)),onClick:o=>this.selectPage(e,o)},i))}drawLinks(){const t=this.createParentVNode(),e=Math.ceil(this.entriesInterval/2),n=this.currentPage>e?Math.max(Math.min(this.currentPage-e,this.totalPages-this.entriesInterval),0):0,i=this.currentPage>e?Math.min(this.currentPage+e,this.totalPages):Math.min(this.entriesInterval,this.totalPages);if(this.prevText&&(this.currentPage>0||this.prevShowAlways)&&this.appendVNode(t,this.currentPage-1,{text:this.prevText,classes:"prev"}),n>0&&this.entriesEdge>0){const r=Math.min(this.entriesEdge,n);for(let o=0;o<r;o++)this.appendVNode(t,o);this.entriesEdge<n&&this.ellipseText&&t.children.push(Je("span",{},this.ellipseText))}for(let r=n;r<i;r++)this.appendVNode(t,r);if(i<this.totalPages&&this.entriesEdge>0){this.totalPages-this.entriesEdge>i&&this.ellipseText&&t.children.push(Je("span",{},this.ellipseText));const r=Math.max(this.totalPages-this.entriesEdge,i);for(let o=r;o<this.totalPages;o++)this.appendVNode(t,o)}this.nextText&&(this.currentPage<this.totalPages-1||this.nextShowAlways)&&this.appendVNode(t,this.currentPage+1,{text:this.nextText,classes:"next"}),Zs(this.parentVNode,t),this.parentVNode=t}selectPage(t,e){this.currentPage=t=t<0?0:t<this.totalPages?t:this.totalPages-1,this.drawLinks();const n=this.callback(t);return e&&(n||(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)),n}prevPage(){return this.selectPage(this.currentPage-1)}nextPage(){return this.selectPage(this.currentPage+1)}}class w2{config={};axios;constructor(t={}){this.config={...t},this.axios=new ji({baseURL:this.config.baseURL,timeout:this.config.timeout,headers:this.config.headers,responseType:this.config.responseType,responseEncoding:this.config.responseEncoding,interceptor:this.config.interceptor})}}return m.ActionChannel=Sy,m.ArrowShape=So,m.BallShape=pn,m.BezierEasing=vr,m.BufferAttribute=fe,m.COLOR_NAMES=Jn,m.CSSToJSEasing=cg,m.Clock=Cr,m.Color=Vt,m.ColorManagement=bo,m.CommonKeyCode=dy,m.Context=w2,m.CrossShape=Ao,m.CustomCanvasContext=dh,m.CustomCanvasGradient=Fs,m.CustomCanvasPattern=Pr,m.DOMParse=co,m.DOMSVGUtil=Ue,m.DOMToBlob=Wi,m.DOMToString=Hi,m.DOMVideo=Hn,m.Easing=O,m.FetchWithAxios=ji,m.FileUpload=rm,m.Float32BufferAttribute=M0,m.FoxShape=Po,m.HeartShape=Co,m.HeartVariantShape=To,m.Int16BufferAttribute=C0,m.Int32BufferAttribute=E0,m.Int8BufferAttribute=v0,m.Interpolation=ue,m.LineShape=mn,m.LinearSRGBColorSpace=yo,m.LinearToSRGB=je,m.LinearTransfer=wo,m.Ls=Ie,m.MVVM=_w,m.Matrix=_t,m.Matrix2=Or,m.Matrix3=un,m.Matrix4=Dt,m.NoColorSpace=Iu,m.Pagination=y2,m.QRCode=ke,m.RabbitShape=Mo,m.RectShape=We,m.SRGBColorSpace=He,m.SRGBToLinear=qe,m.SRGBTransfer=js,m.SVGParse=Lw,m.SVGParsedPathArgsLength=Fn,m.SegmentShapeCombo=Io,m.Shape=ft,m.ShapeCombo=Yt,m.ShipShapeCombo=ko,m.SliderShapeCombo=Do,m.StarShape=Eo,m.TWEEN=gg,m.Timeline=Rn,m.TreeShapeCombo=_o,m.Tween=Sr,m.Uint16BufferAttribute=T0,m.Uint32BufferAttribute=P0,m.Uint8BufferAttribute=_0,m.Uint8ClampedBufferAttribute=S0,m.Vector2=Bn,m.Vector3=Ft,m.Vector4=Dr,m.WebGLCoordinateSystem=Nn,m.WebGLRenderer=zw,m.WebGPUCoordinateSystem=Lr,m.WebRTCClient=Ow,m.WebSocketClient=Sw,m.YZCanvasContext=Mr,m.YZMessageChannel=Iw,m.YZWorker=kw,m.__color=me,m.addClass=l1,m.addWatermark=p0,m.addWxJsReadyFnBeforeConfig=Xo,m.ajax=Dw,m.aliJsChooseImage=d2,m.aliJsGetLocation=l2,m.aliJsOpenLocation=f2,m.aliJsPreviewImage=m2,m.aliJsReady=c2,m.aliJsScan=u2,m.aliJsTradePay=h2,m.angle=Qt,m.animateShapes=zy,m.animateSpringChainShapes=By,m.animateSpringConnectShapes=Ny,m.animateSpringMassShapes=Yy,m.animationEnd$=J1,m.animationStart$=W1,m.appendURL=Fo,m.appendURLRecord=Aw,m.atomReadAttribute=Sh,m.atomReadAttributes=Ur,m.atomReadStyle=Rg,m.atomReadStyles=Yr,m.atomRemoveAttribute=zg,m.atomRemoveDataset=ew,m.atomRemoveStyle=Xr,m.atomWriteAttribute=fn,m.atomWriteStyle=Ys,m.base64EncodeOutputStream=Mh,m.bitmapMapper=Lh,m.blobToImageData=Xg,m.byteArrayOutputStream=Vr,m.canDrawBitmap=th,m.canUsePaths=Vp,m.canUseWorker=Kc,m.cancelBubble=qc,m.cancelFetch=gw,m.changeBrightness=d0,m.changeCheckboxChecked=o1,m.changeDiaphaneity=m0,m.changeRadioChecked=r1,m.changeSelected=i1,m.changeSize=f0,m.checkWxJsApi=Bw,m.clearCookies=fw,m.clearLocalStorage=nw,m.clearSessionStorage=uw,m.closest=K0,m.combineTransformToMatrix=Lg,m.compareVersion=Ap,m.computeImageDisplayRect=Fg,m.containsChild=W0,m.createDefaultMousePoint=Zr,m.createElement=qh,m.createElementNS=m1,m.createFragment=Gh,m.createIndexDB=mw,m.createObjectURL=Oh,m.createRunCycleInMaxRate=Wp,m.createTextNode=p1,m.createXMLHttpRequest=Ju,m.cssAttrsToCanvasAttrs=Ch,m.distance=Ee,m.domPrefixes=Og,m.drag$=eu,m.dragEnd$=su,m.dragEnter$=ru,m.dragLeave$=ou,m.dragOver$=au,m.dragStart$=nu,m.drawBitmapInCanvas=k0,m.drawQRCodeToCanvas=x0,m.drop$=iu,m.easeNameToCubicBezier=_r,m.empty=Uh,m.fireEvent=Tp,m.flipSideToSide=$g,m.flipUpsideDown=Vg,m.flushURL=Wu,m.flushURLRecord=Mw,m.formDataToSearch=Hu,m.generateRosettaShape=Uy,m.getBitmapFromCanvas=A0,m.getBodyPosition=oy,m.getBrowserClient=dr,m.getBrowserClientVersion=kp,m.getBrowserLanguage=Ip,m.getCSSVar=aw,m.getDOMMatrix=Br,m.getDirection=bg,m.getDocumentElementPosition=Gn,m.getElementPositionInPage=no,m.getElementPositionInPage2=cy,m.getElementPositionInViewport=mu,m.getEmSize=G0,m.getFetchId=Oo,m.getFileExtension=sm,m.getFileMD5Hash=pc,m.getFileTypeFromFile=nm,m.getFormSubmitData=Rw,m.getImageData=Th,m.getImageDataByAIData=y0,m.getImageMainColor=Ug,m.getInnerText=c1,m.getInternetExplorerVersion=Wc,m.getKeyCode=my,m.getMIME=im,m.getMouseButton=fy,m.getMousePositionInElement=lt,m.getMousePositionInPage=so,m.getMousePositionInViewport=ly,m.getOperatingSystem=ks,m.getOperatingSystemVersion=Mp,m.getPageSize=ay,m.getParameters=Pw,m.getPolymorphShapeCombosInterpolator=Fu,m.getPolymorphShapesInterpolator=vo,m.getRelativeBoundingClientRect=hy,m.getRemSize=Gr,m.getScreenPosition=ry,m.getSelectedText=z0,m.getStyle=$e,m.getTheme$=ow,m.getTimeZone=Dp,m.getURL=Qs,m.getVerticalScrollPercentInPage=uy,m.getViewportSize=du,m.getVnode=Tr,m.gifImage=Ah,m.gravitateShapes=Fy,m.h=Je,m.hFromEl=Js,m.hasClass=d1,m.hasDocument=Xp,m.hasHistory=Up,m.hasWindow=Qc,m.hideEl=Vh,m.html=Xh,m.iframePostMessage=g1,m.imageDataToBitmap=Bg,m.imageDataToBlob=Yg,m.imageDataToDataURL=Ng,m.immediateVnode=yg,m.injectStyle=_h,m.injectWxJsConfig=Fw,m.insert=Vn,m.isActiveEl=$0,m.isAliBrowser=Zc,m.isAliMiniProgram=Yp,m.isAndroid=Hc,m.isAppleDevice=Rp,m.isBrowserSupportFileAPI=$p,m.isElement=Gp,m.isEventSupported=Pp,m.isIE=Op,m.isIE10=Fp,m.isIE11=Bp,m.isIE9=zp,m.isIOS=mr,m.isInput=$n,m.isInputCheckbox=Hr,m.isInputNumber=s1,m.isInputRadio=Wr,m.isInputText=n1,m.isMacOS=jc,m.isMobile=Lp,m.isNative=Is,m.isRootEl=U0,m.isSelect=jr,m.isTextArea=e1,m.isTouchSupport=jp,m.isURL=Tw,m.isWxBrowser=Jc,m.isWxMiniProgram=Np,m.jpgToPng=c0,m.keyDown$=cu,m.keyPress$=Z1,m.keyUp$=hu,m.leftRotate=Gg,m.length=cn,m.mapTDTJSSDK=p2,m.marginSharpen=a0,m.microTask=Kp,m.mosaic=g0,m.mount=gn,m.mouseClick$=_1,m.mouseContextMenu$=T1,m.mouseDoubleClick$=S1,m.mouseDown$=Wh,m.mouseEnter$=x1,m.mouseLeave$=v1,m.mouseMove$=$s,m.mouseOut$=b1,m.mouseOver$=w1,m.mouseUp$=Jh,m.mouseWheel$=C1,m.nearestElement=q0,m.nextElementSibling=Z0,m.nextTick=Qp,m.normalizePoint=wg,m.objectSignature=g2,m.onBeforeUnload=Fh,m.onDocumentReady=zh,m.outputGifBase64=kh,m.outputQRCodeBase64=b0,m.pan$=E1,m.panCancel$=k1,m.panDown$=L1,m.panEnd$=A1,m.panLeft$=I1,m.panMove$=P1,m.panRight$=D1,m.panStart$=M1,m.panUp$=R1,m.parent=j0,m.parents=qr,m.parseCSS=ho,m.parseTransformToMatrix=Fr,m.patch=Zs,m.pinch$=O1,m.pinchIn$=z1,m.pinchOut$=F1,m.pngToJpg=h0,m.pointerCancel$=eo,m.pointerDown$=Kr,m.pointerMove$=Qr,m.pointerUp$=to,m.polar=hn,m.polymorphShapesTween=Xy,m.prefixes=qp,m.press$=B1,m.preventDefault=Ce,m.previousElementSibling=Q0,m.radiusClip=l0,m.readFileInBrowser=Tn,m.recordToSearch=Ks,m.rectClip=u0,m.rem2px=V0,m.remove=h1,m.removeClass=f1,m.requestAnimationFrameCycle=pr,m.reverseCSSToJSEasing=hg,m.reverseEaseNameToCubicBezier=ch,m.reverseEasing=sh,m.revokeObjectURL=I0,m.rightRotate=qg,m.rotate$=N1,m.rotatePoint=te,m.scheduleIdle=eh,m.scheduleVnode=Er,m.scheduleYZIdle=br,m.scrollParent=H0,m.scrollTo=Y0,m.searchToRecord=Ew,m.selectFileInBrowser=Ji,m.setCSSVar=cw,m.setIntervalAccurate=Hp,m.setManualScroll=X0,m.setRem=Cw,m.setStyle=Nr,m.setTheme=qu,m.setTimeoutAccurate=gr,m.setWindowTitle=F0,m.shadowRoot=t1,m.sharpen=o0,m.showEl=$h,m.siblings=J0,m.signature=tl,m.simulateMouseEventFromTouch=Ep,m.stringToDOM=em,m.swipe$=Y1,m.swipeDown$=V1,m.swipeLeft$=X1,m.swipeRight$=U1,m.swipeUp$=$1,m.tap$=G1,m.tapOutSide$=q1,m.text=a1,m.toBlackAndWhite=Wg,m.toBlue=Kg,m.toBlueAndGreen=n0,m.toBlueAndGrey=r0,m.toDegree=Et,m.toGreen=Qg,m.toGreenAndGrey=i0,m.toGrey=jg,m.toGrey2=Hg,m.toOpposite=Jg,m.toRadian=J,m.toRed=Zg,m.toRedAndBlue=e0,m.toRedAndGreen=t0,m.toRedAndGrey=s0,m.toggleClass=Jr,m.toggleElDisplay=u1,m.toggleTheme=rw,m.touchCancel$=tu,m.touchEnd$=Kh,m.touchMove$=Zh,m.touchStart$=Qh,m.transformPath2D=Dg,m.transitionEnd$=H1,m.transitionStart$=j1,m.trimHash=ju,m.useAttribute=Ve,m.useClickA=Us,m.useClipboard=N0,m.useCookie=lw,m.useCoords$=Jy,m.useDataset=tw,m.useDraggable=ny,m.useDraw=$y,m.useDrop=sy,m.useElementEventBus=xy,m.useEvent$=U,m.useEventListener=j,m.useFetch=Hs,m.useFetchCache=ww,m.useFetchRetry=yw,m.useFetchRetryCache=bw,m.useHashChange$=Qy,m.useHotKeyDown$=gu,m.useHotKeyFile=gy,m.useHotKeyFile$=yu,m.useHotKeyUp$=py,m.useIntersection=Gy,m.useIntersection$=Nu,m.useLoadImage=Nh,m.useLoadLink=R0,m.useLoadScript=D0,m.useLocalStorage=$u,m.useLocale=zo,m.useLocation$=Uu,m.useMatchMedia$=Xu,m.useMouseAndPointerDownMovePoint$=lu,m.useMouseDownMovePoint$=K1,m.useMouseMovePoint$=Q1,m.useMousePoint=Ge,m.useMutation=Vy,m.useMutation$=Bu,m.usePointerDownMovePoint$=uu,m.usePopStateChange$=Ky,m.usePressDownMove=bu,m.usePressDownMoveWithMouse=vy,m.usePressDownMoveWithPointer=xu,m.usePressDownMoveWithTouch=_y,m.usePull$=ey,m.useResize=wu,m.useResize$=io,m.useRunInSandbox=y1,m.useSafeArea$=Wy,m.useScroll$=fu,m.useSelectFile=Yh,m.useSelectFileImage=O0,m.useSessionStorage=hw,m.useTimestampValue=Ro,m.useTouchDownMovePoint$=ty,m.useUrlChange$=Zy,m.useVisible$=jy,m.useVisibleSimple$=qy,m.useWindowResize=yy,m.useWindowResize$=wy,m.useWindowVisible$=iy,m.vibrate=B0,m.waitForStyleSheetsLoaded=L0,m.writeToIndexDB=pw,m.wxJsChooseImage=Xw,m.wxJsDownloadImage=Vw,m.wxJsDownloadVoice=t2,m.wxJsGetLocalImgData=Gw,m.wxJsGetLocation=i2,m.wxJsGetNetworkType=n2,m.wxJsLogin=a2,m.wxJsOnVoicePlayEnd=Qw,m.wxJsOnVoiceRecordEnd=Hw,m.wxJsOpenLocation=s2,m.wxJsPauseVoice=Jw,m.wxJsPay=o2,m.wxJsPlayVoice=Ww,m.wxJsPreviewImage=Uw,m.wxJsScanQRCode=r2,m.wxJsStartRecord=qw,m.wxJsStopRecord=jw,m.wxJsStopVoice=Zw,m.wxJsTranslateVoice=e2,m.wxJsUpdateAppMessageShareData=Nw,m.wxJsUpdateTimelineShareData=Yw,m.wxJsUploadImage=$w,m.wxJsUploadVoice=Kw,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),m}({});
|
|
62
|
+
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const n=this.getPeerName(t);this.trace(`${n} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const n=document.createElement("div");n.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(n)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class Uw{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}const Ku=[],tl={};function Vo(s){Ku.push(s)}function Xw(s,t=!1){const e=Wu();if(tl[e])return;wx.error(r=>{console.log(r.errMsg||JSON.stringify(r))}),wx.ready(()=>{Ku.forEach(r=>r())});const n=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],i=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(s,{debug:t,jsApiList:n,openTagList:i})),tl[e]=!0}function $w(s){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[s],success:function(n){n.checkResult[s]?t(!0):e(!1)},fail:function(){e(!1)}})})}function Vw(s){Vo(function(){wx.updateAppMessageShareData(s)})}function Gw(s){Vo(function(){wx.updateTimelineShareData(s)})}function qw(s){wx.chooseImage(s)}function jw(s){wx.previewImage(s)}function Hw(s){wx.uploadImage(s)}function Ww(s){wx.downloadImage(s)}function Jw(s){wx.getLocalImgData(s)}function Zw(){wx.startRecord()}function Qw(s){wx.stopRecord(s)}function Kw(s){wx.onVoiceRecordEnd(s)}function t2(s){wx.playVoice(s)}function e2(s){wx.pauseVoice(s)}function n2(s){wx.stopVoice(s)}function s2(s){wx.onVoicePlayEnd(s)}function i2(s){wx.uploadVoice(s)}function r2(s){wx.downloadVoice(s)}function o2(s){wx.translateVoice(s)}function a2(s){wx.getNetworkType(s)}function c2(s){wx.openLocation(s)}function h2(s){wx.getLocation(s)}function u2(s){wx.scanQRCode(s)}function l2(s,t,e){function n(){WeixinJSBridge.invoke("getBrandWCPayRequest",s,function(i){i.err_msg=="get_brand_wcpay_request:ok"?t():e(i.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",n,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",n),document.attachEvent("onWeixinJSBridgeReady",n)):n()}function f2(s,t,e="snsapi_userinfo",n=""){return`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${s}&redirect_uri=${encodeURIComponent(t)}&response_type=code&scope=${e}&state=${n}#wechat_redirect`}function d2(s){window.AlipayJSBridge?s&&s():document.addEventListener("AlipayJSBridgeReady",s,!1)}function Zn(s,t){let e="未知错误";switch(s.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${s.error}(${e}): ${s.errorMessage}`}function m2(s,t,e){ap.tradePay(Object.assign(s,{}),function(n){let i="未知错误";switch(n.resultCode){case 9e3:return i="订单支付成功",t?.(i);case 8e3:i="正在处理中";break;case 4e3:i="订单支付失败";break;case 6001:i="用户中途取消";break;case 6002:i="网络连接出错";break;case 99:i="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(i)})}function p2(s,t,e){ap.scan(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(n){t?.(n.code)})}function g2(s,t,e){ap.getLocation(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(n){t?.(n)})}function y2(s,t,e){ap.openLocation(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(){t?.()})}function w2(s,t,e){ap.chooseImage(Object.assign(s,{fail:n=>{e?.(Zn(n,"chooseImage"))}}),function(n){t?.(n)})}function b2(s,t,e){ap.previewImage(Object.assign(s,{fail:n=>{e?.(Zn(n))}}),function(){t?.()})}class x2{map;constructor(t,e=120.619585,n=31.299379,i=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,n),i)}}const el=window.crypto.subtle;el||console.warn("Crypto API not supported");async function nl(s,t="SHA-256"){const e=await el.digest(t,tf(s));return ef(e)}async function v2(s,t="SHA-256"){const e=JSON.stringify(ql(s));return nl(e,t)}class _2{currentPage;itemsPerPage;entriesInterval;entriesEdge;linkTo;prevText;nextText;ellipseText;prevShowAlways;nextShowAlways;callback;totalPages;parentVNode;constructor(t,e,n){this.currentPage=n?.currentPage||0,this.itemsPerPage=n?.itemsPerPage||10,this.entriesInterval=n?.entriesInterval||5,this.entriesEdge=n?.entriesEdge||1,this.linkTo=n?.linkTo||"javascript:;",this.prevText=n?.prevText||"上一页",this.nextText=n?.nextText||"下一页",this.ellipseText=n?.ellipseText||"...",this.prevShowAlways=typeof n?.prevShowAlways=="boolean"?n?.prevShowAlways:!0,this.nextShowAlways=typeof n?.nextShowAlways=="boolean"?n?.nextShowAlways:!0,this.callback=n?.callback||(i=>!1),this.totalPages=Math.ceil(e/this.itemsPerPage),this.parentVNode=this.createParentVNode(),pn(this.parentVNode,t),this.selectPage(this.currentPage)}createParentVNode(){return We("div",{class:"pagination"},[])}appendVNode(t,e,n){e=e<0?0:e<this.totalPages?e:this.totalPages-1;const i=n?.text||String(e+1),r=n?.classes||"";t.children.push(e==this.currentPage&&r.indexOf("prev")==-1&&r.indexOf("next")==-1?We("span",{class:`current ${r}`},i):We("a",{class:r,href:this.linkTo.replace(/__id__/,String(e)),onClick:o=>this.selectPage(e,o)},i))}drawLinks(){const t=this.createParentVNode(),e=Math.ceil(this.entriesInterval/2),n=this.currentPage>e?Math.max(Math.min(this.currentPage-e,this.totalPages-this.entriesInterval),0):0,i=this.currentPage>e?Math.min(this.currentPage+e,this.totalPages):Math.min(this.entriesInterval,this.totalPages);if(this.prevText&&(this.currentPage>0||this.prevShowAlways)&&this.appendVNode(t,this.currentPage-1,{text:this.prevText,classes:"prev"}),n>0&&this.entriesEdge>0){const r=Math.min(this.entriesEdge,n);for(let o=0;o<r;o++)this.appendVNode(t,o);this.entriesEdge<n&&this.ellipseText&&t.children.push(We("span",{},this.ellipseText))}for(let r=n;r<i;r++)this.appendVNode(t,r);if(i<this.totalPages&&this.entriesEdge>0){this.totalPages-this.entriesEdge>i&&this.ellipseText&&t.children.push(We("span",{},this.ellipseText));const r=Math.max(this.totalPages-this.entriesEdge,i);for(let o=r;o<this.totalPages;o++)this.appendVNode(t,o)}this.nextText&&(this.currentPage<this.totalPages-1||this.nextShowAlways)&&this.appendVNode(t,this.currentPage+1,{text:this.nextText,classes:"next"}),Zs(this.parentVNode,t),this.parentVNode=t}selectPage(t,e){this.currentPage=t=t<0?0:t<this.totalPages?t:this.totalPages-1,this.drawLinks();const n=this.callback(t);return e&&(n||(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)),n}prevPage(){return this.selectPage(this.currentPage-1)}nextPage(){return this.selectPage(this.currentPage+1)}}class S2{config;store;axios;constructor(t={}){this.config=t,this.config.static=this.config.static||{};const e=this.config.store?.state||{};this.store=Ia(this.config.store?.reducer||(()=>e),e,this.config.store?.enhancer),this.axios=new Ji({baseURL:this.config.axios?.baseURL,timeout:this.config.axios?.timeout,headers:this.config.axios?.headers,responseType:this.config.axios?.responseType,responseEncoding:this.config.axios?.responseEncoding,interceptor:this.config.axios?.interceptor,retry:this.config.axios?.retry,cache:this.config.axios?.cache})}}return m.ActionChannel=My,m.ArrowShape=Eo,m.BallShape=mn,m.BezierEasing=Cr,m.BufferAttribute=fe,m.COLOR_NAMES=Jn,m.CSSToJSEasing=dg,m.Clock=Pr,m.Color=Vt,m.ColorManagement=_o,m.CommonKeyCode=wy,m.Context=S2,m.CrossShape=Do,m.CustomCanvasContext=ph,m.CustomCanvasGradient=Fs,m.CustomCanvasPattern=kr,m.DOMParse=lo,m.DOMSVGUtil=Ue,m.DOMToBlob=Qi,m.DOMToString=Zi,m.DOMVideo=Hn,m.Easing=O,m.FetchWithAxios=Ji,m.FileUpload=um,m.Float32BufferAttribute=R0,m.FoxShape=ko,m.HeartShape=Po,m.HeartVariantShape=Mo,m.Int16BufferAttribute=A0,m.Int32BufferAttribute=I0,m.Int8BufferAttribute=E0,m.Interpolation=ue,m.LineShape=dn,m.LinearSRGBColorSpace=xo,m.LinearToSRGB=qe,m.LinearTransfer=vo,m.Ls=ke,m.MVVM=Pw,m.Matrix=_t,m.Matrix2=Nr,m.Matrix3=hn,m.Matrix4=Rt,m.NoColorSpace=Ru,m.Pagination=_2,m.QRCode=Ae,m.RabbitShape=Io,m.RectShape=He,m.SRGBColorSpace=je,m.SRGBToLinear=Ge,m.SRGBTransfer=js,m.SVGParse=Bw,m.SVGParsedPathArgsLength=Fn,m.SegmentShapeCombo=Lo,m.Shape=ft,m.ShapeCombo=Ut,m.ShipShapeCombo=Ro,m.SliderShapeCombo=Oo,m.StarShape=Ao,m.TWEEN=vg,m.Timeline=Rn,m.TreeShapeCombo=To,m.Tween=Er,m.Uint16BufferAttribute=k0,m.Uint32BufferAttribute=D0,m.Uint8BufferAttribute=P0,m.Uint8ClampedBufferAttribute=M0,m.Vector2=Nn,m.Vector3=Nt,m.Vector4=Or,m.WebGLCoordinateSystem=Bn,m.WebGLRenderer=Uw,m.WebGPUCoordinateSystem=Fr,m.WebRTCClient=Yw,m.WebSocketClient=Mw,m.YZCanvasContext=Ir,m.YZMessageChannel=zw,m.YZWorker=Ow,m.__color=me,m.addClass=g1,m.addWatermark=x0,m.addWxJsReadyFnBeforeConfig=Vo,m.ajax=Fw,m.aliJsChooseImage=w2,m.aliJsGetLocation=g2,m.aliJsOpenLocation=y2,m.aliJsPreviewImage=b2,m.aliJsReady=d2,m.aliJsScan=p2,m.aliJsTradePay=m2,m.angle=Qt,m.animateShapes=Uy,m.animateSpringChainShapes=$y,m.animateSpringConnectShapes=Vy,m.animateSpringMassShapes=Gy,m.animationEnd$=ey,m.animationStart$=ty,m.appendURL=Yo,m.appendURLRecord=Lw,m.atomReadAttribute=Th,m.atomReadAttributes=Gr,m.atomReadStyle=Ng,m.atomReadStyles=$r,m.atomRemoveAttribute=Ug,m.atomRemoveDataset=ow,m.atomRemoveStyle=Vr,m.atomWriteAttribute=ln,m.atomWriteStyle=Ys,m.base64EncodeOutputStream=kh,m.bitmapMapper=zh,m.blobToImageData=qg,m.byteArrayOutputStream=jr,m.canDrawBitmap=nh,m.canUsePaths=Wp,m.canUseWorker=eh,m.cancelBubble=Hc,m.cancelFetch=vw,m.changeBrightness=w0,m.changeCheckboxChecked=l1,m.changeDiaphaneity=b0,m.changeRadioChecked=u1,m.changeSelected=h1,m.changeSize=y0,m.checkWxJsApi=$w,m.clearCookies=yw,m.clearLocalStorage=aw,m.clearSessionStorage=pw,m.closeLog=df,m.closest=i1,m.combineTransformToMatrix=Bg,m.compareVersion=Lp,m.computeImageDisplayRect=Xg,m.containsChild=t1,m.createDefaultMousePoint=to,m.createElement=Hh,m.createElementNS=b1,m.createFragment=jh,m.createIndexDB=bw,m.createObjectURL=Fh,m.createRunCycleInMaxRate=tg,m.createTextNode=x1,m.createXMLHttpRequest=Qu,m.cssAttrsToCanvasAttrs=Eh,m.distance=Te,m.domPrefixes=Yg,m.drag$=su,m.dragEnd$=ru,m.dragEnter$=au,m.dragLeave$=cu,m.dragOver$=hu,m.dragStart$=iu,m.drawBitmapInCanvas=O0,m.drawQRCodeToCanvas=T0,m.drop$=ou,m.easeNameToCubicBezier=Tr,m.empty=Vh,m.fireEvent=kp,m.flipSideToSide=Hg,m.flipUpsideDown=Wg,m.flushURL=Zu,m.flushURLRecord=Rw,m.formDataToSearch=Ju,m.generateRosettaShape=jy,m.getBitmapFromCanvas=L0,m.getBodyPosition=ly,m.getBrowserClient=gr,m.getBrowserClientVersion=Op,m.getBrowserLanguage=zp,m.getCSSVar=fw,m.getDOMMatrix=Ur,m.getDirection=Cg,m.getDocumentElementPosition=Gn,m.getElementPositionInPage=ro,m.getElementPositionInPage2=dy,m.getElementPositionInViewport=gu,m.getEmSize=J0,m.getFetchId=No,m.getFileExtension=cm,m.getFileMD5Hash=yc,m.getFileTypeFromFile=am,m.getFormSubmitData=Nw,m.getImageData=Ph,m.getImageDataByAIData=_0,m.getImageMainColor=jg,m.getInnerText=d1,m.getInternetExplorerVersion=Zc,m.getKeyCode=by,m.getMIME=hm,m.getMouseButton=yy,m.getMousePositionInElement=lt,m.getMousePositionInPage=oo,m.getMousePositionInViewport=gy,m.getOperatingSystem=ks,m.getOperatingSystemVersion=Rp,m.getPageSize=fy,m.getParameters=Dw,m.getPolymorphShapeCombosInterpolator=Bu,m.getPolymorphShapesInterpolator=Co,m.getRelativeBoundingClientRect=my,m.getRemSize=Hr,m.getScreenPosition=uy,m.getSelectedText=U0,m.getStyle=Xe,m.getTheme$=lw,m.getTimeZone=Fp,m.getURL=Qs,m.getVerticalScrollPercentInPage=py,m.getViewportSize=pu,m.getVnode=Mr,m.gifImage=Ih,m.gravitateShapes=Xy,m.h=We,m.hFromEl=Js,m.hasClass=w1,m.hasDocument=qp,m.hasHistory=jp,m.hasWindow=th,m.hideEl=qh,m.html=$h,m.iframePostMessage=v1,m.imageDataToBitmap=$g,m.imageDataToBlob=Gg,m.imageDataToDataURL=Vg,m.immediateVnode=_g,m.injectStyle=Ch,m.injectWxJsConfig=Xw,m.insert=Vn,m.isActiveEl=H0,m.isAliBrowser=Kc,m.isAliMiniProgram=Gp,m.isAndroid=Jc,m.isAppleDevice=Np,m.isBrowserSupportFileAPI=Hp,m.isElement=Jp,m.isEventSupported=Dp,m.isIE=Yp,m.isIE10=Xp,m.isIE11=$p,m.isIE9=Up,m.isIOS=yr,m.isInput=$n,m.isInputCheckbox=Zr,m.isInputNumber=c1,m.isInputRadio=Qr,m.isInputText=a1,m.isMacOS=Wc,m.isMobile=Bp,m.isNative=Is,m.isRootEl=j0,m.isSelect=Jr,m.isTextArea=o1,m.isTouchSupport=Qp,m.isURL=kw,m.isWxBrowser=Qc,m.isWxMiniProgram=Vp,m.jpgToPng=d0,m.keyDown$=uu,m.keyPress$=ny,m.keyUp$=lu,m.leftRotate=Jg,m.length=an,m.mapTDTJSSDK=x2,m.marginSharpen=f0,m.microTask=ig,m.mosaic=v0,m.mount=pn,m.mouseClick$=P1,m.mouseContextMenu$=k1,m.mouseDoubleClick$=M1,m.mouseDown$=Zh,m.mouseEnter$=T1,m.mouseLeave$=E1,m.mouseMove$=$s,m.mouseOut$=C1,m.mouseOver$=S1,m.mouseUp$=Qh,m.mouseWheel$=A1,m.nearestElement=Z0,m.nextElementSibling=n1,m.nextTick=sg,m.normalizePoint=Sg,m.objectSignature=v2,m.onBeforeUnload=Bh,m.onDocumentReady=Nh,m.openLog=ff,m.outputGifBase64=Dh,m.outputQRCodeBase64=C0,m.pan$=I1,m.panCancel$=O1,m.panDown$=B1,m.panEnd$=L1,m.panLeft$=z1,m.panMove$=D1,m.panRight$=F1,m.panStart$=R1,m.panUp$=N1,m.parent=Q0,m.parents=Wr,m.parseCSS=fo,m.parseTransformToMatrix=Yr,m.patch=Zs,m.pinch$=Y1,m.pinchIn$=U1,m.pinchOut$=X1,m.pngToJpg=m0,m.pointerCancel$=io,m.pointerDown$=no,m.pointerMove$=eo,m.pointerUp$=so,m.polar=cn,m.polymorphShapesTween=qy,m.prefixes=Zp,m.press$=$1,m.preventDefault=Se,m.previousElementSibling=s1,m.radiusClip=g0,m.readFileInBrowser=Tn,m.recordToSearch=Ks,m.rectClip=p0,m.rem2px=W0,m.remove=m1,m.removeClass=y1,m.requestAnimationFrameCycle=wr,m.reverseCSSToJSEasing=mg,m.reverseEaseNameToCubicBezier=uh,m.reverseEasing=rh,m.revokeObjectURL=z0,m.rightRotate=Zg,m.rotate$=V1,m.rotatePoint=te,m.scheduleIdle=sh,m.scheduleVnode=Ar,m.scheduleYZIdle=_r,m.scrollParent=K0,m.scrollTo=G0,m.searchToRecord=Iw,m.selectFileInBrowser=Ki,m.setCSSVar=dw,m.setIntervalAccurate=Kp,m.setLogUploadFn=mf,m.setManualScroll=q0,m.setRem=Aw,m.setStyle=Xr,m.setTheme=Hu,m.setTimeoutAccurate=br,m.setWindowTitle=X0,m.shadowRoot=r1,m.sharpen=l0,m.showEl=Gh,m.siblings=e1,m.signature=nl,m.simulateMouseEventFromTouch=Ip,m.stringToDOM=om,m.swipe$=G1,m.swipeDown$=W1,m.swipeLeft$=q1,m.swipeRight$=j1,m.swipeUp$=H1,m.tap$=J1,m.tapOutSide$=Z1,m.text=f1,m.toBlackAndWhite=t0,m.toBlue=i0,m.toBlueAndGreen=a0,m.toBlueAndGrey=u0,m.toDegree=Pt,m.toGreen=s0,m.toGreenAndGrey=h0,m.toGrey=Qg,m.toGrey2=Kg,m.toOpposite=e0,m.toRadian=J,m.toRed=n0,m.toRedAndBlue=o0,m.toRedAndGreen=r0,m.toRedAndGrey=c0,m.toggleClass=Kr,m.toggleElDisplay=p1,m.toggleTheme=uw,m.touchCancel$=nu,m.touchEnd$=eu,m.touchMove$=Kh,m.touchStart$=tu,m.transformPath2D=Fg,m.transitionEnd$=K1,m.transitionStart$=Q1,m.trimHash=Wu,m.useAttribute=$e,m.useClickA=Xs,m.useClipboard=V0,m.useCookie=gw,m.useCoords$=ew,m.useDataset=rw,m.useDraggable=ay,m.useDraw=Hy,m.useDrop=cy,m.useElementEventBus=Ty,m.useEvent$=X,m.useEventListener=j,m.useFetch=Hs,m.useFetchCache=Sw,m.useFetchRetry=_w,m.useFetchRetryCache=Cw,m.useHashChange$=sw,m.useHotKeyDown$=wu,m.useHotKeyFile=vy,m.useHotKeyFile$=bu,m.useHotKeyUp$=xy,m.useIntersection=Jy,m.useIntersection$=Uu,m.useLoadImage=Uh,m.useLoadLink=N0,m.useLoadScript=F0,m.useLocalStorage=Gu,m.useLocale=Bo,m.useLocation$=Vu,m.useMatchMedia$=$u,m.useMouseAndPointerDownMovePoint$=du,m.useMouseDownMovePoint$=iy,m.useMouseMovePoint$=sy,m.useMousePoint=Ve,m.useMutation=Wy,m.useMutation$=Yu,m.usePointerDownMovePoint$=fu,m.usePopStateChange$=iw,m.usePressDownMove=vu,m.usePressDownMoveWithMouse=Ey,m.usePressDownMoveWithPointer=_u,m.usePressDownMoveWithTouch=Py,m.usePull$=oy,m.useResize=xu,m.useResize$=ao,m.useRunInSandbox=_1,m.useSafeArea$=tw,m.useScroll$=mu,m.useSelectFile=Xh,m.useSelectFileImage=Y0,m.useSessionStorage=mw,m.useTimestampValue=zo,m.useTouchDownMovePoint$=ry,m.useUrlChange$=nw,m.useVisible$=Qy,m.useVisibleSimple$=Zy,m.useWindowResize=_y,m.useWindowResize$=Sy,m.useWindowVisible$=hy,m.vibrate=$0,m.waitForStyleSheetsLoaded=B0,m.writeToIndexDB=xw,m.wxJsChooseImage=qw,m.wxJsDownloadImage=Ww,m.wxJsDownloadVoice=r2,m.wxJsGetLocalImgData=Jw,m.wxJsGetLocation=h2,m.wxJsGetNetworkType=a2,m.wxJsLogin=f2,m.wxJsOnVoicePlayEnd=s2,m.wxJsOnVoiceRecordEnd=Kw,m.wxJsOpenLocation=c2,m.wxJsPauseVoice=e2,m.wxJsPay=l2,m.wxJsPlayVoice=t2,m.wxJsPreviewImage=jw,m.wxJsScanQRCode=u2,m.wxJsStartRecord=Zw,m.wxJsStopRecord=Qw,m.wxJsStopVoice=n2,m.wxJsTranslateVoice=o2,m.wxJsUpdateAppMessageShareData=Vw,m.wxJsUpdateTimelineShareData=Gw,m.wxJsUploadImage=Hw,m.wxJsUploadVoice=i2,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),m}({});
|
|
63
63
|
//# sourceMappingURL=zyzgroup_core_web.iife.js.map
|