4 lines
120 KiB
JavaScript
4 lines
120 KiB
JavaScript
import{r as Ia,a as Da,b as za,c as Fa,d as La,e as qa,f as Xa,g as Ga,h as Ya,i as ja,j as Ua,k as Ha,l as Wa,m as Qa,n as Za,o as Ja,p as Ka,q as ei,s as ti,t as ri,u as ni,v as ai,w as ii,x as ui,y as si,z as li,A as oi,B as fi,C as ci,D as hi,E as vi,F as gi,G as di,H as pi}from"./core-js.02a9a8e7.js";import{r as yi,b as mi,c as Si,d as bi,e as _i,f as ki,h as Pi,i as Ri,j as Ci,k as wi,l as xi,m as Ei}from"./@babel.80d29b7b.js";import{r as Ai}from"./raf.4a8e4708.js";import{r as Ti}from"./rgbcolor.20c71161.js";import{r as Mi}from"./svg-pathdata.200d31ca.js";import{r as Bi}from"./stackblur-canvas.4ada7813.js";function Ni(y,pe){for(var oe=0;oe<pe.length;oe++){const K=pe[oe];if(typeof K!="string"&&!Array.isArray(K)){for(const ee in K)if(ee!=="default"&&!(ee in y)){const fe=Object.getOwnPropertyDescriptor(K,ee);fe&&Object.defineProperty(y,ee,fe.get?fe:{enumerable:!0,get:()=>K[ee]})}}}return Object.freeze(Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}))}var Ze={},ar;function Oi(){return ar||(ar=1,function(y){Object.defineProperty(y,"__esModule",{value:!0}),Ia(),Da(),za();var pe=yi(),oe=mi();Fa(),La(),qa(),Xa(),Ga(),Ya(),ja();var K=Si(),ee=bi(),fe=_i(),ur=ki();Ua(),Ha(),Wa(),Qa(),Za();var sr=Ai();Ja(),Ka();var lr=Ti();ei(),ti();var or=Pi(),fr=Ri(),cr=Ci();ri(),ni(),ai(),ii(),ui(),si();var hr=wi();li(),oi();var vr=xi();fi();var ce=Mi();ci();var gr=Ei();hi(),vi(),gi(),di(),pi();var dr=Bi;function L(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var $=L(pe),W=L(oe),M=L(K),we=L(ee),b=L(fe),P=L(ur),xe=L(sr),Ee=L(lr),x=L(or),C=L(fr),d=L(cr),pr=L(hr),te=L(vr),he=L(gr);function yr(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=u.DOMParser,t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:l,createCanvas:function(e,a){return new OffscreenCanvas(e,a)},createImage:function(e){return W.default($.default.mark(function a(){var n,i,s;return $.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,fetch(e);case 2:return n=f.sent,f.next=5,n.blob();case 5:return i=f.sent,f.next=8,createImageBitmap(i);case 8:return s=f.sent,f.abrupt("return",s);case 10:case"end":return f.stop()}},a)}))()}};return(typeof DOMParser<"u"||typeof l>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function mr(u){var l=u.DOMParser,t=u.canvas,r=u.fetch;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:l,fetch:r,createCanvas:t.createCanvas,createImage:t.loadImage}}var Sr=Object.freeze({__proto__:null,offscreen:yr,node:mr});function re(u){return u.replace(/(?!\u3000)\s+/gm," ")}function Je(u){return u.replace(/^[\n \t]+/,"")}function Ke(u){return u.replace(/[\n \t]+$/,"")}function q(u){var l=(u||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return l.map(parseFloat)}var br=/^[A-Z-]+$/;function et(u){return br.test(u)?u.toLowerCase():u}function Ae(u){var l=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(u)||[];return l[2]||l[3]||l[4]}function tt(u){if(!u.startsWith("rgb"))return u;var l=3,t=u.replace(/\d+(\.\d+)?/g,function(r,e){return l--&&e?String(Math.round(parseFloat(r))):r});return t}var _r=/(\[[^\]]+\])/g,kr=/(#[^\s+>~.[:]+)/g,Pr=/(\.[^\s+>~.[:]+)/g,Rr=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,Cr=/(:[\w-]+\([^)]*\))/gi,wr=/(:[^\s+>~.[:]+)/g,xr=/([^\s+>~.[:]+)/g;function ne(u,l){var t=l.exec(u);return t?[u.replace(l," "),t.length]:[u,0]}function rt(u){var l=[0,0,0],t=u.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0,e=ne(t,_r),a=M.default(e,2);t=a[0],r=a[1],l[1]+=r;var n=ne(t,kr),i=M.default(n,2);t=i[0],r=i[1],l[0]+=r;var s=ne(t,Pr),o=M.default(s,2);t=o[0],r=o[1],l[1]+=r;var f=ne(t,Rr),c=M.default(f,2);t=c[0],r=c[1],l[2]+=r;var h=ne(t,Cr),v=M.default(h,2);t=v[0],r=v[1],l[1]+=r;var g=ne(t,wr),p=M.default(g,2);t=p[0],r=p[1],l[1]+=r,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," ");var S=ne(t,xr),m=M.default(S,2);return t=m[0],r=m[1],l[2]+=r,l.join("")}var ae=1e-8;function Te(u){return Math.sqrt(Math.pow(u[0],2)+Math.pow(u[1],2))}function ye(u,l){return(u[0]*l[0]+u[1]*l[1])/(Te(u)*Te(l))}function Me(u,l){return(u[0]*l[1]<u[1]*l[0]?-1:1)*Math.acos(ye(u,l))}function Be(u){return u*u*u}function Ne(u){return 3*u*u*(1-u)}function Oe(u){return 3*u*(1-u)*(1-u)}function Ve(u){return(1-u)*(1-u)*(1-u)}function $e(u){return u*u}function Ie(u){return 2*u*(1-u)}function De(u){return(1-u)*(1-u)}var R=function(){function u(l,t,r){b.default(this,u),this.document=l,this.name=t,this.value=r,this.isNormalizedColor=!1}return P.default(u,[{key:"split",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",r=this.document,e=this.name;return re(this.getString()).trim().split(t).map(function(a){return new u(r,e,a)})}},{key:"hasValue",value:function(t){var r=this.value;return r!==null&&r!==""&&(t||r!==0)&&typeof r<"u"}},{key:"isString",value:function(t){var r=this.value,e=typeof r=="string";return!e||!t?e:t.test(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 typeof t>"u"||this.hasValue()?this.value:t}},{key:"getNumber",value:function(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);var r=this.value,e=parseFloat(r);return this.isString(/%$/)&&(e/=100),e}},{key:"getString",value:function(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}},{key:"getColor",value:function(t){var r=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=tt(r),this.value=r),r}},{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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var e=typeof t=="boolean"?[void 0,t]:[t],a=M.default(e,2),n=a[0],i=a[1],s=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(n);default:{var o=this.getNumber();return r&&o<1?o*s.computeSize(n):o}}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3: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(),r=/#([^)'"]+)/.exec(t);return r&&(r=r[1]),r||(r=t),this.document.definitions[r]}},{key:"getFillStyleDefinition",value:function(t,r){var e=this.getDefinition();if(!e)return null;if(typeof e.createGradient=="function")return e.createGradient(this.document.ctx,t,r);if(typeof e.createPattern=="function"){if(e.getHrefAttribute().hasValue()){var a=e.getAttribute("patternTransform");e=e.getHrefAttribute().getDefinition(),a.hasValue()&&e.getAttribute("patternTransform",!0).setValue(a.value)}return e.createPattern(this.document.ctx,t,r)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?u.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(t){for(var r=this.getColor(),e=r.length,a=0,n=0;n<e&&(r[n]===","&&a++,a!==3);n++);if(t.hasValue()&&this.isString()&&a!==3){var i=new Ee.default(r);i.ok&&(i.alpha=t.getNumber(),r=i.toRGBA())}return new u(this.document,this.name,r)}}],[{key:"empty",value:function(t){return new u(t,"EMPTY","")}}]),u}();R.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 nt=function(){function u(){b.default(this,u),this.viewPorts=[]}return P.default(u,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(t,r){this.viewPorts.push({width:t,height:r})}},{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 typeof t=="number"?t:t==="x"?this.width:t==="y"?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}}]),u}(),I=function(){function u(l,t){b.default(this,u),this.x=l,this.y=t}return P.default(u,[{key:"angleTo",value:function(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function(t){var r=this.x,e=this.y,a=r*t[0]+e*t[2]+t[4],n=r*t[1]+e*t[3]+t[5];this.x=a,this.y=n}}],[{key:"parse",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=q(t),a=M.default(e,2),n=a[0],i=n===void 0?r:n,s=a[1],o=s===void 0?r:s;return new u(i,o)}},{key:"parseScale",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,e=q(t),a=M.default(e,2),n=a[0],i=n===void 0?r:n,s=a[1],o=s===void 0?i:s;return new u(i,o)}},{key:"parsePath",value:function(t){for(var r=q(t),e=r.length,a=[],n=0;n<e;n+=2)a.push(new u(r[n],r[n+1]));return a}}]),u}(),at=function(){function u(l){b.default(this,u),this.screen=l,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return P.default(u,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var t=this.screen,r=this.onClick,e=this.onMouseMove,a=t.ctx.canvas;a.onclick=r,a.onmousemove=e,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.screen,r=this.events,e=this.eventElements,a=t.ctx.canvas.style;a&&(a.cursor=""),r.forEach(function(n,i){for(var s=n.run,o=e[i];o;)s(o),o=o.parent}),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,r){if(!(!this.working||!r)){var e=this.events,a=this.eventElements;e.forEach(function(n,i){var s=n.x,o=n.y;!a[i]&&r.isPointInPath&&r.isPointInPath(s,o)&&(a[i]=t)})}}},{key:"checkBoundingBox",value:function(t,r){if(!(!this.working||!r)){var e=this.events,a=this.eventElements;e.forEach(function(n,i){var s=n.x,o=n.y;!a[i]&&r.isPointInBox(s,o)&&(a[i]=t)})}}},{key:"mapXY",value:function(t,r){for(var e=this.screen,a=e.window,n=e.ctx,i=new I(t,r),s=n.canvas;s;)i.x-=s.offsetLeft,i.y-=s.offsetTop,s=s.offsetParent;return a.scrollX&&(i.x+=a.scrollX),a.scrollY&&(i.y+=a.scrollY),i}},{key:"onClick",value:function(t){var r=this.mapXY(t.clientX,t.clientY),e=r.x,a=r.y;this.events.push({type:"onclick",x:e,y:a,run:function(i){i.onClick&&i.onClick()}})}},{key:"onMouseMove",value:function(t){var r=this.mapXY(t.clientX,t.clientY),e=r.x,a=r.y;this.events.push({type:"onmousemove",x:e,y:a,run:function(i){i.onMouseMove&&i.onMouseMove()}})}}]),u}(),it=typeof window<"u"?window:null,ut=typeof fetch<"u"?fetch.bind(void 0):null,ve=function(){function u(l){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.fetch,e=r===void 0?ut:r,a=t.window,n=a===void 0?it:a;b.default(this,u),this.ctx=l,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new nt,this.mouse=new at(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,this.fetch=e}return P.default(u,[{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(r){return r()});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 r=t.document,e=t.ctx,a=t.aspectRatio,n=t.width,i=t.desiredWidth,s=t.height,o=t.desiredHeight,f=t.minX,c=f===void 0?0:f,h=t.minY,v=h===void 0?0:h,g=t.refX,p=t.refY,S=t.clip,m=S===void 0?!1:S,E=t.clipX,k=E===void 0?0:E,_=t.clipY,w=_===void 0?0:_,T=re(a).replace(/^defer\s/,""),B=T.split(" "),D=M.default(B,2),j=D[0],U=D[1],X=j||"xMidYMid",F=U||"meet",G=n/i,J=s/o,z=Math.min(G,J),le=Math.max(G,J),Re=i,Ce=o;F==="meet"&&(Re*=z,Ce*=z),F==="slice"&&(Re*=le,Ce*=le);var Wt=new R(r,"refX",g),Qt=new R(r,"refY",p),Zt=Wt.hasValue()&&Qt.hasValue();if(Zt&&e.translate(-z*Wt.getPixels("x"),-z*Qt.getPixels("y")),m){var Jt=z*k,Kt=z*w;e.beginPath(),e.moveTo(Jt,Kt),e.lineTo(n,Kt),e.lineTo(n,s),e.lineTo(Jt,s),e.closePath(),e.clip()}if(!Zt){var er=F==="meet"&&z===J,tr=F==="slice"&&le===J,rr=F==="meet"&&z===G,nr=F==="slice"&&le===G;X.startsWith("xMid")&&(er||tr)&&e.translate(n/2-Re/2,0),X.endsWith("YMid")&&(rr||nr)&&e.translate(0,s/2-Ce/2),X.startsWith("xMax")&&(er||tr)&&e.translate(n-Re,0),X.endsWith("YMax")&&(rr||nr)&&e.translate(0,s-Ce)}switch(!0){case X==="none":e.scale(G,J);break;case F==="meet":e.scale(z,z);break;case F==="slice":e.scale(le,le);break}e.translate(-c,-v)}},{key:"start",value:function(t){var r=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=e.enableRedraw,n=a===void 0?!1:a,i=e.ignoreMouse,s=i===void 0?!1:i,o=e.ignoreAnimation,f=o===void 0?!1:o,c=e.ignoreDimensions,h=c===void 0?!1:c,v=e.ignoreClear,g=v===void 0?!1:v,p=e.forceRedraw,S=e.scaleWidth,m=e.scaleHeight,E=e.offsetX,k=e.offsetY,_=this.FRAMERATE,w=this.mouse,T=1e3/_;if(this.frameDuration=T,this.readyPromise=new Promise(function(X){r.resolveReady=X}),this.isReady()&&this.render(t,h,g,S,m,E,k),!!n){var B=Date.now(),D=B,j=0,U=function X(){B=Date.now(),j=B-D,j>=T&&(D=B-j%T,r.shouldUpdate(f,p)&&(r.render(t,h,g,S,m,E,k),w.runEvents())),r.intervalId=xe.default(X)};s||w.start(),this.intervalId=xe.default(U)}}},{key:"stop",value:function(){this.intervalId&&(xe.default.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,r){if(!t){var e=this.frameDuration,a=this.animations.reduce(function(n,i){return i.update(e)||n},!1);if(a)return!0}return!!(typeof r=="function"&&r()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}},{key:"render",value:function(t,r,e,a,n,i,s){var o=this.CLIENT_WIDTH,f=this.CLIENT_HEIGHT,c=this.viewPort,h=this.ctx,v=this.isFirstRender,g=h.canvas;c.clear(),g.width&&g.height?c.setCurrent(g.width,g.height):c.setCurrent(o,f);var p=t.getStyle("width"),S=t.getStyle("height");!r&&(v||typeof a!="number"&&typeof n!="number")&&(p.hasValue()&&(g.width=p.getPixels("x"),g.style&&(g.style.width="".concat(g.width,"px"))),S.hasValue()&&(g.height=S.getPixels("y"),g.style&&(g.style.height="".concat(g.height,"px"))));var m=g.clientWidth||g.width,E=g.clientHeight||g.height;if(r&&p.hasValue()&&S.hasValue()&&(m=p.getPixels("x"),E=S.getPixels("y")),c.setCurrent(m,E),typeof i=="number"&&t.getAttribute("x",!0).setValue(i),typeof s=="number"&&t.getAttribute("y",!0).setValue(s),typeof a=="number"||typeof n=="number"){var k=q(t.getAttribute("viewBox").getString()),_=0,w=0;if(typeof a=="number"){var T=t.getStyle("width");T.hasValue()?_=T.getPixels("x")/a:isNaN(k[2])||(_=k[2]/a)}if(typeof n=="number"){var B=t.getStyle("height");B.hasValue()?w=B.getPixels("y")/n:isNaN(k[3])||(w=k[3]/n)}_||(_=w),w||(w=_),t.getAttribute("width",!0).setValue(a),t.getAttribute("height",!0).setValue(n);var D=t.getStyle("transform",!0,!0);D.setValue("".concat(D.getString()," scale(").concat(1/_,", ").concat(1/w,")"))}e||h.clearRect(0,0,m,E),t.render(h),v&&(this.isFirstRender=!1)}}]),u}();ve.defaultWindow=it,ve.defaultFetch=ut;var Er=ve.defaultFetch,Ar=typeof DOMParser<"u"?DOMParser:null,me=function(){function u(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=l.fetch,r=t===void 0?Er:t,e=l.DOMParser,a=e===void 0?Ar:e;b.default(this,u),this.fetch=r,this.DOMParser=a}return P.default(u,[{key:"parse",value:function(){var l=W.default($.default.mark(function r(e){return $.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.startsWith("<")){n.next=2;break}return n.abrupt("return",this.parseFromString(e));case 2:return n.abrupt("return",this.load(e));case 3:case"end":return n.stop()}},r,this)}));function t(r){return l.apply(this,arguments)}return t}()},{key:"parseFromString",value:function(t){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(r.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function(t){var r=t.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return t}},{key:"load",value:function(){var l=W.default($.default.mark(function r(e){var a,n;return $.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,this.fetch(e);case 2:return a=s.sent,s.next=5,a.text();case 5:return n=s.sent,s.abrupt("return",this.parseFromString(n));case 7:case"end":return s.stop()}},r,this)}));function t(r){return l.apply(this,arguments)}return t}()}]),u}(),st=function(){function u(l,t){b.default(this,u),this.type="translate",this.point=null,this.point=I.parse(t)}return P.default(u,[{key:"apply",value:function(t){var r=this.point,e=r.x,a=r.y;t.translate(e||0,a||0)}},{key:"unapply",value:function(t){var r=this.point,e=r.x,a=r.y;t.translate(-1*e||0,-1*a||0)}},{key:"applyToPoint",value:function(t){var r=this.point,e=r.x,a=r.y;t.applyTransform([1,0,0,1,e||0,a||0])}}]),u}(),lt=function(){function u(l,t,r){b.default(this,u),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var e=q(t);this.angle=new R(l,"angle",e[0]),this.originX=r[0],this.originY=r[1],this.cx=e[1]||0,this.cy=e[2]||0}return P.default(u,[{key:"apply",value:function(t){var r=this.cx,e=this.cy,a=this.originX,n=this.originY,i=this.angle,s=r+a.getPixels("x"),o=e+n.getPixels("y");t.translate(s,o),t.rotate(i.getRadians()),t.translate(-s,-o)}},{key:"unapply",value:function(t){var r=this.cx,e=this.cy,a=this.originX,n=this.originY,i=this.angle,s=r+a.getPixels("x"),o=e+n.getPixels("y");t.translate(s,o),t.rotate(-1*i.getRadians()),t.translate(-s,-o)}},{key:"applyToPoint",value:function(t){var r=this.cx,e=this.cy,a=this.angle,n=a.getRadians();t.applyTransform([1,0,0,1,r||0,e||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-r||0,-e||0])}}]),u}(),ot=function(){function u(l,t,r){b.default(this,u),this.type="scale",this.scale=null,this.originX=null,this.originY=null;var e=I.parseScale(t);(e.x===0||e.y===0)&&(e.x=ae,e.y=ae),this.scale=e,this.originX=r[0],this.originY=r[1]}return P.default(u,[{key:"apply",value:function(t){var r=this.scale,e=r.x,a=r.y,n=this.originX,i=this.originY,s=n.getPixels("x"),o=i.getPixels("y");t.translate(s,o),t.scale(e,a||e),t.translate(-s,-o)}},{key:"unapply",value:function(t){var r=this.scale,e=r.x,a=r.y,n=this.originX,i=this.originY,s=n.getPixels("x"),o=i.getPixels("y");t.translate(s,o),t.scale(1/e,1/a||e),t.translate(-s,-o)}},{key:"applyToPoint",value:function(t){var r=this.scale,e=r.x,a=r.y;t.applyTransform([e||0,0,0,a||0,0,0])}}]),u}(),ze=function(){function u(l,t,r){b.default(this,u),this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=q(t),this.originX=r[0],this.originY=r[1]}return P.default(u,[{key:"apply",value:function(t){var r=this.originX,e=this.originY,a=this.matrix,n=r.getPixels("x"),i=e.getPixels("y");t.translate(n,i),t.transform(a[0],a[1],a[2],a[3],a[4],a[5]),t.translate(-n,-i)}},{key:"unapply",value:function(t){var r=this.originX,e=this.originY,a=this.matrix,n=a[0],i=a[2],s=a[4],o=a[1],f=a[3],c=a[5],h=0,v=0,g=1,p=1/(n*(f*g-c*v)-i*(o*g-c*h)+s*(o*v-f*h)),S=r.getPixels("x"),m=e.getPixels("y");t.translate(S,m),t.transform(p*(f*g-c*v),p*(c*h-o*g),p*(s*v-i*g),p*(n*g-s*h),p*(i*c-s*f),p*(s*o-n*c)),t.translate(-S,-m)}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),u}();function Tr(u){var l=Mr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Mr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Fe=function(u){x.default(t,u);var l=Tr(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="skew",n.angle=null,n.angle=new R(r,"angle",e),n}return t}(ze);function Br(u){var l=Nr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Nr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ft=function(u){x.default(t,u);var l=Br(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="skewX",n.matrix=[1,0,Math.tan(n.angle.getRadians()),1,0,0],n}return t}(Fe);function Or(u){var l=Vr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Vr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ct=function(u){x.default(t,u);var l=Or(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="skewY",n.matrix=[1,Math.tan(n.angle.getRadians()),0,1,0,0],n}return t}(Fe);function $r(u){return re(u).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Ir(u){var l=u.split("("),t=M.default(l,2),r=t[0],e=t[1];return[r.trim(),e.trim().replace(")","")]}var ge=function(){function u(l,t,r){var e=this;b.default(this,u),this.document=l,this.transforms=[];var a=$r(t);a.forEach(function(n){if(n!=="none"){var i=Ir(n),s=M.default(i,2),o=s[0],f=s[1],c=u.transformTypes[o];typeof c<"u"&&e.transforms.push(new c(e.document,f,r))}})}return P.default(u,[{key:"apply",value:function(t){for(var r=this.transforms,e=r.length,a=0;a<e;a++)r[a].apply(t)}},{key:"unapply",value:function(t){for(var r=this.transforms,e=r.length,a=e-1;a>=0;a--)r[a].unapply(t)}},{key:"applyToPoint",value:function(t){for(var r=this.transforms,e=r.length,a=0;a<e;a++)r[a].applyToPoint(t)}}],[{key:"fromElement",value:function(t,r){var e=r.getStyle("transform",!1,!0),a=r.getStyle("transform-origin",!1,!0).split(),n=M.default(a,2),i=n[0],s=n[1],o=s===void 0?i:s,f=[i,o];return e.hasValue()?new u(t,e.getString(),f):null}}]),u}();ge.transformTypes={translate:st,rotate:lt,scale:ot,matrix:ze,skewX:ft,skewY:ct};var N=function(){function u(l,t){var r=this,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(b.default(this,u),this.document=l,this.node=t,this.captureTextNodes=e,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!t||t.nodeType!==1)){if(Array.from(t.attributes).forEach(function(s){var o=et(s.nodeName);r.attributes[o]=new R(l,o,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a=this.getAttribute("style").getString().split(";").map(function(s){return s.trim()});a.forEach(function(s){if(!!s){var o=s.split(":").map(function(v){return v.trim()}),f=M.default(o,2),c=f[0],h=f[1];r.styles[c]=new R(l,c,h)}})}var n=l.definitions,i=this.getAttribute("id");i.hasValue()&&(n[i.getString()]||(n[i.getString()]=this)),Array.from(t.childNodes).forEach(function(s){if(s.nodeType===1)r.addChild(s);else if(e&&(s.nodeType===3||s.nodeType===4)){var o=l.createTextNode(s);o.getText().length>0&&r.addChild(o)}})}}return P.default(u,[{key:"getAttribute",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=this.attributes[t];if(!e&&r){var a=new R(this.document,t,"");return this.attributes[t]=a,a}return e||R.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if(t==="href"||t.endsWith(":href"))return this.attributes[t];return R.empty(this.document)}},{key:"getStyle",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.styles[t];if(a)return a;var n=this.getAttribute(t);if(n!=null&&n.hasValue())return this.styles[t]=n,n;if(!e){var i=this.parent;if(i){var s=i.getStyle(t);if(s!=null&&s.hasValue())return s}}if(r){var o=new R(this.document,t,"");return this.styles[t]=o,o}return a||R.empty(this.document)}},{key:"render",value:function(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var e=this.getStyle("filter").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function(t){}},{key:"applyEffects",value:function(t){var r=ge.fromElement(this.document,this);r&&r.apply(t);var e=this.getStyle("clip-path",!1,!0);if(e.hasValue()){var a=e.getDefinition();a&&a.apply(t)}}},{key:"clearContext",value:function(t){}},{key:"renderChildren",value:function(t){this.children.forEach(function(r){r.render(t)})}},{key:"addChild",value:function(t){var r=t instanceof u?t:this.document.createElement(t);r.parent=this,u.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function(t){var r,e=this.node;if(typeof e.matches=="function")return e.matches(t);var a=(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"class");return!a||a===""?!1:a.split(" ").some(function(n){return".".concat(n)===t})}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,r=t.styles,e=t.stylesSpecificity;for(var a in r)if(!a.startsWith("@")&&this.matchesSelector(a)){var n=r[a],i=e[a];if(n)for(var s in n){var o=this.stylesSpecificity[s];typeof o>"u"&&(o="000"),i>=o&&(this.styles[s]=n[s],this.stylesSpecificity[s]=i)}}}},{key:"removeStyles",value:function(t,r){var e=r.reduce(function(a,n){var i=t.getStyle(n);if(!i.hasValue())return a;var s=i.getString();return i.setValue(""),[].concat(pr.default(a),[[n,s]])},[]);return e}},{key:"restoreStyles",value:function(t,r){r.forEach(function(e){var a=M.default(e,2),n=a[0],i=a[1];t.getStyle(n,!0).setValue(i)})}},{key:"isFirstChild",value:function(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}}]),u}();N.ignoreChildTypes=["title"];function Dr(u){var l=zr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function zr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ht=function(u){x.default(t,u);var l=Dr(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n}return t}(N);function Fr(u){var l=u.trim();return/^('|")/.test(l)?l:'"'.concat(l,'"')}function Lr(u){return typeof process>"u"?u:u.trim().split(",").map(Fr).join(",")}function qr(u){if(!u)return"";var l=u.trim().toLowerCase();switch(l){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return l;default:return/^oblique\s+(-|)\d+deg$/.test(l)?l:""}}function Xr(u){if(!u)return"";var l=u.trim().toLowerCase();switch(l){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return l;default:return/^[\d.]+$/.test(l)?l:""}}var H=function(){function u(l,t,r,e,a,n){b.default(this,u);var i=n?typeof n=="string"?u.parse(n):n:{};this.fontFamily=a||i.fontFamily,this.fontSize=e||i.fontSize,this.fontStyle=l||i.fontStyle,this.fontWeight=r||i.fontWeight,this.fontVariant=t||i.fontVariant}return P.default(u,[{key:"toString",value:function(){return[qr(this.fontStyle),this.fontVariant,Xr(this.fontWeight),this.fontSize,Lr(this.fontFamily)].join(" ").trim()}}],[{key:"parse",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,e="",a="",n="",i="",s="",o=re(t).trim().split(" "),f={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(function(c){switch(!0){case(!f.fontStyle&&u.styles.includes(c)):c!=="inherit"&&(e=c),f.fontStyle=!0;break;case(!f.fontVariant&&u.variants.includes(c)):c!=="inherit"&&(a=c),f.fontStyle=!0,f.fontVariant=!0;break;case(!f.fontWeight&&u.weights.includes(c)):c!=="inherit"&&(n=c),f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0;break;case!f.fontSize:if(c!=="inherit"){var h=c.split("/"),v=M.default(h,1);i=v[0]}f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0,f.fontSize=!0;break;default:c!=="inherit"&&(s+=c)}}),new u(e,a,n,i,s,r)}}]),u}();H.styles="normal|italic|oblique|inherit",H.variants="normal|small-caps|inherit",H.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Y=function(){function u(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;b.default(this,u),this.x1=l,this.y1=t,this.x2=r,this.y2=e,this.addPoint(l,t),this.addPoint(r,e)}return P.default(u,[{key:"addPoint",value:function(t,r){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof r<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}},{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 r=t.x1,e=t.y1,a=t.x2,n=t.y2;this.addPoint(r,e),this.addPoint(a,n)}}},{key:"sumCubic",value:function(t,r,e,a,n){return Math.pow(1-t,3)*r+3*Math.pow(1-t,2)*t*e+3*(1-t)*Math.pow(t,2)*a+Math.pow(t,3)*n}},{key:"bezierCurveAdd",value:function(t,r,e,a,n){var i=6*r-12*e+6*a,s=-3*r+9*e-9*a+3*n,o=3*e-3*r;if(s===0){if(i===0)return;var f=-o/i;0<f&&f<1&&(t?this.addX(this.sumCubic(f,r,e,a,n)):this.addY(this.sumCubic(f,r,e,a,n)));return}var c=Math.pow(i,2)-4*o*s;if(!(c<0)){var h=(-i+Math.sqrt(c))/(2*s);0<h&&h<1&&(t?this.addX(this.sumCubic(h,r,e,a,n)):this.addY(this.sumCubic(h,r,e,a,n)));var v=(-i-Math.sqrt(c))/(2*s);0<v&&v<1&&(t?this.addX(this.sumCubic(v,r,e,a,n)):this.addY(this.sumCubic(v,r,e,a,n)))}}},{key:"addBezierCurve",value:function(t,r,e,a,n,i,s,o){this.addPoint(t,r),this.addPoint(s,o),this.bezierCurveAdd(!0,t,e,n,s),this.bezierCurveAdd(!1,r,a,i,o)}},{key:"addQuadraticCurve",value:function(t,r,e,a,n,i){var s=t+.6666666666666666*(e-t),o=r+2/3*(a-r),f=s+1/3*(n-t),c=o+1/3*(i-r);this.addBezierCurve(t,r,s,f,o,c,n,i)}},{key:"isPointInBox",value:function(t,r){var e=this.x1,a=this.y1,n=this.x2,i=this.y2;return e<=t&&t<=n&&a<=r&&r<=i}},{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}}]),u}();function Gr(u){var l=Yr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Yr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var A=function(u){x.default(t,u);var l=Gr(t);function t(r){var e;return b.default(this,t),e=l.call(this,r.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),e.control=null,e.start=null,e.current=null,e.command=null,e.commands=e.commands,e.i=-1,e.previousCommand=null,e.points=[],e.angles=[],e}return P.default(t,[{key:"reset",value:function(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new I(0,0),this.control=new I(0,0),this.current=new I(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){var e=this.i,a=this.commands;return e>=a.length-1}},{key:"next",value:function(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}},{key:"getPoint",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",n=new I(this.command[e],this.command[a]);return this.makeAbsolute(n)}},{key:"getAsControlPoint",value:function(e,a){var n=this.getPoint(e,a);return this.control=n,n}},{key:"getAsCurrentPoint",value:function(e,a){var n=this.getPoint(e,a);return this.current=n,n}},{key:"getReflectedControlPoint",value:function(){var e=this.previousCommand.type;if(e!==ce.SVGPathData.CURVE_TO&&e!==ce.SVGPathData.SMOOTH_CURVE_TO&&e!==ce.SVGPathData.QUAD_TO&&e!==ce.SVGPathData.SMOOTH_QUAD_TO)return this.current;var a=this.current,n=a.x,i=a.y,s=this.control,o=s.x,f=s.y,c=new I(2*n-o,2*i-f);return c}},{key:"makeAbsolute",value:function(e){if(this.command.relative){var a=this.current,n=a.x,i=a.y;e.x+=n,e.y+=i}return e}},{key:"addMarker",value:function(e,a,n){var i=this.points,s=this.angles;n&&s.length>0&&!s[s.length-1]&&(s[s.length-1]=i[i.length-1].angleTo(n)),this.addMarkerAngle(e,a?a.angleTo(e):null)}},{key:"addMarkerAngle",value:function(e,a){this.points.push(e),this.angles.push(a)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var e=this.angles,a=e.length,n=0;n<a;n++)if(!e[n]){for(var i=n+1;i<a;i++)if(e[i]){e[n]=e[i];break}}return e}}]),t}(ce.SVGPathData);function jr(u){var l=Ur();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Ur(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Z=function(u){x.default(t,u);var l=jr(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.modifiedEmSizeStack=!1,r}return P.default(t,[{key:"calculateOpacity",value:function(){for(var e=1,a=this;a;){var n=a.getStyle("opacity",!1,!0);n.hasValue(!0)&&(e*=n.getNumber()),a=a.parent}return e}},{key:"setContext",value:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!a){var n=this.getStyle("fill"),i=this.getStyle("fill-opacity"),s=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(n.isUrlDefinition()){var f=n.getFillStyleDefinition(this,i);f&&(e.fillStyle=f)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var c=n.getColor();c!=="inherit"&&(e.fillStyle=c==="none"?"rgba(0,0,0,0)":c)}if(i.hasValue()){var h=new R(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=h}if(s.isUrlDefinition()){var v=s.getFillStyleDefinition(this,o);v&&(e.strokeStyle=v)}else if(s.hasValue()){s.getString()==="currentColor"&&s.setValue(this.getStyle("color").getColor());var g=s.getString();g!=="inherit"&&(e.strokeStyle=g==="none"?"rgba(0,0,0,0)":g)}if(o.hasValue()){var p=new R(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=p}var S=this.getStyle("stroke-width");if(S.hasValue()){var m=S.getPixels();e.lineWidth=m||ae}var E=this.getStyle("stroke-linecap"),k=this.getStyle("stroke-linejoin"),_=this.getStyle("stroke-miterlimit"),w=this.getStyle("stroke-dasharray"),T=this.getStyle("stroke-dashoffset");if(E.hasValue()&&(e.lineCap=E.getString()),k.hasValue()&&(e.lineJoin=k.getString()),_.hasValue()&&(e.miterLimit=_.getNumber()),w.hasValue()&&w.getString()!=="none"){var B=q(w.getString());typeof e.setLineDash<"u"?e.setLineDash(B):typeof e.webkitLineDash<"u"?e.webkitLineDash=B:typeof e.mozDash<"u"&&!(B.length===1&&B[0]===0)&&(e.mozDash=B);var D=T.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=D:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=D:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=D)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var j=this.getStyle("font"),U=this.getStyle("font-style"),X=this.getStyle("font-variant"),F=this.getStyle("font-weight"),G=this.getStyle("font-size"),J=this.getStyle("font-family"),z=new H(U.getString(),X.getString(),F.getString(),G.hasValue()?"".concat(G.getPixels(!0),"px"):"",J.getString(),H.parse(j.getString(),e.font));U.setValue(z.fontStyle),X.setValue(z.fontVariant),F.setValue(z.fontWeight),G.setValue(z.fontSize),J.setValue(z.fontFamily),e.font=z.toString(),G.isPixels()&&(this.document.emSize=G.getPixels(),this.modifiedEmSizeStack=!0)}a||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(e){te.default(d.default(t.prototype),"clearContext",this).call(this,e),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),t}(N);function Hr(u){var l=Wr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Wr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var V=function(u){x.default(t,u);var l=Hr(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="path",n.pathParser=null,n.pathParser=new A(n.getAttribute("d").getString()),n}return P.default(t,[{key:"path",value:function(e){var a=this.pathParser,n=new Y;for(a.reset(),e&&e.beginPath();!a.isEnd();)switch(a.next().type){case A.MOVE_TO:this.pathM(e,n);break;case A.LINE_TO:this.pathL(e,n);break;case A.HORIZ_LINE_TO:this.pathH(e,n);break;case A.VERT_LINE_TO:this.pathV(e,n);break;case A.CURVE_TO:this.pathC(e,n);break;case A.SMOOTH_CURVE_TO:this.pathS(e,n);break;case A.QUAD_TO:this.pathQ(e,n);break;case A.SMOOTH_QUAD_TO:this.pathT(e,n);break;case A.ARC:this.pathA(e,n);break;case A.CLOSE_PATH:this.pathZ(e,n);break}return n}},{key:"getBoundingBox",value:function(e){return this.path()}},{key:"getMarkers",value:function(){var e=this.pathParser,a=e.getMarkerPoints(),n=e.getMarkerAngles(),i=a.map(function(s,o){return[s,n[o]]});return i}},{key:"renderChildren",value:function(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var a=this.getStyle("fill-rule");e.fillStyle!==""&&(a.getString("inherit")!=="inherit"?e.fill(a.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var n=this.getMarkers();if(n){var i=n.length-1,s=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),f=this.getStyle("marker-end");if(s.isUrlDefinition()){var c=s.getDefinition(),h=M.default(n[0],2),v=h[0],g=h[1];c.render(e,v,g)}if(o.isUrlDefinition())for(var p=o.getDefinition(),S=1;S<i;S++){var m=M.default(n[S],2),E=m[0],k=m[1];p.render(e,E,k)}if(f.isUrlDefinition()){var _=f.getDefinition(),w=M.default(n[i],2),T=w[0],B=w[1];_.render(e,T,B)}}}},{key:"pathM",value:function(e,a){var n=this.pathParser,i=t.pathM(n),s=i.point,o=s.x,f=s.y;n.addMarker(s),a.addPoint(o,f),e&&e.moveTo(o,f)}},{key:"pathL",value:function(e,a){var n=this.pathParser,i=t.pathL(n),s=i.current,o=i.point,f=o.x,c=o.y;n.addMarker(o,s),a.addPoint(f,c),e&&e.lineTo(f,c)}},{key:"pathH",value:function(e,a){var n=this.pathParser,i=t.pathH(n),s=i.current,o=i.point,f=o.x,c=o.y;n.addMarker(o,s),a.addPoint(f,c),e&&e.lineTo(f,c)}},{key:"pathV",value:function(e,a){var n=this.pathParser,i=t.pathV(n),s=i.current,o=i.point,f=o.x,c=o.y;n.addMarker(o,s),a.addPoint(f,c),e&&e.lineTo(f,c)}},{key:"pathC",value:function(e,a){var n=this.pathParser,i=t.pathC(n),s=i.current,o=i.point,f=i.controlPoint,c=i.currentPoint;n.addMarker(c,f,o),a.addBezierCurve(s.x,s.y,o.x,o.y,f.x,f.y,c.x,c.y),e&&e.bezierCurveTo(o.x,o.y,f.x,f.y,c.x,c.y)}},{key:"pathS",value:function(e,a){var n=this.pathParser,i=t.pathS(n),s=i.current,o=i.point,f=i.controlPoint,c=i.currentPoint;n.addMarker(c,f,o),a.addBezierCurve(s.x,s.y,o.x,o.y,f.x,f.y,c.x,c.y),e&&e.bezierCurveTo(o.x,o.y,f.x,f.y,c.x,c.y)}},{key:"pathQ",value:function(e,a){var n=this.pathParser,i=t.pathQ(n),s=i.current,o=i.controlPoint,f=i.currentPoint;n.addMarker(f,o,o),a.addQuadraticCurve(s.x,s.y,o.x,o.y,f.x,f.y),e&&e.quadraticCurveTo(o.x,o.y,f.x,f.y)}},{key:"pathT",value:function(e,a){var n=this.pathParser,i=t.pathT(n),s=i.current,o=i.controlPoint,f=i.currentPoint;n.addMarker(f,o,o),a.addQuadraticCurve(s.x,s.y,o.x,o.y,f.x,f.y),e&&e.quadraticCurveTo(o.x,o.y,f.x,f.y)}},{key:"pathA",value:function(e,a){var n=this.pathParser,i=t.pathA(n),s=i.currentPoint,o=i.rX,f=i.rY,c=i.sweepFlag,h=i.xAxisRotation,v=i.centp,g=i.a1,p=i.ad,S=1-c?1:-1,m=g+S*(p/2),E=new I(v.x+o*Math.cos(m),v.y+f*Math.sin(m));if(n.addMarkerAngle(E,m-S*Math.PI/2),n.addMarkerAngle(s,m-S*Math.PI),a.addPoint(s.x,s.y),e&&!isNaN(g)&&!isNaN(p)){var k=o>f?o:f,_=o>f?1:o/f,w=o>f?f/o:1;e.translate(v.x,v.y),e.rotate(h),e.scale(_,w),e.arc(0,0,k,g,g+p,Boolean(1-c)),e.scale(1/_,1/w),e.rotate(-h),e.translate(-v.x,-v.y)}}},{key:"pathZ",value:function(e,a){t.pathZ(this.pathParser),e&&a.x1!==a.x2&&a.y1!==a.y2&&e.closePath()}}],[{key:"pathM",value:function(e){var a=e.getAsCurrentPoint();return e.start=e.current,{point:a}}},{key:"pathL",value:function(e){var a=e.current,n=e.getAsCurrentPoint();return{current:a,point:n}}},{key:"pathH",value:function(e){var a=e.current,n=e.command,i=new I((n.relative?a.x:0)+n.x,a.y);return e.current=i,{current:a,point:i}}},{key:"pathV",value:function(e){var a=e.current,n=e.command,i=new I(a.x,(n.relative?a.y:0)+n.y);return e.current=i,{current:a,point:i}}},{key:"pathC",value:function(e){var a=e.current,n=e.getPoint("x1","y1"),i=e.getAsControlPoint("x2","y2"),s=e.getAsCurrentPoint();return{current:a,point:n,controlPoint:i,currentPoint:s}}},{key:"pathS",value:function(e){var a=e.current,n=e.getReflectedControlPoint(),i=e.getAsControlPoint("x2","y2"),s=e.getAsCurrentPoint();return{current:a,point:n,controlPoint:i,currentPoint:s}}},{key:"pathQ",value:function(e){var a=e.current,n=e.getAsControlPoint("x1","y1"),i=e.getAsCurrentPoint();return{current:a,controlPoint:n,currentPoint:i}}},{key:"pathT",value:function(e){var a=e.current,n=e.getReflectedControlPoint();e.control=n;var i=e.getAsCurrentPoint();return{current:a,controlPoint:n,currentPoint:i}}},{key:"pathA",value:function(e){var a=e.current,n=e.command,i=n.rX,s=n.rY,o=n.xRot,f=n.lArcFlag,c=n.sweepFlag,h=o*(Math.PI/180),v=e.getAsCurrentPoint(),g=new I(Math.cos(h)*(a.x-v.x)/2+Math.sin(h)*(a.y-v.y)/2,-Math.sin(h)*(a.x-v.x)/2+Math.cos(h)*(a.y-v.y)/2),p=Math.pow(g.x,2)/Math.pow(i,2)+Math.pow(g.y,2)/Math.pow(s,2);p>1&&(i*=Math.sqrt(p),s*=Math.sqrt(p));var S=(f===c?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(s,2)-Math.pow(i,2)*Math.pow(g.y,2)-Math.pow(s,2)*Math.pow(g.x,2))/(Math.pow(i,2)*Math.pow(g.y,2)+Math.pow(s,2)*Math.pow(g.x,2)));isNaN(S)&&(S=0);var m=new I(S*i*g.y/s,S*-s*g.x/i),E=new I((a.x+v.x)/2+Math.cos(h)*m.x-Math.sin(h)*m.y,(a.y+v.y)/2+Math.sin(h)*m.x+Math.cos(h)*m.y),k=Me([1,0],[(g.x-m.x)/i,(g.y-m.y)/s]),_=[(g.x-m.x)/i,(g.y-m.y)/s],w=[(-g.x-m.x)/i,(-g.y-m.y)/s],T=Me(_,w);return ye(_,w)<=-1&&(T=Math.PI),ye(_,w)>=1&&(T=0),{currentPoint:v,rX:i,rY:s,sweepFlag:c,xAxisRotation:h,centp:E,a1:k,ad:T}}},{key:"pathZ",value:function(e){e.current=e.start}}]),t}(Z);function Qr(u){var l=Zr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Zr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Le=function(u){x.default(t,u);var l=Qr(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="glyph",n.horizAdvX=n.getAttribute("horiz-adv-x").getNumber(),n.unicode=n.getAttribute("unicode").getString(),n.arabicForm=n.getAttribute("arabic-form").getString(),n}return t}(V);function Jr(u){var l=Kr();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Kr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ue=function(u){x.default(t,u);var l=Jr(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,(this instanceof t?this.constructor:void 0)===t?!0:a),n.type="text",n.x=0,n.y=0,n.measureCache=-1,n}return P.default(t,[{key:"setContext",value:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;te.default(d.default(t.prototype),"setContext",this).call(this,e,a);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(e.textBaseline=n)}},{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(e){var a=this;if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var n=null;return this.children.forEach(function(i,s){var o=a.getChildBoundingBox(e,a,a,s);n?n.addBoundingBox(o):n=o}),n}},{key:"getFontSize",value:function(){var e=this.document,a=this.parent,n=H.parse(e.ctx.font).fontSize,i=a.getStyle("font-size").getNumber(n);return i}},{key:"getTElementBoundingBox",value:function(e){var a=this.getFontSize();return new Y(this.x,this.y-a,this.x+this.measureText(e),this.y)}},{key:"getGlyph",value:function(e,a,n){var i=a[n],s=null;if(e.isArabic){var o=a.length,f=a[n-1],c=a[n+1],h="isolated";if((n===0||f===" ")&&n<o-1&&c!==" "&&(h="terminal"),n>0&&f!==" "&&n<o-1&&c!==" "&&(h="medial"),n>0&&f!==" "&&(n===o-1||c===" ")&&(h="initial"),typeof e.glyphs[i]<"u"){var v=e.glyphs[i];s=v instanceof Le?v:v[h]}}else s=e.glyphs[i];return s||(s=e.missingGlyph),s}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(e){var a=e||this.node,n=Array.from(a.parentNode.childNodes),i=n.indexOf(a),s=n.length-1,o=re(a.textContent||"");return i===0&&(o=Je(o)),i===s&&(o=Ke(o)),o}},{key:"renderChildren",value:function(e){var a=this;if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach(function(i,s){a.renderChild(e,a,a,s)});var n=this.document.screen.mouse;n.isWorking()&&n.checkBoundingBox(this,this.getBoundingBox(e))}},{key:"renderTElementChildren",value:function(e){var a=this.document,n=this.parent,i=this.getText(),s=n.getStyle("font-family").getDefinition();if(s){for(var o=s.fontFace.unitsPerEm,f=H.parse(a.ctx.font),c=n.getStyle("font-size").getNumber(f.fontSize),h=n.getStyle("font-style").getString(f.fontStyle),v=c/o,g=s.isRTL?i.split("").reverse().join(""):i,p=q(n.getAttribute("dx").getString()),S=g.length,m=0;m<S;m++){var E=this.getGlyph(s,g,m);e.translate(this.x,this.y),e.scale(v,-v);var k=e.lineWidth;e.lineWidth=e.lineWidth*o/c,h==="italic"&&e.transform(1,0,.4,1,0,0),E.render(e),h==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=k,e.scale(1/v,-1/v),e.translate(-this.x,-this.y),this.x+=c*(E.horizAdvX||s.horizAdvX)/o,typeof p[m]<"u"&&!isNaN(p[m])&&(this.x+=p[m])}return}var _=this.x,w=this.y;e.fillStyle&&e.fillText(i,_,w),e.strokeStyle&&e.strokeText(i,_,w)}},{key:"applyAnchoring",value:function(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],a=e.getStyle("text-anchor").getString("start"),n=!1,i=0;a==="start"&&!n||a==="end"&&n?i=e.x-this.minX:a==="end"&&!n||a==="start"&&n?i=e.x-this.maxX:i=e.x-(this.minX+this.maxX)/2;for(var s=this.textChunkStart;s<this.leafTexts.length;s++)this.leafTexts[s].x+=i;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}},{key:"adjustChildCoordinatesRecursive",value:function(e){var a=this;this.children.forEach(function(n,i){a.adjustChildCoordinatesRecursiveCore(e,a,a,i)}),this.applyAnchoring()}},{key:"adjustChildCoordinatesRecursiveCore",value:function(e,a,n,i){var s=n.children[i];s.children.length>0?s.children.forEach(function(o,f){a.adjustChildCoordinatesRecursiveCore(e,a,s,f)}):this.adjustChildCoordinates(e,a,n,i)}},{key:"adjustChildCoordinates",value:function(e,a,n,i){var s=n.children[i];if(typeof s.measureText!="function")return s;e.save(),s.setContext(e,!0);var o=s.getAttribute("x"),f=s.getAttribute("y"),c=s.getAttribute("dx"),h=s.getAttribute("dy"),v=s.getStyle("font-family").getDefinition(),g=Boolean(v)&&v.isRTL;i===0&&(o.hasValue()||o.setValue(s.getInheritedAttribute("x")),f.hasValue()||f.setValue(s.getInheritedAttribute("y")),c.hasValue()||c.setValue(s.getInheritedAttribute("dx")),h.hasValue()||h.setValue(s.getInheritedAttribute("dy")));var p=s.measureText(e);return g&&(a.x-=p),o.hasValue()?(a.applyAnchoring(),s.x=o.getPixels("x"),c.hasValue()&&(s.x+=c.getPixels("x"))):(c.hasValue()&&(a.x+=c.getPixels("x")),s.x=a.x),a.x=s.x,g||(a.x+=p),f.hasValue()?(s.y=f.getPixels("y"),h.hasValue()&&(s.y+=h.getPixels("y"))):(h.hasValue()&&(a.y+=h.getPixels("y")),s.y=a.y),a.y=s.y,a.leafTexts.push(s),a.minX=Math.min(a.minX,s.x,s.x+p),a.maxX=Math.max(a.maxX,s.x,s.x+p),s.clearContext(e),e.restore(),s}},{key:"getChildBoundingBox",value:function(e,a,n,i){var s=n.children[i];if(typeof s.getBoundingBox!="function")return null;var o=s.getBoundingBox(e);return o?(s.children.forEach(function(f,c){var h=a.getChildBoundingBox(e,a,s,c);o.addBoundingBox(h)}),o):null}},{key:"renderChild",value:function(e,a,n,i){var s=n.children[i];s.render(e),s.children.forEach(function(o,f){a.renderChild(e,a,s,f)})}},{key:"measureText",value:function(e){var a=this.measureCache;if(~a)return a;var n=this.getText(),i=this.measureTargetText(e,n);return this.measureCache=i,i}},{key:"measureTargetText",value:function(e,a){if(!a.length)return 0;var n=this.parent,i=n.getStyle("font-family").getDefinition();if(i){for(var s=this.getFontSize(),o=i.isRTL?a.split("").reverse().join(""):a,f=q(n.getAttribute("dx").getString()),c=o.length,h=0,v=0;v<c;v++){var g=this.getGlyph(i,o,v);h+=(g.horizAdvX||i.horizAdvX)*s/i.fontFace.unitsPerEm,typeof f[v]<"u"&&!isNaN(f[v])&&(h+=f[v])}return h}if(!e.measureText)return a.length*10;e.save(),this.setContext(e,!0);var p=e.measureText(a),S=p.width;return this.clearContext(e),e.restore(),S}},{key:"getInheritedAttribute",value:function(e){for(var a=this;a instanceof t&&a.isFirstChild();){var n=a.parent.getAttribute(e);if(n.hasValue(!0))return n.getValue("0");a=a.parent}return null}}]),t}(Z);function en(u){var l=tn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function tn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var qe=function(u){x.default(t,u);var l=en(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,(this instanceof t?this.constructor:void 0)===t?!0:a),n.type="tspan",n.text=n.children.length>0?"":n.getTextFromNode(),n}return P.default(t,[{key:"getText",value:function(){return this.text}}]),t}(ue);function rn(u){var l=nn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function nn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var an=function(u){x.default(t,u);var l=rn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="textNode",r}return t}(qe);function un(u){var l=sn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function sn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var se=function(u){x.default(t,u);var l=un(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="svg",r.root=!1,r}return P.default(t,[{key:"setContext",value:function(e){var a,n=this.document,i=n.screen,s=n.window,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&s&&typeof s.getComputedStyle<"u"){e.font=s.getComputedStyle(o).getPropertyValue("font");var f=new R(n,"fontSize",H.parse(e.font).fontSize);f.hasValue()&&(n.rootEmSize=f.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var c=i.viewPort,h=c.width,v=c.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 g=this.getAttribute("refX"),p=this.getAttribute("refY"),S=this.getAttribute("viewBox"),m=S.hasValue()?q(S.getString()):null,E=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",k=0,_=0,w=0,T=0;m&&(k=m[0],_=m[1]),this.root||(h=this.getStyle("width").getPixels("x"),v=this.getStyle("height").getPixels("y"),this.type==="marker"&&(w=k,T=_,k=0,_=0)),i.viewPort.setCurrent(h,v),this.node&&(!this.parent||((a=this.node.parentNode)===null||a===void 0?void 0:a.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),te.default(d.default(t.prototype),"setContext",this).call(this,e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),m&&(h=m[2],v=m[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:h,height:i.viewPort.height,desiredHeight:v,minX:k,minY:_,refX:g.getValue(),refY:p.getValue(),clip:E,clipX:w,clipY:T}),m&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(h,v))}},{key:"clearContext",value:function(e){te.default(d.default(t.prototype),"clearContext",this).call(this,e),this.document.screen.viewPort.removeCurrent()}},{key:"resize",value:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),s=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),f=this.getAttribute("style"),c=i.getNumber(0),h=s.getNumber(0);if(n)if(typeof n=="string")this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var v=this.getAttribute("preserveAspectRatio");v.hasValue()&&v.setValue(v.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),s.setValue(a),o.hasValue()||o.setValue("0 0 ".concat(c||e," ").concat(h||a)),f.hasValue()){var g=this.getStyle("width"),p=this.getStyle("height");g.hasValue()&&g.setValue("".concat(e,"px")),p.hasValue()&&p.setValue("".concat(a,"px"))}}}]),t}(Z);function ln(u){var l=on();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function on(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Xe=function(u){x.default(t,u);var l=ln(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="rect",r}return P.default(t,[{key:"path",value:function(e){var a=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),s=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),f=this.getAttribute("ry"),c=o.getPixels("x"),h=f.getPixels("y");if(o.hasValue()&&!f.hasValue()&&(h=c),f.hasValue()&&!o.hasValue()&&(c=h),c=Math.min(c,i/2),h=Math.min(h,s/2),e){var v=4*((Math.sqrt(2)-1)/3);e.beginPath(),s>0&&i>0&&(e.moveTo(a+c,n),e.lineTo(a+i-c,n),e.bezierCurveTo(a+i-c+v*c,n,a+i,n+h-v*h,a+i,n+h),e.lineTo(a+i,n+s-h),e.bezierCurveTo(a+i,n+s-h+v*h,a+i-c+v*c,n+s,a+i-c,n+s),e.lineTo(a+c,n+s),e.bezierCurveTo(a+c-v*c,n+s,a,n+s-h+v*h,a,n+s-h),e.lineTo(a,n+h),e.bezierCurveTo(a,n+h-v*h,a+c-v*c,n,a+c,n),e.closePath())}return new Y(a,n,a+i,n+s)}},{key:"getMarkers",value:function(){return null}}]),t}(V);function fn(u){var l=cn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function cn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var vt=function(u){x.default(t,u);var l=fn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="circle",r}return P.default(t,[{key:"path",value:function(e){var a=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return e&&i>0&&(e.beginPath(),e.arc(a,n,i,0,Math.PI*2,!1),e.closePath()),new Y(a-i,n-i,a+i,n+i)}},{key:"getMarkers",value:function(){return null}}]),t}(V);function hn(u){var l=vn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function vn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var gt=function(u){x.default(t,u);var l=hn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="ellipse",r}return P.default(t,[{key:"path",value:function(e){var a=4*((Math.sqrt(2)-1)/3),n=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),s=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&n>0&&i>0&&(e.beginPath(),e.moveTo(s+n,o),e.bezierCurveTo(s+n,o+a*i,s+a*n,o+i,s,o+i),e.bezierCurveTo(s-a*n,o+i,s-n,o+a*i,s-n,o),e.bezierCurveTo(s-n,o-a*i,s-a*n,o-i,s,o-i),e.bezierCurveTo(s+a*n,o-i,s+n,o-a*i,s+n,o),e.closePath()),new Y(s-n,o-i,s+n,o+i)}},{key:"getMarkers",value:function(){return null}}]),t}(V);function gn(u){var l=dn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function dn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var dt=function(u){x.default(t,u);var l=gn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="line",r}return P.default(t,[{key:"getPoints",value:function(){return[new I(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new I(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(e){var a=this.getPoints(),n=M.default(a,2),i=n[0],s=i.x,o=i.y,f=n[1],c=f.x,h=f.y;return e&&(e.beginPath(),e.moveTo(s,o),e.lineTo(c,h)),new Y(s,o,c,h)}},{key:"getMarkers",value:function(){var e=this.getPoints(),a=M.default(e,2),n=a[0],i=a[1],s=n.angleTo(i);return[[n,s],[i,s]]}}]),t}(V);function pn(u){var l=yn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function yn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ge=function(u){x.default(t,u);var l=pn(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="polyline",n.points=[],n.points=I.parsePath(n.getAttribute("points").getString()),n}return P.default(t,[{key:"path",value:function(e){var a=this.points,n=M.default(a,1),i=n[0],s=i.x,o=i.y,f=new Y(s,o);return e&&(e.beginPath(),e.moveTo(s,o)),a.forEach(function(c){var h=c.x,v=c.y;f.addPoint(h,v),e&&e.lineTo(h,v)}),f}},{key:"getMarkers",value:function(){var e=this.points,a=e.length-1,n=[];return e.forEach(function(i,s){s!==a&&n.push([i,i.angleTo(e[s+1])])}),n.length>0&&n.push([e[e.length-1],n[n.length-1][1]]),n}}]),t}(V);function mn(u){var l=Sn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Sn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var pt=function(u){x.default(t,u);var l=mn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="polygon",r}return P.default(t,[{key:"path",value:function(e){var a=te.default(d.default(t.prototype),"path",this).call(this,e),n=M.default(this.points,1),i=n[0],s=i.x,o=i.y;return e&&(e.lineTo(s,o),e.closePath()),a}}]),t}(Ge);function bn(u){var l=_n();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function _n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var yt=function(u){x.default(t,u);var l=bn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="pattern",r}return P.default(t,[{key:"createPattern",value:function(e,a,n){var i=this.getStyle("width").getPixels("x",!0),s=this.getStyle("height").getPixels("y",!0),o=new se(this.document,null);o.attributes.viewBox=new R(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new R(this.document,"width","".concat(i,"px")),o.attributes.height=new R(this.document,"height","".concat(s,"px")),o.attributes.transform=new R(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var f=this.document.createCanvas(i,s),c=f.getContext("2d"),h=this.getAttribute("x"),v=this.getAttribute("y");h.hasValue()&&v.hasValue()&&c.translate(h.getPixels("x",!0),v.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(var g=-1;g<=1;g++)for(var p=-1;p<=1;p++)c.save(),o.attributes.x=new R(this.document,"x",g*f.width),o.attributes.y=new R(this.document,"y",p*f.height),o.render(c),c.restore();var S=e.createPattern(f,"repeat");return S}}]),t}(N);function kn(u){var l=Pn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Pn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var mt=function(u){x.default(t,u);var l=kn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="marker",r}return P.default(t,[{key:"render",value:function(e,a,n){if(!!a){var i=a.x,s=a.y,o=this.getAttribute("orient").getString("auto"),f=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,s),o==="auto"&&e.rotate(n),f==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var c=new se(this.document,null);c.type=this.type,c.attributes.viewBox=new R(this.document,"viewBox",this.getAttribute("viewBox").getValue()),c.attributes.refX=new R(this.document,"refX",this.getAttribute("refX").getValue()),c.attributes.refY=new R(this.document,"refY",this.getAttribute("refY").getValue()),c.attributes.width=new R(this.document,"width",this.getAttribute("markerWidth").getValue()),c.attributes.height=new R(this.document,"height",this.getAttribute("markerHeight").getValue()),c.attributes.overflow=new R(this.document,"overflow",this.getAttribute("overflow").getValue()),c.attributes.fill=new R(this.document,"fill",this.getAttribute("fill").getColor("black")),c.attributes.stroke=new R(this.document,"stroke",this.getAttribute("stroke").getValue("none")),c.children=this.children,c.render(e),e.restore(),f==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-n),e.translate(-i,-s)}}}]),t}(N);function Rn(u){var l=Cn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Cn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var St=function(u){x.default(t,u);var l=Rn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="defs",r}return P.default(t,[{key:"render",value:function(){}}]),t}(N);function wn(u){var l=xn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function xn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Se=function(u){x.default(t,u);var l=wn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="g",r}return P.default(t,[{key:"getBoundingBox",value:function(e){var a=new Y;return this.children.forEach(function(n){a.addBoundingBox(n.getBoundingBox(e))}),a}}]),t}(Z);function En(u){var l=An();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function An(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ye=function(u){x.default(t,u);var l=En(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.attributesToInherit=["gradientUnits"],n.stops=[];var i=he.default(n),s=i.stops,o=i.children;return o.forEach(function(f){f.type==="stop"&&s.push(f)}),n}return P.default(t,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(e,a,n){var i=this,s=this;this.getHrefAttribute().hasValue()&&(s=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(s));var o=s,f=o.stops,c=this.getGradient(e,a);if(!c)return this.addParentOpacity(n,f[f.length-1].color);if(f.forEach(function(B){c.addColorStop(B.offset,i.addParentOpacity(n,B.color))}),this.getAttribute("gradientTransform").hasValue()){var h=this.document,v=h.screen,g=v.MAX_VIRTUAL_PIXELS,p=v.viewPort,S=M.default(p.viewPorts,1),m=S[0],E=new Xe(h,null);E.attributes.x=new R(h,"x",-g/3),E.attributes.y=new R(h,"y",-g/3),E.attributes.width=new R(h,"width",g),E.attributes.height=new R(h,"height",g);var k=new Se(h,null);k.attributes.transform=new R(h,"transform",this.getAttribute("gradientTransform").getValue()),k.children=[E];var _=new se(h,null);_.attributes.x=new R(h,"x",0),_.attributes.y=new R(h,"y",0),_.attributes.width=new R(h,"width",m.width),_.attributes.height=new R(h,"height",m.height),_.children=[k];var w=h.createCanvas(m.width,m.height),T=w.getContext("2d");return T.fillStyle=c,_.render(T),T.createPattern(w,"no-repeat")}return c}},{key:"inheritStopContainer",value:function(e){var a=this;this.attributesToInherit.forEach(function(n){!a.getAttribute(n).hasValue()&&e.getAttribute(n).hasValue()&&a.getAttribute(n,!0).setValue(e.getAttribute(n).getValue())})}},{key:"addParentOpacity",value:function(e,a){if(e.hasValue()){var n=new R(this.document,"color",a);return n.addOpacity(e).getColor()}return a}}]),t}(N);function Tn(u){var l=Mn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Mn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var bt=function(u){x.default(t,u);var l=Tn(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="linearGradient",n.attributesToInherit.push("x1","y1","x2","y2"),n}return P.default(t,[{key:"getGradient",value:function(e,a){var n=this.getGradientUnits()==="objectBoundingBox",i=n?a.getBoundingBox(e):null;if(n&&!i)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var s=n?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=n?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),f=n?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),c=n?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return s===f&&o===c?null:e.createLinearGradient(s,o,f,c)}}]),t}(Ye);function Bn(u){var l=Nn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Nn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var _t=function(u){x.default(t,u);var l=Bn(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="radialGradient",n.attributesToInherit.push("cx","cy","r","fx","fy","fr"),n}return P.default(t,[{key:"getGradient",value:function(e,a){var n=this.getGradientUnits()==="objectBoundingBox",i=a.getBoundingBox(e);if(n&&!i)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var s=n?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=n?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),f=s,c=o;this.getAttribute("fx").hasValue()&&(f=n?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(c=n?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var h=n?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),v=this.getAttribute("fr").getPixels();return e.createRadialGradient(f,c,v,s,o,h)}}]),t}(Ye);function On(u){var l=Vn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Vn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var kt=function(u){x.default(t,u);var l=On(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="stop";var i=Math.max(0,Math.min(1,n.getAttribute("offset").getNumber())),s=n.getStyle("stop-opacity"),o=n.getStyle("stop-color",!0);return o.getString()===""&&o.setValue("#000"),s.hasValue()&&(o=o.addOpacity(s)),n.offset=i,n.color=o.getColor(),n}return t}(N);function $n(u){var l=In();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function In(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var be=function(u){x.default(t,u);var l=$n(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="animate",n.duration=0,n.initialValue=null,n.initialUnits="",n.removed=!1,n.frozen=!1,r.screen.animations.push(he.default(n)),n.begin=n.getAttribute("begin").getMilliseconds(),n.maxDuration=n.begin+n.getAttribute("dur").getMilliseconds(),n.from=n.getAttribute("from"),n.to=n.getAttribute("to"),n.values=new R(r,"values",null);var i=n.getAttribute("values");return i.hasValue()&&n.values.setValue(i.getString().split(";")),n}return P.default(t,[{key:"getProperty",value:function(){var e=this.getAttribute("attributeType").getString(),a=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(a,!0):this.parent.getAttribute(a,!0)}},{key:"calcValue",value:function(){var e=this.initialUnits,a=this.getProgress(),n=a.progress,i=a.from,s=a.to,o=i.getNumber()+(s.getNumber()-i.getNumber())*n;return e==="%"&&(o*=100),"".concat(o).concat(e)}},{key:"update",value:function(e){var a=this.parent,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,a.animationFrozen=!0,a.animationFrozenValue=n.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,n.setValue(a.animationFrozen?a.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var s=!1;if(this.begin<this.duration){var o=this.calcValue(),f=this.getAttribute("type");if(f.hasValue()){var c=f.getString();o="".concat(c,"(").concat(o,")")}n.setValue(o),s=!0}return s}},{key:"getProgress",value:function(){var e=this.document,a=this.values,n={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(a.hasValue()){var i=n.progress*(a.getValue().length-1),s=Math.floor(i),o=Math.ceil(i);n.from=new R(e,"from",parseFloat(a.getValue()[s])),n.to=new R(e,"to",parseFloat(a.getValue()[o])),n.progress=(i-s)/(o-s)}else n.from=this.from,n.to=this.to;return n}}]),t}(N);function Dn(u){var l=zn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function zn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Pt=function(u){x.default(t,u);var l=Dn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="animateColor",r}return P.default(t,[{key:"calcValue",value:function(){var e=this.getProgress(),a=e.progress,n=e.from,i=e.to,s=new Ee.default(n.getColor()),o=new Ee.default(i.getColor());if(s.ok&&o.ok){var f=s.r+(o.r-s.r)*a,c=s.g+(o.g-s.g)*a,h=s.b+(o.b-s.b)*a;return"rgb(".concat(Math.floor(f),", ").concat(Math.floor(c),", ").concat(Math.floor(h),")")}return this.getAttribute("from").getColor()}}]),t}(be);function Fn(u){var l=Ln();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Ln(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Rt=function(u){x.default(t,u);var l=Fn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="animateTransform",r}return P.default(t,[{key:"calcValue",value:function(){var e=this.getProgress(),a=e.progress,n=e.from,i=e.to,s=q(n.getString()),o=q(i.getString()),f=s.map(function(c,h){var v=o[h];return c+(v-c)*a}).join(" ");return f}}]),t}(be);function qn(u,l){var t=typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(!t){if(Array.isArray(u)||(t=Xn(u))||l&&u&&typeof u.length=="number"){t&&(u=t);var r=0,e=function(){};return{s:e,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(o){throw o},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,n=!1,i;return{s:function(){t=t.call(u)},n:function(){var o=t.next();return a=o.done,o},e:function(o){n=!0,i=o},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(n)throw i}}}}function Xn(u,l){if(!!u){if(typeof u=="string")return Ct(u,l);var t=Object.prototype.toString.call(u).slice(8,-1);if(t==="Object"&&u.constructor&&(t=u.constructor.name),t==="Map"||t==="Set")return Array.from(u);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ct(u,l)}}function Ct(u,l){(l==null||l>u.length)&&(l=u.length);for(var t=0,r=new Array(l);t<l;t++)r[t]=u[t];return r}function Gn(u){var l=Yn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Yn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var wt=function(u){x.default(t,u);var l=Gn(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="font",n.glyphs={},n.horizAdvX=n.getAttribute("horiz-adv-x").getNumber();var i=r.definitions,s=he.default(n),o=s.children,f=qn(o),c;try{for(f.s();!(c=f.n()).done;){var h=c.value;switch(h.type){case"font-face":{n.fontFace=h;var v=h.getStyle("font-family");v.hasValue()&&(i[v.getString()]=he.default(n));break}case"missing-glyph":n.missingGlyph=h;break;case"glyph":{var g=h;g.arabicForm?(n.isRTL=!0,n.isArabic=!0,typeof n.glyphs[g.unicode]>"u"&&(n.glyphs[g.unicode]={}),n.glyphs[g.unicode][g.arabicForm]=g):n.glyphs[g.unicode]=g;break}default:}}}catch(p){f.e(p)}finally{f.f()}return n}return P.default(t,[{key:"render",value:function(){}}]),t}(N);function jn(u){var l=Un();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Un(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var xt=function(u){x.default(t,u);var l=jn(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="font-face",n.ascent=n.getAttribute("ascent").getNumber(),n.descent=n.getAttribute("descent").getNumber(),n.unitsPerEm=n.getAttribute("units-per-em").getNumber(),n}return t}(N);function Hn(u){var l=Wn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Wn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Et=function(u){x.default(t,u);var l=Hn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="missing-glyph",r.horizAdvX=0,r}return t}(V);function Qn(u){var l=Zn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Zn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var At=function(u){x.default(t,u);var l=Qn(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="tref",r}return P.default(t,[{key:"getText",value:function(){var e=this.getHrefAttribute().getDefinition();if(e){var a=e.children[0];if(a)return a.getText()}return""}}]),t}(ue);function Jn(u){var l=Kn();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Kn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Tt=function(u){x.default(t,u);var l=Jn(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="a";var i=e.childNodes,s=i[0],o=i.length>0&&Array.from(i).every(function(f){return f.nodeType===3});return n.hasText=o,n.text=o?n.getTextFromNode(s):"",n}return P.default(t,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(e){if(this.hasText){te.default(d.default(t.prototype),"renderChildren",this).call(this,e);var a=this.document,n=this.x,i=this.y,s=a.screen.mouse,o=new R(a,"fontSize",H.parse(a.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new Y(n,i-o.getPixels("y"),n+this.measureText(e),i))}else if(this.children.length>0){var f=new Se(this.document,null);f.children=this.children,f.parent=this,f.render(e)}}},{key:"onClick",value:function(){var e=this.document.window;e&&e.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}]),t}(ue);function ea(u,l){var t=typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(!t){if(Array.isArray(u)||(t=ta(u))||l&&u&&typeof u.length=="number"){t&&(u=t);var r=0,e=function(){};return{s:e,n:function(){return r>=u.length?{done:!0}:{done:!1,value:u[r++]}},e:function(o){throw o},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,n=!1,i;return{s:function(){t=t.call(u)},n:function(){var o=t.next();return a=o.done,o},e:function(o){n=!0,i=o},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(n)throw i}}}}function ta(u,l){if(!!u){if(typeof u=="string")return Mt(u,l);var t=Object.prototype.toString.call(u).slice(8,-1);if(t==="Object"&&u.constructor&&(t=u.constructor.name),t==="Map"||t==="Set")return Array.from(u);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Mt(u,l)}}function Mt(u,l){(l==null||l>u.length)&&(l=u.length);for(var t=0,r=new Array(l);t<l;t++)r[t]=u[t];return r}function Bt(u,l){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(u);l&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(u,e).enumerable})),t.push.apply(t,r)}return t}function _e(u){for(var l=1;l<arguments.length;l++){var t=arguments[l]!=null?arguments[l]:{};l%2?Bt(Object(t),!0).forEach(function(r){we.default(u,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):Bt(Object(t)).forEach(function(r){Object.defineProperty(u,r,Object.getOwnPropertyDescriptor(t,r))})}return u}function ra(u){var l=na();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function na(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Nt=function(u){x.default(t,u);var l=ra(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="textPath",n.textWidth=0,n.textHeight=0,n.pathLength=-1,n.glyphInfo=null,n.letterSpacingCache=[],n.measuresCache=new Map([["",0]]);var i=n.getHrefAttribute().getDefinition();return n.text=n.getTextFromNode(),n.dataArray=n.parsePathData(i),n}return P.default(t,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(e){var a=this.dataArray;e&&e.beginPath(),a.forEach(function(n){var i=n.type,s=n.points;switch(i){case A.LINE_TO:e&&e.lineTo(s[0],s[1]);break;case A.MOVE_TO:e&&e.moveTo(s[0],s[1]);break;case A.CURVE_TO:e&&e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case A.QUAD_TO:e&&e.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case A.ARC:{var o=M.default(s,8),f=o[0],c=o[1],h=o[2],v=o[3],g=o[4],p=o[5],S=o[6],m=o[7],E=h>v?h:v,k=h>v?1:h/v,_=h>v?v/h:1;e&&(e.translate(f,c),e.rotate(S),e.scale(k,_),e.arc(0,0,E,g,g+p,Boolean(1-m)),e.scale(1/k,1/_),e.rotate(-S),e.translate(-f,-c));break}case A.CLOSE_PATH:e&&e.closePath();break}})}},{key:"renderChildren",value:function(e){this.setTextData(e),e.save();var a=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),i=this.glyphInfo,s=e.fillStyle;a==="underline"&&e.beginPath(),i.forEach(function(o,f){var c=o.p0,h=o.p1,v=o.rotation,g=o.text;e.save(),e.translate(c.x,c.y),e.rotate(v),e.fillStyle&&e.fillText(g,0,0),e.strokeStyle&&e.strokeText(g,0,0),e.restore(),a==="underline"&&(f===0&&e.moveTo(c.x,c.y+n/8),e.lineTo(h.x,h.y+n/5))}),a==="underline"&&(e.lineWidth=n/20,e.strokeStyle=s,e.stroke(),e.closePath()),e.restore()}},{key:"getLetterSpacingAt",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}},{key:"findSegmentToFitChar",value:function(e,a,n,i,s,o,f,c,h){var v=o,g=this.measureText(e,c);c===" "&&a==="justify"&&n<i&&(g+=(i-n)/s),h>-1&&(v+=this.getLetterSpacingAt(h));var p=this.textHeight/20,S=this.getEquidistantPointOnPath(v,p,0),m=this.getEquidistantPointOnPath(v+g,p,0),E={p0:S,p1:m},k=S&&m?Math.atan2(m.y-S.y,m.x-S.x):0;if(f){var _=Math.cos(Math.PI/2+k)*f,w=Math.cos(-k)*f;E.p0=_e(_e({},S),{},{x:S.x+_,y:S.y+w}),E.p1=_e(_e({},m),{},{x:m.x+_,y:m.y+w})}return v+=g,{offset:v,segment:E,rotation:k}}},{key:"measureText",value:function(e,a){var n=this.measuresCache,i=a||this.getText();if(n.has(i))return n.get(i);var s=this.measureTargetText(e,i);return n.set(i,s),s}},{key:"setTextData",value:function(e){var a=this;if(!this.glyphInfo){var n=this.getText(),i=n.split(""),s=n.split(" ").length-1,o=this.parent.getAttribute("dx").split().map(function(D){return D.getPixels("x")}),f=this.parent.getAttribute("dy").getPixels("y"),c=this.parent.getStyle("text-anchor").getString("start"),h=this.getStyle("letter-spacing"),v=this.parent.getStyle("letter-spacing"),g=0;!h.hasValue()||h.getValue()==="inherit"?g=v.getPixels():h.hasValue()&&h.getValue()!=="initial"&&h.getValue()!=="unset"&&(g=h.getPixels());var p=[],S=n.length;this.letterSpacingCache=p;for(var m=0;m<S;m++)p.push(typeof o[m]<"u"?o[m]:g);var E=p.reduce(function(D,j,U){return U===0?0:D+j||0},0),k=this.measureText(e),_=Math.max(k+E,0);this.textWidth=k,this.textHeight=this.getFontSize(),this.glyphInfo=[];var w=this.getPathLength(),T=this.getStyle("startOffset").getNumber(0)*w,B=0;(c==="middle"||c==="center")&&(B=-_/2),(c==="end"||c==="right")&&(B=-_),B+=T,i.forEach(function(D,j){var U=a.findSegmentToFitChar(e,c,_,w,s,B,f,D,j),X=U.offset,F=U.segment,G=U.rotation;B=X,!(!F.p0||!F.p1)&&a.glyphInfo.push({text:i[j],p0:F.p0,p1:F.p1,rotation:G})})}}},{key:"parsePathData",value:function(e){if(this.pathLength=-1,!e)return[];var a=[],n=e.pathParser;for(n.reset();!n.isEnd();){var i=n.current,s=i?i.x:0,o=i?i.y:0,f=n.next(),c=f.type,h=[];switch(f.type){case A.MOVE_TO:this.pathM(n,h);break;case A.LINE_TO:c=this.pathL(n,h);break;case A.HORIZ_LINE_TO:c=this.pathH(n,h);break;case A.VERT_LINE_TO:c=this.pathV(n,h);break;case A.CURVE_TO:this.pathC(n,h);break;case A.SMOOTH_CURVE_TO:c=this.pathS(n,h);break;case A.QUAD_TO:this.pathQ(n,h);break;case A.SMOOTH_QUAD_TO:c=this.pathT(n,h);break;case A.ARC:h=this.pathA(n);break;case A.CLOSE_PATH:V.pathZ(n);break}f.type!==A.CLOSE_PATH?a.push({type:c,points:h,start:{x:s,y:o},pathLength:this.calcLength(s,o,c,h)}):a.push({type:A.CLOSE_PATH,points:[],pathLength:0})}return a}},{key:"pathM",value:function(e,a){var n=V.pathM(e).point,i=n.x,s=n.y;a.push(i,s)}},{key:"pathL",value:function(e,a){var n=V.pathL(e).point,i=n.x,s=n.y;return a.push(i,s),A.LINE_TO}},{key:"pathH",value:function(e,a){var n=V.pathH(e).point,i=n.x,s=n.y;return a.push(i,s),A.LINE_TO}},{key:"pathV",value:function(e,a){var n=V.pathV(e).point,i=n.x,s=n.y;return a.push(i,s),A.LINE_TO}},{key:"pathC",value:function(e,a){var n=V.pathC(e),i=n.point,s=n.controlPoint,o=n.currentPoint;a.push(i.x,i.y,s.x,s.y,o.x,o.y)}},{key:"pathS",value:function(e,a){var n=V.pathS(e),i=n.point,s=n.controlPoint,o=n.currentPoint;return a.push(i.x,i.y,s.x,s.y,o.x,o.y),A.CURVE_TO}},{key:"pathQ",value:function(e,a){var n=V.pathQ(e),i=n.controlPoint,s=n.currentPoint;a.push(i.x,i.y,s.x,s.y)}},{key:"pathT",value:function(e,a){var n=V.pathT(e),i=n.controlPoint,s=n.currentPoint;return a.push(i.x,i.y,s.x,s.y),A.QUAD_TO}},{key:"pathA",value:function(e){var a=V.pathA(e),n=a.rX,i=a.rY,s=a.sweepFlag,o=a.xAxisRotation,f=a.centp,c=a.a1,h=a.ad;return s===0&&h>0&&(h-=2*Math.PI),s===1&&h<0&&(h+=2*Math.PI),[f.x,f.y,n,i,c,h,o,s]}},{key:"calcLength",value:function(e,a,n,i){var s=0,o=null,f=null,c=0;switch(n){case A.LINE_TO:return this.getLineLength(e,a,i[0],i[1]);case A.CURVE_TO:for(s=0,o=this.getPointOnCubicBezier(0,e,a,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)f=this.getPointOnCubicBezier(c,e,a,i[0],i[1],i[2],i[3],i[4],i[5]),s+=this.getLineLength(o.x,o.y,f.x,f.y),o=f;return s;case A.QUAD_TO:for(s=0,o=this.getPointOnQuadraticBezier(0,e,a,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)f=this.getPointOnQuadraticBezier(c,e,a,i[0],i[1],i[2],i[3]),s+=this.getLineLength(o.x,o.y,f.x,f.y),o=f;return s;case A.ARC:{s=0;var h=i[4],v=i[5],g=i[4]+v,p=Math.PI/180;if(Math.abs(h-g)<p&&(p=Math.abs(h-g)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),v<0)for(c=h-p;c>g;c-=p)f=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),s+=this.getLineLength(o.x,o.y,f.x,f.y),o=f;else for(c=h+p;c<g;c+=p)f=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),s+=this.getLineLength(o.x,o.y,f.x,f.y),o=f;return f=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],g,0),s+=this.getLineLength(o.x,o.y,f.x,f.y),s}}return 0}},{key:"getPointOnLine",value:function(e,a,n,i,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:a,f=arguments.length>6&&arguments[6]!==void 0?arguments[6]:n,c=(s-n)/(i-a+ae),h=Math.sqrt(e*e/(1+c*c));i<a&&(h*=-1);var v=c*h,g=null;if(i===a)g={x:o,y:f+v};else if((f-n)/(o-a+ae)===c)g={x:o+h,y:f+v};else{var p=0,S=0,m=this.getLineLength(a,n,i,s);if(m<ae)return null;var E=(o-a)*(i-a)+(f-n)*(s-n);E/=m*m,p=a+E*(i-a),S=n+E*(s-n);var k=this.getLineLength(o,f,p,S),_=Math.sqrt(e*e-k*k);h=Math.sqrt(_*_/(1+c*c)),i<a&&(h*=-1),v=c*h,g={x:p+h,y:S+v}}return g}},{key:"getPointOnPath",value:function(e){var a=this.getPathLength(),n=0,i=null;if(e<-5e-5||e-5e-5>a)return null;var s=this.dataArray,o=ea(s),f;try{for(o.s();!(f=o.n()).done;){var c=f.value;if(c&&(c.pathLength<5e-5||n+c.pathLength+5e-5<e)){n+=c.pathLength;continue}var h=e-n,v=0;switch(c.type){case A.LINE_TO:i=this.getPointOnLine(h,c.start.x,c.start.y,c.points[0],c.points[1],c.start.x,c.start.y);break;case A.ARC:{var g=c.points[4],p=c.points[5],S=c.points[4]+p;if(v=g+h/c.pathLength*p,p<0&&v<S||p>=0&&v>S)break;i=this.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],v,c.points[6]);break}case A.CURVE_TO:v=h/c.pathLength,v>1&&(v=1),i=this.getPointOnCubicBezier(v,c.start.x,c.start.y,c.points[0],c.points[1],c.points[2],c.points[3],c.points[4],c.points[5]);break;case A.QUAD_TO:v=h/c.pathLength,v>1&&(v=1),i=this.getPointOnQuadraticBezier(v,c.start.x,c.start.y,c.points[0],c.points[1],c.points[2],c.points[3]);break;default:}if(i)return i;break}}catch(m){o.e(m)}finally{o.f()}return null}},{key:"getLineLength",value:function(e,a,n,i){return Math.sqrt((n-e)*(n-e)+(i-a)*(i-a))}},{key:"getPathLength",value:function(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce(function(e,a){return a.pathLength>0?e+a.pathLength:e},0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(e,a,n,i,s,o,f,c,h){var v=c*Be(e)+o*Ne(e)+i*Oe(e)+a*Ve(e),g=h*Be(e)+f*Ne(e)+s*Oe(e)+n*Ve(e);return{x:v,y:g}}},{key:"getPointOnQuadraticBezier",value:function(e,a,n,i,s,o,f){var c=o*$e(e)+i*Ie(e)+a*De(e),h=f*$e(e)+s*Ie(e)+n*De(e);return{x:c,y:h}}},{key:"getPointOnEllipticalArc",value:function(e,a,n,i,s,o){var f=Math.cos(o),c=Math.sin(o),h={x:n*Math.cos(s),y:i*Math.sin(s)};return{x:e+(h.x*f-h.y*c),y:a+(h.x*c+h.y*f)}}},{key:"buildEquidistantCache",value:function(e,a){var n=this.getPathLength(),i=a||.25,s=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==s||this.equidistantCache.precision!==i){this.equidistantCache={step:s,precision:i,points:[]};for(var o=0,f=0;f<=n;f+=i){var c=this.getPointOnPath(f),h=this.getPointOnPath(f+i);!c||!h||(o+=this.getLineLength(c.x,c.y,h.x,h.y),o>=s&&(this.equidistantCache.points.push({x:c.x,y:c.y,distance:f}),o-=s))}}}},{key:"getEquidistantPointOnPath",value:function(e,a,n){if(this.buildEquidistantCache(a,n),e<0||e-this.getPathLength()>5e-5)return null;var i=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}]),t}(ue);function aa(u){var l=ia();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function ia(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ua=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,Ot=function(u){x.default(t,u);var l=aa(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="image",n.loaded=!1;var i=n.getHrefAttribute().getString();if(!i)return C.default(n);var s=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);return r.images.push(he.default(n)),s?n.loadSvg(i):n.loadImage(i),n.isSvg=s,n}return P.default(t,[{key:"loadImage",value:function(){var r=W.default($.default.mark(function a(n){var i;return $.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,this.document.createImage(n);case 3:i=o.sent,this.image=i,o.next=10;break;case 7:o.prev=7,o.t0=o.catch(0),console.error('Error while loading image "'.concat(n,'":'),o.t0);case 10:this.loaded=!0;case 11:case"end":return o.stop()}},a,this,[[0,7]])}));function e(a){return r.apply(this,arguments)}return e}()},{key:"loadSvg",value:function(){var r=W.default($.default.mark(function a(n){var i,s,o,f;return $.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(i=ua.exec(n),!i){h.next=6;break}s=i[5],i[4]==="base64"?this.image=atob(s):this.image=decodeURIComponent(s),h.next=19;break;case 6:return h.prev=6,h.next=9,this.document.fetch(n);case 9:return o=h.sent,h.next=12,o.text();case 12:f=h.sent,this.image=f,h.next=19;break;case 16:h.prev=16,h.t0=h.catch(6),console.error('Error while loading image "'.concat(n,'":'),h.t0);case 19:this.loaded=!0;case 20:case"end":return h.stop()}},a,this,[[6,16]])}));function e(a){return r.apply(this,arguments)}return e}()},{key:"renderChildren",value:function(e){var a=this.document,n=this.image,i=this.loaded,s=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),f=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y");if(!(!i||!n||!f||!c)){if(e.save(),e.translate(s,o),this.isSvg){var h=a.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:f,scaleHeight:c});h.document.documentElement.parent=this,h.render()}else{var v=this.image;a.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:f,desiredWidth:v.width,height:c,desiredHeight:v.height}),this.loaded&&(typeof v.complete>"u"||v.complete)&&e.drawImage(v,0,0)}e.restore()}}},{key:"getBoundingBox",value:function(){var e=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new Y(e,a,e+n,a+i)}}]),t}(Z);function sa(u){var l=la();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function la(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Vt=function(u){x.default(t,u);var l=sa(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="symbol",r}return P.default(t,[{key:"render",value:function(e){}}]),t}(Z),$t=function(){function u(l){b.default(this,u),this.document=l,this.loaded=!1,l.fonts.push(this)}return P.default(u,[{key:"load",value:function(){var l=W.default($.default.mark(function r(e,a){var n,i,s;return $.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.prev=0,n=this.document,f.next=4,n.canvg.parser.load(a);case 4:i=f.sent,s=i.getElementsByTagName("font"),Array.from(s).forEach(function(c){var h=n.createElement(c);n.definitions[e]=h}),f.next=12;break;case 9:f.prev=9,f.t0=f.catch(0),console.error('Error while loading font "'.concat(a,'":'),f.t0);case 12:this.loaded=!0;case 13:case"end":return f.stop()}},r,this,[[0,9]])}));function t(r,e){return l.apply(this,arguments)}return t}()}]),u}();function oa(u){var l=fa();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function fa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var je=function(u){x.default(t,u);var l=oa(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="style";var i=re(Array.from(e.childNodes).map(function(o){return o.textContent}).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),s=i.split("}");return s.forEach(function(o){var f=o.trim();if(!!f){var c=f.split("{"),h=c[0].split(","),v=c[1].split(";");h.forEach(function(g){var p=g.trim();if(!!p){var S=r.styles[p]||{};if(v.forEach(function(k){var _=k.indexOf(":"),w=k.substr(0,_).trim(),T=k.substr(_+1,k.length-_).trim();w&&T&&(S[w]=new R(r,w,T))}),r.styles[p]=S,r.stylesSpecificity[p]=rt(p),p==="@font-face"){var m=S["font-family"].getString().replace(/"|'/g,""),E=S.src.getString().split(",");E.forEach(function(k){if(k.indexOf('format("svg")')>0){var _=Ae(k);_&&new $t(r).load(m,_)}})}}})}}),n}return t}(N);je.parseExternalUrl=Ae;function ca(u){var l=ha();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function ha(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var It=function(u){x.default(t,u);var l=ca(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="use",r}return P.default(t,[{key:"setContext",value:function(e){te.default(d.default(t.prototype),"setContext",this).call(this,e);var a=this.getAttribute("x"),n=this.getAttribute("y");a.hasValue()&&e.translate(a.getPixels("x"),0),n.hasValue()&&e.translate(0,n.getPixels("y"))}},{key:"path",value:function(e){var a=this.element;a&&a.path(e)}},{key:"renderChildren",value:function(e){var a=this.document,n=this.element;if(n){var i=n;if(n.type==="symbol"&&(i=new se(a,null),i.attributes.viewBox=new R(a,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new R(a,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new R(a,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new R(a,"opacity",this.calculateOpacity())),i.type==="svg"){var s=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);s.hasValue()&&(i.attributes.width=new R(a,"width",s.getString())),o.hasValue()&&(i.attributes.height=new R(a,"height",o.getString()))}var f=i.parent;i.parent=this,i.render(e),i.parent=f}}},{key:"getBoundingBox",value:function(e){var a=this.element;return a?a.getBoundingBox(e):null}},{key:"elementTransform",value:function(){var e=this.document,a=this.element;return ge.fromElement(e,a)}},{key:"element",get:function(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}]),t}(Z);function va(u){var l=ga();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function ga(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ke(u,l,t,r,e,a){return u[t*r*4+l*4+a]}function Pe(u,l,t,r,e,a,n){u[t*r*4+l*4+a]=n}function O(u,l,t){var r=u[l];return r*t}function Q(u,l,t,r){return l+Math.cos(u)*t+Math.sin(u)*r}var Ue=function(u){x.default(t,u);var l=va(t);function t(r,e,a){var n;b.default(this,t),n=l.call(this,r,e,a),n.type="feColorMatrix";var i=q(n.getAttribute("values").getString());switch(n.getAttribute("type").getString("matrix")){case"saturate":{var s=i[0];i=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[Q(o,.213,.787,-.213),Q(o,.715,-.715,-.715),Q(o,.072,-.072,.928),0,0,Q(o,.213,-.213,.143),Q(o,.715,.285,.14),Q(o,.072,-.072,-.283),0,0,Q(o,.213,-.213,-.787),Q(o,.715,-.715,.715),Q(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}return n.matrix=i,n.includeOpacity=n.getAttribute("includeOpacity").hasValue(),n}return P.default(t,[{key:"apply",value:function(e,a,n,i,s){for(var o=this.includeOpacity,f=this.matrix,c=e.getImageData(0,0,i,s),h=0;h<s;h++)for(var v=0;v<i;v++){var g=ke(c.data,v,h,i,s,0),p=ke(c.data,v,h,i,s,1),S=ke(c.data,v,h,i,s,2),m=ke(c.data,v,h,i,s,3),E=O(f,0,g)+O(f,1,p)+O(f,2,S)+O(f,3,m)+O(f,4,1),k=O(f,5,g)+O(f,6,p)+O(f,7,S)+O(f,8,m)+O(f,9,1),_=O(f,10,g)+O(f,11,p)+O(f,12,S)+O(f,13,m)+O(f,14,1),w=O(f,15,g)+O(f,16,p)+O(f,17,S)+O(f,18,m)+O(f,19,1);o&&(E=0,k=0,_=0,w*=m/255),Pe(c.data,v,h,i,s,0,E),Pe(c.data,v,h,i,s,1,k),Pe(c.data,v,h,i,s,2,_),Pe(c.data,v,h,i,s,3,w)}e.clearRect(0,0,i,s),e.putImageData(c,0,0)}}]),t}(N);function da(u){var l=pa();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function pa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var He=function(u){x.default(t,u);var l=da(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="mask",r}return P.default(t,[{key:"apply",value:function(e,a){var n=this.document,i=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),f=this.getStyle("height").getPixels("y");if(!o&&!f){var c=new Y;this.children.forEach(function(m){c.addBoundingBox(m.getBoundingBox(e))}),i=Math.floor(c.x1),s=Math.floor(c.y1),o=Math.floor(c.width),f=Math.floor(c.height)}var h=this.removeStyles(a,t.ignoreStyles),v=n.createCanvas(i+o,s+f),g=v.getContext("2d");n.screen.setDefaults(g),this.renderChildren(g),new Ue(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(g,0,0,i+o,s+f);var p=n.createCanvas(i+o,s+f),S=p.getContext("2d");n.screen.setDefaults(S),a.render(S),S.globalCompositeOperation="destination-in",S.fillStyle=g.createPattern(v,"no-repeat"),S.fillRect(0,0,i+o,s+f),e.fillStyle=S.createPattern(p,"no-repeat"),e.fillRect(0,0,i+o,s+f),this.restoreStyles(a,h)}},{key:"render",value:function(e){}}]),t}(N);He.ignoreStyles=["mask","transform","clip-path"];function ya(u){var l=ma();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function ma(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Dt=function(){},zt=function(u){x.default(t,u);var l=ya(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="clipPath",r}return P.default(t,[{key:"apply",value:function(e){var a=this.document,n=Reflect.getPrototypeOf(e),i=e.beginPath,s=e.closePath;n&&(n.beginPath=Dt,n.closePath=Dt),Reflect.apply(i,e,[]),this.children.forEach(function(o){if(!(typeof o.path>"u")){var f=typeof o.elementTransform<"u"?o.elementTransform():null;f||(f=ge.fromElement(a,o)),f&&f.apply(e),o.path(e),n&&(n.closePath=s),f&&f.unapply(e)}}),Reflect.apply(s,e,[]),e.clip(),n&&(n.beginPath=i,n.closePath=s)}},{key:"render",value:function(e){}}]),t}(N);function Sa(u){var l=ba();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function ba(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var We=function(u){x.default(t,u);var l=Sa(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="filter",r}return P.default(t,[{key:"apply",value:function(e,a){var n=this.document,i=this.children,s=a.getBoundingBox(e);if(!!s){var o=0,f=0;i.forEach(function(_){var w=_.extraFilterDistance||0;o=Math.max(o,w),f=Math.max(f,w)});var c=Math.floor(s.width),h=Math.floor(s.height),v=c+2*o,g=h+2*f;if(!(v<1||g<1)){var p=Math.floor(s.x),S=Math.floor(s.y),m=this.removeStyles(a,t.ignoreStyles),E=n.createCanvas(v,g),k=E.getContext("2d");n.screen.setDefaults(k),k.translate(-p+o,-S+f),a.render(k),i.forEach(function(_){typeof _.apply=="function"&&_.apply(k,0,0,v,g)}),e.drawImage(E,0,0,v,g,p-o,S-f,v,g),this.restoreStyles(a,m)}}}},{key:"render",value:function(e){}}]),t}(N);We.ignoreStyles=["filter","transform","clip-path"];function _a(u){var l=ka();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function ka(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ft=function(u){x.default(t,u);var l=_a(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="feDropShadow",n.addStylesFromStyleDefinition(),n}return P.default(t,[{key:"apply",value:function(e,a,n,i,s){}}]),t}(N);function Pa(u){var l=Ra();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Ra(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Lt=function(u){x.default(t,u);var l=Pa(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="feMorphology",r}return P.default(t,[{key:"apply",value:function(e,a,n,i,s){}}]),t}(N);function Ca(u){var l=wa();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function wa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var qt=function(u){x.default(t,u);var l=Ca(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="feComposite",r}return P.default(t,[{key:"apply",value:function(e,a,n,i,s){}}]),t}(N);function xa(u){var l=Ea();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Ea(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Xt=function(u){x.default(t,u);var l=xa(t);function t(r,e,a){var n;return b.default(this,t),n=l.call(this,r,e,a),n.type="feGaussianBlur",n.blurRadius=Math.floor(n.getAttribute("stdDeviation").getNumber()),n.extraFilterDistance=n.blurRadius,n}return P.default(t,[{key:"apply",value:function(e,a,n,i,s){var o=this.document,f=this.blurRadius,c=o.window?o.window.document.body:null,h=e.canvas;h.id=o.getUniqueId(),c&&(h.style.display="none",c.appendChild(h)),dr.canvasRGBA(h,a,n,i,s,f),c&&c.removeChild(h)}}]),t}(N);function Aa(u){var l=Ta();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Ta(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Gt=function(u){x.default(t,u);var l=Aa(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="title",r}return t}(N);function Ma(u){var l=Ba();return function(){var r=d.default(u),e;if(l){var a=d.default(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return C.default(this,e)}}function Ba(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Yt=function(u){x.default(t,u);var l=Ma(t);function t(){var r;return b.default(this,t),r=l.apply(this,arguments),r.type="desc",r}return t}(N),Na={svg:se,rect:Xe,circle:vt,ellipse:gt,line:dt,polyline:Ge,polygon:pt,path:V,pattern:yt,marker:mt,defs:St,linearGradient:bt,radialGradient:_t,stop:kt,animate:be,animateColor:Pt,animateTransform:Rt,font:wt,"font-face":xt,"missing-glyph":Et,glyph:Le,text:ue,tspan:qe,tref:At,a:Tt,textPath:Nt,image:Ot,g:Se,symbol:Vt,style:je,use:It,mask:He,clipPath:zt,filter:We,feDropShadow:Ft,feMorphology:Lt,feComposite:qt,feColorMatrix:Ue,feGaussianBlur:Xt,title:Gt,desc:Yt};function jt(u,l){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(u);l&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(u,e).enumerable})),t.push.apply(t,r)}return t}function Oa(u){for(var l=1;l<arguments.length;l++){var t=arguments[l]!=null?arguments[l]:{};l%2?jt(Object(t),!0).forEach(function(r){we.default(u,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):jt(Object(t)).forEach(function(r){Object.defineProperty(u,r,Object.getOwnPropertyDescriptor(t,r))})}return u}function Va(u,l){var t=document.createElement("canvas");return t.width=u,t.height=l,t}function $a(u){return Qe.apply(this,arguments)}function Qe(){return Qe=W.default($.default.mark(function u(l){var t,r,e=arguments;return $.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.length>1&&e[1]!==void 0?e[1]:!1,r=document.createElement("img"),t&&(r.crossOrigin="Anonymous"),n.abrupt("return",new Promise(function(i,s){r.onload=function(){i(r)},r.onerror=function(o,f,c,h,v){s(v)},r.src=l}));case 4:case"end":return n.stop()}},u)})),Qe.apply(this,arguments)}var de=function(){function u(l){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.rootEmSize,e=r===void 0?12:r,a=t.emSize,n=a===void 0?12:a,i=t.createCanvas,s=i===void 0?u.createCanvas:i,o=t.createImage,f=o===void 0?u.createImage:o,c=t.anonymousCrossOrigin;b.default(this,u),this.canvg=l,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=l.screen,this.rootEmSize=e,this.emSize=n,this.createCanvas=s,this.createImage=this.bindCreateImage(f,c),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return P.default(u,[{key:"bindCreateImage",value:function(t,r){return typeof r=="boolean"?function(e,a){return t(e,typeof a=="boolean"?a:r)}:t}},{key:"popEmSize",value:function(){var t=this.emSizeStack;t.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 r=this.createElement(t.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}},{key:"createElement",value:function(t){var r=t.nodeName.replace(/^[^:]+:/,""),e=u.elementTypes[r];return typeof e<"u"?new e(this,t):new ht(this,t)}},{key:"createTextNode",value:function(t){return new an(this,t)}},{key:"setViewBox",value:function(t){this.screen.setViewBox(Oa({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){var r=this.emSizeStack;r.push(t)}}]),u}();de.createCanvas=Va,de.createImage=$a,de.elementTypes=Na;function Ut(u,l){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(u);l&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(u,e).enumerable})),t.push.apply(t,r)}return t}function ie(u){for(var l=1;l<arguments.length;l++){var t=arguments[l]!=null?arguments[l]:{};l%2?Ut(Object(t),!0).forEach(function(r){we.default(u,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):Ut(Object(t)).forEach(function(r){Object.defineProperty(u,r,Object.getOwnPropertyDescriptor(t,r))})}return u}var Ht=function(){function u(l,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};b.default(this,u),this.parser=new me(r),this.screen=new ve(l,r),this.options=r;var e=new de(this,r),a=e.createDocumentElement(t);this.document=e,this.documentElement=a}return P.default(u,[{key:"fork",value:function(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return u.from(t,r,ie(ie({},this.options),e))}},{key:"forkString",value:function(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return u.fromString(t,r,ie(ie({},this.options),e))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:function(){var l=W.default($.default.mark(function r(){var e,a=arguments;return $.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=a.length>0&&a[0]!==void 0?a[0]:{},this.start(ie({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},e)),i.next=4,this.ready();case 4:this.stop();case 5:case"end":return i.stop()}},r,this)}));function t(){return l.apply(this,arguments)}return t}()},{key:"start",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=this.documentElement,e=this.screen,a=this.options;e.start(r,ie(ie({enableRedraw:!0},a),t))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,r,e)}}],[{key:"from",value:function(){var l=W.default($.default.mark(function r(e,a){var n,i,s,o=arguments;return $.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return n=o.length>2&&o[2]!==void 0?o[2]:{},i=new me(n),c.next=4,i.parse(a);case 4:return s=c.sent,c.abrupt("return",new u(e,s,n));case 6:case"end":return c.stop()}},r)}));function t(r,e){return l.apply(this,arguments)}return t}()},{key:"fromString",value:function(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=new me(e),n=a.parseFromString(r);return new u(t,n,e)}}]),u}();y.AElement=Tt,y.AnimateColorElement=Pt,y.AnimateElement=be,y.AnimateTransformElement=Rt,y.BoundingBox=Y,y.CB1=Be,y.CB2=Ne,y.CB3=Oe,y.CB4=Ve,y.Canvg=Ht,y.CircleElement=vt,y.ClipPathElement=zt,y.DefsElement=St,y.DescElement=Yt,y.Document=de,y.Element=N,y.EllipseElement=gt,y.FeColorMatrixElement=Ue,y.FeCompositeElement=qt,y.FeDropShadowElement=Ft,y.FeGaussianBlurElement=Xt,y.FeMorphologyElement=Lt,y.FilterElement=We,y.Font=H,y.FontElement=wt,y.FontFaceElement=xt,y.GElement=Se,y.GlyphElement=Le,y.GradientElement=Ye,y.ImageElement=Ot,y.LineElement=dt,y.LinearGradientElement=bt,y.MarkerElement=mt,y.MaskElement=He,y.Matrix=ze,y.MissingGlyphElement=Et,y.Mouse=at,y.PSEUDO_ZERO=ae,y.Parser=me,y.PathElement=V,y.PathParser=A,y.PatternElement=yt,y.Point=I,y.PolygonElement=pt,y.PolylineElement=Ge,y.Property=R,y.QB1=$e,y.QB2=Ie,y.QB3=De,y.RadialGradientElement=_t,y.RectElement=Xe,y.RenderedElement=Z,y.Rotate=lt,y.SVGElement=se,y.SVGFontLoader=$t,y.Scale=ot,y.Screen=ve,y.Skew=Fe,y.SkewX=ft,y.SkewY=ct,y.StopElement=kt,y.StyleElement=je,y.SymbolElement=Vt,y.TRefElement=At,y.TSpanElement=qe,y.TextElement=ue,y.TextPathElement=Nt,y.TitleElement=Gt,y.Transform=ge,y.Translate=st,y.UnknownElement=ht,y.UseElement=It,y.ViewPort=nt,y.compressSpaces=re,y.default=Ht,y.getSelectorSpecificity=rt,y.normalizeAttributeName=et,y.normalizeColor=tt,y.parseExternalUrl=Ae,y.presets=Sr,y.toNumbers=q,y.trimLeft=Je,y.trimRight=Ke,y.vectorMagnitude=Te,y.vectorsAngle=Me,y.vectorsRatio=ye}(Ze)),Ze}var ir=Oi();const Li=Ni({__proto__:null,default:ir},[ir]);export{Li as i,Oi as r};
|