@bitcaster/printkit 0.0.0-stage → 0.1.0

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.
Files changed (56) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +8 -2
  3. package/README.npm.md +9 -0
  4. package/THIRD_PARTY_NOTICES.md +1973 -0
  5. package/dist/assets/fonts/C400.ttf +0 -0
  6. package/dist/assets/fonts/M400.ttf +0 -0
  7. package/dist/assets/fonts/M600.ttf +0 -0
  8. package/dist/assets/fonts/M700.ttf +0 -0
  9. package/dist/assets/fonts/OFL-IBMPlexMono.txt +93 -0
  10. package/dist/assets/fonts/OFL-LibreCaslonText.txt +93 -0
  11. package/dist/assets/fonts/OFL-Manrope.txt +93 -0
  12. package/dist/assets/fonts/P400.ttf +0 -0
  13. package/dist/assets/fonts/P500.ttf +0 -0
  14. package/dist/assets/pdf.worker.min.mjs +29 -0
  15. package/dist/components/index.d.ts +42 -0
  16. package/dist/components/index.js +1 -0
  17. package/dist/components/p-6By_vSL9.js +1 -0
  18. package/dist/components/p-B85ddf5i.js +58 -0
  19. package/dist/components/p-BEuF_WyR.js +15 -0
  20. package/dist/components/p-C06-VTon.js +1 -0
  21. package/dist/components/p-C5up7ejY.js +22 -0
  22. package/dist/components/p-ChB3W-Ln.js +3 -0
  23. package/dist/components/p-DpEO5JlK.js +2 -0
  24. package/dist/components/p-DzTdZECU.js +21 -0
  25. package/dist/components/pk-editor.d.ts +11 -0
  26. package/dist/components/pk-editor.js +277 -0
  27. package/dist/components/pk-help.d.ts +11 -0
  28. package/dist/components/pk-help.js +1 -0
  29. package/dist/components/pk-template-editor.d.ts +11 -0
  30. package/dist/components/pk-template-editor.js +1 -0
  31. package/dist/types/.stencil/components/pk-editor/pk-editor.d.ts +113 -0
  32. package/dist/types/.stencil/components/pk-help/help.content.d.ts +1 -0
  33. package/dist/types/.stencil/components/pk-help/pk-help.d.ts +9 -0
  34. package/dist/types/.stencil/components/pk-template-editor/pk-template-editor.d.ts +203 -0
  35. package/dist/types/.stencil/services/background-load.d.ts +20 -0
  36. package/dist/types/.stencil/services/background.d.ts +70 -0
  37. package/dist/types/.stencil/services/card-engine.d.ts +123 -0
  38. package/dist/types/.stencil/services/card-render.d.ts +5 -0
  39. package/dist/types/.stencil/services/card.config.d.ts +48 -0
  40. package/dist/types/.stencil/services/cmyk-lut.d.ts +4 -0
  41. package/dist/types/.stencil/services/collide.d.ts +19 -0
  42. package/dist/types/.stencil/services/color.d.ts +12 -0
  43. package/dist/types/.stencil/services/design.d.ts +106 -0
  44. package/dist/types/.stencil/services/fonts.d.ts +32 -0
  45. package/dist/types/.stencil/services/layouts.d.ts +15 -0
  46. package/dist/types/.stencil/services/logo.d.ts +19 -0
  47. package/dist/types/.stencil/services/palette.d.ts +31 -0
  48. package/dist/types/.stencil/services/pdf.d.ts +26 -0
  49. package/dist/types/.stencil/services/qr.d.ts +21 -0
  50. package/dist/types/.stencil/services/spot.d.ts +49 -0
  51. package/dist/types/.stencil/services/terms.d.ts +1 -0
  52. package/dist/types/.stencil/types/card.types.d.ts +403 -0
  53. package/dist/types/.stencil/types/editor.types.d.ts +48 -0
  54. package/dist/types/components.d.ts +320 -0
  55. package/dist/types/stencil-public-runtime.d.ts +1879 -0
  56. package/package.json +46 -4
@@ -0,0 +1,58 @@
1
+ import{aF as t,aG as n,g as r}from"./p-DpEO5JlK.js";import{s as e,_ as i,a as u,b as o}from"./pk-editor.js";function a(t,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(r){if("default"!==r&&!(r in t)){var e=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,e.get?e:{enumerable:!0,get:function(){return n[r]}})}}))})),Object.freeze(t)}var f,c,s={},h={};function v(){if(c)return f;c=1;var n=function(t){return t&&t.Math===Math&&t};return f=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||n("object"==typeof f&&f)||function(){return this}()||Function("return this")()}var l,y,d,p,b,g,m,w,k,x,R,M,O,j,S,N,B,P,E,A,T,C,_,I,F,D,$,L,G,z,V,U,q,Y,W,H,X,Q={exports:{}};function Z(){return y?l:(y=1,l=!1)}function K(){if(p)return d;p=1;var t=v(),n=Object.defineProperty;return d=function(r,e){try{n(t,r,{value:e,configurable:!0,writable:!0})}catch(n){t[r]=e}return e}}function J(){if(b)return Q.exports;b=1;var t=Z(),n=v(),r=K(),e="__core-js_shared__",i=Q.exports=n[e]||r(e,{});return(i.versions||(i.versions=[])).push({version:"3.51.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.51.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Q.exports}function tt(){if(m)return g;m=1;var t=J(),n=Object.create||Object;return g=function(r,e){return t[r]||(t[r]=e||n(null))}}function nt(){return k?w:(k=1,w=function(t){try{return!!t()}catch(t){return!0}})}function rt(){if(R)return x;R=1;var t=nt();return x=!t((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function et(){if(O)return M;O=1;var t=rt(),n=Function.prototype,r=n.call,e=t&&n.bind.bind(r,r);return M=t?e:function(t){return function(){return r.apply(t,arguments)}},M}function it(){return S?j:(S=1,j=function(t){return null==t})}function ut(){if(B)return N;B=1;var t=it(),n=TypeError;return N=function(r){if(t(r))throw new n("Can't call method on "+r);return r}}function ot(){if(E)return P;E=1;var t=ut(),n=Object;return P=function(r){return n(t(r))}}function at(){if(T)return A;T=1;var t=et(),n=ot(),r=t({}.hasOwnProperty);return A=Object.hasOwn||function(t,e){return r(n(t),e)}}function ft(){if(_)return C;_=1;var t=et(),n=0,r=Math.random(),e=t(1.1.toString);return C=function(t){return"Symbol("+(void 0===t?"":t)+")_"+e(++n+r,36)}}function ct(){if(F)return I;F=1;var t=v().navigator,n=t&&t.userAgent;return I=n?String(n):""}function st(){if($)return D;$=1;var t,n,r=v(),e=ct(),i=r.process,u=r.Deno,o=i&&i.versions||u&&u.version,a=o&&o.v8;return a&&(n=(t=a.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!n&&e&&(!(t=e.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=e.match(/Chrome\/(\d+)/))&&(n=+t[1]),D=n}function ht(){if(G)return L;G=1;var t=st(),n=nt(),r=v().String;return L=!!Object.getOwnPropertySymbols&&!n((function(){var n=Symbol("symbol detection");return!r(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&t&&t<41}))}function vt(){if(V)return z;V=1;var t=ht();return z=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function lt(){if(q)return U;q=1;var t=v(),n=tt(),r=at(),e=ft(),i=ht(),u=vt(),o=t.Symbol,a=n("wks"),f=u?o.for||o:o&&o.withoutSetter||e;return U=function(t){return r(a,t)||(a[t]=i&&r(o,t)?o[t]:f("Symbol."+t)),a[t]}}function yt(){if(W)return Y;W=1;var t={};return t[lt()("toStringTag")]="z",Y="[object z]"===String(t)}function dt(){if(X)return H;X=1;var t="object"==typeof document&&document.all;return H=void 0===t&&void 0!==t?function(n){return"function"==typeof n||n===t}:function(t){return"function"==typeof t}}var pt,bt,gt,mt,wt,kt,xt,Rt,Mt,Ot,jt,St,Nt,Bt,Pt,Et,At,Tt,Ct,_t,It,Ft,Dt,$t,Lt,Gt,zt,Vt,Ut,qt,Yt,Wt,Ht,Xt={};function Qt(){if(bt)return pt;bt=1;var t=nt();return pt=!t((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Zt(){if(mt)return gt;mt=1;var t=dt();return gt=function(n){return"object"==typeof n?null!==n:t(n)}}function Kt(){if(kt)return wt;kt=1;var t=v(),n=Zt(),r=t.document,e=n(r)&&n(r.createElement);return wt=function(t){return e?r.createElement(t):{}}}function Jt(){if(Rt)return xt;Rt=1;var t=Qt(),n=nt(),r=Kt();return xt=!t&&!n((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))}function tn(){if(Ot)return Mt;Ot=1;var t=Qt(),n=nt();return Mt=t&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function nn(){if(St)return jt;St=1;var t=Zt(),n=String,r=TypeError;return jt=function(e){if(t(e))return e;throw new r(n(e)+" is not an object")}}function rn(){if(Bt)return Nt;Bt=1;var t=rt(),n=Function.prototype.call;return Nt=t?n.bind(n):function(){return n.apply(n,arguments)},Nt}function en(){if(Et)return Pt;Et=1;var t=v(),n=dt();return Pt=function(r,e){return arguments.length<2?n(i=t[r])?i:void 0:t[r]&&t[r][e];var i},Pt}function un(){if(Tt)return At;Tt=1;var t=et();return At=t({}.isPrototypeOf)}function on(){if(_t)return Ct;_t=1;var t=en(),n=dt(),r=un(),e=vt(),i=Object;return Ct=e?function(t){return"symbol"==typeof t}:function(e){var u=t("Symbol");return n(u)&&r(u.prototype,i(e))}}function an(){if(Ft)return It;Ft=1;var t=String;return It=function(n){try{return t(n)}catch(t){return"Object"}}}function fn(){if($t)return Dt;$t=1;var t=dt(),n=an(),r=TypeError;return Dt=function(e){if(t(e))return e;throw new r(n(e)+" is not a function")}}function cn(){if(Gt)return Lt;Gt=1;var t=fn(),n=it();return Lt=function(r,e){var i=r[e];return n(i)?void 0:t(i)}}function sn(){if(Vt)return zt;Vt=1;var t=rn(),n=dt(),r=Zt(),e=TypeError;return zt=function(i,u){var o,a;if("string"===u&&n(o=i.toString)&&!r(a=t(o,i)))return a;if(n(o=i.valueOf)&&!r(a=t(o,i)))return a;if("string"!==u&&n(o=i.toString)&&!r(a=t(o,i)))return a;throw new e("Can't convert object to primitive value")}}function hn(){if(qt)return Ut;qt=1;var t=rn(),n=Zt(),r=on(),e=cn(),i=sn(),u=lt(),o=TypeError,a=u("toPrimitive");return Ut=function(u,f){if(!n(u)||r(u))return u;var c,s=e(u,a);if(s){if(void 0===f&&(f="default"),c=t(s,u,f),!n(c)||r(c))return c;throw new o("Can't convert object to primitive value")}return void 0===f&&(f="number"),i(u,f)}}function vn(){if(Wt)return Yt;Wt=1;var t=hn(),n=on();return Yt=function(r){var e=t(r,"string");return n(e)?e:e+""}}function ln(){if(Ht)return Xt;Ht=1;var t=Qt(),n=Jt(),r=tn(),e=nn(),i=vn(),u=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,f="enumerable",c="configurable",s="writable";return Xt.f=t?r?function(t,n,r){if(e(t),n=i(n),e(r),"function"==typeof t&&"prototype"===n&&"value"in r&&s in r&&!r[s]){var u=a(t,n);u&&u[s]&&(t[n]=r.value,r={configurable:c in r?r[c]:u[c],enumerable:f in r?r[f]:u[f],writable:!1})}return o(t,n,r)}:o:function(t,r,a){if(e(t),r=i(r),e(a),n)try{return o(t,r,a)}catch(t){}if("get"in a||"set"in a)throw new u("Accessors not supported");return"value"in a&&(t[r]=a.value),t},Xt}var yn,dn,pn,bn,gn,mn,wn,kn,xn,Rn,Mn,On,jn,Sn,Nn,Bn,Pn,En,An,Tn,Cn,_n,In,Fn,Dn,$n,Ln={exports:{}};function Gn(){if(dn)return yn;dn=1;var t=Qt(),n=at(),r=Function.prototype,e=t&&Object.getOwnPropertyDescriptor,i=n(r,"name"),u=i&&"something"===function(){}.name,o=i&&(!t||t&&e(r,"name").configurable);return yn={EXISTS:i,PROPER:u,CONFIGURABLE:o}}function zn(){if(bn)return pn;bn=1;var t=et(),n=dt(),r=J(),e=t(Function.toString);return n(r.inspectSource)||(r.inspectSource=function(t){return e(t)}),pn=r.inspectSource}function Vn(){return kn?wn:(kn=1,wn=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}})}function Un(){if(Rn)return xn;Rn=1;var t=Qt(),n=ln(),r=Vn();return xn=t?function(t,e,i){return n.f(t,e,r(1,i))}:function(t,n,r){return t[n]=r,t}}function qn(){if(On)return Mn;On=1;var t=tt(),n=ft(),r=t("keys");return Mn=function(t){return r[t]||(r[t]=n(t))}}function Yn(){return Sn?jn:(Sn=1,jn={})}function Wn(){if(Bn)return Nn;Bn=1;var t,n,r,e=function(){if(mn)return gn;mn=1;var t=v(),n=dt(),r=t.WeakMap;return gn=n(r)&&/native code/.test(String(r))}(),i=v(),u=Zt(),o=Un(),a=at(),f=J(),c=qn(),s=Yn(),h="Object already initialized",l=i.TypeError;if(e||f.state){var y=f.state||(f.state=new(0,i.WeakMap));y.get=y.get,y.has=y.has,y.set=y.set,t=function(t,n){if(y.has(t))throw new l(h);return n.facade=t,y.set(t,n),n},n=function(t){return y.get(t)||{}},r=function(t){return y.has(t)}}else{var d=c("state");s[d]=!0,t=function(t,n){if(a(t,d))throw new l(h);return n.facade=t,o(t,d,n),n},n=function(t){return a(t,d)?t[d]:{}},r=function(t){return a(t,d)}}return Nn={set:t,get:n,has:r,enforce:function(e){return r(e)?n(e):t(e,{})},getterFor:function(t){return function(r){var e;if(!u(r)||(e=n(r)).type!==t)throw new l("Incompatible receiver, "+t+" required");return e}}}}function Hn(){if(Pn)return Ln.exports;Pn=1;var t=et(),n=nt(),r=dt(),e=at(),i=Qt(),u=Gn().CONFIGURABLE,o=zn(),a=Wn(),f=a.enforce,c=a.get,s=String,h=Object.defineProperty,v=t("".slice),l=t("".replace),y=t([].join),d=i&&!n((function(){return 8!==h((function(){}),"length",{value:8}).length})),p=String(String).split("String"),b=Ln.exports=function(t,n,r){"Symbol("===v(s(n),0,7)&&(n="["+l(s(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(n="get "+n),r&&r.setter&&(n="set "+n),(!e(t,"name")||u&&t.name!==n)&&(i?h(t,"name",{value:n,configurable:!0}):t.name=n),d&&r&&e(r,"arity")&&t.length!==r.arity&&h(t,"length",{value:r.arity});try{r&&e(r,"constructor")&&r.constructor?i&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var o=f(t);return e(o,"source")||(o.source=y(p,"string"==typeof n?n:"")),t};return Function.prototype.toString=b((function(){return r(this)&&c(this).source||o(this)}),"toString"),Ln.exports}function Xn(){if(An)return En;An=1;var t=dt(),n=ln(),r=Hn(),e=K();return En=function(i,u,o,a){a||(a={});var f=a.enumerable,c=void 0!==a.name?a.name:u;if(t(o)&&r(o,c,a),a.global)f?i[u]=o:e(u,o);else{try{a.unsafe?i[u]&&(f=!0):delete i[u]}catch(t){}f?i[u]=o:n.f(i,u,{value:o,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i},En}function Qn(){if(Cn)return Tn;Cn=1;var t=et(),n=t({}.toString),r=t("".slice);return Tn=function(t){return r(n(t),8,-1)}}function Zn(){if(In)return _n;In=1;var t=yt(),n=dt(),r=Qn(),e=lt()("toStringTag"),i=Object,u="Arguments"===r(function(){return arguments}());return _n=t?r:function(t){var o,a,f;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,n){try{return t[n]}catch(t){}}(o=i(t),e))?a:u?r(o):"Object"===(f=r(o))&&n(o.callee)?"Arguments":f},_n}var Kn,Jn,tr,nr,rr,er,ir={},ur={},or={},ar={};function fr(){if(tr)return Jn;tr=1;var t=et(),n=nt(),r=Qn(),e=Object,i=t("".split);return Jn=n((function(){return!e("z").propertyIsEnumerable(0)}))?function(t){return"String"===r(t)?i(t,""):e(t)}:e}function cr(){if(rr)return nr;rr=1;var t=fr(),n=ut();return nr=function(r){return t(n(r))}}function sr(){if(er)return or;er=1;var t=Qt(),n=rn(),r=function(){if(Kn)return ar;Kn=1;var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!t.call({1:2},1);return ar.f=r?function(t){var r=n(this,t);return!!r&&r.enumerable}:t,ar}(),e=Vn(),i=cr(),u=vn(),o=at(),a=Jt(),f=Object.getOwnPropertyDescriptor;return or.f=t?f:function(t,c){if(t=i(t),c=u(c),a)try{return f(t,c)}catch(t){}if(o(t,c))return e(!n(r.f,t,c),t[c])},or}var hr,vr,lr,yr,dr,pr,br,gr,mr,wr,kr,xr,Rr,Mr,Or,jr,Sr,Nr={};function Br(){if(yr)return lr;yr=1;var t=function(){if(vr)return hr;vr=1;var t=Math.ceil,n=Math.floor;return hr=Math.trunc||function(r){var e=+r;return(e>0?n:t)(e)},hr}();return lr=function(n){var r=+n;return r!=r||0===r?0:t(r)}}function Pr(){if(pr)return dr;pr=1;var t=Br(),n=Math.max,r=Math.min;return dr=function(e,i){var u=t(e);return u<0?n(u+i,0):r(u,i)}}function Er(){if(gr)return br;gr=1;var t=Br(),n=Math.min;return br=function(r){var e=t(r);return e>0?n(e,9007199254740991):0}}function Ar(){if(wr)return mr;wr=1;var t=Er();return mr=function(n){return t(n.length)}}function Tr(){if(xr)return kr;xr=1;var t=cr(),n=Pr(),r=Ar(),e=function(e){return function(i,u,o){var a=t(i),f=r(a);if(0===f)return!e&&-1;var c,s=n(o,f);if(e&&u!=u){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((e||s in a)&&a[s]===u)return e||s||0;return!e&&-1}};return kr={includes:e(!0),indexOf:e(!1)}}function Cr(){if(Mr)return Rr;Mr=1;var t=et(),n=at(),r=cr(),e=Tr().indexOf,i=Yn(),u=t([].push);return Rr=function(t,o){var a,f=r(t),c=0,s=[];for(a in f)!n(i,a)&&n(f,a)&&u(s,a);for(;o.length>c;)n(f,a=o[c++])&&(~e(s,a)||u(s,a));return s},Rr}function _r(){return jr?Or:(jr=1,Or=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Ir(){if(Sr)return Nr;Sr=1;var t=Cr(),n=_r().concat("length","prototype");return Nr.f=Object.getOwnPropertyNames||function(r){return t(r,n)},Nr}var Fr,Dr,$r,Lr,Gr,zr,Vr,Ur,qr,Yr,Wr,Hr,Xr,Qr,Zr,Kr,Jr,te,ne,re,ee,ie,ue,oe,ae,fe,ce,se,he,ve,le,ye,de,pe,be,ge,me,we,ke,xe,Re,Me,Oe,je,Se,Ne,Be,Pe,Ee,Ae,Te,Ce,_e,Ie,Fe,De,$e,Le,Ge,ze,Ve,Ue,qe,Ye,We,He,Xe,Qe,Ze,Ke,Je,ti={};function ni(){if($r)return Dr;$r=1;var t=en(),n=et(),r=Ir(),e=(Fr||(Fr=1,ti.f=Object.getOwnPropertySymbols),ti),i=nn(),u=n([].concat);return Dr=t("Reflect","ownKeys")||function(t){var n=r.f(i(t)),o=e.f;return o?u(n,o(t)):n}}function ri(){if(Gr)return Lr;Gr=1;var t=at(),n=ni(),r=sr(),e=ln();return Lr=function(i,u,o){for(var a=n(u),f=e.f,c=r.f,s=0;s<a.length;s++){var h=a[s];t(i,h)||o&&t(o,h)||f(i,h,c(u,h))}},Lr}function ei(){if(Vr)return zr;Vr=1;var t=nt(),n=dt(),r=/#|\.prototype\./,e=function(r,e){var f=u[i(r)];return f===a||f!==o&&(n(e)?t(e):!!e)},i=e.normalize=function(t){return String(t).replace(r,".").toLowerCase()},u=e.data={},o=e.NATIVE="N",a=e.POLYFILL="P";return zr=e}function ii(){if(qr)return Ur;qr=1;var t=v(),n=sr().f,r=Un(),e=Xn(),i=K(),u=ri(),o=ei();return Ur=function(a,f){var c,s,h,v,l,y=a.target,d=a.global,p=a.stat;if(c=d?t:p?t[y]||i(y,{}):t[y]&&t[y].prototype)for(s in f){if(v=f[s],h=a.dontCallGetSet?(l=n(c,s))&&l.value:c[s],!o(d?s:y+(p?".":"#")+s,a.forced)&&void 0!==h){if(typeof v==typeof h)continue;u(v,h)}(a.sham||h&&h.sham)&&r(v,"sham",!0),e(c,s,v,a)}}}function ui(){if(Wr)return Yr;Wr=1;var t=v(),n=ct(),r=Qn(),e=function(t){return n.slice(0,t.length)===t};return Yr=e("Bun/")?"BUN":e("Cloudflare-Workers")?"CLOUDFLARE":e("Deno/")?"DENO":e("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===r(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function oi(){if(Xr)return Hr;Xr=1;var t=ui();return Hr="NODE"===t}function ai(){if(Zr)return Qr;Zr=1;var t=v();return Qr=t}function fi(){if(ne)return te;ne=1;var t=Zt();return te=function(n){return t(n)||null===n}}function ci(){if(ee)return re;ee=1;var t=fi(),n=String,r=TypeError;return re=function(e){if(t(e))return e;throw new r("Can't set "+n(e)+" as a prototype")}}function si(){if(ue)return ie;ue=1;var t=function(){if(Jr)return Kr;Jr=1;var t=et(),n=fn();return Kr=function(r,e,i){try{return t(n(Object.getOwnPropertyDescriptor(r,e)[i]))}catch(t){}}}(),n=Zt(),r=ut(),e=ci();return ie=Object.setPrototypeOf||("__proto__"in{}?function(){var i,u=!1,o={};try{(i=t(Object.prototype,"__proto__","set"))(o,[]),u=o instanceof Array}catch(t){}return function(t,o){return r(t),e(o),n(t)?(u?i(t,o):t.__proto__=o,t):t}}():void 0),ie}function hi(){if(ae)return oe;ae=1;var t=ln().f,n=at(),r=lt()("toStringTag");return oe=function(e,i,u){e&&!u&&(e=e.prototype),e&&!n(e,r)&&t(e,r,{configurable:!0,value:i})}}function vi(){if(ce)return fe;ce=1;var t=Hn(),n=ln();return fe=function(r,e,i){return i.get&&t(i.get,e,{getter:!0}),i.set&&t(i.set,e,{setter:!0}),n.f(r,e,i)}}function li(){if(he)return se;he=1;var t=en(),n=vi(),r=lt(),e=Qt(),i=r("species");return se=function(r){var u=t(r);e&&u&&!u[i]&&n(u,i,{configurable:!0,get:function(){return this}})}}function yi(){if(le)return ve;le=1;var t=un(),n=TypeError;return ve=function(r,e){if(t(e,r))return r;throw new n("Incorrect invocation")}}function di(){if(de)return ye;de=1;var t=et(),n=nt(),r=dt(),e=Zn(),i=en(),u=zn(),o=function(){},a=i("Reflect","construct"),f=/^\s*(?:class|function)\b/,c=t(f.exec),s=!f.test(o),h=function(t){if(!r(t))return!1;try{return a(o,[],t),!0}catch(t){return!1}},v=function(t){if(!r(t))return!1;switch(e(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!c(f,u(t))}catch(t){return!0}};return v.sham=!0,ye=!a||n((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?v:h}function pi(){if(be)return pe;be=1;var t=di(),n=an(),r=TypeError;return pe=function(e){if(t(e))return e;throw new r(n(e)+" is not a constructor")}}function bi(){if(me)return ge;me=1;var t=nn(),n=pi(),r=it(),e=lt()("species");return ge=function(i,u){var o,a=t(i).constructor;return void 0===a||r(o=t(a)[e])?u:n(o)},ge}function gi(){if(ke)return we;ke=1;var t=rt(),n=Function.prototype,r=n.apply,e=n.call;return we="object"==typeof Reflect&&Reflect.apply||(t?e.bind(r):function(){return e.apply(r,arguments)}),we}function mi(){if(Re)return xe;Re=1;var t=Qn(),n=et();return xe=function(r){if("Function"===t(r))return n(r)}}function wi(){if(Oe)return Me;Oe=1;var t=mi(),n=fn(),r=rt(),e=t(t.bind);return Me=function(t,i){return n(t),void 0===i?t:r?e(t,i):function(){return t.apply(i,arguments)}},Me}function ki(){if(Se)return je;Se=1;var t=en();return je=t("document","documentElement")}function xi(){if(Be)return Ne;Be=1;var t=et();return Ne=t([].slice)}function Ri(){if(Ee)return Pe;Ee=1;var t=TypeError;return Pe=function(n,r){if(n<r)throw new t("Not enough arguments");return n}}function Mi(){if(Te)return Ae;Te=1;var t=ct();return Ae=/ipad|iphone|ipod/i.test(t)&&/applewebkit/i.test(t)}function Oi(){if(_e)return Ce;_e=1;var t,n,r,e,i=v(),u=gi(),o=wi(),a=dt(),f=at(),c=nt(),s=ki(),h=xi(),l=Kt(),y=Ri(),d=Mi(),p=oi(),b=i.setImmediate,g=i.clearImmediate,m=i.process,w=i.Dispatch,k=i.Function,x=i.MessageChannel,R=i.String,M=0,O={},j="onreadystatechange";c((function(){t=i.location}));var S=function(t){if(f(O,t)){var n=O[t];delete O[t],n()}},N=function(t){return function(){S(t)}},B=function(t){S(t.data)},P=function(n){i.postMessage(R(n),t.protocol+"//"+t.host)};return b&&g||(b=function(t){y(arguments.length,1);var r=a(t)?t:k(t),e=h(arguments,1);return O[++M]=function(){u(r,void 0,e)},n(M),M},g=function(t){delete O[t]},p?n=function(t){m.nextTick(N(t))}:w&&w.now?n=function(t){w.now(N(t))}:x&&!d?(e=(r=new x).port2,r.port1.onmessage=B,n=o(e.postMessage,e)):i.addEventListener&&a(i.postMessage)&&!i.importScripts&&t&&"file:"!==t.protocol&&!c(P)?(n=P,i.addEventListener("message",B,!1)):n=j in l("script")?function(t){s.appendChild(l("script"))[j]=function(){s.removeChild(this),S(t)}}:function(t){setTimeout(N(t),0)}),Ce={set:b,clear:g}}function ji(){if(Fe)return Ie;Fe=1;var t=v(),n=Qt(),r=Object.getOwnPropertyDescriptor;return Ie=function(e){if(!n)return t[e];var i=r(t,e);return i&&i.value}}function Si(){if($e)return De;$e=1;var t=function(){this.head=null,this.tail=null};return t.prototype={add:function(t){var n={item:t,next:null},r=this.tail;r?r.next=n:this.head=n,this.tail=n},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},De=t}function Ni(){return We||(We=1,Ye=function(t,n){try{1===arguments.length?console.error(t):console.error(t,n)}catch(t){}}),Ye}function Bi(){return Xe?He:(Xe=1,He=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function Pi(){if(Ze)return Qe;Ze=1;var t=v();return Qe=t.Promise}function Ei(){if(Je)return Ke;Je=1;var t=v(),n=Pi(),r=dt(),e=ei(),i=zn(),u=lt(),o=ui(),a=Z(),f=st(),c=n&&n.prototype,s=u("species"),h=!1,l=r(t.PromiseRejectionEvent),y=e("Promise",(function(){var t=i(n),r=t!==String(n);if(!r&&66===f)return!0;if(a&&(!c.catch||!c.finally))return!0;if(!f||f<51||!/native code/.test(t)){var e=new n((function(t){t(1)})),u=function(t){t((function(){}),(function(){}))};if((e.constructor={})[s]=u,!(h=e.then((function(){}))instanceof u))return!0}return!(r||"BROWSER"!==o&&"DENO"!==o||l)}));return Ke={CONSTRUCTOR:y,REJECTION_EVENT:l,SUBCLASSING:h}}var Ai,Ti,Ci={};function _i(){if(Ai)return Ci;Ai=1;var t=fn(),n=TypeError,r=function(r){var e,i;this.promise=new r((function(t,r){if(void 0!==e||void 0!==i)throw new n("Bad Promise constructor");e=t,i=r})),this.resolve=t(e),this.reject=t(i)};return Ci.f=function(t){return new r(t)},Ci}var Ii,Fi,Di,$i,Li,Gi,zi,Vi,Ui,qi,Yi,Wi,Hi,Xi,Qi,Zi,Ki,Ji={};function tu(){return Fi?Ii:(Fi=1,Ii=Object.create?Object.create(null):{})}function nu(){if($i)return Di;$i=1;var t=lt(),n=tu(),r=t("iterator"),e=Array.prototype;return Di=function(t){return void 0!==t&&(n.Array===t||e[r]===t)}}function ru(){if(Gi)return Li;Gi=1;var t=Qn(),n=it(),r=cn(),e=lt()("iterator"),i=Array.prototype;return Li=function(u){if(!n(u))return r(u,e)||r(u,"@@iterator")||("Arguments"===t(u)?i[e]:void 0)}}function eu(){if(Vi)return zi;Vi=1;var t=rn(),n=dt(),r=nn(),e=an(),i=ru(),u=TypeError;return zi=function(o,a){var f=arguments.length<2?i(o):a;if(n(f))return r(t(f,o));throw new u(e(o)+" is not iterable")},zi}function iu(){if(qi)return Ui;qi=1;var t=rn(),n=nn(),r=cn();return Ui=function(e,i,u){var o,a;n(e);try{if(!(o=r(e,"return"))){if("throw"===i)throw u;return u}o=t(o,e)}catch(t){a=!0,o=t}if("throw"===i)throw u;if(a)throw o;return n(o),u}}function uu(){if(Wi)return Yi;Wi=1;var t=wi(),n=rn(),r=nn(),e=an(),i=nu(),u=Ar(),o=un(),a=eu(),f=ru(),c=iu(),s=TypeError,h=function(t,n){this.stopped=t,this.result=n},v=h.prototype;return Yi=function(l,y,d){var p,b,g,m,w,k,x,R=!(!d||!d.AS_ENTRIES),M=!(!d||!d.IS_RECORD),O=!(!d||!d.IS_ITERATOR),j=!(!d||!d.INTERRUPTED),S=t(y,d&&d.that),N=function(t){var n=p;return p=void 0,n&&c(n,"normal"),new h(!0,t)},B=function(t){return R?(r(t),j?S(t[0],t[1],N):S(t[0],t[1])):j?S(t,N):S(t)};if(M)p=l.iterator;else if(O)p=l;else{if(!(b=f(l)))throw new s(e(l)+" is not iterable");if(i(b)){for(g=0,m=u(l);m>g;g++)if((w=B(l[g]))&&o(v,w))return w;return new h(!1)}p=a(l,b)}for(k=M?l.next:p.next;!(x=n(k,p)).done;){var P=x.value;try{w=B(P)}catch(t){if(!p)throw t;c(p,"throw",t)}if("object"==typeof w&&w&&o(v,w))return w}return new h(!1)}}function ou(){if(Xi)return Hi;Xi=1;var t=lt()("iterator"),n=!1;try{var r=0,e={next:function(){return{done:!!r++}},return:function(){n=!0}};e[t]=function(){return this},Array.from(e,(function(){throw 2}))}catch(t){}return Hi=function(r,e){try{if(!e&&!n)return!1}catch(t){return!1}var i=!1;try{var u={};u[t]=function(){return{next:function(){return{done:i=!0}}}},r(u)}catch(t){}return i}}function au(){if(Zi)return Qi;Zi=1;var t=Pi(),n=ou(),r=Ei().CONSTRUCTOR;return Qi=r||!n((function(n){t.all(n).then(void 0,(function(){}))}))}var fu,cu,su,hu,vu,lu,yu,du={},pu={},bu={},gu={};function mu(){if(vu)return hu;vu=1;var t=nn(),n=Zt(),r=_i();return hu=function(e,i){if(t(e),n(i)&&i.constructor===e)return i;var u=r.f(e);return(0,u.resolve)(i),u.promise}}function wu(){return yu||(yu=1,function(){if(Ti)return ur;Ti=1;var t,n,r,e,i=ii(),u=Z(),o=oi(),a=v(),f=ai(),c=rn(),s=Xn(),h=si(),l=hi(),y=li(),d=fn(),p=dt(),b=Zt(),g=yi(),m=bi(),w=Oi().set,k=function(){if(qe)return Ue;qe=1;var t,n,r,e,i,u=v(),o=ji(),a=wi(),f=Oi().set,c=Si(),s=Mi(),h=function(){if(Ge)return Le;Ge=1;var t=ct();return Le=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),l=function(){if(Ve)return ze;Ve=1;var t=ct();return ze=/web0s(?!.*chrome)/i.test(t)}(),y=oi(),d=u.MutationObserver||u.WebKitMutationObserver,p=u.document,b=u.process,g=u.Promise,m=o("queueMicrotask");if(!m){var w=new c,k=function(){var n,r;for(y&&(n=b.domain)&&n.exit();r=w.get();)try{r()}catch(n){throw w.head&&t(),n}n&&n.enter()};s||y||l||!d||!p?!h&&g&&g.resolve?((e=g.resolve(void 0)).constructor=g,i=a(e.then,e),t=function(){i(k)}):y?t=function(){b.nextTick(k)}:(f=a(f,u),t=function(){f(k)}):(n=!0,r=p.createTextNode(""),new d(k).observe(r,{characterData:!0}),t=function(){r.data=n=!n}),m=function(n){w.head||t(),w.add(n)}}return Ue=m}(),x=Ni(),R=Bi(),M=Si(),O=Wn(),j=Pi(),S=Ei(),N=_i(),B="Promise",P=S.CONSTRUCTOR,E=S.REJECTION_EVENT,A=S.SUBCLASSING,T=O.getterFor(B),C=O.set,_=j&&j.prototype,I=j,F=_,D=a.TypeError,$=a.document,L=a.process,G=N.f,z=G,V=!!($&&$.createEvent&&a.dispatchEvent),U="unhandledrejection",q=function(t){var n;return!(!b(t)||!p(n=t.then))&&n},Y=function(t,n){var r,e,i,u=n.value,o=1===n.state,a=o?t.ok:t.fail,f=t.resolve,s=t.reject,h=t.domain;try{a?(o||(2===n.rejection&&K(n),n.rejection=1),!0===a?r=u:(h&&h.enter(),r=a(u),h&&(h.exit(),i=!0)),r===t.promise?s(new D("Promise-chain cycle")):(e=q(r))?c(e,r,f,s):f(r)):s(u)}catch(t){h&&!i&&h.exit(),s(t)}},W=function(t,n){t.notified||(t.notified=!0,k((function(){for(var r,e=t.reactions;r=e.get();)Y(r,t);t.notified=!1,n&&!t.rejection&&X(t)})))},H=function(t,n,r){var e,i;V?((e=$.createEvent("Event")).promise=n,e.reason=r,e.initEvent(t,!1,!0),a.dispatchEvent(e)):e={promise:n,reason:r},!E&&(i=a["on"+t])?i(e):t===U&&x("Unhandled promise rejection",r)},X=function(t){c(w,a,(function(){var n,r=t.facade,e=t.value;if(Q(t)&&(n=R((function(){o?L.emit("unhandledRejection",e,r):H(U,r,e)})),t.rejection=o||Q(t)?2:1,n.error))throw n.value}))},Q=function(t){return 1!==t.rejection&&!t.parent},K=function(t){c(w,a,(function(){var n=t.facade;o?L.emit("rejectionHandled",n):H("rejectionhandled",n,t.value)}))},J=function(t,n,r){return function(e){t(n,e,r)}},tt=function(t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,W(t,!0))},nt=function(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw new D("Promise can't be resolved itself");var e=q(n);e?k((function(){var r={done:!1};try{c(e,n,J(nt,r,t),J(tt,r,t))}catch(n){tt(r,n,t)}})):(t.value=n,t.state=1,W(t,!1))}catch(n){tt({done:!1},n,t)}}};if(P&&(I=function(n){g(this,F),d(n),c(t,this);var r=T(this);try{n(J(nt,r),J(tt,r))}catch(t){tt(r,t)}},(t=function(){C(this,{type:B,done:!1,notified:!1,parent:!1,reactions:new M,rejection:!1,state:0,value:null})}).prototype=s(F=I.prototype,"then",(function(t,n){var r=T(this),e=G(m(this,I));return r.parent=!0,e.ok=!p(t)||t,e.fail=p(n)&&n,e.domain=o?L.domain:void 0,0===r.state?r.reactions.add(e):k((function(){Y(e,r)})),e.promise})),n=function(){var n=new t,r=T(n);this.promise=n,this.resolve=J(nt,r),this.reject=J(tt,r)},N.f=G=function(t){return t===I||t===r?new n(t):z(t)},!u&&p(j)&&_!==Object.prototype)){e=_.then,A||s(_,"then",(function(t,n){var r=this;return new I((function(t,n){c(e,r,t,n)})).then(t,n)}),{unsafe:!0});try{delete _.constructor}catch(t){}h&&h(_,F)}i({global:!0,constructor:!0,wrap:!0,forced:P},{Promise:I}),r=f.Promise,l(I,B,!1,!0),y(B)}(),function(){if(Ki)return Ji;Ki=1;var t=ii(),n=rn(),r=fn(),e=_i(),i=Bi(),u=uu();t({target:"Promise",stat:!0,forced:au()},{all:function(t){var o=this,a=e.f(o),f=a.resolve,c=a.reject,s=i((function(){var e=r(o.resolve),i=[],a=0,s=1;u(t,(function(t){var r=a++,u=!1;s++,n(e,o,t).then((function(t){u||(u=!0,i[r]=t,--s||f(i))}),c)})),--s||f(i)}));return s.error&&c(s.value),a.promise}})}(),function(){if(fu)return du;fu=1;var t=ii(),n=Z(),r=Ei().CONSTRUCTOR,e=Pi(),i=en(),u=dt(),o=Xn(),a=e&&e.prototype;if(t({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(t){return this.then(void 0,t)}}),!n&&u(e)){var f=i("Promise").prototype.catch;a.catch!==f&&o(a,"catch",f,{unsafe:!0})}}(),function(){if(cu)return pu;cu=1;var t=ii(),n=rn(),r=fn(),e=_i(),i=Bi(),u=uu();t({target:"Promise",stat:!0,forced:au()},{race:function(t){var o=this,a=e.f(o),f=a.reject,c=i((function(){var e=r(o.resolve);u(t,(function(t){n(e,o,t).then(a.resolve,f)}))}));return c.error&&f(c.value),a.promise}})}(),function(){if(su)return bu;su=1;var t=ii(),n=_i();t({target:"Promise",stat:!0,forced:Ei().CONSTRUCTOR},{reject:function(t){var r=n.f(this);return(0,r.reject)(t),r.promise}})}(),function(){if(lu)return gu;lu=1;var t=ii(),n=en(),r=Z(),e=Pi(),i=Ei().CONSTRUCTOR,u=mu(),o=n("Promise"),a=r&&!i;t({target:"Promise",stat:!0,forced:r||i},{resolve:function(t){return u(a&&this===o?e:this,t)}})}()),ir}var ku,xu,Ru={},Mu={exports:{}},Ou={exports:{}};function ju(){return xu||(xu=1,(t=Ou).exports=function(t,n){this.v=t,this.k=n},t.exports.__esModule=!0,t.exports.default=t.exports),Ou.exports;var t}var Su,Nu,Bu={exports:{}},Pu={exports:{}};function Eu(){return Su||(Su=1,function(t){function n(r,e,i,u){var o=Object.defineProperty;t.exports=n=function(t,r,e,i){function u(r,e){n(t,r,(function(t){return this._invoke(r,e,t)}))}r?o?o(t,r,{value:e,enumerable:!i,configurable:!i,writable:!i}):t[r]=e:(u("next",0),u("throw",1),u("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,n(r,e,i,u)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Pu)),Pu.exports}function Au(){return Nu||(Nu=1,function(t){var n=Eu();function r(){
2
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
+ var e,i,u="function"==typeof Symbol?Symbol:{},o=u.iterator||"@@iterator",a=u.toStringTag||"@@toStringTag";function f(t,r,u,o){var a=Object.create((r&&r.prototype instanceof s?r:s).prototype);return n(a,"_invoke",function(t,n,r){var u,o,a,f=0,s=r||[],h=!1,v={p:0,n:0,v:e,a:l,f:l.bind(e,4),d:function(t,n){return u=t,o=0,a=e,v.n=n,c}};function l(t,n){for(o=t,a=n,i=0;!h&&f&&!r&&i<s.length;i++){var r,u=s[i],l=v.p,y=u[2];t>3?(r=y===n)&&(a=u[(o=u[4])?5:(o=3,3)],u[4]=u[5]=e):u[0]<=l&&((r=t<2&&l<u[1])?(o=0,v.v=n,v.n=u[1]):l<y&&(r=t<3||u[0]>n||n>y)&&(u[4]=t,u[5]=n,v.n=y,o=0))}if(r||t>1)return c;throw h=!0,n}return function(r,s,y){if(f>1)throw TypeError("Generator is already running");for(h&&1===s&&l(s,y),o=s,a=y;(i=o<2?e:a)||!h;){u||(o?o<3?(o>1&&(v.n=-1),l(o,a)):v.n=a:v.v=a);try{if(f=2,u){if(o||(r="next"),i=u[r]){if(!(i=i.call(u,a)))throw TypeError("iterator result is not an object");if(!i.done)return i;a=i.value,o<2&&(o=0)}else 1===o&&(i=u.return)&&i.call(u),o<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),o=1);u=e}else if((i=(h=v.n<0)?a:t.call(n,v))!==c)break}catch(t){u=e,o=1,a=t}finally{f=1}}return{value:i,done:h}}}(t,u,o),!0),a}var c={};function s(){}function h(){}function v(){}i=Object.getPrototypeOf;var l=[][o]?i(i([][o]())):(n(i={},o,(function(){return this})),i),y=v.prototype=s.prototype=Object.create(l);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,n(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t}return h.prototype=v,n(y,"constructor",v),n(v,"constructor",h),h.displayName="GeneratorFunction",n(v,a,"GeneratorFunction"),n(y),n(y,a,"Generator"),n(y,o,(function(){return this})),n(y,"toString",(function(){return"[object Generator]"})),(t.exports=r=function(){return{w:f,m:d}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(Bu)),Bu.exports}var Tu,Cu,_u,Iu={exports:{}},Fu={exports:{}},Du={exports:{}};function $u(){return Tu||(Tu=1,function(t){var n=ju(),r=Eu();t.exports=function t(e,i){function u(t,r,o,a){try{var f=e[t](r),c=f.value;return c instanceof n?i.resolve(c.v).then((function(t){u("next",t,o,a)}),(function(t){u("throw",t,o,a)})):i.resolve(c).then((function(t){f.value=t,o(f)}),(function(t){return u("throw",t,o,a)}))}catch(t){a(t)}}var o;this.next||(r(t.prototype),r(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),r(this,"_invoke",(function(t,n,r){function e(){return new i((function(n,e){u(t,r,n,e)}))}return o=o?o.then(e,e):e()}),!0)},t.exports.__esModule=!0,t.exports.default=t.exports}(Du)),Du.exports}function Lu(){return Cu||(Cu=1,function(t){var n=Au(),r=$u();t.exports=function(t,e,i,u,o){return new r(n().w(t,e,i,u),o||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports}(Fu)),Fu.exports}function Gu(){return _u||(_u=1,function(t){var n=Lu();t.exports=function(t,r,e,i,u){var o=n(t,r,e,i,u);return o.next().then((function(t){return t.done?t.value:o.next()}))},t.exports.__esModule=!0,t.exports.default=t.exports}(Iu)),Iu.exports}var zu,Vu={exports:{}};function Uu(){return zu||(zu=1,(t=Vu).exports=function(t){var n=Object(t),r=[];for(var e in n)r.unshift(e);return function t(){for(;r.length;)if((e=r.pop())in n)return t.value=e,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports),Vu.exports;var t}var qu,Yu,Wu,Hu,Xu,Qu={exports:{}},Zu={exports:{}};function Ku(){return Yu||(Yu=1,function(t){var n=(qu||(qu=1,function(t){function n(r){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Zu)),Zu.exports).default;t.exports=function(t){if(null!=t){var r=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],e=0;if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}}}throw new TypeError(n(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports}(Qu)),Qu.exports}function Ju(t,n,r,e,i,u,o){try{var a=t[u](o),f=a.value}catch(t){return void r(t)}a.done?n(f):Promise.resolve(f).then(e,i)}var to,no,ro,eo,io,uo,oo,ao,fo,co,so,ho,vo,lo=Object.freeze({__proto__:null,default:function(t){return function(){var n=this,r=arguments;return new Promise((function(e,i){var u=t.apply(n,r);function o(t){Ju(u,e,i,o,a,"next",t)}function a(t){Ju(u,e,i,o,a,"throw",t)}o(void 0)}))}}}),yo=n(lo),po={};function bo(){if(no)return to;no=1;var t=Qn();return to=Array.isArray||function(n){return"Array"===t(n)}}function go(){if(eo)return ro;eo=1;var t=bo(),n=di(),r=Zt(),e=lt()("species"),i=Array;return ro=function(u){var o;return t(u)&&(n(o=u.constructor)&&(o===i||t(o.prototype))||r(o)&&null===(o=o[e]))&&(o=void 0),void 0===o?i:o}}function mo(){if(uo)return io;uo=1;var t=go();return io=function(n,r){return new(t(n))(0===r?0:r)}}function wo(){if(ao)return oo;ao=1;var t=Qt(),n=ln(),r=Vn();return oo=function(e,i,u){t?n.f(e,i,r(0,u)):e[i]=u}}function ko(){if(co)return fo;co=1;var t=wi(),n=fr(),r=ot(),e=Ar(),i=mo(),u=wo(),o=function(o){var a=1===o,f=2===o,c=3===o,s=4===o,h=6===o,v=7===o,l=5===o||h;return function(y,d,p){for(var b,g,m=r(y),w=n(m),k=e(w),x=t(d,p),R=0,M=0,O=a?i(y,k):f||v?i(y,0):void 0;k>R;R++)if((l||R in w)&&(g=x(b=w[R],R,m),o))if(a)u(O,R,g);else if(g)switch(o){case 3:return!0;case 5:return b;case 6:return R;case 2:u(O,M++,b)}else switch(o){case 4:return!1;case 7:u(O,M++,b)}return h?-1:c||s?s:O}};return fo={forEach:o(0),map:o(1),filter:o(2),some:o(3),every:o(4),find:o(5),findIndex:o(6),filterReject:o(7)}}function xo(){if(ho)return so;ho=1;var t=nt(),n=lt(),r=st(),e=n("species");return so=function(n){return r>=51||!t((function(){var t=[];return(t.constructor={})[e]=function(){return{foo:1}},1!==t[n](Boolean).foo}))}}var Ro,Mo,Oo,jo,So,No,Bo,Po,Eo,Ao={};function To(){if(Mo)return Ro;Mo=1;var t=Zn(),n=String;return Ro=function(r){if("Symbol"===t(r))throw new TypeError("Cannot convert a Symbol value to a string");return n(r)}}function Co(){return jo?Oo:(jo=1,Oo="\t\n\v\f\r                 \u2028\u2029\ufeff")}function _o(){if(No)return So;No=1;var t=et(),n=ut(),r=To(),e=Co(),i=t("".replace),u=RegExp("^["+e+"]+"),o=RegExp("(^|[^"+e+"])["+e+"]+$"),a=function(t){return function(e){var a=r(n(e));return 1&t&&(a=i(a,u,"")),2&t&&(a=i(a,o,"$1")),a}};return So={start:a(1),end:a(2),trim:a(3)}}var Io,Fo,Do,$o,Lo={};function Go(){if(Fo)return Io;Fo=1;var t=nn();return Io=function(){var n=t(this),r="";return n.hasIndices&&(r+="d"),n.global&&(r+="g"),n.ignoreCase&&(r+="i"),n.multiline&&(r+="m"),n.dotAll&&(r+="s"),n.unicode&&(r+="u"),n.unicodeSets&&(r+="v"),n.sticky&&(r+="y"),r}}function zo(){if($o)return Do;$o=1;var t=nt(),n=v().RegExp,r=t((function(){var t=n("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),e=r||t((function(){return!n("a","y").sticky})),i=r||t((function(){var t=n("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));return Do={BROKEN_CARET:i,MISSED_STICKY:e,UNSUPPORTED_Y:r}}var Vo,Uo,qo,Yo,Wo,Ho,Xo,Qo,Zo,Ko,Jo,ta,na={};function ra(){if(Uo)return Vo;Uo=1;var t=Cr(),n=_r();return Vo=Object.keys||function(r){return t(r,n)},Vo}function ea(){if(Wo)return Yo;Wo=1;var t,n=nn(),r=function(){if(qo)return na;qo=1;var t=Qt(),n=tn(),r=ln(),e=nn(),i=cr(),u=ra();return na.f=t&&!n?Object.defineProperties:function(t,n){e(t);for(var o,a=i(n),f=u(n),c=f.length,s=0;c>s;)r.f(t,o=f[s++],a[o]);return t},na}(),e=_r(),i=Yn(),u=ki(),o=Kt(),a=qn(),f="prototype",c="script",s=a("IE_PROTO"),h=function(){},v=function(t){return"<"+c+">"+t+"</"+c+">"},l=function(t){t.write(v("")),t.close();var n=t.parentWindow.Object;return t=null,n},y=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var n,r,i;y="undefined"!=typeof document?document.domain&&t?l(t):(r=o("iframe"),i="java"+c+":",r.style.display="none",u.appendChild(r),r.src=String(i),(n=r.contentWindow.document).open(),n.write(v("document.F=Object")),n.close(),n.F):l(t);for(var a=e.length;a--;)delete y[f][e[a]];return y()};return i[s]=!0,Yo=Object.create||function(t,e){var i;return null!==t?(h[f]=n(t),i=new h,h[f]=null,i[s]=t):i=y(),void 0===e?i:r.f(i,e)},Yo}function ia(){if(Jo)return Ko;Jo=1;var t,n,r=rn(),e=et(),i=To(),u=Go(),o=zo(),a=tt(),f=ea(),c=Wn().get,s=function(){if(Xo)return Ho;Xo=1;var t=nt(),n=v().RegExp;return Ho=t((function(){var t=n(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))}(),h=function(){if(Zo)return Qo;Zo=1;var t=nt(),n=v().RegExp;return Qo=t((function(){var t=n("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))}(),l=a("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,d=y,p=e("".charAt),b=e("".indexOf),g=e("".replace),m=e("".slice),w=(n=/b*/g,r(y,t=/a/,"a"),r(y,n,"a"),0!==t.lastIndex||0!==n.lastIndex),k=o.BROKEN_CARET,x=void 0!==/()??/.exec("")[1],R=function(t,n){for(var r=t.groups=f(null),e=0;e<n.length;e++){var i=n[e];r[i[0]]=t[i[1]]}};return(w||x||k||s||h)&&(d=function(t){var n,e,o,a=this,f=c(a),s=i(t),h=f.raw;if(h)return h.lastIndex=a.lastIndex,n=r(d,h,s),a.lastIndex=h.lastIndex,n&&f.groups&&R(n,f.groups),n;var v=f.groups,M=k&&a.sticky,O=r(u,a),j=a.source,S=0,N=s;if(M){O=g(O,"y",""),-1===b(O,"g")&&(O+="g"),N=m(s,a.lastIndex);var B=a.lastIndex>0&&p(s,a.lastIndex-1);a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==B&&"\r"!==B&&"\u2028"!==B&&"\u2029"!==B)&&(j="(?: (?:"+j+"))",N=" "+N,S++),e=new RegExp("^(?:"+j+")",O)}x&&(e=new RegExp("^"+j+"$(?!\\s)",O)),w&&(o=a.lastIndex);var P=r(y,M?e:a,N);return M?P?(P.input=s,P[0]=m(P[0],S),P.index=a.lastIndex,a.lastIndex+=P[0].length):a.lastIndex=0:w&&P&&(a.lastIndex=a.global?P.index+P[0].length:o),x&&P&&P.length>1&&r(l,P[0],e,(function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(P[t]=void 0)})),P&&v&&R(P,v),P}),Ko=d}function ua(){if(ta)return Lo;ta=1;var t=ii(),n=ia();return t({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n}),Lo}var oa,aa,fa,ca,sa,ha,va,la,ya,da,pa,ba,ga,ma={};function wa(){if(aa)return oa;aa=1,ua();var t=rn(),n=Xn(),r=ia(),e=nt(),i=lt(),u=Un(),o=i("species"),a=RegExp.prototype;return oa=function(f,c,s,h){var v=i(f),l=!e((function(){var t={};return t[v]=function(){return 7},7!==""[f](t)})),y=l&&!e((function(){var t=!1,n=/a/;if("split"===f){var r={};r[o]=function(){return n},(n={constructor:r,flags:""})[v]=/./[v]}return n.exec=function(){return t=!0,null},n[v](""),!t}));if(!l||!y||s){var d=/./[v],p=c(v,""[f],(function(n,e,i,u,o){var f=e.exec;return f===r||f===a.exec?l&&!o?{done:!0,value:t(d,e,i,u)}:{done:!0,value:t(n,i,e,u)}:{done:!1}}));n(String.prototype,f,p[0]),n(a,v,p[1])}h&&u(a[v],"sham",!0)},oa}function ka(){if(ca)return fa;ca=1;var t=et(),n=Br(),r=To(),e=ut(),i=t("".charAt),u=t("".charCodeAt),o=t("".slice),a=function(t){return function(a,f){var c,s,h=r(e(a)),v=n(f),l=h.length;return v<0||v>=l?t?"":void 0:(c=u(h,v))<55296||c>56319||v+1===l||(s=u(h,v+1))<56320||s>57343?t?i(h,v):c:t?o(h,v,v+2):s-56320+(c-55296<<10)+65536}};return fa={codeAt:a(!1),charAt:a(!0)}}function xa(){if(ha)return sa;ha=1;var t=ka().charAt;return sa=function(n,r,e){return r+(e&&t(n,r).length||1)}}function Ra(){if(da)return ya;da=1;var t=rn(),n=at(),r=un(),e=function(){if(la)return va;la=1;var t=v(),n=nt(),r=t.RegExp,e=!n((function(){var t=!0;try{r(".","d")}catch(n){t=!1}var n={},e="",i=t?"dgimsy":"gimsy",u=function(t,r){Object.defineProperty(n,t,{get:function(){return e+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in t&&(o.hasIndices="d"),o)u(a,o[a]);return Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(n)!==i||e!==i}));return va={correct:e}}(),i=Go(),u=RegExp.prototype;return ya=e.correct?function(t){return t.flags}:function(o){return e.correct||!r(u,o)||n(o,"flags")?o.flags:t(i,o)}}function Ma(){if(ba)return pa;ba=1;var t=rn(),n=nn(),r=dt(),e=Qn(),i=ia(),u=TypeError;return pa=function(o,a){var f=o.exec;if(r(f)){var c=t(f,o,a);return null!==c&&n(c),c}if("RegExp"===e(o))return t(i,o,a);throw new u("RegExp#exec called on incompatible receiver")}}var Oa,ja,Sa,Na={};function Ba(){if(ja)return Oa;ja=1;var t=et(),n=ot(),r=Math.floor,e=t("".charAt),i=t("".replace),u=t("".slice),o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return Oa=function(t,f,c,s,h,v){var l=c+t.length,y=s.length,d=a;return void 0!==h&&(h=n(h),d=o),i(v,d,(function(n,i){var o;switch(e(i,0)){case"$":return"$";case"&":return t;case"`":return u(f,0,c);case"'":return u(f,l);case"<":o=h[u(i,1,-1)];break;default:var a=+i;if(0===a)return n;if(a>y){var v=r(a/10);return 0===v?n:v<=y?void 0===s[v-1]?e(i,1):s[v-1]+e(i,1):n}o=s[a-1]}return void 0===o?"":o}))},Oa}var Pa,Ea,Aa,Ta,Ca,_a,Ia,Fa={};function Da(){if(Ta)return Aa;Ta=1;var t=function(){if(Ea)return Pa;Ea=1;var t=Zt(),n=Qn(),r=lt()("match");return Pa=function(e){var i;return t(e)&&(void 0!==(i=e[r])?!!i:"RegExp"===n(e))}}(),n=TypeError;return Aa=function(r){if(t(r))throw new n("The method doesn't accept regular expressions");return r}}function $a(){if(_a)return Ca;_a=1;var t=lt()("match");return Ca=function(n){var r=/./;try{"/./"[n](r)}catch(e){try{return r[t]=!1,"/./"[n](r)}catch(t){}}return!1}}var La,Ga,za,Va={};function Ua(){if(Ga)return La;Ga=1;var t=nt();return La=function(n,r){var e=[][n];return!!e&&t((function(){e.call(null,r||function(){return 1},1)}))}}var qa=n(e);function Ya(t){var n=function(t,n){if("object"!=i(t)||!t)return t;var r;if("undefined"!=typeof Symbol&&void 0!==(r=t[Symbol.toPrimitive])){var e=r.call(t,n);if("object"!=i(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==i(n)?n:n+""}var Wa=Object.freeze({__proto__:null,default:function(t,n,r){return(n=Ya(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}}),Ha=n(Wa),Xa=Object.freeze({__proto__:null,default:function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}}),Qa=n(Xa);function Za(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,Ya(e.key),e)}}var Ka,Ja,tf,nf,rf,ef=Object.freeze({__proto__:null,default:function(t,n,r){return n&&Za(t.prototype,n),r&&Za(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}}),uf=n(ef),of={};function af(){if(Ja)return Ka;Ja=1;var t=TypeError;return Ka=function(n){if(n>9007199254740991)throw new t("Maximum allowed index exceeded");return n}}function ff(){if(nf)return tf;nf=1;var t=Qt(),n=bo(),r=TypeError,e=Object.getOwnPropertyDescriptor,i=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return tf=i?function(t,i){if(n(t)&&!e(t,"length").writable)throw new r("Cannot set read only .length");return t.length=i}:function(t,n){return t.length=n},tf}var cf,sf,hf,vf,lf={},yf={};var df,pf,bf,gf,mf={},wf={},kf={exports:{}},xf={exports:{}},Rf=xf.exports;var Mf,Of,jf,Sf,Nf,Bf,Pf={},Ef={};function Af(){return Bf||(Bf=1,Nf=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var n={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=n[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],e=0;e<r.length;e++){var i=r[e].process,u=r[e].re.exec(t);if(u){var o=i(u);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),n=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==n.length&&(n="0"+n),1==r.length&&(r="0"+r),"#"+t+n+r},this.getHelpXML=function(){for(var t=new Array,e=0;e<r.length;e++)for(var i=r[e].example,u=0;u<i.length;u++)t[t.length]=i[u];for(var o in n)t[t.length]=o;var a=document.createElement("ul");for(a.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var f=document.createElement("li"),c=new RGBColor(t[e]),s=document.createElement("div");s.style.cssText="margin: 3px; border: 1px solid black; background:"+c.toHex()+"; color:"+c.toHex(),s.appendChild(document.createTextNode("test"));var h=document.createTextNode(" "+t[e]+" -> "+c.toRGB()+" -> "+c.toHex());f.appendChild(s),f.appendChild(h),a.appendChild(f)}catch(t){}return a}}),Nf}var Tf,Cf,_f,If={};function Ff(){if(Cf)return Tf;Cf=1;var t=ko().forEach,n=Ua()("forEach");return Tf=n?[].forEach:function(n){return t(this,n,arguments.length>1?arguments[1]:void 0)},Tf}var Df,$f,Lf,Gf,zf,Vf={};function Uf(){return $f?Df:($f=1,Df={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function qf(){if(Gf)return Lf;Gf=1;var t=Kt()("span").classList,n=t&&t.constructor&&t.constructor.prototype;return Lf=n===Object.prototype?void 0:n}function Yf(t,n){return Yf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Yf(t,n)}var Wf=Object.freeze({__proto__:null,default:function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Yf(t,n)}}),Hf=n(Wf);function Xf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Qf=Object.freeze({__proto__:null,default:Xf}),Zf=Object.freeze({__proto__:null,default:function(t,n){if(n&&("object"==i(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Xf(t)}}),Kf=n(Zf);function Jf(t){return Jf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jf(t)}var tc,nc,rc,ec,ic,uc=n(Object.freeze({__proto__:null,get default(){return Jf}})),oc={};function ac(){if(nc)return tc;nc=1;var t=nn(),n=iu();return tc=function(r,e,i,u){try{return u?e(t(i)[0],i[1]):e(i)}catch(t){n(r,"throw",t)}}}var fc,cc,sc,hc={};function vc(){if(cc)return fc;cc=1;var t=lt(),n=ea(),r=ln().f,e=t("unscopables"),i=Array.prototype;return void 0===i[e]&&r(i,e,{configurable:!0,value:n(null)}),fc=function(t){i[e][t]=!0}}var lc,yc,dc,pc,bc,gc,mc,wc,kc,xc,Rc,Mc,Oc,jc,Sc,Nc,Bc={},Pc={},Ec={},Ac={};function Tc(){if(bc)return pc;bc=1;var t=nt();return pc=!t((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}function Cc(){if(mc)return gc;mc=1;var t=at(),n=dt(),r=ot(),e=qn(),i=Tc(),u=e("IE_PROTO"),o=Object,a=o.prototype;return gc=i?o.getPrototypeOf:function(e){var i=r(e);if(t(i,u))return i[u];var f=i.constructor;return n(f)&&i instanceof f?f.prototype:i instanceof o?a:null},gc}function _c(){if(kc)return wc;kc=1;var t,n,r,e=nt(),i=dt(),u=Zt(),o=ea(),a=Cc(),f=Xn(),c=lt(),s=Z(),h=c("iterator"),v=!1;return[].keys&&("next"in(r=[].keys())?(n=a(a(r)))!==Object.prototype&&(t=n):v=!0),!u(t)||e((function(){var n={};return t[h].call(n)!==n}))?t={}:s&&(t=o(t)),i(t[h])||f(t,h,(function(){return this})),wc={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:v}}function Ic(){if(Oc)return Mc;Oc=1;var t=ii(),n=rn(),r=Z(),e=Gn(),i=dt(),u=function(){if(Rc)return xc;Rc=1;var t=_c().IteratorPrototype,n=ea(),r=Vn(),e=hi(),i=tu(),u=function(){return this};return xc=function(o,a,f,c){var s=a+" Iterator";return o.prototype=n(t,{next:r(+!c,f)}),e(o,s,!1,!0),i[s]=u,o}}(),o=Cc(),a=si(),f=hi(),c=Un(),s=Xn(),h=lt(),v=tu(),l=_c(),y=e.PROPER,d=e.CONFIGURABLE,p=l.IteratorPrototype,b=l.BUGGY_SAFARI_ITERATORS,g=h("iterator"),m="keys",w="values",k="entries",x=function(){return this};return Mc=function(e,h,l,R,M,O,j){u(l,h,R);var S,N,B,P=function(t){if(t===M&&_)return _;if(!b&&t&&t in T)return T[t];switch(t){case m:case w:case k:return function(){return new l(this,t)}}return function(){return new l(this)}},E=h+" Iterator",A=!1,T=e.prototype,C=T[g]||T["@@iterator"]||M&&T[M],_=!b&&C||P(M),I="Array"===h&&T.entries||C;if(I&&(S=o(I.call(new e)))!==Object.prototype&&S.next&&(r||o(S)===p||(a?a(S,p):i(S[g])||s(S,g,x)),f(S,E,!0,!0),r&&(v[E]=x)),y&&M===w&&C&&C.name!==w&&(!r&&d?c(T,"name",w):(A=!0,_=function(){return n(C,this)})),M)if(N={values:P(w),keys:O?_:P(m),entries:P(k)},j)for(B in N)(b||A||!(B in T))&&s(T,B,N[B]);else t({target:h,proto:!0,forced:b||A},N);return r&&!j||T[g]===_||s(T,g,_,{name:M}),v[h]=_,N}}function Fc(){return Sc?jc:(Sc=1,jc=function(t,n){return{value:t,done:n}})}var Dc,$c,Lc,Gc,zc,Vc,Uc=Object.freeze({__proto__:null,default:function(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}}),qc=n(Uc),Yc={},Wc={};function Hc(){if(Lc)return $c;Lc=1;var t=dt(),n=Zt(),r=si();return $c=function(e,i,u){var o,a;return r&&t(o=i.constructor)&&o!==u&&n(a=o.prototype)&&a!==u.prototype&&r(e,a),e}}function Xc(){if(zc)return Gc;zc=1;var t=et();return Gc=t(1.1.valueOf)}function Qc(){if(Vc)return Wc;Vc=1;var t=ii(),n=Z(),r=Qt(),e=v(),i=ai(),u=et(),o=ei(),a=at(),f=Hc(),c=un(),s=on(),h=hn(),l=nt(),y=Ir().f,d=sr().f,p=ln().f,b=Xc(),g=_o().trim,m="Number",w=e[m],k=i[m],x=w.prototype,R=e.TypeError,M=u("".slice),O=u("".charCodeAt),j=o(m,!w(" 0o1")||!w("0b1")||w("+0x1")),S=function(t){var n,r=arguments.length<1?0:w(function(t){var n=h(t,"number");return"bigint"==typeof n?n:function(t){var n,r,e,i,u,o,a,f,c=h(t,"number");if(s(c))throw new R("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=g(c),43===(n=O(c,0))||45===n){if(88===(r=O(c,2))||120===r)return NaN}else if(48===n){switch(O(c,1)){case 66:case 98:e=2,i=49;break;case 79:case 111:e=8,i=55;break;default:return+c}for(o=(u=M(c,2)).length,a=0;a<o;a++)if((f=O(u,a))<48||f>i)return NaN;return parseInt(u,e)}return+c}(n)}(t));return c(x,n=this)&&l((function(){b(n)}))?f(Object(r),this,S):r};S.prototype=x,j&&!n&&(x.constructor=S),t({global:!0,constructor:!0,wrap:!0,forced:j},{Number:S});var N=function(t,n){for(var e,i=r?y(n):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),u=0;i.length>u;u++)a(n,e=i[u])&&!a(t,e)&&p(t,e,d(n,e))};return n&&k&&N(i[m],k),(j||n)&&N(i[m],w),Wc}function Zc(){return Zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,n,r){var e=function(t,n){for(;!{}.hasOwnProperty.call(t,n)&&null!==(t=Jf(t)););return t}(t,n);if(e){var i=Object.getOwnPropertyDescriptor(e,n);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Zc.apply(null,arguments)}var Kc,Jc,ts,ns=n(Object.freeze({__proto__:null,get default(){return Zc}})),rs={};
4
+ /*! *****************************************************************************
5
+ Copyright (c) Microsoft Corporation.
6
+
7
+ Permission to use, copy, modify, and/or distribute this software for any
8
+ purpose with or without fee is hereby granted.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
+ PERFORMANCE OF THIS SOFTWARE.
17
+ ***************************************************************************** */
18
+ var es=function(t,n){return(es=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])})(t,n)};function is(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}es(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function us(t){var n="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var e=t[r];if(e.type===Os.CLOSE_PATH)n+="z";else if(e.type===Os.HORIZ_LINE_TO)n+=(e.relative?"h":"H")+e.x;else if(e.type===Os.VERT_LINE_TO)n+=(e.relative?"v":"V")+e.y;else if(e.type===Os.MOVE_TO)n+=(e.relative?"m":"M")+e.x+" "+e.y;else if(e.type===Os.LINE_TO)n+=(e.relative?"l":"L")+e.x+" "+e.y;else if(e.type===Os.CURVE_TO)n+=(e.relative?"c":"C")+e.x1+" "+e.y1+" "+e.x2+" "+e.y2+" "+e.x+" "+e.y;else if(e.type===Os.SMOOTH_CURVE_TO)n+=(e.relative?"s":"S")+e.x2+" "+e.y2+" "+e.x+" "+e.y;else if(e.type===Os.QUAD_TO)n+=(e.relative?"q":"Q")+e.x1+" "+e.y1+" "+e.x+" "+e.y;else if(e.type===Os.SMOOTH_QUAD_TO)n+=(e.relative?"t":"T")+e.x+" "+e.y;else{if(e.type!==Os.ARC)throw new Error('Unexpected command type "'+e.type+'" at index '+r+".");n+=(e.relative?"a":"A")+e.rX+" "+e.rY+" "+e.xRot+" "+ +e.lArcFlag+" "+ +e.sweepFlag+" "+e.x+" "+e.y}}return n}function os(t,n){var r=t[0],e=t[1];return[r*Math.cos(n)-e*Math.sin(n),r*Math.sin(n)+e*Math.cos(n)]}function as(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var fs=Math.PI;function cs(t,n,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var e=t.rX,i=t.rY,u=t.x,o=t.y;e=Math.abs(t.rX),i=Math.abs(t.rY);var a=os([(n-u)/2,(r-o)/2],-t.xRot/180*fs),f=a[0],c=a[1],s=Math.pow(f,2)/Math.pow(e,2)+Math.pow(c,2)/Math.pow(i,2);1<s&&(e*=Math.sqrt(s),i*=Math.sqrt(s)),t.rX=e,t.rY=i;var h=Math.pow(e,2)*Math.pow(c,2)+Math.pow(i,2)*Math.pow(f,2),v=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(e,2)*Math.pow(i,2)-h)/h)),l=e*c/i*v,y=-i*f/e*v,d=os([l,y],t.xRot/180*fs);t.cX=d[0]+(n+u)/2,t.cY=d[1]+(r+o)/2,t.phi1=Math.atan2((c-y)/i,(f-l)/e),t.phi2=Math.atan2((-c-y)/i,(-f-l)/e),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*fs),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*fs),t.phi1*=180/fs,t.phi2*=180/fs}function ss(t,n,r){as(t,n,r);var e=t*t+n*n-r*r;if(0>e)return[];if(0===e)return[[t*r/(t*t+n*n),n*r/(t*t+n*n)]];var i=Math.sqrt(e);return[[(t*r+n*i)/(t*t+n*n),(n*r-t*i)/(t*t+n*n)],[(t*r-n*i)/(t*t+n*n),(n*r+t*i)/(t*t+n*n)]]}var hs,vs=Math.PI/180;function ls(t,n,r){return(1-r)*t+r*n}function ys(t,n,r,e){return t+Math.cos(e/180*fs)*n+Math.sin(e/180*fs)*r}function ds(t,n,r,e){var i=1e-6,u=n-t,o=r-n,a=3*u+3*(e-r)-6*o,f=6*(o-u),c=3*u;return Math.abs(a)<i?[-c/f]:function(t,n,r){var e=t*t/4-n;if(e<-r)return[];if(e<=r)return[-t/2];var i=Math.sqrt(e);return[-t/2-i,-t/2+i]}(f/a,c/a,i)}function ps(t,n,r,e,i){var u=1-i;return t*(u*u*u)+n*(3*u*u*i)+r*(3*u*i*i)+e*(i*i*i)}!function(t){function n(){return i((function(t,n,r){return t.relative&&(void 0!==t.x1&&(t.x1+=n),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=n),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=n),void 0!==t.y&&(t.y+=r),t.relative=!1),t}))}function r(){var t=NaN,n=NaN,r=NaN,e=NaN;return i((function(i,u,o){return i.type&Os.SMOOTH_CURVE_TO&&(i.type=Os.CURVE_TO,t=isNaN(t)?u:t,n=isNaN(n)?o:n,i.x1=i.relative?u-t:2*u-t,i.y1=i.relative?o-n:2*o-n),i.type&Os.CURVE_TO?(t=i.relative?u+i.x2:i.x2,n=i.relative?o+i.y2:i.y2):(t=NaN,n=NaN),i.type&Os.SMOOTH_QUAD_TO&&(i.type=Os.QUAD_TO,r=isNaN(r)?u:r,e=isNaN(e)?o:e,i.x1=i.relative?u-r:2*u-r,i.y1=i.relative?o-e:2*o-e),i.type&Os.QUAD_TO?(r=i.relative?u+i.x1:i.x1,e=i.relative?o+i.y1:i.y1):(r=NaN,e=NaN),i}))}function e(){var t=NaN,n=NaN;return i((function(r,e,i){if(r.type&Os.SMOOTH_QUAD_TO&&(r.type=Os.QUAD_TO,t=isNaN(t)?e:t,n=isNaN(n)?i:n,r.x1=r.relative?e-t:2*e-t,r.y1=r.relative?i-n:2*i-n),r.type&Os.QUAD_TO){t=r.relative?e+r.x1:r.x1,n=r.relative?i+r.y1:r.y1;var u=r.x1,o=r.y1;r.type=Os.CURVE_TO,r.x1=((r.relative?0:e)+2*u)/3,r.y1=((r.relative?0:i)+2*o)/3,r.x2=(r.x+2*u)/3,r.y2=(r.y+2*o)/3}else t=NaN,n=NaN;return r}))}function i(t){var n=0,r=0,e=NaN,i=NaN;return function(u){if(isNaN(e)&&!(u.type&Os.MOVE_TO))throw new Error("path must start with moveto");var o=t(u,n,r,e,i);return u.type&Os.CLOSE_PATH&&(n=e,r=i),void 0!==u.x&&(n=u.relative?n+u.x:u.x),void 0!==u.y&&(r=u.relative?r+u.y:u.y),u.type&Os.MOVE_TO&&(e=n,i=r),o}}function u(t,n,r,e,u,o){return as(t,n,r,e,u,o),i((function(i,a,f,c){var s=i.x1,h=i.x2,v=i.relative&&!isNaN(c),l=void 0!==i.x?i.x:v?0:a,y=void 0!==i.y?i.y:v?0:f;function d(t){return t*t}i.type&Os.HORIZ_LINE_TO&&0!==n&&(i.type=Os.LINE_TO,i.y=i.relative?0:f),i.type&Os.VERT_LINE_TO&&0!==r&&(i.type=Os.LINE_TO,i.x=i.relative?0:a),void 0!==i.x&&(i.x=i.x*t+y*r+(v?0:u)),void 0!==i.y&&(i.y=l*n+i.y*e+(v?0:o)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*r+(v?0:u)),void 0!==i.y1&&(i.y1=s*n+i.y1*e+(v?0:o)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*r+(v?0:u)),void 0!==i.y2&&(i.y2=h*n+i.y2*e+(v?0:o));var p=t*e-n*r;if(void 0!==i.xRot&&(1!==t||0!==n||0!==r||1!==e))if(0===p)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=Os.LINE_TO;else{var b=i.xRot*Math.PI/180,g=Math.sin(b),m=Math.cos(b),w=1/d(i.rX),k=1/d(i.rY),x=d(m)*w+d(g)*k,R=2*g*m*(w-k),M=d(g)*w+d(m)*k,O=x*e*e-R*n*e+M*n*n,j=R*(t*e+n*r)-2*(x*r*e+M*t*n),S=x*r*r-R*t*r+M*t*t,N=(Math.atan2(j,O-S)+Math.PI)%Math.PI/2,B=Math.sin(N),P=Math.cos(N);i.rX=Math.abs(p)/Math.sqrt(O*d(P)+j*B*P+S*d(B)),i.rY=Math.abs(p)/Math.sqrt(O*d(B)-j*B*P+S*d(P)),i.xRot=180*N/Math.PI}return void 0!==i.sweepFlag&&0>p&&(i.sweepFlag=+!i.sweepFlag),i}))}t.ROUND=function(t){function n(n){return Math.round(n*t)/t}return void 0===t&&(t=1e13),as(t),function(t){return void 0!==t.x1&&(t.x1=n(t.x1)),void 0!==t.y1&&(t.y1=n(t.y1)),void 0!==t.x2&&(t.x2=n(t.x2)),void 0!==t.y2&&(t.y2=n(t.y2)),void 0!==t.x&&(t.x=n(t.x)),void 0!==t.y&&(t.y=n(t.y)),void 0!==t.rX&&(t.rX=n(t.rX)),void 0!==t.rY&&(t.rY=n(t.rY)),t}},t.TO_ABS=n,t.TO_REL=function(){return i((function(t,n,r){return t.relative||(void 0!==t.x1&&(t.x1-=n),void 0!==t.y1&&(t.y1-=r),void 0!==t.x2&&(t.x2-=n),void 0!==t.y2&&(t.y2-=r),void 0!==t.x&&(t.x-=n),void 0!==t.y&&(t.y-=r),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,n,r){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!0),i((function(e,i,u,o,a){if(isNaN(o)&&!(e.type&Os.MOVE_TO))throw new Error("path must start with moveto");return n&&e.type&Os.HORIZ_LINE_TO&&(e.type=Os.LINE_TO,e.y=e.relative?0:u),r&&e.type&Os.VERT_LINE_TO&&(e.type=Os.LINE_TO,e.x=e.relative?0:i),t&&e.type&Os.CLOSE_PATH&&(e.type=Os.LINE_TO,e.x=e.relative?o-i:o,e.y=e.relative?a-u:a),e.type&Os.ARC&&(0===e.rX||0===e.rY)&&(e.type=Os.LINE_TO,delete e.rX,delete e.rY,delete e.xRot,delete e.lArcFlag,delete e.sweepFlag),e}))},t.NORMALIZE_ST=r,t.QT_TO_C=e,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),as(t);var n=NaN,r=NaN,e=NaN,u=NaN;return i((function(i,o,a,f,c){var s=Math.abs,h=!1,v=0,l=0;if(i.type&Os.SMOOTH_CURVE_TO&&(v=isNaN(n)?0:o-n,l=isNaN(r)?0:a-r),i.type&(Os.CURVE_TO|Os.SMOOTH_CURVE_TO)?(n=i.relative?o+i.x2:i.x2,r=i.relative?a+i.y2:i.y2):(n=NaN,r=NaN),i.type&Os.SMOOTH_QUAD_TO?(e=isNaN(e)?o:2*o-e,u=isNaN(u)?a:2*a-u):i.type&Os.QUAD_TO?(e=i.relative?o+i.x1:i.x1,u=i.relative?a+i.y1:i.y2):(e=NaN,u=NaN),i.type&Os.LINE_COMMANDS||i.type&Os.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&Os.CURVE_TO||i.type&Os.SMOOTH_CURVE_TO||i.type&Os.QUAD_TO||i.type&Os.SMOOTH_QUAD_TO){var y=void 0===i.x?0:i.relative?i.x:i.x-o,d=void 0===i.y?0:i.relative?i.y:i.y-a;v=isNaN(e)?void 0===i.x1?v:i.relative?i.x:i.x1-o:e-o,l=isNaN(u)?void 0===i.y1?l:i.relative?i.y:i.y1-a:u-a;var p=void 0===i.x2?0:i.relative?i.x:i.x2-o,b=void 0===i.y2?0:i.relative?i.y:i.y2-a;s(y)<=t&&s(d)<=t&&s(v)<=t&&s(l)<=t&&s(p)<=t&&s(b)<=t&&(h=!0)}return i.type&Os.CLOSE_PATH&&s(o-f)<=t&&s(a-c)<=t&&(h=!0),h?[]:i}))},t.MATRIX=u,t.ROTATE=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=0),as(t,n,r);var e=Math.sin(t),i=Math.cos(t);return u(i,e,-e,i,n-n*i+r*e,r-n*e-r*i)},t.TRANSLATE=function(t,n){return void 0===n&&(n=0),as(t,n),u(1,0,0,1,t,n)},t.SCALE=function(t,n){return void 0===n&&(n=t),as(t,n),u(t,0,0,n,0,0)},t.SKEW_X=function(t){return as(t),u(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return as(t),u(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),as(t),u(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),as(t),u(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,n,r){return Os.ARC===t.type?function(t,n,r){var e,i,u,o;t.cX||cs(t,n,r);for(var a=Math.min(t.phi1,t.phi2),f=Math.max(t.phi1,t.phi2)-a,c=Math.ceil(f/90),s=new Array(c),h=n,v=r,l=0;l<c;l++){var y=ls(t.phi1,t.phi2,l/c),d=ls(t.phi1,t.phi2,(l+1)/c),p=4/3*Math.tan((d-y)*vs/4),b=[Math.cos(y*vs)-p*Math.sin(y*vs),Math.sin(y*vs)+p*Math.cos(y*vs)],g=b[0],m=b[1],w=[Math.cos(d*vs),Math.sin(d*vs)],k=w[0],x=w[1],R=[k+p*Math.sin(d*vs),x-p*Math.cos(d*vs)],M=R[0],O=R[1];s[l]={relative:t.relative,type:Os.CURVE_TO};var j=function(n,r){var e=os([n*t.rX,r*t.rY],t.xRot);return[t.cX+e[0],t.cY+e[1]]};e=j(g,m),s[l].x1=e[0],s[l].y1=e[1],i=j(M,O),s[l].x2=i[0],s[l].y2=i[1],u=j(k,x),s[l].x=u[0],s[l].y=u[1],t.relative&&(s[l].x1-=h,s[l].y1-=v,s[l].x2-=h,s[l].y2-=v,s[l].x-=h,s[l].y-=v),h=(o=[s[l].x,s[l].y])[0],v=o[1]}return s}(t,t.relative?0:n,t.relative?0:r):t}))},t.ANNOTATE_ARCS=function(){return i((function(t,n,r){return t.relative&&(n=0,r=0),Os.ARC===t.type&&cs(t,n,r),t}))},t.CLONE=function(){return function(t){var n={};for(var r in t)n[r]=t[r];return n}},t.CALCULATE_BOUNDS=function(){var t=n(),u=e(),o=r(),a=i((function(n,r,e){var i=o(u(t(function(t){var n={};for(var r in t)n[r]=t[r];return n}(n))));function f(t){t>a.maxX&&(a.maxX=t),t<a.minX&&(a.minX=t)}function c(t){t>a.maxY&&(a.maxY=t),t<a.minY&&(a.minY=t)}if(i.type&Os.DRAWING_COMMANDS&&(f(r),c(e)),i.type&Os.HORIZ_LINE_TO&&f(i.x),i.type&Os.VERT_LINE_TO&&c(i.y),i.type&Os.LINE_TO&&(f(i.x),c(i.y)),i.type&Os.CURVE_TO){f(i.x),c(i.y);for(var s=0,h=ds(r,i.x1,i.x2,i.x);s<h.length;s++)0<(S=h[s])&&1>S&&f(ps(r,i.x1,i.x2,i.x,S));for(var v=0,l=ds(e,i.y1,i.y2,i.y);v<l.length;v++)0<(S=l[v])&&1>S&&c(ps(e,i.y1,i.y2,i.y,S))}if(i.type&Os.ARC){f(i.x),c(i.y),cs(i,r,e);for(var y=i.xRot/180*Math.PI,d=Math.cos(y)*i.rX,p=Math.sin(y)*i.rX,b=-Math.sin(y)*i.rY,g=Math.cos(y)*i.rY,m=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],w=m[0],k=m[1],x=function(t){var n=180*Math.atan2(t[1],t[0])/Math.PI;return n<w?n+360:n},R=0,M=ss(b,-d,0).map(x);R<M.length;R++)(S=M[R])>w&&S<k&&f(ys(i.cX,d,b,S));for(var O=0,j=ss(g,-p,0).map(x);O<j.length;O++){var S;(S=j[O])>w&&S<k&&c(ys(i.cY,p,g,S))}}return n}));return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}}(hs||(hs={}));var bs,gs,ms,ws,ks=function(){function t(){}return t.prototype.round=function(t){return this.transform(hs.ROUND(t))},t.prototype.toAbs=function(){return this.transform(hs.TO_ABS())},t.prototype.toRel=function(){return this.transform(hs.TO_REL())},t.prototype.normalizeHVZ=function(t,n,r){return this.transform(hs.NORMALIZE_HVZ(t,n,r))},t.prototype.normalizeST=function(){return this.transform(hs.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(hs.QT_TO_C())},t.prototype.aToC=function(){return this.transform(hs.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(hs.SANITIZE(t))},t.prototype.translate=function(t,n){return this.transform(hs.TRANSLATE(t,n))},t.prototype.scale=function(t,n){return this.transform(hs.SCALE(t,n))},t.prototype.rotate=function(t,n,r){return this.transform(hs.ROTATE(t,n,r))},t.prototype.matrix=function(t,n,r,e,i,u){return this.transform(hs.MATRIX(t,n,r,e,i,u))},t.prototype.skewX=function(t){return this.transform(hs.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(hs.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(hs.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(hs.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(hs.ANNOTATE_ARCS())},t}(),xs=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},Rs=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},Ms=function(t){function n(){var n=t.call(this)||this;return n.curNumber="",n.curCommandType=-1,n.curCommandRelative=!1,n.canParseCommandOrComma=!0,n.curNumberHasExp=!1,n.curNumberHasExpDigits=!1,n.curNumberHasDecimal=!1,n.curArgs=[],n}return is(n,t),n.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},n.prototype.parse=function(t,n){var r=this;void 0===n&&(n=[]);for(var e=function(t){n.push(t),r.curArgs.length=0,r.canParseCommandOrComma=!0},i=0;i<t.length;i++){var u=t[i],o=!(this.curCommandType!==Os.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),a=Rs(u)&&("0"===this.curNumber&&"0"===u||o);if(!Rs(u)||a)if("e"!==u&&"E"!==u)if("-"!==u&&"+"!==u||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==u||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&-1!==this.curCommandType){var f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===Os.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>f)throw new SyntaxError('Expected positive number, got "'+f+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(f),this.curArgs.length===js[this.curCommandType]&&(Os.HORIZ_LINE_TO===this.curCommandType?e({type:Os.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):Os.VERT_LINE_TO===this.curCommandType?e({type:Os.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===Os.MOVE_TO||this.curCommandType===Os.LINE_TO||this.curCommandType===Os.SMOOTH_QUAD_TO?(e({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Os.MOVE_TO===this.curCommandType&&(this.curCommandType=Os.LINE_TO)):this.curCommandType===Os.CURVE_TO?e({type:Os.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===Os.SMOOTH_CURVE_TO?e({type:Os.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Os.QUAD_TO?e({type:Os.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Os.ARC&&e({type:Os.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!xs(u))if(","===u&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==u&&"-"!==u&&"."!==u)if(a)this.curNumber=u,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+u+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==u&&"Z"!==u)if("h"===u||"H"===u)this.curCommandType=Os.HORIZ_LINE_TO,this.curCommandRelative="h"===u;else if("v"===u||"V"===u)this.curCommandType=Os.VERT_LINE_TO,this.curCommandRelative="v"===u;else if("m"===u||"M"===u)this.curCommandType=Os.MOVE_TO,this.curCommandRelative="m"===u;else if("l"===u||"L"===u)this.curCommandType=Os.LINE_TO,this.curCommandRelative="l"===u;else if("c"===u||"C"===u)this.curCommandType=Os.CURVE_TO,this.curCommandRelative="c"===u;else if("s"===u||"S"===u)this.curCommandType=Os.SMOOTH_CURVE_TO,this.curCommandRelative="s"===u;else if("q"===u||"Q"===u)this.curCommandType=Os.QUAD_TO,this.curCommandRelative="q"===u;else if("t"===u||"T"===u)this.curCommandType=Os.SMOOTH_QUAD_TO,this.curCommandRelative="t"===u;else{if("a"!==u&&"A"!==u)throw new SyntaxError('Unexpected character "'+u+'" at index '+i+".");this.curCommandType=Os.ARC,this.curCommandRelative="a"===u}else n.push({type:Os.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=u,this.curNumberHasDecimal="."===u}else this.curNumber+=u,this.curNumberHasDecimal=!0;else this.curNumber+=u;else this.curNumber+=u,this.curNumberHasExp=!0;else this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp}return n},n.prototype.transform=function(t){return Object.create(this,{parse:{value:function(n,r){void 0===r&&(r=[]);for(var e=0,i=Object.getPrototypeOf(this).parse.call(this,n);e<i.length;e++){var u=t(i[e]);Array.isArray(u)?r.push.apply(r,u):r.push(u)}return r}}})},n}(ks),Os=function(t){function n(r){var e=t.call(this)||this;return e.commands="string"==typeof r?n.parse(r):r,e}return is(n,t),n.prototype.encode=function(){return n.encode(this.commands)},n.prototype.getBounds=function(){var t=hs.CALCULATE_BOUNDS();return this.transform(t),t},n.prototype.transform=function(t){for(var n=[],r=0,e=this.commands;r<e.length;r++){var i=t(e[r]);Array.isArray(i)?n.push.apply(n,i):n.push(i)}return this.commands=n,this},n.encode=function(t){return us(t)},n.parse=function(t){var n=new Ms,r=[];return n.parse(t,r),n.finish(r),r},n.CLOSE_PATH=1,n.MOVE_TO=2,n.HORIZ_LINE_TO=4,n.VERT_LINE_TO=8,n.LINE_TO=16,n.CURVE_TO=32,n.SMOOTH_CURVE_TO=64,n.QUAD_TO=128,n.SMOOTH_QUAD_TO=256,n.ARC=512,n.LINE_COMMANDS=n.LINE_TO|n.HORIZ_LINE_TO|n.VERT_LINE_TO,n.DRAWING_COMMANDS=n.HORIZ_LINE_TO|n.VERT_LINE_TO|n.LINE_TO|n.CURVE_TO|n.SMOOTH_CURVE_TO|n.QUAD_TO|n.SMOOTH_QUAD_TO|n.ARC,n}(ks),js=((bs={})[Os.MOVE_TO]=2,bs[Os.LINE_TO]=2,bs[Os.HORIZ_LINE_TO]=1,bs[Os.VERT_LINE_TO]=1,bs[Os.CLOSE_PATH]=0,bs[Os.QUAD_TO]=4,bs[Os.SMOOTH_QUAD_TO]=2,bs[Os.CURVE_TO]=6,bs[Os.SMOOTH_CURVE_TO]=4,bs[Os.ARC]=7,bs),Ss=n(Object.freeze({__proto__:null,COMMAND_ARG_COUNTS:js,SVGPathData:Os,SVGPathDataParser:Ms,get SVGPathDataTransformer(){return hs},encodeSVGPath:us})),Ns={},Bs=n(Qf);function Ps(){if(ws)return ms;ws=1;var t=cr(),n=vc(),r=tu(),e=Wn(),i=ln().f,u=Ic(),o=Fc(),a=Z(),f=Qt(),c="Array Iterator",s=e.set,h=e.getterFor(c);ms=u(Array,"Array",(function(n,r){s(this,{type:c,target:t(n),index:0,kind:r})}),(function(){var t=h(this),n=t.target,r=t.index++;if(!n||r>=n.length)return t.target=null,o(void 0,!0);switch(t.kind){case"keys":return o(r,!1);case"values":return o(n[r],!1)}return o([r,n[r]],!1)}),"values");var v=r.Arguments=r.Array;if(n("keys"),n("values"),n("entries"),!a&&f&&"values"!==v.name)try{i(v,"name",{value:"values"})}catch(t){}return ms}var Es,As,Ts,Cs,_s,Is,Fs,Ds,$s,Ls,Gs,zs,Vs,Us,qs,Ys,Ws,Hs={},Xs={exports:{}},Qs={};function Zs(){if($s)return Xs.exports;$s=1;var t=ii(),n=et(),r=Yn(),e=Zt(),i=at(),u=ln().f,o=Ir(),a=function(){if(As)return Qs;As=1;var t=Qn(),n=cr(),r=Ir().f,e=xi(),i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Qs.f=function(u){return i&&"Window"===t(u)?function(t){try{return r(t)}catch(t){return e(i)}}(u):r(n(u))},Qs}(),f=function(){if(Is)return _s;Is=1;var t=nt(),n=Zt(),r=Qn(),e=function(){if(Cs)return Ts;Cs=1;var t=nt();return Ts=t((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}(),i=Object.isExtensible,u=t((function(){}));return _s=u||e?function(t){return!!n(t)&&(!e||"ArrayBuffer"!==r(t))&&(!i||i(t))}:i}(),c=ft(),s=function(){if(Ds)return Fs;Ds=1;var t=nt();return Fs=!t((function(){return Object.isExtensible(Object.preventExtensions({}))}))}(),h=!1,v=c("meta"),l=0,y=function(t){u(t,v,{value:{objectID:"O"+l++,weakData:{}}})},d=Xs.exports={enable:function(){d.enable=function(){},h=!0;var r=o.f,e=n([].splice),i={};i[v]=1,r(i).length&&(o.f=function(t){for(var n=r(t),i=0,u=n.length;i<u;i++)if(n[i]===v){e(n,i,1);break}return n},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(t,n){if(!e(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,v)){if(!f(t))return"F";if(!n)return"E";y(t)}return t[v].objectID},getWeakData:function(t,n){if(!i(t,v)){if(!f(t))return!0;if(!n)return!1;y(t)}return t[v].weakData},onFreeze:function(t){return s&&h&&f(t)&&!i(t,v)&&y(t),t}};return r[v]=!0,Xs.exports}function Ks(){if(Vs)return zs;Vs=1;var t=Xn();return zs=function(n,r,e){for(var i in r)t(n,i,r[i],e);return n}}var Js,th,nh={},rh={};function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(t)}
19
+ /**
20
+ * StackBlur - a fast almost Gaussian Blur For Canvas
21
+ *
22
+ * In case you find this class useful - especially in commercial projects -
23
+ * I am not totally unhappy for a small donation to my PayPal account
24
+ * mario@quasimondo.de
25
+ *
26
+ * Or support me on flattr:
27
+ * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
28
+ *
29
+ * @module StackBlur
30
+ * @author Mario Klingemann
31
+ * Contact: mario@quasimondo.com
32
+ * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
33
+ * Twitter: @quasimondo
34
+ *
35
+ * @copyright (c) 2010 Mario Klingemann
36
+ *
37
+ * Permission is hereby granted, free of charge, to any person
38
+ * obtaining a copy of this software and associated documentation
39
+ * files (the "Software"), to deal in the Software without
40
+ * restriction, including without limitation the rights to use,
41
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ * copies of the Software, and to permit persons to whom the
43
+ * Software is furnished to do so, subject to the following
44
+ * conditions:
45
+ *
46
+ * The above copyright notice and this permission notice shall be
47
+ * included in all copies or substantial portions of the Software.
48
+ *
49
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
50
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
51
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
53
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
54
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
55
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
56
+ * OTHER DEALINGS IN THE SOFTWARE.
57
+ */
58
+ var ih=[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],uh=[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 oh(t,n,r,e,i){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==eh(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var u=t.getContext("2d");try{return u.getImageData(n,r,e,i)}catch(t){throw new Error("unable to access image data: "+t)}}function ah(t,n,r,e,i,u){if(!(isNaN(u)||u<1)){u|=0;var o=oh(t,n,r,e,i);o=fh(o,0,0,e,i,u),t.getContext("2d").putImageData(o,n,r)}}function fh(t,n,r,e,i,u){for(var o,a=t.data,f=2*u+1,c=e-1,s=i-1,h=u+1,v=h*(h+1)/2,l=new vh,y=l,d=1;d<f;d++)y=y.next=new vh,d===h&&(o=y);y.next=l;for(var p=null,b=null,g=0,m=0,w=ih[u],k=uh[u],x=0;x<i;x++){y=l;for(var R=a[m],M=a[m+1],O=a[m+2],j=a[m+3],S=0;S<h;S++)y.r=R,y.g=M,y.b=O,y.a=j,y=y.next;for(var N=0,B=0,P=0,E=0,A=h*R,T=h*M,C=h*O,_=h*j,I=v*R,F=v*M,D=v*O,$=v*j,L=1;L<h;L++){var G=m+((c<L?c:L)<<2),z=a[G],V=a[G+1],U=a[G+2],q=a[G+3],Y=h-L;I+=(y.r=z)*Y,F+=(y.g=V)*Y,D+=(y.b=U)*Y,$+=(y.a=q)*Y,N+=z,B+=V,P+=U,E+=q,y=y.next}p=l,b=o;for(var W=0;W<e;W++){var H=$*w>>>k;if(a[m+3]=H,0!==H){var X=255/H;a[m]=(I*w>>>k)*X,a[m+1]=(F*w>>>k)*X,a[m+2]=(D*w>>>k)*X}else a[m]=a[m+1]=a[m+2]=0;I-=A,F-=T,D-=C,$-=_,A-=p.r,T-=p.g,C-=p.b,_-=p.a;var Q=W+u+1;I+=N+=p.r=a[Q=g+(Q<c?Q:c)<<2],F+=B+=p.g=a[Q+1],D+=P+=p.b=a[Q+2],$+=E+=p.a=a[Q+3],p=p.next;var Z=b.r,K=b.g,J=b.b,tt=b.a;A+=Z,T+=K,C+=J,_+=tt,N-=Z,B-=K,P-=J,E-=tt,b=b.next,m+=4}g+=e}for(var nt=0;nt<e;nt++){var rt=a[m=nt<<2],et=a[m+1],it=a[m+2],ut=a[m+3],ot=h*rt,at=h*et,ft=h*it,ct=h*ut,st=v*rt,ht=v*et,vt=v*it,lt=v*ut;y=l;for(var yt=0;yt<h;yt++)y.r=rt,y.g=et,y.b=it,y.a=ut,y=y.next;for(var dt=e,pt=0,bt=0,gt=0,mt=0,wt=1;wt<=u;wt++){var kt=h-wt;st+=(y.r=rt=a[m=dt+nt<<2])*kt,ht+=(y.g=et=a[m+1])*kt,vt+=(y.b=it=a[m+2])*kt,lt+=(y.a=ut=a[m+3])*kt,mt+=rt,pt+=et,bt+=it,gt+=ut,y=y.next,wt<s&&(dt+=e)}m=nt,p=l,b=o;for(var xt=0;xt<i;xt++){var Rt=m<<2;a[Rt+3]=ut=lt*w>>>k,ut>0?(a[Rt]=(st*w>>>k)*(ut=255/ut),a[Rt+1]=(ht*w>>>k)*ut,a[Rt+2]=(vt*w>>>k)*ut):a[Rt]=a[Rt+1]=a[Rt+2]=0,st-=ot,ht-=at,vt-=ft,lt-=ct,ot-=p.r,at-=p.g,ft-=p.b,ct-=p.a,Rt=nt+((Rt=xt+h)<s?Rt:s)*e<<2,st+=mt+=p.r=a[Rt],ht+=pt+=p.g=a[Rt+1],vt+=bt+=p.b=a[Rt+2],lt+=gt+=p.a=a[Rt+3],p=p.next,ot+=rt=b.r,at+=et=b.g,ft+=it=b.b,ct+=ut=b.a,mt-=rt,pt-=et,bt-=it,gt-=ut,b=b.next,m+=e}}return t}function ch(t,n,r,e,i,u){if(!(isNaN(u)||u<1)){u|=0;var o=oh(t,n,r,e,i);o=sh(o,0,0,e,i,u),t.getContext("2d").putImageData(o,n,r)}}function sh(t,n,r,e,i,u){for(var o,a=t.data,f=2*u+1,c=e-1,s=i-1,h=u+1,v=h*(h+1)/2,l=new vh,y=l,d=1;d<f;d++)y=y.next=new vh,d===h&&(o=y);y.next=l;for(var p,b,g=null,m=null,w=ih[u],k=uh[u],x=0,R=0,M=0;M<i;M++){var O=a[R],j=a[R+1],S=a[R+2],N=h*O,B=h*j,P=h*S,E=v*O,A=v*j,T=v*S;y=l;for(var C=0;C<h;C++)y.r=O,y.g=j,y.b=S,y=y.next;for(var _=0,I=0,F=0,D=1;D<h;D++)E+=(y.r=O=a[p=R+((c<D?c:D)<<2)])*(b=h-D),A+=(y.g=j=a[p+1])*b,T+=(y.b=S=a[p+2])*b,_+=O,I+=j,F+=S,y=y.next;g=l,m=o;for(var $=0;$<e;$++)a[R]=E*w>>>k,a[R+1]=A*w>>>k,a[R+2]=T*w>>>k,E-=N,A-=B,T-=P,N-=g.r,B-=g.g,P-=g.b,p=x+((p=$+u+1)<c?p:c)<<2,E+=_+=g.r=a[p],A+=I+=g.g=a[p+1],T+=F+=g.b=a[p+2],g=g.next,N+=O=m.r,B+=j=m.g,P+=S=m.b,_-=O,I-=j,F-=S,m=m.next,R+=4;x+=e}for(var L=0;L<e;L++){var G=a[R=L<<2],z=a[R+1],V=a[R+2],U=h*G,q=h*z,Y=h*V,W=v*G,H=v*z,X=v*V;y=l;for(var Q=0;Q<h;Q++)y.r=G,y.g=z,y.b=V,y=y.next;for(var Z=0,K=0,J=0,tt=1,nt=e;tt<=u;tt++)W+=(y.r=G=a[R=nt+L<<2])*(b=h-tt),H+=(y.g=z=a[R+1])*b,X+=(y.b=V=a[R+2])*b,Z+=G,K+=z,J+=V,y=y.next,tt<s&&(nt+=e);R=L,g=l,m=o;for(var rt=0;rt<i;rt++)a[p=R<<2]=W*w>>>k,a[p+1]=H*w>>>k,a[p+2]=X*w>>>k,W-=U,H-=q,X-=Y,U-=g.r,q-=g.g,Y-=g.b,p=L+((p=rt+h)<s?p:s)*e<<2,W+=Z+=g.r=a[p],H+=K+=g.g=a[p+1],X+=J+=g.b=a[p+2],g=g.next,U+=G=m.r,q+=z=m.g,Y+=V=m.b,Z-=G,K-=z,J-=V,m=m.next,R+=e}return t}var hh,vh=function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},lh=Object.freeze({__proto__:null,BlurStack:vh,canvasRGB:ch,canvasRGBA:ah,image:function(t,n,r,e,i,u){if("string"==typeof t&&(t=document.getElementById(t)),t&&("HTMLImageElement"!==Object.prototype.toString.call(t).slice(8,-1)||"naturalWidth"in t)){var o=i?"offset":"natural",a=t[o+"Width"],f=t[o+"Height"];if("ImageBitmap"===Object.prototype.toString.call(t).slice(8,-1)&&(a=t.width,f=t.height),"string"==typeof n&&(n=document.getElementById(n)),n&&"getContext"in n){u||(n.style.width=a+"px",n.style.height=f+"px"),n.width=a,n.height=f;var c=n.getContext("2d");c.clearRect(0,0,a,f),c.drawImage(t,0,0,t.naturalWidth,t.naturalHeight,0,0,a,f),isNaN(r)||r<1||(e?ah(n,0,0,a,f,r):ch(n,0,0,a,f,r))}}},imageDataRGB:sh,imageDataRGBA:fh}),yh=n(lh);function dh(){return hh||(hh=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),function(){if($n)return h;$n=1;var t=yt(),n=Xn(),r=function(){if(Dn)return Fn;Dn=1;var t=yt(),n=Zn();return Fn=t?{}.toString:function(){return"[object "+n(this)+"]"}}();t||n(Object.prototype,"toString",r,{unsafe:!0})}(),wu(),function(){if(ku)return Ru;ku=1;var t=ii(),n=nn(),r=sr().f,e=vn();t({target:"Reflect",stat:!0},{deleteProperty:function(t,i){n(t);var u=e(i),o=r(t,u);return!(o&&!o.configurable)&&delete t[u]}})}();var r=function(){if(Xu)return Hu;Xu=1;var t=(Wu||(Wu=1,function(t){var n=ju(),r=Au(),e=Gu(),i=Lu(),u=$u(),o=Uu(),a=Ku();function f(){var c=r(),s=c.m(f),h=(Object.getPrototypeOf?Object.getPrototypeOf(s):s.__proto__).constructor;function v(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===h||"GeneratorFunction"===(n.displayName||n.name))}var l={throw:1,return:2,break:3,continue:3};function y(t){var n,r;return function(e){n||(n={stop:function(){return r(e.a,2)},catch:function(){return e.v},abrupt:function(t,n){return r(e.a,l[t],n)},delegateYield:function(t,i,u){return n.resultName=i,r(e.d,a(t),u)},finish:function(t){return r(e.f,t)}},r=function(t,r,i){e.p=n.prev,e.n=n.next;try{return t(r,i)}finally{n.next=e.n}}),n.resultName&&(n[n.resultName]=e.v,n.resultName=void 0),n.sent=e.v,n.next=e.n;try{return t.call(this,n)}finally{e.p=n.prev,e.n=n.next}}}return(t.exports=f=function(){return{wrap:function(t,n,r,e){return c.w(y(t),n,r,e&&e.reverse())},isGeneratorFunction:v,mark:c.m,awrap:function(t,r){return new n(t,r)},AsyncIterator:u,async:function(t,n,r,u,o){return(v(n)?i:e)(y(t),n,r,u,o)},keys:o,values:a}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=f,t.exports.__esModule=!0,t.exports.default=t.exports}(Mu)),Mu.exports)();Hu=t;try{regeneratorRuntime=t}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}return Hu}(),e=yo;!function(){if(vo)return po;vo=1;var t=ii(),n=ko().map;t({target:"Array",proto:!0,forced:!xo()("map")},{map:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(Eo)return Ao;Eo=1;var t=ii(),n=function(){if(Po)return Bo;Po=1;var t=v(),n=nt(),r=et(),e=To(),i=_o().trim,u=Co(),o=r("".charAt),a=t.parseFloat,f=t.Symbol,c=f&&f.iterator,s=1/a(u+"-0")!=-1/0||c&&!n((function(){a(Object(c))}));return Bo=s?function(t){var n=i(e(t)),r=a(n);return 0===r&&"-"===o(n,0)?-0:r}:a}();t({global:!0,forced:parseFloat!==n},{parseFloat:n})}(),ua(),function(){if(ga)return ma;ga=1;var t=rn(),n=et(),r=wa(),e=nn(),i=Zt(),u=Er(),o=To(),a=ut(),f=cn(),c=xa(),s=Ra(),h=Ma(),v=n("".indexOf);r("match",(function(n,r,l){return[function(r){var e=a(this),u=i(r)?f(r,n):void 0;if(u)return t(u,r,e);var c=o(e);return new RegExp(r)[n](c)},function(t){var n=e(this),i=o(t),a=l(r,n,i);if(a.done)return a.value;var f=o(s(n));if(!~v(f,"g"))return h(n,i);var y=!!~v(f,"u")||!!~v(f,"v");n.lastIndex=0;for(var d,p=[],b=0;null!==(d=h(n,i));){var g=o(d[0]);p[b]=g,""===g&&(n.lastIndex=c(i,u(n.lastIndex),y)),b++}return 0===b?null:p}]}))}(),function(){if(Sa)return Na;Sa=1;var t=gi(),n=rn(),r=et(),e=wa(),i=nt(),u=nn(),o=dt(),a=Zt(),f=Br(),c=Er(),s=To(),h=ut(),v=xa(),l=cn(),y=Ba(),d=Ra(),p=Ma(),b=lt()("replace"),g=Math.max,m=Math.min,w=r([].concat),k=r([].push),x=r("".indexOf),R=r("".slice),M="$0"==="a".replace(/./,"$0"),O=!!/./[b]&&""===/./[b]("a","$0");e("replace",(function(r,e,i){var M=O?"$":"$0";return[function(t,r){var i=h(this),u=a(t)?l(t,b):void 0;return u?n(u,t,i,r):n(e,s(i),t,r)},function(n,r){var a=u(this),h=s(n),l=o(r);l||(r=s(r));var b=s(d(a));if("string"==typeof r&&!~x(r,M)&&!~x(r,"$<")&&!~x(b,"y")){var O=i(e,a,h,r);if(O.done)return O.value}var j,S=!!~x(b,"g");S&&(j=!!~x(b,"u")||!!~x(b,"v"),a.lastIndex=0);for(var N,B=[];null!==(N=p(a,h))&&(k(B,N),S);)""===s(N[0])&&(a.lastIndex=v(h,c(a.lastIndex),j));for(var P,E="",A=0,T=0;T<B.length;T++){for(var C,_=s((N=B[T])[0]),I=g(m(f(N.index),h.length),0),F=[],D=1;D<N.length;D++)k(F,void 0===(P=N[D])?P:String(P));var $=N.groups;if(l){var L=w([_],F,I,h);void 0!==$&&k(L,$),C=s(t(r,void 0,L))}else C=y(_,h,I,F,$,r);I>=A&&(E+=R(h,A,I)+C,A=I+_.length)}return E+R(h,A)}]}),!!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!M||O)}(),function(){if(Ia)return Fa;Ia=1;var t,n=ii(),r=mi(),e=sr().f,i=Er(),u=To(),o=Da(),a=ut(),f=$a(),c=Z(),s=r("".slice),h=Math.min,v=f("startsWith");n({target:"String",proto:!0,forced:!(!c&&!v&&(t=e(String.prototype,"startsWith"),t&&!t.writable)||v)},{startsWith:function(t){var n=u(a(this));o(t);var r=u(t),e=i(h(arguments.length>1?arguments[1]:void 0,n.length));return s(n,e,e+r.length)===r}})}(),function(){if(za)return Va;za=1;var t=ii(),n=et(),r=fr(),e=cr(),i=Ua(),u=n([].join);t({target:"Array",proto:!0,forced:r!==Object||!i("join",",")},{join:function(t){return u(e(this),void 0===t?",":t)}})}();var i=qa,u=Ha,o=Qa,a=uf;!function(){if(rf)return of;rf=1;var t=ii(),n=nt(),r=bo(),e=Zt(),i=ot(),u=Ar(),o=af(),a=wo(),f=ff(),c=mo(),s=xo(),h=lt(),v=st(),l=h("isConcatSpreadable"),y=v>=51||!n((function(){var t=[];return t[l]=!1,t.concat()[0]!==t})),d=function(t){if(!e(t))return!1;var n=t[l];return void 0!==n?!!n:r(t)};t({target:"Array",proto:!0,arity:1,forced:!y||!s("concat")},{concat:function(t){var n,r,e,s,h,v=i(this),l=c(v,0),y=0;for(n=-1,e=arguments.length;n<e;n++)if(d(h=-1===n?v:arguments[n]))for(s=u(h),o(y+s),r=0;r<s;r++,y++)r in h&&a(l,y,h[r]);else o(y+1),a(l,y++,h);return f(l,y),l}})}(),function(){if(cf)return lf;cf=1;var t=ii(),n=ko().every;t({target:"Array",proto:!0,forced:!Ua()("every")},{every:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(vf)return yf;vf=1;var t=ii(),n=function(){if(hf)return sf;hf=1;var t=fn(),n=ot(),r=fr(),e=Ar(),i=TypeError,u="Reduce of empty array with no initial value",o=function(o){return function(a,f,c,s){var h=n(a),v=r(h),l=e(h);if(t(f),0===l&&c<2)throw new i(u);var y=o?l-1:0,d=o?-1:1;if(c<2)for(;;){if(y in v){s=v[y],y+=d;break}if(y+=d,o?y<0:l<=y)throw new i(u)}for(;o?y>=0:l>y;y+=d)y in v&&(s=f(s,v[y],y,h));return s}};return sf={left:o(!1),right:o(!0)}}().left,r=Ua(),e=st();t({target:"Array",proto:!0,forced:!oi()&&e>79&&e<83||!r("reduce")},{reduce:function(t){var r=arguments.length;return n(this,t,r,r>1?arguments[1]:void 0)}})}(),function(){if(df)return mf;df=1;var t,n=ii(),r=mi(),e=sr().f,i=Er(),u=To(),o=Da(),a=ut(),f=$a(),c=Z(),s=r("".slice),h=Math.min,v=f("endsWith");n({target:"String",proto:!0,forced:!(!c&&!v&&(t=e(String.prototype,"endsWith"),t&&!t.writable)||v)},{endsWith:function(t){var n=u(a(this));o(t);var r=u(t),e=arguments.length>1?arguments[1]:void 0,f=n.length,c=void 0===e?f:h(i(e),f);return s(n,c-r.length,c)===r}})}(),function(){if(pf)return wf;pf=1;var t=rn(),n=et(),r=wa(),e=nn(),i=Zt(),u=ut(),o=bi(),a=xa(),f=Er(),c=To(),s=cn(),h=Ra(),v=Ma(),l=zo(),y=nt(),d=l.UNSUPPORTED_Y,p=Math.min,b=n([].push),g=n("".slice),m=n("".indexOf),w=!y((function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),k="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;r("split",(function(n,r,l){var y="0".split(void 0,0).length?function(n,e){return void 0===n&&0===e?[]:t(r,this,n,e)}:r;return[function(r,e){var o=u(this),a=i(r)?s(r,n):void 0;return a?t(a,r,o,e):t(y,c(o),r,e)},function(t,n){var i=e(this),u=c(t);if(!k){var s=l(y,i,u,n,y!==r);if(s.done)return s.value}var w=o(i,RegExp),x=c(h(i)),R=!!~m(x,"u")||!!~m(x,"v");d?~m(x,"g")||(x+="g"):~m(x,"y")||(x+="y");var M=new w(d?"^(?:"+i.source+")":i,x),O=void 0===n?4294967295:n>>>0;if(0===O)return[];if(0===u.length)return null===v(M,u)?[u]:[];for(var j=0,S=0,N=[];S<u.length;){M.lastIndex=d?0:S;var B,P=v(M,d?g(u,S):u);if(null===P||(B=p(f(M.lastIndex+(d?S:0)),u.length))===j)S=a(u,S,R);else{if(b(N,g(u,j,S)),N.length===O)return N;for(var E=1;E<=P.length-1;E++)if(b(N,P[E]),N.length===O)return N;S=j=B}}return b(N,g(u,j)),N}]}),k||!w,d)}();var f=function(){if(gf)return kf.exports;gf=1;for(var n=(bf||(bf=1,function(){var t,n,r,e,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?xf.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(xf.exports=function(){return(t()-i)/1e6},n=process.hrtime,e=(t=function(){var t;return 1e9*(t=n())[0]+t[1]})(),u=1e9*process.uptime(),i=e-u):Date.now?(xf.exports=function(){return Date.now()-r},r=Date.now()):(xf.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}.call(Rf)),xf.exports),r="undefined"==typeof window?t:window,e=["moz","webkit"],i="AnimationFrame",u=r["request"+i],o=r["cancel"+i]||r["cancelRequest"+i],a=0;!u&&a<e.length;a++)u=r[e[a]+"Request"+i],o=r[e[a]+"Cancel"+i]||r[e[a]+"CancelRequest"+i];if(!u||!o){var f=0,c=0,s=[],h=1e3/60;u=function(t){if(0===s.length){var r=n(),e=Math.max(0,h-(r-f));f=e+r,setTimeout((function(){var t=s.slice(0);s.length=0;for(var n=0;n<t.length;n++)if(!t[n].cancelled)try{t[n].callback(f)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(e))}return s.push({handle:++c,callback:t,cancelled:!1}),c},o=function(t){for(var n=0;n<s.length;n++)s[n].handle===t&&(s[n].cancelled=!0)}}return kf.exports=function(t){return u.call(r,t)},kf.exports.cancel=function(){o.apply(r,arguments)},kf.exports.polyfill=function(t){t||(t=r),t.requestAnimationFrame=u,t.cancelAnimationFrame=o},kf.exports}();!function(){if(Mf)return Pf;Mf=1;var t=Qt(),n=Gn().EXISTS,r=et(),e=vi(),i=Function.prototype,u=r(i.toString),o=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,a=r(o.exec);t&&!n&&e(i,"name",{configurable:!0,get:function(){try{return a(o,u(this))[1]}catch(t){return""}}})}(),function(){if(Sf)return Ef;Sf=1;var t=ii(),n=_o().trim,r=function(){if(jf)return Of;jf=1;var t=Gn().PROPER,n=nt(),r=Co();return Of=function(e){return n((function(){return!!r[e]()||"​…᠎"!=="​…᠎"[e]()||t&&r[e].name!==e}))}}();t({target:"String",proto:!0,forced:r("trim")},{trim:function(){return n(this)}})}();var c=Af();!function(){if(_f)return If;_f=1;var t=ii(),n=Ff();t({target:"Array",proto:!0,forced:[].forEach!==n},{forEach:n})}(),function(){if(zf)return Vf;zf=1;var t=v(),n=Uf(),r=qf(),e=Ff(),i=Un(),u=function(t){if(t&&t.forEach!==e)try{i(t,"forEach",e)}catch(n){t.forEach=e}};for(var o in n)n[o]&&u(t[o]&&t[o].prototype);u(r)}();var s=Hf,l=Kf,y=uc;(function(){if(ic)return oc;ic=1;var t=ii(),n=function(){if(ec)return rc;ec=1;var t=wi(),n=rn(),r=ot(),e=ac(),i=nu(),u=di(),o=Ar(),a=wo(),f=ff(),c=eu(),s=ru(),h=iu(),v=af(),l=Array;return rc=function(y){var d=u(this),p=arguments.length,b=p>1?arguments[1]:void 0,g=void 0!==b;g&&(b=t(b,p>2?arguments[2]:void 0));var m,w,k,x,R,M,O=r(y),j=s(O),S=0;if(!j||this===l&&i(j))for(m=o(O),w=d?new this(m):l(m);m>S;S++)M=g?b(O[S],S):O[S],a(w,S,M);else for(w=d?new this:[],R=(x=c(O,j)).next;!(k=n(R,x)).done;S++){try{v(S)}catch(t){h(x,"throw",t)}M=g?e(x,b,[k.value,S],!0):k.value;try{a(w,S,M)}catch(t){h(x,"throw",t)}}return f(w,S),w},rc}();t({target:"Array",stat:!0,forced:!ou()((function(t){Array.from(t)}))},{from:n})})(),function(){if(sc)return hc;sc=1;var t=ii(),n=Tr().includes,r=nt(),e=vc(),i=r((function(){return!Array(1).includes()})),u=r((function(){return[,1].includes(void 0,1)}));t({target:"Array",proto:!0,forced:i||u},{includes:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),e("includes")}(),function(){if(lc)return Bc;lc=1;var t=ii(),n=mi(),r=Tr().indexOf,e=Ua(),i=n([].indexOf),u=!!i&&1/i([1],1,-0)<0;t({target:"Array",proto:!0,forced:u||!e("indexOf")},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return u?i(this,t,n)||0:r(this,t,n)}})}(),function(){if(yc)return Pc;yc=1;var t=ii(),n=ko().some;t({target:"Array",proto:!0,forced:!Ua()("some")},{some:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})}(),function(){if(dc)return Ec;dc=1;var t=ii(),n=et(),r=Da(),e=ut(),i=To(),u=$a(),o=n("".indexOf);t({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~o(i(e(this)),i(r(t)),arguments.length>1?arguments[1]:void 0)}})}(),function(){if(Nc)return Ac;Nc=1;var t=ka().charAt,n=To(),r=Wn(),e=Ic(),i=Fc(),u="String Iterator",o=r.set,a=r.getterFor(u);e(String,"String",(function(t){o(this,{type:u,string:n(t),index:0})}),(function(){var n,r=a(this),e=r.string,u=r.index;return u>=e.length?i(void 0,!0):(n=t(e,u),r.index+=n.length,i(n,!1))}))}();var d=qc;!function(){if(Dc)return Yc;Dc=1;var t=ii(),n=et(),r=bo(),e=n([].reverse),i=[1,2];t({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),e(this)}})}(),Qc();var p=ns;!function(){if(ts)return rs;ts=1;var t=ii(),n=function(){if(Jc)return Kc;Jc=1;var t=ot(),n=Pr(),r=Ar();return Kc=[].fill||function(e){for(var i=t(this),u=r(i),o=arguments.length,a=n(o>1?arguments[1]:void 0,u),f=o>2?arguments[2]:void 0,c=void 0===f?u:n(f,u);c>a;)i[a++]=e;return i},Kc}(),r=vc();t({target:"Array",proto:!0},{fill:n}),r("fill")}();var b=Ss;!function(){if(gs)return Ns;gs=1;var t=Gn().PROPER,n=Xn(),r=nn(),e=To(),i=nt(),u=Ra(),o="toString",a=RegExp.prototype,f=a[o];(i((function(){return"/a/b"!==f.call({source:"a",flags:"b"})}))||t&&f.name!==o)&&n(a,o,(function(){var t=r(this);return"/"+e(t.source)+"/"+e(u(t))}),{unsafe:!0})}();var g=Bs;Ps(),function(){if(Es)return Hs;Es=1;var t=v(),n=Uf(),r=qf(),e=Ps(),i=Un(),u=hi(),o=lt()("iterator"),a=e.values,f=function(t,r){if(t){if(t[o]!==a)try{i(t,o,a)}catch(n){t[o]=a}if(u(t,r,!0),n[r])for(var f in e)if(t[f]!==e[f])try{i(t,f,e[f])}catch(n){t[f]=e[f]}}};for(var c in n)f(t[c]&&t[c].prototype,c);f(r,"DOMTokenList")}(),Ws||(Ws=1,Ys||(Ys=1,function(){if(Gs)return Ls;Gs=1;var t=ii(),n=v(),r=et(),e=ei(),i=Xn(),u=Zs(),o=uu(),a=yi(),f=dt(),c=it(),s=Zt(),h=nt(),l=ou(),y=hi(),d=Hc();return Ls=function(v,p,b){var g=-1!==v.indexOf("Map"),m=-1!==v.indexOf("Weak"),w=g?"set":"add",k=n[v],x=k&&k.prototype,R=k,M={},O=function(t){var n=r(x[t]);i(x,t,"add"===t?function(t){return n(this,0===t?0:t),this}:"delete"===t?function(t){return!(m&&!s(t))&&n(this,0===t?0:t)}:"get"===t?function(t){return m&&!s(t)?void 0:n(this,0===t?0:t)}:"has"===t?function(t){return!(m&&!s(t))&&n(this,0===t?0:t)}:function(t,r){return n(this,0===t?0:t,r),this})};if(e(v,!f(k)||!(m||x.forEach&&!h((function(){(new k).entries().next()})))))R=b.getConstructor(p,v,g,w),u.enable();else if(e(v,!0)){var j=new R,S=j[w](m?{}:-0,1)!==j,N=h((function(){j.has(1)})),B=l((function(t){new k(t)})),P=!m&&h((function(){for(var t=new k,n=5;n--;)t[w](n,n);return!t.has(-0)}));B||((R=p((function(t,n){a(t,x);var r=d(new k,t,R);return c(n)||o(n,r[w],{that:r,AS_ENTRIES:g}),r}))).prototype=x,x.constructor=R),(N||P)&&(O("delete"),O("has"),g&&O("get")),(P||S)&&O(w),m&&x.clear&&delete x.clear}return M[v]=R,t({global:!0,constructor:!0,forced:R!==k},M),y(R,v),m||b.setStrong(R,v,g),R}}()("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),function(){if(qs)return Us;qs=1;var t=ea(),n=vi(),r=Ks(),e=wi(),i=yi(),u=it(),o=uu(),a=Ic(),f=Fc(),c=li(),s=Qt(),h=Zs().fastKey,v=Wn(),l=v.set,y=v.getterFor;return Us={getConstructor:function(a,f,c,v){var d=a((function(n,r){i(n,p),l(n,{type:f,index:t(null),first:null,last:null,size:0}),s||(n.size=0),u(r)||o(r,n[v],{that:n,AS_ENTRIES:c})})),p=d.prototype,b=y(f),g=function(t,n,r){var e,i,u=b(t),o=m(t,n);return o?o.value=r:(u.last=o={index:i=h(n,!0),key:n,value:r,previous:e=u.last,next:null,removed:!1},u.first||(u.first=o),e&&(e.next=o),s?u.size++:t.size++,"F"!==i&&(u.index[i]=o)),t},m=function(t,n){var r,e=b(t),i=h(n);if("F"!==i)return e.index[i];for(r=e.first;r;r=r.next)if(r.key===n)return r};return r(p,{clear:function(){for(var n=b(this),r=n.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=null),r=r.next;n.first=n.last=null,n.index=t(null),s?n.size=0:this.size=0},delete:function(t){var n=this,r=b(n),e=m(n,t);if(e){var i=e.next,u=e.previous;delete r.index[e.index],e.removed=!0,u&&(u.next=i),i&&(i.previous=u),r.first===e&&(r.first=i),r.last===e&&(r.last=u),s?r.size--:n.size--}return!!e},forEach:function(t){for(var n,r=b(this),i=e(t,arguments.length>1?arguments[1]:void 0);n=n?n.next:r.first;)for(i(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(t){return!!m(this,t)}}),r(p,c?{get:function(t){var n=m(this,t);return n&&n.value},set:function(t,n){return g(this,0===t?0:t,n)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),s&&n(p,"size",{configurable:!0,get:function(){return b(this).size}}),d},setStrong:function(t,n,r){var e=n+" Iterator",i=y(n),u=y(e);a(t,n,(function(t,n){l(this,{type:e,target:t,state:i(t),kind:n,last:null})}),(function(){for(var t=u(this),n=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?f("keys"===n?r.key:"values"===n?r.value:[r.key,r.value],!1):(t.target=null,f(void 0,!0))}),r?"entries":"values",!r,!0),c(n)}},Us}()))),function(){if(Js)return nh;Js=1;var t=ii(),n=gi(),r=fn(),e=nn();t({target:"Reflect",stat:!0,forced:!nt()((function(){Reflect.apply((function(){}))}))},{apply:function(t,i,u){return n(r(t),i,e(u))}})}(),function(){if(th)return rh;th=1;var t=ii(),n=nn(),r=Cc();t({target:"Reflect",stat:!0,sham:!Tc()},{getPrototypeOf:function(t){return r(n(t))}})}();var m=yh;function w(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var k=w(r),x=w(e),R=w(i),M=w(u),O=w(o),j=w(a),S=w(f),N=w(c),B=w(s),P=w(l),E=w(y),A=w(d),T=w(p),C=w(g),_=Object.freeze({__proto__:null,offscreen:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).DOMParser,n={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:function(t,n){return new OffscreenCanvas(t,n)},createImage:function(t){return x.default(k.default.mark((function n(){var r,e;return k.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(t);case 2:return r=n.sent,n.next=5,r.blob();case 5:return e=n.sent,n.next=8,createImageBitmap(e);case 8:return n.abrupt("return",n.sent);case 10:case"end":return n.stop()}}),n)})))()}};return"undefined"==typeof DOMParser&&void 0!==t||Reflect.deleteProperty(n,"DOMParser"),n},node:function(t){var n=t.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t.DOMParser,fetch:t.fetch,createCanvas:n.createCanvas,createImage:n.loadImage}}});function I(t){return t.replace(/(?!\u3000)\s+/gm," ")}function F(t){return t.replace(/^[\n \t]+/,"")}function D(t){return t.replace(/[\n \t]+$/,"")}function $(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var L=/^[A-Z-]+$/;function G(t){return L.test(t)?t.toLowerCase():t}function z(t){var n=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return n[2]||n[3]||n[4]}function V(t){if(!t.startsWith("rgb"))return t;var n=3;return t.replace(/\d+(\.\d+)?/g,(function(t,r){return n--&&r?String(Math.round(parseFloat(t))):t}))}var U=/(\[[^\]]+\])/g,q=/(#[^\s+>~.[:]+)/g,Y=/(\.[^\s+>~.[:]+)/g,W=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,H=/(:[\w-]+\([^)]*\))/gi,X=/(:[^\s+>~.[:]+)/g,Q=/([^\s+>~.[:]+)/g;function K(t,n){var r=n.exec(t);return r?[t.replace(n," "),r.length]:[t,0]}function J(t){var n=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),e=K(r,U),i=R.default(e,2);r=i[0],n[1]+=i[1];var u=K(r,q),o=R.default(u,2);r=o[0],n[0]+=o[1];var a=K(r,Y),f=R.default(a,2);r=f[0],n[1]+=f[1];var c=K(r,W),s=R.default(c,2);r=s[0],n[2]+=s[1];var h=K(r,H),v=R.default(h,2);r=v[0],n[1]+=v[1];var l=K(r,X),y=R.default(l,2);r=y[0],n[1]+=y[1];var d=K(r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),Q),p=R.default(d,2);return r=p[0],n[2]+=p[1],n.join("")}var tt=1e-8;function rt(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function at(t,n){return(t[0]*n[0]+t[1]*n[1])/(rt(t)*rt(n))}function ft(t,n){return(t[0]*n[1]<t[1]*n[0]?-1:1)*Math.acos(at(t,n))}function ct(t){return t*t*t}function ht(t){return 3*t*t*(1-t)}function vt(t){return 3*t*(1-t)*(1-t)}function pt(t){return(1-t)*(1-t)*(1-t)}function bt(t){return t*t}function gt(t){return 2*t*(1-t)}function mt(t){return(1-t)*(1-t)}var wt=function(){function t(n,r,e){O.default(this,t),this.document=n,this.name=r,this.value=e,this.isNormalizedColor=!1}return j.default(t,[{key:"split",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",r=this.document,e=this.name;return I(this.getString()).trim().split(n).map((function(n){return new t(r,e,n)}))}},{key:"hasValue",value:function(t){var n=this.value;return null!==n&&""!==n&&(t||0!==n)&&void 0!==n}},{key:"isString",value:function(t){var n=this.value,r="string"==typeof n;return r&&t?t.test(n):r}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getValue",value:function(t){return void 0===t||this.hasValue()?this.value:t}},{key:"getNumber",value:function(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var n=parseFloat(this.value);return this.isString(/%$/)&&(n/=100),n}},{key:"getString",value:function(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}},{key:"getColor",value:function(t){var n=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,n=V(n),this.value=n),n}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9.-]/g,"")}},{key:"getPixels",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r=R.default("boolean"==typeof t?[void 0,t]:[t],2),e=r[0],i=r[1],u=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(u.computeSize("x"),u.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(u.computeSize("x"),u.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*u.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*u.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&i:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*u.computeSize(e);default:var o=this.getNumber();return n&&o<1?o*u.computeSize(e):o}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var t=this.getString(),n=/#([^)'"]+)/.exec(t);return n&&(n=n[1]),n||(n=t),this.document.definitions[n]}},{key:"getFillStyleDefinition",value:function(t,n){var r=this.getDefinition();if(!r)return null;if("function"==typeof r.createGradient)return r.createGradient(this.document.ctx,t,n);if("function"==typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var e=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),e.hasValue()&&r.getAttribute("patternTransform",!0).setValue(e.value)}return r.createPattern(this.document.ctx,t,n)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?t.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(n){for(var r=this.getColor(),e=r.length,i=0,u=0;u<e&&(","===r[u]&&i++,3!==i);u++);if(n.hasValue()&&this.isString()&&3!==i){var o=new N.default(r);o.ok&&(o.alpha=n.getNumber(),r=o.toRGBA())}return new t(this.document,this.name,r)}}],[{key:"empty",value:function(n){return new t(n,"EMPTY","")}}]),t}();wt.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};var kt=function(){function t(){O.default(this,t),this.viewPorts=[]}return j.default(t,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(t,n){this.viewPorts.push({width:t,height:n})}},{key:"removeCurrent",value:function(){this.viewPorts.pop()}},{key:"getCurrent",value:function(){var t=this.viewPorts;return t[t.length-1]}},{key:"computeSize",value:function(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},{key:"width",get:function(){return this.getCurrent().width}},{key:"height",get:function(){return this.getCurrent().height}}]),t}(),xt=function(){function t(n,r){O.default(this,t),this.x=n,this.y=r}return j.default(t,[{key:"angleTo",value:function(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function(t){var n=this.x,r=this.y,e=n*t[1]+r*t[3]+t[5];this.x=n*t[0]+r*t[2]+t[4],this.y=e}}],[{key:"parse",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=$(n),i=R.default(e,2),u=i[0],o=i[1];return new t(void 0===u?r:u,void 0===o?r:o)}},{key:"parseScale",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,e=$(n),i=R.default(e,2),u=i[0],o=void 0===u?r:u,a=i[1];return new t(o,void 0===a?o:a)}},{key:"parsePath",value:function(n){for(var r=$(n),e=r.length,i=[],u=0;u<e;u+=2)i.push(new t(r[u],r[u+1]));return i}}]),t}(),Rt=function(){function t(n){O.default(this,t),this.screen=n,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return j.default(t,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var t=this.onMouseMove,n=this.screen.ctx.canvas;n.onclick=this.onClick,n.onmousemove=t,this.working=!0}}},{key:"stop",value:function(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}},{key:"hasEvents",value:function(){return this.working&&this.events.length>0}},{key:"runEvents",value:function(){if(this.working){var t=this.events,n=this.eventElements,r=this.screen.ctx.canvas.style;r&&(r.cursor=""),t.forEach((function(t,r){for(var e=t.run,i=n[r];i;)e(i),i=i.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,n){if(this.working&&n){var r=this.eventElements;this.events.forEach((function(e,i){!r[i]&&n.isPointInPath&&n.isPointInPath(e.x,e.y)&&(r[i]=t)}))}}},{key:"checkBoundingBox",value:function(t,n){if(this.working&&n){var r=this.eventElements;this.events.forEach((function(e,i){!r[i]&&n.isPointInBox(e.x,e.y)&&(r[i]=t)}))}}},{key:"mapXY",value:function(t,n){for(var r=this.screen,e=r.window,i=r.ctx,u=new xt(t,n),o=i.canvas;o;)u.x-=o.offsetLeft,u.y-=o.offsetTop,o=o.offsetParent;return e.scrollX&&(u.x+=e.scrollX),e.scrollY&&(u.y+=e.scrollY),u}},{key:"onClick",value:function(t){var n=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:n.x,y:n.y,run:function(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function(t){var n=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:n.x,y:n.y,run:function(t){t.onMouseMove&&t.onMouseMove()}})}}]),t}(),Mt="undefined"!=typeof window?window:null,Ot="undefined"!=typeof fetch?fetch.bind(void 0):null,jt=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.fetch,i=void 0===e?Ot:e,u=r.window,o=void 0===u?Mt:u;O.default(this,t),this.ctx=n,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new kt,this.mouse=new Rt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=o,this.fetch=i}return j.default(t,[{key:"wait",value:function(t){this.waits.push(t)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function(){if(this.isReadyLock)return!0;var t=this.waits.every((function(t){return t()}));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function(t){var n=t.document,r=t.ctx,e=t.width,i=t.desiredWidth,u=t.height,o=t.desiredHeight,a=t.minX,f=void 0===a?0:a,c=t.minY,s=void 0===c?0:c,h=t.refX,v=t.refY,l=t.clip,y=void 0!==l&&l,d=t.clipX,p=void 0===d?0:d,b=t.clipY,g=void 0===b?0:b,m=I(t.aspectRatio).replace(/^defer\s/,"").split(" "),w=R.default(m,2),k=w[0]||"xMidYMid",x=w[1]||"meet",M=e/i,O=u/o,j=Math.min(M,O),S=Math.max(M,O),N=i,B=o;"meet"===x&&(N*=j,B*=j),"slice"===x&&(N*=S,B*=S);var P=new wt(n,"refX",h),E=new wt(n,"refY",v),A=P.hasValue()&&E.hasValue();if(A&&r.translate(-j*P.getPixels("x"),-j*E.getPixels("y")),y){var T=j*p,C=j*g;r.beginPath(),r.moveTo(T,C),r.lineTo(e,C),r.lineTo(e,u),r.lineTo(T,u),r.closePath(),r.clip()}if(!A){var _="meet"===x&&j===O,F="slice"===x&&S===O,D="meet"===x&&j===M,$="slice"===x&&S===M;k.startsWith("xMid")&&(_||F)&&r.translate(e/2-N/2,0),k.endsWith("YMid")&&(D||$)&&r.translate(0,u/2-B/2),k.startsWith("xMax")&&(_||F)&&r.translate(e-N,0),k.endsWith("YMax")&&(D||$)&&r.translate(0,u-B)}switch(!0){case"none"===k:r.scale(M,O);break;case"meet"===x:r.scale(j,j);break;case"slice"===x:r.scale(S,S)}r.translate(-f,-s)}},{key:"start",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.enableRedraw,i=void 0!==e&&e,u=r.ignoreMouse,o=void 0!==u&&u,a=r.ignoreAnimation,f=void 0!==a&&a,c=r.ignoreDimensions,s=void 0!==c&&c,h=r.ignoreClear,v=void 0!==h&&h,l=r.forceRedraw,y=r.scaleWidth,d=r.scaleHeight,p=r.offsetX,b=r.offsetY,g=this.mouse,m=1e3/this.FRAMERATE;if(this.frameDuration=m,this.readyPromise=new Promise((function(t){n.resolveReady=t})),this.isReady()&&this.render(t,s,v,y,d,p,b),i){var w=Date.now(),k=w,x=0;o||g.start(),this.intervalId=S.default((function r(){w=Date.now(),(x=w-k)>=m&&(k=w-x%m,n.shouldUpdate(f,l)&&(n.render(t,s,v,y,d,p,b),g.runEvents())),n.intervalId=S.default(r)}))}}},{key:"stop",value:function(){this.intervalId&&(S.default.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,n){if(!t){var r=this.frameDuration;if(this.animations.reduce((function(t,n){return n.update(r)||t}),!1))return!0}return!("function"!=typeof n||!n())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents()}},{key:"render",value:function(t,n,r,e,i,u,o){var a=this.CLIENT_WIDTH,f=this.CLIENT_HEIGHT,c=this.viewPort,s=this.ctx,h=this.isFirstRender,v=s.canvas;c.clear(),v.width&&v.height?c.setCurrent(v.width,v.height):c.setCurrent(a,f);var l=t.getStyle("width"),y=t.getStyle("height");!n&&(h||"number"!=typeof e&&"number"!=typeof i)&&(l.hasValue()&&(v.width=l.getPixels("x"),v.style&&(v.style.width="".concat(v.width,"px"))),y.hasValue()&&(v.height=y.getPixels("y"),v.style&&(v.style.height="".concat(v.height,"px"))));var d=v.clientWidth||v.width,p=v.clientHeight||v.height;if(n&&l.hasValue()&&y.hasValue()&&(d=l.getPixels("x"),p=y.getPixels("y")),c.setCurrent(d,p),"number"==typeof u&&t.getAttribute("x",!0).setValue(u),"number"==typeof o&&t.getAttribute("y",!0).setValue(o),"number"==typeof e||"number"==typeof i){var b=$(t.getAttribute("viewBox").getString()),g=0,m=0;if("number"==typeof e){var w=t.getStyle("width");w.hasValue()?g=w.getPixels("x")/e:isNaN(b[2])||(g=b[2]/e)}if("number"==typeof i){var k=t.getStyle("height");k.hasValue()?m=k.getPixels("y")/i:isNaN(b[3])||(m=b[3]/i)}g||(g=m),m||(m=g),t.getAttribute("width",!0).setValue(e),t.getAttribute("height",!0).setValue(i);var x=t.getStyle("transform",!0,!0);x.setValue("".concat(x.getString()," scale(").concat(1/g,", ").concat(1/m,")"))}r||s.clearRect(0,0,d,p),t.render(s),h&&(this.isFirstRender=!1)}}]),t}();jt.defaultWindow=Mt,jt.defaultFetch=Ot;var St=jt.defaultFetch,Nt="undefined"!=typeof DOMParser?DOMParser:null,Bt=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.fetch,e=void 0===r?St:r,i=n.DOMParser,u=void 0===i?Nt:i;O.default(this,t),this.fetch=e,this.DOMParser=u}var n,r;return j.default(t,[{key:"parse",value:(r=x.default(k.default.mark((function t(n){return k.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.startsWith("<")){t.next=2;break}return t.abrupt("return",this.parseFromString(n));case 2:return t.abrupt("return",this.load(n));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"parseFromString",value:function(t){var n=new this.DOMParser;try{return this.checkDocument(n.parseFromString(t,"image/svg+xml"))}catch(r){return this.checkDocument(n.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function(t){var n=t.getElementsByTagName("parsererror")[0];if(n)throw new Error(n.textContent);return t}},{key:"load",value:(n=x.default(k.default.mark((function t(n){var r;return k.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fetch(n);case 2:return r=t.sent,t.next=5,r.text();case 5:return t.abrupt("return",this.parseFromString(t.sent));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})}]),t}(),Pt=function(){function t(n,r){O.default(this,t),this.type="translate",this.point=null,this.point=xt.parse(r)}return j.default(t,[{key:"apply",value:function(t){var n=this.point;t.translate(n.x||0,n.y||0)}},{key:"unapply",value:function(t){var n=this.point;t.translate(-1*n.x||0,-1*n.y||0)}},{key:"applyToPoint",value:function(t){var n=this.point;t.applyTransform([1,0,0,1,n.x||0,n.y||0])}}]),t}(),Et=function(){function t(n,r,e){O.default(this,t),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=$(r);this.angle=new wt(n,"angle",i[0]),this.originX=e[0],this.originY=e[1],this.cx=i[1]||0,this.cy=i[2]||0}return j.default(t,[{key:"apply",value:function(t){var n=this.cy,r=this.originY,e=this.angle,i=this.cx+this.originX.getPixels("x"),u=n+r.getPixels("y");t.translate(i,u),t.rotate(e.getRadians()),t.translate(-i,-u)}},{key:"unapply",value:function(t){var n=this.cy,r=this.originY,e=this.angle,i=this.cx+this.originX.getPixels("x"),u=n+r.getPixels("y");t.translate(i,u),t.rotate(-1*e.getRadians()),t.translate(-i,-u)}},{key:"applyToPoint",value:function(t){var n=this.cx,r=this.cy,e=this.angle.getRadians();t.applyTransform([1,0,0,1,n||0,r||0]),t.applyTransform([Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]),t.applyTransform([1,0,0,1,-n||0,-r||0])}}]),t}(),At=function(){function t(n,r,e){O.default(this,t),this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=xt.parseScale(r);0!==i.x&&0!==i.y||(i.x=tt,i.y=tt),this.scale=i,this.originX=e[0],this.originY=e[1]}return j.default(t,[{key:"apply",value:function(t){var n=this.scale,r=n.x,e=n.y,i=this.originY,u=this.originX.getPixels("x"),o=i.getPixels("y");t.translate(u,o),t.scale(r,e||r),t.translate(-u,-o)}},{key:"unapply",value:function(t){var n=this.scale,r=n.x,e=n.y,i=this.originY,u=this.originX.getPixels("x"),o=i.getPixels("y");t.translate(u,o),t.scale(1/r,1/e||r),t.translate(-u,-o)}},{key:"applyToPoint",value:function(t){var n=this.scale;t.applyTransform([n.x||0,0,0,n.y||0,0,0])}}]),t}(),Tt=function(){function t(n,r,e){O.default(this,t),this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=$(r),this.originX=e[0],this.originY=e[1]}return j.default(t,[{key:"apply",value:function(t){var n=this.originY,r=this.matrix,e=this.originX.getPixels("x"),i=n.getPixels("y");t.translate(e,i),t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),t.translate(-e,-i)}},{key:"unapply",value:function(t){var n=this.originY,r=this.matrix,e=r[0],i=r[2],u=r[4],o=r[1],a=r[3],f=r[5],c=1/(e*(1*a-0*f)-i*(1*o-0*f)+u*(0*o-0*a)),s=this.originX.getPixels("x"),h=n.getPixels("y");t.translate(s,h),t.transform(c*(1*a-0*f),c*(0*f-1*o),c*(0*u-1*i),c*(1*e-0*u),c*(i*f-u*a),c*(u*o-e*f)),t.translate(-s,-h)}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),t}();var Ct=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="skew",u.angle=null,u.angle=new wt(t,"angle",n),u}return i}(Tt);var _t=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="skewX",u.matrix=[1,0,Math.tan(u.angle.getRadians()),1,0,0],u}return i}(Ct);var It=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="skewY",u.matrix=[1,Math.tan(u.angle.getRadians()),0,1,0,0],u}return i}(Ct),Ft=function(){function t(n,r,e){var i=this;O.default(this,t),this.document=n,this.transforms=[];var u=function(t){return I(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(r);u.forEach((function(n){if("none"!==n){var r=function(t){var n=t.split("("),r=R.default(n,2),e=r[1];return[r[0].trim(),e.trim().replace(")","")]}(n),u=R.default(r,2),o=t.transformTypes[u[0]];void 0!==o&&i.transforms.push(new o(i.document,u[1],e))}}))}return j.default(t,[{key:"apply",value:function(t){for(var n=this.transforms,r=n.length,e=0;e<r;e++)n[e].apply(t)}},{key:"unapply",value:function(t){for(var n=this.transforms,r=n.length-1;r>=0;r--)n[r].unapply(t)}},{key:"applyToPoint",value:function(t){for(var n=this.transforms,r=n.length,e=0;e<r;e++)n[e].applyToPoint(t)}}],[{key:"fromElement",value:function(n,r){var e=r.getStyle("transform",!1,!0),i=r.getStyle("transform-origin",!1,!0).split(),u=R.default(i,2),o=u[0],a=u[1],f=[o,void 0===a?o:a];return e.hasValue()?new t(n,e.getString(),f):null}}]),t}();Ft.transformTypes={translate:Pt,rotate:Et,scale:At,matrix:Tt,skewX:_t,skewY:It};var Dt=function(){function t(n,r){var e=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(O.default(this,t),this.document=n,this.node=r,this.captureTextNodes=i,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach((function(t){var r=G(t.nodeName);e.attributes[r]=new wt(n,r,t.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var u=this.getAttribute("style").getString().split(";").map((function(t){return t.trim()}));u.forEach((function(t){if(t){var r=t.split(":").map((function(t){return t.trim()})),i=R.default(r,2),u=i[0];e.styles[u]=new wt(n,u,i[1])}}))}var o=n.definitions,a=this.getAttribute("id");a.hasValue()&&(o[a.getString()]||(o[a.getString()]=this)),Array.from(r.childNodes).forEach((function(t){if(1===t.nodeType)e.addChild(t);else if(i&&(3===t.nodeType||4===t.nodeType)){var r=n.createTextNode(t);r.getText().length>0&&e.addChild(r)}}))}}return j.default(t,[{key:"getAttribute",value:function(t){var n=this.attributes[t];if(!n&&arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var r=new wt(this.document,t,"");return this.attributes[t]=r,r}return n||wt.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return wt.empty(this.document)}},{key:"getStyle",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=this.styles[t];if(e)return e;var i=this.getAttribute(t);if(null!=i&&i.hasValue())return this.styles[t]=i,i;if(!r){var u=this.parent;if(u){var o=u.getStyle(t);if(null!=o&&o.hasValue())return o}}if(n){var a=new wt(this.document,t,"");return this.styles[t]=a,a}return e||wt.empty(this.document)}},{key:"render",value:function(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var n=this.getStyle("mask").getDefinition();n&&(this.applyEffects(t),n.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function(){}},{key:"applyEffects",value:function(t){var n=Ft.fromElement(this.document,this);n&&n.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var e=r.getDefinition();e&&e.apply(t)}}},{key:"clearContext",value:function(){}},{key:"renderChildren",value:function(t){this.children.forEach((function(n){n.render(t)}))}},{key:"addChild",value:function(n){var r=n instanceof t?n:this.document.createElement(n);r.parent=this,t.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function(t){var n,r=this.node;if("function"==typeof r.matches)return r.matches(t);var e=null===(n=r.getAttribute)||void 0===n?void 0:n.call(r,"class");return!(!e||""===e)&&e.split(" ").some((function(n){return".".concat(n)===t}))}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,n=t.styles,r=t.stylesSpecificity;for(var e in n)if(!e.startsWith("@")&&this.matchesSelector(e)){var i=n[e],u=r[e];if(i)for(var o in i){var a=this.stylesSpecificity[o];void 0===a&&(a="000"),u>=a&&(this.styles[o]=i[o],this.stylesSpecificity[o]=u)}}}},{key:"removeStyles",value:function(t,n){return n.reduce((function(n,r){var e=t.getStyle(r);if(!e.hasValue())return n;var i=e.getString();return e.setValue(""),[].concat(A.default(n),[[r,i]])}),[])}},{key:"restoreStyles",value:function(t,n){n.forEach((function(n){var r=R.default(n,2),e=r[1];t.getStyle(r[0],!0).setValue(e)}))}},{key:"isFirstChild",value:function(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}}]),t}();Dt.ignoreChildTypes=["title"];var $t=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){return O.default(this,i),e.call(this,t,n,r)}return i}(Dt);function Lt(t){var n=t.trim();return/^('|")/.test(n)?n:'"'.concat(n,'"')}function Gt(t){if(!t)return"";var n=t.trim().toLowerCase();switch(n){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return n;default:return/^oblique\s+(-|)\d+deg$/.test(n)?n:""}}function zt(t){if(!t)return"";var n=t.trim().toLowerCase();switch(n){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return n;default:return/^[\d.]+$/.test(n)?n:""}}var Vt=function(){function t(n,r,e,i,u,o){O.default(this,t);var a=o?"string"==typeof o?t.parse(o):o:{};this.fontFamily=u||a.fontFamily,this.fontSize=i||a.fontSize,this.fontStyle=n||a.fontStyle,this.fontWeight=e||a.fontWeight,this.fontVariant=r||a.fontVariant}return j.default(t,[{key:"toString",value:function(){return[Gt(this.fontStyle),this.fontVariant,zt(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:t.trim().split(",").map(Lt).join(","))].join(" ").trim();var t}}],[{key:"parse",value:function(){var n=arguments.length>1?arguments[1]:void 0,r="",e="",i="",u="",o="",a=I(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),f={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return a.forEach((function(n){switch(!0){case!f.fontStyle&&t.styles.includes(n):"inherit"!==n&&(r=n),f.fontStyle=!0;break;case!f.fontVariant&&t.variants.includes(n):"inherit"!==n&&(e=n),f.fontStyle=!0,f.fontVariant=!0;break;case!f.fontWeight&&t.weights.includes(n):"inherit"!==n&&(i=n),f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0;break;case!f.fontSize:if("inherit"!==n){var a=n.split("/"),c=R.default(a,1);u=c[0]}f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0,f.fontSize=!0;break;default:"inherit"!==n&&(o+=n)}})),new t(r,e,i,u,o,n)}}]),t}();Vt.styles="normal|italic|oblique|inherit",Vt.variants="normal|small-caps|inherit",Vt.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Ut=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;O.default(this,t),this.x1=n,this.y1=r,this.x2=e,this.y2=i,this.addPoint(n,r),this.addPoint(e,i)}return j.default(t,[{key:"addPoint",value:function(t,n){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==n&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=n,this.y2=n),n<this.y1&&(this.y1=n),n>this.y2&&(this.y2=n))}},{key:"addX",value:function(t){this.addPoint(t,null)}},{key:"addY",value:function(t){this.addPoint(null,t)}},{key:"addBoundingBox",value:function(t){if(t){var n=t.x2,r=t.y2;this.addPoint(t.x1,t.y1),this.addPoint(n,r)}}},{key:"sumCubic",value:function(t,n,r,e,i){return Math.pow(1-t,3)*n+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*e+Math.pow(t,3)*i}},{key:"bezierCurveAdd",value:function(t,n,r,e,i){var u=6*n-12*r+6*e,o=-3*n+9*r-9*e+3*i,a=3*r-3*n;if(0!==o){var f=Math.pow(u,2)-4*a*o;if(!(f<0)){var c=(-u+Math.sqrt(f))/(2*o);0<c&&c<1&&(t?this.addX(this.sumCubic(c,n,r,e,i)):this.addY(this.sumCubic(c,n,r,e,i)));var s=(-u-Math.sqrt(f))/(2*o);0<s&&s<1&&(t?this.addX(this.sumCubic(s,n,r,e,i)):this.addY(this.sumCubic(s,n,r,e,i)))}}else{if(0===u)return;var h=-a/u;0<h&&h<1&&(t?this.addX(this.sumCubic(h,n,r,e,i)):this.addY(this.sumCubic(h,n,r,e,i)))}}},{key:"addBezierCurve",value:function(t,n,r,e,i,u,o,a){this.addPoint(t,n),this.addPoint(o,a),this.bezierCurveAdd(!0,t,r,i,o),this.bezierCurveAdd(!1,n,e,u,a)}},{key:"addQuadraticCurve",value:function(t,n,r,e,i,u){var o=t+2/3*(r-t),a=n+2/3*(e-n);this.addBezierCurve(t,n,o,o+1/3*(i-t),a,a+1/3*(u-n),i,u)}},{key:"isPointInBox",value:function(t,n){return this.x1<=t&&t<=this.x2&&this.y1<=n&&n<=this.y2}},{key:"x",get:function(){return this.x1}},{key:"y",get:function(){return this.y1}},{key:"width",get:function(){return this.x2-this.x1}},{key:"height",get:function(){return this.y2-this.y1}}]),t}();var qt=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t){var n;return O.default(this,i),(n=e.call(this,t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,""))).control=null,n.start=null,n.current=null,n.command=null,n.commands=n.commands,n.i=-1,n.previousCommand=null,n.points=[],n.angles=[],n}return j.default(i,[{key:"reset",value:function(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new xt(0,0),this.control=new xt(0,0),this.current=new xt(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){return this.i>=this.commands.length-1}},{key:"next",value:function(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}},{key:"getPoint",value:function(){var t=new xt(this.command[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x"],this.command[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y"]);return this.makeAbsolute(t)}},{key:"getAsControlPoint",value:function(t,n){var r=this.getPoint(t,n);return this.control=r,r}},{key:"getAsCurrentPoint",value:function(t,n){var r=this.getPoint(t,n);return this.current=r,r}},{key:"getReflectedControlPoint",value:function(){var t=this.previousCommand.type;if(t!==b.SVGPathData.CURVE_TO&&t!==b.SVGPathData.SMOOTH_CURVE_TO&&t!==b.SVGPathData.QUAD_TO&&t!==b.SVGPathData.SMOOTH_QUAD_TO)return this.current;var n=this.current,r=this.control;return new xt(2*n.x-r.x,2*n.y-r.y)}},{key:"makeAbsolute",value:function(t){if(this.command.relative){var n=this.current,r=n.y;t.x+=n.x,t.y+=r}return t}},{key:"addMarker",value:function(t,n,r){var e=this.points,i=this.angles;r&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=e[e.length-1].angleTo(r)),this.addMarkerAngle(t,n?n.angleTo(t):null)}},{key:"addMarkerAngle",value:function(t,n){this.points.push(t),this.angles.push(n)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var t=this.angles,n=t.length,r=0;r<n;r++)if(!t[r])for(var e=r+1;e<n;e++)if(t[e]){t[r]=t[e];break}return t}}]),i}(b.SVGPathData);var Yt=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).modifiedEmSizeStack=!1,t}return j.default(i,[{key:"calculateOpacity",value:function(){for(var t=1,n=this;n;){var r=n.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),n=n.parent}return t}},{key:"setContext",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!n){var r=this.getStyle("fill"),e=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),u=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var o=r.getFillStyleDefinition(this,e);o&&(t.fillStyle=o)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var a=r.getColor();"inherit"!==a&&(t.fillStyle="none"===a?"rgba(0,0,0,0)":a)}if(e.hasValue()){var f=new wt(this.document,"fill",t.fillStyle).addOpacity(e).getColor();t.fillStyle=f}if(i.isUrlDefinition()){var c=i.getFillStyleDefinition(this,u);c&&(t.strokeStyle=c)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var s=i.getString();"inherit"!==s&&(t.strokeStyle="none"===s?"rgba(0,0,0,0)":s)}if(u.hasValue()){var h=new wt(this.document,"stroke",t.strokeStyle).addOpacity(u).getString();t.strokeStyle=h}var v=this.getStyle("stroke-width");if(v.hasValue()){var l=v.getPixels();t.lineWidth=l||tt}var y=this.getStyle("stroke-linecap"),d=this.getStyle("stroke-linejoin"),p=this.getStyle("stroke-miterlimit"),b=this.getStyle("stroke-dasharray"),g=this.getStyle("stroke-dashoffset");if(y.hasValue()&&(t.lineCap=y.getString()),d.hasValue()&&(t.lineJoin=d.getString()),p.hasValue()&&(t.miterLimit=p.getNumber()),b.hasValue()&&"none"!==b.getString()){var m=$(b.getString());void 0!==t.setLineDash?t.setLineDash(m):void 0!==t.webkitLineDash?t.webkitLineDash=m:void 0===t.mozDash||1===m.length&&0===m[0]||(t.mozDash=m);var w=g.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=w:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=w:void 0!==t.mozDashOffset&&(t.mozDashOffset=w)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var k=this.getStyle("font"),x=this.getStyle("font-style"),R=this.getStyle("font-variant"),M=this.getStyle("font-weight"),O=this.getStyle("font-size"),j=this.getStyle("font-family"),S=new Vt(x.getString(),R.getString(),M.getString(),O.hasValue()?"".concat(O.getPixels(!0),"px"):"",j.getString(),Vt.parse(k.getString(),t.font));x.setValue(S.fontStyle),R.setValue(S.fontVariant),M.setValue(S.fontWeight),O.setValue(S.fontSize),j.setValue(S.fontFamily),t.font=S.toString(),O.isPixels()&&(this.document.emSize=O.getPixels(),this.modifiedEmSizeStack=!0)}n||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(t){T.default(E.default(i.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),i}(Dt);var Wt=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="path",u.pathParser=null,u.pathParser=new qt(u.getAttribute("d").getString()),u}return j.default(i,[{key:"path",value:function(t){var n=this.pathParser,r=new Ut;for(n.reset(),t&&t.beginPath();!n.isEnd();)switch(n.next().type){case qt.MOVE_TO:this.pathM(t,r);break;case qt.LINE_TO:this.pathL(t,r);break;case qt.HORIZ_LINE_TO:this.pathH(t,r);break;case qt.VERT_LINE_TO:this.pathV(t,r);break;case qt.CURVE_TO:this.pathC(t,r);break;case qt.SMOOTH_CURVE_TO:this.pathS(t,r);break;case qt.QUAD_TO:this.pathQ(t,r);break;case qt.SMOOTH_QUAD_TO:this.pathT(t,r);break;case qt.ARC:this.pathA(t,r);break;case qt.CLOSE_PATH:this.pathZ(t,r)}return r}},{key:"getBoundingBox",value:function(){return this.path()}},{key:"getMarkers",value:function(){var t=this.pathParser,n=t.getMarkerPoints(),r=t.getMarkerAngles(),e=n.map((function(t,n){return[t,r[n]]}));return e}},{key:"renderChildren",value:function(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var n=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==n.getString("inherit")?t.fill(n.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var e=r.length-1,i=this.getStyle("marker-start"),u=this.getStyle("marker-mid"),o=this.getStyle("marker-end");if(i.isUrlDefinition()){var a=i.getDefinition(),f=R.default(r[0],2);a.render(t,f[0],f[1])}if(u.isUrlDefinition())for(var c=u.getDefinition(),s=1;s<e;s++){var h=R.default(r[s],2);c.render(t,h[0],h[1])}if(o.isUrlDefinition()){var v=o.getDefinition(),l=R.default(r[e],2);v.render(t,l[0],l[1])}}}},{key:"pathM",value:function(t,n){var r=this.pathParser,e=i.pathM(r).point,u=e.x,o=e.y;r.addMarker(e),n.addPoint(u,o),t&&t.moveTo(u,o)}},{key:"pathL",value:function(t,n){var r=this.pathParser,e=i.pathL(r),u=e.point,o=u.x,a=u.y;r.addMarker(u,e.current),n.addPoint(o,a),t&&t.lineTo(o,a)}},{key:"pathH",value:function(t,n){var r=this.pathParser,e=i.pathH(r),u=e.point,o=u.x,a=u.y;r.addMarker(u,e.current),n.addPoint(o,a),t&&t.lineTo(o,a)}},{key:"pathV",value:function(t,n){var r=this.pathParser,e=i.pathV(r),u=e.point,o=u.x,a=u.y;r.addMarker(u,e.current),n.addPoint(o,a),t&&t.lineTo(o,a)}},{key:"pathC",value:function(t,n){var r=this.pathParser,e=i.pathC(r),u=e.current,o=e.point,a=e.controlPoint,f=e.currentPoint;r.addMarker(f,a,o),n.addBezierCurve(u.x,u.y,o.x,o.y,a.x,a.y,f.x,f.y),t&&t.bezierCurveTo(o.x,o.y,a.x,a.y,f.x,f.y)}},{key:"pathS",value:function(t,n){var r=this.pathParser,e=i.pathS(r),u=e.current,o=e.point,a=e.controlPoint,f=e.currentPoint;r.addMarker(f,a,o),n.addBezierCurve(u.x,u.y,o.x,o.y,a.x,a.y,f.x,f.y),t&&t.bezierCurveTo(o.x,o.y,a.x,a.y,f.x,f.y)}},{key:"pathQ",value:function(t,n){var r=this.pathParser,e=i.pathQ(r),u=e.current,o=e.controlPoint,a=e.currentPoint;r.addMarker(a,o,o),n.addQuadraticCurve(u.x,u.y,o.x,o.y,a.x,a.y),t&&t.quadraticCurveTo(o.x,o.y,a.x,a.y)}},{key:"pathT",value:function(t,n){var r=this.pathParser,e=i.pathT(r),u=e.current,o=e.controlPoint,a=e.currentPoint;r.addMarker(a,o,o),n.addQuadraticCurve(u.x,u.y,o.x,o.y,a.x,a.y),t&&t.quadraticCurveTo(o.x,o.y,a.x,a.y)}},{key:"pathA",value:function(t,n){var r=this.pathParser,e=i.pathA(r),u=e.currentPoint,o=e.rX,a=e.rY,f=e.sweepFlag,c=e.xAxisRotation,s=e.centp,h=e.a1,v=e.ad,l=1-f?1:-1,y=h+l*(v/2),d=new xt(s.x+o*Math.cos(y),s.y+a*Math.sin(y));if(r.addMarkerAngle(d,y-l*Math.PI/2),r.addMarkerAngle(u,y-l*Math.PI),n.addPoint(u.x,u.y),t&&!isNaN(h)&&!isNaN(v)){var p=o>a?o:a,b=o>a?1:o/a,g=o>a?a/o:1;t.translate(s.x,s.y),t.rotate(c),t.scale(b,g),t.arc(0,0,p,h,h+v,Boolean(1-f)),t.scale(1/b,1/g),t.rotate(-c),t.translate(-s.x,-s.y)}}},{key:"pathZ",value:function(t,n){i.pathZ(this.pathParser),t&&n.x1!==n.x2&&n.y1!==n.y2&&t.closePath()}}],[{key:"pathM",value:function(t){var n=t.getAsCurrentPoint();return t.start=t.current,{point:n}}},{key:"pathL",value:function(t){return{current:t.current,point:t.getAsCurrentPoint()}}},{key:"pathH",value:function(t){var n=t.current,r=t.command,e=new xt((r.relative?n.x:0)+r.x,n.y);return t.current=e,{current:n,point:e}}},{key:"pathV",value:function(t){var n=t.current,r=t.command,e=new xt(n.x,(r.relative?n.y:0)+r.y);return t.current=e,{current:n,point:e}}},{key:"pathC",value:function(t){return{current:t.current,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathS",value:function(t){return{current:t.current,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathQ",value:function(t){return{current:t.current,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathT",value:function(t){var n=t.current,r=t.getReflectedControlPoint();return t.control=r,{current:n,controlPoint:r,currentPoint:t.getAsCurrentPoint()}}},{key:"pathA",value:function(t){var n=t.current,r=t.command,e=r.rX,i=r.rY,u=r.lArcFlag,o=r.sweepFlag,a=r.xRot*(Math.PI/180),f=t.getAsCurrentPoint(),c=new xt(Math.cos(a)*(n.x-f.x)/2+Math.sin(a)*(n.y-f.y)/2,-Math.sin(a)*(n.x-f.x)/2+Math.cos(a)*(n.y-f.y)/2),s=Math.pow(c.x,2)/Math.pow(e,2)+Math.pow(c.y,2)/Math.pow(i,2);s>1&&(e*=Math.sqrt(s),i*=Math.sqrt(s));var h=(u===o?-1:1)*Math.sqrt((Math.pow(e,2)*Math.pow(i,2)-Math.pow(e,2)*Math.pow(c.y,2)-Math.pow(i,2)*Math.pow(c.x,2))/(Math.pow(e,2)*Math.pow(c.y,2)+Math.pow(i,2)*Math.pow(c.x,2)));isNaN(h)&&(h=0);var v=new xt(h*e*c.y/i,h*-i*c.x/e),l=new xt((n.x+f.x)/2+Math.cos(a)*v.x-Math.sin(a)*v.y,(n.y+f.y)/2+Math.sin(a)*v.x+Math.cos(a)*v.y),y=ft([1,0],[(c.x-v.x)/e,(c.y-v.y)/i]),d=[(c.x-v.x)/e,(c.y-v.y)/i],p=[(-c.x-v.x)/e,(-c.y-v.y)/i],b=ft(d,p);return at(d,p)<=-1&&(b=Math.PI),at(d,p)>=1&&(b=0),{currentPoint:f,rX:e,rY:i,sweepFlag:o,xAxisRotation:a,centp:l,a1:y,ad:b}}},{key:"pathZ",value:function(t){t.current=t.start}}]),i}(Yt);var Ht=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="glyph",u.horizAdvX=u.getAttribute("horiz-adv-x").getNumber(),u.unicode=u.getAttribute("unicode").getString(),u.arabicForm=u.getAttribute("arabic-form").getString(),u}return i}(Wt);var Xt=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,(this instanceof i?this.constructor:void 0)===i||r)).type="text",u.x=0,u.y=0,u.measureCache=-1,u}return j.default(i,[{key:"setContext",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];T.default(E.default(i.prototype),"setContext",this).call(this,t,n);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(t.textBaseline=r)}},{key:"initializeCoordinates",value:function(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}},{key:"getBoundingBox",value:function(t){var n=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var r=null;return this.children.forEach((function(e,i){var u=n.getChildBoundingBox(t,n,n,i);r?r.addBoundingBox(u):r=u})),r}},{key:"getFontSize",value:function(){var t=this.parent,n=Vt.parse(this.document.ctx.font).fontSize;return t.getStyle("font-size").getNumber(n)}},{key:"getTElementBoundingBox",value:function(t){var n=this.getFontSize();return new Ut(this.x,this.y-n,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function(t,n,r){var e=n[r],i=null;if(t.isArabic){var u=n.length,o=n[r-1],a=n[r+1],f="isolated";if((0===r||" "===o)&&r<u-1&&" "!==a&&(f="terminal"),r>0&&" "!==o&&r<u-1&&" "!==a&&(f="medial"),r>0&&" "!==o&&(r===u-1||" "===a)&&(f="initial"),void 0!==t.glyphs[e]){var c=t.glyphs[e];i=c instanceof Ht?c:c[f]}}else i=t.glyphs[e];return i||(i=t.missingGlyph),i}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(t){var n=t||this.node,r=Array.from(n.parentNode.childNodes),e=r.indexOf(n),i=r.length-1,u=I(n.textContent||"");return 0===e&&(u=F(u)),e===i&&(u=D(u)),u}},{key:"renderChildren",value:function(t){var n=this;if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((function(r,e){n.renderChild(t,n,n,e)}));var r=this.document.screen.mouse;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function(t){var n=this.document,r=this.parent,e=this.getText(),i=r.getStyle("font-family").getDefinition();if(i)for(var u=i.fontFace.unitsPerEm,o=Vt.parse(n.ctx.font),a=r.getStyle("font-size").getNumber(o.fontSize),f=r.getStyle("font-style").getString(o.fontStyle),c=a/u,s=i.isRTL?e.split("").reverse().join(""):e,h=$(r.getAttribute("dx").getString()),v=s.length,l=0;l<v;l++){var y=this.getGlyph(i,s,l);t.translate(this.x,this.y),t.scale(c,-c);var d=t.lineWidth;t.lineWidth=t.lineWidth*u/a,"italic"===f&&t.transform(1,0,.4,1,0,0),y.render(t),"italic"===f&&t.transform(1,0,-.4,1,0,0),t.lineWidth=d,t.scale(1/c,-1/c),t.translate(-this.x,-this.y),this.x+=a*(y.horizAdvX||i.horizAdvX)/u,void 0===h[l]||isNaN(h[l])||(this.x+=h[l])}else{var p=this.x,b=this.y;t.fillStyle&&t.fillText(e,p,b),t.strokeStyle&&t.strokeText(e,p,b)}}},{key:"applyAnchoring",value:function(){if(!(this.textChunkStart>=this.leafTexts.length)){var t,n=this.leafTexts[this.textChunkStart],r=n.getStyle("text-anchor").getString("start");t="start"===r?n.x-this.minX:"end"===r?n.x-this.maxX:n.x-(this.minX+this.maxX)/2;for(var e=this.textChunkStart;e<this.leafTexts.length;e++)this.leafTexts[e].x+=t;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}},{key:"adjustChildCoordinatesRecursive",value:function(t){var n=this;this.children.forEach((function(r,e){n.adjustChildCoordinatesRecursiveCore(t,n,n,e)})),this.applyAnchoring()}},{key:"adjustChildCoordinatesRecursiveCore",value:function(t,n,r,e){var i=r.children[e];i.children.length>0?i.children.forEach((function(r,e){n.adjustChildCoordinatesRecursiveCore(t,n,i,e)})):this.adjustChildCoordinates(t,n,r,e)}},{key:"adjustChildCoordinates",value:function(t,n,r,e){var i=r.children[e];if("function"!=typeof i.measureText)return i;t.save(),i.setContext(t,!0);var u=i.getAttribute("x"),o=i.getAttribute("y"),a=i.getAttribute("dx"),f=i.getAttribute("dy"),c=i.getStyle("font-family").getDefinition(),s=Boolean(c)&&c.isRTL;0===e&&(u.hasValue()||u.setValue(i.getInheritedAttribute("x")),o.hasValue()||o.setValue(i.getInheritedAttribute("y")),a.hasValue()||a.setValue(i.getInheritedAttribute("dx")),f.hasValue()||f.setValue(i.getInheritedAttribute("dy")));var h=i.measureText(t);return s&&(n.x-=h),u.hasValue()?(n.applyAnchoring(),i.x=u.getPixels("x"),a.hasValue()&&(i.x+=a.getPixels("x"))):(a.hasValue()&&(n.x+=a.getPixels("x")),i.x=n.x),n.x=i.x,s||(n.x+=h),o.hasValue()?(i.y=o.getPixels("y"),f.hasValue()&&(i.y+=f.getPixels("y"))):(f.hasValue()&&(n.y+=f.getPixels("y")),i.y=n.y),n.y=i.y,n.leafTexts.push(i),n.minX=Math.min(n.minX,i.x,i.x+h),n.maxX=Math.max(n.maxX,i.x,i.x+h),i.clearContext(t),t.restore(),i}},{key:"getChildBoundingBox",value:function(t,n,r,e){var i=r.children[e];if("function"!=typeof i.getBoundingBox)return null;var u=i.getBoundingBox(t);return u?(i.children.forEach((function(r,e){var o=n.getChildBoundingBox(t,n,i,e);u.addBoundingBox(o)})),u):null}},{key:"renderChild",value:function(t,n,r,e){var i=r.children[e];i.render(t),i.children.forEach((function(r,e){n.renderChild(t,n,i,e)}))}},{key:"measureText",value:function(t){var n=this.measureCache;if(~n)return n;var r=this.getText(),e=this.measureTargetText(t,r);return this.measureCache=e,e}},{key:"measureTargetText",value:function(t,n){if(!n.length)return 0;var r=this.parent,e=r.getStyle("font-family").getDefinition();if(e){for(var i=this.getFontSize(),u=e.isRTL?n.split("").reverse().join(""):n,o=$(r.getAttribute("dx").getString()),a=u.length,f=0,c=0;c<a;c++)f+=(this.getGlyph(e,u,c).horizAdvX||e.horizAdvX)*i/e.fontFace.unitsPerEm,void 0===o[c]||isNaN(o[c])||(f+=o[c]);return f}if(!t.measureText)return 10*n.length;t.save(),this.setContext(t,!0);var s=t.measureText(n).width;return this.clearContext(t),t.restore(),s}},{key:"getInheritedAttribute",value:function(t){for(var n=this;n instanceof i&&n.isFirstChild();){var r=n.parent.getAttribute(t);if(r.hasValue(!0))return r.getValue("0");n=n.parent}return null}}]),i}(Yt);var Kt=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,(this instanceof i?this.constructor:void 0)===i||r)).type="tspan",u.text=u.children.length>0?"":u.getTextFromNode(),u}return j.default(i,[{key:"getText",value:function(){return this.text}}]),i}(Xt);var Jt=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="textNode",t}return i}(Kt);var tn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="svg",t.root=!1,t}return j.default(i,[{key:"setContext",value:function(t){var n,r=this.document,e=r.screen,u=r.window,o=t.canvas;if(e.setDefaults(t),o.style&&void 0!==t.font&&u&&void 0!==u.getComputedStyle){t.font=u.getComputedStyle(o).getPropertyValue("font");var a=new wt(r,"fontSize",Vt.parse(t.font).fontSize);a.hasValue()&&(r.rootEmSize=a.getPixels("y"),r.emSize=r.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var f=e.viewPort,c=f.width,s=f.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var h=this.getAttribute("refX"),v=this.getAttribute("refY"),l=this.getAttribute("viewBox"),y=l.hasValue()?$(l.getString()):null,d=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),p=0,b=0,g=0,m=0;y&&(p=y[0],b=y[1]),this.root||(c=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y"),"marker"===this.type&&(g=p,m=b,p=0,b=0)),e.viewPort.setCurrent(c,s),!this.node||this.parent&&"foreignObject"!==(null===(n=this.node.parentNode)||void 0===n?void 0:n.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),T.default(E.default(i.prototype),"setContext",this).call(this,t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),y&&(c=y[2],s=y[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:e.viewPort.width,desiredWidth:c,height:e.viewPort.height,desiredHeight:s,minX:p,minY:b,refX:h.getValue(),refY:v.getValue(),clip:d,clipX:g,clipY:m}),y&&(e.viewPort.removeCurrent(),e.viewPort.setCurrent(c,s))}},{key:"clearContext",value:function(t){T.default(E.default(i.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"resize",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=this.getAttribute("width",!0),i=this.getAttribute("height",!0),u=this.getAttribute("viewBox"),o=this.getAttribute("style"),a=e.getNumber(0),f=i.getNumber(0);if(r)if("string"==typeof r)this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(e.setValue(t),i.setValue(n),u.hasValue()||u.setValue("0 0 ".concat(a||t," ").concat(f||n)),o.hasValue()){var s=this.getStyle("width"),h=this.getStyle("height");s.hasValue()&&s.setValue("".concat(t,"px")),h.hasValue()&&h.setValue("".concat(n,"px"))}}}]),i}(Yt);var en=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="rect",t}return j.default(i,[{key:"path",value:function(t){var n=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),e=this.getStyle("width",!1,!0).getPixels("x"),i=this.getStyle("height",!1,!0).getPixels("y"),u=this.getAttribute("rx"),o=this.getAttribute("ry"),a=u.getPixels("x"),f=o.getPixels("y");if(u.hasValue()&&!o.hasValue()&&(f=a),o.hasValue()&&!u.hasValue()&&(a=f),a=Math.min(a,e/2),f=Math.min(f,i/2),t){var c=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&e>0&&(t.moveTo(n+a,r),t.lineTo(n+e-a,r),t.bezierCurveTo(n+e-a+c*a,r,n+e,r+f-c*f,n+e,r+f),t.lineTo(n+e,r+i-f),t.bezierCurveTo(n+e,r+i-f+c*f,n+e-a+c*a,r+i,n+e-a,r+i),t.lineTo(n+a,r+i),t.bezierCurveTo(n+a-c*a,r+i,n,r+i-f+c*f,n,r+i-f),t.lineTo(n,r+f),t.bezierCurveTo(n,r+f-c*f,n+a-c*a,r,n+a,r),t.closePath())}return new Ut(n,r,n+e,r+i)}},{key:"getMarkers",value:function(){return null}}]),i}(Wt);var un=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="circle",t}return j.default(i,[{key:"path",value:function(t){var n=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),e=this.getAttribute("r").getPixels();return t&&e>0&&(t.beginPath(),t.arc(n,r,e,0,2*Math.PI,!1),t.closePath()),new Ut(n-e,r-e,n+e,r+e)}},{key:"getMarkers",value:function(){return null}}]),i}(Wt);var on=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="ellipse",t}return j.default(i,[{key:"path",value:function(t){var n=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),e=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),u=this.getAttribute("cy").getPixels("y");return t&&r>0&&e>0&&(t.beginPath(),t.moveTo(i+r,u),t.bezierCurveTo(i+r,u+n*e,i+n*r,u+e,i,u+e),t.bezierCurveTo(i-n*r,u+e,i-r,u+n*e,i-r,u),t.bezierCurveTo(i-r,u-n*e,i-n*r,u-e,i,u-e),t.bezierCurveTo(i+n*r,u-e,i+r,u-n*e,i+r,u),t.closePath()),new Ut(i-r,u-e,i+r,u+e)}},{key:"getMarkers",value:function(){return null}}]),i}(Wt);var an=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="line",t}return j.default(i,[{key:"getPoints",value:function(){return[new xt(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new xt(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(t){var n=this.getPoints(),r=R.default(n,2),e=r[0],i=e.x,u=e.y,o=r[1],a=o.x,f=o.y;return t&&(t.beginPath(),t.moveTo(i,u),t.lineTo(a,f)),new Ut(i,u,a,f)}},{key:"getMarkers",value:function(){var t=this.getPoints(),n=R.default(t,2),r=n[0],e=n[1],i=r.angleTo(e);return[[r,i],[e,i]]}}]),i}(Wt);var sn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="polyline",u.points=[],u.points=xt.parsePath(u.getAttribute("points").getString()),u}return j.default(i,[{key:"path",value:function(t){var n=this.points,r=R.default(n,1)[0],e=r.x,i=r.y,u=new Ut(e,i);return t&&(t.beginPath(),t.moveTo(e,i)),n.forEach((function(n){var r=n.x,e=n.y;u.addPoint(r,e),t&&t.lineTo(r,e)})),u}},{key:"getMarkers",value:function(){var t=this.points,n=t.length-1,r=[];return t.forEach((function(e,i){i!==n&&r.push([e,e.angleTo(t[i+1])])})),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}]),i}(Wt);var hn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="polygon",t}return j.default(i,[{key:"path",value:function(t){var n=T.default(E.default(i.prototype),"path",this).call(this,t),r=R.default(this.points,1)[0];return t&&(t.lineTo(r.x,r.y),t.closePath()),n}}]),i}(sn);var ln=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="pattern",t}return j.default(i,[{key:"createPattern",value:function(t,n,r){var e=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),u=new tn(this.document,null);u.attributes.viewBox=new wt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.width=new wt(this.document,"width","".concat(e,"px")),u.attributes.height=new wt(this.document,"height","".concat(i,"px")),u.attributes.transform=new wt(this.document,"transform",this.getAttribute("patternTransform").getValue()),u.children=this.children;var o=this.document.createCanvas(e,i),a=o.getContext("2d"),f=this.getAttribute("x"),c=this.getAttribute("y");f.hasValue()&&c.hasValue()&&a.translate(f.getPixels("x",!0),c.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var s=-1;s<=1;s++)for(var h=-1;h<=1;h++)a.save(),u.attributes.x=new wt(this.document,"x",s*o.width),u.attributes.y=new wt(this.document,"y",h*o.height),u.render(a),a.restore();return t.createPattern(o,"repeat")}}]),i}(Dt);var yn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="marker",t}return j.default(i,[{key:"render",value:function(t,n,r){if(n){var e=n.x,i=n.y,u=this.getAttribute("orient").getString("auto"),o=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(e,i),"auto"===u&&t.rotate(r),"strokeWidth"===o&&t.scale(t.lineWidth,t.lineWidth),t.save();var a=new tn(this.document,null);a.type=this.type,a.attributes.viewBox=new wt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.refX=new wt(this.document,"refX",this.getAttribute("refX").getValue()),a.attributes.refY=new wt(this.document,"refY",this.getAttribute("refY").getValue()),a.attributes.width=new wt(this.document,"width",this.getAttribute("markerWidth").getValue()),a.attributes.height=new wt(this.document,"height",this.getAttribute("markerHeight").getValue()),a.attributes.overflow=new wt(this.document,"overflow",this.getAttribute("overflow").getValue()),a.attributes.fill=new wt(this.document,"fill",this.getAttribute("fill").getColor("black")),a.attributes.stroke=new wt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),a.children=this.children,a.render(t),t.restore(),"strokeWidth"===o&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===u&&t.rotate(-r),t.translate(-e,-i)}}}]),i}(Dt);var dn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="defs",t}return j.default(i,[{key:"render",value:function(){}}]),i}(Dt);var pn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="g",t}return j.default(i,[{key:"getBoundingBox",value:function(t){var n=new Ut;return this.children.forEach((function(r){n.addBoundingBox(r.getBoundingBox(t))})),n}}]),i}(Yt);var bn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).attributesToInherit=["gradientUnits"],u.stops=[];var o=C.default(u),a=o.stops;return o.children.forEach((function(t){"stop"===t.type&&a.push(t)})),u}return j.default(i,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(t,n,r){var e=this,i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var u=i.stops,o=this.getGradient(t,n);if(!o)return this.addParentOpacity(r,u[u.length-1].color);if(u.forEach((function(t){o.addColorStop(t.offset,e.addParentOpacity(r,t.color))})),this.getAttribute("gradientTransform").hasValue()){var a=this.document,f=a.screen,c=f.MAX_VIRTUAL_PIXELS,s=R.default(f.viewPort.viewPorts,1)[0],h=new en(a,null);h.attributes.x=new wt(a,"x",-c/3),h.attributes.y=new wt(a,"y",-c/3),h.attributes.width=new wt(a,"width",c),h.attributes.height=new wt(a,"height",c);var v=new pn(a,null);v.attributes.transform=new wt(a,"transform",this.getAttribute("gradientTransform").getValue()),v.children=[h];var l=new tn(a,null);l.attributes.x=new wt(a,"x",0),l.attributes.y=new wt(a,"y",0),l.attributes.width=new wt(a,"width",s.width),l.attributes.height=new wt(a,"height",s.height),l.children=[v];var y=a.createCanvas(s.width,s.height),d=y.getContext("2d");return d.fillStyle=o,l.render(d),d.createPattern(y,"no-repeat")}return o}},{key:"inheritStopContainer",value:function(t){var n=this;this.attributesToInherit.forEach((function(r){!n.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&n.getAttribute(r,!0).setValue(t.getAttribute(r).getValue())}))}},{key:"addParentOpacity",value:function(t,n){return t.hasValue()?new wt(this.document,"color",n).addOpacity(t).getColor():n}}]),i}(Dt);var gn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="linearGradient",u.attributesToInherit.push("x1","y1","x2","y2"),u}return j.default(i,[{key:"getGradient",value:function(t,n){var r="objectBoundingBox"===this.getGradientUnits(),e=r?n.getBoundingBox(t):null;if(r&&!e)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var i=r?e.x+e.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),u=r?e.y+e.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),o=r?e.x+e.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),a=r?e.y+e.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===o&&u===a?null:t.createLinearGradient(i,u,o,a)}}]),i}(bn);var mn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="radialGradient",u.attributesToInherit.push("cx","cy","r","fx","fy","fr"),u}return j.default(i,[{key:"getGradient",value:function(t,n){var r="objectBoundingBox"===this.getGradientUnits(),e=n.getBoundingBox(t);if(r&&!e)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var i=r?e.x+e.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),u=r?e.y+e.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),o=i,a=u;this.getAttribute("fx").hasValue()&&(o=r?e.x+e.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(a=r?e.y+e.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var f=r?(e.width+e.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return t.createRadialGradient(o,a,c,i,u,f)}}]),i}(bn);var wn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).type="stop";var o=Math.max(0,Math.min(1,u.getAttribute("offset").getNumber())),a=u.getStyle("stop-opacity"),f=u.getStyle("stop-color",!0);return""===f.getString()&&f.setValue("#000"),a.hasValue()&&(f=f.addOpacity(a)),u.offset=o,u.color=f.getColor(),u}return i}(Dt);var kn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).type="animate",u.duration=0,u.initialValue=null,u.initialUnits="",u.removed=!1,u.frozen=!1,t.screen.animations.push(C.default(u)),u.begin=u.getAttribute("begin").getMilliseconds(),u.maxDuration=u.begin+u.getAttribute("dur").getMilliseconds(),u.from=u.getAttribute("from"),u.to=u.getAttribute("to"),u.values=new wt(t,"values",null);var o=u.getAttribute("values");return o.hasValue()&&u.values.setValue(o.getString().split(";")),u}return j.default(i,[{key:"getProperty",value:function(){var t=this.getAttribute("attributeType").getString(),n=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(n,!0):this.parent.getAttribute(n,!0)}},{key:"calcValue",value:function(){var t=this.initialUnits,n=this.getProgress(),r=n.progress,e=n.from,i=n.to,u=e.getNumber()+(i.getNumber()-e.getNumber())*r;return"%"===t&&(u*=100),"".concat(u).concat(t)}},{key:"update",value:function(t){var n=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var e=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==e||this.frozen){if("remove"===e&&!this.removed)return this.removed=!0,r.setValue(n.animationFrozen?n.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,n.animationFrozen=!0,n.animationFrozenValue=r.getString();return!1}this.duration+=t;var i=!1;if(this.begin<this.duration){var u=this.calcValue(),o=this.getAttribute("type");if(o.hasValue()){var a=o.getString();u="".concat(a,"(").concat(u,")")}r.setValue(u),i=!0}return i}},{key:"getProgress",value:function(){var t=this.document,n=this.values,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(n.hasValue()){var e=r.progress*(n.getValue().length-1),i=Math.floor(e),u=Math.ceil(e);r.from=new wt(t,"from",parseFloat(n.getValue()[i])),r.to=new wt(t,"to",parseFloat(n.getValue()[u])),r.progress=(e-i)/(u-i)}else r.from=this.from,r.to=this.to;return r}}]),i}(Dt);var xn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="animateColor",t}return j.default(i,[{key:"calcValue",value:function(){var t=this.getProgress(),n=t.progress,r=t.to,e=new N.default(t.from.getColor()),i=new N.default(r.getColor());if(e.ok&&i.ok){var u=e.g+(i.g-e.g)*n,o=e.b+(i.b-e.b)*n;return"rgb(".concat(Math.floor(e.r+(i.r-e.r)*n),", ").concat(Math.floor(u),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}]),i}(kn);var Rn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="animateTransform",t}return j.default(i,[{key:"calcValue",value:function(){var t=this.getProgress(),n=t.progress,r=t.to,e=$(t.from.getString()),i=$(r.getString()),u=e.map((function(t,r){return t+(i[r]-t)*n})).join(" ");return u}}]),i}(kn);function Mn(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var On=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).type="font",u.glyphs=Object.create(null),u.horizAdvX=u.getAttribute("horiz-adv-x").getNumber();var o,a=t.definitions,f=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return Mn(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mn(t,n):void 0}}(t))||n){r&&(t=r);var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,u=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw u}}}}(C.default(u).children);try{for(f.s();!(o=f.n()).done;){var c=o.value;switch(c.type){case"font-face":u.fontFace=c;var s=c.getStyle("font-family");s.hasValue()&&(a[s.getString()]=C.default(u));break;case"missing-glyph":u.missingGlyph=c;break;case"glyph":var h=c;h.arabicForm?(u.isRTL=!0,u.isArabic=!0,void 0===u.glyphs[h.unicode]&&(u.glyphs[h.unicode]=Object.create(null)),u.glyphs[h.unicode][h.arabicForm]=h):u.glyphs[h.unicode]=h}}}catch(t){f.e(t)}finally{f.f()}return u}return j.default(i,[{key:"render",value:function(){}}]),i}(Dt);var jn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="font-face",u.ascent=u.getAttribute("ascent").getNumber(),u.descent=u.getAttribute("descent").getNumber(),u.unitsPerEm=u.getAttribute("units-per-em").getNumber(),u}return i}(Dt);var Sn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return i}(Wt);var Nn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="tref",t}return j.default(i,[{key:"getText",value:function(){var t=this.getHrefAttribute().getDefinition();if(t){var n=t.children[0];if(n)return n.getText()}return""}}]),i}(Xt);var Bn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).type="a";var o=n.childNodes,a=o[0],f=o.length>0&&Array.from(o).every((function(t){return 3===t.nodeType}));return u.hasText=f,u.text=f?u.getTextFromNode(a):"",u}return j.default(i,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(t){if(this.hasText){T.default(E.default(i.prototype),"renderChildren",this).call(this,t);var n=this.document,r=this.x,e=this.y,u=n.screen.mouse,o=new wt(n,"fontSize",Vt.parse(n.ctx.font).fontSize);u.isWorking()&&u.checkBoundingBox(this,new Ut(r,e-o.getPixels("y"),r+this.measureText(t),e))}else if(this.children.length>0){var a=new pn(this.document,null);a.children=this.children,a.parent=this,a.render(t)}}},{key:"onClick",value:function(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){this.document.ctx.canvas.style.cursor="pointer"}}]),i}(Xt);function Pn(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function En(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function An(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?En(Object(r),!0).forEach((function(n){M.default(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):En(Object(r)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))}))}return t}var Tn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).type="textPath",u.textWidth=0,u.textHeight=0,u.pathLength=-1,u.glyphInfo=null,u.letterSpacingCache=[],u.measuresCache=new Map([["",0]]);var o=u.getHrefAttribute().getDefinition();return u.text=u.getTextFromNode(),u.dataArray=u.parsePathData(o),u}return j.default(i,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(t){var n=this.dataArray;t&&t.beginPath(),n.forEach((function(n){var r=n.points;switch(n.type){case qt.LINE_TO:t&&t.lineTo(r[0],r[1]);break;case qt.MOVE_TO:t&&t.moveTo(r[0],r[1]);break;case qt.CURVE_TO:t&&t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case qt.QUAD_TO:t&&t.quadraticCurveTo(r[0],r[1],r[2],r[3]);break;case qt.ARC:var e=R.default(r,8),i=e[0],u=e[1],o=e[2],a=e[3],f=e[4],c=e[5],s=e[6],h=e[7],v=o>a?o:a,l=o>a?1:o/a,y=o>a?a/o:1;t&&(t.translate(i,u),t.rotate(s),t.scale(l,y),t.arc(0,0,v,f,f+c,Boolean(1-h)),t.scale(1/l,1/y),t.rotate(-s),t.translate(-i,-u));break;case qt.CLOSE_PATH:t&&t.closePath()}}))}},{key:"renderChildren",value:function(t){this.setTextData(t),t.save();var n=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),e=this.glyphInfo,i=t.fillStyle;"underline"===n&&t.beginPath(),e.forEach((function(e,i){var u=e.p0,o=e.p1,a=e.rotation,f=e.text;t.save(),t.translate(u.x,u.y),t.rotate(a),t.fillStyle&&t.fillText(f,0,0),t.strokeStyle&&t.strokeText(f,0,0),t.restore(),"underline"===n&&(0===i&&t.moveTo(u.x,u.y+r/8),t.lineTo(o.x,o.y+r/5))})),"underline"===n&&(t.lineWidth=r/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function(){return this.letterSpacingCache[arguments.length>0&&void 0!==arguments[0]?arguments[0]:0]||0}},{key:"findSegmentToFitChar",value:function(t,n,r,e,i,u,o,a,f){var c=u,s=this.measureText(t,a);" "===a&&"justify"===n&&r<e&&(s+=(e-r)/i),f>-1&&(c+=this.getLetterSpacingAt(f));var h=this.textHeight/20,v=this.getEquidistantPointOnPath(c,h,0),l=this.getEquidistantPointOnPath(c+s,h,0),y={p0:v,p1:l},d=v&&l?Math.atan2(l.y-v.y,l.x-v.x):0;if(o){var p=Math.cos(Math.PI/2+d)*o,b=Math.cos(-d)*o;y.p0=An(An({},v),{},{x:v.x+p,y:v.y+b}),y.p1=An(An({},l),{},{x:l.x+p,y:l.y+b})}return{offset:c+=s,segment:y,rotation:d}}},{key:"measureText",value:function(t,n){var r=this.measuresCache,e=n||this.getText();if(r.has(e))return r.get(e);var i=this.measureTargetText(t,e);return r.set(e,i),i}},{key:"setTextData",value:function(t){var n=this;if(!this.glyphInfo){var r=this.getText(),e=r.split(""),i=r.split(" ").length-1,u=this.parent.getAttribute("dx").split().map((function(t){return t.getPixels("x")})),o=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),f=this.getStyle("letter-spacing"),c=this.parent.getStyle("letter-spacing"),s=0;f.hasValue()&&"inherit"!==f.getValue()?f.hasValue()&&"initial"!==f.getValue()&&"unset"!==f.getValue()&&(s=f.getPixels()):s=c.getPixels();var h=[],v=r.length;this.letterSpacingCache=h;for(var l=0;l<v;l++)h.push(void 0!==u[l]?u[l]:s);var y=h.reduce((function(t,n,r){return 0===r?0:t+n||0}),0),d=this.measureText(t),p=Math.max(d+y,0);this.textWidth=d,this.textHeight=this.getFontSize(),this.glyphInfo=[];var b=this.getPathLength(),g=this.getStyle("startOffset").getNumber(0)*b,m=0;"middle"!==a&&"center"!==a||(m=-p/2),"end"!==a&&"right"!==a||(m=-p),m+=g,e.forEach((function(r,u){var f=n.findSegmentToFitChar(t,a,p,b,i,m,o,r,u),c=f.segment;m=f.offset,c.p0&&c.p1&&n.glyphInfo.push({text:e[u],p0:c.p0,p1:c.p1,rotation:f.rotation})}))}}},{key:"parsePathData",value:function(t){if(this.pathLength=-1,!t)return[];var n=[],r=t.pathParser;for(r.reset();!r.isEnd();){var e=r.current,i=e?e.x:0,u=e?e.y:0,o=r.next(),a=o.type,f=[];switch(o.type){case qt.MOVE_TO:this.pathM(r,f);break;case qt.LINE_TO:a=this.pathL(r,f);break;case qt.HORIZ_LINE_TO:a=this.pathH(r,f);break;case qt.VERT_LINE_TO:a=this.pathV(r,f);break;case qt.CURVE_TO:this.pathC(r,f);break;case qt.SMOOTH_CURVE_TO:a=this.pathS(r,f);break;case qt.QUAD_TO:this.pathQ(r,f);break;case qt.SMOOTH_QUAD_TO:a=this.pathT(r,f);break;case qt.ARC:f=this.pathA(r);break;case qt.CLOSE_PATH:Wt.pathZ(r)}n.push(o.type!==qt.CLOSE_PATH?{type:a,points:f,start:{x:i,y:u},pathLength:this.calcLength(i,u,a,f)}:{type:qt.CLOSE_PATH,points:[],pathLength:0})}return n}},{key:"pathM",value:function(t,n){var r=Wt.pathM(t).point;n.push(r.x,r.y)}},{key:"pathL",value:function(t,n){var r=Wt.pathL(t).point;return n.push(r.x,r.y),qt.LINE_TO}},{key:"pathH",value:function(t,n){var r=Wt.pathH(t).point;return n.push(r.x,r.y),qt.LINE_TO}},{key:"pathV",value:function(t,n){var r=Wt.pathV(t).point;return n.push(r.x,r.y),qt.LINE_TO}},{key:"pathC",value:function(t,n){var r=Wt.pathC(t),e=r.point,i=r.controlPoint,u=r.currentPoint;n.push(e.x,e.y,i.x,i.y,u.x,u.y)}},{key:"pathS",value:function(t,n){var r=Wt.pathS(t),e=r.point,i=r.controlPoint,u=r.currentPoint;return n.push(e.x,e.y,i.x,i.y,u.x,u.y),qt.CURVE_TO}},{key:"pathQ",value:function(t,n){var r=Wt.pathQ(t),e=r.controlPoint,i=r.currentPoint;n.push(e.x,e.y,i.x,i.y)}},{key:"pathT",value:function(t,n){var r=Wt.pathT(t),e=r.controlPoint,i=r.currentPoint;return n.push(e.x,e.y,i.x,i.y),qt.QUAD_TO}},{key:"pathA",value:function(t){var n=Wt.pathA(t),r=n.sweepFlag,e=n.centp,i=n.ad;return 0===r&&i>0&&(i-=2*Math.PI),1===r&&i<0&&(i+=2*Math.PI),[e.x,e.y,n.rX,n.rY,n.a1,i,n.xAxisRotation,r]}},{key:"calcLength",value:function(t,n,r,e){var i=0,u=null,o=null,a=0;switch(r){case qt.LINE_TO:return this.getLineLength(t,n,e[0],e[1]);case qt.CURVE_TO:for(i=0,u=this.getPointOnCubicBezier(0,t,n,e[0],e[1],e[2],e[3],e[4],e[5]),a=.01;a<=1;a+=.01)o=this.getPointOnCubicBezier(a,t,n,e[0],e[1],e[2],e[3],e[4],e[5]),i+=this.getLineLength(u.x,u.y,o.x,o.y),u=o;return i;case qt.QUAD_TO:for(i=0,u=this.getPointOnQuadraticBezier(0,t,n,e[0],e[1],e[2],e[3]),a=.01;a<=1;a+=.01)o=this.getPointOnQuadraticBezier(a,t,n,e[0],e[1],e[2],e[3]),i+=this.getLineLength(u.x,u.y,o.x,o.y),u=o;return i;case qt.ARC:i=0;var f=e[4],c=e[5],s=e[4]+c,h=Math.PI/180;if(Math.abs(f-s)<h&&(h=Math.abs(f-s)),u=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],f,0),c<0)for(a=f-h;a>s;a-=h)o=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],a,0),i+=this.getLineLength(u.x,u.y,o.x,o.y),u=o;else for(a=f+h;a<s;a+=h)o=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],a,0),i+=this.getLineLength(u.x,u.y,o.x,o.y),u=o;return o=this.getPointOnEllipticalArc(e[0],e[1],e[2],e[3],s,0),i+this.getLineLength(u.x,u.y,o.x,o.y)}return 0}},{key:"getPointOnLine",value:function(t,n,r,e,i){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:n,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,a=(i-r)/(e-n+tt),f=Math.sqrt(t*t/(1+a*a));e<n&&(f*=-1);var c=a*f,s=null;if(e===n)s={x:u,y:o+c};else if((o-r)/(u-n+tt)===a)s={x:u+f,y:o+c};else{var h,v,l=this.getLineLength(n,r,e,i);if(l<tt)return null;var y=(u-n)*(e-n)+(o-r)*(i-r),d=this.getLineLength(u,o,h=n+(y/=l*l)*(e-n),v=r+y*(i-r)),p=Math.sqrt(t*t-d*d);f=Math.sqrt(p*p/(1+a*a)),e<n&&(f*=-1),s={x:h+f,y:v+(c=a*f)}}return s}},{key:"getPointOnPath",value:function(t){var n=this.getPathLength(),r=0,e=null;if(t<-5e-5||t-5e-5>n)return null;var i,u=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return Pn(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pn(t,n):void 0}}(t))||n){r&&(t=r);var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,u=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw u}}}}(this.dataArray);try{for(u.s();!(i=u.n()).done;){var o=i.value;if(!o||!(o.pathLength<5e-5||r+o.pathLength+5e-5<t)){var a=t-r,f=0;switch(o.type){case qt.LINE_TO:e=this.getPointOnLine(a,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case qt.ARC:var c=o.points[5],s=o.points[4]+c;if(f=o.points[4]+a/o.pathLength*c,c<0&&f<s||c>=0&&f>s)break;e=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],f,o.points[6]);break;case qt.CURVE_TO:(f=a/o.pathLength)>1&&(f=1),e=this.getPointOnCubicBezier(f,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case qt.QUAD_TO:(f=a/o.pathLength)>1&&(f=1),e=this.getPointOnQuadraticBezier(f,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3])}if(e)return e;break}r+=o.pathLength}}catch(t){u.e(t)}finally{u.f()}return null}},{key:"getLineLength",value:function(t,n,r,e){return Math.sqrt((r-t)*(r-t)+(e-n)*(e-n))}},{key:"getPathLength",value:function(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((function(t,n){return n.pathLength>0?t+n.pathLength:t}),0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(t,n,r,e,i,u,o,a,f){return{x:a*ct(t)+u*ht(t)+e*vt(t)+n*pt(t),y:f*ct(t)+o*ht(t)+i*vt(t)+r*pt(t)}}},{key:"getPointOnQuadraticBezier",value:function(t,n,r,e,i,u,o){return{x:u*bt(t)+e*gt(t)+n*mt(t),y:o*bt(t)+i*gt(t)+r*mt(t)}}},{key:"getPointOnEllipticalArc",value:function(t,n,r,e,i,u){var o=Math.cos(u),a=Math.sin(u),f=r*Math.cos(i),c=e*Math.sin(i);return{x:t+(f*o-c*a),y:n+(f*a+c*o)}}},{key:"buildEquidistantCache",value:function(t,n){var r=this.getPathLength(),e=n||.25,i=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==e){this.equidistantCache={step:i,precision:e,points:[]};for(var u=0,o=0;o<=r;o+=e){var a=this.getPointOnPath(o),f=this.getPointOnPath(o+e);a&&f&&(u+=this.getLineLength(a.x,a.y,f.x,f.y))>=i&&(this.equidistantCache.points.push({x:a.x,y:a.y,distance:o}),u-=i)}}}},{key:"getEquidistantPointOnPath",value:function(t,n,r){if(this.buildEquidistantCache(n,r),t<0||t-this.getPathLength()>5e-5)return null;var e=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[e]||null}}]),i}(Xt);var Cn=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,_n=function(t){B.default(o,t);var n,r,e,i,u=(e=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=E.default(e);if(i){var r=E.default(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return P.default(this,t)});function o(t,n,r){var e;O.default(this,o),(e=u.call(this,t,n,r)).type="image",e.loaded=!1;var i=e.getHrefAttribute().getString();if(!i)return P.default(e);var a=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);return t.images.push(C.default(e)),a?e.loadSvg(i):e.loadImage(i),e.isSvg=a,e}return j.default(o,[{key:"loadImage",value:(r=x.default(k.default.mark((function t(n){return k.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.createImage(n);case 3:this.image=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error('Error while loading image "'.concat(n,'":'),t.t0);case 10:this.loaded=!0;case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return r.apply(this,arguments)})},{key:"loadSvg",value:(n=x.default(k.default.mark((function t(n){var r,e,i;return k.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=Cn.exec(n))){t.next=6;break}e=r[5],this.image="base64"===r[4]?atob(e):decodeURIComponent(e),t.next=19;break;case 6:return t.prev=6,t.next=9,this.document.fetch(n);case 9:return i=t.sent,t.next=12,i.text();case 12:this.image=t.sent,t.next=19;break;case 16:t.prev=16,t.t0=t.catch(6),console.error('Error while loading image "'.concat(n,'":'),t.t0);case 19:this.loaded=!0;case 20:case"end":return t.stop()}}),t,this,[[6,16]])}))),function(t){return n.apply(this,arguments)})},{key:"renderChildren",value:function(t){var n=this.document,r=this.image,e=this.loaded,i=this.getAttribute("x").getPixels("x"),u=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(e&&r&&o&&a){if(t.save(),t.translate(i,u),this.isSvg){var f=n.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:o,scaleHeight:a});f.document.documentElement.parent=this,f.render()}else{var c=this.image;n.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:o,desiredWidth:c.width,height:a,desiredHeight:c.height}),this.loaded&&(void 0===c.complete||c.complete)&&t.drawImage(c,0,0)}t.restore()}}},{key:"getBoundingBox",value:function(){var t=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),e=this.getStyle("height").getPixels("y");return new Ut(t,n,t+r,n+e)}}]),o}(Yt);var In=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="symbol",t}return j.default(i,[{key:"render",value:function(){}}]),i}(Yt),Ln=function(){function t(n){O.default(this,t),this.document=n,this.loaded=!1,n.fonts.push(this)}var n;return j.default(t,[{key:"load",value:(n=x.default(k.default.mark((function t(n,r){var e,i;return k.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=this.document,t.next=4,e.canvg.parser.load(r);case 4:i=t.sent.getElementsByTagName("font"),Array.from(i).forEach((function(t){var r=e.createElement(t);e.definitions[n]=r})),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.error('Error while loading font "'.concat(r,'":'),t.t0);case 12:this.loaded=!0;case 13:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t,r){return n.apply(this,arguments)})}]),t}();var zn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).type="style";var o=I(Array.from(n.childNodes).map((function(t){return t.textContent})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,""));return o.split("}").forEach((function(n){var r=n.trim();if(r){var e=r.split("{"),i=e[0].split(","),u=e[1].split(";");i.forEach((function(n){var r=n.trim();if(r){var e=t.styles[r]||{};if(u.forEach((function(n){var r=n.indexOf(":"),i=n.substr(0,r).trim(),u=n.substr(r+1,n.length-r).trim();i&&u&&(e[i]=new wt(t,i,u))})),t.styles[r]=e,t.stylesSpecificity[r]=J(r),"@font-face"===r){var i=e["font-family"].getString().replace(/"|'/g,"");e.src.getString().split(",").forEach((function(n){if(n.indexOf('format("svg")')>0){var r=z(n);r&&new Ln(t).load(i,r)}}))}}}))}})),u}return i}(Dt);zn.parseExternalUrl=z;var Vn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="use",t}return j.default(i,[{key:"setContext",value:function(t){T.default(E.default(i.prototype),"setContext",this).call(this,t);var n=this.getAttribute("x"),r=this.getAttribute("y");n.hasValue()&&t.translate(n.getPixels("x"),0),r.hasValue()&&t.translate(0,r.getPixels("y"))}},{key:"path",value:function(t){var n=this.element;n&&n.path(t)}},{key:"renderChildren",value:function(t){var n=this.document,r=this.element;if(r){var e=r;if("symbol"===r.type&&((e=new tn(n,null)).attributes.viewBox=new wt(n,"viewBox",r.getAttribute("viewBox").getString()),e.attributes.preserveAspectRatio=new wt(n,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),e.attributes.overflow=new wt(n,"overflow",r.getAttribute("overflow").getString()),e.children=r.children,r.styles.opacity=new wt(n,"opacity",this.calculateOpacity())),"svg"===e.type){var i=this.getStyle("width",!1,!0),u=this.getStyle("height",!1,!0);i.hasValue()&&(e.attributes.width=new wt(n,"width",i.getString())),u.hasValue()&&(e.attributes.height=new wt(n,"height",u.getString()))}var o=e.parent;e.parent=this,e.render(t),e.parent=o}}},{key:"getBoundingBox",value:function(t){var n=this.element;return n?n.getBoundingBox(t):null}},{key:"elementTransform",value:function(){return Ft.fromElement(this.document,this.element)}},{key:"element",get:function(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}]),i}(Yt);function qn(t,n,r,e,i,u){return t[r*e*4+4*n+u]}function Yn(t,n,r,e,i,u,o){t[r*e*4+4*n+u]=o}function Hn(t,n,r){return t[n]*r}function Qn(t,n,r,e){return n+Math.cos(t)*r+Math.sin(t)*e}var Kn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;O.default(this,i),(u=e.call(this,t,n,r)).type="feColorMatrix";var o=$(u.getAttribute("values").getString());switch(u.getAttribute("type").getString("matrix")){case"saturate":var a=o[0];o=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var f=o[0]*Math.PI/180;o=[Qn(f,.213,.787,-.213),Qn(f,.715,-.715,-.715),Qn(f,.072,-.072,.928),0,0,Qn(f,.213,-.213,.143),Qn(f,.715,.285,.14),Qn(f,.072,-.072,-.283),0,0,Qn(f,.213,-.213,-.787),Qn(f,.715,-.715,.715),Qn(f,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}return u.matrix=o,u.includeOpacity=u.getAttribute("includeOpacity").hasValue(),u}return j.default(i,[{key:"apply",value:function(t,n,r,e,i){for(var u=this.includeOpacity,o=this.matrix,a=t.getImageData(0,0,e,i),f=0;f<i;f++)for(var c=0;c<e;c++){var s=qn(a.data,c,f,e,0,0),h=qn(a.data,c,f,e,0,1),v=qn(a.data,c,f,e,0,2),l=qn(a.data,c,f,e,0,3),y=Hn(o,0,s)+Hn(o,1,h)+Hn(o,2,v)+Hn(o,3,l)+Hn(o,4,1),d=Hn(o,5,s)+Hn(o,6,h)+Hn(o,7,v)+Hn(o,8,l)+Hn(o,9,1),p=Hn(o,10,s)+Hn(o,11,h)+Hn(o,12,v)+Hn(o,13,l)+Hn(o,14,1),b=Hn(o,15,s)+Hn(o,16,h)+Hn(o,17,v)+Hn(o,18,l)+Hn(o,19,1);u&&(y=0,d=0,p=0,b*=l/255),Yn(a.data,c,f,e,0,0,y),Yn(a.data,c,f,e,0,1,d),Yn(a.data,c,f,e,0,2,p),Yn(a.data,c,f,e,0,3,b)}t.clearRect(0,0,e,i),t.putImageData(a,0,0)}}]),i}(Dt);var Jn=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="mask",t}return j.default(i,[{key:"apply",value:function(t,n){var r=this.document,e=this.getAttribute("x").getPixels("x"),u=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!o&&!a){var f=new Ut;this.children.forEach((function(n){f.addBoundingBox(n.getBoundingBox(t))})),e=Math.floor(f.x1),u=Math.floor(f.y1),o=Math.floor(f.width),a=Math.floor(f.height)}var c=this.removeStyles(n,i.ignoreStyles),s=r.createCanvas(e+o,u+a),h=s.getContext("2d");r.screen.setDefaults(h),this.renderChildren(h),new Kn(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(h,0,0,e+o,u+a);var v=r.createCanvas(e+o,u+a),l=v.getContext("2d");r.screen.setDefaults(l),n.render(l),l.globalCompositeOperation="destination-in",l.fillStyle=h.createPattern(s,"no-repeat"),l.fillRect(0,0,e+o,u+a),t.fillStyle=l.createPattern(v,"no-repeat"),t.fillRect(0,0,e+o,u+a),this.restoreStyles(n,c)}},{key:"render",value:function(){}}]),i}(Dt);Jn.ignoreStyles=["mask","transform","clip-path"];var tr=function(){},nr=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="clipPath",t}return j.default(i,[{key:"apply",value:function(t){var n=this.document,r=Reflect.getPrototypeOf(t),e=t.beginPath,i=t.closePath;r&&(r.beginPath=tr,r.closePath=tr),Reflect.apply(e,t,[]),this.children.forEach((function(e){if(void 0!==e.path){var u=void 0!==e.elementTransform?e.elementTransform():null;u||(u=Ft.fromElement(n,e)),u&&u.apply(t),e.path(t),r&&(r.closePath=i),u&&u.unapply(t)}})),Reflect.apply(i,t,[]),t.clip(),r&&(r.beginPath=e,r.closePath=i)}},{key:"render",value:function(){}}]),i}(Dt);var rr=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="filter",t}return j.default(i,[{key:"apply",value:function(t,n){var r=this.document,e=this.children,u=n.getBoundingBox(t);if(u){var o=0,a=0;e.forEach((function(t){var n=t.extraFilterDistance||0;o=Math.max(o,n),a=Math.max(a,n)}));var f=Math.floor(u.width),c=Math.floor(u.height),s=f+2*o,h=c+2*a;if(!(s<1||h<1)){var v=Math.floor(u.x),l=Math.floor(u.y),y=this.removeStyles(n,i.ignoreStyles),d=r.createCanvas(s,h),p=d.getContext("2d");r.screen.setDefaults(p),p.translate(-v+o,-l+a),n.render(p),e.forEach((function(t){"function"==typeof t.apply&&t.apply(p,0,0,s,h)})),t.drawImage(d,0,0,s,h,v-o,l-a,s,h),this.restoreStyles(n,y)}}}},{key:"render",value:function(){}}]),i}(Dt);rr.ignoreStyles=["filter","transform","clip-path"];var er=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="feDropShadow",u.addStylesFromStyleDefinition(),u}return j.default(i,[{key:"apply",value:function(){}}]),i}(Dt);var ir=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="feMorphology",t}return j.default(i,[{key:"apply",value:function(){}}]),i}(Dt);var ur=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="feComposite",t}return j.default(i,[{key:"apply",value:function(){}}]),i}(Dt);var or=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(t,n,r){var u;return O.default(this,i),(u=e.call(this,t,n,r)).type="feGaussianBlur",u.blurRadius=Math.floor(u.getAttribute("stdDeviation").getNumber()),u.extraFilterDistance=u.blurRadius,u}return j.default(i,[{key:"apply",value:function(t,n,r,e,i){var u=this.document,o=this.blurRadius,a=u.window?u.window.document.body:null,f=t.canvas;f.id=u.getUniqueId(),a&&(f.style.display="none",a.appendChild(f)),m.canvasRGBA(f,n,r,e,i,o),a&&a.removeChild(f)}}]),i}(Dt);var ar=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="title",t}return i}(Dt);var hr=function(t){B.default(i,t);var n,r,e=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=E.default(n);if(r){var i=E.default(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return P.default(this,t)});function i(){var t;return O.default(this,i),(t=e.apply(this,arguments)).type="desc",t}return i}(Dt),vr={svg:tn,rect:en,circle:un,ellipse:on,line:an,polyline:sn,polygon:hn,path:Wt,pattern:ln,marker:yn,defs:dn,linearGradient:gn,radialGradient:mn,stop:wn,animate:kn,animateColor:xn,animateTransform:Rn,font:On,"font-face":jn,"missing-glyph":Sn,glyph:Ht,text:Xt,tspan:Kt,tref:Nn,a:Bn,textPath:Tn,image:_n,g:pn,symbol:In,style:zn,use:Vn,mask:Jn,clipPath:nr,filter:rr,feDropShadow:er,feMorphology:ir,feComposite:ur,feColorMatrix:Kn,feGaussianBlur:or,title:ar,desc:hr};function lr(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function yr(){return yr=x.default(k.default.mark((function t(n){var r,e,i=arguments;return k.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],e=document.createElement("img"),r&&(e.crossOrigin="Anonymous"),t.abrupt("return",new Promise((function(t,r){e.onload=function(){t(e)},e.onerror=function(t,n,e,i,u){r(u)},e.src=n})));case 4:case"end":return t.stop()}}),t)}))),yr.apply(this,arguments)}var dr=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.rootEmSize,i=void 0===e?12:e,u=r.emSize,o=void 0===u?12:u,a=r.createCanvas,f=void 0===a?t.createCanvas:a,c=r.createImage,s=void 0===c?t.createImage:c,h=r.anonymousCrossOrigin;O.default(this,t),this.canvg=n,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=n.screen,this.rootEmSize=i,this.emSize=o,this.createCanvas=f,this.createImage=this.bindCreateImage(s,h),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return j.default(t,[{key:"bindCreateImage",value:function(t,n){return"boolean"==typeof n?function(r,e){return t(r,"boolean"==typeof e?e:n)}:t}},{key:"popEmSize",value:function(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){return this.images.every((function(t){return t.loaded}))}},{key:"isFontsLoaded",value:function(){return this.fonts.every((function(t){return t.loaded}))}},{key:"createDocumentElement",value:function(t){var n=this.createElement(t.documentElement);return n.root=!0,n.addStylesFromStyleDefinition(),this.documentElement=n,n}},{key:"createElement",value:function(n){var r=n.nodeName.replace(/^[^:]+:/,""),e=t.elementTypes[r];return void 0!==e?new e(this,n):new $t(this,n)}},{key:"createTextNode",value:function(t){return new Jt(this,t)}},{key:"setViewBox",value:function(t){this.screen.setViewBox(function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?lr(Object(r),!0).forEach((function(n){M.default(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lr(Object(r)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))}))}return t}({document:this},t))}},{key:"window",get:function(){return this.screen.window}},{key:"fetch",get:function(){return this.screen.fetch}},{key:"ctx",get:function(){return this.screen.ctx}},{key:"emSize",get:function(){var t=this.emSizeStack;return t[t.length-1]},set:function(t){this.emSizeStack.push(t)}}]),t}();function pr(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function br(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?pr(Object(r),!0).forEach((function(n){M.default(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pr(Object(r)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))}))}return t}dr.createCanvas=function(t,n){var r=document.createElement("canvas");return r.width=t,r.height=n,r},dr.createImage=function(t){return yr.apply(this,arguments)},dr.elementTypes=vr;var gr=function(){function t(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};O.default(this,t),this.parser=new Bt(e),this.screen=new jt(n,e),this.options=e;var i=new dr(this,e),u=i.createDocumentElement(r);this.document=i,this.documentElement=u}var n,r;return j.default(t,[{key:"fork",value:function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.from(n,r,br(br({},this.options),e))}},{key:"forkString",value:function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.fromString(n,r,br(br({},this.options),e))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:(r=x.default(k.default.mark((function t(){var n=arguments;return k.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.start(br({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n.length>0&&void 0!==n[0]?n[0]:{})),t.next=4,this.ready();case 4:this.stop();case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.screen.start(this.documentElement,br(br({enableRedraw:!0},this.options),t))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(t){this.documentElement.resize(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])}}],[{key:"from",value:(n=x.default(k.default.mark((function n(r,e){var i,u,o=arguments;return k.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=new Bt(i=o.length>2&&void 0!==o[2]?o[2]:{}),n.next=4,u.parse(e);case 4:return n.abrupt("return",new t(r,n.sent,i));case 6:case"end":return n.stop()}}),n)}))),function(t,r){return n.apply(this,arguments)})},{key:"fromString",value:function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new t(n,new Bt(e).parseFromString(r),e)}}]),t}();n.AElement=Bn,n.AnimateColorElement=xn,n.AnimateElement=kn,n.AnimateTransformElement=Rn,n.BoundingBox=Ut,n.CB1=ct,n.CB2=ht,n.CB3=vt,n.CB4=pt,n.Canvg=gr,n.CircleElement=un,n.ClipPathElement=nr,n.DefsElement=dn,n.DescElement=hr,n.Document=dr,n.Element=Dt,n.EllipseElement=on,n.FeColorMatrixElement=Kn,n.FeCompositeElement=ur,n.FeDropShadowElement=er,n.FeGaussianBlurElement=or,n.FeMorphologyElement=ir,n.FilterElement=rr,n.Font=Vt,n.FontElement=On,n.FontFaceElement=jn,n.GElement=pn,n.GlyphElement=Ht,n.GradientElement=bn,n.ImageElement=_n,n.LineElement=an,n.LinearGradientElement=gn,n.MarkerElement=yn,n.MaskElement=Jn,n.Matrix=Tt,n.MissingGlyphElement=Sn,n.Mouse=Rt,n.PSEUDO_ZERO=tt,n.Parser=Bt,n.PathElement=Wt,n.PathParser=qt,n.PatternElement=ln,n.Point=xt,n.PolygonElement=hn,n.PolylineElement=sn,n.Property=wt,n.QB1=bt,n.QB2=gt,n.QB3=mt,n.RadialGradientElement=mn,n.RectElement=en,n.RenderedElement=Yt,n.Rotate=Et,n.SVGElement=tn,n.SVGFontLoader=Ln,n.Scale=At,n.Screen=jt,n.Skew=Ct,n.SkewX=_t,n.SkewY=It,n.StopElement=wn,n.StyleElement=zn,n.SymbolElement=In,n.TRefElement=Nn,n.TSpanElement=Kt,n.TextElement=Xt,n.TextPathElement=Tn,n.TitleElement=ar,n.Transform=Ft,n.Translate=Pt,n.UnknownElement=$t,n.UseElement=Vn,n.ViewPort=kt,n.compressSpaces=I,n.default=gr,n.getSelectorSpecificity=J,n.normalizeAttributeName=G,n.normalizeColor=V,n.parseExternalUrl=z,n.presets=_,n.toNumbers=$,n.trimLeft=F,n.trimRight=D,n.vectorMagnitude=rt,n.vectorsAngle=ft,n.vectorsRatio=at}(s)),s}var ph=dh(),bh=a({__proto__:null,default:r(ph)},[ph]);export{bh as i}