1(self.webpackChunkEnergsoft_App=self.webpackChunkEnergsoft_App||[]).push([[163],{40644(pt){(function(){var Z,ht,U,_,ct,st;typeof performance<"u"&&null!==performance&&performance.now?pt.exports=function(){return performance.now()}:typeof process<"u"&&null!==process&&process.hrtime?(pt.exports=function(){return(Z()-ct)/1e6},ht=process.hrtime,_=(Z=function(){var tt;return 1e9*(tt=ht())[0]+tt[1]})(),st=1e9*process.uptime(),ct=_-st):Date.now?(pt.exports=function(){return Date.now()-U},U=Date.now()):(pt.exports=function(){return(new Date).getTime()-U},U=(new Date).getTime())}).call(this)},54361(pt,Z,ht){for(var U=ht(40644),_=typeof window>"u"?global:window,ct=["moz","webkit"],st="AnimationFrame",tt=_["request"+st],ut=_["cancel"+st]||_["cancelRequest"+st],E=0;!tt&&E<ct.length;E++)tt=_[ct[E]+"Request"+st],ut=_[ct[E]+"Cancel"+st]||_[ct[E]+"CancelRequest"+st];if(!tt||!ut){var V=0,j=0,et=[],Ft=1e3/60;tt=function(M){if(0===et.length){var W=U(),yt=Math.max(0,Ft-(W-V));V=yt+W,setTimeout(function(){var mt=et.slice(0);et.length=0;for(var At=0;At<mt.length;At++)if(!mt[At].cancelled)try{mt[At].callback(V)}catch(Qt){setTimeout(function(){throw Qt},0)}},Math.round(yt))}return et.push({handle:++j,callback:M,cancelled:!1}),j},ut=function(M){for(var W=0;W<et.length;W++)et[W].handle===M&&(et[W].cancelled=!0)}}pt.exports=function(M){return tt.call(_,M)},pt.exports.cancel=function(){ut.apply(_,arguments)},pt.exports.polyfill=function(M){M||(M=_),M.requestAnimationFrame=tt,M.cancelAnimationFrame=ut}},96310(pt){pt.exports=function(Z){this.ok=!1,this.alpha=1,"#"==Z.charAt(0)&&(Z=Z.substr(1,6)),Z=(Z=Z.replace(/ /g,"")).toLowerCase();var ht={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
10",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};Z=ht[Z]||Z;for(var U=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(E){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3]),parseFloat(E[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(E){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(E){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(E){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)]}}],_=0;_<U.length;_++){var st=U[_].process,tt=U[_].re.exec(Z);if(tt){var ut=st(tt);this.r=ut[0],this.g=ut[1],this.b=ut[2],ut.length>3&&(this.alpha=ut[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var E=this.r.toString(16),V=this.g.toString(16),j=this.b.toString(16);return 1==E.length&&(E="0"+E),1==V.length&&(V="0"+V),1==j.length&&(j="0"+j),"#"+E+V+j},this.getHelpXML=function(){for(var E=new Array,V=0;V<U.length;V++)for(var j=U[V].example,et=0;et<j.length;et++)E[E.length]=j[et];for(var Ft in ht)E[E.length]=Ft;var M=document.createElement("ul");for(M.setAttribute("id","rgbcolor-examples"),V=0;V<E.length;V++)try{var W=document.createElement("li"),yt=new RGBColor(E[V]),mt=document.createElement("div");mt.style.cssText="margin: 3px; border: 1px solid black; background:"+yt.toHex()+"; color:"+yt.toHex(),mt.appendChild(document.createTextNode("test"));var At=document.createTextNode(" "+E[V]+" -> "+yt.toRGB()+" -> "+yt.toHex());W.appendChild(mt),W.appendChild(At),M.appendChild(W)}catch{}return M}}},8163(pt,Z,ht){"use strict";ht.r(Z),ht.d(Z,{AElement:()=>Ci,AnimateColorElement:()=>vi,AnimateElement:()=>ie,AnimateTransformElement:()=>bi,BoundingBox:()=>gt,CB1:()=>pe,CB2:()=>ye,CB3:()=>me,CB4:()=>xe,Canvg:()=>Ut,CircleElement:()=>hi,ClipPathElement:()=>ki,DefsElement:()=>pi,DescElement:()=>zi,Document:()=>Hi,Element:()=>H,EllipseElement:()=>ci,FeColorMatrixElement:()=>Ne,FeCompositeElement:()=>Ii,FeDropShadowElement:()=>Li,FeGaussianBlurElement:()=>Bi,FeMorphologyElement:()=>Di,FilterElement:()=>Ri,Font:()=>Rt,FontElement:()=>Ai,FontFaceElement:()=>Pe,GElement:()=>ee,GlyphElement:()=>se,GradientElement:()=>Ee,ImageElement:()=>Si,LineElement:()=>ui,LinearGradientElement:()=>yi,MarkerElement:()=>di,MaskElement:()=>Oi,Matrix:()=>Te,MissingGlyphElement:()=>Me,Mouse:()=>ti,PSEUDO_ZERO:()=>kt,Parser:()=>Jt,PathElement:()=>k,PathParser:()=>S,PatternElement:()=>gi,Point:()=>B,PolygonElement:()=>fi,PolylineElement:()=>Se,Property:()=>C,QB1:()=>ve,QB2:()=>be,QB3:()=>Ae,RadialGradientElement:()=>mi,RectElement:()=>we,RenderedElement:()=>wt,Rotate:()=>ri,SVGElement:()=>zt,SVGFontLoader:()=>Pi,Scale:()=>ni,Screen:()=>Kt,Skew:()=>Ce,SkewX:()=>oi,SkewY:()=>ai,StopElement:()=>xi,StyleElement:()=>Mi,SymbolElement:()=>Ei,TRefElement:()=>Ti,TSpanElement:()=>Wt,TextElement:()=>Tt,TextPathElement:()=>wi,TitleElement:()=>Fi,Transform:()=>te,Translate:()=>si,UnknownElement:()=>li,UseElement:()=>Ni,ViewPort:()=>jt,compressSpaces:()=>Ot,elements:()=>Ui,getSelectorSpecificity:()=>Ke,normalizeAttributeName:()=>Ze,normalizeColor:()=>je,parseExternalUrl:()=>fe,presets:()=>Ji,toMatrixValue:()=>$e,toNumbers:()=>rt,trimLeft:()=>Qe,trimRight:()=>qe,vectorMagnitude:()=>ge,vectorsAngle:()=>de,vectorsRatio:()=>Zt});var U=ht(10467),_=ht(54361),ct=ht(96310),st=function(l,t){return(st=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])})(l,t)};function tt(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=l}st(l,t),l.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}function E(l,t){var e=l[0],i=l[1];return[e*Math.cos(t)-i*Math.sin(t),e*Math.sin(t)+i*Math.cos(t)]}function V(){for(var l=[],t=0;t<arguments.length;t++)l[t]=arguments[t];for(var e=0;e<l.length;e++)if("number"!=typeof l[e])throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof l[e]+" == typeof "+l[e]);return!0}var j=Math.PI;function et(l,t,e){l.lArcFlag=0===l.lArcFlag?0:1,l.sweepFlag=0===l.sweepFlag?0:1;var i=l.rX,s=l.rY,r=l.x,o=l.y;i=Math.abs(l.rX),s=Math.abs(l.rY);var n=E([(t-r)/2,(e-o)/2],-l.xRot/180*j),a=n[0],h=n[1],c=Math.pow(a,2)/Math.pow(i,2)+Math.pow(h,2)/Math.pow(s,2);1<c&&(i*=Math.sqrt(c),s*=Math.sqrt(c)),l.rX=i,l.rY=s;var f=Math.pow(i,2)*Math.pow(h,2)+Math.pow(s,2)*Math.pow(a,2),g=(l.lArcFlag!==l.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(s,2)-f)/f)),u=i*h/s*g,d=-s*a/i*g,p=E([u,d],l.xRot/180*j);l.cX=p[0]+(t+r)/2,l.cY=p[1]+(e+o)/2,l.phi1=Math.atan2((h-d)/s,(a-u)/i),l.phi2=Math.atan2((-h-d)/s,(-a-u)/i),0===l.sweepFlag&&l.phi2>l.phi1&&(l.phi2-=2*j),1===l.sweepFlag&&l.phi2<l.phi1&&(l.phi2+=2*j),l.phi1*=180/j,l.phi2*=180/j}function Ft(l,t,e){V(l,t,e);var i=l*l+t*t-e*e;if(0>i)return[];if(0===i)return[[l*e/(l*l+t*t),t*e/(l*l+t*t)]];var s=Math.sqrt(i);return[[(l*e+t*s)/(l*l+t*t),(t*e-l*s)/(l*l+t*t)],[(l*e-t*s)/(l*l+t*t),(t*e+l*s)/(l*l+t*t)]]}var M,W=Math.PI/180;function yt(l,t,e){return(1-e)*l+e*t}
vendor: 5,850 bytes, line 1
1function mt(l,t,e,i){return l+Math.cos(i/180*j)*t+Math.sin(i/180*j)*e}function At(l,t,e,i){var s=1e-6,r=t-l,o=e-t,n=3*r+3*(i-e)-6*o,a=6*(o-r),h=3*r;return Math.abs(n)<s?[-h/a]:function(c,f,g){void 0===g&&(g=1e-6);var u=c*c/4-f;if(u<-g)return[];if(u<=g)return[-c/2];var d=Math.sqrt(u);return[-c/2-d,-c/2+d]}(a/n,h/n,s)}function Qt(l,t,e,i,s){var r=1-s;return l*(r*r*r)+t*(3*r*r*s)+e*(3*r*s*s)+i*(s*s*s)}!function(l){function t(){return s(function(n,a,h){return n.relative&&(void 0!==n.x1&&(n.x1+=a),void 0!==n.y1&&(n.y1+=h),void 0!==n.x2&&(n.x2+=a),void 0!==n.y2&&(n.y2+=h),void 0!==n.x&&(n.x+=a),void 0!==n.y&&(n.y+=h),n.relative=!1),n})}function e(){var n=NaN,a=NaN,h=NaN,c=NaN;return s(function(f,g,u){return f.type&m.SMOOTH_CURVE_TO&&(f.type=m.CURVE_TO,n=isNaN(n)?g:n,a=isNaN(a)?u:a,f.x1=f.relative?g-n:2*g-n,f.y1=f.relative?u-a:2*u-a),f.type&m.CURVE_TO?(n=f.relative?g+f.x2:f.x2,a=f.relative?u+f.y2:f.y2):(n=NaN,a=NaN),f.type&m.SMOOTH_QUAD_TO&&(f.type=m.QUAD_TO,h=isNaN(h)?g:h,c=isNaN(c)?u:c,f.x1=f.relative?g-h:2*g-h,f.y1=f.relative?u-c:2*u-c),f.type&m.QUAD_TO?(h=f.relative?g+f.x1:f.x1,c=f.relative?u+f.y1:f.y1):(h=NaN,c=NaN),f})}function i(){var n=NaN,a=NaN;return s(function(h,c,f){if(h.type&m.SMOOTH_QUAD_TO&&(h.type=m.QUAD_TO,n=isNaN(n)?c:n,a=isNaN(a)?f:a,h.x1=h.relative?c-n:2*c-n,h.y1=h.relative?f-a:2*f-a),h.type&m.QUAD_TO){n=h.relative?c+h.x1:h.x1,a=h.relative?f+h.y1:h.y1;var g=h.x1,u=h.y1;h.type=m.CURVE_TO,h.x1=((h.relative?0:c)+2*g)/3,h.y1=((h.relative?0:f)+2*u)/3,h.x2=(h.x+2*g)/3,h.y2=(h.y+2*u)/3}else n=NaN,a=NaN;return h})}function s(n){var a=0,h=0,c=NaN,f=NaN;return function(g){if(isNaN(c)&&!(g.type&m.MOVE_TO))throw new Error("path must start with moveto");var u=n(g,a,h,c,f);return g.type&m.CLOSE_PATH&&(a=c,h=f),void 0!==g.x&&(a=g.relative?a+g.x:g.x),void 0!==g.y&&(h=g.relative?h+g.y:g.y),g.type&m.MOVE_TO&&(c=a,f=h),u}}function r(n,a,h,c,f,g){return V(n,a,h,c,f,g),s(function(u,d,p,y){var x=u.x1,A=u.x2,v=u.relative&&!isNaN(y),b=void 0!==u.x?u.x:v?0:d,w=void 0!==u.y?u.y:v?0:p;function P(J){return J*J}u.type&m.HORIZ_LINE_TO&&0!==a&&(u.type=m.LINE_TO,u.y=u.relative?0:p),u.type&m.VERT_LINE_TO&&0!==h&&(u.type=m.LINE_TO,u.x=u.relative?0:d),void 0!==u.x&&(u.x=u.x*n+w*h+(v?0:f)),void 0!==u.y&&(u.y=b*a+u.y*c+(v?0:g)),void 0!==u.x1&&(u.x1=u.x1*n+u.y1*h+(v?0:f)),void 0!==u.y1&&(u.y1=x*a+u.y1*c+(v?0:g)),void 0!==u.x2&&(u.x2=u.x2*n+u.y2*h+(v?0:f)),void 0!==u.y2&&(u.y2=A*a+u.y2*c+(v?0:g));var T=n*c-a*h;if(void 0!==u.xRot&&(1!==n||0!==a||0!==h||1!==c))if(0===T)delete u.rX,delete u.rY,delete u.xRot,delete u.lArcFlag,delete u.sweepFlag,u.type=m.LINE_TO;else{var N=u.xRot*Math.PI/180,O=Math.sin(N),F=Math.cos(N),L=1/P(u.rX),X=1/P(u.rY),Q=P(F)*L+P(O)*X,q=2*O*F*(L-X),I=P(O)*L+P(F)*X,z=Q*c*c-q*a*c+I*a*a,Y=q*(n*c+a*h)-2*(Q*h*c+I*n*a),K=Q*h*h-q*n*h+I*n*n,D=(Math.atan2(Y,z-K)+Math.PI)%Math.PI/2,R=Math.sin(D),$=Math.cos(D);u.rX=Math.abs(T)/Math.sqrt(z*P($)+Y*R*$+K*P(R)),u.rY=Math.abs(T)/Math.sqrt(z*P(R)-Y*R*$+K*P($)),u.xRot=180*D/Math.PI}return void 0!==u.sweepFlag&&0>T&&(u.sweepFlag=+!u.sweepFlag),u})}l.ROUND=function(n){function a(h){return Math.round(h*n)/n}return void 0===n&&(n=1e13),V(n),function(h){return void 0!==h.x1&&(h.x1=a(h.x1)),void 0!==h.y1&&(h.y1=a(h.y1)),void 0!==h.x2&&(h.x2=a(h.x2)),void 0!==h.y2&&(h.y2=a(h.y2)),void 0!==h.x&&(h.x=a(h.x)),void 0!==h.y&&(h.y=a(h.y)),void 0!==h.rX&&(h.rX=a(h.rX)),void 0!==h.rY&&(h.rY=a(h.rY)),h}},l.TO_ABS=t,l.TO_REL=function(){return s(function(n,a,h){return n.relative||(void 0!==n.x1&&(n.x1-=a),void 0!==n.y1&&(n.y1-=h),void 0!==n.x2&&(n.x2-=a),void 0!==n.y2&&(n.y2-=h),void 0!==n.x&&(n.x-=a),void 0!==n.y&&(n.y-=h),n.relative=!0),n})},l.NORMALIZE_HVZ=function(n,a,h){return void 0===n&&(n=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),s(function(c,f,g,u,d){if(isNaN(u)&&!(c.type&m.MOVE_TO))throw new Error("path must start with moveto");return a&&c.type&m.HORIZ_LINE_TO&&(c.type=m.LINE_TO,c.y=c.relative?0:g),h&&c.type&m.VERT_LINE_TO&&(c.type=m.LINE_TO,c.x=c.relative?0:f),n&&c.type&m.CLOSE_PATH&&(c.type=m.LINE_TO,c.x=c.relative?u-f:u,c.y=c.relative?d-g:d),c.type&m.ARC&&(0===c.rX||0===c.rY)&&(c.type=m.LINE_TO,delete c.rX,delete c.rY,delete c.xRot,delete c.lArcFlag,delete c.sweepFlag),c})},l.NORMALIZE_ST=e,l.QT_TO_C=i,l.INFO=s,l.SANITIZE=function(n){void 0===n&&(n=0),V(n);var a=NaN,h=NaN,c=NaN,f=NaN;return s(function(g,u,d,p,y){var x=Math.abs,A=!1,v=0,b=0;if(g.type&m.SMOOTH_CURVE_TO&&(v=isNaN(a)?0:u-a,b=isNaN(h)?0:d-h),g.type&(m.CURVE_TO|m.SMOOTH_CURVE_TO)?(a=g.relative?u+g.x2:g.x2,h=g.relative?d+g.y2:g.y2):(a=NaN,h=NaN),g.type&m.SMOOTH_QUAD_TO?(c=isNaN(c)?u:2*u-c,f=isNaN(f)?d:2*d-f):g.type&m.QUAD_TO?(c=g.relative?u+g.x1:g.x1,f=g.relative?d+g.y1:g.y2):(c=NaN,f=NaN),g.type&m.LINE_COMMANDS||g.type&m.ARC&&(0===g.rX||0===g.rY||!g.lArcFlag)||g.type&m.CURVE_TO||g.type&m.SMOOTH_CURVE_TO||g.type&m.QUAD_TO||g.type&m.SMOOTH_QUAD_TO){var w=void 0===g.x?0:g.relative?g.x:g.x-u,P=void 0===g.y?0:g.relative?g.y:g.y-d;v=isNaN(c)?void 0===g.x1?v:g.relative?g.x:g.x1-u:c-u,b=isNaN(f)?void 0===g.y1?b:g.relative?g.y:g.y1-d:f-d;var T=void 0===g.x2?0:g.relative?g.x:g.x2-u,N=void 0===g.y2?0:g.relative?g.y:g.y2-d;x(w)<=n&&x(P)<=n&&x(v)<=n&&x(b)<=n&&x(T)<=n&&x(N)<=n&&(A=!0)}return g.type&m.CLOSE_PATH&&x(u-p)<=n&&x(d-y)<=n&&(A=!0),A?[]:g})},l.MATRIX=r,l.ROTATE=function(n,a,h){void 0===a&&(a=0),void 0===h&&(h=0),V(n,a,h);var c=Math.sin(n),f=Math.cos(n);return r(f,c,-c,f,a-a*f+h*c,h-a*c-h*f)},l.TRANSLATE=function(n,a){return void 0===a&&(a=0),V(n,a),r(1,0,0,1,n,a)},l.SCALE=function(n,a){return void 0===a&&(a=n),V(n,a),r(n,0,0,a,0,0)},l.SKEW_X=function(n){return V(n),r(1,0,Math.atan(n),1,0,0)},l.SKEW_Y=function(n){return V(n),r(1,Math.atan(n),0,1,0,0)},l.X_AXIS_SYMMETRY=function(n){return void 0===n&&(n=0),V(n),r(-1,0,0,1,n,0)},l.Y_AXIS_SYMMETRY=function(n){return void 0===n&&(n=0),V(n),r(1,0,0,-1,0,n)},l.A_TO_C=function(){return s(function(n,a,h){return m.ARC===n.t
vendor: 11,482 bytes, line 1
1ype?function(c,f,g){var u,d,p,y;c.cX||et(c,f,g);for(var x=Math.min(c.phi1,c.phi2),A=Math.max(c.phi1,c.phi2)-x,v=Math.ceil(A/90),b=new Array(v),w=f,P=g,T=0;T<v;T++){var N=yt(c.phi1,c.phi2,T/v),O=yt(c.phi1,c.phi2,(T+1)/v),L=4/3*Math.tan((O-N)*W/4),X=[Math.cos(N*W)-L*Math.sin(N*W),Math.sin(N*W)+L*Math.cos(N*W)],Q=X[0],q=X[1],I=[Math.cos(O*W),Math.sin(O*W)],z=I[0],Y=I[1],K=[z+L*Math.sin(O*W),Y-L*Math.cos(O*W)],D=K[0],R=K[1];b[T]={relative:c.relative,type:m.CURVE_TO};var $=function(J,nt){var it=E([J*c.rX,nt*c.rY],c.xRot);return[c.cX+it[0],c.cY+it[1]]};u=$(Q,q),b[T].x1=u[0],b[T].y1=u[1],d=$(D,R),b[T].x2=d[0],b[T].y2=d[1],p=$(z,Y),b[T].x=p[0],b[T].y=p[1],c.relative&&(b[T].x1-=w,b[T].y1-=P,b[T].x2-=w,b[T].y2-=P,b[T].x-=w,b[T].y-=P),w=(y=[b[T].x,b[T].y])[0],P=y[1]}return b}(n,n.relative?0:a,n.relative?0:h):n})},l.ANNOTATE_ARCS=function(){return s(function(n,a,h){return n.relative&&(a=0,h=0),m.ARC===n.type&&et(n,a,h),n})},l.CLONE=function o(){return function(n){var a={};for(var h in n)a[h]=n[h];return a}},l.CALCULATE_BOUNDS=function(){var a=t(),h=i(),c=e(),f=s(function(g,u,d){var p=c(h(a(function(g){var u={};for(var d in g)u[d]=g[d];return u}(g))));function y(R){R>f.maxX&&(f.maxX=R),R<f.minX&&(f.minX=R)}function x(R){R>f.maxY&&(f.maxY=R),R<f.minY&&(f.minY=R)}if(p.type&m.DRAWING_COMMANDS&&(y(u),x(d)),p.type&m.HORIZ_LINE_TO&&y(p.x),p.type&m.VERT_LINE_TO&&x(p.y),p.type&m.LINE_TO&&(y(p.x),x(p.y)),p.type&m.CURVE_TO){y(p.x),x(p.y);for(var A=0,v=At(u,p.x1,p.x2,p.x);A<v.length;A++)0<(D=v[A])&&1>D&&y(Qt(u,p.x1,p.x2,p.x,D));for(var b=0,w=At(d,p.y1,p.y2,p.y);b<w.length;b++)0<(D=w[b])&&1>D&&x(Qt(d,p.y1,p.y2,p.y,D))}if(p.type&m.ARC){y(p.x),x(p.y),et(p,u,d);for(var P=p.xRot/180*Math.PI,T=Math.cos(P)*p.rX,N=Math.sin(P)*p.rX,O=-Math.sin(P)*p.rY,F=Math.cos(P)*p.rY,L=p.phi1<p.phi2?[p.phi1,p.phi2]:-180>p.phi2?[p.phi2+360,p.phi1+360]:[p.phi2,p.phi1],X=L[0],Q=L[1],q=function(R){var nt=180*Math.atan2(R[1],R[0])/Math.PI;return nt<X?nt+360:nt},I=0,z=Ft(O,-T,0).map(q);I<z.length;I++)(D=z[I])>X&&D<Q&&y(mt(p.cX,T,O,D));for(var Y=0,K=Ft(F,-N,0).map(q);Y<K.length;Y++){var D;(D=K[Y])>X&&D<Q&&x(mt(p.cY,N,F,D))}}return g});return f.minX=1/0,f.maxX=-1/0,f.minY=1/0,f.maxY=-1/0,f}}(M||(M={}));var ft,He=function(){function l(){}return l.prototype.round=function(t){return this.transform(M.ROUND(t))},l.prototype.toAbs=function(){return this.transform(M.TO_ABS())},l.prototype.toRel=function(){return this.transform(M.TO_REL())},l.prototype.normalizeHVZ=function(t,e,i){return this.transform(M.NORMALIZE_HVZ(t,e,i))},l.prototype.normalizeST=function(){return this.transform(M.NORMALIZE_ST())},l.prototype.qtToC=function(){return this.transform(M.QT_TO_C())},l.prototype.aToC=function(){return this.transform(M.A_TO_C())},l.prototype.sanitize=function(t){return this.transform(M.SANITIZE(t))},l.prototype.translate=function(t,e){return this.transform(M.TRANSLATE(t,e))},l.prototype.scale=function(t,e){return this.transform(M.SCALE(t,e))},l.prototype.rotate=function(t,e,i){return this.transform(M.ROTATE(t,e,i))},l.prototype.matrix=function(t,e,i,s,r,o){return this.transform(M.MATRIX(t,e,i,s,r,o))},l.prototype.skewX=function(t){return this.transform(M.SKEW_X(t))},l.prototype.skewY=function(t){return this.transform(M.SKEW_Y(t))},l.prototype.xSymmetry=function(t){return this.transform(M.X_AXIS_SYMMETRY(t))},l.prototype.ySymmetry=function(t){return this.transform(M.Y_AXIS_SYMMETRY(t))},l.prototype.annotateArcs=function(){return this.transform(M.ANNOTATE_ARCS())},l}(),_i=function(l){return" "===l||"\t"===l||"\r"===l||"\n"===l},Xe=function(l){return 48<=l.charCodeAt(0)&&l.charCodeAt(0)<=57},Wi=function(l){function t(){var e=l.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return tt(t,l),t.prototype.finish=function(e){if(void 0===e&&(e=[]),this.parse(" ",e),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,i){var s=this;void 0===i&&(i=[]);for(var r=function(f){i.push(f),s.curArgs.length=0,s.canParseCommandOrComma=!0},o=0;o<e.length;o++){var n=e[o],a=!(this.curCommandType!==m.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),h=Xe(n)&&("0"===this.curNumber&&"0"===n||a);if(!Xe(n)||h)if("e"!==n&&"E"!==n)if("-"!==n&&"+"!==n||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==n||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var c=Number(this.curNumber);if(isNaN(c))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===m.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>c)throw new SyntaxError('Expected positive number, got "'+c+'" at index "'+o+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"');this.curArgs.push(c),this.curArgs.length===Gi[this.curCommandType]&&(m.HORIZ_LINE_TO===this.curCommandType?r({type:m.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):m.VERT_LINE_TO===this.curCommandType?r({type:m.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===m.MOVE_TO||this.curCommandType===m.LINE_TO||this.curCommandType===m.SMOOTH_QUAD_TO?(r({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),m.MOVE_TO===this.curCommandType&&(this.curCommandType=m.LINE_TO)):this.curCommandType===m.CURVE_TO?r({type:m.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===m.SMOOTH_CURVE_TO?r({type:m.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===m.QUAD_TO?r({type:m.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===m.ARC&&r({type:m.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!_i(n))if(","===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==n&&"-"!==n&&"."!==n)if(h)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+n+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==n&&"Z"!==n)if("h"===n||"H"===n)this.curCommandType=m.HORIZ_LINE_TO,this.curCommandRelative="h"===n;else if("v"===n||"V"===n)this.curCommandType=m.VERT_LINE_TO,this.curCommandRelative="v"===n;else if("m"===n||"M"===n)this.curCommandType=m.MOVE_TO,this.curCommandRelative="m"===n;else if("l"===n||"L"===n)this.curCommandType=m.LINE_TO,this.curCommandRelative="l"===n;else if("c"===n||"C"===n)this.curCommandType=m.CURVE_TO,this.curCommandRelative="c"===n;else if("s"===n||"S"===n)this.curCommandType=m.SMOOTH_CURVE_TO,this.curCommandRelative="s"===n;else if("q"===n||"Q"===n)this.curCommandType=m.QUAD_TO,this.curCommandRelative="q"===n;else if("t"===n||"T"===n)this.curCommandType=m.SMOOTH_QUAD_TO,this.curCommandRelative="t"===n;else{if("a"!==n&&"A"!==n)throw new SyntaxError('Unexpected character "'+n+'" at index '+o+".");this.curCommandType=m.ARC,this.curCommandRelative="a"===n}else i.push({type:m.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal="."===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return i},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(i,s){void 0===s&&(s=[]);for(var r=0,o=Object.getPrototypeOf(this).parse.call(this,i);r<o.length;r++){var a=e(o[r]);Array.isArray(a)?s.push.apply(s,a):s.push(a)}return s}}})},t}(He),m=function(l){function t(e){var i=l.call(this)||this;return i.commands="string"==typeof e?t.parse(e):e,i}return tt(t,l),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=M.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var i=[],s=0,r=this.commands;s<r.length;s++){var o=e(r[s]);Array.isArray(o)?i.push.apply(i,o):i.push(o)}return this.commands=i,this},t.encode=function(e){return function ut(l){var t="";Array.isArray(l)||(l=[l]);for(var e=0;e<l.length;e++){var i=l[e];if(i.type===m.CLOSE_PATH)t+="z";else if(i.type===m.HORIZ_LINE_TO)t+=(i.relative?"h":"H")+i.x;else if(i.type===m.VERT_LINE_TO)t+=(i.relative?"v":"V")+i.y;else if(i.type===m.MOVE_TO)t+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===m.LINE_TO)t+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===m.CURVE_TO)t+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===m.SMOOTH_CURVE_TO)t+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===m.QUAD_TO)t+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===m.SMOOTH_QUAD_TO)t+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==m.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+e+".");t+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return t}(e)},t.parse=function(e){var i=new Wi,s=[];return i.parse(e,s),i.finish(s),s},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t}(He),Gi=((ft={})[m.MOVE_TO]=2,ft[m.LINE_TO]=2,ft[m.HORIZ_LINE_TO]=1,ft[m.VERT_LINE_TO]=1,ft[m.CLOSE_PATH]=0,ft[m.QUAD_TO]=4,ft[m.SMOOTH_QUAD_TO]=2,ft[m.CURVE_TO]=6,ft[m.SMOOTH_CURVE_TO]=4,ft[m.ARC]=7,ft);function qt(l){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(l)}var Ye=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,39
16,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],_e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Ge(l,t,e,i,s,r){if(!(isNaN(r)||r<1)){r|=0;var o=function We(l,t,e,i,s){if("string"==typeof l&&(l=document.getElementById(l)),!l||"object"!==qt(l)||!("getContext"in l))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var r=l.getContext("2d");try{return r.getImageData(t,e,i,s)}catch(o){throw new Error("unable to access image data: "+o)}}(l,t,e,i,s);o=function qi(l,t,e,i,s,r){for(var d,o=l.data,n=2*r+1,a=i-1,h=s-1,c=r+1,f=c*(c+1)/2,g=new $t,u=g,p=1;p<n;p++)u=u.next=new $t,p===c&&(d=u);u.next=g;for(var y=null,x=null,A=0,v=0,b=Ye[r],w=_e[r],P=0;P<s;P++){u=g;for(var T=o[v],N=o[v+1],O=o[v+2],F=o[v+3],L=0;L<c;L++)u.r=T,u.g=N,u.b=O,u.a=F,u=u.next;for(var X=0,Q=0,q=0,I=0,z=c*T,Y=c*N,K=c*O,D=c*F,R=f*T,$=f*N,J=f*O,nt=f*F,it=1;it<c;it++){var ot=v+((a<it?a:it)<<2),dt=o[ot],xt=o[ot+1],Ht=o[ot+2],Xt=o[ot+3],St=c-it;R+=(u.r=dt)*St,$+=(u.g=xt)*St,J+=(u.b=Ht)*St,nt+=(u.a=Xt)*St,X+=dt,Q+=xt,q+=Ht,I+=Xt,u=u.next}y=g,x=d;for(var Et=0;Et<i;Et++){var Pt=nt*b>>>w;if(o[v+3]=Pt,0!==Pt){var Mt=255/Pt;o[v]=(R*b>>>w)*Mt,o[v+1]=($*b>>>w)*Mt,o[v+2]=(J*b>>>w)*Mt}else o[v]=o[v+1]=o[v+2]=0;R-=z,$-=Y,J-=K,nt-=D,z-=y.r,Y-=y.g,K-=y.b,D-=y.a;var vt=Et+r+1;R+=X+=y.r=o[vt=A+(vt<a?vt:a)<<2],$+=Q+=y.g=o[vt+1],J+=q+=y.b=o[vt+2],nt+=I+=y.a=o[vt+3],y=y.next;var Yt=x.r,_t=x.g,Lt=x.b,Gt=x.a;z+=Yt,Y+=_t,K+=Lt,D+=Gt,X-=Yt,Q-=_t,q-=Lt,I-=Gt,x=x.next,v+=4}A+=i}for(var bt=0;bt<i;bt++){var Dt=o[v=bt<<2],It=o[v+1],Bt=o[v+2],at=o[v+3],ke=c*Dt,Re=c*It,Le=c*Bt,De=c*at,oe=f*Dt,ae=f*It,le=f*Bt,he=f*at;u=g;for(var Xi=0;Xi<c;Xi++)u.r=Dt,u.g=It,u.b=Bt,u.a=at,u=u.next;for(var Yi=i,Ie=0,Be=0,Fe=0,ze=0,ce=1;ce<=r;ce++){var ue=c-ce;oe+=(u.r=Dt=o[v=Yi+bt<<2])*ue,ae+=(u.g=It=o[v+1])*ue,le+=(u.b=Bt=o[v+2])*ue,he+=(u.a=at=o[v+3])*ue,ze+=Dt,Ie+=It,Be+=Bt,Fe+=at,u=u.next,ce<h&&(Yi+=i)}v=bt,y=g,x=d;for(var Ue=0;Ue<s;Ue++){var lt=v<<2;o[lt+3]=at=he*b>>>w,at>0?(o[lt]=(oe*b>>>w)*(at=255/at),o[lt+1]=(ae*b>>>w)*at,o[lt+2]=(le*b>>>w)*at):o[lt]=o[lt+1]=o[lt+2]=0,oe-=ke,ae-=Re,le-=Le,he-=De,ke-=y.r,Re-=y.g,Le-=y.b,De-=y.a,lt=bt+((lt=Ue+c)<h?lt:h)*i<<2,oe+=ze+=y.r=o[lt],ae+=Ie+=y.g=o[lt+1],le+=Be+=y.b=o[lt+2],he+=Fe+=y.a=o[lt+3],y=y.next,ke+=Dt=x.r,Re+=It=x.g,Le+=Bt=x.b,De+=at=x.a,ze-=Dt,Ie-=It,Be-=Bt,Fe-=at,x=x.next,v+=i}}return l}(o,0,0,i,s,r),l.getContext("2d").putImageData(o,t,e)}}var $t=function l(){(function Qi(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")})(this,l),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null},Ji=Object.freeze({__proto__:null,offscreen:function ji(){let{DOMParser:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:l,createCanvas:(e,i)=>new OffscreenCanvas(e,i),createImage:e=>(0,U.A)(function*(){const s=yield(yield fetch(e)).blob();return yield createImageBitmap(s)})()};return(typeof globalThis.DOMParser<"u"||typeof l>"u")&&Reflect.deleteProperty(t,"DOMParser"),t},node:function Ki(l){let{DOMParser:t,canvas:e,fetch:i}=l;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:i,createCanvas:e.createCanvas,createImage:e.loadImage}}});function Ot(l){return l.replace(/(?!\u3000)\s+/gm," ")}function Qe(l){return l.replace(/^[\n \t]+/,"")}function qe(l){return l.replace(/[\n \t]+$/,"")}function rt(l){const t=l.match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm);return t?t.map(parseFloat):[]}function $e(l){const t=rt(l);return[t[0]||0,t[1]||0,t[2]||0,t[3]||0,t[4]||0,t[5]||0]}const ts=/^[A-Z-]+$/;function Ze(l){return ts.test(l)?l.toLowerCase():l}function fe(l){const t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(l);return t&&(t[2]||t[3]||t[4])||""}function je(l){if(!l.startsWith("rgb"))return l;let t=3;return l.replace(/\d+(\.\d+)?/g,(i,s)=>t--&&s?String(Math.round(parseFloat(i))):i)}const es=/(\[[^\]]+\])/g,is=/(#[^\s+>~.[:]+)/g,ss=/(\.[^\s+>~.[:]+)/g,rs=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,ns=/(:[\w-]+\([^)]*\))/gi,os=/(:[^\s+>~.[:]+)/g,as=/([^\s+>~.[:]+)/g;function Vt(l,t){const e=t.exec(l);return e?[l.replace(t," "),e.length]:[l,0]}function Ke(l){const t=[0,0,0];let e=l.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),i=0;return[e,i]=Vt(e,es),t[1]+=i,[e,i]=Vt(e,is),t[0]+=i,[e,i]=Vt(e,ss),t[1]+=i,[e,i]=Vt(e,rs),t[2]+=i,[e,i]=Vt(e,ns),t[1]+=i,[e,i]=Vt(e,os),t[1]+=i,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,i]=Vt(e,as),t[2]+=i,t.join("")}const kt=1e-8;function ge(l){return Math.sqrt(Math.pow(l[0],2)+Math.pow(l[1],2))}function Zt(l,t){return(l[0]*t[0]+l[1]*t[1])/(ge(l)*ge(t))}function de(l,t){return(l[0]*t[1]<l[1]*t[0]?-1:1)*Math.acos(Zt(l,t))}function pe(l){return l*l*l}function ye(l){return 3*l*l*(1-l)}function me(l){return 3*l*(1-l)*(1-l)}function xe(l){return(1-l)*(1-l)*(1-l)}function ve(l){return l*l}function be(l){return 2*l*(1-l)}function Ae(l){return(1-l)*(1-l)}let C=(()=>{class l{static empty(e){return new l(e,"EMPTY","")}split(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ";const{document:i,name:s}=this;return Ot(this.getString()).trim().split(e).map(r=>new l(i,s,r))}hasValue(e){const i=this.value;return null!==i&&""!==i&&(e||0!==i)&&typeof i<"u"}isString(e){const{value:i}=this,s="string"==typeof i;return s&&e?e.test(i):s}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;const e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>
1"u"?0:parseFloat(e);const{value:i}=this;let s=parseFloat(i);return this.isString(/%$/)&&(s/=100),s}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){let i=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,i=je(i),this.value=i),i}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;const[s,r]="boolean"==typeof e?[void 0,e]:[e],{viewPort:o}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(o.computeSize("x"),o.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(o.computeSize("x"),o.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*o.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*o.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);
1case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&r:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*o.computeSize(s);default:{const n=this.getNumber();return i&&n<1?n*o.computeSize(s):n}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){const e=this.getString(),i=/#([^)'"]+)/.exec(e);return this.document.definitions.get(i?.[1]||e)}getFillStyleDefinition(e,i){let s=this.getDefinition();if(!s)return null;if("function"==typeof s.createGradient&&"getBoundingBox"in e)return s.createGradient(this.document.ctx,e,i);if("function"==typeof s.createPattern){if(s.getHrefAttribute().hasValue()){const r=s.getAttribute("patternTransform");s=s.getHrefAttribute().getDefinition(),s&&r.hasValue()&&s.getAttribute("patternTransform",!0).setValue(r.value)}if(s)return s.createPattern(this.document.ctx,e,i)}return null}getTextBaseline(){if(!this.hasValue())return null;const e=this.getString();return l.textBaselineMapping[e]||null}addOpacity(e){let i=this.getColor();const s=i.length;let r=0;for(let o=0;o<s&&(","===i[o]&&r++,3!==r);o++);if(e.hasValue()&&this.isString()&&3!==r){const o=new ct(i);o.ok&&(o.alpha=e.getNumber(),i=o.toRGBA())}return new l(this.document,this.name,i)}constructor(e,i,s){this.document=e,this.name=i,this.value=s,this.isNormalizedColor=!1}}return l.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"},l})(),jt=(()=>{class l{clear(){this.viewPorts=[]}setCurrent(e,i){this.viewPorts.push({width:e,height:i})}removeCurrent(){this.viewPorts.pop()}getRoot(){const[e]=this.viewPorts;return e||Je()}getCurrent(){const{viewPorts:e}=this;return e[e.length-1]||Je()}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return"number"==typeof e?e:"x"===e?this.width:"y"===e?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}constructor(){this.viewPorts=[]}}return l.DEFAULT_VIEWPORT_WIDTH=800,l.DEFAULT_VIEWPORT_HEIGHT=600,l})();function Je(){return{width:jt.DEFAULT_VIEWPORT_WIDTH,height:jt.DEFAULT_VIEWPORT_HEIGHT}}class B{static parse(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const[i=e,s=e]=rt(t);return new B(i,s)}static parseScale(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const[i=e,s=i]=rt(t);return new B(i,s)}static parsePath(t){const e=rt(t),i=e.length,s=[];for(let r=0;r<i;r+=2)s.push(new B(e[r],e[r+1]));return s}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){const{x:e,y:i}=this,r=e*t[1]+i*t[3]+t[5];this.x=e*t[0]+i*t[2]+t[4],this.y=r}constructor(t,e){this.x=t,this.y=e}}class ti{isWorking(){return this.working}start(){if(this.working)return;const{screen:t,onClick:e,onMouseMove:i}=this,s=t.ctx.canvas;s.onclick=e,s.onmousemove=i,this.working=!0}stop(){if(!this.working)return;const t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(!this.working)return;const{screen:t,events:e,eventElements:i}=this,{style:s}=t.ctx.canvas;let r;s&&(s.cursor=""),e.forEach((o,n)=>{let{run:a}=o;for(r=i[n];r;)a(r),r=r.parent}),this.events=[],this.eventElements=[]}checkPath(t,e){if(!this.working||!e)return;const{events:i,eventElements:s}=this;i.forEach((r,o)=>{let{x:n,y:a}=r;!s[o]&&e.isPointInPath&&e.isPointInPath(n,a)&&(s[o]=t)})}checkBoundingBox(t,e){if(!this.working||!e)return;const{events:i,eventElements:s}=this;
1i.forEach((r,o)=>{let{x:n,y:a}=r;!s[o]&&e.isPointInBox(n,a)&&(s[o]=t)})}mapXY(t,e){const{window:i,ctx:s}=this.screen,r=new B(t,e);let o=s.canvas;for(;o;)r.x-=o.offsetLeft,r.y-=o.offsetTop,o=o.offsetParent;return i?.scrollX&&(r.x+=i.scrollX),i?.scrollY&&(r.y+=i.scrollY),r}onClick(t){const{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:i,run(s){s.onClick&&s.onClick()}})}onMouseMove(t){const{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:i,run(s){s.onMouseMove&&s.onMouseMove()}})}constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}}const ei=typeof window<"u"?window:null,ii=typeof fetch<"u"?fetch.bind(void 0):void 0;let Kt=(()=>{class l{wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;const e=this.waits.every(i=>i());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){let{document:i,ctx:s,aspectRatio:r,width:o,desiredWidth:n,height:a,desiredHeight:h,minX:c=0,minY:f=0,refX:g,refY:u,clip:d=!1,clipX:p=0,clipY:y=0}=e;const x=Ot(r).replace(/^defer\s/,""),[A,v]=x.split(" "),b=A||"xMidYMid",w=v||"meet",P=o/n,T=a/h,N=Math.min(P,T),O=Math.max(P,T);let F=n,L=h;"meet"===w&&(F*=N,L*=N),"slice"===w&&(F*=O,L*=O);const X=new C(i,"refX",g),Q=new C(i,"refY",u),q=X.hasValue()&&Q.hasValue();if(q&&s.translate(-N*X.getPixels("x"),-N*Q.getPixels("y")),d){const I=N*p,z=N*y;s.beginPath(),s.moveTo(I,z),s.lineTo(o,z),s.lineTo(o,a),s.lineTo(I,a),s.closePath(),s.clip()}if(!q){const I="meet"===w&&N===T,z="slice"===w&&O===T,Y="meet"===w&&N===P,K="slice"===w&&O===P;b.startsWith("xMid")&&(I||z)&&s.translate(o/2-F/2,0),b.endsWith("YMid")&&(Y||K)&&s.translate(0,a/2-L/2),b.startsWith("xMax")&&(I||z)&&s.translate(o-F,0),b.endsWith("YMax")&&(Y||K)&&s.translate(0,a-L)}switch(!0){case"none"===b:s.scale(P,T);break;case"meet"===w:s.scale(N,N);break;case"slice"===w:s.scale(O,O)}s.translate(-c,-f)}start(e){let{enableRedraw:i=!1,ignoreMouse:s=!1,ignoreAnimation:r=!1,ignoreDimensions:o=!1,ignoreClear:n=!1,forceRedraw:a,scaleWidth:h,scaleHeight:c,offsetX:f,offsetY:g}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{mouse:u}=this,d=1e3/l.FRAMERATE;if(this.isReadyLock=!1,this.frameDuration=d,this.readyPromise=new Promise(v=>{this.resolveReady=v}),this.isReady()&&this.render(e,o,n,h,c,f,g),!i)return;let p=Date.now(),y=p,x=0;const A=()=>{p=Date.now(),x=p-y,x>=d&&(y=p-x%d,this.shouldUpdate(r,a)&&(this.render(e,o,n,h,c,f,g),u.runEvents())),this.intervalId=_(A)};s||u.start(),this.intervalId=_(A)}stop(){this.intervalId&&(_.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,i){if(!e){const{frameDuration:s}=this;if(this.animations.reduce((o,n)=>n.update(s)||o,!1))return!0}return!!("function"==typeof i&&i()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,i,s,r,o,n,a){const{viewPort:h,ctx:c,isFirstRender:f}=this,g=c.canvas;h.clear(),g.width&&g.height&&h.setCurrent(g.width,g.height);const u=e.getStyle("width"),d=e.getStyle("height");!i&&(f||"number"!=typeof r&&"number"!=typeof o)&&(u.hasValue()&&(g.width=u.getPixels("x"),g.style&&(g.style.width="".concat(g.width,"px"))),d.hasValue()&&(g.height=d.getPixels("y"),g.style&&(g.style.height="".concat(g.height,"px"))));let p=g.clientWidth||g.width,y=g.clientHeight||g.height;if(i&&u.hasValue()&&d.hasValue()&&(p=u.getPixels("x"),y=d.getPixels("y")),h.setCurrent(p,y),"number"==typeof n&&e.getAttribute("x",!0).setValue(n),"number"==typeof a&&e.getAttribute("y",!0).setValue(a),"number"==typeof r||"number"==typeof o){const x=rt(e.getAttribute("viewBox").getString());let A=0,v=0;if("number"==typeof r){const w=e.getStyle("width");w.hasValue()?A=w.getPixels("x")/r:x[2]&&!isNaN(x[2])&&(A=x[2]/r)}if("number"==typeof o){const w=e.getStyle("height");w.hasValue()?v=w.getPixels("y")/o:x[3]&&!isNaN(x[3])&&(v=x[3]/o)}A||(A=v),v||(v=A),e.getAttribute("width",!0).setValue(r),e.getAttribute("height",!0).setValue(o);const b=e.getStyle("transform",!0,!0);b.setValue("".concat(b.getString()," scale(").concat(1/A,", ").concat(1/v,")"))}s||c.clearRect(0,0,p,y),e.render(c),f&&(this.isFirstRender=!1)}constructor(e,{fetch:i=ii,window:s=ei}={}){if(this.ctx=e,this.viewPort=new jt,this.mouse=new ti(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=s,!i)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");this.fetch=i}}return l.defaultWindow=ei,l.defaultFetch=ii,l.FRAMERATE=30,l.MAX_VIRTUAL_PIXELS=3e4,l})();const{defaultFetch:ls}=Kt,hs=typeof DOMParser<"u"?DOMParser:void 0;class Jt{parse(t){var e=this;return(0,U.A)(function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)})()}parseFromString(t){const e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){const e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent||"Unknown parse error");return t}load(t){var e=this;return(0,U.A)(function*(){const s=yield(yield e.fetch(t)).text();return e.parseFromString(s)})()}constructor({fetch:t=ls,DOMParser:e=hs}={}){if(!t)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");
1if(!e)throw new Error("Can't find 'DOMParser' in 'globalThis', please provide it via options");this.fetch=t,this.DOMParser=e}}class si{apply(t){const{x:e,y:i}=this.point;t.translate(e||0,i||0)}unapply(t){const{x:e,y:i}=this.point;t.translate(-1*e||0,-1*i||0)}applyToPoint(t){const{x:e,y:i}=this.point;t.applyTransform([1,0,0,1,e||0,i||0])}constructor(t,e){this.type="translate",this.point=B.parse(e)}}class ri{apply(t){const{cx:e,cy:i,originX:s,originY:r,angle:o}=this,n=e+s.getPixels("x"),a=i+r.getPixels("y");t.translate(n,a),t.rotate(o.getRadians()),t.translate(-n,-a)}unapply(t){const{cx:e,cy:i,originX:s,originY:r,angle:o}=this,n=e+s.getPixels("x"),a=i+r.getPixels("y");t.translate(n,a),t.rotate(-1*o.getRadians()),t.translate(-n,-a)}applyToPoint(t){const{cx:e,cy:i,angle:s}=this,r=s.getRadians();t.applyTransform([1,0,0,1,e||0,i||0]),t.applyTransform([Math.cos(r),Math.sin(r),-Math.sin(r),Math.cos(r),0,0]),t.applyTransform([1,0,0,1,-e||0,-i||0])}constructor(t,e,i){this.type="rotate";const s=rt(e);this.angle=new C(t,"angle",s[0]),this.originX=i[0],this.originY=i[1],this.cx=s[1]||0,this.cy=s[2]||0}}class ni{apply(t){const{scale:{x:e,y:i},originX:s,originY:r}=this,o=s.getPixels("x"),n=r.getPixels("y");t.translate(o,n),t.scale(e,i||e),t.translate(-o,-n)}unapply(t){const{scale:{x:e,y:i},originX:s,originY:r}=this,o=s.getPixels("x"),n=r.getPixels("y");t.translate(o,n),t.scale(1/e,1/i||e),t.translate(-o,-n)}applyToPoint(t){const{x:e,y:i}=this.scale;t.applyTransform([e||0,0,0,i||0,0,0])}constructor(t,e,i){this.type="scale";const s=B.parseScale(e);(0===s.x||0===s.y)&&(s.x=kt,s.y=kt),this.scale=s,this.originX=i[0],this.originY=i[1]}}class Te{apply(t){const{originX:e,originY:i,matrix:s}=this,r=e.getPixels("x"),o=i.getPixels("y");t.translate(r,o),t.transform(s[0],s[1],s[2],s[3],s[4],s[5]),t.translate(-r,-o)}unapply(t){const{originX:e,originY:i,matrix:s}=this,r=s[0],o=s[2],n=s[4],a=s[1],h=s[3],c=s[5],d=1/(r*(1*h-0*c)-o*(1*a-0*c)+n*(0*a-0*h)),p=e.getPixels("x"),y=i.getPixels("y");t.translate(p,y),t.transform(d*(1*h-0*c),d*(0*c-1*a),d*(0*n-1*o),d*(1*r-0*n),d*(o*c-n*h),d*(n*a-r*c)),t.translate(-p,-y)}applyToPoint(t){t.applyTransform(this.matrix)}constructor(t,e,i){this.type="matrix",this.matrix=$e(e),this.originX=i[0],this.originY=i[1]}}class Ce extends Te{constructor(t,e,i){super(t,e,i),this.type="skew",this.angle=new C(t,"angle",e)}}class oi extends Ce{constructor(t,e,i){super(t,e,i),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class ai extends Ce{constructor(t,e,i){super(t,e,i),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}let te=(()=>{class l{static fromElement(e,i){const s=i.getStyle("transform",!1,!0);if(s.hasValue()){const[r,o=r]=i.getStyle("transform-origin",!1,!0).split();if(r&&o){const n=[r,o];return new l(e,s.getString(),n)}}return null}
1apply(e){this.transforms.forEach(i=>i.apply(e))}unapply(e){this.transforms.forEach(i=>i.unapply(e))}applyToPoint(e){this.transforms.forEach(i=>i.applyToPoint(e))}constructor(e,i,s){this.document=e,this.transforms=[],function cs(l){return Ot(l).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(i).forEach(o=>{if("none"===o)return;const[n,a]=function us(l){const[t="",e=""]=l.split("(");return[t.trim(),e.trim().replace(")","")]}(o),h=l.transformTypes[n];h&&this.transforms.push(new h(this.document,a,s))})}}return l.transformTypes={translate:si,rotate:ri,scale:ni,matrix:Te,skewX:oi,skewY:ai},l})(),H=(()=>{class l{getAttribute(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const s=this.attributes.get(e);if(!s&&i){const r=new C(this.document,e,"");return this.attributes.set(e,r),r}return s||C.empty(this.document)}getHrefAttribute(){let e;for(const[i,s]of this.attributes)if("href"===i||i.endsWith(":href")){e=s;break}return e||C.empty(this.document)}getStyle(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.styles.get(e);if(r)return r;const o=this.getAttribute(e);if(o.hasValue())return this.styles.set(e,o),o;if(!s){const{parent:n}=this;if(n){const a=n.getStyle(e);if(a.hasValue())return a}}if(i){const n=new C(this.document,e,"");return this.styles.set(e,n),n}return C.empty(this.document)}render(e){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(e.save(),this.getStyle("mask").hasValue()){const i=this.getStyle("mask").getDefinition();i&&(this.applyEffects(e),i.apply(e,this))}else if("none"!==this.getStyle("filter").getValue("none")){const i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(e),i.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){const i=te.fromElement(this.document,this);i&&i.apply(e);const s=this.getStyle("clip-path",!1,!0);if(s.hasValue()){const r=s.getDefinition();r&&r.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(i=>{i.render(e)})}addChild(e){const i=e instanceof l?e:this.document.createElement(e);i.parent=this,l.ignoreChildTypes.includes(i.type)||this.children.push(i)}matchesSelector(e){var i;const{node:s}=this;if("function"==typeof s.matches)return s.matches(e);const r=null===(i=s.getAttribute)||void 0===i?void 0:i.call(s,"class");return!(!r||""===r)&&r.split(" ").some(o=>".".concat(o)===e)}addStylesFromStyleDefinition(){const{styles:e,stylesSpecificity:i}=this.document;for(const[s,r]of e)if(!s.startsWith("@")&&this.matchesSelector(s)){const o=i.get(s);if(r)for(const[n,a]of r){let h=this.stylesSpecificity.get(n);typeof h>"u"&&(h="000"),o&&o>=h&&(a&&this.styles.set(n,a),this.stylesSpecificity.set(n,o))}}}removeStyles(e,i){return i.reduce((r,o)=>{const n=e.getStyle(o);if(!n.hasValue())return r;const a=n.getString();return n.setValue(""),[...r,[o,a]]},[])}restoreStyles(e,i){i.forEach(s=>{let[r,o]=s;e.getStyle(r,!0).setValue(o)})}isFirstChild(){var e;return 0===(null===(e=this.parent)||void 0===e?void 0:e.children.indexOf(this))}constructor(e,i,s=!1){if(this.document=e,this.node=i,this.captureTextNodes=s,this.type="",this.attributes=new Map,this.styles=new Map,this.stylesSpecificity=new Map,this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!i||1!==i.nodeType)return;Array.from(i.attributes).forEach(n=>{const a=Ze(n.nodeName);this.attributes.set(a,new C(e,a,n.value))}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()&&this.getAttribute("style").getString().split(";").map(a=>a.trim()).forEach(a=>{if(!a)return;const[h,c]=a.split(":").map(f=>f.trim());h&&this.styles.set(h,new C(e,h,c))});const{definitions:r}=e,o=this.getAttribute("id");o.hasValue()&&(r.has(o.getString())||r.set(o.getString(),this)),Array.from(i.childNodes).forEach(n=>{if(1===n.nodeType)this.addChild(n);else if(s&&(3===n.nodeType||4===n.nodeType)){const a=e.createTextNode(n);a.getText().length>0&&this.addChild(a)}})}}return l.ignoreChildTypes=["title"],l})();class li extends H{constructor(t,e,i){super(t,e,i)}}function fs(l){const t=l.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function gs(l){return typeof process>"u"?l:l.trim().split(",").map(fs).join(",")}function ds(l){if(!l)return"";const t=l.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function ps(l){if(!l)return"";const t=l.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}let Rt=(()=>{class l{static parse(){let i=arguments.length>1?arguments[1]:void 0,s="",r="",o="",n="",a="";const h=Ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),c={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return h.forEach(f=>{switch(!0){case!c.fontStyle&&l.styles.includes(f):"inherit"!==f&&(s=f),c.fontStyle=!0;break;case!c.fontVariant&&l.variants.includes(f):"inherit"!==f&&(r=f),c.fontStyle=!0,c.fontVariant=!0;break;case!c.fontWeight&&l.weights.includes(f):"inherit"!==f&&(o=f),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0;break;case!c.fontSize:"inherit"!==f&&(n=f.split("/")[0]||""),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0,c.fontSize=!0;break;default:"inherit"!==f&&(a+=f)}}),new l(s,r,o,n,a,i)}toString(){return[ds(this.fontStyle),this.fontVariant,ps(this.fontWeight),this.fontSize,gs(this.fontFamily)].join(" ").trim()}constructor(e,i,s,r,o,n){const a=n?"string"==typeof n?l.parse(n):n:{};this.fontFamily=o||a.fontFamily,this.fontSize=r||a.fontSize,this.fontStyle=e||a.fontStyle,this.fontWeight=s||a.fontWeight,this.fontVariant=i||a.fontVariant}}return l.styles="normal|italic|oblique|inherit",l.variants="normal|small-caps|inherit",l.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",l})();class gt{get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){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 e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,0)}addY(t){this.addPoint(0,t)}addBoundingBox(t){if(!t)return;const{x1:e,y1:i,x2:s,y2:r}=t;this.addPoint(e,i),this.addPoint(s,r)}sumCubic(t,e,i,s,r){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*s+Math.pow(t,3)*r}bezierCurveAdd(t,e,i,s,r){const o=6*e-12*i+6*s,n=-3*e+9*i-9*s+3*r,a=3*i-3*e;if(0===n){if(0===o)return;const g=-a/o;return void(0<g&&g<1&&(t?this.addX(this.sumCubic(g,e,i,s,r)):this.addY(this.sumCubic(g,e,i,s,r))))}const h=Math.pow(o,2)-4*a*n;if(h<0)return;const c=(-o+Math.sqrt(h))/(2*n);0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,i,s,r)):this.addY(this.sumCubic(c,e,i,s,r)));const f=(-o-Math.sqrt(h))/(2*n);0<f&&f<1&&(t?this.addX(this.sumCubic(f,e,i,s,r)):this.addY(this.sumCubic(f,e,i,s,r)))}addBezierCurve(t,e,i,s,r,o,n,a){this.addPoint(t,e),this.addPoint(n,a),this.bezierCurveAdd(!0,t,i,r,n),this.bezierCurveAdd(!1,e,s,o,a)}addQuadraticCurve(t,e,i,s,r,o){const n=t+.6666666666666666*(i-t),a=e+2/3*(s-e);this.addBezierCurve(t,e,n,n+1/3*(r-t),a,a+1/3*(o-e),r,o)}isPointInBox(t,e){const{x1:i,y1:s,x2:r,y2:o}=this;return i<=t&&t<=r&&s<=e&&e<=o}constructor(t=Number.NaN,e=Number.NaN,i=Number.NaN,s=Number.NaN){this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.addPoint(t,e),this.addPoint(i,s)}}class wt extends H{calculateOpacity(){let t=1,e=this;for(;e;){const i=e.getStyle("opacity",!1,!0);i.hasValue(!0)&&(t*=i.getNumber()),e=e.parent}return t}setContext(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){const i=this.getStyle("fill"),s=this.getStyle("fill-opacity"),r=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){const u=i.getFillStyleDefinition(this,s);u&&(t.fillStyle=u)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());const u=i.getColor();"inherit"!==u&&(t.fillStyle="none"===u?"rgba(0,0,0,0)":u)}if(s.hasValue()){const u=new C(this.document,"fill",t.fillStyle).addOpacity(s).getColor();t.fillStyle=u}if(r.isUrlDefinition()){const u=r.getFillStyleDefinition(this,o);u&&(t.strokeStyle=u)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());const u=r.getString();"inherit"!==u&&(t.strokeStyle="none"===u?"rgba(0,0,0,0)":u)}if(o.hasValue()){const u=new C(this.document,"stroke",t.strokeStyle).addOpacity(o).getString();t.strokeStyle=u}const n=this.getStyle("stroke-width");if(n.hasValue()){const u=n.getPixels();t.lineWidth=u||kt}const a=this.getStyle("stroke-linecap"),h=this.getStyle("stroke-linejoin"),c=this.getStyle("stroke-miterlimit"),f=this.getStyle("stroke-dasharray"),g=this.getStyle("stroke-dashoffset");if(a.hasValue()&&(t.lineCap=a.getString()),h.hasValue()&&(t.lineJoin=
1h.getString()),c.hasValue()&&(t.miterLimit=c.getNumber()),f.hasValue()&&"none"!==f.getString()){const u=rt(f.getString());typeof t.setLineDash<"u"?t.setLineDash(u):typeof t.webkitLineDash<"u"?t.webkitLineDash=u:typeof t.mozDash<"u"&&(1!==u.length||0!==u[0])&&(t.mozDash=u);const d=g.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=d:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=d:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=d)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){const i=this.getStyle("font"),s=this.getStyle("font-style"),r=this.getStyle("font-variant"),o=this.getStyle("font-weight"),n=this.getStyle("font-size"),a=this.getStyle("font-family"),h=new Rt(s.getString(),r.getString(),o.getString(),n.hasValue()?"".concat(n.getPixels(!0),"px"):"",a.getString(),Rt.parse(i.getString(),t.font));s.setValue(h.fontStyle),r.setValue(h.fontVariant),o.setValue(h.fontWeight),n.setValue(h.fontSize),a.setValue(h.fontFamily),t.font=h.toString(),n.isPixels()&&(this.document.emSize=n.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}constructor(...t){super(...t),this.modifiedEmSizeStack=!1}}class Tt extends wt{setContext(t){super.setContext(t,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);const i=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();i&&(t.textBaseline=i)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);let e=null;return this.children.forEach((i,s)=>{const r=this.getChildBoundingBox(t,this,this,s);e?e.addBoundingBox(r):e=r}),e}getFontSize(){const{document:t,parent:e}=this,i=Rt.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(i)}getTElementBoundingBox(t){const e=this.getFontSize();return new gt(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,i){const s=e[i];let r;if(t.isArabic){var o;const n=e.length,a=e[i-1],h=e[i+1];let c="isolated";(0===i||" "===a)&&i<n-1&&" "!==h&&(c="terminal"),i>0&&" "!==a&&i<n-1&&" "!==h&&(c="medial"),i>0&&" "!==a&&(i===n-1||" "===h)&&(c="initial"),r=(null===(o=t.arabicGlyphs.get(s))||void 0===o?void 0:o.get(c))||t.glyphs.get(s)}else r=t.glyphs.get(s);return r||(r=t.missingGlyph),r}getText(){return""}getTextFromNode(t){const e=t||this.node,i=Array.from(e.parentNode.childNodes),s=i.indexOf(e),r=i.length-1;let o=Ot(e.textContent||"");return 0===s&&(o=Qe(o)),s===r&&(o=qe(o)),o}renderChildren(t){if("text"!==this.type)return void this.renderTElementChildren(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((i,s)=>{this.renderChild(t,this,this,s)});const{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){const{document:e,parent:i}=this,s=this.getText(),r=i.getStyle("font-family").getDefinition();if(r){const{unitsPerEm:a}=r.fontFace,h=Rt.parse(e.ctx.font),c=i.getStyle("font-size").getNumber(h.fontSize),f=i.getStyle("font-style").getString(h.fontStyle),g=c/a,u=r.isRTL?s.split("").reverse().join(""):s,d=rt(i.getAttribute("dx").getString()),p=u.length;for(let y=0;y<p;y++){const x=this.getGlyph(r,u,y);t.translate(this.x,this.y),t.scale(g,-g);const A=t.lineWidth;t.lineWidth=t.lineWidth*a/c,"italic"===f&&t.transform(1,0,.4,1,0,0),x.render(t),"italic"===f&&t.transform(1,0,-.4,1,0,0),t.lineWidth=A,t.scale(1/g,-1/g),t.translate(-this.x,-this.y),this.x+=c*(x.horizAdvX||r.horizAdvX)/a,typeof d[y]<"u"&&!isNaN(d[y])&&(this.x+=d[y])}return}const{x:o,y:n}=this;t.fillStyle&&t.fillText(s,o,n),t.strokeStyle&&t.strokeText(s,o,n)}applyAnchoring(){if(this.textChunkStart>=this.leafTexts.length)return;const t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start");let s=0;s="start"===e?t.x-this.minX:"end"===e?t.x-this.maxX:t.x-(this.minX+this.maxX)/2;for(let r=this.textChunkStart;r<this.leafTexts.length;r++)this.leafTexts[r].x+=s;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}
1adjustChildCoordinatesRecursive(t){this.children.forEach((e,i)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,i)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,i,s){const r=i.children[s];r.children.length>0?r.children.forEach((o,n)=>{e.adjustChildCoordinatesRecursiveCore(t,e,r,n)}):this.adjustChildCoordinates(t,e,i,s)}adjustChildCoordinates(t,e,i,s){const r=i.children[s];if("function"!=typeof r.measureText)return r;t.save(),r.setContext(t,!0);const o=r.getAttribute("x"),n=r.getAttribute("y"),a=r.getAttribute("dx"),h=r.getAttribute("dy"),c=r.getStyle("font-family").getDefinition(),f=!!c?.isRTL;0===s&&(o.hasValue()||o.setValue(r.getInheritedAttribute("x")),n.hasValue()||n.setValue(r.getInheritedAttribute("y")),a.hasValue()||a.setValue(r.getInheritedAttribute("dx")),h.hasValue()||h.setValue(r.getInheritedAttribute("dy")));const g=r.measureText(t);return f&&(e.x-=g),o.hasValue()?(e.applyAnchoring(),r.x=o.getPixels("x"),a.hasValue()&&(r.x+=a.getPixels("x"))):(a.hasValue()&&(e.x+=a.getPixels("x")),r.x=e.x),e.x=r.x,f||(e.x+=g),n.hasValue()?(r.y=n.getPixels("y"),h.hasValue()&&(r.y+=h.getPixels("y"))):(h.hasValue()&&(e.y+=h.getPixels("y")),r.y=e.y),e.y=r.y,e.leafTexts.push(r),e.minX=Math.min(e.minX,r.x,r.x+g),e.maxX=Math.max(e.maxX,r.x,r.x+g),r.clearContext(t),t.restore(),r}getChildBoundingBox(t,e,i,s){const r=i.children[s];if("function"!=typeof r.getBoundingBox)return null;const o=r.getBoundingBox(t);return o&&r.children.forEach((n,a)=>{const h=e.getChildBoundingBox(t,e,r,a);o.addBoundingBox(h)}),o}renderChild(t,e,i,s){const r=i.children[s];r.render(t),r.children.forEach((o,n)=>{e.renderChild(t,e,r,n)})}measureText(t){const{measureCache:e}=this;if(~e)return e;const i=this.getText(),s=this.measureTargetText(t,i);return this.measureCache=s,s}measureTargetText(t,e){if(!e.length)return 0;const{parent:i}=this,s=i.getStyle("font-family").getDefinition();if(s){const o=this.getFontSize(),n=s.isRTL?e.split("").reverse().join(""):e,a=rt(i.getAttribute("dx").getString()),h=n.length;let c=0;for(let f=0;f<h;f++)c+=(this.getGlyph(s,n,f).horizAdvX||s.horizAdvX)*o/s.fontFace.unitsPerEm,typeof a[f]<"u"&&!isNaN(a[f])&&(c+=a[f]);return c}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);const{width:r}=t.measureText(e);return this.clearContext(t),t.restore(),r}getInheritedAttribute(t){let e=this;for(;e instanceof Tt&&e.isFirstChild()&&e.parent;){const i=e.parent.getAttribute(t);if(i.hasValue(!0))return i.getString("0");e=e.parent}return null}constructor(t,e,i){super(t,e,new.target===Tt||i),this.type="text",this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.measureCache=-1}}class Wt extends Tt{getText(){return this.text}constructor(t,e,i){super(t,e,new.target===Wt||i),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}}class ys extends Wt{constructor(...t){super(...t),this.type="textNode"}}class S extends m{reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new B(0,0),this.control=new B(0,0),this.current=new B(0,0),this.points=[],this.angles=[]}isEnd(){const{i:t,commands:e}=this;return t>=e.length-1}next(){const t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){const i=new B(this.command[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x"],this.command[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y"]);return this.makeAbsolute(i)}getAsControlPoint(t,e){const i=this.getPoint(t,e);return this.control=i,i}getAsCurrentPoint(t,e){const i=this.getPoint(t,e);return this.current=i,i}getReflectedControlPoint(){const t=this.previousCommand.type;if(t!==m.CURVE_TO&&t!==m.SMOOTH_CURVE_TO&&t!==m.QUAD_TO&&t!==m.SMOOTH_QUAD_TO)return this.current;const{current:{x:e,y:i},control:{x:s,y:r}}=this;return new B(2*e-s,2*i-r)}makeAbsolute(t){if(this.command.relative){const{x:e,y:i}=this.current;t.x+=e,t.y+=i}return t}addMarker(t,e,i){const{points:s,angles:r}=this;i&&r.length>0&&!r[r.length-1]&&(r[r.length-1]=s[s.length-1].angleTo(i)),this.addMarkerAngle(t,e?e.angleTo(t):null)}
1addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){const{angles:t}=this,e=t.length;for(let i=0;i<e;i++)if(!t[i])for(let s=i+1;s<e;s++)if(t[s]){t[i]=t[s];break}return t}constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=new B(0,0),this.start=new B(0,0),this.current=new B(0,0),this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}}class k extends wt{path(t){const{pathParser:e}=this,i=new gt;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case S.MOVE_TO:this.pathM(t,i);break;case S.LINE_TO:this.pathL(t,i);break;case S.HORIZ_LINE_TO:this.pathH(t,i);break;case S.VERT_LINE_TO:this.pathV(t,i);break;case S.CURVE_TO:this.pathC(t,i);break;case S.SMOOTH_CURVE_TO:this.pathS(t,i);break;case S.QUAD_TO:this.pathQ(t,i);break;case S.SMOOTH_QUAD_TO:this.pathT(t,i);break;case S.ARC:this.pathA(t,i);break;case S.CLOSE_PATH:this.pathZ(t,i)}return i}getBoundingBox(t){return this.path()}getMarkers(){const{pathParser:t}=this,e=t.getMarkerPoints(),i=t.getMarkerAngles();return e.map((r,o)=>[r,i[o]])}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);const e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());const i=this.getMarkers();if(i){const s=i.length-1,r=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),n=this.getStyle("marker-end");if(r.isUrlDefinition()){const a=r.getDefinition(),[h,c]=i[0];a.render(t,h,c)}if(o.isUrlDefinition()){const a=o.getDefinition();for(let h=1;h<s;h++){const[c,f]=i[h];a.render(t,c,f)}}if(n.isUrlDefinition()){const a=n.getDefinition(),[h,c]=i[s];a.render(t,h,c)}}}static pathM(t){const e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){const{pathParser:i}=this,{point:s}=k.pathM(i),{x:r,y:o}=s;i.addMarker(s),e.addPoint(r,o),t&&t.moveTo(r,o)}static pathL(t){const{current:e}=t;return{current:e,point:t.getAsCurrentPoint()}}pathL(t,e){const{pathParser:i}=this,{current:s,point:r}=k.pathL(i),{x:o,y:n}=r;i.addMarker(r,s),e.addPoint(o,n),t&&t.lineTo(o,n)}static pathH(t){const{current:e,command:i}=t,s=new B((i.relative?e.x:0)+i.x,e.y);return t.current=s,{current:e,point:s}}pathH(t,e){const{pathParser:i}=this,{current:s,point:r}=k.pathH(i),{x:o,y:n}=r;i.addMarker(r,s),e.addPoint(o,n),t&&t.lineTo(o,n)}static pathV(t){const{current:e,command:i}=t,s=new B(e.x,(i.relative?e.y:0)+i.y);return t.current=s,{current:e,point:s}}pathV(t,e){const{pathParser:i}=this,{current:s,point:r}=k.pathV(i),{x:o,y:n}=r;i.addMarker(r,s),e.addPoint(o,n),t&&t.lineTo(o,n)}static pathC(t){const{current:e}=t;return{current:e,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathC(t,e){const{pathParser:i}=this,{current:s,point:r,controlPoint:o,currentPoint:n}=k.pathC(i);i.addMarker(n,o,r),e.addBezierCurve(s.x,s.y,r.x,r.y,o.x,o.y,n.x,n.y),t&&t.bezierCurveTo(r.x,r.y,o.x,o.y,n.x,n.y)}static pathS(t){const{current:e}=t;return{current:e,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathS(t,e){const{pathParser:i}=this,{current:s,point:r,controlPoint:o,currentPoint:n}=k.pathS(i);i.addMarker(n,o,r),e.addBezierCurve(s.x,s.y,r.x,r.y,o.x,o.y,n.x,n.y),t&&t.bezierCurveTo(r.x,r.y,o.x,o.y,n.x,n.y)}static pathQ(t){const{current:e}=t;return{current:e,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}pathQ(t,e){const{pathParser:i}=this,{current:s,controlPoint:r,currentPoint:o}=k.pathQ(i);i.addMarker(o,r,r),e.addQuadraticCurve(s.x,s.y,r.x,r.y,o.x,o.y),t&&t.quadraticCurveTo(r.x,r.y,o.x,o.y)}static pathT(t){const{current:e}=t,i=t.getReflectedControlPoint();return t.control=i,{current:e,controlPoint:i,currentPoint:t.getAsCurrentPoint()}}pathT(t,e){const{pathParser:i}=this,{current:s,controlPoint:r,currentPoint:o}=k.pathT(i);i.addMarker(o,r,r),e.addQuadraticCurve(s.x,s.y,r.x,r.y,o.x,o.y),t&&t.quadraticCurveTo(r.x,r.y,o.x,o.y)}static pathA(t){const{current:e,command:i}=t;let{rX:s,rY:r,xRot:o,lArcFlag:n,sweepFlag:a}=i;const h=o*(Math.PI/180),c=t.getAsCurrentPoint(),f=new B(Math.cos(h)*(e.x-c.x)/2+Math.sin(h)*(e.y-c.y)/2,-Math.sin(h)*(e.x-c.x)/2+Math.cos(h)*(e.y-c.y)/2),g=Math.pow(f.x,2)/
1Math.pow(s,2)+Math.pow(f.y,2)/Math.pow(r,2);g>1&&(s*=Math.sqrt(g),r*=Math.sqrt(g));let u=(n===a?-1:1)*Math.sqrt((Math.pow(s,2)*Math.pow(r,2)-Math.pow(s,2)*Math.pow(f.y,2)-Math.pow(r,2)*Math.pow(f.x,2))/(Math.pow(s,2)*Math.pow(f.y,2)+Math.pow(r,2)*Math.pow(f.x,2)));isNaN(u)&&(u=0);const d=new B(u*s*f.y/r,u*-r*f.x/s),p=new B((e.x+c.x)/2+Math.cos(h)*d.x-Math.sin(h)*d.y,(e.y+c.y)/2+Math.sin(h)*d.x+Math.cos(h)*d.y),y=de([1,0],[(f.x-d.x)/s,(f.y-d.y)/r]),x=[(f.x-d.x)/s,(f.y-d.y)/r],A=[(-f.x-d.x)/s,(-f.y-d.y)/r];let v=de(x,A);return Zt(x,A)<=-1&&(v=Math.PI),Zt(x,A)>=1&&(v=0),{currentPoint:c,rX:s,rY:r,sweepFlag:a,xAxisRotation:h,centp:p,a1:y,ad:v}}pathA(t,e){const{pathParser:i}=this,{currentPoint:s,rX:r,rY:o,sweepFlag:n,xAxisRotation:a,centp:h,a1:c,ad:f}=k.pathA(i),g=1-n?1:-1,u=c+g*(f/2),d=new B(h.x+r*Math.cos(u),h.y+o*Math.sin(u));if(i.addMarkerAngle(d,u-g*Math.PI/2),i.addMarkerAngle(s,u-g*Math.PI),e.addPoint(s.x,s.y),t&&!isNaN(c)&&!isNaN(f)){const p=r>o?r:o,y=r>o?1:r/o,x=r>o?o/r:1;t.translate(h.x,h.y),t.rotate(a),t.scale(y,x),t.arc(0,0,p,c,c+f,!!(1-n)),t.scale(1/y,1/x),t.rotate(-a),t.translate(-h.x,-h.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){k.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}constructor(t,e,i){super(t,e,i),this.type="path",this.pathParser=new S(this.getAttribute("d").getString())}}class zt extends wt{setContext(t){var e;const{document:i}=this,{screen:s,window:r}=i,o=t.canvas;if(s.setDefaults(t),"style"in o&&typeof t.font<"u"&&r&&typeof r.getComputedStyle<"u"){t.font=r.getComputedStyle(o).getPropertyValue("font");const A=new C(i,"fontSize",Rt.parse(t.font).fontSize);A.hasValue()&&(i.rootEmSize=A.getPixels("y"),i.emSize=i.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);let{width:n,height:a}=s.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");const h=this.getAttribute("refX"),c=this.getAttribute("refY"),f=this.getAttribute("viewBox"),g=f.hasValue()?rt(f.getString()):null,u=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden");let d=0,p=0,y=0,x=0;g&&(d=g[0],p=g[1]),this.root||(n=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y"),"marker"===this.type&&(y=d,x=p,d=0,p=0)),s.viewPort.setCurrent(n,a),this.node&&(!this.parent||"foreignObject"===(null===(e=this.node.parentNode)||void 0===e?void 0:e.nodeName))&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),g&&(n=g[2],a=g[3]),i.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s.viewPort.width,desiredWidth:n,height:s.viewPort.height,desiredHeight:a,minX:d,minY:p,refX:h.getValue(),refY:c.getValue(),clip:u,clipX:y,clipY:x}),g&&(s.viewPort.removeCurrent(),s.viewPort.setCurrent(n,a))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.getAttribute("width",!0),r=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),n=this.getAttribute("style"),a=s.getNumber(0),h=r.getNumber(0);if(i)if("string"==typeof i)this.getAttribute("preserveAspectRatio",!0).setValue(i);else{const c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(s.setValue(t),r.setValue(e),o.hasValue()||o.setValue("0 0 ".concat(a||t," ").concat(h||e)),n.hasValue()){const c=this.getStyle("width"),f=this.getStyle("height");c.hasValue()&&c.setValue("".concat(t,"px")),f.hasValue()&&f.setValue("".concat(e,"px"))}}constructor(...t){super(...t),this.type="svg",this.root=!1}}class we extends k{path(t){const e=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),s=this.getStyle("width",!1,!0).getPixels("x"),r=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),n=this.getAttribute("ry");let a=o.getPixels("x"),h=n.getPixels("y");if(o.hasValue()&&!n.hasValue()&&(h=a),n.hasValue()&&!o.hasValue()&&(a=h),a=Math.min(a,s/2),h=Math.min(h,r/2),t){const c=(Math.sqrt(2)-1)/3*4;t.beginPath(),r>0&&s>0&&(t.moveTo(e+a,i),t.lineTo(e+s-a,i),t.bezierCurveTo(e+s-a+c*a,i,e+s,i+h-c*h,e+s,i+h),t.lineTo(e+s,i+r-h),t.bezierCurveTo(e+s,i+r-h+c*h,e+s-a+c*a,i+r,e+s-a,i+r),t.lineTo(e+a,i+r),t.bezierCurveTo(e+a-c*a,i+r,e,i+r-h+c*h,e,i+r-h),t.lineTo(e,i+h),t.bezierCurveTo(e,i+h-c*h,e+a-c*a,i,e+a,i),t.closePath())}return new gt(e,i,e+s,i+r)}getMarkers(){return null}constructor(...t){super(...t),this.type="rect"}}class hi extends k{path(t){const e=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),s=this.getAttribute("r").getPixels();return t&&s>0&&(t.beginPath(),t.arc(e,i,s,0,2*Math.PI,!1),t.closePath()),new gt(e-s,i-s,e+s,i+s)}getMarkers(){return null}constructor(...t){super(...t),this.type="circle"}}class ci extends k{path(t){const e=(Math.sqrt(2)-1)/3*4,i=this.getAttribute("rx").getPixels("x"),s=this.getAttribute("ry").getPixels("y"),r=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return t&&i>0&&s>0&&(t.beginPath(),t.moveTo(r+i,o),t.bezierCurveTo(r+i,o+e*s,r+e*i,o+s,r,o+s),t.bezierCurveTo(r-e*i,o+s,r-i,o+e*s,r-i,o),t.bezierCurveTo(r-i,o-e*s,r-e*i,o-s,r,o-s),t.bezierCurveTo(r+e*i,o-s,r+i,o-e*s,r+i,o),t.closePath()),new gt(r-i,o-s,r+i,o+s)}getMarkers(){return null}constructor(...t){super(...t),this.type="ellipse"}}class ui extends k{getPoints(){return[new B(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new B(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){const[{x:e,y:i},{x:s,y:r}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,i),t.lineTo(s,r)),new gt(e,i,s,r)}getMarkers(){const[t,e]=this.getPoints(),i=t.angleTo(e);return[[t,i],[e,i]]}constructor(...t){super(...t),this.type="line"}}class Se extends k{path(t){const{points:e}=this,[{x:i,y:s}]=e,r=new gt(i,s);return t&&(t.beginPath(),t.moveTo(i,s)),e.forEach(o=>{let{x:n,y:a}=o;r.addPoint(n,a),t&&t.lineTo(n,a)}),r}
1getMarkers(){const{points:t}=this,e=t.length-1,i=[];return t.forEach((s,r)=>{r!==e&&i.push([s,s.angleTo(t[r+1])])}),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}constructor(t,e,i){super(t,e,i),this.type="polyline",this.points=[],this.points=B.parsePath(this.getAttribute("points").getString())}}class fi extends Se{path(t){const e=super.path(t),[{x:i,y:s}]=this.points;return t&&(t.lineTo(i,s),t.closePath()),e}constructor(...t){super(...t),this.type="polygon"}}class gi extends H{createPattern(t,e,i){const s=this.getStyle("width").getPixels("x",!0),r=this.getStyle("height").getPixels("y",!0),o=new zt(this.document,null);o.attributes.set("viewBox",new C(this.document,"viewBox",this.getAttribute("viewBox").getValue())),o.attributes.set("width",new C(this.document,"width","".concat(s,"px"))),o.attributes.set("height",new C(this.document,"height","".concat(r,"px"))),o.attributes.set("transform",new C(this.document,"transform",this.getAttribute("patternTransform").getValue())),o.children=this.children;const n=this.document.createCanvas(s,r),a=n.getContext("2d"),h=this.getAttribute("x"),c=this.getAttribute("y");h.hasValue()&&c.hasValue()&&a.translate(h.getPixels("x",!0),c.getPixels("y",!0)),i.hasValue()?this.styles.set("fill-opacity",i):this.styles.delete("fill-opacity");for(let g=-1;g<=1;g++)for(let u=-1;u<=1;u++)a.save(),o.attributes.set("x",new C(this.document,"x",g*n.width)),o.attributes.set("y",new C(this.document,"y",u*n.height)),o.render(a),a.restore();return t.createPattern(n,"repeat")}constructor(...t){super(...t),this.type="pattern"}}class di extends H{render(t,e,i){if(!e)return;const{x:s,y:r}=e,o=this.getAttribute("orient").getString("auto"),n=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(s,r),"auto"===o&&t.rotate(i),"strokeWidth"===n&&t.scale(t.lineWidth,t.lineWidth),t.save();const a=new zt(this.document);
1a.type=this.type,a.attributes.set("viewBox",new C(this.document,"viewBox",this.getAttribute("viewBox").getValue())),a.attributes.set("refX",new C(this.document,"refX",this.getAttribute("refX").getValue())),a.attributes.set("refY",new C(this.document,"refY",this.getAttribute("refY").getValue())),a.attributes.set("width",new C(this.document,"width",this.getAttribute("markerWidth").getValue())),a.attributes.set("height",new C(this.document,"height",this.getAttribute("markerHeight").getValue())),a.attributes.set("overflow",new C(this.document,"overflow",this.getAttribute("overflow").getValue())),a.attributes.set("fill",new C(this.document,"fill",this.getAttribute("fill").getColor("black"))),a.attributes.set("stroke",new C(this.document,"stroke",this.getAttribute("stroke").getValue("none"))),a.children=this.children,a.render(t),t.restore(),"strokeWidth"===n&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===o&&t.rotate(-i),t.translate(-s,-r)}constructor(...t){super(...t),this.type="marker"}}class pi extends H{render(){}constructor(...t){super(...t),this.type="defs"}}class ee extends wt{getBoundingBox(t){const e=new gt;return this.children.forEach(i=>{e.addBoundingBox(i.getBoundingBox(t))}),e}constructor(...t){super(...t),this.type="g"}}class Ee extends H{getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,i){let s=this;this.getHrefAttribute().hasValue()&&(s=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(s));const{stops:r}=s,o=this.getGradient(t,e);if(!o)return this.addParentOpacity(i,r[r.length-1].color);if(r.forEach(n=>{o.addColorStop(n.offset,this.addParentOpacity(i,n.color))}),this.getAttribute("gradientTransform").hasValue()){const{document:n}=this,{MAX_VIRTUAL_PIXELS:a}=Kt,{viewPort:h}=n.screen,c=h.getRoot(),f=new we(n);f.attributes.set("x",new C(n,"x",-a/3)),f.attributes.set("y",new C(n,"y",-a/3)),f.attributes.set("width",new C(n,"width",a)),f.attributes.set("height",new C(n,"height",a));const g=new ee(n);g.attributes.set("transform",new C(n,"transform",this.getAttribute("gradientTransform").getValue())),g.children=[f];const u=new zt(n);u.attributes.set("x",new C(n,"x",0)),u.attributes.set("y",new C(n,"y",0)),u.attributes.set("width",new C(n,"width",c.width)),u.attributes.set("height",new C(n,"height",c.height)),u.children=[g];const d=n.createCanvas(c.width,c.height),p=d.getContext("2d");return p.fillStyle=o,u.render(p),p.createPattern(d,"no-repeat")}return o}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){return t.hasValue()?new C(this.document,"color",e).addOpacity(t).getColor():e}constructor(t,e,i){super(t,e,i),this.attributesToInherit=["gradientUnits"],this.stops=[];const{stops:s,children:r}=this;r.forEach(o=>{"stop"===o.type&&s.push(o)})}}
1class yi extends Ee{getGradient(t,e){const i="objectBoundingBox"===this.getGradientUnits(),s=i?e.getBoundingBox(t):null;if(i&&!s)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));const r=i?s.x+s.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=i?s.y+s.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),n=i?s.x+s.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),a=i?s.y+s.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return r===n&&o===a?null:t.createLinearGradient(r,o,n,a)}constructor(t,e,i){super(t,e,i),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}}class mi extends Ee{getGradient(t,e){const i="objectBoundingBox"===this.getGradientUnits(),s=e.getBoundingBox(t);if(i&&!s)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%");const r=i?s.x+s.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=i?s.y+s.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y");let n=r,a=o;this.getAttribute("fx").hasValue()&&(n=i?s.x+s.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(a=i?s.y+s.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));const h=i?(s.width+s.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return t.createRadialGradient(n,a,c,r,o,h)}constructor(t,e,i){super(t,e,i),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}}class xi extends H{constructor(t,e,i){super(t,e,i),this.type="stop";const s=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),r=this.getStyle("stop-opacity");let o=this.getStyle("stop-color",!0);""===o.getString()&&o.setValue("#000"),r.hasValue()&&(o=o.addOpacity(r)),this.offset=s,this.color=o.getColor()}}class ie extends H{getProperty(){const t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){const{initialUnits:t}=this,{progress:e,from:i,to:s}=this.getProgress();let r=i.getNumber()+(s.getNumber()-i.getNumber())*e;return"%"===t&&(r*=100),"".concat(r).concat(t)}update(t){const{parent:e}=this,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){const r=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==r||this.frozen){if("remove"===r&&!this.removed)return this.removed=!0,e&&i&&i.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e&&i&&(e.animationFrozen=!0,e.animationFrozenValue=i.getString());return!1}this.duration+=t;let s=!1;if(this.begin<this.duration){let r=this.calcValue();const o=this.getAttribute("type");if(o.hasValue()){const n=o.getString();r="".concat(n,"(").concat(r,")")}i.setValue(r),s=!0}return s}getProgress(){const{document:t,values:e}=this;let s,r,i=(this.duration-this.begin)/(this.maxDuration-this.begin);if(e.hasValue()){const o=i*(e.getValue().length-1),n=Math.floor(o),a=Math.ceil(o);let h;h=e.getValue()[n],s=new C(t,"from",h?parseFloat(h):0),h=e.getValue()[a],r=new C(t,"to",h?parseFloat(h):0),i=(o-n)/(a-n)}else s=this.from,r=this.to;return{progress:i,from:s,to:r}}constructor(t,e,i){super(t,e,i),this.type="animate",this.duration=0,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new C(t,"values",null);const s=this.getAttribute("values");s.hasValue()&&this.values.setValue(s.getString().split(";"))}}class vi extends ie{calcValue(){const{progress:t,from:e,to:i}=this.getProgress(),s=new ct(e.getColor()),r=new ct(i.getColor());if(s.ok&&r.ok){const n=s.g+(r.g-s.g)*t,a=s.b+(r.b-s.b)*t;return"rgb(".concat(Math.floor(s.r+(r.r-s.r)*t),", ").concat(Math.floor(n),", ").concat(Math.floor(a),")")}return this.getAttribute("from").getColor()}constructor(...t){super(...t),this.type="animateColor"}}class bi extends ie{calcValue(){const{progress:t,from:e,to:i}=this.getProgress(),s=rt(e.getString()),r=rt(i.getString());return s.map((n,a)=>n+(r[a]-n)*t).join(" ")}constructor(...t){super(...t),this.type="animateTransform"}}class Pe extends H{constructor(t,e,i){super(t,e,i),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class se extends k{constructor(t,e,i){super(t,e,i),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class Me extends se{constructor(...t){super(...t),this.type="missing-glyph",this.horizAdvX=0}}class Ai extends H{render(){}constructor(t,e,i){super(t,e,i),this.type="font",this.isArabic=!1,this.glyphs=new Map,this.arabicGlyphs=new Map,this.isRTL=!1,this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();const{definitions:s}=t,{children:r}=this;for(const o of r)if(o instanceof Pe){this.fontFace=o;const n=o.getStyle("font-family");n.hasValue()&&s.set(n.getString(),this)}else if(o instanceof Me)this.missingGlyph=o;else if(o instanceof se)if(o.arabicForm){this.isRTL=!0,this.isArabic=!0;let n=this.arabicGlyphs.get(o.unicode);typeof n>"u"&&(n=new Map,this.arabicGlyphs.set(o.unicode,n)),n.set(o.arabicForm,o)}else this.glyphs.set(o.unicode,o)}}class Ti extends Tt{getText(){const t=this.getHrefAttribute().getDefinition();if(t){const e=t.children[0];if(e)return e.getText()}return""}constructor(...t){super(...t),this.type="tref"}}class Ci extends Tt{getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);const{document:e,x:i,y:s}=this,{mouse:r}=e.screen,o=new C(e,"fontSize",Rt.parse(e.ctx.font).fontSize);r.isWorking()&&r.checkBoundingBox(this,new gt(i,s-o.getPixels("y"),i+this.measureText(t),s))}else if(this.children.length>0){const e=new ee(this.document);e.children=this.children,e.parent=this,e.render(t)}}onClick(){const{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}constructor(t,e,i){super(t,e,i),this.type="a";const{childNodes:s}=e,r=s[0],o=s.length>0&&Array.from(s).every(n=>3===n.nodeType);this.hasText=o,this.text=o?this.getTextFromNode(r):""}}class wi extends Tt{getText(){return this.text}path(t){const{dataArray:e}=this;t&&t.beginPath(),e.forEach(i=>
1{let{type:s,points:r}=i;switch(s){case S.LINE_TO:t&&t.lineTo(r[0],r[1]);break;case S.MOVE_TO:t&&t.moveTo(r[0],r[1]);break;case S.CURVE_TO:t&&t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case S.QUAD_TO:t&&t.quadraticCurveTo(r[0],r[1],r[2],r[3]);break;case S.ARC:{const[o,n,a,h,c,f,g,u]=r,d=a>h?a:h,p=a>h?1:a/h,y=a>h?h/a:1;t&&(t.translate(o,n),t.rotate(g),t.scale(p,y),t.arc(0,0,d,c,c+f,!!(1-u)),t.scale(1/p,1/y),t.rotate(-g),t.translate(-o,-n));break}case S.CLOSE_PATH:t&&t.closePath()}})}renderChildren(t){this.setTextData(t),t.save();const e=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),{glyphInfo:s}=this,r=t.fillStyle;"underline"===e&&t.beginPath(),s.forEach((o,n)=>{const{p0:a,p1:h,rotation:c,text:f}=o;t.save(),t.translate(a.x,a.y),t.rotate(c),t.fillStyle&&t.fillText(f,0,0),t.strokeStyle&&t.strokeText(f,0,0),t.restore(),"underline"===e&&(0===n&&t.moveTo(a.x,a.y+i/8),t.lineTo(h.x,h.y+i/5))}),"underline"===e&&(t.lineWidth=i/20,t.strokeStyle=r,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){return this.letterSpacingCache[arguments.length>0&&void 0!==arguments[0]?arguments[0]:0]||0}findSegmentToFitChar(t,e,i,s,r,o,n,a,h){let c=o,f=this.measureText(t,a);" "===a&&"justify"===e&&i<s&&(f+=(s-i)/r),h>-1&&(c+=this.getLetterSpacingAt(h));const g=this.textHeight/20,u=this.getEquidistantPointOnPath(c,g,0),d=this.getEquidistantPointOnPath(c+f,g,0),p={p0:u,p1:d},y=u&&d?Math.atan2(d.y-u.y,d.x-u.x):0;if(n){const x=Math.cos(Math.PI/2+y)*n,A=Math.cos(-y)*n;p.p0={...u,x:u.x+x,y:u.y+A},p.p1={...d,x:d.x+x,y:d.y+A}}return c+=f,{offset:c,segment:p,rotation:y}}measureText(t,e){const{measuresCache:i}=this,s=e||this.getText();if(i.has(s))return i.get(s);const r=this.measureTargetText(t,s);return i.set(s,r),r}setTextData(t){if(this.glyphInfo)return;const e=this.getText(),i=e.split(""),s=e.split(" ").length-1,r=this.parent.getAttribute("dx").split().map(v=>v.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),n=this.parent.getStyle("text-anchor").getString("start"),a=this.getStyle("letter-spacing"),h=this.parent.getStyle("letter-spacing");let c=0;a.hasValue()&&"inherit"!==a.getValue()?a.hasValue()&&"initial"!==a.getValue()&&"unset"!==a.getValue()&&(c=a.getPixels()):c=h.getPixels();const f=[],g=e.length;this.letterSpacingCache=f;for(let v=0;v<g;v++)f.push(typeof r[v]<"u"?r[v]:c);const u=f.reduce((v,b,w)=>0===w?0:v+b||0,0),d=this.measureText(t),p=Math.max(d+u,0);this.textWidth=d,this.textHeight=this.getFontSize(),this.glyphInfo=[];const y=this.getPathLength(),x=this.getStyle("startOffset").getNumber(0)*y;let A=0;("middle"===n||"center"===n)&&(A=-p/2),("end"===n||"right"===n)&&(A=-p),A+=x,i.forEach((v,b)=>{const{offset:w,segment:P,rotation:T}=this.findSegmentToFitChar(t,n,p,y,s,A,o,v,b);A=w,P.p0&&P.p1&&this.glyphInfo.push({text:i[b],p0:P.p0,p1:P.p1,rotation:T})})}parsePathData(t){if(this.pathLength=-1,!t)return[];const e=[],{pathParser:i}=t;for(i.reset();!i.isEnd();){const{current:s}=i,r=s?s.x:0,o=s?s.y:0,n=i.next();let a=n.type,h=[];switch(n.type){case S.MOVE_TO:this.pathM(i,h);break;case S.LINE_TO:a=this.pathL(i,h);break;case S.HORIZ_LINE_TO:a=this.pathH(i,h);break;case S.VERT_LINE_TO:a=this.pathV(i,h);break;case S.CURVE_TO:this.pathC(i,h);break;case S.SMOOTH_CURVE_TO:a=this.pathS(i,h);break;case S.QUAD_TO:this.pathQ(i,h);break;case S.SMOOTH_QUAD_TO:a=this.pathT(i,h);break;case S.ARC:h=this.pathA(i);break;case S.CLOSE_PATH:k.pathZ(i)}e.push(n.type!==S.CLOSE_PATH?{type:a,points:h,start:{x:r,y:o},pathLength:this.calcLength(r,o,a,h)}:{type:S.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){const{x:i,y:s}=k.pathM(t).point;e.push(i,s)}pathL(t,e){const{x:i,y:s}=k.pathL(t).point;return e.push(i,s),S.LINE_TO}pathH(t,e){const{x:i,y:s}=k.pathH(t).point;return e.push(i,s),S.LINE_TO}pathV(t,e){const{x:i,y:s}=k.pathV(t).point;return e.push(i,s),S.LINE_TO}pathC(t,e){const{point:i,controlPoint:s,currentPoint:r}=k.pathC(t);e.push(i.x,i.y,s.x,s.y,r.x,r.y)}pathS(t,e){const{point:i,controlPoint:s,currentPoint:r}=k.pathS(t);return e.push(i.x,i.y,s.x,s.y,r.x,r.y),S.CURVE_TO}pathQ(t,e){const{controlPoint:i,currentPoint:s}=k.pathQ(t);e.push(i.x,i.y,s.x,s.y)}pathT(t,e){const{controlPoint:i,currentPoint:s}=k.pathT(t);return e.push(i.x,i.y,s.x,s.y),S.QUAD_TO}pathA(t){let{rX:e,rY:i,sweepFlag:s,xAxisRotation:r,centp:o,a1:n,ad:a}=k.pathA(t);return 0===s&&a>0&&(a-=2*Math.PI),1===s&&a<0&&(a+=2*Math.PI),[o.x,o.y,e,i,n,a,r,s]}calcLength(t,e,i,s){let r=0,o=null,n=null,a=0;
1switch(i){case S.LINE_TO:return this.getLineLength(t,e,s[0],s[1]);case S.CURVE_TO:for(r=0,o=this.getPointOnCubicBezier(0,t,e,s[0],s[1],s[2],s[3],s[4],s[5]),a=.01;a<=1;a+=.01)n=this.getPointOnCubicBezier(a,t,e,s[0],s[1],s[2],s[3],s[4],s[5]),r+=this.getLineLength(o.x,o.y,n.x,n.y),o=n;return r;case S.QUAD_TO:for(r=0,o=this.getPointOnQuadraticBezier(0,t,e,s[0],s[1],s[2],s[3]),a=.01;a<=1;a+=.01)n=this.getPointOnQuadraticBezier(a,t,e,s[0],s[1],s[2],s[3]),r+=this.getLineLength(o.x,o.y,n.x,n.y),o=n;return r;case S.ARC:{r=0;const h=s[4],c=s[5],f=s[4]+c;let g=Math.PI/180;if(Math.abs(h-f)<g&&(g=Math.abs(h-f)),o=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],h,0),c<0)for(a=h-g;a>f;a-=g)n=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],a,0),r+=this.getLineLength(o.x,o.y,n.x,n.y),o=n;else for(a=h+g;a<f;a+=g)n=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],a,0),r+=this.getLineLength(o.x,o.y,n.x,n.y),o=n;return n=this.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],f,0),r+=this.getLineLength(o.x,o.y,n.x,n.y),r}}return 0}getPointOnLine(t,e,i,s,r){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:i;const a=(r-i)/(s-e+kt);let h=Math.sqrt(t*t/(1+a*a));s<e&&(h*=-1);let c=a*h,f=null;if(s===e)f={x:o,y:n+c};else if((n-i)/(o-e+kt)===a)f={x:o+h,y:n+c};else{let g=0,u=0;const d=this.getLineLength(e,i,s,r);if(d<kt)return null;let p=(o-e)*(s-e)+(n-i)*(r-i);p/=d*d,g=e+p*(s-e),u=i+p*(r-i);const y=this.getLineLength(o,n,g,u),x=Math.sqrt(t*t-y*y);h=Math.sqrt(x*x/(1+a*a)),s<e&&(h*=-1),c=a*h,f={x:g+h,y:u+c}}return f}getPointOnPath(t){const e=this.getPathLength();let i=0,s=null;if(t<-5e-5||t-5e-5>e)return null;const{dataArray:r}=this;for(const o of r){if(o&&(o.pathLength<5e-5||i+o.pathLength+5e-5<t)){i+=o.pathLength;continue}const n=t-i;let a=0;switch(o.type){case S.LINE_TO:s=this.getPointOnLine(n,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case S.ARC:{const c=o.points[5],f=o.points[4]+c;if(a=o.points[4]+n/o.pathLength*c,c<0&&a<f||c>=0&&a>f)break;s=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],a,o.points[6]);break}case S.CURVE_TO:a=n/o.pathLength,a>1&&(a=1),s=this.getPointOnCubicBezier(a,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case S.QUAD_TO:a=n/o.pathLength,a>1&&(a=1),s=this.getPointOnQuadraticBezier(a,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3])}if(s)return s;break}return null}getLineLength(t,e,i,s){return Math.sqrt((i-t)*(i-t)+(s-e)*(s-e))}getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,i,s,r,o,n,a,h){return{x:a*pe(t)+o*ye(t)+s*me(t)+e*xe(t),y:h*pe(t)+n*ye(t)+r*me(t)+i*xe(t)}}getPointOnQuadraticBezier(t,e,i,s,r,o,n){return{x:o*ve(t)+s*be(t)+e*Ae(t),y:n*ve(t)+r*be(t)+i*Ae(t)}}getPointOnEllipticalArc(t,e,i,s,r,o){const n=Math.cos(o),a=Math.sin(o),h_x=i*Math.cos(r),h_y=s*Math.sin(r);return{x:t+(h_x*n-h_y*a),y:e+(h_x*a+h_y*n)}}buildEquidistantCache(t,e){const i=this.getPathLength(),s=e||.25,r=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==r||this.equidistantCache.precision!==s){this.equidistantCache={step:r,precision:s,points:[]};let o=0;for(let n=0;n<=i;n+=s){const a=this.getPointOnPath(n),h=this.getPointOnPath(n+s);!a||!h||(o+=this.getLineLength(a.x,a.y,h.x,h.y),o>=r&&(this.equidistantCache.points.push({x:a.x,y:a.y,distance:n}),o-=r))}}}getEquidistantPointOnPath(t,e,i){if(this.buildEquidistantCache(e,i),t<0||t-this.getPathLength()>5e-5)return null;const s=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[s]||null}constructor(t,e,i){super(t,e,i),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);const s=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(s)}}const ms=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Si extends wt{loadImage(t){var e=this;return(0,U.A)(function*(){try{const i=yield e.document.createImage(t);e.image=i}catch(i){console.error('Error while loading image "'.concat(t,'":'),i)}e.loaded=!0})()}loadSvg(t){var e=this;return(0,U.A)(function*(){const i=ms.exec(t);if(i){const s=i[5];s&&(e.image="base64"===i[4]?atob(s):decodeURIComponent(s))}else try{const r=yield(yield e.document.fetch(t)).text();e.image=r}catch(s){console.error('Error while loading image "'.concat(t,'":'),s)}e.loaded=!0})()}renderChildren(t){const{document:e,image:i,loaded:s}=this,r=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(s&&i&&n&&a){if(t.save(),t.translate(r,o),"string"==typeof i){const h=e.canvg.forkString(t,i,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:n,scaleHeight:a}),{documentElement:c}=h.document;c&&(c.parent=this),h.render()}else e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n,desiredWidth:i.width,height:a,desiredHeight:i.height}
1),this.loaded&&(!("complete"in i)||i.complete)&&t.drawImage(i,0,0);t.restore()}}getBoundingBox(){const t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");return new gt(t,e,t+i,e+s)}constructor(t,e,i){super(t,e,i),this.type="image",this.loaded=!1;const s=this.getHrefAttribute().getString();if(!s)return;const r=s.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(s);t.images.push(this),r?this.loadSvg(s):this.loadImage(s)}}class Ei extends wt{render(t){}constructor(...t){super(...t),this.type="symbol"}}class Pi{load(t,e){var i=this;return(0,U.A)(function*(){try{const{document:s}=i,o=(yield s.canvg.parser.load(e)).getElementsByTagName("font");Array.from(o).forEach(n=>{const a=s.createElement(n);s.definitions.set(t,a)})}catch(s){console.error('Error while loading font "'.concat(e,'":'),s)}i.loaded=!0})()}constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}}let Mi=(()=>{class l extends H{constructor(e,i,s){super(e,i,s),this.type="style",Ot(Array.from(i.childNodes).map(n=>n.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach(n=>{const a=n.trim();if(!a)return;const h=a.split("{"),c=h[0].split(","),f=h[1].split(";");c.forEach(g=>{const u=g.trim();if(!u)return;const d=e.styles.get(u)||new Map;if(f.forEach(p=>{const y=p.indexOf(":"),x=p.substr(0,y).trim(),A=p.substr(y+1,p.length-y).trim();x&&A&&d.set(x,new C(e,x,A))}),e.styles.set(u,d),e.stylesSpecificity.set(u,Ke(u)),"@font-face"===u){const p=d.get("font-family").getString().replace(/"|'/g,"");d.get("src").getString().split(",").forEach(x=>{if(x.indexOf('format("svg")')>0){const A=fe(x);A&&new Pi(e).load(p,A)}})}})})}}return l.parseExternalUrl=fe,l})();class Ni extends wt{setContext(t){super.setContext(t);const e=this.getAttribute("x"),i=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}path(t){const{element:e}=this;e&&e.path(t)}renderChildren(t){const{document:e,element:i}=this;if(i){let s=i;if("symbol"===i.type&&(s=new zt(e),s.attributes.set("viewBox",new C(e,"viewBox",i.getAttribute("viewBox").getString())),s.attributes.set("preserveAspectRatio",new C(e,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString())),s.attributes.set("overflow",new C(e,"overflow",i.getAttribute("overflow").getString())),s.children=i.children,i.styles.set("opacity",new C(e,"opacity",this.calculateOpacity()))),"svg"===s.type){const o=this.getStyle("width",!1,!0),n=this.getStyle("height",!1,!0);o.hasValue()&&s.attributes.set("width",new C(e,"width",o.getString())),n.hasValue()&&s.attributes.set("height",new C(e,"height",n.getString()))}const r=s.parent;s.parent=this,s.render(t),s.parent=r}}getBoundingBox(t){const{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){const{document:t,element:e}=this;return e?te.fromElement(t,e):null}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}constructor(...t){super(...t),this.type="use"}}function re(l,t,e,i,s,r){return l[e*i*4+4*t+r]}function ne(l,t,e,i,s,r,o){l[e*i*4+4*t+r]=o}function G(l,t,e){return l[t]*e}function Ct(l,t,e,i){return t+Math.cos(l)*e+Math.sin(l)*i}class Ne extends H{apply(t,e,i,s,r){const{includeOpacity:o,matrix:n}=this,a=t.getImageData(0,0,s,r);for(let h=0;h<r;h++)for(let c=0;c<s;c++){const f=re(a.data,c,h,s,0,0),g=re(a.data,c,h,s,0,1),u=re(a.data,c,h,s,0,2),d=re(a.data,c,h,s,0,3);let p=G(n,0,f)+G(n,1,g)+G(n,2,u)+G(n,3,d)+G(n,4,1),y=G(n,5,f)+G(n,6,g)+G(n,7,u)+G(n,8,d)+G(n,9,1),x=G(n,10,f)+G(n,11,g)+G(n,12,u)+G(n,13,d)+G(n,14,1),A=G(n,15,f)+G(n,16,g)+G(n,17,u)+G(n,18,d)+G(n,19,1);o&&(p=0,y=0,x=0,A*=d/255),ne(a.data,c,h,s,0,0,p),ne(a.data,c,h,s,0,1,y),ne(a.data,c,h,s,0,2,x),ne(a.data,c,h,s,0,3,A)}t.clearRect(0,0,s,r),t.putImageData(a,0,0)}constructor(t,e,i){super(t,e,i),this.type="feColorMatrix";let s=rt(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{const r=s[0];s=[.213+.787*r,.715-.715*r,.072-.072*r,0,0,.213-.213*r,.715+.285*r,.072-.072*r,0,0,.213-.213*r,.715-.715*r,.072+.928*r,0,0,0,0,0,1,0,0,0,0,0,1];break}
1case"hueRotate":{const r=s[0]*Math.PI/180;s=[Ct(r,.213,.787,-.213),Ct(r,.715,-.715,-.715),Ct(r,.072,-.072,.928),0,0,Ct(r,.213,-.213,.143),Ct(r,.715,.285,.14),Ct(r,.072,-.072,-.283),0,0,Ct(r,.213,-.213,-.787),Ct(r,.715,-.715,.715),Ct(r,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":s=[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]}this.matrix=s,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}}let Oi=(()=>{class l extends H{apply(e,i){const{document:s}=this;let r=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!n&&!a){const d=new gt;this.children.forEach(p=>{d.addBoundingBox(p.getBoundingBox(e))}),r=Math.floor(d.x1),o=Math.floor(d.y1),n=Math.floor(d.width),a=Math.floor(d.height)}const h=this.removeStyles(i,l.ignoreStyles),c=s.createCanvas(r+n,o+a),f=c.getContext("2d");s.screen.setDefaults(f),this.renderChildren(f),new Ne(s,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(f,0,0,r+n,o+a);const g=s.createCanvas(r+n,o+a),u=g.getContext("2d");s.screen.setDefaults(u),i.render(u),u.globalCompositeOperation="destination-in",u.fillStyle=f.createPattern(c,"no-repeat"),u.fillRect(0,0,r+n,o+a),e.fillStyle=u.createPattern(g,"no-repeat"),e.fillRect(0,0,r+n,o+a),this.restoreStyles(i,h)}render(e){}constructor(...e){super(...e),this.type="mask"}}return l.ignoreStyles=["mask","transform","clip-path"],l})();const Vi=()=>{};class ki extends H{apply(t){const{document:e}=this,i=Reflect.getPrototypeOf(t),{beginPath:s,closePath:r}=t;i&&(i.beginPath=Vi,i.closePath=Vi),Reflect.apply(s,t,[]),this.children.forEach(o=>{if(!("path"in o))return;let n="elementTransform"in o?o.elementTransform():null;n||(n=te.fromElement(e,o)),n&&n.apply(t),o.path(t),i&&(i.closePath=r),n&&n.unapply(t)}),Reflect.apply(r,t,[]),t.clip(),i&&(i.beginPath=s,i.closePath=r)}render(t){}constructor(...t){super(...t),this.type="clipPath"}}let Ri=(()=>{class l extends H{apply(e,i){const{document:s,children:r}=this,o="getBoundingBox"in i?i.getBoundingBox(e):null;if(!o)return;let n=0,a=0;r.forEach(A=>{const v=A.extraFilterDistance||0;n=Math.max(n,v),a=Math.max(a,v)});const h=Math.floor(o.width),c=Math.floor(o.height),f=h+2*n,g=c+2*a;if(f<1||g<1)return;const u=Math.floor(o.x),d=Math.floor(o.y),p=this.removeStyles(i,l.ignoreStyles),y=s.createCanvas(f,g),x=y.getContext("2d");s.screen.setDefaults(x),x.translate(-u+n,-d+a),i.render(x),r.forEach(A=>{"function"==typeof A.apply&&A.apply(x,0,0,f,g)}),e.drawImage(y,0,0,f,g,u-n,d-a,f,g),this.restoreStyles(i,p)}render(e){}constructor(...e){super(...e),this.type="filter"}}return l.ignoreStyles=["filter","transform","clip-path"],l})();class Li extends H{apply(t,e,i,s,r){}constructor(t,e,i){super(t,e,i),this.type="feDropShadow",this.addStylesFromStyleDefinition()}}class Di extends H{apply(t,e,i,s,r){}constructor(...t){super(...t),this.type="feMorphology"}}class Ii extends H{apply(t,e,i,s,r){}constructor(...t){super(...t),this.type="feComposite"}}class Bi extends H{apply(t,e,i,s,r){const{document:o,blurRadius:n}=this,a=o.window?o.window.document.body:null,h=t.canvas;h.id=o.getUniqueId(),a&&(h.style.display="none",a.appendChild(h)),Ge(h,e,i,s,r,n),a&&a.removeChild(h)}constructor(t,e,i){super(t,e,i),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}}class Fi extends H{constructor(...t){super(...t),this.type="title"}}class zi extends H{constructor(...t){super(...t),this.type="desc"}}const Ui={svg:zt,rect:we,circle:hi,ellipse:ci,line:ui,polyline:Se,polygon:fi,path:k,pattern:gi,marker:di,defs:pi,linearGradient:yi,radialGradient:mi,stop:xi,animate:ie,animateColor:vi,animateTransform:bi,font:Ai,"font-face":Pe,"missing-glyph":Me,glyph:se,text:Tt,tspan:Wt,tref:Ti,a:Ci,textPath:wi,image:Si,g:ee,symbol:Ei,style:Mi,use:Ni,mask:Oi,clipPath:ki,filter:Ri,feDropShadow:Li,feMorphology:Di,feComposite:Ii,feColorMatrix:Ne,feGaussianBlur:Bi,title:Fi,desc:zi};function xs(l,t){const e=document.createElement("canvas");return e.width=l,e.height=t,e}function vs(l){return Oe.apply(this,arguments)}function Oe(){return Oe=(0,U.A)(function*(l){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((i,s)=>{e.onload=()=>{i(e)},e.onerror=(r,o,n,a,h)=>{s(h)},e.src=l})}),Oe.apply(this,arguments)}let Hi=(()=>{class l{bindCreateImage(e,i){return"boolean"==typeof i?(s,r)=>e(s,"boolean"==typeof r?r:i):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){const{emSizeStack:e}=this;return e[e.length-1]||12}set emSize(e){const{emSizeStack:i}=this;i.push(e)}popEmSize(){const{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){const i=this.createElement(e.documentElement);return i.root=!0,i.addStylesFromStyleDefinition(),this.documentElement=i,i}createElement(e){const i=e.nodeName.replace(/^[^:]+:/,""),s=l.elementTypes[i];return s?new s(this,e):new li(this,e)}createTextNode(e){return new ys(this,e)}
1setViewBox(e){this.screen.setViewBox({document:this,...e})}constructor(e,{rootEmSize:i=12,emSize:s=12,createCanvas:r=l.createCanvas,createImage:o=l.createImage,anonymousCrossOrigin:n}={}){this.canvg=e,this.definitions=new Map,this.styles=new Map,this.stylesSpecificity=new Map,this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=i,this.emSize=s,this.createCanvas=r,this.createImage=this.bindCreateImage(o,n),this.screen.wait(()=>this.isImagesLoaded()),this.screen.wait(()=>this.isFontsLoaded())}}return l.createCanvas=xs,l.createImage=vs,l.elementTypes=Ui,l})();class Ut{static from(t,e){var i=arguments;return(0,U.A)(function*(){let s=i.length>2&&void 0!==i[2]?i[2]:{};const o=yield new Jt(s).parse(e);return new Ut(t,o,s)})()}static fromString(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new Jt(i).parseFromString(e);return new Ut(t,r,i)}fork(t,e){return Ut.from(t,e,{...this.options,...arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}})}forkString(t,e){return Ut.fromString(t,e,{...this.options,...arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}})}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return(0,U.A)(function*(){e.start({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0,...t.length>0&&void 0!==t[0]?t[0]:{}}),yield e.ready(),e.stop()})()}start(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{documentElement:e,screen:i,options:s}=this;i.start(e,{enableRedraw:!0,...s,...t})}stop(){this.screen.stop()}resize(t){this.documentElement.resize(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])}constructor(t,e,i={}){this.parser=new Jt(i),this.screen=new Kt(t,i),this.options=i;const s=new Hi(this,i),r=s.createDocumentElement(e);this.document=s,this.documentElement=r}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.