@zyzgroup/core-vue 0.0.1
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/README.md +9 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/dist/zyzgroup_core_vue.iife.js +43 -0
- package/dist/zyzgroup_core_vue.js +28265 -0
- package/dist/zyzgroup_core_vue.umd.cjs +43 -0
- package/package.json +37 -0
- package/types/App.vue.d.ts +2 -0
- package/types/components/Icon.vue.d.ts +37 -0
- package/types/lib.d.ts +2 -0
- package/types/main.d.ts +1 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var ZYZGroupCoreVue=function(_r,Ze){"use strict";var FO=Object.defineProperty;var NO=(_r,Ze,zn)=>Ze in _r?FO(_r,Ze,{enumerable:!0,configurable:!0,writable:!0,value:zn}):_r[Ze]=zn;var Tt=(_r,Ze,zn)=>(NO(_r,typeof Ze!="symbol"?Ze+"":Ze,zn),zn);const zn=/^[a-z0-9]+(-[a-z0-9]+)*$/,fo=(n,t,e,r="")=>{const i=n.split(":");if(n.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const o=i.pop(),h=i.pop(),l={provider:i.length>0?i[0]:r,prefix:h,name:o};return t&&!po(l)?null:l}const s=i[0],a=s.split("-");if(a.length>1){const o={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!po(o)?null:o}if(e&&r===""){const o={provider:r,prefix:"",name:s};return t&&!po(o,e)?null:o}return null},po=(n,t)=>n?!!((n.provider===""||n.provider.match(zn))&&(t&&n.prefix===""||n.prefix.match(zn))&&n.name.match(zn)):!1,Ad=Object.freeze({left:0,top:0,width:16,height:16}),go=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),mo=Object.freeze({...Ad,...go}),Hl=Object.freeze({...mo,body:"",hidden:!1});function Yv(n,t){const e={};!n.hFlip!=!t.hFlip&&(e.hFlip=!0),!n.vFlip!=!t.vFlip&&(e.vFlip=!0);const r=((n.rotate||0)+(t.rotate||0))%4;return r&&(e.rotate=r),e}function Od(n,t){const e=Yv(n,t);for(const r in Hl)r in go?r in n&&!(r in e)&&(e[r]=go[r]):r in t?e[r]=t[r]:r in n&&(e[r]=n[r]);return e}function Xv(n,t){const e=n.icons,r=n.aliases||Object.create(null),i=Object.create(null);function s(a){if(e[a])return i[a]=[];if(!(a in i)){i[a]=null;const o=r[a]&&r[a].parent,h=o&&s(o);h&&(i[a]=[o].concat(h))}return i[a]}return Object.keys(e).concat(Object.keys(r)).forEach(s),i}function Jv(n,t,e){const r=n.icons,i=n.aliases||Object.create(null);let s={};function a(o){s=Od(r[o]||i[o],s)}return a(t),e.forEach(a),Od(n,s)}function $d(n,t){const e=[];if(typeof n!="object"||typeof n.icons!="object")return e;n.not_found instanceof Array&&n.not_found.forEach(i=>{t(i,null),e.push(i)});const r=Xv(n);for(const i in r){const s=r[i];s&&(t(i,Jv(n,i,s)),e.push(i))}return e}const Qv={provider:"",aliases:{},not_found:{},...Ad};function ql(n,t){for(const e in t)if(e in n&&typeof n[e]!=typeof t[e])return!1;return!0}function Fd(n){if(typeof n!="object"||n===null)return null;const t=n;if(typeof t.prefix!="string"||!n.icons||typeof n.icons!="object"||!ql(n,Qv))return null;const e=t.icons;for(const i in e){const s=e[i];if(!i.match(zn)||typeof s.body!="string"||!ql(s,Hl))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i.match(zn)||typeof a!="string"||!e[a]&&!r[a]||!ql(s,Hl))return null}return t}const Nd=Object.create(null);function Zv(n,t){return{provider:n,prefix:t,icons:Object.create(null),missing:new Set}}function fi(n,t){const e=Nd[n]||(Nd[n]=Object.create(null));return e[t]||(e[t]=Zv(n,t))}function Kl(n,t){return Fd(t)?$d(t,(e,r)=>{r?n.icons[e]=r:n.missing.add(e)}):[]}function Wv(n,t,e){try{if(typeof e.body=="string")return n.icons[t]={...e},!0}catch{}return!1}let Ss=!1;function Rd(n){return typeof n=="boolean"&&(Ss=n),Ss}function t2(n){const t=typeof n=="string"?fo(n,!0,Ss):n;if(t){const e=fi(t.provider,t.prefix),r=t.name;return e.icons[r]||(e.missing.has(r)?null:void 0)}}function e2(n,t){const e=fo(n,!0,Ss);if(!e)return!1;const r=fi(e.provider,e.prefix);return Wv(r,e.name,t)}function n2(n,t){if(typeof n!="object")return!1;if(typeof t!="string"&&(t=n.provider||""),Ss&&!t&&!n.prefix){let i=!1;return Fd(n)&&(n.prefix="",$d(n,(s,a)=>{a&&e2(s,a)&&(i=!0)})),i}const e=n.prefix;if(!po({provider:t,prefix:e,name:"a"}))return!1;const r=fi(t,e);return!!Kl(r,n)}const Dd=Object.freeze({width:null,height:null}),Md=Object.freeze({...Dd,...go}),r2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,i2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Id(n,t,e){if(t===1)return n;if(e=e||100,typeof n=="number")return Math.ceil(n*t*e)/e;if(typeof n!="string")return n;const r=n.split(r2);if(r===null||!r.length)return n;const i=[];let s=r.shift(),a=i2.test(s);for(;;){if(a){const o=parseFloat(s);isNaN(o)?i.push(s):i.push(Math.ceil(o*t*e)/e)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function s2(n,t="defs"){let e="";const r=n.indexOf("<"+t);for(;r>=0;){const i=n.indexOf(">",r),s=n.indexOf("</"+t);if(i===-1||s===-1)break;const a=n.indexOf(">",s);if(a===-1)break;e+=n.slice(i+1,s).trim(),n=n.slice(0,r).trim()+n.slice(a+1)}return{defs:e,content:n}}function a2(n,t){return n?"<defs>"+n+"</defs>"+t:t}function o2(n,t,e){const r=s2(n);return a2(r.defs,t+r.content+e)}const l2=n=>n==="unset"||n==="undefined"||n==="none";function h2(n,t){const e={...mo,...n},r={...Md,...t},i={left:e.left,top:e.top,width:e.width,height:e.height};let s=e.body;[e,r].forEach(v=>{const _=[],S=v.hFlip,x=v.vFlip;let m=v.rotate;S?x?m+=2:(_.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),_.push("scale(-1 1)"),i.top=i.left=0):x&&(_.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),_.push("scale(1 -1)"),i.top=i.left=0);let k;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:k=i.height/2+i.top,_.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:_.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:k=i.width/2+i.left,_.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}m%2===1&&(i.left!==i.top&&(k=i.left,i.left=i.top,i.top=k),i.width!==i.height&&(k=i.width,i.width=i.height,i.height=k)),_.length&&(s=o2(s,'<g transform="'+_.join(" ")+'">',"</g>"))});const a=r.width,o=r.height,h=i.width,l=i.height;let c,f;a===null?(f=o===null?"1em":o==="auto"?l:o,c=Id(f,h/l)):(c=a==="auto"?h:a,f=o===null?Id(c,l/h):o==="auto"?l:o);const d={},u=(v,_)=>{l2(_)||(d[v]=_.toString())};u("width",c),u("height",f);const p=[i.left,i.top,h,l];return d.viewBox=p.join(" "),{attributes:d,viewBox:p,body:s}}const c2=/\sid="(\S+)"/g,u2="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let d2=0;function f2(n,t=u2){const e=[];let r;for(;r=c2.exec(n);)e.push(r[1]);if(!e.length)return n;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(s=>{const a=typeof t=="function"?t(s):t+(d2++).toString(),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),n=n.replace(new RegExp(i,"g"),""),n}const Yl=Object.create(null);function p2(n,t){Yl[n]=t}function Xl(n){return Yl[n]||Yl[""]}function Jl(n){let t;if(typeof n.resources=="string")t=[n.resources];else if(t=n.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:n.path||"/",maxURL:n.maxURL||500,rotate:n.rotate||750,timeout:n.timeout||5e3,random:n.random===!0,index:n.index||0,dataAfterTimeout:n.dataAfterTimeout!==!1}}const Ql=Object.create(null),ks=["https://api.simplesvg.com","https://api.unisvg.com"],yo=[];for(;ks.length>0;)ks.length===1||Math.random()>.5?yo.push(ks.shift()):yo.push(ks.pop());Ql[""]=Jl({resources:["https://api.iconify.design"].concat(yo)});function g2(n,t){const e=Jl(t);return e===null?!1:(Ql[n]=e,!0)}function Zl(n){return Ql[n]}let jd=(()=>{let n;try{if(n=fetch,typeof n=="function")return n}catch{}})();function m2(n,t){const e=Zl(n);if(!e)return 0;let r;if(!e.maxURL)r=0;else{let i=0;e.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=e.maxURL-i-e.path.length-s.length}return r}function y2(n){return n===404}const v2=(n,t,e)=>{const r=[],i=m2(n,t),s="icons";let a={type:s,provider:n,prefix:t,icons:[]},o=0;return e.forEach((h,l)=>{o+=h.length+1,o>=i&&l>0&&(r.push(a),a={type:s,provider:n,prefix:t,icons:[]},o=h.length),a.icons.push(h)}),r.push(a),r};function _2(n){if(typeof n=="string"){const t=Zl(n);if(t)return t.path}return"/"}const w2={prepare:v2,send:(n,t,e)=>{if(!jd){e("abort",424);return}let r=_2(t.provider);switch(t.type){case"icons":{const s=t.prefix,o=t.icons.join(","),h=new URLSearchParams({icons:o});r+=s+".json?"+h.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:e("abort",400);return}let i=503;jd(n+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{e(y2(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?e("abort",s):e("next",i)});return}setTimeout(()=>{e("success",s)})}).catch(()=>{e("next",i)})}};function x2(n){const t={loaded:[],missing:[],pending:[]},e=Object.create(null);n.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return n.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,o=i.name,h=e[s]||(e[s]=Object.create(null)),l=h[a]||(h[a]=fi(s,a));let c;o in l.icons?c=t.loaded:a===""||l.missing.has(o)?c=t.missing:c=t.pending;const f={provider:s,prefix:a,name:o};c.push(f)}),t}function Ld(n,t){n.forEach(e=>{const r=e.loaderCallbacks;r&&(e.loaderCallbacks=r.filter(i=>i.id!==t))})}function b2(n){n.pendingCallbacksFlag||(n.pendingCallbacksFlag=!0,setTimeout(()=>{n.pendingCallbacksFlag=!1;const t=n.loaderCallbacks?n.loaderCallbacks.slice(0):[];if(!t.length)return;let e=!1;const r=n.provider,i=n.prefix;t.forEach(s=>{const a=s.icons,o=a.pending.length;a.pending=a.pending.filter(h=>{if(h.prefix!==i)return!0;const l=h.name;if(n.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(n.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return e=!0,!0;return!1}),a.pending.length!==o&&(e||Ld([n],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let S2=0;function k2(n,t,e){const r=S2++,i=Ld.bind(null,e,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:n,abort:i};return e.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function C2(n,t=!0,e=!1){const r=[];return n.forEach(i=>{const s=typeof i=="string"?fo(i,t,e):i;s&&r.push(s)}),r}var T2={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function P2(n,t,e,r){const i=n.resources.length,s=n.random?Math.floor(Math.random()*i):n.index;let a;if(n.random){let P=n.resources.slice(0);for(a=[];P.length>1;){const N=Math.floor(Math.random()*P.length);a.push(P[N]),P=P.slice(0,N).concat(P.slice(N+1))}a=a.concat(P)}else a=n.resources.slice(s).concat(n.resources.slice(0,s));const o=Date.now();let h="pending",l=0,c,f=null,d=[],u=[];typeof r=="function"&&u.push(r);function p(){f&&(clearTimeout(f),f=null)}function v(){h==="pending"&&(h="aborted"),p(),d.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),d=[]}function _(P,N){N&&(u=[]),typeof P=="function"&&u.push(P)}function S(){return{startTime:o,payload:t,status:h,queriesSent:l,queriesPending:d.length,subscribe:_,abort:v}}function x(){h="failed",u.forEach(P=>{P(void 0,c)})}function m(){d.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),d=[]}function k(P,N,R){const L=N!=="success";switch(d=d.filter(U=>U!==P),h){case"pending":break;case"failed":if(L||!n.dataAfterTimeout)return;break;default:return}if(N==="abort"){c=R,x();return}if(L){c=R,d.length||(a.length?F():x());return}if(p(),m(),!n.random){const U=n.resources.indexOf(P.resource);U!==-1&&U!==n.index&&(n.index=U)}h="completed",u.forEach(U=>{U(R)})}function F(){if(h!=="pending")return;p();const P=a.shift();if(P===void 0){if(d.length){f=setTimeout(()=>{p(),h==="pending"&&(m(),x())},n.timeout);return}x();return}const N={status:"pending",resource:P,callback:(R,L)=>{k(N,R,L)}};d.push(N),l++,f=setTimeout(F,n.rotate),e(P,t,N.callback)}return setTimeout(F),S}function Ud(n){const t={...T2,...n};let e=[];function r(){e=e.filter(o=>o().status==="pending")}function i(o,h,l){const c=P2(t,o,h,(f,d)=>{r(),l&&l(f,d)});return e.push(c),c}function s(o){return e.find(h=>o(h))||null}return{query:i,find:s,setIndex:o=>{t.index=o},getIndex:()=>t.index,cleanup:r}}function Gd(){}const Wl=Object.create(null);function E2(n){if(!Wl[n]){const t=Zl(n);if(!t)return;const e=Ud(t),r={config:t,redundancy:e};Wl[n]=r}return Wl[n]}function A2(n,t,e){let r,i;if(typeof n=="string"){const s=Xl(n);if(!s)return e(void 0,424),Gd;i=s.send;const a=E2(n);a&&(r=a.redundancy)}else{const s=Jl(n);if(s){r=Ud(s);const a=n.resources?n.resources[0]:"",o=Xl(a);o&&(i=o.send)}}return!r||!i?(e(void 0,424),Gd):r.query(t,i,e)().abort}const zd="iconify2",Cs="iconify",Vd=Cs+"-count",Bd=Cs+"-version",Hd=36e5,O2=168,$2=50;function th(n,t){try{return n.getItem(t)}catch{}}function eh(n,t,e){try{return n.setItem(t,e),!0}catch{}}function qd(n,t){try{n.removeItem(t)}catch{}}function nh(n,t){return eh(n,Vd,t.toString())}function rh(n){return parseInt(th(n,Vd))||0}const vo={local:!0,session:!0},Kd={local:new Set,session:new Set};let ih=!1;function F2(n){ih=n}let _o=typeof window>"u"?{}:window;function Yd(n){const t=n+"Storage";try{if(_o&&_o[t]&&typeof _o[t].length=="number")return _o[t]}catch{}vo[n]=!1}function Xd(n,t){const e=Yd(n);if(!e)return;const r=th(e,Bd);if(r!==zd){if(r){const o=rh(e);for(let h=0;h<o;h++)qd(e,Cs+h.toString())}eh(e,Bd,zd),nh(e,0);return}const i=Math.floor(Date.now()/Hd)-O2,s=o=>{const h=Cs+o.toString(),l=th(e,h);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,o))return!0}catch{}qd(e,h)}};let a=rh(e);for(let o=a-1;o>=0;o--)s(o)||(o===a-1?(a--,nh(e,a)):Kd[n].add(o))}function Jd(){if(!ih){F2(!0);for(const n in vo)Xd(n,t=>{const e=t.data,r=t.provider,i=e.prefix,s=fi(r,i);if(!Kl(s,e).length)return!1;const a=e.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function N2(n,t){const e=n.lastModifiedCached;if(e&&e>=t)return e===t;if(n.lastModifiedCached=t,e)for(const r in vo)Xd(r,i=>{const s=i.data;return i.provider!==n.provider||s.prefix!==n.prefix||s.lastModified===t});return!0}function R2(n,t){ih||Jd();function e(r){let i;if(!vo[r]||!(i=Yd(r)))return;const s=Kd[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=rh(i),a>=$2||!nh(i,a+1))return;const o={cached:Math.floor(Date.now()/Hd),provider:n.provider,data:t};return eh(i,Cs+a.toString(),JSON.stringify(o))}t.lastModified&&!N2(n,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),e("local")||e("session"))}function Qd(){}function D2(n){n.iconsLoaderFlag||(n.iconsLoaderFlag=!0,setTimeout(()=>{n.iconsLoaderFlag=!1,b2(n)}))}function M2(n,t){n.iconsToLoad?n.iconsToLoad=n.iconsToLoad.concat(t).sort():n.iconsToLoad=t,n.iconsQueueFlag||(n.iconsQueueFlag=!0,setTimeout(()=>{n.iconsQueueFlag=!1;const{provider:e,prefix:r}=n,i=n.iconsToLoad;delete n.iconsToLoad;let s;if(!i||!(s=Xl(e)))return;s.prepare(e,r,i).forEach(o=>{A2(e,o,h=>{if(typeof h!="object")o.icons.forEach(l=>{n.missing.add(l)});else try{const l=Kl(n,h);if(!l.length)return;const c=n.pendingIcons;c&&l.forEach(f=>{c.delete(f)}),R2(n,h)}catch(l){console.error(l)}D2(n)})})}))}const I2=(n,t)=>{const e=C2(n,!0,Rd()),r=x2(e);if(!r.pending.length){let h=!0;return t&&setTimeout(()=>{h&&t(r.loaded,r.missing,r.pending,Qd)}),()=>{h=!1}}const i=Object.create(null),s=[];let a,o;return r.pending.forEach(h=>{const{provider:l,prefix:c}=h;if(c===o&&l===a)return;a=l,o=c,s.push(fi(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(h=>{const{provider:l,prefix:c,name:f}=h,d=fi(l,c),u=d.pendingIcons||(d.pendingIcons=new Set);u.has(f)||(u.add(f),i[l][c].push(f))}),s.forEach(h=>{const{provider:l,prefix:c}=h;i[l][c].length&&M2(h,i[l][c])}),t?k2(t,r,s):Qd};function j2(n,t){const e={...n};for(const r in t){const i=t[r],s=typeof i;r in Dd?(i===null||i&&(s==="string"||s==="number"))&&(e[r]=i):s===typeof e[r]&&(e[r]=r==="rotate"?i%4:i)}return e}const L2=/[\s,]+/;function U2(n,t){t.split(L2).forEach(e=>{switch(e.trim()){case"horizontal":n.hFlip=!0;break;case"vertical":n.vFlip=!0;break}})}function G2(n,t=0){const e=n.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(e===""){const i=parseInt(n);return isNaN(i)?0:r(i)}else if(e!==n){let i=0;switch(e){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(n.slice(0,n.length-e.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function z2(n,t){let e=n.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)e+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+e+">"+n+"</svg>"}function V2(n){return n.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function B2(n){return"data:image/svg+xml,"+V2(n)}function H2(n){return'url("'+B2(n)+'")'}const Zd={...Md,inline:!1},q2={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},K2={display:"inline-block"},sh={backgroundColor:"currentColor"},Wd={backgroundColor:"transparent"},tf={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ef={webkitMask:sh,mask:sh,background:Wd};for(const n in ef){const t=ef[n];for(const e in tf)t[n+e]=tf[e]}const wo={};["horizontal","vertical"].forEach(n=>{const t=n.slice(0,1)+"Flip";wo[n+"-flip"]=t,wo[n.slice(0,1)+"-flip"]=t,wo[n+"Flip"]=t});function nf(n){return n+(n.match(/^[-0-9.]+$/)?"px":"")}const rf=(n,t)=>{const e=j2(Zd,t),r={...q2},i=t.mode||"svg",s={},a=t.style,o=typeof a=="object"&&!(a instanceof Array)?a:{};for(let v in t){const _=t[v];if(_!==void 0)switch(v){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":e[v]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&U2(e,_);break;case"color":s.color=_;break;case"rotate":typeof _=="string"?e[v]=G2(_):typeof _=="number"&&(e[v]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete r["aria-hidden"];break;default:{const S=wo[v];S?(_===!0||_==="true"||_===1)&&(e[S]=!0):Zd[v]===void 0&&(r[v]=_)}}}const h=h2(n,e),l=h.attributes;if(e.inline&&(s.verticalAlign="-0.125em"),i==="svg"){r.style={...s,...o},Object.assign(r,l);let v=0,_=t.id;return typeof _=="string"&&(_=_.replace(/-/g,"_")),r.innerHTML=f2(h.body,_?()=>_+"ID"+v++:"iconifyVue"),Ze.h("svg",r)}const{body:c,width:f,height:d}=n,u=i==="mask"||(i==="bg"?!1:c.indexOf("currentColor")!==-1),p=z2(c,{...l,width:f+"",height:d+""});return r.style={...s,"--svg":H2(p),width:nf(l.width),height:nf(l.height),...K2,...u?sh:Wd,...o},Ze.h("span",r)};if(Rd(!0),p2("",w2),typeof document<"u"&&typeof window<"u"){Jd();const n=window;if(n.IconifyPreload!==void 0){const t=n.IconifyPreload,e="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!n2(r))&&console.error(e)}catch{console.error(e)}})}if(n.IconifyProviders!==void 0){const t=n.IconifyProviders;if(typeof t=="object"&&t!==null)for(let e in t){const r="IconifyProviders["+e+"] is invalid.";try{const i=t[e];if(typeof i!="object"||!i||i.resources===void 0)continue;g2(e,i)||console.error(r)}catch{console.error(r)}}}}const Y2={...mo,body:""},X2=Ze.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(n,t){if(typeof n=="object"&&n!==null&&typeof n.body=="string")return this._name="",this.abortLoading(),{data:n};let e;if(typeof n!="string"||(e=fo(n,!1,!0))===null)return this.abortLoading(),null;const r=t2(e);if(!r)return(!this._loadingIcon||this._loadingIcon.name!==n)&&(this.abortLoading(),this._name="",r!==null&&(this._loadingIcon={name:n,abort:I2([e],()=>{this.counter++})})),null;this.abortLoading(),this._name!==n&&(this._name=n,t&&t(n));const i=["iconify"];return e.prefix!==""&&i.push("iconify--"+e.prefix),e.provider!==""&&i.push("iconify--"+e.provider),{data:r,classes:i}}},render(){this.counter;const n=this.$attrs,t=this.iconMounted||n.ssr?this.getIcon(n.icon,n.onLoad):null;if(!t)return rf(Y2,n);let e=n;return t.classes&&(e={...n,class:(typeof n.class=="string"?n.class+" ":"")+t.classes.join(" ")}),rf({...mo,...t.data},e)}});function Rt(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function Pt(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const xo=typeof window=="object"&&typeof document=="object";typeof process<"u"&&process.versions!=null&&process.versions.node!=null;const J2=n=>{let t=null;switch(n){case"bin":t=/^[0-1]+$/;break;case"oct":t=/^(0b)?[0-8]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"email":t=/^[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"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
|
|
2
|
+
[\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
|
|
3
|
+
|[\u{4E00}-\u{9FCC}]
|
|
4
|
+
|[\u{3400}-\u{4DB5}]
|
|
5
|
+
|[\u{20000}-\u{2A6D6}]
|
|
6
|
+
|[\u{2A700}-\u{2B734}]
|
|
7
|
+
|[\u{2B740}-\u{2B81D}]
|
|
8
|
+
|[\u{2B820}-\u{2CEAF}]
|
|
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};function Q2(n){const t={matchIndex:-1,fullMatch:null,groupMatchs:[]};if(n){t.matchIndex=typeof n.index=="number"?n.index:-1;for(let e=0,r=n.length;e<r;e++)e==0?t.fullMatch=n[e]:t.groupMatchs.push(n[e])}return t}const sf=(n,t)=>{typeof n=="string"&&(n=J2(n)||new RegExp(n));const e=[],r=t.matchAll(n);for(const i of r)e.push(Q2(i));return e};function Z2(n){const t=typeof n;return t!=="object"?t:Object.prototype.toString.call(n).replace(/^\[object (\S+)\]$/,"$1").toLowerCase()}function W2(n){return Z2(n)==="object"}function af(n,t=new WeakMap){if(n==null)return n;if(n.constructor===Date)return new Date(n);if(n.constructor===RegExp)return new RegExp(n);if(typeof n!="object")return n;if(t.has(n))return t.get(n);const e=Object.getOwnPropertyDescriptors(n),r=Object.create(Object.getPrototypeOf(n),e);t.set(n,r);for(const i of Reflect.ownKeys(n))r[i]=W2(n[i])?af(n[i],t):n[i];return r}function of(n,t=12){return+n.toPrecision(t)}function lf(n,t){return function(){return n.apply(t,arguments)}}const{toString:t_}=Object.prototype,{getPrototypeOf:ah}=Object,bo=(n=>t=>{const e=t_.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),sr=n=>(n=n.toLowerCase(),t=>bo(t)===n),So=n=>t=>typeof t===n,{isArray:qi}=Array,Ts=So("undefined");function e_(n){return n!==null&&!Ts(n)&&n.constructor!==null&&!Ts(n.constructor)&&Fn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const hf=sr("ArrayBuffer");function n_(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&hf(n.buffer),t}const r_=So("string"),Fn=So("function"),cf=So("number"),ko=n=>n!==null&&typeof n=="object",i_=n=>n===!0||n===!1,Co=n=>{if(bo(n)!=="object")return!1;const t=ah(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},s_=sr("Date"),a_=sr("File"),o_=sr("Blob"),l_=sr("FileList"),h_=n=>ko(n)&&Fn(n.pipe),c_=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Fn(n.append)&&((t=bo(n))==="formdata"||t==="object"&&Fn(n.toString)&&n.toString()==="[object FormData]"))},u_=sr("URLSearchParams"),d_=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ps(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),qi(n))for(r=0,i=n.length;r<i;r++)t.call(null,n[r],r,n);else{const s=e?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,n[o],o,n)}}function uf(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,i;for(;r-- >0;)if(i=e[r],t===i.toLowerCase())return i;return null}const df=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ff=n=>!Ts(n)&&n!==df;function oh(){const{caseless:n}=ff(this)&&this||{},t={},e=(r,i)=>{const s=n&&uf(t,i)||i;Co(t[s])&&Co(r)?t[s]=oh(t[s],r):Co(r)?t[s]=oh({},r):qi(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ps(arguments[r],e);return t}const f_=(n,t,e,{allOwnKeys:r}={})=>(Ps(t,(i,s)=>{e&&Fn(i)?n[s]=lf(i,e):n[s]=i},{allOwnKeys:r}),n),p_=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),g_=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},m_=(n,t,e,r)=>{let i,s,a;const o={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),s=i.length;s-- >0;)a=i[s],(!r||r(a,n,t))&&!o[a]&&(t[a]=n[a],o[a]=!0);n=e!==!1&&ah(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},y_=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},v_=n=>{if(!n)return null;if(qi(n))return n;let t=n.length;if(!cf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},__=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&ah(Uint8Array)),w_=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const i=r.value;t.call(n,i[0],i[1])}},x_=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},b_=sr("HTMLFormElement"),S_=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),pf=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),k_=sr("RegExp"),gf=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Ps(e,(i,s)=>{let a;(a=t(i,s,n))!==!1&&(r[s]=a||i)}),Object.defineProperties(n,r)},C_=n=>{gf(n,(t,e)=>{if(Fn(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Fn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},T_=(n,t)=>{const e={},r=i=>{i.forEach(s=>{e[s]=!0})};return qi(n)?r(n):r(String(n).split(t)),e},P_=()=>{},E_=(n,t)=>(n=+n,Number.isFinite(n)?n:t),lh="abcdefghijklmnopqrstuvwxyz",mf="0123456789",yf={DIGIT:mf,ALPHA:lh,ALPHA_DIGIT:lh+lh.toUpperCase()+mf},A_=(n=16,t=yf.ALPHA_DIGIT)=>{let e="";const{length:r}=t;for(;n--;)e+=t[Math.random()*r|0];return e};function O_(n){return!!(n&&Fn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const $_=n=>{const t=new Array(10),e=(r,i)=>{if(ko(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=qi(r)?[]:{};return Ps(r,(a,o)=>{const h=e(a,i+1);!Ts(h)&&(s[o]=h)}),t[i]=void 0,s}}return r};return e(n,0)},F_=sr("AsyncFunction"),N_=n=>n&&(ko(n)||Fn(n))&&Fn(n.then)&&Fn(n.catch),ft={isArray:qi,isArrayBuffer:hf,isBuffer:e_,isFormData:c_,isArrayBufferView:n_,isString:r_,isNumber:cf,isBoolean:i_,isObject:ko,isPlainObject:Co,isUndefined:Ts,isDate:s_,isFile:a_,isBlob:o_,isRegExp:k_,isFunction:Fn,isStream:h_,isURLSearchParams:u_,isTypedArray:__,isFileList:l_,forEach:Ps,merge:oh,extend:f_,trim:d_,stripBOM:p_,inherits:g_,toFlatObject:m_,kindOf:bo,kindOfTest:sr,endsWith:y_,toArray:v_,forEachEntry:w_,matchAll:x_,isHTMLForm:b_,hasOwnProperty:pf,hasOwnProp:pf,reduceDescriptors:gf,freezeMethods:C_,toObjectSet:T_,toCamelCase:S_,noop:P_,toFiniteNumber:E_,findKey:uf,global:df,isContextDefined:ff,ALPHABET:yf,generateString:A_,isSpecCompliantForm:O_,toJSONObject:$_,isAsyncFn:F_,isThenable:N_};function se(n,t,e,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),i&&(this.response=i)}ft.inherits(se,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:ft.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const vf=se.prototype,_f={};["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(n=>{_f[n]={value:n}}),Object.defineProperties(se,_f),Object.defineProperty(vf,"isAxiosError",{value:!0}),se.from=(n,t,e,r,i,s)=>{const a=Object.create(vf);return ft.toFlatObject(n,a,function(o){return o!==Error.prototype},o=>o!=="isAxiosError"),se.call(a,n.message,t,e,r,i),a.cause=n,a.name=n.name,s&&Object.assign(a,s),a};const R_=null;function hh(n){return ft.isPlainObject(n)||ft.isArray(n)}function wf(n){return ft.endsWith(n,"[]")?n.slice(0,-2):n}function xf(n,t,e){return n?n.concat(t).map(function(r,i){return r=wf(r),!e&&i?"["+r+"]":r}).join(e?".":""):t}function D_(n){return ft.isArray(n)&&!n.some(hh)}const M_=ft.toFlatObject(ft,{},null,function(n){return/^is[A-Z]/.test(n)});function To(n,t,e){if(!ft.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=ft.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,p){return!ft.isUndefined(p[u])});const r=e.metaTokens,i=e.visitor||l,s=e.dots,a=e.indexes,o=(e.Blob||typeof Blob<"u"&&Blob)&&ft.isSpecCompliantForm(t);if(!ft.isFunction(i))throw new TypeError("visitor must be a function");function h(u){if(u===null)return"";if(ft.isDate(u))return u.toISOString();if(!o&&ft.isBlob(u))throw new se("Blob is not supported. Use a Buffer instead.");return ft.isArrayBuffer(u)||ft.isTypedArray(u)?o&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,p,v){let _=u;if(u&&!v&&typeof u=="object"){if(ft.endsWith(p,"{}"))p=r?p:p.slice(0,-2),u=JSON.stringify(u);else if(ft.isArray(u)&&D_(u)||(ft.isFileList(u)||ft.endsWith(p,"[]"))&&(_=ft.toArray(u)))return p=wf(p),_.forEach(function(S,x){!(ft.isUndefined(S)||S===null)&&t.append(a===!0?xf([p],x,s):a===null?p:p+"[]",h(S))}),!1}return hh(u)?!0:(t.append(xf(v,p,s),h(u)),!1)}const c=[],f=Object.assign(M_,{defaultVisitor:l,convertValue:h,isVisitable:hh});function d(u,p){if(!ft.isUndefined(u)){if(c.indexOf(u)!==-1)throw Error("Circular reference detected in "+p.join("."));c.push(u),ft.forEach(u,function(v,_){(!(ft.isUndefined(v)||v===null)&&i.call(t,v,ft.isString(_)?_.trim():_,p,f))===!0&&d(v,p?p.concat(_):[_])}),c.pop()}}if(!ft.isObject(n))throw new TypeError("data must be an object");return d(n),t}function bf(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ch(n,t){this._pairs=[],n&&To(n,this,t)}const Sf=ch.prototype;Sf.append=function(n,t){this._pairs.push([n,t])},Sf.toString=function(n){const t=n?function(e){return n.call(this,e,bf)}:bf;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function I_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kf(n,t,e){if(!t)return n;const r=e&&e.encode||I_,i=e&&e.serialize;let s;if(i?s=i(t,e):s=ft.isURLSearchParams(t)?t.toString():new ch(t,e).toString(r),s){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n}class j_{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ft.forEach(this.handlers,function(e){e!==null&&t(e)})}}const Cf=j_,Tf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},L_=typeof URLSearchParams<"u"?URLSearchParams:ch,U_=typeof FormData<"u"?FormData:null,G_=typeof Blob<"u"?Blob:null,z_=(()=>{let n;return typeof navigator<"u"&&((n=navigator.product)==="ReactNative"||n==="NativeScript"||n==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),V_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ar={isBrowser:!0,classes:{URLSearchParams:L_,FormData:U_,Blob:G_},isStandardBrowserEnv:z_,isStandardBrowserWebWorkerEnv:V_,protocols:["http","https","file","blob","url","data"]};function B_(n,t){return To(n,new ar.classes.URLSearchParams,Object.assign({visitor:function(e,r,i,s){return ar.isNode&&ft.isBuffer(e)?(this.append(r,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function H_(n){return ft.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function q_(n){const t={},e=Object.keys(n);let r;const i=e.length;let s;for(r=0;r<i;r++)s=e[r],t[s]=n[s];return t}function Pf(n){function t(e,r,i,s){let a=e[s++];const o=Number.isFinite(+a),h=s>=e.length;return a=!a&&ft.isArray(i)?i.length:a,h?(ft.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!o):((!i[a]||!ft.isObject(i[a]))&&(i[a]=[]),t(e,r,i[a],s)&&ft.isArray(i[a])&&(i[a]=q_(i[a])),!o)}if(ft.isFormData(n)&&ft.isFunction(n.entries)){const e={};return ft.forEachEntry(n,(r,i)=>{t(H_(r),i,e,0)}),e}return null}function K_(n,t,e){if(ft.isString(n))try{return(t||JSON.parse)(n),ft.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const uh={transitional:Tf,adapter:["xhr","http"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,i=ft.isObject(n);if(i&&ft.isHTMLForm(n)&&(n=new FormData(n)),ft.isFormData(n))return r&&r?JSON.stringify(Pf(n)):n;if(ft.isArrayBuffer(n)||ft.isBuffer(n)||ft.isStream(n)||ft.isFile(n)||ft.isBlob(n))return n;if(ft.isArrayBufferView(n))return n.buffer;if(ft.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(i){if(e.indexOf("application/x-www-form-urlencoded")>-1)return B_(n,this.formSerializer).toString();if((s=ft.isFileList(n))||e.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return To(s?{"files[]":n}:n,a&&new a,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),K_(n)):n}],transformResponse:[function(n){const t=this.transitional||uh.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(n&&ft.isString(n)&&(e&&!this.responseType||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(s){if(i)throw s.name==="SyntaxError"?se.from(s,se.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ar.classes.FormData,Blob:ar.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ft.forEach(["delete","get","head","post","put","patch"],n=>{uh.headers[n]={}});const dh=uh,Y_=ft.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"]),X_=n=>{const t={};let e,r,i;return n&&n.split(`
|
|
11
|
+
`).forEach(function(s){i=s.indexOf(":"),e=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!e||t[e]&&Y_[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Ef=Symbol("internals");function Es(n){return n&&String(n).trim().toLowerCase()}function Po(n){return n===!1||n==null?n:ft.isArray(n)?n.map(Po):String(n)}function J_(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const Q_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function fh(n,t,e,r,i){if(ft.isFunction(r))return r.call(this,t,e);if(i&&(t=e),!!ft.isString(t)){if(ft.isString(r))return t.indexOf(r)!==-1;if(ft.isRegExp(r))return r.test(t)}}function Z_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function W_(n,t){const e=ft.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(i,s,a){return this[r].call(this,t,i,s,a)},configurable:!0})})}class Eo{constructor(t){t&&this.set(t)}set(t,e,r){const i=this;function s(o,h,l){const c=Es(h);if(!c)throw new Error("header name must be a non-empty string");const f=ft.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||h]=Po(o))}const a=(o,h)=>ft.forEach(o,(l,c)=>s(l,c,h));return ft.isPlainObject(t)||t instanceof this.constructor?a(t,e):ft.isString(t)&&(t=t.trim())&&!Q_(t)?a(X_(t),e):t!=null&&s(e,t,r),this}get(t,e){if(t=Es(t),t){const r=ft.findKey(this,t);if(r){const i=this[r];if(!e)return i;if(e===!0)return J_(i);if(ft.isFunction(e))return e.call(this,i,r);if(ft.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Es(t),t){const r=ft.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||fh(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let i=!1;function s(a){if(a=Es(a),a){const o=ft.findKey(r,a);o&&(!e||fh(r,r[o],o,e))&&(delete r[o],i=!0)}}return ft.isArray(t)?t.forEach(s):s(t),i}clear(t){const e=Object.keys(this);let r=e.length,i=!1;for(;r--;){const s=e[r];(!t||fh(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const e=this,r={};return ft.forEach(this,(i,s)=>{const a=ft.findKey(r,s);if(a){e[a]=Po(i),delete e[s];return}const o=t?Z_(s):String(s).trim();o!==s&&delete e[s],e[o]=Po(i),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ft.forEach(this,(r,i)=>{r!=null&&r!==!1&&(e[i]=t&&ft.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
12
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(i=>r.set(i)),r}static accessor(t){const e=(this[Ef]=this[Ef]={accessors:{}}).accessors,r=this.prototype;function i(s){const a=Es(s);e[a]||(W_(r,s),e[a]=!0)}return ft.isArray(t)?t.forEach(i):i(t),this}}Eo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ft.reduceDescriptors(Eo.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),ft.freezeMethods(Eo);const wr=Eo;function ph(n,t){const e=this||dh,r=t||e,i=wr.from(r.headers);let s=r.data;return ft.forEach(n,function(a){s=a.call(e,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Af(n){return!!(n&&n.__CANCEL__)}function As(n,t,e){se.call(this,n??"canceled",se.ERR_CANCELED,t,e),this.name="CanceledError"}ft.inherits(As,se,{__CANCEL__:!0});function tw(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new se("Request failed with status code "+e.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const ew=ar.isStandardBrowserEnv?function(){return{write:function(n,t,e,r,i,s){const a=[];a.push(n+"="+encodeURIComponent(t)),ft.isNumber(e)&&a.push("expires="+new Date(e).toGMTString()),ft.isString(r)&&a.push("path="+r),ft.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function nw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function rw(n,t){return t?n.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):n}function Of(n,t){return n&&!nw(t)?rw(n,t):t}const iw=ar.isStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let e;function r(i){let s=i;return n&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return e=r(window.location.href),function(i){const s=ft.isString(i)?r(i):i;return s.protocol===e.protocol&&s.host===e.host}}():function(){return function(){return!0}}();function sw(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function aw(n,t){n=n||10;const e=new Array(n),r=new Array(n);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(o){const h=Date.now(),l=r[s];a||(a=h),e[i]=o,r[i]=h;let c=s,f=0;for(;c!==i;)f+=e[c++],c=c%n;if(i=(i+1)%n,i===s&&(s=(s+1)%n),h-a<t)return;const d=l&&h-l;return d?Math.round(f*1e3/d):void 0}}function $f(n,t){let e=0;const r=aw(50,250);return i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,o=s-e,h=r(o),l=s<=a;e=s;const c={loaded:s,total:a,progress:a?s/a:void 0,bytes:o,rate:h||void 0,estimated:h&&a&&l?(a-s)/h:void 0,event:i};c[t?"download":"upload"]=!0,n(c)}}const ow=typeof XMLHttpRequest<"u",lw=ow&&function(n){return new Promise(function(t,e){let r=n.data;const i=wr.from(n.headers).normalize(),s=n.responseType;let a;function o(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let h;ft.isFormData(r)&&(ar.isStandardBrowserEnv||ar.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?ft.isString(h=i.getContentType())&&i.setContentType(h.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(n.auth){const u=n.auth.username||"",p=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+p))}const c=Of(n.baseURL,n.url);l.open(n.method.toUpperCase(),kf(c,n.params,n.paramsSerializer),!0),l.timeout=n.timeout;function f(){if(!l)return;const u=wr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),p={data:!s||s==="text"||s==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:u,config:n,request:l};tw(function(v){t(v),o()},function(v){e(v),o()},p),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(e(new se("Request aborted",se.ECONNABORTED,n,l)),l=null)},l.onerror=function(){e(new se("Network Error",se.ERR_NETWORK,n,l)),l=null},l.ontimeout=function(){let u=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const p=n.transitional||Tf;n.timeoutErrorMessage&&(u=n.timeoutErrorMessage),e(new se(u,p.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,n,l)),l=null},ar.isStandardBrowserEnv){const u=(n.withCredentials||iw(c))&&n.xsrfCookieName&&ew.read(n.xsrfCookieName);u&&i.set(n.xsrfHeaderName,u)}r===void 0&&i.setContentType(null),"setRequestHeader"in l&&ft.forEach(i.toJSON(),function(u,p){l.setRequestHeader(p,u)}),ft.isUndefined(n.withCredentials)||(l.withCredentials=!!n.withCredentials),s&&s!=="json"&&(l.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&l.addEventListener("progress",$f(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",$f(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=u=>{l&&(e(!u||u.type?new As(null,n,l):u),l.abort(),l=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const d=sw(c);if(d&&ar.protocols.indexOf(d)===-1){e(new se("Unsupported protocol "+d+":",se.ERR_BAD_REQUEST,n));return}l.send(r||null)})},gh={http:R_,xhr:lw};ft.forEach(gh,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Ff=n=>`- ${n}`,hw=n=>ft.isFunction(n)||n===null||n===!1,Nf={getAdapter:n=>{n=ft.isArray(n)?n:[n];const{length:t}=n;let e,r;const i={};for(let s=0;s<t;s++){e=n[s];let a;if(r=e,!hw(e)&&(r=gh[(a=String(e)).toLowerCase()],r===void 0))throw new se(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+s]=r}if(!r){const s=Object.entries(i).map(([o,h])=>`adapter ${o} `+(h===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
|
|
13
|
+
`+s.map(Ff).join(`
|
|
14
|
+
`):" "+Ff(s[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:gh};function mh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new As(null,n)}function Rf(n){return mh(n),n.headers=wr.from(n.headers),n.data=ph.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Nf.getAdapter(n.adapter||dh.adapter)(n).then(function(t){return mh(n),t.data=ph.call(n,n.transformResponse,t),t.headers=wr.from(t.headers),t},function(t){return Af(t)||(mh(n),t&&t.response&&(t.response.data=ph.call(n,n.transformResponse,t.response),t.response.headers=wr.from(t.response.headers))),Promise.reject(t)})}const Df=n=>n instanceof wr?n.toJSON():n;function Ki(n,t){t=t||{};const e={};function r(l,c,f){return ft.isPlainObject(l)&&ft.isPlainObject(c)?ft.merge.call({caseless:f},l,c):ft.isPlainObject(c)?ft.merge({},c):ft.isArray(c)?c.slice():c}function i(l,c,f){if(ft.isUndefined(c)){if(!ft.isUndefined(l))return r(void 0,l,f)}else return r(l,c,f)}function s(l,c){if(!ft.isUndefined(c))return r(void 0,c)}function a(l,c){if(ft.isUndefined(c)){if(!ft.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function o(l,c,f){if(f in t)return r(l,c);if(f in n)return r(void 0,l)}const h={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(l,c)=>i(Df(l),Df(c),!0)};return ft.forEach(Object.keys(Object.assign({},n,t)),function(l){const c=h[l]||i,f=c(n[l],t[l],l);ft.isUndefined(f)&&c!==o||(e[l]=f)}),e}const Mf="1.5.1",yh={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{yh[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const If={};yh.transitional=function(n,t,e){function r(i,s){return"[Axios v"+Mf+"] Transitional option '"+i+"'"+s+(e?". "+e:"")}return(i,s,a)=>{if(n===!1)throw new se(r(s," has been removed"+(t?" in "+t:"")),se.ERR_DEPRECATED);return t&&!If[s]&&(If[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(i,s,a):!0}};function cw(n,t,e){if(typeof n!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let i=r.length;for(;i-- >0;){const s=r[i],a=t[s];if(a){const o=n[s],h=o===void 0||a(o,s,n);if(h!==!0)throw new se("option "+s+" must be "+h,se.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new se("Unknown option "+s,se.ERR_BAD_OPTION)}}const vh={assertOptions:cw,validators:yh},qr=vh.validators;class Ao{constructor(t){this.defaults=t,this.interceptors={request:new Cf,response:new Cf}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ki(this.defaults,e);const{transitional:r,paramsSerializer:i,headers:s}=e;r!==void 0&&vh.assertOptions(r,{silentJSONParsing:qr.transitional(qr.boolean),forcedJSONParsing:qr.transitional(qr.boolean),clarifyTimeoutError:qr.transitional(qr.boolean)},!1),i!=null&&(ft.isFunction(i)?e.paramsSerializer={serialize:i}:vh.assertOptions(i,{encode:qr.function,serialize:qr.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=s&&ft.merge(s.common,s[e.method]);s&&ft.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),e.headers=wr.concat(a,s);const o=[];let h=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(e)===!1||(h=h&&p.synchronous,o.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let c,f=0,d;if(!h){const p=[Rf.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,l),d=p.length,c=Promise.resolve(e);f<d;)c=c.then(p[f++],p[f++]);return c}d=o.length;let u=e;for(f=0;f<d;){const p=o[f++],v=o[f++];try{u=p(u)}catch(_){v.call(this,_);break}}try{c=Rf.call(this,u)}catch(p){return Promise.reject(p)}for(f=0,d=l.length;f<d;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=Ki(this.defaults,t);const e=Of(t.baseURL,t.url);return kf(e,t.params,t.paramsSerializer)}}ft.forEach(["delete","get","head","options"],function(n){Ao.prototype[n]=function(t,e){return this.request(Ki(e||{},{method:n,url:t,data:(e||{}).data}))}}),ft.forEach(["post","put","patch"],function(n){function t(e){return function(r,i,s){return this.request(Ki(s||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Ao.prototype[n]=t(),Ao.prototype[n+"Form"]=t(!0)});const Oo=Ao;class _h{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{r.subscribe(o),s=o}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},t(function(i,s,a){r.reason||(r.reason=new As(i,s,a),e(r.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)}static source(){let t;return{token:new _h(function(e){t=e}),cancel:t}}}const uw=_h;function dw(n){return function(t){return n.apply(null,t)}}function fw(n){return ft.isObject(n)&&n.isAxiosError===!0}const wh={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(wh).forEach(([n,t])=>{wh[t]=n});const pw=wh;function jf(n){const t=new Oo(n),e=lf(Oo.prototype.request,t);return ft.extend(e,Oo.prototype,t,{allOwnKeys:!0}),ft.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return jf(Ki(n,r))},e}const ze=jf(dh);ze.Axios=Oo,ze.CanceledError=As,ze.CancelToken=uw,ze.isCancel=Af,ze.VERSION=Mf,ze.toFormData=To,ze.AxiosError=se,ze.Cancel=ze.CanceledError,ze.all=function(n){return Promise.all(n)},ze.spread=dw,ze.isAxiosError=fw,ze.mergeConfig=Ki,ze.AxiosHeaders=wr,ze.formToJSON=n=>Pf(ft.isHTMLForm(n)?new FormData(n):n),ze.getAdapter=Nf.getAdapter,ze.HttpStatusCode=pw,ze.default=ze;var xh=function(n,t){return xh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},xh(n,t)};function Kr(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xh(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function bh(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Os(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return s}function $s(n,t,e){if(arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))}function xr(n){return typeof n=="function"}function Sh(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var kh=Sh(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
15
|
+
`+t.map(function(e,r){return r+1+") "+e.toString()}).join(`
|
|
16
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function $o(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Fs=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=bh(a),h=o.next();!h.done;h=o.next()){var l=h.value;l.remove(this)}}catch(v){t={error:v}}finally{try{h&&!h.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(xr(c))try{c()}catch(v){s=v instanceof kh?v.errors:[v]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=bh(f),u=d.next();!u.done;u=d.next()){var p=u.value;try{Gf(p)}catch(v){s=s??[],v instanceof kh?s=$s($s([],Os(s)),Os(v.errors)):s.push(v)}}}catch(v){r={error:v}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(s)throw new kh(s)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Gf(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&$o(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&$o(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),Lf=Fs.EMPTY;function Uf(n){return n instanceof Fs||n&&"closed"in n&&xr(n.remove)&&xr(n.add)&&xr(n.unsubscribe)}function Gf(n){xr(n)?n():n.unsubscribe()}var zf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},gw={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,$s([n,t],Os(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function mw(n){gw.setTimeout(function(){throw n})}function Vf(){}function Fo(n){n()}var Ch=function(n){Kr(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Uf(e)&&e.add(r)):r.destination=ww,r}return t.create=function(e,r,i){return new Ph(e,r,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,n.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}(Fs),yw=Function.prototype.bind;function Th(n,t){return yw.call(n,t)}var vw=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){No(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){No(r)}else No(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){No(e)}},n}(),Ph=function(n){Kr(t,n);function t(e,r,i){var s=n.call(this)||this,a;if(xr(e)||!e)a={next:e??void 0,error:r??void 0,complete:i??void 0};else{var o;s&&zf.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=function(){return s.unsubscribe()},a={next:e.next&&Th(e.next,o),error:e.error&&Th(e.error,o),complete:e.complete&&Th(e.complete,o)}):a=e}return s.destination=new vw(a),s}return t}(Ch);function No(n){mw(n)}function _w(n){throw n}var ww={closed:!0,next:Vf,error:_w,complete:Vf},xw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function bw(n){return n}function Sw(n){return n.length===0?bw:n.length===1?n[0]:function(t){return n.reduce(function(e,r){return r(e)},t)}}var Bf=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var i=this,s=Cw(t)?t:new Ph(t,e,r);return Fo(function(){var a=i,o=a.operator,h=a.source;s.add(o?o.call(s,h):h?i._subscribe(s):i._trySubscribe(s))}),s},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=Hf(e),new e(function(i,s){var a=new Ph({next:function(o){try{t(o)}catch(h){s(h),a.unsubscribe()}},error:s,complete:i});r.subscribe(a)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[xw]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Sw(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=Hf(t),new t(function(r,i){var s;e.subscribe(function(a){return s=a},function(a){return i(a)},function(){return r(s)})})},n.create=function(t){return new n(t)},n}();function Hf(n){var t;return(t=n??zf.Promise)!==null&&t!==void 0?t:Promise}function kw(n){return n&&xr(n.next)&&xr(n.error)&&xr(n.complete)}function Cw(n){return n&&n instanceof Ch||kw(n)&&Uf(n)}(function(n){Kr(t,n);function t(e,r,i,s,a,o){var h=n.call(this,e)||this;return h.onFinalize=a,h.shouldUnsubscribe=o,h._next=r?function(l){try{r(l)}catch(c){e.error(c)}}:n.prototype._next,h._error=s?function(l){try{s(l)}catch(c){e.error(c)}finally{this.unsubscribe()}}:n.prototype._error,h._complete=i?function(){try{i()}catch(l){e.error(l)}finally{this.unsubscribe()}}:n.prototype._complete,h}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(Ch);var Tw=Sh(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Pw=function(n){Kr(t,n);function t(){var e=n.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 r=new qf(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new Tw},t.prototype.next=function(e){var r=this;Fo(function(){var i,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=bh(r.currentObservers),o=a.next();!o.done;o=a.next()){var h=o.value;h.next(e)}}catch(l){i={error:l}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var r=this;Fo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var i=r.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;Fo(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.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(),n.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 r=this,i=this,s=i.hasError,a=i.isStopped,o=i.observers;return s||a?Lf:(this.currentObservers=null,o.push(e),new Fs(function(){r.currentObservers=null,$o(o,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,i=r.hasError,s=r.thrownError,a=r.isStopped;i?e.error(s):a&&e.complete()},t.prototype.asObservable=function(){var e=new Bf;return e.source=this,e},t.create=function(e,r){return new qf(e,r)},t}(Bf),qf=function(n){Kr(t,n);function t(e,r){var i=n.call(this)||this;return i.destination=e,i.source=r,i}return t.prototype.next=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)},t.prototype.error=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:Lf},t}(Pw),Ew={now:function(){return Date.now()},delegate:void 0},Aw=function(n){Kr(t,n);function t(e,r){return n.call(this)||this}return t.prototype.schedule=function(e,r){return this},t}(Fs),Eh={setInterval:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var i=Eh.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,$s([n,t],Os(e))):setInterval.apply(void 0,$s([n,t],Os(e)))},clearInterval:function(n){return clearInterval(n)},delegate:void 0},Ow=function(n){Kr(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(e,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=e;var s=this.id,a=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(a,s,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},t.prototype.requestAsyncId=function(e,r,i){return i===void 0&&(i=0),Eh.setInterval(e.flush.bind(e,this),i)},t.prototype.recycleAsyncId=function(e,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Eh.clearInterval(r)},t.prototype.execute=function(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(e,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,r){var i=!1,s;try{this.work(e)}catch(a){i=!0,s=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,r=e.id,i=e.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,$o(s,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t}(Aw),Kf=function(){function n(t,e){e===void 0&&(e=n.now),this.schedulerActionCtor=t,this.now=e}return n.prototype.schedule=function(t,e,r){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},n.now=Ew.now,n}(),$w=function(n){Kr(t,n);function t(e,r){r===void 0&&(r=Kf.now);var i=n.call(this,e,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(e){var r=this.actions;if(this._active){r.push(e);return}var i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,i){for(;e=r.shift();)e.unsubscribe();throw i}},t}(Kf);new $w(Ow);function Fw(n){switch(n.responseType){case"json":{if("response"in n)return n.response;var t=n;return JSON.parse(t.responseText)}case"document":return n.responseXML;case"text":default:{if("response"in n)return n.response;var t=n;return t.responseText}}}var Yf=Sh(function(n){return function(t,e,r){this.message=t,this.name="AjaxError",this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType;var i;try{i=Fw(e)}catch{i=e.responseText}this.response=i}});(function(){function n(t,e){return Yf.call(this,"ajax timeout",t,e),this.name="AjaxTimeoutError",this}return n.prototype=Object.create(Yf.prototype),n})();var Nw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Et(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var Ah={exports:{}},Yi=typeof Reflect=="object"?Reflect:null,Xf=Yi&&typeof Yi.apply=="function"?Yi.apply:function(n,t,e){return Function.prototype.apply.call(n,t,e)},Ro;Yi&&typeof Yi.ownKeys=="function"?Ro=Yi.ownKeys:Object.getOwnPropertySymbols?Ro=function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Ro=function(n){return Object.getOwnPropertyNames(n)};function Rw(n){console&&console.warn&&console.warn(n)}var Jf=Number.isNaN||function(n){return n!==n};function ye(){ye.init.call(this)}Ah.exports=ye,Ah.exports.once=jw,ye.EventEmitter=ye,ye.prototype._events=void 0,ye.prototype._eventsCount=0,ye.prototype._maxListeners=void 0;var Qf=10;function Do(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(ye,"defaultMaxListeners",{enumerable:!0,get:function(){return Qf},set:function(n){if(typeof n!="number"||n<0||Jf(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Qf=n}}),ye.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ye.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||Jf(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this};function Zf(n){return n._maxListeners===void 0?ye.defaultMaxListeners:n._maxListeners}ye.prototype.getMaxListeners=function(){return Zf(this)},ye.prototype.emit=function(n){for(var t=[],e=1;e<arguments.length;e++)t.push(arguments[e]);var r=n==="error",i=this._events;if(i!==void 0)r=r&&i.error===void 0;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var o=i[n];if(o===void 0)return!1;if(typeof o=="function")Xf(o,this,t);else for(var h=o.length,l=r0(o,h),e=0;e<h;++e)Xf(l[e],this,t);return!0};function Wf(n,t,e,r){var i,s,a;if(Do(e),s=n._events,s===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",t,e.listener?e.listener:e),s=n._events),a=s[t]),a===void 0)a=s[t]=e,++n._eventsCount;else if(typeof a=="function"?a=s[t]=r?[e,a]:[a,e]:r?a.unshift(e):a.push(e),i=Zf(n),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=n,o.type=t,o.count=a.length,Rw(o)}return n}ye.prototype.addListener=function(n,t){return Wf(this,n,t,!1)},ye.prototype.on=ye.prototype.addListener,ye.prototype.prependListener=function(n,t){return Wf(this,n,t,!0)};function Dw(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function t0(n,t,e){var r={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},i=Dw.bind(r);return i.listener=e,r.wrapFn=i,i}ye.prototype.once=function(n,t){return Do(t),this.on(n,t0(this,n,t)),this},ye.prototype.prependOnceListener=function(n,t){return Do(t),this.prependListener(n,t0(this,n,t)),this},ye.prototype.removeListener=function(n,t){var e,r,i,s,a;if(Do(t),r=this._events,r===void 0)return this;if(e=r[n],e===void 0)return this;if(e===t||e.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[n],r.removeListener&&this.emit("removeListener",n,e.listener||t));else if(typeof e!="function"){for(i=-1,s=e.length-1;s>=0;s--)if(e[s]===t||e[s].listener===t){a=e[s].listener,i=s;break}if(i<0)return this;i===0?e.shift():Mw(e,i),e.length===1&&(r[n]=e[0]),r.removeListener!==void 0&&this.emit("removeListener",n,a||t)}return this},ye.prototype.off=ye.prototype.removeListener,ye.prototype.removeAllListeners=function(n){var t,e,r;if(e=this._events,e===void 0)return this;if(e.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):e[n]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete e[n]),this;if(arguments.length===0){var i=Object.keys(e),s;for(r=0;r<i.length;++r)s=i[r],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=e[n],typeof t=="function")this.removeListener(n,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(n,t[r]);return this};function e0(n,t,e){var r=n._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?Iw(i):r0(i,i.length)}ye.prototype.listeners=function(n){return e0(this,n,!0)},ye.prototype.rawListeners=function(n){return e0(this,n,!1)},ye.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):n0.call(n,t)},ye.prototype.listenerCount=n0;function n0(n){var t=this._events;if(t!==void 0){var e=t[n];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}ye.prototype.eventNames=function(){return this._eventsCount>0?Ro(this._events):[]};function r0(n,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=n[r];return e}function Mw(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function Iw(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}function jw(n,t){return new Promise(function(e,r){function i(a){n.removeListener(t,s),r(a)}function s(){typeof n.removeListener=="function"&&n.removeListener("error",i),e([].slice.call(arguments))}i0(n,t,s,{once:!0}),t!=="error"&&Lw(n,i,{once:!0})})}function Lw(n,t,e){typeof n.on=="function"&&i0(n,"error",t,e)}function i0(n,t,e,r){if(typeof n.on=="function")r.once?n.once(t,e):n.on(t,e);else if(typeof n.addEventListener=="function")n.addEventListener(t,function i(s){r.once&&n.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var Uw=Ah.exports;class MO extends Uw.EventEmitter{constructor(){super()}on(t,e){return super.on(t,e)}addListener(t,e){return this.on(t,e)}prependListener(t,e){return super.prependListener(t,e)}once(t,e){return super.once(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeListener(t,e){return super.removeListener(t,e)}off(t,e){return super.off(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}emit(t,...e){return super.emit(t,...e)}listeners(t){return super.listeners(t)}rawListeners(t){return super.rawListeners(t)}listenerCount(t){return super.listenerCount(t)}}var s0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Gw(n,t={}){var e=1,r=1;function i(it){var Y=it.match(/\n/g);Y&&(e+=Y.length);var O=it.lastIndexOf(`
|
|
17
|
+
`);r=~O?it.length-O:r+it.length}function s(){var it={line:e,column:r};return function(Y){return Y.position=new a(it),p(),Y}}function a(it){this.start=it,this.end={line:e,column:r},this.source=t.source}a.prototype.content=n;var o=[];function h(it){var Y=new Error(t.source+":"+e+":"+r+": "+it);if(Y.reason=it,Y.filename=t.source,Y.line=e,Y.column=r,Y.source=n,t.silent)o.push(Y);else throw Y}function l(){var it=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:it,parsingErrors:o}}}function c(){return u(/^{\s*/)}function f(){return u(/^}/)}function d(){var it,Y=[];for(p(),v(Y);n.length&&n.charAt(0)!="}"&&(it=bt()||xt());)it!==!1&&(Y.push(it),v(Y));return Y}function u(it){var Y=it.exec(n);if(Y){var O=Y[0];return i(O),n=n.slice(O.length),Y}}function p(){u(/^\s*/)}function v(it){var Y;for(it=it||[];Y=_();)Y!==!1&&it.push(Y);return it}function _(){var it=s();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var Y=2;n.charAt(Y)!=""&&(n.charAt(Y)!="*"||n.charAt(Y+1)!="/");)++Y;if(Y+=2,n.charAt(Y-1)==="")return h("End of comment missing");var O=n.slice(2,Y-2);return r+=2,i(O),n=n.slice(Y),r+=2,it({type:"comment",comment:O})}}function S(){var it=u(/^([^{]+)/);if(it)return br(it[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(Y){return Y.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(Y){return Y.replace(/\u200C/g,",")})}function x(){var it=s(),Y=u(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(Y){if(Y=br(Y[0]),!u(/^:\s*/))return h("property missing ':'");var O=u(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),E=it({type:"declaration",property:Y.replace(s0,""),value:O?br(O[0]).replace(s0,""):""});return u(/^[;\s]*/),E}}function m(){var it=[];if(!c())return h("missing '{'");v(it);for(var Y;Y=x();)Y!==!1&&(it.push(Y),v(it));return f()?it:h("missing '}'")}function k(){for(var it,Y=[],O=s();it=u(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)Y.push(it[1]),u(/^,\s*/);if(Y.length)return O({type:"keyframe",values:Y,declarations:m()})}function F(){var it=s(),Y=u(/^@([-\w]+)?keyframes\s*/);if(Y){var O=Y[1];if(Y=u(/^([-\w]+)\s*/),!Y)return h("@keyframes missing name");var E=Y[1];if(!c())return h("@keyframes missing '{'");for(var T,C=v();T=k();)C.push(T),C=C.concat(v());return f()?it({type:"keyframes",name:E,vendor:O,keyframes:C}):h("@keyframes missing '}'")}}function P(){var it=s(),Y=u(/^@supports *([^{]+)/);if(Y){var O=br(Y[1]);if(!c())return h("@supports missing '{'");var E=v().concat(d());return f()?it({type:"supports",supports:O,rules:E}):h("@supports missing '}'")}}function N(){var it=s(),Y=u(/^@host\s*/);if(Y){if(!c())return h("@host missing '{'");var O=v().concat(d());return f()?it({type:"host",rules:O}):h("@host missing '}'")}}function R(){var it=s(),Y=u(/^@media *([^{]+)/);if(Y){var O=br(Y[1]);if(!c())return h("@media missing '{'");var E=v().concat(d());return f()?it({type:"media",media:O,rules:E}):h("@media missing '}'")}}function L(){var it=s(),Y=u(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(Y)return it({type:"custom-media",name:br(Y[1]),media:br(Y[2])})}function U(){var it=s(),Y=u(/^@page */);if(Y){var O=S()||[];if(!c())return h("@page missing '{'");for(var E=v(),T;T=x();)E.push(T),E=E.concat(v());return f()?it({type:"page",selectors:O,declarations:E}):h("@page missing '}'")}}function B(){var it=s(),Y=u(/^@([-\w]+)?document *([^{]+)/);if(Y){var O=br(Y[1]),E=br(Y[2]);if(!c())return h("@document missing '{'");var T=v().concat(d());return f()?it({type:"document",document:E,vendor:O,rules:T}):h("@document missing '}'")}}function K(){var it=s(),Y=u(/^@font-face\s*/);if(Y){if(!c())return h("@font-face missing '{'");for(var O=v(),E;E=x();)O.push(E),O=O.concat(v());return f()?it({type:"font-face",declarations:O}):h("@font-face missing '}'")}}var tt=wt("import"),W=wt("charset"),lt=wt("namespace");function wt(it){var Y=new RegExp("^@"+it+"\\s*([^;]+);");return function(){var O=s(),E=u(Y);if(E){var T={type:it};return T[it]=E[1].trim(),O(T)}}}function bt(){if(n[0]=="@")return F()||R()||L()||P()||tt()||W()||lt()||B()||U()||N()||K()}function xt(){var it=s(),Y=S();return Y?(v(),it({type:"rule",selectors:Y,declarations:m()})):h("selector missing")}return Oh(l())}function br(n){return n?n.replace(/^\s+|\s+$/g,""):""}function Oh(n,t){var e=n&&typeof n.type=="string",r=e?n:t;for(var i in n){var s=n[i];Array.isArray(s)?s.forEach(function(a){Oh(a,r)}):s&&typeof s=="object"&&Oh(s,r)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}var $h={exports:{}},Fh={},Sr={},pi={},Nh={},Rh={},Dh={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;class t{}n._CodeOrName=t,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class e extends t{constructor(x){if(super(),!n.IDENTIFIER.test(x))throw new Error("CodeGen: name must be a valid identifier");this.str=x}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}n.Name=e;class r extends t{constructor(x){super(),this._items=typeof x=="string"?[x]:x}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const x=this._items[0];return x===""||x==='""'}get str(){var x;return(x=this._str)!==null&&x!==void 0?x:this._str=this._items.reduce((m,k)=>`${m}${k}`,"")}get names(){var x;return(x=this._names)!==null&&x!==void 0?x:this._names=this._items.reduce((m,k)=>(k instanceof e&&(m[k.str]=(m[k.str]||0)+1),m),{})}}n._Code=r,n.nil=new r("");function i(S,...x){const m=[S[0]];let k=0;for(;k<x.length;)o(m,x[k]),m.push(S[++k]);return new r(m)}n._=i;const s=new r("+");function a(S,...x){const m=[u(S[0])];let k=0;for(;k<x.length;)m.push(s),o(m,x[k]),m.push(s,u(S[++k]));return h(m),new r(m)}n.str=a;function o(S,x){x instanceof r?S.push(...x._items):x instanceof e?S.push(x):S.push(f(x))}n.addCodeArg=o;function h(S){let x=1;for(;x<S.length-1;){if(S[x]===s){const m=l(S[x-1],S[x+1]);if(m!==void 0){S.splice(x-1,3,m);continue}S[x++]="+"}x++}}function l(S,x){if(x==='""')return S;if(S==='""')return x;if(typeof S=="string")return x instanceof e||S[S.length-1]!=='"'?void 0:typeof x!="string"?`${S.slice(0,-1)}${x}"`:x[0]==='"'?S.slice(0,-1)+x.slice(1):void 0;if(typeof x=="string"&&x[0]==='"'&&!(S instanceof e))return`"${S}${x.slice(1)}`}function c(S,x){return x.emptyStr()?S:S.emptyStr()?x:a`${S}${x}`}n.strConcat=c;function f(S){return typeof S=="number"||typeof S=="boolean"||S===null?S:u(Array.isArray(S)?S.join(","):S)}function d(S){return new r(u(S))}n.stringify=d;function u(S){return JSON.stringify(S).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}n.safeStringify=u;function p(S){return typeof S=="string"&&n.IDENTIFIER.test(S)?new r(`.${S}`):i`[${S}]`}n.getProperty=p;function v(S){if(typeof S=="string"&&n.IDENTIFIER.test(S))return new r(`${S}`);throw new Error(`CodeGen: invalid export name: ${S}, use explicit $id name mapping`)}n.getEsmExportName=v;function _(S){return new r(S.toString())}n.regexpCode=_})(Dh);const zw=pn(Dh),Vw=Pt({__proto__:null,default:zw},[Dh]),Ns=Et(Vw);var Mh={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValueScope=n.ValueScopeName=n.Scope=n.varKinds=n.UsedValueState=void 0;const t=Ns;class e extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var r;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(r=n.UsedValueState||(n.UsedValueState={})),n.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const c=this._names[l]||this._nameGroup(l);return`${l}${c.index++}`}_nameGroup(l){var c,f;if(!((f=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||f===void 0)&&f.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}n.Scope=i;class s extends t.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:f}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(c)}[${f}]`}}n.ValueScopeName=s;const a=(0,t._)`\n`;class o extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,c){var f;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(l),{prefix:u}=d,p=(f=c.key)!==null&&f!==void 0?f:c.ref;let v=this._values[u];if(v){const x=v.get(p);if(x)return x}else v=this._values[u]=new Map;v.set(p,d);const _=this._scope[u]||(this._scope[u]=[]),S=_.length;return _[S]=c.ref,d.setValue(c,{property:u,itemIndex:S}),d}getValue(l,c){const f=this._values[l];if(f)return f.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,t._)`${l}${f.scopePath}`})}scopeCode(l=this._values,c,f){return this._reduceValues(l,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},c,f)}_reduceValues(l,c,f={},d){let u=t.nil;for(const p in l){const v=l[p];if(!v)continue;const _=f[p]=f[p]||new Map;v.forEach(S=>{if(_.has(S))return;_.set(S,r.Started);let x=c(S);if(x){const m=this.opts.es5?n.varKinds.var:n.varKinds.const;u=(0,t._)`${u}${m} ${S} = ${x};${this.opts._n}`}else if(x=d==null?void 0:d(S))u=(0,t._)`${u}${x}${this.opts._n}`;else throw new e(S);_.set(S,r.Completed)})}return u}}n.ValueScope=o})(Mh);const Bw=pn(Mh),Hw=Pt({__proto__:null,default:Bw},[Mh]),a0=Et(Hw);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.or=n.and=n.not=n.CodeGen=n.operators=n.varKinds=n.ValueScopeName=n.ValueScope=n.Scope=n.Name=n.regexpCode=n.stringify=n.getProperty=n.nil=n.strConcat=n.str=n._=void 0;const t=Ns,e=a0;var r=Ns;Object.defineProperty(n,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(n,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(n,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(n,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return r.Name}});var i=a0;Object.defineProperty(n,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(n,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(n,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(n,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),n.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(C,D){return this}}class a extends s{constructor(C,D,G){super(),this.varKind=C,this.name=D,this.rhs=G}render({es5:C,_n:D}){const G=C?e.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${G} ${this.name}${M};`+D}optimizeNames(C,D){if(C[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,C,D)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(C,D,G){super(),this.lhs=C,this.rhs=D,this.sideEffects=G}render({_n:C}){return`${this.lhs} = ${this.rhs};`+C}optimizeNames(C,D){if(!(this.lhs instanceof t.Name&&!C[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,C,D),this}get names(){const C=this.lhs instanceof t.Name?{}:{...this.lhs.names};return tt(C,this.rhs)}}class h extends o{constructor(C,D,G,M){super(C,G,M),this.op=D}render({_n:C}){return`${this.lhs} ${this.op}= ${this.rhs};`+C}}class l extends s{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`${this.label}:`+C}}class c extends s{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`break${this.label?` ${this.label}`:""};`+C}}class f extends s{constructor(C){super(),this.error=C}render({_n:C}){return`throw ${this.error};`+C}get names(){return this.error.names}}class d extends s{constructor(C){super(),this.code=C}render({_n:C}){return`${this.code};`+C}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(C,D){return this.code=W(this.code,C,D),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class u extends s{constructor(C=[]){super(),this.nodes=C}render(C){return this.nodes.reduce((D,G)=>D+G.render(C),"")}optimizeNodes(){const{nodes:C}=this;let D=C.length;for(;D--;){const G=C[D].optimizeNodes();Array.isArray(G)?C.splice(D,1,...G):G?C[D]=G:C.splice(D,1)}return C.length>0?this:void 0}optimizeNames(C,D){const{nodes:G}=this;let M=G.length;for(;M--;){const V=G[M];V.optimizeNames(C,D)||(lt(C,V.names),G.splice(M,1))}return G.length>0?this:void 0}get names(){return this.nodes.reduce((C,D)=>K(C,D.names),{})}}class p extends u{render(C){return"{"+C._n+super.render(C)+"}"+C._n}}class v extends u{}class _ extends p{}_.kind="else";class S extends p{constructor(C,D){super(D),this.condition=C}render(C){let D=`if(${this.condition})`+super.render(C);return this.else&&(D+="else "+this.else.render(C)),D}optimizeNodes(){super.optimizeNodes();const C=this.condition;if(C===!0)return this.nodes;let D=this.else;if(D){const G=D.optimizeNodes();D=this.else=Array.isArray(G)?new _(G):G}if(D)return C===!1?D instanceof S?D:D.nodes:this.nodes.length?this:new S(wt(C),D instanceof S?[D]:D.nodes);if(!(C===!1||!this.nodes.length))return this}optimizeNames(C,D){var G;if(this.else=(G=this.else)===null||G===void 0?void 0:G.optimizeNames(C,D),!!(super.optimizeNames(C,D)||this.else))return this.condition=W(this.condition,C,D),this}get names(){const C=super.names;return tt(C,this.condition),this.else&&K(C,this.else.names),C}}S.kind="if";class x extends p{}x.kind="for";class m extends x{constructor(C){super(),this.iteration=C}render(C){return`for(${this.iteration})`+super.render(C)}optimizeNames(C,D){if(super.optimizeNames(C,D))return this.iteration=W(this.iteration,C,D),this}get names(){return K(super.names,this.iteration.names)}}class k extends x{constructor(C,D,G,M){super(),this.varKind=C,this.name=D,this.from=G,this.to=M}render(C){const D=C.es5?e.varKinds.var:this.varKind,{name:G,from:M,to:V}=this;return`for(${D} ${G}=${M}; ${G}<${V}; ${G}++)`+super.render(C)}get names(){const C=tt(super.names,this.from);return tt(C,this.to)}}class F extends x{constructor(C,D,G,M){super(),this.loop=C,this.varKind=D,this.name=G,this.iterable=M}render(C){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(C)}optimizeNames(C,D){if(super.optimizeNames(C,D))return this.iterable=W(this.iterable,C,D),this}get names(){return K(super.names,this.iterable.names)}}class P extends p{constructor(C,D,G){super(),this.name=C,this.args=D,this.async=G}render(C){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(C)}}P.kind="func";class N extends u{render(C){return"return "+super.render(C)}}N.kind="return";class R extends p{render(C){let D="try"+super.render(C);return this.catch&&(D+=this.catch.render(C)),this.finally&&(D+=this.finally.render(C)),D}optimizeNodes(){var C,D;return super.optimizeNodes(),(C=this.catch)===null||C===void 0||C.optimizeNodes(),(D=this.finally)===null||D===void 0||D.optimizeNodes(),this}optimizeNames(C,D){var G,M;return super.optimizeNames(C,D),(G=this.catch)===null||G===void 0||G.optimizeNames(C,D),(M=this.finally)===null||M===void 0||M.optimizeNames(C,D),this}get names(){const C=super.names;return this.catch&&K(C,this.catch.names),this.finally&&K(C,this.finally.names),C}}class L extends p{constructor(C){super(),this.error=C}render(C){return`catch(${this.error})`+super.render(C)}}L.kind="catch";class U extends p{render(C){return"finally"+super.render(C)}}U.kind="finally";class B{constructor(C,D={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...D,_n:D.lines?`
|
|
18
|
+
`:""},this._extScope=C,this._scope=new e.Scope({parent:C}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(C){return this._scope.name(C)}scopeName(C){return this._extScope.name(C)}scopeValue(C,D){const G=this._extScope.value(C,D);return(this._values[G.prefix]||(this._values[G.prefix]=new Set)).add(G),G}getScopeValue(C,D){return this._extScope.getValue(C,D)}scopeRefs(C){return this._extScope.scopeRefs(C,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(C,D,G,M){const V=this._scope.toName(D);return G!==void 0&&M&&(this._constants[V.str]=G),this._leafNode(new a(C,V,G)),V}const(C,D,G){return this._def(e.varKinds.const,C,D,G)}let(C,D,G){return this._def(e.varKinds.let,C,D,G)}var(C,D,G){return this._def(e.varKinds.var,C,D,G)}assign(C,D,G){return this._leafNode(new o(C,D,G))}add(C,D){return this._leafNode(new h(C,n.operators.ADD,D))}code(C){return typeof C=="function"?C():C!==t.nil&&this._leafNode(new d(C)),this}object(...C){const D=["{"];for(const[G,M]of C)D.length>1&&D.push(","),D.push(G),(G!==M||this.opts.es5)&&(D.push(":"),(0,t.addCodeArg)(D,M));return D.push("}"),new t._Code(D)}if(C,D,G){if(this._blockNode(new S(C)),D&&G)this.code(D).else().code(G).endIf();else if(D)this.code(D).endIf();else if(G)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(C){return this._elseNode(new S(C))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(S,_)}_for(C,D){return this._blockNode(C),D&&this.code(D).endFor(),this}for(C,D){return this._for(new m(C),D)}forRange(C,D,G,M,V=this.opts.es5?e.varKinds.var:e.varKinds.let){const q=this._scope.toName(C);return this._for(new k(V,q,D,G),()=>M(q))}forOf(C,D,G,M=e.varKinds.const){const V=this._scope.toName(C);if(this.opts.es5){const q=D instanceof t.Name?D:this.var("_arr",D);return this.forRange("_i",0,(0,t._)`${q}.length`,Z=>{this.var(V,(0,t._)`${q}[${Z}]`),G(V)})}return this._for(new F("of",M,V,D),()=>G(V))}forIn(C,D,G,M=this.opts.es5?e.varKinds.var:e.varKinds.const){if(this.opts.ownProperties)return this.forOf(C,(0,t._)`Object.keys(${D})`,G);const V=this._scope.toName(C);return this._for(new F("in",M,V,D),()=>G(V))}endFor(){return this._endBlockNode(x)}label(C){return this._leafNode(new l(C))}break(C){return this._leafNode(new c(C))}return(C){const D=new N;if(this._blockNode(D),this.code(C),D.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(C,D,G){if(!D&&!G)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new R;if(this._blockNode(M),this.code(C),D){const V=this.name("e");this._currNode=M.catch=new L(V),D(V)}return G&&(this._currNode=M.finally=new U,this.code(G)),this._endBlockNode(L,U)}throw(C){return this._leafNode(new f(C))}block(C,D){return this._blockStarts.push(this._nodes.length),C&&this.code(C).endBlock(D),this}endBlock(C){const D=this._blockStarts.pop();if(D===void 0)throw new Error("CodeGen: not in self-balancing block");const G=this._nodes.length-D;if(G<0||C!==void 0&&G!==C)throw new Error(`CodeGen: wrong number of nodes: ${G} vs ${C} expected`);return this._nodes.length=D,this}func(C,D=t.nil,G,M){return this._blockNode(new P(C,D,G)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(P)}optimize(C=1){for(;C-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(C){return this._currNode.nodes.push(C),this}_blockNode(C){this._currNode.nodes.push(C),this._nodes.push(C)}_endBlockNode(C,D){const G=this._currNode;if(G instanceof C||D&&G instanceof D)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${D?`${C.kind}/${D.kind}`:C.kind}"`)}_elseNode(C){const D=this._currNode;if(!(D instanceof S))throw new Error('CodeGen: "else" without "if"');return this._currNode=D.else=C,this}get _root(){return this._nodes[0]}get _currNode(){const C=this._nodes;return C[C.length-1]}set _currNode(C){const D=this._nodes;D[D.length-1]=C}}n.CodeGen=B;function K(T,C){for(const D in C)T[D]=(T[D]||0)+(C[D]||0);return T}function tt(T,C){return C instanceof t._CodeOrName?K(T,C.names):T}function W(T,C,D){if(T instanceof t.Name)return G(T);if(!M(T))return T;return new t._Code(T._items.reduce((V,q)=>(q instanceof t.Name&&(q=G(q)),q instanceof t._Code?V.push(...q._items):V.push(q),V),[]));function G(V){const q=D[V.str];return q===void 0||C[V.str]!==1?V:(delete C[V.str],q)}function M(V){return V instanceof t._Code&&V._items.some(q=>q instanceof t.Name&&C[q.str]===1&&D[q.str]!==void 0)}}function lt(T,C){for(const D in C)T[D]=(T[D]||0)-(C[D]||0)}function wt(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${E(T)}`}n.not=wt;const bt=O(n.operators.AND);function xt(...T){return T.reduce(bt)}n.and=xt;const it=O(n.operators.OR);function Y(...T){return T.reduce(it)}n.or=Y;function O(T){return(C,D)=>C===t.nil?D:D===t.nil?C:(0,t._)`${E(C)} ${T} ${E(D)}`}function E(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(Rh);const qw=pn(Rh),Kw=Pt({__proto__:null,default:qw},[Rh]),Zt=Et(Kw);var Ih={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkStrictMode=n.getErrorPath=n.Type=n.useFunc=n.setEvaluated=n.evaluatedPropsToName=n.mergeEvaluated=n.eachItem=n.unescapeJsonPointer=n.escapeJsonPointer=n.escapeFragment=n.unescapeFragment=n.schemaRefOrVal=n.schemaHasRulesButRef=n.schemaHasRules=n.checkUnknownRules=n.alwaysValidSchema=n.toHash=void 0;const t=Zt,e=Ns;function r(P){const N={};for(const R of P)N[R]=!0;return N}n.toHash=r;function i(P,N){return typeof N=="boolean"?N:Object.keys(N).length===0?!0:(s(P,N),!a(N,P.self.RULES.all))}n.alwaysValidSchema=i;function s(P,N=P.schema){const{opts:R,self:L}=P;if(!R.strictSchema||typeof N=="boolean")return;const U=L.RULES.keywords;for(const B in N)U[B]||F(P,`unknown keyword: "${B}"`)}n.checkUnknownRules=s;function a(P,N){if(typeof P=="boolean")return!P;for(const R in P)if(N[R])return!0;return!1}n.schemaHasRules=a;function o(P,N){if(typeof P=="boolean")return!P;for(const R in P)if(R!=="$ref"&&N.all[R])return!0;return!1}n.schemaHasRulesButRef=o;function h({topSchemaRef:P,schemaPath:N},R,L,U){if(!U){if(typeof R=="number"||typeof R=="boolean")return R;if(typeof R=="string")return(0,t._)`${R}`}return(0,t._)`${P}${N}${(0,t.getProperty)(L)}`}n.schemaRefOrVal=h;function l(P){return d(decodeURIComponent(P))}n.unescapeFragment=l;function c(P){return encodeURIComponent(f(P))}n.escapeFragment=c;function f(P){return typeof P=="number"?`${P}`:P.replace(/~/g,"~0").replace(/\//g,"~1")}n.escapeJsonPointer=f;function d(P){return P.replace(/~1/g,"/").replace(/~0/g,"~")}n.unescapeJsonPointer=d;function u(P,N){if(Array.isArray(P))for(const R of P)N(R);else N(P)}n.eachItem=u;function p({mergeNames:P,mergeToName:N,mergeValues:R,resultToName:L}){return(U,B,K,tt)=>{const W=K===void 0?B:K instanceof t.Name?(B instanceof t.Name?P(U,B,K):N(U,B,K),K):B instanceof t.Name?(N(U,K,B),B):R(B,K);return tt===t.Name&&!(W instanceof t.Name)?L(U,W):W}}n.mergeEvaluated={props:p({mergeNames:(P,N,R)=>P.if((0,t._)`${R} !== true && ${N} !== undefined`,()=>{P.if((0,t._)`${N} === true`,()=>P.assign(R,!0),()=>P.assign(R,(0,t._)`${R} || {}`).code((0,t._)`Object.assign(${R}, ${N})`))}),mergeToName:(P,N,R)=>P.if((0,t._)`${R} !== true`,()=>{N===!0?P.assign(R,!0):(P.assign(R,(0,t._)`${R} || {}`),_(P,R,N))}),mergeValues:(P,N)=>P===!0?!0:{...P,...N},resultToName:v}),items:p({mergeNames:(P,N,R)=>P.if((0,t._)`${R} !== true && ${N} !== undefined`,()=>P.assign(R,(0,t._)`${N} === true ? true : ${R} > ${N} ? ${R} : ${N}`)),mergeToName:(P,N,R)=>P.if((0,t._)`${R} !== true`,()=>P.assign(R,N===!0?!0:(0,t._)`${R} > ${N} ? ${R} : ${N}`)),mergeValues:(P,N)=>P===!0?!0:Math.max(P,N),resultToName:(P,N)=>P.var("items",N)})};function v(P,N){if(N===!0)return P.var("props",!0);const R=P.var("props",(0,t._)`{}`);return N!==void 0&&_(P,R,N),R}n.evaluatedPropsToName=v;function _(P,N,R){Object.keys(R).forEach(L=>P.assign((0,t._)`${N}${(0,t.getProperty)(L)}`,!0))}n.setEvaluated=_;const S={};function x(P,N){return P.scopeValue("func",{ref:N,code:S[N.code]||(S[N.code]=new e._Code(N.code))})}n.useFunc=x;var m;(function(P){P[P.Num=0]="Num",P[P.Str=1]="Str"})(m=n.Type||(n.Type={}));function k(P,N,R){if(P instanceof t.Name){const L=N===m.Num;return R?L?(0,t._)`"[" + ${P} + "]"`:(0,t._)`"['" + ${P} + "']"`:L?(0,t._)`"/" + ${P}`:(0,t._)`"/" + ${P}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return R?(0,t.getProperty)(P).toString():"/"+f(P)}n.getErrorPath=k;function F(P,N,R=P.opts.strictSchema){if(R){if(N=`strict mode: ${N}`,R===!0)throw new Error(N);P.self.logger.warn(N)}}n.checkStrictMode=F})(Ih);const Yw=pn(Ih),Xw=Pt({__proto__:null,default:Yw},[Ih]),ce=Et(Xw);var jh={};Object.defineProperty(jh,"__esModule",{value:!0});const nn=Zt,Jw={data:new nn.Name("data"),valCxt:new nn.Name("valCxt"),instancePath:new nn.Name("instancePath"),parentData:new nn.Name("parentData"),parentDataProperty:new nn.Name("parentDataProperty"),rootData:new nn.Name("rootData"),dynamicAnchors:new nn.Name("dynamicAnchors"),vErrors:new nn.Name("vErrors"),errors:new nn.Name("errors"),this:new nn.Name("this"),self:new nn.Name("self"),scope:new nn.Name("scope"),json:new nn.Name("json"),jsonPos:new nn.Name("jsonPos"),jsonLen:new nn.Name("jsonLen"),jsonPart:new nn.Name("jsonPart")};var Qw=jh.default=Jw;const Zw=Pt({__proto__:null,default:Qw},[jh]),kr=Et(Zw);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.extendErrors=n.resetErrorsCount=n.reportExtraError=n.reportError=n.keyword$DataError=n.keywordError=void 0;const t=Zt,e=ce,r=kr;n.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},n.keyword$DataError={message:({keyword:_,schemaType:S})=>S?(0,t.str)`"${_}" keyword must be ${S} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function i(_,S=n.keywordError,x,m){const{it:k}=_,{gen:F,compositeRule:P,allErrors:N}=k,R=f(_,S,x);m??(P||N)?h(F,R):l(k,(0,t._)`[${R}]`)}n.reportError=i;function s(_,S=n.keywordError,x){const{it:m}=_,{gen:k,compositeRule:F,allErrors:P}=m,N=f(_,S,x);h(k,N),F||P||l(m,r.default.vErrors)}n.reportExtraError=s;function a(_,S){_.assign(r.default.errors,S),_.if((0,t._)`${r.default.vErrors} !== null`,()=>_.if(S,()=>_.assign((0,t._)`${r.default.vErrors}.length`,S),()=>_.assign(r.default.vErrors,null)))}n.resetErrorsCount=a;function o({gen:_,keyword:S,schemaValue:x,data:m,errsCount:k,it:F}){if(k===void 0)throw new Error("ajv implementation error");const P=_.name("err");_.forRange("i",k,r.default.errors,N=>{_.const(P,(0,t._)`${r.default.vErrors}[${N}]`),_.if((0,t._)`${P}.instancePath === undefined`,()=>_.assign((0,t._)`${P}.instancePath`,(0,t.strConcat)(r.default.instancePath,F.errorPath))),_.assign((0,t._)`${P}.schemaPath`,(0,t.str)`${F.errSchemaPath}/${S}`),F.opts.verbose&&(_.assign((0,t._)`${P}.schema`,x),_.assign((0,t._)`${P}.data`,m))})}n.extendErrors=o;function h(_,S){const x=_.const("err",S);_.if((0,t._)`${r.default.vErrors} === null`,()=>_.assign(r.default.vErrors,(0,t._)`[${x}]`),(0,t._)`${r.default.vErrors}.push(${x})`),_.code((0,t._)`${r.default.errors}++`)}function l(_,S){const{gen:x,validateName:m,schemaEnv:k}=_;k.$async?x.throw((0,t._)`new ${_.ValidationError}(${S})`):(x.assign((0,t._)`${m}.errors`,S),x.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function f(_,S,x){const{createErrors:m}=_.it;return m===!1?(0,t._)`{}`:d(_,S,x)}function d(_,S,x={}){const{gen:m,it:k}=_,F=[u(k,x),p(_,x)];return v(_,S,F),m.object(...F)}function u({errorPath:_},{instancePath:S}){const x=S?(0,t.str)`${_}${(0,e.getErrorPath)(S,e.Type.Str)}`:_;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,x)]}function p({keyword:_,it:{errSchemaPath:S}},{schemaPath:x,parentSchema:m}){let k=m?S:(0,t.str)`${S}/${_}`;return x&&(k=(0,t.str)`${k}${(0,e.getErrorPath)(x,e.Type.Str)}`),[c.schemaPath,k]}function v(_,{params:S,message:x},m){const{keyword:k,data:F,schemaValue:P,it:N}=_,{opts:R,propertyName:L,topSchemaRef:U,schemaPath:B}=N;m.push([c.keyword,k],[c.params,typeof S=="function"?S(_):S||(0,t._)`{}`]),R.messages&&m.push([c.message,typeof x=="function"?x(_):x]),R.verbose&&m.push([c.schema,P],[c.parentSchema,(0,t._)`${U}${B}`],[r.default.data,F]),L&&m.push([c.propertyName,L])}})(Nh);const Ww=pn(Nh),tx=Pt({__proto__:null,default:Ww},[Nh]),Rs=Et(tx);Object.defineProperty(pi,"__esModule",{value:!0});var o0=pi.boolOrEmptySchema=l0=pi.topBoolOrEmptySchema=void 0;const ex=Rs,nx=Zt,rx=kr,ix={message:"boolean schema is false"};function sx(n){const{gen:t,schema:e,validateName:r}=n;e===!1?h0(n,!1):typeof e=="object"&&e.$async===!0?t.return(rx.default.data):(t.assign((0,nx._)`${r}.errors`,null),t.return(!0))}var l0=pi.topBoolOrEmptySchema=sx;function ax(n,t){const{gen:e,schema:r}=n;r===!1?(e.var(t,!1),h0(n)):e.var(t,!0)}o0=pi.boolOrEmptySchema=ax;function h0(n,t){const{gen:e,data:r}=n,i={gen:e,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:n};(0,ex.reportError)(i,ix,void 0,t)}const ox=Pt({__proto__:null,get boolOrEmptySchema(){return o0},default:pi,get topBoolOrEmptySchema(){return l0}},[pi]),lx=Et(ox);var Lh={},gi={};Object.defineProperty(gi,"__esModule",{value:!0});var c0=gi.getRules=u0=gi.isJSONType=void 0;const hx=["string","number","integer","boolean","null","object","array"],cx=new Set(hx);function ux(n){return typeof n=="string"&&cx.has(n)}var u0=gi.isJSONType=ux;function dx(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}c0=gi.getRules=dx;const fx=Pt({__proto__:null,default:gi,get getRules(){return c0},get isJSONType(){return u0}},[gi]),d0=Et(fx);var Cr={};Object.defineProperty(Cr,"__esModule",{value:!0});var f0=Cr.shouldUseRule=m0=Cr.shouldUseGroup=p0=Cr.schemaHasRulesForType=void 0;function px({schema:n,self:t},e){const r=t.RULES.types[e];return r&&r!==!0&&g0(n,r)}var p0=Cr.schemaHasRulesForType=px;function g0(n,t){return t.rules.some(e=>y0(n,e))}var m0=Cr.shouldUseGroup=g0;function y0(n,t){var e;return n[t.keyword]!==void 0||((e=t.definition.implements)===null||e===void 0?void 0:e.some(r=>n[r]!==void 0))}f0=Cr.shouldUseRule=y0;const gx=Pt({__proto__:null,default:Cr,get schemaHasRulesForType(){return p0},get shouldUseGroup(){return m0},get shouldUseRule(){return f0}},[Cr]),v0=Et(gx);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.reportTypeError=n.checkDataTypes=n.checkDataType=n.coerceAndCheckDataType=n.getJSONTypes=n.getSchemaTypes=n.DataType=void 0;const t=d0,e=v0,r=Rs,i=Zt,s=ce;var a;(function(m){m[m.Correct=0]="Correct",m[m.Wrong=1]="Wrong"})(a=n.DataType||(n.DataType={}));function o(m){const k=h(m.type);if(k.includes("null")){if(m.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!k.length&&m.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');m.nullable===!0&&k.push("null")}return k}n.getSchemaTypes=o;function h(m){const k=Array.isArray(m)?m:m?[m]:[];if(k.every(t.isJSONType))return k;throw new Error("type must be JSONType or JSONType[]: "+k.join(","))}n.getJSONTypes=h;function l(m,k){const{gen:F,data:P,opts:N}=m,R=f(k,N.coerceTypes),L=k.length>0&&!(R.length===0&&k.length===1&&(0,e.schemaHasRulesForType)(m,k[0]));if(L){const U=v(k,P,N.strictNumbers,a.Wrong);F.if(U,()=>{R.length?d(m,k,R):S(m)})}return L}n.coerceAndCheckDataType=l;const c=new Set(["string","number","integer","boolean","null"]);function f(m,k){return k?m.filter(F=>c.has(F)||k==="array"&&F==="array"):[]}function d(m,k,F){const{gen:P,data:N,opts:R}=m,L=P.let("dataType",(0,i._)`typeof ${N}`),U=P.let("coerced",(0,i._)`undefined`);R.coerceTypes==="array"&&P.if((0,i._)`${L} == 'object' && Array.isArray(${N}) && ${N}.length == 1`,()=>P.assign(N,(0,i._)`${N}[0]`).assign(L,(0,i._)`typeof ${N}`).if(v(k,N,R.strictNumbers),()=>P.assign(U,N))),P.if((0,i._)`${U} !== undefined`);for(const K of F)(c.has(K)||K==="array"&&R.coerceTypes==="array")&&B(K);P.else(),S(m),P.endIf(),P.if((0,i._)`${U} !== undefined`,()=>{P.assign(N,U),u(m,U)});function B(K){switch(K){case"string":P.elseIf((0,i._)`${L} == "number" || ${L} == "boolean"`).assign(U,(0,i._)`"" + ${N}`).elseIf((0,i._)`${N} === null`).assign(U,(0,i._)`""`);return;case"number":P.elseIf((0,i._)`${L} == "boolean" || ${N} === null
|
|
19
|
+
|| (${L} == "string" && ${N} && ${N} == +${N})`).assign(U,(0,i._)`+${N}`);return;case"integer":P.elseIf((0,i._)`${L} === "boolean" || ${N} === null
|
|
20
|
+
|| (${L} === "string" && ${N} && ${N} == +${N} && !(${N} % 1))`).assign(U,(0,i._)`+${N}`);return;case"boolean":P.elseIf((0,i._)`${N} === "false" || ${N} === 0 || ${N} === null`).assign(U,!1).elseIf((0,i._)`${N} === "true" || ${N} === 1`).assign(U,!0);return;case"null":P.elseIf((0,i._)`${N} === "" || ${N} === 0 || ${N} === false`),P.assign(U,null);return;case"array":P.elseIf((0,i._)`${L} === "string" || ${L} === "number"
|
|
21
|
+
|| ${L} === "boolean" || ${N} === null`).assign(U,(0,i._)`[${N}]`)}}}function u({gen:m,parentData:k,parentDataProperty:F},P){m.if((0,i._)`${k} !== undefined`,()=>m.assign((0,i._)`${k}[${F}]`,P))}function p(m,k,F,P=a.Correct){const N=P===a.Correct?i.operators.EQ:i.operators.NEQ;let R;switch(m){case"null":return(0,i._)`${k} ${N} null`;case"array":R=(0,i._)`Array.isArray(${k})`;break;case"object":R=(0,i._)`${k} && typeof ${k} == "object" && !Array.isArray(${k})`;break;case"integer":R=L((0,i._)`!(${k} % 1) && !isNaN(${k})`);break;case"number":R=L();break;default:return(0,i._)`typeof ${k} ${N} ${m}`}return P===a.Correct?R:(0,i.not)(R);function L(U=i.nil){return(0,i.and)((0,i._)`typeof ${k} == "number"`,U,F?(0,i._)`isFinite(${k})`:i.nil)}}n.checkDataType=p;function v(m,k,F,P){if(m.length===1)return p(m[0],k,F,P);let N;const R=(0,s.toHash)(m);if(R.array&&R.object){const L=(0,i._)`typeof ${k} != "object"`;N=R.null?L:(0,i._)`!${k} || ${L}`,delete R.null,delete R.array,delete R.object}else N=i.nil;R.number&&delete R.integer;for(const L in R)N=(0,i.and)(N,p(L,k,F,P));return N}n.checkDataTypes=v;const _={message:({schema:m})=>`must be ${m}`,params:({schema:m,schemaValue:k})=>typeof m=="string"?(0,i._)`{type: ${m}}`:(0,i._)`{type: ${k}}`};function S(m){const k=x(m);(0,r.reportError)(k,_)}n.reportTypeError=S;function x(m){const{gen:k,data:F,schema:P}=m,N=(0,s.schemaRefOrVal)(m,P,"type");return{gen:k,keyword:"type",data:F,schema:P.type,schemaCode:N,schemaValue:N,parentSchema:P,params:{},it:m}}})(Lh);const mx=pn(Lh),yx=Pt({__proto__:null,default:mx},[Lh]),Mo=Et(yx);var Ds={};Object.defineProperty(Ds,"__esModule",{value:!0});var _0=Ds.assignDefaults=void 0;const Xi=Zt,vx=ce;function _x(n,t){const{properties:e,items:r}=n.schema;if(t==="object"&&e)for(const i in e)w0(n,i,e[i].default);else t==="array"&&Array.isArray(r)&&r.forEach((i,s)=>w0(n,s,i.default))}_0=Ds.assignDefaults=_x;function w0(n,t,e){const{gen:r,compositeRule:i,data:s,opts:a}=n;if(e===void 0)return;const o=(0,Xi._)`${s}${(0,Xi.getProperty)(t)}`;if(i){(0,vx.checkStrictMode)(n,`default is ignored for: ${o}`);return}let h=(0,Xi._)`${o} === undefined`;a.useDefaults==="empty"&&(h=(0,Xi._)`${h} || ${o} === null || ${o} === ""`),r.if(h,(0,Xi._)`${o} = ${(0,Xi.stringify)(e)}`)}const wx=Pt({__proto__:null,get assignDefaults(){return _0},default:Ds},[Ds]),xx=Et(wx);var Vn={},me={};Object.defineProperty(me,"__esModule",{value:!0});var x0=me.validateUnion=D0=me.validateArray=R0=me.usePattern=N0=me.callValidateCode=F0=me.schemaProperties=$0=me.allSchemaProperties=A0=me.noPropertyInData=E0=me.propertyInData=P0=me.isOwnProperty=T0=me.hasPropFunc=k0=me.reportMissingProp=S0=me.checkMissingProp=b0=me.checkReportMissingProp=void 0;const be=Zt,Uh=ce,Yr=kr,bx=ce;function Sx(n,t){const{gen:e,data:r,it:i}=n;e.if(zh(e,r,t,i.opts.ownProperties),()=>{n.setParams({missingProperty:(0,be._)`${t}`},!0),n.error()})}var b0=me.checkReportMissingProp=Sx;function kx({gen:n,data:t,it:{opts:e}},r,i){return(0,be.or)(...r.map(s=>(0,be.and)(zh(n,t,s,e.ownProperties),(0,be._)`${i} = ${s}`)))}var S0=me.checkMissingProp=kx;function Cx(n,t){n.setParams({missingProperty:t},!0),n.error()}var k0=me.reportMissingProp=Cx;function C0(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,be._)`Object.prototype.hasOwnProperty`})}var T0=me.hasPropFunc=C0;function Gh(n,t,e){return(0,be._)`${C0(n)}.call(${t}, ${e})`}var P0=me.isOwnProperty=Gh;function Tx(n,t,e,r){const i=(0,be._)`${t}${(0,be.getProperty)(e)} !== undefined`;return r?(0,be._)`${i} && ${Gh(n,t,e)}`:i}var E0=me.propertyInData=Tx;function zh(n,t,e,r){const i=(0,be._)`${t}${(0,be.getProperty)(e)} === undefined`;return r?(0,be.or)(i,(0,be.not)(Gh(n,t,e))):i}var A0=me.noPropertyInData=zh;function O0(n){return n?Object.keys(n).filter(t=>t!=="__proto__"):[]}var $0=me.allSchemaProperties=O0;function Px(n,t){return O0(t).filter(e=>!(0,Uh.alwaysValidSchema)(n,t[e]))}var F0=me.schemaProperties=Px;function Ex({schemaCode:n,data:t,it:{gen:e,topSchemaRef:r,schemaPath:i,errorPath:s},it:a},o,h,l){const c=l?(0,be._)`${n}, ${t}, ${r}${i}`:t,f=[[Yr.default.instancePath,(0,be.strConcat)(Yr.default.instancePath,s)],[Yr.default.parentData,a.parentData],[Yr.default.parentDataProperty,a.parentDataProperty],[Yr.default.rootData,Yr.default.rootData]];a.opts.dynamicRef&&f.push([Yr.default.dynamicAnchors,Yr.default.dynamicAnchors]);const d=(0,be._)`${c}, ${e.object(...f)}`;return h!==be.nil?(0,be._)`${o}.call(${h}, ${d})`:(0,be._)`${o}(${d})`}var N0=me.callValidateCode=Ex;const Ax=(0,be._)`new RegExp`;function Ox({gen:n,it:{opts:t}},e){const r=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(e,r);return n.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,be._)`${i.code==="new RegExp"?Ax:(0,bx.useFunc)(n,i)}(${e}, ${r})`})}var R0=me.usePattern=Ox;function $x(n){const{gen:t,data:e,keyword:r,it:i}=n,s=t.name("valid");if(i.allErrors){const o=t.let("valid",!0);return a(()=>t.assign(o,!1)),o}return t.var(s,!0),a(()=>t.break()),s;function a(o){const h=t.const("len",(0,be._)`${e}.length`);t.forRange("i",0,h,l=>{n.subschema({keyword:r,dataProp:l,dataPropType:Uh.Type.Num},s),t.if((0,be.not)(s),o)})}}var D0=me.validateArray=$x;function Fx(n){const{gen:t,schema:e,keyword:r,it:i}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");if(e.some(o=>(0,Uh.alwaysValidSchema)(i,o))&&!i.opts.unevaluated)return;const s=t.let("valid",!1),a=t.name("_valid");t.block(()=>e.forEach((o,h)=>{const l=n.subschema({keyword:r,schemaProp:h,compositeRule:!0},a);t.assign(s,(0,be._)`${s} || ${a}`),n.mergeValidEvaluated(l,a)||t.if((0,be.not)(s))})),n.result(s,()=>n.reset(),()=>n.error(!0))}x0=me.validateUnion=Fx;const Nx=Pt({__proto__:null,get allSchemaProperties(){return $0},get callValidateCode(){return N0},get checkMissingProp(){return S0},get checkReportMissingProp(){return b0},default:me,get hasPropFunc(){return T0},get isOwnProperty(){return P0},get noPropertyInData(){return A0},get propertyInData(){return E0},get reportMissingProp(){return k0},get schemaProperties(){return F0},get usePattern(){return R0},get validateArray(){return D0},get validateUnion(){return x0}},[me]),Bn=Et(Nx);Object.defineProperty(Vn,"__esModule",{value:!0});var M0=Vn.validateKeywordUsage=G0=Vn.validSchemaType=j0=Vn.funcKeywordCode=I0=Vn.macroKeywordCode=void 0;const ln=Zt,mi=kr,Rx=Bn,Dx=Rs;function Mx(n,t){const{gen:e,keyword:r,schema:i,parentSchema:s,it:a}=n,o=t.macro.call(a.self,i,s,a),h=U0(e,r,o);a.opts.validateSchema!==!1&&a.self.validateSchema(o,!0);const l=e.name("valid");n.subschema({schema:o,schemaPath:ln.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:h,compositeRule:!0},l),n.pass(l,()=>n.error(!0))}var I0=Vn.macroKeywordCode=Mx;function Ix(n,t){var e;const{gen:r,keyword:i,schema:s,parentSchema:a,$data:o,it:h}=n;Lx(h,t);const l=!o&&t.compile?t.compile.call(h.self,s,a,h):t.validate,c=U0(r,i,l),f=r.let("valid");n.block$data(f,d),n.ok((e=t.valid)!==null&&e!==void 0?e:f);function d(){if(t.errors===!1)v(),t.modifying&&L0(n),_(()=>n.error());else{const S=t.async?u():p();t.modifying&&L0(n),_(()=>jx(n,S))}}function u(){const S=r.let("ruleErrs",null);return r.try(()=>v((0,ln._)`await `),x=>r.assign(f,!1).if((0,ln._)`${x} instanceof ${h.ValidationError}`,()=>r.assign(S,(0,ln._)`${x}.errors`),()=>r.throw(x))),S}function p(){const S=(0,ln._)`${c}.errors`;return r.assign(S,null),v(ln.nil),S}function v(S=t.async?(0,ln._)`await `:ln.nil){const x=h.opts.passContext?mi.default.this:mi.default.self,m=!("compile"in t&&!o||t.schema===!1);r.assign(f,(0,ln._)`${S}${(0,Rx.callValidateCode)(n,c,x,m)}`,t.modifying)}function _(S){var x;r.if((0,ln.not)((x=t.valid)!==null&&x!==void 0?x:f),S)}}var j0=Vn.funcKeywordCode=Ix;function L0(n){const{gen:t,data:e,it:r}=n;t.if(r.parentData,()=>t.assign(e,(0,ln._)`${r.parentData}[${r.parentDataProperty}]`))}function jx(n,t){const{gen:e}=n;e.if((0,ln._)`Array.isArray(${t})`,()=>{e.assign(mi.default.vErrors,(0,ln._)`${mi.default.vErrors} === null ? ${t} : ${mi.default.vErrors}.concat(${t})`).assign(mi.default.errors,(0,ln._)`${mi.default.vErrors}.length`),(0,Dx.extendErrors)(n)},()=>n.error())}function Lx({schemaEnv:n},t){if(t.async&&!n.$async)throw new Error("async keyword in sync schema")}function U0(n,t,e){if(e===void 0)throw new Error(`keyword "${t}" failed to compile`);return n.scopeValue("keyword",typeof e=="function"?{ref:e}:{ref:e,code:(0,ln.stringify)(e)})}function Ux(n,t,e=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(n):r==="object"?n&&typeof n=="object"&&!Array.isArray(n):typeof n==r||e&&typeof n>"u")}var G0=Vn.validSchemaType=Ux;function Gx({schema:n,opts:t,self:e,errSchemaPath:r},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const a=i.dependencies;if(a!=null&&a.some(o=>!Object.prototype.hasOwnProperty.call(n,o)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(n[s])){const o=`keyword "${s}" value is invalid at path "${r}": `+e.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")e.logger.error(o);else throw new Error(o)}}M0=Vn.validateKeywordUsage=Gx;const zx=Pt({__proto__:null,default:Vn,get funcKeywordCode(){return j0},get macroKeywordCode(){return I0},get validSchemaType(){return G0},get validateKeywordUsage(){return M0}},[Vn]),Vx=Et(zx);var Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});var z0=Tr.extendSubschemaMode=H0=Tr.extendSubschemaData=B0=Tr.getSubschema=void 0;const or=Zt,V0=ce;function Bx(n,{keyword:t,schemaProp:e,schema:r,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const o=n.schema[t];return e===void 0?{schema:o,schemaPath:(0,or._)`${n.schemaPath}${(0,or.getProperty)(t)}`,errSchemaPath:`${n.errSchemaPath}/${t}`}:{schema:o[e],schemaPath:(0,or._)`${n.schemaPath}${(0,or.getProperty)(t)}${(0,or.getProperty)(e)}`,errSchemaPath:`${n.errSchemaPath}/${t}/${(0,V0.escapeFragment)(e)}`}}if(r!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}var B0=Tr.getSubschema=Bx;function Hx(n,t,{dataProp:e,dataPropType:r,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&e!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=t;if(e!==void 0){const{errorPath:l,dataPathArr:c,opts:f}=t,d=o.let("data",(0,or._)`${t.data}${(0,or.getProperty)(e)}`,!0);h(d),n.errorPath=(0,or.str)`${l}${(0,V0.getErrorPath)(e,r,f.jsPropertySyntax)}`,n.parentDataProperty=(0,or._)`${e}`,n.dataPathArr=[...c,n.parentDataProperty]}if(i!==void 0){const l=i instanceof or.Name?i:o.let("data",i,!0);h(l),a!==void 0&&(n.propertyName=a)}s&&(n.dataTypes=s);function h(l){n.data=l,n.dataLevel=t.dataLevel+1,n.dataTypes=[],t.definedProperties=new Set,n.parentData=t.data,n.dataNames=[...t.dataNames,l]}}var H0=Tr.extendSubschemaData=Hx;function qx(n,{jtdDiscriminator:t,jtdMetadata:e,compositeRule:r,createErrors:i,allErrors:s}){r!==void 0&&(n.compositeRule=r),i!==void 0&&(n.createErrors=i),s!==void 0&&(n.allErrors=s),n.jtdDiscriminator=t,n.jtdMetadata=e}z0=Tr.extendSubschemaMode=qx;const Kx=Pt({__proto__:null,default:Tr,get extendSubschemaData(){return H0},get extendSubschemaMode(){return z0},get getSubschema(){return B0}},[Tr]),Yx=Et(Kx);var hn={},q0=function n(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,i,s;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!n(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[i]))return!1;for(i=r;i--!==0;){var a=s[i];if(!n(t[a],e[a]))return!1}return!0}return t!==t&&e!==e};const Xx=pn(q0),Jx=Pt({__proto__:null,default:Xx},[q0]),K0=Et(Jx);var Y0={exports:{}},Xr=Y0.exports=function(n,t,e){typeof t=="function"&&(e=t,t={}),e=t.cb||e;var r=typeof e=="function"?e:e.pre||function(){},i=e.post||function(){};Io(t,r,i,n,"",n)};Xr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Xr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Xr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Xr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Io(n,t,e,r,i,s,a,o,h,l){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,i,s,a,o,h,l);for(var c in r){var f=r[c];if(Array.isArray(f)){if(c in Xr.arrayKeywords)for(var d=0;d<f.length;d++)Io(n,t,e,f[d],i+"/"+c+"/"+d,s,i,c,r,d)}else if(c in Xr.propsKeywords){if(f&&typeof f=="object")for(var u in f)Io(n,t,e,f[u],i+"/"+c+"/"+Qx(u),s,i,c,r,u)}else(c in Xr.keywords||n.allKeys&&!(c in Xr.skipKeywords))&&Io(n,t,e,f,i+"/"+c,s,i,c,r)}e(r,i,s,a,o,h,l)}}function Qx(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}var X0=Y0.exports;const Zx=pn(X0),Wx=Pt({__proto__:null,default:Zx},[X0]),tb=Et(Wx);Object.defineProperty(hn,"__esModule",{value:!0});var J0=hn.getSchemaRefs=ip=hn.resolveUrl=rp=hn.normalizeId=np=hn._getFullPath=tp=hn.getFullPath=Q0=hn.inlineRef=void 0;const eb=ce,nb=K0,rb=tb,ib=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sb(n,t=!0){return typeof n=="boolean"?!0:t===!0?!Vh(n):t?Z0(n)<=t:!1}var Q0=hn.inlineRef=sb;const ab=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Vh(n){for(const t in n){if(ab.has(t))return!0;const e=n[t];if(Array.isArray(e)&&e.some(Vh)||typeof e=="object"&&Vh(e))return!0}return!1}function Z0(n){let t=0;for(const e in n)if(e==="$ref"||(t++,!ib.has(e)&&(typeof n[e]=="object"&&(0,eb.eachItem)(n[e],r=>t+=Z0(r)),t===1/0)))return 1/0;return t}function W0(n,t="",e){e!==!1&&(t=Ji(t));const r=n.parse(t);return ep(n,r)}var tp=hn.getFullPath=W0;function ep(n,t){return n.serialize(t).split("#")[0]+"#"}var np=hn._getFullPath=ep;const ob=/#\/?$/;function Ji(n){return n?n.replace(ob,""):""}var rp=hn.normalizeId=Ji;function lb(n,t,e){return e=Ji(e),n.resolve(t,e)}var ip=hn.resolveUrl=lb;const hb=/^[a-z_][-a-z0-9._]*$/i;function cb(n,t){if(typeof n=="boolean")return{};const{schemaId:e,uriResolver:r}=this.opts,i=Ji(n[e]||t),s={"":i},a=W0(r,i,!1),o={},h=new Set;return rb(n,{allKeys:!0},(f,d,u,p)=>{if(p===void 0)return;const v=a+d;let _=s[p];typeof f[e]=="string"&&(_=S.call(this,f[e])),x.call(this,f.$anchor),x.call(this,f.$dynamicAnchor),s[d]=_;function S(m){const k=this.opts.uriResolver.resolve;if(m=Ji(_?k(_,m):m),h.has(m))throw c(m);h.add(m);let F=this.refs[m];return typeof F=="string"&&(F=this.refs[F]),typeof F=="object"?l(f,F.schema,m):m!==Ji(v)&&(m[0]==="#"?(l(f,o[m],m),o[m]=f):this.refs[m]=v),m}function x(m){if(typeof m=="string"){if(!hb.test(m))throw new Error(`invalid anchor "${m}"`);S.call(this,`#${m}`)}}}),o;function l(f,d,u){if(d!==void 0&&!nb(f,d))throw c(u)}function c(f){return new Error(`reference "${f}" resolves to more than one schema`)}}J0=hn.getSchemaRefs=cb;const ub=Pt({__proto__:null,get _getFullPath(){return np},default:hn,get getFullPath(){return tp},get getSchemaRefs(){return J0},get inlineRef(){return Q0},get normalizeId(){return rp},get resolveUrl(){return ip}},[hn]),jo=Et(ub);Object.defineProperty(Sr,"__esModule",{value:!0});var sp=Sr.getData=wp=Sr.KeywordCxt=lp=Sr.validateFunctionCode=void 0;const ap=lx,op=Mo,Bh=v0,Lo=Mo,db=xx,Ms=Vx,Hh=Yx,$t=Zt,Vt=kr,fb=jo,Pr=ce,Is=Rs;function pb(n){if(dp(n)&&(fp(n),up(n))){yb(n);return}hp(n,()=>(0,ap.topBoolOrEmptySchema)(n))}var lp=Sr.validateFunctionCode=pb;function hp({gen:n,validateName:t,schema:e,schemaEnv:r,opts:i},s){i.code.es5?n.func(t,(0,$t._)`${Vt.default.data}, ${Vt.default.valCxt}`,r.$async,()=>{n.code((0,$t._)`"use strict"; ${cp(e,i)}`),mb(n,i),n.code(s)}):n.func(t,(0,$t._)`${Vt.default.data}, ${gb(i)}`,r.$async,()=>n.code(cp(e,i)).code(s))}function gb(n){return(0,$t._)`{${Vt.default.instancePath}="", ${Vt.default.parentData}, ${Vt.default.parentDataProperty}, ${Vt.default.rootData}=${Vt.default.data}${n.dynamicRef?(0,$t._)`, ${Vt.default.dynamicAnchors}={}`:$t.nil}}={}`}function mb(n,t){n.if(Vt.default.valCxt,()=>{n.var(Vt.default.instancePath,(0,$t._)`${Vt.default.valCxt}.${Vt.default.instancePath}`),n.var(Vt.default.parentData,(0,$t._)`${Vt.default.valCxt}.${Vt.default.parentData}`),n.var(Vt.default.parentDataProperty,(0,$t._)`${Vt.default.valCxt}.${Vt.default.parentDataProperty}`),n.var(Vt.default.rootData,(0,$t._)`${Vt.default.valCxt}.${Vt.default.rootData}`),t.dynamicRef&&n.var(Vt.default.dynamicAnchors,(0,$t._)`${Vt.default.valCxt}.${Vt.default.dynamicAnchors}`)},()=>{n.var(Vt.default.instancePath,(0,$t._)`""`),n.var(Vt.default.parentData,(0,$t._)`undefined`),n.var(Vt.default.parentDataProperty,(0,$t._)`undefined`),n.var(Vt.default.rootData,Vt.default.data),t.dynamicRef&&n.var(Vt.default.dynamicAnchors,(0,$t._)`{}`)})}function yb(n){const{schema:t,opts:e,gen:r}=n;hp(n,()=>{e.$comment&&t.$comment&&gp(n),bb(n),r.let(Vt.default.vErrors,null),r.let(Vt.default.errors,0),e.unevaluated&&vb(n),pp(n),Cb(n)})}function vb(n){const{gen:t,validateName:e}=n;n.evaluated=t.const("evaluated",(0,$t._)`${e}.evaluated`),t.if((0,$t._)`${n.evaluated}.dynamicProps`,()=>t.assign((0,$t._)`${n.evaluated}.props`,(0,$t._)`undefined`)),t.if((0,$t._)`${n.evaluated}.dynamicItems`,()=>t.assign((0,$t._)`${n.evaluated}.items`,(0,$t._)`undefined`))}function cp(n,t){const e=typeof n=="object"&&n[t.schemaId];return e&&(t.code.source||t.code.process)?(0,$t._)`/*# sourceURL=${e} */`:$t.nil}function _b(n,t){if(dp(n)&&(fp(n),up(n))){wb(n,t);return}(0,ap.boolOrEmptySchema)(n,t)}function up({schema:n,self:t}){if(typeof n=="boolean")return!n;for(const e in n)if(t.RULES.all[e])return!0;return!1}function dp(n){return typeof n.schema!="boolean"}function wb(n,t){const{schema:e,gen:r,opts:i}=n;i.$comment&&e.$comment&&gp(n),Sb(n),kb(n);const s=r.const("_errs",Vt.default.errors);pp(n,s),r.var(t,(0,$t._)`${s} === ${Vt.default.errors}`)}function fp(n){(0,Pr.checkUnknownRules)(n),xb(n)}function pp(n,t){if(n.opts.jtd)return mp(n,[],!1,t);const e=(0,op.getSchemaTypes)(n.schema),r=(0,op.coerceAndCheckDataType)(n,e);mp(n,e,!r,t)}function xb(n){const{schema:t,errSchemaPath:e,opts:r,self:i}=n;t.$ref&&r.ignoreKeywordsWithRef&&(0,Pr.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${e}"`)}function bb(n){const{schema:t,opts:e}=n;t.default!==void 0&&e.useDefaults&&e.strictSchema&&(0,Pr.checkStrictMode)(n,"default is ignored in the schema root")}function Sb(n){const t=n.schema[n.opts.schemaId];t&&(n.baseId=(0,fb.resolveUrl)(n.opts.uriResolver,n.baseId,t))}function kb(n){if(n.schema.$async&&!n.schemaEnv.$async)throw new Error("async schema in sync schema")}function gp({gen:n,schemaEnv:t,schema:e,errSchemaPath:r,opts:i}){const s=e.$comment;if(i.$comment===!0)n.code((0,$t._)`${Vt.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){const a=(0,$t.str)`${r}/$comment`,o=n.scopeValue("root",{ref:t.root});n.code((0,$t._)`${Vt.default.self}.opts.$comment(${s}, ${a}, ${o}.schema)`)}}function Cb(n){const{gen:t,schemaEnv:e,validateName:r,ValidationError:i,opts:s}=n;e.$async?t.if((0,$t._)`${Vt.default.errors} === 0`,()=>t.return(Vt.default.data),()=>t.throw((0,$t._)`new ${i}(${Vt.default.vErrors})`)):(t.assign((0,$t._)`${r}.errors`,Vt.default.vErrors),s.unevaluated&&Tb(n),t.return((0,$t._)`${Vt.default.errors} === 0`))}function Tb({gen:n,evaluated:t,props:e,items:r}){e instanceof $t.Name&&n.assign((0,$t._)`${t}.props`,e),r instanceof $t.Name&&n.assign((0,$t._)`${t}.items`,r)}function mp(n,t,e,r){const{gen:i,schema:s,data:a,allErrors:o,opts:h,self:l}=n,{RULES:c}=l;if(s.$ref&&(h.ignoreKeywordsWithRef||!(0,Pr.schemaHasRulesButRef)(s,c))){i.block(()=>xp(n,"$ref",c.all.$ref.definition));return}h.jtd||Pb(n,t),i.block(()=>{for(const d of c.rules)f(d);f(c.post)});function f(d){(0,Bh.shouldUseGroup)(s,d)&&(d.type?(i.if((0,Lo.checkDataType)(d.type,a,h.strictNumbers)),yp(n,d),t.length===1&&t[0]===d.type&&e&&(i.else(),(0,Lo.reportTypeError)(n)),i.endIf()):yp(n,d),o||i.if((0,$t._)`${Vt.default.errors} === ${r||0}`))}}function yp(n,t){const{gen:e,schema:r,opts:{useDefaults:i}}=n;i&&(0,db.assignDefaults)(n,t.type),e.block(()=>{for(const s of t.rules)(0,Bh.shouldUseRule)(r,s)&&xp(n,s.keyword,s.definition,t.type)})}function Pb(n,t){n.schemaEnv.meta||!n.opts.strictTypes||(Eb(n,t),n.opts.allowUnionTypes||Ab(n,t),Ob(n,n.dataTypes))}function Eb(n,t){if(t.length){if(!n.dataTypes.length){n.dataTypes=t;return}t.forEach(e=>{vp(n.dataTypes,e)||qh(n,`type "${e}" not allowed by context "${n.dataTypes.join(",")}"`)}),Fb(n,t)}}function Ab(n,t){t.length>1&&!(t.length===2&&t.includes("null"))&&qh(n,"use allowUnionTypes to allow union type keyword")}function Ob(n,t){const e=n.self.RULES.all;for(const r in e){const i=e[r];if(typeof i=="object"&&(0,Bh.shouldUseRule)(n.schema,i)){const{type:s}=i.definition;s.length&&!s.some(a=>$b(t,a))&&qh(n,`missing type "${s.join(",")}" for keyword "${r}"`)}}}function $b(n,t){return n.includes(t)||t==="number"&&n.includes("integer")}function vp(n,t){return n.includes(t)||t==="integer"&&n.includes("number")}function Fb(n,t){const e=[];for(const r of n.dataTypes)vp(t,r)?e.push(r):t.includes("integer")&&r==="number"&&e.push("integer");n.dataTypes=e}function qh(n,t){const e=n.schemaEnv.baseId+n.errSchemaPath;t+=` at "${e}" (strictTypes)`,(0,Pr.checkStrictMode)(n,t,n.opts.strictTypes)}class _p{constructor(t,e,r){if((0,Ms.validateKeywordUsage)(t,e,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Pr.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",bp(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ms.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:e.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Vt.default.errors))}result(t,e,r){this.failResult((0,$t.not)(t),e,r)}failResult(t,e,r){this.gen.if(t),r?r():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,$t.not)(t),void 0,e)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail((0,$t._)`${e} !== undefined && (${(0,$t.or)(this.invalid$data(),t)})`)}error(t,e,r){if(e){this.setParams(e),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,e){(t?Is.reportExtraError:Is.reportError)(this,this.def.error,e)}$dataError(){(0,Is.reportError)(this,this.def.$dataError||Is.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Is.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,r=$t.nil){this.gen.block(()=>{this.check$data(t,r),e()})}check$data(t=$t.nil,e=$t.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:s,def:a}=this;r.if((0,$t.or)((0,$t._)`${i} === undefined`,e)),t!==$t.nil&&r.assign(t,!0),(s.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==$t.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:r,def:i,it:s}=this;return(0,$t.or)(a(),o());function a(){if(r.length){if(!(e instanceof $t.Name))throw new Error("ajv implementation error");const h=Array.isArray(r)?r:[r];return(0,$t._)`${(0,Lo.checkDataTypes)(h,e,s.opts.strictNumbers,Lo.DataType.Wrong)}`}return $t.nil}function o(){if(i.validateSchema){const h=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,$t._)`!${h}(${e})`}return $t.nil}}subschema(t,e){const r=(0,Hh.getSubschema)(this.it,t);(0,Hh.extendSubschemaData)(r,this.it,t),(0,Hh.extendSubschemaMode)(r,t);const i={...this.it,...r,items:void 0,props:void 0};return _b(i,e),i}mergeEvaluated(t,e){const{it:r,gen:i}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=Pr.mergeEvaluated.props(i,t.props,r.props,e)),r.items!==!0&&t.items!==void 0&&(r.items=Pr.mergeEvaluated.items(i,t.items,r.items,e)))}mergeValidEvaluated(t,e){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(e,()=>this.mergeEvaluated(t,$t.Name)),!0}}var wp=Sr.KeywordCxt=_p;function xp(n,t,e,r){const i=new _p(n,e,t);"code"in e?e.code(i,r):i.$data&&e.validate?(0,Ms.funcKeywordCode)(i,e):"macro"in e?(0,Ms.macroKeywordCode)(i,e):(e.compile||e.validate)&&(0,Ms.funcKeywordCode)(i,e)}const Nb=/^\/(?:[^~]|~0|~1)*$/,Rb=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function bp(n,{dataLevel:t,dataNames:e,dataPathArr:r}){let i,s;if(n==="")return Vt.default.rootData;if(n[0]==="/"){if(!Nb.test(n))throw new Error(`Invalid JSON-pointer: ${n}`);i=n,s=Vt.default.rootData}else{const l=Rb.exec(n);if(!l)throw new Error(`Invalid JSON-pointer: ${n}`);const c=+l[1];if(i=l[2],i==="#"){if(c>=t)throw new Error(h("property/index",c));return r[t-c]}if(c>t)throw new Error(h("data",c));if(s=e[t-c],!i)return s}let a=s;const o=i.split("/");for(const l of o)l&&(s=(0,$t._)`${s}${(0,$t.getProperty)((0,Pr.unescapeJsonPointer)(l))}`,a=(0,$t._)`${a} && ${s}`);return a;function h(l,c){return`Cannot access ${l} ${c} levels up, current level is ${t}`}}sp=Sr.getData=bp;const Db=Pt({__proto__:null,get KeywordCxt(){return wp},default:Sr,get getData(){return sp},get validateFunctionCode(){return lp}},[Sr]),js=Et(Db);var Kh={};Object.defineProperty(Kh,"__esModule",{value:!0});class Mb extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}var Ib=Kh.default=Mb;const jb=Pt({__proto__:null,default:Ib},[Kh]),Yh=Et(jb);var Xh={};Object.defineProperty(Xh,"__esModule",{value:!0});const Jh=jo;class Lb extends Error{constructor(t,e,r,i){super(i||`can't resolve reference ${r} from id ${e}`),this.missingRef=(0,Jh.resolveUrl)(t,e,r),this.missingSchema=(0,Jh.normalizeId)((0,Jh.getFullPath)(t,this.missingRef))}}var Ub=Xh.default=Lb;const Gb=Pt({__proto__:null,default:Ub},[Xh]),Qh=Et(Gb);var kn={};Object.defineProperty(kn,"__esModule",{value:!0});var Sp=kn.resolveSchema=Ap=kn.getCompilingSchema=Pp=kn.resolveRef=Tp=kn.compileSchema=Cp=kn.SchemaEnv=void 0;const Hn=Zt,zb=Yh,yi=kr,qn=jo,kp=ce,Vb=js;class Uo{constructor(t){var e;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(e=t.baseId)!==null&&e!==void 0?e:(0,qn.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}var Cp=kn.SchemaEnv=Uo;function Zh(n){const t=Ep.call(this,n);if(t)return t;const e=(0,qn.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new Hn.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s});let o;n.$async&&(o=a.scopeValue("Error",{ref:zb.default,code:(0,Hn._)`require("ajv/dist/runtime/validation_error").default`}));const h=a.scopeName("validate");n.validateName=h;const l={gen:a,allErrors:this.opts.allErrors,data:yi.default.data,parentData:yi.default.parentData,parentDataProperty:yi.default.parentDataProperty,dataNames:[yi.default.data],dataPathArr:[Hn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:n.schema,code:(0,Hn.stringify)(n.schema)}:{ref:n.schema}),validateName:h,ValidationError:o,schema:n.schema,schemaEnv:n,rootId:e,baseId:n.baseId||e,schemaPath:Hn.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Hn._)`""`,opts:this.opts,self:this};let c;try{this._compilations.add(n),(0,Vb.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);const f=a.toString();c=`${a.scopeRefs(yi.default.scope)}return ${f}`,this.opts.code.process&&(c=this.opts.code.process(c,n));const d=new Function(`${yi.default.self}`,`${yi.default.scope}`,c)(this,this.scope.get());if(this.scope.value(h,{ref:d}),d.errors=null,d.schema=n.schema,d.schemaEnv=n,n.$async&&(d.$async=!0),this.opts.code.source===!0&&(d.source={validateName:h,validateCode:f,scopeValues:a._values}),this.opts.unevaluated){const{props:u,items:p}=l;d.evaluated={props:u instanceof Hn.Name?void 0:u,items:p instanceof Hn.Name?void 0:p,dynamicProps:u instanceof Hn.Name,dynamicItems:p instanceof Hn.Name},d.source&&(d.source.evaluated=(0,Hn.stringify)(d.evaluated))}return n.validate=d,n}catch(f){throw delete n.validate,delete n.validateName,c&&this.logger.error("Error compiling schema, function code:",c),f}finally{this._compilations.delete(n)}}var Tp=kn.compileSchema=Zh;function Bb(n,t,e){var r;e=(0,qn.resolveUrl)(this.opts.uriResolver,t,e);const i=n.refs[e];if(i)return i;let s=Kb.call(this,n,e);if(s===void 0){const a=(r=n.localRefs)===null||r===void 0?void 0:r[e],{schemaId:o}=this.opts;a&&(s=new Uo({schema:a,schemaId:o,root:n,baseId:t}))}if(s!==void 0)return n.refs[e]=Hb.call(this,s)}var Pp=kn.resolveRef=Bb;function Hb(n){return(0,qn.inlineRef)(n.schema,this.opts.inlineRefs)?n.schema:n.validate?n:Zh.call(this,n)}function Ep(n){for(const t of this._compilations)if(qb(t,n))return t}var Ap=kn.getCompilingSchema=Ep;function qb(n,t){return n.schema===t.schema&&n.root===t.root&&n.baseId===t.baseId}function Kb(n,t){let e;for(;typeof(e=this.refs[t])=="string";)t=e;return e||this.schemas[t]||Go.call(this,n,t)}function Go(n,t){const e=this.opts.uriResolver.parse(t),r=(0,qn._getFullPath)(this.opts.uriResolver,e);let i=(0,qn.getFullPath)(this.opts.uriResolver,n.baseId,void 0);if(Object.keys(n.schema).length>0&&r===i)return Wh.call(this,e,n);const s=(0,qn.normalizeId)(r),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){const o=Go.call(this,n,a);return typeof(o==null?void 0:o.schema)!="object"?void 0:Wh.call(this,e,o)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||Zh.call(this,a),s===(0,qn.normalizeId)(t)){const{schema:o}=a,{schemaId:h}=this.opts,l=o[h];return l&&(i=(0,qn.resolveUrl)(this.opts.uriResolver,i,l)),new Uo({schema:o,schemaId:h,root:n,baseId:i})}return Wh.call(this,e,a)}}Sp=kn.resolveSchema=Go;const Yb=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Wh(n,{baseId:t,schema:e,root:r}){var i;if(((i=n.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const o of n.fragment.slice(1).split("/")){if(typeof e=="boolean")return;const h=e[(0,kp.unescapeFragment)(o)];if(h===void 0)return;e=h;const l=typeof e=="object"&&e[this.opts.schemaId];!Yb.has(o)&&l&&(t=(0,qn.resolveUrl)(this.opts.uriResolver,t,l))}let s;if(typeof e!="boolean"&&e.$ref&&!(0,kp.schemaHasRulesButRef)(e,this.RULES)){const o=(0,qn.resolveUrl)(this.opts.uriResolver,t,e.$ref);s=Go.call(this,r,o)}const{schemaId:a}=this.opts;if(s=s||new Uo({schema:e,schemaId:a,root:r,baseId:t}),s.schema!==s.root.schema)return s}const Xb=Pt({__proto__:null,get SchemaEnv(){return Cp},get compileSchema(){return Tp},default:kn,get getCompilingSchema(){return Ap},get resolveRef(){return Pp},get resolveSchema(){return Sp}},[kn]),tc=Et(Xb),Jb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Qb="Meta-schema for $data reference (JSON AnySchema extension proposal)",Zb="object",Wb=["$data"],t5={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},e5=!1,n5={$id:Jb,description:Qb,type:Zb,required:Wb,properties:t5,additionalProperties:e5};var ec={},nc={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(n,t){(function(e,r){r(t)})(Nw,function(e){function r(){for(var H=arguments.length,J=Array(H),Q=0;Q<H;Q++)J[Q]=arguments[Q];if(J.length>1){J[0]=J[0].slice(0,-1);for(var at=J.length-1,ot=1;ot<at;++ot)J[ot]=J[ot].slice(1,-1);return J[at]=J[at].slice(1),J.join("")}else return J[0]}function i(H){return"(?:"+H+")"}function s(H){return H===void 0?"undefined":H===null?"null":Object.prototype.toString.call(H).split(" ").pop().split("]").shift().toLowerCase()}function a(H){return H.toUpperCase()}function o(H){return H!=null?H instanceof Array?H:typeof H.length!="number"||H.split||H.setInterval||H.call?[H]:Array.prototype.slice.call(H):[]}function h(H,J){var Q=H;if(J)for(var at in J)Q[at]=J[at];return Q}function l(H){var J="[A-Za-z]",Q="[0-9]",at=r(Q,"[A-Fa-f]"),ot=i(i("%[EFef]"+at+"%"+at+at+"%"+at+at)+"|"+i("%[89A-Fa-f]"+at+"%"+at+at)+"|"+i("%"+at+at)),Mt="[\\:\\/\\?\\#\\[\\]\\@]",Nt="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",re=r(Mt,Nt),Ce=H?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",he=H?"[\\uE000-\\uF8FF]":"[]",Yt=r(J,Q,"[\\-\\.\\_\\~]",Ce);i(J+r(J,Q,"[\\+\\-\\.]")+"*"),i(i(ot+"|"+r(Yt,Nt,"[\\:]"))+"*");var Qt=i(i("25[0-5]")+"|"+i("2[0-4]"+Q)+"|"+i("1"+Q+Q)+"|"+i("0?[1-9]"+Q)+"|0?0?"+Q),fe=i(Qt+"\\."+Qt+"\\."+Qt+"\\."+Qt),Ut=i(at+"{1,4}"),It=i(i(Ut+"\\:"+Ut)+"|"+fe),pe=i(i(Ut+"\\:")+"{6}"+It),Le=i("\\:\\:"+i(Ut+"\\:")+"{5}"+It),xn=i(i(Ut)+"?\\:\\:"+i(Ut+"\\:")+"{4}"+It),_e=i(i(i(Ut+"\\:")+"{0,1}"+Ut)+"?\\:\\:"+i(Ut+"\\:")+"{3}"+It),Ue=i(i(i(Ut+"\\:")+"{0,2}"+Ut)+"?\\:\\:"+i(Ut+"\\:")+"{2}"+It),He=i(i(i(Ut+"\\:")+"{0,3}"+Ut)+"?\\:\\:"+Ut+"\\:"+It),Ge=i(i(i(Ut+"\\:")+"{0,4}"+Ut)+"?\\:\\:"+It),Re=i(i(i(Ut+"\\:")+"{0,5}"+Ut)+"?\\:\\:"+Ut),ae=i(i(i(Ut+"\\:")+"{0,6}"+Ut)+"?\\:\\:"),Lt=i([pe,Le,xn,_e,Ue,He,Ge,Re,ae].join("|")),on=i(i(Yt+"|"+ot)+"+");i("[vV]"+at+"+\\."+r(Yt,Nt,"[\\:]")+"+"),i(i(ot+"|"+r(Yt,Nt))+"*");var nr=i(ot+"|"+r(Yt,Nt,"[\\:\\@]"));return i(i(ot+"|"+r(Yt,Nt,"[\\@]"))+"+"),i(i(nr+"|"+r("[\\/\\?]",he))+"*"),{NOT_SCHEME:new RegExp(r("[^]",J,Q,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",Yt,Nt),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",Yt,Nt),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",Yt,Nt),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",Yt,Nt),"g"),NOT_QUERY:new RegExp(r("[^\\%]",Yt,Nt,"[\\:\\@\\/\\?]",he),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",Yt,Nt,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",Yt,Nt),"g"),UNRESERVED:new RegExp(Yt,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",Yt,re),"g"),PCT_ENCODED:new RegExp(ot,"g"),IPV4ADDRESS:new RegExp("^("+fe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Lt+")"+i(i("\\%25|\\%(?!"+at+"{2})")+"("+on+")")+"?\\]?$")}}var c=l(!1),f=l(!0),d=function(){function H(J,Q){var at=[],ot=!0,Mt=!1,Nt=void 0;try{for(var re=J[Symbol.iterator](),Ce;!(ot=(Ce=re.next()).done)&&(at.push(Ce.value),!(Q&&at.length===Q));ot=!0);}catch(he){Mt=!0,Nt=he}finally{try{!ot&&re.return&&re.return()}finally{if(Mt)throw Nt}}return at}return function(J,Q){if(Array.isArray(J))return J;if(Symbol.iterator in Object(J))return H(J,Q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(H){if(Array.isArray(H)){for(var J=0,Q=Array(H.length);J<H.length;J++)Q[J]=H[J];return Q}else return Array.from(H)},p=2147483647,v=36,_=1,S=26,x=38,m=700,k=72,F=128,P="-",N=/^xn--/,R=/[^\0-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,U={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=v-_,K=Math.floor,tt=String.fromCharCode;function W(H){throw new RangeError(U[H])}function lt(H,J){for(var Q=[],at=H.length;at--;)Q[at]=J(H[at]);return Q}function wt(H,J){var Q=H.split("@"),at="";Q.length>1&&(at=Q[0]+"@",H=Q[1]),H=H.replace(L,".");var ot=H.split("."),Mt=lt(ot,J).join(".");return at+Mt}function bt(H){for(var J=[],Q=0,at=H.length;Q<at;){var ot=H.charCodeAt(Q++);if(ot>=55296&&ot<=56319&&Q<at){var Mt=H.charCodeAt(Q++);(Mt&64512)==56320?J.push(((ot&1023)<<10)+(Mt&1023)+65536):(J.push(ot),Q--)}else J.push(ot)}return J}var xt=function(H){return String.fromCodePoint.apply(String,u(H))},it=function(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:v},Y=function(H,J){return H+22+75*(H<26)-((J!=0)<<5)},O=function(H,J,Q){var at=0;for(H=Q?K(H/m):H>>1,H+=K(H/J);H>B*S>>1;at+=v)H=K(H/B);return K(at+(B+1)*H/(H+x))},E=function(H){var J=[],Q=H.length,at=0,ot=F,Mt=k,Nt=H.lastIndexOf(P);Nt<0&&(Nt=0);for(var re=0;re<Nt;++re)H.charCodeAt(re)>=128&&W("not-basic"),J.push(H.charCodeAt(re));for(var Ce=Nt>0?Nt+1:0;Ce<Q;){for(var he=at,Yt=1,Qt=v;;Qt+=v){Ce>=Q&&W("invalid-input");var fe=it(H.charCodeAt(Ce++));(fe>=v||fe>K((p-at)/Yt))&&W("overflow"),at+=fe*Yt;var Ut=Qt<=Mt?_:Qt>=Mt+S?S:Qt-Mt;if(fe<Ut)break;var It=v-Ut;Yt>K(p/It)&&W("overflow"),Yt*=It}var pe=J.length+1;Mt=O(at-he,pe,he==0),K(at/pe)>p-ot&&W("overflow"),ot+=K(at/pe),at%=pe,J.splice(at++,0,ot)}return String.fromCodePoint.apply(String,J)},T=function(H){var J=[];H=bt(H);var Q=H.length,at=F,ot=0,Mt=k,Nt=!0,re=!1,Ce=void 0;try{for(var he=H[Symbol.iterator](),Yt;!(Nt=(Yt=he.next()).done);Nt=!0){var Qt=Yt.value;Qt<128&&J.push(tt(Qt))}}catch(Un){re=!0,Ce=Un}finally{try{!Nt&&he.return&&he.return()}finally{if(re)throw Ce}}var fe=J.length,Ut=fe;for(fe&&J.push(P);Ut<Q;){var It=p,pe=!0,Le=!1,xn=void 0;try{for(var _e=H[Symbol.iterator](),Ue;!(pe=(Ue=_e.next()).done);pe=!0){var He=Ue.value;He>=at&&He<It&&(It=He)}}catch(Un){Le=!0,xn=Un}finally{try{!pe&&_e.return&&_e.return()}finally{if(Le)throw xn}}var Ge=Ut+1;It-at>K((p-ot)/Ge)&&W("overflow"),ot+=(It-at)*Ge,at=It;var Re=!0,ae=!1,Lt=void 0;try{for(var on=H[Symbol.iterator](),nr;!(Re=(nr=on.next()).done);Re=!0){var rr=nr.value;if(rr<at&&++ot>p&&W("overflow"),rr==at){for(var Qe=ot,qe=v;;qe+=v){var bn=qe<=Mt?_:qe>=Mt+S?S:qe-Mt;if(Qe<bn)break;var Vr=Qe-bn,Br=v-bn;J.push(tt(Y(bn+Vr%Br,0))),Qe=K(Vr/Br)}J.push(tt(Y(Qe,0))),Mt=O(ot,Ge,Ut==fe),ot=0,++Ut}}}catch(Un){ae=!0,Lt=Un}finally{try{!Re&&on.return&&on.return()}finally{if(ae)throw Lt}}++ot,++at}return J.join("")},C=function(H){return wt(H,function(J){return N.test(J)?E(J.slice(4).toLowerCase()):J})},D=function(H){return wt(H,function(J){return R.test(J)?"xn--"+T(J):J})},G={version:"2.1.0",ucs2:{decode:bt,encode:xt},decode:E,encode:T,toASCII:D,toUnicode:C},M={};function V(H){var J=H.charCodeAt(0),Q=void 0;return J<16?Q="%0"+J.toString(16).toUpperCase():J<128?Q="%"+J.toString(16).toUpperCase():J<2048?Q="%"+(J>>6|192).toString(16).toUpperCase()+"%"+(J&63|128).toString(16).toUpperCase():Q="%"+(J>>12|224).toString(16).toUpperCase()+"%"+(J>>6&63|128).toString(16).toUpperCase()+"%"+(J&63|128).toString(16).toUpperCase(),Q}function q(H){for(var J="",Q=0,at=H.length;Q<at;){var ot=parseInt(H.substr(Q+1,2),16);if(ot<128)J+=String.fromCharCode(ot),Q+=3;else if(ot>=194&&ot<224){if(at-Q>=6){var Mt=parseInt(H.substr(Q+4,2),16);J+=String.fromCharCode((ot&31)<<6|Mt&63)}else J+=H.substr(Q,6);Q+=6}else if(ot>=224){if(at-Q>=9){var Nt=parseInt(H.substr(Q+4,2),16),re=parseInt(H.substr(Q+7,2),16);J+=String.fromCharCode((ot&15)<<12|(Nt&63)<<6|re&63)}else J+=H.substr(Q,9);Q+=9}else J+=H.substr(Q,3),Q+=3}return J}function Z(H,J){function Q(at){var ot=q(at);return ot.match(J.UNRESERVED)?ot:at}return H.scheme&&(H.scheme=String(H.scheme).replace(J.PCT_ENCODED,Q).toLowerCase().replace(J.NOT_SCHEME,"")),H.userinfo!==void 0&&(H.userinfo=String(H.userinfo).replace(J.PCT_ENCODED,Q).replace(J.NOT_USERINFO,V).replace(J.PCT_ENCODED,a)),H.host!==void 0&&(H.host=String(H.host).replace(J.PCT_ENCODED,Q).toLowerCase().replace(J.NOT_HOST,V).replace(J.PCT_ENCODED,a)),H.path!==void 0&&(H.path=String(H.path).replace(J.PCT_ENCODED,Q).replace(H.scheme?J.NOT_PATH:J.NOT_PATH_NOSCHEME,V).replace(J.PCT_ENCODED,a)),H.query!==void 0&&(H.query=String(H.query).replace(J.PCT_ENCODED,Q).replace(J.NOT_QUERY,V).replace(J.PCT_ENCODED,a)),H.fragment!==void 0&&(H.fragment=String(H.fragment).replace(J.PCT_ENCODED,Q).replace(J.NOT_FRAGMENT,V).replace(J.PCT_ENCODED,a)),H}function nt(H){return H.replace(/^0*(.*)/,"$1")||"0"}function pt(H,J){var Q=H.match(J.IPV4ADDRESS)||[],at=d(Q,2),ot=at[1];return ot?ot.split(".").map(nt).join("."):H}function kt(H,J){var Q=H.match(J.IPV6ADDRESS)||[],at=d(Q,3),ot=at[1],Mt=at[2];if(ot){for(var Nt=ot.toLowerCase().split("::").reverse(),re=d(Nt,2),Ce=re[0],he=re[1],Yt=he?he.split(":").map(nt):[],Qt=Ce.split(":").map(nt),fe=J.IPV4ADDRESS.test(Qt[Qt.length-1]),Ut=fe?7:8,It=Qt.length-Ut,pe=Array(Ut),Le=0;Le<Ut;++Le)pe[Le]=Yt[Le]||Qt[It+Le]||"";fe&&(pe[Ut-1]=pt(pe[Ut-1],J));var xn=pe.reduce(function(Re,ae,Lt){if(!ae||ae==="0"){var on=Re[Re.length-1];on&&on.index+on.length===Lt?on.length++:Re.push({index:Lt,length:1})}return Re},[]),_e=xn.sort(function(Re,ae){return ae.length-Re.length})[0],Ue=void 0;if(_e&&_e.length>1){var He=pe.slice(0,_e.index),Ge=pe.slice(_e.index+_e.length);Ue=He.join(":")+"::"+Ge.join(":")}else Ue=pe.join(":");return Mt&&(Ue+="%"+Mt),Ue}else return H}var Ft=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,St="".match(/(){0}/)[1]===void 0;function At(H){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q={},at=J.iri!==!1?f:c;J.reference==="suffix"&&(H=(J.scheme?J.scheme+":":"")+"//"+H);var ot=H.match(Ft);if(ot){St?(Q.scheme=ot[1],Q.userinfo=ot[3],Q.host=ot[4],Q.port=parseInt(ot[5],10),Q.path=ot[6]||"",Q.query=ot[7],Q.fragment=ot[8],isNaN(Q.port)&&(Q.port=ot[5])):(Q.scheme=ot[1]||void 0,Q.userinfo=H.indexOf("@")!==-1?ot[3]:void 0,Q.host=H.indexOf("//")!==-1?ot[4]:void 0,Q.port=parseInt(ot[5],10),Q.path=ot[6]||"",Q.query=H.indexOf("?")!==-1?ot[7]:void 0,Q.fragment=H.indexOf("#")!==-1?ot[8]:void 0,isNaN(Q.port)&&(Q.port=H.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ot[4]:void 0)),Q.host&&(Q.host=kt(pt(Q.host,at),at)),Q.scheme===void 0&&Q.userinfo===void 0&&Q.host===void 0&&Q.port===void 0&&!Q.path&&Q.query===void 0?Q.reference="same-document":Q.scheme===void 0?Q.reference="relative":Q.fragment===void 0?Q.reference="absolute":Q.reference="uri",J.reference&&J.reference!=="suffix"&&J.reference!==Q.reference&&(Q.error=Q.error||"URI is not a "+J.reference+" reference.");var Mt=M[(J.scheme||Q.scheme||"").toLowerCase()];if(!J.unicodeSupport&&(!Mt||!Mt.unicodeSupport)){if(Q.host&&(J.domainHost||Mt&&Mt.domainHost))try{Q.host=G.toASCII(Q.host.replace(at.PCT_ENCODED,q).toLowerCase())}catch(Nt){Q.error=Q.error||"Host's domain name can not be converted to ASCII via punycode: "+Nt}Z(Q,c)}else Z(Q,at);Mt&&Mt.parse&&Mt.parse(Q,J)}else Q.error=Q.error||"URI can not be parsed.";return Q}function jt(H,J){var Q=J.iri!==!1?f:c,at=[];return H.userinfo!==void 0&&(at.push(H.userinfo),at.push("@")),H.host!==void 0&&at.push(kt(pt(String(H.host),Q),Q).replace(Q.IPV6ADDRESS,function(ot,Mt,Nt){return"["+Mt+(Nt?"%25"+Nt:"")+"]"})),(typeof H.port=="number"||typeof H.port=="string")&&(at.push(":"),at.push(String(H.port))),at.length?at.join(""):void 0}var zt=/^\.\.?\//,Ot=/^\/\.(\/|$)/,le=/^\/\.\.(\/|$)/,Jt=/^\/?(?:.|\n)*?(?=\/|$)/;function ue(H){for(var J=[];H.length;)if(H.match(zt))H=H.replace(zt,"");else if(H.match(Ot))H=H.replace(Ot,"/");else if(H.match(le))H=H.replace(le,"/"),J.pop();else if(H==="."||H==="..")H="";else{var Q=H.match(Jt);if(Q){var at=Q[0];H=H.slice(at.length),J.push(at)}else throw new Error("Unexpected dot segment condition")}return J.join("")}function Bt(H){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=J.iri?f:c,at=[],ot=M[(J.scheme||H.scheme||"").toLowerCase()];if(ot&&ot.serialize&&ot.serialize(H,J),H.host&&!Q.IPV6ADDRESS.test(H.host)&&(J.domainHost||ot&&ot.domainHost))try{H.host=J.iri?G.toUnicode(H.host):G.toASCII(H.host.replace(Q.PCT_ENCODED,q).toLowerCase())}catch(re){H.error=H.error||"Host's domain name can not be converted to "+(J.iri?"Unicode":"ASCII")+" via punycode: "+re}Z(H,Q),J.reference!=="suffix"&&H.scheme&&(at.push(H.scheme),at.push(":"));var Mt=jt(H,J);if(Mt!==void 0&&(J.reference!=="suffix"&&at.push("//"),at.push(Mt),H.path&&H.path.charAt(0)!=="/"&&at.push("/")),H.path!==void 0){var Nt=H.path;!J.absolutePath&&(!ot||!ot.absolutePath)&&(Nt=ue(Nt)),Mt===void 0&&(Nt=Nt.replace(/^\/\//,"/%2F")),at.push(Nt)}return H.query!==void 0&&(at.push("?"),at.push(H.query)),H.fragment!==void 0&&(at.push("#"),at.push(H.fragment)),at.join("")}function Fe(H,J){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},at=arguments[3],ot={};return at||(H=At(Bt(H,Q),Q),J=At(Bt(J,Q),Q)),Q=Q||{},!Q.tolerant&&J.scheme?(ot.scheme=J.scheme,ot.userinfo=J.userinfo,ot.host=J.host,ot.port=J.port,ot.path=ue(J.path||""),ot.query=J.query):(J.userinfo!==void 0||J.host!==void 0||J.port!==void 0?(ot.userinfo=J.userinfo,ot.host=J.host,ot.port=J.port,ot.path=ue(J.path||""),ot.query=J.query):(J.path?(J.path.charAt(0)==="/"?ot.path=ue(J.path):((H.userinfo!==void 0||H.host!==void 0||H.port!==void 0)&&!H.path?ot.path="/"+J.path:H.path?ot.path=H.path.slice(0,H.path.lastIndexOf("/")+1)+J.path:ot.path=J.path,ot.path=ue(ot.path)),ot.query=J.query):(ot.path=H.path,J.query!==void 0?ot.query=J.query:ot.query=H.query),ot.userinfo=H.userinfo,ot.host=H.host,ot.port=H.port),ot.scheme=H.scheme),ot.fragment=J.fragment,ot}function Pe(H,J,Q){var at=h({scheme:"null"},Q);return Bt(Fe(At(H,at),At(J,at),at,!0),at)}function Je(H,J){return typeof H=="string"?H=Bt(At(H,J),J):s(H)==="object"&&(H=At(Bt(H,J),J)),H}function vn(H,J,Q){return typeof H=="string"?H=Bt(At(H,Q),Q):s(H)==="object"&&(H=Bt(H,Q)),typeof J=="string"?J=Bt(At(J,Q),Q):s(J)==="object"&&(J=Bt(J,Q)),H===J}function an(H,J){return H&&H.toString().replace(!J||!J.iri?c.ESCAPE:f.ESCAPE,V)}function Ne(H,J){return H&&H.toString().replace(!J||!J.iri?c.PCT_ENCODED:f.PCT_ENCODED,q)}var en={scheme:"http",domainHost:!0,parse:function(H,J){return H.host||(H.error=H.error||"HTTP URIs must have a host."),H},serialize:function(H,J){var Q=String(H.scheme).toLowerCase()==="https";return(H.port===(Q?443:80)||H.port==="")&&(H.port=void 0),H.path||(H.path="/"),H}},An={scheme:"https",domainHost:en.domainHost,parse:en.parse,serialize:en.serialize};function On(H){return typeof H.secure=="boolean"?H.secure:String(H.scheme).toLowerCase()==="wss"}var In={scheme:"ws",domainHost:!0,parse:function(H,J){var Q=H;return Q.secure=On(Q),Q.resourceName=(Q.path||"/")+(Q.query?"?"+Q.query:""),Q.path=void 0,Q.query=void 0,Q},serialize:function(H,J){if((H.port===(On(H)?443:80)||H.port==="")&&(H.port=void 0),typeof H.secure=="boolean"&&(H.scheme=H.secure?"wss":"ws",H.secure=void 0),H.resourceName){var Q=H.resourceName.split("?"),at=d(Q,2),ot=at[0],Mt=at[1];H.path=ot&&ot!=="/"?ot:void 0,H.query=Mt,H.resourceName=void 0}return H.fragment=void 0,H}},je={scheme:"wss",domainHost:In.domainHost,parse:In.parse,serialize:In.serialize},jn={},Qn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ke="[0-9A-Fa-f]",$n=i(i("%[EFef]"+ke+"%"+ke+ke+"%"+ke+ke)+"|"+i("%[89A-Fa-f]"+ke+"%"+ke+ke)+"|"+i("%"+ke+ke)),fn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Lr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Zn=r(Lr,'[\\"\\\\]'),yr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",_n=new RegExp(Qn,"g"),Ee=new RegExp($n,"g"),vs=new RegExp(r("[^]",fn,"[\\.]",'[\\"]',Zn),"g"),Wn=new RegExp(r("[^]",Qn,yr),"g"),tr=Wn;function wn(H){var J=q(H);return J.match(_n)?J:H}var Ur={scheme:"mailto",parse:function(H,J){var Q=H,at=Q.to=Q.path?Q.path.split(","):[];if(Q.path=void 0,Q.query){for(var ot=!1,Mt={},Nt=Q.query.split("&"),re=0,Ce=Nt.length;re<Ce;++re){var he=Nt[re].split("=");switch(he[0]){case"to":for(var Yt=he[1].split(","),Qt=0,fe=Yt.length;Qt<fe;++Qt)at.push(Yt[Qt]);break;case"subject":Q.subject=Ne(he[1],J);break;case"body":Q.body=Ne(he[1],J);break;default:ot=!0,Mt[Ne(he[0],J)]=Ne(he[1],J);break}}ot&&(Q.headers=Mt)}Q.query=void 0;for(var Ut=0,It=at.length;Ut<It;++Ut){var pe=at[Ut].split("@");if(pe[0]=Ne(pe[0]),J.unicodeSupport)pe[1]=Ne(pe[1],J).toLowerCase();else try{pe[1]=G.toASCII(Ne(pe[1],J).toLowerCase())}catch(Le){Q.error=Q.error||"Email address's domain name can not be converted to ASCII via punycode: "+Le}at[Ut]=pe.join("@")}return Q},serialize:function(H,J){var Q=H,at=o(H.to);if(at){for(var ot=0,Mt=at.length;ot<Mt;++ot){var Nt=String(at[ot]),re=Nt.lastIndexOf("@"),Ce=Nt.slice(0,re).replace(Ee,wn).replace(Ee,a).replace(vs,V),he=Nt.slice(re+1);try{he=J.iri?G.toUnicode(he):G.toASCII(Ne(he,J).toLowerCase())}catch(Ut){Q.error=Q.error||"Email address's domain name can not be converted to "+(J.iri?"Unicode":"ASCII")+" via punycode: "+Ut}at[ot]=Ce+"@"+he}Q.path=at.join(",")}var Yt=H.headers=H.headers||{};H.subject&&(Yt.subject=H.subject),H.body&&(Yt.body=H.body);var Qt=[];for(var fe in Yt)Yt[fe]!==jn[fe]&&Qt.push(fe.replace(Ee,wn).replace(Ee,a).replace(Wn,V)+"="+Yt[fe].replace(Ee,wn).replace(Ee,a).replace(tr,V));return Qt.length&&(Q.query=Qt.join("&")),Q}},er=/^([^\:]+)\:(.*)/,Ln={scheme:"urn",parse:function(H,J){var Q=H.path&&H.path.match(er),at=H;if(Q){var ot=J.scheme||at.scheme||"urn",Mt=Q[1].toLowerCase(),Nt=Q[2],re=ot+":"+(J.nid||Mt),Ce=M[re];at.nid=Mt,at.nss=Nt,at.path=void 0,Ce&&(at=Ce.parse(at,J))}else at.error=at.error||"URN can not be parsed.";return at},serialize:function(H,J){var Q=J.scheme||H.scheme||"urn",at=H.nid,ot=Q+":"+(J.nid||at),Mt=M[ot];Mt&&(H=Mt.serialize(H,J));var Nt=H,re=H.nss;return Nt.path=(at||J.nid)+":"+re,Nt}},Gr=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,zr={scheme:"urn:uuid",parse:function(H,J){var Q=H;return Q.uuid=Q.nss,Q.nss=void 0,!J.tolerant&&(!Q.uuid||!Q.uuid.match(Gr))&&(Q.error=Q.error||"UUID is not valid."),Q},serialize:function(H,J){var Q=H;return Q.nss=(H.uuid||"").toLowerCase(),Q}};M[en.scheme]=en,M[An.scheme]=An,M[In.scheme]=In,M[je.scheme]=je,M[Ur.scheme]=Ur,M[Ln.scheme]=Ln,M[zr.scheme]=zr,e.SCHEMES=M,e.pctEncChar=V,e.pctDecChars=q,e.parse=At,e.removeDotSegments=ue,e.serialize=Bt,e.resolveComponents=Fe,e.resolve=Pe,e.normalize=Je,e.equal=vn,e.escapeComponent=an,e.unescapeComponent=Ne,Object.defineProperty(e,"__esModule",{value:!0})})})(nc,nc.exports);var Op=nc.exports;const r5=pn(Op),i5=Pt({__proto__:null,default:r5},[Op]),s5=Et(i5);Object.defineProperty(ec,"__esModule",{value:!0});const $p=s5;$p.code='require("ajv/dist/runtime/uri").default';var a5=ec.default=$p;const o5=Pt({__proto__:null,default:a5},[ec]),l5=Et(o5);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;var t=js;Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var e=Zt;Object.defineProperty(n,"_",{enumerable:!0,get:function(){return e._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return e.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return e.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return e.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return e.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return e.CodeGen}});const r=Yh,i=Qh,s=d0,a=tc,o=Zt,h=jo,l=Mo,c=ce,f=n5,d=l5,u=(Y,O)=>new RegExp(Y,O);u.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},x=200;function m(Y){var O,E,T,C,D,G,M,V,q,Z,nt,pt,kt,Ft,St,At,jt,zt,Ot,le,Jt,ue,Bt,Fe,Pe;const Je=Y.strict,vn=(O=Y.code)===null||O===void 0?void 0:O.optimize,an=vn===!0||vn===void 0?1:vn||0,Ne=(T=(E=Y.code)===null||E===void 0?void 0:E.regExp)!==null&&T!==void 0?T:u,en=(C=Y.uriResolver)!==null&&C!==void 0?C:d.default;return{strictSchema:(G=(D=Y.strictSchema)!==null&&D!==void 0?D:Je)!==null&&G!==void 0?G:!0,strictNumbers:(V=(M=Y.strictNumbers)!==null&&M!==void 0?M:Je)!==null&&V!==void 0?V:!0,strictTypes:(Z=(q=Y.strictTypes)!==null&&q!==void 0?q:Je)!==null&&Z!==void 0?Z:"log",strictTuples:(pt=(nt=Y.strictTuples)!==null&&nt!==void 0?nt:Je)!==null&&pt!==void 0?pt:"log",strictRequired:(Ft=(kt=Y.strictRequired)!==null&&kt!==void 0?kt:Je)!==null&&Ft!==void 0?Ft:!1,code:Y.code?{...Y.code,optimize:an,regExp:Ne}:{optimize:an,regExp:Ne},loopRequired:(St=Y.loopRequired)!==null&&St!==void 0?St:x,loopEnum:(At=Y.loopEnum)!==null&&At!==void 0?At:x,meta:(jt=Y.meta)!==null&&jt!==void 0?jt:!0,messages:(zt=Y.messages)!==null&&zt!==void 0?zt:!0,inlineRefs:(Ot=Y.inlineRefs)!==null&&Ot!==void 0?Ot:!0,schemaId:(le=Y.schemaId)!==null&&le!==void 0?le:"$id",addUsedSchema:(Jt=Y.addUsedSchema)!==null&&Jt!==void 0?Jt:!0,validateSchema:(ue=Y.validateSchema)!==null&&ue!==void 0?ue:!0,validateFormats:(Bt=Y.validateFormats)!==null&&Bt!==void 0?Bt:!0,unicodeRegExp:(Fe=Y.unicodeRegExp)!==null&&Fe!==void 0?Fe:!0,int32range:(Pe=Y.int32range)!==null&&Pe!==void 0?Pe:!0,uriResolver:en}}class k{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...m(O)};const{es5:E,lines:T}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:v,es5:E,lines:T}),this.logger=K(O.logger);const C=O.validateFormats;O.validateFormats=!1,this.RULES=(0,s.getRules)(),F.call(this,_,O,"NOT SUPPORTED"),F.call(this,S,O,"DEPRECATED","warn"),this._metaOpts=U.call(this),O.formats&&R.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&L.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),N.call(this),O.validateFormats=C}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:E,schemaId:T}=this.opts;let C=f;T==="id"&&(C={...f},C.id=C.$id,delete C.$id),E&&O&&this.addMetaSchema(C,C[T],!1)}defaultMeta(){const{meta:O,schemaId:E}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[E]||O:void 0}validate(O,E){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const C=T(E);return"$async"in T||(this.errors=T.errors),C}compile(O,E){const T=this._addSchema(O,E);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,E){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return C.call(this,O,E);async function C(Z,nt){await D.call(this,Z.$schema);const pt=this._addSchema(Z,nt);return pt.validate||G.call(this,pt)}async function D(Z){Z&&!this.getSchema(Z)&&await C.call(this,{$ref:Z},!0)}async function G(Z){try{return this._compileSchemaEnv(Z)}catch(nt){if(!(nt instanceof i.default))throw nt;return M.call(this,nt),await V.call(this,nt.missingSchema),G.call(this,Z)}}function M({missingSchema:Z,missingRef:nt}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${nt} cannot be resolved`)}async function V(Z){const nt=await q.call(this,Z);this.refs[Z]||await D.call(this,nt.$schema),this.refs[Z]||this.addSchema(nt,Z,E)}async function q(Z){const nt=this._loading[Z];if(nt)return nt;try{return await(this._loading[Z]=T(Z))}finally{delete this._loading[Z]}}}addSchema(O,E,T,C=this.opts.validateSchema){if(Array.isArray(O)){for(const G of O)this.addSchema(G,void 0,T,C);return this}let D;if(typeof O=="object"){const{schemaId:G}=this.opts;if(D=O[G],D!==void 0&&typeof D!="string")throw new Error(`schema ${G} must be string`)}return E=(0,h.normalizeId)(E||D),this._checkUnique(E),this.schemas[E]=this._addSchema(O,T,E,C,!0),this}addMetaSchema(O,E,T=this.opts.validateSchema){return this.addSchema(O,E,!0,T),this}validateSchema(O,E){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const C=this.validate(T,O);if(!C&&E){const D="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(D);else throw new Error(D)}return C}getSchema(O){let E;for(;typeof(E=P.call(this,O))=="string";)O=E;if(E===void 0){const{schemaId:T}=this.opts,C=new a.SchemaEnv({schema:{},schemaId:T});if(E=a.resolveSchema.call(this,C,O),!E)return;this.refs[O]=E}return E.validate||this._compileSchemaEnv(E)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const E=P.call(this,O);return typeof E=="object"&&this._cache.delete(E.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const E=O;this._cache.delete(E);let T=O[this.opts.schemaId];return T&&(T=(0,h.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const E of O)this.addKeyword(E);return this}addKeyword(O,E){let T;if(typeof O=="string")T=O,typeof E=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),E.keyword=T);else if(typeof O=="object"&&E===void 0){if(E=O,T=E.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,T,E),!E)return(0,c.eachItem)(T,D=>lt.call(this,D)),this;bt.call(this,E);const C={...E,type:(0,l.getJSONTypes)(E.type),schemaType:(0,l.getJSONTypes)(E.schemaType)};return(0,c.eachItem)(T,C.type.length===0?D=>lt.call(this,D,C):D=>C.type.forEach(G=>lt.call(this,D,C,G))),this}getKeyword(O){const E=this.RULES.all[O];return typeof E=="object"?E.definition:!!E}removeKeyword(O){const{RULES:E}=this;delete E.keywords[O],delete E.all[O];for(const T of E.rules){const C=T.rules.findIndex(D=>D.keyword===O);C>=0&&T.rules.splice(C,1)}return this}addFormat(O,E){return typeof E=="string"&&(E=new RegExp(E)),this.formats[O]=E,this}errorsText(O=this.errors,{separator:E=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(C=>`${T}${C.instancePath} ${C.message}`).reduce((C,D)=>C+E+D)}$dataMetaSchema(O,E){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const C of E){const D=C.split("/").slice(1);let G=O;for(const M of D)G=G[M];for(const M in T){const V=T[M];if(typeof V!="object")continue;const{$data:q}=V.definition,Z=G[M];q&&Z&&(G[M]=it(Z))}}return O}_removeAllSchemas(O,E){for(const T in O){const C=O[T];(!E||E.test(T))&&(typeof C=="string"?delete O[T]:C&&!C.meta&&(this._cache.delete(C.schema),delete O[T]))}}_addSchema(O,E,T,C=this.opts.validateSchema,D=this.opts.addUsedSchema){let G;const{schemaId:M}=this.opts;if(typeof O=="object")G=O[M];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(O);if(V!==void 0)return V;T=(0,h.normalizeId)(G||T);const q=h.getSchemaRefs.call(this,O,T);return V=new a.SchemaEnv({schema:O,schemaId:M,meta:E,baseId:T,localRefs:q}),this._cache.set(V.schema,V),D&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=V),C&&this.validateSchema(O,!0),V}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):a.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const E=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,O)}finally{this.opts=E}}}n.default=k,k.ValidationError=r.default,k.MissingRefError=i.default;function F(Y,O,E,T="error"){for(const C in Y){const D=C;D in O&&this.logger[T](`${E}: option ${C}. ${Y[D]}`)}}function P(Y){return Y=(0,h.normalizeId)(Y),this.schemas[Y]||this.refs[Y]}function N(){const Y=this.opts.schemas;if(Y)if(Array.isArray(Y))this.addSchema(Y);else for(const O in Y)this.addSchema(Y[O],O)}function R(){for(const Y in this.opts.formats){const O=this.opts.formats[Y];O&&this.addFormat(Y,O)}}function L(Y){if(Array.isArray(Y)){this.addVocabulary(Y);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in Y){const E=Y[O];E.keyword||(E.keyword=O),this.addKeyword(E)}}function U(){const Y={...this.opts};for(const O of p)delete Y[O];return Y}const B={log(){},warn(){},error(){}};function K(Y){if(Y===!1)return B;if(Y===void 0)return console;if(Y.log&&Y.warn&&Y.error)return Y;throw new Error("logger must implement log, warn and error methods")}const tt=/^[a-z_$][a-z0-9_$:-]*$/i;function W(Y,O){const{RULES:E}=this;if((0,c.eachItem)(Y,T=>{if(E.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!tt.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function lt(Y,O,E){var T;const C=O==null?void 0:O.post;if(E&&C)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:D}=this;let G=C?D.post:D.rules.find(({type:V})=>V===E);if(G||(G={type:E,rules:[]},D.rules.push(G)),D.keywords[Y]=!0,!O)return;const M={keyword:Y,definition:{...O,type:(0,l.getJSONTypes)(O.type),schemaType:(0,l.getJSONTypes)(O.schemaType)}};O.before?wt.call(this,G,M,O.before):G.rules.push(M),D.all[Y]=M,(T=O.implements)===null||T===void 0||T.forEach(V=>this.addKeyword(V))}function wt(Y,O,E){const T=Y.rules.findIndex(C=>C.keyword===E);T>=0?Y.rules.splice(T,0,O):(Y.rules.push(O),this.logger.warn(`rule ${E} is not defined`))}function bt(Y){let{metaSchema:O}=Y;O!==void 0&&(Y.$data&&this.opts.$data&&(O=it(O)),Y.validateSchema=this.compile(O,!0))}const xt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function it(Y){return{anyOf:[Y,xt]}}})(Fh);const h5=pn(Fh),c5=Pt({__proto__:null,default:h5},[Fh]),u5=Et(c5);var rc={},ic={},sc={};Object.defineProperty(sc,"__esModule",{value:!0});const d5={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var f5=sc.default=d5;const p5=Pt({__proto__:null,default:f5},[sc]),g5=Et(p5);var vi={};Object.defineProperty(vi,"__esModule",{value:!0});var Fp=vi.callRef=Mp=vi.getValidate=void 0;const m5=Qh,Np=Bn,gn=Zt,Qi=kr,Rp=tc,zo=ce,y5={keyword:"$ref",schemaType:"string",code(n){const{gen:t,schema:e,it:r}=n,{baseId:i,schemaEnv:s,validateName:a,opts:o,self:h}=r,{root:l}=s;if((e==="#"||e==="#/")&&i===l.baseId)return f();const c=Rp.resolveRef.call(h,l,i,e);if(c===void 0)throw new m5.default(r.opts.uriResolver,i,e);if(c instanceof Rp.SchemaEnv)return d(c);return u(c);function f(){if(s===l)return Vo(n,a,s,s.$async);const p=t.scopeValue("root",{ref:l});return Vo(n,(0,gn._)`${p}.validate`,l,l.$async)}function d(p){const v=Dp(n,p);Vo(n,v,p,p.$async)}function u(p){const v=t.scopeValue("schema",o.code.source===!0?{ref:p,code:(0,gn.stringify)(p)}:{ref:p}),_=t.name("valid"),S=n.subschema({schema:p,dataTypes:[],schemaPath:gn.nil,topSchemaRef:v,errSchemaPath:e},_);n.mergeEvaluated(S),n.ok(_)}}};function Dp(n,t){const{gen:e}=n;return t.validate?e.scopeValue("validate",{ref:t.validate}):(0,gn._)`${e.scopeValue("wrapper",{ref:t})}.validate`}var Mp=vi.getValidate=Dp;function Vo(n,t,e,r){const{gen:i,it:s}=n,{allErrors:a,schemaEnv:o,opts:h}=s,l=h.passContext?Qi.default.this:gn.nil;r?c():f();function c(){if(!o.$async)throw new Error("async schema referenced by sync schema");const p=i.let("valid");i.try(()=>{i.code((0,gn._)`await ${(0,Np.callValidateCode)(n,t,l)}`),u(t),a||i.assign(p,!0)},v=>{i.if((0,gn._)`!(${v} instanceof ${s.ValidationError})`,()=>i.throw(v)),d(v),a||i.assign(p,!1)}),n.ok(p)}function f(){n.result((0,Np.callValidateCode)(n,t,l),()=>u(t),()=>d(t))}function d(p){const v=(0,gn._)`${p}.errors`;i.assign(Qi.default.vErrors,(0,gn._)`${Qi.default.vErrors} === null ? ${v} : ${Qi.default.vErrors}.concat(${v})`),i.assign(Qi.default.errors,(0,gn._)`${Qi.default.vErrors}.length`)}function u(p){var v;if(!s.opts.unevaluated)return;const _=(v=e==null?void 0:e.validate)===null||v===void 0?void 0:v.evaluated;if(s.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(s.props=zo.mergeEvaluated.props(i,_.props,s.props));else{const S=i.var("props",(0,gn._)`${p}.evaluated.props`);s.props=zo.mergeEvaluated.props(i,S,s.props,gn.Name)}if(s.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(s.items=zo.mergeEvaluated.items(i,_.items,s.items));else{const S=i.var("items",(0,gn._)`${p}.evaluated.items`);s.items=zo.mergeEvaluated.items(i,S,s.items,gn.Name)}}}Fp=vi.callRef=Vo;var v5=vi.default=y5;const _5=Pt({__proto__:null,get callRef(){return Fp},default:v5,get getValidate(){return Mp}},[vi]),w5=Et(_5);Object.defineProperty(ic,"__esModule",{value:!0});const x5=g5,b5=w5,S5=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",x5.default,b5.default];var k5=ic.default=S5;const C5=Pt({__proto__:null,default:k5},[ic]),T5=Et(C5);var ac={},oc={};Object.defineProperty(oc,"__esModule",{value:!0});const Bo=Zt,Jr=Bo.operators,Ho={maximum:{okStr:"<=",ok:Jr.LTE,fail:Jr.GT},minimum:{okStr:">=",ok:Jr.GTE,fail:Jr.LT},exclusiveMaximum:{okStr:"<",ok:Jr.LT,fail:Jr.GTE},exclusiveMinimum:{okStr:">",ok:Jr.GT,fail:Jr.LTE}},P5={message:({keyword:n,schemaCode:t})=>(0,Bo.str)`must be ${Ho[n].okStr} ${t}`,params:({keyword:n,schemaCode:t})=>(0,Bo._)`{comparison: ${Ho[n].okStr}, limit: ${t}}`},E5={keyword:Object.keys(Ho),type:"number",schemaType:"number",$data:!0,error:P5,code(n){const{keyword:t,data:e,schemaCode:r}=n;n.fail$data((0,Bo._)`${e} ${Ho[t].fail} ${r} || isNaN(${e})`)}};var A5=oc.default=E5;const O5=Pt({__proto__:null,default:A5},[oc]),$5=Et(O5);var lc={};Object.defineProperty(lc,"__esModule",{value:!0});const Ls=Zt,F5={message:({schemaCode:n})=>(0,Ls.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,Ls._)`{multipleOf: ${n}}`},N5={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:F5,code(n){const{gen:t,data:e,schemaCode:r,it:i}=n,s=i.opts.multipleOfPrecision,a=t.let("res"),o=s?(0,Ls._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,Ls._)`${a} !== parseInt(${a})`;n.fail$data((0,Ls._)`(${r} === 0 || (${a} = ${e}/${r}, ${o}))`)}};var R5=lc.default=N5;const D5=Pt({__proto__:null,default:R5},[lc]),M5=Et(D5);var hc={},cc={};Object.defineProperty(cc,"__esModule",{value:!0});function Ip(n){const t=n.length;let e=0,r=0,i;for(;r<t;)e++,i=n.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=n.charCodeAt(r),(i&64512)===56320&&r++);return e}var I5=cc.default=Ip;Ip.code='require("ajv/dist/runtime/ucs2length").default';const j5=Pt({__proto__:null,default:I5},[cc]),L5=Et(j5);Object.defineProperty(hc,"__esModule",{value:!0});const _i=Zt,U5=ce,G5=L5,z5={message({keyword:n,schemaCode:t}){const e=n==="maxLength"?"more":"fewer";return(0,_i.str)`must NOT have ${e} than ${t} characters`},params:({schemaCode:n})=>(0,_i._)`{limit: ${n}}`},V5={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:z5,code(n){const{keyword:t,data:e,schemaCode:r,it:i}=n,s=t==="maxLength"?_i.operators.GT:_i.operators.LT,a=i.opts.unicode===!1?(0,_i._)`${e}.length`:(0,_i._)`${(0,U5.useFunc)(n.gen,G5.default)}(${e})`;n.fail$data((0,_i._)`${a} ${s} ${r}`)}};var B5=hc.default=V5;const H5=Pt({__proto__:null,default:B5},[hc]),q5=Et(H5);var uc={};Object.defineProperty(uc,"__esModule",{value:!0});const K5=Bn,qo=Zt,Y5={message:({schemaCode:n})=>(0,qo.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,qo._)`{pattern: ${n}}`},X5={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Y5,code(n){const{data:t,$data:e,schema:r,schemaCode:i,it:s}=n,a=s.opts.unicodeRegExp?"u":"",o=e?(0,qo._)`(new RegExp(${i}, ${a}))`:(0,K5.usePattern)(n,r);n.fail$data((0,qo._)`!${o}.test(${t})`)}};var J5=uc.default=X5;const Q5=Pt({__proto__:null,default:J5},[uc]),Z5=Et(Q5);var dc={};Object.defineProperty(dc,"__esModule",{value:!0});const Us=Zt,W5={message({keyword:n,schemaCode:t}){const e=n==="maxProperties"?"more":"fewer";return(0,Us.str)`must NOT have ${e} than ${t} properties`},params:({schemaCode:n})=>(0,Us._)`{limit: ${n}}`},t3={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:W5,code(n){const{keyword:t,data:e,schemaCode:r}=n,i=t==="maxProperties"?Us.operators.GT:Us.operators.LT;n.fail$data((0,Us._)`Object.keys(${e}).length ${i} ${r}`)}};var e3=dc.default=t3;const n3=Pt({__proto__:null,default:e3},[dc]),r3=Et(n3);var fc={};Object.defineProperty(fc,"__esModule",{value:!0});const Gs=Bn,zs=Zt,i3=ce,s3={message:({params:{missingProperty:n}})=>(0,zs.str)`must have required property '${n}'`,params:({params:{missingProperty:n}})=>(0,zs._)`{missingProperty: ${n}}`},a3={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s3,code(n){const{gen:t,schema:e,schemaCode:r,data:i,$data:s,it:a}=n,{opts:o}=a;if(!s&&e.length===0)return;const h=e.length>=o.loopRequired;if(a.allErrors?l():c(),o.strictRequired){const u=n.parentSchema.properties,{definedProperties:p}=n.it;for(const v of e)if((u==null?void 0:u[v])===void 0&&!p.has(v)){const _=a.schemaEnv.baseId+a.errSchemaPath,S=`required property "${v}" is not defined at "${_}" (strictRequired)`;(0,i3.checkStrictMode)(a,S,a.opts.strictRequired)}}function l(){if(h||s)n.block$data(zs.nil,f);else for(const u of e)(0,Gs.checkReportMissingProp)(n,u)}function c(){const u=t.let("missing");if(h||s){const p=t.let("valid",!0);n.block$data(p,()=>d(u,p)),n.ok(p)}else t.if((0,Gs.checkMissingProp)(n,e,u)),(0,Gs.reportMissingProp)(n,u),t.else()}function f(){t.forOf("prop",r,u=>{n.setParams({missingProperty:u}),t.if((0,Gs.noPropertyInData)(t,i,u,o.ownProperties),()=>n.error())})}function d(u,p){n.setParams({missingProperty:u}),t.forOf(u,r,()=>{t.assign(p,(0,Gs.propertyInData)(t,i,u,o.ownProperties)),t.if((0,zs.not)(p),()=>{n.error(),t.break()})},zs.nil)}}};var o3=fc.default=a3;const l3=Pt({__proto__:null,default:o3},[fc]),h3=Et(l3);var pc={};Object.defineProperty(pc,"__esModule",{value:!0});const Vs=Zt,c3={message({keyword:n,schemaCode:t}){const e=n==="maxItems"?"more":"fewer";return(0,Vs.str)`must NOT have ${e} than ${t} items`},params:({schemaCode:n})=>(0,Vs._)`{limit: ${n}}`},u3={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:c3,code(n){const{keyword:t,data:e,schemaCode:r}=n,i=t==="maxItems"?Vs.operators.GT:Vs.operators.LT;n.fail$data((0,Vs._)`${e}.length ${i} ${r}`)}};var d3=pc.default=u3;const f3=Pt({__proto__:null,default:d3},[pc]),p3=Et(f3);var gc={},mc={};Object.defineProperty(mc,"__esModule",{value:!0});const jp=K0;jp.code='require("ajv/dist/runtime/equal").default';var g3=mc.default=jp;const m3=Pt({__proto__:null,default:g3},[mc]),yc=Et(m3);Object.defineProperty(gc,"__esModule",{value:!0});const vc=Mo,We=Zt,y3=ce,v3=yc,_3={message:({params:{i:n,j:t}})=>(0,We.str)`must NOT have duplicate items (items ## ${t} and ${n} are identical)`,params:({params:{i:n,j:t}})=>(0,We._)`{i: ${n}, j: ${t}}`},w3={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:_3,code(n){const{gen:t,data:e,$data:r,schema:i,parentSchema:s,schemaCode:a,it:o}=n;if(!r&&!i)return;const h=t.let("valid"),l=s.items?(0,vc.getSchemaTypes)(s.items):[];n.block$data(h,c,(0,We._)`${a} === false`),n.ok(h);function c(){const p=t.let("i",(0,We._)`${e}.length`),v=t.let("j");n.setParams({i:p,j:v}),t.assign(h,!0),t.if((0,We._)`${p} > 1`,()=>(f()?d:u)(p,v))}function f(){return l.length>0&&!l.some(p=>p==="object"||p==="array")}function d(p,v){const _=t.name("item"),S=(0,vc.checkDataTypes)(l,_,o.opts.strictNumbers,vc.DataType.Wrong),x=t.const("indices",(0,We._)`{}`);t.for((0,We._)`;${p}--;`,()=>{t.let(_,(0,We._)`${e}[${p}]`),t.if(S,(0,We._)`continue`),l.length>1&&t.if((0,We._)`typeof ${_} == "string"`,(0,We._)`${_} += "_"`),t.if((0,We._)`typeof ${x}[${_}] == "number"`,()=>{t.assign(v,(0,We._)`${x}[${_}]`),n.error(),t.assign(h,!1).break()}).code((0,We._)`${x}[${_}] = ${p}`)})}function u(p,v){const _=(0,y3.useFunc)(t,v3.default),S=t.name("outer");t.label(S).for((0,We._)`;${p}--;`,()=>t.for((0,We._)`${v} = ${p}; ${v}--;`,()=>t.if((0,We._)`${_}(${e}[${p}], ${e}[${v}])`,()=>{n.error(),t.assign(h,!1).break(S)})))}}};var x3=gc.default=w3;const b3=Pt({__proto__:null,default:x3},[gc]),S3=Et(b3);var _c={};Object.defineProperty(_c,"__esModule",{value:!0});const wc=Zt,k3=ce,C3=yc,T3={message:"must be equal to constant",params:({schemaCode:n})=>(0,wc._)`{allowedValue: ${n}}`},P3={keyword:"const",$data:!0,error:T3,code(n){const{gen:t,data:e,$data:r,schemaCode:i,schema:s}=n;r||s&&typeof s=="object"?n.fail$data((0,wc._)`!${(0,k3.useFunc)(t,C3.default)}(${e}, ${i})`):n.fail((0,wc._)`${s} !== ${e}`)}};var E3=_c.default=P3;const A3=Pt({__proto__:null,default:E3},[_c]),O3=Et(A3);var xc={};Object.defineProperty(xc,"__esModule",{value:!0});const Bs=Zt,$3=ce,F3=yc,N3={message:"must be equal to one of the allowed values",params:({schemaCode:n})=>(0,Bs._)`{allowedValues: ${n}}`},R3={keyword:"enum",schemaType:"array",$data:!0,error:N3,code(n){const{gen:t,data:e,$data:r,schema:i,schemaCode:s,it:a}=n;if(!r&&i.length===0)throw new Error("enum must have non-empty array");const o=i.length>=a.opts.loopEnum;let h;const l=()=>h??(h=(0,$3.useFunc)(t,F3.default));let c;if(o||r)c=t.let("valid"),n.block$data(c,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const u=t.const("vSchema",s);c=(0,Bs.or)(...i.map((p,v)=>d(u,v)))}n.pass(c);function f(){t.assign(c,!1),t.forOf("v",s,u=>t.if((0,Bs._)`${l()}(${e}, ${u})`,()=>t.assign(c,!0).break()))}function d(u,p){const v=i[p];return typeof v=="object"&&v!==null?(0,Bs._)`${l()}(${e}, ${u}[${p}])`:(0,Bs._)`${e} === ${v}`}}};var D3=xc.default=R3;const M3=Pt({__proto__:null,default:D3},[xc]),I3=Et(M3);Object.defineProperty(ac,"__esModule",{value:!0});const j3=$5,L3=M5,U3=q5,G3=Z5,z3=r3,V3=h3,B3=p3,H3=S3,q3=O3,K3=I3,Y3=[j3.default,L3.default,U3.default,G3.default,z3.default,V3.default,B3.default,H3.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},q3.default,K3.default];var X3=ac.default=Y3;const J3=Pt({__proto__:null,default:X3},[ac]),Q3=Et(J3);var bc={},Hs={};Object.defineProperty(Hs,"__esModule",{value:!0});var Lp=Hs.validateAdditionalItems=void 0;const wi=Zt,Sc=ce,Z3={message:({params:{len:n}})=>(0,wi.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,wi._)`{limit: ${n}}`},W3={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Z3,code(n){const{parentSchema:t,it:e}=n,{items:r}=t;if(!Array.isArray(r)){(0,Sc.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas');return}Up(n,r)}};function Up(n,t){const{gen:e,schema:r,data:i,keyword:s,it:a}=n;a.items=!0;const o=e.const("len",(0,wi._)`${i}.length`);if(r===!1)n.setParams({len:t.length}),n.pass((0,wi._)`${o} <= ${t.length}`);else if(typeof r=="object"&&!(0,Sc.alwaysValidSchema)(a,r)){const l=e.var("valid",(0,wi._)`${o} <= ${t.length}`);e.if((0,wi.not)(l),()=>h(l)),n.ok(l)}function h(l){e.forRange("i",t.length,o,c=>{n.subschema({keyword:s,dataProp:c,dataPropType:Sc.Type.Num},l),a.allErrors||e.if((0,wi.not)(l),()=>e.break())})}}Lp=Hs.validateAdditionalItems=Up;var t4=Hs.default=W3;const e4=Pt({__proto__:null,default:t4,get validateAdditionalItems(){return Lp}},[Hs]),Gp=Et(e4);var kc={},qs={};Object.defineProperty(qs,"__esModule",{value:!0});var zp=qs.validateTuple=void 0;const Vp=Zt,Ko=ce,n4=Bn,r4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(n){const{schema:t,it:e}=n;if(Array.isArray(t))return Bp(n,"additionalItems",t);e.items=!0,!(0,Ko.alwaysValidSchema)(e,t)&&n.ok((0,n4.validateArray)(n))}};function Bp(n,t,e=n.schema){const{gen:r,parentSchema:i,data:s,keyword:a,it:o}=n;c(i),o.opts.unevaluated&&e.length&&o.items!==!0&&(o.items=Ko.mergeEvaluated.items(r,e.length,o.items));const h=r.name("valid"),l=r.const("len",(0,Vp._)`${s}.length`);e.forEach((f,d)=>{(0,Ko.alwaysValidSchema)(o,f)||(r.if((0,Vp._)`${l} > ${d}`,()=>n.subschema({keyword:a,schemaProp:d,dataProp:d},h)),n.ok(h))});function c(f){const{opts:d,errSchemaPath:u}=o,p=e.length,v=p===f.minItems&&(p===f.maxItems||f[t]===!1);if(d.strictTuples&&!v){const _=`"${a}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${u}"`;(0,Ko.checkStrictMode)(o,_,d.strictTuples)}}}zp=qs.validateTuple=Bp;var i4=qs.default=r4;const s4=Pt({__proto__:null,default:i4,get validateTuple(){return zp}},[qs]),Hp=Et(s4);Object.defineProperty(kc,"__esModule",{value:!0});const a4=Hp,o4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,a4.validateTuple)(n,"items")};var l4=kc.default=o4;const h4=Pt({__proto__:null,default:l4},[kc]),c4=Et(h4);var Cc={};Object.defineProperty(Cc,"__esModule",{value:!0});const qp=Zt,u4=ce,d4=Bn,f4=Gp,p4={message:({params:{len:n}})=>(0,qp.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,qp._)`{limit: ${n}}`},g4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:p4,code(n){const{schema:t,parentSchema:e,it:r}=n,{prefixItems:i}=e;r.items=!0,!(0,u4.alwaysValidSchema)(r,t)&&(i?(0,f4.validateAdditionalItems)(n,i):n.ok((0,d4.validateArray)(n)))}};var m4=Cc.default=g4;const y4=Pt({__proto__:null,default:m4},[Cc]),v4=Et(y4);var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0});const Nn=Zt,Yo=ce,_4={message:({params:{min:n,max:t}})=>t===void 0?(0,Nn.str)`must contain at least ${n} valid item(s)`:(0,Nn.str)`must contain at least ${n} and no more than ${t} valid item(s)`,params:({params:{min:n,max:t}})=>t===void 0?(0,Nn._)`{minContains: ${n}}`:(0,Nn._)`{minContains: ${n}, maxContains: ${t}}`},w4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:_4,code(n){const{gen:t,schema:e,parentSchema:r,data:i,it:s}=n;let a,o;const{minContains:h,maxContains:l}=r;s.opts.next?(a=h===void 0?1:h,o=l):a=1;const c=t.const("len",(0,Nn._)`${i}.length`);if(n.setParams({min:a,max:o}),o===void 0&&a===0){(0,Yo.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&a>o){(0,Yo.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,Yo.alwaysValidSchema)(s,e)){let v=(0,Nn._)`${c} >= ${a}`;o!==void 0&&(v=(0,Nn._)`${v} && ${c} <= ${o}`),n.pass(v);return}s.items=!0;const f=t.name("valid");o===void 0&&a===1?u(f,()=>t.if(f,()=>t.break())):a===0?(t.let(f,!0),o!==void 0&&t.if((0,Nn._)`${i}.length > 0`,d)):(t.let(f,!1),d()),n.result(f,()=>n.reset());function d(){const v=t.name("_valid"),_=t.let("count",0);u(v,()=>t.if(v,()=>p(_)))}function u(v,_){t.forRange("i",0,c,S=>{n.subschema({keyword:"contains",dataProp:S,dataPropType:Yo.Type.Num,compositeRule:!0},v),_()})}function p(v){t.code((0,Nn._)`${v}++`),o===void 0?t.if((0,Nn._)`${v} >= ${a}`,()=>t.assign(f,!0).break()):(t.if((0,Nn._)`${v} > ${o}`,()=>t.assign(f,!1).break()),a===1?t.assign(f,!0):t.if((0,Nn._)`${v} >= ${a}`,()=>t.assign(f,!0)))}}};var x4=Tc.default=w4;const b4=Pt({__proto__:null,default:x4},[Tc]),S4=Et(b4);var Pc={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateSchemaDeps=n.validatePropertyDeps=n.error=void 0;const t=Zt,e=ce,r=Bn;n.error={message:({params:{property:h,depsCount:l,deps:c}})=>{const f=l===1?"property":"properties";return(0,t.str)`must have ${f} ${c} when property ${h} is present`},params:({params:{property:h,depsCount:l,deps:c,missingProperty:f}})=>(0,t._)`{property: ${h},
|
|
22
|
+
missingProperty: ${f},
|
|
23
|
+
depsCount: ${l},
|
|
24
|
+
deps: ${c}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:n.error,code(h){const[l,c]=s(h);a(h,l),o(h,c)}};function s({schema:h}){const l={},c={};for(const f in h){if(f==="__proto__")continue;const d=Array.isArray(h[f])?l:c;d[f]=h[f]}return[l,c]}function a(h,l=h.schema){const{gen:c,data:f,it:d}=h;if(Object.keys(l).length===0)return;const u=c.let("missing");for(const p in l){const v=l[p];if(v.length===0)continue;const _=(0,r.propertyInData)(c,f,p,d.opts.ownProperties);h.setParams({property:p,depsCount:v.length,deps:v.join(", ")}),d.allErrors?c.if(_,()=>{for(const S of v)(0,r.checkReportMissingProp)(h,S)}):(c.if((0,t._)`${_} && (${(0,r.checkMissingProp)(h,v,u)})`),(0,r.reportMissingProp)(h,u),c.else())}}n.validatePropertyDeps=a;function o(h,l=h.schema){const{gen:c,data:f,keyword:d,it:u}=h,p=c.name("valid");for(const v in l)(0,e.alwaysValidSchema)(u,l[v])||(c.if((0,r.propertyInData)(c,f,v,u.opts.ownProperties),()=>{const _=h.subschema({keyword:d,schemaProp:v},p);h.mergeValidEvaluated(_,p)},()=>c.var(p,!0)),h.ok(p))}n.validateSchemaDeps=o,n.default=i})(Pc);const k4=pn(Pc),C4=Pt({__proto__:null,default:k4},[Pc]),T4=Et(C4);var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});const Kp=Zt,P4=ce,E4={message:"property name must be valid",params:({params:n})=>(0,Kp._)`{propertyName: ${n.propertyName}}`},A4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:E4,code(n){const{gen:t,schema:e,data:r,it:i}=n;if((0,P4.alwaysValidSchema)(i,e))return;const s=t.name("valid");t.forIn("key",r,a=>{n.setParams({propertyName:a}),n.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),t.if((0,Kp.not)(s),()=>{n.error(!0),i.allErrors||t.break()})}),n.ok(s)}};var O4=Ec.default=A4;const $4=Pt({__proto__:null,default:O4},[Ec]),F4=Et($4);var Ac={};Object.defineProperty(Ac,"__esModule",{value:!0});const Xo=Bn,Kn=Zt,N4=kr,Jo=ce,R4={message:"must NOT have additional properties",params:({params:n})=>(0,Kn._)`{additionalProperty: ${n.additionalProperty}}`},D4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:R4,code(n){const{gen:t,schema:e,parentSchema:r,data:i,errsCount:s,it:a}=n;if(!s)throw new Error("ajv implementation error");const{allErrors:o,opts:h}=a;if(a.props=!0,h.removeAdditional!=="all"&&(0,Jo.alwaysValidSchema)(a,e))return;const l=(0,Xo.allSchemaProperties)(r.properties),c=(0,Xo.allSchemaProperties)(r.patternProperties);f(),n.ok((0,Kn._)`${s} === ${N4.default.errors}`);function f(){t.forIn("key",i,_=>{!l.length&&!c.length?p(_):t.if(d(_),()=>p(_))})}function d(_){let S;if(l.length>8){const x=(0,Jo.schemaRefOrVal)(a,r.properties,"properties");S=(0,Xo.isOwnProperty)(t,x,_)}else l.length?S=(0,Kn.or)(...l.map(x=>(0,Kn._)`${_} === ${x}`)):S=Kn.nil;return c.length&&(S=(0,Kn.or)(S,...c.map(x=>(0,Kn._)`${(0,Xo.usePattern)(n,x)}.test(${_})`))),(0,Kn.not)(S)}function u(_){t.code((0,Kn._)`delete ${i}[${_}]`)}function p(_){if(h.removeAdditional==="all"||h.removeAdditional&&e===!1){u(_);return}if(e===!1){n.setParams({additionalProperty:_}),n.error(),o||t.break();return}if(typeof e=="object"&&!(0,Jo.alwaysValidSchema)(a,e)){const S=t.name("valid");h.removeAdditional==="failing"?(v(_,S,!1),t.if((0,Kn.not)(S),()=>{n.reset(),u(_)})):(v(_,S),o||t.if((0,Kn.not)(S),()=>t.break()))}}function v(_,S,x){const m={keyword:"additionalProperties",dataProp:_,dataPropType:Jo.Type.Str};x===!1&&Object.assign(m,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(m,S)}}};var M4=Ac.default=D4;const I4=Pt({__proto__:null,default:M4},[Ac]),Yp=Et(I4);var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});const j4=js,Xp=Bn,$c=ce,Jp=Yp,L4={keyword:"properties",type:"object",schemaType:"object",code(n){const{gen:t,schema:e,parentSchema:r,data:i,it:s}=n;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Jp.default.code(new j4.KeywordCxt(s,Jp.default,"additionalProperties"));const a=(0,Xp.allSchemaProperties)(e);for(const f of a)s.definedProperties.add(f);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=$c.mergeEvaluated.props(t,(0,$c.toHash)(a),s.props));const o=a.filter(f=>!(0,$c.alwaysValidSchema)(s,e[f]));if(o.length===0)return;const h=t.name("valid");for(const f of o)l(f)?c(f):(t.if((0,Xp.propertyInData)(t,i,f,s.opts.ownProperties)),c(f),s.allErrors||t.else().var(h,!0),t.endIf()),n.it.definedProperties.add(f),n.ok(h);function l(f){return s.opts.useDefaults&&!s.compositeRule&&e[f].default!==void 0}function c(f){n.subschema({keyword:"properties",schemaProp:f,dataProp:f},h)}}};var U4=Oc.default=L4;const G4=Pt({__proto__:null,default:U4},[Oc]),z4=Et(G4);var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const Qp=Bn,Qo=Zt,Zp=ce,Wp=ce,V4={keyword:"patternProperties",type:"object",schemaType:"object",code(n){const{gen:t,schema:e,data:r,parentSchema:i,it:s}=n,{opts:a}=s,o=(0,Qp.allSchemaProperties)(e),h=o.filter(v=>(0,Zp.alwaysValidSchema)(s,e[v]));if(o.length===0||h.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;const l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,c=t.name("valid");s.props!==!0&&!(s.props instanceof Qo.Name)&&(s.props=(0,Wp.evaluatedPropsToName)(t,s.props));const{props:f}=s;d();function d(){for(const v of o)l&&u(v),s.allErrors?p(v):(t.var(c,!0),p(v),t.if(c))}function u(v){for(const _ in l)new RegExp(v).test(_)&&(0,Zp.checkStrictMode)(s,`property ${_} matches pattern ${v} (use allowMatchingProperties)`)}function p(v){t.forIn("key",r,_=>{t.if((0,Qo._)`${(0,Qp.usePattern)(n,v)}.test(${_})`,()=>{const S=h.includes(v);S||n.subschema({keyword:"patternProperties",schemaProp:v,dataProp:_,dataPropType:Wp.Type.Str},c),s.opts.unevaluated&&f!==!0?t.assign((0,Qo._)`${f}[${_}]`,!0):!S&&!s.allErrors&&t.if((0,Qo.not)(c),()=>t.break())})})}}};var B4=Fc.default=V4;const H4=Pt({__proto__:null,default:B4},[Fc]),q4=Et(H4);var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0});const K4=ce,Y4={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:t,schema:e,it:r}=n;if((0,K4.alwaysValidSchema)(r,e)){n.fail();return}const i=t.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),n.failResult(i,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};var X4=Nc.default=Y4;const J4=Pt({__proto__:null,default:X4},[Nc]),Q4=Et(J4);var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0});const Z4=Bn,W4={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Z4.validateUnion,error:{message:"must match a schema in anyOf"}};var t6=Rc.default=W4;const e6=Pt({__proto__:null,default:t6},[Rc]),n6=Et(e6);var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});const Zo=Zt,r6=ce,i6={message:"must match exactly one schema in oneOf",params:({params:n})=>(0,Zo._)`{passingSchemas: ${n.passing}}`},s6={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:i6,code(n){const{gen:t,schema:e,parentSchema:r,it:i}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;const s=e,a=t.let("valid",!1),o=t.let("passing",null),h=t.name("_valid");n.setParams({passing:o}),t.block(l),n.result(a,()=>n.reset(),()=>n.error(!0));function l(){s.forEach((c,f)=>{let d;(0,r6.alwaysValidSchema)(i,c)?t.var(h,!0):d=n.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},h),f>0&&t.if((0,Zo._)`${h} && ${a}`).assign(a,!1).assign(o,(0,Zo._)`[${o}, ${f}]`).else(),t.if(h,()=>{t.assign(a,!0),t.assign(o,f),d&&n.mergeEvaluated(d,Zo.Name)})})}}};var a6=Dc.default=s6;const o6=Pt({__proto__:null,default:a6},[Dc]),l6=Et(o6);var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0});const h6=ce,c6={keyword:"allOf",schemaType:"array",code(n){const{gen:t,schema:e,it:r}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");const i=t.name("valid");e.forEach((s,a)=>{if((0,h6.alwaysValidSchema)(r,s))return;const o=n.subschema({keyword:"allOf",schemaProp:a},i);n.ok(i),n.mergeEvaluated(o)})}};var u6=Mc.default=c6;const d6=Pt({__proto__:null,default:u6},[Mc]),f6=Et(d6);var Ic={};Object.defineProperty(Ic,"__esModule",{value:!0});const Wo=Zt,tg=ce,p6={message:({params:n})=>(0,Wo.str)`must match "${n.ifClause}" schema`,params:({params:n})=>(0,Wo._)`{failingKeyword: ${n.ifClause}}`},g6={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:p6,code(n){const{gen:t,parentSchema:e,it:r}=n;e.then===void 0&&e.else===void 0&&(0,tg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const i=eg(r,"then"),s=eg(r,"else");if(!i&&!s)return;const a=t.let("valid",!0),o=t.name("_valid");if(h(),n.reset(),i&&s){const c=t.let("ifClause");n.setParams({ifClause:c}),t.if(o,l("then",c),l("else",c))}else i?t.if(o,l("then")):t.if((0,Wo.not)(o),l("else"));n.pass(a,()=>n.error(!0));function h(){const c=n.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);n.mergeEvaluated(c)}function l(c,f){return()=>{const d=n.subschema({keyword:c},o);t.assign(a,o),n.mergeValidEvaluated(d,a),f?t.assign(f,(0,Wo._)`${c}`):n.setParams({ifClause:c})}}}};function eg(n,t){const e=n.schema[t];return e!==void 0&&!(0,tg.alwaysValidSchema)(n,e)}var m6=Ic.default=g6;const y6=Pt({__proto__:null,default:m6},[Ic]),v6=Et(y6);var jc={};Object.defineProperty(jc,"__esModule",{value:!0});const _6=ce,w6={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:t,it:e}){t.if===void 0&&(0,_6.checkStrictMode)(e,`"${n}" without "if" is ignored`)}};var x6=jc.default=w6;const b6=Pt({__proto__:null,default:x6},[jc]),S6=Et(b6);Object.defineProperty(bc,"__esModule",{value:!0});const k6=Gp,C6=c4,T6=Hp,P6=v4,E6=S4,A6=T4,O6=F4,$6=Yp,F6=z4,N6=q4,R6=Q4,D6=n6,M6=l6,I6=f6,j6=v6,L6=S6;function U6(n=!1){const t=[R6.default,D6.default,M6.default,I6.default,j6.default,L6.default,O6.default,$6.default,A6.default,F6.default,N6.default];return n?t.push(C6.default,P6.default):t.push(k6.default,T6.default),t.push(E6.default),t}var G6=bc.default=U6;const z6=Pt({__proto__:null,default:G6},[bc]),V6=Et(z6);var Lc={},Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});const De=Zt,B6={message:({schemaCode:n})=>(0,De.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,De._)`{format: ${n}}`},H6={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:B6,code(n,t){const{gen:e,data:r,$data:i,schema:s,schemaCode:a,it:o}=n,{opts:h,errSchemaPath:l,schemaEnv:c,self:f}=o;if(!h.validateFormats)return;i?d():u();function d(){const p=e.scopeValue("formats",{ref:f.formats,code:h.code.formats}),v=e.const("fDef",(0,De._)`${p}[${a}]`),_=e.let("fType"),S=e.let("format");e.if((0,De._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>e.assign(_,(0,De._)`${v}.type || "string"`).assign(S,(0,De._)`${v}.validate`),()=>e.assign(_,(0,De._)`"string"`).assign(S,v)),n.fail$data((0,De.or)(x(),m()));function x(){return h.strictSchema===!1?De.nil:(0,De._)`${a} && !${S}`}function m(){const k=c.$async?(0,De._)`(${v}.async ? await ${S}(${r}) : ${S}(${r}))`:(0,De._)`${S}(${r})`,F=(0,De._)`(typeof ${S} == "function" ? ${k} : ${S}.test(${r}))`;return(0,De._)`${S} && ${S} !== true && ${_} === ${t} && !${F}`}}function u(){const p=f.formats[s];if(!p){x();return}if(p===!0)return;const[v,_,S]=m(p);v===t&&n.pass(k());function x(){if(h.strictSchema===!1){f.logger.warn(F());return}throw new Error(F());function F(){return`unknown format "${s}" ignored in schema at path "${l}"`}}function m(F){const P=F instanceof RegExp?(0,De.regexpCode)(F):h.code.formats?(0,De._)`${h.code.formats}${(0,De.getProperty)(s)}`:void 0,N=e.scopeValue("formats",{key:s,ref:F,code:P});return typeof F=="object"&&!(F instanceof RegExp)?[F.type||"string",F.validate,(0,De._)`${N}.validate`]:["string",F,N]}function k(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!c.$async)throw new Error("async format in sync schema");return(0,De._)`await ${S}(${r})`}return typeof _=="function"?(0,De._)`${S}(${r})`:(0,De._)`${S}.test(${r})`}}}};var q6=Uc.default=H6;const K6=Pt({__proto__:null,default:q6},[Uc]),Y6=Et(K6);Object.defineProperty(Lc,"__esModule",{value:!0});const X6=Y6,J6=[X6.default];var Q6=Lc.default=J6;const Z6=Pt({__proto__:null,default:Q6},[Lc]),W6=Et(Z6);var xi={};Object.defineProperty(xi,"__esModule",{value:!0});var ng=xi.contentVocabulary=rg=xi.metadataVocabulary=void 0,rg=xi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ng=xi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];const t8=Pt({__proto__:null,get contentVocabulary(){return ng},default:xi,get metadataVocabulary(){return rg}},[xi]),e8=Et(t8);Object.defineProperty(rc,"__esModule",{value:!0});const n8=T5,r8=Q3,i8=V6,s8=W6,ig=e8,a8=[n8.default,r8.default,(0,i8.default)(),s8.default,ig.metadataVocabulary,ig.contentVocabulary];var o8=rc.default=a8;const l8=Pt({__proto__:null,default:o8},[rc]),h8=Et(l8);var Gc={},zc={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(n.DiscrError||(n.DiscrError={}))})(zc);const c8=pn(zc),u8=Pt({__proto__:null,default:c8},[zc]),d8=Et(u8);Object.defineProperty(Gc,"__esModule",{value:!0});const Zi=Zt,Vc=d8,sg=tc,f8=ce,p8={message:({params:{discrError:n,tagName:t}})=>n===Vc.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:n,tag:t,tagName:e}})=>(0,Zi._)`{error: ${n}, tag: ${e}, tagValue: ${t}}`},g8={keyword:"discriminator",type:"object",schemaType:"object",error:p8,code(n){const{gen:t,data:e,schema:r,parentSchema:i,it:s}=n,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=r.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const h=t.let("valid",!1),l=t.const("tag",(0,Zi._)`${e}${(0,Zi.getProperty)(o)}`);t.if((0,Zi._)`typeof ${l} == "string"`,()=>c(),()=>n.error(!1,{discrError:Vc.DiscrError.Tag,tag:l,tagName:o})),n.ok(h);function c(){const u=d();t.if(!1);for(const p in u)t.elseIf((0,Zi._)`${l} === ${p}`),t.assign(h,f(u[p]));t.else(),n.error(!1,{discrError:Vc.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}function f(u){const p=t.name("valid"),v=n.subschema({keyword:"oneOf",schemaProp:u},p);return n.mergeEvaluated(v,Zi.Name),p}function d(){var u;const p={},v=S(i);let _=!0;for(let k=0;k<a.length;k++){let F=a[k];F!=null&&F.$ref&&!(0,f8.schemaHasRulesButRef)(F,s.self.RULES)&&(F=sg.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,F==null?void 0:F.$ref),F instanceof sg.SchemaEnv&&(F=F.schema));const P=(u=F==null?void 0:F.properties)===null||u===void 0?void 0:u[o];if(typeof P!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(v||S(F)),x(P,k)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return p;function S({required:k}){return Array.isArray(k)&&k.includes(o)}function x(k,F){if(k.const)m(k.const,F);else if(k.enum)for(const P of k.enum)m(P,F);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function m(k,F){if(typeof k!="string"||k in p)throw new Error(`discriminator: "${o}" values must be unique strings`);p[k]=F}}}};var m8=Gc.default=g8;const y8=Pt({__proto__:null,default:m8},[Gc]),v8=Et(y8),_8="http://json-schema.org/draft-07/schema#",w8="http://json-schema.org/draft-07/schema#",x8="Core schema meta-schema",b8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},S8=["object","boolean"],k8={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},C8={$schema:_8,$id:w8,title:x8,definitions:b8,type:S8,properties:k8,default:!0};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const e=u5,r=h8,i=v8,s=C8,a=["/properties"],o="http://json-schema.org/draft-07/schema";class h extends e.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(p,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}n.exports=t=h,Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var l=js;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Zt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=Yh;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var d=Qh;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})($h,$h.exports);var ag=$h.exports;const og=pn(ag),T8=Pt({__proto__:null,default:og},[ag]);var Bc={exports:{}};const P8=Et(T8);(function(n,t){Object.defineProperty(t,"__esModule",{value:!0});const e=P8,r=Zt,i=Ns,s=js,a=Rs,o=kr,h="errorMessage",l=new e.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,d=/\$\{([^}]+)\}/g,u=/^""\s*\+\s*|\s*\+\s*""$/g;function p(_){return{keyword:h,schemaType:["string","object"],post:!0,code(S){const{gen:x,data:m,schema:k,schemaValue:F,it:P}=S;if(P.createErrors===!1)return;const N=k,R=r.strConcat(o.default.instancePath,P.errorPath);x.if(e._`${o.default.errors} > 0`,()=>{if(typeof N=="object"){const[T,C]=U(N);C&&B(C),T&&K(T),tt(L(N))}const E=typeof N=="string"?N:N._;E&&W(E),_.keepErrors||lt()});function L({properties:E,items:T}){const C={};if(E){C.props={};for(const D in E)C.props[D]=[]}if(T){C.items={};for(let D=0;D<T.length;D++)C.items[D]=[]}return C}function U(E){let T,C;for(const D in E){if(D==="properties"||D==="items")continue;const G=E[D];if(typeof G=="object"){T||(T={});const M=T[D]={};for(const V in G)M[V]=[]}else C||(C={}),C[D]=[]}return[T,C]}function B(E){const T=x.const("emErrors",e.stringify(E)),C=x.const("templates",it(E,k));x.forOf("err",o.default.vErrors,V=>x.if(wt(V,T),()=>x.code(e._`${T}[${V}.keyword].push(${V})`).assign(e._`${V}.${l}`,!0)));const{singleError:D}=_;if(D){const V=x.let("message",e._`""`),q=x.let("paramsErrors",e._`[]`);G(Z=>{x.if(V,()=>x.code(e._`${V} += ${typeof D=="string"?D:";"}`)),x.code(e._`${V} += ${M(Z)}`),x.assign(q,e._`${q}.concat(${T}[${Z}])`)}),a.reportError(S,{message:V,params:e._`{errors: ${q}}`})}else G(V=>a.reportError(S,{message:M(V),params:e._`{errors: ${T}[${V}]}`}));function G(V){x.forIn("key",T,q=>x.if(e._`${T}[${q}].length`,()=>V(q)))}function M(V){return e._`${V} in ${C} ? ${C}[${V}]() : ${F}[${V}]`}}function K(E){const T=x.const("emErrors",e.stringify(E)),C=[];for(const q in E)C.push([q,it(E[q],k[q])]);const D=x.const("templates",x.object(...C)),G=x.scopeValue("obj",{ref:c,code:e.stringify(c)}),M=x.let("emPropParams"),V=x.let("emParamsErrors");x.forOf("err",o.default.vErrors,q=>x.if(wt(q,T),()=>{x.assign(M,e._`${G}[${q}.keyword]`),x.assign(V,e._`${T}[${q}.keyword][${q}.params[${M}]]`),x.if(V,()=>x.code(e._`${V}.push(${q})`).assign(e._`${q}.${l}`,!0))})),x.forIn("key",T,q=>x.forIn("keyProp",e._`${T}[${q}]`,Z=>{x.assign(V,e._`${T}[${q}][${Z}]`),x.if(e._`${V}.length`,()=>{const nt=x.const("tmpl",e._`${D}[${q}] && ${D}[${q}][${Z}]`);a.reportError(S,{message:e._`${nt} ? ${nt}() : ${F}[${q}][${Z}]`,params:e._`{errors: ${V}}`})})}))}function tt(E){const{props:T,items:C}=E;if(!T&&!C)return;const D=e._`typeof ${m} == "object"`,G=e._`Array.isArray(${m})`,M=x.let("emErrors");let V,q;const Z=x.let("templates");T&&C?(V=x.let("emChildKwd"),x.if(D),x.if(G,()=>{nt(C,k.items),x.assign(V,e.str`items`)},()=>{nt(T,k.properties),x.assign(V,e.str`properties`)}),q=e._`[${V}]`):C?(x.if(G),nt(C,k.items),q=e._`.items`):T&&(x.if(r.and(D,r.not(G))),nt(T,k.properties),q=e._`.properties`),x.forOf("err",o.default.vErrors,pt=>bt(pt,M,kt=>x.code(e._`${M}[${kt}].push(${pt})`).assign(e._`${pt}.${l}`,!0))),x.forIn("key",M,pt=>x.if(e._`${M}[${pt}].length`,()=>{a.reportError(S,{message:e._`${pt} in ${Z} ? ${Z}[${pt}]() : ${F}${q}[${pt}]`,params:e._`{errors: ${M}[${pt}]}`}),x.assign(e._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,e._`${R} + "/" + ${pt}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),x.endIf();function nt(pt,kt){x.assign(M,e.stringify(pt)),x.assign(Z,it(pt,kt))}}function W(E){const T=x.const("emErrs",e._`[]`);x.forOf("err",o.default.vErrors,C=>x.if(xt(C),()=>x.code(e._`${T}.push(${C})`).assign(e._`${C}.${l}`,!0))),x.if(e._`${T}.length`,()=>a.reportError(S,{message:Y(E),params:e._`{errors: ${T}}`}))}function lt(){const E=x.const("emErrs",e._`[]`);x.forOf("err",o.default.vErrors,T=>x.if(e._`!${T}.${l}`,()=>x.code(e._`${E}.push(${T})`))),x.assign(o.default.vErrors,E).assign(o.default.errors,e._`${E}.length`)}function wt(E,T){return r.and(e._`${E}.keyword !== ${h}`,e._`!${E}.${l}`,e._`${E}.instancePath === ${R}`,e._`${E}.keyword in ${T}`,e._`${E}.schemaPath.indexOf(${P.errSchemaPath}) === 0`,e._`/^\\/[^\\/]*$/.test(${E}.schemaPath.slice(${P.errSchemaPath.length}))`)}function bt(E,T,C){x.if(r.and(e._`${E}.keyword !== ${h}`,e._`!${E}.${l}`,e._`${E}.instancePath.indexOf(${R}) === 0`),()=>{const D=x.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:e._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),G=x.const("emMatches",e._`${D}.exec(${E}.instancePath.slice(${R}.length))`),M=x.const("emChild",e._`${G} && ${G}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);x.if(e._`${M} !== undefined && ${M} in ${T}`,()=>C(M))})}function xt(E){return r.and(e._`${E}.keyword !== ${h}`,e._`!${E}.${l}`,r.or(e._`${E}.instancePath === ${R}`,r.and(e._`${E}.instancePath.indexOf(${R}) === 0`,e._`${E}.instancePath[${R}.length] === "/"`)),e._`${E}.schemaPath.indexOf(${P.errSchemaPath}) === 0`,e._`${E}.schemaPath[${P.errSchemaPath}.length] === "/"`)}function it(E,T){const C=[];for(const D in E){const G=T[D];f.test(G)&&C.push([D,O(G)])}return x.object(...C)}function Y(E){return f.test(E)?new i._Code(i.safeStringify(E).replace(d,(T,C)=>`" + JSON.stringify(${s.getData(C,P)}) + "`).replace(u,"")):e.stringify(E)}function O(E){return e._`function(){return ${Y(E)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const v=(_,S={})=>{if(!_.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(_.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return _.addKeyword(p(S))};t.default=v,n.exports=v,n.exports.default=v})(Bc,Bc.exports);var E8=Bc.exports;const A8=pn(E8),O8=new og({allErrors:!0});A8(O8);const lg=(n,t="image/svg+xml",e="utf-8")=>new Blob([n],{type:`${t};charset=${e}`}),$8=n=>new XMLSerializer().serializeToString(n),F8=(n,t="image/svg+xml",e="utf-8")=>lg($8(n),t,e),hg=(n,t)=>{const e=document.createElement("a");e.style.visibility="hidden",document.body.appendChild(e),e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href)};function cg(){return document.compatMode=="BackCompat"?document.body:document.documentElement}function ug(){const n=cg();return{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight}}function N8(){const n=cg();return{clientTop:n.clientTop,clientLeft:n.clientLeft,clientWidth:n.clientWidth,clientHeight:n.clientHeight}}function R8(){const{clientWidth:n,clientHeight:t}=N8();return{width:window.innerWidth||n,height:window.innerHeight||t}}function D8(n){const{top:t,left:e}=n.getBoundingClientRect(),r=ug();return{x:e+r.scrollLeft,y:t+r.scrollTop}}function M8(n){if(n.pageX&&n.pageY)return{x:n.pageX,y:n.pageY};const t=ug();return{x:n.clientX+t.scrollLeft,y:n.clientY+t.scrollTop}}function dg(n,t){const e=M8(t),r=D8(n);return{x:e.x-r.x,y:e.y-r.y}}function I8(){const n=window.navigator.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const r=n.indexOf("rv:");return parseInt(n.substring(r+3,n.indexOf(".",r)),10)}const e=n.indexOf("Edge/");return e>0?parseInt(n.substring(e+5,n.indexOf(".",e)),10):-1}I8();class rn{static onDocumentReady(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}static getCSSVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}static setCSSVar(t,e){document.documentElement.style.setProperty(t,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){
|
|
25
|
+
let output = "";
|
|
26
|
+
function echo(html){
|
|
27
|
+
output += html;
|
|
28
|
+
}
|
|
29
|
+
${t}
|
|
30
|
+
return output;
|
|
31
|
+
})`}static safeHtml(t,e="encode"){const r={"&":"&","<":"<",">":">",""":'"',"'":"'"};for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t=t.replace(new RegExp(e=="decode"?i:r[i],"g"),e=="decode"?r[i]:i));return t}static loadScript(t){const e=document.createElement("script");e.type="text/javascript",e.src=t,e.async=!1,document.body.appendChild(e),e.onload=()=>{},e.onerror=()=>{}}static loadStyle(t){const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.insertBefore(e,document.head.childNodes[document.head.childNodes.length-1].nextSibling)}static lazyloadImages(){const t=document.getElementsByTagName("img"),e=R8().height;let r=0;return()=>{for(let i=r;i<t.length;i++)t[i].getBoundingClientRect().top<e&&(t[i].src=t[i].getAttribute("data-src")??"",r=i+1)}}static iframePostMessage(t,e="http://test.com/localstorage.html"){const r=document.createElement("iframe");r.src=e,document.body.append(r),setTimeout(function(){var i;(i=r.contentWindow)==null||i.postMessage(t,e)},4e3),setTimeout(function(){r.remove()},6e3)}static getLocation(){return new Promise((t,e)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(r=>{t(r.coords)}):e("Geolocation is not supported by this browser")})}static vibrate(t=200){"vibrate"in navigator?window.navigator.vibrate(t):console.error("Your device is not support vibrate on this browser.")}}Tt(rn,"dom",new Proxy({},{get(t,e){return function(r={},...i){const s=document.createElement(e);for(const a of Object.keys(r))s.setAttribute(a,r[a]);for(const a of i)typeof a=="string"?s.appendChild(document.createTextNode(a)):s.appendChild(a);return s}}})),Tt(rn,"waitForStyleSheetsLoaded",()=>new Promise(t=>{const e=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let r=document.styleSheets.length??0;const i=()=>r>=e.length?(t(),!0):!1;i()||e.forEach(s=>{s.onload=()=>{r+=1,i()}})})),Tt(rn,"getTextWidth",(t,e,r=400)=>{const i=document.createElement("span");i.style.visibility="hidden",i.style.padding="0",i.style.whiteSpace="nowrap",i.style.overflow="visible",i.style.fontSize=e>12?e+"px":"12px",i.style.fontWeight=r.toString(),i.innerText=t,document.body.appendChild(i);const s=i.offsetWidth;return document.body.removeChild(i),s}),Tt(rn,"getFixedWidthText",(t,e,r=12,i=400,s=!0)=>{let a="",o="",h="";if(!t||e<r||typeof t!="string")return a;const l=t.split(""),c=document.createElement("span");c.style.visibility="hidden",c.style.padding="0",c.style.whiteSpace="nowrap",c.style.overflow="visible",c.style.fontSize=r>12?r+"px":"12px",c.style.fontWeight=i.toString(),document.body.appendChild(c);for(let f=0,d=l.length;f<d;f++){const u=l[f];if(o=h,h+=u,a=h,c.innerText=h,c.offsetWidth>e){s?a=o+"...":a=o;break}}return document.body.removeChild(c),a}),Tt(rn,"copyToClipboard",t=>navigator.clipboard.writeText(t)),Tt(rn,"getSelectedText",()=>{var t;return(t=window.getSelection())==null?void 0:t.toString()}),Tt(rn,"siblings",t=>{var e;return Array.prototype.slice.call((e=t.parentNode)==null?void 0:e.children).filter(r=>r!==t)}),Tt(rn,"isElementFocus",t=>t===document.activeElement),Tt(rn,"isTabInView",()=>!document.hidden),Tt(rn,"navigateBack",()=>history.back()),Tt(rn,"navigateBack2",()=>history.go(-1));function Hc(n){return n%360*Math.PI/180}function j8(n){return n*180/Math.PI%360}function L8(n,t,e,r){const i=n-e,s=t-r;return Math.sqrt(i*i+s*s)}function U8(n,t,e,r){const i=e-n,s=r-t;return Math.atan2(s,i)}function qc(n){return n[0]*n[0]+n[1]*n[1]}function fg(n){const t=Math.sqrt(qc(n));n[0]&&(n[0]/=t),n[1]&&(n[1]/=t)}class Ks{constructor(t){Tt(this,"x");Tt(this,"y");Tt(this,"vx");Tt(this,"vy");Tt(this,"ax");Tt(this,"ay");Tt(this,"mass");this.x=t.x,this.y=t.y,this.vx=(t==null?void 0:t.vx)||0,this.vy=(t==null?void 0:t.vy)||0,this.ax=(t==null?void 0:t.ax)||0,this.ay=(t==null?void 0:t.ay)||0,this.mass=(t==null?void 0:t.mass)||0}fromAngleAndLength(t,e){return new Ks({x:Math.cos(t)*e,y:Math.sin(t)*e})}distanceTo(t){return L8(this.x,this.y,t.x,t.y)}angleTo(t){return U8(this.x,this.y,t.x,t.y)}followTo(t,e=3){const r=this.angleTo(t),{x:i,y:s}=this.fromAngleAndLength(r,e);this.vx=i,this.vy=s,this.nextFrame()}followAccelerationTo(t,e=.05){const r=this.angleTo(t),{x:i,y:s}=this.fromAngleAndLength(r,e);this.ax=i,this.ay=s,this.nextFrame()}nextFrame(t){const e=(t==null?void 0:t.gravity)??0,r=(t==null?void 0:t.friction)??0;if(this.vx+=this.ax,this.vy+=this.ay,this.vy+=e,r>0){const i=Math.atan2(this.vy,this.vx);let s=Math.sqrt(this.vx*this.vx+this.vy*this.vy);s>r?s-=r:s=0,this.vx=Math.cos(i)*s,this.vy=Math.sin(i)*s}this.x+=this.vx,this.y+=this.vy}nextFrameEaseTo(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??1,s=(e==null?void 0:e.easing)??.05,a=t.x-this.x,o=t.y-this.y;this.vx=a*s,this.vy=o*s,this.vy+=r,this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}nextFrameSpringTo(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??.95,s=(e==null?void 0:e.spring)??.03;(Array.isArray(t)?t:[t]).forEach(a=>{const o=a.x-this.x,h=a.y-this.y,l=o*s,c=h*s;this.vx+=l,this.vy+=c}),this.vy+=r,this.vx*=i,this.vy*=i,this.x+=this.vx,this.y+=this.vy}nextFrameSpringConnect(t,e){const r=(e==null?void 0:e.gravity)??0,i=(e==null?void 0:e.friction)??.95,s=(e==null?void 0:e.spring)??.03,a=(e==null?void 0:e.springLength)??100,o=this.angleTo(t);this.nextFrameSpringTo(new Ks({x:t.x-Math.cos(o)*a,y:t.y-Math.sin(o)*a}),{spring:s,friction:i,gravity:r})}}let G8=class extends Ks{constructor(t){super(t);Tt(this,"width");Tt(this,"height");this.width=t.width,this.height=t.height}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}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)}toArray(){return[this.x,this.y,this.width,this.height]}clone(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}};class bi extends Ks{constructor(e){super(e);Tt(this,"radius");this.radius=(e==null?void 0:e.radius)??0}toSVGPathData(){return[this.x,this.y]}toSVGPathD(){return`${this.x},${this.y}`}setX(e){this.x=e}setY(e){this.y=e}setXY(e,r){this.x=e,this.y=r}eq(e){return this.x===e.x&&this.y===e.y}midPointBtw(e){return new bi({x:this.x+(e.x-this.x)/2,y:this.y+(e.y-this.y)/2})}toArray(){return[this.x,this.y]}clone(e){this.setXY(e.x,e.y)}getBounds(){return new G8({x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2})}nextFrameCollisionTo(e){const r=e.x-this.x,i=e.y-this.y;if(Math.sqrt(r*r+i*i)<this.radius+e.radius){const a=Math.atan2(i,r),o=Math.sin(a),h=Math.cos(a),l={x:0,y:0},c=s(r,i,o,h,!0),f=s(this.vx,this.vy,o,h,!0),d=s(e.vx,e.vy,o,h,!0),u=f.x-d.x;f.x=((this.mass-e.mass)*f.x+2*e.mass*d.x)/(this.mass+e.mass),d.x=u+f.x;const p=Math.abs(f.x)+Math.abs(d.x),v=this.radius+e.radius-Math.abs(l.x-c.x);l.x+=f.x/p*v,c.x+=d.x/p*v;const _=s(l.x,l.y,o,h,!1),S=s(c.x,c.y,o,h,!1);e.x=this.x+S.x,e.y=this.y+S.y,this.x=this.x+_.x,this.y=this.y+_.y;const x=s(f.x,f.y,o,h,!1),m=s(d.x,d.y,o,h,!1);this.vx=x.x,this.vy=x.y,e.vx=m.x,e.vy=m.y}function s(a,o,h,l,c=!1){return{x:c?a*l+o*h:a*l-o*h,y:c?o*l-a*h:o*l+a*h}}}nextFrameBounce(e){const r=e.left,i=e.top,s=e.right,a=e.bottom,o=(e==null?void 0:e.bounce)??-1;this.x+this.radius>s?(this.x=s-this.radius,this.vx*=o):this.x-this.radius<r&&(this.x=r+this.radius,this.vx*=o),this.y+this.radius>a?(this.y=a-this.radius,this.vy*=o):this.y-this.radius<i&&(this.y=i+this.radius,this.vy*=o)}}var Kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Dt(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var z8={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
32
|
+
* http://hammerjs.github.io/
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
35
|
+
* Licensed under the MIT license */(function(n){(function(t,e,r,i){var s=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),o="function",h=Math.round,l=Math.abs,c=Date.now;function f(g,w,$){return setTimeout(m(g,$),w)}function d(g,w,$){return Array.isArray(g)?(u(g,$[w],$),!0):!1}function u(g,w,$){var I;if(g)if(g.forEach)g.forEach(w,$);else if(g.length!==i)for(I=0;I<g.length;)w.call($,g[I],I,g),I++;else for(I in g)g.hasOwnProperty(I)&&w.call($,g[I],I,g)}function p(g,w,$){var I="DEPRECATED METHOD: "+w+`
|
|
36
|
+
`+$+` AT
|
|
37
|
+
`;return function(){var j=new Error("get-stack-trace"),z=j&&j.stack?j.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",X=t.console&&(t.console.warn||t.console.log);return X&&X.call(t.console,I,z),g.apply(this,arguments)}}var v;typeof Object.assign!="function"?v=function(g){if(g===i||g===null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(g),$=1;$<arguments.length;$++){var I=arguments[$];if(I!==i&&I!==null)for(var j in I)I.hasOwnProperty(j)&&(w[j]=I[j])}return w}:v=Object.assign;var _=p(function(g,w,$){for(var I=Object.keys(w),j=0;j<I.length;)(!$||$&&g[I[j]]===i)&&(g[I[j]]=w[I[j]]),j++;return g},"extend","Use `assign`."),S=p(function(g,w){return _(g,w,!0)},"merge","Use `assign`.");function x(g,w,$){var I=w.prototype,j;j=g.prototype=Object.create(I),j.constructor=g,j._super=I,$&&v(j,$)}function m(g,w){return function(){return g.apply(w,arguments)}}function k(g,w){return typeof g==o?g.apply(w&&w[0]||i,w):g}function F(g,w){return g===i?w:g}function P(g,w,$){u(U(w),function(I){g.addEventListener(I,$,!1)})}function N(g,w,$){u(U(w),function(I){g.removeEventListener(I,$,!1)})}function R(g,w){for(;g;){if(g==w)return!0;g=g.parentNode}return!1}function L(g,w){return g.indexOf(w)>-1}function U(g){return g.trim().split(/\s+/g)}function B(g,w,$){if(g.indexOf&&!$)return g.indexOf(w);for(var I=0;I<g.length;){if($&&g[I][$]==w||!$&&g[I]===w)return I;I++}return-1}function K(g){return Array.prototype.slice.call(g,0)}function tt(g,w,$){for(var I=[],j=[],z=0;z<g.length;){var X=g[z][w];B(j,X)<0&&I.push(g[z]),j[z]=X,z++}return I=I.sort(function(et,ct){return et[w]>ct[w]}),I}function W(g,w){for(var $,I,j=w[0].toUpperCase()+w.slice(1),z=0;z<s.length;){if($=s[z],I=$?$+j:w,I in g)return I;z++}return i}var lt=1;function wt(){return lt++}function bt(g){var w=g.ownerDocument||g;return w.defaultView||w.parentWindow||t}var xt=/mobile|tablet|ip(ad|hone|od)|android/i,it="ontouchstart"in t,Y=W(t,"PointerEvent")!==i,O=it&&xt.test(navigator.userAgent),E="touch",T="pen",C="mouse",D="kinect",G=25,M=1,V=2,q=4,Z=8,nt=1,pt=2,kt=4,Ft=8,St=16,At=pt|kt,jt=Ft|St,zt=At|jt,Ot=["x","y"],le=["clientX","clientY"];function Jt(g,w){var $=this;this.manager=g,this.callback=w,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(I){k(g.options.enable,[g])&&$.handler(I)},this.init()}Jt.prototype={handler:function(){},init:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(bt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&N(this.element,this.evEl,this.domHandler),this.evTarget&&N(this.target,this.evTarget,this.domHandler),this.evWin&&N(bt(this.element),this.evWin,this.domHandler)}};function ue(g){var w,$=g.options.inputClass;return $?w=$:Y?w=_n:O?w=Ln:it?w=J:w=$n,new w(g,Bt)}function Bt(g,w,$){var I=$.pointers.length,j=$.changedPointers.length,z=w&M&&I-j===0,X=w&(q|Z)&&I-j===0;$.isFirst=!!z,$.isFinal=!!X,z&&(g.session={}),$.eventType=w,Fe(g,$),g.emit("hammer.input",$),g.recognize($),g.session.prevInput=$}function Fe(g,w){var $=g.session,I=w.pointers,j=I.length;$.firstInput||($.firstInput=vn(w)),j>1&&!$.firstMultiple?$.firstMultiple=vn(w):j===1&&($.firstMultiple=!1);var z=$.firstInput,X=$.firstMultiple,et=X?X.center:z.center,ct=w.center=an(I);w.timeStamp=c(),w.deltaTime=w.timeStamp-z.timeStamp,w.angle=On(et,ct),w.distance=An(et,ct),Pe($,w),w.offsetDirection=en(w.deltaX,w.deltaY);var st=Ne(w.deltaTime,w.deltaX,w.deltaY);w.overallVelocityX=st.x,w.overallVelocityY=st.y,w.overallVelocity=l(st.x)>l(st.y)?st.x:st.y,w.scale=X?je(X.pointers,I):1,w.rotation=X?In(X.pointers,I):0,w.maxPointers=$.prevInput?w.pointers.length>$.prevInput.maxPointers?w.pointers.length:$.prevInput.maxPointers:w.pointers.length,Je($,w);var rt=g.element;R(w.srcEvent.target,rt)&&(rt=w.srcEvent.target),w.target=rt}function Pe(g,w){var $=w.center,I=g.offsetDelta||{},j=g.prevDelta||{},z=g.prevInput||{};(w.eventType===M||z.eventType===q)&&(j=g.prevDelta={x:z.deltaX||0,y:z.deltaY||0},I=g.offsetDelta={x:$.x,y:$.y}),w.deltaX=j.x+($.x-I.x),w.deltaY=j.y+($.y-I.y)}function Je(g,w){var $=g.lastInterval||w,I=w.timeStamp-$.timeStamp,j,z,X,et;if(w.eventType!=Z&&(I>G||$.velocity===i)){var ct=w.deltaX-$.deltaX,st=w.deltaY-$.deltaY,rt=Ne(I,ct,st);z=rt.x,X=rt.y,j=l(rt.x)>l(rt.y)?rt.x:rt.y,et=en(ct,st),g.lastInterval=w}else j=$.velocity,z=$.velocityX,X=$.velocityY,et=$.direction;w.velocity=j,w.velocityX=z,w.velocityY=X,w.direction=et}function vn(g){for(var w=[],$=0;$<g.pointers.length;)w[$]={clientX:h(g.pointers[$].clientX),clientY:h(g.pointers[$].clientY)},$++;return{timeStamp:c(),pointers:w,center:an(w),deltaX:g.deltaX,deltaY:g.deltaY}}function an(g){var w=g.length;if(w===1)return{x:h(g[0].clientX),y:h(g[0].clientY)};for(var $=0,I=0,j=0;j<w;)$+=g[j].clientX,I+=g[j].clientY,j++;return{x:h($/w),y:h(I/w)}}function Ne(g,w,$){return{x:w/g||0,y:$/g||0}}function en(g,w){return g===w?nt:l(g)>=l(w)?g<0?pt:kt:w<0?Ft:St}function An(g,w,$){$||($=Ot);var I=w[$[0]]-g[$[0]],j=w[$[1]]-g[$[1]];return Math.sqrt(I*I+j*j)}function On(g,w,$){$||($=Ot);var I=w[$[0]]-g[$[0]],j=w[$[1]]-g[$[1]];return Math.atan2(j,I)*180/Math.PI}function In(g,w){return On(w[1],w[0],le)+On(g[1],g[0],le)}function je(g,w){return An(w[0],w[1],le)/An(g[0],g[1],le)}var jn={mousedown:M,mousemove:V,mouseup:q},Qn="mousedown",ke="mousemove mouseup";function $n(){this.evEl=Qn,this.evWin=ke,this.pressed=!1,Jt.apply(this,arguments)}x($n,Jt,{handler:function(g){var w=jn[g.type];w&M&&g.button===0&&(this.pressed=!0),w&V&&g.which!==1&&(w=q),this.pressed&&(w&q&&(this.pressed=!1),this.callback(this.manager,w,{pointers:[g],changedPointers:[g],pointerType:C,srcEvent:g}))}});var fn={pointerdown:M,pointermove:V,pointerup:q,pointercancel:Z,pointerout:Z},Lr={2:E,3:T,4:C,5:D},Zn="pointerdown",yr="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Zn="MSPointerDown",yr="MSPointerMove MSPointerUp MSPointerCancel");function _n(){this.evEl=Zn,this.evWin=yr,Jt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}x(_n,Jt,{handler:function(g){var w=this.store,$=!1,I=g.type.toLowerCase().replace("ms",""),j=fn[I],z=Lr[g.pointerType]||g.pointerType,X=z==E,et=B(w,g.pointerId,"pointerId");j&M&&(g.button===0||X)?et<0&&(w.push(g),et=w.length-1):j&(q|Z)&&($=!0),!(et<0)&&(w[et]=g,this.callback(this.manager,j,{pointers:w,changedPointers:[g],pointerType:z,srcEvent:g}),$&&w.splice(et,1))}});var Ee={touchstart:M,touchmove:V,touchend:q,touchcancel:Z},vs="touchstart",Wn="touchstart touchmove touchend touchcancel";function tr(){this.evTarget=vs,this.evWin=Wn,this.started=!1,Jt.apply(this,arguments)}x(tr,Jt,{handler:function(g){var w=Ee[g.type];if(w===M&&(this.started=!0),!!this.started){var $=wn.call(this,g,w);w&(q|Z)&&$[0].length-$[1].length===0&&(this.started=!1),this.callback(this.manager,w,{pointers:$[0],changedPointers:$[1],pointerType:E,srcEvent:g})}}});function wn(g,w){var $=K(g.touches),I=K(g.changedTouches);return w&(q|Z)&&($=tt($.concat(I),"identifier")),[$,I]}var Ur={touchstart:M,touchmove:V,touchend:q,touchcancel:Z},er="touchstart touchmove touchend touchcancel";function Ln(){this.evTarget=er,this.targetIds={},Jt.apply(this,arguments)}x(Ln,Jt,{handler:function(g){var w=Ur[g.type],$=Gr.call(this,g,w);$&&this.callback(this.manager,w,{pointers:$[0],changedPointers:$[1],pointerType:E,srcEvent:g})}});function Gr(g,w){var $=K(g.touches),I=this.targetIds;if(w&(M|V)&&$.length===1)return I[$[0].identifier]=!0,[$,$];var j,z,X=K(g.changedTouches),et=[],ct=this.target;if(z=$.filter(function(st){return R(st.target,ct)}),w===M)for(j=0;j<z.length;)I[z[j].identifier]=!0,j++;for(j=0;j<X.length;)I[X[j].identifier]&&et.push(X[j]),w&(q|Z)&&delete I[X[j].identifier],j++;if(et.length)return[tt(z.concat(et),"identifier"),et]}var zr=2500,H=25;function J(){Jt.apply(this,arguments);var g=m(this.handler,this);this.touch=new Ln(this.manager,g),this.mouse=new $n(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}x(J,Jt,{handler:function(g,w,$){var I=$.pointerType==E,j=$.pointerType==C;if(!(j&&$.sourceCapabilities&&$.sourceCapabilities.firesTouchEvents)){if(I)Q.call(this,w,$);else if(j&&ot.call(this,$))return;this.callback(g,w,$)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Q(g,w){g&M?(this.primaryTouch=w.changedPointers[0].identifier,at.call(this,w)):g&(q|Z)&&at.call(this,w)}function at(g){var w=g.changedPointers[0];if(w.identifier===this.primaryTouch){var $={x:w.clientX,y:w.clientY};this.lastTouches.push($);var I=this.lastTouches,j=function(){var z=I.indexOf($);z>-1&&I.splice(z,1)};setTimeout(j,zr)}}function ot(g){for(var w=g.srcEvent.clientX,$=g.srcEvent.clientY,I=0;I<this.lastTouches.length;I++){var j=this.lastTouches[I],z=Math.abs(w-j.x),X=Math.abs($-j.y);if(z<=H&&X<=H)return!0}return!1}var Mt=W(a.style,"touchAction"),Nt=Mt!==i,re="compute",Ce="auto",he="manipulation",Yt="none",Qt="pan-x",fe="pan-y",Ut=Le();function It(g,w){this.manager=g,this.set(w)}It.prototype={set:function(g){g==re&&(g=this.compute()),Nt&&this.manager.element.style&&Ut[g]&&(this.manager.element.style[Mt]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return u(this.manager.recognizers,function(w){k(w.options.enable,[w])&&(g=g.concat(w.getTouchAction()))}),pe(g.join(" "))},preventDefaults:function(g){var w=g.srcEvent,$=g.offsetDirection;if(this.manager.session.prevented){w.preventDefault();return}var I=this.actions,j=L(I,Yt)&&!Ut[Yt],z=L(I,fe)&&!Ut[fe],X=L(I,Qt)&&!Ut[Qt];if(j){var et=g.pointers.length===1,ct=g.distance<2,st=g.deltaTime<250;if(et&&ct&&st)return}if(!(X&&z)&&(j||z&&$&At||X&&$&jt))return this.preventSrc(w)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function pe(g){if(L(g,Yt))return Yt;var w=L(g,Qt),$=L(g,fe);return w&&$?Yt:w||$?w?Qt:fe:L(g,he)?he:Ce}function Le(){if(!Nt)return!1;var g={},w=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function($){g[$]=w?t.CSS.supports("touch-action",$):!0}),g}var xn=1,_e=2,Ue=4,He=8,Ge=He,Re=16,ae=32;function Lt(g){this.options=v({},this.defaults,g||{}),this.id=wt(),this.manager=null,this.options.enable=F(this.options.enable,!0),this.state=xn,this.simultaneous={},this.requireFail=[]}Lt.prototype={defaults:{},set:function(g){return v(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(d(g,"recognizeWith",this))return this;var w=this.simultaneous;return g=rr(g,this),w[g.id]||(w[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return d(g,"dropRecognizeWith",this)?this:(g=rr(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(d(g,"requireFailure",this))return this;var w=this.requireFail;return g=rr(g,this),B(w,g)===-1&&(w.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(d(g,"dropRequireFailure",this))return this;g=rr(g,this);var w=B(this.requireFail,g);return w>-1&&this.requireFail.splice(w,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var w=this,$=this.state;function I(j){w.manager.emit(j,g)}$<He&&I(w.options.event+on($)),I(w.options.event),g.additionalEvent&&I(g.additionalEvent),$>=He&&I(w.options.event+on($))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=ae},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(ae|xn)))return!1;g++}return!0},recognize:function(g){var w=v({},g);if(!k(this.options.enable,[this,w])){this.reset(),this.state=ae;return}this.state&(Ge|Re|ae)&&(this.state=xn),this.state=this.process(w),this.state&(_e|Ue|He|Re)&&this.tryEmit(w)},process:function(g){},getTouchAction:function(){},reset:function(){}};function on(g){return g&Re?"cancel":g&He?"end":g&Ue?"move":g&_e?"start":""}function nr(g){return g==St?"down":g==Ft?"up":g==pt?"left":g==kt?"right":""}function rr(g,w){var $=w.manager;return $?$.get(g):g}function Qe(){Lt.apply(this,arguments)}x(Qe,Lt,{defaults:{pointers:1},attrTest:function(g){var w=this.options.pointers;return w===0||g.pointers.length===w},process:function(g){var w=this.state,$=g.eventType,I=w&(_e|Ue),j=this.attrTest(g);return I&&($&Z||!j)?w|Re:I||j?$&q?w|He:w&_e?w|Ue:_e:ae}});function qe(){Qe.apply(this,arguments),this.pX=null,this.pY=null}x(qe,Qe,{defaults:{event:"pan",threshold:10,pointers:1,direction:zt},getTouchAction:function(){var g=this.options.direction,w=[];return g&At&&w.push(fe),g&jt&&w.push(Qt),w},directionTest:function(g){var w=this.options,$=!0,I=g.distance,j=g.direction,z=g.deltaX,X=g.deltaY;return j&w.direction||(w.direction&At?(j=z===0?nt:z<0?pt:kt,$=z!=this.pX,I=Math.abs(g.deltaX)):(j=X===0?nt:X<0?Ft:St,$=X!=this.pY,I=Math.abs(g.deltaY))),g.direction=j,$&&I>w.threshold&&j&w.direction},attrTest:function(g){return Qe.prototype.attrTest.call(this,g)&&(this.state&_e||!(this.state&_e)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var w=nr(g.direction);w&&(g.additionalEvent=this.options.event+w),this._super.emit.call(this,g)}});function bn(){Qe.apply(this,arguments)}x(bn,Qe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Yt]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&_e)},emit:function(g){if(g.scale!==1){var w=g.scale<1?"in":"out";g.additionalEvent=this.options.event+w}this._super.emit.call(this,g)}});function Vr(){Lt.apply(this,arguments),this._timer=null,this._input=null}x(Vr,Lt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ce]},process:function(g){var w=this.options,$=g.pointers.length===w.pointers,I=g.distance<w.threshold,j=g.deltaTime>w.time;if(this._input=g,!I||!$||g.eventType&(q|Z)&&!j)this.reset();else if(g.eventType&M)this.reset(),this._timer=f(function(){this.state=Ge,this.tryEmit()},w.time,this);else if(g.eventType&q)return Ge;return ae},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===Ge&&(g&&g.eventType&q?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}});function Br(){Qe.apply(this,arguments)}x(Br,Qe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Yt]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&_e)}});function Un(){Qe.apply(this,arguments)}x(Un,Qe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:At|jt,pointers:1},getTouchAction:function(){return qe.prototype.getTouchAction.call(this)},attrTest:function(g){var w=this.options.direction,$;return w&(At|jt)?$=g.overallVelocity:w&At?$=g.overallVelocityX:w&jt&&($=g.overallVelocityY),this._super.attrTest.call(this,g)&&w&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&l($)>this.options.velocity&&g.eventType&q},emit:function(g){var w=nr(g.offsetDirection);w&&this.manager.emit(this.options.event+w,g),this.manager.emit(this.options.event,g)}});function Gn(){Lt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}x(Gn,Lt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[he]},process:function(g){var w=this.options,$=g.pointers.length===w.pointers,I=g.distance<w.threshold,j=g.deltaTime<w.time;if(this.reset(),g.eventType&M&&this.count===0)return this.failTimeout();if(I&&j&&$){if(g.eventType!=q)return this.failTimeout();var z=this.pTime?g.timeStamp-this.pTime<w.interval:!0,X=!this.pCenter||An(this.pCenter,g.center)<w.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!X||!z?this.count=1:this.count+=1,this._input=g;var et=this.count%w.taps;if(et===0)return this.hasRequireFailures()?(this._timer=f(function(){this.state=Ge,this.tryEmit()},w.interval,this),_e):Ge}return ae},failTimeout:function(){return this._timer=f(function(){this.state=ae},this.options.interval,this),ae},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Ge&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ir(g,w){return w=w||{},w.recognizers=F(w.recognizers,ir.defaults.preset),new Bi(g,w)}ir.VERSION="2.0.7",ir.defaults={domEvents:!1,touchAction:re,enable:!0,inputTarget:null,inputClass:null,preset:[[Br,{enable:!1}],[bn,{enable:!1},["rotate"]],[Un,{direction:At}],[qe,{direction:At},["swipe"]],[Gn],[Gn,{event:"doubletap",taps:2},["tap"]],[Vr]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Vi=1,Ke=2;function Bi(g,w){this.options=v({},ir.defaults,w||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=ue(this),this.touchAction=new It(this,this.options.touchAction),y(this,!0),u(this.options.recognizers,function($){var I=this.add(new $[0]($[1]));$[2]&&I.recognizeWith($[2]),$[3]&&I.requireFailure($[3])},this)}Bi.prototype={set:function(g){return v(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?Ke:Vi},recognize:function(g){var w=this.session;if(!w.stopped){this.touchAction.preventDefaults(g);var $,I=this.recognizers,j=w.curRecognizer;(!j||j&&j.state&Ge)&&(j=w.curRecognizer=null);for(var z=0;z<I.length;)$=I[z],w.stopped!==Ke&&(!j||$==j||$.canRecognizeWith(j))?$.recognize(g):$.reset(),!j&&$.state&(_e|Ue|He)&&(j=w.curRecognizer=$),z++}},get:function(g){if(g instanceof Lt)return g;for(var w=this.recognizers,$=0;$<w.length;$++)if(w[$].options.event==g)return w[$];return null},add:function(g){if(d(g,"add",this))return this;var w=this.get(g.options.event);return w&&this.remove(w),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(d(g,"remove",this))return this;if(g=this.get(g),g){var w=this.recognizers,$=B(w,g);$!==-1&&(w.splice($,1),this.touchAction.update())}return this},on:function(g,w){if(g!==i&&w!==i){var $=this.handlers;return u(U(g),function(I){$[I]=$[I]||[],$[I].push(w)}),this}},off:function(g,w){if(g!==i){var $=this.handlers;return u(U(g),function(I){w?$[I]&&$[I].splice(B($[I],w),1):delete $[I]}),this}},emit:function(g,w){this.options.domEvents&&b(g,w);var $=this.handlers[g]&&this.handlers[g].slice();if(!(!$||!$.length)){w.type=g,w.preventDefault=function(){w.srcEvent.preventDefault()};for(var I=0;I<$.length;)$[I](w),I++}},destroy:function(){this.element&&y(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function y(g,w){var $=g.element;if($.style){var I;u(g.options.cssProps,function(j,z){I=W($.style,z),w?(g.oldCssProps[I]=$.style[I],$.style[I]=j):$.style[I]=g.oldCssProps[I]||""}),w||(g.oldCssProps={})}}function b(g,w){var $=e.createEvent("Event");$.initEvent(g,!0,!0),$.gesture=w,w.target.dispatchEvent($)}v(ir,{INPUT_START:M,INPUT_MOVE:V,INPUT_END:q,INPUT_CANCEL:Z,STATE_POSSIBLE:xn,STATE_BEGAN:_e,STATE_CHANGED:Ue,STATE_ENDED:He,STATE_RECOGNIZED:Ge,STATE_CANCELLED:Re,STATE_FAILED:ae,DIRECTION_NONE:nt,DIRECTION_LEFT:pt,DIRECTION_RIGHT:kt,DIRECTION_UP:Ft,DIRECTION_DOWN:St,DIRECTION_HORIZONTAL:At,DIRECTION_VERTICAL:jt,DIRECTION_ALL:zt,Manager:Bi,Input:Jt,TouchAction:It,TouchInput:Ln,MouseInput:$n,PointerEventInput:_n,TouchMouseInput:J,SingleTouchInput:tr,Recognizer:Lt,AttrRecognizer:Qe,Tap:Gn,Pan:qe,Swipe:Un,Pinch:bn,Rotate:Br,Press:Vr,on:P,off:N,each:u,merge:S,extend:_,assign:v,inherit:x,bindFn:m,prefixed:W});var A=typeof t<"u"?t:typeof self<"u"?self:{};A.Hammer=ir,n.exports?n.exports=ir:t[r]=ir})(window,document,"Hammer")})(z8);const pg=[1,0,0,1,0,0],gg=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class cn{constructor(t=pg){Tt(this,"value");Tt(this,"matrix3d");Tt(this,"isEverTo3d",!1);Tt(this,"_prev_rotatex",0);Tt(this,"_prev_rotatey",0);this.value=Array.from(t),this.matrix3d=this.toMatrix3D()}unit(){return this.value=Array.from(pg),this.matrix3d=this.toMatrix3D(),this}transformPoint(t,e,r=0,i=0){const s=t-r,a=e-i;return t=s*this.value[0]+a*this.value[2]+this.value[4],e=s*this.value[1]+a*this.value[3]+this.value[5],[t+r,e+i]}fromString(t){const e=sf("number",t);return e.length===6?e.forEach((r,i)=>{r.fullMatch&&(this.value[i]=parseFloat(r.fullMatch))}):this.unit(),this}toMatrix3D(t=this.matrix3d){const e=[this.value[0],this.value[1],0,0,this.value[2],this.value[3],0,0,0,0,1,0,this.value[4],this.value[5],0,1];return t?(t.value=e,t):new Wi(e)}offset(t=0,e=0){return[t-this.value[4],e-this.value[5]]}clone(){return new cn(this.value)}multiply(t){const e=this.value;let r;t instanceof cn?r=t.value:r=t;const i=e[0]*r[0]+e[2]*r[1],s=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],h=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return e[0]=i,e[1]=s,e[2]=a,e[3]=o,e[4]=h,e[5]=l,this}inverse(){const t=new cn(this.value),e=t.value,r=1/(e[0]*e[3]-e[1]*e[2]),i=e[3]*r,s=-e[1]*r,a=-e[2]*r,o=e[0]*r,h=r*(e[2]*e[5]-e[3]*e[4]),l=r*(e[1]*e[4]-e[0]*e[5]);return e[0]=i,e[1]=s,e[2]=a,e[3]=o,e[4]=h,e[5]=l,t}translate(t,e){return this.matrix3d.translate(t,e,0),this.multiply([1,0,0,1,t,e])}translateTo(t,e){const r=this.offset(t,e);return this.translate(r[0],r[1])}translateX(t){return this.translate(t,0)}translateY(t){return this.translate(0,t)}translateZ(t){return this.isEverTo3d=!0,this.matrix3d.translate(0,0,t)}translate3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.translate(t,e,r)}rotate(t,e=0,r=0){const i=Hc(t),s=+Math.cos(i).toFixed(9),a=+Math.sin(i).toFixed(9);return this.multiply([s,a,-a,s,e,r]),this.translate(-e,-r),this}rotateX(t){return this._prev_rotatex=t,this.isEverTo3d=!0,this.matrix3d.rotate("x",t)}rotateXTo(t){return this.rotateX(t-this._prev_rotatex)}rotateY(t){return this._prev_rotatey=t,this.isEverTo3d=!0,this.matrix3d.rotate("y",t)}rotateYTo(t){return this.rotateY(t-this._prev_rotatey)}rotateZ(t){return this.isEverTo3d=!0,this.matrix3d.rotate("z",t)}rotate3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.rotate("x",t).rotate("y",e).rotate("z",r)}scale(t,e=t,r=0,i=0){return this.matrix3d.scale(t,e,1),this.translate(r,i),this.multiply([t,0,0,e,0,0]),this.translate(-r,-i),this}scaleTo(t,e=t){return this.scale(t/this.value[0],e/this.value[3]),this}scaleX(t){return this.scale(t,1)}scaleY(t){return this.scale(1,t)}scaleZ(t){return this.isEverTo3d=!0,this.matrix3d.scale(1,1,t)}scale3d(t,e,r){return this.isEverTo3d=!0,this.matrix3d.scale(t,e,r)}skew(t,e=0){const r=t*Math.PI/180,i=e*Math.PI/180,s=Math.tan(r),a=Math.tan(i);return this.multiply([1,a,s,1,0,0])}skewX(t){return this.skew(t,0)}skewY(t){return this.skew(0,t)}skewZ(t){return this}skew3d(t,e,r){return this}split(){const t={dx:0,dy:0,scalex:1,scaley:1,shear:1,rotate:0,isSimple:!0,isSuperSimple:!0,noRotation:!1};t.dx=this.value[4],t.dy=this.value[5];const e=[[this.value[0],this.value[2]],[this.value[1],this.value[3]]];t.scalex=Math.sqrt(qc(e[0])),fg(e[0]),t.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*t.shear,e[1][1]-e[0][1]*t.shear],t.scaley=Math.sqrt(qc(e[1])),fg(e[1]),t.shear/=t.scaley;const r=-e[0][1],i=e[1][1];return i<0?(t.rotate=j8(Math.acos(i)),r<0&&(t.rotate=360-t.rotate)):t.rotate=Hc(Math.asin(r)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t}toTransformString(){const t=this.split();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx&&t.dy?"t"+[t.dx,t.dy]:"")+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:"")+(t.rotate?"r"+[t.rotate,0,0]:"")):"matrix"+[this.value[0],this.value[1],this.value[2],this.value[3],this.value[4],this.value[5]]}toString(){return this.isEverTo3d?this.toMatrix3DString():`matrix(${this.value.map(t=>of(t,6)).join(",")})`}toMatrix3DString(){return this.matrix3d.toString()}toFilter(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.value[0]+", M12="+this.value[2]+", M21="+this.value[1]+", M22="+this.value[3]+", Dx="+this.value[4]+", Dy="+this.value[5]+", sizingmethod='auto expand')"}}class Wi{constructor(t=gg){Tt(this,"value");this.value=Array.from(t)}unit(){return this.value=Array.from(gg),this}fromString(t){const e=sf("number",t);return e.length===16?e.forEach((r,i)=>{r.fullMatch&&(this.value[i]=parseFloat(r.fullMatch))}):this.unit(),this}toMatrix(t){const e=[this.value[0],this.value[1],this.value[4],this.value[5],this.value[12],this.value[13]];return t?(t.value=e,t):new cn(e)}multiplyMatrix(t){const e=this.value[0],r=this.value[1],i=this.value[2],s=this.value[3],a=this.value[4],o=this.value[5],h=this.value[6],l=this.value[7],c=this.value[8],f=this.value[9],d=this.value[10],u=this.value[11],p=this.value[12],v=this.value[13],_=this.value[14],S=this.value[15],x=t.value[0],m=t.value[1],k=t.value[2],F=t.value[3],P=x*e+m*a+k*c+F*p,N=x*r+m*o+k*f+F*v,R=x*i+m*h+k*d+F*_,L=x*s+m*l+k*u+F*S;return new cn([P,N,R,L,0,0])}multiply(t){const e=new cn([t.value[0],t.value[1],t.value[2],t.value[3],0,0]),r=new cn([t.value[4],t.value[5],t.value[6],t.value[7],0,0]),i=new cn([t.value[8],t.value[9],t.value[10],t.value[11],0,0]),s=new cn([t.value[12],t.value[13],t.value[14],t.value[15],0,0]),a=this.multiplyMatrix(e),o=this.multiplyMatrix(r),h=this.multiplyMatrix(i),l=this.multiplyMatrix(s);return this.value[0]=a.value[0],this.value[1]=a.value[1],this.value[2]=a.value[2],this.value[3]=a.value[3],this.value[4]=o.value[0],this.value[5]=o.value[1],this.value[6]=o.value[2],this.value[7]=o.value[3],this.value[8]=h.value[0],this.value[9]=h.value[1],this.value[10]=h.value[2],this.value[11]=h.value[3],this.value[12]=l.value[0],this.value[13]=l.value[1],this.value[14]=l.value[2],this.value[15]=l.value[3],this}translate(t=0,e=0,r=0){return this.multiply(new Wi([1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1]))}scale(t=1,e=1,r=1){return this.multiply(new Wi([t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1]))}rotate(t,e){const r=Hc(e),i=Math.sin,s=Math.cos;let a;switch(t){case"x":a=[1,0,0,0,0,s(r),i(r),0,0,-i(r),s(r),0,0,0,0,1];break;case"y":a=[s(r),0,-i(r),0,0,1,0,0,i(r),0,s(r),0,0,0,0,1];break;case"z":a=[s(r),i(r),0,0,-i(r),s(r),0,0,0,0,1,0,0,0,0,1];break}return this.multiply(new Wi(a))}toString(){return`matrix3d(${this.value.map(t=>of(t,6)).join(",")})`}}function mg(n){const t=new cn;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,r,i){i.indexOf(",")>=0?i=i.split(/\s*,\s*/):i=i.split(/\s+/);const s=[];for(let a=0,o=i.length;a<o;a++)i[a].trim()&&s.push(parseFloat(""+i[a]));switch(r.toLowerCase()){case"t":case"translate":t.translate(s[0],s[1]);break;case"translatex":t.translateX(s[0]);break;case"translatey":t.translateY(s[0]);break;case"translatez":t.translateZ(s[0]);break;case"translate3d":t.translate3d(s[0],s[1],s[2]);break;case"r":case"rotate":t.rotate(s[0],s[1]??0,s[2]??0);break;case"rotatex":t.rotateX(s[0]);break;case"rotatey":t.rotateY(s[0]);break;case"rotatez":t.rotateZ(s[0]);break;case"rotate3d":t.rotate3d(s[0],s[1],s[2]);break;case"s":case"scale":t.scale(s[0],s[1]??s[0]);break;case"scalex":t.scaleX(s[0]);break;case"scaley":t.scaleY(s[0]);break;case"scalez":t.scaleZ(s[0]);break;case"scale3d":t.scale3d(s[0],s[1],s[2]);break;case"skew":t.skew(s[0],s[1]??0);break;case"skewx":t.skewX(s[0]);break;case"skewy":t.skewY(s[0]);break;case"skewz":t.skewZ(s[0]);break;case"skew3d":t.skew3d(s[0],s[1],s[2]);break;case"m":case"matrix":t.multiply([s[0],s[1],s[2],s[3],s[4],s[5]]);break;case"matrix3d":t.matrix3d.multiply(new Wi(s));break}return""}),t}function V8(n){return typeof n!="string"?!1:(n=n.trim(),/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(n)&&/[\dz]$/i.test(n)&&n.length>4)}const Yc={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},B8=/([astvzqmhlc])([^astvzqmhlc]*)/gi,H8=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function q8(n){const t=n.match(H8);return t?t.map(Number):[]}function Xc(n){const t=[];return n.replace(B8,function(e,r,i){let s=r.toLowerCase();for(i=q8(i),s=="m"&&i.length>2&&(t.push([r].concat(i.splice(0,2))),s="l",r=r=="m"?"l":"L");;){if(i.length==Yc[s])return i.unshift(r),t.push(i);if(i.length<Yc[s])throw new Error("malformed path data");t.push([r].concat(i.splice(0,Yc[s])))}}),t}function Jc(n){var t=0,e=0,r=0,i=0;return n.map(function(s){s=s.slice();var a=s[0],o=a.toUpperCase();if(a!=o)switch(s[0]=o,a){case"a":s[6]+=r,s[7]+=i;break;case"v":s[1]+=i;break;case"h":s[1]+=r;break;default:for(var h=1;h<s.length;)s[h++]+=r,s[h++]+=i}switch(o){case"Z":r=t,i=e;break;case"H":r=s[1];break;case"V":i=s[1];break;case"M":r=t=s[1],i=e=s[2];break;default:r=s[s.length-2],i=s[s.length-1]}return s})}const Ys=Math.PI*2;function yg(n,t,e,r){const i=n*r-t*e<0?-1:1;let s=n*e+t*r;return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function K8(n,t,e,r,i,s,a,o,h,l){const c=l*(n-e)/2+h*(t-r)/2,f=-h*(n-e)/2+l*(t-r)/2,d=a*a,u=o*o,p=c*c,v=f*f;let _=d*u-d*v-u*p;_<0&&(_=0),_/=d*v+u*p,_=Math.sqrt(_)*(i===s?-1:1);const S=_*a/o*f,x=_*-o/a*c,m=l*S-h*x+(n+e)/2,k=h*S+l*x+(t+r)/2,F=(c-S)/a,P=(f-x)/o,N=(-c-S)/a,R=(-f-x)/o,L=yg(1,0,F,P);let U=yg(F,P,N,R);return s===0&&U>0&&(U-=Ys),s===1&&U<0&&(U+=Ys),[m,k,L,U]}function Y8(n,t){const e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),i=Math.sin(n),s=Math.cos(n+t),a=Math.sin(n+t);return[r,i,r-i*e,i+r*e,s+a*e,a-s*e,s,a]}function X8(n,t,e,r,i,s,a,o,h){const l=Math.sin(h*Ys/360),c=Math.cos(h*Ys/360),f=c*(n-e)/2+l*(t-r)/2,d=-l*(n-e)/2+c*(t-r)/2;if(f===0&&d===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);const u=f*f/(a*a)+d*d/(o*o);u>1&&(a*=Math.sqrt(u),o*=Math.sqrt(u));const p=K8(n,t,e,r,i,s,a,o,l,c),v=[];let _=p[2],S=p[3];const x=Math.max(Math.ceil(Math.abs(S)/(Ys/4)),1);S/=x;for(let m=0;m<x;m++)v.push(Y8(_,S)),_+=S;return v.map(m=>{for(let k=0;k<m.length;k+=2){let F=m[k+0],P=m[k+1];F*=a,P*=o;const N=c*F-l*P,R=l*F+c*P;m[k+0]=N+p[0],m[k+1]=R+p[1]}return m})}function Qc(n){for(var t,e=[],r=0,i=0,s=0,a=0,o=null,h=null,l=0,c=0,f=0,d=n.length;f<d;f++){var u=n[f],p=u[0];switch(p){case"M":s=u[1],a=u[2];break;case"A":var v=X8(l,c,u[6],u[7],u[4],u[5],u[1],u[2],u[3]);if(!v.length)continue;v=v.map(k=>{const[F,P,N,R,L,U,B,K]=k;return{x1:N,y1:R,x2:L,y2:U,x:B,y:K}});for(var _=0,S;_<v.length;_++)S=v[_],u=["C",S.x1,S.y1,S.x2,S.y2,S.x,S.y],_<v.length-1&&e.push(u);break;case"S":var x=l,m=c;(t=="C"||t=="S")&&(x+=x-r,m+=m-i),u=["C",x,m,u[1],u[2],u[3],u[4]];break;case"T":t=="Q"||t=="T"?(o=l*2-o,h=c*2-h):(o=l,h=c),u=vg(l,c,o,h,u[1],u[2]);break;case"Q":o=u[1],h=u[2],u=vg(l,c,u[1],u[2],u[3],u[4]);break;case"L":u=tl(l,c,u[1],u[2]);break;case"H":u=tl(l,c,u[1],c);break;case"V":u=tl(l,c,l,u[1]);break;case"Z":u=tl(l,c,s,a);break}t=p,l=u[u.length-2],c=u[u.length-1],u.length>4?(r=u[u.length-4],i=u[u.length-3]):(r=l,i=c),e.push(u)}return e}function tl(n,t,e,r){return["C",n,t,e,r,e,r]}function vg(n,t,e,r,i,s){return["C",n/3+.6666666666666666*e,t/3+.6666666666666666*r,i/3+.6666666666666666*e,s/3+.6666666666666666*r,i,s]}const J8=n=>Array.isArray(n);function ts(n){if(!(this instanceof ts))return new ts(n);this._path=J8(n)?n:Xc(n),this._path=Jc(this._path),this._path=Z8(this._path),this._path=Q8(this._path)}ts.prototype.at=function(n,t){return this._walk(n,t).pos},ts.prototype.length=function(){return this._walk(null).length},ts.prototype._walk=function(n,t){let e=[0,0],r=[0,0,0],i=[0,0],s=0;for(let c=0;c<this._path.length;c++){let f=this._path[c];if(f[0]==="M"){if(e[0]=f[1],e[1]=f[2],n===0)return{length:s,pos:e}}else if(f[0]==="C"){r[0]=i[0]=e[0],r[1]=i[1]=e[1],r[2]=s;let d=100;for(let u=0;u<=d;u++){let p=u/d,v=a(f,p),_=o(f,p);if(s+=Zc(e[0],e[1],v,_),e[0]=v,e[1]=_,typeof n=="number"&&s>=n){let S=(s-n)/(s-r[2]),x=[e[0]*(1-S)+r[0]*S,e[1]*(1-S)+r[1]*S];return{length:s,pos:x}}r[0]=e[0],r[1]=e[1],r[2]=s}}else if(f[0]==="Q"){r[0]=i[0]=e[0],r[1]=i[1]=e[1],r[2]=s;let d=100;for(let u=0;u<=d;u++){let p=u/d,v=h(f,p),_=l(f,p);if(s+=Zc(e[0],e[1],v,_),e[0]=v,e[1]=_,typeof n=="number"&&s>=n){let S=(s-n)/(s-r[2]),x=[e[0]*(1-S)+r[0]*S,e[1]*(1-S)+r[1]*S];return{length:s,pos:x}}r[0]=e[0],r[1]=e[1],r[2]=s}}else if(f[0]==="L"){if(r[0]=e[0],r[1]=e[1],r[2]=s,s+=Zc(e[0],e[1],f[1],f[2]),e[0]=f[1],e[1]=f[2],typeof n=="number"&&s>=n){let d=(s-n)/(s-r[2]),u=[e[0]*(1-d)+r[0]*d,e[1]*(1-d)+r[1]*d];return{length:s,pos:u}}r[0]=e[0],r[1]=e[1],r[2]=s}}return{length:s,pos:e};function a(c,f){return Math.pow(1-f,3)*i[0]+3*Math.pow(1-f,2)*f*c[1]+3*(1-f)*Math.pow(f,2)*c[3]+Math.pow(f,3)*c[5]}function o(c,f){return Math.pow(1-f,3)*i[1]+3*Math.pow(1-f,2)*f*c[2]+3*(1-f)*Math.pow(f,2)*c[4]+Math.pow(f,3)*c[6]}function h(c,f){return Math.pow(1-f,2)*i[0]+2*(1-f)*f*c[1]+Math.pow(f,2)*c[3]}function l(c,f){return Math.pow(1-f,2)*i[1]+2*(1-f)*f*c[2]+Math.pow(f,2)*c[4]}};function Zc(n,t,e,r){let i=n-e,s=t-r;return Math.sqrt(i*i+s*s)}function Q8(n){let t,e=0,r=0,i={S:{to:"C",x:3},T:{to:"Q",x:1}};for(let s=0,a=n.length;s<a;s++){let o=n[s],h=i[o[0]];h&&(o[0]=h.to,t&&(t[0]===h.to?(e=2*t[h.x+2]-t[h.x],r=2*t[h.x+3]-t[h.x+1]):(e=t[t.length-2],r=t[t.length-1])),o.splice(1,0,e,r)),t=o}return n}function Z8(n){let t=[],e=["L",0,0],r;for(let i=0,s=n.length;i<s;i++){let a=n[i];switch(a[0]){case"M":e=["L",a[1],a[2]],t.push(a);break;case"Z":t.push(e);break;case"H":r=t[t.length-1]||["L",0,0],t.push(["L",a[1],r[r.length-1]]);break;case"V":r=t[t.length-1]||["L",0,0],t.push(["L",r[r.length-2],a[1]]);break;default:t.push(a)}}return t}const Wc=n=>{if(typeof n=="function"||Object(n)!==n)return n;const t=new n.constructor;for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=Wc(n[e]));return t};function tu(n){const t=tu.ps=tu.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(()=>{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==n&&(t[e].sleep--,t[e].sleep||delete t[e])}),t[n]}function Xs(n,t,e,r){return n==null&&(n=t=e=r=0),t==null&&(t=n.y,e=n.width,r=n.height,n=n.x),{x:n,y:t,width:e,w:e,height:r,h:r,x2:n+e,y2:t+r,cx:n+e/2,cy:t+r/2,r1:Math.min(e,r)/2,r2:Math.max(e,r)/2,r0:Math.sqrt(e*e+r*r)/2,path:sS(n,t,e,r),vb:[n,t,e,r].join(" ")}}function _g(n,t,e,r,i,s,a,o,h){const l=1-h,c=l**3,f=l**2,d=h*h,u=d*h,p=c*n+f*3*h*e+l*3*h*h*i+u*a,v=c*t+f*3*h*r+l*3*h*h*s+u*o,_=n+2*h*(e-n)+d*(i-2*e+n),S=t+2*h*(r-t)+d*(s-2*r+t),x=e+2*h*(i-e)+d*(a-2*i+e),m=r+2*h*(s-r)+d*(o-2*s+r),k=l*n+h*e,F=l*t+h*r,P=l*i+h*a,N=l*s+h*o,R=90-Math.atan2(_-x,S-m)*180/Math.PI;return{x:p,y:v,m:{x:_,y:S},n:{x,y:m},start:{x:k,y:F},end:{x:P,y:N},alpha:R}}function wg(n,t,e,r,i,s,a,o){Array.isArray(n)||(n=[n,t,e,r,i,s,a,o]);const h=Sg(...n);return Xs(h.min.x,h.min.y,h.max.x-h.min.x,h.max.y-h.min.y)}function W8(n,t,e){return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height}function tS(n,t){n=Xs(n),t=Xs(t);const{x:e,y:r,width:i,height:s}=n,{x:a,y:o,width:h,height:l}=t,c=e+i/2,f=r+s/2,d=a+h/2,u=o+l/2;return Math.abs(c-d)<=(i+h)/2||Math.abs(f-u)<=(s+l)/2}function xg(n,t,e,r,i){const s=-3*t+9*e-9*r+3*i,a=n*s+6*t-12*e+6*r;return n*a-3*t+3*e}function bg(n,t,e,r,i,s,a,o,h){h==null&&(h=1),h=Math.max(0,Math.min(h,1));const l=h/2,c=12,f=[-.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 u=0;for(let p=0;p<c;p++){const v=l*f[p]+l,_=xg(v,n,e,i,a),S=xg(v,t,r,s,o),x=_*_+S*S;u+=d[p]*Math.sqrt(x)}return l*u}function eS(n,t,e,r,i,s,a,o){if(Math.max(n,e)<Math.min(i,a)||Math.min(n,e)>Math.max(i,a)||Math.max(t,r)<Math.min(s,o)||Math.min(t,r)>Math.max(s,o))return;const h=(n*r-t*e)*(i-a)-(n-e)*(i*o-s*a),l=(n*r-t*e)*(s-o)-(t-r)*(i*o-s*a),c=(n-e)*(s-o)-(t-r)*(i-a);if(!c)return;const f=h/c,d=l/c,u=Number(f.toFixed(2)),p=Number(d.toFixed(2));if(!(u<Number(Math.min(n,e).toFixed(2))||u>Number(Math.max(n,e).toFixed(2))||u<Number(Math.min(i,a).toFixed(2))||u>Number(Math.max(i,a).toFixed(2))||p<Number(Math.min(t,r).toFixed(2))||p>Number(Math.max(t,r).toFixed(2))||p<Number(Math.min(s,o).toFixed(2))||p>Number(Math.max(s,o).toFixed(2))))return{x:f,y:d}}function nS(n,t,e){const r=wg(n),i=wg(t);if(!tS(r,i))return e?0:[];const s=bg.apply(0,n),a=bg.apply(0,t),o=Math.ceil(s/8),h=Math.ceil(a/8),l=[],c=[],f={};let d=e?0:[];for(let u=0;u<o+1;u++){const p=_g.apply(0,n.concat(u/o));l.push({x:p.x,y:p.y,t:u/o})}for(let u=0;u<h+1;u++){const p=_g.apply(0,t.concat(u/h));c.push({x:p.x,y:p.y,t:u/h})}for(let u=0;u<o;u++)for(let p=0;p<h;p++){const v=l[u],_=l[u+1],S=c[p],x=c[p+1],m=Math.abs(_.x-v.x)<.001?"y":"x",k=Math.abs(x.x-S.x)<.001?"y":"x",F=eS(v.x,v.y,_.x,_.y,S.x,S.y,x.x,x.y);if(F&&f[F.x.toFixed(4)]!==F.y.toFixed(4)){f[F.x.toFixed(4)]=F.y.toFixed(4);const P=v.t+Math.abs((F[m]-v[m])/(_[m]-v[m]))*(_.t-v.t),N=S.t+Math.abs((F[k]-S[k])/(x[k]-S[k]))*(x.t-S.t);P>=0&&P<=1&&N>=0&&N<=1&&(e?d++:d.push({x:F.x,y:F.y,t1:P,t2:N}))}}return d}function rS(n,t,e){let r,i,s,a,o,h,l,c,f,d,u=e?0:[];for(let p=0,v=n.length;p<v;p++){const _=n[p];if(_[0]==="M")r=o=_[1],i=h=_[2];else{_[0]==="C"?(f=[r,i].concat(_.slice(1)),r=f[6],i=f[7]):(f=[r,i,r,i,o,h,o,h],r=o,i=h);for(let S=0,x=t.length;S<x;S++){const m=t[S];if(m[0]==="M")s=l=m[1],a=c=m[2];else{m[0]==="C"?(d=[s,a].concat(m.slice(1)),s=d[6],a=d[7]):(d=[s,a,s,a,l,c,l,c],s=l,a=c);const k=nS(f,d,e);if(e)u+=k;else{for(let F=0,P=k.length;F<P;F++)k[F].segment1=p,k[F].segment2=S,k[F].bez1=f,k[F].bez2=d;u=u.concat(k)}}}}}return u}function iS(n){const t=tu(n);if(t.bbox)return Wc(t.bbox);if(!n)return Xs();let e=0,r=0,i=[],s=[],a=[];for(let d=0,u=n.length;d<u;d++)if(a=n[d],a[0]==="M")e=a[1],r=a[2],i.push(e),s.push(r);else{const p=Sg(e,r,a[1],a[2],a[3],a[4],a[5],a[6]);i=i.concat(p.min.x,p.max.x),s=s.concat(p.min.y,p.max.y),e=a[5],r=a[6]}const o=Math.min.apply(0,i),h=Math.min.apply(0,s),l=Math.max.apply(0,i),c=Math.max.apply(0,s),f=Xs(o,h,l-o,c-h);return t.bbox=Wc(f),f}function sS(n,t,e,r,i){return i?[["M",Number(n)+Number(i),t],["l",e-i*2,0],["a",i,i,0,0,1,i,i],["l",0,r-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-e,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",n,t],["l",e,0],["l",0,r],["l",-e,0],["z"]]}function Sg(n,t,e,r,i,s,a,o){const h=[],l=[[],[]];let c,f,d,u,p,v,_,S;for(let F=0;F<2;++F){if(F===0?(f=6*n-12*e+6*i,c=-3*n+9*e-9*i+3*a,d=3*e-3*n):(f=6*t-12*r+6*s,c=-3*t+9*r-9*s+3*o,d=3*r-3*t),Math.abs(c)<1e-12){if(Math.abs(f)<1e-12)continue;u=-d/f,u>0&&u<1&&h.push(u);continue}_=f*f-4*d*c,S=Math.sqrt(_),!(_<0)&&(p=(-f+S)/(2*c),p>0&&p<1&&h.push(p),v=(-f-S)/(2*c),v>0&&v<1&&h.push(v))}let x=h.length,m;const k=x;for(;x--;)u=h[x],m=1-u,l[0][x]=m*m*m*n+3*m*m*u*e+3*m*u*u*i+u*u*u*a,l[1][x]=m*m*m*t+3*m*m*u*r+3*m*u*u*s+u*u*u*o;return l[0][k]=n,l[1][k]=t,l[0][k+1]=a,l[1][k+1]=o,l[0].length=l[1].length=k+2,{min:{x:Math.min.apply(0,l[0]),y:Math.min.apply(0,l[1])},max:{x:Math.max.apply(0,l[0]),y:Math.max.apply(0,l[1])}}}function aS(n,t,e){const r=iS(n);return!(!W8(r,t,e)||rS(n,Qc([["M",t,e],["H",r.x2+10]]),1)%2!==1)}const eu=new Map;function kg(n){if(eu.has(n))return eu.get(n);const t=ts(n);return eu.set(n,t),t}function Cg(n){const t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",n),t}function oS(n,t){return xo?Cg(n).getTotalLength(t):kg(n).length()}function lS(n,t){if(xo)return Cg(n).getPointAtLength(t);{const e=kg(n),[r,i]=e.at(t);return{x:r,y:i}}}let Rn=null;function hS(n,t,e){if(xo){Rn||(Rn=document.createElement("canvas").getContext("2d"));const r=new Path2D(n);return Rn.isPointInPath(r,t,e)}else return aS(n,t,e)}function cS(n,t,e,{lineWidth:r=1,lineCap:i="butt",lineJoin:s="miter"}){if(xo){if(Rn||(Rn=document.createElement("canvas").getContext("2d")),Rn.isPointInStroke){Rn.save(),Rn.lineWidth=r,Rn.lineCap=i,Rn.lineJoin=s;const a=new Path2D(n),o=Rn.isPointInStroke(a,t,e);return Rn.restore(),o}}else return null}function uS(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Tg={},Pg={exports:{}},Eg;function dS(){return Eg||(Eg=1,function(n){(function(t){var e="0.4.0",r="hasOwnProperty",i=/[\.\/]/,s="*",a=function(){},o=function(d,u){return d-u},h,l,c={n:{}},f=function(d,u){var p=l,v=Array.prototype.slice.call(arguments,2),_=f.listeners(d),S=0,x,m=[],k={},F=[];h=d,l=0;for(var P=0,N=_.length;P<N;P++)"zIndex"in _[P]&&(m.push(_[P].zIndex),_[P].zIndex<0&&(k[_[P].zIndex]=_[P]));for(m.sort(o);m[S]<0;)if(x=k[m[S++]],F.push(x.apply(u,v)),l)return l=p,F;for(P=0;P<N;P++)if(x=_[P],"zIndex"in x)if(x.zIndex==m[S]){if(F.push(x.apply(u,v)),l)return l=p,F;do if(S++,x=k[m[S]],x&&F.push(x.apply(u,v)),l)return l=p,F;while(x)}else k[x.zIndex]=x;else if(F.push(x.apply(u,v)),l)return l=p,F;return l=p,F.length?F:null};f.listeners=function(d){var u=d.split(i),p=c,v,_,S,x,m,k,F,P,N=[p],R=[];for(x=0,m=u.length;x<m;x++){for(P=[],k=0,F=N.length;k<F;k++)for(p=N[k].n,_=[p[u[x]],p[s]],S=2;S--;)v=_[S],v&&(P.push(v),R=R.concat(v.f||[]));N=P}return R},f.on=function(d,u){for(var p=d.split(i),v=c,_=0,S=p.length;_<S;_++)v=v.n,!v[p[_]]&&(v[p[_]]={n:{}}),v=v[p[_]];for(v.f=v.f||[],_=0,S=v.f.length;_<S;_++)if(v.f[_]==u)return a;return v.f.push(u),function(x){+x==+x&&(u.zIndex=+x)}},f.stop=function(){l=1},f.nt=function(d){return d?new RegExp("(?:\\.|\\/|^)"+d+"(?:\\.|\\/|$)").test(h):h},f.unbind=function(d,u){var p=d.split(i),v,_,S,x,m,k,F,P=[c];for(x=0,m=p.length;x<m;x++)for(k=0;k<P.length;k+=S.length-2){if(S=[k,1],v=P[k].n,p[x]!=s)v[p[x]]&&S.push(v[p[x]]);else for(_ in v)v[r](_)&&S.push(v[_]);P.splice.apply(P,S)}for(x=0,m=P.length;x<m;x++)for(v=P[x];v.n;){if(u){if(v.f){for(k=0,F=v.f.length;k<F;k++)if(v.f[k]==u){v.f.splice(k,1);break}!v.f.length&&delete v.f}for(_ in v.n)if(v.n[r](_)&&v.n[_].f){var N=v.n[_].f;for(k=0,F=N.length;k<F;k++)if(N[k]==u){N.splice(k,1);break}!N.length&&delete v.n[_].f}}else{delete v.f;for(_ in v.n)v.n[r](_)&&v.n[_].f&&delete v.n[_].f}v=v.n}},f.once=function(d,u){var p=function(){u.apply(this,arguments),f.unbind(d,p)};return f.on(d,p)},f.version=e,f.toString=function(){return"You are running Eve "+e},n.exports?n.exports=f:t.eve=f})(Kc)}(Pg)),Pg.exports}(function(n){if(typeof uS=="function")var t=dS();(function(){function e(d){var u=function(p){u.parse(p)};return u.mode="text",u.type=String(d||"html").toLowerCase(),u.textchunk="",u.raw="",u.parse=h,u.on=a,u.event=s,u.end=i,u}function r(d,u,p){d==`
|
|
38
|
+
`&&this.event("newline"),f[this.mode].call(this,d,u,p)}function i(){r.call(this,"eof"),this.event("eof")}function s(d,u,p){typeof t=="function"&&t("elemental."+d+"."+u,null,u,p||"",this.raw);for(var v=this.events&&this.events[d],_=v&&v.length;_--;)try{this.events[d][_](u,p||"",this.raw)}catch{}this.raw=""}function a(d,u){this.events=this.events||{},this.events[d]=this.events[d]||[],this.events[d].push(u)}function o(d,u){return d&&(d.charAt?d.charAt(u):d[u])}function h(d){d=d||Object(d);for(var u=1,p=d.length+1,v,_,S=o(d,0);u<p;u++)v=_,_=S,S=o(d,u),this.raw+=_,r.call(this,_,S,v);this._beforeEnd=function(){r.call(this,"","",_)}}var l=/[\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]/,c=function(){for(var d in this.attr)this.attr.hasOwnProperty(d)&&this.event("attr",d,{value:this.attr[d],tagname:this.tagname,attr:this.attr})},f={text:function(d,u,p){switch(d){case"<":case"eof":this.nodename="",this.attr={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.event("text",this.textchunk),this.raw+=d,this.textchunk="";break;default:this.textchunk+=d}},special:function(d,u,p){if(p=="!"&&d=="-"&&u=="-")this.mode="comment start";else{if(this.textchunk=="[CDATA"&&d=="["){this.mode="cdata",this.textchunk="";return}if(d==">"||d=="eof"){this.event("special",this.textchunk),this.mode="text",this.textchunk="";return}this.textchunk+=d}},cdata:function(d,u,p){p=="]"&&d=="]"&&u==">"?(this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1)):(d=="eof"&&f["cdata end"].call(this),this.textchunk+=d)},"cdata end":function(d,u,p){this.event("cdata",this.textchunk),this.textchunk="",this.mode="text"},"comment start":function(d,u,p){u==">"||d=="eof"?(this.event("comment",""),this.mode="comment instant end"):this.mode="comment"},"comment instant end":function(d,u,p){this.mode="text"},comment:function(d,u,p){d=="-"&&p=="-"&&u==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):d=="eof"?this.event("comment",this.textchunk):this.textchunk+=d},"comment end":function(d,u,p){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},declaration:function(d,u,p){d=="?"&&u==">"?this.mode="declaration end":(d=="eof"&&this.event("comment",this.textchunk),this.textchunk+=d)},"declaration end":function(d,u,p){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},"tag name start":function(d,u,p){if(d=="eof")this.event("text","<");else if(!l.test(d)){if(this.mode="tag name",d=="/"){this.mode="close tag name start";return}if(d=="!"){this.mode="special",this.textchunk="";return}if(d=="?"){this.mode="declaration";return}f[this.mode].call(this,d,u,p)}},"close tag name start":function(d,u,p){l.test(d)||(this.mode="close tag name",this.tagname="",this.nodename="",f[this.mode].call(this,d,u,p))},"close tag name":function(d,u,p){if(l.test(d))this.tagname=this.nodename;else switch(d){case">":this.event("/tag",this.tagname||this.nodename),this.mode="text";break;default:!this.tagname&&(this.nodename+=d)}},"tag name":function(d,u,p){if(l.test(d))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(d){case">":this.event("tag",this.nodename),this.mode="text";break;default:this.nodename+=d}},"attr start":function(d,u,p){l.test(d)||(this.mode="attr",this.nodename="",f[this.mode].call(this,d,u,p))},attr:function(d,u,p){if(l.test(d)||d=="=")this.attr[this.nodename]="",this.mode="attr value start";else switch(d){case">":this.nodename=="/"?(delete this.attr["/"],this.event("tag",this.tagname,this.attr),c.call(this),this.event("/tag",this.tagname,!0)):(this.nodename&&(this.attr[this.nodename]=""),this.event("tag",this.tagname,this.attr),c.call(this)),this.mode="text";break;default:this.nodename+=d}},"attr value start":function(d,u,p){if(!l.test(d)){if(this.mode="attr value",this.quote=!1,d=="'"||d=='"'){this.quote=d;return}f[this.mode].call(this,d,u,p)}},"attr value":function(d,u,p){if(l.test(d)&&!this.quote)this.mode="attr start";else if(d==">"&&!this.quote)this.event("tag",this.tagname,this.attr),this.mode="text";else switch(d){case'"':case"'":this.quote==d&&p!="\\"&&(this.mode="attr start");break;default:this.attr[this.nodename]+=d}}};e.version="0.2.1",n.elemental=e,n.eve=t})()})(Tg);const Ag=Cn(Tg);function nu(n,t,e,r,i,s){if(typeof i>"u"||typeof s>"u"){const a=n-e,o=t-r;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return nu(n,t,i,s)-nu(e,r,i,s)}const Kt=Ag.eve,fS=Ag.elemental,el={cursor:1,cx:0,cy:0,fill:1,"fill-opacity":0,font:1,"font-family":1,"font-size":0,"font-style":1,"font-weight":1,height:0,"letter-spacing":0,opacity:0,r:0,rx:0,ry:0,src:1,stroke:1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":1,width:0,x:0,y:0};function ru(n,t,e){for(var r=(n+"").split(";"),i=/^\s+|\s+$/g,s,a=0,o=r.length;a<o;a++){var h=r[a].split(":");s=h[0].replace(i,"").replace(/[A-Z]/g,function(l){return"-"+l.toLowerCase()}),(!e||s in e)&&(t[s]=h[1].replace(i,""),e&&!e[s]&&(t[s]=parseFloat(t[s])))}}function pS(n){const t=fS(),e=[],r=[],i={};let s,a,o;const h={};function l(c,f){return function(d,u){const p={type:f||c};e.push(p);for(let v in u)Object.prototype.hasOwnProperty.call(u,v)&&Kt("rappar."+c+".attr."+v,p,u[v],v);Kt("rappar."+c+".attrend",p,u)}}return Kt.on("rappar.polygon.attr.points",function(c){this.path="M"+c+"z",Kt.stop()}),Kt.on("rappar.image.attr.xlink:href",function(c){this.src=c,Kt.stop()}),Kt.on("rappar.path.attr.d",function(c){this.path=c,Kt.stop()}),Kt.on("rappar.*.attr.transform",function(c){this.transform=mg(c).toTransformString(),Kt.stop()}),Kt.on("rappar.*.attr.fill",function(c){var f=c.match(/url\(#([^)]+)\)/),d=this;f&&(f=f[1],i[f]?this.fill=i[f]:Kt.on("rappar.found."+f,function(u){d.fill=u}),Kt.stop())}),Kt.on("rappar.line.attrend",function(c){this.path="M"+[c.x1,c.y1,c.x2,c.y2]}),Kt.on("rappar.*.attrend",function(){for(var c=r.length;c--;)if(r[c]!=this){let d="",u="";for(var f in r[c])f=="transform"?d=r[c].transform:f=="class"&&h["."+r[c][f]]?u=h["."+r[c][f]].join(";")+";"+u:f=="id"&&h["#"+r[c][f]]?u=h["#"+r[c][f]].join(";")+";"+u:typeof this[f]>"u"&&(this[f]=r[c][f]);this.type&&(typeof this.transform>"u"?this.transform=d:this.transform+=d,typeof this.style>"u"?this.style=u:this.style=u+this.style,ru(this.style,this,el))}}),Kt.on("rappar.*.attr.style",function(c){var f=function(){ru(c,this,el),Kt.unbind("rappar.*.attrend",f)};Kt.on("rappar.*.attrend",f),Kt.stop()}),Kt.on("rappar.*.attr.*",function(c,f){f in el&&(this[f]=el[f]?c:parseFloat(c))}),Kt.on("elemental.tag.circle",l("circle")),Kt.on("elemental.tag.ellipse",l("ellipse")),Kt.on("elemental.tag.polygon",l("polygon","path")),Kt.on("elemental.tag.path",l("path")),Kt.on("elemental.tag.line",l("line","path")),Kt.on("elemental.tag.rect",l("rect")),Kt.on("elemental.tag.image",l("image")),Kt.on("elemental.tag.text",l("text")),Kt.on("elemental.text",function(c){try{const f=Gw(c);for(let d of f.stylesheet.rules){for(let u of d.selectors)h[u]=[];for(let u of d.declarations)for(let p of d.selectors)h[p].push(`${u.property}:${u.value}`)}}catch{}}),Kt.on("elemental.tag.svg",function(c,f){let d=f.width||0,u=f.height||0;if(!d||!u){const p=f.viewBox.split(/\s+/gi);d=parseFloat(p[2])-parseFloat(p[0]),u=parseFloat(p[3])-parseFloat(p[1])}e.push({type:"viewbox",width:d,height:u})}),Kt.on("rappar.text.attrend",function(){s="",a=this,this["text-anchor"]=this["text-anchor"]||"start"}),Kt.on("elemental.text",function(c,f,d){a&&(s+=d)}),Kt.on("elemental./tag.text",function(){a.text=s,a=null}),Kt.on("elemental.tag.g",function(c,f){var d={};r.push(d);for(var u in f)Object.prototype.hasOwnProperty.call(f,u)&&(d[u]=f[u],Kt("rappar.g.attr."+u,d,f[u],u));Kt("rappar.g.attrend",d)}),Kt.on("elemental./tag.g",function(c,f){r.pop()}),Kt.on("elemental.tag.linearGradient",function(c,f){o={id:f.id,angle:+(360+nu(f.x1,f.y1,f.x2,f.y2,f.x1+100,f.y1)).toFixed(2),stops:[]}}),Kt.on("elemental./tag.linearGradient",function(){for(var c=[o.angle],f,d=0,u=o.stops.length;d<u;d++)f=o.stops[d],d&&d!=u-1?c.push(f.color+":"+f.offset):c.push(f.color);i[o.id]=c.join("-"),Kt("rappar.found."+o.id,null,i[o.id])}),Kt.on("elemental.tag.radialGradient",function(c,f){o={id:f.id,stops:[]}}),Kt.on("elemental./tag.radialGradient",function(){for(var c=[],f,d=0,u=o.stops.length;d<u;d++)f=o.stops[d],d&&d!=u-1?c.push(f.color+":"+f.offset):c.push(f.color);i[o.id]="r"+c.join("-"),Kt("rappar.found."+o.id,null,i[o.id])}),Kt.on("elemental.tag.stop",function(c,f){var d={};f.style&&ru(f.style,d),d.offset=d.offset||f.offset,d.color=d["stop-color"]||f["stop-color"],d.opacity=d["stop-opacity"]||f["stop-opacity"],~(d.offset+"").indexOf("%")?d.offset=parseFloat(d.offset):d.offset=parseFloat(d.offset)*100,d.offset=+d.offset.toFixed(2),o.stops.push(d)}),t(n),t.end(),e}const Og=gS("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 gS(n,t=10){const e={},r=n.split(",");for(let i=0;i<r.length;i+=2){const s="&"+r[i+1]+";",a=parseInt(r[i],t);e[s]="&#"+a+";"}return e["\\xa0"]=" ",e}function un(n,t){const e=Object.keys(t);for(let r=0;r<e.length;r++)n=n.replace(new RegExp("{"+e[r]+"}","gi"),""+t[e[r]]);return n}function nl(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const r="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=r[Math.floor(Math.random()*r.length)];while(n[t]);return t}function mS(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function yS(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const Js={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"}};class iu{constructor(t,e){Tt(this,"__root");Tt(this,"__ctx");this.__root=t,this.__ctx=e}addColorStop(t,e){const r=this.__ctx.__createElement("stop");if(r.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const i=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);i&&(r.setAttribute("stop-color",un("rgb({r},{g},{b})",{r:i[1],g:i[2],b:i[3]})),r.setAttribute("stop-opacity",i[4]))}else r.setAttribute("stop-color",e);this.__root.appendChild(r)}}class $g{constructor(t,e){Tt(this,"__root");Tt(this,"__ctx");this.__root=t,this.__ctx=e}}class rl{constructor({canvas:t,width:e=500,height:r=500,enableMirroring:i=!1}){Tt(this,"__document",document);Tt(this,"__canvas");Tt(this,"__ctx");Tt(this,"width");Tt(this,"height");Tt(this,"__styleStack");Tt(this,"__groupStack");Tt(this,"__rootSVG");Tt(this,"__ids");Tt(this,"__SVGdefs");Tt(this,"__currentElement");Tt(this,"__currentElementsToStyle",null);this.enableMirroring=i,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=r),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(Js);for(let e=0,r=t.length;e<r;e++){const i=t[e];this[i]=Js[i].canvas}}__getStyleState(){const t={},e=Object.keys(Js);for(let r=0,i=e.length;r<i;r++){const s=e[r];t[s]=this[s]}return t}__applyStyleState(t){const e=Object.keys(t);for(let r=0,i=e.length;r<i;r++){const s=e[r];this[s]=t[s]}}__createElement(t,e={},r=!1){const i=this.__document.createElementNS("http://www.w3.org/2000/svg",t),s=Object.keys(e);r&&(i.setAttribute("fill","none"),i.setAttribute("stroke","none"));for(let a=0;a<s.length;a++){const o=s[a];i.setAttribute(o,e[o])}return i}__applyStyleToCurrentElement(t){let e=this.__currentElement;const r=this.__currentElementsToStyle;r&&(e.setAttribute(t,""),e=r.element,r.children.forEach(s=>{s.setAttribute(t,"")}));const i=Object.keys(Js);for(let s=0;s<i.length;s++){const a=Js[i[s]],o=this[i[s]];if(a.apply){if(o instanceof $g){if(o.__ctx)for(;o.__ctx.__SVGdefs.childNodes.length;){const h=o.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(o.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(a.apply,un("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof iu)e.setAttribute(a.apply,un("url(#{id})",{id:o.__root.getAttribute("id")}));else if(a.apply.indexOf(t)!==-1&&a.svg!==o)if((a.svgAttr==="stroke"||a.svgAttr==="fill")&&o.indexOf("rgba")!==-1){const h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o);e.setAttribute(a.svgAttr,un("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]}));let l=parseFloat(h[4]);const c=this.globalAlpha;c!=null&&(l*=c),e.setAttribute(a.svgAttr+"-opacity",""+l)}else{let h=a.svgAttr;if(i[s]==="globalAlpha"&&(h=t+"-"+a.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,o)}}}}__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 r=Object.keys(Og);for(let i=0,s=r.length;i<s;i++){const a=r[i],o=Og[a],h=new RegExp(a,"gi");h.test(e)&&(e=e.replace(h,o))}}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 r=this.__currentElement.getAttribute("transform");r?r+=" ":r="",r+=t,this.__currentElement.setAttribute("transform",r)}scale(t,e){e===void 0&&(e=t),this.__addTransform(un("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(un("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(un("translate({x},{y})",{x:t,y:e}))}transform(t,e,r,i,s,a){this.__addTransform(un("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:r,d:i,e:s,f:a}))}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):console.error("Attempted to apply path command to node",t.nodeName)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(un("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(un("L {x} {y}",this.__currentPosition)):this.__addPathCommand(un("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,r,i,s,a){this.__currentPosition={x:s,y:a},this.__addPathCommand(un("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:r,cp2y:i,x:s,y:a}))}quadraticCurveTo(t,e,r,i){this.__currentPosition={x:r,y:i},this.__addPathCommand(un("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:r,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,r,i,s){const a=this.__currentPosition&&this.__currentPosition.x,o=this.__currentPosition&&this.__currentPosition.y;if(typeof a>"u"||typeof o>"u")return;if(s<0)throw new Error("IndexSizeError: The radius provided ("+s+") is negative.");if(a===t&&o===e||t===r&&e===i||s===0){this.lineTo(t,e);return}const h=this.normalize([a-t,o-e]),l=this.normalize([r-t,i-e]);if(h[0]*l[1]===h[1]*l[0]){this.lineTo(t,e);return}const c=h[0]*l[0]+h[1]*l[1],f=Math.acos(Math.abs(c)),d=this.normalize([h[0]+l[0],h[1]+l[1]]),u=s/Math.sin(f/2),p=t+u*d[0],v=e+u*d[1],_=[-h[1],h[0]],S=[l[1],-l[0]],x=function(F){const P=F[0];return F[1]>=0?Math.acos(P):-Math.acos(P)},m=x(_),k=x(S);this.lineTo(p+_[0]*s,v+_[1]*s),this.arc(p,v,s,m,k)}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,r,i){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()}fillRect(t,e,r,i){const s=this.__createElement("rect",{x:t,y:e,width:r,height:i},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,r,i){const s=this.__createElement("rect",{x:t,y:e,width:r,height:i},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const t=this.__closestGroupOrSvg().getAttribute("transform"),e=this.__rootSVG.childNodes[1],r=e.childNodes;for(let i=r.length-1;i>=0;i--)r[i]&&e.removeChild(r[i]);this.__currentElement=e,this.__groupStack=[],t&&this.__addTransform(t)}clearRect(t,e,r,i){if(t===0&&e===0&&r===this.width&&i===this.height){this.__clearCanvas();return}const s=this.__closestGroupOrSvg(),a=this.__createElement("rect",{x:t,y:e,width:r,height:i,fill:"#FFFFFF"},!0);s.appendChild(a)}createLinearGradient(t,e,r,i){const s=this.__createElement("linearGradient",{id:nl(this.__ids),x1:t+"px",x2:r+"px",y1:e+"px",y2:i+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(s),new iu(s,this)}createRadialGradient(t,e,r,i,s,a){const o=this.__createElement("radialGradient",{id:nl(this.__ids),cx:i+"px",cy:s+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(o),new iu(o,this)}__parseFont(){const t=/^\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),e={style:t[1]||"normal",size:t[4]||"10px",family:t[6]||"sans-serif",weight:t[3]||"normal",decoration:t[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(e.decoration="underline"),this.__fontHref&&(e.href=this.__fontHref),e}__wrapTextLink(t,e){if(t.href){const r=this.__createElement("a");return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),r.appendChild(e),r}return e}__applyText(t,e,r,i){const s=this.__parseFont(),a=this.__closestGroupOrSvg(),o=this.__createElement("text",{"font-family":s.family,"font-size":s.size,"font-style":s.style,"font-weight":s.weight,"text-decoration":s.decoration,x:e,y:r,"text-anchor":mS(this.textAlign),"dominant-baseline":yS(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(t)),this.__currentElement=o,this.__applyStyleToCurrentElement(i),a.appendChild(this.__wrapTextLink(s,o))}fillText(t,e,r){this.__applyText(t,e,r,"fill")}strokeText(t,e,r){this.__applyText(t,e,r,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,r,i,s,a){if(i===s)return;i=i%(2*Math.PI),s=s%(2*Math.PI),i===s&&(s=(s+2*Math.PI-.001*(a?-1:1))%(2*Math.PI));const o=t+r*Math.cos(s),h=e+r*Math.sin(s),l=t+r*Math.cos(i),c=e+r*Math.sin(i),f=a?0:1;let d=0,u=s-i;u<0&&(u+=2*Math.PI),a?d=u>Math.PI?0:1:d=u>Math.PI?1:0,this.lineTo(l,c),this.__addPathCommand(un("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:d,sweepFlag:f,endX:o,endY:h})),this.__currentPosition={x:o,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),r=nl(this.__ids),i=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",r),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",un("url(#{id})",{id:r})),t.appendChild(i),this.__currentElement=i}drawImage(...t){var m;let e=t[0],r,i,s,a,o=0,h=0,l,c,f,d,u,p,v,_;if(t.length===3)r=t[1],i=t[2],l=e.width,c=e.height,s=l,a=c;else if(t.length===5)r=t[1],i=t[2],s=t[3],a=t[4],l=e.width,c=e.height;else if(t.length===9)o=t[1],h=t[2],l=t[3],c=t[4],r=t[5],i=t[6],s=t[7],a=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const S=this.__closestGroupOrSvg();this.__currentElement;const x="translate("+r+", "+i+")";if(e instanceof rl){if(f=e.getSvg().cloneNode(!0),f.childNodes&&f.childNodes.length>1){for(d=f.childNodes[0];d.childNodes.length;)_=d.childNodes[0].getAttribute("id"),this.__ids[_]=_,this.__SVGdefs.appendChild(d.childNodes[0]);if(u=f.childNodes[1],u){const k=u.getAttribute("transform");let F;k?F=k+" "+x:F=x,u.setAttribute("transform",F),S.appendChild(u)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(p=this.__createElement("image"),p.setAttribute("width",s),p.setAttribute("height",a),p.setAttribute("preserveAspectRatio","none"),(o||h||l!==e.width||c!==e.height)&&(v=this.__document.createElement("canvas"),v.width=s,v.height=a,(m=v.getContext("2d"))==null||m.drawImage(e,o,h,l,c,0,0,s,a),e=v),p.setAttribute("transform",x),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),S.appendChild(p))}createPattern(t,e){const r=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),i=nl(this.__ids);let s;return r.setAttribute("id",i),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(s=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),r.appendChild(s),this.__SVGdefs.appendChild(r)):t instanceof rl&&(r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(r)),new $g(r,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}let Fg=class Hv{constructor(t){Tt(this,"point");this.point=new bi(t)}static fromSVGPathData(t){if(t.length<3)throw new Error("Line 参数个数错误");if(t[0].toUpperCase()!=="L")throw new Error("Line command 错误");return new Hv({x:t[1],y:t[2]})}toSVGPathData(){return["L",this.point.x,this.point.y]}toSVGPathD(){return"L "+this.point.toSVGPathD()}},Ng=class qv extends Fg{constructor(e){super(e);Tt(this,"rx");Tt(this,"ry");Tt(this,"xAxisRotate");Tt(this,"largeArcFlag");Tt(this,"sweepFlag");this.rx=e.rx,this.ry=e.ry,this.xAxisRotate=(e==null?void 0:e.xAxisRotate)??0,this.largeArcFlag=(e==null?void 0:e.largeArcFlag)??1,this.sweepFlag=(e==null?void 0:e.sweepFlag)??1}static fromSVGPathData(e){if(e.length<8)throw new Error("Arc 参数个数错误");if(e[0].toUpperCase()!=="A")throw new Error("Arc command 错误");return new qv({x:e[6],y:e[7],rx:e[1],ry:e[2],xAxisRotate:e[3],largeArcFlag:e[4],sweepFlag:e[5]})}toSVGPathData(){return["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.point.x,this.point.y]}toSVGPathD(){return`A ${this.rx},${this.ry} ${this.xAxisRotate} ${this.largeArcFlag},${this.sweepFlag} ${this.point.toSVGPathD()}`}};class Qs extends Fg{constructor(e){super(e);Tt(this,"ctrlPoints",[]);this.ctrlPoints.push(new bi({x:e.c1x,y:e.c1y})),this.ctrlPoints.push(new bi({x:e.c2x,y:e.c2y}))}static fromSVGPathData(e){if(e.length<7)throw new Error("CubicBezier 参数个数错误");if(e[0].toUpperCase()!=="C")throw new Error("CubicBezier command 错误");return new Qs({c1x:e[1],c1y:e[2],c2x:e[3],c2y:e[4],x:e[5],y:e[6]})}toSVGPathData(){return["C",this.ctrlPoints[0].x,this.ctrlPoints[0].y,this.ctrlPoints[1].x,this.ctrlPoints[1].y,this.point.x,this.point.y]}toSVGPathD(){return`C ${this.ctrlPoints.map(e=>e.toSVGPathD()).join(" ")} ${this.point.toSVGPathD()}`}}class es{constructor(t){Tt(this,"startPoint");Tt(this,"isClosed",!1);Tt(this,"lines",[]);Tt(this,"normalizedLines",[]);var e;this.startPoint=(t==null?void 0:t.startPoint)??null,this.isClosed=(t==null?void 0:t.isClosed)??!1,(e=t==null?void 0:t.lines)==null||e.forEach(this.addLine),this.normalize()}setStartPoint(t,e){return this.startPoint=new bi({x:t,y:e}),this}addLine(t){return this.lines.push(t),this}normalize(){let t=this.lines.reduce((r,i)=>(r+=i.toSVGPathD(),r),"");this.startPoint&&(t="M "+this.startPoint.toSVGPathD()+t),this.isClosed&&(t+="Z"),this.normalizedLines=[];const e=Qc(Jc(Xc(t)));for(let r=0,i=e.length;r<i;r++){const s=e[r];if(r==0&&s[0]=="M"){this.setStartPoint(s[1],s[2]);continue}if(r==i-1&&s[0]=="Z"){this.isClosed=!0;continue}this.normalizedLines.push(Qs.fromSVGPathData(s))}return this}static fromSVGPathD(t,e){if(!V8(t))throw new Error("Not an SVG path!");const r=Qc(Jc(Xc(t)));return es.fromSVGPathData(r,e)}static fromSVGPathData(t,e){const r=new es;for(let s=0,a=t.length;s<a;s++){const o=t[s],h=o[0];if(s==0&&h=="M"){r.setStartPoint(o[1],o[2]);continue}if(s==a-1&&h=="Z"){r.isClosed=!0;continue}r.addLine(new Qs({c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],x:o[5],y:o[6]}))}r.normalize();const i=mg(e??"");return r.transform(i)}toSVGPathD(){let t="";this.startPoint&&(t+="M "+this.startPoint.toSVGPathD());for(let e=0,r=this.normalizedLines.length;e<r;e++)t+=this.normalizedLines[e].toSVGPathD();return this.isClosed&&(t+="Z"),t}toSVGPathData(){const t=[];this.startPoint&&t.push(["M",...this.startPoint.toSVGPathData()]);for(let e=0,r=this.normalizedLines.length;e<r;e++)t.push(this.normalizedLines[e].toSVGPathData());return this.isClosed&&t.push(["Z"]),t}toCanvas(t){const e=this.normalizedLines;e.length&&(this.startPoint&&(t.beginPath(),t.moveTo(this.startPoint.x,this.startPoint.y)),e.forEach(r=>{const[i,...s]=r.toSVGPathData();i==="M"?t.moveTo(s[0],s[1]):i==="Z"?t.closePath():t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}),this.isClosed&&t.closePath())}get bounds(){let t=[0,0,0,0];if(this.normalizedLines.length){t=[1/0,1/0,-1/0,-1/0];for(let e=0,r=this.normalizedLines.length;e<r;e++){const i=this.normalizedLines[e],s=[...i.ctrlPoints,i.point];for(let a=0;a<s.length;a++){const o=s[a].x,h=s[a].y;o<t[0]&&(t[0]=o),h<t[1]&&(t[1]=h),o>t[2]&&(t[2]=o),h>t[3]&&(t[3]=h)}}}return t}get size(){const t=this.bounds;return[t[2]-t[0],t[3]-t[1]]}get center(){const[t,e,r,i]=this.bounds;return[(t+r)/2,(e+i)/2]}getTotalLength(){return oS(this.toSVGPathD())}getPointAtLength(t){return lS(this.toSVGPathD(),t)}isPointInPath(t,e){return hS(this.toSVGPathD(),t,e)}isPointInStroke(t,e,r={lineWidth:1,lineCap:"butt",lineJoin:"miter"}){return cS(this.toSVGPathD(),t,e,r)}transform(t){if(this.startPoint){const[e,r]=t.transformPoint(this.startPoint.x,this.startPoint.y);this.setStartPoint(e,r)}return this.normalizedLines=this.normalizedLines.map(e=>{const[r,...i]=e.toSVGPathData(),s=[r];for(let a=0,o=i.length;a<o;a+=2){const h=i[a],l=i[a+1],[c,f]=t.transformPoint(h,l);s.push(c,f)}return Qs.fromSVGPathData(s)}),this}translate(t,e){const r=new cn().translate(t,e);return this.transform(r)}rotate(t,e=0,r=0){const i=new cn().rotate(t,e,r);return this.transform(i)}scale(t,e=t,r=0,i=0){const s=new cn().scale(t,e,r,i);return this.transform(s)}skew(t,e=0){const r=new cn().skew(t,e);return this.transform(r)}trim(){const[t,e]=this.bounds;return this.translate(-t,-e),this}static generateRosetta(t,e,r,i,s){if(s==0)throw new Error("no dividing by zero, please");const a=new es;a.setStartPoint(t,e);const o=360/s;for(let h=0;h<s;h+=1){const l=o*h*Math.PI/180,c=t+2*r*Math.cos(l),f=e+2*r*Math.sin(l);a.addLine(new Ng({x:c,y:f,rx:r,ry:i,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1})),a.addLine(new Ng({x:t,y:e,rx:r,ry:i,xAxisRotate:o*h,largeArcFlag:1,sweepFlag:1}))}return a.normalize(),a}}var Rg={exports:{}};(function(n,t){(function(e,r){n.exports=r()})(window,function(){return function(e){var r={};function i(s){if(r[s])return r[s].exports;var a=r[s]={i:s,l:!1,exports:{}};return e[s].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=r,i.d=function(s,a,o){i.o(s,a)||Object.defineProperty(s,a,{enumerable:!0,get:o})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,a){if(1&a&&(s=i(s)),8&a||4&a&&typeof s=="object"&&s&&s.__esModule)return s;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:s}),2&a&&typeof s!="string")for(var h in s)i.d(o,h,(function(l){return s[l]}).bind(null,h));return o},i.n=function(s){var a=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(a,"a",a),a},i.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)},i.p="",i(i.s=1)}([function(e,r,i){var s,a;s=[i(2)],(a=(function(o){function h(y){if(h.is(y,"function"))return l?y():o.on("raphael.DOMload",y);if(h.is(y,it))return h._engine.create[x](h,y.splice(0,3+h.is(y[0],xt))).add(y);var b=Array.prototype.slice.call(arguments,0);if(h.is(b[b.length-1],"function")){var A=b.pop();return l?A.call(h._engine.create[x](h,b)):o.on("raphael.DOMload",function(){A.call(h._engine.create[x](h,b))})}return h._engine.create[x](h,arguments)}h.version="2.3.0",h.eve=o;var l,c,f=/[, ]+/,d={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},u=/\{(\d+)\}/g,p="hasOwnProperty",v={doc:document,win:window},_={was:Object.prototype[p].call(v.win,"Raphael"),is:v.win.Raphael},S=function(){this.ca=this.customAttributes={}},x="apply",m="concat",k="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,F="",P=" ",N=String,R="split",L="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[R](P),U={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},B=N.prototype.toLowerCase,K=Math,tt=K.max,W=K.min,lt=K.abs,wt=K.pow,bt=K.PI,xt="number",it="array",Y=Object.prototype.toString,O=(h._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\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),E={NaN:1,Infinity:1,"-Infinity":1},T=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,C=K.round,D=parseFloat,G=parseInt,M=N.prototype.toUpperCase,V=h._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},q=h._availableAnimAttrs={blur:xt,"clip-rect":"csv",cx:xt,cy:xt,fill:"colour","fill-opacity":xt,"font-size":xt,height:xt,opacity:xt,path:"path",r:xt,rx:xt,ry:xt,stroke:"colour","stroke-opacity":xt,"stroke-width":xt,transform:"transform",width:xt,x:xt,y:xt},Z=/[\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]*/,nt={hs:1,rg:1},pt=/,?([achlmqrstvxz]),?/gi,kt=/([achlmrqstvz])[\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,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\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]*)+)/gi,Ft=/([rstm])[\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,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\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]*)+)/gi,St=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\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]*/gi,At=(h._radial_gradient=/^r(?:\(([^,]+?)[\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]*([^\)]+?)\))?/,{}),jt=function(y,b){return D(y)-D(b)},zt=function(y){return y},Ot=h._rectPath=function(y,b,A,g,w){return w?[["M",y+w,b],["l",A-2*w,0],["a",w,w,0,0,1,w,w],["l",0,g-2*w],["a",w,w,0,0,1,-w,w],["l",2*w-A,0],["a",w,w,0,0,1,-w,-w],["l",0,2*w-g],["a",w,w,0,0,1,w,-w],["z"]]:[["M",y,b],["l",A,0],["l",0,g],["l",-A,0],["z"]]},le=function(y,b,A,g){return g==null&&(g=A),[["M",y,b],["m",0,-g],["a",A,g,0,1,1,0,2*g],["a",A,g,0,1,1,0,-2*g],["z"]]},Jt=h._getPath={path:function(y){return y.attr("path")},circle:function(y){var b=y.attrs;return le(b.cx,b.cy,b.r)},ellipse:function(y){var b=y.attrs;return le(b.cx,b.cy,b.rx,b.ry)},rect:function(y){var b=y.attrs;return Ot(b.x,b.y,b.width,b.height,b.r)},image:function(y){var b=y.attrs;return Ot(b.x,b.y,b.width,b.height)},text:function(y){var b=y._getBBox();return Ot(b.x,b.y,b.width,b.height)},set:function(y){var b=y._getBBox();return Ot(b.x,b.y,b.width,b.height)}},ue=h.mapPath=function(y,b){if(!b)return y;var A,g,w,$,I,j,z;for(w=0,I=(y=Gr(y)).length;w<I;w++)for($=1,j=(z=y[w]).length;$<j;$+=2)A=b.x(z[$],z[$+1]),g=b.y(z[$],z[$+1]),z[$]=A,z[$+1]=g;return y};if(h._g=v,h.type=v.win.SVGAngle||v.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",h.type=="VML"){var Bt,Fe=v.doc.createElement("div");if(Fe.innerHTML='<v:shape adj="1"/>',(Bt=Fe.firstChild).style.behavior="url(#default#VML)",!Bt||typeof Bt.adj!="object")return h.type=F;Fe=null}function Pe(y){if(typeof y=="function"||Object(y)!==y)return y;var b=new y.constructor;for(var A in y)y[p](A)&&(b[A]=Pe(y[A]));return b}h.svg=!(h.vml=h.type=="VML"),h._Paper=S,h.fn=c=S.prototype=h.prototype,h._id=0,h.is=function(y,b){return(b=B.call(b))=="finite"?!E[p](+y):b=="array"?y instanceof Array:b=="null"&&y===null||b==typeof y&&y!==null||b=="object"&&y===Object(y)||b=="array"&&Array.isArray&&Array.isArray(y)||Y.call(y).slice(8,-1).toLowerCase()==b},h.angle=function(y,b,A,g,w,$){if(w==null){var I=y-A,j=b-g;return I||j?(180+180*K.atan2(-j,-I)/bt+360)%360:0}return h.angle(y,b,w,$)-h.angle(A,g,w,$)},h.rad=function(y){return y%360*bt/180},h.deg=function(y){return Math.round(180*y/bt%360*1e3)/1e3},h.snapTo=function(y,b,A){if(A=h.is(A,"finite")?A:10,h.is(y,it)){for(var g=y.length;g--;)if(lt(y[g]-b)<=A)return y[g]}else{var w=b%(y=+y);if(w<A)return b-w;if(w>y-A)return b-w+y}return b};var Je,vn;h.createUUID=(Je=/[xy]/g,vn=function(y){var b=16*K.random()|0;return(y=="x"?b:3&b|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Je,vn).toUpperCase()}),h.setWindow=function(y){o("raphael.setWindow",h,v.win,y),v.win=y,v.doc=v.win.document,h._engine.initWin&&h._engine.initWin(v.win)};var an=function(y){if(h.vml){var b,A=/^\s+|\s+$/g;try{var g=new ActiveXObject("htmlfile");g.write("<body>"),g.close(),b=g.body}catch{b=createPopup().document.body}var w=b.createTextRange();an=je(function(I){try{b.style.color=N(I).replace(A,F);var j=w.queryCommandValue("ForeColor");return"#"+("000000"+(j=(255&j)<<16|65280&j|(16711680&j)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var $=v.doc.createElement("i");$.title="Raphaël Colour Picker",$.style.display="none",v.doc.body.appendChild($),an=je(function(I){return $.style.color=I,v.doc.defaultView.getComputedStyle($,F).getPropertyValue("color")})}return an(y)},Ne=function(){return"hsb("+[this.h,this.s,this.b]+")"},en=function(){return"hsl("+[this.h,this.s,this.l]+")"},An=function(){return this.hex},On=function(y,b,A){if(b==null&&h.is(y,"object")&&"r"in y&&"g"in y&&"b"in y&&(A=y.b,b=y.g,y=y.r),b==null&&h.is(y,"string")){var g=h.getRGB(y);y=g.r,b=g.g,A=g.b}return(y>1||b>1||A>1)&&(y/=255,b/=255,A/=255),[y,b,A]},In=function(y,b,A,g){var w={r:y*=255,g:b*=255,b:A*=255,hex:h.rgb(y,b,A),toString:An};return h.is(g,"finite")&&(w.opacity=g),w};function je(y,b,A){return function g(){var w=Array.prototype.slice.call(arguments,0),$=w.join("␀"),I=g.cache=g.cache||{},j=g.count=g.count||[];return I[p]($)?(function(z,X){for(var et=0,ct=z.length;et<ct;et++)if(z[et]===X)return z.push(z.splice(et,1)[0])}(j,$),A?A(I[$]):I[$]):(j.length>=1e3&&delete I[j.shift()],j.push($),I[$]=y[x](b,w),A?A(I[$]):I[$])}}h.color=function(y){var b;return h.is(y,"object")&&"h"in y&&"s"in y&&"b"in y?(b=h.hsb2rgb(y),y.r=b.r,y.g=b.g,y.b=b.b,y.hex=b.hex):h.is(y,"object")&&"h"in y&&"s"in y&&"l"in y?(b=h.hsl2rgb(y),y.r=b.r,y.g=b.g,y.b=b.b,y.hex=b.hex):(h.is(y,"string")&&(y=h.getRGB(y)),h.is(y,"object")&&"r"in y&&"g"in y&&"b"in y?(b=h.rgb2hsl(y),y.h=b.h,y.s=b.s,y.l=b.l,b=h.rgb2hsb(y),y.v=b.b):(y={hex:"none"}).r=y.g=y.b=y.h=y.s=y.v=y.l=-1),y.toString=An,y},h.hsb2rgb=function(y,b,A,g){var w,$,I,j,z;return this.is(y,"object")&&"h"in y&&"s"in y&&"b"in y&&(A=y.b,b=y.s,g=y.o,y=y.h),j=(z=A*b)*(1-lt((y=(y*=360)%360/60)%2-1)),w=$=I=A-z,In(w+=[z,j,0,0,j,z][y=~~y],$+=[j,z,z,j,0,0][y],I+=[0,0,j,z,z,j][y],g)},h.hsl2rgb=function(y,b,A,g){var w,$,I,j,z;return this.is(y,"object")&&"h"in y&&"s"in y&&"l"in y&&(A=y.l,b=y.s,y=y.h),(y>1||b>1||A>1)&&(y/=360,b/=100,A/=100),j=(z=2*b*(A<.5?A:1-A))*(1-lt((y=(y*=360)%360/60)%2-1)),w=$=I=A-z/2,In(w+=[z,j,0,0,j,z][y=~~y],$+=[j,z,z,j,0,0][y],I+=[0,0,j,z,z,j][y],g)},h.rgb2hsb=function(y,b,A){var g,w;return y=(A=On(y,b,A))[0],b=A[1],A=A[2],{h:(((w=(g=tt(y,b,A))-W(y,b,A))==0?null:g==y?(b-A)/w:g==b?(A-y)/w+2:(y-b)/w+4)+360)%6*60/360,s:w==0?0:w/g,b:g,toString:Ne}},h.rgb2hsl=function(y,b,A){var g,w,$,I;return y=(A=On(y,b,A))[0],b=A[1],A=A[2],g=((w=tt(y,b,A))+($=W(y,b,A)))/2,{h:(((I=w-$)==0?null:w==y?(b-A)/I:w==b?(A-y)/I+2:(y-b)/I+4)+360)%6*60/360,s:I==0?0:g<.5?I/(2*g):I/(2-2*g),l:g,toString:en}},h._path2string=function(){return this.join(",").replace(pt,"$1")},h._preload=function(y,b){var A=v.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){b.call(this),this.onload=null,v.doc.body.removeChild(this)},A.onerror=function(){v.doc.body.removeChild(this)},v.doc.body.appendChild(A),A.src=y};function jn(){return this.hex}function Qn(y,b){for(var A=[],g=0,w=y.length;w-2*!b>g;g+=2){var $=[{x:+y[g-2],y:+y[g-1]},{x:+y[g],y:+y[g+1]},{x:+y[g+2],y:+y[g+3]},{x:+y[g+4],y:+y[g+5]}];b?g?w-4==g?$[3]={x:+y[0],y:+y[1]}:w-2==g&&($[2]={x:+y[0],y:+y[1]},$[3]={x:+y[2],y:+y[3]}):$[0]={x:+y[w-2],y:+y[w-1]}:w-4==g?$[3]=$[2]:g||($[0]={x:+y[g],y:+y[g+1]}),A.push(["C",(-$[0].x+6*$[1].x+$[2].x)/6,(-$[0].y+6*$[1].y+$[2].y)/6,($[1].x+6*$[2].x-$[3].x)/6,($[1].y+6*$[2].y-$[3].y)/6,$[2].x,$[2].y])}return A}h.getRGB=je(function(y){if(!y||(y=N(y)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:jn};if(y=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:jn};!nt[p](y.toLowerCase().substring(0,2))&&y.charAt()!="#"&&(y=an(y));var b,A,g,w,$,I,j=y.match(O);return j?(j[2]&&(g=G(j[2].substring(5),16),A=G(j[2].substring(3,5),16),b=G(j[2].substring(1,3),16)),j[3]&&(g=G(($=j[3].charAt(3))+$,16),A=G(($=j[3].charAt(2))+$,16),b=G(($=j[3].charAt(1))+$,16)),j[4]&&(I=j[4][R](Z),b=D(I[0]),I[0].slice(-1)=="%"&&(b*=2.55),A=D(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=D(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),j[1].toLowerCase().slice(0,4)=="rgba"&&(w=D(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100)),j[5]?(I=j[5][R](Z),b=D(I[0]),I[0].slice(-1)=="%"&&(b*=2.55),A=D(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=D(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),(I[0].slice(-3)=="deg"||I[0].slice(-1)=="°")&&(b/=360),j[1].toLowerCase().slice(0,4)=="hsba"&&(w=D(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100),h.hsb2rgb(b,A,g,w)):j[6]?(I=j[6][R](Z),b=D(I[0]),I[0].slice(-1)=="%"&&(b*=2.55),A=D(I[1]),I[1].slice(-1)=="%"&&(A*=2.55),g=D(I[2]),I[2].slice(-1)=="%"&&(g*=2.55),(I[0].slice(-3)=="deg"||I[0].slice(-1)=="°")&&(b/=360),j[1].toLowerCase().slice(0,4)=="hsla"&&(w=D(I[3])),I[3]&&I[3].slice(-1)=="%"&&(w/=100),h.hsl2rgb(b,A,g,w)):((j={r:b,g:A,b:g,toString:jn}).hex="#"+(16777216|g|A<<8|b<<16).toString(16).slice(1),h.is(w,"finite")&&(j.opacity=w),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:jn}},h),h.hsb=je(function(y,b,A){return h.hsb2rgb(y,b,A).hex}),h.hsl=je(function(y,b,A){return h.hsl2rgb(y,b,A).hex}),h.rgb=je(function(y,b,A){function g(w){return w+.5|0}return"#"+(16777216|g(A)|g(b)<<8|g(y)<<16).toString(16).slice(1)}),h.getColor=function(y){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:y||.75},A=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),A.hex},h.getColor.reset=function(){delete this.start},h.parsePathString=function(y){if(!y)return null;var b=ke(y);if(b.arr)return Ee(b.arr);var A={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},g=[];return h.is(y,it)&&h.is(y[0],it)&&(g=Ee(y)),g.length||N(y).replace(kt,function(w,$,I){var j=[],z=$.toLowerCase();if(I.replace(St,function(X,et){et&&j.push(+et)}),z=="m"&&j.length>2&&(g.push([$][m](j.splice(0,2))),z="l",$=$=="m"?"l":"L"),z=="r")g.push([$][m](j));else for(;j.length>=A[z]&&(g.push([$][m](j.splice(0,A[z]))),A[z]););}),g.toString=h._path2string,b.arr=Ee(g),g},h.parseTransformString=je(function(y){if(!y)return null;var b=[];return h.is(y,it)&&h.is(y[0],it)&&(b=Ee(y)),b.length||N(y).replace(Ft,function(A,g,w){var $=[];B.call(g),w.replace(St,function(I,j){j&&$.push(+j)}),b.push([g][m]($))}),b.toString=h._path2string,b},this,function(y){if(!y)return y;for(var b=[],A=0;A<y.length;A++){for(var g=[],w=0;w<y[A].length;w++)g.push(y[A][w]);b.push(g)}return b});var ke=function(y){var b=ke.ps=ke.ps||{};return b[y]?b[y].sleep=100:b[y]={sleep:100},setTimeout(function(){for(var A in b)b[p](A)&&A!=y&&(b[A].sleep--,!b[A].sleep&&delete b[A])}),b[y]};function $n(y,b,A,g,w){return y*(y*(-3*b+9*A-9*g+3*w)+6*b-12*A+6*g)-3*b+3*A}function fn(y,b,A,g,w,$,I,j,z){z==null&&(z=1);for(var X=(z=z>1?1:z<0?0:z)/2,et=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],ct=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],st=0,rt=0;rt<12;rt++){var ut=X*et[rt]+X,gt=$n(ut,y,A,w,I),dt=$n(ut,b,g,$,j),ht=gt*gt+dt*dt;st+=ct[rt]*K.sqrt(ht)}return X*st}function Lr(y,b,A,g,w,$,I,j){if(!(tt(y,A)<W(w,I)||W(y,A)>tt(w,I)||tt(b,g)<W($,j)||W(b,g)>tt($,j))){var z=(y-A)*($-j)-(b-g)*(w-I);if(z){var X=((y*g-b*A)*(w-I)-(y-A)*(w*j-$*I))/z,et=((y*g-b*A)*($-j)-(b-g)*(w*j-$*I))/z,ct=+X.toFixed(2),st=+et.toFixed(2);if(!(ct<+W(y,A).toFixed(2)||ct>+tt(y,A).toFixed(2)||ct<+W(w,I).toFixed(2)||ct>+tt(w,I).toFixed(2)||st<+W(b,g).toFixed(2)||st>+tt(b,g).toFixed(2)||st<+W($,j).toFixed(2)||st>+tt($,j).toFixed(2)))return{x:X,y:et}}}}function Zn(y,b,A){var g=h.bezierBBox(y),w=h.bezierBBox(b);if(!h.isBBoxIntersect(g,w))return A?0:[];for(var $=fn.apply(0,y),I=fn.apply(0,b),j=tt(~~($/5),1),z=tt(~~(I/5),1),X=[],et=[],ct={},st=A?0:[],rt=0;rt<j+1;rt++){var ut=h.findDotsAtSegment.apply(h,y.concat(rt/j));X.push({x:ut.x,y:ut.y,t:rt/j})}for(rt=0;rt<z+1;rt++)ut=h.findDotsAtSegment.apply(h,b.concat(rt/z)),et.push({x:ut.x,y:ut.y,t:rt/z});for(rt=0;rt<j;rt++)for(var gt=0;gt<z;gt++){var dt=X[rt],ht=X[rt+1],Ct=et[gt],mt=et[gt+1],_t=lt(ht.x-dt.x)<.001?"y":"x",yt=lt(mt.x-Ct.x)<.001?"y":"x",Ht=Lr(dt.x,dt.y,ht.x,ht.y,Ct.x,Ct.y,mt.x,mt.y);if(Ht){if(ct[Ht.x.toFixed(4)]==Ht.y.toFixed(4))continue;ct[Ht.x.toFixed(4)]=Ht.y.toFixed(4);var Gt=dt.t+lt((Ht[_t]-dt[_t])/(ht[_t]-dt[_t]))*(ht.t-dt.t),qt=Ct.t+lt((Ht[yt]-Ct[yt])/(mt[yt]-Ct[yt]))*(mt.t-Ct.t);Gt>=0&&Gt<=1.001&&qt>=0&&qt<=1.001&&(A?st++:st.push({x:Ht.x,y:Ht.y,t1:W(Gt,1),t2:W(qt,1)}))}}return st}function yr(y,b,A){y=h._path2curve(y),b=h._path2curve(b);for(var g,w,$,I,j,z,X,et,ct,st,rt=A?0:[],ut=0,gt=y.length;ut<gt;ut++){var dt=y[ut];if(dt[0]=="M")g=j=dt[1],w=z=dt[2];else{dt[0]=="C"?(ct=[g,w].concat(dt.slice(1)),g=ct[6],w=ct[7]):(ct=[g,w,g,w,j,z,j,z],g=j,w=z);for(var ht=0,Ct=b.length;ht<Ct;ht++){var mt=b[ht];if(mt[0]=="M")$=X=mt[1],I=et=mt[2];else{mt[0]=="C"?(st=[$,I].concat(mt.slice(1)),$=st[6],I=st[7]):(st=[$,I,$,I,X,et,X,et],$=X,I=et);var _t=Zn(ct,st,A);if(A)rt+=_t;else{for(var yt=0,Ht=_t.length;yt<Ht;yt++)_t[yt].segment1=ut,_t[yt].segment2=ht,_t[yt].bez1=ct,_t[yt].bez2=st;rt=rt.concat(_t)}}}}}return rt}h.findDotsAtSegment=function(y,b,A,g,w,$,I,j,z){var X=1-z,et=wt(X,3),ct=wt(X,2),st=z*z,rt=st*z,ut=et*y+3*ct*z*A+3*X*z*z*w+rt*I,gt=et*b+3*ct*z*g+3*X*z*z*$+rt*j,dt=y+2*z*(A-y)+st*(w-2*A+y),ht=b+2*z*(g-b)+st*($-2*g+b),Ct=A+2*z*(w-A)+st*(I-2*w+A),mt=g+2*z*($-g)+st*(j-2*$+g),_t=X*y+z*A,yt=X*b+z*g,Ht=X*w+z*I,Gt=X*$+z*j,qt=90-180*K.atan2(dt-Ct,ht-mt)/bt;return(dt>Ct||ht<mt)&&(qt+=180),{x:ut,y:gt,m:{x:dt,y:ht},n:{x:Ct,y:mt},start:{x:_t,y:yt},end:{x:Ht,y:Gt},alpha:qt}},h.bezierBBox=function(y,b,A,g,w,$,I,j){h.is(y,"array")||(y=[y,b,A,g,w,$,I,j]);var z=Ln.apply(null,y);return{x:z.min.x,y:z.min.y,x2:z.max.x,y2:z.max.y,width:z.max.x-z.min.x,height:z.max.y-z.min.y}},h.isPointInsideBBox=function(y,b,A){return b>=y.x&&b<=y.x2&&A>=y.y&&A<=y.y2},h.isBBoxIntersect=function(y,b){var A=h.isPointInsideBBox;return A(b,y.x,y.y)||A(b,y.x2,y.y)||A(b,y.x,y.y2)||A(b,y.x2,y.y2)||A(y,b.x,b.y)||A(y,b.x2,b.y)||A(y,b.x,b.y2)||A(y,b.x2,b.y2)||(y.x<b.x2&&y.x>b.x||b.x<y.x2&&b.x>y.x)&&(y.y<b.y2&&y.y>b.y||b.y<y.y2&&b.y>y.y)},h.pathIntersection=function(y,b){return yr(y,b)},h.pathIntersectionNumber=function(y,b){return yr(y,b,1)},h.isPointInsidePath=function(y,b,A){var g=h.pathBBox(y);return h.isPointInsideBBox(g,b,A)&&yr(y,[["M",b,A],["H",g.x2+10]],1)%2==1},h._removedFactory=function(y){return function(){o("raphael.log",null,"Raphaël: you are calling to method “"+y+"” of removed object",y)}};var _n=h.pathBBox=function(y){var b=ke(y);if(b.bbox)return Pe(b.bbox);if(!y)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var A,g=0,w=0,$=[],I=[],j=0,z=(y=Gr(y)).length;j<z;j++)if((A=y[j])[0]=="M")g=A[1],w=A[2],$.push(g),I.push(w);else{var X=Ln(g,w,A[1],A[2],A[3],A[4],A[5],A[6]);$=$[m](X.min.x,X.max.x),I=I[m](X.min.y,X.max.y),g=A[5],w=A[6]}var et=W[x](0,$),ct=W[x](0,I),st=tt[x](0,$),rt=tt[x](0,I),ut=st-et,gt=rt-ct,dt={x:et,y:ct,x2:st,y2:rt,width:ut,height:gt,cx:et+ut/2,cy:ct+gt/2};return b.bbox=Pe(dt),dt},Ee=function(y){var b=Pe(y);return b.toString=h._path2string,b},vs=h._pathToRelative=function(y){var b=ke(y);if(b.rel)return Ee(b.rel);h.is(y,it)&&h.is(y&&y[0],it)||(y=h.parsePathString(y));var A=[],g=0,w=0,$=0,I=0,j=0;y[0][0]=="M"&&($=g=y[0][1],I=w=y[0][2],j++,A.push(["M",g,w]));for(var z=j,X=y.length;z<X;z++){var et=A[z]=[],ct=y[z];if(ct[0]!=B.call(ct[0]))switch(et[0]=B.call(ct[0]),et[0]){case"a":et[1]=ct[1],et[2]=ct[2],et[3]=ct[3],et[4]=ct[4],et[5]=ct[5],et[6]=+(ct[6]-g).toFixed(3),et[7]=+(ct[7]-w).toFixed(3);break;case"v":et[1]=+(ct[1]-w).toFixed(3);break;case"m":$=ct[1],I=ct[2];default:for(var st=1,rt=ct.length;st<rt;st++)et[st]=+(ct[st]-(st%2?g:w)).toFixed(3)}else{et=A[z]=[],ct[0]=="m"&&($=ct[1]+g,I=ct[2]+w);for(var ut=0,gt=ct.length;ut<gt;ut++)A[z][ut]=ct[ut]}var dt=A[z].length;switch(A[z][0]){case"z":g=$,w=I;break;case"h":g+=+A[z][dt-1];break;case"v":w+=+A[z][dt-1];break;default:g+=+A[z][dt-2],w+=+A[z][dt-1]}}return A.toString=h._path2string,b.rel=Ee(A),A},Wn=h._pathToAbsolute=function(y){var b=ke(y);if(b.abs)return Ee(b.abs);if(h.is(y,it)&&h.is(y&&y[0],it)||(y=h.parsePathString(y)),!y||!y.length)return[["M",0,0]];var A=[],g=0,w=0,$=0,I=0,j=0;y[0][0]=="M"&&($=g=+y[0][1],I=w=+y[0][2],j++,A[0]=["M",g,w]);for(var z,X,et=y.length==3&&y[0][0]=="M"&&y[1][0].toUpperCase()=="R"&&y[2][0].toUpperCase()=="Z",ct=j,st=y.length;ct<st;ct++){if(A.push(z=[]),(X=y[ct])[0]!=M.call(X[0]))switch(z[0]=M.call(X[0]),z[0]){case"A":z[1]=X[1],z[2]=X[2],z[3]=X[3],z[4]=X[4],z[5]=X[5],z[6]=+(X[6]+g),z[7]=+(X[7]+w);break;case"V":z[1]=+X[1]+w;break;case"H":z[1]=+X[1]+g;break;case"R":for(var rt=[g,w][m](X.slice(1)),ut=2,gt=rt.length;ut<gt;ut++)rt[ut]=+rt[ut]+g,rt[++ut]=+rt[ut]+w;A.pop(),A=A[m](Qn(rt,et));break;case"M":$=+X[1]+g,I=+X[2]+w;default:for(ut=1,gt=X.length;ut<gt;ut++)z[ut]=+X[ut]+(ut%2?g:w)}else if(X[0]=="R")rt=[g,w][m](X.slice(1)),A.pop(),A=A[m](Qn(rt,et)),z=["R"][m](X.slice(-2));else for(var dt=0,ht=X.length;dt<ht;dt++)z[dt]=X[dt];switch(z[0]){case"Z":g=$,w=I;break;case"H":g=z[1];break;case"V":w=z[1];break;case"M":$=z[z.length-2],I=z[z.length-1];default:g=z[z.length-2],w=z[z.length-1]}}return A.toString=h._path2string,b.abs=Ee(A),A},tr=function(y,b,A,g){return[y,b,A,g,A,g]},wn=function(y,b,A,g,w,$){return[1/3*y+2/3*A,1/3*b+2/3*g,1/3*w+2/3*A,1/3*$+2/3*g,w,$]},Ur=function(y,b,A,g,w,$,I,j,z,X){var et,ct=120*bt/180,st=bt/180*(+w||0),rt=[],ut=je(function(Vv,Bv,Bl){return{x:Vv*K.cos(Bl)-Bv*K.sin(Bl),y:Vv*K.sin(Bl)+Bv*K.cos(Bl)}});if(X)Gt=X[0],qt=X[1],yt=X[2],Ht=X[3];else{y=(et=ut(y,b,-st)).x,b=et.y,j=(et=ut(j,z,-st)).x,z=et.y;var gt=(y-j)/2,dt=(b-z)/2,ht=gt*gt/(A*A)+dt*dt/(g*g);ht>1&&(A*=ht=K.sqrt(ht),g*=ht);var Ct=A*A,mt=g*g,_t=($==I?-1:1)*K.sqrt(lt((Ct*mt-Ct*dt*dt-mt*gt*gt)/(Ct*dt*dt+mt*gt*gt))),yt=_t*A*dt/g+(y+j)/2,Ht=_t*-g*gt/A+(b+z)/2,Gt=K.asin(((b-Ht)/g).toFixed(9)),qt=K.asin(((z-Ht)/g).toFixed(9));(Gt=y<yt?bt-Gt:Gt)<0&&(Gt=2*bt+Gt),(qt=j<yt?bt-qt:qt)<0&&(qt=2*bt+qt),I&&Gt>qt&&(Gt-=2*bt),!I&&qt>Gt&&(qt-=2*bt)}var _s=qt-Gt;if(lt(_s)>ct){var uo=qt,Sn=j,vr=z;qt=Gt+ct*(I&&qt>Gt?1:-1),j=yt+A*K.cos(qt),z=Ht+g*K.sin(qt),rt=Ur(j,z,A,g,w,0,I,Sn,vr,[qt,uo,yt,Ht])}_s=qt-Gt;var ws=K.cos(Gt),xs=K.sin(Gt),zl=K.cos(qt),Hr=K.sin(qt),Hi=K.tan(_s/4),Vl=4/3*A*Hi,jv=4/3*g*Hi,Lv=[y,b],bs=[y+Vl*xs,b-jv*ws],Uv=[j+Vl*Hr,z-jv*zl],Gv=[j,z];if(bs[0]=2*Lv[0]-bs[0],bs[1]=2*Lv[1]-bs[1],X)return[bs,Uv,Gv][m](rt);for(var zv=[],di=0,$O=(rt=[bs,Uv,Gv][m](rt).join()[R](",")).length;di<$O;di++)zv[di]=di%2?ut(rt[di-1],rt[di],st).y:ut(rt[di],rt[di+1],st).x;return zv},er=function(y,b,A,g,w,$,I,j,z){var X=1-z;return{x:wt(X,3)*y+3*wt(X,2)*z*A+3*X*z*z*w+wt(z,3)*I,y:wt(X,3)*b+3*wt(X,2)*z*g+3*X*z*z*$+wt(z,3)*j}},Ln=je(function(y,b,A,g,w,$,I,j){var z,X=w-2*A+y-(I-2*w+A),et=2*(A-y)-2*(w-A),ct=y-A,st=(-et+K.sqrt(et*et-4*X*ct))/2/X,rt=(-et-K.sqrt(et*et-4*X*ct))/2/X,ut=[b,j],gt=[y,I];return lt(st)>"1e12"&&(st=.5),lt(rt)>"1e12"&&(rt=.5),st>0&&st<1&&(z=er(y,b,A,g,w,$,I,j,st),gt.push(z.x),ut.push(z.y)),rt>0&&rt<1&&(z=er(y,b,A,g,w,$,I,j,rt),gt.push(z.x),ut.push(z.y)),X=$-2*g+b-(j-2*$+g),ct=b-g,st=(-(et=2*(g-b)-2*($-g))+K.sqrt(et*et-4*X*ct))/2/X,rt=(-et-K.sqrt(et*et-4*X*ct))/2/X,lt(st)>"1e12"&&(st=.5),lt(rt)>"1e12"&&(rt=.5),st>0&&st<1&&(z=er(y,b,A,g,w,$,I,j,st),gt.push(z.x),ut.push(z.y)),rt>0&&rt<1&&(z=er(y,b,A,g,w,$,I,j,rt),gt.push(z.x),ut.push(z.y)),{min:{x:W[x](0,gt),y:W[x](0,ut)},max:{x:tt[x](0,gt),y:tt[x](0,ut)}}}),Gr=h._path2curve=je(function(y,b){var A=!b&&ke(y);if(!b&&A.curve)return Ee(A.curve);for(var g=Wn(y),w=b&&Wn(b),$={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},I={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=function(_t,yt,Ht){var Gt,qt;if(!_t)return["C",yt.x,yt.y,yt.x,yt.y,yt.x,yt.y];switch(!(_t[0]in{T:1,Q:1})&&(yt.qx=yt.qy=null),_t[0]){case"M":yt.X=_t[1],yt.Y=_t[2];break;case"A":_t=["C"][m](Ur[x](0,[yt.x,yt.y][m](_t.slice(1))));break;case"S":Ht=="C"||Ht=="S"?(Gt=2*yt.x-yt.bx,qt=2*yt.y-yt.by):(Gt=yt.x,qt=yt.y),_t=["C",Gt,qt][m](_t.slice(1));break;case"T":Ht=="Q"||Ht=="T"?(yt.qx=2*yt.x-yt.qx,yt.qy=2*yt.y-yt.qy):(yt.qx=yt.x,yt.qy=yt.y),_t=["C"][m](wn(yt.x,yt.y,yt.qx,yt.qy,_t[1],_t[2]));break;case"Q":yt.qx=_t[1],yt.qy=_t[2],_t=["C"][m](wn(yt.x,yt.y,_t[1],_t[2],_t[3],_t[4]));break;case"L":_t=["C"][m](tr(yt.x,yt.y,_t[1],_t[2]));break;case"H":_t=["C"][m](tr(yt.x,yt.y,_t[1],yt.y));break;case"V":_t=["C"][m](tr(yt.x,yt.y,yt.x,_t[1]));break;case"Z":_t=["C"][m](tr(yt.x,yt.y,yt.X,yt.Y))}return _t},z=function(_t,yt){if(_t[yt].length>7){_t[yt].shift();for(var Ht=_t[yt];Ht.length;)et[yt]="A",w&&(ct[yt]="A"),_t.splice(yt++,0,["C"][m](Ht.splice(0,6)));_t.splice(yt,1),gt=tt(g.length,w&&w.length||0)}},X=function(_t,yt,Ht,Gt,qt){_t&&yt&&_t[qt][0]=="M"&&yt[qt][0]!="M"&&(yt.splice(qt,0,["M",Gt.x,Gt.y]),Ht.bx=0,Ht.by=0,Ht.x=_t[qt][1],Ht.y=_t[qt][2],gt=tt(g.length,w&&w.length||0))},et=[],ct=[],st="",rt="",ut=0,gt=tt(g.length,w&&w.length||0);ut<gt;ut++){g[ut]&&(st=g[ut][0]),st!="C"&&(et[ut]=st,ut&&(rt=et[ut-1])),g[ut]=j(g[ut],$,rt),et[ut]!="A"&&st=="C"&&(et[ut]="C"),z(g,ut),w&&(w[ut]&&(st=w[ut][0]),st!="C"&&(ct[ut]=st,ut&&(rt=ct[ut-1])),w[ut]=j(w[ut],I,rt),ct[ut]!="A"&&st=="C"&&(ct[ut]="C"),z(w,ut)),X(g,w,$,I,ut),X(w,g,I,$,ut);var dt=g[ut],ht=w&&w[ut],Ct=dt.length,mt=w&&ht.length;$.x=dt[Ct-2],$.y=dt[Ct-1],$.bx=D(dt[Ct-4])||$.x,$.by=D(dt[Ct-3])||$.y,I.bx=w&&(D(ht[mt-4])||I.x),I.by=w&&(D(ht[mt-3])||I.y),I.x=w&&ht[mt-2],I.y=w&&ht[mt-1]}return w||(A.curve=Ee(g)),w?[g,w]:g},null,Ee),zr=(h._parseDots=je(function(y){for(var b=[],A=0,g=y.length;A<g;A++){var w={},$=y[A].match(/^([^:]*):?([\d\.]*)/);if(w.color=h.getRGB($[1]),w.color.error)return null;w.opacity=w.color.opacity,w.color=w.color.hex,$[2]&&(w.offset=$[2]+"%"),b.push(w)}for(A=1,g=b.length-1;A<g;A++)if(!b[A].offset){for(var I=D(b[A-1].offset||0),j=0,z=A+1;z<g;z++)if(b[z].offset){j=b[z].offset;break}j||(j=100,z=g);for(var X=((j=D(j))-I)/(z-A+1);A<z;A++)I+=X,b[A].offset=I+"%"}return b}),h._tear=function(y,b){y==b.top&&(b.top=y.prev),y==b.bottom&&(b.bottom=y.next),y.next&&(y.next.prev=y.prev),y.prev&&(y.prev.next=y.next)}),H=(h._tofront=function(y,b){b.top!==y&&(zr(y,b),y.next=null,y.prev=b.top,b.top.next=y,b.top=y)},h._toback=function(y,b){b.bottom!==y&&(zr(y,b),y.next=b.bottom,y.prev=null,b.bottom.prev=y,b.bottom=y)},h._insertafter=function(y,b,A){zr(y,A),b==A.top&&(A.top=y),b.next&&(b.next.prev=y),y.next=b.next,y.prev=b,b.next=y},h._insertbefore=function(y,b,A){zr(y,A),b==A.bottom&&(A.bottom=y),b.prev&&(b.prev.next=y),y.prev=b.prev,b.prev=y,y.next=b},h.toMatrix=function(y,b){var A=_n(y),g={_:{transform:F},getBBox:function(){return A}};return J(g,b),g.matrix}),J=(h.transformPath=function(y,b){return ue(y,H(y,b))},h._extractTransform=function(y,b){if(b==null)return y._.transform;b=N(b).replace(/\.{3}|\u2026/g,y._.transform||F);var A,g,w=h.parseTransformString(b),$=0,I=1,j=1,z=y._,X=new ot;if(z.transform=w||[],w)for(var et=0,ct=w.length;et<ct;et++){var st,rt,ut,gt,dt,ht=w[et],Ct=ht.length,mt=N(ht[0]).toLowerCase(),_t=ht[0]!=mt,yt=_t?X.invert():0;mt=="t"&&Ct==3?_t?(st=yt.x(0,0),rt=yt.y(0,0),ut=yt.x(ht[1],ht[2]),gt=yt.y(ht[1],ht[2]),X.translate(ut-st,gt-rt)):X.translate(ht[1],ht[2]):mt=="r"?Ct==2?(dt=dt||y.getBBox(1),X.rotate(ht[1],dt.x+dt.width/2,dt.y+dt.height/2),$+=ht[1]):Ct==4&&(_t?(ut=yt.x(ht[2],ht[3]),gt=yt.y(ht[2],ht[3]),X.rotate(ht[1],ut,gt)):X.rotate(ht[1],ht[2],ht[3]),$+=ht[1]):mt=="s"?Ct==2||Ct==3?(dt=dt||y.getBBox(1),X.scale(ht[1],ht[Ct-1],dt.x+dt.width/2,dt.y+dt.height/2),I*=ht[1],j*=ht[Ct-1]):Ct==5&&(_t?(ut=yt.x(ht[3],ht[4]),gt=yt.y(ht[3],ht[4]),X.scale(ht[1],ht[2],ut,gt)):X.scale(ht[1],ht[2],ht[3],ht[4]),I*=ht[1],j*=ht[2]):mt=="m"&&Ct==7&&X.add(ht[1],ht[2],ht[3],ht[4],ht[5],ht[6]),z.dirtyT=1,y.matrix=X}y.matrix=X,z.sx=I,z.sy=j,z.deg=$,z.dx=A=X.e,z.dy=g=X.f,I==1&&j==1&&!$&&z.bbox?(z.bbox.x+=+A,z.bbox.y+=+g):z.dirtyT=1}),Q=function(y){var b=y[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return y.length==4?[b,0,y[2],y[3]]:[b,0];case"s":return y.length==5?[b,1,1,y[3],y[4]]:y.length==3?[b,1,1]:[b,1]}},at=h._equaliseTransform=function(y,b){b=N(b).replace(/\.{3}|\u2026/g,y),y=h.parseTransformString(y)||[],b=h.parseTransformString(b)||[];for(var A,g,w,$,I=tt(y.length,b.length),j=[],z=[],X=0;X<I;X++){if(w=y[X]||Q(b[X]),$=b[X]||Q(w),w[0]!=$[0]||w[0].toLowerCase()=="r"&&(w[2]!=$[2]||w[3]!=$[3])||w[0].toLowerCase()=="s"&&(w[3]!=$[3]||w[4]!=$[4]))return;for(j[X]=[],z[X]=[],A=0,g=tt(w.length,$.length);A<g;A++)A in w&&(j[X][A]=w[A]),A in $&&(z[X][A]=$[A])}return{from:j,to:z}};function ot(y,b,A,g,w,$){y!=null?(this.a=+y,this.b=+b,this.c=+A,this.d=+g,this.e=+w,this.f=+$):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}h._getContainer=function(y,b,A,g){var w;if((w=g!=null||h.is(y,"object")?y:v.doc.getElementById(y))!=null)return w.tagName?b==null?{container:w,width:w.style.pixelWidth||w.offsetWidth,height:w.style.pixelHeight||w.offsetHeight}:{container:w,width:b,height:A}:{container:1,x:y,y:b,width:A,height:g}},h.pathToRelative=vs,h._engine={},h.path2curve=Gr,h.matrix=function(y,b,A,g,w,$){return new ot(y,b,A,g,w,$)},function(y){function b(g){return g[0]*g[0]+g[1]*g[1]}function A(g){var w=K.sqrt(b(g));g[0]&&(g[0]/=w),g[1]&&(g[1]/=w)}y.add=function(g,w,$,I,j,z){var X,et,ct,st,rt=[[],[],[]],ut=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],gt=[[g,$,j],[w,I,z],[0,0,1]];for(g&&g instanceof ot&&(gt=[[g.a,g.c,g.e],[g.b,g.d,g.f],[0,0,1]]),X=0;X<3;X++)for(et=0;et<3;et++){for(st=0,ct=0;ct<3;ct++)st+=ut[X][ct]*gt[ct][et];rt[X][et]=st}this.a=rt[0][0],this.b=rt[1][0],this.c=rt[0][1],this.d=rt[1][1],this.e=rt[0][2],this.f=rt[1][2]},y.invert=function(){var g=this,w=g.a*g.d-g.b*g.c;return new ot(g.d/w,-g.b/w,-g.c/w,g.a/w,(g.c*g.f-g.d*g.e)/w,(g.b*g.e-g.a*g.f)/w)},y.clone=function(){return new ot(this.a,this.b,this.c,this.d,this.e,this.f)},y.translate=function(g,w){this.add(1,0,0,1,g,w)},y.scale=function(g,w,$,I){w==null&&(w=g),($||I)&&this.add(1,0,0,1,$,I),this.add(g,0,0,w,0,0),($||I)&&this.add(1,0,0,1,-$,-I)},y.rotate=function(g,w,$){g=h.rad(g),w=w||0,$=$||0;var I=+K.cos(g).toFixed(9),j=+K.sin(g).toFixed(9);this.add(I,j,-j,I,w,$),this.add(1,0,0,1,-w,-$)},y.x=function(g,w){return g*this.a+w*this.c+this.e},y.y=function(g,w){return g*this.b+w*this.d+this.f},y.get=function(g){return+this[N.fromCharCode(97+g)].toFixed(4)},y.toString=function(){return h.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},y.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},y.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},y.split=function(){var g={};g.dx=this.e,g.dy=this.f;var w=[[this.a,this.c],[this.b,this.d]];g.scalex=K.sqrt(b(w[0])),A(w[0]),g.shear=w[0][0]*w[1][0]+w[0][1]*w[1][1],w[1]=[w[1][0]-w[0][0]*g.shear,w[1][1]-w[0][1]*g.shear],g.scaley=K.sqrt(b(w[1])),A(w[1]),g.shear/=g.scaley;var $=-w[0][1],I=w[1][1];return I<0?(g.rotate=h.deg(K.acos(I)),$<0&&(g.rotate=360-g.rotate)):g.rotate=h.deg(K.asin($)),g.isSimple=!(+g.shear.toFixed(9)||g.scalex.toFixed(9)!=g.scaley.toFixed(9)&&g.rotate),g.isSuperSimple=!+g.shear.toFixed(9)&&g.scalex.toFixed(9)==g.scaley.toFixed(9)&&!g.rotate,g.noRotation=!+g.shear.toFixed(9)&&!g.rotate,g},y.toTransformString=function(g){var w=g||this[R]();return w.isSimple?(w.scalex=+w.scalex.toFixed(4),w.scaley=+w.scaley.toFixed(4),w.rotate=+w.rotate.toFixed(4),(w.dx||w.dy?"t"+[w.dx,w.dy]:F)+(w.scalex!=1||w.scaley!=1?"s"+[w.scalex,w.scaley,0,0]:F)+(w.rotate?"r"+[w.rotate,0,0]:F)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(ot.prototype);for(var Mt=function(){this.returnValue=!1},Nt=function(){return this.originalEvent.preventDefault()},re=function(){this.cancelBubble=!0},Ce=function(){return this.originalEvent.stopPropagation()},he=function(y){var b=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,A=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft;return{x:y.clientX+A,y:y.clientY+b}},Yt=v.doc.addEventListener?function(y,b,A,g){var w=function(I){var j=he(I);return A.call(g,I,j.x,j.y)};if(y.addEventListener(b,w,!1),k&&U[b]){var $=function(I){for(var j=he(I),z=I,X=0,et=I.targetTouches&&I.targetTouches.length;X<et;X++)if(I.targetTouches[X].target==y){(I=I.targetTouches[X]).originalEvent=z,I.preventDefault=Nt,I.stopPropagation=Ce;break}return A.call(g,I,j.x,j.y)};y.addEventListener(U[b],$,!1)}return function(){return y.removeEventListener(b,w,!1),k&&U[b]&&y.removeEventListener(U[b],$,!1),!0}}:v.doc.attachEvent?function(y,b,A,g){var w=function($){$=$||v.win.event;var I=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,j=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft,z=$.clientX+j,X=$.clientY+I;return $.preventDefault=$.preventDefault||Mt,$.stopPropagation=$.stopPropagation||re,A.call(g,$,z,X)};return y.attachEvent("on"+b,w),function(){return y.detachEvent("on"+b,w),!0}}:void 0,Qt=[],fe=function(y){for(var b,A=y.clientX,g=y.clientY,w=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,$=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft,I=Qt.length;I--;){if(b=Qt[I],k&&y.touches){for(var j,z=y.touches.length;z--;)if((j=y.touches[z]).identifier==b.el._drag.id){A=j.clientX,g=j.clientY,(y.originalEvent?y.originalEvent:y).preventDefault();break}}else y.preventDefault();var X,et=b.el.node,ct=et.nextSibling,st=et.parentNode,rt=et.style.display;v.win.opera&&st.removeChild(et),et.style.display="none",X=b.el.paper.getElementByPoint(A,g),et.style.display=rt,v.win.opera&&(ct?st.insertBefore(et,ct):st.appendChild(et)),X&&o("raphael.drag.over."+b.el.id,b.el,X),A+=$,g+=w,o("raphael.drag.move."+b.el.id,b.move_scope||b.el,A-b.el._drag.x,g-b.el._drag.y,A,g,y)}},Ut=function(y){h.unmousemove(fe).unmouseup(Ut);for(var b,A=Qt.length;A--;)(b=Qt[A]).el._drag={},o("raphael.drag.end."+b.el.id,b.end_scope||b.start_scope||b.move_scope||b.el,y);Qt=[]},It=h.el={},pe=L.length;pe--;)(function(y){h[y]=It[y]=function(b,A){return h.is(b,"function")&&(this.events=this.events||[],this.events.push({name:y,f:b,unbind:Yt(this.shape||this.node||v.doc,y,b,A||this)})),this},h["un"+y]=It["un"+y]=function(b){for(var A=this.events||[],g=A.length;g--;)A[g].name!=y||!h.is(b,"undefined")&&A[g].f!=b||(A[g].unbind(),A.splice(g,1),!A.length&&delete this.events);return this}})(L[pe]);It.data=function(y,b){var A=At[this.id]=At[this.id]||{};if(arguments.length==0)return A;if(arguments.length==1){if(h.is(y,"object")){for(var g in y)y[p](g)&&this.data(g,y[g]);return this}return o("raphael.data.get."+this.id,this,A[y],y),A[y]}return A[y]=b,o("raphael.data.set."+this.id,this,b,y),this},It.removeData=function(y){return y==null?delete At[this.id]:At[this.id]&&delete At[this.id][y],this},It.getData=function(){return Pe(At[this.id]||{})},It.hover=function(y,b,A,g){return this.mouseover(y,A).mouseout(b,g||A)},It.unhover=function(y,b){return this.unmouseover(y).unmouseout(b)};var Le=[];It.drag=function(y,b,A,g,w,$){function I(j){(j.originalEvent||j).preventDefault();var z=j.clientX,X=j.clientY,et=v.doc.documentElement.scrollTop||v.doc.body.scrollTop,ct=v.doc.documentElement.scrollLeft||v.doc.body.scrollLeft;if(this._drag.id=j.identifier,k&&j.touches){for(var st,rt=j.touches.length;rt--;)if(st=j.touches[rt],this._drag.id=st.identifier,st.identifier==this._drag.id){z=st.clientX,X=st.clientY;break}}this._drag.x=z+ct,this._drag.y=X+et,!Qt.length&&h.mousemove(fe).mouseup(Ut),Qt.push({el:this,move_scope:g,start_scope:w,end_scope:$}),b&&o.on("raphael.drag.start."+this.id,b),y&&o.on("raphael.drag.move."+this.id,y),A&&o.on("raphael.drag.end."+this.id,A),o("raphael.drag.start."+this.id,w||g||this,this._drag.x,this._drag.y,j)}return this._drag={},Le.push({el:this,start:I}),this.mousedown(I),this},It.onDragOver=function(y){y?o.on("raphael.drag.over."+this.id,y):o.unbind("raphael.drag.over."+this.id)},It.undrag=function(){for(var y=Le.length;y--;)Le[y].el==this&&(this.unmousedown(Le[y].start),Le.splice(y,1),o.unbind("raphael.drag.*."+this.id));!Le.length&&h.unmousemove(fe).unmouseup(Ut),Qt=[]},c.circle=function(y,b,A){var g=h._engine.circle(this,y||0,b||0,A||0);return this.__set__&&this.__set__.push(g),g},c.rect=function(y,b,A,g,w){var $=h._engine.rect(this,y||0,b||0,A||0,g||0,w||0);return this.__set__&&this.__set__.push($),$},c.ellipse=function(y,b,A,g){var w=h._engine.ellipse(this,y||0,b||0,A||0,g||0);return this.__set__&&this.__set__.push(w),w},c.path=function(y){y&&!h.is(y,"string")&&!h.is(y[0],it)&&(y+=F);var b=h._engine.path(h.format[x](h,arguments),this);return this.__set__&&this.__set__.push(b),b},c.image=function(y,b,A,g,w){var $=h._engine.image(this,y||"about:blank",b||0,A||0,g||0,w||0);return this.__set__&&this.__set__.push($),$},c.text=function(y,b,A){var g=h._engine.text(this,y||0,b||0,N(A));return this.__set__&&this.__set__.push(g),g},c.set=function(y){!h.is(y,"array")&&(y=Array.prototype.splice.call(arguments,0,arguments.length));var b=new Vi(y);return this.__set__&&this.__set__.push(b),b.paper=this,b.type="set",b},c.setStart=function(y){this.__set__=y||this.set()},c.setFinish=function(y){var b=this.__set__;return delete this.__set__,b},c.getSize=function(){var y=this.canvas.parentNode;return{width:y.offsetWidth,height:y.offsetHeight}},c.setSize=function(y,b){return h._engine.setSize.call(this,y,b)},c.setViewBox=function(y,b,A,g,w){return h._engine.setViewBox.call(this,y,b,A,g,w)},c.top=c.bottom=null,c.raphael=h;function xn(){return this.x+P+this.y+P+this.width+" × "+this.height}c.getElementByPoint=function(y,b){var A,g,w,$,I,j,z,X=this.canvas,et=v.doc.elementFromPoint(y,b);if(v.win.opera&&et.tagName=="svg"){var ct=(g=(A=X).getBoundingClientRect(),w=A.ownerDocument,$=w.body,I=w.documentElement,j=I.clientTop||$.clientTop||0,z=I.clientLeft||$.clientLeft||0,{y:g.top+(v.win.pageYOffset||I.scrollTop||$.scrollTop)-j,x:g.left+(v.win.pageXOffset||I.scrollLeft||$.scrollLeft)-z}),st=X.createSVGRect();st.x=y-ct.x,st.y=b-ct.y,st.width=st.height=1;var rt=X.getIntersectionList(st,null);rt.length&&(et=rt[rt.length-1])}if(!et)return null;for(;et.parentNode&&et!=X.parentNode&&!et.raphael;)et=et.parentNode;return et==this.canvas.parentNode&&(et=X),et=et&&et.raphael?this.getById(et.raphaelid):null},c.getElementsByBBox=function(y){var b=this.set();return this.forEach(function(A){h.isBBoxIntersect(A.getBBox(),y)&&b.push(A)}),b},c.getById=function(y){for(var b=this.bottom;b;){if(b.id==y)return b;b=b.next}return null},c.forEach=function(y,b){for(var A=this.bottom;A;){if(y.call(b,A)===!1)return this;A=A.next}return this},c.getElementsByPoint=function(y,b){var A=this.set();return this.forEach(function(g){g.isPointInside(y,b)&&A.push(g)}),A},It.isPointInside=function(y,b){var A=this.realPath=Jt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(A=h.transformPath(A,this.attr("transform"))),h.isPointInsidePath(A,y,b)},It.getBBox=function(y){if(this.removed)return{};var b=this._;return y?(!b.dirty&&b.bboxwt||(this.realPath=Jt[this.type](this),b.bboxwt=_n(this.realPath),b.bboxwt.toString=xn,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&(!b.dirty&&this.realPath||(b.bboxwt=0,this.realPath=Jt[this.type](this)),b.bbox=_n(ue(this.realPath,this.matrix)),b.bbox.toString=xn,b.dirty=b.dirtyT=0),b.bbox)},It.clone=function(){if(this.removed)return null;var y=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(y),y},It.glow=function(y){if(this.type=="text")return null;var b={width:((y=y||{}).width||10)+(+this.attr("stroke-width")||1),fill:y.fill||!1,opacity:y.opacity==null?.5:y.opacity,offsetx:y.offsetx||0,offsety:y.offsety||0,color:y.color||"#000"},A=b.width/2,g=this.paper,w=g.set(),$=this.realPath||Jt[this.type](this);$=this.matrix?ue($,this.matrix):$;for(var I=1;I<A+1;I++)w.push(g.path($).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/A*I).toFixed(3),opacity:+(b.opacity/A).toFixed(3)}));return w.insertBefore(this).translate(b.offsetx,b.offsety)};var _e=function(y,b,A,g,w,$,I,j,z){return z==null?fn(y,b,A,g,w,$,I,j):h.findDotsAtSegment(y,b,A,g,w,$,I,j,function(X,et,ct,st,rt,ut,gt,dt,ht){if(!(ht<0||fn(X,et,ct,st,rt,ut,gt,dt)<ht)){var Ct,mt=.5,_t=1-mt;for(Ct=fn(X,et,ct,st,rt,ut,gt,dt,_t);lt(Ct-ht)>.01;)Ct=fn(X,et,ct,st,rt,ut,gt,dt,_t+=(Ct<ht?1:-1)*(mt/=2));return _t}}(y,b,A,g,w,$,I,j,z))},Ue=function(y,b){return function(A,g,w){for(var $,I,j,z,X,et="",ct={},st=0,rt=0,ut=(A=Gr(A)).length;rt<ut;rt++){if((j=A[rt])[0]=="M")$=+j[1],I=+j[2];else{if(st+(z=_e($,I,j[1],j[2],j[3],j[4],j[5],j[6]))>g){if(b&&!ct.start){if(et+=["C"+(X=_e($,I,j[1],j[2],j[3],j[4],j[5],j[6],g-st)).start.x,X.start.y,X.m.x,X.m.y,X.x,X.y],w)return et;ct.start=et,et=["M"+X.x,X.y+"C"+X.n.x,X.n.y,X.end.x,X.end.y,j[5],j[6]].join(),st+=z,$=+j[5],I=+j[6];continue}if(!y&&!b)return{x:(X=_e($,I,j[1],j[2],j[3],j[4],j[5],j[6],g-st)).x,y:X.y,alpha:X.alpha}}st+=z,$=+j[5],I=+j[6]}et+=j.shift()+j}return ct.end=et,(X=y?st:b?ct:h.findDotsAtSegment($,I,j[0],j[1],j[2],j[3],j[4],j[5],1)).alpha&&(X={x:X.x,y:X.y,alpha:X.alpha}),X}},He=Ue(1),Ge=Ue(),Re=Ue(0,1);h.getTotalLength=He,h.getPointAtLength=Ge,h.getSubpath=function(y,b,A){if(this.getTotalLength(y)-A<1e-6)return Re(y,b).end;var g=Re(y,A,1);return b?Re(g,b).end:g},It.getTotalLength=function(){var y=this.getPath();if(y)return this.node.getTotalLength?this.node.getTotalLength():He(y)},It.getPointAtLength=function(y){var b=this.getPath();if(b)return Ge(b,y)},It.getPath=function(){var y,b=h._getPath[this.type];if(this.type!="text"&&this.type!="set")return b&&(y=b(this)),y},It.getSubpath=function(y,b){var A=this.getPath();if(A)return h.getSubpath(A,y,b)};var ae=h.easing_formulas={linear:function(y){return y},"<":function(y){return wt(y,1.7)},">":function(y){return wt(y,.48)},"<>":function(y){var b=.48-y/1.04,A=K.sqrt(.1734+b*b),g=A-b,w=-A-b,$=wt(lt(g),1/3)*(g<0?-1:1)+wt(lt(w),1/3)*(w<0?-1:1)+.5;return 3*(1-$)*$*$+$*$*$},backIn:function(y){var b=1.70158;return y*y*((b+1)*y-b)},backOut:function(y){var b=1.70158;return(y-=1)*y*((b+1)*y+b)+1},elastic:function(y){return y==!!y?y:wt(2,-10*y)*K.sin(2*bt*(y-.075)/.3)+1},bounce:function(y){var b=7.5625,A=2.75;return y<1/A?b*y*y:y<2/A?b*(y-=1.5/A)*y+.75:y<2.5/A?b*(y-=2.25/A)*y+.9375:b*(y-=2.625/A)*y+.984375}};ae.easeIn=ae["ease-in"]=ae["<"],ae.easeOut=ae["ease-out"]=ae[">"],ae.easeInOut=ae["ease-in-out"]=ae["<>"],ae["back-in"]=ae.backIn,ae["back-out"]=ae.backOut;var Lt=[],on=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(y){setTimeout(y,16)},nr=function(){for(var y=+new Date,b=0;b<Lt.length;b++){var A=Lt[b];if(!A.el.removed&&!A.paused){var g,w,$=y-A.start,I=A.ms,j=A.easing,z=A.from,X=A.diff,et=A.to,ct=(A.t,A.el),st={},rt={};if(A.initstatus?($=(A.initstatus*A.anim.top-A.prev)/(A.percent-A.prev)*I,A.status=A.initstatus,delete A.initstatus,A.stop&&Lt.splice(b--,1)):A.status=(A.prev+(A.percent-A.prev)*($/I))/A.anim.top,!($<0))if($<I){var ut=j($/I);for(var gt in z)if(z[p](gt)){switch(q[gt]){case xt:g=+z[gt]+ut*I*X[gt];break;case"colour":g="rgb("+[rr(C(z[gt].r+ut*I*X[gt].r)),rr(C(z[gt].g+ut*I*X[gt].g)),rr(C(z[gt].b+ut*I*X[gt].b))].join(",")+")";break;case"path":g=[];for(var dt=0,ht=z[gt].length;dt<ht;dt++){g[dt]=[z[gt][dt][0]];for(var Ct=1,mt=z[gt][dt].length;Ct<mt;Ct++)g[dt][Ct]=+z[gt][dt][Ct]+ut*I*X[gt][dt][Ct];g[dt]=g[dt].join(P)}g=g.join(P);break;case"transform":if(X[gt].real)for(g=[],dt=0,ht=z[gt].length;dt<ht;dt++)for(g[dt]=[z[gt][dt][0]],Ct=1,mt=z[gt][dt].length;Ct<mt;Ct++)g[dt][Ct]=z[gt][dt][Ct]+ut*I*X[gt][dt][Ct];else{var _t=function(Ht){return+z[gt][Ht]+ut*I*X[gt][Ht]};g=[["m",_t(0),_t(1),_t(2),_t(3),_t(4),_t(5)]]}break;case"csv":if(gt=="clip-rect")for(g=[],dt=4;dt--;)g[dt]=+z[gt][dt]+ut*I*X[gt][dt];break;default:var yt=[][m](z[gt]);for(g=[],dt=ct.paper.customAttributes[gt].length;dt--;)g[dt]=+yt[dt]+ut*I*X[gt][dt]}st[gt]=g}ct.attr(st),function(Ht,Gt,qt){setTimeout(function(){o("raphael.anim.frame."+Ht,Gt,qt)})}(ct.id,ct,A.anim)}else{if(function(Ht,Gt,qt){setTimeout(function(){o("raphael.anim.frame."+Gt.id,Gt,qt),o("raphael.anim.finish."+Gt.id,Gt,qt),h.is(Ht,"function")&&Ht.call(Gt)})}(A.callback,ct,A.anim),ct.attr(et),Lt.splice(b--,1),A.repeat>1&&!A.next){for(w in et)et[p](w)&&(rt[w]=A.totalOrigin[w]);A.el.attr(rt),bn(A.anim,A.el,A.anim.percents[0],null,A.totalOrigin,A.repeat-1)}A.next&&!A.stop&&bn(A.anim,A.el,A.next,null,A.totalOrigin,A.repeat)}}}Lt.length&&on(nr)},rr=function(y){return y>255?255:y<0?0:y};function Qe(y,b,A,g,w,$){var I=3*b,j=3*(g-b)-I,z=1-I-j,X=3*A,et=3*(w-A)-X,ct=1-X-et;function st(rt){return((z*rt+j)*rt+I)*rt}return function(rt,ut){var gt=function(dt,ht){var Ct,mt,_t,yt,Ht,Gt;for(_t=dt,Gt=0;Gt<8;Gt++){if(yt=st(_t)-dt,lt(yt)<ht)return _t;if(lt(Ht=(3*z*_t+2*j)*_t+I)<1e-6)break;_t-=yt/Ht}if(mt=1,(_t=dt)<(Ct=0))return Ct;if(_t>mt)return mt;for(;Ct<mt;){if(yt=st(_t),lt(yt-dt)<ht)return _t;dt>yt?Ct=_t:mt=_t,_t=(mt-Ct)/2+Ct}return _t}(rt,ut);return((ct*gt+et)*gt+X)*gt}(y,1/(200*$))}function qe(y,b){var A=[],g={};if(this.ms=b,this.times=1,y){for(var w in y)y[p](w)&&(g[D(w)]=y[w],A.push(D(w)));A.sort(jt)}this.anim=g,this.top=A[A.length-1],this.percents=A}function bn(y,b,A,g,w,$){A=D(A);var I,j,z,X,et,ct,st=y.ms,rt={},ut={},gt={};if(g)for(ht=0,Ct=Lt.length;ht<Ct;ht++){var dt=Lt[ht];if(dt.el.id==b.id&&dt.anim==y){dt.percent!=A?(Lt.splice(ht,1),z=1):j=dt,b.attr(dt.totalOrigin);break}}else g=+ut;for(var ht=0,Ct=y.percents.length;ht<Ct;ht++){if(y.percents[ht]==A||y.percents[ht]>g*y.top){A=y.percents[ht],et=y.percents[ht-1]||0,st=st/y.top*(A-et),X=y.percents[ht+1],I=y.anim[A];break}g&&b.attr(y.anim[y.percents[ht]])}if(I){if(j)j.initstatus=g,j.start=new Date-j.ms*g;else{for(var mt in I)if(I[p](mt)&&(q[p](mt)||b.paper.customAttributes[p](mt)))switch(rt[mt]=b.attr(mt),rt[mt]==null&&(rt[mt]=V[mt]),ut[mt]=I[mt],q[mt]){case xt:gt[mt]=(ut[mt]-rt[mt])/st;break;case"colour":rt[mt]=h.getRGB(rt[mt]);var _t=h.getRGB(ut[mt]);gt[mt]={r:(_t.r-rt[mt].r)/st,g:(_t.g-rt[mt].g)/st,b:(_t.b-rt[mt].b)/st};break;case"path":var yt=Gr(rt[mt],ut[mt]),Ht=yt[1];for(rt[mt]=yt[0],gt[mt]=[],ht=0,Ct=rt[mt].length;ht<Ct;ht++){gt[mt][ht]=[0];for(var Gt=1,qt=rt[mt][ht].length;Gt<qt;Gt++)gt[mt][ht][Gt]=(Ht[ht][Gt]-rt[mt][ht][Gt])/st}break;case"transform":var _s=b._,uo=at(_s[mt],ut[mt]);if(uo)for(rt[mt]=uo.from,ut[mt]=uo.to,gt[mt]=[],gt[mt].real=!0,ht=0,Ct=rt[mt].length;ht<Ct;ht++)for(gt[mt][ht]=[rt[mt][ht][0]],Gt=1,qt=rt[mt][ht].length;Gt<qt;Gt++)gt[mt][ht][Gt]=(ut[mt][ht][Gt]-rt[mt][ht][Gt])/st;else{var Sn=b.matrix||new ot,vr={_:{transform:_s.transform},getBBox:function(){return b.getBBox(1)}};rt[mt]=[Sn.a,Sn.b,Sn.c,Sn.d,Sn.e,Sn.f],J(vr,ut[mt]),ut[mt]=vr._.transform,gt[mt]=[(vr.matrix.a-Sn.a)/st,(vr.matrix.b-Sn.b)/st,(vr.matrix.c-Sn.c)/st,(vr.matrix.d-Sn.d)/st,(vr.matrix.e-Sn.e)/st,(vr.matrix.f-Sn.f)/st]}break;case"csv":var ws=N(I[mt])[R](f),xs=N(rt[mt])[R](f);if(mt=="clip-rect")for(rt[mt]=xs,gt[mt]=[],ht=xs.length;ht--;)gt[mt][ht]=(ws[ht]-rt[mt][ht])/st;ut[mt]=ws;break;default:for(ws=[][m](I[mt]),xs=[][m](rt[mt]),gt[mt]=[],ht=b.paper.customAttributes[mt].length;ht--;)gt[mt][ht]=((ws[ht]||0)-(xs[ht]||0))/st}var zl=I.easing,Hr=h.easing_formulas[zl];if(!Hr)if((Hr=N(zl).match(T))&&Hr.length==5){var Hi=Hr;Hr=function(Vl){return Qe(Vl,+Hi[1],+Hi[2],+Hi[3],+Hi[4],st)}}else Hr=zt;if(dt={anim:y,percent:A,timestamp:ct=I.start||y.start||+new Date,start:ct+(y.del||0),status:0,initstatus:g||0,stop:!1,ms:st,easing:Hr,from:rt,diff:gt,to:ut,el:b,callback:I.callback,prev:et,next:X,repeat:$||y.times,origin:b.attr(),totalOrigin:w},Lt.push(dt),g&&!j&&!z&&(dt.stop=!0,dt.start=new Date-st*g,Lt.length==1))return nr();z&&(dt.start=new Date-dt.ms*g),Lt.length==1&&on(nr)}o("raphael.anim.start."+b.id,b,y)}}function Vr(y){for(var b=0;b<Lt.length;b++)Lt[b].el.paper==y&&Lt.splice(b--,1)}It.animateWith=function(y,b,A,g,w,$){if(this.removed)return $&&$.call(this),this;var I=A instanceof qe?A:h.animation(A,g,w,$);bn(I,this,I.percents[0],null,this.attr());for(var j=0,z=Lt.length;j<z;j++)if(Lt[j].anim==b&&Lt[j].el==y){Lt[z-1].start=Lt[j].start;break}return this},It.onAnimation=function(y){return y?o.on("raphael.anim.frame."+this.id,y):o.unbind("raphael.anim.frame."+this.id),this},qe.prototype.delay=function(y){var b=new qe(this.anim,this.ms);return b.times=this.times,b.del=+y||0,b},qe.prototype.repeat=function(y){var b=new qe(this.anim,this.ms);return b.del=this.del,b.times=K.floor(tt(y,0))||1,b},h.animation=function(y,b,A,g){if(y instanceof qe)return y;!h.is(A,"function")&&A||(g=g||A||null,A=null),y=Object(y),b=+b||0;var w,$,I={};for($ in y)y[p]($)&&D($)!=$&&D($)+"%"!=$&&(w=!0,I[$]=y[$]);if(w)return A&&(I.easing=A),g&&(I.callback=g),new qe({100:I},b);if(g){var j=0;for(var z in y){var X=G(z);y[p](z)&&X>j&&(j=X)}!y[j+="%"].callback&&(y[j].callback=g)}return new qe(y,b)},It.animate=function(y,b,A,g){if(this.removed)return g&&g.call(this),this;var w=y instanceof qe?y:h.animation(y,b,A,g);return bn(w,this,w.percents[0],null,this.attr()),this},It.setTime=function(y,b){return y&&b!=null&&this.status(y,W(b,y.ms)/y.ms),this},It.status=function(y,b){var A,g,w=[],$=0;if(b!=null)return bn(y,this,-1,W(b,1)),this;for(A=Lt.length;$<A;$++)if((g=Lt[$]).el.id==this.id&&(!y||g.anim==y)){if(y)return g.status;w.push({anim:g.anim,status:g.status})}return y?0:w},It.pause=function(y){for(var b=0;b<Lt.length;b++)Lt[b].el.id!=this.id||y&&Lt[b].anim!=y||o("raphael.anim.pause."+this.id,this,Lt[b].anim)!==!1&&(Lt[b].paused=!0);return this},It.resume=function(y){for(var b=0;b<Lt.length;b++)if(Lt[b].el.id==this.id&&(!y||Lt[b].anim==y)){var A=Lt[b];o("raphael.anim.resume."+this.id,this,A.anim)!==!1&&(delete A.paused,this.status(A.anim,A.status))}return this},It.stop=function(y){for(var b=0;b<Lt.length;b++)Lt[b].el.id!=this.id||y&&Lt[b].anim!=y||o("raphael.anim.stop."+this.id,this,Lt[b].anim)!==!1&&Lt.splice(b--,1);return this},o.on("raphael.remove",Vr),o.on("raphael.clear",Vr),It.toString=function(){return"Raphaël’s object"};var Br,Un,Gn,ir,Vi=function(y){if(this.items=[],this.length=0,this.type="set",y)for(var b=0,A=y.length;b<A;b++)!y[b]||y[b].constructor!=It.constructor&&y[b].constructor!=Vi||(this[this.items.length]=this.items[this.items.length]=y[b],this.length++)},Ke=Vi.prototype;for(var Bi in Ke.push=function(){for(var y,b,A=0,g=arguments.length;A<g;A++)!(y=arguments[A])||y.constructor!=It.constructor&&y.constructor!=Vi||(this[b=this.items.length]=this.items[b]=y,this.length++);return this},Ke.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Ke.forEach=function(y,b){for(var A=0,g=this.items.length;A<g;A++)if(y.call(b,this.items[A],A)===!1)return this;return this},It)It[p](Bi)&&(Ke[Bi]=function(y){return function(){var b=arguments;return this.forEach(function(A){A[y][x](A,b)})}}(Bi));return Ke.attr=function(y,b){if(y&&h.is(y,it)&&h.is(y[0],"object"))for(var A=0,g=y.length;A<g;A++)this.items[A].attr(y[A]);else for(var w=0,$=this.items.length;w<$;w++)this.items[w].attr(y,b);return this},Ke.clear=function(){for(;this.length;)this.pop()},Ke.splice=function(y,b,A){y=y<0?tt(this.length+y,0):y,b=tt(0,W(this.length-y,b));var g,w=[],$=[],I=[];for(g=2;g<arguments.length;g++)I.push(arguments[g]);for(g=0;g<b;g++)$.push(this[y+g]);for(;g<this.length-y;g++)w.push(this[y+g]);var j=I.length;for(g=0;g<j+w.length;g++)this.items[y+g]=this[y+g]=g<j?I[g]:w[g-j];for(g=this.items.length=this.length-=b-j;this[g];)delete this[g++];return new Vi($)},Ke.exclude=function(y){for(var b=0,A=this.length;b<A;b++)if(this[b]==y)return this.splice(b,1),!0},Ke.animate=function(y,b,A,g){(h.is(A,"function")||!A)&&(g=A||null);var w,$,I=this.items.length,j=I,z=this;if(!I)return this;g&&($=function(){!--I&&g.call(z)}),A=h.is(A,"string")?A:$;var X=h.animation(y,b,A,$);for(w=this.items[--j].animate(X);j--;)this.items[j]&&!this.items[j].removed&&this.items[j].animateWith(w,X,X),this.items[j]&&!this.items[j].removed||I--;return this},Ke.insertAfter=function(y){for(var b=this.items.length;b--;)this.items[b].insertAfter(y);return this},Ke.getBBox=function(){for(var y=[],b=[],A=[],g=[],w=this.items.length;w--;)if(!this.items[w].removed){var $=this.items[w].getBBox();y.push($.x),b.push($.y),A.push($.x+$.width),g.push($.y+$.height)}return{x:y=W[x](0,y),y:b=W[x](0,b),x2:A=tt[x](0,A),y2:g=tt[x](0,g),width:A-y,height:g-b}},Ke.clone=function(y){y=this.paper.set();for(var b=0,A=this.items.length;b<A;b++)y.push(this.items[b].clone());return y},Ke.toString=function(){return"Raphaël‘s set"},Ke.glow=function(y){var b=this.paper.set();return this.forEach(function(A,g){var w=A.glow(y);w==null||w.forEach(function($,I){b.push($)})}),b},Ke.isPointInside=function(y,b){var A=!1;return this.forEach(function(g){if(g.isPointInside(y,b))return A=!0,!1}),A},h.registerFont=function(y){if(!y.face)return y;this.fonts=this.fonts||{};var b={w:y.w,face:{},glyphs:{}},A=y.face["font-family"];for(var g in y.face)y.face[p](g)&&(b.face[g]=y.face[g]);if(this.fonts[A]?this.fonts[A].push(b):this.fonts[A]=[b],!y.svg){for(var w in b.face["units-per-em"]=G(y.face["units-per-em"],10),y.glyphs)if(y.glyphs[p](w)){var $=y.glyphs[w];if(b.glyphs[w]={w:$.w,k:{},d:$.d&&"M"+$.d.replace(/[mlcxtrv]/g,function(j){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[j]||"M"})+"z"},$.k)for(var I in $.k)$[p](I)&&(b.glyphs[w].k[I]=$.k[I])}}return y},c.getFont=function(y,b,A,g){if(g=g||"normal",A=A||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400,h.fonts){var w,$=h.fonts[y];if(!$){var I=new RegExp("(^|\\s)"+y.replace(/[^\w\d\s+!~.:_-]/g,F)+"(\\s|$)","i");for(var j in h.fonts)if(h.fonts[p](j)&&I.test(j)){$=h.fonts[j];break}}if($)for(var z=0,X=$.length;z<X&&((w=$[z]).face["font-weight"]!=b||w.face["font-style"]!=A&&w.face["font-style"]||w.face["font-stretch"]!=g);z++);return w}},c.print=function(y,b,A,g,w,$,I,j){$=$||"middle",I=tt(W(I||0,1),-1),j=tt(W(j||1,3),1);var z,X=N(A)[R](F),et=0,ct=0,st=F;if(h.is(g,"string")&&(g=this.getFont(g)),g){z=(w||16)/g.face["units-per-em"];for(var rt=g.face.bbox[R](f),ut=+rt[0],gt=rt[3]-rt[1],dt=0,ht=+rt[1]+($=="baseline"?gt+ +g.face.descent:gt/2),Ct=0,mt=X.length;Ct<mt;Ct++){if(X[Ct]==`
|
|
39
|
+
`)et=0,yt=0,ct=0,dt+=gt*j;else{var _t=ct&&g.glyphs[X[Ct-1]]||{},yt=g.glyphs[X[Ct]];et+=ct?(_t.w||g.w)+(_t.k&&_t.k[X[Ct]]||0)+g.w*I:0,ct=1}yt&&yt.d&&(st+=h.transformPath(yt.d,["t",et*z,dt*z,"s",z,z,ut,ht,"t",(y-ut)/z,(b-ht)/z]))}}return this.path(st).attr({fill:"#000",stroke:"none"})},c.add=function(y){if(h.is(y,"array"))for(var b,A=this.set(),g=0,w=y.length;g<w;g++)b=y[g]||{},d[p](b.type)&&A.push(this[b.type]().attr(b));return A},h.format=function(y,b){var A=h.is(b,it)?[0][m](b):arguments;return y&&h.is(y,"string")&&A.length-1&&(y=y.replace(u,function(g,w){return A[++w]==null?F:A[w]})),y||F},h.fullfill=(Br=/\{([^\}]+)\}/g,Un=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(y,b){return String(y).replace(Br,function(A,g){return function(w,$,I){var j=I;return $.replace(Un,function(z,X,et,ct,st){X=X||ct,j&&(X in j&&(j=j[X]),typeof j=="function"&&st&&(j=j()))}),j=(j==null||j==I?w:j)+""}(A,g,b)})}),h.ninja=function(){if(_.was)v.win.Raphael=_.is;else{window.Raphael=void 0;try{delete window.Raphael}catch{}}return h},h.st=Ke,o.on("raphael.DOMload",function(){l=!0}),(Gn=document).readyState==null&&Gn.addEventListener&&(Gn.addEventListener("DOMContentLoaded",ir=function(){Gn.removeEventListener("DOMContentLoaded",ir,!1),Gn.readyState="complete"},!1),Gn.readyState="loading"),function y(){/in/.test(Gn.readyState)?setTimeout(y,9):h.eve("raphael.DOMload")}(),h}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a;s=[i(0),i(3),i(4)],(a=(function(o){return o}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a,o,h,l,c,f,d,u,p,v,_,S,x;h="hasOwnProperty",l=/[\.\/]/,c=/\s*,\s*/,f=function(m,k){return m-k},d={n:{}},u=function(){for(var m=0,k=this.length;m<k;m++)if(this[m]!==void 0)return this[m]},p=function(){for(var m=this.length;--m;)if(this[m]!==void 0)return this[m]},v=Object.prototype.toString,_=String,S=Array.isArray||function(m){return m instanceof Array||v.call(m)=="[object Array]"},(x=function(m,k){var F,P=o,N=Array.prototype.slice.call(arguments,2),R=x.listeners(m),L=0,U=[],B={},K=[],tt=a;K.firstDefined=u,K.lastDefined=p,a=m,o=0;for(var W=0,lt=R.length;W<lt;W++)"zIndex"in R[W]&&(U.push(R[W].zIndex),R[W].zIndex<0&&(B[R[W].zIndex]=R[W]));for(U.sort(f);U[L]<0;)if(F=B[U[L++]],K.push(F.apply(k,N)),o)return o=P,K;for(W=0;W<lt;W++)if("zIndex"in(F=R[W]))if(F.zIndex==U[L]){if(K.push(F.apply(k,N)),o)break;do if((F=B[U[++L]])&&K.push(F.apply(k,N)),o)break;while(F)}else B[F.zIndex]=F;else if(K.push(F.apply(k,N)),o)break;return o=P,a=tt,K})._events=d,x.listeners=function(m){var k,F,P,N,R,L,U,B,K=S(m)?m:m.split(l),tt=d,W=[tt],lt=[];for(N=0,R=K.length;N<R;N++){for(B=[],L=0,U=W.length;L<U;L++)for(F=[(tt=W[L].n)[K[N]],tt["*"]],P=2;P--;)(k=F[P])&&(B.push(k),lt=lt.concat(k.f||[]));W=B}return lt},x.separator=function(m){m?(m="["+(m=_(m).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",l=new RegExp(m)):l=/[\.\/]/},x.on=function(m,k){if(typeof k!="function")return function(){};for(var F=S(m)?S(m[0])?m:[m]:_(m).split(c),P=0,N=F.length;P<N;P++)(function(R){for(var L,U=S(R)?R:_(R).split(l),B=d,K=0,tt=U.length;K<tt;K++)B=(B=B.n).hasOwnProperty(U[K])&&B[U[K]]||(B[U[K]]={n:{}});for(B.f=B.f||[],K=0,tt=B.f.length;K<tt;K++)if(B.f[K]==k){L=!0;break}!L&&B.f.push(k)})(F[P]);return function(R){+R==+R&&(k.zIndex=+R)}},x.f=function(m){var k=[].slice.call(arguments,1);return function(){x.apply(null,[m,null].concat(k).concat([].slice.call(arguments,0)))}},x.stop=function(){o=1},x.nt=function(m){var k=S(a)?a.join("."):a;return m?new RegExp("(?:\\.|\\/|^)"+m+"(?:\\.|\\/|$)").test(k):k},x.nts=function(){return S(a)?a:a.split(l)},x.off=x.unbind=function(m,k){if(m){var F=S(m)?S(m[0])?m:[m]:_(m).split(c);if(F.length>1)for(var P=0,N=F.length;P<N;P++)x.off(F[P],k);else{F=S(m)?m:_(m).split(l);var R,L,U,B,K,tt=[d];for(P=0,N=F.length;P<N;P++)for(B=0;B<tt.length;B+=U.length-2){if(U=[B,1],R=tt[B].n,F[P]!="*")R[F[P]]&&U.push(R[F[P]]);else for(L in R)R[h](L)&&U.push(R[L]);tt.splice.apply(tt,U)}for(P=0,N=tt.length;P<N;P++)for(R=tt[P];R.n;){if(k){if(R.f){for(B=0,K=R.f.length;B<K;B++)if(R.f[B]==k){R.f.splice(B,1);break}!R.f.length&&delete R.f}for(L in R.n)if(R.n[h](L)&&R.n[L].f){var W=R.n[L].f;for(B=0,K=W.length;B<K;B++)if(W[B]==k){W.splice(B,1);break}!W.length&&delete R.n[L].f}}else for(L in delete R.f,R.n)R.n[h](L)&&R.n[L].f&&delete R.n[L].f;R=R.n}}}else x._events=d={n:{}}},x.once=function(m,k){var F=function(){return x.off(m,F),k.apply(this,arguments)};return x.on(m,F)},x.version="0.5.0",x.toString=function(){return"You are running Eve 0.5.0"},e.exports?e.exports=x:(s=(function(){return x}).apply(r,[]))===void 0||(e.exports=s)},function(e,r,i){var s,a;s=[i(0)],(a=(function(o){if(!o||o.svg){var h="hasOwnProperty",l=String,c=parseFloat,f=parseInt,d=Math,u=d.max,p=d.abs,v=d.pow,_=/[, ]+/,S=o.eve,x="",m=" ",k="http://www.w3.org/1999/xlink",F={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},P={};o.toString=function(){return`Your browser supports SVG.
|
|
40
|
+
You are running Raphaël `+this.version};var N=function(O,E){if(E)for(var T in typeof O=="string"&&(O=N(O)),E)E[h](T)&&(T.substring(0,6)=="xlink:"?O.setAttributeNS(k,T.substring(6),l(E[T])):O.setAttribute(T,l(E[T])));else(O=o._g.doc.createElementNS("http://www.w3.org/2000/svg",O)).style&&(O.style.webkitTapHighlightColor="rgba(0,0,0,0)");return O},R=function(O,E){var T="linear",C=O.id+E,D=.5,G=.5,M=O.node,V=O.paper,q=M.style,Z=o._g.doc.getElementById(C);if(!Z){if(E=(E=l(E).replace(o._radial_gradient,function(jt,zt,Ot){if(T="radial",zt&&Ot){D=c(zt);var le=2*((G=c(Ot))>.5)-1;v(D-.5,2)+v(G-.5,2)>.25&&(G=d.sqrt(.25-v(D-.5,2))*le+.5)&&G!=.5&&(G=G.toFixed(5)-1e-5*le)}return x})).split(/\s*\-\s*/),T=="linear"){var nt=E.shift();if(nt=-c(nt),isNaN(nt))return null;var pt=[0,0,d.cos(o.rad(nt)),d.sin(o.rad(nt))],kt=1/(u(p(pt[2]),p(pt[3]))||1);pt[2]*=kt,pt[3]*=kt,pt[2]<0&&(pt[0]=-pt[2],pt[2]=0),pt[3]<0&&(pt[1]=-pt[3],pt[3]=0)}var Ft=o._parseDots(E);if(!Ft)return null;if(C=C.replace(/[\(\)\s,\xb0#]/g,"_"),O.gradient&&C!=O.gradient.id&&(V.defs.removeChild(O.gradient),delete O.gradient),!O.gradient){Z=N(T+"Gradient",{id:C}),O.gradient=Z,N(Z,T=="radial"?{fx:D,fy:G}:{x1:pt[0],y1:pt[1],x2:pt[2],y2:pt[3],gradientTransform:O.matrix.invert()}),V.defs.appendChild(Z);for(var St=0,At=Ft.length;St<At;St++)Z.appendChild(N("stop",{offset:Ft[St].offset?Ft[St].offset:St?"100%":"0%","stop-color":Ft[St].color||"#fff","stop-opacity":isFinite(Ft[St].opacity)?Ft[St].opacity:1}))}}return N(M,{fill:L(C),opacity:1,"fill-opacity":1}),q.fill=x,q.opacity=1,q.fillOpacity=1,1},L=function(O){if((E=document.documentMode)&&(E===9||E===10))return"url('#"+O+"')";var E,T=document.location;return"url('"+(T.protocol+"//"+T.host+T.pathname+T.search)+"#"+O+"')"},U=function(O){var E=O.getBBox(1);N(O.pattern,{patternTransform:O.matrix.invert()+" translate("+E.x+","+E.y+")"})},B=function(O,E,T){if(O.type=="path"){for(var C,D,G,M,V,q=l(E).toLowerCase().split("-"),Z=O.paper,nt=T?"end":"start",pt=O.node,kt=O.attrs,Ft=kt["stroke-width"],St=q.length,At="classic",jt=3,zt=3,Ot=5;St--;)switch(q[St]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":At=q[St];break;case"wide":zt=5;break;case"narrow":zt=2;break;case"long":jt=5;break;case"short":jt=2}if(At=="open"?(jt+=2,zt+=2,Ot+=2,G=1,M=T?4:1,V={fill:"none",stroke:kt.stroke}):(M=G=jt/2,V={fill:kt.stroke,stroke:"none"}),O._.arrows?T?(O._.arrows.endPath&&P[O._.arrows.endPath]--,O._.arrows.endMarker&&P[O._.arrows.endMarker]--):(O._.arrows.startPath&&P[O._.arrows.startPath]--,O._.arrows.startMarker&&P[O._.arrows.startMarker]--):O._.arrows={},At!="none"){var le="raphael-marker-"+At,Jt="raphael-marker-"+nt+At+jt+zt+"-obj"+O.id;o._g.doc.getElementById(le)?P[le]++:(Z.defs.appendChild(N(N("path"),{"stroke-linecap":"round",d:F[At],id:le})),P[le]=1);var ue,Bt=o._g.doc.getElementById(Jt);Bt?(P[Jt]++,ue=Bt.getElementsByTagName("use")[0]):(Bt=N(N("marker"),{id:Jt,markerHeight:zt,markerWidth:jt,orient:"auto",refX:M,refY:zt/2}),ue=N(N("use"),{"xlink:href":"#"+le,transform:(T?"rotate(180 "+jt/2+" "+zt/2+") ":x)+"scale("+jt/Ot+","+zt/Ot+")","stroke-width":(1/((jt/Ot+zt/Ot)/2)).toFixed(4)}),Bt.appendChild(ue),Z.defs.appendChild(Bt),P[Jt]=1),N(ue,V);var Fe=G*(At!="diamond"&&At!="oval");T?(C=O._.arrows.startdx*Ft||0,D=o.getTotalLength(kt.path)-Fe*Ft):(C=Fe*Ft,D=o.getTotalLength(kt.path)-(O._.arrows.enddx*Ft||0)),(V={})["marker-"+nt]="url(#"+Jt+")",(D||C)&&(V.d=o.getSubpath(kt.path,C,D)),N(pt,V),O._.arrows[nt+"Path"]=le,O._.arrows[nt+"Marker"]=Jt,O._.arrows[nt+"dx"]=Fe,O._.arrows[nt+"Type"]=At,O._.arrows[nt+"String"]=E}else T?(C=O._.arrows.startdx*Ft||0,D=o.getTotalLength(kt.path)-C):(C=0,D=o.getTotalLength(kt.path)-(O._.arrows.enddx*Ft||0)),O._.arrows[nt+"Path"]&&N(pt,{d:o.getSubpath(kt.path,C,D)}),delete O._.arrows[nt+"Path"],delete O._.arrows[nt+"Marker"],delete O._.arrows[nt+"dx"],delete O._.arrows[nt+"Type"],delete O._.arrows[nt+"String"];for(V in P)if(P[h](V)&&!P[V]){var Pe=o._g.doc.getElementById(V);Pe&&Pe.parentNode.removeChild(Pe)}}},K={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},tt=function(O,E,T){if(E=K[l(E).toLowerCase()]){for(var C=O.attrs["stroke-width"]||"1",D={round:C,square:C,butt:0}[O.attrs["stroke-linecap"]||T["stroke-linecap"]]||0,G=[],M=E.length;M--;)G[M]=E[M]*C+(M%2?1:-1)*D;N(O.node,{"stroke-dasharray":G.join(",")})}else N(O.node,{"stroke-dasharray":"none"})},W=function(O,E){var T=O.node,C=O.attrs,D=T.style.visibility;for(var G in T.style.visibility="hidden",E)if(E[h](G)){if(!o._availableAttrs[h](G))continue;var M=E[G];switch(C[G]=M,G){case"blur":O.blur(M);break;case"title":var V=T.getElementsByTagName("title");if(V.length&&(V=V[0]))V.firstChild.nodeValue=M;else{V=N("title");var q=o._g.doc.createTextNode(M);V.appendChild(q),T.appendChild(V)}break;case"href":case"target":var Z=T.parentNode;if(Z.tagName.toLowerCase()!="a"){var nt=N("a");Z.insertBefore(nt,T),nt.appendChild(T),Z=nt}G=="target"?Z.setAttributeNS(k,"show",M=="blank"?"new":M):Z.setAttributeNS(k,G,M);break;case"cursor":T.style.cursor=M;break;case"transform":O.transform(M);break;case"arrow-start":B(O,M);break;case"arrow-end":B(O,M,1);break;case"clip-rect":var pt=l(M).split(_);if(pt.length==4){O.clip&&O.clip.parentNode.parentNode.removeChild(O.clip.parentNode);var kt=N("clipPath"),Ft=N("rect");kt.id=o.createUUID(),N(Ft,{x:pt[0],y:pt[1],width:pt[2],height:pt[3]}),kt.appendChild(Ft),O.paper.defs.appendChild(kt),N(T,{"clip-path":"url(#"+kt.id+")"}),O.clip=Ft}if(!M){var St=T.getAttribute("clip-path");if(St){var At=o._g.doc.getElementById(St.replace(/(^url\(#|\)$)/g,x));At&&At.parentNode.removeChild(At),N(T,{"clip-path":x}),delete O.clip}}break;case"path":O.type=="path"&&(N(T,{d:M?C.path=o._pathToAbsolute(M):"M0,0"}),O._.dirty=1,O._.arrows&&("startString"in O._.arrows&&B(O,O._.arrows.startString),"endString"in O._.arrows&&B(O,O._.arrows.endString,1)));break;case"width":if(T.setAttribute(G,M),O._.dirty=1,!C.fx)break;G="x",M=C.x;case"x":C.fx&&(M=-C.x-(C.width||0));case"rx":if(G=="rx"&&O.type=="rect")break;case"cx":T.setAttribute(G,M),O.pattern&&U(O),O._.dirty=1;break;case"height":if(T.setAttribute(G,M),O._.dirty=1,!C.fy)break;G="y",M=C.y;case"y":C.fy&&(M=-C.y-(C.height||0));case"ry":if(G=="ry"&&O.type=="rect")break;case"cy":T.setAttribute(G,M),O.pattern&&U(O),O._.dirty=1;break;case"r":O.type=="rect"?N(T,{rx:M,ry:M}):T.setAttribute(G,M),O._.dirty=1;break;case"src":O.type=="image"&&T.setAttributeNS(k,"href",M);break;case"stroke-width":O._.sx==1&&O._.sy==1||(M/=u(p(O._.sx),p(O._.sy))||1),T.setAttribute(G,M),C["stroke-dasharray"]&&tt(O,C["stroke-dasharray"],E),O._.arrows&&("startString"in O._.arrows&&B(O,O._.arrows.startString),"endString"in O._.arrows&&B(O,O._.arrows.endString,1));break;case"stroke-dasharray":tt(O,M,E);break;case"fill":var jt=l(M).match(o._ISURL);if(jt){kt=N("pattern");var zt=N("image");kt.id=o.createUUID(),N(kt,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),N(zt,{x:0,y:0,"xlink:href":jt[1]}),kt.appendChild(zt),function(Bt){o._preload(jt[1],function(){var Fe=this.offsetWidth,Pe=this.offsetHeight;N(Bt,{width:Fe,height:Pe}),N(zt,{width:Fe,height:Pe})})}(kt),O.paper.defs.appendChild(kt),N(T,{fill:"url(#"+kt.id+")"}),O.pattern=kt,O.pattern&&U(O);break}var Ot=o.getRGB(M);if(Ot.error){if((O.type=="circle"||O.type=="ellipse"||l(M).charAt()!="r")&&R(O,M)){if("opacity"in C||"fill-opacity"in C){var le=o._g.doc.getElementById(T.getAttribute("fill").replace(/^url\(#|\)$/g,x));if(le){var Jt=le.getElementsByTagName("stop");N(Jt[Jt.length-1],{"stop-opacity":("opacity"in C?C.opacity:1)*("fill-opacity"in C?C["fill-opacity"]:1)})}}C.gradient=M,C.fill="none";break}}else delete E.gradient,delete C.gradient,!o.is(C.opacity,"undefined")&&o.is(E.opacity,"undefined")&&N(T,{opacity:C.opacity}),!o.is(C["fill-opacity"],"undefined")&&o.is(E["fill-opacity"],"undefined")&&N(T,{"fill-opacity":C["fill-opacity"]});Ot[h]("opacity")&&N(T,{"fill-opacity":Ot.opacity>1?Ot.opacity/100:Ot.opacity});case"stroke":Ot=o.getRGB(M),T.setAttribute(G,Ot.hex),G=="stroke"&&Ot[h]("opacity")&&N(T,{"stroke-opacity":Ot.opacity>1?Ot.opacity/100:Ot.opacity}),G=="stroke"&&O._.arrows&&("startString"in O._.arrows&&B(O,O._.arrows.startString),"endString"in O._.arrows&&B(O,O._.arrows.endString,1));break;case"gradient":(O.type=="circle"||O.type=="ellipse"||l(M).charAt()!="r")&&R(O,M);break;case"opacity":C.gradient&&!C[h]("stroke-opacity")&&N(T,{"stroke-opacity":M>1?M/100:M});case"fill-opacity":if(C.gradient){(le=o._g.doc.getElementById(T.getAttribute("fill").replace(/^url\(#|\)$/g,x)))&&(Jt=le.getElementsByTagName("stop"),N(Jt[Jt.length-1],{"stop-opacity":M}));break}default:G=="font-size"&&(M=f(M,10)+"px");var ue=G.replace(/(\-.)/g,function(Bt){return Bt.substring(1).toUpperCase()});T.style[ue]=M,O._.dirty=1,T.setAttribute(G,M)}}lt(O,E),T.style.visibility=D},lt=function(O,E){if(O.type=="text"&&(E[h]("text")||E[h]("font")||E[h]("font-size")||E[h]("x")||E[h]("y"))){var T=O.attrs,C=O.node,D=C.firstChild?f(o._g.doc.defaultView.getComputedStyle(C.firstChild,x).getPropertyValue("font-size"),10):10;if(E[h]("text")){for(T.text=E.text;C.firstChild;)C.removeChild(C.firstChild);for(var G,M=l(E.text).split(`
|
|
41
|
+
`),V=[],q=0,Z=M.length;q<Z;q++)G=N("tspan"),q&&N(G,{dy:1.2*D,x:T.x}),G.appendChild(o._g.doc.createTextNode(M[q])),C.appendChild(G),V[q]=G}else for(q=0,Z=(V=C.getElementsByTagName("tspan")).length;q<Z;q++)q?N(V[q],{dy:1.2*D,x:T.x}):N(V[0],{dy:0});N(C,{x:T.x,y:T.y}),O._.dirty=1;var nt=O._getBBox(),pt=T.y-(nt.y+nt.height/2);pt&&o.is(pt,"finite")&&N(V[0],{dy:pt})}},wt=function(O){return O.parentNode&&O.parentNode.tagName.toLowerCase()==="a"?O.parentNode:O},bt=function(O,E){this[0]=this.node=O,O.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),O.raphaelid=this.id,this.matrix=o.matrix(),this.realPath=null,this.paper=E,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!E.bottom&&(E.bottom=this),this.prev=E.top,E.top&&(E.top.next=this),E.top=this,this.next=null},xt=o.el;bt.prototype=xt,xt.constructor=bt,o._engine.path=function(O,E){var T=N("path");E.canvas&&E.canvas.appendChild(T);var C=new bt(T,E);return C.type="path",W(C,{fill:"none",stroke:"#000",path:O}),C},xt.rotate=function(O,E,T){if(this.removed)return this;if((O=l(O).split(_)).length-1&&(E=c(O[1]),T=c(O[2])),O=c(O[0]),T==null&&(E=T),E==null||T==null){var C=this.getBBox(1);E=C.x+C.width/2,T=C.y+C.height/2}return this.transform(this._.transform.concat([["r",O,E,T]])),this},xt.scale=function(O,E,T,C){if(this.removed)return this;if((O=l(O).split(_)).length-1&&(E=c(O[1]),T=c(O[2]),C=c(O[3])),O=c(O[0]),E==null&&(E=O),C==null&&(T=C),T==null||C==null)var D=this.getBBox(1);return T=T??D.x+D.width/2,C=C??D.y+D.height/2,this.transform(this._.transform.concat([["s",O,E,T,C]])),this},xt.translate=function(O,E){return this.removed?this:((O=l(O).split(_)).length-1&&(E=c(O[1])),O=c(O[0])||0,E=+E||0,this.transform(this._.transform.concat([["t",O,E]])),this)},xt.transform=function(O){var E=this._;if(O==null)return E.transform;if(o._extractTransform(this,O),this.clip&&N(this.clip,{transform:this.matrix.invert()}),this.pattern&&U(this),this.node&&N(this.node,{transform:this.matrix}),E.sx!=1||E.sy!=1){var T=this.attrs[h]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":T})}return this},xt.hide=function(){return this.removed||(this.node.style.display="none"),this},xt.show=function(){return this.removed||(this.node.style.display=""),this},xt.remove=function(){var O=wt(this.node);if(!this.removed&&O.parentNode){var E=this.paper;for(var T in E.__set__&&E.__set__.exclude(this),S.unbind("raphael.*.*."+this.id),this.gradient&&E.defs.removeChild(this.gradient),o._tear(this,E),O.parentNode.removeChild(O),this.removeData(),this)this[T]=typeof this[T]=="function"?o._removedFactory(T):null;this.removed=!0}},xt._getBBox=function(){if(this.node.style.display=="none"){this.show();var O=!0}var E,T=!1;this.paper.canvas.parentElement?E=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(E=this.paper.canvas.parentNode.style),E&&E.display=="none"&&(T=!0,E.display="");var C={};try{C=this.node.getBBox()}catch{C={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{C=C||{},T&&(E.display="none")}return O&&this.hide(),C},xt.attr=function(O,E){if(this.removed)return this;if(O==null){var T={};for(var C in this.attrs)this.attrs[h](C)&&(T[C]=this.attrs[C]);return T.gradient&&T.fill=="none"&&(T.fill=T.gradient)&&delete T.gradient,T.transform=this._.transform,T}if(E==null&&o.is(O,"string")){if(O=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(O=="transform")return this._.transform;for(var D=O.split(_),G={},M=0,V=D.length;M<V;M++)(O=D[M])in this.attrs?G[O]=this.attrs[O]:o.is(this.paper.customAttributes[O],"function")?G[O]=this.paper.customAttributes[O].def:G[O]=o._availableAttrs[O];return V-1?G:G[D[0]]}if(E==null&&o.is(O,"array")){for(G={},M=0,V=O.length;M<V;M++)G[O[M]]=this.attr(O[M]);return G}if(E!=null){var q={};q[O]=E}else O!=null&&o.is(O,"object")&&(q=O);for(var Z in q)S("raphael.attr."+Z+"."+this.id,this,q[Z]);for(Z in this.paper.customAttributes)if(this.paper.customAttributes[h](Z)&&q[h](Z)&&o.is(this.paper.customAttributes[Z],"function")){var nt=this.paper.customAttributes[Z].apply(this,[].concat(q[Z]));for(var pt in this.attrs[Z]=q[Z],nt)nt[h](pt)&&(q[pt]=nt[pt])}return W(this,q),this},xt.toFront=function(){if(this.removed)return this;var O=wt(this.node);O.parentNode.appendChild(O);var E=this.paper;return E.top!=this&&o._tofront(this,E),this},xt.toBack=function(){if(this.removed)return this;var O=wt(this.node),E=O.parentNode;return E.insertBefore(O,E.firstChild),o._toback(this,this.paper),this.paper,this},xt.insertAfter=function(O){if(this.removed||!O)return this;var E=wt(this.node),T=wt(O.node||O[O.length-1].node);return T.nextSibling?T.parentNode.insertBefore(E,T.nextSibling):T.parentNode.appendChild(E),o._insertafter(this,O,this.paper),this},xt.insertBefore=function(O){if(this.removed||!O)return this;var E=wt(this.node),T=wt(O.node||O[0].node);return T.parentNode.insertBefore(E,T),o._insertbefore(this,O,this.paper),this},xt.blur=function(O){var E=this;if(+O!=0){var T=N("filter"),C=N("feGaussianBlur");E.attrs.blur=O,T.id=o.createUUID(),N(C,{stdDeviation:+O||1.5}),T.appendChild(C),E.paper.defs.appendChild(T),E._blur=T,N(E.node,{filter:"url(#"+T.id+")"})}else E._blur&&(E._blur.parentNode.removeChild(E._blur),delete E._blur,delete E.attrs.blur),E.node.removeAttribute("filter");return E},o._engine.circle=function(O,E,T,C){var D=N("circle");O.canvas&&O.canvas.appendChild(D);var G=new bt(D,O);return G.attrs={cx:E,cy:T,r:C,fill:"none",stroke:"#000"},G.type="circle",N(D,G.attrs),G},o._engine.rect=function(O,E,T,C,D,G){var M=N("rect");O.canvas&&O.canvas.appendChild(M);var V=new bt(M,O);return V.attrs={x:E,y:T,width:C,height:D,rx:G||0,ry:G||0,fill:"none",stroke:"#000"},V.type="rect",N(M,V.attrs),V},o._engine.ellipse=function(O,E,T,C,D){var G=N("ellipse");O.canvas&&O.canvas.appendChild(G);var M=new bt(G,O);return M.attrs={cx:E,cy:T,rx:C,ry:D,fill:"none",stroke:"#000"},M.type="ellipse",N(G,M.attrs),M},o._engine.image=function(O,E,T,C,D,G){var M=N("image");N(M,{x:T,y:C,width:D,height:G,preserveAspectRatio:"none"}),M.setAttributeNS(k,"href",E),O.canvas&&O.canvas.appendChild(M);var V=new bt(M,O);return V.attrs={x:T,y:C,width:D,height:G,src:E},V.type="image",V},o._engine.text=function(O,E,T,C){var D=N("text");O.canvas&&O.canvas.appendChild(D);var G=new bt(D,O);return G.attrs={x:E,y:T,"text-anchor":"middle",text:C,"font-family":o._availableAttrs["font-family"],"font-size":o._availableAttrs["font-size"],stroke:"none",fill:"#000"},G.type="text",W(G,G.attrs),G},o._engine.setSize=function(O,E){return this.width=O||this.width,this.height=E||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},o._engine.create=function(){var O=o._getContainer.apply(0,arguments),E=O&&O.container;if(!E)throw new Error("SVG container not found.");var T,C=O.x,D=O.y,G=O.width,M=O.height,V=N("svg"),q="overflow:hidden;";return C=C||0,D=D||0,N(V,{height:M=M||342,version:1.1,width:G=G||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),E==1?(V.style.cssText=q+"position:absolute;left:"+C+"px;top:"+D+"px",o._g.doc.body.appendChild(V),T=1):(V.style.cssText=q+"position:relative",E.firstChild?E.insertBefore(V,E.firstChild):E.appendChild(V)),(E=new o._Paper).width=G,E.height=M,E.canvas=V,E.clear(),E._left=E._top=0,T&&(E.renderfix=function(){}),E.renderfix(),E},o._engine.setViewBox=function(O,E,T,C,D){S("raphael.setViewBox",this,this._viewBox,[O,E,T,C,D]);var G,M,V=this.getSize(),q=u(T/V.width,C/V.height),Z=this.top,nt=D?"xMidYMid meet":"xMinYMin";for(O==null?(this._vbSize&&(q=1),delete this._vbSize,G="0 0 "+this.width+m+this.height):(this._vbSize=q,G=O+m+E+m+T+m+C),N(this.canvas,{viewBox:G,preserveAspectRatio:nt});q&&Z;)M="stroke-width"in Z.attrs?Z.attrs["stroke-width"]:1,Z.attr({"stroke-width":M}),Z._.dirty=1,Z._.dirtyT=1,Z=Z.prev;return this._viewBox=[O,E,T,C,!!D],this},o.prototype.renderfix=function(){var O,E=this.canvas,T=E.style;try{O=E.getScreenCTM()||E.createSVGMatrix()}catch{O=E.createSVGMatrix()}var C=-O.e%1,D=-O.f%1;(C||D)&&(C&&(this._left=(this._left+C)%1,T.left=this._left+"px"),D&&(this._top=(this._top+D)%1,T.top=this._top+"px"))},o.prototype.clear=function(){o.eve("raphael.clear",this);for(var O=this.canvas;O.firstChild;)O.removeChild(O.firstChild);this.bottom=this.top=null,(this.desc=N("desc")).appendChild(o._g.doc.createTextNode("Created with Raphaël "+o.version)),O.appendChild(this.desc),O.appendChild(this.defs=N("defs"))},o.prototype.remove=function(){for(var O in S("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[O]=typeof this[O]=="function"?o._removedFactory(O):null};var it=o.st;for(var Y in xt)xt[h](Y)&&!it[h](Y)&&(it[Y]=function(O){return function(){var E=arguments;return this.forEach(function(T){T[O].apply(T,E)})}}(Y))}}).apply(r,s))===void 0||(e.exports=a)},function(e,r,i){var s,a;s=[i(0)],(a=(function(o){if(!o||o.vml){var h="hasOwnProperty",l=String,c=parseFloat,f=Math,d=f.round,u=f.max,p=f.min,v=f.abs,_=/[, ]+/,S=o.eve,x=" ",m="",k={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},F=/([clmz]),?([^clmz]*)/gi,P=/ progid:\S+Blur\([^\)]+\)/g,N=/-?[^,\s-]+/g,R="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",L=21600,U={path:1,rect:1,image:1},B={circle:1,ellipse:1},K=function(E,T,C){var D=o.matrix();return D.rotate(-E,.5,.5),{dx:D.x(T,C),dy:D.y(T,C)}},tt=function(E,T,C,D,G,M){var V=E._,q=E.matrix,Z=V.fillpos,nt=E.node,pt=nt.style,kt=1,Ft="",St=L/T,At=L/C;if(pt.visibility="hidden",T&&C){if(nt.coordsize=v(St)+x+v(At),pt.rotation=M*(T*C<0?-1:1),M){var jt=K(M,D,G);D=jt.dx,G=jt.dy}if(T<0&&(Ft+="x"),C<0&&(Ft+=" y")&&(kt=-1),pt.flip=Ft,nt.coordorigin=D*-St+x+G*-At,Z||V.fillsize){var zt=nt.getElementsByTagName("fill");zt=zt&&zt[0],nt.removeChild(zt),Z&&(jt=K(M,q.x(Z[0],Z[1]),q.y(Z[0],Z[1])),zt.position=jt.dx*kt+x+jt.dy*kt),V.fillsize&&(zt.size=V.fillsize[0]*v(T)+x+V.fillsize[1]*v(C)),nt.appendChild(zt)}pt.visibility="visible"}};o.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
|
|
42
|
+
You are running Raphaël `+this.version};var W,lt=function(E,T,C){for(var D=l(T).toLowerCase().split("-"),G=C?"end":"start",M=D.length,V="classic",q="medium",Z="medium";M--;)switch(D[M]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":V=D[M];break;case"wide":case"narrow":Z=D[M];break;case"long":case"short":q=D[M]}var nt=E.node.getElementsByTagName("stroke")[0];nt[G+"arrow"]=V,nt[G+"arrowlength"]=q,nt[G+"arrowwidth"]=Z},wt=function(E,T){E.attrs=E.attrs||{};var C=E.node,D=E.attrs,G=C.style,M=U[E.type]&&(T.x!=D.x||T.y!=D.y||T.width!=D.width||T.height!=D.height||T.cx!=D.cx||T.cy!=D.cy||T.rx!=D.rx||T.ry!=D.ry||T.r!=D.r),V=B[E.type]&&(D.cx!=T.cx||D.cy!=T.cy||D.r!=T.r||D.rx!=T.rx||D.ry!=T.ry),q=E;for(var Z in T)T[h](Z)&&(D[Z]=T[Z]);if(M&&(D.path=o._getPath[E.type](E),E._.dirty=1),T.href&&(C.href=T.href),T.title&&(C.title=T.title),T.target&&(C.target=T.target),T.cursor&&(G.cursor=T.cursor),"blur"in T&&E.blur(T.blur),(T.path&&E.type=="path"||M)&&(C.path=function(je){var jn=/[ahqstv]/gi,Qn=o._pathToAbsolute;if(l(je).match(jn)&&(Qn=o._path2curve),jn=/[clmz]/g,Qn==o._pathToAbsolute&&!l(je).match(jn)){var ke=l(je).replace(F,function(vs,Wn,tr){var wn=[],Ur=Wn.toLowerCase()=="m",er=k[Wn];return tr.replace(N,function(Ln){Ur&&wn.length==2&&(er+=wn+k[Wn=="m"?"l":"L"],wn=[]),wn.push(d(Ln*L))}),er+wn});return ke}var $n,fn,Lr=Qn(je);ke=[];for(var Zn=0,yr=Lr.length;Zn<yr;Zn++){$n=Lr[Zn],(fn=Lr[Zn][0].toLowerCase())=="z"&&(fn="x");for(var _n=1,Ee=$n.length;_n<Ee;_n++)fn+=d($n[_n]*L)+(_n!=Ee-1?",":m);ke.push(fn)}return ke.join(x)}(~l(D.path).toLowerCase().indexOf("r")?o._pathToAbsolute(D.path):D.path),E._.dirty=1,E.type=="image"&&(E._.fillpos=[D.x,D.y],E._.fillsize=[D.width,D.height],tt(E,1,1,0,0,0))),"transform"in T&&E.transform(T.transform),V){var nt=+D.cx,pt=+D.cy,kt=+D.rx||+D.r||0,Ft=+D.ry||+D.r||0;C.path=o.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",d((nt-kt)*L),d((pt-Ft)*L),d((nt+kt)*L),d((pt+Ft)*L),d(nt*L)),E._.dirty=1}if("clip-rect"in T){var St=l(T["clip-rect"]).split(_);if(St.length==4){St[2]=+St[2]+ +St[0],St[3]=+St[3]+ +St[1];var At=C.clipRect||o._g.doc.createElement("div"),jt=At.style;jt.clip=o.format("rect({1}px {2}px {3}px {0}px)",St),C.clipRect||(jt.position="absolute",jt.top=0,jt.left=0,jt.width=E.paper.width+"px",jt.height=E.paper.height+"px",C.parentNode.insertBefore(At,C),At.appendChild(C),C.clipRect=At)}T["clip-rect"]||C.clipRect&&(C.clipRect.style.clip="auto")}if(E.textpath){var zt=E.textpath.style;T.font&&(zt.font=T.font),T["font-family"]&&(zt.fontFamily='"'+T["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,m)+'"'),T["font-size"]&&(zt.fontSize=T["font-size"]),T["font-weight"]&&(zt.fontWeight=T["font-weight"]),T["font-style"]&&(zt.fontStyle=T["font-style"])}if("arrow-start"in T&<(q,T["arrow-start"]),"arrow-end"in T&<(q,T["arrow-end"],1),T.opacity!=null||T.fill!=null||T.src!=null||T.stroke!=null||T["stroke-width"]!=null||T["stroke-opacity"]!=null||T["fill-opacity"]!=null||T["stroke-dasharray"]!=null||T["stroke-miterlimit"]!=null||T["stroke-linejoin"]!=null||T["stroke-linecap"]!=null){var Ot=C.getElementsByTagName("fill");if(!(Ot=Ot&&Ot[0])&&(Ot=W("fill")),E.type=="image"&&T.src&&(Ot.src=T.src),T.fill&&(Ot.on=!0),Ot.on!=null&&T.fill!="none"&&T.fill!==null||(Ot.on=!1),Ot.on&&T.fill){var le=l(T.fill).match(o._ISURL);if(le){Ot.parentNode==C&&C.removeChild(Ot),Ot.rotate=!0,Ot.src=le[1],Ot.type="tile";var Jt=E.getBBox(1);Ot.position=Jt.x+x+Jt.y,E._.fillpos=[Jt.x,Jt.y],o._preload(le[1],function(){E._.fillsize=[this.offsetWidth,this.offsetHeight]})}else Ot.color=o.getRGB(T.fill).hex,Ot.src=m,Ot.type="solid",o.getRGB(T.fill).error&&(q.type in{circle:1,ellipse:1}||l(T.fill).charAt()!="r")&&bt(q,T.fill,Ot)&&(D.fill="none",D.gradient=T.fill,Ot.rotate=!1)}if("fill-opacity"in T||"opacity"in T){var ue=((+D["fill-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+o.getRGB(T.fill).o+1||2)-1);ue=p(u(ue,0),1),Ot.opacity=ue,Ot.src&&(Ot.color="none")}C.appendChild(Ot);var Bt=C.getElementsByTagName("stroke")&&C.getElementsByTagName("stroke")[0],Fe=!1;!Bt&&(Fe=Bt=W("stroke")),(T.stroke&&T.stroke!="none"||T["stroke-width"]||T["stroke-opacity"]!=null||T["stroke-dasharray"]||T["stroke-miterlimit"]||T["stroke-linejoin"]||T["stroke-linecap"])&&(Bt.on=!0),(T.stroke=="none"||T.stroke===null||Bt.on==null||T.stroke==0||T["stroke-width"]==0)&&(Bt.on=!1);var Pe=o.getRGB(T.stroke);Bt.on&&T.stroke&&(Bt.color=Pe.hex),ue=((+D["stroke-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+Pe.o+1||2)-1);var Je=.75*(c(T["stroke-width"])||1);if(ue=p(u(ue,0),1),T["stroke-width"]==null&&(Je=D["stroke-width"]),T["stroke-width"]&&(Bt.weight=Je),Je&&Je<1&&(ue*=Je)&&(Bt.weight=1),Bt.opacity=ue,T["stroke-linejoin"]&&(Bt.joinstyle=T["stroke-linejoin"]||"miter"),Bt.miterlimit=T["stroke-miterlimit"]||8,T["stroke-linecap"]&&(Bt.endcap=T["stroke-linecap"]=="butt"?"flat":T["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in T){var vn={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};Bt.dashstyle=vn[h](T["stroke-dasharray"])?vn[T["stroke-dasharray"]]:m}Fe&&C.appendChild(Bt)}if(q.type=="text"){q.paper.canvas.style.display=m;var an=q.paper.span,Ne=D.font&&D.font.match(/\d+(?:\.\d*)?(?=px)/);G=an.style,D.font&&(G.font=D.font),D["font-family"]&&(G.fontFamily=D["font-family"]),D["font-weight"]&&(G.fontWeight=D["font-weight"]),D["font-style"]&&(G.fontStyle=D["font-style"]),Ne=c(D["font-size"]||Ne&&Ne[0])||10,G.fontSize=100*Ne+"px",q.textpath.string&&(an.innerHTML=l(q.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var en=an.getBoundingClientRect();q.W=D.w=(en.right-en.left)/100,q.H=D.h=(en.bottom-en.top)/100,q.X=D.x,q.Y=D.y+q.H/2,("x"in T||"y"in T)&&(q.path.v=o.format("m{0},{1}l{2},{1}",d(D.x*L),d(D.y*L),d(D.x*L)+1));for(var An=["x","y","text","font","font-family","font-weight","font-style","font-size"],On=0,In=An.length;On<In;On++)if(An[On]in T){q._.dirty=1;break}switch(D["text-anchor"]){case"start":q.textpath.style["v-text-align"]="left",q.bbx=q.W/2;break;case"end":q.textpath.style["v-text-align"]="right",q.bbx=-q.W/2;break;default:q.textpath.style["v-text-align"]="center",q.bbx=0}q.textpath.style["v-text-kern"]=!0}},bt=function(E,T,C){E.attrs=E.attrs||{},E.attrs;var D=Math.pow,G="linear",M=".5 .5";if(E.attrs.gradient=T,T=(T=l(T).replace(o._radial_gradient,function(kt,Ft,St){return G="radial",Ft&&St&&(Ft=c(Ft),St=c(St),D(Ft-.5,2)+D(St-.5,2)>.25&&(St=f.sqrt(.25-D(Ft-.5,2))*(2*(St>.5)-1)+.5),M=Ft+x+St),m})).split(/\s*\-\s*/),G=="linear"){var V=T.shift();if(V=-c(V),isNaN(V))return null}var q=o._parseDots(T);if(!q)return null;if(E=E.shape||E.node,q.length){E.removeChild(C),C.on=!0,C.method="none",C.color=q[0].color,C.color2=q[q.length-1].color;for(var Z=[],nt=0,pt=q.length;nt<pt;nt++)q[nt].offset&&Z.push(q[nt].offset+x+q[nt].color);C.colors=Z.length?Z.join():"0% "+C.color,G=="radial"?(C.type="gradientTitle",C.focus="100%",C.focussize="0 0",C.focusposition=M,C.angle=0):(C.type="gradient",C.angle=(270-V)%360),E.appendChild(C)}return 1},xt=function(E,T){this[0]=this.node=E,E.raphael=!0,this.id=o._oid++,E.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=T,this.matrix=o.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!T.bottom&&(T.bottom=this),this.prev=T.top,T.top&&(T.top.next=this),T.top=this,this.next=null},it=o.el;xt.prototype=it,it.constructor=xt,it.transform=function(E){if(E==null)return this._.transform;var T,C=this.paper._viewBoxShift,D=C?"s"+[C.scale,C.scale]+"-1-1t"+[C.dx,C.dy]:m;C&&(T=E=l(E).replace(/\.{3}|\u2026/g,this._.transform||m)),o._extractTransform(this,D+E);var G,M=this.matrix.clone(),V=this.skew,q=this.node,Z=~l(this.attrs.fill).indexOf("-"),nt=!l(this.attrs.fill).indexOf("url(");if(M.translate(1,1),nt||Z||this.type=="image")if(V.matrix="1 0 0 1",V.offset="0 0",G=M.split(),Z&&G.noRotation||!G.isSimple){q.style.filter=M.toFilter();var pt=this.getBBox(),kt=this.getBBox(1),Ft=pt.x-kt.x,St=pt.y-kt.y;q.coordorigin=Ft*-L+x+St*-L,tt(this,1,1,Ft,St,0)}else q.style.filter=m,tt(this,G.scalex,G.scaley,G.dx,G.dy,G.rotate);else q.style.filter=m,V.matrix=l(M),V.offset=M.offset();return T!==null&&(this._.transform=T,o._extractTransform(this,T)),this},it.rotate=function(E,T,C){if(this.removed)return this;if(E!=null){if((E=l(E).split(_)).length-1&&(T=c(E[1]),C=c(E[2])),E=c(E[0]),C==null&&(T=C),T==null||C==null){var D=this.getBBox(1);T=D.x+D.width/2,C=D.y+D.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",E,T,C]])),this}},it.translate=function(E,T){return this.removed?this:((E=l(E).split(_)).length-1&&(T=c(E[1])),E=c(E[0])||0,T=+T||0,this._.bbox&&(this._.bbox.x+=E,this._.bbox.y+=T),this.transform(this._.transform.concat([["t",E,T]])),this)},it.scale=function(E,T,C,D){if(this.removed)return this;if((E=l(E).split(_)).length-1&&(T=c(E[1]),C=c(E[2]),D=c(E[3]),isNaN(C)&&(C=null),isNaN(D)&&(D=null)),E=c(E[0]),T==null&&(T=E),D==null&&(C=D),C==null||D==null)var G=this.getBBox(1);return C=C??G.x+G.width/2,D=D??G.y+G.height/2,this.transform(this._.transform.concat([["s",E,T,C,D]])),this._.dirtyT=1,this},it.hide=function(){return!this.removed&&(this.node.style.display="none"),this},it.show=function(){return!this.removed&&(this.node.style.display=m),this},it.auxGetBBox=o.el.getBBox,it.getBBox=function(){var E=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var T={},C=1/this.paper._viewBoxShift.scale;return T.x=E.x-this.paper._viewBoxShift.dx,T.x*=C,T.y=E.y-this.paper._viewBoxShift.dy,T.y*=C,T.width=E.width*C,T.height=E.height*C,T.x2=T.x+T.width,T.y2=T.y+T.height,T}return E},it._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},it.remove=function(){if(!this.removed&&this.node.parentNode){for(var E in this.paper.__set__&&this.paper.__set__.exclude(this),o.eve.unbind("raphael.*.*."+this.id),o._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;this.removed=!0}},it.attr=function(E,T){if(this.removed)return this;if(E==null){var C={};for(var D in this.attrs)this.attrs[h](D)&&(C[D]=this.attrs[D]);return C.gradient&&C.fill=="none"&&(C.fill=C.gradient)&&delete C.gradient,C.transform=this._.transform,C}if(T==null&&o.is(E,"string")){if(E=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var G=E.split(_),M={},V=0,q=G.length;V<q;V++)(E=G[V])in this.attrs?M[E]=this.attrs[E]:o.is(this.paper.customAttributes[E],"function")?M[E]=this.paper.customAttributes[E].def:M[E]=o._availableAttrs[E];return q-1?M:M[G[0]]}if(this.attrs&&T==null&&o.is(E,"array")){for(M={},V=0,q=E.length;V<q;V++)M[E[V]]=this.attr(E[V]);return M}var Z;for(var nt in T!=null&&((Z={})[E]=T),T==null&&o.is(E,"object")&&(Z=E),Z)S("raphael.attr."+nt+"."+this.id,this,Z[nt]);if(Z){for(nt in this.paper.customAttributes)if(this.paper.customAttributes[h](nt)&&Z[h](nt)&&o.is(this.paper.customAttributes[nt],"function")){var pt=this.paper.customAttributes[nt].apply(this,[].concat(Z[nt]));for(var kt in this.attrs[nt]=Z[nt],pt)pt[h](kt)&&(Z[kt]=pt[kt])}Z.text&&this.type=="text"&&(this.textpath.string=Z.text),wt(this,Z)}return this},it.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&o._tofront(this,this.paper),this},it.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),o._toback(this,this.paper)),this)},it.insertAfter=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[E.length-1]),E.node.nextSibling?E.node.parentNode.insertBefore(this.node,E.node.nextSibling):E.node.parentNode.appendChild(this.node),o._insertafter(this,E,this.paper),this)},it.insertBefore=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[0]),E.node.parentNode.insertBefore(this.node,E.node),o._insertbefore(this,E,this.paper),this)},it.blur=function(E){var T=this.node.runtimeStyle,C=T.filter;return C=C.replace(P,m),+E!=0?(this.attrs.blur=E,T.filter=C+x+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+E||1.5)+")",T.margin=o.format("-{0}px 0 0 -{0}px",d(+E||1.5))):(T.filter=C,T.margin=0,delete this.attrs.blur),this},o._engine.path=function(E,T){var C=W("shape");C.style.cssText=R,C.coordsize=L+x+L,C.coordorigin=T.coordorigin;var D=new xt(C,T),G={fill:"none",stroke:"#000"};E&&(G.path=E),D.type="path",D.path=[],D.Path=m,wt(D,G),T.canvas&&T.canvas.appendChild(C);var M=W("skew");return M.on=!0,C.appendChild(M),D.skew=M,D.transform(m),D},o._engine.rect=function(E,T,C,D,G,M){var V=o._rectPath(T,C,D,G,M),q=E.path(V),Z=q.attrs;return q.X=Z.x=T,q.Y=Z.y=C,q.W=Z.width=D,q.H=Z.height=G,Z.r=M,Z.path=V,q.type="rect",q},o._engine.ellipse=function(E,T,C,D,G){var M=E.path();return M.attrs,M.X=T-D,M.Y=C-G,M.W=2*D,M.H=2*G,M.type="ellipse",wt(M,{cx:T,cy:C,rx:D,ry:G}),M},o._engine.circle=function(E,T,C,D){var G=E.path();return G.attrs,G.X=T-D,G.Y=C-D,G.W=G.H=2*D,G.type="circle",wt(G,{cx:T,cy:C,r:D}),G},o._engine.image=function(E,T,C,D,G,M){var V=o._rectPath(C,D,G,M),q=E.path(V).attr({stroke:"none"}),Z=q.attrs,nt=q.node,pt=nt.getElementsByTagName("fill")[0];return Z.src=T,q.X=Z.x=C,q.Y=Z.y=D,q.W=Z.width=G,q.H=Z.height=M,Z.path=V,q.type="image",pt.parentNode==nt&&nt.removeChild(pt),pt.rotate=!0,pt.src=T,pt.type="tile",q._.fillpos=[C,D],q._.fillsize=[G,M],nt.appendChild(pt),tt(q,1,1,0,0,0),q},o._engine.text=function(E,T,C,D){var G=W("shape"),M=W("path"),V=W("textpath");T=T||0,C=C||0,D=D||"",M.v=o.format("m{0},{1}l{2},{1}",d(T*L),d(C*L),d(T*L)+1),M.textpathok=!0,V.string=l(D),V.on=!0,G.style.cssText=R,G.coordsize=L+x+L,G.coordorigin="0 0";var q=new xt(G,E),Z={fill:"#000",stroke:"none",font:o._availableAttrs.font,text:D};q.shape=G,q.path=M,q.textpath=V,q.type="text",q.attrs.text=l(D),q.attrs.x=T,q.attrs.y=C,q.attrs.w=1,q.attrs.h=1,wt(q,Z),G.appendChild(V),G.appendChild(M),E.canvas.appendChild(G);var nt=W("skew");return nt.on=!0,G.appendChild(nt),q.skew=nt,q.transform(m),q},o._engine.setSize=function(E,T){var C=this.canvas.style;return this.width=E,this.height=T,E==+E&&(E+="px"),T==+T&&(T+="px"),C.width=E,C.height=T,C.clip="rect(0 "+E+" "+T+" 0)",this._viewBox&&o._engine.setViewBox.apply(this,this._viewBox),this},o._engine.setViewBox=function(E,T,C,D,G){o.eve("raphael.setViewBox",this,this._viewBox,[E,T,C,D,G]);var M,V,q=this.getSize(),Z=q.width,nt=q.height;return G&&(C*(M=nt/D)<Z&&(E-=(Z-C*M)/2/M),D*(V=Z/C)<nt&&(T-=(nt-D*V)/2/V)),this._viewBox=[E,T,C,D,!!G],this._viewBoxShift={dx:-E,dy:-T,scale:q},this.forEach(function(pt){pt.transform("...")}),this},o._engine.initWin=function(E){var T=E.document;T.styleSheets.length<31?T.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):T.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!T.namespaces.rvml&&T.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),W=function(C){return T.createElement("<rvml:"+C+' class="rvml">')}}catch{W=function(C){return T.createElement("<"+C+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},o._engine.initWin(o._g.win),o._engine.create=function(){var E=o._getContainer.apply(0,arguments),T=E.container,C=E.height,D=E.width,G=E.x,M=E.y;if(!T)throw new Error("VML container not found.");var V=new o._Paper,q=V.canvas=o._g.doc.createElement("div"),Z=q.style;return G=G||0,M=M||0,D=D||512,C=C||342,V.width=D,V.height=C,D==+D&&(D+="px"),C==+C&&(C+="px"),V.coordsize=216e5+x+216e5,V.coordorigin="0 0",V.span=o._g.doc.createElement("span"),V.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",q.appendChild(V.span),Z.cssText=o.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",D,C),T==1?(o._g.doc.body.appendChild(q),Z.left=G+"px",Z.top=M+"px",Z.position="absolute"):T.firstChild?T.insertBefore(q,T.firstChild):T.appendChild(q),V.renderfix=function(){},V},o.prototype.clear=function(){o.eve("raphael.clear",this),this.canvas.innerHTML=m,this.span=o._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},o.prototype.remove=function(){for(var E in o.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;return!0};var Y=o.st;for(var O in it)it[h](O)&&!Y[h](O)&&(Y[O]=function(E){return function(){var T=arguments;return this.forEach(function(C){C[E].apply(C,T)})}}(O))}}).apply(r,s))===void 0||(e.exports=a)}])})})(Rg);var vS=Rg.exports;const mn=Cn(vS);class il{constructor(t=[]){Tt(this,"points");this.points=t}toSVGPathData(){const t=[];for(let e=0,r=this.length;e<r;e++)t.push([e===0?"M":"L",this.points[e].x,this.points[e].y]);return t}toSVGPathD(){let t="";for(let e=0,r=this.length;e<r;e++)t+=(e===0?"M":"L")+this.points[e].x+","+this.points[e].y;return t}get length(){return this.points.length}addPoint(t){this.points.push(t)}getPoint(t){return this.points[t]}isContainPoint(t){const e=t.x,r=t.y,i=this.length;let s=!1;const a=2e-10;for(let o=0,h=i-1;o<i;h=o,o++){const l=this.points[o].x,c=this.points[o].y,f=this.points[h].x,d=this.points[h].y;if(l===e&&c===r||f===e&&d===r||r===c&&r===d)return!0;if(r>=c&&r<d||r<c&&r>=d){const u=(f-l)/(d-c),p=l+u*(r-c);if(p===e||Math.abs(p-e)<a)return!0;p>e&&(s=!s)}}return s}[Symbol.iterator](){let t=0;return{next:()=>({value:t>=this.length-1?this.points[++t]:void 0,done:t>=this.length})}}static generateInMultiplePoint(t,e,r,i,s=1){const a=new il;for(let o=0;o<=s*r;o+=1){const h=Math.floor(o/s)/r*2*Math.PI,l=t+Math.cos(h)*i,c=e+Math.sin(h)*i;a.addPoint(new bi({x:l,y:c}))}return a}}mn.easing_formulas.swing=function(n){return n+Math.sin(n*Math.PI*2)/2},mn.easing_formulas.may_cause_seizures=function(n){return n+.2*Math.random()-.1},mn.fn.importSVG=function(n,t){const e=_S.fromRawSVG(n);return e.toRaphael(this,(r,i)=>{e.save(),t&&t(r),i(),e.restore()}),this},mn.fn.NPolygonPath=function(n,t,e,r,i=2){return{shape:this.path(il.generateInMultiplePoint(n,t,e,r,i).toSVGPathD()),afterPath:il.generateInMultiplePoint(n,t,e*i,r,1).toSVGPathD()}},mn.fn.zoom=function(n=1){return this.setViewBox(0,0,this.width/n,this.height/n),this},mn.fn.brickwall=function(n,t,e,r,i){for(var s=r/i,a=e/3,o={fill:"firebrick",stroke:"#CCC"},h=0;h<i;h+=1){var l=this.rect(0,0,a,s).attr(o),c=this.rect(0,0,2*a,s).attr(o);h%2?(l.transform("T"+n+","+(t+h*s)),c.transform("T"+(n+a)+","+(t+h*s))):(c.transform("T"+n+","+(t+h*s)),l.transform("T"+(n+2*a)+","+(t+h*s)))}},mn.fn.rosetta=function(n,t,e,r,i){const s=es.generateRosetta(n,t,e,r,i);return s.center,this.path(s.toSVGPathD())},mn.fn.moon=function(n){n=n||{},n.r=typeof n.r=="number"?n.r:100,n.phase=typeof n.phase=="number"?n.phase:.25,n.x=typeof n.x=="number"?n.x:0,n.y=typeof n.y=="number"?n.y:0,this.circle(n.r+n.x,n.r+n.y,n.r).attr({"stroke-width":0,fill:"#999"});function t(r){r=typeof r=="number"?r:.25,r=Math.max(0,Math.min(1,r)),r=(r-.5)*2;let i="M"+n.r+",0";i+="a"+n.r+","+n.r+" 0 0,0 0,"+n.r*2;let s=r>0?0:1;return r=Math.abs(r),r=r||1e-4,n.inner_r=n.r/Math.pow(r,.5),i+="M"+n.r+","+n.r*2,i+="a"+n.inner_r+","+n.inner_r+" 0 0,"+s+" 0,"+n.r*-2,i}var e=this.path(t(n.phase)).attr({"stroke-width":0,stroke:"#999",fill:"#FF9"}).transform("T"+n.x+","+n.y);return{setPhase:function(r){e.attr("path",t(r))}}},mn.fn.star=function(n,t,e){let r="M"+n+","+(t-e);for(var i=0;i<6;i+=1){const s=270+i*144,a=n+e*Math.cos(s*Math.PI/180),o=t+e*Math.sin(s*Math.PI/180);r+="L"+a+","+o}return this.path(r).attr("stroke-width",0).attr("fill","red")},mn.fn.heart=function(n=150,t=300){let e="M"+n+","+t;return e+="l120,-175a50,50 0 0,0 -120,-75a50,50 0 0,0 -120,75l120,175",this.path(e).attr("stroke","red").attr("fill","pink")},mn.el.redder=function(){const n=mn.getRGB(this.attr("fill"));n.r+=51,this.attr("fill","rgb("+n.r+","+n.g+","+n.b+")")},mn.installCustomAttributes=function(n){n.customAttributes.redness=function(t){const e=255*(1-t/100);return{fill:"rgb(255,"+e+", "+e+")"}},n.customAttributes.progress=function(t){const e=this.data("progresspath"),r=this.attr(),i={x:0,y:0},s=this.data("progresstrail");if(!e)return{transform:"t0,0"};Object.prototype.hasOwnProperty.call(r,"width")&&(i.x=-this.attr("width")/2,i.y=-this.attr("height")/2);const a=e.getTotalLength(),o=e.getPointAtLength(t*a);return s&&s.attr("path",e.getSubpath(0,t*a)),{transform:"t"+(o.x+i.x)+","+(o.y+i.y)+"r"+o.alpha}}};const Dg=mn;class Si{constructor(){Tt(this,"pgs",[]);Tt(this,"history",[])}save(){this.history.push(af(this.pgs))}restore(){const t=this.history.pop();t&&(this.pgs=t)}get size(){let t=0,e=0;return this.pgs.forEach(r=>{const i=r.pg;if(i){const[s,a,o,h]=i.bounds,[l,c]=i.size;t=Math.max(t,s,s+l,o),e=Math.max(e,a,a+c,h)}}),[Math.ceil(t),Math.ceil(e)]}static fromRawSVG(t){return Si.fromRawSVGUseRappar(t)}static fromRawSVGUseRappar(t){const e=new Si,r=pS(t);for(let i=0,s=r.length;i<s;i++){const a=r[i];if(a.type=="viewbox"&&a.width&&a.height)continue;const o={attrs:{}};for(const h in a)h==="type"||h==="path"||h==="transform"||(o.attrs[h]=a[h]);switch(a.type){case"path":o.d=a.path,o.pg=es.fromSVGPathD(a.path,a.transform);break}e.pgs.push(o)}return e}toRaphael(t,e){let r;t instanceof HTMLElement?r=Dg(HTMLElement):typeof t=="string"?r=Dg(document.getElementById(t)):r=t;const[i,s]=this.size;r.setSize(i,s);const a=(o=!1)=>{var h,l;for(let c=0,f=this.pgs.length;c<f;c++){const d=this.pgs[c];if(d.pg&&(d.raphaelPath?d.raphaelPath.attr("path",d.pg.toSVGPathD()):d.raphaelPath=r.path(d.pg.toSVGPathD()),d.raphaelPath.attr(d.attrs)),o&&e){const u=p=>{const{x:v,y:_}=dg(r.canvas,p),S=this.pgs.find(x=>{var m;return(m=x.raphaelPath)==null?void 0:m.isPointInside(v,_)});S&&(e==null||e(S,a))};(h=d.raphaelPath)==null||h.unclick(u),(l=d.raphaelPath)==null||l.click(u)}}};return a(!0),r}toCanvasOperation(t,e){let r;typeof t=="string"?r=document.getElementById(t):r=t;const[i,s]=this.size;r.width=i,r.height=s;const a=new wS(r),o=()=>{a.clearRect(0,0,i,s);for(let l=0,c=this.pgs.length;l<c;l++){const f=this.pgs[l];f.pg&&(a.save(),this.toCanvasAttrs(a,f.attrs),f.pg.toCanvas(a),f.attrs.stroke!=="none"&&a.stroke(),f.attrs.fill!=="none"&&a.fill(),a.restore())}};o();const h=l=>{const{x:c,y:f}=dg(a.canvas,l),d=this.pgs.find(u=>{var p;return(p=u.pg)==null?void 0:p.isPointInPath(c,f)});d&&(e==null||e(d,o))};return r.removeEventListener("click",h),r.addEventListener("click",h),a}toCanvasAttrs(t,e){for(const r in e){const i=e[r];switch(r){case"fill":t.fillStyle=String(i);break;case"stroke":t.strokeStyle=String(i);break;case"stroke-width":t.lineWidth=Number(i);break;case"stroke-linecap":t.lineCap=i;break;case"stroke-linejoin":t.lineJoin=i;break}}}static toDownloadSVGElement(t,e="shape"){hg(F8(t),`${e}.svg`)}toDownloadSVGElement(t,e="shape"){return Si.toDownloadSVGElement(t,e),this}static toDownloadSVGString(t,e="shape"){hg(lg(t),`${e}.svg`)}toDownloadSVGString(t,e="shape"){return Si.toDownloadSVGString(t,e),this}static getSVGDOM(t){if(t instanceof HTMLObjectElement||t instanceof HTMLIFrameElement)return t.contentDocument;if(t instanceof HTMLEmbedElement)return t.getSVGDocument()}}const _S=Si;class wS{constructor(t){Tt(this,"canvas");Tt(this,"context");Tt(this,"customContext");this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),this.customContext=new rl({canvas:this.canvas,width:this.canvas.width,height:this.canvas.height})}set lineWidth(t){this.context.lineWidth=t,this.customContext.lineWidth=t}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.context.lineCap=t,this.customContext.lineCap=t}get lineCap(){return this.context.lineCap}set lineJoin(t){this.context.lineJoin=t,this.customContext.lineCap=t}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.context.lineDashOffset=t,this.customContext.lineDashOffset=t}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.context.miterLimit=t,this.customContext.miterLimit=t}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext.globalAlpha=t}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext.fillStyle=t):(this.context.fillStyle=t.gradient,this.customContext.fillStyle=t.gradientCustom)}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext.strokeStyle=t):(this.context.strokeStyle=t.gradient,this.customContext.strokeStyle=t.gradientCustom)}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext.font=t}get font(){return this.context.font}fill(){return this.context.fill(),this.customContext.fill(),this}fillRect(t,e,r,i){return this.context.fillRect(t,e,r,i),this.customContext.fillRect(t,e,r,i),this}fillText(t,e,r,i){return this.context.fillText(t,e,r,i),this.customContext.fillText(t,e,r),this}setLineDash(t){return this.context.setLineDash(t),this.customContext.setLineDash(t),this}stroke(){return this.context.stroke(),this.customContext.stroke(),this}strokeText(t,e,r,i){return this.context.strokeText(t,e,r,i),this.customContext.strokeText(t,e,r),this}strokeRect(t,e,r,i){return this.context.strokeRect(t,e,r,i),this.customContext.strokeRect(t,e,r,i),this}clearRect(t=0,e=0,r=this.canvas.width,i=this.canvas.height){return this.context.clearRect(t,e,r,i),this.customContext.clearRect(t,e,r,i),this}save(){return this.context.save(),this.customContext.save(),this}restore(){return this.context.restore(),this.customContext.restore(),this}beginPath(){return this.context.beginPath(),this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext.closePath(),this}moveTo(t,e){return this.context.moveTo(t,e),this.customContext.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext.lineTo(t,e),this}arc(t,e,r,i,s,a){return this.context.arc(t,e,r,i,s,a),this.customContext.arc(t,e,r,i,s,a?-1:1),this}arcTo(t,e,r,i,s){return this.context.arcTo(t,e,r,i,s),this.customContext.arcTo(t,e,r,i,s),this}quadraticCurveTo(t,e,r,i){return this.context.quadraticCurveTo(t,e,r,i),this.customContext.quadraticCurveTo(t,e,r,i),this}bezierCurveTo(t,e,r,i,s,a){return this.context.bezierCurveTo(t,e,r,i,s,a),this.customContext.bezierCurveTo(t,e,r,i,s,a),this}rect(t,e,r,i){return this.context.rect(t,e,r,i),this.customContext.rect(t,e,r,i),this}translate(t,e){return this.context.translate(t,e),this.customContext.translate(t,e),this}rotate(t){return this.context.rotate(t),this.customContext.rotate(t),this}scale(t,e){return this.context.scale(t,e),this.customContext.scale(t,e),this}createLinearGradient(t,e,r,i,s){const a=this.context.createLinearGradient(t,e,r,i),o=this.customContext.createLinearGradient(t,e,r,i);return s&&Object.keys(s).forEach(h=>{const l=parseFloat(h);a.addColorStop(l,s[l]),o.addColorStop(l,s[l])}),{gradient:a,gradientCustom:o}}createRadialGradient(t,e,r,i,s,a,o){const h=this.context.createRadialGradient(t,e,r,i,s,a),l=this.customContext.createRadialGradient(t,e,r,i,s,a);return o&&Object.keys(o).forEach(c=>{const f=parseFloat(c);h.addColorStop(f,o[f]),l.addColorStop(f,o[f])}),{gradient:h,gradientCustom:l}}drawImage(t,e=0,r=0){return this.context.drawImage(t,e,r),this.customContext.drawImage(t,e,r),this}getImageData(t,e,r,i,s){return this.context.getImageData(t,e,r,i,s)}putImageData(t,e=0,r=0){return this.context.putImageData(t,e,r)}toRawSVG(){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}toSVGOperation(){const{raw:t}=this.toRawSVG();return Si.fromRawSVG(t)}}(function(){let n=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(t){const e=new Date().getTime(),r=Math.max(0,16-(e-n)),i=window.setTimeout(function(){t(e+r)},r);return n=e+r,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})})();const xS={colorPrimary:rn.getCSSVar("--color-primary"),colorRed:rn.getCSSVar("--color-red"),colorOrange:rn.getCSSVar("--color-orange"),colorYellow:rn.getCSSVar("--color-yellow"),colorGray3:rn.getCSSVar("--color-gray-3")};var Mg={exports:{}};(function(n){var t={};n.exports=t,t.parse=function(e,r){for(var i=t.bin.readUshort,s=t.bin.readUint,l=0,a={},o=new Uint8Array(e),h=o.length-4;s(o,h)!=101010256;)h--;var l=h;l+=4,l+=4;var c=i(o,l);l+=2,i(o,l),l+=2;var f=s(o,l);l+=4;var d=s(o,l);l+=4,l=d;for(var u=0;u<c;u++){s(o,l),l+=4,l+=4,l+=4,l+=4,s(o,l),l+=4;var f=s(o,l);l+=4;var p=s(o,l);l+=4;var v=i(o,l),_=i(o,l+2),S=i(o,l+4);l+=6,l+=8;var x=s(o,l);l+=4,l+=v+_+S,t._readLocal(o,x,a,f,p,r)}return a},t._readLocal=function(e,r,i,s,a,o){var h=t.bin.readUshort,l=t.bin.readUint;l(e,r),r+=4,h(e,r),r+=2,h(e,r),r+=2;var c=h(e,r);r+=2,l(e,r),r+=4,l(e,r),r+=4,r+=8;var f=h(e,r);r+=2;var d=h(e,r);r+=2;var u=t.bin.readUTF8(e,r,f);if(r+=f,r+=d,o){i[u]={size:a,csize:s};return}var p=new Uint8Array(e.buffer,r);if(c==0)i[u]=new Uint8Array(p.buffer.slice(r,r+s));else if(c==8){var v=new Uint8Array(a);t.inflateRaw(p,v),i[u]=v}else throw"unknown compression method: "+c},t.inflateRaw=function(e,r){return t.F.inflate(e,r)},t.inflate=function(e,r){return e[0],e[1],t.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),r)},t.deflate=function(e,r){r==null&&(r={level:6});var i=0,s=new Uint8Array(50+Math.floor(e.length*1.1));s[i]=120,s[i+1]=156,i+=2,i=t.F.deflateRaw(e,s,i,r.level);var a=t.adler(e,0,e.length);return s[i+0]=a>>>24&255,s[i+1]=a>>>16&255,s[i+2]=a>>>8&255,s[i+3]=a>>>0&255,new Uint8Array(s.buffer,0,i+4)},t.deflateRaw=function(e,r){r==null&&(r={level:6});var i=new Uint8Array(50+Math.floor(e.length*1.1)),s=t.F.deflateRaw(e,i,s,r.level);return new Uint8Array(i.buffer,0,s)},t.encode=function(e,r){r==null&&(r=!1);var i=0,s=t.bin.writeUint,a=t.bin.writeUshort,o={};for(var h in e){var l=!t._noNeed(h)&&!r,c=e[h],f=t.crc.crc(c,0,c.length);o[h]={cpr:l,usize:c.length,crc:f,file:l?t.deflateRaw(c):c}}for(var h in o)i+=o[h].file.length+30+46+2*t.bin.sizeUTF8(h);i+=22;var d=new Uint8Array(i),u=0,p=[];for(var h in o){var v=o[h];p.push(u),u=t._writeHeader(d,u,h,v,0)}var _=0,S=u;for(var h in o){var v=o[h];p.push(u),u=t._writeHeader(d,u,h,v,1,p[_++])}var x=u-S;return s(d,u,101010256),u+=4,u+=4,a(d,u,_),u+=2,a(d,u,_),u+=2,s(d,u,x),u+=4,s(d,u,S),u+=4,u+=2,d.buffer},t._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(r)!=-1},t._writeHeader=function(e,r,i,s,a,o){var h=t.bin.writeUint,l=t.bin.writeUshort,c=s.file;h(e,r,a==0?67324752:33639248),r+=4,a==1&&(r+=2),l(e,r,20),r+=2,l(e,r,0),r+=2,l(e,r,s.cpr?8:0),r+=2,h(e,r,0),r+=4,h(e,r,s.crc),r+=4,h(e,r,c.length),r+=4,h(e,r,s.usize),r+=4,l(e,r,t.bin.sizeUTF8(i)),r+=2,l(e,r,0),r+=2,a==1&&(r+=2,r+=2,r+=6,h(e,r,o),r+=4);var f=t.bin.writeUTF8(e,r,i);return r+=f,a==0&&(e.set(c,r),r+=c.length),r},t.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var i=r,s=0;s<8;s++)i&1?i=3988292384^i>>>1:i=i>>>1;e[r]=i}return e}(),update:function(e,r,i,s){for(var a=0;a<s;a++)e=t.crc.table[(e^r[i+a])&255]^e>>>8;return e},crc:function(e,r,i){return t.crc.update(4294967295,e,r,i)^4294967295}},t.adler=function(e,r,i){for(var s=1,a=0,o=r,h=r+i;o<h;){for(var l=Math.min(o+5552,h);o<l;)s+=e[o++],a+=s;s=s%65521,a=a%65521}return a<<16|s},t.bin={readUshort:function(e,r){return e[r]|e[r+1]<<8},writeUshort:function(e,r,i){e[r]=i&255,e[r+1]=i>>8&255},readUint:function(e,r){return e[r+3]*16777216+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,i){e[r]=i&255,e[r+1]=i>>8&255,e[r+2]=i>>16&255,e[r+3]=i>>24&255},readASCII:function(e,r,i){for(var s="",a=0;a<i;a++)s+=String.fromCharCode(e[r+a]);return s},writeASCII:function(e,r,i){for(var s=0;s<i.length;s++)e[r+s]=i.charCodeAt(s)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,r,i){for(var s="",a,o=0;o<i;o++)s+="%"+t.bin.pad(e[r+o].toString(16));try{a=decodeURIComponent(s)}catch{return t.bin.readASCII(e,r,i)}return a},writeUTF8:function(e,r,i){for(var s=i.length,a=0,o=0;o<s;o++){var h=i.charCodeAt(o);if(!(h&4294967168))e[r+a]=h,a++;else if(!(h&4294965248))e[r+a]=192|h>>6,e[r+a+1]=128|h>>0&63,a+=2;else if(!(h&4294901760))e[r+a]=224|h>>12,e[r+a+1]=128|h>>6&63,e[r+a+2]=128|h>>0&63,a+=3;else if(!(h&4292870144))e[r+a]=240|h>>18,e[r+a+1]=128|h>>12&63,e[r+a+2]=128|h>>6&63,e[r+a+3]=128|h>>0&63,a+=4;else throw"e"}return a},sizeUTF8:function(e){for(var r=e.length,i=0,s=0;s<r;s++){var a=e.charCodeAt(s);if(!(a&4294967168))i++;else if(!(a&4294965248))i+=2;else if(!(a&4294901760))i+=3;else if(!(a&4292870144))i+=4;else throw"e"}return i}},t.F={},t.F.deflateRaw=function(e,r,i,s){var a=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]],o=a[s],h=t.F.U,l=t.F._goodIndex;t.F._hash;var c=t.F._putsE,f=0,d=i<<3,u=0,p=e.length;if(s==0){for(;f<p;){var v=Math.min(65535,p-f);c(r,d,f+v==p?1:0),d=t.F._copyExact(e,f,v,r,d+8),f+=v}return d>>>3}var _=h.lits,S=h.strt,x=h.prev,m=0,k=0,F=0,P=0,N=0,R=0;for(p>2&&(R=t.F._hash(e,0),S[R]=0),f=0;f<p;f++){if(N=R,f+1<p-2){R=t.F._hash(e,f+1);var L=f+1&32767;x[L]=S[R],S[R]=L}if(u<=f){(m>14e3||k>26697)&&p-f>100&&(u<f&&(_[m]=f-u,m+=2,u=f),d=t.F._writeBlock(f==p-1||u==p?1:0,_,m,P,e,F,f-F,r,d),m=k=P=0,F=f);var U=0;f<p-2&&(U=t.F._bestMatch(e,f,x,N,Math.min(o[2],p-f),o[3]));var v=U>>>16,B=U&65535;if(U!=0){var v=U>>>16,B=U&65535,K=l(v,h.of0);h.lhst[257+K]++;var tt=l(B,h.df0);h.dhst[tt]++,P+=h.exb[K]+h.dxb[tt],_[m]=v<<23|f-u,_[m+1]=B<<16|K<<8|tt,m+=2,u=f+v}else h.lhst[e[f]]++;k++}}for((F!=f||e.length==0)&&(u<f&&(_[m]=f-u,m+=2,u=f),d=t.F._writeBlock(1,_,m,P,e,F,f-F,r,d),m=0,k=0,m=k=P=0,F=f);d&7;)d++;return d>>>3},t.F._bestMatch=function(e,r,i,s,a,o){var h=r&32767,l=i[h],c=h-l+32768&32767;if(l==h||s!=t.F._hash(e,r-c))return 0;for(var f=0,d=0,u=Math.min(32767,r);c<=u&&--o!=0&&l!=h;){if(f==0||e[r+f]==e[r+f-c]){var p=t.F._howLong(e,r,c);if(p>f){if(f=p,d=c,f>=a)break;c+2<p&&(p=c+2);for(var v=0,_=0;_<p-2;_++){var S=r-c+_+32768&32767,x=i[S],m=S-x+32768&32767;m>v&&(v=m,l=S)}}}h=l,l=i[h],c+=h-l+32768&32767}return f<<16|d},t.F._howLong=function(e,r,i){if(e[r]!=e[r-i]||e[r+1]!=e[r+1-i]||e[r+2]!=e[r+2-i])return 0;var s=r,a=Math.min(e.length,r+258);for(r+=3;r<a&&e[r]==e[r-i];)r++;return r-s},t.F._hash=function(e,r){return(e[r]<<8|e[r+1])+(e[r+2]<<4)&65535},t.saved=0,t.F._writeBlock=function(e,r,i,s,a,o,h,l,c){var f=t.F.U,d=t.F._putsF,u=t.F._putsE,p,v,_,S,x,m,k,F,P;f.lhst[256]++,p=t.F.getTrees(),v=p[0],_=p[1],S=p[2],x=p[3],m=p[4],k=p[5],F=p[6],P=p[7];var N=(c+3&7?8-(c+3&7):0)+32+(h<<3),R=s+t.F.contSize(f.fltree,f.lhst)+t.F.contSize(f.fdtree,f.dhst),L=s+t.F.contSize(f.ltree,f.lhst)+t.F.contSize(f.dtree,f.dhst);L+=14+3*k+t.F.contSize(f.itree,f.ihst)+(f.ihst[16]*2+f.ihst[17]*3+f.ihst[18]*7);for(var U=0;U<286;U++)f.lhst[U]=0;for(var U=0;U<30;U++)f.dhst[U]=0;for(var U=0;U<19;U++)f.ihst[U]=0;var B=N<R&&N<L?0:R<L?1:2;if(d(l,c,e),d(l,c+1,B),c+=3,B==0){for(;c&7;)c++;c=t.F._copyExact(a,o,h,l,c)}else{var K,tt;if(B==1&&(K=f.fltree,tt=f.fdtree),B==2){t.F.makeCodes(f.ltree,v),t.F.revCodes(f.ltree,v),t.F.makeCodes(f.dtree,_),t.F.revCodes(f.dtree,_),t.F.makeCodes(f.itree,S),t.F.revCodes(f.itree,S),K=f.ltree,tt=f.dtree,u(l,c,x-257),c+=5,u(l,c,m-1),c+=5,u(l,c,k-4),c+=4;for(var W=0;W<k;W++)u(l,c+W*3,f.itree[(f.ordr[W]<<1)+1]);c+=3*k,c=t.F._codeTiny(F,f.itree,l,c),c=t.F._codeTiny(P,f.itree,l,c)}for(var lt=o,wt=0;wt<i;wt+=2){for(var bt=r[wt],xt=bt>>>23,it=lt+(bt&8388607);lt<it;)c=t.F._writeLit(a[lt++],K,l,c);if(xt!=0){var Y=r[wt+1],O=Y>>16,E=Y>>8&255,T=Y&255;c=t.F._writeLit(257+E,K,l,c),u(l,c,xt-f.of0[E]),c+=f.exb[E],c=t.F._writeLit(T,tt,l,c),d(l,c,O-f.df0[T]),c+=f.dxb[T],lt+=xt}}c=t.F._writeLit(256,K,l,c)}return c},t.F._copyExact=function(e,r,i,s,a){var o=a>>>3;return s[o]=i,s[o+1]=i>>>8,s[o+2]=255-s[o],s[o+3]=255-s[o+1],o+=4,s.set(new Uint8Array(e.buffer,r,i),o),a+(i+4<<3)},t.F.getTrees=function(){for(var e=t.F.U,r=t.F._hufTree(e.lhst,e.ltree,15),i=t.F._hufTree(e.dhst,e.dtree,15),s=[],a=t.F._lenCodes(e.ltree,s),o=[],h=t.F._lenCodes(e.dtree,o),l=0;l<s.length;l+=2)e.ihst[s[l]]++;for(var l=0;l<o.length;l+=2)e.ihst[o[l]]++;for(var c=t.F._hufTree(e.ihst,e.itree,7),f=19;f>4&&e.itree[(e.ordr[f-1]<<1)+1]==0;)f--;return[r,i,c,a,h,f,s,o]},t.F.getSecond=function(e){for(var r=[],i=0;i<e.length;i+=2)r.push(e[i+1]);return r},t.F.nonZero=function(e){for(var r="",i=0;i<e.length;i+=2)e[i+1]!=0&&(r+=(i>>1)+",");return r},t.F.contSize=function(e,r){for(var i=0,s=0;s<r.length;s++)i+=r[s]*e[(s<<1)+1];return i},t.F._codeTiny=function(e,r,i,s){for(var a=0;a<e.length;a+=2){var o=e[a],h=e[a+1];s=t.F._writeLit(o,r,i,s);var l=o==16?2:o==17?3:7;o>15&&(t.F._putsE(i,s,h,l),s+=l)}return s},t.F._lenCodes=function(e,r){for(var i=e.length;i!=2&&e[i-1]==0;)i-=2;for(var s=0;s<i;s+=2){var a=e[s+1],o=s+3<i?e[s+3]:-1,h=s+5<i?e[s+5]:-1,l=s==0?-1:e[s-1];if(a==0&&o==a&&h==a){for(var c=s+5;c+2<i&&e[c+2]==a;)c+=2;var f=Math.min(c+1-s>>>1,138);f<11?r.push(17,f-3):r.push(18,f-11),s+=f*2-2}else if(a==l&&o==a&&h==a){for(var c=s+5;c+2<i&&e[c+2]==a;)c+=2;var f=Math.min(c+1-s>>>1,6);r.push(16,f-3),s+=f*2-2}else r.push(a,0)}return i>>>1},t.F._hufTree=function(e,r,i){var s=[],a=e.length,o=r.length,h=0;for(h=0;h<o;h+=2)r[h]=0,r[h+1]=0;for(h=0;h<a;h++)e[h]!=0&&s.push({lit:h,f:e[h]});var l=s.length,c=s.slice(0);if(l==0)return 0;if(l==1){var f=s[0].lit,c=f==0?1:0;return r[(f<<1)+1]=1,r[(c<<1)+1]=1,1}s.sort(function(x,m){return x.f-m.f});var d=s[0],u=s[1],p=0,v=1,_=2;for(s[0]={lit:-1,f:d.f+u.f,l:d,r:u,d:0};v!=l-1;)p!=v&&(_==l||s[p].f<s[_].f)?d=s[p++]:d=s[_++],p!=v&&(_==l||s[p].f<s[_].f)?u=s[p++]:u=s[_++],s[v++]={lit:-1,f:d.f+u.f,l:d,r:u};var S=t.F.setDepth(s[v-1],0);for(S>i&&(t.F.restrictDepth(c,i,S),S=i),h=0;h<l;h++)r[(c[h].lit<<1)+1]=c[h].d;return S},t.F.setDepth=function(e,r){return e.lit!=-1?(e.d=r,r):Math.max(t.F.setDepth(e.l,r+1),t.F.setDepth(e.r,r+1))},t.F.restrictDepth=function(e,r,i){var s=0,a=1<<i-r,o=0;for(e.sort(function(l,c){return c.d==l.d?l.f-c.f:c.d-l.d}),s=0;s<e.length&&e[s].d>r;s++){var h=e[s].d;e[s].d=r,o+=a-(1<<i-h)}for(o=o>>>i-r;o>0;){var h=e[s].d;h<r?(e[s].d++,o-=1<<r-h-1):s++}for(;s>=0;s--)e[s].d==r&&o<0&&(e[s].d--,o++);o!=0&&console.log("debt left")},t.F._goodIndex=function(e,r){var i=0;return r[i|16]<=e&&(i|=16),r[i|8]<=e&&(i|=8),r[i|4]<=e&&(i|=4),r[i|2]<=e&&(i|=2),r[i|1]<=e&&(i|=1),i},t.F._writeLit=function(e,r,i,s){return t.F._putsF(i,s,r[e<<1]),s+r[(e<<1)+1]},t.F.inflate=function(e,r){var i=Uint8Array;if(e[0]==3&&e[1]==0)return r||new i(0);var s=t.F,a=s._bitsF,o=s._bitsE,h=s._decodeTiny,l=s.makeCodes,c=s.codes2map,f=s._get17,d=s.U,u=r==null;u&&(r=new i(e.length>>>2<<3));for(var p=0,v=0,_=0,S=0,x=0,m=0,k=0,F=0,P=0,N,R;p==0;){if(p=a(e,P,1),v=a(e,P+1,2),P+=3,v==0){P&7&&(P+=8-(P&7));var L=(P>>>3)+4,U=e[L-4]|e[L-3]<<8;u&&(r=t.F._check(r,F+U)),r.set(new i(e.buffer,e.byteOffset+L,U),F),P=L+U<<3,F+=U;continue}if(u&&(r=t.F._check(r,F+131072)),v==1&&(N=d.flmap,R=d.fdmap,m=511,k=31),v==2){_=o(e,P,5)+257,S=o(e,P+5,5)+1,x=o(e,P+10,4)+4,P+=14;for(var B=0;B<38;B+=2)d.itree[B]=0,d.itree[B+1]=0;for(var K=1,B=0;B<x;B++){var tt=o(e,P+B*3,3);d.itree[(d.ordr[B]<<1)+1]=tt,tt>K&&(K=tt)}P+=3*x,l(d.itree,K),c(d.itree,K,d.imap),N=d.lmap,R=d.dmap,P=h(d.imap,(1<<K)-1,_+S,e,P,d.ttree);var W=s._copyOut(d.ttree,0,_,d.ltree);m=(1<<W)-1;var lt=s._copyOut(d.ttree,_,S,d.dtree);k=(1<<lt)-1,l(d.ltree,W),c(d.ltree,W,N),l(d.dtree,lt),c(d.dtree,lt,R)}for(;;){var wt=N[f(e,P)&m];P+=wt&15;var bt=wt>>>4;if(!(bt>>>8))r[F++]=bt;else{if(bt==256)break;var xt=F+bt-254;if(bt>264){var it=d.ldef[bt-257];xt=F+(it>>>3)+o(e,P,it&7),P+=it&7}var Y=R[f(e,P)&k];P+=Y&15;var O=Y>>>4,E=d.ddef[O],T=(E>>>4)+a(e,P,E&15);for(P+=E&15,u&&(r=t.F._check(r,F+131072));F<xt;)r[F]=r[F++-T],r[F]=r[F++-T],r[F]=r[F++-T],r[F]=r[F++-T];F=xt}}}return r.length==F?r:r.slice(0,F)},t.F._check=function(e,r){var i=e.length;if(r<=i)return e;var s=new Uint8Array(Math.max(i<<1,r));return s.set(e,0),s},t.F._decodeTiny=function(e,r,i,s,a,o){for(var h=t.F._bitsE,l=t.F._get17,c=0;c<i;){var f=e[l(s,a)&r];a+=f&15;var d=f>>>4;if(d<=15)o[c]=d,c++;else{var u=0,p=0;d==16?(p=3+h(s,a,2),a+=2,u=o[c-1]):d==17?(p=3+h(s,a,3),a+=3):d==18&&(p=11+h(s,a,7),a+=7);for(var v=c+p;c<v;)o[c]=u,c++}}return a},t.F._copyOut=function(e,r,i,s){for(var a=0,o=0,h=s.length>>>1;o<i;){var l=e[o+r];s[o<<1]=0,s[(o<<1)+1]=l,l>a&&(a=l),o++}for(;o<h;)s[o<<1]=0,s[(o<<1)+1]=0,o++;return a},t.F.makeCodes=function(e,r){for(var i=t.F.U,s=e.length,a,o,h,f,l,c=i.bl_count,f=0;f<=r;f++)c[f]=0;for(f=1;f<s;f+=2)c[e[f]]++;var d=i.next_code;for(a=0,c[0]=0,o=1;o<=r;o++)a=a+c[o-1]<<1,d[o]=a;for(h=0;h<s;h+=2)l=e[h+1],l!=0&&(e[h]=d[l],d[l]++)},t.F.codes2map=function(e,r,i){for(var s=e.length,a=t.F.U,o=a.rev15,h=0;h<s;h+=2)if(e[h+1]!=0)for(var l=h>>1,c=e[h+1],f=l<<4|c,d=r-c,u=e[h]<<d,p=u+(1<<d);u!=p;){var v=o[u]>>>15-r;i[v]=f,u++}},t.F.revCodes=function(e,r){for(var i=t.F.U.rev15,s=15-r,a=0;a<e.length;a+=2){var o=e[a]<<r-e[a+1];e[a]=i[o]>>>s}},t.F._putsE=function(e,r,i){i=i<<(r&7);var s=r>>>3;e[s]|=i,e[s+1]|=i>>>8},t.F._putsF=function(e,r,i){i=i<<(r&7);var s=r>>>3;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},t.F._bitsE=function(e,r,i){return(e[r>>>3]|e[(r>>>3)+1]<<8)>>>(r&7)&(1<<i)-1},t.F._bitsF=function(e,r,i){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16)>>>(r&7)&(1<<i)-1},t.F._get17=function(e,r){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16)>>>(r&7)},t.F._get25=function(e,r){return(e[r>>>3]|e[(r>>>3)+1]<<8|e[(r>>>3)+2]<<16|e[(r>>>3)+3]<<24)>>>(r&7)},t.F.U=function(){var e=Uint16Array,r=Uint32Array;return{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new e(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new r(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new r(286),dhst:new r(30),ihst:new r(19),lits:new r(15e3),strt:new e(65536),prev:new e(32768)}}(),function(){for(var e=t.F.U,r=32768,i=0;i<r;i++){var s=i;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,e.rev15[i]=(s>>>16|s<<16)>>>17}function a(o,h,l){for(;h--!=0;)o.push(0,l)}for(var i=0;i<32;i++)e.ldef[i]=e.of0[i]<<3|e.exb[i],e.ddef[i]=e.df0[i]<<4|e.dxb[i];a(e.fltree,144,8),a(e.fltree,112,9),a(e.fltree,24,7),a(e.fltree,8,8),t.F.makeCodes(e.fltree,9),t.F.codes2map(e.fltree,9,e.flmap),t.F.revCodes(e.fltree,9),a(e.fdtree,32,5),t.F.makeCodes(e.fdtree,5),t.F.codes2map(e.fdtree,5,e.fdmap),t.F.revCodes(e.fdtree,5),a(e.itree,19,0),a(e.ltree,286,0),a(e.dtree,30,0),a(e.ttree,320,0)}()})(Mg);var bS=Mg.exports;const Ig=Cn(bS);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const SS=4,jg=0,Lg=1,kS=2;function ns(n){let t=n.length;for(;--t>=0;)n[t]=0}const CS=0,Ug=1,TS=2,PS=3,ES=258,su=29,Zs=256,Ws=Zs+1+su,rs=30,au=19,Gg=2*Ws+1,ki=15,ou=16,AS=7,lu=256,zg=16,Vg=17,Bg=18,hu=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),sl=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),OS=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Hg=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$S=512,Er=new Array((Ws+2)*2);ns(Er);const ta=new Array(rs*2);ns(ta);const ea=new Array($S);ns(ea);const na=new Array(ES-PS+1);ns(na);const cu=new Array(su);ns(cu);const al=new Array(rs);ns(al);function uu(n,t,e,r,i){this.static_tree=n,this.extra_bits=t,this.extra_base=e,this.elems=r,this.max_length=i,this.has_stree=n&&n.length}let qg,Kg,Yg;function du(n,t){this.dyn_tree=n,this.max_code=0,this.stat_desc=t}const Xg=n=>n<256?ea[n]:ea[256+(n>>>7)],ra=(n,t)=>{n.pending_buf[n.pending++]=t&255,n.pending_buf[n.pending++]=t>>>8&255},yn=(n,t,e)=>{n.bi_valid>ou-e?(n.bi_buf|=t<<n.bi_valid&65535,ra(n,n.bi_buf),n.bi_buf=t>>ou-n.bi_valid,n.bi_valid+=e-ou):(n.bi_buf|=t<<n.bi_valid&65535,n.bi_valid+=e)},lr=(n,t,e)=>{yn(n,e[t*2],e[t*2+1])},Jg=(n,t)=>{let e=0;do e|=n&1,n>>>=1,e<<=1;while(--t>0);return e>>>1},FS=n=>{n.bi_valid===16?(ra(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8)},NS=(n,t)=>{const e=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,h=t.stat_desc.max_length;let l,c,f,d,u,p,v=0;for(d=0;d<=ki;d++)n.bl_count[d]=0;for(e[n.heap[n.heap_max]*2+1]=0,l=n.heap_max+1;l<Gg;l++)c=n.heap[l],d=e[e[c*2+1]*2+1]+1,d>h&&(d=h,v++),e[c*2+1]=d,!(c>r)&&(n.bl_count[d]++,u=0,c>=o&&(u=a[c-o]),p=e[c*2],n.opt_len+=p*(d+u),s&&(n.static_len+=p*(i[c*2+1]+u)));if(v!==0){do{for(d=h-1;n.bl_count[d]===0;)d--;n.bl_count[d]--,n.bl_count[d+1]+=2,n.bl_count[h]--,v-=2}while(v>0);for(d=h;d!==0;d--)for(c=n.bl_count[d];c!==0;)f=n.heap[--l],!(f>r)&&(e[f*2+1]!==d&&(n.opt_len+=(d-e[f*2+1])*e[f*2],e[f*2+1]=d),c--)}},Qg=(n,t,e)=>{const r=new Array(ki+1);let i=0,s,a;for(s=1;s<=ki;s++)i=i+e[s-1]<<1,r[s]=i;for(a=0;a<=t;a++){let o=n[a*2+1];o!==0&&(n[a*2]=Jg(r[o]++,o))}},RS=()=>{let n,t,e,r,i;const s=new Array(ki+1);for(e=0,r=0;r<su-1;r++)for(cu[r]=e,n=0;n<1<<hu[r];n++)na[e++]=r;for(na[e-1]=r,i=0,r=0;r<16;r++)for(al[r]=i,n=0;n<1<<sl[r];n++)ea[i++]=r;for(i>>=7;r<rs;r++)for(al[r]=i<<7,n=0;n<1<<sl[r]-7;n++)ea[256+i++]=r;for(t=0;t<=ki;t++)s[t]=0;for(n=0;n<=143;)Er[n*2+1]=8,n++,s[8]++;for(;n<=255;)Er[n*2+1]=9,n++,s[9]++;for(;n<=279;)Er[n*2+1]=7,n++,s[7]++;for(;n<=287;)Er[n*2+1]=8,n++,s[8]++;for(Qg(Er,Ws+1,s),n=0;n<rs;n++)ta[n*2+1]=5,ta[n*2]=Jg(n,5);qg=new uu(Er,hu,Zs+1,Ws,ki),Kg=new uu(ta,sl,0,rs,ki),Yg=new uu(new Array(0),OS,0,au,AS)},Zg=n=>{let t;for(t=0;t<Ws;t++)n.dyn_ltree[t*2]=0;for(t=0;t<rs;t++)n.dyn_dtree[t*2]=0;for(t=0;t<au;t++)n.bl_tree[t*2]=0;n.dyn_ltree[lu*2]=1,n.opt_len=n.static_len=0,n.sym_next=n.matches=0},Wg=n=>{n.bi_valid>8?ra(n,n.bi_buf):n.bi_valid>0&&(n.pending_buf[n.pending++]=n.bi_buf),n.bi_buf=0,n.bi_valid=0},tm=(n,t,e,r)=>{const i=t*2,s=e*2;return n[i]<n[s]||n[i]===n[s]&&r[t]<=r[e]},fu=(n,t,e)=>{const r=n.heap[e];let i=e<<1;for(;i<=n.heap_len&&(i<n.heap_len&&tm(t,n.heap[i+1],n.heap[i],n.depth)&&i++,!tm(t,r,n.heap[i],n.depth));)n.heap[e]=n.heap[i],e=i,i<<=1;n.heap[e]=r},em=(n,t,e)=>{let r,i,s=0,a,o;if(n.sym_next!==0)do r=n.pending_buf[n.sym_buf+s++]&255,r+=(n.pending_buf[n.sym_buf+s++]&255)<<8,i=n.pending_buf[n.sym_buf+s++],r===0?lr(n,i,t):(a=na[i],lr(n,a+Zs+1,t),o=hu[a],o!==0&&(i-=cu[a],yn(n,i,o)),r--,a=Xg(r),lr(n,a,e),o=sl[a],o!==0&&(r-=al[a],yn(n,r,o)));while(s<n.sym_next);lr(n,lu,t)},pu=(n,t)=>{const e=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems;let a,o,h=-1,l;for(n.heap_len=0,n.heap_max=Gg,a=0;a<s;a++)e[a*2]!==0?(n.heap[++n.heap_len]=h=a,n.depth[a]=0):e[a*2+1]=0;for(;n.heap_len<2;)l=n.heap[++n.heap_len]=h<2?++h:0,e[l*2]=1,n.depth[l]=0,n.opt_len--,i&&(n.static_len-=r[l*2+1]);for(t.max_code=h,a=n.heap_len>>1;a>=1;a--)fu(n,e,a);l=s;do a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],fu(n,e,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,e[l*2]=e[a*2]+e[o*2],n.depth[l]=(n.depth[a]>=n.depth[o]?n.depth[a]:n.depth[o])+1,e[a*2+1]=e[o*2+1]=l,n.heap[1]=l++,fu(n,e,1);while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],NS(n,t),Qg(e,h,n.bl_count)},nm=(n,t,e)=>{let r,i=-1,s,a=t[0*2+1],o=0,h=7,l=4;for(a===0&&(h=138,l=3),t[(e+1)*2+1]=65535,r=0;r<=e;r++)s=a,a=t[(r+1)*2+1],!(++o<h&&s===a)&&(o<l?n.bl_tree[s*2]+=o:s!==0?(s!==i&&n.bl_tree[s*2]++,n.bl_tree[zg*2]++):o<=10?n.bl_tree[Vg*2]++:n.bl_tree[Bg*2]++,o=0,i=s,a===0?(h=138,l=3):s===a?(h=6,l=3):(h=7,l=4))},rm=(n,t,e)=>{let r,i=-1,s,a=t[0*2+1],o=0,h=7,l=4;for(a===0&&(h=138,l=3),r=0;r<=e;r++)if(s=a,a=t[(r+1)*2+1],!(++o<h&&s===a)){if(o<l)do lr(n,s,n.bl_tree);while(--o!==0);else s!==0?(s!==i&&(lr(n,s,n.bl_tree),o--),lr(n,zg,n.bl_tree),yn(n,o-3,2)):o<=10?(lr(n,Vg,n.bl_tree),yn(n,o-3,3)):(lr(n,Bg,n.bl_tree),yn(n,o-11,7));o=0,i=s,a===0?(h=138,l=3):s===a?(h=6,l=3):(h=7,l=4)}},DS=n=>{let t;for(nm(n,n.dyn_ltree,n.l_desc.max_code),nm(n,n.dyn_dtree,n.d_desc.max_code),pu(n,n.bl_desc),t=au-1;t>=3&&n.bl_tree[Hg[t]*2+1]===0;t--);return n.opt_len+=3*(t+1)+5+5+4,t},MS=(n,t,e,r)=>{let i;for(yn(n,t-257,5),yn(n,e-1,5),yn(n,r-4,4),i=0;i<r;i++)yn(n,n.bl_tree[Hg[i]*2+1],3);rm(n,n.dyn_ltree,t-1),rm(n,n.dyn_dtree,e-1)},IS=n=>{let t=4093624447,e;for(e=0;e<=31;e++,t>>>=1)if(t&1&&n.dyn_ltree[e*2]!==0)return jg;if(n.dyn_ltree[9*2]!==0||n.dyn_ltree[10*2]!==0||n.dyn_ltree[13*2]!==0)return Lg;for(e=32;e<Zs;e++)if(n.dyn_ltree[e*2]!==0)return Lg;return jg};let im=!1;const jS=n=>{im||(RS(),im=!0),n.l_desc=new du(n.dyn_ltree,qg),n.d_desc=new du(n.dyn_dtree,Kg),n.bl_desc=new du(n.bl_tree,Yg),n.bi_buf=0,n.bi_valid=0,Zg(n)},sm=(n,t,e,r)=>{yn(n,(CS<<1)+(r?1:0),3),Wg(n),ra(n,e),ra(n,~e),e&&n.pending_buf.set(n.window.subarray(t,t+e),n.pending),n.pending+=e},LS=n=>{yn(n,Ug<<1,3),lr(n,lu,Er),FS(n)},US=(n,t,e,r)=>{let i,s,a=0;n.level>0?(n.strm.data_type===kS&&(n.strm.data_type=IS(n)),pu(n,n.l_desc),pu(n,n.d_desc),a=DS(n),i=n.opt_len+3+7>>>3,s=n.static_len+3+7>>>3,s<=i&&(i=s)):i=s=e+5,e+4<=i&&t!==-1?sm(n,t,e,r):n.strategy===SS||s===i?(yn(n,(Ug<<1)+(r?1:0),3),em(n,Er,ta)):(yn(n,(TS<<1)+(r?1:0),3),MS(n,n.l_desc.max_code+1,n.d_desc.max_code+1,a+1),em(n,n.dyn_ltree,n.dyn_dtree)),Zg(n),r&&Wg(n)},GS=(n,t,e)=>(n.pending_buf[n.sym_buf+n.sym_next++]=t,n.pending_buf[n.sym_buf+n.sym_next++]=t>>8,n.pending_buf[n.sym_buf+n.sym_next++]=e,t===0?n.dyn_ltree[e*2]++:(n.matches++,t--,n.dyn_ltree[(na[e]+Zs+1)*2]++,n.dyn_dtree[Xg(t)*2]++),n.sym_next===n.sym_end);var zS=jS,VS=sm,BS=US,HS=GS,qS=LS,KS={_tr_init:zS,_tr_stored_block:VS,_tr_flush_block:BS,_tr_tally:HS,_tr_align:qS},ia=(n,t,e,r)=>{let i=n&65535|0,s=n>>>16&65535|0,a=0;for(;e!==0;){a=e>2e3?2e3:e,e-=a;do i=i+t[r++]|0,s=s+i|0;while(--a);i%=65521,s%=65521}return i|s<<16|0};const YS=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},XS=new Uint32Array(YS());var Ye=(n,t,e,r)=>{const i=XS,s=r+e;n^=-1;for(let a=r;a<s;a++)n=n>>>8^i[(n^t[a])&255];return n^-1},Ci={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ti={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:JS,_tr_stored_block:gu,_tr_flush_block:QS,_tr_tally:Qr,_tr_align:ZS}=KS,{Z_NO_FLUSH:Zr,Z_PARTIAL_FLUSH:WS,Z_FULL_FLUSH:tk,Z_FINISH:Dn,Z_BLOCK:am,Z_OK:tn,Z_STREAM_END:om,Z_STREAM_ERROR:hr,Z_DATA_ERROR:ek,Z_BUF_ERROR:mu,Z_DEFAULT_COMPRESSION:nk,Z_FILTERED:rk,Z_HUFFMAN_ONLY:ol,Z_RLE:ik,Z_FIXED:sk,Z_DEFAULT_STRATEGY:ak,Z_UNKNOWN:ok,Z_DEFLATED:ll}=Ti,lk=9,hk=15,ck=8,uk=29,dk=256,yu=dk+1+uk,fk=30,pk=19,gk=2*yu+1,mk=15,ie=3,Wr=258,cr=Wr+ie+1,yk=32,is=42,vu=57,_u=69,wu=73,xu=91,bu=103,Pi=113,sa=666,dn=1,ss=2,Ei=3,as=4,vk=3,Ai=(n,t)=>(n.msg=Ci[t],t),lm=n=>n*2-(n>4?9:0),ti=n=>{let t=n.length;for(;--t>=0;)n[t]=0},_k=n=>{let t,e,r,i=n.w_size;t=n.hash_size,r=t;do e=n.head[--r],n.head[r]=e>=i?e-i:0;while(--t);t=i,r=t;do e=n.prev[--r],n.prev[r]=e>=i?e-i:0;while(--t)};let wk=(n,t,e)=>(t<<n.hash_shift^e)&n.hash_mask,ei=wk;const Tn=n=>{const t=n.state;let e=t.pending;e>n.avail_out&&(e=n.avail_out),e!==0&&(n.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+e),n.next_out),n.next_out+=e,t.pending_out+=e,n.total_out+=e,n.avail_out-=e,t.pending-=e,t.pending===0&&(t.pending_out=0))},Pn=(n,t)=>{QS(n,n.block_start>=0?n.block_start:-1,n.strstart-n.block_start,t),n.block_start=n.strstart,Tn(n.strm)},de=(n,t)=>{n.pending_buf[n.pending++]=t},aa=(n,t)=>{n.pending_buf[n.pending++]=t>>>8&255,n.pending_buf[n.pending++]=t&255},Su=(n,t,e,r)=>{let i=n.avail_in;return i>r&&(i=r),i===0?0:(n.avail_in-=i,t.set(n.input.subarray(n.next_in,n.next_in+i),e),n.state.wrap===1?n.adler=ia(n.adler,t,i,e):n.state.wrap===2&&(n.adler=Ye(n.adler,t,i,e)),n.next_in+=i,n.total_in+=i,i)},hm=(n,t)=>{let e=n.max_chain_length,r=n.strstart,i,s,a=n.prev_length,o=n.nice_match;const h=n.strstart>n.w_size-cr?n.strstart-(n.w_size-cr):0,l=n.window,c=n.w_mask,f=n.prev,d=n.strstart+Wr;let u=l[r+a-1],p=l[r+a];n.prev_length>=n.good_match&&(e>>=2),o>n.lookahead&&(o=n.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==u||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<d);if(s=Wr-(d-r),r=d-Wr,s>a){if(n.match_start=t,a=s,s>=o)break;u=l[r+a-1],p=l[r+a]}}while((t=f[t&c])>h&&--e!==0);return a<=n.lookahead?a:n.lookahead},os=n=>{const t=n.w_size;let e,r,i;do{if(r=n.window_size-n.lookahead-n.strstart,n.strstart>=t+(t-cr)&&(n.window.set(n.window.subarray(t,t+t-r),0),n.match_start-=t,n.strstart-=t,n.block_start-=t,n.insert>n.strstart&&(n.insert=n.strstart),_k(n),r+=t),n.strm.avail_in===0)break;if(e=Su(n.strm,n.window,n.strstart+n.lookahead,r),n.lookahead+=e,n.lookahead+n.insert>=ie)for(i=n.strstart-n.insert,n.ins_h=n.window[i],n.ins_h=ei(n,n.ins_h,n.window[i+1]);n.insert&&(n.ins_h=ei(n,n.ins_h,n.window[i+ie-1]),n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++,n.insert--,!(n.lookahead+n.insert<ie)););}while(n.lookahead<cr&&n.strm.avail_in!==0)},cm=(n,t)=>{let e=n.pending_buf_size-5>n.w_size?n.w_size:n.pending_buf_size-5,r,i,s,a=0,o=n.strm.avail_in;do{if(r=65535,s=n.bi_valid+42>>3,n.strm.avail_out<s||(s=n.strm.avail_out-s,i=n.strstart-n.block_start,r>i+n.strm.avail_in&&(r=i+n.strm.avail_in),r>s&&(r=s),r<e&&(r===0&&t!==Dn||t===Zr||r!==i+n.strm.avail_in)))break;a=t===Dn&&r===i+n.strm.avail_in?1:0,gu(n,0,0,a),n.pending_buf[n.pending-4]=r,n.pending_buf[n.pending-3]=r>>8,n.pending_buf[n.pending-2]=~r,n.pending_buf[n.pending-1]=~r>>8,Tn(n.strm),i&&(i>r&&(i=r),n.strm.output.set(n.window.subarray(n.block_start,n.block_start+i),n.strm.next_out),n.strm.next_out+=i,n.strm.avail_out-=i,n.strm.total_out+=i,n.block_start+=i,r-=i),r&&(Su(n.strm,n.strm.output,n.strm.next_out,r),n.strm.next_out+=r,n.strm.avail_out-=r,n.strm.total_out+=r)}while(a===0);return o-=n.strm.avail_in,o&&(o>=n.w_size?(n.matches=2,n.window.set(n.strm.input.subarray(n.strm.next_in-n.w_size,n.strm.next_in),0),n.strstart=n.w_size,n.insert=n.strstart):(n.window_size-n.strstart<=o&&(n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,n.insert>n.strstart&&(n.insert=n.strstart)),n.window.set(n.strm.input.subarray(n.strm.next_in-o,n.strm.next_in),n.strstart),n.strstart+=o,n.insert+=o>n.w_size-n.insert?n.w_size-n.insert:o),n.block_start=n.strstart),n.high_water<n.strstart&&(n.high_water=n.strstart),a?as:t!==Zr&&t!==Dn&&n.strm.avail_in===0&&n.strstart===n.block_start?ss:(s=n.window_size-n.strstart,n.strm.avail_in>s&&n.block_start>=n.w_size&&(n.block_start-=n.w_size,n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,s+=n.w_size,n.insert>n.strstart&&(n.insert=n.strstart)),s>n.strm.avail_in&&(s=n.strm.avail_in),s&&(Su(n.strm,n.window,n.strstart,s),n.strstart+=s,n.insert+=s>n.w_size-n.insert?n.w_size-n.insert:s),n.high_water<n.strstart&&(n.high_water=n.strstart),s=n.bi_valid+42>>3,s=n.pending_buf_size-s>65535?65535:n.pending_buf_size-s,e=s>n.w_size?n.w_size:s,i=n.strstart-n.block_start,(i>=e||(i||t===Dn)&&t!==Zr&&n.strm.avail_in===0&&i<=s)&&(r=i>s?s:i,a=t===Dn&&n.strm.avail_in===0&&r===i?1:0,gu(n,n.block_start,r,a),n.block_start+=r,Tn(n.strm)),a?Ei:dn)},ku=(n,t)=>{let e,r;for(;;){if(n.lookahead<cr){if(os(n),n.lookahead<cr&&t===Zr)return dn;if(n.lookahead===0)break}if(e=0,n.lookahead>=ie&&(n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),e!==0&&n.strstart-e<=n.w_size-cr&&(n.match_length=hm(n,e)),n.match_length>=ie)if(r=Qr(n,n.strstart-n.match_start,n.match_length-ie),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=ie){n.match_length--;do n.strstart++,n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;while(--n.match_length!==0);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=ei(n,n.ins_h,n.window[n.strstart+1]);else r=Qr(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(r&&(Pn(n,!1),n.strm.avail_out===0))return dn}return n.insert=n.strstart<ie-1?n.strstart:ie-1,t===Dn?(Pn(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(Pn(n,!1),n.strm.avail_out===0)?dn:ss},ls=(n,t)=>{let e,r,i;for(;;){if(n.lookahead<cr){if(os(n),n.lookahead<cr&&t===Zr)return dn;if(n.lookahead===0)break}if(e=0,n.lookahead>=ie&&(n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=ie-1,e!==0&&n.prev_length<n.max_lazy_match&&n.strstart-e<=n.w_size-cr&&(n.match_length=hm(n,e),n.match_length<=5&&(n.strategy===rk||n.match_length===ie&&n.strstart-n.match_start>4096)&&(n.match_length=ie-1)),n.prev_length>=ie&&n.match_length<=n.prev_length){i=n.strstart+n.lookahead-ie,r=Qr(n,n.strstart-1-n.prev_match,n.prev_length-ie),n.lookahead-=n.prev_length-1,n.prev_length-=2;do++n.strstart<=i&&(n.ins_h=ei(n,n.ins_h,n.window[n.strstart+ie-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart);while(--n.prev_length!==0);if(n.match_available=0,n.match_length=ie-1,n.strstart++,r&&(Pn(n,!1),n.strm.avail_out===0))return dn}else if(n.match_available){if(r=Qr(n,0,n.window[n.strstart-1]),r&&Pn(n,!1),n.strstart++,n.lookahead--,n.strm.avail_out===0)return dn}else n.match_available=1,n.strstart++,n.lookahead--}return n.match_available&&(r=Qr(n,0,n.window[n.strstart-1]),n.match_available=0),n.insert=n.strstart<ie-1?n.strstart:ie-1,t===Dn?(Pn(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(Pn(n,!1),n.strm.avail_out===0)?dn:ss},xk=(n,t)=>{let e,r,i,s;const a=n.window;for(;;){if(n.lookahead<=Wr){if(os(n),n.lookahead<=Wr&&t===Zr)return dn;if(n.lookahead===0)break}if(n.match_length=0,n.lookahead>=ie&&n.strstart>0&&(i=n.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){s=n.strstart+Wr;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<s);n.match_length=Wr-(s-i),n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=ie?(e=Qr(n,1,n.match_length-ie),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(e=Qr(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),e&&(Pn(n,!1),n.strm.avail_out===0))return dn}return n.insert=0,t===Dn?(Pn(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(Pn(n,!1),n.strm.avail_out===0)?dn:ss},bk=(n,t)=>{let e;for(;;){if(n.lookahead===0&&(os(n),n.lookahead===0)){if(t===Zr)return dn;break}if(n.match_length=0,e=Qr(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,e&&(Pn(n,!1),n.strm.avail_out===0))return dn}return n.insert=0,t===Dn?(Pn(n,!0),n.strm.avail_out===0?Ei:as):n.sym_next&&(Pn(n,!1),n.strm.avail_out===0)?dn:ss};function ur(n,t,e,r,i){this.good_length=n,this.max_lazy=t,this.nice_length=e,this.max_chain=r,this.func=i}const oa=[new ur(0,0,0,0,cm),new ur(4,4,8,4,ku),new ur(4,5,16,8,ku),new ur(4,6,32,32,ku),new ur(4,4,16,16,ls),new ur(8,16,32,32,ls),new ur(8,16,128,128,ls),new ur(8,32,128,256,ls),new ur(32,128,258,1024,ls),new ur(32,258,258,4096,ls)],Sk=n=>{n.window_size=2*n.w_size,ti(n.head),n.max_lazy_match=oa[n.level].max_lazy,n.good_match=oa[n.level].good_length,n.nice_match=oa[n.level].nice_length,n.max_chain_length=oa[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=ie-1,n.match_available=0,n.ins_h=0};function kk(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ll,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(gk*2),this.dyn_dtree=new Uint16Array((2*fk+1)*2),this.bl_tree=new Uint16Array((2*pk+1)*2),ti(this.dyn_ltree),ti(this.dyn_dtree),ti(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(mk+1),this.heap=new Uint16Array(2*yu+1),ti(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*yu+1),ti(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const la=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.status!==is&&t.status!==vu&&t.status!==_u&&t.status!==wu&&t.status!==xu&&t.status!==bu&&t.status!==Pi&&t.status!==sa?1:0},um=n=>{if(la(n))return Ai(n,hr);n.total_in=n.total_out=0,n.data_type=ok;const t=n.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?vu:t.wrap?is:Pi,n.adler=t.wrap===2?0:1,t.last_flush=-2,JS(t),tn},dm=n=>{const t=um(n);return t===tn&&Sk(n.state),t},Ck=(n,t)=>la(n)||n.state.wrap!==2?hr:(n.state.gzhead=t,tn),fm=(n,t,e,r,i,s)=>{if(!n)return hr;let a=1;if(t===nk&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>lk||e!==ll||r<8||r>15||t<0||t>9||s<0||s>sk||r===8&&a!==1)return Ai(n,hr);r===8&&(r=9);const o=new kk;return n.state=o,o.strm=n,o.status=is,o.wrap=a,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+ie-1)/ie),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=t,o.strategy=s,o.method=e,dm(n)},Tk=(n,t)=>fm(n,t,ll,hk,ck,ak),Pk=(n,t)=>{if(la(n)||t>am||t<0)return n?Ai(n,hr):hr;const e=n.state;if(!n.output||n.avail_in!==0&&!n.input||e.status===sa&&t!==Dn)return Ai(n,n.avail_out===0?mu:hr);const r=e.last_flush;if(e.last_flush=t,e.pending!==0){if(Tn(n),n.avail_out===0)return e.last_flush=-1,tn}else if(n.avail_in===0&&lm(t)<=lm(r)&&t!==Dn)return Ai(n,mu);if(e.status===sa&&n.avail_in!==0)return Ai(n,mu);if(e.status===is&&e.wrap===0&&(e.status=Pi),e.status===is){let i=ll+(e.w_bits-8<<4)<<8,s=-1;if(e.strategy>=ol||e.level<2?s=0:e.level<6?s=1:e.level===6?s=2:s=3,i|=s<<6,e.strstart!==0&&(i|=yk),i+=31-i%31,aa(e,i),e.strstart!==0&&(aa(e,n.adler>>>16),aa(e,n.adler&65535)),n.adler=1,e.status=Pi,Tn(n),e.pending!==0)return e.last_flush=-1,tn}if(e.status===vu){if(n.adler=0,de(e,31),de(e,139),de(e,8),e.gzhead)de(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),de(e,e.gzhead.time&255),de(e,e.gzhead.time>>8&255),de(e,e.gzhead.time>>16&255),de(e,e.gzhead.time>>24&255),de(e,e.level===9?2:e.strategy>=ol||e.level<2?4:0),de(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(de(e,e.gzhead.extra.length&255),de(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(n.adler=Ye(n.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=_u;else if(de(e,0),de(e,0),de(e,0),de(e,0),de(e,0),de(e,e.level===9?2:e.strategy>=ol||e.level<2?4:0),de(e,vk),e.status=Pi,Tn(n),e.pending!==0)return e.last_flush=-1,tn}if(e.status===_u){if(e.gzhead.extra){let i=e.pending,s=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+s>e.pending_buf_size;){let o=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+o),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>i&&(n.adler=Ye(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex+=o,Tn(n),e.pending!==0)return e.last_flush=-1,tn;i=0,s-=o}let a=new Uint8Array(e.gzhead.extra);e.pending_buf.set(a.subarray(e.gzindex,e.gzindex+s),e.pending),e.pending+=s,e.gzhead.hcrc&&e.pending>i&&(n.adler=Ye(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=wu}if(e.status===wu){if(e.gzhead.name){let i=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(n.adler=Ye(n.adler,e.pending_buf,e.pending-i,i)),Tn(n),e.pending!==0)return e.last_flush=-1,tn;i=0}e.gzindex<e.gzhead.name.length?s=e.gzhead.name.charCodeAt(e.gzindex++)&255:s=0,de(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>i&&(n.adler=Ye(n.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=xu}if(e.status===xu){if(e.gzhead.comment){let i=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(n.adler=Ye(n.adler,e.pending_buf,e.pending-i,i)),Tn(n),e.pending!==0)return e.last_flush=-1,tn;i=0}e.gzindex<e.gzhead.comment.length?s=e.gzhead.comment.charCodeAt(e.gzindex++)&255:s=0,de(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>i&&(n.adler=Ye(n.adler,e.pending_buf,e.pending-i,i))}e.status=bu}if(e.status===bu){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(Tn(n),e.pending!==0))return e.last_flush=-1,tn;de(e,n.adler&255),de(e,n.adler>>8&255),n.adler=0}if(e.status=Pi,Tn(n),e.pending!==0)return e.last_flush=-1,tn}if(n.avail_in!==0||e.lookahead!==0||t!==Zr&&e.status!==sa){let i=e.level===0?cm(e,t):e.strategy===ol?bk(e,t):e.strategy===ik?xk(e,t):oa[e.level].func(e,t);if((i===Ei||i===as)&&(e.status=sa),i===dn||i===Ei)return n.avail_out===0&&(e.last_flush=-1),tn;if(i===ss&&(t===WS?ZS(e):t!==am&&(gu(e,0,0,!1),t===tk&&(ti(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),Tn(n),n.avail_out===0))return e.last_flush=-1,tn}return t!==Dn?tn:e.wrap<=0?om:(e.wrap===2?(de(e,n.adler&255),de(e,n.adler>>8&255),de(e,n.adler>>16&255),de(e,n.adler>>24&255),de(e,n.total_in&255),de(e,n.total_in>>8&255),de(e,n.total_in>>16&255),de(e,n.total_in>>24&255)):(aa(e,n.adler>>>16),aa(e,n.adler&65535)),Tn(n),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?tn:om)},Ek=n=>{if(la(n))return hr;const t=n.state.status;return n.state=null,t===Pi?Ai(n,ek):tn},Ak=(n,t)=>{let e=t.length;if(la(n))return hr;const r=n.state,i=r.wrap;if(i===2||i===1&&r.status!==is||r.lookahead)return hr;if(i===1&&(n.adler=ia(n.adler,t,e,0)),r.wrap=0,e>=r.w_size){i===0&&(ti(r.head),r.strstart=0,r.block_start=0,r.insert=0);let h=new Uint8Array(r.w_size);h.set(t.subarray(e-r.w_size,e),0),t=h,e=r.w_size}const s=n.avail_in,a=n.next_in,o=n.input;for(n.avail_in=e,n.next_in=0,n.input=t,os(r);r.lookahead>=ie;){let h=r.strstart,l=r.lookahead-(ie-1);do r.ins_h=ei(r,r.ins_h,r.window[h+ie-1]),r.prev[h&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=h,h++;while(--l);r.strstart=h,r.lookahead=ie-1,os(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ie-1,r.match_available=0,n.next_in=a,n.input=o,n.avail_in=s,r.wrap=i,tn};var Ok=Tk,$k=fm,Fk=dm,Nk=um,Rk=Ck,Dk=Pk,Mk=Ek,Ik=Ak,jk="pako deflate (from Nodeca project)",ha={deflateInit:Ok,deflateInit2:$k,deflateReset:Fk,deflateResetKeep:Nk,deflateSetHeader:Rk,deflate:Dk,deflateEnd:Mk,deflateSetDictionary:Ik,deflateInfo:jk};const Lk=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var Uk=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)Lk(e,r)&&(n[r]=e[r])}}return n},Gk=n=>{let t=0;for(let r=0,i=n.length;r<i;r++)t+=n[r].length;const e=new Uint8Array(t);for(let r=0,i=0,s=n.length;r<s;r++){let a=n[r];e.set(a,i),i+=a.length}return e},hl={assign:Uk,flattenChunks:Gk};let pm=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{pm=!1}const ca=new Uint8Array(256);for(let n=0;n<256;n++)ca[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;ca[254]=ca[254]=1;var zk=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,i,s,a=n.length,o=0;for(i=0;i<a;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<a&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),o+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(o),s=0,i=0;s<o;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<a&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?t[s++]=e:e<2048?(t[s++]=192|e>>>6,t[s++]=128|e&63):e<65536?(t[s++]=224|e>>>12,t[s++]=128|e>>>6&63,t[s++]=128|e&63):(t[s++]=240|e>>>18,t[s++]=128|e>>>12&63,t[s++]=128|e>>>6&63,t[s++]=128|e&63);return t};const Vk=(n,t)=>{if(t<65534&&n.subarray&&pm)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(n[r]);return e};var Bk=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,i;const s=new Array(e*2);for(i=0,r=0;r<e;){let a=n[r++];if(a<128){s[i++]=a;continue}let o=ca[a];if(o>4){s[i++]=65533,r+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&r<e;)a=a<<6|n[r++]&63,o--;if(o>1){s[i++]=65533;continue}a<65536?s[i++]=a:(a-=65536,s[i++]=55296|a>>10&1023,s[i++]=56320|a&1023)}return Vk(s,i)},Hk=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+ca[n[e]]>t?e:t},ua={string2buf:zk,buf2string:Bk,utf8border:Hk};function qk(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var gm=qk;const mm=Object.prototype.toString,{Z_NO_FLUSH:Kk,Z_SYNC_FLUSH:Yk,Z_FULL_FLUSH:Xk,Z_FINISH:Jk,Z_OK:cl,Z_STREAM_END:Qk,Z_DEFAULT_COMPRESSION:Zk,Z_DEFAULT_STRATEGY:Wk,Z_DEFLATED:tC}=Ti;function da(n){this.options=hl.assign({level:Zk,method:tC,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wk},n||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gm,this.strm.avail_out=0;let e=ha.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==cl)throw new Error(Ci[e]);if(t.header&&ha.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=ua.string2buf(t.dictionary):mm.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,e=ha.deflateSetDictionary(this.strm,r),e!==cl)throw new Error(Ci[e]);this._dict_set=!0}}da.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?Jk:Kk,typeof n=="string"?e.input=ua.string2buf(n):mm.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),(s===Yk||s===Xk)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(i=ha.deflate(e,s),i===Qk)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),i=ha.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===cl;if(e.avail_out===0){this.onData(e.output);continue}if(s>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0},da.prototype.onData=function(n){this.chunks.push(n)},da.prototype.onEnd=function(n){n===cl&&(this.result=hl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Cu(n,t){const e=new da(t);if(e.push(n,!0),e.err)throw e.msg||Ci[e.err];return e.result}function eC(n,t){return t=t||{},t.raw=!0,Cu(n,t)}function nC(n,t){return t=t||{},t.gzip=!0,Cu(n,t)}var rC=da,iC=Cu,sC=eC,aC=nC,oC=Ti,lC={Deflate:rC,deflate:iC,deflateRaw:sC,gzip:aC,constants:oC};const ul=16209,hC=16191;var cC=function(n,t){let e,r,i,s,a,o,h,l,c,f,d,u,p,v,_,S,x,m,k,F,P,N,R,L;const U=n.state;e=n.next_in,R=n.input,r=e+(n.avail_in-5),i=n.next_out,L=n.output,s=i-(t-n.avail_out),a=i+(n.avail_out-257),o=U.dmax,h=U.wsize,l=U.whave,c=U.wnext,f=U.window,d=U.hold,u=U.bits,p=U.lencode,v=U.distcode,_=(1<<U.lenbits)-1,S=(1<<U.distbits)-1;t:do{u<15&&(d+=R[e++]<<u,u+=8,d+=R[e++]<<u,u+=8),x=p[d&_];e:for(;;){if(m=x>>>24,d>>>=m,u-=m,m=x>>>16&255,m===0)L[i++]=x&65535;else if(m&16){k=x&65535,m&=15,m&&(u<m&&(d+=R[e++]<<u,u+=8),k+=d&(1<<m)-1,d>>>=m,u-=m),u<15&&(d+=R[e++]<<u,u+=8,d+=R[e++]<<u,u+=8),x=v[d&S];n:for(;;){if(m=x>>>24,d>>>=m,u-=m,m=x>>>16&255,m&16){if(F=x&65535,m&=15,u<m&&(d+=R[e++]<<u,u+=8,u<m&&(d+=R[e++]<<u,u+=8)),F+=d&(1<<m)-1,F>o){n.msg="invalid distance too far back",U.mode=ul;break t}if(d>>>=m,u-=m,m=i-s,F>m){if(m=F-m,m>l&&U.sane){n.msg="invalid distance too far back",U.mode=ul;break t}if(P=0,N=f,c===0){if(P+=h-m,m<k){k-=m;do L[i++]=f[P++];while(--m);P=i-F,N=L}}else if(c<m){if(P+=h+c-m,m-=c,m<k){k-=m;do L[i++]=f[P++];while(--m);if(P=0,c<k){m=c,k-=m;do L[i++]=f[P++];while(--m);P=i-F,N=L}}}else if(P+=c-m,m<k){k-=m;do L[i++]=f[P++];while(--m);P=i-F,N=L}for(;k>2;)L[i++]=N[P++],L[i++]=N[P++],L[i++]=N[P++],k-=3;k&&(L[i++]=N[P++],k>1&&(L[i++]=N[P++]))}else{P=i-F;do L[i++]=L[P++],L[i++]=L[P++],L[i++]=L[P++],k-=3;while(k>2);k&&(L[i++]=L[P++],k>1&&(L[i++]=L[P++]))}}else if(m&64){n.msg="invalid distance code",U.mode=ul;break t}else{x=v[(x&65535)+(d&(1<<m)-1)];continue n}break}}else if(m&64)if(m&32){U.mode=hC;break t}else{n.msg="invalid literal/length code",U.mode=ul;break t}else{x=p[(x&65535)+(d&(1<<m)-1)];continue e}break}}while(e<r&&i<a);k=u>>3,e-=k,u-=k<<3,d&=(1<<u)-1,n.next_in=e,n.next_out=i,n.avail_in=e<r?5+(r-e):5-(e-r),n.avail_out=i<a?257+(a-i):257-(i-a),U.hold=d,U.bits=u};const hs=15,ym=852,vm=592,_m=0,Tu=1,wm=2,uC=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),dC=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),fC=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),pC=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var fa=(n,t,e,r,i,s,a,o)=>{const h=o.bits;let l=0,c=0,f=0,d=0,u=0,p=0,v=0,_=0,S=0,x=0,m,k,F,P,N,R=null,L;const U=new Uint16Array(hs+1),B=new Uint16Array(hs+1);let K=null,tt,W,lt;for(l=0;l<=hs;l++)U[l]=0;for(c=0;c<r;c++)U[t[e+c]]++;for(u=h,d=hs;d>=1&&U[d]===0;d--);if(u>d&&(u=d),d===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,o.bits=1,0;for(f=1;f<d&&U[f]===0;f++);for(u<f&&(u=f),_=1,l=1;l<=hs;l++)if(_<<=1,_-=U[l],_<0)return-1;if(_>0&&(n===_m||d!==1))return-1;for(B[1]=0,l=1;l<hs;l++)B[l+1]=B[l]+U[l];for(c=0;c<r;c++)t[e+c]!==0&&(a[B[t[e+c]]++]=c);if(n===_m?(R=K=a,L=20):n===Tu?(R=uC,K=dC,L=257):(R=fC,K=pC,L=0),x=0,c=0,l=f,N=s,p=u,v=0,F=-1,S=1<<u,P=S-1,n===Tu&&S>ym||n===wm&&S>vm)return 1;for(;;){tt=l-v,a[c]+1<L?(W=0,lt=a[c]):a[c]>=L?(W=K[a[c]-L],lt=R[a[c]-L]):(W=96,lt=0),m=1<<l-v,k=1<<p,f=k;do k-=m,i[N+(x>>v)+k]=tt<<24|W<<16|lt|0;while(k!==0);for(m=1<<l-1;x&m;)m>>=1;if(m!==0?(x&=m-1,x+=m):x=0,c++,--U[l]===0){if(l===d)break;l=t[e+a[c]]}if(l>u&&(x&P)!==F){for(v===0&&(v=u),N+=f,p=l-v,_=1<<p;p+v<d&&(_-=U[p+v],!(_<=0));)p++,_<<=1;if(S+=1<<p,n===Tu&&S>ym||n===wm&&S>vm)return 1;F=x&P,i[F]=u<<24|p<<16|N-s|0}}return x!==0&&(i[N+x]=l-v<<24|64<<16|0),o.bits=u,0};const gC=0,xm=1,bm=2,{Z_FINISH:Sm,Z_BLOCK:mC,Z_TREES:dl,Z_OK:Oi,Z_STREAM_END:yC,Z_NEED_DICT:vC,Z_STREAM_ERROR:Yn,Z_DATA_ERROR:km,Z_MEM_ERROR:Cm,Z_BUF_ERROR:_C,Z_DEFLATED:Tm}=Ti,fl=16180,Pm=16181,Em=16182,Am=16183,Om=16184,$m=16185,Fm=16186,Nm=16187,Rm=16188,Dm=16189,pl=16190,Ar=16191,Pu=16192,Mm=16193,Eu=16194,Im=16195,jm=16196,Lm=16197,Um=16198,gl=16199,ml=16200,Gm=16201,zm=16202,Vm=16203,Bm=16204,Hm=16205,Au=16206,qm=16207,Km=16208,Te=16209,Ym=16210,Xm=16211,wC=852,xC=592,bC=15,SC=bC,Jm=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function kC(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const $i=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<fl||t.mode>Xm?1:0},Qm=n=>{if($i(n))return Yn;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=fl,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(wC),t.distcode=t.distdyn=new Int32Array(xC),t.sane=1,t.back=-1,Oi},Zm=n=>{if($i(n))return Yn;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,Qm(n)},Wm=(n,t)=>{let e;if($i(n))return Yn;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Yn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,Zm(n))},t1=(n,t)=>{if(!n)return Yn;const e=new kC;n.state=e,e.strm=n,e.window=null,e.mode=fl;const r=Wm(n,t);return r!==Oi&&(n.state=null),r},CC=n=>t1(n,SC);let e1=!0,Ou,$u;const TC=n=>{if(e1){Ou=new Int32Array(512),$u=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(fa(xm,n.lens,0,288,Ou,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;fa(bm,n.lens,0,32,$u,0,n.work,{bits:5}),e1=!1}n.lencode=Ou,n.lenbits=9,n.distcode=$u,n.distbits=5},n1=(n,t,e,r)=>{let i;const s=n.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(e-s.wsize,e),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(e-r,e-r+i),s.wnext),r-=i,r?(s.window.set(t.subarray(e-r,e),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},PC=(n,t)=>{let e,r,i,s,a,o,h,l,c,f,d,u,p,v,_=0,S,x,m,k,F,P,N,R;const L=new Uint8Array(4);let U,B;const K=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if($i(n)||!n.output||!n.input&&n.avail_in!==0)return Yn;e=n.state,e.mode===Ar&&(e.mode=Pu),a=n.next_out,i=n.output,h=n.avail_out,s=n.next_in,r=n.input,o=n.avail_in,l=e.hold,c=e.bits,f=o,d=h,R=Oi;t:for(;;)switch(e.mode){case fl:if(e.wrap===0){e.mode=Pu;break}for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.wrap&2&&l===35615){e.wbits===0&&(e.wbits=15),e.check=0,L[0]=l&255,L[1]=l>>>8&255,e.check=Ye(e.check,L,2,0),l=0,c=0,e.mode=Pm;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((l&255)<<8)+(l>>8))%31){n.msg="incorrect header check",e.mode=Te;break}if((l&15)!==Tm){n.msg="unknown compression method",e.mode=Te;break}if(l>>>=4,c-=4,N=(l&15)+8,e.wbits===0&&(e.wbits=N),N>15||N>e.wbits){n.msg="invalid window size",e.mode=Te;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=l&512?Dm:Ar,l=0,c=0;break;case Pm:for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.flags=l,(e.flags&255)!==Tm){n.msg="unknown compression method",e.mode=Te;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Te;break}e.head&&(e.head.text=l>>8&1),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,e.check=Ye(e.check,L,2,0)),l=0,c=0,e.mode=Em;case Em:for(;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.head&&(e.head.time=l),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,L[2]=l>>>16&255,L[3]=l>>>24&255,e.check=Ye(e.check,L,4,0)),l=0,c=0,e.mode=Am;case Am:for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.head&&(e.head.xflags=l&255,e.head.os=l>>8),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,e.check=Ye(e.check,L,2,0)),l=0,c=0,e.mode=Om;case Om:if(e.flags&1024){for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.length=l,e.head&&(e.head.extra_len=l),e.flags&512&&e.wrap&4&&(L[0]=l&255,L[1]=l>>>8&255,e.check=Ye(e.check,L,2,0)),l=0,c=0}else e.head&&(e.head.extra=null);e.mode=$m;case $m:if(e.flags&1024&&(u=e.length,u>o&&(u=o),u&&(e.head&&(N=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(s,s+u),N)),e.flags&512&&e.wrap&4&&(e.check=Ye(e.check,r,u,s)),o-=u,s+=u,e.length-=u),e.length))break t;e.length=0,e.mode=Fm;case Fm:if(e.flags&2048){if(o===0)break t;u=0;do N=r[s+u++],e.head&&N&&e.length<65536&&(e.head.name+=String.fromCharCode(N));while(N&&u<o);if(e.flags&512&&e.wrap&4&&(e.check=Ye(e.check,r,u,s)),o-=u,s+=u,N)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=Nm;case Nm:if(e.flags&4096){if(o===0)break t;u=0;do N=r[s+u++],e.head&&N&&e.length<65536&&(e.head.comment+=String.fromCharCode(N));while(N&&u<o);if(e.flags&512&&e.wrap&4&&(e.check=Ye(e.check,r,u,s)),o-=u,s+=u,N)break t}else e.head&&(e.head.comment=null);e.mode=Rm;case Rm:if(e.flags&512){for(;c<16;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.wrap&4&&l!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Te;break}l=0,c=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=Ar;break;case Dm:for(;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}n.adler=e.check=Jm(l),l=0,c=0,e.mode=pl;case pl:if(e.havedict===0)return n.next_out=a,n.avail_out=h,n.next_in=s,n.avail_in=o,e.hold=l,e.bits=c,vC;n.adler=e.check=1,e.mode=Ar;case Ar:if(t===mC||t===dl)break t;case Pu:if(e.last){l>>>=c&7,c-=c&7,e.mode=Au;break}for(;c<3;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}switch(e.last=l&1,l>>>=1,c-=1,l&3){case 0:e.mode=Mm;break;case 1:if(TC(e),e.mode=gl,t===dl){l>>>=2,c-=2;break t}break;case 2:e.mode=jm;break;case 3:n.msg="invalid block type",e.mode=Te}l>>>=2,c-=2;break;case Mm:for(l>>>=c&7,c-=c&7;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Te;break}if(e.length=l&65535,l=0,c=0,e.mode=Eu,t===dl)break t;case Eu:e.mode=Im;case Im:if(u=e.length,u){if(u>o&&(u=o),u>h&&(u=h),u===0)break t;i.set(r.subarray(s,s+u),a),o-=u,s+=u,h-=u,a+=u,e.length-=u;break}e.mode=Ar;break;case jm:for(;c<14;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.nlen=(l&31)+257,l>>>=5,c-=5,e.ndist=(l&31)+1,l>>>=5,c-=5,e.ncode=(l&15)+4,l>>>=4,c-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Te;break}e.have=0,e.mode=Lm;case Lm:for(;e.have<e.ncode;){for(;c<3;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.lens[K[e.have++]]=l&7,l>>>=3,c-=3}for(;e.have<19;)e.lens[K[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,U={bits:e.lenbits},R=fa(gC,e.lens,0,19,e.lencode,0,e.work,U),e.lenbits=U.bits,R){n.msg="invalid code lengths set",e.mode=Te;break}e.have=0,e.mode=Um;case Um:for(;e.have<e.nlen+e.ndist;){for(;_=e.lencode[l&(1<<e.lenbits)-1],S=_>>>24,x=_>>>16&255,m=_&65535,!(S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(m<16)l>>>=S,c-=S,e.lens[e.have++]=m;else{if(m===16){for(B=S+2;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(l>>>=S,c-=S,e.have===0){n.msg="invalid bit length repeat",e.mode=Te;break}N=e.lens[e.have-1],u=3+(l&3),l>>>=2,c-=2}else if(m===17){for(B=S+3;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=S,c-=S,N=0,u=3+(l&7),l>>>=3,c-=3}else{for(B=S+7;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=S,c-=S,N=0,u=11+(l&127),l>>>=7,c-=7}if(e.have+u>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Te;break}for(;u--;)e.lens[e.have++]=N}}if(e.mode===Te)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Te;break}if(e.lenbits=9,U={bits:e.lenbits},R=fa(xm,e.lens,0,e.nlen,e.lencode,0,e.work,U),e.lenbits=U.bits,R){n.msg="invalid literal/lengths set",e.mode=Te;break}if(e.distbits=6,e.distcode=e.distdyn,U={bits:e.distbits},R=fa(bm,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,U),e.distbits=U.bits,R){n.msg="invalid distances set",e.mode=Te;break}if(e.mode=gl,t===dl)break t;case gl:e.mode=ml;case ml:if(o>=6&&h>=258){n.next_out=a,n.avail_out=h,n.next_in=s,n.avail_in=o,e.hold=l,e.bits=c,cC(n,d),a=n.next_out,i=n.output,h=n.avail_out,s=n.next_in,r=n.input,o=n.avail_in,l=e.hold,c=e.bits,e.mode===Ar&&(e.back=-1);break}for(e.back=0;_=e.lencode[l&(1<<e.lenbits)-1],S=_>>>24,x=_>>>16&255,m=_&65535,!(S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(x&&!(x&240)){for(k=S,F=x,P=m;_=e.lencode[P+((l&(1<<k+F)-1)>>k)],S=_>>>24,x=_>>>16&255,m=_&65535,!(k+S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=k,c-=k,e.back+=k}if(l>>>=S,c-=S,e.back+=S,e.length=m,x===0){e.mode=Hm;break}if(x&32){e.back=-1,e.mode=Ar;break}if(x&64){n.msg="invalid literal/length code",e.mode=Te;break}e.extra=x&15,e.mode=Gm;case Gm:if(e.extra){for(B=e.extra;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.length+=l&(1<<e.extra)-1,l>>>=e.extra,c-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=zm;case zm:for(;_=e.distcode[l&(1<<e.distbits)-1],S=_>>>24,x=_>>>16&255,m=_&65535,!(S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(!(x&240)){for(k=S,F=x,P=m;_=e.distcode[P+((l&(1<<k+F)-1)>>k)],S=_>>>24,x=_>>>16&255,m=_&65535,!(k+S<=c);){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}l>>>=k,c-=k,e.back+=k}if(l>>>=S,c-=S,e.back+=S,x&64){n.msg="invalid distance code",e.mode=Te;break}e.offset=m,e.extra=x&15,e.mode=Vm;case Vm:if(e.extra){for(B=e.extra;c<B;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}e.offset+=l&(1<<e.extra)-1,l>>>=e.extra,c-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Te;break}e.mode=Bm;case Bm:if(h===0)break t;if(u=d-h,e.offset>u){if(u=e.offset-u,u>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Te;break}u>e.wnext?(u-=e.wnext,p=e.wsize-u):p=e.wnext-u,u>e.length&&(u=e.length),v=e.window}else v=i,p=a-e.offset,u=e.length;u>h&&(u=h),h-=u,e.length-=u;do i[a++]=v[p++];while(--u);e.length===0&&(e.mode=ml);break;case Hm:if(h===0)break t;i[a++]=e.length,h--,e.mode=ml;break;case Au:if(e.wrap){for(;c<32;){if(o===0)break t;o--,l|=r[s++]<<c,c+=8}if(d-=h,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?Ye(e.check,i,d,a-d):ia(e.check,i,d,a-d)),d=h,e.wrap&4&&(e.flags?l:Jm(l))!==e.check){n.msg="incorrect data check",e.mode=Te;break}l=0,c=0}e.mode=qm;case qm:if(e.wrap&&e.flags){for(;c<32;){if(o===0)break t;o--,l+=r[s++]<<c,c+=8}if(e.wrap&4&&l!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Te;break}l=0,c=0}e.mode=Km;case Km:R=yC;break t;case Te:R=km;break t;case Ym:return Cm;case Xm:default:return Yn}return n.next_out=a,n.avail_out=h,n.next_in=s,n.avail_in=o,e.hold=l,e.bits=c,(e.wsize||d!==n.avail_out&&e.mode<Te&&(e.mode<Au||t!==Sm))&&n1(n,n.output,n.next_out,d-n.avail_out),f-=n.avail_in,d-=n.avail_out,n.total_in+=f,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?Ye(e.check,i,d,n.next_out-d):ia(e.check,i,d,n.next_out-d)),n.data_type=e.bits+(e.last?64:0)+(e.mode===Ar?128:0)+(e.mode===gl||e.mode===Eu?256:0),(f===0&&d===0||t===Sm)&&R===Oi&&(R=_C),R},EC=n=>{if($i(n))return Yn;let t=n.state;return t.window&&(t.window=null),n.state=null,Oi},AC=(n,t)=>{if($i(n))return Yn;const e=n.state;return e.wrap&2?(e.head=t,t.done=!1,Oi):Yn},OC=(n,t)=>{const e=t.length;let r,i,s;return $i(n)||(r=n.state,r.wrap!==0&&r.mode!==pl)?Yn:r.mode===pl&&(i=1,i=ia(i,t,e,0),i!==r.check)?km:(s=n1(n,t,e,e),s?(r.mode=Ym,Cm):(r.havedict=1,Oi))};var $C=Zm,FC=Wm,NC=Qm,RC=CC,DC=t1,MC=PC,IC=EC,jC=AC,LC=OC,UC="pako inflate (from Nodeca project)",Or={inflateReset:$C,inflateReset2:FC,inflateResetKeep:NC,inflateInit:RC,inflateInit2:DC,inflate:MC,inflateEnd:IC,inflateGetHeader:jC,inflateSetDictionary:LC,inflateInfo:UC};function GC(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var zC=GC;const r1=Object.prototype.toString,{Z_NO_FLUSH:VC,Z_FINISH:BC,Z_OK:pa,Z_STREAM_END:Fu,Z_NEED_DICT:Nu,Z_STREAM_ERROR:HC,Z_DATA_ERROR:i1,Z_MEM_ERROR:qC}=Ti;function ga(n){this.options=hl.assign({chunkSize:65536,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gm,this.strm.avail_out=0;let e=Or.inflateInit2(this.strm,t.windowBits);if(e!==pa)throw new Error(Ci[e]);if(this.header=new zC,Or.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ua.string2buf(t.dictionary):r1.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=Or.inflateSetDictionary(this.strm,t.dictionary),e!==pa)))throw new Error(Ci[e])}ga.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?BC:VC,r1.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),s=Or.inflate(e,a),s===Nu&&i&&(s=Or.inflateSetDictionary(e,i),s===pa?s=Or.inflate(e,a):s===i1&&(s=Nu));e.avail_in>0&&s===Fu&&e.state.wrap>0&&n[e.next_in]!==0;)Or.inflateReset(e),s=Or.inflate(e,a);switch(s){case HC:case i1:case Nu:case qC:return this.onEnd(s),this.ended=!0,!1}if(o=e.avail_out,e.next_out&&(e.avail_out===0||s===Fu))if(this.options.to==="string"){let h=ua.utf8border(e.output,e.next_out),l=e.next_out-h,c=ua.buf2string(e.output,h);e.next_out=l,e.avail_out=r-l,l&&e.output.set(e.output.subarray(h,h+l),0),this.onData(c)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(s===pa&&o===0)){if(s===Fu)return s=Or.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(e.avail_in===0)break}}return!0},ga.prototype.onData=function(n){this.chunks.push(n)},ga.prototype.onEnd=function(n){n===pa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=hl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Ru(n,t){const e=new ga(t);if(e.push(n),e.err)throw e.msg||Ci[e.err];return e.result}function KC(n,t){return t=t||{},t.raw=!0,Ru(n,t)}var YC=ga,XC=Ru,JC=KC,QC=Ru,ZC=Ti,WC={Inflate:YC,inflate:XC,inflateRaw:JC,ungzip:QC,constants:ZC};const{Deflate:t9,deflate:e9,deflateRaw:n9,gzip:r9}=lC,{Inflate:i9,inflate:s9,inflateRaw:a9,ungzip:o9}=WC;var l9=t9,h9=e9,c9=n9,u9=r9,d9=i9,f9=s9,p9=a9,g9=o9,m9=Ti,y9={Deflate:l9,deflate:h9,deflateRaw:c9,gzip:u9,Inflate:d9,inflate:f9,inflateRaw:p9,ungzip:g9,constants:m9};const vt={};vt.toRGBA8=function(n){const t=n.width,e=n.height;if(n.tabs.acTL===null)return[vt.toRGBA8.decodeImage(n.data,t,e,n).buffer];const r=[];n.frames[0].data===null&&(n.frames[0].data=n.data);const i=t*e*4,s=new Uint8Array(i),a=new Uint8Array(i),o=new Uint8Array(i);for(let h=0;h<n.frames.length;h++){const l=n.frames[h],c=l.rect.x,f=l.rect.y,d=l.rect.width,u=l.rect.height,p=vt.toRGBA8.decodeImage(l.data,d,u,n);if(h!==0)for(let v=0;v<i;v++)o[v]=s[v];if(l.blend===0?vt._copyTile(p,d,u,s,t,e,c,f,0):l.blend===1&&vt._copyTile(p,d,u,s,t,e,c,f,1),r.push(s.buffer.slice(0)),l.dispose===1)vt._copyTile(a,d,u,s,t,e,c,f,0);else if(l.dispose===2)for(let v=0;v<i;v++)s[v]=o[v]}return r},vt.toRGBA8.decodeImage=function(n,t,e,r){const i=t*e,s=vt.decode._getBPP(r),a=Math.ceil(t*s/8),o=new Uint8Array(i*4),h=new Uint32Array(o.buffer),l=r.ctype,c=r.depth,f=vt._bin.readUshort;if(l===6){const d=i<<2;if(c===8)for(let u=0;u<d;u+=4)o[u]=n[u],o[u+1]=n[u+1],o[u+2]=n[u+2],o[u+3]=n[u+3];if(c===16)for(let u=0;u<d;u++)o[u]=n[u<<1]}else if(l===2){const d=r.tabs.tRNS;if(d===null){if(c===8)for(let u=0;u<i;u++){const p=u*3;h[u]=-16777216|n[p+2]<<16|n[p+1]<<8|n[p]}if(c===16)for(let u=0;u<i;u++){const p=u*6;h[u]=-16777216|n[p+4]<<16|n[p+2]<<8|n[p]}}else{const u=d[0],p=d[1],v=d[2];if(c===8)for(let _=0;_<i;_++){const S=_<<2,x=_*3;h[_]=-16777216|n[x+2]<<16|n[x+1]<<8|n[x],n[x]===u&&n[x+1]===p&&n[x+2]===v&&(o[S+3]=0)}if(c===16)for(let _=0;_<i;_++){const S=_<<2,x=_*6;h[_]=-16777216|n[x+4]<<16|n[x+2]<<8|n[x],f(n,x)===u&&f(n,x+2)===p&&f(n,x+4)===v&&(o[S+3]=0)}}}else if(l===3){const d=r.tabs.PLTE,u=r.tabs.tRNS,p=u?u.length:0;if(c===1)for(let v=0;v<e;v++){const _=v*a,S=v*t;for(let x=0;x<t;x++){const m=S+x<<2,k=n[_+(x>>3)]>>7-((x&7)<<0)&1,F=3*k;o[m]=d[F],o[m+1]=d[F+1],o[m+2]=d[F+2],o[m+3]=k<p?u[k]:255}}if(c===2)for(let v=0;v<e;v++){const _=v*a,S=v*t;for(let x=0;x<t;x++){const m=S+x<<2,k=n[_+(x>>2)]>>6-((x&3)<<1)&3,F=3*k;o[m]=d[F],o[m+1]=d[F+1],o[m+2]=d[F+2],o[m+3]=k<p?u[k]:255}}if(c===4)for(let v=0;v<e;v++){const _=v*a,S=v*t;for(let x=0;x<t;x++){const m=S+x<<2,k=n[_+(x>>1)]>>4-((x&1)<<2)&15,F=3*k;o[m]=d[F],o[m+1]=d[F+1],o[m+2]=d[F+2],o[m+3]=k<p?u[k]:255}}if(c===8)for(let v=0;v<i;v++){const _=v<<2,S=n[v],x=3*S;o[_]=d[x],o[_+1]=d[x+1],o[_+2]=d[x+2],o[_+3]=S<p?u[S]:255}}else if(l===4){if(c===8)for(let d=0;d<i;d++){const u=d<<2,p=d<<1,v=n[p];o[u]=v,o[u+1]=v,o[u+2]=v,o[u+3]=n[p+1]}if(c===16)for(let d=0;d<i;d++){const u=d<<2,p=d<<2,v=n[p];o[u]=v,o[u+1]=v,o[u+2]=v,o[u+3]=n[p+2]}}else if(l===0){const d=r.tabs.tRNS?r.tabs.tRNS:-1;for(let u=0;u<e;u++){const p=u*a,v=u*t;if(c===1)for(let _=0;_<t;_++){const S=255*(n[p+(_>>>3)]>>>7-(_&7)&1),x=S===d*255?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===2)for(let _=0;_<t;_++){const S=85*(n[p+(_>>>2)]>>>6-((_&3)<<1)&3),x=S===d*85?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===4)for(let _=0;_<t;_++){const S=17*(n[p+(_>>>1)]>>>4-((_&1)<<2)&15),x=S===d*17?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===8)for(let _=0;_<t;_++){const S=n[p+_],x=S===d?0:255;h[v+_]=x<<24|S<<16|S<<8|S}else if(c===16)for(let _=0;_<t;_++){const S=n[p+(_<<1)],x=f(n,p+(_<<1))===d?0:255;h[v+_]=x<<24|S<<16|S<<8|S}}}return o},vt.decode=function(n){const t=new Uint8Array(n);let e=8;const r=vt._bin,i=r.readUshort,s=r.readUint,a={tabs:{},frames:[]},o=new Uint8Array(t.length);let h=0,l,c=0;const f=[137,80,78,71,13,10,26,10];for(let d=0;d<8;d++)if(t[d]!==f[d])throw"The input is not a PNG file!";for(;e<t.length;){const d=r.readUint(t,e);e+=4;const u=r.readASCII(t,e,4);if(e+=4,u==="IHDR")vt.decode._IHDR(t,e,a);else if(u==="CgBI")a.tabs[u]=t.slice(e,e+4);else if(u==="IDAT"){for(let p=0;p<d;p++)o[h+p]=t[e+p];h+=d}else if(u==="acTL")a.tabs[u]={num_frames:s(t,e),num_plays:s(t,e+4)},l=new Uint8Array(t.length);else if(u==="fcTL"){if(c!==0){const S=a.frames[a.frames.length-1];S.data=vt.decode._decompress(a,l.slice(0,c),S.rect.width,S.rect.height),c=0}const p={x:s(t,e+12),y:s(t,e+16),width:s(t,e+4),height:s(t,e+8)};let v=i(t,e+22);v=i(t,e+20)/(v===0?100:v);const _={rect:p,delay:Math.round(v*1e3),dispose:t[e+24],blend:t[e+25]};a.frames.push(_)}else if(u==="fdAT"){for(let p=0;p<d-4;p++)l[c+p]=t[e+p+4];c+=d-4}else if(u==="pHYs")a.tabs[u]=[r.readUint(t,e),r.readUint(t,e+4),t[e+8]];else if(u==="cHRM"){a.tabs[u]=[];for(let p=0;p<8;p++)a.tabs[u].push(r.readUint(t,e+p*4))}else if(u==="tEXt"||u==="zTXt"){a.tabs[u]===null&&(a.tabs[u]={});const p=r.nextZero(t,e),v=r.readASCII(t,e,p-e);let _;const S=e+d-p-1;if(u==="tEXt")_=r.readASCII(t,p+1,S);else{const x=vt.decode._inflate(t.slice(p+2,p+2+S));_=r.readUTF8(x,0,x.length)}a.tabs[u][v]=_}else if(u==="iTXt"){a.tabs[u]==null&&(a.tabs[u]={});let p=0,v=e;p=r.nextZero(t,v);const _=r.readASCII(t,v,p-v);v=p+1;const S=t[v];v+=2,p=r.nextZero(t,v),v=p+1,p=r.nextZero(t,v),v=p+1;let x;const m=d-(v-e);if(S===0)x=r.readUTF8(t,v,m);else{const k=vt.decode._inflate(t.slice(v,v+m));x=r.readUTF8(k,0,k.length)}a.tabs[u][_]=x}else if(u==="PLTE")a.tabs[u]=r.readBytes(t,e,d);else if(u==="hIST"){const p=a.tabs.PLTE.length/3;a.tabs[u]=[];for(let v=0;v<p;v++)a.tabs[u].push(i(t,e+v*2))}else if(u==="tRNS")a.ctype===3?a.tabs[u]=r.readBytes(t,e,d):a.ctype===0?a.tabs[u]=i(t,e):a.ctype===2&&(a.tabs[u]=[i(t,e),i(t,e+2),i(t,e+4)]);else if(u==="gAMA")a.tabs[u]=r.readUint(t,e)/1e5;else if(u==="sRGB")a.tabs[u]=t[e];else if(u==="bKGD")a.ctype===0||a.ctype===4?a.tabs[u]=[i(t,e)]:a.ctype===2||a.ctype===6?a.tabs[u]=[i(t,e),i(t,e+2),i(t,e+4)]:a.ctype===3&&(a.tabs[u]=t[e]);else if(u==="IEND")break;e+=d,e+=4}if(c!==0){const d=a.frames[a.frames.length-1];d.data=vt.decode._decompress(a,l.slice(0,c),d.rect.width,d.rect.height),c=0}return a.data=vt.decode._decompress(a,o,a.width,a.height),delete a.compress,delete a.interlace,delete a.filter,a},vt.decode._decompress=function(n,t,e,r){const i=vt.decode._getBPP(n),s=Math.ceil(e*i/8),a=new Uint8Array((s+1+n.interlace)*r);return n.tabs.CgBI?t=vt.inflateRaw(t,a):t=vt.decode._inflate(t,a),n.interlace===0?t=vt.decode._filterZero(t,n,0,e,r):n.interlace===1&&(t=vt.decode._readInterlace(t,n)),t},vt.decode._inflate=function(n,t){return vt.inflateRaw(new Uint8Array(n.buffer,2,n.length-6),t)},vt.inflateRaw=function(){const n={};return n.H={},n.H.N=function(t,e){const r=Uint8Array;let i=0,s=0,a=0,o=0,h=0,l=0,c=0,f=0,d=0,u,p;if(t[0]===3&&t[1]===0)return e||new r(0);const v=n.H,_=v.b,S=v.e,x=v.R,m=v.n,k=v.A,F=v.Z,P=v.m,N=e===null;for(N&&(e=new r(t.length>>>2<<3));i===0;){if(i=_(t,d,1),s=_(t,d+1,2),d+=3,s===0){d&7&&(d+=8-(d&7));const R=(d>>>3)+4,L=t[R-4]|t[R-3]<<8;N&&(e=n.H.W(e,f+L)),e.set(new r(t.buffer,t.byteOffset+R,L),f),d=R+L<<3,f+=L;continue}if(N&&(e=n.H.W(e,f+131072)),s===1&&(u=P.J,p=P.h,l=511,c=31),s===2){a=S(t,d,5)+257,o=S(t,d+5,5)+1,h=S(t,d+10,4)+4,d+=14;let R=1;for(let B=0;B<38;B+=2)P.Q[B]=0,P.Q[B+1]=0;for(let B=0;B<h;B++){const K=S(t,d+B*3,3);P.Q[(P.X[B]<<1)+1]=K,K>R&&(R=K)}d+=3*h,m(P.Q,R),k(P.Q,R,P.u),u=P.w,p=P.d,d=x(P.u,(1<<R)-1,a+o,t,d,P.v);const L=v.V(P.v,0,a,P.C);l=(1<<L)-1;const U=v.V(P.v,a,o,P.D);c=(1<<U)-1,m(P.C,L),k(P.C,L,u),m(P.D,U),k(P.D,U,p)}for(;;){const R=u[F(t,d)&l];d+=R&15;const L=R>>>4;if(!(L>>>8))e[f++]=L;else{if(L===256)break;{let U=f+L-254;if(L>264){const lt=P.q[L-257];U=f+(lt>>>3)+S(t,d,lt&7),d+=lt&7}const B=p[F(t,d)&c];d+=B&15;const K=B>>>4,tt=P.c[K],W=(tt>>>4)+_(t,d,tt&15);for(d+=tt&15;f<U;)e[f]=e[f++-W],e[f]=e[f++-W],e[f]=e[f++-W],e[f]=e[f++-W];f=U}}}}return e.length===f?e:e.slice(0,f)},n.H.W=function(t,e){const r=t.length;if(e<=r)return t;const i=new Uint8Array(r<<1);return i.set(t,0),i},n.H.R=function(t,e,r,i,s,a){const o=n.H.e,h=n.H.Z;let l=0;for(;l<r;){const c=t[h(i,s)&e];s+=c&15;const f=c>>>4;if(f<=15)a[l]=f,l++;else{let d=0,u=0;f===16?(u=3+o(i,s,2),s+=2,d=a[l-1]):f===17?(u=3+o(i,s,3),s+=3):f===18&&(u=11+o(i,s,7),s+=7);const p=l+u;for(;l<p;)a[l]=d,l++}}return s},n.H.V=function(t,e,r,i){let s=0,a=0;const o=i.length>>>1;for(;a<r;){const h=t[a+e];i[a<<1]=0,i[(a<<1)+1]=h,h>s&&(s=h),a++}for(;a<o;)i[a<<1]=0,i[(a<<1)+1]=0,a++;return s},n.H.n=function(t,e){const r=n.H.m,i=t.length;let s,a,o,h,l;const c=r.j;for(let d=0;d<=e;d++)c[d]=0;for(h=1;h<i;h+=2)c[t[h]]++;const f=r.K;for(s=0,c[0]=0,a=1;a<=e;a++)s=s+c[a-1]<<1,f[a]=s;for(o=0;o<i;o+=2)l=t[o+1],l!==0&&(t[o]=f[l],f[l]++)},n.H.A=function(t,e,r){const i=t.length,s=n.H.m.r;for(let a=0;a<i;a+=2)if(t[a+1]!==0){const o=a>>1,h=t[a+1],l=o<<4|h,c=e-h;let f=t[a]<<c;const d=f+(1<<c);for(;f!==d;){const u=s[f]>>>15-e;r[u]=l,f++}}},n.H.l=function(t,e){const r=n.H.m.r,i=15-e;for(let s=0;s<t.length;s+=2){const a=t[s]<<e-t[s+1];t[s]=r[a]>>>i}},n.H.M=function(t,e,r){r=r<<(e&7);const i=e>>>3;t[i]|=r,t[i+1]|=r>>>8},n.H.I=function(t,e,r){r=r<<(e&7);const i=e>>>3;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},n.H.e=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8)>>>(e&7)&(1<<r)-1},n.H.b=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)&(1<<r)-1},n.H.Z=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)},n.H.i=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16|t[(e>>>3)+3]<<24)>>>(e&7)},n.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const t=n.H.m,e=32768;for(let i=0;i<e;i++){let s=i;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,t.r[i]=(s>>>16|s<<16)>>>17}function r(i,s,a){for(;s--!==0;)i.push(0,a)}for(let i=0;i<32;i++)t.q[i]=t.S[i]<<3|t.T[i],t.c[i]=t.p[i]<<4|t.z[i];r(t._,144,8),r(t._,112,9),r(t._,24,7),r(t._,8,8),n.H.n(t._,9),n.H.A(t._,9,t.J),n.H.l(t._,9),r(t.$,32,5),n.H.n(t.$,5),n.H.A(t.$,5,t.h),n.H.l(t.$,5),r(t.Q,19,0),r(t.C,286,0),r(t.D,30,0),r(t.v,320,0)}(),n.H.N}(),vt.decode._readInterlace=function(n,t){const e=t.width,r=t.height,i=vt.decode._getBPP(t),s=i>>3,a=Math.ceil(e*i/8),o=new Uint8Array(r*a);let h=0;const l=[0,0,4,0,2,0,1],c=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],d=[8,8,4,4,2,2,1];let u=0;for(;u<7;){const p=f[u],v=d[u];let _=0,S=0,x=l[u];for(;x<r;)x+=p,S++;let m=c[u];for(;m<e;)m+=v,_++;const k=Math.ceil(_*i/8);vt.decode._filterZero(n,t,h,_,S);let F=0,P=l[u];for(;P<r;){let N=c[u],R=h+F*k<<3;for(;N<e;){if(i===1){let L=n[R>>3];L=L>>7-(R&7)&1,o[P*a+(N>>3)]|=L<<7-((N&7)<<0)}if(i===2){let L=n[R>>3];L=L>>6-(R&7)&3,o[P*a+(N>>2)]|=L<<6-((N&3)<<1)}if(i===4){let L=n[R>>3];L=L>>4-(R&7)&15,o[P*a+(N>>1)]|=L<<4-((N&1)<<2)}if(i>=8){const L=P*a+N*s;for(let U=0;U<s;U++)o[L+U]=n[(R>>3)+U]}R+=i,N+=v}F++,P+=p}_*S!==0&&(h+=S*(1+k)),u=u+1}return o},vt.decode._getBPP=function(n){return[1,null,3,1,2,null,4][n.ctype]*n.depth},vt.decode._filterZero=function(n,t,e,r,i){let s=vt.decode._getBPP(t);const a=Math.ceil(r*s/8),o=vt.decode._paeth;s=Math.ceil(s/8);let h=0,l=1,c=n[e],f=0;if(c>1&&(n[e]=[0,0,1][c-2]),c===3)for(f=s;f<a;f++)n[f+1]=n[f+1]+(n[f+1-s]>>>1)&255;for(let d=0;d<i;d++)if(h=e+d*a,l=h+d+1,c=n[l-1],f=0,c===0)for(;f<a;f++)n[h+f]=n[l+f];else if(c===1){for(;f<s;f++)n[h+f]=n[l+f];for(;f<a;f++)n[h+f]=n[l+f]+n[h+f-s]}else if(c===2)for(;f<a;f++)n[h+f]=n[l+f]+n[h+f-a];else if(c===3){for(;f<s;f++)n[h+f]=n[l+f]+(n[h+f-a]>>>1);for(;f<a;f++)n[h+f]=n[l+f]+(n[h+f-a]+n[h+f-s]>>>1)}else{for(;f<s;f++)n[h+f]=n[l+f]+o(0,n[h+f-a],0);for(;f<a;f++)n[h+f]=n[l+f]+o(n[h+f-s],n[h+f-a],n[h+f-s-a])}return n},vt.decode._paeth=function(n,t,e){const r=n+t-e,i=r-n,s=r-t,a=r-e;return i*i<=s*s&&i*i<=a*a?n:s*s<=a*a?t:e},vt.decode._IHDR=function(n,t,e){const r=vt._bin;e.width=r.readUint(n,t),t+=4,e.height=r.readUint(n,t),t+=4,e.depth=n[t],t++,e.ctype=n[t],t++,e.compress=n[t],t++,e.filter=n[t],t++,e.interlace=n[t],t++},vt._bin={nextZero:function(n,t){for(;n[t]!==0;)t++;return t},readUshort:function(n,t){return n[t]<<8|n[t+1]},writeUshort:function(n,t,e){n[t]=e>>8&255,n[t+1]=e&255},readUint:function(n,t){return n[t]*16777216+(n[t+1]<<16|n[t+2]<<8|n[t+3])},writeUint:function(n,t,e){n[t]=e>>24&255,n[t+1]=e>>16&255,n[t+2]=e>>8&255,n[t+3]=e&255},readASCII:function(n,t,e){let r="";for(let i=0;i<e;i++)r+=String.fromCharCode(n[t+i]);return r},writeASCII:function(n,t,e){for(let r=0;r<e.length;r++)n[t+r]=e.charCodeAt(r)},readBytes:function(n,t,e){const r=[];for(let i=0;i<e;i++)r.push(n[t+i]);return r},pad:function(n){return n.length<2?"0"+n:n},readUTF8:function(n,t,e){let r="",i;for(let s=0;s<e;s++)r+="%"+vt._bin.pad(n[t+s].toString(16));try{i=decodeURIComponent(r)}catch{return vt._bin.readASCII(n,t,e)}return i}},vt._copyTile=function(n,t,e,r,i,s,a,o,h){const l=Math.min(t,i),c=Math.min(e,s);let f=0,d=0;for(let u=0;u<c;u++)for(let p=0;p<l;p++)if(a>=0&&o>=0?(f=u*t+p<<2,d=(o+u)*i+a+p<<2):(f=(-o+u)*t-a+p<<2,d=u*i+p<<2),h===0)r[d]=n[f],r[d+1]=n[f+1],r[d+2]=n[f+2],r[d+3]=n[f+3];else if(h===1){const v=n[f+3]*.00392156862745098,_=n[f]*v,S=n[f+1]*v,x=n[f+2]*v,m=r[d+3]*(1/255),k=r[d]*m,F=r[d+1]*m,P=r[d+2]*m,N=1-v,R=v+m*N,L=R===0?0:1/R;r[d+3]=255*R,r[d+0]=(_+k*N)*L,r[d+1]=(S+F*N)*L,r[d+2]=(x+P*N)*L}else if(h===2){const v=n[f+3],_=n[f],S=n[f+1],x=n[f+2],m=r[d+3],k=r[d],F=r[d+1],P=r[d+2];v===m&&_===k&&S===F&&x===P?(r[d]=0,r[d+1]=0,r[d+2]=0,r[d+3]=0):(r[d]=_,r[d+1]=S,r[d+2]=x,r[d+3]=v)}else if(h===3){const v=n[f+3],_=n[f],S=n[f+1],x=n[f+2],m=r[d+3],k=r[d],F=r[d+1],P=r[d+2];if(v===m&&_===k&&S===F&&x===P)continue;if(v<220&&m>20)return!1}return!0},vt.encode=function(n,t,e,r,i,s,a){r===null&&(r=0),a===null&&(a=!1);const o=vt.encode.compress(n,t,e,r,[!1,!1,!1,0,a]);return vt.encode.compressPNG(o,-1),vt.encode._main(o,t,e,i,s)},vt.encodeLL=function(n,t,e,r,i,s,a,o){const h={ctype:0+(r===1?0:2)+(i===0?0:4),depth:s,frames:[]},l=(r+i)*s,c=l*t;for(let f=0;f<n.length;f++)h.frames.push({rect:{x:0,y:0,width:t,height:e},img:new Uint8Array(n[f]),blend:0,dispose:1,bpp:Math.ceil(l/8),bpl:Math.ceil(c/8)});return vt.encode.compressPNG(h,0,!0),vt.encode._main(h,t,e,a,o)},vt.encode._main=function(n,t,e,r,i){i||(i={});const s=vt.crc.crc,a=vt._bin.writeUint,o=vt._bin.writeUshort,h=vt._bin.writeASCII;let l=8;const c=n.frames.length>1;let f=!1,d=33+(c?20:0);if(i.sRGB!==null&&i.sRGB!==void 0&&(d+=13),i.pHYs!==null&&i.pHYs!==void 0&&(d+=21),n.ctype===3){const _=n.plte.length;for(let S=0;S<_;S++)n.plte[S]>>>24!==255&&(f=!0);d+=8+_*3+4+(f?8+_*1+4:0)}for(let _=0;_<n.frames.length;_++){const S=n.frames[_];c&&(d+=38),d+=S.cimg.length+12,_!==0&&(d+=4)}d+=12;const u=new Uint8Array(d),p=[137,80,78,71,13,10,26,10];for(let _=0;_<8;_++)u[_]=p[_];if(a(u,l,13),l+=4,h(u,l,"IHDR"),l+=4,a(u,l,t),l+=4,a(u,l,e),l+=4,u[l]=n.depth,l++,u[l]=n.ctype,l++,u[l]=0,l++,u[l]=0,l++,u[l]=0,l++,a(u,l,s(u,l-17,17)),l+=4,i.sRGB!==null&&i.sRGB!==void 0&&(a(u,l,1),l+=4,h(u,l,"sRGB"),l+=4,u[l]=i.sRGB,l++,a(u,l,s(u,l-5,5)),l+=4),i.pHYs!==null&&i.pHYs!==void 0&&(a(u,l,9),l+=4,h(u,l,"pHYs"),l+=4,a(u,l,i.pHYs[0]),l+=4,a(u,l,i.pHYs[1]),l+=4,u[l]=i.pHYs[2],l++,a(u,l,s(u,l-13,13)),l+=4),c&&(a(u,l,8),l+=4,h(u,l,"acTL"),l+=4,a(u,l,n.frames.length),l+=4,a(u,l,i.loop!=null?i.loop:0),l+=4,a(u,l,s(u,l-12,12)),l+=4),n.ctype===3){const _=n.plte.length;a(u,l,_*3),l+=4,h(u,l,"PLTE"),l+=4;for(let S=0;S<_;S++){const x=S*3,m=n.plte[S],k=m&255,F=m>>>8&255,P=m>>>16&255;u[l+x+0]=k,u[l+x+1]=F,u[l+x+2]=P}if(l+=_*3,a(u,l,s(u,l-_*3-4,_*3+4)),l+=4,f){a(u,l,_),l+=4,h(u,l,"tRNS"),l+=4;for(let S=0;S<_;S++)u[l+S]=n.plte[S]>>>24&255;l+=_,a(u,l,s(u,l-_-4,_+4)),l+=4}}let v=0;for(let _=0;_<n.frames.length;_++){const S=n.frames[_];c&&(a(u,l,26),l+=4,h(u,l,"fcTL"),l+=4,a(u,l,v++),l+=4,a(u,l,S.rect.width),l+=4,a(u,l,S.rect.height),l+=4,a(u,l,S.rect.x),l+=4,a(u,l,S.rect.y),l+=4,o(u,l,r[_]),l+=2,o(u,l,1e3),l+=2,u[l]=S.dispose,l++,u[l]=S.blend,l++,a(u,l,s(u,l-30,30)),l+=4);const x=S.cimg,m=x.length;a(u,l,m+(_===0?0:4)),l+=4;const k=l;h(u,l,_===0?"IDAT":"fdAT"),l+=4,_!==0&&(a(u,l,v++),l+=4),u.set(x,l),l+=m,a(u,l,s(u,k,l-k)),l+=4}return a(u,l,0),l+=4,h(u,l,"IEND"),l+=4,a(u,l,s(u,l-4,4)),l+=4,u.buffer},vt.encode.compressPNG=function(n,t,e){for(let r=0;r<n.frames.length;r++){const i=n.frames[r],s=i.rect.height,a=new Uint8Array(s*i.bpl+s);i.cimg=vt.encode._filterZero(i.img,s,i.bpp,i.bpl,a,t,e)}},vt.encode.compress=function(n,t,e,r,i){const s=i[0],a=i[1],o=i[2],h=i[3],l=i[4];let c=6,f=8,d=255;for(let m=0;m<n.length;m++){const k=new Uint8Array(n[m]),F=k.length;for(let P=0;P<F;P+=4)d&=k[P+3]}const u=d!==255,p=vt.encode.framize(n,t,e,s,a,o),v={},_=[],S=[];if(r!==0){const m=[];for(let R=0;R<p.length;R++)m.push(p[R].img.buffer);const k=vt.encode.concatRGBA(m),F=vt.quantize(k,r);let P=0;const N=new Uint8Array(F.abuf);for(let R=0;R<p.length;R++){const L=p[R].img,U=L.length;S.push(new Uint8Array(F.inds.buffer,P>>2,U>>2));for(let B=0;B<U;B+=4)L[B]=N[P+B],L[B+1]=N[P+B+1],L[B+2]=N[P+B+2],L[B+3]=N[P+B+3];P+=U}for(let R=0;R<F.plte.length;R++)_.push(F.plte[R].est.rgba)}else for(let m=0;m<p.length;m++){const k=p[m],F=new Uint32Array(k.img.buffer),P=k.rect.width,N=F.length,R=new Uint8Array(N);S.push(R);for(let L=0;L<N;L++){const U=F[L];if(L!==0&&U===F[L-1])R[L]=R[L-1];else if(L>P&&U===F[L-P])R[L]=R[L-P];else{let B=v[U];if(B===null&&(v[U]=B=_.length,_.push(U),_.length>=300))break;R[L]=B}}}const x=_.length;x<=256&&l===!1&&(x<=2?f=1:x<=4?f=2:x<=16?f=4:f=8,f=Math.max(f,h));for(let m=0;m<p.length;m++){const k=p[m],F=k.rect.width,P=k.rect.height;let N=k.img,R=4*F,L=4;if(x<=256&&l===!1){R=Math.ceil(f*F/8);const U=new Uint8Array(R*P),B=S[m];for(let K=0;K<P;K++){const tt=K*R,W=K*F;if(f===8)for(let lt=0;lt<F;lt++)U[tt+lt]=B[W+lt];else if(f===4)for(let lt=0;lt<F;lt++)U[tt+(lt>>1)]|=B[W+lt]<<4-(lt&1)*4;else if(f===2)for(let lt=0;lt<F;lt++)U[tt+(lt>>2)]|=B[W+lt]<<6-(lt&3)*2;else if(f===1)for(let lt=0;lt<F;lt++)U[tt+(lt>>3)]|=B[W+lt]<<7-(lt&7)*1}N=U,c=3,L=1}else if(u===!1&&p.length===1){const U=new Uint8Array(F*P*3),B=F*P;for(let K=0;K<B;K++){const tt=K*3,W=K*4;U[tt]=N[W],U[tt+1]=N[W+1],U[tt+2]=N[W+2]}N=U,c=2,L=3,R=3*F}k.img=N,k.bpl=R,k.bpp=L}return{ctype:c,depth:f,plte:_,frames:p}},vt.encode.framize=function(n,t,e,r,i,s){const a=[];for(let o=0;o<n.length;o++){const h=new Uint8Array(n[o]),l=new Uint32Array(h.buffer);let c,f=0,d=0,u=t,p=e,v=r?1:0;if(o!==0){const _=s||r||o===1||a[o-2].dispose!==0?1:2;let S=0,x=1e9;for(let k=0;k<_;k++){const F=new Uint32Array(n[o-1-k]);let P=t,N=e,R=-1,L=-1;for(let B=0;B<e;B++)for(let K=0;K<t;K++){const tt=B*t+K;l[tt]!==F[tt]&&(K<P&&(P=K),K>R&&(R=K),B<N&&(N=B),B>L&&(L=B))}R===-1&&(P=N=R=L=0),i&&((P&1)===1&&P--,(N&1)===1&&N--);const U=(R-P+1)*(L-N+1);U<x&&(x=U,S=k,f=P,d=N,u=R-P+1,p=L-N+1)}const m=new Uint8Array(n[o-1-S]);S===1&&(a[o-1].dispose=2),c=new Uint8Array(u*p*4),vt._copyTile(m,t,e,c,u,p,-f,-d,0),v=vt._copyTile(h,t,e,c,u,p,-f,-d,3)?1:0,v===1?vt.encode._prepareDiff(h,t,e,c,{x:f,y:d,width:u,height:p}):vt._copyTile(h,t,e,c,u,p,-f,-d,0)}else c=h.slice(0);a.push({rect:{x:f,y:d,width:u,height:p},img:c,blend:v,dispose:0})}if(r)for(let o=0;o<a.length;o++){const h=a[o];if(h.blend===1)continue;const l=h.rect,c=a[o-1].rect,f=Math.min(l.x,c.x),d=Math.min(l.y,c.y),u=Math.max(l.x+l.width,c.x+c.width),p=Math.max(l.y+l.height,c.y+c.height),v={x:f,y:d,width:u-f,height:p-d};a[o-1].dispose=1,o-1!==0&&vt.encode._updateFrame(n,t,e,a,o-1,v,i),vt.encode._updateFrame(n,t,e,a,o,v,i)}return a},vt.encode._updateFrame=function(n,t,e,r,i,s,a){const o=Uint8Array,h=Uint32Array,l=new o(n[i-1]),c=new h(n[i-1]),f=i+1<n.length?new o(n[i+1]):null,d=new o(n[i]),u=new h(d.buffer);let p=t,v=e,_=-1,S=-1;for(let m=0;m<s.height;m++)for(let k=0;k<s.width;k++){const F=s.x+k,P=s.y+m,N=P*t+F,R=u[N];R===0||r[i-1].dispose===0&&c[N]===R&&(f===null||f[N*4+3]!==0)||(F<p&&(p=F),F>_&&(_=F),P<v&&(v=P),P>S&&(S=P))}_===-1&&(p=v=_=S=0),a&&((p&1)===1&&p--,(v&1)===1&&v--),s={x:p,y:v,width:_-p+1,height:S-v+1};const x=r[i];x.rect=s,x.blend=1,x.img=new Uint8Array(s.width*s.height*4),r[i-1].dispose===0?(vt._copyTile(l,t,e,x.img,s.width,s.height,-s.x,-s.y,0),vt.encode._prepareDiff(d,t,e,x.img,s)):vt._copyTile(d,t,e,x.img,s.width,s.height,-s.x,-s.y,0)},vt.encode._prepareDiff=function(n,t,e,r,i){vt._copyTile(n,t,e,r,i.width,i.height,-i.x,-i.y,2)},vt.encode._filterZero=function(n,t,e,r,i,s,a){const o=[];let h=[0,1,2,3,4];s!==-1?h=[s]:(t*r>5e5||e===1)&&(h=[0]);let l;a&&(l={level:0});const c=i.length>1e7&&Ig!=null?Ig:y9;for(let u=0;u<h.length;u++){for(let p=0;p<t;p++)vt.encode._filterLine(i,n,p,r,e,h[u]);o.push(c.deflate(i,l))}let f,d=1e9;for(let u=0;u<o.length;u++)o[u].length<d&&(f=u,d=o[u].length);return o[f]},vt.encode._filterLine=function(n,t,e,r,i,s){const a=e*r;let o=a+e;const h=vt.decode._paeth;if(n[o]=s,o++,s===0)if(r<500)for(let l=0;l<r;l++)n[o+l]=t[a+l];else n.set(new Uint8Array(t.buffer,a,r),o);else if(s===1){for(let l=0;l<i;l++)n[o+l]=t[a+l];for(let l=i;l<r;l++)n[o+l]=t[a+l]-t[a+l-i]+256&255}else if(e===0){for(let l=0;l<i;l++)n[o+l]=t[a+l];if(s===2)for(let l=i;l<r;l++)n[o+l]=t[a+l];if(s===3)for(let l=i;l<r;l++)n[o+l]=t[a+l]-(t[a+l-i]>>1)+256&255;if(s===4)for(let l=i;l<r;l++)n[o+l]=t[a+l]-h(t[a+l-i],0,0)+256&255}else{if(s===2)for(let l=0;l<r;l++)n[o+l]=t[a+l]+256-t[a+l-r]&255;if(s===3){for(let l=0;l<i;l++)n[o+l]=t[a+l]+256-(t[a+l-r]>>1)&255;for(let l=i;l<r;l++)n[o+l]=t[a+l]+256-(t[a+l-r]+t[a+l-i]>>1)&255}if(s===4){for(let l=0;l<i;l++)n[o+l]=t[a+l]+256-h(0,t[a+l-r],0)&255;for(let l=i;l<r;l++)n[o+l]=t[a+l]+256-h(t[a+l-i],t[a+l-r],t[a+l-i-r])&255}}},vt.crc={table:function(){const n=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let r=0;r<8;r++)e&1?e=3988292384^e>>>1:e=e>>>1;n[t]=e}return n}(),update:function(n,t,e,r){for(let i=0;i<r;i++)n=vt.crc.table[(n^t[e+i])&255]^n>>>8;return n},crc:function(n,t,e){return vt.crc.update(4294967295,n,t,e)^4294967295}},vt.quantize=function(n,t){const e=new Uint8Array(n),r=e.slice(0),i=new Uint32Array(r.buffer),s=vt.quantize.getKDtree(r,t),a=s[0],o=s[1],h=vt.quantize.planeDst,l=e,c=i,f=l.length,d=new Uint8Array(e.length>>2);let u;if(e.length<2e7)for(let p=0;p<f;p+=4){const v=l[p]*.00392156862745098,_=l[p+1]*(1/255),S=l[p+2]*(1/255),x=l[p+3]*(1/255);u=vt.quantize.getNearest(a,v,_,S,x),d[p>>2]=u.ind,c[p>>2]=u.est.rgba}else for(let p=0;p<f;p+=4){const v=l[p]*.00392156862745098,_=l[p+1]*(1/255),S=l[p+2]*(1/255),x=l[p+3]*(1/255);for(u=a;u.left;)u=h(u.est,v,_,S,x)<=0?u.left:u.right;d[p>>2]=u.ind,c[p>>2]=u.est.rgba}return{abuf:r.buffer,inds:d,plte:o}},vt.quantize.getKDtree=function(n,t,e){e===null&&(e=1e-4);const r=new Uint32Array(n.buffer),i={i0:0,i1:n.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=vt.quantize.stats(n,i.i0,i.i1),i.est=vt.quantize.estats(i.bst);const s=[i];for(;s.length<t;){let a=0,o=0;for(let d=0;d<s.length;d++)s[d].est.L>a&&(a=s[d].est.L,o=d);if(a<e)break;const h=s[o],l=vt.quantize.splitPixels(n,r,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=l||h.i1<=l){h.est.L=0;continue}const c={i0:h.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=vt.quantize.stats(n,c.i0,c.i1),c.est=vt.quantize.estats(c.bst);const f={i0:l,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};f.bst={R:[],m:[],N:h.bst.N-c.bst.N};for(let d=0;d<16;d++)f.bst.R[d]=h.bst.R[d]-c.bst.R[d];for(let d=0;d<4;d++)f.bst.m[d]=h.bst.m[d]-c.bst.m[d];f.est=vt.quantize.estats(f.bst),h.left=c,h.right=f,s[o]=c,s.push(f)}s.sort(function(a,o){return o.bst.N-a.bst.N});for(let a=0;a<s.length;a++)s[a].ind=a;return[i,s]},vt.quantize.getNearest=function(n,t,e,r,i){if(n.left==null)return n.tdst=vt.quantize.dist(n.est.q,t,e,r,i),n;const s=vt.quantize.planeDst(n.est,t,e,r,i);let a=n.left,o=n.right;s>0&&(a=n.right,o=n.left);const h=vt.quantize.getNearest(a,t,e,r,i);if(h.tdst<=s*s)return h;const l=vt.quantize.getNearest(o,t,e,r,i);return l.tdst<h.tdst?l:h},vt.quantize.planeDst=function(n,t,e,r,i){const s=n.e;return s[0]*t+s[1]*e+s[2]*r+s[3]*i-n.eMq},vt.quantize.dist=function(n,t,e,r,i){const s=t-n[0],a=e-n[1],o=r-n[2],h=i-n[3];return s*s+a*a+o*o+h*h},vt.quantize.splitPixels=function(n,t,e,r,i,s){const a=vt.quantize.vecDot;for(r-=4;e<r;){for(;a(n,e,i)<=s;)e+=4;for(;a(n,r,i)>s;)r-=4;if(e>=r)break;const o=t[e>>2];t[e>>2]=t[r>>2],t[r>>2]=o,e+=4,r-=4}for(;a(n,e,i)>s;)e-=4;return e+4},vt.quantize.vecDot=function(n,t,e){return n[t]*e[0]+n[t+1]*e[1]+n[t+2]*e[2]+n[t+3]*e[3]},vt.quantize.stats=function(n,t,e){const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],s=e-t>>2;for(let a=t;a<e;a+=4){const o=n[a]*.00392156862745098,h=n[a+1]*(1/255),l=n[a+2]*(1/255),c=n[a+3]*(1/255);i[0]+=o,i[1]+=h,i[2]+=l,i[3]+=c,r[0]+=o*o,r[1]+=o*h,r[2]+=o*l,r[3]+=o*c,r[5]+=h*h,r[6]+=h*l,r[7]+=h*c,r[10]+=l*l,r[11]+=l*c,r[15]+=c*c}return r[4]=r[1],r[8]=r[2],r[9]=r[6],r[12]=r[3],r[13]=r[7],r[14]=r[11],{R:r,m:i,N:s}},vt.quantize.estats=function(n){const t=n.R,e=n.m,r=n.N,i=e[0],s=e[1],a=e[2],o=e[3],h=r===0?0:1/r,l=[t[0]-i*i*h,t[1]-i*s*h,t[2]-i*a*h,t[3]-i*o*h,t[4]-s*i*h,t[5]-s*s*h,t[6]-s*a*h,t[7]-s*o*h,t[8]-a*i*h,t[9]-a*s*h,t[10]-a*a*h,t[11]-a*o*h,t[12]-o*i*h,t[13]-o*s*h,t[14]-o*a*h,t[15]-o*o*h],c=l,f=vt.M4;let d=[Math.random(),Math.random(),Math.random(),Math.random()],u=0,p=0;if(r!==0)for(let S=0;S<16&&(d=f.multVec(c,d),p=Math.sqrt(f.dot(d,d)),d=f.sml(1/p,d),!(S!==0&&Math.abs(p-u)<1e-9));S++)u=p;const v=[i*h,s*h,a*h,o*h],_=f.dot(f.sml(255,v),d);return{Cov:l,q:v,e:d,L:u,eMq255:_,eMq:f.dot(d,v),rgba:(Math.round(255*v[3])<<24|Math.round(255*v[2])<<16|Math.round(255*v[1])<<8|Math.round(255*v[0])<<0)>>>0}},vt.M4={multVec:function(n,t){return[n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3],n[4]*t[0]+n[5]*t[1]+n[6]*t[2]+n[7]*t[3],n[8]*t[0]+n[9]*t[1]+n[10]*t[2]+n[11]*t[3],n[12]*t[0]+n[13]*t[1]+n[14]*t[2]+n[15]*t[3]]},dot:function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]},sml:function(n,t){return[n*t[0],n*t[1],n*t[2],n*t[3]]}},vt.encode.concatRGBA=function(n){let t=0;for(let i=0;i<n.length;i++)t+=n[i].byteLength;const e=new Uint8Array(t);let r=0;for(let i=0;i<n.length;i++){const s=new Uint8Array(n[i]),a=s.length;for(let o=0;o<a;o+=4){let h=s[o],l=s[o+1],c=s[o+2];const f=s[o+3];f===0&&(h=l=c=0),e[r+o]=h,e[r+o+1]=l,e[r+o+2]=c,e[r+o+3]=f}r+=a}return e.buffer};const dr={glog:function(n){if(n<1)throw new Error("glog("+n+")");return dr.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return dr.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)dr.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)dr.EXP_TABLE[n]=dr.EXP_TABLE[n-4]^dr.EXP_TABLE[n-5]^dr.EXP_TABLE[n-6]^dr.EXP_TABLE[n-8];for(let n=0;n<255;n++)dr.LOG_TABLE[dr.EXP_TABLE[n]]=n;let ma;typeof self>"u"&&typeof process<"u"&&process.hrtime?ma=function(){const n=process.hrtime();return n[0]*1e3+n[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?ma=self.performance.now.bind(self.performance):Date.now!==void 0?ma=Date.now:ma=function(){return new Date().getTime()};const v9=ma;let _9=class{constructor(){Tt(this,"_tweens",{});Tt(this,"_tweensAddedDuringUpdate",{})}getAll(){return Object.keys(this._tweens).map(n=>this._tweens[n])}removeAll(){this._tweens={}}add(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n}remove(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]}update(n=v9(),t=!1){let e=Object.keys(this._tweens);if(e.length===0)return!1;for(;e.length>0;){this._tweensAddedDuringUpdate={};for(let r=0;r<e.length;r++){const i=this._tweens[e[r]],s=!t;i&&i.update(n,s)===!1&&!t&&delete this._tweens[e[r]]}e=Object.keys(this._tweensAddedDuringUpdate)}return!0}};const fr=new _9;fr.getAll.bind(fr),fr.removeAll.bind(fr),fr.add.bind(fr),fr.remove.bind(fr),fr.update.bind(fr);var s1=null;if(navigator.mozGetUserMedia)window.webrtcDetectedBrowser="firefox",window.webrtcDetectedVersion=parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10),RTCSessionDescription=mozRTCSessionDescription,RTCIceCandidate=mozRTCIceCandidate,window.getUserMedia=navigator.mozGetUserMedia.bind(navigator),navigator.getUserMedia=s1,window.createIceServer=function(n,t,e){var r=null,i=n.split(":");if(i[0].indexOf("stun")===0)r={url:n};else if(i[0].indexOf("turn")===0){var s=n.split("?");(s.length===1||s[1].indexOf("transport=udp")===0)&&(r={url:s[0],credential:e,username:t})}return r},window.createIceServers=function(n,t,e){for(var r=[],i=0;i<n.length;i++){var s=createIceServer(n[i],t,e);s!==null&&r.push(s)}return r},window.attachMediaStream=function(n,t){n.mozSrcObject=t,n.play()},window.reattachMediaStream=function(n,t){n.mozSrcObject=t.mozSrcObject,n.play()};else if(navigator.webkitGetUserMedia){window.webrtcDetectedBrowser="chrome";var a1=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);a1!==null?window.webrtcDetectedVersion=parseInt(a1[2],10):window.webrtcDetectedVersion=999,window.createIceServer=function(n,t,e){var r=null,i=n.split(":");return i[0].indexOf("stun")===0?r={url:n}:i[0].indexOf("turn")===0&&(r={url:n,credential:e,username:t}),r},window.createIceServers=function(n,t,e){for(var r=[],i=0;i<n.length;i++){var s=createIceServer(n[i],t,e);s!==null&&r.push(s)}return r},window.getUserMedia=navigator.webkitGetUserMedia.bind(navigator),navigator.getUserMedia=s1,window.attachMediaStream=function(n,t){typeof n.srcObject<"u"?n.srcObject=t:typeof n.mozSrcObject<"u"?n.mozSrcObject=t:typeof n.src<"u"&&(n.src=URL.createObjectURL(t))},window.reattachMediaStream=function(n,t){n.src=t.src}}var Du={exports:{}},ya={},Mu={},Iu={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n._registerNode=n.Konva=n.glob=void 0;const t=Math.PI/180;function e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}n.glob=typeof Kc<"u"?Kc:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},n.Konva={_global:n.glob,version:"9.2.2",isBrowser:e(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return n.Konva.angleDeg?i*t:i},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return n.Konva.DD.isDragging},isDragReady(){return!!n.Konva.DD.node},releaseCanvasOnDestroy:!0,document:n.glob.document,_injectGlobal(i){n.glob.Konva=i}};const r=i=>{n.Konva[i.prototype.getClassName()]=i};n._registerNode=r,n.Konva._injectGlobal(n.Konva)})(Iu);const w9=Cn(Iu),x9=Rt({__proto__:null,default:w9},[Iu]),te=Dt(x9);var ju={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Util=n.Transform=void 0;const t=te;class e{constructor(k=[1,0,0,1,0,0]){this.dirty=!1,this.m=k&&k.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new e(this.m)}copyInto(k){k.m[0]=this.m[0],k.m[1]=this.m[1],k.m[2]=this.m[2],k.m[3]=this.m[3],k.m[4]=this.m[4],k.m[5]=this.m[5]}point(k){var F=this.m;return{x:F[0]*k.x+F[2]*k.y+F[4],y:F[1]*k.x+F[3]*k.y+F[5]}}translate(k,F){return this.m[4]+=this.m[0]*k+this.m[2]*F,this.m[5]+=this.m[1]*k+this.m[3]*F,this}scale(k,F){return this.m[0]*=k,this.m[1]*=k,this.m[2]*=F,this.m[3]*=F,this}rotate(k){var F=Math.cos(k),P=Math.sin(k),N=this.m[0]*F+this.m[2]*P,R=this.m[1]*F+this.m[3]*P,L=this.m[0]*-P+this.m[2]*F,U=this.m[1]*-P+this.m[3]*F;return this.m[0]=N,this.m[1]=R,this.m[2]=L,this.m[3]=U,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(k,F){var P=this.m[0]+this.m[2]*F,N=this.m[1]+this.m[3]*F,R=this.m[2]+this.m[0]*k,L=this.m[3]+this.m[1]*k;return this.m[0]=P,this.m[1]=N,this.m[2]=R,this.m[3]=L,this}multiply(k){var F=this.m[0]*k.m[0]+this.m[2]*k.m[1],P=this.m[1]*k.m[0]+this.m[3]*k.m[1],N=this.m[0]*k.m[2]+this.m[2]*k.m[3],R=this.m[1]*k.m[2]+this.m[3]*k.m[3],L=this.m[0]*k.m[4]+this.m[2]*k.m[5]+this.m[4],U=this.m[1]*k.m[4]+this.m[3]*k.m[5]+this.m[5];return this.m[0]=F,this.m[1]=P,this.m[2]=N,this.m[3]=R,this.m[4]=L,this.m[5]=U,this}invert(){var k=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),F=this.m[3]*k,P=-this.m[1]*k,N=-this.m[2]*k,R=this.m[0]*k,L=k*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),U=k*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=F,this.m[1]=P,this.m[2]=N,this.m[3]=R,this.m[4]=L,this.m[5]=U,this}getMatrix(){return this.m}decompose(){var k=this.m[0],F=this.m[1],P=this.m[2],N=this.m[3],R=this.m[4],L=this.m[5],U=k*N-F*P;let B={x:R,y:L,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(k!=0||F!=0){var K=Math.sqrt(k*k+F*F);B.rotation=F>0?Math.acos(k/K):-Math.acos(k/K),B.scaleX=K,B.scaleY=U/K,B.skewX=(k*P+F*N)/U,B.skewY=0}else if(P!=0||N!=0){var tt=Math.sqrt(P*P+N*N);B.rotation=Math.PI/2-(N>0?Math.acos(-P/tt):-Math.acos(P/tt)),B.scaleX=U/tt,B.scaleY=tt,B.skewX=0,B.skewY=(k*P+F*N)/U}return B.rotation=n.Util._getRotation(B.rotation),B}}n.Transform=e;var r="[object Array]",i="[object Number]",s="[object String]",a="[object Boolean]",o=Math.PI/180,h=180/Math.PI,l="#",c="",f="0",d="Konva warning: ",u="Konva error: ",p="rgb(",v={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,S=[];const x=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(m){setTimeout(m,60)};n.Util={_isElement(m){return!!(m&&m.nodeType==1)},_isFunction(m){return!!(m&&m.constructor&&m.call&&m.apply)},_isPlainObject(m){return!!m&&m.constructor===Object},_isArray(m){return Object.prototype.toString.call(m)===r},_isNumber(m){return Object.prototype.toString.call(m)===i&&!isNaN(m)&&isFinite(m)},_isString(m){return Object.prototype.toString.call(m)===s},_isBoolean(m){return Object.prototype.toString.call(m)===a},isObject(m){return m instanceof Object},isValidSelector(m){if(typeof m!="string")return!1;var k=m[0];return k==="#"||k==="."||k===k.toUpperCase()},_sign(m){return m===0||m>0?1:-1},requestAnimFrame(m){S.push(m),S.length===1&&x(function(){const k=S;S=[],k.forEach(function(F){F()})})},createCanvasElement(){var m=document.createElement("canvas");try{m.style=m.style||{}}catch{}return m},createImageElement(){return document.createElement("img")},_isInDocument(m){for(;m=m.parentNode;)if(m==document)return!0;return!1},_urlToImage(m,k){var F=n.Util.createImageElement();F.onload=function(){k(F)},F.src=m},_rgbToHex(m,k,F){return(16777216+(m<<16)+(k<<8)+F).toString(16).slice(1)},_hexToRgb(m){m=m.replace(l,c);var k=parseInt(m,16);return{r:k>>16&255,g:k>>8&255,b:k&255}},getRandomColor(){for(var m=(Math.random()*16777215<<0).toString(16);m.length<6;)m=f+m;return l+m},getRGB(m){var k;return m in v?(k=v[m],{r:k[0],g:k[1],b:k[2]}):m[0]===l?this._hexToRgb(m.substring(1)):m.substr(0,4)===p?(k=_.exec(m.replace(/ /g,"")),{r:parseInt(k[1],10),g:parseInt(k[2],10),b:parseInt(k[3],10)}):{r:0,g:0,b:0}},colorToRGBA(m){return m=m||"black",n.Util._namedColorToRBA(m)||n.Util._hex3ColorToRGBA(m)||n.Util._hex4ColorToRGBA(m)||n.Util._hex6ColorToRGBA(m)||n.Util._hex8ColorToRGBA(m)||n.Util._rgbColorToRGBA(m)||n.Util._rgbaColorToRGBA(m)||n.Util._hslColorToRGBA(m)},_namedColorToRBA(m){var k=v[m.toLowerCase()];return k?{r:k[0],g:k[1],b:k[2],a:1}:null},_rgbColorToRGBA(m){if(m.indexOf("rgb(")===0){m=m.match(/rgb\(([^)]+)\)/)[1];var k=m.split(/ *, */).map(Number);return{r:k[0],g:k[1],b:k[2],a:1}}},_rgbaColorToRGBA(m){if(m.indexOf("rgba(")===0){m=m.match(/rgba\(([^)]+)\)/)[1];var k=m.split(/ *, */).map((F,P)=>F.slice(-1)==="%"?P===3?parseInt(F)/100:parseInt(F)/100*255:Number(F));return{r:k[0],g:k[1],b:k[2],a:k[3]}}},_hex8ColorToRGBA(m){if(m[0]==="#"&&m.length===9)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:parseInt(m.slice(7,9),16)/255}},_hex6ColorToRGBA(m){if(m[0]==="#"&&m.length===7)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:1}},_hex4ColorToRGBA(m){if(m[0]==="#"&&m.length===5)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:parseInt(m[4]+m[4],16)/255}},_hex3ColorToRGBA(m){if(m[0]==="#"&&m.length===4)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:1}},_hslColorToRGBA(m){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(m)){const[k,...F]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(m),P=Number(F[0])/360,N=Number(F[1])/100,R=Number(F[2])/100;let L,U,B;if(N===0)return B=R*255,{r:Math.round(B),g:Math.round(B),b:Math.round(B),a:1};R<.5?L=R*(1+N):L=R+N-R*N;const K=2*R-L,tt=[0,0,0];for(let W=0;W<3;W++)U=P+.3333333333333333*-(W-1),U<0&&U++,U>1&&U--,6*U<1?B=K+(L-K)*6*U:2*U<1?B=L:3*U<2?B=K+(L-K)*(.6666666666666666-U)*6:B=K,tt[W]=B*255;return{r:Math.round(tt[0]),g:Math.round(tt[1]),b:Math.round(tt[2]),a:1}}},haveIntersection(m,k){return!(k.x>m.x+m.width||k.x+k.width<m.x||k.y>m.y+m.height||k.y+k.height<m.y)},cloneObject(m){var k={};for(var F in m)this._isPlainObject(m[F])?k[F]=this.cloneObject(m[F]):this._isArray(m[F])?k[F]=this.cloneArray(m[F]):k[F]=m[F];return k},cloneArray(m){return m.slice(0)},degToRad(m){return m*o},radToDeg(m){return m*h},_degToRad(m){return n.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),n.Util.degToRad(m)},_radToDeg(m){return n.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),n.Util.radToDeg(m)},_getRotation(m){return t.Konva.angleDeg?n.Util.radToDeg(m):m},_capitalize(m){return m.charAt(0).toUpperCase()+m.slice(1)},throw(m){throw new Error(u+m)},error(m){console.error(u+m)},warn(m){t.Konva.showWarnings&&console.warn(d+m)},each(m,k){for(var F in m)k(F,m[F])},_inRange(m,k,F){return k<=m&&m<F},_getProjectionToSegment(m,k,F,P,N,R){var L,U,B,K=(m-F)*(m-F)+(k-P)*(k-P);if(K==0)L=m,U=k,B=(N-F)*(N-F)+(R-P)*(R-P);else{var tt=((N-m)*(F-m)+(R-k)*(P-k))/K;tt<0?(L=m,U=k,B=(m-N)*(m-N)+(k-R)*(k-R)):tt>1?(L=F,U=P,B=(F-N)*(F-N)+(P-R)*(P-R)):(L=m+tt*(F-m),U=k+tt*(P-k),B=(L-N)*(L-N)+(U-R)*(U-R))}return[L,U,B]},_getProjectionToLine(m,k,F){var P=n.Util.cloneObject(m),N=Number.MAX_VALUE;return k.forEach(function(R,L){if(!(!F&&L===k.length-1)){var U=k[(L+1)%k.length],B=n.Util._getProjectionToSegment(R.x,R.y,U.x,U.y,m.x,m.y),K=B[0],tt=B[1],W=B[2];W<N&&(P.x=K,P.y=tt,N=W)}}),P},_prepareArrayForTween(m,k,F){var P,N=[],R=[];if(m.length>k.length){var L=k;k=m,m=L}for(P=0;P<m.length;P+=2)N.push({x:m[P],y:m[P+1]});for(P=0;P<k.length;P+=2)R.push({x:k[P],y:k[P+1]});var U=[];return R.forEach(function(B){var K=n.Util._getProjectionToLine(B,N,F);U.push(K.x),U.push(K.y)}),U},_prepareToStringify(m){var k;m.visitedByCircularReferenceRemoval=!0;for(var F in m)if(m.hasOwnProperty(F)&&m[F]&&typeof m[F]=="object"){if(k=Object.getOwnPropertyDescriptor(m,F),m[F].visitedByCircularReferenceRemoval||n.Util._isElement(m[F]))if(k.configurable)delete m[F];else return null;else if(n.Util._prepareToStringify(m[F])===null)if(k.configurable)delete m[F];else return null}return delete m.visitedByCircularReferenceRemoval,m},_assign(m,k){for(var F in k)m[F]=k[F];return m},_getFirstPointerId(m){return m.touches?m.changedTouches[0].identifier:m.pointerId||999},releaseCanvas(...m){t.Konva.releaseCanvasOnDestroy&&m.forEach(k=>{k.width=0,k.height=0})},drawRoundedRectPath(m,k,F,P){let N=0,R=0,L=0,U=0;typeof P=="number"?N=R=L=U=Math.min(P,k/2,F/2):(N=Math.min(P[0]||0,k/2,F/2),R=Math.min(P[1]||0,k/2,F/2),U=Math.min(P[2]||0,k/2,F/2),L=Math.min(P[3]||0,k/2,F/2)),m.moveTo(N,0),m.lineTo(k-R,0),m.arc(k-R,R,R,Math.PI*3/2,0,!1),m.lineTo(k,F-U),m.arc(k-U,F-U,U,0,Math.PI/2,!1),m.lineTo(L,F),m.arc(L,F-L,L,Math.PI/2,Math.PI,!1),m.lineTo(0,N),m.arc(N,N,N,Math.PI,Math.PI*3/2,!1)}}})(ju);const b9=Cn(ju),S9=Rt({__proto__:null,default:b9},[ju]),Ae=Dt(S9);var va={},Lu={},Se={};Object.defineProperty(Se,"__esModule",{value:!0});var o1=Se.getComponentValidator=y1=Se.getBooleanValidator=m1=Se.getNumberArrayValidator=g1=Se.getFunctionValidator=p1=Se.getStringOrGradientValidator=f1=Se.getStringValidator=d1=Se.getNumberOrAutoValidator=u1=Se.getNumberOrArrayOfNumbersValidator=c1=Se.getNumberValidator=h1=Se.alphaComponent=l1=Se.RGBComponent=void 0;const $r=te,Oe=Ae;function Fr(n){return Oe.Util._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||Oe.Util._isBoolean(n)?n:Object.prototype.toString.call(n)}function k9(n){return n>255?255:n<0?0:Math.round(n)}var l1=Se.RGBComponent=k9;function C9(n){return n>1?1:n<1e-4?1e-4:n}var h1=Se.alphaComponent=C9;function T9(){if($r.Konva.isUnminified)return function(n,t){return Oe.Util._isNumber(n)||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),n}}var c1=Se.getNumberValidator=T9;function P9(n){if($r.Konva.isUnminified)return function(t,e){let r=Oe.Util._isNumber(t),i=Oe.Util._isArray(t)&&t.length==n;return!r&&!i&&Oe.Util.warn(Fr(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or Array<number>('+n+")"),t}}var u1=Se.getNumberOrArrayOfNumbersValidator=P9;function E9(){if($r.Konva.isUnminified)return function(n,t){var e=Oe.Util._isNumber(n),r=n==="auto";return e||r||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),n}}var d1=Se.getNumberOrAutoValidator=E9;function A9(){if($r.Konva.isUnminified)return function(n,t){return Oe.Util._isString(n)||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),n}}var f1=Se.getStringValidator=A9;function O9(){if($r.Konva.isUnminified)return function(n,t){const e=Oe.Util._isString(n),r=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return e||r||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),n}}var p1=Se.getStringOrGradientValidator=O9;function $9(){if($r.Konva.isUnminified)return function(n,t){return Oe.Util._isFunction(n)||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),n}}var g1=Se.getFunctionValidator=$9;function F9(){if($r.Konva.isUnminified)return function(n,t){const e=Int8Array?Object.getPrototypeOf(Int8Array):null;return e&&n instanceof e||(Oe.Util._isArray(n)?n.forEach(function(r){Oe.Util._isNumber(r)||Oe.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),n}}var m1=Se.getNumberArrayValidator=F9;function N9(){if($r.Konva.isUnminified)return function(n,t){var e=n===!0||n===!1;return e||Oe.Util.warn(Fr(n)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),n}}var y1=Se.getBooleanValidator=N9;function R9(n){if($r.Konva.isUnminified)return function(t,e){return t==null||Oe.Util.isObject(t)||Oe.Util.warn(Fr(t)+' is a not valid value for "'+e+'" attribute. The value should be an object with properties '+n),t}}o1=Se.getComponentValidator=R9;const D9=Rt({__proto__:null,get RGBComponent(){return l1},get alphaComponent(){return h1},default:Se,get getBooleanValidator(){return y1},get getComponentValidator(){return o1},get getFunctionValidator(){return g1},get getNumberArrayValidator(){return m1},get getNumberOrArrayOfNumbersValidator(){return u1},get getNumberOrAutoValidator(){return d1},get getNumberValidator(){return c1},get getStringOrGradientValidator(){return p1},get getStringValidator(){return f1}},[Se]),ee=Dt(D9);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Factory=void 0;const t=Ae,e=ee;var r="get",i="set";n.Factory={addGetterSetter(s,a,o,h,l){n.Factory.addGetter(s,a,o),n.Factory.addSetter(s,a,h,l),n.Factory.addOverloadedGetterSetter(s,a)},addGetter(s,a,o){var h=r+t.Util._capitalize(a);s.prototype[h]=s.prototype[h]||function(){var l=this.attrs[a];return l===void 0?o:l}},addSetter(s,a,o,h){var l=i+t.Util._capitalize(a);s.prototype[l]||n.Factory.overWriteSetter(s,a,o,h)},overWriteSetter(s,a,o,h){var l=i+t.Util._capitalize(a);s.prototype[l]=function(c){return o&&c!==void 0&&c!==null&&(c=o.call(this,c,a)),this._setAttr(a,c),h&&h.call(this),this}},addComponentsGetterSetter(s,a,o,h,l){var c=o.length,f=t.Util._capitalize,d=r+f(a),u=i+f(a),p,v;s.prototype[d]=function(){var S={};for(p=0;p<c;p++)v=o[p],S[v]=this.getAttr(a+f(v));return S};var _=(0,e.getComponentValidator)(o);s.prototype[u]=function(S){var x=this.attrs[a],m;h&&(S=h.call(this,S)),_&&_.call(this,S,a);for(m in S)S.hasOwnProperty(m)&&this._setAttr(a+f(m),S[m]);return S||o.forEach(k=>{this._setAttr(a+f(k),void 0)}),this._fireChangeEvent(a,x,S),l&&l.call(this),this},n.Factory.addOverloadedGetterSetter(s,a)},addOverloadedGetterSetter(s,a){var o=t.Util._capitalize(a),h=i+o,l=r+o;s.prototype[a]=function(){return arguments.length?(this[h](arguments[0]),this):this[l]()}},addDeprecatedGetterSetter(s,a,o,h){t.Util.error("Adding deprecated "+a);var l=r+t.Util._capitalize(a),c=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";s.prototype[l]=function(){t.Util.error(c);var f=this.attrs[a];return f===void 0?o:f},n.Factory.addSetter(s,a,h,function(){t.Util.error(c)}),n.Factory.addOverloadedGetterSetter(s,a)},backCompat(s,a){t.Util.each(a,function(o,h){var l=s.prototype[h],c=r+t.Util._capitalize(o),f=i+t.Util._capitalize(o);function d(){l.apply(this,arguments),t.Util.error('"'+o+'" method is deprecated and will be removed soon. Use ""'+h+'" instead.')}s.prototype[o]=d,s.prototype[c]=d,s.prototype[f]=d})},afterSetFilter(){this._filterUpToDate=!1}}})(Lu);const M9=Cn(Lu),I9=Rt({__proto__:null,default:M9},[Lu]),Wt=Dt(I9);var Nr={},Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});var v1=Rr.HitContext=S1=Rr.SceneContext=b1=Rr.Context=void 0;const _1=Ae,j9=te;function L9(n){var t=[],e=n.length,r=_1.Util,i,s;for(i=0;i<e;i++)s=n[i],r._isNumber(s)?s=Math.round(s*1e3)/1e3:r._isString(s)||(s=s+""),t.push(s);return t}var w1=",",U9="(",G9=")",z9="([",V9="])",B9=";",H9="()",q9="=",x1=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],K9=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const Y9=100;class yl{constructor(t){this.canvas=t,j9.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){var r=this.traceArr,i=r.length,s="",a,o,h,l;for(a=0;a<i;a++)o=r[a],h=o.method,h?(l=o.args,s+=h,t?s+=H9:_1.Util._isArray(l[0])?s+=z9+l.join(w1)+V9:(e&&(l=l.map(c=>typeof c=="number"?Math.floor(c):c)),s+=U9+l.join(w1)+G9)):(s+=o.property,t||(s+=q9+o.val)),s+=B9;return s}clearTrace(){this.traceArr=[]}_trace(t){var e=this.traceArr,r;e.push(t),r=e.length,r>=Y9&&e.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){const e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}_applyOpacity(t){var e=t.getAbsoluteOpacity();e!==1&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){const e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,r,i,s,a){this._context.arc(t,e,r,i,s,a)}arcTo(t,e,r,i,s){this._context.arcTo(t,e,r,i,s)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,r,i,s,a){this._context.bezierCurveTo(t,e,r,i,s,a)}clearRect(t,e,r,i){this._context.clearRect(t,e,r,i)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,e){var r=arguments;if(r.length===2)return this._context.createImageData(t,e);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,e,r,i){return this._context.createLinearGradient(t,e,r,i)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,r,i,s,a){return this._context.createRadialGradient(t,e,r,i,s,a)}drawImage(t,e,r,i,s,a,o,h,l){var c=arguments,f=this._context;c.length===3?f.drawImage(t,e,r):c.length===5?f.drawImage(t,e,r,i,s):c.length===9&&f.drawImage(t,e,r,i,s,a,o,h,l)}ellipse(t,e,r,i,s,a,o,h){this._context.ellipse(t,e,r,i,s,a,o,h)}isPointInPath(t,e,r,i){return r?this._context.isPointInPath(r,t,e,i):this._context.isPointInPath(t,e,i)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,e,r,i){this._context.fillRect(t,e,r,i)}strokeRect(t,e,r,i){this._context.strokeRect(t,e,r,i)}fillText(t,e,r,i){i?this._context.fillText(t,e,r,i):this._context.fillText(t,e,r)}measureText(t){return this._context.measureText(t)}getImageData(t,e,r,i){return this._context.getImageData(t,e,r,i)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,r,i){this._context.rect(t,e,r,i)}putImageData(t,e,r){this._context.putImageData(t,e,r)}quadraticCurveTo(t,e,r,i){this._context.quadraticCurveTo(t,e,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,e,r,i,s,a){this._context.setTransform(t,e,r,i,s,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,r,i){this._context.strokeText(t,e,r,i)}transform(t,e,r,i,s,a){this._context.transform(t,e,r,i,s,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){var t=this,e=x1.length,r=this.setAttr,i,s,a=function(o){var h=t[o],l;t[o]=function(){return s=L9(Array.prototype.slice.call(arguments,0)),l=h.apply(t,arguments),t._trace({method:o,args:s}),l}};for(i=0;i<e;i++)a(x1[i]);t.setAttr=function(){r.apply(t,arguments);var o=arguments[0],h=arguments[1];(o==="shadowOffsetX"||o==="shadowOffsetY"||o==="shadowBlur")&&(h=h/this.canvas.getPixelRatio()),t._trace({property:o,val:h})}}_applyGlobalCompositeOperation(t){const e=t.attrs.globalCompositeOperation;var r=!e||e==="source-over";r||this.setAttr("globalCompositeOperation",e)}}var b1=Rr.Context=yl;K9.forEach(function(n){Object.defineProperty(yl.prototype,n,{get(){return this._context[n]},set(t){this._context[n]=t}})});class X9 extends yl{constructor(t,{willReadFrequently:e=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:e})}_fillColor(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){const e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){const e=t.fill(),r=t.getFillPriority();if(e&&r==="color"){this._fillColor(t);return}const i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}const s=t.getFillLinearGradientColorStops();if(s&&r==="linear-gradient"){this._fillLinearGradient(t);return}const a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}e?this._fillColor(t):i?this._fillPattern(t):s?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const e=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),s=this.createLinearGradient(e.x,e.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)s.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",s)}}_stroke(t){var e=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var s=t.getStrokeLinearGradientColorStops();s?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var e,r,i,s=(e=t.getShadowRGBA())!==null&&e!==void 0?e:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,o=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},h=t.getAbsoluteScale(),l=this.canvas.getPixelRatio(),c=h.x*l,f=h.y*l;this.setAttr("shadowColor",s),this.setAttr("shadowBlur",a*Math.min(Math.abs(c),Math.abs(f))),this.setAttr("shadowOffsetX",o.x*c),this.setAttr("shadowOffsetY",o.y*f)}}var S1=Rr.SceneContext=X9;class J9 extends yl{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const s=t.getStrokeScaleEnabled();if(!s){this.save();var e=this.getCanvas().getPixelRatio();this.setTransform(e,0,0,e,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),i=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),s||this.restore()}}}v1=Rr.HitContext=J9;const Q9=Rt({__proto__:null,get Context(){return b1},get HitContext(){return v1},get SceneContext(){return S1},default:Rr},[Rr]),k1=Dt(Q9);Object.defineProperty(Nr,"__esModule",{value:!0});var C1=Nr.HitCanvas=A1=Nr.SceneCanvas=E1=Nr.Canvas=void 0;const vl=Ae,T1=k1,P1=te,Z9=Wt,W9=ee;var _l;function t7(){if(_l)return _l;var n=vl.Util.createCanvasElement(),t=n.getContext("2d");return _l=function(){var e=P1.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return e/r}(),vl.Util.releaseCanvas(n),_l}class wl{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var e=t||{},r=e.pixelRatio||P1.Konva.pixelRatio||t7();this.pixelRatio=r,this._canvas=vl.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio,r=this.getContext()._context;r.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio,r=this.getContext()._context;r.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch{try{return this._canvas.toDataURL()}catch(r){return vl.Util.error("Unable to get data URL. "+r.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}var E1=Nr.Canvas=wl;Z9.Factory.addGetterSetter(wl,"pixelRatio",void 0,(0,W9.getNumberValidator)());class e7 extends wl{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new T1.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}var A1=Nr.SceneCanvas=e7;class n7 extends wl{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new T1.HitContext(this),this.setSize(t.width,t.height)}}C1=Nr.HitCanvas=n7;const r7=Rt({__proto__:null,get Canvas(){return E1},get HitCanvas(){return C1},get SceneCanvas(){return A1},default:Nr},[Nr]),xl=Dt(r7);var Uu={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.DD=void 0;const t=te,e=Ae;n.DD={get isDragging(){var r=!1;return n.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return n.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];n.DD._dragElements.forEach((s,a)=>{const{node:o}=s,h=o.getStage();h.setPointersPositions(r),s.pointerId===void 0&&(s.pointerId=e.Util._getFirstPointerId(r));const l=h._changedPointerPositions.find(d=>d.id===s.pointerId);if(l){if(s.dragStatus!=="dragging"){var c=o.dragDistance(),f=Math.max(Math.abs(l.x-s.startPointerPos.x),Math.abs(l.y-s.startPointerPos.y));if(f<c||(o.startDrag({evt:r}),!o.isDragging()))return}o._setDragPosition(r,s),i.push(o)}}),i.forEach(s=>{s.fire("dragmove",{type:"dragmove",target:s,evt:r},!0)})},_endDragBefore(r){const i=[];n.DD._dragElements.forEach(s=>{const{node:a}=s,o=a.getStage();if(r&&o.setPointersPositions(r),!o._changedPointerPositions.find(l=>l.id===s.pointerId))return;(s.dragStatus==="dragging"||s.dragStatus==="stopped")&&(n.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,s.dragStatus="stopped");const h=s.node.getLayer()||s.node instanceof t.Konva.Stage&&s.node;h&&i.indexOf(h)===-1&&i.push(h)}),i.forEach(s=>{s.draw()})},_endDragAfter(r){n.DD._dragElements.forEach((i,s)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&n.DD._dragElements.delete(s)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",n.DD._endDragBefore,!0),window.addEventListener("touchend",n.DD._endDragBefore,!0),window.addEventListener("mousemove",n.DD._drag),window.addEventListener("touchmove",n.DD._drag),window.addEventListener("mouseup",n.DD._endDragAfter,!1),window.addEventListener("touchend",n.DD._endDragAfter,!1))})(Uu);const i7=Cn(Uu),s7=Rt({__proto__:null,default:i7},[Uu]),Gu=Dt(s7);Object.defineProperty(va,"__esModule",{value:!0});var O1=va.Node=void 0;const ne=Ae,_a=Wt,bl=xl,Fi=te,Mn=Gu,Me=ee;var Sl="absoluteOpacity",kl="allEventListeners",Dr="absoluteTransform",$1="absoluteScale",Ni="canvas",a7="Change",o7="children",l7="konva",zu="listening",F1="mouseenter",N1="mouseleave",R1="set",D1="Shape",Cl=" ",M1="stage",ni="transform",h7="Stage",Vu="visible",c7=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Cl);let u7=1,Xt=class Ed{constructor(t){this._id=u7++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===ni||t===Dr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,e){var r=this._cache.get(t),i=t===ni||t===Dr,s=r===void 0||i&&r.dirty===!0;return s&&(r=e.call(this),this._cache.set(t,r)),r}_calculate(t,e,r){if(!this._attachedDepsListeners.get(t)){const i=e.map(s=>s+"Change.konva").join(Cl);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ni)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Dr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Ni)){const{scene:t,filter:e,hit:r}=this._cache.get(Ni);ne.Util.releaseCanvas(t,e,r),this._cache.delete(Ni)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var e=t||{},r={};(e.x===void 0||e.y===void 0||e.width===void 0||e.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(e.width||r.width),s=Math.ceil(e.height||r.height),a=e.pixelRatio,o=e.x===void 0?Math.floor(r.x):e.x,h=e.y===void 0?Math.floor(r.y):e.y,l=e.offset||0,c=e.drawBorder||!1,f=e.hitCanvasPixelRatio||1;if(!i||!s){ne.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=l*2+1,s+=l*2+1,o-=l,h-=l;var d=new bl.SceneCanvas({pixelRatio:a,width:i,height:s}),u=new bl.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),p=new bl.HitCanvas({pixelRatio:f,width:i,height:s}),v=d.getContext(),_=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(Ni),this._filterUpToDate=!1,e.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,u.getContext()._context.imageSmoothingEnabled=!1),v.save(),_.save(),v.translate(-o,-h),_.translate(-o,-h),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Sl),this._clearSelfAndDescendantCache($1),this.drawScene(d,this),this.drawHit(p,this),this._isUnderCache=!1,v.restore(),_.restore(),c&&(v.save(),v.beginPath(),v.rect(0,0,i,s),v.closePath(),v.setAttr("strokeStyle","red"),v.setAttr("lineWidth",5),v.stroke(),v.restore()),this._cache.set(Ni,{scene:d,filter:u,hit:p,x:o,y:h}),this._requestDraw(),this}isCached(){return this._cache.has(Ni)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i=1/0,s=1/0,a=-1/0,o=-1/0,h=this.getAbsoluteTransform(e);return r.forEach(function(l){var c=h.point(l);i===void 0&&(i=a=c.x,s=o=c.y),i=Math.min(i,c.x),s=Math.min(s,c.y),a=Math.max(a,c.x),o=Math.max(o,c.y)}),{x:i,y:s,width:a-i,height:o-s}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),r=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),e=this._getCanvasCache(),r=e.scene,i=e.filter,s=i.getContext(),a,o,h,l;if(t){if(!this._filterUpToDate){var c=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,s.clear(),s.drawImage(r._canvas,0,0,r.getWidth()/c,r.getHeight()/c),o=s.getImageData(0,0,i.getWidth(),i.getHeight()),h=0;h<a;h++){if(l=t[h],typeof l!="function"){ne.Util.error("Filter should be type of function, but got "+typeof l+" instead. Please check correct filters");continue}l.call(this,o),s.putImageData(o,0,0)}}catch(f){ne.Util.error("Unable to apply filter. "+f.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,e){if(this._cache&&this._cache.delete(kl),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Cl),i=r.length,s,a,o,h,l;for(s=0;s<i;s++)a=r[s],o=a.split("."),h=o[0],l=o[1]||"",this.eventListeners[h]||(this.eventListeners[h]=[]),this.eventListeners[h].push({name:l,handler:e});return this}off(t,e){var r=(t||"").split(Cl),i=r.length,s,a,o,h,l,c;if(this._cache&&this._cache.delete(kl),!t)for(a in this.eventListeners)this._off(a);for(s=0;s<i;s++)if(o=r[s],h=o.split("."),l=h[0],c=h[1],l)this.eventListeners[l]&&this._off(l,c,e);else for(a in this.eventListeners)this._off(a,c,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(r){e.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,r){var i=this;this.on(t,function(s){for(var a=s.target.findAncestors(e,!0,i),o=0;o<a.length;o++)s=ne.Util.cloneObject(s),s.currentTarget=a[o],r.call(a[o],s)})}remove(){return this.isDragging()&&this.stopDrag(),Mn.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Dr),this._clearSelfAndDescendantCache(Sl),this._clearSelfAndDescendantCache($1),this._clearSelfAndDescendantCache(M1),this._clearSelfAndDescendantCache(Vu),this._clearSelfAndDescendantCache(zu)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var e="get"+ne.Util._capitalize(t);return ne.Util._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var e,r;if(!t)return this;for(e in t)e!==o7&&(r=R1+ne.Util._capitalize(e),ne.Util._isFunction(this[r])?this[r](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(zu,this._isListening)}_isListening(t){if(!this.listening())return!1;const e=this.getParent();return e&&e!==t&&this!==t?e._isListening(t):!0}isVisible(){return this._getCache(Vu,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const e=this.getParent();return e&&e!==t&&this!==t?e._isVisible(t):!0}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;Mn.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var s=!e&&!Fi.Konva.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!s}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),e=this,r=0,i,s,a,o;function h(c){for(i=[],s=c.length,a=0;a<s;a++)o=c[a],r++,o.nodeType!==D1&&(i=i.concat(o.getChildren().slice())),o._id===e._id&&(a=s);i.length>0&&i[0].getDepth()<=t&&h(i)}const l=this.getStage();return e.nodeType!==h7&&l&&h(l.getChildren()),r}getDepth(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ni),this._clearSelfAndDescendantCache(Dr)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;var e=t.getPointerPosition();if(!e)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(e)}getAbsolutePosition(t){let e=!1,r=this.parent;for(;r;){if(r.isCached()){e=!0;break}r=r.parent}e&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),s=new ne.Transform,a=this.offset();return s.m=i.slice(),s.translate(a.x,a.y),s.getTranslation()}setAbsolutePosition(t){const{x:e,y:r,...i}=this._clearTransform();this.attrs.x=e,this.attrs.y=r,this._clearCache(ni);var s=this._getAbsoluteTransform().copy();return s.invert(),s.translate(t.x,t.y),t={x:this.attrs.x+s.getTranslation().x,y:this.attrs.y+s.getTranslation().y},this._setTransform(i),this.setPosition({x:t.x,y:t.y}),this._clearCache(ni),this._clearSelfAndDescendantCache(Dr),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var e=t.x,r=t.y,i=this.x(),s=this.y();return e!==void 0&&(i+=e),r!==void 0&&(s+=r),this.setPosition({x:i,y:s}),this}_eachAncestorReverse(t,e){var r=[],i=this.getParent(),s,a;if(!(e&&e._id===this._id)){for(r.unshift(this);i&&(!e||i._id!==e._id);)r.unshift(i),i=i.parent;for(s=r.length,a=0;a<s;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return ne.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return ne.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return ne.Util.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return ne.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return ne.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&ne.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Sl,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},e=this.getAttrs(),r,i,s,a,o;t.attrs={};for(r in e)i=e[r],o=ne.Util.isObject(i)&&!ne.Util._isPlainObject(i)&&!ne.Util._isArray(i),!o&&(s=typeof this[r]=="function"&&this[r],delete e[r],a=s?s.call(this):null,e[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),ne.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,r){var i=[];e&&this._isMatch(t)&&i.push(this);for(var s=this.parent;s;){if(s===r)return i;s._isMatch(t)&&i.push(s),s=s.parent}return i}isAncestorOf(t){return!1}findAncestor(t,e,r){return this.findAncestors(t,e,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var e=t.replace(/ /g,"").split(","),r=e.length,i,s;for(i=0;i<r;i++)if(s=e[i],ne.Util.isValidSelector(s)||(ne.Util.warn('Selector "'+s+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),ne.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),ne.Util.warn("Konva is awesome, right?")),s.charAt(0)==="#"){if(this.id()===s.slice(1))return!0}else if(s.charAt(0)==="."){if(this.hasName(s.slice(1)))return!0}else if(this.className===s||this.nodeType===s)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(M1,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}fire(t,e={},r){return e.target=e.target||this,r?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Dr,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var e;if(t)return e=new ne.Transform,this._eachAncestorReverse(function(i){var s=i.transformsEnabled();s==="all"?e.multiply(i.getTransform()):s==="position"&&e.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),e;e=this._cache.get(Dr)||new ne.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var r=this.transformsEnabled();if(r==="all")e.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,s=this.attrs.y||0,a=this.attrs.offsetX||0,o=this.attrs.offsetY||0;e.translate(i-a,s-o)}return e.dirty=!1,e}getAbsoluteScale(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();const r=this.getAbsoluteTransform(t).decompose();return{x:r.scaleX,y:r.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ni,this._getTransform)}_getTransform(){var t,e,r=this._cache.get(ni)||new ne.Transform;r.reset();var i=this.x(),s=this.y(),a=Fi.Konva.getAngle(this.rotation()),o=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,h=(e=this.attrs.scaleY)!==null&&e!==void 0?e:1,l=this.attrs.skewX||0,c=this.attrs.skewY||0,f=this.attrs.offsetX||0,d=this.attrs.offsetY||0;return(i!==0||s!==0)&&r.translate(i,s),a!==0&&r.rotate(a),(l!==0||c!==0)&&r.skew(l,c),(o!==1||h!==1)&&r.scale(o,h),(f!==0||d!==0)&&r.translate(-1*f,-1*d),r.dirty=!1,r}clone(t){var e=ne.Util.cloneObject(this.attrs),r,i,s,a,o;for(r in t)e[r]=t[r];var h=new this.constructor(e);for(r in this.eventListeners)for(i=this.eventListeners[r],s=i.length,a=0;a<s;a++)o=i[a],o.name.indexOf(l7)<0&&(h.eventListeners[r]||(h.eventListeners[r]=[]),h.eventListeners[r].push(o));return h}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(e.x),s=t.y!==void 0?t.y:Math.floor(e.y),a=t.pixelRatio||1,o=new bl.SceneCanvas({width:t.width||Math.ceil(e.width)||(r?r.width():0),height:t.height||Math.ceil(e.height)||(r?r.height():0),pixelRatio:a}),h=o.getContext();return t.imageSmoothingEnabled===!1&&(h._context.imageSmoothingEnabled=!1),h.save(),(i||s)&&h.translate(-1*i,-1*s),this.drawScene(o),h.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var e=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(e,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((e,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,ne.Util._urlToImage(this.toDataURL(t),function(s){e(s),i==null||i(s)})}catch(i){r(i)}})}toBlob(t){return new Promise((e,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(s=>{e(s),i==null||i(s)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Fi.Konva.dragDistance}_off(t,e,r){var i=this.eventListeners[t],s,a,o;for(s=0;s<i.length;s++)if(a=i[s].name,o=i[s].handler,(a!=="konva"||e==="konva")&&(!e||a===e)&&(!r||r===o)){if(i.splice(s,1),i.length===0){delete this.eventListeners[t];break}s--}}_fireChangeEvent(t,e,r){this._fire(t+a7,{oldVal:e,newVal:r})}addName(t){if(!this.hasName(t)){var e=this.name(),r=e?e+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const e=this.name();if(!e)return!1;var r=(e||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var e=(this.name()||"").split(/\s/g),r=e.indexOf(t);return r!==-1&&(e.splice(r,1),this.name(e.join(" "))),this}setAttr(t,e){var r=this[R1+ne.Util._capitalize(t)];return ne.Util._isFunction(r)?r.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(Fi.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,e){var r=this.attrs[t];r===e&&!ne.Util.isObject(e)||(e==null?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,e),this._requestDraw())}_setComponentAttr(t,e,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,e,r){e&&this.nodeType===D1&&(e.target=this);var i=(t===F1||t===N1)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,e);var s=(t===F1||t===N1)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!s&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,e,r):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){var e,r,i;const s=(e=this._cache.get(kl))!==null&&e!==void 0?e:{};let a=s==null?void 0:s[t];if(a===void 0){a=[];let o=Object.getPrototypeOf(this);for(;o;){const h=(i=(r=o.eventListeners)===null||r===void 0?void 0:r[t])!==null&&i!==void 0?i:[];a.push(...h),o=Object.getPrototypeOf(o)}s[t]=a,this._cache.set(kl,s)}return a}_fire(t,e){e=e||{},e.currentTarget=this,e.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,e);const s=this.eventListeners[t];if(s)for(var i=0;i<s.length;i++)s[i].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition();if(r){var s=r._getPointerById(e)||r._changedPointerPositions[0]||i;Mn.DD._dragElements.set(this._id,{node:this,startPointerPos:s,offset:{x:s.x-i.x,y:s.y-i.y},dragStatus:"ready",pointerId:e})}}startDrag(t,e=!0){Mn.DD._dragElements.has(this._id)||this._createDragElement(t);const r=Mn.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){const r=this.getStage()._getPointerById(e.pointerId);if(r){var i={x:r.x-e.offset.x,y:r.y-e.offset.y},s=this.dragBoundFunc();if(s!==void 0){const a=s.call(this,i,t);a?i=a:ne.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const e=Mn.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),Mn.DD._endDragBefore(t),Mn.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Mn.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var e=t.evt.button!==void 0,r=!e||Fi.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var i=!1;Mn.DD._dragElements.forEach(s=>{this.isAncestorOf(s.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const e=Mn.DD._dragElements.get(this._id),r=e&&e.dragStatus==="dragging",i=e&&e.dragStatus==="ready";r?this.stopDrag():i&&Mn.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const e=this.getStage();if(!e)return!1;const r={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return ne.Util.haveIntersection(r,this.getClientRect())}static create(t,e){return ne.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){var r=Ed.prototype.getClassName.call(t),i=t.children,s,a,o;e&&(t.attrs.container=e),Fi.Konva[r]||(ne.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const h=Fi.Konva[r];if(s=new h(t.attrs),i)for(a=i.length,o=0;o<a;o++)s.add(Ed._createNode(i[o]));return s}};O1=va.Node=Xt,Xt.prototype.nodeType="Node",Xt.prototype._attrsAffectingSize=[],Xt.prototype.eventListeners={},Xt.prototype.on.call(Xt.prototype,c7,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ni),this._clearSelfAndDescendantCache(Dr)}),Xt.prototype.on.call(Xt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Vu)}),Xt.prototype.on.call(Xt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(zu)}),Xt.prototype.on.call(Xt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Sl)});const we=_a.Factory.addGetterSetter;we(Xt,"zIndex"),we(Xt,"absolutePosition"),we(Xt,"position"),we(Xt,"x",0,(0,Me.getNumberValidator)()),we(Xt,"y",0,(0,Me.getNumberValidator)()),we(Xt,"globalCompositeOperation","source-over",(0,Me.getStringValidator)()),we(Xt,"opacity",1,(0,Me.getNumberValidator)()),we(Xt,"name","",(0,Me.getStringValidator)()),we(Xt,"id","",(0,Me.getStringValidator)()),we(Xt,"rotation",0,(0,Me.getNumberValidator)()),_a.Factory.addComponentsGetterSetter(Xt,"scale",["x","y"]),we(Xt,"scaleX",1,(0,Me.getNumberValidator)()),we(Xt,"scaleY",1,(0,Me.getNumberValidator)()),_a.Factory.addComponentsGetterSetter(Xt,"skew",["x","y"]),we(Xt,"skewX",0,(0,Me.getNumberValidator)()),we(Xt,"skewY",0,(0,Me.getNumberValidator)()),_a.Factory.addComponentsGetterSetter(Xt,"offset",["x","y"]),we(Xt,"offsetX",0,(0,Me.getNumberValidator)()),we(Xt,"offsetY",0,(0,Me.getNumberValidator)()),we(Xt,"dragDistance",null,(0,Me.getNumberValidator)()),we(Xt,"width",0,(0,Me.getNumberValidator)()),we(Xt,"height",0,(0,Me.getNumberValidator)()),we(Xt,"listening",!0,(0,Me.getBooleanValidator)()),we(Xt,"preventDefault",!0,(0,Me.getBooleanValidator)()),we(Xt,"filters",null,function(n){return this._filterUpToDate=!1,n}),we(Xt,"visible",!0,(0,Me.getBooleanValidator)()),we(Xt,"transformsEnabled","all",(0,Me.getStringValidator)()),we(Xt,"size"),we(Xt,"dragBoundFunc"),we(Xt,"draggable",!1,(0,Me.getBooleanValidator)()),_a.Factory.backCompat(Xt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});const d7=Rt({__proto__:null,get Node(){return O1},default:va},[va]),Ie=Dt(d7);var wa={};Object.defineProperty(wa,"__esModule",{value:!0});var I1=wa.Container=void 0;const cs=Wt,Bu=Ie,Tl=ee;class Ri extends Bu.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const e=this.children||[];var r=[];return e.forEach(function(i){t(i)&&r.push(i)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var e=0;e<t.length;e++)this.add(t[e]);return this}const r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){var r=[];return this._descendants(i=>{const s=i._isMatch(t);return s&&r.push(i),!!(s&&e)}),r}_descendants(t){let e=!1;const r=this.getChildren();for(const i of r)if(e=t(i),e||i.hasChildren()&&(e=i._descendants(t),e))return!0;return!1}toObject(){var t=Bu.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){var e=Bu.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){e.add(r.clone())}),e}getAllIntersections(t){var e=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&e.push(r)}),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),!this.isCached()&&((e=this.children)===null||e===void 0||e.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(e,r){e.index=r}),this._requestDraw()}drawScene(t,e){var r=this.getLayer(),i=t||r&&r.getCanvas(),s=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.scene,h=i&&i.isCache;if(!this.isVisible()&&!h)return this;if(o){s.save();var l=this.getAbsoluteTransform(e).getMatrix();s.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedSceneCanvas(s),s.restore()}else this._drawChildren("drawScene",i,e);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,s=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.hit;if(o){s.save();var h=this.getAbsoluteTransform(e).getMatrix();s.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(s),s.restore()}else this._drawChildren("drawHit",i,e);return this}_drawChildren(t,e,r){var i,s=e&&e.getContext(),a=this.clipWidth(),o=this.clipHeight(),h=this.clipFunc(),l=a&&o||h;const c=r===this;if(l){s.save();var f=this.getAbsoluteTransform(r),d=f.getMatrix();s.transform(d[0],d[1],d[2],d[3],d[4],d[5]),s.beginPath();let _;if(h)_=h.call(this,s,this);else{var u=this.clipX(),p=this.clipY();s.rect(u,p,a,o)}s.clip.apply(s,_),d=f.copy().invert().getMatrix(),s.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var v=!c&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";v&&(s.save(),s._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(_){_[t](e,r)}),v&&s.restore(),l&&s.restore()}getClientRect(t={}){var e,r=t.skipTransform,i=t.relativeTo,s,a,o,h,l={x:1/0,y:1/0,width:0,height:0},c=this;(e=this.children)===null||e===void 0||e.forEach(function(v){if(v.visible()){var _=v.getClientRect({relativeTo:c,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(s===void 0?(s=_.x,a=_.y,o=_.x+_.width,h=_.y+_.height):(s=Math.min(s,_.x),a=Math.min(a,_.y),o=Math.max(o,_.x+_.width),h=Math.max(h,_.y+_.height)))}});for(var f=this.find("Shape"),d=!1,u=0;u<f.length;u++){var p=f[u];if(p._isVisible(this)){d=!0;break}}return d&&s!==void 0?l={x:s,y:a,width:o-s,height:h-a}:l={x:0,y:0,width:0,height:0},r?l:this._transformedRect(l,i)}}I1=wa.Container=Ri,cs.Factory.addComponentsGetterSetter(Ri,"clip",["x","y","width","height"]),cs.Factory.addGetterSetter(Ri,"clipX",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipY",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipWidth",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipHeight",void 0,(0,Tl.getNumberValidator)()),cs.Factory.addGetterSetter(Ri,"clipFunc");const f7=Rt({__proto__:null,get Container(){return I1},default:wa},[wa]),Pl=Dt(f7);var Hu={},En={};Object.defineProperty(En,"__esModule",{value:!0});var j1=En.releaseCapture=V1=En.setPointerCapture=z1=En.hasPointerCapture=G1=En.createEvent=U1=En.getCapturedShape=void 0;const p7=te,xa=new Map,L1=p7.Konva._global.PointerEvent!==void 0;function g7(n){return xa.get(n)}var U1=En.getCapturedShape=g7;function qu(n){return{evt:n,pointerId:n.pointerId}}var G1=En.createEvent=qu;function m7(n,t){return xa.get(n)===t}var z1=En.hasPointerCapture=m7;function y7(n,t){B1(n),t.getStage()&&(xa.set(n,t),L1&&t._fire("gotpointercapture",qu(new PointerEvent("gotpointercapture"))))}var V1=En.setPointerCapture=y7;function B1(n,t){const e=xa.get(n);if(!e)return;const r=e.getStage();r&&r.content,xa.delete(n),L1&&e._fire("lostpointercapture",qu(new PointerEvent("lostpointercapture")))}j1=En.releaseCapture=B1;const v7=Rt({__proto__:null,get createEvent(){return G1},default:En,get getCapturedShape(){return U1},get hasPointerCapture(){return z1},get releaseCapture(){return j1},get setPointerCapture(){return V1}},[En]),H1=Dt(v7);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Stage=n.stages=void 0;const t=Ae,e=Wt,r=Pl,i=te,s=xl,a=Gu,o=te,h=H1;var l="Stage",c="string",f="px",d="mouseout",u="mouseleave",p="mouseover",v="mouseenter",_="mousemove",S="mousedown",x="mouseup",m="pointermove",k="pointerdown",F="pointerup",P="pointercancel",N="lostpointercapture",R="pointerout",L="pointerleave",U="pointerover",B="pointerenter",K="contextmenu",tt="touchstart",W="touchend",lt="touchmove",wt="touchcancel",bt="wheel",xt=5,it=[[v,"_pointerenter"],[S,"_pointerdown"],[_,"_pointermove"],[x,"_pointerup"],[u,"_pointerleave"],[tt,"_pointerdown"],[lt,"_pointermove"],[W,"_pointerup"],[wt,"_pointercancel"],[p,"_pointerover"],[bt,"_wheel"],[K,"_contextmenu"],[k,"_pointerdown"],[m,"_pointermove"],[F,"_pointerup"],[P,"_pointercancel"],[N,"_lostpointercapture"]];const Y={mouse:{[R]:d,[L]:u,[U]:p,[B]:v,[m]:_,[k]:S,[F]:x,[P]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[R]:"touchout",[L]:"touchleave",[U]:"touchover",[B]:"touchenter",[m]:lt,[k]:tt,[F]:W,[P]:wt,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[R]:R,[L]:L,[U]:U,[B]:B,[m]:m,[k]:k,[F]:F,[P]:P,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},O=G=>G.indexOf("pointer")>=0?"pointer":G.indexOf("touch")>=0?"touch":"mouse",E=G=>{const M=O(G);if(M==="pointer")return i.Konva.pointerEventsEnabled&&Y.pointer;if(M==="touch")return Y.touch;if(M==="mouse")return Y.mouse};function T(G={}){return(G.clipFunc||G.clipWidth||G.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),G}const C="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";n.stages=[];class D extends r.Container{constructor(M){super(T(M)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),n.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{T(this.attrs)}),this._checkVisibility()}_validateAdd(M){const V=M.getType()==="Layer",q=M.getType()==="FastLayer";V||q||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const M=this.visible()?"":"none";this.content.style.display=M}setContainer(M){if(typeof M===c){if(M.charAt(0)==="."){var V=M.slice(1);M=document.getElementsByClassName(V)[0]}else{var q;M.charAt(0)!=="#"?q=M:q=M.slice(1),M=document.getElementById(q)}if(!M)throw"Can not find container in document with id "+q}return this._setAttr("container",M),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),M.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var M=this.children,V=M.length,q;for(q=0;q<V;q++)M[q].clear();return this}clone(M){return M||(M={}),M.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,M)}destroy(){super.destroy();var M=this.content;M&&t.Util._isInDocument(M)&&this.container().removeChild(M);var V=n.stages.indexOf(this);return V>-1&&n.stages.splice(V,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const M=this._pointerPositions[0]||this._changedPointerPositions[0];return M?{x:M.x,y:M.y}:(t.Util.warn(C),null)}_getPointerById(M){return this._pointerPositions.find(V=>V.id===M)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(M){M=M||{},M.x=M.x||0,M.y=M.y||0,M.width=M.width||this.width(),M.height=M.height||this.height();var V=new s.SceneCanvas({width:M.width,height:M.height,pixelRatio:M.pixelRatio||1}),q=V.getContext()._context,Z=this.children;return(M.x||M.y)&&q.translate(-1*M.x,-1*M.y),Z.forEach(function(nt){if(nt.isVisible()){var pt=nt._toKonvaCanvas(M);q.drawImage(pt._canvas,M.x,M.y,pt.getWidth()/pt.getPixelRatio(),pt.getHeight()/pt.getPixelRatio())}}),V}getIntersection(M){if(!M)return null;var V=this.children,q=V.length,Z=q-1,nt;for(nt=Z;nt>=0;nt--){const pt=V[nt].getIntersection(M);if(pt)return pt}return null}_resizeDOM(){var M=this.width(),V=this.height();this.content&&(this.content.style.width=M+f,this.content.style.height=V+f),this.bufferCanvas.setSize(M,V),this.bufferHitCanvas.setSize(M,V),this.children.forEach(q=>{q.setSize({width:M,height:V}),q.draw()})}add(M,...V){if(arguments.length>1){for(var q=0;q<arguments.length;q++)this.add(arguments[q]);return this}super.add(M);var Z=this.children.length;return Z>xt&&t.Util.warn("The stage has "+Z+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),M.setSize({width:this.width(),height:this.height()}),M.draw(),i.Konva.isBrowser&&this.content.appendChild(M.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(M){return h.hasPointerCapture(M,this)}setPointerCapture(M){h.setPointerCapture(M,this)}releaseCapture(M){h.releaseCapture(M,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&it.forEach(([M,V])=>{this.content.addEventListener(M,q=>{this[V](q)},{passive:!1})})}_pointerenter(M){this.setPointersPositions(M);const V=E(M.type);V&&this._fire(V.pointerenter,{evt:M,target:this,currentTarget:this})}_pointerover(M){this.setPointersPositions(M);const V=E(M.type);V&&this._fire(V.pointerover,{evt:M,target:this,currentTarget:this})}_getTargetShape(M){let V=this[M+"targetShape"];return V&&!V.getStage()&&(V=null),V}_pointerleave(M){const V=E(M.type),q=O(M.type);if(V){this.setPointersPositions(M);var Z=this._getTargetShape(q),nt=!a.DD.isDragging||i.Konva.hitOnDragEnabled;Z&&nt?(Z._fireAndBubble(V.pointerout,{evt:M}),Z._fireAndBubble(V.pointerleave,{evt:M}),this._fire(V.pointerleave,{evt:M,target:this,currentTarget:this}),this[q+"targetShape"]=null):nt&&(this._fire(V.pointerleave,{evt:M,target:this,currentTarget:this}),this._fire(V.pointerout,{evt:M,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(M){const V=E(M.type),q=O(M.type);if(V){this.setPointersPositions(M);var Z=!1;this._changedPointerPositions.forEach(nt=>{var pt=this.getIntersection(nt);if(a.DD.justDragged=!1,i.Konva["_"+q+"ListenClick"]=!0,!pt||!pt.isListening())return;i.Konva.capturePointerEventsEnabled&&pt.setPointerCapture(nt.id),this[q+"ClickStartShape"]=pt,pt._fireAndBubble(V.pointerdown,{evt:M,pointerId:nt.id}),Z=!0;const kt=M.type.indexOf("touch")>=0;pt.preventDefault()&&M.cancelable&&kt&&M.preventDefault()}),Z||this._fire(V.pointerdown,{evt:M,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(M){const V=E(M.type),q=O(M.type);if(!V)return;a.DD.isDragging&&a.DD.node.preventDefault()&&M.cancelable&&M.preventDefault(),this.setPointersPositions(M);var Z=!a.DD.isDragging||i.Konva.hitOnDragEnabled;if(!Z)return;var nt={};let pt=!1;var kt=this._getTargetShape(q);this._changedPointerPositions.forEach(Ft=>{const St=h.getCapturedShape(Ft.id)||this.getIntersection(Ft),At=Ft.id,jt={evt:M,pointerId:At};var zt=kt!==St;if(zt&&kt&&(kt._fireAndBubble(V.pointerout,{...jt},St),kt._fireAndBubble(V.pointerleave,{...jt},St)),St){if(nt[St._id])return;nt[St._id]=!0}St&&St.isListening()?(pt=!0,zt&&(St._fireAndBubble(V.pointerover,{...jt},kt),St._fireAndBubble(V.pointerenter,{...jt},kt),this[q+"targetShape"]=St),St._fireAndBubble(V.pointermove,{...jt})):kt&&(this._fire(V.pointerover,{evt:M,target:this,currentTarget:this,pointerId:At}),this[q+"targetShape"]=null)}),pt||this._fire(V.pointermove,{evt:M,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(M){const V=E(M.type),q=O(M.type);if(!V)return;this.setPointersPositions(M);const Z=this[q+"ClickStartShape"],nt=this[q+"ClickEndShape"];var pt={};let kt=!1;this._changedPointerPositions.forEach(Ft=>{const St=h.getCapturedShape(Ft.id)||this.getIntersection(Ft);if(St){if(St.releaseCapture(Ft.id),pt[St._id])return;pt[St._id]=!0}const At=Ft.id,jt={evt:M,pointerId:At};let zt=!1;i.Konva["_"+q+"InDblClickWindow"]?(zt=!0,clearTimeout(this[q+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+q+"InDblClickWindow"]=!0,clearTimeout(this[q+"DblTimeout"])),this[q+"DblTimeout"]=setTimeout(function(){i.Konva["_"+q+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),St&&St.isListening()?(kt=!0,this[q+"ClickEndShape"]=St,St._fireAndBubble(V.pointerup,{...jt}),i.Konva["_"+q+"ListenClick"]&&Z&&Z===St&&(St._fireAndBubble(V.pointerclick,{...jt}),zt&&nt&&nt===St&&St._fireAndBubble(V.pointerdblclick,{...jt}))):(this[q+"ClickEndShape"]=null,i.Konva["_"+q+"ListenClick"]&&this._fire(V.pointerclick,{evt:M,target:this,currentTarget:this,pointerId:At}),zt&&this._fire(V.pointerdblclick,{evt:M,target:this,currentTarget:this,pointerId:At}))}),kt||this._fire(V.pointerup,{evt:M,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+q+"ListenClick"]=!1,M.cancelable&&q!=="touch"&&M.preventDefault()}_contextmenu(M){this.setPointersPositions(M);var V=this.getIntersection(this.getPointerPosition());V&&V.isListening()?V._fireAndBubble(K,{evt:M}):this._fire(K,{evt:M,target:this,currentTarget:this})}_wheel(M){this.setPointersPositions(M);var V=this.getIntersection(this.getPointerPosition());V&&V.isListening()?V._fireAndBubble(bt,{evt:M}):this._fire(bt,{evt:M,target:this,currentTarget:this})}_pointercancel(M){this.setPointersPositions(M);const V=h.getCapturedShape(M.pointerId)||this.getIntersection(this.getPointerPosition());V&&V._fireAndBubble(F,h.createEvent(M)),h.releaseCapture(M.pointerId)}_lostpointercapture(M){h.releaseCapture(M.pointerId)}setPointersPositions(M){var V=this._getContentPosition(),q=null,Z=null;M=M||window.event,M.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(M.touches,nt=>{this._pointerPositions.push({id:nt.identifier,x:(nt.clientX-V.left)/V.scaleX,y:(nt.clientY-V.top)/V.scaleY})}),Array.prototype.forEach.call(M.changedTouches||M.touches,nt=>{this._changedPointerPositions.push({id:nt.identifier,x:(nt.clientX-V.left)/V.scaleX,y:(nt.clientY-V.top)/V.scaleY})})):(q=(M.clientX-V.left)/V.scaleX,Z=(M.clientY-V.top)/V.scaleY,this.pointerPos={x:q,y:Z},this._pointerPositions=[{x:q,y:Z,id:t.Util._getFirstPointerId(M)}],this._changedPointerPositions=[{x:q,y:Z,id:t.Util._getFirstPointerId(M)}])}_setPointerPosition(M){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(M)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var M=this.content.getBoundingClientRect();return{top:M.top,left:M.left,scaleX:M.width/this.content.clientWidth||1,scaleY:M.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var M=this.container();if(!M)throw"Stage has no container. A container is required.";M.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),M.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(M){M.batchDraw()}),this}}n.Stage=D,D.prototype.nodeType=l,(0,o._registerNode)(D),e.Factory.addGetterSetter(D,"container")})(Hu);const _7=Cn(Hu),w7=Rt({__proto__:null,default:_7},[Hu]),x7=Dt(w7);var ba={},Ku={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Shape=n.shapes=void 0;const t=te,e=Ae,r=Wt,i=Ie,s=ee,a=te,o=H1;var h="hasShadow",l="shadowRGBA",c="patternImage",f="linearGradient",d="radialGradient";let u;function p(){return u||(u=e.Util.createCanvasElement().getContext("2d"),u)}n.shapes={};function v(L){const U=this.attrs.fillRule;U?L.fill(U):L.fill()}function _(L){L.stroke()}function S(L){L.fill()}function x(L){L.stroke()}function m(){this._clearCache(h)}function k(){this._clearCache(l)}function F(){this._clearCache(c)}function P(){this._clearCache(f)}function N(){this._clearCache(d)}class R extends i.Node{constructor(U){super(U);let B;for(;B=e.Util.getRandomColor(),!(B&&!(B in n.shapes)););this.colorKey=B,n.shapes[B]=this}getContext(){return e.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return e.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(h,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(c,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var U=p();const B=U.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(B&&B.setTransform){const K=new e.Transform;K.translate(this.fillPatternX(),this.fillPatternY()),K.rotate(t.Konva.getAngle(this.fillPatternRotation())),K.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),K.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const tt=K.getMatrix(),W=typeof DOMMatrix>"u"?{a:tt[0],b:tt[1],c:tt[2],d:tt[3],e:tt[4],f:tt[5]}:new DOMMatrix(tt);B.setTransform(W)}return B}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){var U=this.fillLinearGradientColorStops();if(U){for(var B=p(),K=this.fillLinearGradientStartPoint(),tt=this.fillLinearGradientEndPoint(),W=B.createLinearGradient(K.x,K.y,tt.x,tt.y),lt=0;lt<U.length;lt+=2)W.addColorStop(U[lt],U[lt+1]);return W}}_getRadialGradient(){return this._getCache(d,this.__getRadialGradient)}__getRadialGradient(){var U=this.fillRadialGradientColorStops();if(U){for(var B=p(),K=this.fillRadialGradientStartPoint(),tt=this.fillRadialGradientEndPoint(),W=B.createRadialGradient(K.x,K.y,this.fillRadialGradientStartRadius(),tt.x,tt.y,this.fillRadialGradientEndRadius()),lt=0;lt<U.length;lt+=2)W.addColorStop(U[lt],U[lt+1]);return W}}getShadowRGBA(){return this._getCache(l,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var U=e.Util.colorToRGBA(this.shadowColor());if(U)return"rgba("+U.r+","+U.g+","+U.b+","+U.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const U=this.hitStrokeWidth();return U==="auto"?this.hasStroke():this.strokeEnabled()&&!!U}intersects(U){var B=this.getStage();if(!B)return!1;const K=B.bufferHitCanvas;return K.getContext().clear(),this.drawHit(K,void 0,!0),K.context.getImageData(Math.round(U.x),Math.round(U.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete n.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(U){var B;if(!this.getStage()||!(!((B=this.attrs.perfectDrawEnabled)!==null&&B!==void 0)||B))return!1;const K=U||this.hasFill(),tt=this.hasStroke(),W=this.getAbsoluteOpacity()!==1;if(K&&tt&&W)return!0;const lt=this.hasShadow(),wt=this.shadowForStrokeEnabled();return!!(K&&tt&<&&wt)}setStrokeHitEnabled(U){e.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),U?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var U=this.size();return{x:this._centroid?-U.width/2:0,y:this._centroid?-U.height/2:0,width:U.width,height:U.height}}getClientRect(U={}){const B=U.skipTransform,K=U.relativeTo,tt=this.getSelfRect(),W=!U.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,lt=tt.width+W,wt=tt.height+W,bt=!U.skipShadow&&this.hasShadow(),xt=bt?this.shadowOffsetX():0,it=bt?this.shadowOffsetY():0,Y=lt+Math.abs(xt),O=wt+Math.abs(it),E=bt&&this.shadowBlur()||0,T=Y+E*2,C=O+E*2,D={width:T,height:C,x:-(W/2+E)+Math.min(xt,0)+tt.x,y:-(W/2+E)+Math.min(it,0)+tt.y};return B?D:this._transformedRect(D,K)}drawScene(U,B){var K=this.getLayer(),tt=U||K.getCanvas(),W=tt.getContext(),lt=this._getCanvasCache(),wt=this.getSceneFunc(),bt=this.hasShadow(),xt,it,Y,O=tt.isCache,E=B===this;if(!this.isVisible()&&!E)return this;if(lt){W.save();var T=this.getAbsoluteTransform(B).getMatrix();return W.transform(T[0],T[1],T[2],T[3],T[4],T[5]),this._drawCachedSceneCanvas(W),W.restore(),this}if(!wt)return this;if(W.save(),this._useBufferCanvas()&&!O){xt=this.getStage(),it=xt.bufferCanvas,Y=it.getContext(),Y.clear(),Y.save(),Y._applyLineJoin(this);var C=this.getAbsoluteTransform(B).getMatrix();Y.transform(C[0],C[1],C[2],C[3],C[4],C[5]),wt.call(this,Y,this),Y.restore();var D=it.pixelRatio;bt&&W._applyShadow(this),W._applyOpacity(this),W._applyGlobalCompositeOperation(this),W.drawImage(it._canvas,0,0,it.width/D,it.height/D)}else{if(W._applyLineJoin(this),!E){var C=this.getAbsoluteTransform(B).getMatrix();W.transform(C[0],C[1],C[2],C[3],C[4],C[5]),W._applyOpacity(this),W._applyGlobalCompositeOperation(this)}bt&&W._applyShadow(this),wt.call(this,W,this)}return W.restore(),this}drawHit(U,B,K=!1){if(!this.shouldDrawHit(B,K))return this;var tt=this.getLayer(),W=U||tt.hitCanvas,lt=W&&W.getContext(),wt=this.hitFunc()||this.sceneFunc(),bt=this._getCanvasCache(),xt=bt&&bt.hit;if(this.colorKey||e.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),xt){lt.save();var it=this.getAbsoluteTransform(B).getMatrix();return lt.transform(it[0],it[1],it[2],it[3],it[4],it[5]),this._drawCachedHitCanvas(lt),lt.restore(),this}if(!wt)return this;if(lt.save(),lt._applyLineJoin(this),this!==B){var Y=this.getAbsoluteTransform(B).getMatrix();lt.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5])}return wt.call(this,lt,this),lt.restore(),this}drawHitFromCache(U=0){var B=this._getCanvasCache(),K=this._getCachedSceneCanvas(),tt=B.hit,W=tt.getContext(),lt=tt.getWidth(),wt=tt.getHeight(),bt,xt,it,Y,O,E;W.clear(),W.drawImage(K._canvas,0,0,lt,wt);try{for(bt=W.getImageData(0,0,lt,wt),xt=bt.data,it=xt.length,Y=e.Util._hexToRgb(this.colorKey),O=0;O<it;O+=4)E=xt[O+3],E>U?(xt[O]=Y.r,xt[O+1]=Y.g,xt[O+2]=Y.b,xt[O+3]=255):xt[O+3]=0;W.putImageData(bt,0,0)}catch(T){e.Util.error("Unable to draw hit graph from cached scene canvas. "+T.message)}return this}hasPointerCapture(U){return o.hasPointerCapture(U,this)}setPointerCapture(U){o.setPointerCapture(U,this)}releaseCapture(U){o.releaseCapture(U,this)}}n.Shape=R,R.prototype._fillFunc=v,R.prototype._strokeFunc=_,R.prototype._fillFuncHit=S,R.prototype._strokeFuncHit=x,R.prototype._centroid=!1,R.prototype.nodeType="Shape",(0,a._registerNode)(R),R.prototype.eventListeners={},R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",k),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",F),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",P),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",N),r.Factory.addGetterSetter(R,"stroke",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"strokeWidth",2,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(R,"hitStrokeWidth","auto",(0,s.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(R,"strokeHitEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"perfectDrawEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"shadowForStrokeEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(R,"lineJoin"),r.Factory.addGetterSetter(R,"lineCap"),r.Factory.addGetterSetter(R,"sceneFunc"),r.Factory.addGetterSetter(R,"hitFunc"),r.Factory.addGetterSetter(R,"dash"),r.Factory.addGetterSetter(R,"dashOffset",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowColor",void 0,(0,s.getStringValidator)()),r.Factory.addGetterSetter(R,"shadowBlur",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOpacity",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(R,"shadowOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternImage"),r.Factory.addGetterSetter(R,"fill",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"fillPatternX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(R,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(R,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(R,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(R,"fillEnabled",!0),r.Factory.addGetterSetter(R,"strokeEnabled",!0),r.Factory.addGetterSetter(R,"shadowEnabled",!0),r.Factory.addGetterSetter(R,"dashEnabled",!0),r.Factory.addGetterSetter(R,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(R,"fillPriority","color"),r.Factory.addComponentsGetterSetter(R,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternScaleX",1,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternScaleY",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(R,"fillPatternRotation",0),r.Factory.addGetterSetter(R,"fillRule",void 0,(0,s.getStringValidator)()),r.Factory.backCompat(R,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(Ku);const b7=Cn(Ku),S7=Rt({__proto__:null,default:b7},[Ku]),Xe=Dt(S7);Object.defineProperty(ba,"__esModule",{value:!0});var q1=ba.Layer=void 0;const Mr=Ae,Yu=Pl,us=Ie,Xu=Wt,K1=xl,k7=ee,C7=Xe,T7=te;var P7="#",E7="beforeDraw",A7="draw",Y1=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],O7=Y1.length;class ds extends Yu.Container{constructor(t){super(t),this.canvas=new K1.SceneCanvas,this.hitCanvas=new K1.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){us.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=us.Node.prototype.moveUp.call(this);if(!t)return!1;var e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(us.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(us.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return us.Node.prototype.remove.call(this),t&&t.parentNode&&Mr.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){var e=t.getType();e!=="Group"&&e!=="Shape"&&Mr.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),us.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Mr.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Mr.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Mr.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var e=1,r=!1;;){for(let i=0;i<O7;i++){const s=Y1[i],a=this._getIntersection({x:t.x+s.x*e,y:t.y+s.y*e}),o=a.shape;if(o)return o;if(r=!!a.antialiased,!a.antialiased)break}if(r)e+=1;else return null}}_getIntersection(t){const e=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,i=r[3];if(i===255){const s=Mr.Util._rgbToHex(r[0],r[1],r[2]),a=C7.shapes[P7+s];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,e){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(E7,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Yu.Container.prototype.drawScene.call(this,i,e),this._fire(A7,{node:this}),this}drawHit(t,e){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Yu.Container.prototype.drawHit.call(this,i,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){Mr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return Mr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,e=!!this.hitCanvas._canvas.parentNode;e?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return Mr.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}q1=ba.Layer=ds,ds.prototype.nodeType="Layer",(0,T7._registerNode)(ds),Xu.Factory.addGetterSetter(ds,"imageSmoothingEnabled",!0),Xu.Factory.addGetterSetter(ds,"clearBeforeDraw",!0),Xu.Factory.addGetterSetter(ds,"hitGraphEnabled",!0,(0,k7.getBooleanValidator)());const $7=Rt({__proto__:null,get Layer(){return q1},default:ba},[ba]),X1=Dt($7);var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});var J1=Sa.FastLayer=void 0;const F7=Ae,N7=X1,R7=te;class Ju extends N7.Layer{constructor(t){super(t),this.listening(!1),F7.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}J1=Sa.FastLayer=Ju,Ju.prototype.nodeType="FastLayer",(0,R7._registerNode)(Ju);const D7=Rt({__proto__:null,get FastLayer(){return J1},default:Sa},[Sa]),M7=Dt(D7);var ka={};Object.defineProperty(ka,"__esModule",{value:!0});var Q1=ka.Group=void 0;const I7=Ae,j7=Pl,L7=te;class Qu extends j7.Container{_validateAdd(t){var e=t.getType();e!=="Group"&&e!=="Shape"&&I7.Util.throw("You may only add groups and shapes to groups.")}}Q1=ka.Group=Qu,Qu.prototype.nodeType="Group",(0,L7._registerNode)(Qu);const U7=Rt({__proto__:null,get Group(){return Q1},default:ka},[ka]),Zu=Dt(U7);var Ca={};Object.defineProperty(Ca,"__esModule",{value:!0});var Z1=Ca.Animation=void 0;const Wu=te,W1=Ae,td=function(){return Wu.glob.performance&&Wu.glob.performance.now?function(){return Wu.glob.performance.now()}:function(){return new Date().getTime()}}();class pr{constructor(t,e){this.id=pr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:td(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){let e=[];return t&&(e=Array.isArray(t)?t:[t]),this.layers=e,this}getLayers(){return this.layers}addLayer(t){const e=this.layers,r=e.length;for(let i=0;i<r;i++)if(e[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const t=pr.animations,e=t.length;for(let r=0;r<e;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=td(),pr._addAnimation(this),this}stop(){return pr._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const e=t.id,r=this.animations,i=r.length;for(let s=0;s<i;s++)if(r[s].id===e){this.animations.splice(s,1);break}}static _runFrames(){const t={},e=this.animations;for(let r=0;r<e.length;r++){const i=e[r],s=i.layers,a=i.func;i._updateFrameObject(td());const o=s.length;let h;if(a?h=a.call(i,i.frame)!==!1:h=!0,!!h)for(let l=0;l<o;l++){const c=s[l];c._id!==void 0&&(t[c._id]=c)}}for(let r in t)t.hasOwnProperty(r)&&t[r].batchDraw()}static _animationLoop(){const t=pr;t.animations.length?(t._runFrames(),W1.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,W1.Util.requestAnimFrame(this._animationLoop))}}Z1=Ca.Animation=pr,pr.animations=[],pr.animIdCounter=0,pr.animRunning=!1;const G7=Rt({__proto__:null,get Animation(){return Z1},default:Ca},[Ca]),ed=Dt(G7);var nd={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Easings=n.Tween=void 0;const t=Ae,e=ed,r=Ie,i=te;var s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},a=1,o=2,h=3,l=0,c=["fill","stroke","shadowColor"];class f{constructor(p,v,_,S,x,m,k){this.prop=p,this.propFunc=v,this.begin=S,this._pos=S,this.duration=m,this._change=0,this.prevPos=0,this.yoyo=k,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=_,this._change=x-this.begin,this.pause()}fire(p){var v=this[p];v&&v()}setTime(p){p>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=o,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=h,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var p=this.getTimer()-this._startTime;this.state===o?this.setTime(p):this.state===h&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class d{constructor(p){var v=this,_=p.node,S=_._id,x,m=p.easing||n.Easings.Linear,k=!!p.yoyo,F;typeof p.duration>"u"?x=.3:p.duration===0?x=.001:x=p.duration,this.node=_,this._id=l++;var P=_.getLayer()||(_ instanceof i.Konva.Stage?_.getLayers():null);P||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new e.Animation(function(){v.tween.onEnterFrame()},P),this.tween=new f(F,function(N){v._tweenFunc(N)},m,0,1,x*1e3,k),this._addListeners(),d.attrs[S]||(d.attrs[S]={}),d.attrs[S][this._id]||(d.attrs[S][this._id]={}),d.tweens[S]||(d.tweens[S]={});for(F in p)s[F]===void 0&&this._addAttr(F,p[F]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,v){var _=this.node,S=_._id,x,m,k,F,P,N,R,L;if(k=d.tweens[S][p],k&&delete d.attrs[S][k][p],x=_.getAttr(p),t.Util._isArray(v))if(m=[],P=Math.max(v.length,x.length),p==="points"&&v.length!==x.length&&(v.length>x.length?(R=x,x=t.Util._prepareArrayForTween(x,v,_.closed())):(N=v,v=t.Util._prepareArrayForTween(v,x,_.closed()))),p.indexOf("fill")===0)for(F=0;F<P;F++)if(F%2===0)m.push(v[F]-x[F]);else{var U=t.Util.colorToRGBA(x[F]);L=t.Util.colorToRGBA(v[F]),x[F]=U,m.push({r:L.r-U.r,g:L.g-U.g,b:L.b-U.b,a:L.a-U.a})}else for(F=0;F<P;F++)m.push(v[F]-x[F]);else c.indexOf(p)!==-1?(x=t.Util.colorToRGBA(x),L=t.Util.colorToRGBA(v),m={r:L.r-x.r,g:L.g-x.g,b:L.b-x.b,a:L.a-x.a}):m=v-x;d.attrs[S][this._id][p]={start:x,diff:m,end:v,trueEnd:N,trueStart:R},d.tweens[S][p]=this._id}_tweenFunc(p){var v=this.node,_=d.attrs[v._id][this._id],S,x,m,k,F,P,N,R;for(S in _){if(x=_[S],m=x.start,k=x.diff,R=x.end,t.Util._isArray(m))if(F=[],N=Math.max(m.length,R.length),S.indexOf("fill")===0)for(P=0;P<N;P++)P%2===0?F.push((m[P]||0)+k[P]*p):F.push("rgba("+Math.round(m[P].r+k[P].r*p)+","+Math.round(m[P].g+k[P].g*p)+","+Math.round(m[P].b+k[P].b*p)+","+(m[P].a+k[P].a*p)+")");else for(P=0;P<N;P++)F.push((m[P]||0)+k[P]*p);else c.indexOf(S)!==-1?F="rgba("+Math.round(m.r+k.r*p)+","+Math.round(m.g+k.g*p)+","+Math.round(m.b+k.b*p)+","+(m.a+k.a*p)+")":F=m+k*p;v.setAttr(S,F)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,v=d.attrs[p._id][this._id];v.points&&v.points.trueEnd&&p.setAttr("points",v.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,v=d.attrs[p._id][this._id];v.points&&v.points.trueStart&&p.points(v.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,v=this._id,_=d.tweens[p],S;this.pause();for(S in _)delete d.tweens[p][S];delete d.attrs[p][v]}}n.Tween=d,d.attrs={},d.tweens={},r.Node.prototype.to=function(u){var p=u.onFinish;u.node=this,u.onFinish=function(){this.destroy(),p&&p()};var v=new d(u);v.play()},n.Easings={BackEaseIn(u,p,v,_){var S=1.70158;return v*(u/=_)*u*((S+1)*u-S)+p},BackEaseOut(u,p,v,_){var S=1.70158;return v*((u=u/_-1)*u*((S+1)*u+S)+1)+p},BackEaseInOut(u,p,v,_){var S=1.70158;return(u/=_/2)<1?v/2*(u*u*(((S*=1.525)+1)*u-S))+p:v/2*((u-=2)*u*(((S*=1.525)+1)*u+S)+2)+p},ElasticEaseIn(u,p,v,_,S,x){var m=0;return u===0?p:(u/=_)===1?p+v:(x||(x=_*.3),!S||S<Math.abs(v)?(S=v,m=x/4):m=x/(2*Math.PI)*Math.asin(v/S),-(S*Math.pow(2,10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/x))+p)},ElasticEaseOut(u,p,v,_,S,x){var m=0;return u===0?p:(u/=_)===1?p+v:(x||(x=_*.3),!S||S<Math.abs(v)?(S=v,m=x/4):m=x/(2*Math.PI)*Math.asin(v/S),S*Math.pow(2,-10*u)*Math.sin((u*_-m)*(2*Math.PI)/x)+v+p)},ElasticEaseInOut(u,p,v,_,S,x){var m=0;return u===0?p:(u/=_/2)===2?p+v:(x||(x=_*.44999999999999996),!S||S<Math.abs(v)?(S=v,m=x/4):m=x/(2*Math.PI)*Math.asin(v/S),u<1?-.5*(S*Math.pow(2,10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/x))+p:S*Math.pow(2,-10*(u-=1))*Math.sin((u*_-m)*(2*Math.PI)/x)*.5+v+p)},BounceEaseOut(u,p,v,_){return(u/=_)<.36363636363636365?v*(7.5625*u*u)+p:u<.7272727272727273?v*(7.5625*(u-=.5454545454545454)*u+.75)+p:u<.9090909090909091?v*(7.5625*(u-=.8181818181818182)*u+.9375)+p:v*(7.5625*(u-=.9545454545454546)*u+.984375)+p},BounceEaseIn(u,p,v,_){return v-n.Easings.BounceEaseOut(_-u,0,v,_)+p},BounceEaseInOut(u,p,v,_){return u<_/2?n.Easings.BounceEaseIn(u*2,0,v,_)*.5+p:n.Easings.BounceEaseOut(u*2-_,0,v,_)*.5+v*.5+p},EaseIn(u,p,v,_){return v*(u/=_)*u+p},EaseOut(u,p,v,_){return-v*(u/=_)*(u-2)+p},EaseInOut(u,p,v,_){return(u/=_/2)<1?v/2*u*u+p:-v/2*(--u*(u-2)-1)+p},StrongEaseIn(u,p,v,_){return v*(u/=_)*u*u*u*u+p},StrongEaseOut(u,p,v,_){return v*((u=u/_-1)*u*u*u*u+1)+p},StrongEaseInOut(u,p,v,_){return(u/=_/2)<1?v/2*u*u*u*u*u+p:v/2*((u-=2)*u*u*u*u+2)+p},Linear(u,p,v,_){return v*u/_+p}}})(nd);const z7=Cn(nd),V7=Rt({__proto__:null,default:z7},[nd]),B7=Dt(V7);(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Konva=void 0;const t=te,e=Ae,r=Ie,i=Pl,s=x7,a=X1,o=M7,h=Zu,l=Gu,c=Xe,f=ed,d=B7,u=k1,p=xl;n.Konva=e.Util._assign(t.Konva,{Util:e.Util,Transform:e.Transform,Node:r.Node,Container:i.Container,Stage:s.Stage,stages:s.stages,Layer:a.Layer,FastLayer:o.FastLayer,Group:h.Group,DD:l.DD,Shape:c.Shape,shapes:c.shapes,Animation:f.Animation,Tween:d.Tween,Easings:d.Easings,Context:u.Context,Canvas:p.Canvas}),n.default=n.Konva})(Mu);const H7=Cn(Mu),q7=Rt({__proto__:null,default:H7},[Mu]),K7=Dt(q7);var Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});var ty=Ta.Arc=void 0;const El=Wt,Y7=Xe,ey=te,Al=ee,X7=te;class Ir extends Y7.Shape{_sceneFunc(t){var e=ey.Konva.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,r),t.arc(0,0,this.innerRadius(),e,0,!r),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),e=this.outerRadius(),r=this.clockwise(),i=ey.Konva.getAngle(r?360-this.angle():this.angle()),s=Math.cos(Math.min(i,Math.PI)),a=1,o=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),h=Math.sin(Math.min(i,Math.PI/2)),l=s*(s>0?t:e),c=a*e,f=o*(o>0?t:e),d=h*(h>0?e:t);return{x:l,y:r?-1*d:f,width:c-l,height:d-f}}}ty=Ta.Arc=Ir,Ir.prototype._centroid=!0,Ir.prototype.className="Arc",Ir.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,X7._registerNode)(Ir),El.Factory.addGetterSetter(Ir,"innerRadius",0,(0,Al.getNumberValidator)()),El.Factory.addGetterSetter(Ir,"outerRadius",0,(0,Al.getNumberValidator)()),El.Factory.addGetterSetter(Ir,"angle",0,(0,Al.getNumberValidator)()),El.Factory.addGetterSetter(Ir,"clockwise",!1,(0,Al.getBooleanValidator)());const J7=Rt({__proto__:null,get Arc(){return ty},default:Ta},[Ta]),Q7=Dt(J7);var Pa={},Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});var ny=Ea.Line=void 0;const Ol=Wt,Z7=Xe,ry=ee,W7=te;function rd(n,t,e,r,i,s,a){var o=Math.sqrt(Math.pow(e-n,2)+Math.pow(r-t,2)),h=Math.sqrt(Math.pow(i-e,2)+Math.pow(s-r,2)),l=a*o/(o+h),c=a*h/(o+h),f=e-l*(i-n),d=r-l*(s-t),u=e+c*(i-n),p=r+c*(s-t);return[f,d,u,p]}function iy(n,t){var e=n.length,r=[],i,s;for(i=2;i<e-2;i+=2)s=rd(n[i-2],n[i-1],n[i],n[i+1],n[i+2],n[i+3],t),!isNaN(s[0])&&(r.push(s[0]),r.push(s[1]),r.push(n[i]),r.push(n[i+1]),r.push(s[2]),r.push(s[3]));return r}class ri extends Z7.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var e=this.points(),r=e.length,i=this.tension(),s=this.closed(),a=this.bezier(),o,h,l;if(r){if(t.beginPath(),t.moveTo(e[0],e[1]),i!==0&&r>4){for(o=this.getTensionPoints(),h=o.length,l=s?0:4,s||t.quadraticCurveTo(o[0],o[1],o[2],o[3]);l<h-2;)t.bezierCurveTo(o[l++],o[l++],o[l++],o[l++],o[l++],o[l++]);s||t.quadraticCurveTo(o[h-2],o[h-1],e[r-2],e[r-1])}else if(a)for(l=2;l<r;)t.bezierCurveTo(e[l++],e[l++],e[l++],e[l++],e[l++],e[l++]);else for(l=2;l<r;l+=2)t.lineTo(e[l],e[l+1]);s?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():iy(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),e=t.length,r=this.tension(),i=rd(t[e-2],t[e-1],t[0],t[1],t[2],t[3],r),s=rd(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],r),a=iy(t,r),o=[i[2],i[3]].concat(a).concat([s[0],s[1],t[e-2],t[e-1],s[2],s[3],i[0],i[1],t[0],t[1]]);return o}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var e=t[0],r=t[0],i=t[1],s=t[1],a,o,h=0;h<t.length/2;h++)a=t[h*2],o=t[h*2+1],e=Math.min(e,a),r=Math.max(r,a),i=Math.min(i,o),s=Math.max(s,o);return{x:e,y:i,width:r-e,height:s-i}}}ny=Ea.Line=ri,ri.prototype.className="Line",ri.prototype._attrsAffectingSize=["points","bezier","tension"],(0,W7._registerNode)(ri),Ol.Factory.addGetterSetter(ri,"closed",!1),Ol.Factory.addGetterSetter(ri,"bezier",!1),Ol.Factory.addGetterSetter(ri,"tension",0,(0,ry.getNumberValidator)()),Ol.Factory.addGetterSetter(ri,"points",[],(0,ry.getNumberArrayValidator)());const tT=Rt({__proto__:null,get Line(){return ny},default:Ea},[Ea]),sy=Dt(tT);var Aa={},id={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.t2length=n.getQuadraticArcLength=n.getCubicArcLength=n.binomialCoefficients=n.cValues=n.tValues=void 0,n.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],n.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],n.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(a,o,h)=>{let l,c,f;l=h/2,c=0;for(let d=0;d<20;d++)f=l*n.tValues[20][d]+l,c+=n.cValues[20][d]*r(a,o,f);return l*c};n.getCubicArcLength=t;const e=(a,o,h)=>{h===void 0&&(h=1);const l=a[0]-2*a[1]+a[2],c=o[0]-2*o[1]+o[2],f=2*a[1]-2*a[0],d=2*o[1]-2*o[0],u=4*(l*l+c*c),p=4*(l*f+c*d),v=f*f+d*d;if(u===0)return h*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(o[2]-o[0],2));const _=p/(2*u),S=v/u,x=h+_,m=S-_*_,k=x*x+m>0?Math.sqrt(x*x+m):0,F=_*_+m>0?Math.sqrt(_*_+m):0,P=_+Math.sqrt(_*_+m)!==0?m*Math.log(Math.abs((x+k)/(_+F))):0;return Math.sqrt(u)/2*(x*k-_*F+P)};n.getQuadraticArcLength=e;function r(a,o,h){const l=i(1,h,a),c=i(1,h,o),f=l*l+c*c;return Math.sqrt(f)}const i=(a,o,h)=>{const l=h.length-1;let c,f;if(l===0)return 0;if(a===0){f=0;for(let d=0;d<=l;d++)f+=n.binomialCoefficients[l][d]*Math.pow(1-o,l-d)*Math.pow(o,d)*h[d];return f}else{c=new Array(l);for(let d=0;d<l;d++)c[d]=l*(h[d+1]-h[d]);return i(a-1,o,c)}},s=(a,o,h)=>{let l=1,c=a/o,f=(a-h(c))/o,d=0;for(;l>.001;){const u=h(c+f),p=Math.abs(a-u)/o;if(p<l)l=p,c+=f;else{const v=h(c-f),_=Math.abs(a-v)/o;_<l?(l=_,c-=f):f/=2}if(d++,d>500)break}return c};n.t2length=s})(id);const eT=Cn(id),nT=Rt({__proto__:null,default:eT},[id]),rT=Dt(nT);Object.defineProperty(Aa,"__esModule",{value:!0});var ay=Aa.Path=void 0;const iT=Wt,sT=Xe,aT=te,fs=rT;class Ve extends sT.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Ve.parsePathData(this.data()),this.pathLength=Ve.getPathLength(this.dataArray)}_sceneFunc(t){var e=this.dataArray;t.beginPath();for(var r=!1,i=0;i<e.length;i++){var s=e[i].command,a=e[i].points;switch(s){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var o=a[0],h=a[1],l=a[2],c=a[3],f=a[4],d=a[5],u=a[6],p=a[7],v=l>c?l:c,_=l>c?1:l/c,S=l>c?c/l:1;t.translate(o,h),t.rotate(u),t.scale(_,S),t.arc(0,0,v,f,f+d,1-p),t.scale(1/_,1/S),t.rotate(-u),t.translate(-o,-h);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(l){if(l.command==="A"){var c=l.points[4],f=l.points[5],d=l.points[4]+f,u=Math.PI/180;if(Math.abs(c-d)<u&&(u=Math.abs(c-d)),f<0)for(let p=c-u;p>d;p-=u){const v=Ve.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],p,0);t.push(v.x,v.y)}else for(let p=c+u;p<d;p+=u){const v=Ve.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],p,0);t.push(v.x,v.y)}}else if(l.command==="C")for(let p=0;p<=1;p+=.01){const v=Ve.getPointOnCubicBezier(p,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);t.push(v.x,v.y)}else t=t.concat(l.points)});for(var e=t[0],r=t[0],i=t[1],s=t[1],a,o,h=0;h<t.length/2;h++)a=t[h*2],o=t[h*2+1],isNaN(a)||(e=Math.min(e,a),r=Math.max(r,a)),isNaN(o)||(i=Math.min(i,o),s=Math.max(s,o));return{x:e,y:i,width:r-e,height:s-i}}getLength(){return this.pathLength}getPointAtLength(t){return Ve.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,r,i){return Math.sqrt((r-t)*(r-t)+(i-e)*(i-e))}static getPathLength(t){let e=0;for(var r=0;r<t.length;++r)e+=t[r].pathLength;return e}static getPointAtLengthOfDataArray(t,e){var r,i=0,s=e.length;if(!s)return null;for(;i<s&&t>e[i].pathLength;)t-=e[i].pathLength,++i;if(i===s)return r=e[i-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=e[i].points.slice(0,2),{x:r[0],y:r[1]};var a=e[i],o=a.points;switch(a.command){case"L":return Ve.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case"C":return Ve.getPointOnCubicBezier((0,fs.t2length)(t,Ve.getPathLength(e),v=>(0,fs.getCubicArcLength)([a.start.x,o[0],o[2],o[4]],[a.start.y,o[1],o[3],o[5]],v)),a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case"Q":return Ve.getPointOnQuadraticBezier((0,fs.t2length)(t,Ve.getPathLength(e),v=>(0,fs.getQuadraticArcLength)([a.start.x,o[0],o[2]],[a.start.y,o[1],o[3]],v)),a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case"A":var h=o[0],l=o[1],c=o[2],f=o[3],d=o[4],u=o[5],p=o[6];return d+=u*t/a.pathLength,Ve.getPointOnEllipticalArc(h,l,c,f,d,p)}return null}static getPointOnLine(t,e,r,i,s,a,o){a===void 0&&(a=e),o===void 0&&(o=r);var h=(s-r)/(i-e+1e-8),l=Math.sqrt(t*t/(1+h*h));i<e&&(l*=-1);var c=h*l,f;if(i===e)f={x:a,y:o+c};else if((o-r)/(a-e+1e-8)===h)f={x:a+l,y:o+c};else{var d,u,p=this.getLineLength(e,r,i,s),v=(a-e)*(i-e)+(o-r)*(s-r);v=v/(p*p),d=e+v*(i-e),u=r+v*(s-r);var _=this.getLineLength(a,o,d,u),S=Math.sqrt(t*t-_*_);l=Math.sqrt(S*S/(1+h*h)),i<e&&(l*=-1),c=h*l,f={x:d+l,y:u+c}}return f}static getPointOnCubicBezier(t,e,r,i,s,a,o,h,l){function c(_){return _*_*_}function f(_){return 3*_*_*(1-_)}function d(_){return 3*_*(1-_)*(1-_)}function u(_){return(1-_)*(1-_)*(1-_)}var p=h*c(t)+a*f(t)+i*d(t)+e*u(t),v=l*c(t)+o*f(t)+s*d(t)+r*u(t);return{x:p,y:v}}static getPointOnQuadraticBezier(t,e,r,i,s,a,o){function h(u){return u*u}function l(u){return 2*u*(1-u)}function c(u){return(1-u)*(1-u)}var f=a*h(t)+i*l(t)+e*c(t),d=o*h(t)+s*l(t)+r*c(t);return{x:f,y:d}}static getPointOnEllipticalArc(t,e,r,i,s,a){var o=Math.cos(a),h=Math.sin(a),l={x:r*Math.cos(s),y:i*Math.sin(s)};return{x:t+(l.x*o-l.y*h),y:e+(l.x*h+l.y*o)}}static parsePathData(t){if(!t)return[];var e=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)e=e.replace(new RegExp(r[i],"g"),"|"+r[i]);var s=e.split("|"),a=[],o=[],h=0,l=0,c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,f;for(i=1;i<s.length;i++){var d=s[i],u=d.charAt(0);for(d=d.slice(1),o.length=0;f=c.exec(d);)o.push(f[0]);for(var p=[],v=0,_=o.length;v<_;v++){if(o[v]==="00"){p.push(0,0);continue}var S=parseFloat(o[v]);isNaN(S)?p.push(0):p.push(S)}for(;p.length>0&&!isNaN(p[0]);){var x="",m=[],k=h,F=l,P,N,R,L,U,B,K,tt,W,lt;switch(u){case"l":h+=p.shift(),l+=p.shift(),x="L",m.push(h,l);break;case"L":h=p.shift(),l=p.shift(),m.push(h,l);break;case"m":var wt=p.shift(),bt=p.shift();if(h+=wt,l+=bt,x="M",a.length>2&&a[a.length-1].command==="z"){for(var xt=a.length-2;xt>=0;xt--)if(a[xt].command==="M"){h=a[xt].points[0]+wt,l=a[xt].points[1]+bt;break}}m.push(h,l),u="l";break;case"M":h=p.shift(),l=p.shift(),x="M",m.push(h,l),u="L";break;case"h":h+=p.shift(),x="L",m.push(h,l);break;case"H":h=p.shift(),x="L",m.push(h,l);break;case"v":l+=p.shift(),x="L",m.push(h,l);break;case"V":l=p.shift(),x="L",m.push(h,l);break;case"C":m.push(p.shift(),p.shift(),p.shift(),p.shift()),h=p.shift(),l=p.shift(),m.push(h,l);break;case"c":m.push(h+p.shift(),l+p.shift(),h+p.shift(),l+p.shift()),h+=p.shift(),l+=p.shift(),x="C",m.push(h,l);break;case"S":N=h,R=l,P=a[a.length-1],P.command==="C"&&(N=h+(h-P.points[2]),R=l+(l-P.points[3])),m.push(N,R,p.shift(),p.shift()),h=p.shift(),l=p.shift(),x="C",m.push(h,l);break;case"s":N=h,R=l,P=a[a.length-1],P.command==="C"&&(N=h+(h-P.points[2]),R=l+(l-P.points[3])),m.push(N,R,h+p.shift(),l+p.shift()),h+=p.shift(),l+=p.shift(),x="C",m.push(h,l);break;case"Q":m.push(p.shift(),p.shift()),h=p.shift(),l=p.shift(),m.push(h,l);break;case"q":m.push(h+p.shift(),l+p.shift()),h+=p.shift(),l+=p.shift(),x="Q",m.push(h,l);break;case"T":N=h,R=l,P=a[a.length-1],P.command==="Q"&&(N=h+(h-P.points[0]),R=l+(l-P.points[1])),h=p.shift(),l=p.shift(),x="Q",m.push(N,R,h,l);break;case"t":N=h,R=l,P=a[a.length-1],P.command==="Q"&&(N=h+(h-P.points[0]),R=l+(l-P.points[1])),h+=p.shift(),l+=p.shift(),x="Q",m.push(N,R,h,l);break;case"A":L=p.shift(),U=p.shift(),B=p.shift(),K=p.shift(),tt=p.shift(),W=h,lt=l,h=p.shift(),l=p.shift(),x="A",m=this.convertEndpointToCenterParameterization(W,lt,h,l,K,tt,L,U,B);break;case"a":L=p.shift(),U=p.shift(),B=p.shift(),K=p.shift(),tt=p.shift(),W=h,lt=l,h+=p.shift(),l+=p.shift(),x="A",m=this.convertEndpointToCenterParameterization(W,lt,h,l,K,tt,L,U,B);break}a.push({command:x||u,points:m,start:{x:k,y:F},pathLength:this.calcLength(k,F,x||u,m)})}(u==="z"||u==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,e,r,i){var s,a,o,h,l=Ve;switch(r){case"L":return l.getLineLength(t,e,i[0],i[1]);case"C":return(0,fs.getCubicArcLength)([t,i[0],i[2],i[4]],[e,i[1],i[3],i[5]],1);case"Q":return(0,fs.getQuadraticArcLength)([t,i[0],i[2]],[e,i[1],i[3]],1);case"A":s=0;var c=i[4],f=i[5],d=i[4]+f,u=Math.PI/180;if(Math.abs(c-d)<u&&(u=Math.abs(c-d)),a=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),f<0)for(h=c-u;h>d;h-=u)o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),s+=l.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(h=c+u;h<d;h+=u)o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),s+=l.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],d,0),s+=l.getLineLength(a.x,a.y,o.x,o.y),s}return 0}static convertEndpointToCenterParameterization(t,e,r,i,s,a,o,h,l){var c=l*(Math.PI/180),f=Math.cos(c)*(t-r)/2+Math.sin(c)*(e-i)/2,d=-1*Math.sin(c)*(t-r)/2+Math.cos(c)*(e-i)/2,u=f*f/(o*o)+d*d/(h*h);u>1&&(o*=Math.sqrt(u),h*=Math.sqrt(u));var p=Math.sqrt((o*o*(h*h)-o*o*(d*d)-h*h*(f*f))/(o*o*(d*d)+h*h*(f*f)));s===a&&(p*=-1),isNaN(p)&&(p=0);var v=p*o*d/h,_=p*-h*f/o,S=(t+r)/2+Math.cos(c)*v-Math.sin(c)*_,x=(e+i)/2+Math.sin(c)*v+Math.cos(c)*_,m=function(U){return Math.sqrt(U[0]*U[0]+U[1]*U[1])},k=function(U,B){return(U[0]*B[0]+U[1]*B[1])/(m(U)*m(B))},F=function(U,B){return(U[0]*B[1]<U[1]*B[0]?-1:1)*Math.acos(k(U,B))},P=F([1,0],[(f-v)/o,(d-_)/h]),N=[(f-v)/o,(d-_)/h],R=[(-1*f-v)/o,(-1*d-_)/h],L=F(N,R);return k(N,R)<=-1&&(L=Math.PI),k(N,R)>=1&&(L=0),a===0&&L>0&&(L=L-2*Math.PI),a===1&&L<0&&(L=L+2*Math.PI),[S,x,o,h,P,L,c,a]}}ay=Aa.Path=Ve,Ve.prototype.className="Path",Ve.prototype._attrsAffectingSize=["data"],(0,aT._registerNode)(Ve),iT.Factory.addGetterSetter(Ve,"data");const oT=Rt({__proto__:null,get Path(){return ay},default:Aa},[Aa]),sd=Dt(oT);Object.defineProperty(Pa,"__esModule",{value:!0});var oy=Pa.Arrow=void 0;const $l=Wt,lT=sy,ly=ee,hT=te,hy=sd;class Di extends lT.Line{_sceneFunc(t){super._sceneFunc(t);var e=Math.PI*2,r=this.points(),i=r,s=this.tension()!==0&&r.length>4;s&&(i=this.getTensionPoints());var a=this.pointerLength(),o=r.length,h,l;if(s){const d=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[o-2],r[o-1]],u=hy.Path.calcLength(i[i.length-4],i[i.length-3],"C",d),p=hy.Path.getPointOnQuadraticBezier(Math.min(1,1-a/u),d[0],d[1],d[2],d[3],d[4],d[5]);h=r[o-2]-p.x,l=r[o-1]-p.y}else h=r[o-2]-r[o-4],l=r[o-1]-r[o-3];var c=(Math.atan2(l,h)+e)%e,f=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[o-2],r[o-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-a,f/2),t.lineTo(-a,-f/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),s?(h=(i[0]+i[2])/2-r[0],l=(i[1]+i[3])/2-r[1]):(h=r[2]-r[0],l=r[3]-r[1]),t.rotate((Math.atan2(-l,-h)+e)%e),t.moveTo(0,0),t.lineTo(-a,f/2),t.lineTo(-a,-f/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x-e,y:t.y-e,width:t.width+e*2,height:t.height+e*2}}}oy=Pa.Arrow=Di,Di.prototype.className="Arrow",(0,hT._registerNode)(Di),$l.Factory.addGetterSetter(Di,"pointerLength",10,(0,ly.getNumberValidator)()),$l.Factory.addGetterSetter(Di,"pointerWidth",10,(0,ly.getNumberValidator)()),$l.Factory.addGetterSetter(Di,"pointerAtBeginning",!1),$l.Factory.addGetterSetter(Di,"pointerAtEnding",!0);const cT=Rt({__proto__:null,get Arrow(){return oy},default:Pa},[Pa]),uT=Dt(cT);var Oa={};Object.defineProperty(Oa,"__esModule",{value:!0});var cy=Oa.Circle=void 0;const dT=Wt,fT=Xe,pT=ee,gT=te;class ps extends fT.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}cy=Oa.Circle=ps,ps.prototype._centroid=!0,ps.prototype.className="Circle",ps.prototype._attrsAffectingSize=["radius"],(0,gT._registerNode)(ps),dT.Factory.addGetterSetter(ps,"radius",0,(0,pT.getNumberValidator)());const mT=Rt({__proto__:null,get Circle(){return cy},default:Oa},[Oa]),yT=Dt(mT);var $a={};Object.defineProperty($a,"__esModule",{value:!0});var uy=$a.Ellipse=void 0;const ad=Wt,vT=Xe,dy=ee,_T=te;class ii extends vT.Shape{_sceneFunc(t){var e=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),e!==r&&t.scale(1,r/e),t.arc(0,0,e,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}uy=$a.Ellipse=ii,ii.prototype.className="Ellipse",ii.prototype._centroid=!0,ii.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,_T._registerNode)(ii),ad.Factory.addComponentsGetterSetter(ii,"radius",["x","y"]),ad.Factory.addGetterSetter(ii,"radiusX",0,(0,dy.getNumberValidator)()),ad.Factory.addGetterSetter(ii,"radiusY",0,(0,dy.getNumberValidator)());const wT=Rt({__proto__:null,get Ellipse(){return uy},default:$a},[$a]),xT=Dt(wT);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});var fy=Fa.Image=void 0;const od=Ae,Mi=Wt,bT=Xe,ST=te,Na=ee;let gr=class Kv extends bT.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),s=this.attrs.image;let a;if(s){const o=this.attrs.cropWidth,h=this.attrs.cropHeight;o&&h?a=[s,this.cropX(),this.cropY(),o,h,0,0,e,r]:a=[s,0,0,e,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?od.Util.drawRoundedRectPath(t,e,r,i):t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)),s&&(i&&t.clip(),t.drawImage.apply(t,a))}_hitFunc(t){var e=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?od.Util.drawRoundedRectPath(t,e,r,i):t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return(t=this.attrs.width)!==null&&t!==void 0?t:(e=this.image())===null||e===void 0?void 0:e.width}getHeight(){var t,e;return(t=this.attrs.height)!==null&&t!==void 0?t:(e=this.image())===null||e===void 0?void 0:e.height}static fromURL(t,e,r=null){var i=od.Util.createImageElement();i.onload=function(){var s=new Kv({image:i});e(s)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};fy=Fa.Image=gr,gr.prototype.className="Image",(0,ST._registerNode)(gr),Mi.Factory.addGetterSetter(gr,"cornerRadius",0,(0,Na.getNumberOrArrayOfNumbersValidator)(4)),Mi.Factory.addGetterSetter(gr,"image"),Mi.Factory.addComponentsGetterSetter(gr,"crop",["x","y","width","height"]),Mi.Factory.addGetterSetter(gr,"cropX",0,(0,Na.getNumberValidator)()),Mi.Factory.addGetterSetter(gr,"cropY",0,(0,Na.getNumberValidator)()),Mi.Factory.addGetterSetter(gr,"cropWidth",0,(0,Na.getNumberValidator)()),Mi.Factory.addGetterSetter(gr,"cropHeight",0,(0,Na.getNumberValidator)());const kT=Rt({__proto__:null,get Image(){return fy},default:Fa},[Fa]),CT=Dt(kT);var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});var py=Ii.Tag=yy=Ii.Label=void 0;const Fl=Wt,TT=Xe,PT=Zu,ld=ee,gy=te;var my=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],ET="Change.konva",AT="none",hd="up",cd="right",ud="down",dd="left",OT=my.length;class fd extends PT.Group{constructor(t){super(t),this.on("add.konva",function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var e=this,r,i=function(){e._sync()};for(r=0;r<OT;r++)t.on(my[r]+ET,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),e=this.getTag(),r,i,s,a,o,h,l;if(t&&e){switch(r=t.width(),i=t.height(),s=e.pointerDirection(),a=e.pointerWidth(),l=e.pointerHeight(),o=0,h=0,s){case hd:o=r/2,h=-1*l;break;case cd:o=r+a,h=i/2;break;case ud:o=r/2,h=i+l;break;case dd:o=-1*a,h=i/2;break}e.setAttrs({x:-1*o,y:-1*h,width:r,height:i}),t.setAttrs({x:-1*o,y:-1*h})}}}var yy=Ii.Label=fd;fd.prototype.className="Label",(0,gy._registerNode)(fd);class ji extends TT.Shape{_sceneFunc(t){var e=this.width(),r=this.height(),i=this.pointerDirection(),s=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let h=0,l=0,c=0,f=0;typeof o=="number"?h=l=c=f=Math.min(o,e/2,r/2):(h=Math.min(o[0]||0,e/2,r/2),l=Math.min(o[1]||0,e/2,r/2),f=Math.min(o[2]||0,e/2,r/2),c=Math.min(o[3]||0,e/2,r/2)),t.beginPath(),t.moveTo(h,0),i===hd&&(t.lineTo((e-s)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+s)/2,0)),t.lineTo(e-l,0),t.arc(e-l,l,l,Math.PI*3/2,0,!1),i===cd&&(t.lineTo(e,(r-a)/2),t.lineTo(e+s,r/2),t.lineTo(e,(r+a)/2)),t.lineTo(e,r-f),t.arc(e-f,r-f,f,0,Math.PI/2,!1),i===ud&&(t.lineTo((e+s)/2,r),t.lineTo(e/2,r+a),t.lineTo((e-s)/2,r)),t.lineTo(c,r),t.arc(c,r-c,c,Math.PI/2,Math.PI,!1),i===dd&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*s,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,h),t.arc(h,h,h,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,e=0,r=this.pointerWidth(),i=this.pointerHeight(),s=this.pointerDirection(),a=this.width(),o=this.height();return s===hd?(e-=i,o+=i):s===ud?o+=i:s===dd?(t-=r*1.5,a+=r):s===cd&&(a+=r*1.5),{x:t,y:e,width:a,height:o}}}py=Ii.Tag=ji,ji.prototype.className="Tag",(0,gy._registerNode)(ji),Fl.Factory.addGetterSetter(ji,"pointerDirection",AT),Fl.Factory.addGetterSetter(ji,"pointerWidth",0,(0,ld.getNumberValidator)()),Fl.Factory.addGetterSetter(ji,"pointerHeight",0,(0,ld.getNumberValidator)()),Fl.Factory.addGetterSetter(ji,"cornerRadius",0,(0,ld.getNumberOrArrayOfNumbersValidator)(4));const $T=Rt({__proto__:null,get Label(){return yy},get Tag(){return py},default:Ii},[Ii]),FT=Dt($T);var Ra={};Object.defineProperty(Ra,"__esModule",{value:!0});var vy=Ra.Rect=void 0;const NT=Wt,RT=Xe,DT=te,MT=Ae,IT=ee;class Nl extends RT.Shape{_sceneFunc(t){var e=this.cornerRadius(),r=this.width(),i=this.height();t.beginPath(),e?MT.Util.drawRoundedRectPath(t,r,i,e):t.rect(0,0,r,i),t.closePath(),t.fillStrokeShape(this)}}vy=Ra.Rect=Nl,Nl.prototype.className="Rect",(0,DT._registerNode)(Nl),NT.Factory.addGetterSetter(Nl,"cornerRadius",0,(0,IT.getNumberOrArrayOfNumbersValidator)(4));const jT=Rt({__proto__:null,get Rect(){return vy},default:Ra},[Ra]),_y=Dt(jT);var Da={};Object.defineProperty(Da,"__esModule",{value:!0});var wy=Da.RegularPolygon=void 0;const xy=Wt,LT=Xe,by=ee,UT=te;class Li extends LT.Shape{_sceneFunc(t){const e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var r=1;r<e.length;r++)t.lineTo(e[r].x,e[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,e=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:e*Math.sin(i*2*Math.PI/t),y:-1*e*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var e=t[0].x,r=t[0].y,i=t[0].x,s=t[0].y;return t.forEach(a=>{e=Math.min(e,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),s=Math.max(s,a.y)}),{x:e,y:i,width:r-e,height:s-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}wy=Da.RegularPolygon=Li,Li.prototype.className="RegularPolygon",Li.prototype._centroid=!0,Li.prototype._attrsAffectingSize=["radius"],(0,UT._registerNode)(Li),xy.Factory.addGetterSetter(Li,"radius",0,(0,by.getNumberValidator)()),xy.Factory.addGetterSetter(Li,"sides",0,(0,by.getNumberValidator)());const GT=Rt({__proto__:null,get RegularPolygon(){return wy},default:Da},[Da]),zT=Dt(GT);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});var Sy=Ma.Ring=void 0;const ky=Wt,VT=Xe,Cy=ee,BT=te;var Ty=Math.PI*2;class Ui extends VT.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,Ty,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),Ty,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sy=Ma.Ring=Ui,Ui.prototype.className="Ring",Ui.prototype._centroid=!0,Ui.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,BT._registerNode)(Ui),ky.Factory.addGetterSetter(Ui,"innerRadius",0,(0,Cy.getNumberValidator)()),ky.Factory.addGetterSetter(Ui,"outerRadius",0,(0,Cy.getNumberValidator)());const HT=Rt({__proto__:null,get Ring(){return Sy},default:Ma},[Ma]),qT=Dt(HT);var Ia={};Object.defineProperty(Ia,"__esModule",{value:!0});var Py=Ia.Sprite=void 0;const Gi=Wt,KT=Xe,YT=ed,Ey=ee,XT=te;class mr extends KT.Shape{constructor(t){super(t),this._updated=!0,this.anim=new YT.Animation(()=>{var e=this._updated;return this._updated=!1,e}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var e=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[e],a=this.frameOffsets(),o=s[i+0],h=s[i+1],l=s[i+2],c=s[i+3],f=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,l,c),t.closePath(),t.fillStrokeShape(this)),f)if(a){var d=a[e],u=r*2;t.drawImage(f,o,h,l,c,d[u+0],d[u+1],l,c)}else t.drawImage(f,o,h,l,c,0,0,l,c)}_hitFunc(t){var e=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[e],a=this.frameOffsets(),o=s[i+2],h=s[i+3];if(t.beginPath(),a){var l=a[e],c=r*2;t.rect(l[c+0],l[c+1],o,h)}else t.rect(0,0,o,h);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),e=this.animation(),r=this.animations(),i=r[e],s=i.length/4;t<s-1?this.frameIndex(t+1):this.frameIndex(0)}}Py=Ia.Sprite=mr,mr.prototype.className="Sprite",(0,XT._registerNode)(mr),Gi.Factory.addGetterSetter(mr,"animation"),Gi.Factory.addGetterSetter(mr,"animations"),Gi.Factory.addGetterSetter(mr,"frameOffsets"),Gi.Factory.addGetterSetter(mr,"image"),Gi.Factory.addGetterSetter(mr,"frameIndex",0,(0,Ey.getNumberValidator)()),Gi.Factory.addGetterSetter(mr,"frameRate",17,(0,Ey.getNumberValidator)()),Gi.Factory.backCompat(mr,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});const JT=Rt({__proto__:null,get Sprite(){return Py},default:Ia},[Ia]),QT=Dt(JT);var ja={};Object.defineProperty(ja,"__esModule",{value:!0});var Ay=ja.Star=void 0;const pd=Wt,ZT=Xe,gd=ee,WT=te;class si extends ZT.Shape{_sceneFunc(t){var e=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var s=1;s<i*2;s++){var a=s%2===0?r:e,o=a*Math.sin(s*Math.PI/i),h=-1*a*Math.cos(s*Math.PI/i);t.lineTo(o,h)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Ay=ja.Star=si,si.prototype.className="Star",si.prototype._centroid=!0,si.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,WT._registerNode)(si),pd.Factory.addGetterSetter(si,"numPoints",5,(0,gd.getNumberValidator)()),pd.Factory.addGetterSetter(si,"innerRadius",0,(0,gd.getNumberValidator)()),pd.Factory.addGetterSetter(si,"outerRadius",0,(0,gd.getNumberValidator)());const tP=Rt({__proto__:null,get Star(){return Ay},default:ja},[ja]),eP=Dt(tP);var zi={};Object.defineProperty(zi,"__esModule",{value:!0});var Oy=zi.Text=Fy=zi.stringToArray=void 0;const md=Ae,sn=Wt,nP=Xe,ai=ee,rP=te;function $y(n){return Array.from(n)}var Fy=zi.stringToArray=$y,gs="auto",iP="center",Ny="inherit",La="justify",sP="Change.konva",aP="2d",Ry="-",Dy="left",oP="text",lP="Text",hP="top",cP="bottom",My="middle",Iy="normal",uP="px ",Rl=" ",dP="right",jy="rtl",fP="word",pP="char",Ly="none",yd="…",Uy=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],gP=Uy.length;function mP(n){return n.split(",").map(t=>{t=t.trim();const e=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!r&&(t=`"${t}"`),t}).join(", ")}var vd;function _d(){return vd||(vd=md.Util.createCanvasElement().getContext(aP),vd)}function yP(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function vP(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function _P(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}class $e extends nP.Shape{constructor(t){super(_P(t)),this._partialTextX=0,this._partialTextY=0;for(var e=0;e<gP;e++)this.on(Uy[e]+sP,this._setTextData);this._setTextData()}_sceneFunc(t){var e=this.textArr,r=e.length;if(this.text()){var i=this.padding(),s=this.fontSize(),a=this.lineHeight()*s,o=this.verticalAlign(),h=this.direction(),l=0,c=this.align(),f=this.getWidth(),d=this.letterSpacing(),u=this.fill(),p=this.textDecoration(),v=p.indexOf("underline")!==-1,_=p.indexOf("line-through")!==-1,S;h=h===Ny?t.direction:h;var x=0,x=a/2,m=0,k=0;for(h===jy&&t.setAttr("direction",h),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",My),t.setAttr("textAlign",Dy),o===My?l=(this.getHeight()-r*a-i*2)/2:o===cP&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),S=0;S<r;S++){var m=0,k=0,F=e[S],P=F.text,N=F.width,R=F.lastInParagraph,L,U,B;if(t.save(),c===dP?m+=f-N-i*2:c===iP&&(m+=(f-N-i*2)/2),v){t.save(),t.beginPath(),t.moveTo(m,x+k+Math.round(s/2)),L=P.split(" ").length-1,U=L===0,B=c===La&&!R?f-i*2:N,t.lineTo(m+Math.round(B),x+k+Math.round(s/2)),t.lineWidth=s/15;const bt=this._getLinearGradient();t.strokeStyle=bt||u,t.stroke(),t.restore()}if(_){t.save(),t.beginPath(),t.moveTo(m,x+k),L=P.split(" ").length-1,U=L===0,B=c===La&&R&&!U?f-i*2:N,t.lineTo(m+Math.round(B),x+k),t.lineWidth=s/15;const bt=this._getLinearGradient();t.strokeStyle=bt||u,t.stroke(),t.restore()}if(h!==jy&&(d!==0||c===La)){L=P.split(" ").length-1;for(var K=$y(P),tt=0;tt<K.length;tt++){var W=K[tt];W===" "&&!R&&c===La&&(m+=(f-i*2-N)/L),this._partialTextX=m,this._partialTextY=x+k,this._partialText=W,t.fillStrokeShape(this),m+=this.measureSize(W).width+d}}else d!==0&&t.setAttr("letterSpacing",`${d}px`),this._partialTextX=m,this._partialTextY=x+k,this._partialText=P,t.fillStrokeShape(this);t.restore(),r>1&&(x+=a)}}}_hitFunc(t){var e=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var e=md.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(oP,e),this}getWidth(){var t=this.attrs.width===gs||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===gs||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return md.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e=_d(),r=this.fontSize(),i;return e.save(),e.font=this._getContextFont(),i=e.measureText(t),e.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+Rl+this.fontVariant()+Rl+(this.fontSize()+uP)+mP(this.fontFamily())}_addTextLine(t){this.align()===La&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){var e=this.letterSpacing(),r=t.length;return _d().measureText(t).width+(r?e*(r-1):0)}_setTextData(){var t=this.text().split(`
|
|
43
|
+
`),e=+this.fontSize(),r=0,i=this.lineHeight()*e,s=this.attrs.width,a=this.attrs.height,o=s!==gs&&s!==void 0,h=a!==gs&&a!==void 0,l=this.padding(),c=s-l*2,f=a-l*2,d=0,u=this.wrap(),p=u!==Ly,v=u!==pP&&p,_=this.ellipsis();this.textArr=[],_d().font=this._getContextFont();for(var S=_?this._getTextWidth(yd):0,x=0,m=t.length;x<m;++x){var k=t[x],F=this._getTextWidth(k);if(o&&F>c)for(;k.length>0;){for(var P=0,N=k.length,R="",L=0;P<N;){var U=P+N>>>1,B=k.slice(0,U+1),K=this._getTextWidth(B)+S;K<=c?(P=U+1,R=B,L=K):N=U}if(R){if(v){var tt,W=k[R.length],lt=W===Rl||W===Ry;lt&&L<=c?tt=R.length:tt=Math.max(R.lastIndexOf(Rl),R.lastIndexOf(Ry))+1,tt>0&&(P=tt,R=R.slice(0,P),L=this._getTextWidth(R))}R=R.trimRight(),this._addTextLine(R),r=Math.max(r,L),d+=i;var wt=this._shouldHandleEllipsis(d);if(wt){this._tryToAddEllipsisToLastLine();break}if(k=k.slice(P),k=k.trimLeft(),k.length>0&&(F=this._getTextWidth(k),F<=c)){this._addTextLine(k),d+=i,r=Math.max(r,F);break}}else break}else this._addTextLine(k),d+=i,r=Math.max(r,F),this._shouldHandleEllipsis(d)&&x<m-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),h&&d+i>f)break}this.textHeight=e,this.textWidth=r}_shouldHandleEllipsis(t){var e=+this.fontSize(),r=this.lineHeight()*e,i=this.attrs.height,s=i!==gs&&i!==void 0,a=this.padding(),o=i-a*2,h=this.wrap(),l=h!==Ly;return!l||s&&t+r>o}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,e=t!==gs&&t!==void 0,r=this.padding(),i=t-r*2,s=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!s)){if(e){var o=this._getTextWidth(a.text+yd)<i;o||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+yd)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,e=this.hasShadow();return t&&e?!0:super._useBufferCanvas()}}Oy=zi.Text=$e,$e.prototype._fillFunc=yP,$e.prototype._strokeFunc=vP,$e.prototype.className=lP,$e.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,rP._registerNode)($e),sn.Factory.overWriteSetter($e,"width",(0,ai.getNumberOrAutoValidator)()),sn.Factory.overWriteSetter($e,"height",(0,ai.getNumberOrAutoValidator)()),sn.Factory.addGetterSetter($e,"direction",Ny),sn.Factory.addGetterSetter($e,"fontFamily","Arial"),sn.Factory.addGetterSetter($e,"fontSize",12,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"fontStyle",Iy),sn.Factory.addGetterSetter($e,"fontVariant",Iy),sn.Factory.addGetterSetter($e,"padding",0,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"align",Dy),sn.Factory.addGetterSetter($e,"verticalAlign",hP),sn.Factory.addGetterSetter($e,"lineHeight",1,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"wrap",fP),sn.Factory.addGetterSetter($e,"ellipsis",!1,(0,ai.getBooleanValidator)()),sn.Factory.addGetterSetter($e,"letterSpacing",0,(0,ai.getNumberValidator)()),sn.Factory.addGetterSetter($e,"text","",(0,ai.getStringValidator)()),sn.Factory.addGetterSetter($e,"textDecoration","");const wP=Rt({__proto__:null,get Text(){return Oy},default:zi,get stringToArray(){return Fy}},[zi]),Gy=Dt(wP);var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0});var zy=Ua.TextPath=void 0;const wd=Ae,Xn=Wt,xP=Xe,Ga=sd,xd=Gy,Vy=ee,bP=te;var SP="",By="normal";function Hy(n){n.fillText(this.partialText,0,0)}function qy(n){n.strokeText(this.partialText,0,0)}class Be extends xP.Shape{constructor(t){super(t),this.dummyCanvas=wd.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return Ga.Path.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const e=this.pathLength;return t-1>e?null:Ga.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=Ga.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),r=this.fill(),i=this.fontSize(),s=this.glyphInfo;e==="underline"&&t.beginPath();for(var a=0;a<s.length;a++){t.save();var o=s[a].p0;t.translate(o.x,o.y),t.rotate(s[a].rotation),this.partialText=s[a].text,t.fillStrokeShape(this),e==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}e==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var r=e[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<e.length;i++){var s=e[i].p1;t.lineTo(s.x,s.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return wd.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return xd.Text.prototype.setText.call(this,t)}_getContextFont(){return xd.Text.prototype._getContextFont.call(this)}_getTextSize(t){var e=this.dummyCanvas,r=e.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:t,height:e}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=e,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),i=this.align(),s=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let o=0;i==="center"&&(o=Math.max(0,this.pathLength/2-a/2)),i==="right"&&(o=Math.max(0,this.pathLength-a));const h=(0,xd.stringToArray)(this.text());let l=o;for(var c=0;c<h.length;c++){const f=this._getPointAtLength(l);if(!f)return;let d=this._getTextSize(h[c]).width+r;if(h[c]===" "&&i==="justify"){const x=this.text().split(" ").length-1;d+=(this.pathLength-a)/x}const u=this._getPointAtLength(l+d);if(!u)return;const p=Ga.Path.getLineLength(f.x,f.y,u.x,u.y);let v=0;if(s)try{v=s(h[c-1],h[c])*this.fontSize()}catch{v=0}f.x+=v,u.x+=v,this.textWidth+=v;const _=Ga.Path.getPointOnLine(v+p/2,f.x,f.y,u.x,u.y),S=Math.atan2(u.y-f.y,u.x-f.x);this.glyphInfo.push({transposeX:_.x,transposeY:_.y,text:h[c],rotation:S,p0:f,p1:u}),l+=d}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(c){t.push(c.p0.x),t.push(c.p0.y),t.push(c.p1.x),t.push(c.p1.y)});for(var e=t[0]||0,r=t[0]||0,i=t[1]||0,s=t[1]||0,a,o,h=0;h<t.length/2;h++)a=t[h*2],o=t[h*2+1],e=Math.min(e,a),r=Math.max(r,a),i=Math.min(i,o),s=Math.max(s,o);var l=this.fontSize();return{x:e-l/2,y:i-l/2,width:r-e+l,height:s-i+l}}destroy(){return wd.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}zy=Ua.TextPath=Be,Be.prototype._fillFunc=Hy,Be.prototype._strokeFunc=qy,Be.prototype._fillFuncHit=Hy,Be.prototype._strokeFuncHit=qy,Be.prototype.className="TextPath",Be.prototype._attrsAffectingSize=["text","fontSize","data"],(0,bP._registerNode)(Be),Xn.Factory.addGetterSetter(Be,"data"),Xn.Factory.addGetterSetter(Be,"fontFamily","Arial"),Xn.Factory.addGetterSetter(Be,"fontSize",12,(0,Vy.getNumberValidator)()),Xn.Factory.addGetterSetter(Be,"fontStyle",By),Xn.Factory.addGetterSetter(Be,"align","left"),Xn.Factory.addGetterSetter(Be,"letterSpacing",0,(0,Vy.getNumberValidator)()),Xn.Factory.addGetterSetter(Be,"textBaseline","middle"),Xn.Factory.addGetterSetter(Be,"fontVariant",By),Xn.Factory.addGetterSetter(Be,"text",SP),Xn.Factory.addGetterSetter(Be,"textDecoration",null),Xn.Factory.addGetterSetter(Be,"kerningFunc",null);const kP=Rt({__proto__:null,get TextPath(){return zy},default:Ua},[Ua]),CP=Dt(kP);var za={};Object.defineProperty(za,"__esModule",{value:!0});var Ky=za.Transformer=void 0;const ve=Ae,ge=Wt,Yy=Ie,TP=Xe,PP=_y,Xy=Zu,Jn=te,oi=ee,EP=te;var Jy="tr-konva",AP=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${Jy}`).join(" "),Qy="nodesRect",OP=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],$P={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const FP="ontouchstart"in Jn.Konva._global;function NP(n,t,e){if(n==="rotater")return e;t+=ve.Util.degToRad($P[n]||0);var r=(ve.Util.radToDeg(t)%360+360)%360;return ve.Util._inRange(r,337.5,360)||ve.Util._inRange(r,0,22.5)?"ns-resize":ve.Util._inRange(r,22.5,67.5)?"nesw-resize":ve.Util._inRange(r,67.5,112.5)?"ew-resize":ve.Util._inRange(r,112.5,157.5)?"nwse-resize":ve.Util._inRange(r,157.5,202.5)?"ns-resize":ve.Util._inRange(r,202.5,247.5)?"nesw-resize":ve.Util._inRange(r,247.5,292.5)?"ew-resize":ve.Util._inRange(r,292.5,337.5)?"nwse-resize":(ve.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var Dl=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],Zy=1e8;function RP(n){return{x:n.x+n.width/2*Math.cos(n.rotation)+n.height/2*Math.sin(-n.rotation),y:n.y+n.height/2*Math.cos(n.rotation)+n.width/2*Math.sin(n.rotation)}}function Wy(n,t,e){const r=e.x+(n.x-e.x)*Math.cos(t)-(n.y-e.y)*Math.sin(t),i=e.y+(n.x-e.x)*Math.sin(t)+(n.y-e.y)*Math.cos(t);return{...n,rotation:n.rotation+t,x:r,y:i}}function DP(n,t){const e=RP(n);return Wy(n,t,e)}function MP(n,t,e){let r=t;for(let i=0;i<n.length;i++){const s=Jn.Konva.getAngle(n[i]),a=Math.abs(s-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<e&&(r=s)}return r}class oe extends Xy.Group{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(AP,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return ve.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return Jy+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const e=t.filter(i=>i.isAncestorOf(this)?(ve.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=e,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const s=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=i._attrsAffectingSize.map(o=>o+"Change."+this._getEventNamespace()).join(" ");i.on(a,s),i.on(OP.map(o=>o+`.${this._getEventNamespace()}`).join(" "),s),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,s),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,r=>{e=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!e)return;const i=t.getAbsolutePosition(),s=i.x-e.x,a=i.y-e.y;this.nodes().forEach(o=>{if(o===t||o.isDragging())return;const h=o.getAbsolutePosition();o.setAbsolutePosition({x:h.x+s,y:h.y+a}),o.startDrag(r)}),e=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(Qy),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(Qy,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),s=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),o=i.x*s.x-t.offsetX()*s.x,h=i.y*s.y-t.offsetY()*s.y;const l=(Jn.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),c={x:a.x+o*Math.cos(l)+h*Math.sin(-l),y:a.y+h*Math.cos(l)+o*Math.sin(l),width:i.width*s.x,height:i.height*s.y,rotation:l};return Wy(c,-Jn.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-Zy,y:-Zy,width:0,height:0,rotation:0};const e=[];this.nodes().map(l=>{const c=l.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var f=[{x:c.x,y:c.y},{x:c.x+c.width,y:c.y},{x:c.x+c.width,y:c.y+c.height},{x:c.x,y:c.y+c.height}],d=l.getAbsoluteTransform();f.forEach(function(u){var p=d.point(u);e.push(p)})});const r=new ve.Transform;r.rotate(-Jn.Konva.getAngle(this.rotation()));var i=1/0,s=1/0,a=-1/0,o=-1/0;e.forEach(function(l){var c=r.point(l);i===void 0&&(i=a=c.x,s=o=c.y),i=Math.min(i,c.x),s=Math.min(s,c.y),a=Math.max(a,c.x),o=Math.max(o,c.y)}),r.invert();const h=r.point({x:i,y:s});return{x:h.x,y:h.y,width:a-i,height:o-s,rotation:Jn.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),Dl.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var e=new PP.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:FP?10:"auto"}),r=this;e.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),e.on("dragstart",i=>{e.stopDrag(),i.cancelBubble=!0}),e.on("dragend",i=>{i.cancelBubble=!0}),e.on("mouseenter",()=>{var i=Jn.Konva.getAngle(this.rotation()),s=this.rotateAnchorCursor(),a=NP(t,i,s);e.getStage().content&&(e.getStage().content.style.cursor=a),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){var t=new TP.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e,r){var i=r.getParent(),s=i.padding();e.beginPath(),e.rect(-s,-s,r.width()+s*2,r.height()+s*2),e.moveTo(r.width()/2,-s),i.rotateEnabled()&&e.lineTo(r.width()/2,-i.rotateAnchorOffset()*ve.Util._sign(r.height())-s),e.fillStrokeShape(r)},hitFunc:(e,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();e.beginPath(),e.rect(-i,-i,r.width()+i*2,r.height()+i*2),e.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",e=>{e.cancelBubble=!0}),t.on("dragmove",e=>{e.cancelBubble=!0}),t.on("dragend",e=>{e.cancelBubble=!0}),this.on("dragmove",e=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var e=this._getNodeRect(),r=e.width,i=e.height,s=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/s),this.cos=Math.abs(r/s),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),o=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(h=>{h._fire("transformstart",{evt:t.evt,target:h})})}_handleMouseMove(t){var e,r,i,s=this.findOne("."+this._movingAnchorName),a=s.getStage();a.setPointersPositions(t);const o=a.getPointerPosition();let h={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y};const l=s.getAbsolutePosition();this.anchorDragBoundFunc()&&(h=this.anchorDragBoundFunc()(l,h,t)),s.setAbsolutePosition(h);const c=s.getAbsolutePosition();if(!(l.x===c.x&&l.y===c.y)){if(this._movingAnchorName==="rotater"){var f=this._getNodeRect();e=s.x()-f.width/2,r=-s.y()+f.height/2;let tt=Math.atan2(-r,e)+Math.PI/2;f.height<0&&(tt-=Math.PI);var d=Jn.Konva.getAngle(this.rotation());const W=d+tt,lt=Jn.Konva.getAngle(this.rotationSnapTolerance()),wt=MP(this.rotationSnaps(),W,lt)-f.rotation,bt=DP(f,wt);this._fitNodesInto(bt,t);return}var u=this.shiftBehavior(),p;u==="inverted"?p=this.keepRatio()&&!t.shiftKey:u==="none"?p=this.keepRatio():p=this.keepRatio()||t.shiftKey;var m=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(v.y-s.y(),2));var _=this.findOne(".top-left").x()>v.x?-1:1,S=this.findOne(".top-left").y()>v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,this.findOne(".top-left").x(v.x-e),this.findOne(".top-left").y(v.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(s.y());else if(this._movingAnchorName==="top-right"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(v.y-s.y(),2));var _=this.findOne(".top-right").x()<v.x?-1:1,S=this.findOne(".top-right").y()>v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,this.findOne(".top-right").x(v.x+e),this.findOne(".top-right").y(v.y-r)}var x=s.position();this.findOne(".top-left").y(x.y),this.findOne(".bottom-right").x(x.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(s.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(s.x());else if(this._movingAnchorName==="bottom-left"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(s.y()-v.y,2));var _=v.x<s.x()?-1:1,S=s.y()<v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,s.x(v.x-e),s.y(v.y+r)}x=s.position(),this.findOne(".top-left").x(x.x),this.findOne(".bottom-right").y(x.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(s.y());else if(this._movingAnchorName==="bottom-right"){if(p){var v=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(s.y()-v.y,2));var _=this.findOne(".bottom-right").x()<v.x?-1:1,S=this.findOne(".bottom-right").y()<v.y?-1:1;e=i*this.cos*_,r=i*this.sin*S,this.findOne(".bottom-right").x(v.x+e),this.findOne(".bottom-right").y(v.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var m=this.centeredScaling()||t.altKey;if(m){var k=this.findOne(".top-left"),F=this.findOne(".bottom-right"),P=k.x(),N=k.y(),R=this.getWidth()-F.x(),L=this.getHeight()-F.y();F.move({x:-P,y:-N}),k.move({x:R,y:L})}var U=this.findOne(".top-left").getAbsolutePosition();e=U.x,r=U.y;var B=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),K=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:r,width:B,height:K,rotation:Jn.Konva.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,e){var r=this._getNodeRect();const i=1;if(ve.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(ve.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const s=this.flipEnabled();var a=new ve.Transform;if(a.rotate(Jn.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const f=a.point({x:-this.padding()*2,y:0});if(t.x+=f.x,t.y+=f.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,!s){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const f=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.width+=this.padding()*2,!s){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const f=a.point({x:0,y:-this.padding()*2});if(t.x+=f.x,t.y+=f.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!s){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const f=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!s){this.update();return}}if(this.boundBoxFunc()){const f=this.boundBoxFunc()(r,t);f?t=f:ve.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,h=new ve.Transform;h.translate(r.x,r.y),h.rotate(r.rotation),h.scale(r.width/o,r.height/o);const l=new ve.Transform;l.translate(t.x,t.y),l.rotate(t.rotation),l.scale(t.width/o,t.height/o);const c=l.multiply(h.invert());this._nodes.forEach(f=>{var d;const u=f.getParent().getAbsoluteTransform(),p=f.getTransform().copy();p.translate(f.offsetX(),f.offsetY());const v=new ve.Transform;v.multiply(u.copy().invert()).multiply(c).multiply(u).multiply(p);const _=v.decompose();f.setAttrs(_),this._fire("transform",{evt:e,target:f}),f._fire("transform",{evt:e,target:f}),(d=f.getLayer())===null||d===void 0||d.batchDraw()}),this.rotation(ve.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t,e=this._getNodeRect();this.rotation(ve.Util._getRotation(e.rotation));var r=e.width,i=e.height,s=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),h=this.anchorSize();const l=this.find("._anchor");l.forEach(f=>{f.setAttrs({width:h,height:h,offsetX:h/2,offsetY:h/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:h/2+o,offsetY:h/2+o,visible:a&&s.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:h/2+o,visible:a&&s.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:h/2-o,offsetY:h/2+o,visible:a&&s.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:h/2+o,visible:a&&s.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:h/2-o,visible:a&&s.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:h/2+o,offsetY:h/2-o,visible:a&&s.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:h/2-o,visible:a&&s.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:h/2-o,offsetY:h/2-o,visible:a&&s.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*ve.Util._sign(i)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const c=this.anchorStyleFunc();c&&l.forEach(f=>{c(f)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Xy.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Yy.Node.prototype.toObject.call(this)}clone(t){var e=Yy.Node.prototype.clone.call(this,t);return e}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Ky=za.Transformer=oe;function IP(n){return n instanceof Array||ve.Util.warn("enabledAnchors value should be an array"),n instanceof Array&&n.forEach(function(t){Dl.indexOf(t)===-1&&ve.Util.warn("Unknown anchor name: "+t+". Available names are: "+Dl.join(", "))}),n||[]}oe.prototype.className="Transformer",(0,EP._registerNode)(oe),ge.Factory.addGetterSetter(oe,"enabledAnchors",Dl,IP),ge.Factory.addGetterSetter(oe,"flipEnabled",!0,(0,oi.getBooleanValidator)()),ge.Factory.addGetterSetter(oe,"resizeEnabled",!0),ge.Factory.addGetterSetter(oe,"anchorSize",10,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"rotateEnabled",!0),ge.Factory.addGetterSetter(oe,"rotationSnaps",[]),ge.Factory.addGetterSetter(oe,"rotateAnchorOffset",50,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"rotateAnchorCursor","crosshair"),ge.Factory.addGetterSetter(oe,"rotationSnapTolerance",5,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"borderEnabled",!0),ge.Factory.addGetterSetter(oe,"anchorStroke","rgb(0, 161, 255)"),ge.Factory.addGetterSetter(oe,"anchorStrokeWidth",1,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"anchorFill","white"),ge.Factory.addGetterSetter(oe,"anchorCornerRadius",0,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"borderStroke","rgb(0, 161, 255)"),ge.Factory.addGetterSetter(oe,"borderStrokeWidth",1,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"borderDash"),ge.Factory.addGetterSetter(oe,"keepRatio",!0),ge.Factory.addGetterSetter(oe,"shiftBehavior","default"),ge.Factory.addGetterSetter(oe,"centeredScaling",!1),ge.Factory.addGetterSetter(oe,"ignoreStroke",!1),ge.Factory.addGetterSetter(oe,"padding",0,(0,oi.getNumberValidator)()),ge.Factory.addGetterSetter(oe,"node"),ge.Factory.addGetterSetter(oe,"nodes"),ge.Factory.addGetterSetter(oe,"boundBoxFunc"),ge.Factory.addGetterSetter(oe,"anchorDragBoundFunc"),ge.Factory.addGetterSetter(oe,"anchorStyleFunc"),ge.Factory.addGetterSetter(oe,"shouldOverdrawWholeArea",!1),ge.Factory.addGetterSetter(oe,"useSingleNodeRotation",!0),ge.Factory.backCompat(oe,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});const jP=Rt({__proto__:null,get Transformer(){return Ky},default:za},[za]),LP=Dt(jP);var Va={};Object.defineProperty(Va,"__esModule",{value:!0});var tv=Va.Wedge=void 0;const Ml=Wt,UP=Xe,GP=te,ev=ee,zP=te;class jr extends UP.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,GP.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}tv=Va.Wedge=jr,jr.prototype.className="Wedge",jr.prototype._centroid=!0,jr.prototype._attrsAffectingSize=["radius"],(0,zP._registerNode)(jr),Ml.Factory.addGetterSetter(jr,"radius",0,(0,ev.getNumberValidator)()),Ml.Factory.addGetterSetter(jr,"angle",0,(0,ev.getNumberValidator)()),Ml.Factory.addGetterSetter(jr,"clockwise",!1),Ml.Factory.backCompat(jr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});const VP=Rt({__proto__:null,get Wedge(){return tv},default:Va},[Va]),BP=Dt(VP);var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});var nv=Ba.Blur=void 0;const rv=Wt,HP=Ie,qP=ee;function iv(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var KP=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],YP=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function XP(n,t){var e=n.data,r=n.width,i=n.height,s,a,o,h,l,c,f,d,u,p,v,_,S,x,m,k,F,P,N,R,L,U,B,K,tt=t+t+1,W=r-1,lt=i-1,wt=t+1,bt=wt*(wt+1)/2,xt=new iv,it=null,Y=xt,O=null,E=null,T=KP[t],C=YP[t];for(o=1;o<tt;o++)Y=Y.next=new iv,o===wt&&(it=Y);for(Y.next=xt,f=c=0,a=0;a<i;a++){for(k=F=P=N=d=u=p=v=0,_=wt*(R=e[c]),S=wt*(L=e[c+1]),x=wt*(U=e[c+2]),m=wt*(B=e[c+3]),d+=bt*R,u+=bt*L,p+=bt*U,v+=bt*B,Y=xt,o=0;o<wt;o++)Y.r=R,Y.g=L,Y.b=U,Y.a=B,Y=Y.next;for(o=1;o<wt;o++)h=c+((W<o?W:o)<<2),d+=(Y.r=R=e[h])*(K=wt-o),u+=(Y.g=L=e[h+1])*K,p+=(Y.b=U=e[h+2])*K,v+=(Y.a=B=e[h+3])*K,k+=R,F+=L,P+=U,N+=B,Y=Y.next;for(O=xt,E=it,s=0;s<r;s++)e[c+3]=B=v*T>>C,B!==0?(B=255/B,e[c]=(d*T>>C)*B,e[c+1]=(u*T>>C)*B,e[c+2]=(p*T>>C)*B):e[c]=e[c+1]=e[c+2]=0,d-=_,u-=S,p-=x,v-=m,_-=O.r,S-=O.g,x-=O.b,m-=O.a,h=f+((h=s+t+1)<W?h:W)<<2,k+=O.r=e[h],F+=O.g=e[h+1],P+=O.b=e[h+2],N+=O.a=e[h+3],d+=k,u+=F,p+=P,v+=N,O=O.next,_+=R=E.r,S+=L=E.g,x+=U=E.b,m+=B=E.a,k-=R,F-=L,P-=U,N-=B,E=E.next,c+=4;f+=r}for(s=0;s<r;s++){for(F=P=N=k=u=p=v=d=0,c=s<<2,_=wt*(R=e[c]),S=wt*(L=e[c+1]),x=wt*(U=e[c+2]),m=wt*(B=e[c+3]),d+=bt*R,u+=bt*L,p+=bt*U,v+=bt*B,Y=xt,o=0;o<wt;o++)Y.r=R,Y.g=L,Y.b=U,Y.a=B,Y=Y.next;for(l=r,o=1;o<=t;o++)c=l+s<<2,d+=(Y.r=R=e[c])*(K=wt-o),u+=(Y.g=L=e[c+1])*K,p+=(Y.b=U=e[c+2])*K,v+=(Y.a=B=e[c+3])*K,k+=R,F+=L,P+=U,N+=B,Y=Y.next,o<lt&&(l+=r);for(c=s,O=xt,E=it,a=0;a<i;a++)h=c<<2,e[h+3]=B=v*T>>C,B>0?(B=255/B,e[h]=(d*T>>C)*B,e[h+1]=(u*T>>C)*B,e[h+2]=(p*T>>C)*B):e[h]=e[h+1]=e[h+2]=0,d-=_,u-=S,p-=x,v-=m,_-=O.r,S-=O.g,x-=O.b,m-=O.a,h=s+((h=a+wt)<lt?h:lt)*r<<2,d+=k+=O.r=e[h],u+=F+=O.g=e[h+1],p+=P+=O.b=e[h+2],v+=N+=O.a=e[h+3],O=O.next,_+=R=E.r,S+=L=E.g,x+=U=E.b,m+=B=E.a,k-=R,F-=L,P-=U,N-=B,E=E.next,c+=r}}const JP=function(n){var t=Math.round(this.blurRadius());t>0&&XP(n,t)};nv=Ba.Blur=JP,rv.Factory.addGetterSetter(HP.Node,"blurRadius",0,(0,qP.getNumberValidator)(),rv.Factory.afterSetFilter);const QP=Rt({__proto__:null,get Blur(){return nv},default:Ba},[Ba]),ZP=Dt(QP);var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});var sv=Ha.Brighten=void 0;const av=Wt,WP=Ie,tE=ee,eE=function(n){var t=this.brightness()*255,e=n.data,r=e.length,i;for(i=0;i<r;i+=4)e[i]+=t,e[i+1]+=t,e[i+2]+=t};sv=Ha.Brighten=eE,av.Factory.addGetterSetter(WP.Node,"brightness",0,(0,tE.getNumberValidator)(),av.Factory.afterSetFilter);const nE=Rt({__proto__:null,get Brighten(){return sv},default:Ha},[Ha]),rE=Dt(nE);var qa={};Object.defineProperty(qa,"__esModule",{value:!0});var ov=qa.Contrast=void 0;const lv=Wt,iE=Ie,sE=ee,aE=function(n){var t=Math.pow((this.contrast()+100)/100,2),e=n.data,r=e.length,i=150,s=150,a=150,o;for(o=0;o<r;o+=4)i=e[o],s=e[o+1],a=e[o+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,s/=255,s-=.5,s*=t,s+=.5,s*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,s=s<0?0:s>255?255:s,a=a<0?0:a>255?255:a,e[o]=i,e[o+1]=s,e[o+2]=a};ov=qa.Contrast=aE,lv.Factory.addGetterSetter(iE.Node,"contrast",0,(0,sE.getNumberValidator)(),lv.Factory.afterSetFilter);const oE=Rt({__proto__:null,get Contrast(){return ov},default:qa},[qa]),lE=Dt(oE);var Ka={};Object.defineProperty(Ka,"__esModule",{value:!0});var hv=Ka.Emboss=void 0;const li=Wt,Il=Ie,hE=Ae,cv=ee,cE=function(n){var t=this.embossStrength()*10,e=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),s=0,a=0,o=n.data,h=n.width,l=n.height,c=h*4,f=l;switch(r){case"top-left":s=-1,a=-1;break;case"top":s=-1,a=0;break;case"top-right":s=-1,a=1;break;case"right":s=0,a=1;break;case"bottom-right":s=1,a=1;break;case"bottom":s=1,a=0;break;case"bottom-left":s=1,a=-1;break;case"left":s=0,a=-1;break;default:hE.Util.error("Unknown emboss direction: "+r)}do{var d=(f-1)*c,u=s;f+u<1&&(u=0),f+u>l&&(u=0);var p=(f-1+u)*h*4,v=h;do{var _=d+(v-1)*4,S=a;v+S<1&&(S=0),v+S>h&&(S=0);var x=p+(v-1+S)*4,m=o[_]-o[x],k=o[_+1]-o[x+1],F=o[_+2]-o[x+2],P=m,N=P>0?P:-P,R=k>0?k:-k,L=F>0?F:-F;if(R>N&&(P=k),L>N&&(P=F),P*=t,i){var U=o[_]+P,B=o[_+1]+P,K=o[_+2]+P;o[_]=U>255?255:U<0?0:U,o[_+1]=B>255?255:B<0?0:B,o[_+2]=K>255?255:K<0?0:K}else{var tt=e-P;tt<0?tt=0:tt>255&&(tt=255),o[_]=o[_+1]=o[_+2]=tt}}while(--v)}while(--f)};hv=Ka.Emboss=cE,li.Factory.addGetterSetter(Il.Node,"embossStrength",.5,(0,cv.getNumberValidator)(),li.Factory.afterSetFilter),li.Factory.addGetterSetter(Il.Node,"embossWhiteLevel",.5,(0,cv.getNumberValidator)(),li.Factory.afterSetFilter),li.Factory.addGetterSetter(Il.Node,"embossDirection","top-left",null,li.Factory.afterSetFilter),li.Factory.addGetterSetter(Il.Node,"embossBlend",!1,null,li.Factory.afterSetFilter);const uE=Rt({__proto__:null,get Emboss(){return hv},default:Ka},[Ka]),dE=Dt(uE);var Ya={};Object.defineProperty(Ya,"__esModule",{value:!0});var uv=Ya.Enhance=void 0;const dv=Wt,fE=Ie,pE=ee;function bd(n,t,e,r,i){var s=e-t,a=i-r,o;return s===0?r+a/2:a===0?r:(o=(n-t)/s,o=a*o+r,o)}const gE=function(n){var t=n.data,e=t.length,r=t[0],i=r,s,a=t[1],o=a,h,l=t[2],c=l,f,d,u=this.enhance();if(u!==0){for(d=0;d<e;d+=4)s=t[d+0],s<r?r=s:s>i&&(i=s),h=t[d+1],h<a?a=h:h>o&&(o=h),f=t[d+2],f<l?l=f:f>c&&(c=f);i===r&&(i=255,r=0),o===a&&(o=255,a=0),c===l&&(c=255,l=0);var p,v,_,S,x,m,k,F,P;for(u>0?(v=i+u*(255-i),_=r-u*(r-0),x=o+u*(255-o),m=a-u*(a-0),F=c+u*(255-c),P=l-u*(l-0)):(p=(i+r)*.5,v=i+u*(i-p),_=r+u*(r-p),S=(o+a)*.5,x=o+u*(o-S),m=a+u*(a-S),k=(c+l)*.5,F=c+u*(c-k),P=l+u*(l-k)),d=0;d<e;d+=4)t[d+0]=bd(t[d+0],r,i,_,v),t[d+1]=bd(t[d+1],a,o,m,x),t[d+2]=bd(t[d+2],l,c,P,F)}};uv=Ya.Enhance=gE,dv.Factory.addGetterSetter(fE.Node,"enhance",0,(0,pE.getNumberValidator)(),dv.Factory.afterSetFilter);const mE=Rt({__proto__:null,get Enhance(){return uv},default:Ya},[Ya]),yE=Dt(mE);var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0});var fv=Xa.Grayscale=void 0;const vE=function(n){var t=n.data,e=t.length,r,i;for(r=0;r<e;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};fv=Xa.Grayscale=vE;const _E=Rt({__proto__:null,get Grayscale(){return fv},default:Xa},[Xa]),wE=Dt(_E);var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0});var pv=Ja.HSL=void 0;const ms=Wt,Sd=Ie,kd=ee;ms.Factory.addGetterSetter(Sd.Node,"hue",0,(0,kd.getNumberValidator)(),ms.Factory.afterSetFilter),ms.Factory.addGetterSetter(Sd.Node,"saturation",0,(0,kd.getNumberValidator)(),ms.Factory.afterSetFilter),ms.Factory.addGetterSetter(Sd.Node,"luminance",0,(0,kd.getNumberValidator)(),ms.Factory.afterSetFilter);const xE=function(n){var t=n.data,e=t.length,r=1,i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,a=this.luminance()*127,o,h=r*i*Math.cos(s*Math.PI/180),l=r*i*Math.sin(s*Math.PI/180),c=.299*r+.701*h+.167*l,f=.587*r-.587*h+.33*l,d=.114*r-.114*h-.497*l,u=.299*r-.299*h-.328*l,p=.587*r+.413*h+.035*l,v=.114*r-.114*h+.293*l,_=.299*r-.3*h+1.25*l,S=.587*r-.586*h-1.05*l,x=.114*r+.886*h-.2*l,m,k,F,P;for(o=0;o<e;o+=4)m=t[o+0],k=t[o+1],F=t[o+2],P=t[o+3],t[o+0]=c*m+f*k+d*F+a,t[o+1]=u*m+p*k+v*F+a,t[o+2]=_*m+S*k+x*F+a,t[o+3]=P};pv=Ja.HSL=xE;const bE=Rt({__proto__:null,get HSL(){return pv},default:Ja},[Ja]),SE=Dt(bE);var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0});var gv=Qa.HSV=void 0;const ys=Wt,Cd=Ie,Td=ee,kE=function(n){var t=n.data,e=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,a,o=r*i*Math.cos(s*Math.PI/180),h=r*i*Math.sin(s*Math.PI/180),l=.299*r+.701*o+.167*h,c=.587*r-.587*o+.33*h,f=.114*r-.114*o-.497*h,d=.299*r-.299*o-.328*h,u=.587*r+.413*o+.035*h,p=.114*r-.114*o+.293*h,v=.299*r-.3*o+1.25*h,_=.587*r-.586*o-1.05*h,S=.114*r+.886*o-.2*h,x,m,k,F;for(a=0;a<e;a+=4)x=t[a+0],m=t[a+1],k=t[a+2],F=t[a+3],t[a+0]=l*x+c*m+f*k,t[a+1]=d*x+u*m+p*k,t[a+2]=v*x+_*m+S*k,t[a+3]=F};gv=Qa.HSV=kE,ys.Factory.addGetterSetter(Cd.Node,"hue",0,(0,Td.getNumberValidator)(),ys.Factory.afterSetFilter),ys.Factory.addGetterSetter(Cd.Node,"saturation",0,(0,Td.getNumberValidator)(),ys.Factory.afterSetFilter),ys.Factory.addGetterSetter(Cd.Node,"value",0,(0,Td.getNumberValidator)(),ys.Factory.afterSetFilter);const CE=Rt({__proto__:null,get HSV(){return gv},default:Qa},[Qa]),TE=Dt(CE);var Za={};Object.defineProperty(Za,"__esModule",{value:!0});var mv=Za.Invert=void 0;const PE=function(n){var t=n.data,e=t.length,r;for(r=0;r<e;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};mv=Za.Invert=PE;const EE=Rt({__proto__:null,get Invert(){return mv},default:Za},[Za]),AE=Dt(EE);var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0});var yv=Wa.Kaleidoscope=void 0;const jl=Wt,vv=Ie,_v=Ae,wv=ee;var OE=function(n,t,e){var r=n.data,i=t.data,s=n.width,a=n.height,o=e.polarCenterX||s/2,h=e.polarCenterY||a/2,l,c,f,d=0,u=0,p=0,v=0,_,S=Math.sqrt(o*o+h*h);c=s-o,f=a-h,_=Math.sqrt(c*c+f*f),S=_>S?_:S;var x=a,m=s,k,F,P=360/m*Math.PI/180,N,R;for(F=0;F<m;F+=1)for(N=Math.sin(F*P),R=Math.cos(F*P),k=0;k<x;k+=1)c=Math.floor(o+S*k/x*R),f=Math.floor(h+S*k/x*N),l=(f*s+c)*4,d=r[l+0],u=r[l+1],p=r[l+2],v=r[l+3],l=(F+k*s)*4,i[l+0]=d,i[l+1]=u,i[l+2]=p,i[l+3]=v},$E=function(n,t,e){var r=n.data,i=t.data,s=n.width,a=n.height,o=e.polarCenterX||s/2,h=e.polarCenterY||a/2,l,c,f,d,u,p=0,v=0,_=0,S=0,x,m=Math.sqrt(o*o+h*h);c=s-o,f=a-h,x=Math.sqrt(c*c+f*f),m=x>m?x:m;var k=a,F=s,P,N,R=0,L,U;for(c=0;c<s;c+=1)for(f=0;f<a;f+=1)d=c-o,u=f-h,P=Math.sqrt(d*d+u*u)*k/m,N=(Math.atan2(u,d)*180/Math.PI+360+R)%360,N=N*F/360,L=Math.floor(N),U=Math.floor(P),l=(U*s+L)*4,p=r[l+0],v=r[l+1],_=r[l+2],S=r[l+3],l=(f*s+c)*4,i[l+0]=p,i[l+1]=v,i[l+2]=_,i[l+3]=S};const FE=function(n){var t=n.width,e=n.height,r,i,s,a,o,h,l,c,f,d,u=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),v=Math.floor(t*(p%360)/360);if(!(u<1)){var _=_v.Util.createCanvasElement();_.width=t,_.height=e;var S=_.getContext("2d").getImageData(0,0,t,e);_v.Util.releaseCanvas(_),OE(n,S,{polarCenterX:t/2,polarCenterY:e/2});for(var x=t/Math.pow(2,u);x<=8;)x=x*2,u-=1;x=Math.ceil(x);var m=x,k=0,F=m,P=1;for(v+x>t&&(k=m,F=0,P=-1),i=0;i<e;i+=1)for(r=k;r!==F;r+=P)s=Math.round(r+v)%t,f=(t*i+s)*4,o=S.data[f+0],h=S.data[f+1],l=S.data[f+2],c=S.data[f+3],d=(t*i+r)*4,S.data[d+0]=o,S.data[d+1]=h,S.data[d+2]=l,S.data[d+3]=c;for(i=0;i<e;i+=1)for(m=Math.floor(x),a=0;a<u;a+=1){for(r=0;r<m+1;r+=1)f=(t*i+r)*4,o=S.data[f+0],h=S.data[f+1],l=S.data[f+2],c=S.data[f+3],d=(t*i+m*2-r-1)*4,S.data[d+0]=o,S.data[d+1]=h,S.data[d+2]=l,S.data[d+3]=c;m*=2}$E(S,n,{polarRotation:0})}};yv=Wa.Kaleidoscope=FE,jl.Factory.addGetterSetter(vv.Node,"kaleidoscopePower",2,(0,wv.getNumberValidator)(),jl.Factory.afterSetFilter),jl.Factory.addGetterSetter(vv.Node,"kaleidoscopeAngle",0,(0,wv.getNumberValidator)(),jl.Factory.afterSetFilter);const NE=Rt({__proto__:null,get Kaleidoscope(){return yv},default:Wa},[Wa]),RE=Dt(NE);var to={};Object.defineProperty(to,"__esModule",{value:!0});var xv=to.Mask=void 0;const bv=Wt,DE=Ie,ME=ee;function Ll(n,t,e){var r=(e*n.width+t)*4,i=[];return i.push(n.data[r++],n.data[r++],n.data[r++],n.data[r++]),i}function eo(n,t){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))}function IE(n){for(var t=[0,0,0],e=0;e<n.length;e++)t[0]+=n[e][0],t[1]+=n[e][1],t[2]+=n[e][2];return t[0]/=n.length,t[1]/=n.length,t[2]/=n.length,t}function jE(n,t){var e=Ll(n,0,0),r=Ll(n,n.width-1,0),i=Ll(n,0,n.height-1),s=Ll(n,n.width-1,n.height-1),a=t||10;if(eo(e,r)<a&&eo(r,s)<a&&eo(s,i)<a&&eo(i,e)<a){for(var o=IE([r,e,s,i]),h=[],l=0;l<n.width*n.height;l++){var c=eo(o,[n.data[l*4],n.data[l*4+1],n.data[l*4+2]]);h[l]=c<a?0:255}return h}}function LE(n,t){for(var e=0;e<n.width*n.height;e++)n.data[4*e+3]=t[e]}function UE(n,t,e){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var h=0;h<t;h++){for(var l=o*t+h,c=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=h+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];c+=n[v]*_}}a[l]=c===2040?255:0}return a}function GE(n,t,e){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var h=0;h<t;h++){for(var l=o*t+h,c=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=h+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];c+=n[v]*_}}a[l]=c>=1020?255:0}return a}function zE(n,t,e){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),a=[],o=0;o<e;o++)for(var h=0;h<t;h++){for(var l=o*t+h,c=0,f=0;f<i;f++)for(var d=0;d<i;d++){var u=o+f-s,p=h+d-s;if(u>=0&&u<e&&p>=0&&p<t){var v=u*t+p,_=r[f*i+d];c+=n[v]*_}}a[l]=c}return a}const VE=function(n){var t=this.threshold(),e=jE(n,t);return e&&(e=UE(e,n.width,n.height),e=GE(e,n.width,n.height),e=zE(e,n.width,n.height),LE(n,e)),n};xv=to.Mask=VE,bv.Factory.addGetterSetter(DE.Node,"threshold",0,(0,ME.getNumberValidator)(),bv.Factory.afterSetFilter);const BE=Rt({__proto__:null,get Mask(){return xv},default:to},[to]),HE=Dt(BE);var no={};Object.defineProperty(no,"__esModule",{value:!0});var Sv=no.Noise=void 0;const kv=Wt,qE=Ie,KE=ee,YE=function(n){var t=this.noise()*255,e=n.data,r=e.length,i=t/2,s;for(s=0;s<r;s+=4)e[s+0]+=i-2*i*Math.random(),e[s+1]+=i-2*i*Math.random(),e[s+2]+=i-2*i*Math.random()};Sv=no.Noise=YE,kv.Factory.addGetterSetter(qE.Node,"noise",.2,(0,KE.getNumberValidator)(),kv.Factory.afterSetFilter);const XE=Rt({__proto__:null,get Noise(){return Sv},default:no},[no]),JE=Dt(XE);var ro={};Object.defineProperty(ro,"__esModule",{value:!0});var Cv=ro.Pixelate=void 0;const Tv=Wt,QE=Ae,ZE=Ie,WE=ee,tA=function(n){var t=Math.ceil(this.pixelSize()),e=n.width,r=n.height,i,s,a,o,h,l,c,f=Math.ceil(e/t),d=Math.ceil(r/t),u,p,v,_,S,x,m,k=n.data;if(t<=0){QE.Util.error("pixelSize value can not be <= 0");return}for(S=0;S<f;S+=1)for(x=0;x<d;x+=1){for(o=0,h=0,l=0,c=0,u=S*t,p=u+t,v=x*t,_=v+t,m=0,i=u;i<p;i+=1)if(!(i>=e))for(s=v;s<_;s+=1)s>=r||(a=(e*s+i)*4,o+=k[a+0],h+=k[a+1],l+=k[a+2],c+=k[a+3],m+=1);for(o=o/m,h=h/m,l=l/m,c=c/m,i=u;i<p;i+=1)if(!(i>=e))for(s=v;s<_;s+=1)s>=r||(a=(e*s+i)*4,k[a+0]=o,k[a+1]=h,k[a+2]=l,k[a+3]=c)}};Cv=ro.Pixelate=tA,Tv.Factory.addGetterSetter(ZE.Node,"pixelSize",8,(0,WE.getNumberValidator)(),Tv.Factory.afterSetFilter);const eA=Rt({__proto__:null,get Pixelate(){return Cv},default:ro},[ro]),nA=Dt(eA);var io={};Object.defineProperty(io,"__esModule",{value:!0});var Pv=io.Posterize=void 0;const Ev=Wt,rA=Ie,iA=ee,sA=function(n){var t=Math.round(this.levels()*254)+1,e=n.data,r=e.length,i=255/t,s;for(s=0;s<r;s+=1)e[s]=Math.floor(e[s]/i)*i};Pv=io.Posterize=sA,Ev.Factory.addGetterSetter(rA.Node,"levels",.5,(0,iA.getNumberValidator)(),Ev.Factory.afterSetFilter);const aA=Rt({__proto__:null,get Posterize(){return Pv},default:io},[io]),oA=Dt(aA);var so={};Object.defineProperty(so,"__esModule",{value:!0});var Av=so.RGB=void 0;const Ul=Wt,Pd=Ie,lA=ee,hA=function(n){var t=n.data,e=t.length,r=this.red(),i=this.green(),s=this.blue(),a,o;for(a=0;a<e;a+=4)o=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=o*r,t[a+1]=o*i,t[a+2]=o*s,t[a+3]=t[a+3]};Av=so.RGB=hA,Ul.Factory.addGetterSetter(Pd.Node,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),Ul.Factory.addGetterSetter(Pd.Node,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),Ul.Factory.addGetterSetter(Pd.Node,"blue",0,lA.RGBComponent,Ul.Factory.afterSetFilter);const cA=Rt({__proto__:null,get RGB(){return Av},default:so},[so]),uA=Dt(cA);var ao={};Object.defineProperty(ao,"__esModule",{value:!0});var Ov=ao.RGBA=void 0;const oo=Wt,Gl=Ie,dA=ee,fA=function(n){var t=n.data,e=t.length,r=this.red(),i=this.green(),s=this.blue(),a=this.alpha(),o,h;for(o=0;o<e;o+=4)h=1-a,t[o]=r*a+t[o]*h,t[o+1]=i*a+t[o+1]*h,t[o+2]=s*a+t[o+2]*h};Ov=ao.RGBA=fA,oo.Factory.addGetterSetter(Gl.Node,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),oo.Factory.addGetterSetter(Gl.Node,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),oo.Factory.addGetterSetter(Gl.Node,"blue",0,dA.RGBComponent,oo.Factory.afterSetFilter),oo.Factory.addGetterSetter(Gl.Node,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n});const pA=Rt({__proto__:null,get RGBA(){return Ov},default:ao},[ao]),gA=Dt(pA);var lo={};Object.defineProperty(lo,"__esModule",{value:!0});var $v=lo.Sepia=void 0;const mA=function(n){var t=n.data,e=t.length,r,i,s,a;for(r=0;r<e;r+=4)i=t[r+0],s=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+s*.769+a*.189),t[r+1]=Math.min(255,i*.349+s*.686+a*.168),t[r+2]=Math.min(255,i*.272+s*.534+a*.131)};$v=lo.Sepia=mA;const yA=Rt({__proto__:null,get Sepia(){return $v},default:lo},[lo]),vA=Dt(yA);var ho={};Object.defineProperty(ho,"__esModule",{value:!0});var Fv=ho.Solarize=void 0;const _A=function(n){var t=n.data,e=n.width,r=n.height,i=e*4,s=r;do{var a=(s-1)*i,o=e;do{var h=a+(o-1)*4,l=t[h],c=t[h+1],f=t[h+2];l>127&&(l=255-l),c>127&&(c=255-c),f>127&&(f=255-f),t[h]=l,t[h+1]=c,t[h+2]=f}while(--o)}while(--s)};Fv=ho.Solarize=_A;const wA=Rt({__proto__:null,get Solarize(){return Fv},default:ho},[ho]),xA=Dt(wA);var co={};Object.defineProperty(co,"__esModule",{value:!0});var Nv=co.Threshold=void 0;const Rv=Wt,bA=Ie,SA=ee,kA=function(n){var t=this.threshold()*255,e=n.data,r=e.length,i;for(i=0;i<r;i+=1)e[i]=e[i]<t?0:255};Nv=co.Threshold=kA,Rv.Factory.addGetterSetter(bA.Node,"threshold",.5,(0,SA.getNumberValidator)(),Rv.Factory.afterSetFilter);const CA=Rt({__proto__:null,get Threshold(){return Nv},default:co},[co]),TA=Dt(CA);Object.defineProperty(ya,"__esModule",{value:!0});var Dv=ya.Konva=void 0;const Mv=K7,PA=Q7,EA=uT,AA=yT,OA=xT,$A=CT,Iv=FT,FA=sy,NA=sd,RA=_y,DA=zT,MA=qT,IA=QT,jA=eP,LA=Gy,UA=CP,GA=LP,zA=BP,VA=ZP,BA=rE,HA=lE,qA=dE,KA=yE,YA=wE,XA=SE,JA=TE,QA=AE,ZA=RE,WA=HE,tO=JE,eO=nA,nO=oA,rO=uA,iO=gA,sO=vA,aO=xA,oO=TA;Dv=ya.Konva=Mv.Konva.Util._assign(Mv.Konva,{Arc:PA.Arc,Arrow:EA.Arrow,Circle:AA.Circle,Ellipse:OA.Ellipse,Image:$A.Image,Label:Iv.Label,Tag:Iv.Tag,Line:FA.Line,Path:NA.Path,Rect:RA.Rect,RegularPolygon:DA.RegularPolygon,Ring:MA.Ring,Sprite:IA.Sprite,Star:jA.Star,Text:LA.Text,TextPath:UA.TextPath,Transformer:GA.Transformer,Wedge:zA.Wedge,Filters:{Blur:VA.Blur,Brighten:BA.Brighten,Contrast:HA.Contrast,Emboss:qA.Emboss,Enhance:KA.Enhance,Grayscale:YA.Grayscale,HSL:XA.HSL,HSV:JA.HSV,Invert:QA.Invert,Kaleidoscope:ZA.Kaleidoscope,Mask:WA.Mask,Noise:tO.Noise,Pixelate:eO.Pixelate,Posterize:nO.Posterize,RGB:rO.RGB,RGBA:iO.RGBA,Sepia:sO.Sepia,Solarize:aO.Solarize,Threshold:oO.Threshold}});const lO=Rt({__proto__:null,get Konva(){return Dv},default:ya},[ya]),hO=Dt(lO);var cO=Du.exports;Object.defineProperty(cO,"__esModule",{value:!0});const uO=hO;Du.exports=uO.Konva;var dO=Du.exports;const xe=Cn(dO),fO=xe.Ellipse.prototype.toObject;xe.Ellipse.prototype.toObject=function(){const n=fO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const pO=xe.Line.prototype.toObject;xe.Line.prototype.toObject=function(){const n=pO.call(this);return{...n,attrs:{...n.attrs,x:this.getAbsolutePosition().x,y:this.getAbsolutePosition().y,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const gO=xe.Node.prototype.toObject,mO=function(){const n=gO.call(this);return{...n,attrs:{...n.attrs,x:this.getAbsolutePosition().x,y:this.getAbsolutePosition().y,scaleX:this.getAbsoluteScale().x,scaleY:this.getAbsoluteScale().y,rotation:this.getAbsoluteRotation(),opacity:this.getAbsoluteOpacity()}}};xe.Node.prototype.toObject=mO;const yO=xe.Node.prototype.remove;xe.Node.prototype.remove=function(){return yO.call(this),this.fire("removed",{target:this}),this};const vO=xe.Node.prototype.moveUp;xe.Node.prototype.moveUp=function(){const n=vO.call(this);return n&&this.fire("move:up"),n};const _O=xe.Node.prototype.moveDown;xe.Node.prototype.moveDown=function(){const n=_O.call(this);return n&&this.fire("move:down"),n};const wO=xe.Node.prototype.moveToTop;xe.Node.prototype.moveToTop=function(){const n=wO.call(this);return n&&this.fire("move:top"),n};const xO=xe.Node.prototype.moveToBottom;xe.Node.prototype.moveToBottom=function(){const n=xO.call(this);return n&&this.fire("move:bottom"),n};const bO=xe.Node.prototype.moveTo;xe.Node.prototype.moveTo=function(n){const t=bO.call(this,n);return this.fire("move:to"),t};const SO=xe.Rect.prototype.toObject;xe.Rect.prototype.toObject=function(){const n=SO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash(),cornerRadius:this.cornerRadius()}}};const kO=xe.RegularPolygon.prototype.toObject;xe.RegularPolygon.prototype.toObject=function(){const n=kO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash()}}};const CO=xe.Text.prototype.toObject;xe.Text.prototype.toObject=function(){const n=CO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth()}}};const TO=xe.Image.prototype.toObject;xe.Image.prototype.toObject=function(){const n=TO.call(this);return{...n,attrs:{...n.attrs,strokeWidth:this.strokeWidth(),dash:this.dash(),image:this.image()}}};var PO=Object.defineProperty,EO=Object.getOwnPropertyDescriptor,hi=(n,t,e,r)=>{for(var i=EO(t,e),s=n.length-1,a;s>=0;s--)(a=n[s])&&(i=a(t,e,i)||i);return i&&PO(t,e,i),i};function ci(n,t,e){const r=e.value;return e.value=function(...i){if(this.enabled)return r.apply(this,i);console.log(`Method ${t} is disabled.`)},e}class ui{constructor(t,e){Tt(this,"app");Tt(this,"enabled");const{enabled:r}=e;this.app=t,this.enabled=r}alignLeft(t){const e=t.map(i=>i.getClientRect()),r=Math.min(...e.map(i=>i.x));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=e[s].x-r;return a.attrs={...a.attrs,x:a.attrs.x-o},a}))}alignRight(t){const e=t.map(i=>i.getClientRect()),r=Math.max(...e.map(i=>i.x+i.width));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].x+e[s].width);return a.attrs={...a.attrs,x:a.attrs.x+o},a}))}alignTop(t){const e=t.map(i=>i.getClientRect()),r=Math.min(...e.map(i=>i.y));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=e[s].y-r;return a.attrs={...a.attrs,y:a.attrs.y-o},a}))}alignBottom(t){const e=t.map(i=>i.getClientRect()),r=Math.max(...e.map(i=>i.y+i.height));this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].y+e[s].height);return a.attrs={...a.attrs,y:a.attrs.y+o},a}))}alignCenterX(t){const e=t.map(i=>i.getClientRect()),r=e.reduce((i,s)=>i+(s.x+s.width/2),0)/e.length;this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].x+e[s].width/2);return a.attrs={...a.attrs,x:a.attrs.x+o},a}))}alignCenterY(t){const e=t.map(i=>i.getClientRect()),r=e.reduce((i,s)=>i+(s.y+s.height/2),0)/e.length;this.app.update(...t.map((i,s)=>{const a=i.toObject(),o=r-(e[s].y+e[s].height/2);return a.attrs={...a.attrs,y:a.attrs.y+o},a}))}dispersionX(t){t.map(e=>e.getClientRect().x+e.getClientRect().width/2).every((e,r,i)=>e===i[0])||this.distributeNodes(t,"x")}dispersionY(t){t.map(e=>e.getClientRect().y+e.getClientRect().height/2).every((e,r,i)=>e===i[0])||this.distributeNodes(t,"y")}distributeNodes(t,e){if(t.length<=2)return;t.sort((c,f)=>c.getClientRect()[e]-f.getClientRect()[e]);const r=t[0],i=t[t.length-1],s=r.getClientRect()[e]+(e==="x"?r.getClientRect().width:r.getClientRect().height),a=i.getClientRect()[e]-s,o=t.slice(1,-1).reduce((c,f)=>c+(e==="x"?f.getClientRect().width:f.getClientRect().height),0),h=Math.max((a-o)/(t.length-1),0);let l=s;this.app.update(...t.map((c,f)=>{const d=c.toObject();if(f===0||f===t.length-1)return d;const u=l+h;return d.attrs[e]=u-c.getClientRect()[e]+d.attrs[e],l=u+(e==="x"?c.getClientRect().width:c.getClientRect().height),d}))}}hi([ci],ui.prototype,"alignLeft"),hi([ci],ui.prototype,"alignRight"),hi([ci],ui.prototype,"alignTop"),hi([ci],ui.prototype,"alignBottom"),hi([ci],ui.prototype,"alignCenterX"),hi([ci],ui.prototype,"alignCenterY"),hi([ci],ui.prototype,"dispersionX"),hi([ci],ui.prototype,"dispersionY");const AO=Ze.defineComponent({__name:"Icon",props:{icon:{default:"mdi-light:home"},color:{default:xS.colorGray3},click:{}},setup(n){const t=n;return(e,r)=>(Ze.openBlock(),Ze.createElementBlock("span",{onClick:r[0]||(r[0]=(...i)=>e.click&&e.click(...i)),class:"icon",style:Ze.normalizeStyle(["cursor: pointer","color: "+e.color])},[Ze.createVNode(Ze.unref(X2),{icon:t.icon,color:e.color},null,8,["icon","color"])],4))}}),OO=((n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e})(AO,[["__scopeId","data-v-2a3d2dec"]]);return _r.Icon=OO,Object.defineProperty(_r,Symbol.toStringTag,{value:"Module"}),_r}({},Vue);
|