vue-data-ui 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue-data-ui.umd.cjs
CHANGED
|
@@ -136,7 +136,7 @@ T* `):w.join(` Tj
|
|
|
136
136
|
`),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:ut.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=ut.RadioButton.Cross.YesNormal,e.D[t]=ut.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=ma(t);e.scope=t.scope;var r=[],A=ut.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+St(ut.internal.getWidth(t)-2)+" "+St(ut.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(St(A.x1.x)+" "+St(A.x1.y)+" m"),r.push(St(A.x2.x)+" "+St(A.x2.y)+" l"),r.push(St(A.x4.x)+" "+St(A.x4.y)+" m"),r.push(St(A.x3.x)+" "+St(A.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
|
|
137
137
|
`),e},YesPushDown:function(t){var e=ma(t);e.scope=t.scope;var r=ut.internal.calculateCross(t),A=[];return A.push("0.749023 g"),A.push("0 0 "+St(ut.internal.getWidth(t))+" "+St(ut.internal.getHeight(t))+" re"),A.push("f"),A.push("q"),A.push("1 1 "+St(ut.internal.getWidth(t)-2)+" "+St(ut.internal.getHeight(t)-2)+" re"),A.push("W"),A.push("n"),A.push(St(r.x1.x)+" "+St(r.x1.y)+" m"),A.push(St(r.x2.x)+" "+St(r.x2.y)+" l"),A.push(St(r.x4.x)+" "+St(r.x4.y)+" m"),A.push(St(r.x3.x)+" "+St(r.x3.y)+" l"),A.push("s"),A.push("Q"),e.stream=A.join(`
|
|
138
138
|
`),e},OffPushDown:function(t){var e=ma(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+St(ut.internal.getWidth(t))+" "+St(ut.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join(`
|
|
139
|
-
`),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};ut.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=ut.internal.getWidth(t),r=ut.internal.getHeight(t),A=Math.min(e,r);return{x1:{x:(e-A)/2,y:(r-A)/2+A},x2:{x:(e-A)/2+A,y:(r-A)/2},x3:{x:(e-A)/2,y:(r-A)/2},x4:{x:(e-A)/2+A,y:(r-A)/2+A}}}},ut.internal.getWidth=function(t){var e=0;return Wt(t)==="object"&&(e=aw(t.Rect[2])),e},ut.internal.getHeight=function(t){var e=0;return Wt(t)==="object"&&(e=aw(t.Rect[3])),e};var xU=Fr.addField=function(t){if(yU(this,t),!(t instanceof Rn))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};Fr.AcroFormChoiceField=ro,Fr.AcroFormListBox=Ao,Fr.AcroFormComboBox=no,Fr.AcroFormEditBox=Au,Fr.AcroFormButton=aA,Fr.AcroFormPushButton=nu,Fr.AcroFormRadioButton=ao,Fr.AcroFormCheckBox=iu,Fr.AcroFormTextField=is,Fr.AcroFormPasswordField=su,Fr.AcroFormAppearance=ut,Fr.AcroForm={ChoiceField:ro,ListBox:Ao,ComboBox:no,EditBox:Au,Button:aA,PushButton:nu,RadioButton:ao,CheckBox:iu,TextField:is,PasswordField:su,Appearance:ut},yt.AcroForm={ChoiceField:ro,ListBox:Ao,ComboBox:no,EditBox:Au,Button:aA,PushButton:nu,RadioButton:ao,CheckBox:iu,TextField:is,PasswordField:su,Appearance:ut};function lw(t){return t.reduce(function(e,r,A){return e[r]=A,e},{})}(function(t){t.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},A=t.__addimage__.getImageFileTypeByImageData=function(U,T){var H,Y,le,pe,me,ve=e;if((T=T||e)==="RGBA"||U.data!==void 0&&U.data instanceof Uint8ClampedArray&&"height"in U&&"width"in U)return"RGBA";if(X(U))for(me in r)for(le=r[me],H=0;H<le.length;H+=1){for(pe=!0,Y=0;Y<le[H].length;Y+=1)if(le[H][Y]!==void 0&&le[H][Y]!==U[Y]){pe=!1;break}if(pe===!0){ve=me;break}}else for(me in r)for(le=r[me],H=0;H<le.length;H+=1){for(pe=!0,Y=0;Y<le[H].length;Y+=1)if(le[H][Y]!==void 0&&le[H][Y]!==U.charCodeAt(Y)){pe=!1;break}if(pe===!0){ve=me;break}}return ve===e&&T!==e&&(ve=T),ve},n=function U(T){for(var H=this.internal.write,Y=this.internal.putStream,le=(0,this.internal.getFilters)();le.indexOf("FlateEncode")!==-1;)le.splice(le.indexOf("FlateEncode"),1);T.objectId=this.internal.newObject();var pe=[];if(pe.push({key:"Type",value:"/XObject"}),pe.push({key:"Subtype",value:"/Image"}),pe.push({key:"Width",value:T.width}),pe.push({key:"Height",value:T.height}),T.colorSpace===y.INDEXED?pe.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(T.palette.length/3-1)+" "+("sMask"in T&&T.sMask!==void 0?T.objectId+2:T.objectId+1)+" 0 R]"}):(pe.push({key:"ColorSpace",value:"/"+T.colorSpace}),T.colorSpace===y.DEVICE_CMYK&&pe.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),pe.push({key:"BitsPerComponent",value:T.bitsPerComponent}),"decodeParameters"in T&&T.decodeParameters!==void 0&&pe.push({key:"DecodeParms",value:"<<"+T.decodeParameters+">>"}),"transparency"in T&&Array.isArray(T.transparency)){for(var me="",ve=0,se=T.transparency.length;ve<se;ve++)me+=T.transparency[ve]+" "+T.transparency[ve]+" ";pe.push({key:"Mask",value:"["+me+"]"})}T.sMask!==void 0&&pe.push({key:"SMask",value:T.objectId+1+" 0 R"});var J=T.filter!==void 0?["/"+T.filter]:void 0;if(Y({data:T.data,additionalKeyValues:pe,alreadyAppliedFilters:J,objectId:T.objectId}),H("endobj"),"sMask"in T&&T.sMask!==void 0){var oe="/Predictor "+T.predictor+" /Colors 1 /BitsPerComponent "+T.bitsPerComponent+" /Columns "+T.width,B={width:T.width,height:T.height,colorSpace:"DeviceGray",bitsPerComponent:T.bitsPerComponent,decodeParameters:oe,data:T.sMask};"filter"in T&&(B.filter=T.filter),U.call(this,B)}if(T.colorSpace===y.INDEXED){var _=this.internal.newObject();Y({data:Q(new Uint8Array(T.palette)),objectId:_}),H("endobj")}},a=function(){var U=this.internal.collections.addImage_images;for(var T in U)n.call(this,U[T])},i=function(){var U,T=this.internal.collections.addImage_images,H=this.internal.write;for(var Y in T)H("/I"+(U=T[Y]).index,U.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",i))},o=function(){var U=this.internal.collections.addImage_images;return s.call(this),U},l=function(){return Object.keys(this.internal.collections.addImage_images).length},c=function(U){return typeof t["process"+U.toUpperCase()]=="function"},d=function(U){return Wt(U)==="object"&&U.nodeType===1},g=function(U,T){if(U.nodeName==="IMG"&&U.hasAttribute("src")){var H=""+U.getAttribute("src");if(H.indexOf("data:image/")===0)return Ll(unescape(H).split("base64,").pop());var Y=t.loadFile(H,!0);if(Y!==void 0)return Y}if(U.nodeName==="CANVAS"){if(U.width===0||U.height===0)throw new Error("Given canvas must have data. Canvas width: "+U.width+", height: "+U.height);var le;switch(T){case"PNG":le="image/png";break;case"WEBP":le="image/webp";break;case"JPEG":case"JPG":default:le="image/jpeg"}return Ll(U.toDataURL(le,1).split("base64,").pop())}},h=function(U){var T=this.internal.collections.addImage_images;if(T){for(var H in T)if(U===T[H].alias)return T[H]}},p=function(U,T,H){return U||T||(U=-96,T=-96),U<0&&(U=-1*H.width*72/U/this.internal.scaleFactor),T<0&&(T=-1*H.height*72/T/this.internal.scaleFactor),U===0&&(U=T*H.width/H.height),T===0&&(T=U*H.height/H.width),[U,T]},v=function(U,T,H,Y,le,pe){var me=p.call(this,H,Y,le),ve=this.internal.getCoordinateString,se=this.internal.getVerticalCoordinateString,J=o.call(this);if(H=me[0],Y=me[1],J[le.index]=le,pe){pe*=Math.PI/180;var oe=Math.cos(pe),B=Math.sin(pe),_=function(N){return N.toFixed(4)},S=[_(oe),_(B),_(-1*B),_(oe),0,0,"cm"]}this.internal.write("q"),pe?(this.internal.write([1,"0","0",1,ve(U),se(T+Y),"cm"].join(" ")),this.internal.write(S.join(" ")),this.internal.write([ve(H),"0","0",ve(Y),"0","0","cm"].join(" "))):this.internal.write([ve(H),"0","0",ve(Y),ve(U),se(T+Y),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+le.index+" Do"),this.internal.write("Q")},y=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var C=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},b=t.__addimage__.sHashCode=function(U){var T,H,Y=0;if(typeof U=="string")for(H=U.length,T=0;T<H;T++)Y=(Y<<5)-Y+U.charCodeAt(T),Y|=0;else if(X(U))for(H=U.byteLength/2,T=0;T<H;T++)Y=(Y<<5)-Y+U[T],Y|=0;return Y},F=t.__addimage__.validateStringAsBase64=function(U){(U=U||"").toString().trim();var T=!0;return U.length===0&&(T=!1),U.length%4!=0&&(T=!1),/^[A-Za-z0-9+/]+$/.test(U.substr(0,U.length-2))===!1&&(T=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(U.substr(-2))===!1&&(T=!1),T},O=t.__addimage__.extractImageFromDataUrl=function(U){var T=(U=U||"").split("base64,"),H=null;if(T.length===2){var Y=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(T[0]);Array.isArray(Y)&&(H={mimeType:Y[1],charset:Y[2],data:T[1]})}return H},W=t.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};t.__addimage__.isArrayBuffer=function(U){return W()&&U instanceof ArrayBuffer};var X=t.__addimage__.isArrayBufferView=function(U){return W()&&typeof Uint32Array<"u"&&(U instanceof Int8Array||U instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&U instanceof Uint8ClampedArray||U instanceof Int16Array||U instanceof Uint16Array||U instanceof Int32Array||U instanceof Uint32Array||U instanceof Float32Array||U instanceof Float64Array)},k=t.__addimage__.binaryStringToUint8Array=function(U){for(var T=U.length,H=new Uint8Array(T),Y=0;Y<T;Y++)H[Y]=U.charCodeAt(Y);return H},Q=t.__addimage__.arrayBufferToBinaryString=function(U){for(var T="",H=X(U)?U:new Uint8Array(U),Y=0;Y<H.length;Y+=8192)T+=String.fromCharCode.apply(null,H.subarray(Y,Y+8192));return T};t.addImage=function(){var U,T,H,Y,le,pe,me,ve,se;if(typeof arguments[1]=="number"?(T=e,H=arguments[1],Y=arguments[2],le=arguments[3],pe=arguments[4],me=arguments[5],ve=arguments[6],se=arguments[7]):(T=arguments[1],H=arguments[2],Y=arguments[3],le=arguments[4],pe=arguments[5],me=arguments[6],ve=arguments[7],se=arguments[8]),Wt(U=arguments[0])==="object"&&!d(U)&&"imageData"in U){var J=U;U=J.imageData,T=J.format||T||e,H=J.x||H||0,Y=J.y||Y||0,le=J.w||J.width||le,pe=J.h||J.height||pe,me=J.alias||me,ve=J.compression||ve,se=J.rotation||J.angle||se}var oe=this.internal.getFilters();if(ve===void 0&&oe.indexOf("FlateEncode")!==-1&&(ve="SLOW"),isNaN(H)||isNaN(Y))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var B=K.call(this,U,T,me,ve);return v.call(this,H,Y,le,pe,B,se),this};var K=function(U,T,H,Y){var le,pe,me;if(typeof U=="string"&&A(U)===e){U=unescape(U);var ve=re(U,!1);(ve!==""||(ve=t.loadFile(U,!0))!==void 0)&&(U=ve)}if(d(U)&&(U=g(U,T)),T=A(U,T),!c(T))throw new Error("addImage does not support files of type '"+T+"', please ensure that a plugin for '"+T+"' support is added.");if(((me=H)==null||me.length===0)&&(H=function(se){return typeof se=="string"||X(se)?b(se):X(se.data)?b(se.data):null}(U)),(le=h.call(this,H))||(W()&&(U instanceof Uint8Array||T==="RGBA"||(pe=U,U=k(U))),le=this["process"+T.toUpperCase()](U,l.call(this),H,function(se){return se&&typeof se=="string"&&(se=se.toUpperCase()),se in t.image_compression?se:C.NONE}(Y),pe)),!le)throw new Error("An unknown error occurred whilst processing the image.");return le},re=t.__addimage__.convertBase64ToBinaryString=function(U,T){var H;T=typeof T!="boolean"||T;var Y,le="";if(typeof U=="string"){Y=(H=O(U))!==null?H.data:U;try{le=Ll(Y)}catch(pe){if(T)throw F(Y)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+pe.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return le};t.getImageProperties=function(U){var T,H,Y="";if(d(U)&&(U=g(U)),typeof U=="string"&&A(U)===e&&((Y=re(U,!1))===""&&(Y=t.loadFile(U)||""),U=Y),H=A(U),!c(H))throw new Error("addImage does not support files of type '"+H+"', please ensure that a plugin for '"+H+"' support is added.");if(!W()||U instanceof Uint8Array||(U=k(U)),!(T=this["process"+H.toUpperCase()](U)))throw new Error("An unknown error occurred whilst processing the image");return T.fileType=H,T}})(yt.API),function(t){var e=function(r){if(r!==void 0&&r!="")return!0};yt.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(r){for(var A,n,a,i=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(r.objId),l=r.pageContext.annotations,c=!1,d=0;d<l.length&&!c;d++)switch((A=l[d]).type){case"link":(e(A.options.url)||e(A.options.pageNumber))&&(c=!0);break;case"reference":case"text":case"freetext":c=!0}if(c!=0){this.internal.write("/Annots [");for(var g=0;g<l.length;g++){A=l[g];var h=this.internal.pdfEscape,p=this.internal.getEncryptor(r.objId);switch(A.type){case"reference":this.internal.write(" "+A.object.objId+" 0 R ");break;case"text":var v=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),C=this.internal.getEncryptor(v.objId),b=A.title||"Note";a="<</Type /Annot /Subtype /Text "+(n="/Rect ["+i(A.bounds.x)+" "+s(A.bounds.y+A.bounds.h)+" "+i(A.bounds.x+A.bounds.w)+" "+s(A.bounds.y)+"] ")+"/Contents ("+h(C(A.contents))+")",a+=" /Popup "+y.objId+" 0 R",a+=" /P "+o.objId+" 0 R",a+=" /T ("+h(C(b))+") >>",v.content=a;var F=v.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+i(A.bounds.x+30)+" "+s(A.bounds.y+A.bounds.h)+" "+i(A.bounds.x+A.bounds.w+30)+" "+s(A.bounds.y)+"] ")+" /Parent "+F,A.open&&(a+=" /Open true"),a+=" >>",y.content=a,this.internal.write(v.objId,"0 R",y.objId,"0 R");break;case"freetext":n="/Rect ["+i(A.bounds.x)+" "+s(A.bounds.y)+" "+i(A.bounds.x+A.bounds.w)+" "+s(A.bounds.y+A.bounds.h)+"] ";var O=A.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+h(p(A.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+O+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(A.options.name){var W=this.annotations._nameMap[A.options.name];A.options.pageNumber=W.page,A.options.top=W.y}else A.options.top||(A.options.top=0);if(n="/Rect ["+A.finalBounds.x+" "+A.finalBounds.y+" "+A.finalBounds.w+" "+A.finalBounds.h+"] ",a="",A.options.url)a="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+h(p(A.options.url))+") >>";else if(A.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(A.options.pageNumber).objId+" 0 R",A.options.magFactor=A.options.magFactor||"XYZ",A.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+A.options.top+"]";break;case"FitV":A.options.left=A.options.left||0,a+=" /FitV "+A.options.left+"]";break;case"XYZ":default:var X=s(A.options.top);A.options.left=A.options.left||0,A.options.zoom===void 0&&(A.options.zoom=0),a+=" /XYZ "+A.options.left+" "+X+" "+A.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),t.createAnnotation=function(r){var A=this.internal.getCurrentPageInfo();switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":A.pageContext.annotations.push(r)}},t.link=function(r,A,n,a,i){var s=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:o(r),y:l(A),w:o(r+n),h:l(A+a)},options:i,type:"link"})},t.textWithLink=function(r,A,n,a){var i,s,o=this.getTextWidth(r),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){s=a.maxWidth;var c=this.splitTextToSize(r,s).length;i=Math.ceil(l*c)}else s=o,i=l;return this.text(r,A,n,a),n+=.2*l,a.align==="center"&&(A-=o/2),a.align==="right"&&(A-=o),this.link(A,n-l,s,i,a),o},t.getTextWidth=function(r){var A=this.internal.getFontSize();return this.getStringUnitWidth(r)*A/this.internal.scaleFactor}}(yt.API),function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},A={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];t.__arabicParser__={};var a=t.__arabicParser__.isInArabicSubstitutionA=function(v){return e[v.charCodeAt(0)]!==void 0},i=t.__arabicParser__.isArabicLetter=function(v){return typeof v=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(v)},s=t.__arabicParser__.isArabicEndLetter=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length<=2},o=t.__arabicParser__.isArabicAlfLetter=function(v){return i(v)&&n.indexOf(v.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length>=1};var l=t.__arabicParser__.arabicLetterHasFinalForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length>=3};var c=t.__arabicParser__.arabicLetterHasMedialForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length==4},d=t.__arabicParser__.resolveLigatures=function(v){var y=0,C=r,b="",F=0;for(y=0;y<v.length;y+=1)C[v.charCodeAt(y)]!==void 0?(F++,typeof(C=C[v.charCodeAt(y)])=="number"&&(b+=String.fromCharCode(C),C=r,F=0),y===v.length-1&&(C=r,b+=v.charAt(y-(F-1)),y-=F-1,F=0)):(C=r,b+=v.charAt(y-F),y-=F,F=0);return b};t.__arabicParser__.isArabicDiacritic=function(v){return v!==void 0&&A[v.charCodeAt(0)]!==void 0};var g=t.__arabicParser__.getCorrectForm=function(v,y,C){return i(v)?a(v)===!1?-1:!l(v)||!i(y)&&!i(C)||!i(C)&&s(y)||s(v)&&!i(y)||s(v)&&o(y)||s(v)&&s(y)?0:c(v)&&i(y)&&!s(y)&&i(C)&&l(C)?3:s(v)||!i(C)?1:2:-1},h=function(v){var y=0,C=0,b=0,F="",O="",W="",X=(v=v||"").split("\\s+"),k=[];for(y=0;y<X.length;y+=1){for(k.push(""),C=0;C<X[y].length;C+=1)F=X[y][C],O=X[y][C-1],W=X[y][C+1],i(F)?(b=g(F,O,W),k[y]+=b!==-1?String.fromCharCode(e[F.charCodeAt(0)][b]):F):k[y]+=F;k[y]=d(k[y])}return k.join(" ")},p=t.__arabicParser__.processArabic=t.processArabic=function(){var v,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,C=[];if(Array.isArray(y)){var b=0;for(C=[],b=0;b<y.length;b+=1)Array.isArray(y[b])?C.push([h(y[b][0]),y[b][1],y[b][2]]):C.push([h(y[b])]);v=C}else v=h(y);return typeof arguments[0]=="string"?v:(arguments[0].text=v,arguments[0])};t.events.push(["preProcessText",p])}(yt.API),yt.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},function(t){var e=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(s){r=s}});var A=150;Object.defineProperty(this,"width",{get:function(){return A},set:function(s){A=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=A+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(s){n=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(s){a=s}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(s){i=s}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(r,A){var n;if((r=r||"2d")!=="2d")return null;for(n in A)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=A[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(yt.API),function(t){var e={left:0,top:0,bottom:0,right:0},r=!1,A=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),n.call(this))},n=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var o=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return o},set:function(v){o=v}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(v){l=v}});var c=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return c},set:function(v){c=v}});var d=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return d},set:function(v){d=v}});var g=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return g},set:function(v){g=v}});var h=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return h},set:function(v){h=v}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(v){p=v}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(o){return A.call(this),this.internal.__cell__.headerFunction=typeof o=="function"?o:void 0,this},t.getTextDimensions=function(o,l){A.call(this);var c=(l=l||{}).fontSize||this.getFontSize(),d=l.font||this.getFont(),g=l.scaleFactor||this.internal.scaleFactor,h=0,p=0,v=0,y=this;if(!Array.isArray(o)&&typeof o!="string"){if(typeof o!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");o=String(o)}var C=l.maxWidth;C>0?typeof o=="string"?o=this.splitTextToSize(o,C):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(F,O){return F.concat(y.splitTextToSize(O,C))},[])):o=Array.isArray(o)?o:[o];for(var b=0;b<o.length;b++)h<(v=this.getStringUnitWidth(o[b],{font:d})*c)&&(h=v);return h!==0&&(p=o.length),{w:h/=g,h:Math.max((p*c*this.getLineHeightFactor()-c*(this.getLineHeightFactor()-1))/g,0)}},t.cellAddPage=function(){A.call(this),this.addPage();var o=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(o.left,o.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var i=t.cell=function(){var o;o=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),A.call(this);var l=this.internal.__cell__.lastCell,c=this.internal.__cell__.padding,d=this.internal.__cell__.margins||e,g=this.internal.__cell__.tableHeaderRow,h=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===o.lineNumber?(o.x=(l.x||0)+(l.width||0),o.y=l.y||0):l.y+l.height+o.height+d.bottom>this.getPageHeight()?(this.cellAddPage(),o.y=d.top,h&&g&&(this.printHeaderRow(o.lineNumber,!0),o.y+=g[0].height)):o.y=l.y+l.height||o.y),o.text[0]!==void 0&&(this.rect(o.x,o.y,o.width,o.height,r===!0?"FD":void 0),o.align==="right"?this.text(o.text,o.x+o.width-c,o.y+c,{align:"right",baseline:"top"}):o.align==="center"?this.text(o.text,o.x+o.width/2,o.y+c,{align:"center",baseline:"top",maxWidth:o.width-c-c}):this.text(o.text,o.x+c,o.y+c,{align:"left",baseline:"top",maxWidth:o.width-c-c})),this.internal.__cell__.lastCell=o,this};t.table=function(o,l,c,d,g){if(A.call(this),!c)throw new Error("No data for PDF table.");var h,p,v,y,C=[],b=[],F=[],O={},W={},X=[],k=[],Q=(g=g||{}).autoSize||!1,K=g.printHeaders!==!1,re=g.css&&g.css["font-size"]!==void 0?16*g.css["font-size"]:g.fontSize||12,U=g.margins||Object.assign({width:this.getPageWidth()},e),T=typeof g.padding=="number"?g.padding:3,H=g.headerBackgroundColor||"#c8c8c8",Y=g.headerTextColor||"#000";if(n.call(this),this.internal.__cell__.printHeaders=K,this.internal.__cell__.margins=U,this.internal.__cell__.table_font_size=re,this.internal.__cell__.padding=T,this.internal.__cell__.headerBackgroundColor=H,this.internal.__cell__.headerTextColor=Y,this.setFontSize(re),d==null)b=C=Object.keys(c[0]),F=C.map(function(){return"left"});else if(Array.isArray(d)&&Wt(d[0])==="object")for(C=d.map(function(J){return J.name}),b=d.map(function(J){return J.prompt||J.name||""}),F=d.map(function(J){return J.align||"left"}),h=0;h<d.length;h+=1)W[d[h].name]=d[h].width*(19.049976/25.4);else Array.isArray(d)&&typeof d[0]=="string"&&(b=C=d,F=C.map(function(){return"left"}));if(Q||Array.isArray(d)&&typeof d[0]=="string")for(h=0;h<C.length;h+=1){for(O[y=C[h]]=c.map(function(J){return J[y]}),this.setFont(void 0,"bold"),X.push(this.getTextDimensions(b[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=O[y],this.setFont(void 0,"normal"),v=0;v<p.length;v+=1)X.push(this.getTextDimensions(p[v],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);W[y]=Math.max.apply(null,X)+T+T,X=[]}if(K){var le={};for(h=0;h<C.length;h+=1)le[C[h]]={},le[C[h]].text=b[h],le[C[h]].align=F[h];var pe=s.call(this,le,W);k=C.map(function(J){return new a(o,l,W[J],pe,le[J].text,void 0,le[J].align)}),this.setTableHeaderRow(k),this.printHeaderRow(1,!1)}var me=d.reduce(function(J,oe){return J[oe.name]=oe.align,J},{});for(h=0;h<c.length;h+=1){"rowStart"in g&&g.rowStart instanceof Function&&g.rowStart({row:h,data:c[h]},this);var ve=s.call(this,c[h],W);for(v=0;v<C.length;v+=1){var se=c[h][C[v]];"cellStart"in g&&g.cellStart instanceof Function&&g.cellStart({row:h,col:v,data:se},this),i.call(this,new a(o,l,W[C[v]],ve,se,h+2,me[C[v]]))}}return this.internal.__cell__.table_x=o,this.internal.__cell__.table_y=l,this};var s=function(o,l){var c=this.internal.__cell__.padding,d=this.internal.__cell__.table_font_size,g=this.internal.scaleFactor;return Object.keys(o).map(function(h){var p=o[h];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,l[h]-c-c)},this).map(function(h){return this.getLineHeightFactor()*h.length*d/g+c+c},this).reduce(function(h,p){return Math.max(h,p)},0)};t.setTableHeaderRow=function(o){A.call(this),this.internal.__cell__.tableHeaderRow=o},t.printHeaderRow=function(o,l){if(A.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var c;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var d=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(d[0],d[1],d[2],d[3],void 0,-1)}this.setFont(void 0,"bold");for(var g=[],h=0;h<this.internal.__cell__.tableHeaderRow.length;h+=1){c=this.internal.__cell__.tableHeaderRow[h].clone(),l&&(c.y=this.internal.__cell__.margins.top||0,g.push(c)),c.lineNumber=o;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),i.call(this,c),this.setTextColor(p)}g.length>0&&this.setTableHeaderRow(g),this.setFont(void 0,"normal"),r=!1}}(yt.API);var cw={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},fw=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Hd=lw(fw),uw=[100,200,300,400,500,600,700,800,900],CU=lw(uw);function Vd(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(a){return cw[a=a||"normal"]?a:"normal"}(t.style),A=function(a){if(!a)return 400;if(typeof a=="number")return a>=100&&a<=900&&a%100==0?a:400;if(/^\d00$/.test(a))return parseInt(a);switch(a){case"bold":return 700;case"normal":default:return 400}}(t.weight),n=function(a){return typeof Hd[a=a||"normal"]=="number"?a:"normal"}(t.stretch);return{family:e,style:r,weight:A,stretch:n,src:t.src||[],ref:t.ref||{name:e,style:[n,r,A].join(" ")}}}function hw(t,e,r,A){var n;for(n=r;n>=0&&n<e.length;n+=A)if(t[e[n]])return t[e[n]];for(n=r;n>=0&&n<e.length;n-=A)if(t[e[n]])return t[e[n]]}var bU={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},dw={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function gw(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function EU(t,e,r){for(var A=(r=r||{}).defaultFontFamily||"times",n=Object.assign({},bU,r.genericFontFamilies||{}),a=null,i=null,s=0;s<e.length;++s)if(n[(a=Vd(e[s])).family]&&(a.family=n[a.family]),t.hasOwnProperty(a.family)){i=t[a.family];break}if(!(i=i||t[A]))throw new Error("Could not find a font-family for the rule '"+gw(a)+"' and default family '"+A+"'.");if(i=function(o,l){if(l[o])return l[o];var c=Hd[o],d=c<=Hd.normal?-1:1,g=hw(l,fw,c,d);if(!g)throw new Error("Could not find a matching font-stretch value for "+o);return g}(a.stretch,i),i=function(o,l){if(l[o])return l[o];for(var c=cw[o],d=0;d<c.length;++d)if(l[c[d]])return l[c[d]];throw new Error("Could not find a matching font-style for "+o)}(a.style,i),!(i=function(o,l){if(l[o])return l[o];if(o===400&&l[500])return l[500];if(o===500&&l[400])return l[400];var c=CU[o],d=hw(l,uw,c,o<400?-1:1);if(!d)throw new Error("Could not find a matching font-weight for value "+o);return d}(a.weight,i)))throw new Error("Failed to resolve a font for the rule '"+gw(a)+"'.");return i}function pw(t){return t.trimLeft()}function FU(t,e){for(var r=0;r<t.length;){if(t.charAt(r)===e)return[t.substring(0,r),t.substring(r+1)];r+=1}return null}function SU(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],t.substring(e[0].length)]}var ou,mw,vw,Kd=["times"];(function(t){var e,r,A,n,a,i,s,o,l,c=function(B){return B=B||{},this.isStrokeTransparent=B.isStrokeTransparent||!1,this.strokeOpacity=B.strokeOpacity||1,this.strokeStyle=B.strokeStyle||"#000000",this.fillStyle=B.fillStyle||"#000000",this.isFillTransparent=B.isFillTransparent||!1,this.fillOpacity=B.fillOpacity||1,this.font=B.font||"10px sans-serif",this.textBaseline=B.textBaseline||"alphabetic",this.textAlign=B.textAlign||"left",this.lineWidth=B.lineWidth||1,this.lineJoin=B.lineJoin||"miter",this.lineCap=B.lineCap||"butt",this.path=B.path||[],this.transform=B.transform!==void 0?B.transform.clone():new o,this.globalCompositeOperation=B.globalCompositeOperation||"normal",this.globalAlpha=B.globalAlpha||1,this.clip_path=B.clip_path||[],this.currentPoint=B.currentPoint||new i,this.miterLimit=B.miterLimit||10,this.lastPoint=B.lastPoint||new i,this.lineDashOffset=B.lineDashOffset||0,this.lineDash=B.lineDash||[],this.margin=B.margin||[0,0,0,0],this.prevPageLastElemOffset=B.prevPageLastElemOffset||0,this.ignoreClearRect=typeof B.ignoreClearRect!="boolean"||B.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new d(this),e=this.internal.f2,r=this.internal.getCoordinateString,A=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,i=this.internal.Point,s=this.internal.Rectangle,o=this.internal.Matrix,l=new c}]);var d=function(B){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var _=B;Object.defineProperty(this,"pdf",{get:function(){return _}});var S=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return S},set:function(Te){S=!!Te}});var N=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return N},set:function(Te){N=!!Te}});var G=0;Object.defineProperty(this,"posX",{get:function(){return G},set:function(Te){isNaN(Te)||(G=Te)}});var ie=0;Object.defineProperty(this,"posY",{get:function(){return ie},set:function(Te){isNaN(Te)||(ie=Te)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(Te){var ne;typeof Te=="number"?ne=[Te,Te,Te,Te]:((ne=new Array(4))[0]=Te[0],ne[1]=Te.length>=2?Te[1]:ne[0],ne[2]=Te.length>=3?Te[2]:ne[0],ne[3]=Te.length>=4?Te[3]:ne[1]),l.margin=ne}});var ce=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ce},set:function(Te){ce=Te}});var fe=0;Object.defineProperty(this,"lastBreak",{get:function(){return fe},set:function(Te){fe=Te}});var xe=[];Object.defineProperty(this,"pageBreaks",{get:function(){return xe},set:function(Te){xe=Te}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(Te){Te instanceof c&&(l=Te)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(Te){l.path=Te}});var Ie=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ie},set:function(Te){Ie=Te}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Te){var ne;ne=g(Te),this.ctx.fillStyle=ne.style,this.ctx.isFillTransparent=ne.a===0,this.ctx.fillOpacity=ne.a,this.pdf.setFillColor(ne.r,ne.g,ne.b,{a:ne.a}),this.pdf.setTextColor(ne.r,ne.g,ne.b,{a:ne.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Te){var ne=g(Te);this.ctx.strokeStyle=ne.style,this.ctx.isStrokeTransparent=ne.a===0,this.ctx.strokeOpacity=ne.a,ne.a===0?this.pdf.setDrawColor(255,255,255):(ne.a,this.pdf.setDrawColor(ne.r,ne.g,ne.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Te){["butt","round","square"].indexOf(Te)!==-1&&(this.ctx.lineCap=Te,this.pdf.setLineCap(Te))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Te){isNaN(Te)||(this.ctx.lineWidth=Te,this.pdf.setLineWidth(Te))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Te){["bevel","round","miter"].indexOf(Te)!==-1&&(this.ctx.lineJoin=Te,this.pdf.setLineJoin(Te))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Te){isNaN(Te)||(this.ctx.miterLimit=Te,this.pdf.setMiterLimit(Te))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Te){this.ctx.textBaseline=Te}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Te){["right","end","center","left","start"].indexOf(Te)!==-1&&(this.ctx.textAlign=Te)}});var Me=null;function Xe(Te,ne){if(Me===null){var Qe=function(rt){var Re=[];return Object.keys(rt).forEach(function(ze){rt[ze].forEach(function(Ye){var Je=null;switch(Ye){case"bold":Je={family:ze,weight:"bold"};break;case"italic":Je={family:ze,style:"italic"};break;case"bolditalic":Je={family:ze,weight:"bold",style:"italic"};break;case"":case"normal":Je={family:ze}}Je!==null&&(Je.ref={name:ze,style:Ye},Re.push(Je))})}),Re}(Te.getFontList());Me=function(rt){for(var Re={},ze=0;ze<rt.length;++ze){var Ye=Vd(rt[ze]),Je=Ye.family,st=Ye.stretch,nt=Ye.style,ht=Ye.weight;Re[Je]=Re[Je]||{},Re[Je][st]=Re[Je][st]||{},Re[Je][st][nt]=Re[Je][st][nt]||{},Re[Je][st][nt][ht]=Ye}return Re}(Qe.concat(ne))}return Me}var $e=null;Object.defineProperty(this,"fontFaces",{get:function(){return $e},set:function(Te){Me=null,$e=Te}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Te){var ne;if(this.ctx.font=Te,(ne=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(Te))!==null){var Qe=ne[1],rt=(ne[2],ne[3]),Re=ne[4],ze=(ne[5],ne[6]),Ye=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Re)[2];Re=Math.floor(Ye==="px"?parseFloat(Re)*this.pdf.internal.scaleFactor:Ye==="em"?parseFloat(Re)*this.pdf.getFontSize():parseFloat(Re)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Re);var Je=function(dt){var xt,tt,nr=[],Nt=dt.trim();if(Nt==="")return Kd;if(Nt in dw)return[dw[Nt]];for(;Nt!=="";){switch(tt=null,xt=(Nt=pw(Nt)).charAt(0)){case'"':case"'":tt=FU(Nt.substring(1),xt);break;default:tt=SU(Nt)}if(tt===null||(nr.push(tt[0]),(Nt=pw(tt[1]))!==""&&Nt.charAt(0)!==","))return Kd;Nt=Nt.replace(/^,/,"")}return nr}(ze);if(this.fontFaces){var st=EU(Xe(this.pdf,this.fontFaces),Je.map(function(dt){return{family:dt,stretch:"normal",weight:rt,style:Qe}}));this.pdf.setFont(st.ref.name,st.ref.style)}else{var nt="";(rt==="bold"||parseInt(rt,10)>=700||Qe==="bold")&&(nt="bold"),Qe==="italic"&&(nt+="italic"),nt.length===0&&(nt="normal");for(var ht="",vt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},_t=0;_t<Je.length;_t++){if(this.pdf.internal.getFont(Je[_t],nt,{noFallback:!0,disableWarning:!0})!==void 0){ht=Je[_t];break}if(nt==="bolditalic"&&this.pdf.internal.getFont(Je[_t],"bold",{noFallback:!0,disableWarning:!0})!==void 0)ht=Je[_t],nt="bold";else if(this.pdf.internal.getFont(Je[_t],"normal",{noFallback:!0,disableWarning:!0})!==void 0){ht=Je[_t],nt="normal";break}}if(ht===""){for(var Ut=0;Ut<Je.length;Ut++)if(vt[Je[Ut]]){ht=vt[Je[Ut]];break}}ht=ht===""?"Times":ht,this.pdf.setFont(ht,nt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Te){this.ctx.globalCompositeOperation=Te}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Te){this.ctx.globalAlpha=Te}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Te){this.ctx.lineDashOffset=Te,oe.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Te){this.ctx.lineDash=Te,oe.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Te){this.ctx.ignoreClearRect=!!Te}})};d.prototype.setLineDash=function(B){this.lineDash=B},d.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},d.prototype.fill=function(){O.call(this,"fill",!1)},d.prototype.stroke=function(){O.call(this,"stroke",!1)},d.prototype.beginPath=function(){this.path=[{type:"begin"}]},d.prototype.moveTo=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var S=this.ctx.transform.applyToPoint(new i(B,_));this.path.push({type:"mt",x:S.x,y:S.y}),this.ctx.lastPoint=new i(B,_)},d.prototype.closePath=function(){var B=new i(0,0),_=0;for(_=this.path.length-1;_!==-1;_--)if(this.path[_].type==="begin"&&Wt(this.path[_+1])==="object"&&typeof this.path[_+1].x=="number"){B=new i(this.path[_+1].x,this.path[_+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new i(B.x,B.y)},d.prototype.lineTo=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var S=this.ctx.transform.applyToPoint(new i(B,_));this.path.push({type:"lt",x:S.x,y:S.y}),this.ctx.lastPoint=new i(S.x,S.y)},d.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),O.call(this,null,!0)},d.prototype.quadraticCurveTo=function(B,_,S,N){if(isNaN(S)||isNaN(N)||isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var G=this.ctx.transform.applyToPoint(new i(S,N)),ie=this.ctx.transform.applyToPoint(new i(B,_));this.path.push({type:"qct",x1:ie.x,y1:ie.y,x:G.x,y:G.y}),this.ctx.lastPoint=new i(G.x,G.y)},d.prototype.bezierCurveTo=function(B,_,S,N,G,ie){if(isNaN(G)||isNaN(ie)||isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ce=this.ctx.transform.applyToPoint(new i(G,ie)),fe=this.ctx.transform.applyToPoint(new i(B,_)),xe=this.ctx.transform.applyToPoint(new i(S,N));this.path.push({type:"bct",x1:fe.x,y1:fe.y,x2:xe.x,y2:xe.y,x:ce.x,y:ce.y}),this.ctx.lastPoint=new i(ce.x,ce.y)},d.prototype.arc=function(B,_,S,N,G,ie){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N)||isNaN(G))throw cr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ie=!!ie,!this.ctx.transform.isIdentity){var ce=this.ctx.transform.applyToPoint(new i(B,_));B=ce.x,_=ce.y;var fe=this.ctx.transform.applyToPoint(new i(0,S)),xe=this.ctx.transform.applyToPoint(new i(0,0));S=Math.sqrt(Math.pow(fe.x-xe.x,2)+Math.pow(fe.y-xe.y,2))}Math.abs(G-N)>=2*Math.PI&&(N=0,G=2*Math.PI),this.path.push({type:"arc",x:B,y:_,radius:S,startAngle:N,endAngle:G,counterclockwise:ie})},d.prototype.arcTo=function(B,_,S,N,G){throw new Error("arcTo not implemented.")},d.prototype.rect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(B,_),this.lineTo(B+S,_),this.lineTo(B+S,_+N),this.lineTo(B,_+N),this.lineTo(B,_),this.lineTo(B+S,_),this.lineTo(B,_)},d.prototype.fillRect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!h.call(this)){var G={};this.lineCap!=="butt"&&(G.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(G.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(B,_,S,N),this.fill(),G.hasOwnProperty("lineCap")&&(this.lineCap=G.lineCap),G.hasOwnProperty("lineJoin")&&(this.lineJoin=G.lineJoin)}},d.prototype.strokeRect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(B,_,S,N),this.stroke())},d.prototype.clearRect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(B,_,S,N))},d.prototype.save=function(B){B=typeof B!="boolean"||B;for(var _=this.pdf.internal.getCurrentPageInfo().pageNumber,S=0;S<this.pdf.internal.getNumberOfPages();S++)this.pdf.setPage(S+1),this.pdf.internal.out("q");if(this.pdf.setPage(_),B){this.ctx.fontSize=this.pdf.internal.getFontSize();var N=new c(this.ctx);this.ctxStack.push(this.ctx),this.ctx=N}},d.prototype.restore=function(B){B=typeof B!="boolean"||B;for(var _=this.pdf.internal.getCurrentPageInfo().pageNumber,S=0;S<this.pdf.internal.getNumberOfPages();S++)this.pdf.setPage(S+1),this.pdf.internal.out("Q");this.pdf.setPage(_),B&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},d.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=function(B){var _,S,N,G;if(B.isCanvasGradient===!0&&(B=B.getColor()),!B)return{r:0,g:0,b:0,a:0,style:B};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(B))_=0,S=0,N=0,G=0;else{var ie=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(B);if(ie!==null)_=parseInt(ie[1]),S=parseInt(ie[2]),N=parseInt(ie[3]),G=1;else if((ie=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(B))!==null)_=parseInt(ie[1]),S=parseInt(ie[2]),N=parseInt(ie[3]),G=parseFloat(ie[4]);else{if(G=1,typeof B=="string"&&B.charAt(0)!=="#"){var ce=new Zv(B);B=ce.ok?ce.toHex():"#000000"}B.length===4?(_=B.substring(1,2),_+=_,S=B.substring(2,3),S+=S,N=B.substring(3,4),N+=N):(_=B.substring(1,3),S=B.substring(3,5),N=B.substring(5,7)),_=parseInt(_,16),S=parseInt(S,16),N=parseInt(N,16)}}return{r:_,g:S,b:N,a:G,style:B}},h=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};d.prototype.fillText=function(B,_,S,N){if(isNaN(_)||isNaN(S)||typeof B!="string")throw cr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(N=isNaN(N)?void 0:N,!h.call(this)){var G=ve(this.ctx.transform.rotation),ie=this.ctx.transform.scaleX;T.call(this,{text:B,x:_,y:S,scale:ie,angle:G,align:this.textAlign,maxWidth:N})}},d.prototype.strokeText=function(B,_,S,N){if(isNaN(_)||isNaN(S)||typeof B!="string")throw cr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){N=isNaN(N)?void 0:N;var G=ve(this.ctx.transform.rotation),ie=this.ctx.transform.scaleX;T.call(this,{text:B,x:_,y:S,scale:ie,renderingMode:"stroke",angle:G,align:this.textAlign,maxWidth:N})}},d.prototype.measureText=function(B){if(typeof B!="string")throw cr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var _=this.pdf,S=this.pdf.internal.scaleFactor,N=_.internal.getFontSize(),G=_.getStringUnitWidth(B)*N/_.internal.scaleFactor,ie=function(ce){var fe=(ce=ce||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return fe}}),this};return new ie({width:G*=Math.round(96*S/72*1e4)/1e4})},d.prototype.scale=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var S=new o(B,0,0,_,0,0);this.ctx.transform=this.ctx.transform.multiply(S)},d.prototype.rotate=function(B){if(isNaN(B))throw cr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var _=new o(Math.cos(B),Math.sin(B),-Math.sin(B),Math.cos(B),0,0);this.ctx.transform=this.ctx.transform.multiply(_)},d.prototype.translate=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var S=new o(1,0,0,1,B,_);this.ctx.transform=this.ctx.transform.multiply(S)},d.prototype.transform=function(B,_,S,N,G,ie){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N)||isNaN(G)||isNaN(ie))throw cr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ce=new o(B,_,S,N,G,ie);this.ctx.transform=this.ctx.transform.multiply(ce)},d.prototype.setTransform=function(B,_,S,N,G,ie){B=isNaN(B)?1:B,_=isNaN(_)?0:_,S=isNaN(S)?0:S,N=isNaN(N)?1:N,G=isNaN(G)?0:G,ie=isNaN(ie)?0:ie,this.ctx.transform=new o(B,_,S,N,G,ie)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(B,_,S,N,G,ie,ce,fe,xe){var Ie=this.pdf.getImageProperties(B),Me=1,Xe=1,$e=1,Te=1;N!==void 0&&fe!==void 0&&($e=fe/N,Te=xe/G,Me=Ie.width/N*fe/N,Xe=Ie.height/G*xe/G),ie===void 0&&(ie=_,ce=S,_=0,S=0),N!==void 0&&fe===void 0&&(fe=N,xe=G),N===void 0&&fe===void 0&&(fe=Ie.width,xe=Ie.height);for(var ne,Qe=this.ctx.transform.decompose(),rt=ve(Qe.rotate.shx),Re=new o,ze=(Re=(Re=(Re=Re.multiply(Qe.translate)).multiply(Qe.skew)).multiply(Qe.scale)).applyToRectangle(new s(ie-_*$e,ce-S*Te,N*Me,G*Xe)),Ye=y.call(this,ze),Je=[],st=0;st<Ye.length;st+=1)Je.indexOf(Ye[st])===-1&&Je.push(Ye[st]);if(F(Je),this.autoPaging)for(var nt=Je[0],ht=Je[Je.length-1],vt=nt;vt<ht+1;vt++){this.pdf.setPage(vt);var _t=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ut=vt===1?this.posY+this.margin[0]:this.margin[0],dt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],xt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],tt=vt===1?0:dt+(vt-2)*xt;if(this.ctx.clip_path.length!==0){var nr=this.path;ne=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(ne,this.posX+this.margin[3],-tt+Ut+this.ctx.prevPageLastElemOffset),W.call(this,"fill",!0),this.path=nr}var Nt=JSON.parse(JSON.stringify(ze));Nt=b([Nt],this.posX+this.margin[3],-tt+Ut+this.ctx.prevPageLastElemOffset)[0];var fr=(vt>nt||vt<ht)&&v.call(this);fr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_t,xt,null).clip().discardPath()),this.pdf.addImage(B,"JPEG",Nt.x,Nt.y,Nt.w,Nt.h,null,null,rt),fr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(B,"JPEG",ze.x,ze.y,ze.w,ze.h,null,null,rt)};var y=function(B,_,S){var N=[];_=_||this.pdf.internal.pageSize.width,S=S||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var G=this.posY+this.ctx.prevPageLastElemOffset;switch(B.type){default:case"mt":case"lt":N.push(Math.floor((B.y+G)/S)+1);break;case"arc":N.push(Math.floor((B.y+G-B.radius)/S)+1),N.push(Math.floor((B.y+G+B.radius)/S)+1);break;case"qct":var ie=se(this.ctx.lastPoint.x,this.ctx.lastPoint.y,B.x1,B.y1,B.x,B.y);N.push(Math.floor((ie.y+G)/S)+1),N.push(Math.floor((ie.y+ie.h+G)/S)+1);break;case"bct":var ce=J(this.ctx.lastPoint.x,this.ctx.lastPoint.y,B.x1,B.y1,B.x2,B.y2,B.x,B.y);N.push(Math.floor((ce.y+G)/S)+1),N.push(Math.floor((ce.y+ce.h+G)/S)+1);break;case"rect":N.push(Math.floor((B.y+G)/S)+1),N.push(Math.floor((B.y+B.h+G)/S)+1)}for(var fe=0;fe<N.length;fe+=1)for(;this.pdf.internal.getNumberOfPages()<N[fe];)C.call(this);return N},C=function(){var B=this.fillStyle,_=this.strokeStyle,S=this.font,N=this.lineCap,G=this.lineWidth,ie=this.lineJoin;this.pdf.addPage(),this.fillStyle=B,this.strokeStyle=_,this.font=S,this.lineCap=N,this.lineWidth=G,this.lineJoin=ie},b=function(B,_,S){for(var N=0;N<B.length;N++)switch(B[N].type){case"bct":B[N].x2+=_,B[N].y2+=S;case"qct":B[N].x1+=_,B[N].y1+=S;case"mt":case"lt":case"arc":default:B[N].x+=_,B[N].y+=S}return B},F=function(B){return B.sort(function(_,S){return _-S})},O=function(B,_){for(var S,N,G=this.fillStyle,ie=this.strokeStyle,ce=this.lineCap,fe=this.lineWidth,xe=Math.abs(fe*this.ctx.transform.scaleX),Ie=this.lineJoin,Me=JSON.parse(JSON.stringify(this.path)),Xe=JSON.parse(JSON.stringify(this.path)),$e=[],Te=0;Te<Xe.length;Te++)if(Xe[Te].x!==void 0)for(var ne=y.call(this,Xe[Te]),Qe=0;Qe<ne.length;Qe+=1)$e.indexOf(ne[Qe])===-1&&$e.push(ne[Qe]);for(var rt=0;rt<$e.length;rt++)for(;this.pdf.internal.getNumberOfPages()<$e[rt];)C.call(this);if(F($e),this.autoPaging)for(var Re=$e[0],ze=$e[$e.length-1],Ye=Re;Ye<ze+1;Ye++){this.pdf.setPage(Ye),this.fillStyle=G,this.strokeStyle=ie,this.lineCap=ce,this.lineWidth=xe,this.lineJoin=Ie;var Je=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],st=Ye===1?this.posY+this.margin[0]:this.margin[0],nt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],vt=Ye===1?0:nt+(Ye-2)*ht;if(this.ctx.clip_path.length!==0){var _t=this.path;S=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(S,this.posX+this.margin[3],-vt+st+this.ctx.prevPageLastElemOffset),W.call(this,B,!0),this.path=_t}if(N=JSON.parse(JSON.stringify(Me)),this.path=b(N,this.posX+this.margin[3],-vt+st+this.ctx.prevPageLastElemOffset),_===!1||Ye===0){var Ut=(Ye>Re||Ye<ze)&&v.call(this);Ut&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Je,ht,null).clip().discardPath()),W.call(this,B,_),Ut&&this.pdf.restoreGraphicsState()}this.lineWidth=fe}else this.lineWidth=xe,W.call(this,B,_),this.lineWidth=fe;this.path=Me},W=function(B,_){if((B!=="stroke"||_||!p.call(this))&&(B==="stroke"||_||!h.call(this))){for(var S,N,G=[],ie=this.path,ce=0;ce<ie.length;ce++){var fe=ie[ce];switch(fe.type){case"begin":G.push({begin:!0});break;case"close":G.push({close:!0});break;case"mt":G.push({start:fe,deltas:[],abs:[]});break;case"lt":var xe=G.length;if(ie[ce-1]&&!isNaN(ie[ce-1].x)&&(S=[fe.x-ie[ce-1].x,fe.y-ie[ce-1].y],xe>0)){for(;xe>=0;xe--)if(G[xe-1].close!==!0&&G[xe-1].begin!==!0){G[xe-1].deltas.push(S),G[xe-1].abs.push(fe);break}}break;case"bct":S=[fe.x1-ie[ce-1].x,fe.y1-ie[ce-1].y,fe.x2-ie[ce-1].x,fe.y2-ie[ce-1].y,fe.x-ie[ce-1].x,fe.y-ie[ce-1].y],G[G.length-1].deltas.push(S);break;case"qct":var Ie=ie[ce-1].x+2/3*(fe.x1-ie[ce-1].x),Me=ie[ce-1].y+2/3*(fe.y1-ie[ce-1].y),Xe=fe.x+2/3*(fe.x1-fe.x),$e=fe.y+2/3*(fe.y1-fe.y),Te=fe.x,ne=fe.y;S=[Ie-ie[ce-1].x,Me-ie[ce-1].y,Xe-ie[ce-1].x,$e-ie[ce-1].y,Te-ie[ce-1].x,ne-ie[ce-1].y],G[G.length-1].deltas.push(S);break;case"arc":G.push({deltas:[],abs:[],arc:!0}),Array.isArray(G[G.length-1].abs)&&G[G.length-1].abs.push(fe)}}N=_?null:B==="stroke"?"stroke":"fill";for(var Qe=!1,rt=0;rt<G.length;rt++)if(G[rt].arc)for(var Re=G[rt].abs,ze=0;ze<Re.length;ze++){var Ye=Re[ze];Ye.type==="arc"?Q.call(this,Ye.x,Ye.y,Ye.radius,Ye.startAngle,Ye.endAngle,Ye.counterclockwise,void 0,_,!Qe):H.call(this,Ye.x,Ye.y),Qe=!0}else if(G[rt].close===!0)this.pdf.internal.out("h"),Qe=!1;else if(G[rt].begin!==!0){var Je=G[rt].start.x,st=G[rt].start.y;Y.call(this,G[rt].deltas,Je,st),Qe=!0}N&&K.call(this,N),_&&re.call(this)}},X=function(B){var _=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,S=_*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return B-S;case"top":return B+_-S;case"hanging":return B+_-2*S;case"middle":return B+_/2-S;case"ideographic":return B;case"alphabetic":default:return B}},k=function(B){return B+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};d.prototype.createLinearGradient=function(){var B=function(){};return B.colorStops=[],B.addColorStop=function(_,S){this.colorStops.push([_,S])},B.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},B.isCanvasGradient=!0,B},d.prototype.createPattern=function(){return this.createLinearGradient()},d.prototype.createRadialGradient=function(){return this.createLinearGradient()};var Q=function(B,_,S,N,G,ie,ce,fe,xe){for(var Ie=pe.call(this,S,N,G,ie),Me=0;Me<Ie.length;Me++){var Xe=Ie[Me];Me===0&&(xe?U.call(this,Xe.x1+B,Xe.y1+_):H.call(this,Xe.x1+B,Xe.y1+_)),le.call(this,B,_,Xe.x2,Xe.y2,Xe.x3,Xe.y3,Xe.x4,Xe.y4)}fe?re.call(this):K.call(this,ce)},K=function(B){switch(B){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},re=function(){this.pdf.clip(),this.pdf.discardPath()},U=function(B,_){this.pdf.internal.out(r(B)+" "+A(_)+" m")},T=function(B){var _;switch(B.align){case"right":case"end":_="right";break;case"center":_="center";break;case"left":case"start":default:_="left"}var S=this.pdf.getTextDimensions(B.text),N=X.call(this,B.y),G=k.call(this,N)-S.h,ie=this.ctx.transform.applyToPoint(new i(B.x,N)),ce=this.ctx.transform.decompose(),fe=new o;fe=(fe=(fe=fe.multiply(ce.translate)).multiply(ce.skew)).multiply(ce.scale);for(var xe,Ie,Me,Xe=this.ctx.transform.applyToRectangle(new s(B.x,N,S.w,S.h)),$e=fe.applyToRectangle(new s(B.x,G,S.w,S.h)),Te=y.call(this,$e),ne=[],Qe=0;Qe<Te.length;Qe+=1)ne.indexOf(Te[Qe])===-1&&ne.push(Te[Qe]);if(F(ne),this.autoPaging)for(var rt=ne[0],Re=ne[ne.length-1],ze=rt;ze<Re+1;ze++){this.pdf.setPage(ze);var Ye=ze===1?this.posY+this.margin[0]:this.margin[0],Je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],st=this.pdf.internal.pageSize.height-this.margin[2],nt=st-this.margin[0],ht=this.pdf.internal.pageSize.width-this.margin[1],vt=ht-this.margin[3],_t=ze===1?0:Je+(ze-2)*nt;if(this.ctx.clip_path.length!==0){var Ut=this.path;xe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(xe,this.posX+this.margin[3],-1*_t+Ye),W.call(this,"fill",!0),this.path=Ut}var dt=b([JSON.parse(JSON.stringify($e))],this.posX+this.margin[3],-_t+Ye+this.ctx.prevPageLastElemOffset)[0];B.scale>=.01&&(Ie=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ie*B.scale),Me=this.lineWidth,this.lineWidth=Me*B.scale);var xt=this.autoPaging!=="text";if(xt||dt.y+dt.h<=st){if(xt||dt.y>=Ye&&dt.x<=ht){var tt=xt?B.text:this.pdf.splitTextToSize(B.text,B.maxWidth||ht-dt.x)[0],nr=b([JSON.parse(JSON.stringify(Xe))],this.posX+this.margin[3],-_t+Ye+this.ctx.prevPageLastElemOffset)[0],Nt=xt&&(ze>rt||ze<Re)&&v.call(this);Nt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],vt,nt,null).clip().discardPath()),this.pdf.text(tt,nr.x,nr.y,{angle:B.angle,align:_,renderingMode:B.renderingMode}),Nt&&this.pdf.restoreGraphicsState()}}else dt.y<st&&(this.ctx.prevPageLastElemOffset+=st-dt.y);B.scale>=.01&&(this.pdf.setFontSize(Ie),this.lineWidth=Me)}else B.scale>=.01&&(Ie=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ie*B.scale),Me=this.lineWidth,this.lineWidth=Me*B.scale),this.pdf.text(B.text,ie.x+this.posX,ie.y+this.posY,{angle:B.angle,align:_,renderingMode:B.renderingMode,maxWidth:B.maxWidth}),B.scale>=.01&&(this.pdf.setFontSize(Ie),this.lineWidth=Me)},H=function(B,_,S,N){S=S||0,N=N||0,this.pdf.internal.out(r(B+S)+" "+A(_+N)+" l")},Y=function(B,_,S){return this.pdf.lines(B,_,S,null,null)},le=function(B,_,S,N,G,ie,ce,fe){this.pdf.internal.out([e(n(S+B)),e(a(N+_)),e(n(G+B)),e(a(ie+_)),e(n(ce+B)),e(a(fe+_)),"c"].join(" "))},pe=function(B,_,S,N){for(var G=2*Math.PI,ie=Math.PI/2;_>S;)_-=G;var ce=Math.abs(S-_);ce<G&&N&&(ce=G-ce);for(var fe=[],xe=N?-1:1,Ie=_;ce>1e-5;){var Me=Ie+xe*Math.min(ce,ie);fe.push(me.call(this,B,Ie,Me)),ce-=Math.abs(Me-Ie),Ie=Me}return fe},me=function(B,_,S){var N=(S-_)/2,G=B*Math.cos(N),ie=B*Math.sin(N),ce=G,fe=-ie,xe=ce*ce+fe*fe,Ie=xe+ce*G+fe*ie,Me=4/3*(Math.sqrt(2*xe*Ie)-Ie)/(ce*ie-fe*G),Xe=ce-Me*fe,$e=fe+Me*ce,Te=Xe,ne=-$e,Qe=N+_,rt=Math.cos(Qe),Re=Math.sin(Qe);return{x1:B*Math.cos(_),y1:B*Math.sin(_),x2:Xe*rt-$e*Re,y2:Xe*Re+$e*rt,x3:Te*rt-ne*Re,y3:Te*Re+ne*rt,x4:B*Math.cos(S),y4:B*Math.sin(S)}},ve=function(B){return 180*B/Math.PI},se=function(B,_,S,N,G,ie){var ce=B+.5*(S-B),fe=_+.5*(N-_),xe=G+.5*(S-G),Ie=ie+.5*(N-ie),Me=Math.min(B,G,ce,xe),Xe=Math.max(B,G,ce,xe),$e=Math.min(_,ie,fe,Ie),Te=Math.max(_,ie,fe,Ie);return new s(Me,$e,Xe-Me,Te-$e)},J=function(B,_,S,N,G,ie,ce,fe){var xe,Ie,Me,Xe,$e,Te,ne,Qe,rt,Re,ze,Ye,Je,st,nt=S-B,ht=N-_,vt=G-S,_t=ie-N,Ut=ce-G,dt=fe-ie;for(Ie=0;Ie<41;Ie++)rt=(ne=(Me=B+(xe=Ie/40)*nt)+xe*(($e=S+xe*vt)-Me))+xe*($e+xe*(G+xe*Ut-$e)-ne),Re=(Qe=(Xe=_+xe*ht)+xe*((Te=N+xe*_t)-Xe))+xe*(Te+xe*(ie+xe*dt-Te)-Qe),Ie==0?(ze=rt,Ye=Re,Je=rt,st=Re):(ze=Math.min(ze,rt),Ye=Math.min(Ye,Re),Je=Math.max(Je,rt),st=Math.max(st,Re));return new s(Math.round(ze),Math.round(Ye),Math.round(Je-ze),Math.round(st-Ye))},oe=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var B,_,S=(B=this.ctx.lineDash,_=this.ctx.lineDashOffset,JSON.stringify({lineDash:B,lineDashOffset:_}));this.prevLineDash!==S&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=S)}}})(yt.API),function(t){var e=function(a){var i,s,o,l,c,d,g,h,p,v;for(s=[],o=0,l=(a+=i="\0\0\0\0".slice(a.length%4||4)).length;l>o;o+=4)(c=(a.charCodeAt(o)<<24)+(a.charCodeAt(o+1)<<16)+(a.charCodeAt(o+2)<<8)+a.charCodeAt(o+3))!==0?(d=(c=((c=((c=((c=(c-(v=c%85))/85)-(p=c%85))/85)-(h=c%85))/85)-(g=c%85))/85)%85,s.push(d+33,g+33,h+33,p+33,v+33)):s.push(122);return function(y,C){for(var b=C;b>0;b--)y.pop()}(s,i.length),String.fromCharCode.apply(String,s)+"~>"},r=function(a){var i,s,o,l,c,d=String,g="length",h=255,p="charCodeAt",v="slice",y="replace";for(a[v](-2),a=a[v](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),o=[],l=0,c=(a+=i="uuuuu"[v](a[g]%5||5))[g];c>l;l+=5)s=52200625*(a[p](l)-33)+614125*(a[p](l+1)-33)+7225*(a[p](l+2)-33)+85*(a[p](l+3)-33)+(a[p](l+4)-33),o.push(h&s>>24,h&s>>16,h&s>>8,h&s);return function(C,b){for(var F=b;F>0;F--)C.pop()}(o,i[g]),d.fromCharCode.apply(d,o)},A=function(a){var i=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),i.test(a)===!1)return"";for(var s="",o=0;o<a.length;o+=2)s+=String.fromCharCode("0x"+(a[o]+a[o+1]));return s},n=function(a){for(var i=new Uint8Array(a.length),s=a.length;s--;)i[s]=a.charCodeAt(s);return a=(i=Nd(i)).reduce(function(o,l){return o+String.fromCharCode(l)},"")};t.processDataByFilters=function(a,i){var s=0,o=a||"",l=[];for(typeof(i=i||[])=="string"&&(i=[i]),s=0;s<i.length;s+=1)switch(i[s]){case"ASCII85Decode":case"/ASCII85Decode":o=r(o),l.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":o=e(o),l.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":o=A(o),l.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":o=o.split("").map(function(c){return("0"+c.charCodeAt().toString(16)).slice(-2)}).join("")+">",l.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":o=n(o),l.push("/FlateDecode");break;default:throw new Error('The filter: "'+i[s]+'" is not implemented')}return{data:o,reverseChain:l.reverse().join(" ")}}}(yt.API),function(t){t.loadFile=function(e,r,A){return function(n,a,i){a=a!==!1,i=typeof i=="function"?i:function(){};var s=void 0;try{s=function(o,l,c){var d=new XMLHttpRequest,g=0,h=function(p){var v=p.length,y=[],C=String.fromCharCode;for(g=0;g<v;g+=1)y.push(C(255&p.charCodeAt(g)));return y.join("")};if(d.open("GET",o,!l),d.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(d.onload=function(){d.status===200?c(h(this.responseText)):c(void 0)}),d.send(null),l&&d.status===200)return h(d.responseText)}(n,a,i)}catch{}return s}(e,r,A)},t.loadImageFile=t.loadFile}(yt.API),function(t){function e(){return(Bt.html2canvas?Promise.resolve(Bt.html2canvas):Promise.resolve().then(()=>WT)).catch(function(i){return Promise.reject(new Error("Could not load html2canvas: "+i))}).then(function(i){return i.default?i.default:i})}function r(){return(Bt.DOMPurify?Promise.resolve(Bt.DOMPurify):Promise.resolve().then(()=>EH)).catch(function(i){return Promise.reject(new Error("Could not load dompurify: "+i))}).then(function(i){return i.default?i.default:i})}var A=function(i){var s=Wt(i);return s==="undefined"?"undefined":s==="string"||i instanceof String?"string":s==="number"||i instanceof Number?"number":s==="function"||i instanceof Function?"function":i&&i.constructor===Array?"array":i&&i.nodeType===1?"element":s==="object"?"object":"unknown"},n=function(i,s){var o=document.createElement(i);for(var l in s.className&&(o.className=s.className),s.innerHTML&&s.dompurify&&(o.innerHTML=s.dompurify.sanitize(s.innerHTML)),s.style)o.style[l]=s.style[l];return o},a=function i(s){var o=Object.assign(i.convert(Promise.resolve()),JSON.parse(JSON.stringify(i.template))),l=i.convert(Promise.resolve(),o);return l=(l=l.setProgress(1,i,1,[i])).set(s)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(i,s){return i.__proto__=s||a.prototype,i},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(i,s){return this.then(function(){switch(s=s||function(o){switch(A(o)){case"string":return"string";case"element":return o.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(i)){case"string":return this.then(r).then(function(o){return this.set({src:n("div",{innerHTML:i,dompurify:o})})});case"element":return this.set({src:i});case"canvas":return this.set({canvas:i});case"img":return this.set({img:i});default:return this.error("Unknown source type.")}})},a.prototype.to=function(i){switch(i){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var i={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},s=function o(l,c){for(var d=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),g=l.firstChild;g;g=g.nextSibling)c!==!0&&g.nodeType===1&&g.nodeName==="SCRIPT"||d.appendChild(o(g,c));return l.nodeType===1&&(l.nodeName==="CANVAS"?(d.width=l.width,d.height=l.height,d.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(d.value=l.value),d.addEventListener("load",function(){d.scrollTop=l.scrollTop,d.scrollLeft=l.scrollLeft},!0)),d}(this.prop.src,this.opt.html2canvas.javascriptEnabled);s.tagName==="BODY"&&(i.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=n("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=n("div",{className:"html2pdf__container",style:i}),this.prop.container.appendChild(s),this.prop.container.firstChild.appendChild(n("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var i=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(i).then(e).then(function(s){var o=Object.assign({},this.opt.html2canvas);return delete o.onrendered,s(this.prop.container,o)}).then(function(s){(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var i=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(i).then(e).then(function(s){var o=this.opt.jsPDF,l=this.opt.fontFaces,c=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,d=Object.assign({async:!0,allowTaint:!0,scale:c,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete d.onrendered,o.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,o.context2d.posX=this.opt.x,o.context2d.posY=this.opt.y,o.context2d.margin=this.opt.margin,o.context2d.fontFaces=l,l)for(var g=0;g<l.length;++g){var h=l[g],p=h.src.find(function(v){return v.format==="truetype"});p&&o.addFont(p.url,h.ref.name,h.ref.style)}return d.windowHeight=d.windowHeight||0,d.windowHeight=d.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):d.windowHeight,o.context2d.save(!0),s(this.prop.container,d)}).then(function(s){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var i=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=i})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(i,s,o){return(o=o||"pdf").toLowerCase()==="img"||o.toLowerCase()==="image"?this.outputImg(i,s):this.outputPdf(i,s)},a.prototype.outputPdf=function(i,s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(i,s)})},a.prototype.outputImg=function(i){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(i){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+i+'" is not supported.'}})},a.prototype.save=function(i){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(i?{filename:i}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(i){if(A(i)!=="object")return this;var s=Object.keys(i||{}).map(function(o){if(o in a.template.prop)return function(){this.prop[o]=i[o]};switch(o){case"margin":return this.setMargin.bind(this,i.margin);case"jsPDF":return function(){return this.opt.jsPDF=i.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,i.pageSize);default:return function(){this.opt[o]=i[o]}}},this);return this.then(function(){return this.thenList(s)})},a.prototype.get=function(i,s){return this.then(function(){var o=i in a.template.prop?this.prop[i]:this.opt[i];return s?s(o):o})},a.prototype.setMargin=function(i){return this.then(function(){switch(A(i)){case"number":i=[i,i,i,i];case"array":if(i.length===2&&(i=[i[0],i[1],i[0],i[1]]),i.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=i}).then(this.setPageSize)},a.prototype.setPageSize=function(i){function s(o,l){return Math.floor(o*l/72*96)}return this.then(function(){(i=i||yt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(i.inner={width:i.width-this.opt.margin[1]-this.opt.margin[3],height:i.height-this.opt.margin[0]-this.opt.margin[2]},i.inner.px={width:s(i.inner.width,i.k),height:s(i.inner.height,i.k)},i.inner.ratio=i.inner.height/i.inner.width),this.prop.pageSize=i})},a.prototype.setProgress=function(i,s,o,l){return i!=null&&(this.progress.val=i),s!=null&&(this.progress.state=s),o!=null&&(this.progress.n=o),l!=null&&(this.progress.stack=l),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(i,s,o,l){return this.setProgress(i?this.progress.val+i:null,s||null,o?this.progress.n+o:null,l?this.progress.stack.concat(l):null)},a.prototype.then=function(i,s){var o=this;return this.thenCore(i,s,function(l,c){return o.updateProgress(null,null,1,[l]),Promise.prototype.then.call(this,function(d){return o.updateProgress(null,l),d}).then(l,c).then(function(d){return o.updateProgress(1),d})})},a.prototype.thenCore=function(i,s,o){o=o||Promise.prototype.then,i&&(i=i.bind(this)),s&&(s=s.bind(this));var l=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:a.convert(Object.assign({},this),Promise.prototype),c=o.call(l,i,s);return a.convert(c,this.__proto__)},a.prototype.thenExternal=function(i,s){return Promise.prototype.then.call(this,i,s)},a.prototype.thenList=function(i){var s=this;return i.forEach(function(o){s=s.thenCore(o)}),s},a.prototype.catch=function(i){i&&(i=i.bind(this));var s=Promise.prototype.catch.call(this,i);return a.convert(s,this)},a.prototype.catchExternal=function(i){return Promise.prototype.catch.call(this,i)},a.prototype.error=function(i){return this.then(function(){throw new Error(i)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,yt.getPageSize=function(i,s,o){if(Wt(i)==="object"){var l=i;i=l.orientation,s=l.unit||s,o=l.format||o}s=s||"mm",o=o||"a4",i=(""+(i||"P")).toLowerCase();var c,d=(""+o).toLowerCase(),g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(s){case"pt":c=1;break;case"mm":c=72/25.4;break;case"cm":c=72/2.54;break;case"in":c=72;break;case"px":c=.75;break;case"pc":case"em":c=12;break;case"ex":c=6;break;default:throw"Invalid unit: "+s}var h,p=0,v=0;if(g.hasOwnProperty(d))p=g[d][1]/c,v=g[d][0]/c;else try{p=o[1],v=o[0]}catch{throw new Error("Invalid format: "+o)}if(i==="p"||i==="portrait")i="p",v>p&&(h=v,v=p,p=h);else{if(i!=="l"&&i!=="landscape")throw"Invalid orientation: "+i;i="l",p>v&&(h=v,v=p,p=h)}return{width:v,height:p,unit:s,k:c,orientation:i}},t.html=function(i,s){(s=s||{}).callback=s.callback||function(){},s.html2canvas=s.html2canvas||{},s.html2canvas.canvas=s.html2canvas.canvas||this.canvas,s.jsPDF=s.jsPDF||this,s.fontFaces=s.fontFaces?s.fontFaces.map(Vd):null;var o=new a(s);return s.worker?o:o.from(i).doCallback()}}(yt.API),yt.API.addJS=function(t){return vw=t,this.internal.events.subscribe("postPutResources",function(){ou=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(ou+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),mw=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+vw+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){ou!==void 0&&mw!==void 0&&this.internal.out("/Names <</JavaScript "+ou+" 0 R>>")}),this},function(t){var e;t.events.push(["postPutResources",function(){var r=this,A=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=r.outline.render().split(/\r\n/),a=0;a<n.length;a++){var i=n[a],s=A.exec(i);if(s!=null){var o=s[1];r.internal.newObjectDeferredBegin(o,!1)}r.internal.write(i)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,c=[];for(a=0;a<l;a++){var d=r.internal.newObject();c.push(d);var g=r.internal.getPageInfo(a+1);r.internal.write("<< /D["+g.objId+" 0 R /XYZ null null null]>> endobj")}var h=r.internal.newObject();for(r.internal.write("<< /Names [ "),a=0;a<c.length;a++)r.internal.write("(page_"+(a+1)+")"+c[a]+" 0 R");r.internal.write(" ] >>","endobj"),e=r.internal.newObject(),r.internal.write("<< /Dests "+h+" 0 R"),r.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(A,n,a){var i={title:n,options:a,children:[]};return A==null&&(A=this.root),A.children.push(i),i},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(A){A.id=r.internal.newObjectDeferred();for(var n=0;n<A.children.length;n++)this.genIds_r(A.children[n])},r.outline.renderRoot=function(A){this.objStart(A),this.line("/Type /Outlines"),A.children.length>0&&(this.line("/First "+this.makeRef(A.children[0])),this.line("/Last "+this.makeRef(A.children[A.children.length-1]))),this.line("/Count "+this.count_r({count:0},A)),this.objEnd()},r.outline.renderItems=function(A){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<A.children.length;a++){var i=A.children[a];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(A)),a>0&&this.line("/Prev "+this.makeRef(A.children[a-1])),a<A.children.length-1&&this.line("/Next "+this.makeRef(A.children[a+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var s=this.count=this.count_r({count:0},i);if(s>0&&this.line("/Count "+s),i.options&&i.options.pageNumber){var o=r.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var l=0;l<A.children.length;l++)this.renderItems(A.children[l])},r.outline.line=function(A){this.ctx.val+=A+`\r
|
|
139
|
+
`),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};ut.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=ut.internal.getWidth(t),r=ut.internal.getHeight(t),A=Math.min(e,r);return{x1:{x:(e-A)/2,y:(r-A)/2+A},x2:{x:(e-A)/2+A,y:(r-A)/2},x3:{x:(e-A)/2,y:(r-A)/2},x4:{x:(e-A)/2+A,y:(r-A)/2+A}}}},ut.internal.getWidth=function(t){var e=0;return Wt(t)==="object"&&(e=aw(t.Rect[2])),e},ut.internal.getHeight=function(t){var e=0;return Wt(t)==="object"&&(e=aw(t.Rect[3])),e};var xU=Fr.addField=function(t){if(yU(this,t),!(t instanceof Rn))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};Fr.AcroFormChoiceField=ro,Fr.AcroFormListBox=Ao,Fr.AcroFormComboBox=no,Fr.AcroFormEditBox=Au,Fr.AcroFormButton=aA,Fr.AcroFormPushButton=nu,Fr.AcroFormRadioButton=ao,Fr.AcroFormCheckBox=iu,Fr.AcroFormTextField=is,Fr.AcroFormPasswordField=su,Fr.AcroFormAppearance=ut,Fr.AcroForm={ChoiceField:ro,ListBox:Ao,ComboBox:no,EditBox:Au,Button:aA,PushButton:nu,RadioButton:ao,CheckBox:iu,TextField:is,PasswordField:su,Appearance:ut},yt.AcroForm={ChoiceField:ro,ListBox:Ao,ComboBox:no,EditBox:Au,Button:aA,PushButton:nu,RadioButton:ao,CheckBox:iu,TextField:is,PasswordField:su,Appearance:ut};function lw(t){return t.reduce(function(e,r,A){return e[r]=A,e},{})}(function(t){t.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},A=t.__addimage__.getImageFileTypeByImageData=function(U,T){var H,Y,le,pe,me,ve=e;if((T=T||e)==="RGBA"||U.data!==void 0&&U.data instanceof Uint8ClampedArray&&"height"in U&&"width"in U)return"RGBA";if(X(U))for(me in r)for(le=r[me],H=0;H<le.length;H+=1){for(pe=!0,Y=0;Y<le[H].length;Y+=1)if(le[H][Y]!==void 0&&le[H][Y]!==U[Y]){pe=!1;break}if(pe===!0){ve=me;break}}else for(me in r)for(le=r[me],H=0;H<le.length;H+=1){for(pe=!0,Y=0;Y<le[H].length;Y+=1)if(le[H][Y]!==void 0&&le[H][Y]!==U.charCodeAt(Y)){pe=!1;break}if(pe===!0){ve=me;break}}return ve===e&&T!==e&&(ve=T),ve},n=function U(T){for(var H=this.internal.write,Y=this.internal.putStream,le=(0,this.internal.getFilters)();le.indexOf("FlateEncode")!==-1;)le.splice(le.indexOf("FlateEncode"),1);T.objectId=this.internal.newObject();var pe=[];if(pe.push({key:"Type",value:"/XObject"}),pe.push({key:"Subtype",value:"/Image"}),pe.push({key:"Width",value:T.width}),pe.push({key:"Height",value:T.height}),T.colorSpace===y.INDEXED?pe.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(T.palette.length/3-1)+" "+("sMask"in T&&T.sMask!==void 0?T.objectId+2:T.objectId+1)+" 0 R]"}):(pe.push({key:"ColorSpace",value:"/"+T.colorSpace}),T.colorSpace===y.DEVICE_CMYK&&pe.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),pe.push({key:"BitsPerComponent",value:T.bitsPerComponent}),"decodeParameters"in T&&T.decodeParameters!==void 0&&pe.push({key:"DecodeParms",value:"<<"+T.decodeParameters+">>"}),"transparency"in T&&Array.isArray(T.transparency)){for(var me="",ve=0,se=T.transparency.length;ve<se;ve++)me+=T.transparency[ve]+" "+T.transparency[ve]+" ";pe.push({key:"Mask",value:"["+me+"]"})}T.sMask!==void 0&&pe.push({key:"SMask",value:T.objectId+1+" 0 R"});var J=T.filter!==void 0?["/"+T.filter]:void 0;if(Y({data:T.data,additionalKeyValues:pe,alreadyAppliedFilters:J,objectId:T.objectId}),H("endobj"),"sMask"in T&&T.sMask!==void 0){var oe="/Predictor "+T.predictor+" /Colors 1 /BitsPerComponent "+T.bitsPerComponent+" /Columns "+T.width,B={width:T.width,height:T.height,colorSpace:"DeviceGray",bitsPerComponent:T.bitsPerComponent,decodeParameters:oe,data:T.sMask};"filter"in T&&(B.filter=T.filter),U.call(this,B)}if(T.colorSpace===y.INDEXED){var _=this.internal.newObject();Y({data:Q(new Uint8Array(T.palette)),objectId:_}),H("endobj")}},a=function(){var U=this.internal.collections.addImage_images;for(var T in U)n.call(this,U[T])},i=function(){var U,T=this.internal.collections.addImage_images,H=this.internal.write;for(var Y in T)H("/I"+(U=T[Y]).index,U.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",i))},o=function(){var U=this.internal.collections.addImage_images;return s.call(this),U},l=function(){return Object.keys(this.internal.collections.addImage_images).length},c=function(U){return typeof t["process"+U.toUpperCase()]=="function"},d=function(U){return Wt(U)==="object"&&U.nodeType===1},g=function(U,T){if(U.nodeName==="IMG"&&U.hasAttribute("src")){var H=""+U.getAttribute("src");if(H.indexOf("data:image/")===0)return Ll(unescape(H).split("base64,").pop());var Y=t.loadFile(H,!0);if(Y!==void 0)return Y}if(U.nodeName==="CANVAS"){if(U.width===0||U.height===0)throw new Error("Given canvas must have data. Canvas width: "+U.width+", height: "+U.height);var le;switch(T){case"PNG":le="image/png";break;case"WEBP":le="image/webp";break;case"JPEG":case"JPG":default:le="image/jpeg"}return Ll(U.toDataURL(le,1).split("base64,").pop())}},h=function(U){var T=this.internal.collections.addImage_images;if(T){for(var H in T)if(U===T[H].alias)return T[H]}},p=function(U,T,H){return U||T||(U=-96,T=-96),U<0&&(U=-1*H.width*72/U/this.internal.scaleFactor),T<0&&(T=-1*H.height*72/T/this.internal.scaleFactor),U===0&&(U=T*H.width/H.height),T===0&&(T=U*H.height/H.width),[U,T]},v=function(U,T,H,Y,le,pe){var me=p.call(this,H,Y,le),ve=this.internal.getCoordinateString,se=this.internal.getVerticalCoordinateString,J=o.call(this);if(H=me[0],Y=me[1],J[le.index]=le,pe){pe*=Math.PI/180;var oe=Math.cos(pe),B=Math.sin(pe),_=function(N){return N.toFixed(4)},S=[_(oe),_(B),_(-1*B),_(oe),0,0,"cm"]}this.internal.write("q"),pe?(this.internal.write([1,"0","0",1,ve(U),se(T+Y),"cm"].join(" ")),this.internal.write(S.join(" ")),this.internal.write([ve(H),"0","0",ve(Y),"0","0","cm"].join(" "))):this.internal.write([ve(H),"0","0",ve(Y),ve(U),se(T+Y),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+le.index+" Do"),this.internal.write("Q")},y=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var C=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},b=t.__addimage__.sHashCode=function(U){var T,H,Y=0;if(typeof U=="string")for(H=U.length,T=0;T<H;T++)Y=(Y<<5)-Y+U.charCodeAt(T),Y|=0;else if(X(U))for(H=U.byteLength/2,T=0;T<H;T++)Y=(Y<<5)-Y+U[T],Y|=0;return Y},F=t.__addimage__.validateStringAsBase64=function(U){(U=U||"").toString().trim();var T=!0;return U.length===0&&(T=!1),U.length%4!=0&&(T=!1),/^[A-Za-z0-9+/]+$/.test(U.substr(0,U.length-2))===!1&&(T=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(U.substr(-2))===!1&&(T=!1),T},O=t.__addimage__.extractImageFromDataUrl=function(U){var T=(U=U||"").split("base64,"),H=null;if(T.length===2){var Y=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(T[0]);Array.isArray(Y)&&(H={mimeType:Y[1],charset:Y[2],data:T[1]})}return H},W=t.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};t.__addimage__.isArrayBuffer=function(U){return W()&&U instanceof ArrayBuffer};var X=t.__addimage__.isArrayBufferView=function(U){return W()&&typeof Uint32Array<"u"&&(U instanceof Int8Array||U instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&U instanceof Uint8ClampedArray||U instanceof Int16Array||U instanceof Uint16Array||U instanceof Int32Array||U instanceof Uint32Array||U instanceof Float32Array||U instanceof Float64Array)},k=t.__addimage__.binaryStringToUint8Array=function(U){for(var T=U.length,H=new Uint8Array(T),Y=0;Y<T;Y++)H[Y]=U.charCodeAt(Y);return H},Q=t.__addimage__.arrayBufferToBinaryString=function(U){for(var T="",H=X(U)?U:new Uint8Array(U),Y=0;Y<H.length;Y+=8192)T+=String.fromCharCode.apply(null,H.subarray(Y,Y+8192));return T};t.addImage=function(){var U,T,H,Y,le,pe,me,ve,se;if(typeof arguments[1]=="number"?(T=e,H=arguments[1],Y=arguments[2],le=arguments[3],pe=arguments[4],me=arguments[5],ve=arguments[6],se=arguments[7]):(T=arguments[1],H=arguments[2],Y=arguments[3],le=arguments[4],pe=arguments[5],me=arguments[6],ve=arguments[7],se=arguments[8]),Wt(U=arguments[0])==="object"&&!d(U)&&"imageData"in U){var J=U;U=J.imageData,T=J.format||T||e,H=J.x||H||0,Y=J.y||Y||0,le=J.w||J.width||le,pe=J.h||J.height||pe,me=J.alias||me,ve=J.compression||ve,se=J.rotation||J.angle||se}var oe=this.internal.getFilters();if(ve===void 0&&oe.indexOf("FlateEncode")!==-1&&(ve="SLOW"),isNaN(H)||isNaN(Y))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var B=K.call(this,U,T,me,ve);return v.call(this,H,Y,le,pe,B,se),this};var K=function(U,T,H,Y){var le,pe,me;if(typeof U=="string"&&A(U)===e){U=unescape(U);var ve=re(U,!1);(ve!==""||(ve=t.loadFile(U,!0))!==void 0)&&(U=ve)}if(d(U)&&(U=g(U,T)),T=A(U,T),!c(T))throw new Error("addImage does not support files of type '"+T+"', please ensure that a plugin for '"+T+"' support is added.");if(((me=H)==null||me.length===0)&&(H=function(se){return typeof se=="string"||X(se)?b(se):X(se.data)?b(se.data):null}(U)),(le=h.call(this,H))||(W()&&(U instanceof Uint8Array||T==="RGBA"||(pe=U,U=k(U))),le=this["process"+T.toUpperCase()](U,l.call(this),H,function(se){return se&&typeof se=="string"&&(se=se.toUpperCase()),se in t.image_compression?se:C.NONE}(Y),pe)),!le)throw new Error("An unknown error occurred whilst processing the image.");return le},re=t.__addimage__.convertBase64ToBinaryString=function(U,T){var H;T=typeof T!="boolean"||T;var Y,le="";if(typeof U=="string"){Y=(H=O(U))!==null?H.data:U;try{le=Ll(Y)}catch(pe){if(T)throw F(Y)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+pe.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return le};t.getImageProperties=function(U){var T,H,Y="";if(d(U)&&(U=g(U)),typeof U=="string"&&A(U)===e&&((Y=re(U,!1))===""&&(Y=t.loadFile(U)||""),U=Y),H=A(U),!c(H))throw new Error("addImage does not support files of type '"+H+"', please ensure that a plugin for '"+H+"' support is added.");if(!W()||U instanceof Uint8Array||(U=k(U)),!(T=this["process"+H.toUpperCase()](U)))throw new Error("An unknown error occurred whilst processing the image");return T.fileType=H,T}})(yt.API),function(t){var e=function(r){if(r!==void 0&&r!="")return!0};yt.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(r){for(var A,n,a,i=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(r.objId),l=r.pageContext.annotations,c=!1,d=0;d<l.length&&!c;d++)switch((A=l[d]).type){case"link":(e(A.options.url)||e(A.options.pageNumber))&&(c=!0);break;case"reference":case"text":case"freetext":c=!0}if(c!=0){this.internal.write("/Annots [");for(var g=0;g<l.length;g++){A=l[g];var h=this.internal.pdfEscape,p=this.internal.getEncryptor(r.objId);switch(A.type){case"reference":this.internal.write(" "+A.object.objId+" 0 R ");break;case"text":var v=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),C=this.internal.getEncryptor(v.objId),b=A.title||"Note";a="<</Type /Annot /Subtype /Text "+(n="/Rect ["+i(A.bounds.x)+" "+s(A.bounds.y+A.bounds.h)+" "+i(A.bounds.x+A.bounds.w)+" "+s(A.bounds.y)+"] ")+"/Contents ("+h(C(A.contents))+")",a+=" /Popup "+y.objId+" 0 R",a+=" /P "+o.objId+" 0 R",a+=" /T ("+h(C(b))+") >>",v.content=a;var F=v.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+i(A.bounds.x+30)+" "+s(A.bounds.y+A.bounds.h)+" "+i(A.bounds.x+A.bounds.w+30)+" "+s(A.bounds.y)+"] ")+" /Parent "+F,A.open&&(a+=" /Open true"),a+=" >>",y.content=a,this.internal.write(v.objId,"0 R",y.objId,"0 R");break;case"freetext":n="/Rect ["+i(A.bounds.x)+" "+s(A.bounds.y)+" "+i(A.bounds.x+A.bounds.w)+" "+s(A.bounds.y+A.bounds.h)+"] ";var O=A.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+h(p(A.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+O+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(A.options.name){var W=this.annotations._nameMap[A.options.name];A.options.pageNumber=W.page,A.options.top=W.y}else A.options.top||(A.options.top=0);if(n="/Rect ["+A.finalBounds.x+" "+A.finalBounds.y+" "+A.finalBounds.w+" "+A.finalBounds.h+"] ",a="",A.options.url)a="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+h(p(A.options.url))+") >>";else if(A.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(A.options.pageNumber).objId+" 0 R",A.options.magFactor=A.options.magFactor||"XYZ",A.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+A.options.top+"]";break;case"FitV":A.options.left=A.options.left||0,a+=" /FitV "+A.options.left+"]";break;case"XYZ":default:var X=s(A.options.top);A.options.left=A.options.left||0,A.options.zoom===void 0&&(A.options.zoom=0),a+=" /XYZ "+A.options.left+" "+X+" "+A.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),t.createAnnotation=function(r){var A=this.internal.getCurrentPageInfo();switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":A.pageContext.annotations.push(r)}},t.link=function(r,A,n,a,i){var s=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:o(r),y:l(A),w:o(r+n),h:l(A+a)},options:i,type:"link"})},t.textWithLink=function(r,A,n,a){var i,s,o=this.getTextWidth(r),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){s=a.maxWidth;var c=this.splitTextToSize(r,s).length;i=Math.ceil(l*c)}else s=o,i=l;return this.text(r,A,n,a),n+=.2*l,a.align==="center"&&(A-=o/2),a.align==="right"&&(A-=o),this.link(A,n-l,s,i,a),o},t.getTextWidth=function(r){var A=this.internal.getFontSize();return this.getStringUnitWidth(r)*A/this.internal.scaleFactor}}(yt.API),function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},A={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];t.__arabicParser__={};var a=t.__arabicParser__.isInArabicSubstitutionA=function(v){return e[v.charCodeAt(0)]!==void 0},i=t.__arabicParser__.isArabicLetter=function(v){return typeof v=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(v)},s=t.__arabicParser__.isArabicEndLetter=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length<=2},o=t.__arabicParser__.isArabicAlfLetter=function(v){return i(v)&&n.indexOf(v.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length>=1};var l=t.__arabicParser__.arabicLetterHasFinalForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length>=3};var c=t.__arabicParser__.arabicLetterHasMedialForm=function(v){return i(v)&&a(v)&&e[v.charCodeAt(0)].length==4},d=t.__arabicParser__.resolveLigatures=function(v){var y=0,C=r,b="",F=0;for(y=0;y<v.length;y+=1)C[v.charCodeAt(y)]!==void 0?(F++,typeof(C=C[v.charCodeAt(y)])=="number"&&(b+=String.fromCharCode(C),C=r,F=0),y===v.length-1&&(C=r,b+=v.charAt(y-(F-1)),y-=F-1,F=0)):(C=r,b+=v.charAt(y-F),y-=F,F=0);return b};t.__arabicParser__.isArabicDiacritic=function(v){return v!==void 0&&A[v.charCodeAt(0)]!==void 0};var g=t.__arabicParser__.getCorrectForm=function(v,y,C){return i(v)?a(v)===!1?-1:!l(v)||!i(y)&&!i(C)||!i(C)&&s(y)||s(v)&&!i(y)||s(v)&&o(y)||s(v)&&s(y)?0:c(v)&&i(y)&&!s(y)&&i(C)&&l(C)?3:s(v)||!i(C)?1:2:-1},h=function(v){var y=0,C=0,b=0,F="",O="",W="",X=(v=v||"").split("\\s+"),k=[];for(y=0;y<X.length;y+=1){for(k.push(""),C=0;C<X[y].length;C+=1)F=X[y][C],O=X[y][C-1],W=X[y][C+1],i(F)?(b=g(F,O,W),k[y]+=b!==-1?String.fromCharCode(e[F.charCodeAt(0)][b]):F):k[y]+=F;k[y]=d(k[y])}return k.join(" ")},p=t.__arabicParser__.processArabic=t.processArabic=function(){var v,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,C=[];if(Array.isArray(y)){var b=0;for(C=[],b=0;b<y.length;b+=1)Array.isArray(y[b])?C.push([h(y[b][0]),y[b][1],y[b][2]]):C.push([h(y[b])]);v=C}else v=h(y);return typeof arguments[0]=="string"?v:(arguments[0].text=v,arguments[0])};t.events.push(["preProcessText",p])}(yt.API),yt.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},function(t){var e=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(s){r=s}});var A=150;Object.defineProperty(this,"width",{get:function(){return A},set:function(s){A=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=A+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(s){n=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(s){a=s}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(s){i=s}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(r,A){var n;if((r=r||"2d")!=="2d")return null;for(n in A)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=A[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(yt.API),function(t){var e={left:0,top:0,bottom:0,right:0},r=!1,A=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),n.call(this))},n=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var o=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return o},set:function(v){o=v}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(v){l=v}});var c=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return c},set:function(v){c=v}});var d=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return d},set:function(v){d=v}});var g=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return g},set:function(v){g=v}});var h=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return h},set:function(v){h=v}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(v){p=v}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(o){return A.call(this),this.internal.__cell__.headerFunction=typeof o=="function"?o:void 0,this},t.getTextDimensions=function(o,l){A.call(this);var c=(l=l||{}).fontSize||this.getFontSize(),d=l.font||this.getFont(),g=l.scaleFactor||this.internal.scaleFactor,h=0,p=0,v=0,y=this;if(!Array.isArray(o)&&typeof o!="string"){if(typeof o!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");o=String(o)}var C=l.maxWidth;C>0?typeof o=="string"?o=this.splitTextToSize(o,C):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(F,O){return F.concat(y.splitTextToSize(O,C))},[])):o=Array.isArray(o)?o:[o];for(var b=0;b<o.length;b++)h<(v=this.getStringUnitWidth(o[b],{font:d})*c)&&(h=v);return h!==0&&(p=o.length),{w:h/=g,h:Math.max((p*c*this.getLineHeightFactor()-c*(this.getLineHeightFactor()-1))/g,0)}},t.cellAddPage=function(){A.call(this),this.addPage();var o=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(o.left,o.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var i=t.cell=function(){var o;o=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),A.call(this);var l=this.internal.__cell__.lastCell,c=this.internal.__cell__.padding,d=this.internal.__cell__.margins||e,g=this.internal.__cell__.tableHeaderRow,h=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===o.lineNumber?(o.x=(l.x||0)+(l.width||0),o.y=l.y||0):l.y+l.height+o.height+d.bottom>this.getPageHeight()?(this.cellAddPage(),o.y=d.top,h&&g&&(this.printHeaderRow(o.lineNumber,!0),o.y+=g[0].height)):o.y=l.y+l.height||o.y),o.text[0]!==void 0&&(this.rect(o.x,o.y,o.width,o.height,r===!0?"FD":void 0),o.align==="right"?this.text(o.text,o.x+o.width-c,o.y+c,{align:"right",baseline:"top"}):o.align==="center"?this.text(o.text,o.x+o.width/2,o.y+c,{align:"center",baseline:"top",maxWidth:o.width-c-c}):this.text(o.text,o.x+c,o.y+c,{align:"left",baseline:"top",maxWidth:o.width-c-c})),this.internal.__cell__.lastCell=o,this};t.table=function(o,l,c,d,g){if(A.call(this),!c)throw new Error("No data for PDF table.");var h,p,v,y,C=[],b=[],F=[],O={},W={},X=[],k=[],Q=(g=g||{}).autoSize||!1,K=g.printHeaders!==!1,re=g.css&&g.css["font-size"]!==void 0?16*g.css["font-size"]:g.fontSize||12,U=g.margins||Object.assign({width:this.getPageWidth()},e),T=typeof g.padding=="number"?g.padding:3,H=g.headerBackgroundColor||"#c8c8c8",Y=g.headerTextColor||"#000";if(n.call(this),this.internal.__cell__.printHeaders=K,this.internal.__cell__.margins=U,this.internal.__cell__.table_font_size=re,this.internal.__cell__.padding=T,this.internal.__cell__.headerBackgroundColor=H,this.internal.__cell__.headerTextColor=Y,this.setFontSize(re),d==null)b=C=Object.keys(c[0]),F=C.map(function(){return"left"});else if(Array.isArray(d)&&Wt(d[0])==="object")for(C=d.map(function(J){return J.name}),b=d.map(function(J){return J.prompt||J.name||""}),F=d.map(function(J){return J.align||"left"}),h=0;h<d.length;h+=1)W[d[h].name]=d[h].width*(19.049976/25.4);else Array.isArray(d)&&typeof d[0]=="string"&&(b=C=d,F=C.map(function(){return"left"}));if(Q||Array.isArray(d)&&typeof d[0]=="string")for(h=0;h<C.length;h+=1){for(O[y=C[h]]=c.map(function(J){return J[y]}),this.setFont(void 0,"bold"),X.push(this.getTextDimensions(b[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=O[y],this.setFont(void 0,"normal"),v=0;v<p.length;v+=1)X.push(this.getTextDimensions(p[v],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);W[y]=Math.max.apply(null,X)+T+T,X=[]}if(K){var le={};for(h=0;h<C.length;h+=1)le[C[h]]={},le[C[h]].text=b[h],le[C[h]].align=F[h];var pe=s.call(this,le,W);k=C.map(function(J){return new a(o,l,W[J],pe,le[J].text,void 0,le[J].align)}),this.setTableHeaderRow(k),this.printHeaderRow(1,!1)}var me=d.reduce(function(J,oe){return J[oe.name]=oe.align,J},{});for(h=0;h<c.length;h+=1){"rowStart"in g&&g.rowStart instanceof Function&&g.rowStart({row:h,data:c[h]},this);var ve=s.call(this,c[h],W);for(v=0;v<C.length;v+=1){var se=c[h][C[v]];"cellStart"in g&&g.cellStart instanceof Function&&g.cellStart({row:h,col:v,data:se},this),i.call(this,new a(o,l,W[C[v]],ve,se,h+2,me[C[v]]))}}return this.internal.__cell__.table_x=o,this.internal.__cell__.table_y=l,this};var s=function(o,l){var c=this.internal.__cell__.padding,d=this.internal.__cell__.table_font_size,g=this.internal.scaleFactor;return Object.keys(o).map(function(h){var p=o[h];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,l[h]-c-c)},this).map(function(h){return this.getLineHeightFactor()*h.length*d/g+c+c},this).reduce(function(h,p){return Math.max(h,p)},0)};t.setTableHeaderRow=function(o){A.call(this),this.internal.__cell__.tableHeaderRow=o},t.printHeaderRow=function(o,l){if(A.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var c;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var d=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(d[0],d[1],d[2],d[3],void 0,-1)}this.setFont(void 0,"bold");for(var g=[],h=0;h<this.internal.__cell__.tableHeaderRow.length;h+=1){c=this.internal.__cell__.tableHeaderRow[h].clone(),l&&(c.y=this.internal.__cell__.margins.top||0,g.push(c)),c.lineNumber=o;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),i.call(this,c),this.setTextColor(p)}g.length>0&&this.setTableHeaderRow(g),this.setFont(void 0,"normal"),r=!1}}(yt.API);var cw={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},fw=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Hd=lw(fw),uw=[100,200,300,400,500,600,700,800,900],CU=lw(uw);function Vd(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(a){return cw[a=a||"normal"]?a:"normal"}(t.style),A=function(a){if(!a)return 400;if(typeof a=="number")return a>=100&&a<=900&&a%100==0?a:400;if(/^\d00$/.test(a))return parseInt(a);switch(a){case"bold":return 700;case"normal":default:return 400}}(t.weight),n=function(a){return typeof Hd[a=a||"normal"]=="number"?a:"normal"}(t.stretch);return{family:e,style:r,weight:A,stretch:n,src:t.src||[],ref:t.ref||{name:e,style:[n,r,A].join(" ")}}}function hw(t,e,r,A){var n;for(n=r;n>=0&&n<e.length;n+=A)if(t[e[n]])return t[e[n]];for(n=r;n>=0&&n<e.length;n-=A)if(t[e[n]])return t[e[n]]}var bU={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},dw={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function gw(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function EU(t,e,r){for(var A=(r=r||{}).defaultFontFamily||"times",n=Object.assign({},bU,r.genericFontFamilies||{}),a=null,i=null,s=0;s<e.length;++s)if(n[(a=Vd(e[s])).family]&&(a.family=n[a.family]),t.hasOwnProperty(a.family)){i=t[a.family];break}if(!(i=i||t[A]))throw new Error("Could not find a font-family for the rule '"+gw(a)+"' and default family '"+A+"'.");if(i=function(o,l){if(l[o])return l[o];var c=Hd[o],d=c<=Hd.normal?-1:1,g=hw(l,fw,c,d);if(!g)throw new Error("Could not find a matching font-stretch value for "+o);return g}(a.stretch,i),i=function(o,l){if(l[o])return l[o];for(var c=cw[o],d=0;d<c.length;++d)if(l[c[d]])return l[c[d]];throw new Error("Could not find a matching font-style for "+o)}(a.style,i),!(i=function(o,l){if(l[o])return l[o];if(o===400&&l[500])return l[500];if(o===500&&l[400])return l[400];var c=CU[o],d=hw(l,uw,c,o<400?-1:1);if(!d)throw new Error("Could not find a matching font-weight for value "+o);return d}(a.weight,i)))throw new Error("Failed to resolve a font for the rule '"+gw(a)+"'.");return i}function pw(t){return t.trimLeft()}function FU(t,e){for(var r=0;r<t.length;){if(t.charAt(r)===e)return[t.substring(0,r),t.substring(r+1)];r+=1}return null}function SU(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],t.substring(e[0].length)]}var ou,mw,vw,Kd=["times"];(function(t){var e,r,A,n,a,i,s,o,l,c=function(B){return B=B||{},this.isStrokeTransparent=B.isStrokeTransparent||!1,this.strokeOpacity=B.strokeOpacity||1,this.strokeStyle=B.strokeStyle||"#000000",this.fillStyle=B.fillStyle||"#000000",this.isFillTransparent=B.isFillTransparent||!1,this.fillOpacity=B.fillOpacity||1,this.font=B.font||"10px sans-serif",this.textBaseline=B.textBaseline||"alphabetic",this.textAlign=B.textAlign||"left",this.lineWidth=B.lineWidth||1,this.lineJoin=B.lineJoin||"miter",this.lineCap=B.lineCap||"butt",this.path=B.path||[],this.transform=B.transform!==void 0?B.transform.clone():new o,this.globalCompositeOperation=B.globalCompositeOperation||"normal",this.globalAlpha=B.globalAlpha||1,this.clip_path=B.clip_path||[],this.currentPoint=B.currentPoint||new i,this.miterLimit=B.miterLimit||10,this.lastPoint=B.lastPoint||new i,this.lineDashOffset=B.lineDashOffset||0,this.lineDash=B.lineDash||[],this.margin=B.margin||[0,0,0,0],this.prevPageLastElemOffset=B.prevPageLastElemOffset||0,this.ignoreClearRect=typeof B.ignoreClearRect!="boolean"||B.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new d(this),e=this.internal.f2,r=this.internal.getCoordinateString,A=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,i=this.internal.Point,s=this.internal.Rectangle,o=this.internal.Matrix,l=new c}]);var d=function(B){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var _=B;Object.defineProperty(this,"pdf",{get:function(){return _}});var S=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return S},set:function(Te){S=!!Te}});var N=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return N},set:function(Te){N=!!Te}});var G=0;Object.defineProperty(this,"posX",{get:function(){return G},set:function(Te){isNaN(Te)||(G=Te)}});var ie=0;Object.defineProperty(this,"posY",{get:function(){return ie},set:function(Te){isNaN(Te)||(ie=Te)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(Te){var ne;typeof Te=="number"?ne=[Te,Te,Te,Te]:((ne=new Array(4))[0]=Te[0],ne[1]=Te.length>=2?Te[1]:ne[0],ne[2]=Te.length>=3?Te[2]:ne[0],ne[3]=Te.length>=4?Te[3]:ne[1]),l.margin=ne}});var ce=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ce},set:function(Te){ce=Te}});var fe=0;Object.defineProperty(this,"lastBreak",{get:function(){return fe},set:function(Te){fe=Te}});var xe=[];Object.defineProperty(this,"pageBreaks",{get:function(){return xe},set:function(Te){xe=Te}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(Te){Te instanceof c&&(l=Te)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(Te){l.path=Te}});var Ie=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ie},set:function(Te){Ie=Te}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Te){var ne;ne=g(Te),this.ctx.fillStyle=ne.style,this.ctx.isFillTransparent=ne.a===0,this.ctx.fillOpacity=ne.a,this.pdf.setFillColor(ne.r,ne.g,ne.b,{a:ne.a}),this.pdf.setTextColor(ne.r,ne.g,ne.b,{a:ne.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Te){var ne=g(Te);this.ctx.strokeStyle=ne.style,this.ctx.isStrokeTransparent=ne.a===0,this.ctx.strokeOpacity=ne.a,ne.a===0?this.pdf.setDrawColor(255,255,255):(ne.a,this.pdf.setDrawColor(ne.r,ne.g,ne.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Te){["butt","round","square"].indexOf(Te)!==-1&&(this.ctx.lineCap=Te,this.pdf.setLineCap(Te))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Te){isNaN(Te)||(this.ctx.lineWidth=Te,this.pdf.setLineWidth(Te))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Te){["bevel","round","miter"].indexOf(Te)!==-1&&(this.ctx.lineJoin=Te,this.pdf.setLineJoin(Te))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Te){isNaN(Te)||(this.ctx.miterLimit=Te,this.pdf.setMiterLimit(Te))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Te){this.ctx.textBaseline=Te}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Te){["right","end","center","left","start"].indexOf(Te)!==-1&&(this.ctx.textAlign=Te)}});var Me=null;function Xe(Te,ne){if(Me===null){var Qe=function(rt){var Re=[];return Object.keys(rt).forEach(function(ze){rt[ze].forEach(function(Ye){var Je=null;switch(Ye){case"bold":Je={family:ze,weight:"bold"};break;case"italic":Je={family:ze,style:"italic"};break;case"bolditalic":Je={family:ze,weight:"bold",style:"italic"};break;case"":case"normal":Je={family:ze}}Je!==null&&(Je.ref={name:ze,style:Ye},Re.push(Je))})}),Re}(Te.getFontList());Me=function(rt){for(var Re={},ze=0;ze<rt.length;++ze){var Ye=Vd(rt[ze]),Je=Ye.family,st=Ye.stretch,nt=Ye.style,ht=Ye.weight;Re[Je]=Re[Je]||{},Re[Je][st]=Re[Je][st]||{},Re[Je][st][nt]=Re[Je][st][nt]||{},Re[Je][st][nt][ht]=Ye}return Re}(Qe.concat(ne))}return Me}var $e=null;Object.defineProperty(this,"fontFaces",{get:function(){return $e},set:function(Te){Me=null,$e=Te}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Te){var ne;if(this.ctx.font=Te,(ne=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(Te))!==null){var Qe=ne[1],rt=(ne[2],ne[3]),Re=ne[4],ze=(ne[5],ne[6]),Ye=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Re)[2];Re=Math.floor(Ye==="px"?parseFloat(Re)*this.pdf.internal.scaleFactor:Ye==="em"?parseFloat(Re)*this.pdf.getFontSize():parseFloat(Re)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Re);var Je=function(dt){var xt,tt,nr=[],Nt=dt.trim();if(Nt==="")return Kd;if(Nt in dw)return[dw[Nt]];for(;Nt!=="";){switch(tt=null,xt=(Nt=pw(Nt)).charAt(0)){case'"':case"'":tt=FU(Nt.substring(1),xt);break;default:tt=SU(Nt)}if(tt===null||(nr.push(tt[0]),(Nt=pw(tt[1]))!==""&&Nt.charAt(0)!==","))return Kd;Nt=Nt.replace(/^,/,"")}return nr}(ze);if(this.fontFaces){var st=EU(Xe(this.pdf,this.fontFaces),Je.map(function(dt){return{family:dt,stretch:"normal",weight:rt,style:Qe}}));this.pdf.setFont(st.ref.name,st.ref.style)}else{var nt="";(rt==="bold"||parseInt(rt,10)>=700||Qe==="bold")&&(nt="bold"),Qe==="italic"&&(nt+="italic"),nt.length===0&&(nt="normal");for(var ht="",vt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},_t=0;_t<Je.length;_t++){if(this.pdf.internal.getFont(Je[_t],nt,{noFallback:!0,disableWarning:!0})!==void 0){ht=Je[_t];break}if(nt==="bolditalic"&&this.pdf.internal.getFont(Je[_t],"bold",{noFallback:!0,disableWarning:!0})!==void 0)ht=Je[_t],nt="bold";else if(this.pdf.internal.getFont(Je[_t],"normal",{noFallback:!0,disableWarning:!0})!==void 0){ht=Je[_t],nt="normal";break}}if(ht===""){for(var Ut=0;Ut<Je.length;Ut++)if(vt[Je[Ut]]){ht=vt[Je[Ut]];break}}ht=ht===""?"Times":ht,this.pdf.setFont(ht,nt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Te){this.ctx.globalCompositeOperation=Te}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Te){this.ctx.globalAlpha=Te}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Te){this.ctx.lineDashOffset=Te,oe.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Te){this.ctx.lineDash=Te,oe.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Te){this.ctx.ignoreClearRect=!!Te}})};d.prototype.setLineDash=function(B){this.lineDash=B},d.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},d.prototype.fill=function(){O.call(this,"fill",!1)},d.prototype.stroke=function(){O.call(this,"stroke",!1)},d.prototype.beginPath=function(){this.path=[{type:"begin"}]},d.prototype.moveTo=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var S=this.ctx.transform.applyToPoint(new i(B,_));this.path.push({type:"mt",x:S.x,y:S.y}),this.ctx.lastPoint=new i(B,_)},d.prototype.closePath=function(){var B=new i(0,0),_=0;for(_=this.path.length-1;_!==-1;_--)if(this.path[_].type==="begin"&&Wt(this.path[_+1])==="object"&&typeof this.path[_+1].x=="number"){B=new i(this.path[_+1].x,this.path[_+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new i(B.x,B.y)},d.prototype.lineTo=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var S=this.ctx.transform.applyToPoint(new i(B,_));this.path.push({type:"lt",x:S.x,y:S.y}),this.ctx.lastPoint=new i(S.x,S.y)},d.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),O.call(this,null,!0)},d.prototype.quadraticCurveTo=function(B,_,S,N){if(isNaN(S)||isNaN(N)||isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var G=this.ctx.transform.applyToPoint(new i(S,N)),ie=this.ctx.transform.applyToPoint(new i(B,_));this.path.push({type:"qct",x1:ie.x,y1:ie.y,x:G.x,y:G.y}),this.ctx.lastPoint=new i(G.x,G.y)},d.prototype.bezierCurveTo=function(B,_,S,N,G,ie){if(isNaN(G)||isNaN(ie)||isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ce=this.ctx.transform.applyToPoint(new i(G,ie)),fe=this.ctx.transform.applyToPoint(new i(B,_)),xe=this.ctx.transform.applyToPoint(new i(S,N));this.path.push({type:"bct",x1:fe.x,y1:fe.y,x2:xe.x,y2:xe.y,x:ce.x,y:ce.y}),this.ctx.lastPoint=new i(ce.x,ce.y)},d.prototype.arc=function(B,_,S,N,G,ie){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N)||isNaN(G))throw cr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ie=!!ie,!this.ctx.transform.isIdentity){var ce=this.ctx.transform.applyToPoint(new i(B,_));B=ce.x,_=ce.y;var fe=this.ctx.transform.applyToPoint(new i(0,S)),xe=this.ctx.transform.applyToPoint(new i(0,0));S=Math.sqrt(Math.pow(fe.x-xe.x,2)+Math.pow(fe.y-xe.y,2))}Math.abs(G-N)>=2*Math.PI&&(N=0,G=2*Math.PI),this.path.push({type:"arc",x:B,y:_,radius:S,startAngle:N,endAngle:G,counterclockwise:ie})},d.prototype.arcTo=function(B,_,S,N,G){throw new Error("arcTo not implemented.")},d.prototype.rect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(B,_),this.lineTo(B+S,_),this.lineTo(B+S,_+N),this.lineTo(B,_+N),this.lineTo(B,_),this.lineTo(B+S,_),this.lineTo(B,_)},d.prototype.fillRect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!h.call(this)){var G={};this.lineCap!=="butt"&&(G.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(G.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(B,_,S,N),this.fill(),G.hasOwnProperty("lineCap")&&(this.lineCap=G.lineCap),G.hasOwnProperty("lineJoin")&&(this.lineJoin=G.lineJoin)}},d.prototype.strokeRect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(B,_,S,N),this.stroke())},d.prototype.clearRect=function(B,_,S,N){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N))throw cr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(B,_,S,N))},d.prototype.save=function(B){B=typeof B!="boolean"||B;for(var _=this.pdf.internal.getCurrentPageInfo().pageNumber,S=0;S<this.pdf.internal.getNumberOfPages();S++)this.pdf.setPage(S+1),this.pdf.internal.out("q");if(this.pdf.setPage(_),B){this.ctx.fontSize=this.pdf.internal.getFontSize();var N=new c(this.ctx);this.ctxStack.push(this.ctx),this.ctx=N}},d.prototype.restore=function(B){B=typeof B!="boolean"||B;for(var _=this.pdf.internal.getCurrentPageInfo().pageNumber,S=0;S<this.pdf.internal.getNumberOfPages();S++)this.pdf.setPage(S+1),this.pdf.internal.out("Q");this.pdf.setPage(_),B&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},d.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=function(B){var _,S,N,G;if(B.isCanvasGradient===!0&&(B=B.getColor()),!B)return{r:0,g:0,b:0,a:0,style:B};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(B))_=0,S=0,N=0,G=0;else{var ie=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(B);if(ie!==null)_=parseInt(ie[1]),S=parseInt(ie[2]),N=parseInt(ie[3]),G=1;else if((ie=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(B))!==null)_=parseInt(ie[1]),S=parseInt(ie[2]),N=parseInt(ie[3]),G=parseFloat(ie[4]);else{if(G=1,typeof B=="string"&&B.charAt(0)!=="#"){var ce=new Zv(B);B=ce.ok?ce.toHex():"#000000"}B.length===4?(_=B.substring(1,2),_+=_,S=B.substring(2,3),S+=S,N=B.substring(3,4),N+=N):(_=B.substring(1,3),S=B.substring(3,5),N=B.substring(5,7)),_=parseInt(_,16),S=parseInt(S,16),N=parseInt(N,16)}}return{r:_,g:S,b:N,a:G,style:B}},h=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};d.prototype.fillText=function(B,_,S,N){if(isNaN(_)||isNaN(S)||typeof B!="string")throw cr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(N=isNaN(N)?void 0:N,!h.call(this)){var G=ve(this.ctx.transform.rotation),ie=this.ctx.transform.scaleX;T.call(this,{text:B,x:_,y:S,scale:ie,angle:G,align:this.textAlign,maxWidth:N})}},d.prototype.strokeText=function(B,_,S,N){if(isNaN(_)||isNaN(S)||typeof B!="string")throw cr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){N=isNaN(N)?void 0:N;var G=ve(this.ctx.transform.rotation),ie=this.ctx.transform.scaleX;T.call(this,{text:B,x:_,y:S,scale:ie,renderingMode:"stroke",angle:G,align:this.textAlign,maxWidth:N})}},d.prototype.measureText=function(B){if(typeof B!="string")throw cr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var _=this.pdf,S=this.pdf.internal.scaleFactor,N=_.internal.getFontSize(),G=_.getStringUnitWidth(B)*N/_.internal.scaleFactor,ie=function(ce){var fe=(ce=ce||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return fe}}),this};return new ie({width:G*=Math.round(96*S/72*1e4)/1e4})},d.prototype.scale=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var S=new o(B,0,0,_,0,0);this.ctx.transform=this.ctx.transform.multiply(S)},d.prototype.rotate=function(B){if(isNaN(B))throw cr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var _=new o(Math.cos(B),Math.sin(B),-Math.sin(B),Math.cos(B),0,0);this.ctx.transform=this.ctx.transform.multiply(_)},d.prototype.translate=function(B,_){if(isNaN(B)||isNaN(_))throw cr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var S=new o(1,0,0,1,B,_);this.ctx.transform=this.ctx.transform.multiply(S)},d.prototype.transform=function(B,_,S,N,G,ie){if(isNaN(B)||isNaN(_)||isNaN(S)||isNaN(N)||isNaN(G)||isNaN(ie))throw cr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ce=new o(B,_,S,N,G,ie);this.ctx.transform=this.ctx.transform.multiply(ce)},d.prototype.setTransform=function(B,_,S,N,G,ie){B=isNaN(B)?1:B,_=isNaN(_)?0:_,S=isNaN(S)?0:S,N=isNaN(N)?1:N,G=isNaN(G)?0:G,ie=isNaN(ie)?0:ie,this.ctx.transform=new o(B,_,S,N,G,ie)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(B,_,S,N,G,ie,ce,fe,xe){var Ie=this.pdf.getImageProperties(B),Me=1,Xe=1,$e=1,Te=1;N!==void 0&&fe!==void 0&&($e=fe/N,Te=xe/G,Me=Ie.width/N*fe/N,Xe=Ie.height/G*xe/G),ie===void 0&&(ie=_,ce=S,_=0,S=0),N!==void 0&&fe===void 0&&(fe=N,xe=G),N===void 0&&fe===void 0&&(fe=Ie.width,xe=Ie.height);for(var ne,Qe=this.ctx.transform.decompose(),rt=ve(Qe.rotate.shx),Re=new o,ze=(Re=(Re=(Re=Re.multiply(Qe.translate)).multiply(Qe.skew)).multiply(Qe.scale)).applyToRectangle(new s(ie-_*$e,ce-S*Te,N*Me,G*Xe)),Ye=y.call(this,ze),Je=[],st=0;st<Ye.length;st+=1)Je.indexOf(Ye[st])===-1&&Je.push(Ye[st]);if(F(Je),this.autoPaging)for(var nt=Je[0],ht=Je[Je.length-1],vt=nt;vt<ht+1;vt++){this.pdf.setPage(vt);var _t=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ut=vt===1?this.posY+this.margin[0]:this.margin[0],dt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],xt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],tt=vt===1?0:dt+(vt-2)*xt;if(this.ctx.clip_path.length!==0){var nr=this.path;ne=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(ne,this.posX+this.margin[3],-tt+Ut+this.ctx.prevPageLastElemOffset),W.call(this,"fill",!0),this.path=nr}var Nt=JSON.parse(JSON.stringify(ze));Nt=b([Nt],this.posX+this.margin[3],-tt+Ut+this.ctx.prevPageLastElemOffset)[0];var fr=(vt>nt||vt<ht)&&v.call(this);fr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_t,xt,null).clip().discardPath()),this.pdf.addImage(B,"JPEG",Nt.x,Nt.y,Nt.w,Nt.h,null,null,rt),fr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(B,"JPEG",ze.x,ze.y,ze.w,ze.h,null,null,rt)};var y=function(B,_,S){var N=[];_=_||this.pdf.internal.pageSize.width,S=S||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var G=this.posY+this.ctx.prevPageLastElemOffset;switch(B.type){default:case"mt":case"lt":N.push(Math.floor((B.y+G)/S)+1);break;case"arc":N.push(Math.floor((B.y+G-B.radius)/S)+1),N.push(Math.floor((B.y+G+B.radius)/S)+1);break;case"qct":var ie=se(this.ctx.lastPoint.x,this.ctx.lastPoint.y,B.x1,B.y1,B.x,B.y);N.push(Math.floor((ie.y+G)/S)+1),N.push(Math.floor((ie.y+ie.h+G)/S)+1);break;case"bct":var ce=J(this.ctx.lastPoint.x,this.ctx.lastPoint.y,B.x1,B.y1,B.x2,B.y2,B.x,B.y);N.push(Math.floor((ce.y+G)/S)+1),N.push(Math.floor((ce.y+ce.h+G)/S)+1);break;case"rect":N.push(Math.floor((B.y+G)/S)+1),N.push(Math.floor((B.y+B.h+G)/S)+1)}for(var fe=0;fe<N.length;fe+=1)for(;this.pdf.internal.getNumberOfPages()<N[fe];)C.call(this);return N},C=function(){var B=this.fillStyle,_=this.strokeStyle,S=this.font,N=this.lineCap,G=this.lineWidth,ie=this.lineJoin;this.pdf.addPage(),this.fillStyle=B,this.strokeStyle=_,this.font=S,this.lineCap=N,this.lineWidth=G,this.lineJoin=ie},b=function(B,_,S){for(var N=0;N<B.length;N++)switch(B[N].type){case"bct":B[N].x2+=_,B[N].y2+=S;case"qct":B[N].x1+=_,B[N].y1+=S;case"mt":case"lt":case"arc":default:B[N].x+=_,B[N].y+=S}return B},F=function(B){return B.sort(function(_,S){return _-S})},O=function(B,_){for(var S,N,G=this.fillStyle,ie=this.strokeStyle,ce=this.lineCap,fe=this.lineWidth,xe=Math.abs(fe*this.ctx.transform.scaleX),Ie=this.lineJoin,Me=JSON.parse(JSON.stringify(this.path)),Xe=JSON.parse(JSON.stringify(this.path)),$e=[],Te=0;Te<Xe.length;Te++)if(Xe[Te].x!==void 0)for(var ne=y.call(this,Xe[Te]),Qe=0;Qe<ne.length;Qe+=1)$e.indexOf(ne[Qe])===-1&&$e.push(ne[Qe]);for(var rt=0;rt<$e.length;rt++)for(;this.pdf.internal.getNumberOfPages()<$e[rt];)C.call(this);if(F($e),this.autoPaging)for(var Re=$e[0],ze=$e[$e.length-1],Ye=Re;Ye<ze+1;Ye++){this.pdf.setPage(Ye),this.fillStyle=G,this.strokeStyle=ie,this.lineCap=ce,this.lineWidth=xe,this.lineJoin=Ie;var Je=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],st=Ye===1?this.posY+this.margin[0]:this.margin[0],nt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],vt=Ye===1?0:nt+(Ye-2)*ht;if(this.ctx.clip_path.length!==0){var _t=this.path;S=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(S,this.posX+this.margin[3],-vt+st+this.ctx.prevPageLastElemOffset),W.call(this,B,!0),this.path=_t}if(N=JSON.parse(JSON.stringify(Me)),this.path=b(N,this.posX+this.margin[3],-vt+st+this.ctx.prevPageLastElemOffset),_===!1||Ye===0){var Ut=(Ye>Re||Ye<ze)&&v.call(this);Ut&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Je,ht,null).clip().discardPath()),W.call(this,B,_),Ut&&this.pdf.restoreGraphicsState()}this.lineWidth=fe}else this.lineWidth=xe,W.call(this,B,_),this.lineWidth=fe;this.path=Me},W=function(B,_){if((B!=="stroke"||_||!p.call(this))&&(B==="stroke"||_||!h.call(this))){for(var S,N,G=[],ie=this.path,ce=0;ce<ie.length;ce++){var fe=ie[ce];switch(fe.type){case"begin":G.push({begin:!0});break;case"close":G.push({close:!0});break;case"mt":G.push({start:fe,deltas:[],abs:[]});break;case"lt":var xe=G.length;if(ie[ce-1]&&!isNaN(ie[ce-1].x)&&(S=[fe.x-ie[ce-1].x,fe.y-ie[ce-1].y],xe>0)){for(;xe>=0;xe--)if(G[xe-1].close!==!0&&G[xe-1].begin!==!0){G[xe-1].deltas.push(S),G[xe-1].abs.push(fe);break}}break;case"bct":S=[fe.x1-ie[ce-1].x,fe.y1-ie[ce-1].y,fe.x2-ie[ce-1].x,fe.y2-ie[ce-1].y,fe.x-ie[ce-1].x,fe.y-ie[ce-1].y],G[G.length-1].deltas.push(S);break;case"qct":var Ie=ie[ce-1].x+2/3*(fe.x1-ie[ce-1].x),Me=ie[ce-1].y+2/3*(fe.y1-ie[ce-1].y),Xe=fe.x+2/3*(fe.x1-fe.x),$e=fe.y+2/3*(fe.y1-fe.y),Te=fe.x,ne=fe.y;S=[Ie-ie[ce-1].x,Me-ie[ce-1].y,Xe-ie[ce-1].x,$e-ie[ce-1].y,Te-ie[ce-1].x,ne-ie[ce-1].y],G[G.length-1].deltas.push(S);break;case"arc":G.push({deltas:[],abs:[],arc:!0}),Array.isArray(G[G.length-1].abs)&&G[G.length-1].abs.push(fe)}}N=_?null:B==="stroke"?"stroke":"fill";for(var Qe=!1,rt=0;rt<G.length;rt++)if(G[rt].arc)for(var Re=G[rt].abs,ze=0;ze<Re.length;ze++){var Ye=Re[ze];Ye.type==="arc"?Q.call(this,Ye.x,Ye.y,Ye.radius,Ye.startAngle,Ye.endAngle,Ye.counterclockwise,void 0,_,!Qe):H.call(this,Ye.x,Ye.y),Qe=!0}else if(G[rt].close===!0)this.pdf.internal.out("h"),Qe=!1;else if(G[rt].begin!==!0){var Je=G[rt].start.x,st=G[rt].start.y;Y.call(this,G[rt].deltas,Je,st),Qe=!0}N&&K.call(this,N),_&&re.call(this)}},X=function(B){var _=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,S=_*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return B-S;case"top":return B+_-S;case"hanging":return B+_-2*S;case"middle":return B+_/2-S;case"ideographic":return B;case"alphabetic":default:return B}},k=function(B){return B+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};d.prototype.createLinearGradient=function(){var B=function(){};return B.colorStops=[],B.addColorStop=function(_,S){this.colorStops.push([_,S])},B.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},B.isCanvasGradient=!0,B},d.prototype.createPattern=function(){return this.createLinearGradient()},d.prototype.createRadialGradient=function(){return this.createLinearGradient()};var Q=function(B,_,S,N,G,ie,ce,fe,xe){for(var Ie=pe.call(this,S,N,G,ie),Me=0;Me<Ie.length;Me++){var Xe=Ie[Me];Me===0&&(xe?U.call(this,Xe.x1+B,Xe.y1+_):H.call(this,Xe.x1+B,Xe.y1+_)),le.call(this,B,_,Xe.x2,Xe.y2,Xe.x3,Xe.y3,Xe.x4,Xe.y4)}fe?re.call(this):K.call(this,ce)},K=function(B){switch(B){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},re=function(){this.pdf.clip(),this.pdf.discardPath()},U=function(B,_){this.pdf.internal.out(r(B)+" "+A(_)+" m")},T=function(B){var _;switch(B.align){case"right":case"end":_="right";break;case"center":_="center";break;case"left":case"start":default:_="left"}var S=this.pdf.getTextDimensions(B.text),N=X.call(this,B.y),G=k.call(this,N)-S.h,ie=this.ctx.transform.applyToPoint(new i(B.x,N)),ce=this.ctx.transform.decompose(),fe=new o;fe=(fe=(fe=fe.multiply(ce.translate)).multiply(ce.skew)).multiply(ce.scale);for(var xe,Ie,Me,Xe=this.ctx.transform.applyToRectangle(new s(B.x,N,S.w,S.h)),$e=fe.applyToRectangle(new s(B.x,G,S.w,S.h)),Te=y.call(this,$e),ne=[],Qe=0;Qe<Te.length;Qe+=1)ne.indexOf(Te[Qe])===-1&&ne.push(Te[Qe]);if(F(ne),this.autoPaging)for(var rt=ne[0],Re=ne[ne.length-1],ze=rt;ze<Re+1;ze++){this.pdf.setPage(ze);var Ye=ze===1?this.posY+this.margin[0]:this.margin[0],Je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],st=this.pdf.internal.pageSize.height-this.margin[2],nt=st-this.margin[0],ht=this.pdf.internal.pageSize.width-this.margin[1],vt=ht-this.margin[3],_t=ze===1?0:Je+(ze-2)*nt;if(this.ctx.clip_path.length!==0){var Ut=this.path;xe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=b(xe,this.posX+this.margin[3],-1*_t+Ye),W.call(this,"fill",!0),this.path=Ut}var dt=b([JSON.parse(JSON.stringify($e))],this.posX+this.margin[3],-_t+Ye+this.ctx.prevPageLastElemOffset)[0];B.scale>=.01&&(Ie=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ie*B.scale),Me=this.lineWidth,this.lineWidth=Me*B.scale);var xt=this.autoPaging!=="text";if(xt||dt.y+dt.h<=st){if(xt||dt.y>=Ye&&dt.x<=ht){var tt=xt?B.text:this.pdf.splitTextToSize(B.text,B.maxWidth||ht-dt.x)[0],nr=b([JSON.parse(JSON.stringify(Xe))],this.posX+this.margin[3],-_t+Ye+this.ctx.prevPageLastElemOffset)[0],Nt=xt&&(ze>rt||ze<Re)&&v.call(this);Nt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],vt,nt,null).clip().discardPath()),this.pdf.text(tt,nr.x,nr.y,{angle:B.angle,align:_,renderingMode:B.renderingMode}),Nt&&this.pdf.restoreGraphicsState()}}else dt.y<st&&(this.ctx.prevPageLastElemOffset+=st-dt.y);B.scale>=.01&&(this.pdf.setFontSize(Ie),this.lineWidth=Me)}else B.scale>=.01&&(Ie=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ie*B.scale),Me=this.lineWidth,this.lineWidth=Me*B.scale),this.pdf.text(B.text,ie.x+this.posX,ie.y+this.posY,{angle:B.angle,align:_,renderingMode:B.renderingMode,maxWidth:B.maxWidth}),B.scale>=.01&&(this.pdf.setFontSize(Ie),this.lineWidth=Me)},H=function(B,_,S,N){S=S||0,N=N||0,this.pdf.internal.out(r(B+S)+" "+A(_+N)+" l")},Y=function(B,_,S){return this.pdf.lines(B,_,S,null,null)},le=function(B,_,S,N,G,ie,ce,fe){this.pdf.internal.out([e(n(S+B)),e(a(N+_)),e(n(G+B)),e(a(ie+_)),e(n(ce+B)),e(a(fe+_)),"c"].join(" "))},pe=function(B,_,S,N){for(var G=2*Math.PI,ie=Math.PI/2;_>S;)_-=G;var ce=Math.abs(S-_);ce<G&&N&&(ce=G-ce);for(var fe=[],xe=N?-1:1,Ie=_;ce>1e-5;){var Me=Ie+xe*Math.min(ce,ie);fe.push(me.call(this,B,Ie,Me)),ce-=Math.abs(Me-Ie),Ie=Me}return fe},me=function(B,_,S){var N=(S-_)/2,G=B*Math.cos(N),ie=B*Math.sin(N),ce=G,fe=-ie,xe=ce*ce+fe*fe,Ie=xe+ce*G+fe*ie,Me=4/3*(Math.sqrt(2*xe*Ie)-Ie)/(ce*ie-fe*G),Xe=ce-Me*fe,$e=fe+Me*ce,Te=Xe,ne=-$e,Qe=N+_,rt=Math.cos(Qe),Re=Math.sin(Qe);return{x1:B*Math.cos(_),y1:B*Math.sin(_),x2:Xe*rt-$e*Re,y2:Xe*Re+$e*rt,x3:Te*rt-ne*Re,y3:Te*Re+ne*rt,x4:B*Math.cos(S),y4:B*Math.sin(S)}},ve=function(B){return 180*B/Math.PI},se=function(B,_,S,N,G,ie){var ce=B+.5*(S-B),fe=_+.5*(N-_),xe=G+.5*(S-G),Ie=ie+.5*(N-ie),Me=Math.min(B,G,ce,xe),Xe=Math.max(B,G,ce,xe),$e=Math.min(_,ie,fe,Ie),Te=Math.max(_,ie,fe,Ie);return new s(Me,$e,Xe-Me,Te-$e)},J=function(B,_,S,N,G,ie,ce,fe){var xe,Ie,Me,Xe,$e,Te,ne,Qe,rt,Re,ze,Ye,Je,st,nt=S-B,ht=N-_,vt=G-S,_t=ie-N,Ut=ce-G,dt=fe-ie;for(Ie=0;Ie<41;Ie++)rt=(ne=(Me=B+(xe=Ie/40)*nt)+xe*(($e=S+xe*vt)-Me))+xe*($e+xe*(G+xe*Ut-$e)-ne),Re=(Qe=(Xe=_+xe*ht)+xe*((Te=N+xe*_t)-Xe))+xe*(Te+xe*(ie+xe*dt-Te)-Qe),Ie==0?(ze=rt,Ye=Re,Je=rt,st=Re):(ze=Math.min(ze,rt),Ye=Math.min(Ye,Re),Je=Math.max(Je,rt),st=Math.max(st,Re));return new s(Math.round(ze),Math.round(Ye),Math.round(Je-ze),Math.round(st-Ye))},oe=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var B,_,S=(B=this.ctx.lineDash,_=this.ctx.lineDashOffset,JSON.stringify({lineDash:B,lineDashOffset:_}));this.prevLineDash!==S&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=S)}}})(yt.API),function(t){var e=function(a){var i,s,o,l,c,d,g,h,p,v;for(s=[],o=0,l=(a+=i="\0\0\0\0".slice(a.length%4||4)).length;l>o;o+=4)(c=(a.charCodeAt(o)<<24)+(a.charCodeAt(o+1)<<16)+(a.charCodeAt(o+2)<<8)+a.charCodeAt(o+3))!==0?(d=(c=((c=((c=((c=(c-(v=c%85))/85)-(p=c%85))/85)-(h=c%85))/85)-(g=c%85))/85)%85,s.push(d+33,g+33,h+33,p+33,v+33)):s.push(122);return function(y,C){for(var b=C;b>0;b--)y.pop()}(s,i.length),String.fromCharCode.apply(String,s)+"~>"},r=function(a){var i,s,o,l,c,d=String,g="length",h=255,p="charCodeAt",v="slice",y="replace";for(a[v](-2),a=a[v](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),o=[],l=0,c=(a+=i="uuuuu"[v](a[g]%5||5))[g];c>l;l+=5)s=52200625*(a[p](l)-33)+614125*(a[p](l+1)-33)+7225*(a[p](l+2)-33)+85*(a[p](l+3)-33)+(a[p](l+4)-33),o.push(h&s>>24,h&s>>16,h&s>>8,h&s);return function(C,b){for(var F=b;F>0;F--)C.pop()}(o,i[g]),d.fromCharCode.apply(d,o)},A=function(a){var i=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),i.test(a)===!1)return"";for(var s="",o=0;o<a.length;o+=2)s+=String.fromCharCode("0x"+(a[o]+a[o+1]));return s},n=function(a){for(var i=new Uint8Array(a.length),s=a.length;s--;)i[s]=a.charCodeAt(s);return a=(i=Nd(i)).reduce(function(o,l){return o+String.fromCharCode(l)},"")};t.processDataByFilters=function(a,i){var s=0,o=a||"",l=[];for(typeof(i=i||[])=="string"&&(i=[i]),s=0;s<i.length;s+=1)switch(i[s]){case"ASCII85Decode":case"/ASCII85Decode":o=r(o),l.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":o=e(o),l.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":o=A(o),l.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":o=o.split("").map(function(c){return("0"+c.charCodeAt().toString(16)).slice(-2)}).join("")+">",l.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":o=n(o),l.push("/FlateDecode");break;default:throw new Error('The filter: "'+i[s]+'" is not implemented')}return{data:o,reverseChain:l.reverse().join(" ")}}}(yt.API),function(t){t.loadFile=function(e,r,A){return function(n,a,i){a=a!==!1,i=typeof i=="function"?i:function(){};var s=void 0;try{s=function(o,l,c){var d=new XMLHttpRequest,g=0,h=function(p){var v=p.length,y=[],C=String.fromCharCode;for(g=0;g<v;g+=1)y.push(C(255&p.charCodeAt(g)));return y.join("")};if(d.open("GET",o,!l),d.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(d.onload=function(){d.status===200?c(h(this.responseText)):c(void 0)}),d.send(null),l&&d.status===200)return h(d.responseText)}(n,a,i)}catch{}return s}(e,r,A)},t.loadImageFile=t.loadFile}(yt.API),function(t){function e(){return(Bt.html2canvas?Promise.resolve(Bt.html2canvas):Promise.resolve().then(()=>WT)).catch(function(i){return Promise.reject(new Error("Could not load html2canvas: "+i))}).then(function(i){return i.default?i.default:i})}function r(){return(Bt.DOMPurify?Promise.resolve(Bt.DOMPurify):Promise.resolve().then(()=>FH)).catch(function(i){return Promise.reject(new Error("Could not load dompurify: "+i))}).then(function(i){return i.default?i.default:i})}var A=function(i){var s=Wt(i);return s==="undefined"?"undefined":s==="string"||i instanceof String?"string":s==="number"||i instanceof Number?"number":s==="function"||i instanceof Function?"function":i&&i.constructor===Array?"array":i&&i.nodeType===1?"element":s==="object"?"object":"unknown"},n=function(i,s){var o=document.createElement(i);for(var l in s.className&&(o.className=s.className),s.innerHTML&&s.dompurify&&(o.innerHTML=s.dompurify.sanitize(s.innerHTML)),s.style)o.style[l]=s.style[l];return o},a=function i(s){var o=Object.assign(i.convert(Promise.resolve()),JSON.parse(JSON.stringify(i.template))),l=i.convert(Promise.resolve(),o);return l=(l=l.setProgress(1,i,1,[i])).set(s)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(i,s){return i.__proto__=s||a.prototype,i},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(i,s){return this.then(function(){switch(s=s||function(o){switch(A(o)){case"string":return"string";case"element":return o.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(i)){case"string":return this.then(r).then(function(o){return this.set({src:n("div",{innerHTML:i,dompurify:o})})});case"element":return this.set({src:i});case"canvas":return this.set({canvas:i});case"img":return this.set({img:i});default:return this.error("Unknown source type.")}})},a.prototype.to=function(i){switch(i){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var i={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},s=function o(l,c){for(var d=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),g=l.firstChild;g;g=g.nextSibling)c!==!0&&g.nodeType===1&&g.nodeName==="SCRIPT"||d.appendChild(o(g,c));return l.nodeType===1&&(l.nodeName==="CANVAS"?(d.width=l.width,d.height=l.height,d.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(d.value=l.value),d.addEventListener("load",function(){d.scrollTop=l.scrollTop,d.scrollLeft=l.scrollLeft},!0)),d}(this.prop.src,this.opt.html2canvas.javascriptEnabled);s.tagName==="BODY"&&(i.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=n("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=n("div",{className:"html2pdf__container",style:i}),this.prop.container.appendChild(s),this.prop.container.firstChild.appendChild(n("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var i=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(i).then(e).then(function(s){var o=Object.assign({},this.opt.html2canvas);return delete o.onrendered,s(this.prop.container,o)}).then(function(s){(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var i=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(i).then(e).then(function(s){var o=this.opt.jsPDF,l=this.opt.fontFaces,c=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,d=Object.assign({async:!0,allowTaint:!0,scale:c,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete d.onrendered,o.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,o.context2d.posX=this.opt.x,o.context2d.posY=this.opt.y,o.context2d.margin=this.opt.margin,o.context2d.fontFaces=l,l)for(var g=0;g<l.length;++g){var h=l[g],p=h.src.find(function(v){return v.format==="truetype"});p&&o.addFont(p.url,h.ref.name,h.ref.style)}return d.windowHeight=d.windowHeight||0,d.windowHeight=d.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):d.windowHeight,o.context2d.save(!0),s(this.prop.container,d)}).then(function(s){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var i=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=i})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(i,s,o){return(o=o||"pdf").toLowerCase()==="img"||o.toLowerCase()==="image"?this.outputImg(i,s):this.outputPdf(i,s)},a.prototype.outputPdf=function(i,s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(i,s)})},a.prototype.outputImg=function(i){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(i){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+i+'" is not supported.'}})},a.prototype.save=function(i){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(i?{filename:i}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(i){if(A(i)!=="object")return this;var s=Object.keys(i||{}).map(function(o){if(o in a.template.prop)return function(){this.prop[o]=i[o]};switch(o){case"margin":return this.setMargin.bind(this,i.margin);case"jsPDF":return function(){return this.opt.jsPDF=i.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,i.pageSize);default:return function(){this.opt[o]=i[o]}}},this);return this.then(function(){return this.thenList(s)})},a.prototype.get=function(i,s){return this.then(function(){var o=i in a.template.prop?this.prop[i]:this.opt[i];return s?s(o):o})},a.prototype.setMargin=function(i){return this.then(function(){switch(A(i)){case"number":i=[i,i,i,i];case"array":if(i.length===2&&(i=[i[0],i[1],i[0],i[1]]),i.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=i}).then(this.setPageSize)},a.prototype.setPageSize=function(i){function s(o,l){return Math.floor(o*l/72*96)}return this.then(function(){(i=i||yt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(i.inner={width:i.width-this.opt.margin[1]-this.opt.margin[3],height:i.height-this.opt.margin[0]-this.opt.margin[2]},i.inner.px={width:s(i.inner.width,i.k),height:s(i.inner.height,i.k)},i.inner.ratio=i.inner.height/i.inner.width),this.prop.pageSize=i})},a.prototype.setProgress=function(i,s,o,l){return i!=null&&(this.progress.val=i),s!=null&&(this.progress.state=s),o!=null&&(this.progress.n=o),l!=null&&(this.progress.stack=l),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(i,s,o,l){return this.setProgress(i?this.progress.val+i:null,s||null,o?this.progress.n+o:null,l?this.progress.stack.concat(l):null)},a.prototype.then=function(i,s){var o=this;return this.thenCore(i,s,function(l,c){return o.updateProgress(null,null,1,[l]),Promise.prototype.then.call(this,function(d){return o.updateProgress(null,l),d}).then(l,c).then(function(d){return o.updateProgress(1),d})})},a.prototype.thenCore=function(i,s,o){o=o||Promise.prototype.then,i&&(i=i.bind(this)),s&&(s=s.bind(this));var l=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:a.convert(Object.assign({},this),Promise.prototype),c=o.call(l,i,s);return a.convert(c,this.__proto__)},a.prototype.thenExternal=function(i,s){return Promise.prototype.then.call(this,i,s)},a.prototype.thenList=function(i){var s=this;return i.forEach(function(o){s=s.thenCore(o)}),s},a.prototype.catch=function(i){i&&(i=i.bind(this));var s=Promise.prototype.catch.call(this,i);return a.convert(s,this)},a.prototype.catchExternal=function(i){return Promise.prototype.catch.call(this,i)},a.prototype.error=function(i){return this.then(function(){throw new Error(i)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,yt.getPageSize=function(i,s,o){if(Wt(i)==="object"){var l=i;i=l.orientation,s=l.unit||s,o=l.format||o}s=s||"mm",o=o||"a4",i=(""+(i||"P")).toLowerCase();var c,d=(""+o).toLowerCase(),g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(s){case"pt":c=1;break;case"mm":c=72/25.4;break;case"cm":c=72/2.54;break;case"in":c=72;break;case"px":c=.75;break;case"pc":case"em":c=12;break;case"ex":c=6;break;default:throw"Invalid unit: "+s}var h,p=0,v=0;if(g.hasOwnProperty(d))p=g[d][1]/c,v=g[d][0]/c;else try{p=o[1],v=o[0]}catch{throw new Error("Invalid format: "+o)}if(i==="p"||i==="portrait")i="p",v>p&&(h=v,v=p,p=h);else{if(i!=="l"&&i!=="landscape")throw"Invalid orientation: "+i;i="l",p>v&&(h=v,v=p,p=h)}return{width:v,height:p,unit:s,k:c,orientation:i}},t.html=function(i,s){(s=s||{}).callback=s.callback||function(){},s.html2canvas=s.html2canvas||{},s.html2canvas.canvas=s.html2canvas.canvas||this.canvas,s.jsPDF=s.jsPDF||this,s.fontFaces=s.fontFaces?s.fontFaces.map(Vd):null;var o=new a(s);return s.worker?o:o.from(i).doCallback()}}(yt.API),yt.API.addJS=function(t){return vw=t,this.internal.events.subscribe("postPutResources",function(){ou=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(ou+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),mw=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+vw+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){ou!==void 0&&mw!==void 0&&this.internal.out("/Names <</JavaScript "+ou+" 0 R>>")}),this},function(t){var e;t.events.push(["postPutResources",function(){var r=this,A=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=r.outline.render().split(/\r\n/),a=0;a<n.length;a++){var i=n[a],s=A.exec(i);if(s!=null){var o=s[1];r.internal.newObjectDeferredBegin(o,!1)}r.internal.write(i)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,c=[];for(a=0;a<l;a++){var d=r.internal.newObject();c.push(d);var g=r.internal.getPageInfo(a+1);r.internal.write("<< /D["+g.objId+" 0 R /XYZ null null null]>> endobj")}var h=r.internal.newObject();for(r.internal.write("<< /Names [ "),a=0;a<c.length;a++)r.internal.write("(page_"+(a+1)+")"+c[a]+" 0 R");r.internal.write(" ] >>","endobj"),e=r.internal.newObject(),r.internal.write("<< /Dests "+h+" 0 R"),r.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(A,n,a){var i={title:n,options:a,children:[]};return A==null&&(A=this.root),A.children.push(i),i},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(A){A.id=r.internal.newObjectDeferred();for(var n=0;n<A.children.length;n++)this.genIds_r(A.children[n])},r.outline.renderRoot=function(A){this.objStart(A),this.line("/Type /Outlines"),A.children.length>0&&(this.line("/First "+this.makeRef(A.children[0])),this.line("/Last "+this.makeRef(A.children[A.children.length-1]))),this.line("/Count "+this.count_r({count:0},A)),this.objEnd()},r.outline.renderItems=function(A){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<A.children.length;a++){var i=A.children[a];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(A)),a>0&&this.line("/Prev "+this.makeRef(A.children[a-1])),a<A.children.length-1&&this.line("/Next "+this.makeRef(A.children[a+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var s=this.count=this.count_r({count:0},i);if(s>0&&this.line("/Count "+s),i.options&&i.options.pageNumber){var o=r.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var l=0;l<A.children.length;l++)this.renderItems(A.children[l])},r.outline.line=function(A){this.ctx.val+=A+`\r
|
|
140
140
|
`},r.outline.makeRef=function(A){return A.id+" 0 R"},r.outline.makeString=function(A){return"("+r.internal.pdfEscape(A)+")"},r.outline.objStart=function(A){this.ctx.val+=`\r
|
|
141
141
|
`+A.id+` 0 obj\r
|
|
142
142
|
<<\r
|
|
@@ -230,9 +230,9 @@ endobj\r
|
|
|
230
230
|
*
|
|
231
231
|
* Licensed under the MIT License.
|
|
232
232
|
* http://opensource.org/licenses/mit-license
|
|
233
|
-
*/function Hn(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Cw(t){function e(Q){if(!Q)throw Error("assert :P")}function r(Q,K,re){for(var U=0;4>U;U++)if(Q[K+U]!=re.charCodeAt(U))return!0;return!1}function A(Q,K,re,U,T){for(var H=0;H<T;H++)Q[K+H]=re[U+H]}function n(Q,K,re,U){for(var T=0;T<U;T++)Q[K+T]=re}function a(Q){return new Int32Array(Q)}function i(Q,K){for(var re=[],U=0;U<Q;U++)re.push(new K);return re}function s(Q,K){var re=[];return function U(T,H,Y){for(var le=Y[H],pe=0;pe<le&&(T.push(Y.length>H+1?[]:new K),!(Y.length<H+1));pe++)U(T[pe],H+1,Y)}(re,0,Q),re}var o=function(){var Q=this;function K(u,m){for(var x=1<<m-1>>>0;u&x;)x>>>=1;return x?(u&x-1)+x:u}function re(u,m,x,E,I){e(!(E%x));do u[m+(E-=x)]=I;while(0<E)}function U(u,m,x,E,I){if(e(2328>=I),512>=I)var P=a(512);else if((P=a(I))==null)return 0;return function(M,R,j,Z,de,Fe){var Se,ye,Pe=R,Ne=1<<j,ge=a(16),Be=a(16);for(e(de!=0),e(Z!=null),e(M!=null),e(0<j),ye=0;ye<de;++ye){if(15<Z[ye])return 0;++ge[Z[ye]]}if(ge[0]==de)return 0;for(Be[1]=0,Se=1;15>Se;++Se){if(ge[Se]>1<<Se)return 0;Be[Se+1]=Be[Se]+ge[Se]}for(ye=0;ye<de;++ye)Se=Z[ye],0<Z[ye]&&(Fe[Be[Se]++]=ye);if(Be[15]==1)return(Z=new T).g=0,Z.value=Fe[0],re(M,Pe,1,Ne,Z),Ne;var Oe,Ge=-1,De=Ne-1,lt=0,At=1,wt=1,at=1<<j;for(ye=0,Se=1,de=2;Se<=j;++Se,de<<=1){if(At+=wt<<=1,0>(wt-=ge[Se]))return 0;for(;0<ge[Se];--ge[Se])(Z=new T).g=Se,Z.value=Fe[ye++],re(M,Pe+lt,de,at,Z),lt=K(lt,Se)}for(Se=j+1,de=2;15>=Se;++Se,de<<=1){if(At+=wt<<=1,0>(wt-=ge[Se]))return 0;for(;0<ge[Se];--ge[Se]){if(Z=new T,(lt&De)!=Ge){for(Pe+=at,Oe=1<<(Ge=Se)-j;15>Ge&&!(0>=(Oe-=ge[Ge]));)++Ge,Oe<<=1;Ne+=at=1<<(Oe=Ge-j),M[R+(Ge=lt&De)].g=Oe+j,M[R+Ge].value=Pe-R-Ge}Z.g=Se-j,Z.value=Fe[ye++],re(M,Pe+(lt>>j),de,at,Z),lt=K(lt,Se)}}return At!=2*Be[15]-1?0:Ne}(u,m,x,E,I,P)}function T(){this.value=this.g=0}function H(){this.value=this.g=0}function Y(){this.G=i(5,T),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=i(nn,H)}function le(u,m,x,E){e(u!=null),e(m!=null),e(2147483648>E),u.Ca=254,u.I=0,u.b=-8,u.Ka=0,u.oa=m,u.pa=x,u.Jd=m,u.Yc=x+E,u.Zc=4<=E?x+E-4+1:x,ie(u)}function pe(u,m){for(var x=0;0<m--;)x|=fe(u,128)<<m;return x}function me(u,m){var x=pe(u,m);return ce(u)?-x:x}function ve(u,m,x,E){var I,P=0;for(e(u!=null),e(m!=null),e(4294967288>E),u.Sb=E,u.Ra=0,u.u=0,u.h=0,4<E&&(E=4),I=0;I<E;++I)P+=m[x+I]<<8*I;u.Ra=P,u.bb=E,u.oa=m,u.pa=x}function se(u){for(;8<=u.u&&u.bb<u.Sb;)u.Ra>>>=8,u.Ra+=u.oa[u.pa+u.bb]<<Zo-8>>>0,++u.bb,u.u-=8;S(u)&&(u.h=1,u.u=0)}function J(u,m){if(e(0<=m),!u.h&&m<=Jo){var x=_(u)&Yo[m];return u.u+=m,se(u),x}return u.h=1,u.u=0}function oe(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function B(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function _(u){return u.Ra>>>(u.u&Zo-1)>>>0}function S(u){return e(u.bb<=u.Sb),u.h||u.bb==u.Sb&&u.u>Zo}function N(u,m){u.u=m,u.h=S(u)}function G(u){u.u>=jc&&(e(u.u>=jc),se(u))}function ie(u){e(u!=null&&u.oa!=null),u.pa<u.Zc?(u.I=(u.oa[u.pa++]|u.I<<8)>>>0,u.b+=8):(e(u!=null&&u.oa!=null),u.pa<u.Yc?(u.b+=8,u.I=u.oa[u.pa++]|u.I<<8):u.Ka?u.b=0:(u.I<<=8,u.b+=8,u.Ka=1))}function ce(u){return pe(u,1)}function fe(u,m){var x=u.Ca;0>u.b&&ie(u);var E=u.b,I=x*m>>>8,P=(u.I>>>E>I)+0;for(P?(x-=I,u.I-=I+1<<E>>>0):x=I+1,E=x,I=0;256<=E;)I+=8,E>>=8;return E=7^I+an[E],u.b-=E,u.Ca=(x<<E)-1,P}function xe(u,m,x){u[m+0]=x>>24&255,u[m+1]=x>>16&255,u[m+2]=x>>8&255,u[m+3]=x>>0&255}function Ie(u,m){return u[m+0]<<0|u[m+1]<<8}function Me(u,m){return Ie(u,m)|u[m+2]<<16}function Xe(u,m){return Ie(u,m)|Ie(u,m+2)<<16}function $e(u,m){var x=1<<m;return e(u!=null),e(0<m),u.X=a(x),u.X==null?0:(u.Mb=32-m,u.Xa=m,1)}function Te(u,m){e(u!=null),e(m!=null),e(u.Xa==m.Xa),A(m.X,0,u.X,0,1<<m.Xa)}function ne(){this.X=[],this.Xa=this.Mb=0}function Qe(u,m,x,E){e(x!=null),e(E!=null);var I=x[0],P=E[0];return I==0&&(I=(u*P+m/2)/m),P==0&&(P=(m*I+u/2)/u),0>=I||0>=P?0:(x[0]=I,E[0]=P,1)}function rt(u,m){return u+(1<<m)-1>>>m}function Re(u,m){return((4278255360&u)+(4278255360&m)>>>0&4278255360)+((16711935&u)+(16711935&m)>>>0&16711935)>>>0}function ze(u,m){Q[m]=function(x,E,I,P,M,R,j){var Z;for(Z=0;Z<M;++Z){var de=Q[u](R[j+Z-1],I,P+Z);R[j+Z]=Re(x[E+Z],de)}}}function Ye(){this.ud=this.hd=this.jd=0}function Je(u,m){return((4278124286&(u^m))>>>1)+(u&m)>>>0}function st(u){return 0<=u&&256>u?u:0>u?0:255<u?255:void 0}function nt(u,m){return st(u+(u-m+.5>>1))}function ht(u,m,x){return Math.abs(m-x)-Math.abs(u-x)}function vt(u,m,x,E,I,P,M){for(E=P[M-1],x=0;x<I;++x)P[M+x]=E=Re(u[m+x],E)}function _t(u,m,x,E,I){var P;for(P=0;P<x;++P){var M=u[m+P],R=M>>8&255,j=16711935&(j=(j=16711935&M)+((R<<16)+R));E[I+P]=(4278255360&M)+j>>>0}}function Ut(u,m){m.jd=u>>0&255,m.hd=u>>8&255,m.ud=u>>16&255}function dt(u,m,x,E,I,P){var M;for(M=0;M<E;++M){var R=m[x+M],j=R>>>8,Z=R,de=255&(de=(de=R>>>16)+((u.jd<<24>>24)*(j<<24>>24)>>>5));Z=255&(Z=(Z=Z+((u.hd<<24>>24)*(j<<24>>24)>>>5))+((u.ud<<24>>24)*(de<<24>>24)>>>5)),I[P+M]=(4278255360&R)+(de<<16)+Z}}function xt(u,m,x,E,I){Q[m]=function(P,M,R,j,Z,de,Fe,Se,ye){for(j=Fe;j<Se;++j)for(Fe=0;Fe<ye;++Fe)Z[de++]=I(R[E(P[M++])])},Q[u]=function(P,M,R,j,Z,de,Fe){var Se=8>>P.b,ye=P.Ea,Pe=P.K[0],Ne=P.w;if(8>Se)for(P=(1<<P.b)-1,Ne=(1<<Se)-1;M<R;++M){var ge,Be=0;for(ge=0;ge<ye;++ge)ge&P||(Be=E(j[Z++])),de[Fe++]=I(Pe[Be&Ne]),Be>>=Se}else Q["VP8LMapColor"+x](j,Z,Pe,Ne,de,Fe,M,R,ye)}}function tt(u,m,x,E,I){for(x=m+x;m<x;){var P=u[m++];E[I++]=P>>16&255,E[I++]=P>>8&255,E[I++]=P>>0&255}}function nr(u,m,x,E,I){for(x=m+x;m<x;){var P=u[m++];E[I++]=P>>16&255,E[I++]=P>>8&255,E[I++]=P>>0&255,E[I++]=P>>24&255}}function Nt(u,m,x,E,I){for(x=m+x;m<x;){var P=(M=u[m++])>>16&240|M>>12&15,M=M>>0&240|M>>28&15;E[I++]=P,E[I++]=M}}function fr(u,m,x,E,I){for(x=m+x;m<x;){var P=(M=u[m++])>>16&248|M>>13&7,M=M>>5&224|M>>3&31;E[I++]=P,E[I++]=M}}function kt(u,m,x,E,I){for(x=m+x;m<x;){var P=u[m++];E[I++]=P>>0&255,E[I++]=P>>8&255,E[I++]=P>>16&255}}function Kt(u,m,x,E,I,P){if(P==0)for(x=m+x;m<x;)xe(E,((P=u[m++])[0]>>24|P[1]>>8&65280|P[2]<<8&16711680|P[3]<<24)>>>0),I+=32;else A(E,I,u,m,x)}function $r(u,m){Q[m][0]=Q[u+"0"],Q[m][1]=Q[u+"1"],Q[m][2]=Q[u+"2"],Q[m][3]=Q[u+"3"],Q[m][4]=Q[u+"4"],Q[m][5]=Q[u+"5"],Q[m][6]=Q[u+"6"],Q[m][7]=Q[u+"7"],Q[m][8]=Q[u+"8"],Q[m][9]=Q[u+"9"],Q[m][10]=Q[u+"10"],Q[m][11]=Q[u+"11"],Q[m][12]=Q[u+"12"],Q[m][13]=Q[u+"13"],Q[m][14]=Q[u+"0"],Q[m][15]=Q[u+"0"]}function Pt(u){return u==F2||u==S2||u==u0||u==_2}function br(){this.eb=[],this.size=this.A=this.fb=0}function $t(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function rA(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new br,this.f.kb=new $t,this.sd=null}function Et(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Gt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Ct(u){return alert("todo:WebPSamplerProcessPlane"),u.T}function Ht(u,m){var x=u.T,E=m.ba.f.RGBA,I=E.eb,P=E.fb+u.ka*E.A,M=Qn[m.ba.S],R=u.y,j=u.O,Z=u.f,de=u.N,Fe=u.ea,Se=u.W,ye=m.cc,Pe=m.dc,Ne=m.Mc,ge=m.Nc,Be=u.ka,Oe=u.ka+u.T,Ge=u.U,De=Ge+1>>1;for(Be==0?M(R,j,null,null,Z,de,Fe,Se,Z,de,Fe,Se,I,P,null,null,Ge):(M(m.ec,m.fc,R,j,ye,Pe,Ne,ge,Z,de,Fe,Se,I,P-E.A,I,P,Ge),++x);Be+2<Oe;Be+=2)ye=Z,Pe=de,Ne=Fe,ge=Se,de+=u.Rc,Se+=u.Rc,P+=2*E.A,M(R,(j+=2*u.fa)-u.fa,R,j,ye,Pe,Ne,ge,Z,de,Fe,Se,I,P-E.A,I,P,Ge);return j+=u.fa,u.j+Oe<u.o?(A(m.ec,m.fc,R,j,Ge),A(m.cc,m.dc,Z,de,De),A(m.Mc,m.Nc,Fe,Se,De),x--):1&Oe||M(R,j,null,null,Z,de,Fe,Se,Z,de,Fe,Se,I,P+E.A,null,null,Ge),x}function pn(u,m,x){var E=u.F,I=[u.J];if(E!=null){var P=u.U,M=m.ba.S,R=M==f0||M==u0;m=m.ba.f.RGBA;var j=[0],Z=u.ka;j[0]=u.T,u.Kb&&(Z==0?--j[0]:(--Z,I[0]-=u.width),u.j+u.ka+u.T==u.o&&(j[0]=u.o-u.j-Z));var de=m.eb;Z=m.fb+Z*m.A,u=i0(E,I[0],u.width,P,j,de,Z+(R?0:3),m.A),e(x==j),u&&Pt(M)&&Gi(de,Z,R,P,j,m.A)}return 0}function Nr(u){var m=u.ma,x=m.ba.S,E=11>x,I=x==l0||x==c0||x==f0||x==E2||x==12||Pt(x);if(m.memory=null,m.Ib=null,m.Jb=null,m.Nd=null,!Kc(m.Oa,u,I?11:12))return 0;if(I&&Pt(x)&&We(),u.da)alert("todo:use_scaling");else{if(E){if(m.Ib=Ct,u.Kb){if(x=u.U+1>>1,m.memory=a(u.U+2*x),m.memory==null)return 0;m.ec=m.memory,m.fc=0,m.cc=m.ec,m.dc=m.fc+u.U,m.Mc=m.cc,m.Nc=m.dc+x,m.Ib=Ht,We()}}else alert("todo:EmitYUV");I&&(m.Jb=pn,E&&Ce())}if(E&&!aE){for(u=0;256>u;++u)KJ[u]=89858*(u-128)+d0>>h0,zJ[u]=-22014*(u-128)+d0,jJ[u]=-45773*(u-128),GJ[u]=113618*(u-128)+d0>>h0;for(u=Yc;u<N2;++u)m=76283*(u-16)+d0>>h0,WJ[u-Yc]=vn(m,255),XJ[u-Yc]=vn(m+8>>4,15);aE=1}return 1}function zA(u){var m=u.ma,x=u.U,E=u.T;return e(!(1&u.ka)),0>=x||0>=E?0:(x=m.Ib(u,m),m.Jb!=null&&m.Jb(u,m,x),m.Dc+=x,1)}function tn(u){u.ma.memory=null}function gt(u,m,x,E){return J(u,8)!=47?0:(m[0]=J(u,14)+1,x[0]=J(u,14)+1,E[0]=J(u,1),J(u,3)!=0?0:!u.h)}function xA(u,m){if(4>u)return u+1;var x=u-2>>1;return(2+(1&u)<<x)+J(m,x)+1}function kA(u,m){return 120<m?m-120:1<=(x=((x=TJ[m-1])>>4)*u+(8-(15&x)))?x:1;var x}function gr(u,m,x){var E=_(x),I=u[m+=255&E].g-8;return 0<I&&(N(x,x.u+8),E=_(x),m+=u[m].value,m+=E&(1<<I)-1),N(x,x.u+u[m].g),u[m].value}function Br(u,m,x){return x.g+=u.g,x.value+=u.value<<m>>>0,e(8>=x.g),u.g}function yr(u,m,x){var E=u.xc;return e((m=E==0?0:u.vc[u.md*(x>>E)+(m>>E)])<u.Wb),u.Ya[m]}function D(u,m,x,E){var I=u.ab,P=u.c*m,M=u.C;m=M+m;var R=x,j=E;for(E=u.Ta,x=u.Ua;0<I--;){var Z=u.gc[I],de=M,Fe=m,Se=R,ye=j,Pe=(j=E,R=x,Z.Ea);switch(e(de<Fe),e(Fe<=Z.nc),Z.hc){case 2:a0(Se,ye,(Fe-de)*Pe,j,R);break;case 0:var Ne=de,ge=Fe,Be=j,Oe=R,Ge=(at=Z).Ea;Ne==0&&(y2(Se,ye,null,null,1,Be,Oe),vt(Se,ye+1,0,0,Ge-1,Be,Oe+1),ye+=Ge,Oe+=Ge,++Ne);for(var De=1<<at.b,lt=De-1,At=rt(Ge,at.b),wt=at.K,at=at.w+(Ne>>at.b)*At;Ne<ge;){var Yt=wt,ar=at,zt=1;for(zc(Se,ye,Be,Oe-Ge,1,Be,Oe);zt<Ge;){var Rt=(zt&~lt)+De;Rt>Ge&&(Rt=Ge),(0,Ri[Yt[ar++]>>8&15])(Se,ye+ +zt,Be,Oe+zt-Ge,Rt-zt,Be,Oe+zt),zt=Rt}ye+=Ge,Oe+=Ge,++Ne<||(at+=At)}Fe!=Z.nc&&A(j,R-Pe,j,R+(Fe-de-1)*Pe,Pe);break;case 1:for(Pe=Se,ge=ye,Ge=(Se=Z.Ea)-(Oe=Se&~(Be=(ye=1<<Z.b)-1)),Ne=rt(Se,Z.b),De=Z.K,Z=Z.w+(de>>Z.b)*Ne;de<Fe;){for(lt=De,At=Z,wt=new Ye,at=ge+Oe,Yt=ge+Se;ge<at;)Ut(lt[At++],wt),In(wt,Pe,ge,ye,j,R),ge+=ye,R+=ye;ge<Yt&&(Ut(lt[At++],wt),In(wt,Pe,ge,Ge,j,R),ge+=Ge,R+=Ge),++de&Be||(Z+=Ne)}break;case 3:if(Se==j&&ye==R&&0<Z.b){for(ge=j,Se=Pe=R+(Fe-de)*Pe-(Oe=(Fe-de)*rt(Z.Ea,Z.b)),ye=j,Be=R,Ne=[],Oe=(Ge=Oe)-1;0<=Oe;--Oe)Ne[Oe]=ye[Be+Oe];for(Oe=Ge-1;0<=Oe;--Oe)ge[Se+Oe]=Ne[Oe];ia(Z,de,Fe,j,Pe,j,R)}else ia(Z,de,Fe,Se,ye,j,R)}R=E,j=x}j!=x&&A(E,x,R,j,P)}function te(u,m){var x=u.V,E=u.Ba+u.c*u.C,I=m-u.C;if(e(m<=u.l.o),e(16>=I),0<I){var P=u.l,M=u.Ta,R=u.Ua,j=P.width;if(D(u,I,x,E),I=R=[R],e((x=u.C)<(E=m)),e(P.v<P.va),E>P.o&&(E=P.o),x<P.j){var Z=P.j-x;x=P.j,I[0]+=Z*j}if(x>=E?x=0:(I[0]+=4*P.v,P.ka=x-P.j,P.U=P.va-P.v,P.T=E-x,x=1),x){if(R=R[0],11>(x=u.ca).S){var de=x.f.RGBA,Fe=(E=x.S,I=P.U,P=P.T,Z=de.eb,de.A),Se=P;for(de=de.fb+u.Ma*de.A;0<Se--;){var ye=M,Pe=R,Ne=I,ge=Z,Be=de;switch(E){case o0:sa(ye,Pe,Ne,ge,Be);break;case l0:Hi(ye,Pe,Ne,ge,Be);break;case F2:Hi(ye,Pe,Ne,ge,Be),Gi(ge,Be,0,Ne,1,0);break;case $b:el(ye,Pe,Ne,ge,Be);break;case c0:Kt(ye,Pe,Ne,ge,Be,1);break;case S2:Kt(ye,Pe,Ne,ge,Be,1),Gi(ge,Be,0,Ne,1,0);break;case f0:Kt(ye,Pe,Ne,ge,Be,0);break;case u0:Kt(ye,Pe,Ne,ge,Be,0),Gi(ge,Be,1,Ne,1,0);break;case E2:Ia(ye,Pe,Ne,ge,Be);break;case _2:Ia(ye,Pe,Ne,ge,Be),Al(ge,Be,Ne,1,0);break;case qb:Ai(ye,Pe,Ne,ge,Be);break;default:e(0)}R+=j,de+=Fe}u.Ma+=P}else alert("todo:EmitRescaledRowsYUVA");e(u.Ma<=x.height)}}u.C=m,e(u.C<=u.i)}function z(u){var m;if(0<u.ua)return 0;for(m=0;m<u.Wb;++m){var x=u.Ya[m].G,E=u.Ya[m].H;if(0<x[1][E[1]+0].g||0<x[2][E[2]+0].g||0<x[3][E[3]+0].g)return 0}return 1}function q(u,m,x,E,I,P){if(u.Z!=0){var M=u.qd,R=u.rd;for(e(zi[u.Z]!=null);m<x;++m)zi[u.Z](M,R,E,I,E,I,P),M=E,R=I,I+=P;u.qd=M,u.rd=R}}function ee(u,m){var x=u.l.ma,E=x.Z==0||x.Z==1?u.l.j:u.C;if(E=u.C<E?E:u.C,e(m<=u.l.o),m>E){var I=u.l.width,P=x.ca,M=x.tb+I*E,R=u.V,j=u.Ba+u.c*E,Z=u.gc;e(u.ab==1),e(Z[0].hc==3),x2(Z[0],E,m,R,j,P,M),q(x,E,m,P,M,I)}u.C=u.Ma=m}function Ae(u,m,x,E,I,P,M){var R=u.$/E,j=u.$%E,Z=u.m,de=u.s,Fe=x+u.$,Se=Fe;I=x+E*I;var ye=x+E*P,Pe=280+de.ua,Ne=u.Pb?R:16777216,ge=0<de.ua?de.Wa:null,Be=de.wc,Oe=Fe<ye?yr(de,j,R):null;e(u.C<P),e(ye<=I);var Ge=!1;e:for(;;){for(;Ge||Fe<ye;){var De=0;if(R>=Ne){var lt=Fe-x;e((Ne=u).Pb),Ne.wd=Ne.m,Ne.xd=lt,0<Ne.s.ua&&Te(Ne.s.Wa,Ne.s.vb),Ne=R+NJ}if(j&Be||(Oe=yr(de,j,R)),e(Oe!=null),Oe.Qb&&(m[Fe]=Oe.qb,Ge=!0),!Ge)if(G(Z),Oe.jc){De=Z,lt=m;var At=Fe,wt=Oe.pd[_(De)&nn-1];e(Oe.jc),256>wt.g?(N(De,De.u+wt.g),lt[At]=wt.value,De=0):(N(De,De.u+wt.g-256),e(256<=wt.value),De=wt.value),De==0&&(Ge=!0)}else De=gr(Oe.G[0],Oe.H[0],Z);if(Z.h)break;if(Ge||256>De){if(!Ge)if(Oe.nd)m[Fe]=(Oe.qb|De<<8)>>>0;else{if(G(Z),Ge=gr(Oe.G[1],Oe.H[1],Z),G(Z),lt=gr(Oe.G[2],Oe.H[2],Z),At=gr(Oe.G[3],Oe.H[3],Z),Z.h)break;m[Fe]=(At<<24|Ge<<16|De<<8|lt)>>>0}if(Ge=!1,++Fe,++j>=E&&(j=0,++R,M!=null&&R<=P&&!(R%16)&&M(u,R),ge!=null))for(;Se<Fe;)De=m[Se++],ge.X[(506832829*De&4294967295)>>>ge.Mb]=De}else if(280>De){if(De=xA(De-256,Z),lt=gr(Oe.G[4],Oe.H[4],Z),G(Z),lt=kA(E,lt=xA(lt,Z)),Z.h)break;if(Fe-x<lt||I-Fe<De)break e;for(At=0;At<De;++At)m[Fe+At]=m[Fe+At-lt];for(Fe+=De,j+=De;j>=E;)j-=E,++R,M!=null&&R<=P&&!(R%16)&&M(u,R);if(e(Fe<=I),j&Be&&(Oe=yr(de,j,R)),ge!=null)for(;Se<Fe;)De=m[Se++],ge.X[(506832829*De&4294967295)>>>ge.Mb]=De}else{if(!(De<Pe))break e;for(Ge=De-280,e(ge!=null);Se<Fe;)De=m[Se++],ge.X[(506832829*De&4294967295)>>>ge.Mb]=De;De=Fe,e(!(Ge>>>(lt=ge).Xa)),m[De]=lt.X[Ge],Ge=!0}Ge||e(Z.h==S(Z))}if(u.Pb&&Z.h&&Fe<I)e(u.m.h),u.a=5,u.m=u.wd,u.$=u.xd,0<u.s.ua&&Te(u.s.vb,u.s.Wa);else{if(Z.h)break e;M!=null&&M(u,R>P?P:R),u.a=0,u.$=Fe-x}return 1}return u.a=3,0}function Ee(u){e(u!=null),u.vc=null,u.yc=null,u.Ya=null;var m=u.Wa;m!=null&&(m.X=null),u.vb=null,e(u!=null)}function Ue(){var u=new B2;return u==null?null:(u.a=0,u.xb=Zb,$r("Predictor","VP8LPredictors"),$r("Predictor","VP8LPredictors_C"),$r("PredictorAdd","VP8LPredictorsAdd"),$r("PredictorAdd","VP8LPredictorsAdd_C"),a0=_t,In=dt,sa=tt,Hi=nr,Ia=Nt,Ai=fr,el=kt,Q.VP8LMapColor32b=Wc,Q.VP8LMapColor8b=C2,u)}function be(u,m,x,E,I){var P=1,M=[u],R=[m],j=E.m,Z=E.s,de=null,Fe=0;e:for(;;){if(x)for(;P&&J(j,1);){var Se=M,ye=R,Pe=E,Ne=1,ge=Pe.m,Be=Pe.gc[Pe.ab],Oe=J(ge,2);if(Pe.Oc&1<<Oe)P=0;else{switch(Pe.Oc|=1<<Oe,Be.hc=Oe,Be.Ea=Se[0],Be.nc=ye[0],Be.K=[null],++Pe.ab,e(4>=Pe.ab),Oe){case 0:case 1:Be.b=J(ge,3)+2,Ne=be(rt(Be.Ea,Be.b),rt(Be.nc,Be.b),0,Pe,Be.K),Be.K=Be.K[0];break;case 3:var Ge,De=J(ge,8)+1,lt=16<De?0:4<De?1:2<De?2:3;if(Se[0]=rt(Be.Ea,lt),Be.b=lt,Ge=Ne=be(De,1,0,Pe,Be.K)){var At,wt=De,at=Be,Yt=1<<(8>>at.b),ar=a(Yt);if(ar==null)Ge=0;else{var zt=at.K[0],Rt=at.w;for(ar[0]=at.K[0][0],At=1;At<1*wt;++At)ar[At]=Re(zt[Rt+At],ar[At-1]);for(;At<4*Yt;++At)ar[At]=0;at.K[0]=null,at.K[0]=ar,Ge=1}}Ne=Ge;break;case 2:break;default:e(0)}P=Ne}}if(M=M[0],R=R[0],P&&J(j,1)&&!(P=1<=(Fe=J(j,4))&&11>=Fe)){E.a=3;break e}var ur;if(ur=P)t:{var lr,Lt,Yr,sn=E,Jr=M,on=R,ir=Fe,Bn=x,yn=sn.m,fA=sn.s,CA=[null],WA=1,On=0,La=UJ[ir];r:for(;;){if(Bn&&J(yn,1)){var uA=J(yn,3)+2,oi=rt(Jr,uA),Ms=rt(on,uA),nl=oi*Ms;if(!be(oi,Ms,0,sn,CA))break r;for(CA=CA[0],fA.xc=uA,lr=0;lr<nl;++lr){var Wi=CA[lr]>>8&65535;CA[lr]=Wi,Wi>=WA&&(WA=Wi+1)}}if(yn.h)break r;for(Lt=0;5>Lt;++Lt){var Lr=Yb[Lt];!Lt&&0<ir&&(Lr+=1<<ir),On<Lr&&(On=Lr)}var I2=i(WA*La,T),oE=WA,lE=i(oE,Y);if(lE==null)var p0=null;else e(65536>=oE),p0=lE;var Jc=a(On);if(p0==null||Jc==null||I2==null){sn.a=1;break r}var m0=I2;for(lr=Yr=0;lr<WA;++lr){var fa=p0[lr],al=fa.G,il=fa.H,cE=0,v0=1,fE=0;for(Lt=0;5>Lt;++Lt){Lr=Yb[Lt],al[Lt]=m0,il[Lt]=Yr,!Lt&&0<ir&&(Lr+=1<<ir);n:{var w0,L2=Lr,B0=sn,Zc=Jc,YJ=m0,JJ=Yr,k2=0,Xi=B0.m,ZJ=J(Xi,1);if(n(Zc,0,0,L2),ZJ){var eZ=J(Xi,1)+1,tZ=J(Xi,1),uE=J(Xi,tZ==0?1:8);Zc[uE]=1,eZ==2&&(Zc[uE=J(Xi,8)]=1);var y0=1}else{var hE=a(19),dE=J(Xi,4)+4;if(19<dE){B0.a=3;var x0=0;break n}for(w0=0;w0<dE;++w0)hE[_J[w0]]=J(Xi,3);var Q2=void 0,ef=void 0,gE=B0,rZ=hE,C0=L2,pE=Zc,O2=0,$i=gE.m,mE=8,vE=i(128,T);A:for(;U(vE,0,7,rZ,19);){if(J($i,1)){var AZ=2+2*J($i,3);if((Q2=2+J($i,AZ))>C0)break A}else Q2=C0;for(ef=0;ef<C0&&Q2--;){G($i);var wE=vE[0+(127&_($i))];N($i,$i.u+wE.g);var sl=wE.value;if(16>sl)pE[ef++]=sl,sl!=0&&(mE=sl);else{var nZ=sl==16,BE=sl-16,aZ=FJ[BE],yE=J($i,EJ[BE])+aZ;if(ef+yE>C0)break A;for(var iZ=nZ?mE:0;0<yE--;)pE[ef++]=iZ}}O2=1;break A}O2||(gE.a=3),y0=O2}(y0=y0&&!Xi.h)&&(k2=U(YJ,JJ,8,Zc,L2)),y0&&k2!=0?x0=k2:(B0.a=3,x0=0)}if(x0==0)break r;if(v0&&SJ[Lt]==1&&(v0=m0[Yr].g==0),cE+=m0[Yr].g,Yr+=x0,3>=Lt){var tf,D2=Jc[0];for(tf=1;tf<Lr;++tf)Jc[tf]>D2&&(D2=Jc[tf]);fE+=D2}}if(fa.nd=v0,fa.Qb=0,v0&&(fa.qb=(al[3][il[3]+0].value<<24|al[1][il[1]+0].value<<16|al[2][il[2]+0].value)>>>0,cE==0&&256>al[0][il[0]+0].value&&(fa.Qb=1,fa.qb+=al[0][il[0]+0].value<<8)),fa.jc=!fa.Qb&&6>fE,fa.jc){var b0,li=fa;for(b0=0;b0<nn;++b0){var qi=b0,Yi=li.pd[qi],E0=li.G[0][li.H[0]+qi];256<=E0.value?(Yi.g=E0.g+256,Yi.value=E0.value):(Yi.g=0,Yi.value=0,qi>>=Br(E0,8,Yi),qi>>=Br(li.G[1][li.H[1]+qi],16,Yi),qi>>=Br(li.G[2][li.H[2]+qi],0,Yi),Br(li.G[3][li.H[3]+qi],24,Yi))}}}fA.vc=CA,fA.Wb=WA,fA.Ya=p0,fA.yc=I2,ur=1;break t}ur=0}if(!(P=ur)){E.a=3;break e}if(0<Fe){if(Z.ua=1<<Fe,!$e(Z.Wa,Fe)){E.a=1,P=0;break e}}else Z.ua=0;var P2=E,xE=M,sZ=R,M2=P2.s,R2=M2.xc;if(P2.c=xE,P2.i=sZ,M2.md=rt(xE,R2),M2.wc=R2==0?-1:(1<<R2)-1,x){E.xb=PJ;break e}if((de=a(M*R))==null){E.a=1,P=0;break e}P=(P=Ae(E,de,0,M,R,R,null))&&!j.h;break e}return P?(I!=null?I[0]=de:(e(de==null),e(x)),E.$=0,x||Ee(Z)):Ee(Z),P}function ue(u,m){var x=u.c*u.i,E=x+m+16*m;return e(u.c<=m),u.V=a(E),u.V==null?(u.Ta=null,u.Ua=0,u.a=1,0):(u.Ta=u.V,u.Ua=u.Ba+x+m,1)}function V(u,m){var x=u.C,E=m-x,I=u.V,P=u.Ba+u.c*x;for(e(m<=u.l.o);0<E;){var M=16<E?16:E,R=u.l.ma,j=u.l.width,Z=j*M,de=R.ca,Fe=R.tb+j*x,Se=u.Ta,ye=u.Ua;D(u,M,I,P),Kb(Se,ye,de,Fe,Z),q(R,x,x+M,de,Fe,j),E-=M,I+=M*u.c,x+=M}e(x==m),u.C=u.Ma=m}function we(){this.ub=this.yd=this.td=this.Rb=0}function _e(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ke(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Ve(){this.Yb=function(){var u=[];return function m(x,E,I){for(var P=I[E],M=0;M<P&&(x.push(I.length>E+1?[]:0),!(I.length<E+1));M++)m(x[M],E+1,I)}(u,0,[3,11]),u}()}function qe(){this.jb=a(3),this.Wc=s([4,8],Ve),this.Xc=s([4,17],Ve)}function ft(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Vt(){this.ld=this.La=this.dd=this.tc=0}function bt(){this.Na=this.la=0}function Cr(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function rn(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function _a(){this.uc=this.M=this.Nb=0,this.wa=Array(new Vt),this.Y=0,this.ya=Array(new rn),this.aa=0,this.l=new Ua}function Ta(){this.y=a(16),this.f=a(8),this.ea=a(8)}function ra(){this.cb=this.a=0,this.sc="",this.m=new oe,this.Od=new we,this.Kc=new _e,this.ed=new ft,this.Qa=new Ke,this.Ic=this.$c=this.Aa=0,this.D=new _a,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=i(8,oe),this.ia=0,this.pb=i(4,Cr),this.Pa=new qe,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ta),this.Hd=0,this.rb=Array(new bt),this.sb=0,this.wa=Array(new Vt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new rn),this.L=this.aa=0,this.gd=s([4,2],Vt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Ua(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function mn(){var u=new ra;return u!=null&&(u.a=0,u.sc="OK",u.cb=0,u.Xb=0,qc||(qc=Gh)),u}function Hr(u,m,x){return u.a==0&&(u.a=m,u.sc=x,u.cb=0),0}function Vh(u,m,x){return 3<=x&&u[m+0]==157&&u[m+1]==1&&u[m+2]==42}function Kh(u,m){if(u==null)return 0;if(u.a=0,u.sc="OK",m==null)return Hr(u,2,"null VP8Io passed to VP8GetHeaders()");var x=m.data,E=m.w,I=m.ha;if(4>I)return Hr(u,7,"Truncated header.");var P=x[E+0]|x[E+1]<<8|x[E+2]<<16,M=u.Od;if(M.Rb=!(1&P),M.td=P>>1&7,M.yd=P>>4&1,M.ub=P>>5,3<M.td)return Hr(u,3,"Incorrect keyframe parameters.");if(!M.yd)return Hr(u,4,"Frame not displayable.");E+=3,I-=3;var R=u.Kc;if(M.Rb){if(7>I)return Hr(u,7,"cannot parse picture header");if(!Vh(x,E,I))return Hr(u,3,"Bad code word");R.c=16383&(x[E+4]<<8|x[E+3]),R.Td=x[E+4]>>6,R.i=16383&(x[E+6]<<8|x[E+5]),R.Ud=x[E+6]>>6,E+=7,I-=7,u.za=R.c+15>>4,u.Ub=R.i+15>>4,m.width=R.c,m.height=R.i,m.Da=0,m.j=0,m.v=0,m.va=m.width,m.o=m.height,m.da=0,m.ib=m.width,m.hb=m.height,m.U=m.width,m.T=m.height,n((P=u.Pa).jb,0,255,P.jb.length),e((P=u.Qa)!=null),P.Cb=0,P.Bb=0,P.Fb=1,n(P.Zb,0,0,P.Zb.length),n(P.Lb,0,0,P.Lb)}if(M.ub>I)return Hr(u,7,"bad partition length");le(P=u.m,x,E,M.ub),E+=M.ub,I-=M.ub,M.Rb&&(R.Ld=ce(P),R.Kd=ce(P)),R=u.Qa;var j,Z=u.Pa;if(e(P!=null),e(R!=null),R.Cb=ce(P),R.Cb){if(R.Bb=ce(P),ce(P)){for(R.Fb=ce(P),j=0;4>j;++j)R.Zb[j]=ce(P)?me(P,7):0;for(j=0;4>j;++j)R.Lb[j]=ce(P)?me(P,6):0}if(R.Bb)for(j=0;3>j;++j)Z.jb[j]=ce(P)?pe(P,8):255}else R.Bb=0;if(P.Ka)return Hr(u,3,"cannot parse segment header");if((R=u.ed).zd=ce(P),R.Tb=pe(P,6),R.wb=pe(P,3),R.Pc=ce(P),R.Pc&&ce(P)){for(Z=0;4>Z;++Z)ce(P)&&(R.vd[Z]=me(P,6));for(Z=0;4>Z;++Z)ce(P)&&(R.od[Z]=me(P,6))}if(u.L=R.Tb==0?0:R.zd?1:2,P.Ka)return Hr(u,3,"cannot parse filter header");var de=I;if(I=j=E,E=j+de,R=de,u.Xb=(1<<pe(u.m,2))-1,de<3*(Z=u.Xb))x=7;else{for(j+=3*Z,R-=3*Z,de=0;de<Z;++de){var Fe=x[I+0]|x[I+1]<<8|x[I+2]<<16;Fe>R&&(Fe=R),le(u.Jc[+de],x,j,Fe),j+=Fe,R-=Fe,I+=3}le(u.Jc[+Z],x,j,R),x=j<E?0:5}if(x!=0)return Hr(u,x,"cannot parse partitions");for(x=pe(j=u.m,7),I=ce(j)?me(j,4):0,E=ce(j)?me(j,4):0,R=ce(j)?me(j,4):0,Z=ce(j)?me(j,4):0,j=ce(j)?me(j,4):0,de=u.Qa,Fe=0;4>Fe;++Fe){if(de.Cb){var Se=de.Zb[Fe];de.Fb||(Se+=x)}else{if(0<Fe){u.pb[Fe]=u.pb[0];continue}Se=x}var ye=u.pb[Fe];ye.Sc[0]=T2[vn(Se+I,127)],ye.Sc[1]=U2[vn(Se+0,127)],ye.Eb[0]=2*T2[vn(Se+E,127)],ye.Eb[1]=101581*U2[vn(Se+R,127)]>>16,8>ye.Eb[1]&&(ye.Eb[1]=8),ye.Qc[0]=T2[vn(Se+Z,117)],ye.Qc[1]=U2[vn(Se+j,127)],ye.lc=Se+j}if(!M.Rb)return Hr(u,4,"Not a key frame.");for(ce(P),M=u.Pa,x=0;4>x;++x){for(I=0;8>I;++I)for(E=0;3>E;++E)for(R=0;11>R;++R)Z=fe(P,OJ[x][I][E][R])?pe(P,8):kJ[x][I][E][R],M.Wc[x][I].Yb[E][R]=Z;for(I=0;17>I;++I)M.Xc[x][I]=M.Wc[x][DJ[I]]}return u.kc=ce(P),u.kc&&(u.Bd=pe(P,8)),u.cb=1}function Gh(u,m,x,E,I,P,M){var R=m[I].Yb[x];for(x=0;16>I;++I){if(!fe(u,R[x+0]))return I;for(;!fe(u,R[x+1]);)if(R=m[++I].Yb[0],x=0,I==16)return 16;var j=m[I+1].Yb;if(fe(u,R[x+2])){var Z=u,de=0;if(fe(Z,(Se=R)[(Fe=x)+3]))if(fe(Z,Se[Fe+6])){for(R=0,Fe=2*(de=fe(Z,Se[Fe+8]))+(Se=fe(Z,Se[Fe+9+de])),de=0,Se=IJ[Fe];Se[R];++R)de+=de+fe(Z,Se[R]);de+=3+(8<<Fe)}else fe(Z,Se[Fe+7])?(de=7+2*fe(Z,165),de+=fe(Z,145)):de=5+fe(Z,159);else de=fe(Z,Se[Fe+4])?3+fe(Z,Se[Fe+5]):2;R=j[2]}else de=1,R=j[1];j=M+LJ[I],0>(Z=u).b&&ie(Z);var Fe,Se=Z.b,ye=(Fe=Z.Ca>>1)-(Z.I>>Se)>>31;--Z.b,Z.Ca+=ye,Z.Ca|=1,Z.I-=(Fe+1&ye)<<Se,P[j]=((de^ye)-ye)*E[(0<I)+0]}return 16}function _c(u){var m=u.rb[u.sb-1];m.la=0,m.Na=0,n(u.zc,0,0,u.zc.length),u.ja=0}function A2(u,m){if(u==null)return 0;if(m==null)return Hr(u,2,"NULL VP8Io parameter in VP8Decode().");if(!u.cb&&!Kh(u,m))return 0;if(e(u.cb),m.ac==null||m.ac(m)){m.ob&&(u.L=0);var x=g0[u.L];if(u.L==2?(u.yb=0,u.zb=0):(u.yb=m.v-x>>4,u.zb=m.j-x>>4,0>u.yb&&(u.yb=0),0>u.zb&&(u.zb=0)),u.Va=m.o+15+x>>4,u.Hb=m.va+15+x>>4,u.Hb>u.za&&(u.Hb=u.za),u.Va>u.Ub&&(u.Va=u.Ub),0<u.L){var E=u.ed;for(x=0;4>x;++x){var I;if(u.Qa.Cb){var P=u.Qa.Lb[x];u.Qa.Fb||(P+=E.Tb)}else P=E.Tb;for(I=0;1>=I;++I){var M=u.gd[x][I],R=P;if(E.Pc&&(R+=E.vd[0],I&&(R+=E.od[0])),0<(R=0>R?0:63<R?63:R)){var j=R;0<E.wb&&(j=4<E.wb?j>>2:j>>1)>9-E.wb&&(j=9-E.wb),1>j&&(j=1),M.dd=j,M.tc=2*R+j,M.ld=40<=R?2:15<=R?1:0}else M.tc=0;M.La=I}}}x=0}else Hr(u,6,"Frame setup failed"),x=u.a;if(x=x==0){if(x){u.$c=0,0<u.Aa||(u.Ic=qJ);e:{x=u.Ic,E=4*(j=u.za);var Z=32*j,de=j+1,Fe=0<u.L?j*(0<u.Aa?2:1):0,Se=(u.Aa==2?2:1)*j;if((M=E+832+(I=3*(16*x+g0[u.L])/2*Z)+(P=u.Fa!=null&&0<u.Fa.length?u.Kc.c*u.Kc.i:0))!=M)x=0;else{if(M>u.Vb){if(u.Vb=0,u.Ec=a(M),u.Fc=0,u.Ec==null){x=Hr(u,1,"no memory during frame initialization.");break e}u.Vb=M}M=u.Ec,R=u.Fc,u.Ac=M,u.Bc=R,R+=E,u.Gd=i(Z,Ta),u.Hd=0,u.rb=i(de+1,bt),u.sb=1,u.wa=Fe?i(Fe,Vt):null,u.Y=0,u.D.Nb=0,u.D.wa=u.wa,u.D.Y=u.Y,0<u.Aa&&(u.D.Y+=j),e(!0),u.oc=M,u.pc=R,R+=832,u.ya=i(Se,rn),u.aa=0,u.D.ya=u.ya,u.D.aa=u.aa,u.Aa==2&&(u.D.aa+=j),u.R=16*j,u.B=8*j,j=(Z=g0[u.L])*u.R,Z=Z/2*u.B,u.sa=M,u.ta=R+j,u.qa=u.sa,u.ra=u.ta+16*x*u.R+Z,u.Ha=u.qa,u.Ia=u.ra+8*x*u.B+Z,u.$c=0,R+=I,u.mb=P?M:null,u.nb=P?R:null,e(R+P<=u.Fc+u.Vb),_c(u),n(u.Ac,u.Bc,0,E),x=1}}if(x){if(m.ka=0,m.y=u.sa,m.O=u.ta,m.f=u.qa,m.N=u.ra,m.ea=u.Ha,m.Vd=u.Ia,m.fa=u.R,m.Rc=u.B,m.F=null,m.J=0,!Xb){for(x=-255;255>=x;++x)Gb[255+x]=0>x?-x:x;for(x=-1020;1020>=x;++x)jb[1020+x]=-128>x?-128:127<x?127:x;for(x=-112;112>=x;++x)zb[112+x]=-16>x?-16:15<x?15:x;for(x=-255;510>=x;++x)Wb[255+x]=0>x?0:255<x?255:x;Xb=1}oa=i2,tl=n2,Vi=zh,la=a2,ni=Wh,Xc=jh,Ds=kc,rl=Qs,Ps=w2,Ki=Qc,$c=v2,Ln=zo,ai=Oc,pr=r0,mr=t0,Vr=ti,AA=Di,ii=m2,ca[0]=Na,ca[1]=s2,ca[2]=f2,ca[3]=u2,ca[4]=qh,ca[5]=Go,ca[6]=Yh,ca[7]=Nc,ca[8]=d2,ca[9]=h2,ji[0]=Xh,ji[1]=l2,ji[2]=ei,ji[3]=Vo,ji[4]=QA,ji[5]=c2,ji[6]=$h,si[0]=Oi,si[1]=o2,si[2]=g2,si[3]=Ic,si[4]=ks,si[5]=p2,si[6]=Lc,x=1}else x=0}x&&(x=function(ye,Pe){for(ye.M=0;ye.M<ye.Va;++ye.M){var Ne,ge=ye.Jc[ye.M&ye.Xb],Be=ye.m,Oe=ye;for(Ne=0;Ne<Oe.za;++Ne){var Ge=Be,De=Oe,lt=De.Ac,At=De.Bc+4*Ne,wt=De.zc,at=De.ya[De.aa+Ne];if(De.Qa.Bb?at.$b=fe(Ge,De.Pa.jb[0])?2+fe(Ge,De.Pa.jb[2]):fe(Ge,De.Pa.jb[1]):at.$b=0,De.kc&&(at.Ad=fe(Ge,De.Bd)),at.Za=!fe(Ge,145)+0,at.Za){var Yt=at.Ob,ar=0;for(De=0;4>De;++De){var zt,Rt=wt[0+De];for(zt=0;4>zt;++zt){Rt=QJ[lt[At+zt]][Rt];for(var ur=Jb[fe(Ge,Rt[0])];0<ur;)ur=Jb[2*ur+fe(Ge,Rt[ur])];Rt=-ur,lt[At+zt]=Rt}A(Yt,ar,lt,At,4),ar+=4,wt[0+De]=Rt}}else Rt=fe(Ge,156)?fe(Ge,128)?1:3:fe(Ge,163)?2:0,at.Ob[0]=Rt,n(lt,At,Rt,4),n(wt,0,Rt,4);at.Dd=fe(Ge,142)?fe(Ge,114)?fe(Ge,183)?1:3:2:0}if(Oe.m.Ka)return Hr(ye,7,"Premature end-of-partition0 encountered.");for(;ye.ja<ye.za;++ye.ja){if(Oe=ge,Ge=(Be=ye).rb[Be.sb-1],lt=Be.rb[Be.sb+Be.ja],Ne=Be.ya[Be.aa+Be.ja],At=Be.kc?Ne.Ad:0)Ge.la=lt.la=0,Ne.Za||(Ge.Na=lt.Na=0),Ne.Hc=0,Ne.Gc=0,Ne.ia=0;else{var lr,Lt;if(Ge=lt,lt=Oe,At=Be.Pa.Xc,wt=Be.ya[Be.aa+Be.ja],at=Be.pb[wt.$b],De=wt.ad,Yt=0,ar=Be.rb[Be.sb-1],Rt=zt=0,n(De,Yt,0,384),wt.Za)var Yr=0,sn=At[3];else{ur=a(16);var Jr=Ge.Na+ar.Na;if(Jr=qc(lt,At[1],Jr,at.Eb,0,ur,0),Ge.Na=ar.Na=(0<Jr)+0,1<Jr)oa(ur,0,De,Yt);else{var on=ur[0]+3>>3;for(ur=0;256>ur;ur+=16)De[Yt+ur]=on}Yr=1,sn=At[0]}var ir=15&Ge.la,Bn=15&ar.la;for(ur=0;4>ur;++ur){var yn=1&Bn;for(on=Lt=0;4>on;++on)ir=ir>>1|(yn=(Jr=qc(lt,sn,Jr=yn+(1&ir),at.Sc,Yr,De,Yt))>Yr)<<7,Lt=Lt<<2|(3<Jr?3:1<Jr?2:De[Yt+0]!=0),Yt+=16;ir>>=4,Bn=Bn>>1|yn<<7,zt=(zt<<8|Lt)>>>0}for(sn=ir,Yr=Bn>>4,lr=0;4>lr;lr+=2){for(Lt=0,ir=Ge.la>>4+lr,Bn=ar.la>>4+lr,ur=0;2>ur;++ur){for(yn=1&Bn,on=0;2>on;++on)Jr=yn+(1&ir),ir=ir>>1|(yn=0<(Jr=qc(lt,At[2],Jr,at.Qc,0,De,Yt)))<<3,Lt=Lt<<2|(3<Jr?3:1<Jr?2:De[Yt+0]!=0),Yt+=16;ir>>=2,Bn=Bn>>1|yn<<5}Rt|=Lt<<4*lr,sn|=ir<<4<<lr,Yr|=(240&Bn)<<lr}Ge.la=sn,ar.la=Yr,wt.Hc=zt,wt.Gc=Rt,wt.ia=43690&Rt?0:at.ia,At=!(zt|Rt)}if(0<Be.L&&(Be.wa[Be.Y+Be.ja]=Be.gd[Ne.$b][Ne.Za],Be.wa[Be.Y+Be.ja].La|=!At),Oe.Ka)return Hr(ye,7,"Premature end-of-file encountered.")}if(_c(ye),Be=Pe,Oe=1,Ne=(ge=ye).D,Ge=0<ge.L&&ge.M>=ge.zb&&ge.M<=ge.Va,ge.Aa==0)e:{if(Ne.M=ge.M,Ne.uc=Ge,Vc(ge,Ne),Oe=1,Ne=(Lt=ge.D).Nb,Ge=(Rt=g0[ge.L])*ge.R,lt=Rt/2*ge.B,ur=16*Ne*ge.R,on=8*Ne*ge.B,At=ge.sa,wt=ge.ta-Ge+ur,at=ge.qa,De=ge.ra-lt+on,Yt=ge.Ha,ar=ge.Ia-lt+on,Bn=(ir=Lt.M)==0,zt=ir>=ge.Va-1,ge.Aa==2&&Vc(ge,Lt),Lt.uc)for(yn=(Jr=ge).D.M,e(Jr.D.uc),Lt=Jr.yb;Lt<Jr.Hb;++Lt){Yr=Lt,sn=yn;var fA=(CA=(Lr=Jr).D).Nb;lr=Lr.R;var CA=CA.wa[CA.Y+Yr],WA=Lr.sa,On=Lr.ta+16*fA*lr+16*Yr,La=CA.dd,uA=CA.tc;if(uA!=0)if(e(3<=uA),Lr.L==1)0<Yr&&Vr(WA,On,lr,uA+4),CA.La&&ii(WA,On,lr,uA),0<sn&&mr(WA,On,lr,uA+4),CA.La&&AA(WA,On,lr,uA);else{var oi=Lr.B,Ms=Lr.qa,nl=Lr.ra+8*fA*oi+8*Yr,Wi=Lr.Ha,Lr=Lr.Ia+8*fA*oi+8*Yr;fA=CA.ld,0<Yr&&(rl(WA,On,lr,uA+4,La,fA),Ki(Ms,nl,Wi,Lr,oi,uA+4,La,fA)),CA.La&&(Ln(WA,On,lr,uA,La,fA),pr(Ms,nl,Wi,Lr,oi,uA,La,fA)),0<sn&&(Ds(WA,On,lr,uA+4,La,fA),Ps(Ms,nl,Wi,Lr,oi,uA+4,La,fA)),CA.La&&($c(WA,On,lr,uA,La,fA),ai(Ms,nl,Wi,Lr,oi,uA,La,fA))}}if(ge.ia&&alert("todo:DitherRow"),Be.put!=null){if(Lt=16*ir,ir=16*(ir+1),Bn?(Be.y=ge.sa,Be.O=ge.ta+ur,Be.f=ge.qa,Be.N=ge.ra+on,Be.ea=ge.Ha,Be.W=ge.Ia+on):(Lt-=Rt,Be.y=At,Be.O=wt,Be.f=at,Be.N=De,Be.ea=Yt,Be.W=ar),zt||(ir-=Rt),ir>Be.o&&(ir=Be.o),Be.F=null,Be.J=null,ge.Fa!=null&&0<ge.Fa.length&&Lt<ir&&(Be.J=Rc(ge,Be,Lt,ir-Lt),Be.F=ge.mb,Be.F==null&&Be.F.length==0)){Oe=Hr(ge,3,"Could not decode alpha data.");break e}Lt<Be.j&&(Rt=Be.j-Lt,Lt=Be.j,e(!(1&Rt)),Be.O+=ge.R*Rt,Be.N+=ge.B*(Rt>>1),Be.W+=ge.B*(Rt>>1),Be.F!=null&&(Be.J+=Be.width*Rt)),Lt<ir&&(Be.O+=Be.v,Be.N+=Be.v>>1,Be.W+=Be.v>>1,Be.F!=null&&(Be.J+=Be.v),Be.ka=Lt-Be.j,Be.U=Be.va-Be.v,Be.T=ir-Lt,Oe=Be.put(Be))}Ne+1!=ge.Ic||zt||(A(ge.sa,ge.ta-Ge,At,wt+16*ge.R,Ge),A(ge.qa,ge.ra-lt,at,De+8*ge.B,lt),A(ge.Ha,ge.Ia-lt,Yt,ar+8*ge.B,lt))}if(!Oe)return Hr(ye,6,"Output aborted.")}return 1}(u,m)),m.bc!=null&&m.bc(m),x&=1}return x?(u.cb=0,x):0}function Aa(u,m,x,E,I){I=u[m+x+32*E]+(I>>3),u[m+x+32*E]=-256&I?0>I?0:255:I}function Ho(u,m,x,E,I,P){Aa(u,m,0,x,E+I),Aa(u,m,1,x,E+P),Aa(u,m,2,x,E-P),Aa(u,m,3,x,E-I)}function An(u){return(20091*u>>16)+u}function Tc(u,m,x,E){var I,P=0,M=a(16);for(I=0;4>I;++I){var R=u[m+0]+u[m+8],j=u[m+0]-u[m+8],Z=(35468*u[m+4]>>16)-An(u[m+12]),de=An(u[m+4])+(35468*u[m+12]>>16);M[P+0]=R+de,M[P+1]=j+Z,M[P+2]=j-Z,M[P+3]=R-de,P+=4,m++}for(I=P=0;4>I;++I)R=(u=M[P+0]+4)+M[P+8],j=u-M[P+8],Z=(35468*M[P+4]>>16)-An(M[P+12]),Aa(x,E,0,0,R+(de=An(M[P+4])+(35468*M[P+12]>>16))),Aa(x,E,1,0,j+Z),Aa(x,E,2,0,j-Z),Aa(x,E,3,0,R-de),P++,E+=32}function jh(u,m,x,E){var I=u[m+0]+4,P=35468*u[m+4]>>16,M=An(u[m+4]),R=35468*u[m+1]>>16;Ho(x,E,0,I+M,u=An(u[m+1]),R),Ho(x,E,1,I+P,u,R),Ho(x,E,2,I-P,u,R),Ho(x,E,3,I-M,u,R)}function n2(u,m,x,E,I){Tc(u,m,x,E),I&&Tc(u,m+16,x,E+4)}function zh(u,m,x,E){tl(u,m+0,x,E,1),tl(u,m+32,x,E+128,1)}function a2(u,m,x,E){var I;for(u=u[m+0]+4,I=0;4>I;++I)for(m=0;4>m;++m)Aa(x,E,m,I,u)}function Wh(u,m,x,E){u[m+0]&&la(u,m+0,x,E),u[m+16]&&la(u,m+16,x,E+4),u[m+32]&&la(u,m+32,x,E+128),u[m+48]&&la(u,m+48,x,E+128+4)}function i2(u,m,x,E){var I,P=a(16);for(I=0;4>I;++I){var M=u[m+0+I]+u[m+12+I],R=u[m+4+I]+u[m+8+I],j=u[m+4+I]-u[m+8+I],Z=u[m+0+I]-u[m+12+I];P[0+I]=M+R,P[8+I]=M-R,P[4+I]=Z+j,P[12+I]=Z-j}for(I=0;4>I;++I)M=(u=P[0+4*I]+3)+P[3+4*I],R=P[1+4*I]+P[2+4*I],j=P[1+4*I]-P[2+4*I],Z=u-P[3+4*I],x[E+0]=M+R>>3,x[E+16]=Z+j>>3,x[E+32]=M-R>>3,x[E+48]=Z-j>>3,E+=64}function Uc(u,m,x){var E,I=m-32,P=wn,M=255-u[I-1];for(E=0;E<x;++E){var R,j=P,Z=M+u[m-1];for(R=0;R<x;++R)u[m+R]=j[Z+u[I+R]];m+=32}}function s2(u,m){Uc(u,m,4)}function o2(u,m){Uc(u,m,8)}function l2(u,m){Uc(u,m,16)}function ei(u,m){var x;for(x=0;16>x;++x)A(u,m+32*x,u,m-32,16)}function Vo(u,m){var x;for(x=16;0<x;--x)n(u,m,u[m-1],16),m+=32}function Ko(u,m,x){var E;for(E=0;16>E;++E)n(m,x+32*E,u,16)}function Xh(u,m){var x,E=16;for(x=0;16>x;++x)E+=u[m-1+32*x]+u[m+x-32];Ko(E>>5,u,m)}function QA(u,m){var x,E=8;for(x=0;16>x;++x)E+=u[m-1+32*x];Ko(E>>4,u,m)}function c2(u,m){var x,E=8;for(x=0;16>x;++x)E+=u[m+x-32];Ko(E>>4,u,m)}function $h(u,m){Ko(128,u,m)}function Ft(u,m,x){return u+2*m+x+2>>2}function f2(u,m){var x,E=m-32;for(E=new Uint8Array([Ft(u[E-1],u[E+0],u[E+1]),Ft(u[E+0],u[E+1],u[E+2]),Ft(u[E+1],u[E+2],u[E+3]),Ft(u[E+2],u[E+3],u[E+4])]),x=0;4>x;++x)A(u,m+32*x,E,0,E.length)}function u2(u,m){var x=u[m-1],E=u[m-1+32],I=u[m-1+64],P=u[m-1+96];xe(u,m+0,16843009*Ft(u[m-1-32],x,E)),xe(u,m+32,16843009*Ft(x,E,I)),xe(u,m+64,16843009*Ft(E,I,P)),xe(u,m+96,16843009*Ft(I,P,P))}function Na(u,m){var x,E=4;for(x=0;4>x;++x)E+=u[m+x-32]+u[m-1+32*x];for(E>>=3,x=0;4>x;++x)n(u,m+32*x,E,4)}function qh(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1-32],M=u[m+0-32],R=u[m+1-32],j=u[m+2-32],Z=u[m+3-32];u[m+0+96]=Ft(E,I,u[m-1+96]),u[m+1+96]=u[m+0+64]=Ft(x,E,I),u[m+2+96]=u[m+1+64]=u[m+0+32]=Ft(P,x,E),u[m+3+96]=u[m+2+64]=u[m+1+32]=u[m+0+0]=Ft(M,P,x),u[m+3+64]=u[m+2+32]=u[m+1+0]=Ft(R,M,P),u[m+3+32]=u[m+2+0]=Ft(j,R,M),u[m+3+0]=Ft(Z,j,R)}function Yh(u,m){var x=u[m+1-32],E=u[m+2-32],I=u[m+3-32],P=u[m+4-32],M=u[m+5-32],R=u[m+6-32],j=u[m+7-32];u[m+0+0]=Ft(u[m+0-32],x,E),u[m+1+0]=u[m+0+32]=Ft(x,E,I),u[m+2+0]=u[m+1+32]=u[m+0+64]=Ft(E,I,P),u[m+3+0]=u[m+2+32]=u[m+1+64]=u[m+0+96]=Ft(I,P,M),u[m+3+32]=u[m+2+64]=u[m+1+96]=Ft(P,M,R),u[m+3+64]=u[m+2+96]=Ft(M,R,j),u[m+3+96]=Ft(R,j,j)}function Go(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1-32],M=u[m+0-32],R=u[m+1-32],j=u[m+2-32],Z=u[m+3-32];u[m+0+0]=u[m+1+64]=P+M+1>>1,u[m+1+0]=u[m+2+64]=M+R+1>>1,u[m+2+0]=u[m+3+64]=R+j+1>>1,u[m+3+0]=j+Z+1>>1,u[m+0+96]=Ft(I,E,x),u[m+0+64]=Ft(E,x,P),u[m+0+32]=u[m+1+96]=Ft(x,P,M),u[m+1+32]=u[m+2+96]=Ft(P,M,R),u[m+2+32]=u[m+3+96]=Ft(M,R,j),u[m+3+32]=Ft(R,j,Z)}function Nc(u,m){var x=u[m+0-32],E=u[m+1-32],I=u[m+2-32],P=u[m+3-32],M=u[m+4-32],R=u[m+5-32],j=u[m+6-32],Z=u[m+7-32];u[m+0+0]=x+E+1>>1,u[m+1+0]=u[m+0+64]=E+I+1>>1,u[m+2+0]=u[m+1+64]=I+P+1>>1,u[m+3+0]=u[m+2+64]=P+M+1>>1,u[m+0+32]=Ft(x,E,I),u[m+1+32]=u[m+0+96]=Ft(E,I,P),u[m+2+32]=u[m+1+96]=Ft(I,P,M),u[m+3+32]=u[m+2+96]=Ft(P,M,R),u[m+3+64]=Ft(M,R,j),u[m+3+96]=Ft(R,j,Z)}function h2(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1+96];u[m+0+0]=x+E+1>>1,u[m+2+0]=u[m+0+32]=E+I+1>>1,u[m+2+32]=u[m+0+64]=I+P+1>>1,u[m+1+0]=Ft(x,E,I),u[m+3+0]=u[m+1+32]=Ft(E,I,P),u[m+3+32]=u[m+1+64]=Ft(I,P,P),u[m+3+64]=u[m+2+64]=u[m+0+96]=u[m+1+96]=u[m+2+96]=u[m+3+96]=P}function d2(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1+96],M=u[m-1-32],R=u[m+0-32],j=u[m+1-32],Z=u[m+2-32];u[m+0+0]=u[m+2+32]=x+M+1>>1,u[m+0+32]=u[m+2+64]=E+x+1>>1,u[m+0+64]=u[m+2+96]=I+E+1>>1,u[m+0+96]=P+I+1>>1,u[m+3+0]=Ft(R,j,Z),u[m+2+0]=Ft(M,R,j),u[m+1+0]=u[m+3+32]=Ft(x,M,R),u[m+1+32]=u[m+3+64]=Ft(E,x,M),u[m+1+64]=u[m+3+96]=Ft(I,E,x),u[m+1+96]=Ft(P,I,E)}function g2(u,m){var x;for(x=0;8>x;++x)A(u,m+32*x,u,m-32,8)}function Ic(u,m){var x;for(x=0;8>x;++x)n(u,m,u[m-1],8),m+=32}function Ls(u,m,x){var E;for(E=0;8>E;++E)n(m,x+32*E,u,8)}function Oi(u,m){var x,E=8;for(x=0;8>x;++x)E+=u[m+x-32]+u[m-1+32*x];Ls(E>>4,u,m)}function p2(u,m){var x,E=4;for(x=0;8>x;++x)E+=u[m+x-32];Ls(E>>3,u,m)}function ks(u,m){var x,E=4;for(x=0;8>x;++x)E+=u[m-1+32*x];Ls(E>>3,u,m)}function Lc(u,m){Ls(128,u,m)}function jo(u,m,x){var E=u[m-x],I=u[m+0],P=3*(I-E)+b2[1020+u[m-2*x]-u[m+x]],M=s0[112+(P+4>>3)];u[m-x]=wn[255+E+s0[112+(P+3>>3)]],u[m+0]=wn[255+I-M]}function Jh(u,m,x,E){var I=u[m+0],P=u[m+x];return kn[255+u[m-2*x]-u[m-x]]>E||kn[255+P-I]>E}function Zh(u,m,x,E){return 4*kn[255+u[m-x]-u[m+0]]+kn[255+u[m-2*x]-u[m+x]]<=E}function e0(u,m,x,E,I){var P=u[m-3*x],M=u[m-2*x],R=u[m-x],j=u[m+0],Z=u[m+x],de=u[m+2*x],Fe=u[m+3*x];return 4*kn[255+R-j]+kn[255+M-Z]>E?0:kn[255+u[m-4*x]-P]<=I&&kn[255+P-M]<=I&&kn[255+M-R]<=I&&kn[255+Fe-de]<=I&&kn[255+de-Z]<=I&&kn[255+Z-j]<=I}function t0(u,m,x,E){var I=2*E+1;for(E=0;16>E;++E)Zh(u,m+E,x,I)&&jo(u,m+E,x)}function ti(u,m,x,E){var I=2*E+1;for(E=0;16>E;++E)Zh(u,m+E*x,1,I)&&jo(u,m+E*x,1)}function Di(u,m,x,E){var I;for(I=3;0<I;--I)t0(u,m+=4*x,x,E)}function m2(u,m,x,E){var I;for(I=3;0<I;--I)ti(u,m+=4,x,E)}function Pi(u,m,x,E,I,P,M,R){for(P=2*P+1;0<I--;){if(e0(u,m,x,P,M))if(Jh(u,m,x,R))jo(u,m,x);else{var j=u,Z=m,de=x,Fe=j[Z-2*de],Se=j[Z-de],ye=j[Z+0],Pe=j[Z+de],Ne=j[Z+2*de],ge=27*(Oe=b2[1020+3*(ye-Se)+b2[1020+Fe-Pe]])+63>>7,Be=18*Oe+63>>7,Oe=9*Oe+63>>7;j[Z-3*de]=wn[255+j[Z-3*de]+Oe],j[Z-2*de]=wn[255+Fe+Be],j[Z-de]=wn[255+Se+ge],j[Z+0]=wn[255+ye-ge],j[Z+de]=wn[255+Pe-Be],j[Z+2*de]=wn[255+Ne-Oe]}m+=E}}function na(u,m,x,E,I,P,M,R){for(P=2*P+1;0<I--;){if(e0(u,m,x,P,M))if(Jh(u,m,x,R))jo(u,m,x);else{var j=u,Z=m,de=x,Fe=j[Z-de],Se=j[Z+0],ye=j[Z+de],Pe=s0[112+((Ne=3*(Se-Fe))+4>>3)],Ne=s0[112+(Ne+3>>3)],ge=Pe+1>>1;j[Z-2*de]=wn[255+j[Z-2*de]+ge],j[Z-de]=wn[255+Fe+Ne],j[Z+0]=wn[255+Se-Pe],j[Z+de]=wn[255+ye-ge]}m+=E}}function kc(u,m,x,E,I,P){Pi(u,m,x,1,16,E,I,P)}function Qs(u,m,x,E,I,P){Pi(u,m,1,x,16,E,I,P)}function v2(u,m,x,E,I,P){var M;for(M=3;0<M;--M)na(u,m+=4*x,x,1,16,E,I,P)}function zo(u,m,x,E,I,P){var M;for(M=3;0<M;--M)na(u,m+=4,1,x,16,E,I,P)}function w2(u,m,x,E,I,P,M,R){Pi(u,m,I,1,8,P,M,R),Pi(x,E,I,1,8,P,M,R)}function Qc(u,m,x,E,I,P,M,R){Pi(u,m,1,I,8,P,M,R),Pi(x,E,1,I,8,P,M,R)}function Oc(u,m,x,E,I,P,M,R){na(u,m+4*I,I,1,8,P,M,R),na(x,E+4*I,I,1,8,P,M,R)}function r0(u,m,x,E,I,P,M,R){na(u,m+4,1,I,8,P,M,R),na(x,E+4,1,I,8,P,M,R)}function Wo(){this.ba=new rA,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Gt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Dc(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Pc(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function A0(){this.ua=0,this.Wa=new ne,this.vb=new ne,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Y,this.yc=new T}function B2(){this.xb=this.a=0,this.l=new Ua,this.ca=new rA,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new B,this.Pb=0,this.wd=new B,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new A0,this.ab=0,this.gc=i(4,Pc),this.Oc=0}function Xo(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ua,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Os(u,m,x,E,I,P,M){for(u=u==null?0:u[m+0],m=0;m<M;++m)I[P+m]=u+x[E+m]&255,u=I[P+m]}function Mc(u,m,x,E,I,P,M){var R;if(u==null)Os(null,null,x,E,I,P,M);else for(R=0;R<M;++R)I[P+R]=u[m+R]+x[E+R]&255}function Mi(u,m,x,E,I,P,M){if(u==null)Os(null,null,x,E,I,P,M);else{var R,j=u[m+0],Z=j,de=j;for(R=0;R<M;++R)Z=de+(j=u[m+R])-Z,de=x[E+R]+(-256&Z?0>Z?0:255:Z)&255,Z=j,I[P+R]=de}}function Rc(u,m,x,E){var I=m.width,P=m.o;if(e(u!=null&&m!=null),0>x||0>=E||x+E>P)return null;if(!u.Cc){if(u.ga==null){var M;if(u.ga=new Xo,(M=u.ga==null)||(M=m.width*m.o,e(u.Gb.length==0),u.Gb=a(M),u.Uc=0,u.Gb==null?M=0:(u.mb=u.Gb,u.nb=u.Uc,u.rc=null,M=1),M=!M),!M){M=u.ga;var R=u.Fa,j=u.P,Z=u.qc,de=u.mb,Fe=u.nb,Se=j+1,ye=Z-1,Pe=M.l;if(e(R!=null&&de!=null&&m!=null),zi[0]=null,zi[1]=Os,zi[2]=Mc,zi[3]=Mi,M.ca=de,M.tb=Fe,M.c=m.width,M.i=m.height,e(0<M.c&&0<M.i),1>=Z)m=0;else if(M.$a=R[j+0]>>0&3,M.Z=R[j+0]>>2&3,M.Lc=R[j+0]>>4&3,j=R[j+0]>>6&3,0>M.$a||1<M.$a||4<=M.Z||1<M.Lc||j)m=0;else if(Pe.put=zA,Pe.ac=Nr,Pe.bc=tn,Pe.ma=M,Pe.width=m.width,Pe.height=m.height,Pe.Da=m.Da,Pe.v=m.v,Pe.va=m.va,Pe.j=m.j,Pe.o=m.o,M.$a)e:{e(M.$a==1),m=Ue();t:for(;;){if(m==null){m=0;break e}if(e(M!=null),M.mc=m,m.c=M.c,m.i=M.i,m.l=M.l,m.l.ma=M,m.l.width=M.c,m.l.height=M.i,m.a=0,ve(m.m,R,Se,ye),!be(M.c,M.i,1,m,null)||(m.ab==1&&m.gc[0].hc==3&&z(m.s)?(M.ic=1,R=m.c*m.i,m.Ta=null,m.Ua=0,m.V=a(R),m.Ba=0,m.V==null?(m.a=1,m=0):m=1):(M.ic=0,m=ue(m,M.c)),!m))break t;m=1;break e}M.mc=null,m=0}else m=ye>=M.c*M.i;M=!m}if(M)return null;u.ga.Lc!=1?u.Ga=0:E=P-x}e(u.ga!=null),e(x+E<=P);e:{if(m=(R=u.ga).c,P=R.l.o,R.$a==0){if(Se=u.rc,ye=u.Vc,Pe=u.Fa,j=u.P+1+x*m,Z=u.mb,de=u.nb+x*m,e(j<=u.P+u.qc),R.Z!=0)for(e(zi[R.Z]!=null),M=0;M<E;++M)zi[R.Z](Se,ye,Pe,j,Z,de,m),Se=Z,ye=de,de+=m,j+=m;else for(M=0;M<E;++M)A(Z,de,Pe,j,m),Se=Z,ye=de,de+=m,j+=m;u.rc=Se,u.Vc=ye}else{if(e(R.mc!=null),m=x+E,e((M=R.mc)!=null),e(m<=M.i),M.C>=m)m=1;else if(R.ic||Ce(),R.ic){R=M.V,Se=M.Ba,ye=M.c;var Ne=M.i,ge=(Pe=1,j=M.$/ye,Z=M.$%ye,de=M.m,Fe=M.s,M.$),Be=ye*Ne,Oe=ye*m,Ge=Fe.wc,De=ge<Oe?yr(Fe,Z,j):null;e(ge<=Be),e(m<=Ne),e(z(Fe));t:for(;;){for(;!de.h&&ge<Oe;){if(Z&Ge||(De=yr(Fe,Z,j)),e(De!=null),G(de),256>(Ne=gr(De.G[0],De.H[0],de)))R[Se+ge]=Ne,++ge,++Z>=ye&&(Z=0,++j<=m&&!(j%16)&&ee(M,j));else{if(!(280>Ne)){Pe=0;break t}Ne=xA(Ne-256,de);var lt,At=gr(De.G[4],De.H[4],de);if(G(de),!(ge>=(At=kA(ye,At=xA(At,de)))&&Be-ge>=Ne)){Pe=0;break t}for(lt=0;lt<Ne;++lt)R[Se+ge+lt]=R[Se+ge+lt-At];for(ge+=Ne,Z+=Ne;Z>=ye;)Z-=ye,++j<=m&&!(j%16)&&ee(M,j);ge<Oe&&Z&Ge&&(De=yr(Fe,Z,j))}e(de.h==S(de))}ee(M,j>m?m:j);break t}!Pe||de.h&&ge<Be?(Pe=0,M.a=de.h?5:3):M.$=ge,m=Pe}else m=Ae(M,M.V,M.Ba,M.c,M.i,m,V);if(!m){E=0;break e}}x+E>=P&&(u.Cc=1),E=1}if(!E)return null;if(u.Cc&&((E=u.ga)!=null&&(E.mc=null),u.ga=null,0<u.Ga))return alert("todo:WebPDequantizeLevels"),null}return u.nb+x*I}function w(u,m,x,E,I,P){for(;0<I--;){var M,R=u,j=m+(x?1:0),Z=u,de=m+(x?0:3);for(M=0;M<E;++M){var Fe=Z[de+4*M];Fe!=255&&(Fe*=32897,R[j+4*M+0]=R[j+4*M+0]*Fe>>23,R[j+4*M+1]=R[j+4*M+1]*Fe>>23,R[j+4*M+2]=R[j+4*M+2]*Fe>>23)}m+=P}}function L(u,m,x,E,I){for(;0<E--;){var P;for(P=0;P<x;++P){var M=u[m+2*P+0],R=15&(Z=u[m+2*P+1]),j=4369*R,Z=(240&Z|Z>>4)*j>>16;u[m+2*P+0]=(240&M|M>>4)*j>>16&240|(15&M|M<<4)*j>>16>>4&15,u[m+2*P+1]=240&Z|R}m+=I}}function ae(u,m,x,E,I,P,M,R){var j,Z,de=255;for(Z=0;Z<I;++Z){for(j=0;j<E;++j){var Fe=u[m+j];P[M+4*j]=Fe,de&=Fe}m+=x,M+=R}return de!=255}function he(u,m,x,E,I){var P;for(P=0;P<I;++P)x[E+P]=u[m+P]>>8}function Ce(){Gi=w,Al=L,i0=ae,Kb=he}function Le(u,m,x){Q[u]=function(E,I,P,M,R,j,Z,de,Fe,Se,ye,Pe,Ne,ge,Be,Oe,Ge){var De,lt=Ge-1>>1,At=R[j+0]|Z[de+0]<<16,wt=Fe[Se+0]|ye[Pe+0]<<16;e(E!=null);var at=3*At+wt+131074>>2;for(m(E[I+0],255&at,at>>16,Ne,ge),P!=null&&(at=3*wt+At+131074>>2,m(P[M+0],255&at,at>>16,Be,Oe)),De=1;De<=lt;++De){var Yt=R[j+De]|Z[de+De]<<16,ar=Fe[Se+De]|ye[Pe+De]<<16,zt=At+Yt+wt+ar+524296,Rt=zt+2*(Yt+wt)>>3;at=Rt+At>>1,At=(zt=zt+2*(At+ar)>>3)+Yt>>1,m(E[I+2*De-1],255&at,at>>16,Ne,ge+(2*De-1)*x),m(E[I+2*De-0],255&At,At>>16,Ne,ge+(2*De-0)*x),P!=null&&(at=zt+wt>>1,At=Rt+ar>>1,m(P[M+2*De-1],255&at,at>>16,Be,Oe+(2*De-1)*x),m(P[M+2*De+0],255&At,At>>16,Be,Oe+(2*De+0)*x)),At=Yt,wt=ar}1&Ge||(at=3*At+wt+131074>>2,m(E[I+Ge-1],255&at,at>>16,Ne,ge+(Ge-1)*x),P!=null&&(at=3*wt+At+131074>>2,m(P[M+Ge-1],255&at,at>>16,Be,Oe+(Ge-1)*x)))}}function We(){Qn[o0]=MJ,Qn[l0]=eE,Qn[$b]=RJ,Qn[c0]=tE,Qn[f0]=rE,Qn[E2]=AE,Qn[qb]=HJ,Qn[F2]=eE,Qn[S2]=tE,Qn[u0]=rE,Qn[_2]=AE}function ot(u){return u&~VJ?0>u?0:255:u>>nE}function mt(u,m){return ot((19077*u>>8)+(26149*m>>8)-14234)}function It(u,m,x){return ot((19077*u>>8)-(6419*m>>8)-(13320*x>>8)+8708)}function Dt(u,m){return ot((19077*u>>8)+(33050*m>>8)-17685)}function jt(u,m,x,E,I){E[I+0]=mt(u,x),E[I+1]=It(u,m,x),E[I+2]=Dt(u,m)}function Er(u,m,x,E,I){E[I+0]=Dt(u,m),E[I+1]=It(u,m,x),E[I+2]=mt(u,x)}function Ir(u,m,x,E,I){var P=It(u,m,x);m=P<<3&224|Dt(u,m)>>3,E[I+0]=248&mt(u,x)|P>>5,E[I+1]=m}function qr(u,m,x,E,I){var P=240&Dt(u,m)|15;E[I+0]=240&mt(u,x)|It(u,m,x)>>4,E[I+1]=P}function OA(u,m,x,E,I){E[I+0]=255,jt(u,m,x,E,I+1)}function cA(u,m,x,E,I){Er(u,m,x,E,I),E[I+3]=255}function aa(u,m,x,E,I){jt(u,m,x,E,I),E[I+3]=255}function vn(u,m){return 0>u?0:u>m?m:u}function ri(u,m,x){Q[u]=function(E,I,P,M,R,j,Z,de,Fe){for(var Se=de+(-2&Fe)*x;de!=Se;)m(E[I+0],P[M+0],R[j+0],Z,de),m(E[I+1],P[M+0],R[j+0],Z,de+x),I+=2,++M,++j,de+=2*x;1&Fe&&m(E[I+0],P[M+0],R[j+0],Z,de)}}function n0(u,m,x){return x==0?u==0?m==0?6:5:m==0?4:0:x}function Hc(u,m,x,E,I){switch(u>>>30){case 3:tl(m,x,E,I,0);break;case 2:Xc(m,x,E,I);break;case 1:la(m,x,E,I)}}function Vc(u,m){var x,E,I=m.M,P=m.Nb,M=u.oc,R=u.pc+40,j=u.oc,Z=u.pc+584,de=u.oc,Fe=u.pc+600;for(x=0;16>x;++x)M[R+32*x-1]=129;for(x=0;8>x;++x)j[Z+32*x-1]=129,de[Fe+32*x-1]=129;for(0<I?M[R-1-32]=j[Z-1-32]=de[Fe-1-32]=129:(n(M,R-32-1,127,21),n(j,Z-32-1,127,9),n(de,Fe-32-1,127,9)),E=0;E<u.za;++E){var Se=m.ya[m.aa+E];if(0<E){for(x=-1;16>x;++x)A(M,R+32*x-4,M,R+32*x+12,4);for(x=-1;8>x;++x)A(j,Z+32*x-4,j,Z+32*x+4,4),A(de,Fe+32*x-4,de,Fe+32*x+4,4)}var ye=u.Gd,Pe=u.Hd+E,Ne=Se.ad,ge=Se.Hc;if(0<I&&(A(M,R-32,ye[Pe].y,0,16),A(j,Z-32,ye[Pe].f,0,8),A(de,Fe-32,ye[Pe].ea,0,8)),Se.Za){var Be=M,Oe=R-32+16;for(0<I&&(E>=u.za-1?n(Be,Oe,ye[Pe].y[15],4):A(Be,Oe,ye[Pe+1].y,0,4)),x=0;4>x;x++)Be[Oe+128+x]=Be[Oe+256+x]=Be[Oe+384+x]=Be[Oe+0+x];for(x=0;16>x;++x,ge<<=2)Be=M,Oe=R+iE[x],ca[Se.Ob[x]](Be,Oe),Hc(ge,Ne,16*+x,Be,Oe)}else if(Be=n0(E,I,Se.Ob[0]),ji[Be](M,R),ge!=0)for(x=0;16>x;++x,ge<<=2)Hc(ge,Ne,16*+x,M,R+iE[x]);for(x=Se.Gc,Be=n0(E,I,Se.Dd),si[Be](j,Z),si[Be](de,Fe),ge=Ne,Be=j,Oe=Z,255&(Se=x>>0)&&(170&Se?Vi(ge,256,Be,Oe):ni(ge,256,Be,Oe)),Se=de,ge=Fe,255&(x>>=8)&&(170&x?Vi(Ne,320,Se,ge):ni(Ne,320,Se,ge)),I<u.Ub-1&&(A(ye[Pe].y,0,M,R+480,16),A(ye[Pe].f,0,j,Z+224,8),A(ye[Pe].ea,0,de,Fe+224,8)),x=8*P*u.B,ye=u.sa,Pe=u.ta+16*E+16*P*u.R,Ne=u.qa,Se=u.ra+8*E+x,ge=u.Ha,Be=u.Ia+8*E+x,x=0;16>x;++x)A(ye,Pe+x*u.R,M,R+32*x,16);for(x=0;8>x;++x)A(Ne,Se+x*u.B,j,Z+32*x,8),A(ge,Be+x*u.B,de,Fe+32*x,8)}}function $o(u,m,x,E,I,P,M,R,j){var Z=[0],de=[0],Fe=0,Se=j!=null?j.kd:0,ye=j??new Dc;if(u==null||12>x)return 7;ye.data=u,ye.w=m,ye.ha=x,m=[m],x=[x],ye.gb=[ye.gb];e:{var Pe=m,Ne=x,ge=ye.gb;if(e(u!=null),e(Ne!=null),e(ge!=null),ge[0]=0,12<=Ne[0]&&!r(u,Pe[0],"RIFF")){if(r(u,Pe[0]+8,"WEBP")){ge=3;break e}var Be=Xe(u,Pe[0]+4);if(12>Be||4294967286<Be){ge=3;break e}if(Se&&Be>Ne[0]-8){ge=7;break e}ge[0]=Be,Pe[0]+=12,Ne[0]-=12}ge=0}if(ge!=0)return ge;for(Be=0<ye.gb[0],x=x[0];;){e:{var Oe=u;Ne=m,ge=x;var Ge=Z,De=de,lt=Pe=[0];if((at=Fe=[Fe])[0]=0,8>ge[0])ge=7;else{if(!r(Oe,Ne[0],"VP8X")){if(Xe(Oe,Ne[0]+4)!=10){ge=3;break e}if(18>ge[0]){ge=7;break e}var At=Xe(Oe,Ne[0]+8),wt=1+Me(Oe,Ne[0]+12);if(2147483648<=wt*(Oe=1+Me(Oe,Ne[0]+15))){ge=3;break e}lt!=null&&(lt[0]=At),Ge!=null&&(Ge[0]=wt),De!=null&&(De[0]=Oe),Ne[0]+=18,ge[0]-=18,at[0]=1}ge=0}}if(Fe=Fe[0],Pe=Pe[0],ge!=0)return ge;if(Ne=!!(2&Pe),!Be&&Fe)return 3;if(P!=null&&(P[0]=!!(16&Pe)),M!=null&&(M[0]=Ne),R!=null&&(R[0]=0),M=Z[0],Pe=de[0],Fe&&Ne&&j==null){ge=0;break}if(4>x){ge=7;break}if(Be&&Fe||!Be&&!Fe&&!r(u,m[0],"ALPH")){x=[x],ye.na=[ye.na],ye.P=[ye.P],ye.Sa=[ye.Sa];e:{At=u,ge=m,Be=x;var at=ye.gb;Ge=ye.na,De=ye.P,lt=ye.Sa,wt=22,e(At!=null),e(Be!=null),Oe=ge[0];var Yt=Be[0];for(e(Ge!=null),e(lt!=null),Ge[0]=null,De[0]=null,lt[0]=0;;){if(ge[0]=Oe,Be[0]=Yt,8>Yt){ge=7;break e}var ar=Xe(At,Oe+4);if(4294967286<ar){ge=3;break e}var zt=8+ar+1&-2;if(wt+=zt,0<at&&wt>at){ge=3;break e}if(!r(At,Oe,"VP8 ")||!r(At,Oe,"VP8L")){ge=0;break e}if(Yt[0]<zt){ge=7;break e}r(At,Oe,"ALPH")||(Ge[0]=At,De[0]=Oe+8,lt[0]=ar),Oe+=zt,Yt-=zt}}if(x=x[0],ye.na=ye.na[0],ye.P=ye.P[0],ye.Sa=ye.Sa[0],ge!=0)break}x=[x],ye.Ja=[ye.Ja],ye.xa=[ye.xa];e:if(at=u,ge=m,Be=x,Ge=ye.gb[0],De=ye.Ja,lt=ye.xa,At=ge[0],Oe=!r(at,At,"VP8 "),wt=!r(at,At,"VP8L"),e(at!=null),e(Be!=null),e(De!=null),e(lt!=null),8>Be[0])ge=7;else{if(Oe||wt){if(at=Xe(at,At+4),12<=Ge&&at>Ge-12){ge=3;break e}if(Se&&at>Be[0]-8){ge=7;break e}De[0]=at,ge[0]+=8,Be[0]-=8,lt[0]=wt}else lt[0]=5<=Be[0]&&at[At+0]==47&&!(at[At+4]>>5),De[0]=Be[0];ge=0}if(x=x[0],ye.Ja=ye.Ja[0],ye.xa=ye.xa[0],m=m[0],ge!=0)break;if(4294967286<ye.Ja)return 3;if(R==null||Ne||(R[0]=ye.xa?2:1),M=[M],Pe=[Pe],ye.xa){if(5>x){ge=7;break}R=M,Se=Pe,Ne=P,u==null||5>x?u=0:5<=x&&u[m+0]==47&&!(u[m+4]>>5)?(Be=[0],at=[0],Ge=[0],ve(De=new B,u,m,x),gt(De,Be,at,Ge)?(R!=null&&(R[0]=Be[0]),Se!=null&&(Se[0]=at[0]),Ne!=null&&(Ne[0]=Ge[0]),u=1):u=0):u=0}else{if(10>x){ge=7;break}R=Pe,u==null||10>x||!Vh(u,m+3,x-3)?u=0:(Se=u[m+0]|u[m+1]<<8|u[m+2]<<16,Ne=16383&(u[m+7]<<8|u[m+6]),u=16383&(u[m+9]<<8|u[m+8]),1&Se||3<(Se>>1&7)||!(Se>>4&1)||Se>>5>=ye.Ja||!Ne||!u?u=0:(M&&(M[0]=Ne),R&&(R[0]=u),u=1))}if(!u||(M=M[0],Pe=Pe[0],Fe&&(Z[0]!=M||de[0]!=Pe)))return 3;j!=null&&(j[0]=ye,j.offset=m-j.w,e(4294967286>m-j.w),e(j.offset==j.ha-x));break}return ge==0||ge==7&&Fe&&j==null?(P!=null&&(P[0]|=ye.na!=null&&0<ye.na.length),E!=null&&(E[0]=M),I!=null&&(I[0]=Pe),0):ge}function Kc(u,m,x){var E=m.width,I=m.height,P=0,M=0,R=E,j=I;if(m.Da=u!=null&&0<u.Da,m.Da&&(R=u.cd,j=u.bd,P=u.v,M=u.j,11>x||(P&=-2,M&=-2),0>P||0>M||0>=R||0>=j||P+R>E||M+j>I))return 0;if(m.v=P,m.j=M,m.va=P+R,m.o=M+j,m.U=R,m.T=j,m.da=u!=null&&0<u.da,m.da){if(!Qe(R,j,x=[u.ib],P=[u.hb]))return 0;m.ib=x[0],m.hb=P[0]}return m.ob=u!=null&&u.ob,m.Kb=u==null||!u.Sd,m.da&&(m.ob=m.ib<3*E/4&&m.hb<3*I/4,m.Kb=0),1}function Gc(u){if(u==null)return 2;if(11>u.S){var m=u.f.RGBA;m.fb+=(u.height-1)*m.A,m.A=-m.A}else m=u.f.kb,u=u.height,m.O+=(u-1)*m.fa,m.fa=-m.fa,m.N+=(u-1>>1)*m.Ab,m.Ab=-m.Ab,m.W+=(u-1>>1)*m.Db,m.Db=-m.Db,m.F!=null&&(m.J+=(u-1)*m.lb,m.lb=-m.lb);return 0}function qo(u,m,x,E){if(E==null||0>=u||0>=m)return 2;if(x!=null){if(x.Da){var I=x.cd,P=x.bd,M=-2&x.v,R=-2&x.j;if(0>M||0>R||0>=I||0>=P||M+I>u||R+P>m)return 2;u=I,m=P}if(x.da){if(!Qe(u,m,I=[x.ib],P=[x.hb]))return 2;u=I[0],m=P[0]}}E.width=u,E.height=m;e:{var j=E.width,Z=E.height;if(u=E.S,0>=j||0>=Z||!(u>=o0&&13>u))u=2;else{if(0>=E.Rd&&E.sd==null){M=P=I=m=0;var de=(R=j*sE[u])*Z;if(11>u||(P=(Z+1)/2*(m=(j+1)/2),u==12&&(M=(I=j)*Z)),(Z=a(de+2*P+M))==null){u=1;break e}E.sd=Z,11>u?((j=E.f.RGBA).eb=Z,j.fb=0,j.A=R,j.size=de):((j=E.f.kb).y=Z,j.O=0,j.fa=R,j.Fd=de,j.f=Z,j.N=0+de,j.Ab=m,j.Cd=P,j.ea=Z,j.W=0+de+P,j.Db=m,j.Ed=P,u==12&&(j.F=Z,j.J=0+de+2*P),j.Tc=M,j.lb=I)}if(m=1,I=E.S,P=E.width,M=E.height,I>=o0&&13>I)if(11>I)u=E.f.RGBA,m&=(R=Math.abs(u.A))*(M-1)+P<=u.size,m&=R>=P*sE[I],m&=u.eb!=null;else{u=E.f.kb,R=(P+1)/2,de=(M+1)/2,j=Math.abs(u.fa),Z=Math.abs(u.Ab);var Fe=Math.abs(u.Db),Se=Math.abs(u.lb),ye=Se*(M-1)+P;m&=j*(M-1)+P<=u.Fd,m&=Z*(de-1)+R<=u.Cd,m=(m&=Fe*(de-1)+R<=u.Ed)&j>=P&Z>=R&Fe>=R,m&=u.y!=null,m&=u.f!=null,m&=u.ea!=null,I==12&&(m&=Se>=P,m&=ye<=u.Tc,m&=u.F!=null)}else m=0;u=m?0:2}}return u!=0||x!=null&&x.fd&&(u=Gc(E)),u}var nn=64,Yo=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Jo=24,Zo=32,jc=8,an=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];ze("Predictor0","PredictorAdd0"),Q.Predictor0=function(){return 4278190080},Q.Predictor1=function(u){return u},Q.Predictor2=function(u,m,x){return m[x+0]},Q.Predictor3=function(u,m,x){return m[x+1]},Q.Predictor4=function(u,m,x){return m[x-1]},Q.Predictor5=function(u,m,x){return Je(Je(u,m[x+1]),m[x+0])},Q.Predictor6=function(u,m,x){return Je(u,m[x-1])},Q.Predictor7=function(u,m,x){return Je(u,m[x+0])},Q.Predictor8=function(u,m,x){return Je(m[x-1],m[x+0])},Q.Predictor9=function(u,m,x){return Je(m[x+0],m[x+1])},Q.Predictor10=function(u,m,x){return Je(Je(u,m[x-1]),Je(m[x+0],m[x+1]))},Q.Predictor11=function(u,m,x){var E=m[x+0];return 0>=ht(E>>24&255,u>>24&255,(m=m[x-1])>>24&255)+ht(E>>16&255,u>>16&255,m>>16&255)+ht(E>>8&255,u>>8&255,m>>8&255)+ht(255&E,255&u,255&m)?E:u},Q.Predictor12=function(u,m,x){var E=m[x+0];return(st((u>>24&255)+(E>>24&255)-((m=m[x-1])>>24&255))<<24|st((u>>16&255)+(E>>16&255)-(m>>16&255))<<16|st((u>>8&255)+(E>>8&255)-(m>>8&255))<<8|st((255&u)+(255&E)-(255&m)))>>>0},Q.Predictor13=function(u,m,x){var E=m[x-1];return(nt((u=Je(u,m[x+0]))>>24&255,E>>24&255)<<24|nt(u>>16&255,E>>16&255)<<16|nt(u>>8&255,E>>8&255)<<8|nt(u>>0&255,E>>0&255))>>>0};var y2=Q.PredictorAdd0;Q.PredictorAdd1=vt,ze("Predictor2","PredictorAdd2"),ze("Predictor3","PredictorAdd3"),ze("Predictor4","PredictorAdd4"),ze("Predictor5","PredictorAdd5"),ze("Predictor6","PredictorAdd6"),ze("Predictor7","PredictorAdd7"),ze("Predictor8","PredictorAdd8"),ze("Predictor9","PredictorAdd9"),ze("Predictor10","PredictorAdd10"),ze("Predictor11","PredictorAdd11"),ze("Predictor12","PredictorAdd12"),ze("Predictor13","PredictorAdd13");var zc=Q.PredictorAdd2;xt("ColorIndexInverseTransform","MapARGB","32b",function(u){return u>>8&255},function(u){return u}),xt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(u){return u},function(u){return u>>8&255});var a0,ia=Q.ColorIndexInverseTransform,Wc=Q.MapARGB,x2=Q.VP8LColorIndexInverseTransformAlpha,C2=Q.MapAlpha,Ri=Q.VP8LPredictorsAdd=[];Ri.length=16,(Q.VP8LPredictors=[]).length=16,(Q.VP8LPredictorsAdd_C=[]).length=16,(Q.VP8LPredictors_C=[]).length=16;var In,sa,Hi,Ia,Ai,el,oa,tl,Xc,Vi,la,ni,Ds,rl,Ps,Ki,$c,Ln,ai,pr,mr,Vr,AA,ii,Gi,Al,i0,Kb,Gb=a(511),jb=a(2041),zb=a(225),Wb=a(767),Xb=0,b2=jb,s0=zb,wn=Wb,kn=Gb,o0=0,l0=1,$b=2,c0=3,f0=4,E2=5,qb=6,F2=7,S2=8,u0=9,_2=10,EJ=[2,3,7],FJ=[3,3,11],Yb=[280,256,256,256,40],SJ=[0,1,1,1,0],_J=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],TJ=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],UJ=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],NJ=8,T2=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],U2=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],qc=null,IJ=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],LJ=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Jb=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],kJ=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],QJ=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],OJ=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],DJ=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ji=[],ca=[],si=[],PJ=1,Zb=2,zi=[],Qn=[];Le("UpsampleRgbLinePair",jt,3),Le("UpsampleBgrLinePair",Er,3),Le("UpsampleRgbaLinePair",aa,4),Le("UpsampleBgraLinePair",cA,4),Le("UpsampleArgbLinePair",OA,4),Le("UpsampleRgba4444LinePair",qr,2),Le("UpsampleRgb565LinePair",Ir,2);var MJ=Q.UpsampleRgbLinePair,RJ=Q.UpsampleBgrLinePair,eE=Q.UpsampleRgbaLinePair,tE=Q.UpsampleBgraLinePair,rE=Q.UpsampleArgbLinePair,AE=Q.UpsampleRgba4444LinePair,HJ=Q.UpsampleRgb565LinePair,h0=16,d0=1<<h0-1,Yc=-227,N2=482,nE=6,VJ=(256<<nE)-1,aE=0,KJ=a(256),GJ=a(256),jJ=a(256),zJ=a(256),WJ=a(N2-Yc),XJ=a(N2-Yc);ri("YuvToRgbRow",jt,3),ri("YuvToBgrRow",Er,3),ri("YuvToRgbaRow",aa,4),ri("YuvToBgraRow",cA,4),ri("YuvToArgbRow",OA,4),ri("YuvToRgba4444Row",qr,2),ri("YuvToRgb565Row",Ir,2);var iE=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],g0=[0,2,8],$J=[8,7,6,4,4,2,2,2,1,1,1,1],qJ=1;this.WebPDecodeRGBA=function(u,m,x,E,I){var P=l0,M=new Wo,R=new rA;M.ba=R,R.S=P,R.width=[R.width],R.height=[R.height];var j=R.width,Z=R.height,de=new Et;if(de==null||u==null)var Fe=2;else e(de!=null),Fe=$o(u,m,x,de.width,de.height,de.Pd,de.Qd,de.format,null);if(Fe!=0?j=0:(j!=null&&(j[0]=de.width[0]),Z!=null&&(Z[0]=de.height[0]),j=1),j){R.width=R.width[0],R.height=R.height[0],E!=null&&(E[0]=R.width),I!=null&&(I[0]=R.height);e:{if(E=new Ua,(I=new Dc).data=u,I.w=m,I.ha=x,I.kd=1,m=[0],e(I!=null),((u=$o(I.data,I.w,I.ha,null,null,null,m,null,I))==0||u==7)&&m[0]&&(u=4),(m=u)==0){if(e(M!=null),E.data=I.data,E.w=I.w+I.offset,E.ha=I.ha-I.offset,E.put=zA,E.ac=Nr,E.bc=tn,E.ma=M,I.xa){if((u=Ue())==null){M=1;break e}if(function(Se,ye){var Pe=[0],Ne=[0],ge=[0];t:for(;;){if(Se==null)return 0;if(ye==null)return Se.a=2,0;if(Se.l=ye,Se.a=0,ve(Se.m,ye.data,ye.w,ye.ha),!gt(Se.m,Pe,Ne,ge)){Se.a=3;break t}if(Se.xb=Zb,ye.width=Pe[0],ye.height=Ne[0],!be(Pe[0],Ne[0],1,Se,null))break t;return 1}return e(Se.a!=0),0}(u,E)){if(E=(m=qo(E.width,E.height,M.Oa,M.ba))==0){t:{E=u;r:for(;;){if(E==null){E=0;break t}if(e(E.s.yc!=null),e(E.s.Ya!=null),e(0<E.s.Wb),e((x=E.l)!=null),e((I=x.ma)!=null),E.xb!=0){if(E.ca=I.ba,E.tb=I.tb,e(E.ca!=null),!Kc(I.Oa,x,c0)){E.a=2;break r}if(!ue(E,x.width)||x.da)break r;if((x.da||Pt(E.ca.S))&&Ce(),11>E.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),E.ca.f.kb.F!=null&&Ce()),E.Pb&&0<E.s.ua&&E.s.vb.X==null&&!$e(E.s.vb,E.s.Wa.Xa)){E.a=1;break r}E.xb=0}if(!Ae(E,E.V,E.Ba,E.c,E.i,x.o,te))break r;I.Dc=E.Ma,E=1;break t}e(E.a!=0),E=0}E=!E}E&&(m=u.a)}else m=u.a}else{if((u=new mn)==null){M=1;break e}if(u.Fa=I.na,u.P=I.P,u.qc=I.Sa,Kh(u,E)){if((m=qo(E.width,E.height,M.Oa,M.ba))==0){if(u.Aa=0,x=M.Oa,e((I=u)!=null),x!=null){if(0<(j=0>(j=x.Md)?0:100<j?255:255*j/100)){for(Z=de=0;4>Z;++Z)12>(Fe=I.pb[Z]).lc&&(Fe.ia=j*$J[0>Fe.lc?0:Fe.lc]>>3),de|=Fe.ia;de&&(alert("todo:VP8InitRandom"),I.ia=1)}I.Ga=x.Id,100<I.Ga?I.Ga=100:0>I.Ga&&(I.Ga=0)}A2(u,E)||(m=u.a)}}else m=u.a}m==0&&M.Oa!=null&&M.Oa.fd&&(m=Gc(M.ba))}M=m}P=M!=0?null:11>P?R.f.RGBA.eb:R.f.kb.y}else P=null;return P};var sE=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(Q,K){for(var re="",U=0;U<4;U++)re+=String.fromCharCode(Q[K++]);return re}function c(Q,K){return(Q[K+0]<<0|Q[K+1]<<8|Q[K+2]<<16)>>>0}function d(Q,K){return(Q[K+0]<<0|Q[K+1]<<8|Q[K+2]<<16|Q[K+3]<<24)>>>0}new o;var g=[0],h=[0],p=[],v=new o,y=t,C=function(Q,K){var re={},U=0,T=!1,H=0,Y=0;if(re.frames=[],!function(_,S,N,G){for(var ie=0;ie<G;ie++)if(_[S+ie]!=N.charCodeAt(ie))return!0;return!1}(Q,K,"RIFF",4)){var le,pe;for(d(Q,K+=4),K+=8;K<Q.length;){var me=l(Q,K),ve=d(Q,K+=4);K+=4;var se=ve+(1&ve);switch(me){case"VP8 ":case"VP8L":re.frames[U]===void 0&&(re.frames[U]={}),(B=re.frames[U]).src_off=T?Y:K-8,B.src_size=H+ve+8,U++,T&&(T=!1,H=0,Y=0);break;case"VP8X":(B=re.header={}).feature_flags=Q[K];var J=K+4;B.canvas_width=1+c(Q,J),J+=3,B.canvas_height=1+c(Q,J),J+=3;break;case"ALPH":T=!0,H=se+8,Y=K-8;break;case"ANIM":(B=re.header).bgcolor=d(Q,K),J=K+4,B.loop_count=(le=Q)[(pe=J)+0]<<0|le[pe+1]<<8,J+=2;break;case"ANMF":var oe,B;(B=re.frames[U]={}).offset_x=2*c(Q,K),K+=3,B.offset_y=2*c(Q,K),K+=3,B.width=1+c(Q,K),K+=3,B.height=1+c(Q,K),K+=3,B.duration=c(Q,K),K+=3,oe=Q[K++],B.dispose=1&oe,B.blend=oe>>1&1}me!="ANMF"&&(K+=se)}return re}}(y,0);C.response=y,C.rgbaoutput=!0,C.dataurl=!1;var b=C.header?C.header:null,F=C.frames?C.frames:null;if(b){b.loop_counter=b.loop_count,g=[b.canvas_height],h=[b.canvas_width];for(var O=0;O<F.length&&F[O].blend!=0;O++);}var W=F[0],X=v.WebPDecodeRGBA(y,W.src_off,W.src_size,h,g);W.rgba=X,W.imgwidth=h[0],W.imgheight=g[0];for(var k=0;k<h[0]*g[0]*4;k++)p[k]=X[k];return this.width=h,this.height=g,this.data=p,this}(function(t){var e=function(){return typeof Nd=="function"},r=function(g,h,p,v){var y=4,C=i;switch(v){case t.image_compression.FAST:y=1,C=a;break;case t.image_compression.MEDIUM:y=6,C=s;break;case t.image_compression.SLOW:y=9,C=o}g=A(g,h,p,C);var b=Nd(g,{level:y});return t.__addimage__.arrayBufferToBinaryString(b)},A=function(g,h,p,v){for(var y,C,b,F=g.length/h,O=new Uint8Array(g.length+F),W=c(),X=0;X<F;X+=1){if(b=X*h,y=g.subarray(b,b+h),v)O.set(v(y,p,C),b+X);else{for(var k,Q=W.length,K=[];k<Q;k+=1)K[k]=W[k](y,p,C);var re=d(K.concat());O.set(K[re],b+X)}C=y}return O},n=function(g){var h=Array.apply([],g);return h.unshift(0),h},a=function(g,h){var p,v=[],y=g.length;v[0]=1;for(var C=0;C<y;C+=1)p=g[C-h]||0,v[C+1]=g[C]-p+256&255;return v},i=function(g,h,p){var v,y=[],C=g.length;y[0]=2;for(var b=0;b<C;b+=1)v=p&&p[b]||0,y[b+1]=g[b]-v+256&255;return y},s=function(g,h,p){var v,y,C=[],b=g.length;C[0]=3;for(var F=0;F<b;F+=1)v=g[F-h]||0,y=p&&p[F]||0,C[F+1]=g[F]+256-(v+y>>>1)&255;return C},o=function(g,h,p){var v,y,C,b,F=[],O=g.length;F[0]=4;for(var W=0;W<O;W+=1)v=g[W-h]||0,y=p&&p[W]||0,C=p&&p[W-h]||0,b=l(v,y,C),F[W+1]=g[W]-b+256&255;return F},l=function(g,h,p){if(g===h&&h===p)return g;var v=Math.abs(h-p),y=Math.abs(g-p),C=Math.abs(g+h-p-p);return v<=y&&v<=C?g:y<=C?h:p},c=function(){return[n,a,i,s,o]},d=function(g){var h=g.map(function(p){return p.reduce(function(v,y){return v+Math.abs(y)},0)});return h.indexOf(Math.min.apply(null,h))};t.processPNG=function(g,h,p,v){var y,C,b,F,O,W,X,k,Q,K,re,U,T,H,Y,le=this.decode.FLATE_DECODE,pe="";if(this.__addimage__.isArrayBuffer(g)&&(g=new Uint8Array(g)),this.__addimage__.isArrayBufferView(g)){if(g=(b=new _U(g)).imgData,C=b.bits,y=b.colorSpace,O=b.colors,[4,6].indexOf(b.colorType)!==-1){if(b.bits===8){Q=(k=b.pixelBitlength==32?new Uint32Array(b.decodePixels().buffer):b.pixelBitlength==16?new Uint16Array(b.decodePixels().buffer):new Uint8Array(b.decodePixels().buffer)).length,re=new Uint8Array(Q*b.colors),K=new Uint8Array(Q);var me,ve=b.pixelBitlength-b.bits;for(H=0,Y=0;H<Q;H++){for(T=k[H],me=0;me<ve;)re[Y++]=T>>>me&255,me+=b.bits;K[H]=T>>>me&255}}if(b.bits===16){Q=(k=new Uint32Array(b.decodePixels().buffer)).length,re=new Uint8Array(Q*(32/b.pixelBitlength)*b.colors),K=new Uint8Array(Q*(32/b.pixelBitlength)),U=b.colors>1,H=0,Y=0;for(var se=0;H<Q;)T=k[H++],re[Y++]=T>>>0&255,U&&(re[Y++]=T>>>16&255,T=k[H++],re[Y++]=T>>>0&255),K[se++]=T>>>16&255;C=8}v!==t.image_compression.NONE&&e()?(g=r(re,b.width*b.colors,b.colors,v),X=r(K,b.width,1,v)):(g=re,X=K,le=void 0)}if(b.colorType===3&&(y=this.color_spaces.INDEXED,W=b.palette,b.transparency.indexed)){var J=b.transparency.indexed,oe=0;for(H=0,Q=J.length;H<Q;++H)oe+=J[H];if((oe/=255)===Q-1&&J.indexOf(0)!==-1)F=[J.indexOf(0)];else if(oe!==Q){for(k=b.decodePixels(),K=new Uint8Array(k.length),H=0,Q=k.length;H<Q;H++)K[H]=J[k[H]];X=r(K,b.width,1)}}var B=function(_){var S;switch(_){case t.image_compression.FAST:S=11;break;case t.image_compression.MEDIUM:S=13;break;case t.image_compression.SLOW:S=14;break;default:S=12}return S}(v);return le===this.decode.FLATE_DECODE&&(pe="/Predictor "+B+" "),pe+="/Colors "+O+" /BitsPerComponent "+C+" /Columns "+b.width,(this.__addimage__.isArrayBuffer(g)||this.__addimage__.isArrayBufferView(g))&&(g=this.__addimage__.arrayBufferToBinaryString(g)),(X&&this.__addimage__.isArrayBuffer(X)||this.__addimage__.isArrayBufferView(X))&&(X=this.__addimage__.arrayBufferToBinaryString(X)),{alias:p,data:g,index:h,filter:le,decodeParameters:pe,transparency:F,palette:W,sMask:X,predictor:B,width:b.width,height:b.height,bitsPerComponent:C,colorSpace:y}}}})(yt.API),function(t){t.processGIF89A=function(e,r,A,n){var a=new TU(e),i=a.width,s=a.height,o=[];a.decodeAndBlitFrameRGBA(0,o);var l={data:o,width:i,height:s},c=new Gd(100).encode(l,100);return t.processJPEG.call(this,c,r,A,n)},t.processGIF87A=t.processGIF89A}(yt.API),Hn.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:n,green:A,blue:r,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Hn.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(r){cr.log("bit decode error:"+r)}},Hn.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var A=this.bottom_up?t:this.height-1-t,n=0;n<e;n++)for(var a=this.datav.getUint8(this.pos++,!0),i=A*this.width*4+8*n*4,s=0;s<8&&8*n+s<this.width;s++){var o=this.palette[a>>7-s&1];this.data[i+4*s]=o.blue,this.data[i+4*s+1]=o.green,this.data[i+4*s+2]=o.red,this.data[i+4*s+3]=255}r!==0&&(this.pos+=4-r)}},Hn.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var A=this.bottom_up?r:this.height-1-r,n=0;n<t;n++){var a=this.datav.getUint8(this.pos++,!0),i=A*this.width*4+2*n*4,s=a>>4,o=15&a,l=this.palette[s];if(this.data[i]=l.blue,this.data[i+1]=l.green,this.data[i+2]=l.red,this.data[i+3]=255,2*n+1>=this.width)break;l=this.palette[o],this.data[i+4]=l.blue,this.data[i+4+1]=l.green,this.data[i+4+2]=l.red,this.data[i+4+3]=255}e!==0&&(this.pos+=4-e)}},Hn.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,A=0;A<this.width;A++){var n=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+4*A;if(n<this.palette.length){var i=this.palette[n];this.data[a]=i.red,this.data[a+1]=i.green,this.data[a+2]=i.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}t!==0&&(this.pos+=4-t)}},Hn.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var A=this.bottom_up?r:this.height-1-r,n=0;n<this.width;n++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var i=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,o=(a>>10&e)/e*255|0,l=a>>15?255:0,c=A*this.width*4+4*n;this.data[c]=o,this.data[c+1]=s,this.data[c+2]=i,this.data[c+3]=l}this.pos+=t}},Hn.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),A=this.height-1;A>=0;A--){for(var n=this.bottom_up?A:this.height-1-A,a=0;a<this.width;a++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(i&e)/e*255|0,o=(i>>5&r)/r*255|0,l=(i>>11)/e*255|0,c=n*this.width*4+4*a;this.data[c]=l,this.data[c+1]=o,this.data[c+2]=s,this.data[c+3]=255}this.pos+=t}},Hn.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=e*this.width*4+4*r;this.data[i]=a,this.data[i+1]=n,this.data[i+2]=A,this.data[i+3]=255}this.pos+=this.width%4}},Hn.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=a,this.data[s+1]=n,this.data[s+2]=A,this.data[s+3]=i}},Hn.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,r,A,n){var a=new Hn(e,!1),i=a.width,s=a.height,o={data:a.getData(),width:i,height:s},l=new Gd(100).encode(o,100);return t.processJPEG.call(this,l,r,A,n)}}(yt.API),Cw.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,r,A,n){var a=new Cw(e),i=a.width,s=a.height,o={data:a.getData(),width:i,height:s},l=new Gd(100).encode(o,100);return t.processJPEG.call(this,l,r,A,n)}}(yt.API),yt.API.processRGBA=function(t,e,r){for(var A=t.data,n=A.length,a=new Uint8Array(n/4*3),i=new Uint8Array(n/4),s=0,o=0,l=0;l<n;l+=4){var c=A[l],d=A[l+1],g=A[l+2],h=A[l+3];a[s++]=c,a[s++]=d,a[s++]=g,i[o++]=h}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(i),data:p,index:e,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},yt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},io=yt.API,lu=io.getCharWidthsArray=function(t,e){var r,A,n=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),i=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:n.metadata.Unicode.widths,o=s.fof?s.fof:1,l=e.kerning?e.kerning:n.metadata.Unicode.kerning,c=l.fof?l.fof:1,d=e.doKerning!==!1,g=0,h=t.length,p=0,v=s[0]||o,y=[];for(r=0;r<h;r++)A=t.charCodeAt(r),typeof n.metadata.widthOfString=="function"?y.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(A))+i*(1e3/a)||0)/1e3):(g=d&&Wt(l[A])==="object"&&!isNaN(parseInt(l[A][p],10))?l[A][p]/c:0,y.push((s[A]||v)/o+g)),p=A;return y},ww=io.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),A=e.font||this.internal.getFont(),n=e.charSpace||this.internal.getCharSpace();return io.processArabic&&(t=io.processArabic(t)),typeof A.metadata.widthOfString=="function"?A.metadata.widthOfString(t,r,n)/r:lu.apply(this,arguments).reduce(function(a,i){return a+i},0)},Bw=function(t,e,r,A){for(var n=[],a=0,i=t.length,s=0;a!==i&&s+e[a]<r;)s+=e[a],a++;n.push(t.slice(0,a));var o=a;for(s=0;a!==i;)s+e[a]>A&&(n.push(t.slice(o,a)),s=0,o=a),s+=e[a],a++;return o!==a&&n.push(t.slice(o,a)),n},yw=function(t,e,r){r||(r={});var A,n,a,i,s,o,l,c=[],d=[c],g=r.textIndent||0,h=0,p=0,v=t.split(" "),y=lu.apply(this,[" ",r])[0];if(o=r.lineIndent===-1?v[0].length+2:r.lineIndent||0){var C=Array(o).join(" "),b=[];v.map(function(O){(O=O.split(/\s*\n/)).length>1?b=b.concat(O.map(function(W,X){return(X&&W.length?`
|
|
233
|
+
*/function Hn(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Cw(t){function e(Q){if(!Q)throw Error("assert :P")}function r(Q,K,re){for(var U=0;4>U;U++)if(Q[K+U]!=re.charCodeAt(U))return!0;return!1}function A(Q,K,re,U,T){for(var H=0;H<T;H++)Q[K+H]=re[U+H]}function n(Q,K,re,U){for(var T=0;T<U;T++)Q[K+T]=re}function a(Q){return new Int32Array(Q)}function i(Q,K){for(var re=[],U=0;U<Q;U++)re.push(new K);return re}function s(Q,K){var re=[];return function U(T,H,Y){for(var le=Y[H],pe=0;pe<le&&(T.push(Y.length>H+1?[]:new K),!(Y.length<H+1));pe++)U(T[pe],H+1,Y)}(re,0,Q),re}var o=function(){var Q=this;function K(u,m){for(var x=1<<m-1>>>0;u&x;)x>>>=1;return x?(u&x-1)+x:u}function re(u,m,x,E,I){e(!(E%x));do u[m+(E-=x)]=I;while(0<E)}function U(u,m,x,E,I){if(e(2328>=I),512>=I)var P=a(512);else if((P=a(I))==null)return 0;return function(M,R,j,Z,de,Fe){var Se,ye,Pe=R,Ne=1<<j,ge=a(16),Be=a(16);for(e(de!=0),e(Z!=null),e(M!=null),e(0<j),ye=0;ye<de;++ye){if(15<Z[ye])return 0;++ge[Z[ye]]}if(ge[0]==de)return 0;for(Be[1]=0,Se=1;15>Se;++Se){if(ge[Se]>1<<Se)return 0;Be[Se+1]=Be[Se]+ge[Se]}for(ye=0;ye<de;++ye)Se=Z[ye],0<Z[ye]&&(Fe[Be[Se]++]=ye);if(Be[15]==1)return(Z=new T).g=0,Z.value=Fe[0],re(M,Pe,1,Ne,Z),Ne;var Oe,Ge=-1,De=Ne-1,lt=0,At=1,wt=1,at=1<<j;for(ye=0,Se=1,de=2;Se<=j;++Se,de<<=1){if(At+=wt<<=1,0>(wt-=ge[Se]))return 0;for(;0<ge[Se];--ge[Se])(Z=new T).g=Se,Z.value=Fe[ye++],re(M,Pe+lt,de,at,Z),lt=K(lt,Se)}for(Se=j+1,de=2;15>=Se;++Se,de<<=1){if(At+=wt<<=1,0>(wt-=ge[Se]))return 0;for(;0<ge[Se];--ge[Se]){if(Z=new T,(lt&De)!=Ge){for(Pe+=at,Oe=1<<(Ge=Se)-j;15>Ge&&!(0>=(Oe-=ge[Ge]));)++Ge,Oe<<=1;Ne+=at=1<<(Oe=Ge-j),M[R+(Ge=lt&De)].g=Oe+j,M[R+Ge].value=Pe-R-Ge}Z.g=Se-j,Z.value=Fe[ye++],re(M,Pe+(lt>>j),de,at,Z),lt=K(lt,Se)}}return At!=2*Be[15]-1?0:Ne}(u,m,x,E,I,P)}function T(){this.value=this.g=0}function H(){this.value=this.g=0}function Y(){this.G=i(5,T),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=i(nn,H)}function le(u,m,x,E){e(u!=null),e(m!=null),e(2147483648>E),u.Ca=254,u.I=0,u.b=-8,u.Ka=0,u.oa=m,u.pa=x,u.Jd=m,u.Yc=x+E,u.Zc=4<=E?x+E-4+1:x,ie(u)}function pe(u,m){for(var x=0;0<m--;)x|=fe(u,128)<<m;return x}function me(u,m){var x=pe(u,m);return ce(u)?-x:x}function ve(u,m,x,E){var I,P=0;for(e(u!=null),e(m!=null),e(4294967288>E),u.Sb=E,u.Ra=0,u.u=0,u.h=0,4<E&&(E=4),I=0;I<E;++I)P+=m[x+I]<<8*I;u.Ra=P,u.bb=E,u.oa=m,u.pa=x}function se(u){for(;8<=u.u&&u.bb<u.Sb;)u.Ra>>>=8,u.Ra+=u.oa[u.pa+u.bb]<<Zo-8>>>0,++u.bb,u.u-=8;S(u)&&(u.h=1,u.u=0)}function J(u,m){if(e(0<=m),!u.h&&m<=Jo){var x=_(u)&Yo[m];return u.u+=m,se(u),x}return u.h=1,u.u=0}function oe(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function B(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function _(u){return u.Ra>>>(u.u&Zo-1)>>>0}function S(u){return e(u.bb<=u.Sb),u.h||u.bb==u.Sb&&u.u>Zo}function N(u,m){u.u=m,u.h=S(u)}function G(u){u.u>=jc&&(e(u.u>=jc),se(u))}function ie(u){e(u!=null&&u.oa!=null),u.pa<u.Zc?(u.I=(u.oa[u.pa++]|u.I<<8)>>>0,u.b+=8):(e(u!=null&&u.oa!=null),u.pa<u.Yc?(u.b+=8,u.I=u.oa[u.pa++]|u.I<<8):u.Ka?u.b=0:(u.I<<=8,u.b+=8,u.Ka=1))}function ce(u){return pe(u,1)}function fe(u,m){var x=u.Ca;0>u.b&&ie(u);var E=u.b,I=x*m>>>8,P=(u.I>>>E>I)+0;for(P?(x-=I,u.I-=I+1<<E>>>0):x=I+1,E=x,I=0;256<=E;)I+=8,E>>=8;return E=7^I+an[E],u.b-=E,u.Ca=(x<<E)-1,P}function xe(u,m,x){u[m+0]=x>>24&255,u[m+1]=x>>16&255,u[m+2]=x>>8&255,u[m+3]=x>>0&255}function Ie(u,m){return u[m+0]<<0|u[m+1]<<8}function Me(u,m){return Ie(u,m)|u[m+2]<<16}function Xe(u,m){return Ie(u,m)|Ie(u,m+2)<<16}function $e(u,m){var x=1<<m;return e(u!=null),e(0<m),u.X=a(x),u.X==null?0:(u.Mb=32-m,u.Xa=m,1)}function Te(u,m){e(u!=null),e(m!=null),e(u.Xa==m.Xa),A(m.X,0,u.X,0,1<<m.Xa)}function ne(){this.X=[],this.Xa=this.Mb=0}function Qe(u,m,x,E){e(x!=null),e(E!=null);var I=x[0],P=E[0];return I==0&&(I=(u*P+m/2)/m),P==0&&(P=(m*I+u/2)/u),0>=I||0>=P?0:(x[0]=I,E[0]=P,1)}function rt(u,m){return u+(1<<m)-1>>>m}function Re(u,m){return((4278255360&u)+(4278255360&m)>>>0&4278255360)+((16711935&u)+(16711935&m)>>>0&16711935)>>>0}function ze(u,m){Q[m]=function(x,E,I,P,M,R,j){var Z;for(Z=0;Z<M;++Z){var de=Q[u](R[j+Z-1],I,P+Z);R[j+Z]=Re(x[E+Z],de)}}}function Ye(){this.ud=this.hd=this.jd=0}function Je(u,m){return((4278124286&(u^m))>>>1)+(u&m)>>>0}function st(u){return 0<=u&&256>u?u:0>u?0:255<u?255:void 0}function nt(u,m){return st(u+(u-m+.5>>1))}function ht(u,m,x){return Math.abs(m-x)-Math.abs(u-x)}function vt(u,m,x,E,I,P,M){for(E=P[M-1],x=0;x<I;++x)P[M+x]=E=Re(u[m+x],E)}function _t(u,m,x,E,I){var P;for(P=0;P<x;++P){var M=u[m+P],R=M>>8&255,j=16711935&(j=(j=16711935&M)+((R<<16)+R));E[I+P]=(4278255360&M)+j>>>0}}function Ut(u,m){m.jd=u>>0&255,m.hd=u>>8&255,m.ud=u>>16&255}function dt(u,m,x,E,I,P){var M;for(M=0;M<E;++M){var R=m[x+M],j=R>>>8,Z=R,de=255&(de=(de=R>>>16)+((u.jd<<24>>24)*(j<<24>>24)>>>5));Z=255&(Z=(Z=Z+((u.hd<<24>>24)*(j<<24>>24)>>>5))+((u.ud<<24>>24)*(de<<24>>24)>>>5)),I[P+M]=(4278255360&R)+(de<<16)+Z}}function xt(u,m,x,E,I){Q[m]=function(P,M,R,j,Z,de,Fe,Se,ye){for(j=Fe;j<Se;++j)for(Fe=0;Fe<ye;++Fe)Z[de++]=I(R[E(P[M++])])},Q[u]=function(P,M,R,j,Z,de,Fe){var Se=8>>P.b,ye=P.Ea,Pe=P.K[0],Ne=P.w;if(8>Se)for(P=(1<<P.b)-1,Ne=(1<<Se)-1;M<R;++M){var ge,Be=0;for(ge=0;ge<ye;++ge)ge&P||(Be=E(j[Z++])),de[Fe++]=I(Pe[Be&Ne]),Be>>=Se}else Q["VP8LMapColor"+x](j,Z,Pe,Ne,de,Fe,M,R,ye)}}function tt(u,m,x,E,I){for(x=m+x;m<x;){var P=u[m++];E[I++]=P>>16&255,E[I++]=P>>8&255,E[I++]=P>>0&255}}function nr(u,m,x,E,I){for(x=m+x;m<x;){var P=u[m++];E[I++]=P>>16&255,E[I++]=P>>8&255,E[I++]=P>>0&255,E[I++]=P>>24&255}}function Nt(u,m,x,E,I){for(x=m+x;m<x;){var P=(M=u[m++])>>16&240|M>>12&15,M=M>>0&240|M>>28&15;E[I++]=P,E[I++]=M}}function fr(u,m,x,E,I){for(x=m+x;m<x;){var P=(M=u[m++])>>16&248|M>>13&7,M=M>>5&224|M>>3&31;E[I++]=P,E[I++]=M}}function kt(u,m,x,E,I){for(x=m+x;m<x;){var P=u[m++];E[I++]=P>>0&255,E[I++]=P>>8&255,E[I++]=P>>16&255}}function Kt(u,m,x,E,I,P){if(P==0)for(x=m+x;m<x;)xe(E,((P=u[m++])[0]>>24|P[1]>>8&65280|P[2]<<8&16711680|P[3]<<24)>>>0),I+=32;else A(E,I,u,m,x)}function $r(u,m){Q[m][0]=Q[u+"0"],Q[m][1]=Q[u+"1"],Q[m][2]=Q[u+"2"],Q[m][3]=Q[u+"3"],Q[m][4]=Q[u+"4"],Q[m][5]=Q[u+"5"],Q[m][6]=Q[u+"6"],Q[m][7]=Q[u+"7"],Q[m][8]=Q[u+"8"],Q[m][9]=Q[u+"9"],Q[m][10]=Q[u+"10"],Q[m][11]=Q[u+"11"],Q[m][12]=Q[u+"12"],Q[m][13]=Q[u+"13"],Q[m][14]=Q[u+"0"],Q[m][15]=Q[u+"0"]}function Pt(u){return u==F2||u==S2||u==u0||u==_2}function br(){this.eb=[],this.size=this.A=this.fb=0}function $t(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function rA(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new br,this.f.kb=new $t,this.sd=null}function Et(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Gt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Ct(u){return alert("todo:WebPSamplerProcessPlane"),u.T}function Ht(u,m){var x=u.T,E=m.ba.f.RGBA,I=E.eb,P=E.fb+u.ka*E.A,M=Qn[m.ba.S],R=u.y,j=u.O,Z=u.f,de=u.N,Fe=u.ea,Se=u.W,ye=m.cc,Pe=m.dc,Ne=m.Mc,ge=m.Nc,Be=u.ka,Oe=u.ka+u.T,Ge=u.U,De=Ge+1>>1;for(Be==0?M(R,j,null,null,Z,de,Fe,Se,Z,de,Fe,Se,I,P,null,null,Ge):(M(m.ec,m.fc,R,j,ye,Pe,Ne,ge,Z,de,Fe,Se,I,P-E.A,I,P,Ge),++x);Be+2<Oe;Be+=2)ye=Z,Pe=de,Ne=Fe,ge=Se,de+=u.Rc,Se+=u.Rc,P+=2*E.A,M(R,(j+=2*u.fa)-u.fa,R,j,ye,Pe,Ne,ge,Z,de,Fe,Se,I,P-E.A,I,P,Ge);return j+=u.fa,u.j+Oe<u.o?(A(m.ec,m.fc,R,j,Ge),A(m.cc,m.dc,Z,de,De),A(m.Mc,m.Nc,Fe,Se,De),x--):1&Oe||M(R,j,null,null,Z,de,Fe,Se,Z,de,Fe,Se,I,P+E.A,null,null,Ge),x}function pn(u,m,x){var E=u.F,I=[u.J];if(E!=null){var P=u.U,M=m.ba.S,R=M==f0||M==u0;m=m.ba.f.RGBA;var j=[0],Z=u.ka;j[0]=u.T,u.Kb&&(Z==0?--j[0]:(--Z,I[0]-=u.width),u.j+u.ka+u.T==u.o&&(j[0]=u.o-u.j-Z));var de=m.eb;Z=m.fb+Z*m.A,u=i0(E,I[0],u.width,P,j,de,Z+(R?0:3),m.A),e(x==j),u&&Pt(M)&&Gi(de,Z,R,P,j,m.A)}return 0}function Nr(u){var m=u.ma,x=m.ba.S,E=11>x,I=x==l0||x==c0||x==f0||x==E2||x==12||Pt(x);if(m.memory=null,m.Ib=null,m.Jb=null,m.Nd=null,!Kc(m.Oa,u,I?11:12))return 0;if(I&&Pt(x)&&We(),u.da)alert("todo:use_scaling");else{if(E){if(m.Ib=Ct,u.Kb){if(x=u.U+1>>1,m.memory=a(u.U+2*x),m.memory==null)return 0;m.ec=m.memory,m.fc=0,m.cc=m.ec,m.dc=m.fc+u.U,m.Mc=m.cc,m.Nc=m.dc+x,m.Ib=Ht,We()}}else alert("todo:EmitYUV");I&&(m.Jb=pn,E&&Ce())}if(E&&!aE){for(u=0;256>u;++u)GJ[u]=89858*(u-128)+d0>>h0,WJ[u]=-22014*(u-128)+d0,zJ[u]=-45773*(u-128),jJ[u]=113618*(u-128)+d0>>h0;for(u=Yc;u<N2;++u)m=76283*(u-16)+d0>>h0,XJ[u-Yc]=vn(m,255),$J[u-Yc]=vn(m+8>>4,15);aE=1}return 1}function zA(u){var m=u.ma,x=u.U,E=u.T;return e(!(1&u.ka)),0>=x||0>=E?0:(x=m.Ib(u,m),m.Jb!=null&&m.Jb(u,m,x),m.Dc+=x,1)}function tn(u){u.ma.memory=null}function gt(u,m,x,E){return J(u,8)!=47?0:(m[0]=J(u,14)+1,x[0]=J(u,14)+1,E[0]=J(u,1),J(u,3)!=0?0:!u.h)}function xA(u,m){if(4>u)return u+1;var x=u-2>>1;return(2+(1&u)<<x)+J(m,x)+1}function kA(u,m){return 120<m?m-120:1<=(x=((x=UJ[m-1])>>4)*u+(8-(15&x)))?x:1;var x}function gr(u,m,x){var E=_(x),I=u[m+=255&E].g-8;return 0<I&&(N(x,x.u+8),E=_(x),m+=u[m].value,m+=E&(1<<I)-1),N(x,x.u+u[m].g),u[m].value}function Br(u,m,x){return x.g+=u.g,x.value+=u.value<<m>>>0,e(8>=x.g),u.g}function yr(u,m,x){var E=u.xc;return e((m=E==0?0:u.vc[u.md*(x>>E)+(m>>E)])<u.Wb),u.Ya[m]}function D(u,m,x,E){var I=u.ab,P=u.c*m,M=u.C;m=M+m;var R=x,j=E;for(E=u.Ta,x=u.Ua;0<I--;){var Z=u.gc[I],de=M,Fe=m,Se=R,ye=j,Pe=(j=E,R=x,Z.Ea);switch(e(de<Fe),e(Fe<=Z.nc),Z.hc){case 2:a0(Se,ye,(Fe-de)*Pe,j,R);break;case 0:var Ne=de,ge=Fe,Be=j,Oe=R,Ge=(at=Z).Ea;Ne==0&&(y2(Se,ye,null,null,1,Be,Oe),vt(Se,ye+1,0,0,Ge-1,Be,Oe+1),ye+=Ge,Oe+=Ge,++Ne);for(var De=1<<at.b,lt=De-1,At=rt(Ge,at.b),wt=at.K,at=at.w+(Ne>>at.b)*At;Ne<ge;){var Yt=wt,ar=at,zt=1;for(zc(Se,ye,Be,Oe-Ge,1,Be,Oe);zt<Ge;){var Rt=(zt&~lt)+De;Rt>Ge&&(Rt=Ge),(0,Ri[Yt[ar++]>>8&15])(Se,ye+ +zt,Be,Oe+zt-Ge,Rt-zt,Be,Oe+zt),zt=Rt}ye+=Ge,Oe+=Ge,++Ne<||(at+=At)}Fe!=Z.nc&&A(j,R-Pe,j,R+(Fe-de-1)*Pe,Pe);break;case 1:for(Pe=Se,ge=ye,Ge=(Se=Z.Ea)-(Oe=Se&~(Be=(ye=1<<Z.b)-1)),Ne=rt(Se,Z.b),De=Z.K,Z=Z.w+(de>>Z.b)*Ne;de<Fe;){for(lt=De,At=Z,wt=new Ye,at=ge+Oe,Yt=ge+Se;ge<at;)Ut(lt[At++],wt),In(wt,Pe,ge,ye,j,R),ge+=ye,R+=ye;ge<Yt&&(Ut(lt[At++],wt),In(wt,Pe,ge,Ge,j,R),ge+=Ge,R+=Ge),++de&Be||(Z+=Ne)}break;case 3:if(Se==j&&ye==R&&0<Z.b){for(ge=j,Se=Pe=R+(Fe-de)*Pe-(Oe=(Fe-de)*rt(Z.Ea,Z.b)),ye=j,Be=R,Ne=[],Oe=(Ge=Oe)-1;0<=Oe;--Oe)Ne[Oe]=ye[Be+Oe];for(Oe=Ge-1;0<=Oe;--Oe)ge[Se+Oe]=Ne[Oe];ia(Z,de,Fe,j,Pe,j,R)}else ia(Z,de,Fe,Se,ye,j,R)}R=E,j=x}j!=x&&A(E,x,R,j,P)}function te(u,m){var x=u.V,E=u.Ba+u.c*u.C,I=m-u.C;if(e(m<=u.l.o),e(16>=I),0<I){var P=u.l,M=u.Ta,R=u.Ua,j=P.width;if(D(u,I,x,E),I=R=[R],e((x=u.C)<(E=m)),e(P.v<P.va),E>P.o&&(E=P.o),x<P.j){var Z=P.j-x;x=P.j,I[0]+=Z*j}if(x>=E?x=0:(I[0]+=4*P.v,P.ka=x-P.j,P.U=P.va-P.v,P.T=E-x,x=1),x){if(R=R[0],11>(x=u.ca).S){var de=x.f.RGBA,Fe=(E=x.S,I=P.U,P=P.T,Z=de.eb,de.A),Se=P;for(de=de.fb+u.Ma*de.A;0<Se--;){var ye=M,Pe=R,Ne=I,ge=Z,Be=de;switch(E){case o0:sa(ye,Pe,Ne,ge,Be);break;case l0:Hi(ye,Pe,Ne,ge,Be);break;case F2:Hi(ye,Pe,Ne,ge,Be),Gi(ge,Be,0,Ne,1,0);break;case $b:el(ye,Pe,Ne,ge,Be);break;case c0:Kt(ye,Pe,Ne,ge,Be,1);break;case S2:Kt(ye,Pe,Ne,ge,Be,1),Gi(ge,Be,0,Ne,1,0);break;case f0:Kt(ye,Pe,Ne,ge,Be,0);break;case u0:Kt(ye,Pe,Ne,ge,Be,0),Gi(ge,Be,1,Ne,1,0);break;case E2:Ia(ye,Pe,Ne,ge,Be);break;case _2:Ia(ye,Pe,Ne,ge,Be),Al(ge,Be,Ne,1,0);break;case qb:Ai(ye,Pe,Ne,ge,Be);break;default:e(0)}R+=j,de+=Fe}u.Ma+=P}else alert("todo:EmitRescaledRowsYUVA");e(u.Ma<=x.height)}}u.C=m,e(u.C<=u.i)}function z(u){var m;if(0<u.ua)return 0;for(m=0;m<u.Wb;++m){var x=u.Ya[m].G,E=u.Ya[m].H;if(0<x[1][E[1]+0].g||0<x[2][E[2]+0].g||0<x[3][E[3]+0].g)return 0}return 1}function q(u,m,x,E,I,P){if(u.Z!=0){var M=u.qd,R=u.rd;for(e(zi[u.Z]!=null);m<x;++m)zi[u.Z](M,R,E,I,E,I,P),M=E,R=I,I+=P;u.qd=M,u.rd=R}}function ee(u,m){var x=u.l.ma,E=x.Z==0||x.Z==1?u.l.j:u.C;if(E=u.C<E?E:u.C,e(m<=u.l.o),m>E){var I=u.l.width,P=x.ca,M=x.tb+I*E,R=u.V,j=u.Ba+u.c*E,Z=u.gc;e(u.ab==1),e(Z[0].hc==3),x2(Z[0],E,m,R,j,P,M),q(x,E,m,P,M,I)}u.C=u.Ma=m}function Ae(u,m,x,E,I,P,M){var R=u.$/E,j=u.$%E,Z=u.m,de=u.s,Fe=x+u.$,Se=Fe;I=x+E*I;var ye=x+E*P,Pe=280+de.ua,Ne=u.Pb?R:16777216,ge=0<de.ua?de.Wa:null,Be=de.wc,Oe=Fe<ye?yr(de,j,R):null;e(u.C<P),e(ye<=I);var Ge=!1;e:for(;;){for(;Ge||Fe<ye;){var De=0;if(R>=Ne){var lt=Fe-x;e((Ne=u).Pb),Ne.wd=Ne.m,Ne.xd=lt,0<Ne.s.ua&&Te(Ne.s.Wa,Ne.s.vb),Ne=R+IJ}if(j&Be||(Oe=yr(de,j,R)),e(Oe!=null),Oe.Qb&&(m[Fe]=Oe.qb,Ge=!0),!Ge)if(G(Z),Oe.jc){De=Z,lt=m;var At=Fe,wt=Oe.pd[_(De)&nn-1];e(Oe.jc),256>wt.g?(N(De,De.u+wt.g),lt[At]=wt.value,De=0):(N(De,De.u+wt.g-256),e(256<=wt.value),De=wt.value),De==0&&(Ge=!0)}else De=gr(Oe.G[0],Oe.H[0],Z);if(Z.h)break;if(Ge||256>De){if(!Ge)if(Oe.nd)m[Fe]=(Oe.qb|De<<8)>>>0;else{if(G(Z),Ge=gr(Oe.G[1],Oe.H[1],Z),G(Z),lt=gr(Oe.G[2],Oe.H[2],Z),At=gr(Oe.G[3],Oe.H[3],Z),Z.h)break;m[Fe]=(At<<24|Ge<<16|De<<8|lt)>>>0}if(Ge=!1,++Fe,++j>=E&&(j=0,++R,M!=null&&R<=P&&!(R%16)&&M(u,R),ge!=null))for(;Se<Fe;)De=m[Se++],ge.X[(506832829*De&4294967295)>>>ge.Mb]=De}else if(280>De){if(De=xA(De-256,Z),lt=gr(Oe.G[4],Oe.H[4],Z),G(Z),lt=kA(E,lt=xA(lt,Z)),Z.h)break;if(Fe-x<lt||I-Fe<De)break e;for(At=0;At<De;++At)m[Fe+At]=m[Fe+At-lt];for(Fe+=De,j+=De;j>=E;)j-=E,++R,M!=null&&R<=P&&!(R%16)&&M(u,R);if(e(Fe<=I),j&Be&&(Oe=yr(de,j,R)),ge!=null)for(;Se<Fe;)De=m[Se++],ge.X[(506832829*De&4294967295)>>>ge.Mb]=De}else{if(!(De<Pe))break e;for(Ge=De-280,e(ge!=null);Se<Fe;)De=m[Se++],ge.X[(506832829*De&4294967295)>>>ge.Mb]=De;De=Fe,e(!(Ge>>>(lt=ge).Xa)),m[De]=lt.X[Ge],Ge=!0}Ge||e(Z.h==S(Z))}if(u.Pb&&Z.h&&Fe<I)e(u.m.h),u.a=5,u.m=u.wd,u.$=u.xd,0<u.s.ua&&Te(u.s.vb,u.s.Wa);else{if(Z.h)break e;M!=null&&M(u,R>P?P:R),u.a=0,u.$=Fe-x}return 1}return u.a=3,0}function Ee(u){e(u!=null),u.vc=null,u.yc=null,u.Ya=null;var m=u.Wa;m!=null&&(m.X=null),u.vb=null,e(u!=null)}function Ue(){var u=new B2;return u==null?null:(u.a=0,u.xb=Zb,$r("Predictor","VP8LPredictors"),$r("Predictor","VP8LPredictors_C"),$r("PredictorAdd","VP8LPredictorsAdd"),$r("PredictorAdd","VP8LPredictorsAdd_C"),a0=_t,In=dt,sa=tt,Hi=nr,Ia=Nt,Ai=fr,el=kt,Q.VP8LMapColor32b=Wc,Q.VP8LMapColor8b=C2,u)}function be(u,m,x,E,I){var P=1,M=[u],R=[m],j=E.m,Z=E.s,de=null,Fe=0;e:for(;;){if(x)for(;P&&J(j,1);){var Se=M,ye=R,Pe=E,Ne=1,ge=Pe.m,Be=Pe.gc[Pe.ab],Oe=J(ge,2);if(Pe.Oc&1<<Oe)P=0;else{switch(Pe.Oc|=1<<Oe,Be.hc=Oe,Be.Ea=Se[0],Be.nc=ye[0],Be.K=[null],++Pe.ab,e(4>=Pe.ab),Oe){case 0:case 1:Be.b=J(ge,3)+2,Ne=be(rt(Be.Ea,Be.b),rt(Be.nc,Be.b),0,Pe,Be.K),Be.K=Be.K[0];break;case 3:var Ge,De=J(ge,8)+1,lt=16<De?0:4<De?1:2<De?2:3;if(Se[0]=rt(Be.Ea,lt),Be.b=lt,Ge=Ne=be(De,1,0,Pe,Be.K)){var At,wt=De,at=Be,Yt=1<<(8>>at.b),ar=a(Yt);if(ar==null)Ge=0;else{var zt=at.K[0],Rt=at.w;for(ar[0]=at.K[0][0],At=1;At<1*wt;++At)ar[At]=Re(zt[Rt+At],ar[At-1]);for(;At<4*Yt;++At)ar[At]=0;at.K[0]=null,at.K[0]=ar,Ge=1}}Ne=Ge;break;case 2:break;default:e(0)}P=Ne}}if(M=M[0],R=R[0],P&&J(j,1)&&!(P=1<=(Fe=J(j,4))&&11>=Fe)){E.a=3;break e}var ur;if(ur=P)t:{var lr,Lt,Yr,sn=E,Jr=M,on=R,ir=Fe,Bn=x,yn=sn.m,fA=sn.s,CA=[null],WA=1,On=0,La=NJ[ir];r:for(;;){if(Bn&&J(yn,1)){var uA=J(yn,3)+2,oi=rt(Jr,uA),Ms=rt(on,uA),nl=oi*Ms;if(!be(oi,Ms,0,sn,CA))break r;for(CA=CA[0],fA.xc=uA,lr=0;lr<nl;++lr){var Wi=CA[lr]>>8&65535;CA[lr]=Wi,Wi>=WA&&(WA=Wi+1)}}if(yn.h)break r;for(Lt=0;5>Lt;++Lt){var Lr=Yb[Lt];!Lt&&0<ir&&(Lr+=1<<ir),On<Lr&&(On=Lr)}var I2=i(WA*La,T),oE=WA,lE=i(oE,Y);if(lE==null)var p0=null;else e(65536>=oE),p0=lE;var Jc=a(On);if(p0==null||Jc==null||I2==null){sn.a=1;break r}var m0=I2;for(lr=Yr=0;lr<WA;++lr){var fa=p0[lr],al=fa.G,il=fa.H,cE=0,v0=1,fE=0;for(Lt=0;5>Lt;++Lt){Lr=Yb[Lt],al[Lt]=m0,il[Lt]=Yr,!Lt&&0<ir&&(Lr+=1<<ir);n:{var w0,L2=Lr,B0=sn,Zc=Jc,JJ=m0,ZJ=Yr,k2=0,Xi=B0.m,eZ=J(Xi,1);if(n(Zc,0,0,L2),eZ){var tZ=J(Xi,1)+1,rZ=J(Xi,1),uE=J(Xi,rZ==0?1:8);Zc[uE]=1,tZ==2&&(Zc[uE=J(Xi,8)]=1);var y0=1}else{var hE=a(19),dE=J(Xi,4)+4;if(19<dE){B0.a=3;var x0=0;break n}for(w0=0;w0<dE;++w0)hE[TJ[w0]]=J(Xi,3);var Q2=void 0,ef=void 0,gE=B0,AZ=hE,C0=L2,pE=Zc,O2=0,$i=gE.m,mE=8,vE=i(128,T);A:for(;U(vE,0,7,AZ,19);){if(J($i,1)){var nZ=2+2*J($i,3);if((Q2=2+J($i,nZ))>C0)break A}else Q2=C0;for(ef=0;ef<C0&&Q2--;){G($i);var wE=vE[0+(127&_($i))];N($i,$i.u+wE.g);var sl=wE.value;if(16>sl)pE[ef++]=sl,sl!=0&&(mE=sl);else{var aZ=sl==16,BE=sl-16,iZ=SJ[BE],yE=J($i,FJ[BE])+iZ;if(ef+yE>C0)break A;for(var sZ=aZ?mE:0;0<yE--;)pE[ef++]=sZ}}O2=1;break A}O2||(gE.a=3),y0=O2}(y0=y0&&!Xi.h)&&(k2=U(JJ,ZJ,8,Zc,L2)),y0&&k2!=0?x0=k2:(B0.a=3,x0=0)}if(x0==0)break r;if(v0&&_J[Lt]==1&&(v0=m0[Yr].g==0),cE+=m0[Yr].g,Yr+=x0,3>=Lt){var tf,D2=Jc[0];for(tf=1;tf<Lr;++tf)Jc[tf]>D2&&(D2=Jc[tf]);fE+=D2}}if(fa.nd=v0,fa.Qb=0,v0&&(fa.qb=(al[3][il[3]+0].value<<24|al[1][il[1]+0].value<<16|al[2][il[2]+0].value)>>>0,cE==0&&256>al[0][il[0]+0].value&&(fa.Qb=1,fa.qb+=al[0][il[0]+0].value<<8)),fa.jc=!fa.Qb&&6>fE,fa.jc){var b0,li=fa;for(b0=0;b0<nn;++b0){var qi=b0,Yi=li.pd[qi],E0=li.G[0][li.H[0]+qi];256<=E0.value?(Yi.g=E0.g+256,Yi.value=E0.value):(Yi.g=0,Yi.value=0,qi>>=Br(E0,8,Yi),qi>>=Br(li.G[1][li.H[1]+qi],16,Yi),qi>>=Br(li.G[2][li.H[2]+qi],0,Yi),Br(li.G[3][li.H[3]+qi],24,Yi))}}}fA.vc=CA,fA.Wb=WA,fA.Ya=p0,fA.yc=I2,ur=1;break t}ur=0}if(!(P=ur)){E.a=3;break e}if(0<Fe){if(Z.ua=1<<Fe,!$e(Z.Wa,Fe)){E.a=1,P=0;break e}}else Z.ua=0;var P2=E,xE=M,oZ=R,M2=P2.s,R2=M2.xc;if(P2.c=xE,P2.i=oZ,M2.md=rt(xE,R2),M2.wc=R2==0?-1:(1<<R2)-1,x){E.xb=MJ;break e}if((de=a(M*R))==null){E.a=1,P=0;break e}P=(P=Ae(E,de,0,M,R,R,null))&&!j.h;break e}return P?(I!=null?I[0]=de:(e(de==null),e(x)),E.$=0,x||Ee(Z)):Ee(Z),P}function ue(u,m){var x=u.c*u.i,E=x+m+16*m;return e(u.c<=m),u.V=a(E),u.V==null?(u.Ta=null,u.Ua=0,u.a=1,0):(u.Ta=u.V,u.Ua=u.Ba+x+m,1)}function V(u,m){var x=u.C,E=m-x,I=u.V,P=u.Ba+u.c*x;for(e(m<=u.l.o);0<E;){var M=16<E?16:E,R=u.l.ma,j=u.l.width,Z=j*M,de=R.ca,Fe=R.tb+j*x,Se=u.Ta,ye=u.Ua;D(u,M,I,P),Kb(Se,ye,de,Fe,Z),q(R,x,x+M,de,Fe,j),E-=M,I+=M*u.c,x+=M}e(x==m),u.C=u.Ma=m}function we(){this.ub=this.yd=this.td=this.Rb=0}function _e(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ke(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Ve(){this.Yb=function(){var u=[];return function m(x,E,I){for(var P=I[E],M=0;M<P&&(x.push(I.length>E+1?[]:0),!(I.length<E+1));M++)m(x[M],E+1,I)}(u,0,[3,11]),u}()}function qe(){this.jb=a(3),this.Wc=s([4,8],Ve),this.Xc=s([4,17],Ve)}function ft(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Vt(){this.ld=this.La=this.dd=this.tc=0}function bt(){this.Na=this.la=0}function Cr(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function rn(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function _a(){this.uc=this.M=this.Nb=0,this.wa=Array(new Vt),this.Y=0,this.ya=Array(new rn),this.aa=0,this.l=new Ua}function Ta(){this.y=a(16),this.f=a(8),this.ea=a(8)}function ra(){this.cb=this.a=0,this.sc="",this.m=new oe,this.Od=new we,this.Kc=new _e,this.ed=new ft,this.Qa=new Ke,this.Ic=this.$c=this.Aa=0,this.D=new _a,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=i(8,oe),this.ia=0,this.pb=i(4,Cr),this.Pa=new qe,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ta),this.Hd=0,this.rb=Array(new bt),this.sb=0,this.wa=Array(new Vt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new rn),this.L=this.aa=0,this.gd=s([4,2],Vt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Ua(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function mn(){var u=new ra;return u!=null&&(u.a=0,u.sc="OK",u.cb=0,u.Xb=0,qc||(qc=Gh)),u}function Hr(u,m,x){return u.a==0&&(u.a=m,u.sc=x,u.cb=0),0}function Vh(u,m,x){return 3<=x&&u[m+0]==157&&u[m+1]==1&&u[m+2]==42}function Kh(u,m){if(u==null)return 0;if(u.a=0,u.sc="OK",m==null)return Hr(u,2,"null VP8Io passed to VP8GetHeaders()");var x=m.data,E=m.w,I=m.ha;if(4>I)return Hr(u,7,"Truncated header.");var P=x[E+0]|x[E+1]<<8|x[E+2]<<16,M=u.Od;if(M.Rb=!(1&P),M.td=P>>1&7,M.yd=P>>4&1,M.ub=P>>5,3<M.td)return Hr(u,3,"Incorrect keyframe parameters.");if(!M.yd)return Hr(u,4,"Frame not displayable.");E+=3,I-=3;var R=u.Kc;if(M.Rb){if(7>I)return Hr(u,7,"cannot parse picture header");if(!Vh(x,E,I))return Hr(u,3,"Bad code word");R.c=16383&(x[E+4]<<8|x[E+3]),R.Td=x[E+4]>>6,R.i=16383&(x[E+6]<<8|x[E+5]),R.Ud=x[E+6]>>6,E+=7,I-=7,u.za=R.c+15>>4,u.Ub=R.i+15>>4,m.width=R.c,m.height=R.i,m.Da=0,m.j=0,m.v=0,m.va=m.width,m.o=m.height,m.da=0,m.ib=m.width,m.hb=m.height,m.U=m.width,m.T=m.height,n((P=u.Pa).jb,0,255,P.jb.length),e((P=u.Qa)!=null),P.Cb=0,P.Bb=0,P.Fb=1,n(P.Zb,0,0,P.Zb.length),n(P.Lb,0,0,P.Lb)}if(M.ub>I)return Hr(u,7,"bad partition length");le(P=u.m,x,E,M.ub),E+=M.ub,I-=M.ub,M.Rb&&(R.Ld=ce(P),R.Kd=ce(P)),R=u.Qa;var j,Z=u.Pa;if(e(P!=null),e(R!=null),R.Cb=ce(P),R.Cb){if(R.Bb=ce(P),ce(P)){for(R.Fb=ce(P),j=0;4>j;++j)R.Zb[j]=ce(P)?me(P,7):0;for(j=0;4>j;++j)R.Lb[j]=ce(P)?me(P,6):0}if(R.Bb)for(j=0;3>j;++j)Z.jb[j]=ce(P)?pe(P,8):255}else R.Bb=0;if(P.Ka)return Hr(u,3,"cannot parse segment header");if((R=u.ed).zd=ce(P),R.Tb=pe(P,6),R.wb=pe(P,3),R.Pc=ce(P),R.Pc&&ce(P)){for(Z=0;4>Z;++Z)ce(P)&&(R.vd[Z]=me(P,6));for(Z=0;4>Z;++Z)ce(P)&&(R.od[Z]=me(P,6))}if(u.L=R.Tb==0?0:R.zd?1:2,P.Ka)return Hr(u,3,"cannot parse filter header");var de=I;if(I=j=E,E=j+de,R=de,u.Xb=(1<<pe(u.m,2))-1,de<3*(Z=u.Xb))x=7;else{for(j+=3*Z,R-=3*Z,de=0;de<Z;++de){var Fe=x[I+0]|x[I+1]<<8|x[I+2]<<16;Fe>R&&(Fe=R),le(u.Jc[+de],x,j,Fe),j+=Fe,R-=Fe,I+=3}le(u.Jc[+Z],x,j,R),x=j<E?0:5}if(x!=0)return Hr(u,x,"cannot parse partitions");for(x=pe(j=u.m,7),I=ce(j)?me(j,4):0,E=ce(j)?me(j,4):0,R=ce(j)?me(j,4):0,Z=ce(j)?me(j,4):0,j=ce(j)?me(j,4):0,de=u.Qa,Fe=0;4>Fe;++Fe){if(de.Cb){var Se=de.Zb[Fe];de.Fb||(Se+=x)}else{if(0<Fe){u.pb[Fe]=u.pb[0];continue}Se=x}var ye=u.pb[Fe];ye.Sc[0]=T2[vn(Se+I,127)],ye.Sc[1]=U2[vn(Se+0,127)],ye.Eb[0]=2*T2[vn(Se+E,127)],ye.Eb[1]=101581*U2[vn(Se+R,127)]>>16,8>ye.Eb[1]&&(ye.Eb[1]=8),ye.Qc[0]=T2[vn(Se+Z,117)],ye.Qc[1]=U2[vn(Se+j,127)],ye.lc=Se+j}if(!M.Rb)return Hr(u,4,"Not a key frame.");for(ce(P),M=u.Pa,x=0;4>x;++x){for(I=0;8>I;++I)for(E=0;3>E;++E)for(R=0;11>R;++R)Z=fe(P,DJ[x][I][E][R])?pe(P,8):QJ[x][I][E][R],M.Wc[x][I].Yb[E][R]=Z;for(I=0;17>I;++I)M.Xc[x][I]=M.Wc[x][PJ[I]]}return u.kc=ce(P),u.kc&&(u.Bd=pe(P,8)),u.cb=1}function Gh(u,m,x,E,I,P,M){var R=m[I].Yb[x];for(x=0;16>I;++I){if(!fe(u,R[x+0]))return I;for(;!fe(u,R[x+1]);)if(R=m[++I].Yb[0],x=0,I==16)return 16;var j=m[I+1].Yb;if(fe(u,R[x+2])){var Z=u,de=0;if(fe(Z,(Se=R)[(Fe=x)+3]))if(fe(Z,Se[Fe+6])){for(R=0,Fe=2*(de=fe(Z,Se[Fe+8]))+(Se=fe(Z,Se[Fe+9+de])),de=0,Se=LJ[Fe];Se[R];++R)de+=de+fe(Z,Se[R]);de+=3+(8<<Fe)}else fe(Z,Se[Fe+7])?(de=7+2*fe(Z,165),de+=fe(Z,145)):de=5+fe(Z,159);else de=fe(Z,Se[Fe+4])?3+fe(Z,Se[Fe+5]):2;R=j[2]}else de=1,R=j[1];j=M+kJ[I],0>(Z=u).b&&ie(Z);var Fe,Se=Z.b,ye=(Fe=Z.Ca>>1)-(Z.I>>Se)>>31;--Z.b,Z.Ca+=ye,Z.Ca|=1,Z.I-=(Fe+1&ye)<<Se,P[j]=((de^ye)-ye)*E[(0<I)+0]}return 16}function _c(u){var m=u.rb[u.sb-1];m.la=0,m.Na=0,n(u.zc,0,0,u.zc.length),u.ja=0}function A2(u,m){if(u==null)return 0;if(m==null)return Hr(u,2,"NULL VP8Io parameter in VP8Decode().");if(!u.cb&&!Kh(u,m))return 0;if(e(u.cb),m.ac==null||m.ac(m)){m.ob&&(u.L=0);var x=g0[u.L];if(u.L==2?(u.yb=0,u.zb=0):(u.yb=m.v-x>>4,u.zb=m.j-x>>4,0>u.yb&&(u.yb=0),0>u.zb&&(u.zb=0)),u.Va=m.o+15+x>>4,u.Hb=m.va+15+x>>4,u.Hb>u.za&&(u.Hb=u.za),u.Va>u.Ub&&(u.Va=u.Ub),0<u.L){var E=u.ed;for(x=0;4>x;++x){var I;if(u.Qa.Cb){var P=u.Qa.Lb[x];u.Qa.Fb||(P+=E.Tb)}else P=E.Tb;for(I=0;1>=I;++I){var M=u.gd[x][I],R=P;if(E.Pc&&(R+=E.vd[0],I&&(R+=E.od[0])),0<(R=0>R?0:63<R?63:R)){var j=R;0<E.wb&&(j=4<E.wb?j>>2:j>>1)>9-E.wb&&(j=9-E.wb),1>j&&(j=1),M.dd=j,M.tc=2*R+j,M.ld=40<=R?2:15<=R?1:0}else M.tc=0;M.La=I}}}x=0}else Hr(u,6,"Frame setup failed"),x=u.a;if(x=x==0){if(x){u.$c=0,0<u.Aa||(u.Ic=YJ);e:{x=u.Ic,E=4*(j=u.za);var Z=32*j,de=j+1,Fe=0<u.L?j*(0<u.Aa?2:1):0,Se=(u.Aa==2?2:1)*j;if((M=E+832+(I=3*(16*x+g0[u.L])/2*Z)+(P=u.Fa!=null&&0<u.Fa.length?u.Kc.c*u.Kc.i:0))!=M)x=0;else{if(M>u.Vb){if(u.Vb=0,u.Ec=a(M),u.Fc=0,u.Ec==null){x=Hr(u,1,"no memory during frame initialization.");break e}u.Vb=M}M=u.Ec,R=u.Fc,u.Ac=M,u.Bc=R,R+=E,u.Gd=i(Z,Ta),u.Hd=0,u.rb=i(de+1,bt),u.sb=1,u.wa=Fe?i(Fe,Vt):null,u.Y=0,u.D.Nb=0,u.D.wa=u.wa,u.D.Y=u.Y,0<u.Aa&&(u.D.Y+=j),e(!0),u.oc=M,u.pc=R,R+=832,u.ya=i(Se,rn),u.aa=0,u.D.ya=u.ya,u.D.aa=u.aa,u.Aa==2&&(u.D.aa+=j),u.R=16*j,u.B=8*j,j=(Z=g0[u.L])*u.R,Z=Z/2*u.B,u.sa=M,u.ta=R+j,u.qa=u.sa,u.ra=u.ta+16*x*u.R+Z,u.Ha=u.qa,u.Ia=u.ra+8*x*u.B+Z,u.$c=0,R+=I,u.mb=P?M:null,u.nb=P?R:null,e(R+P<=u.Fc+u.Vb),_c(u),n(u.Ac,u.Bc,0,E),x=1}}if(x){if(m.ka=0,m.y=u.sa,m.O=u.ta,m.f=u.qa,m.N=u.ra,m.ea=u.Ha,m.Vd=u.Ia,m.fa=u.R,m.Rc=u.B,m.F=null,m.J=0,!Xb){for(x=-255;255>=x;++x)Gb[255+x]=0>x?-x:x;for(x=-1020;1020>=x;++x)jb[1020+x]=-128>x?-128:127<x?127:x;for(x=-112;112>=x;++x)zb[112+x]=-16>x?-16:15<x?15:x;for(x=-255;510>=x;++x)Wb[255+x]=0>x?0:255<x?255:x;Xb=1}oa=i2,tl=n2,Vi=zh,la=a2,ni=Wh,Xc=jh,Ds=kc,rl=Qs,Ps=w2,Ki=Qc,$c=v2,Ln=zo,ai=Oc,pr=r0,mr=t0,Vr=ti,AA=Di,ii=m2,ca[0]=Na,ca[1]=s2,ca[2]=f2,ca[3]=u2,ca[4]=qh,ca[5]=Go,ca[6]=Yh,ca[7]=Nc,ca[8]=d2,ca[9]=h2,ji[0]=Xh,ji[1]=l2,ji[2]=ei,ji[3]=Vo,ji[4]=QA,ji[5]=c2,ji[6]=$h,si[0]=Oi,si[1]=o2,si[2]=g2,si[3]=Ic,si[4]=ks,si[5]=p2,si[6]=Lc,x=1}else x=0}x&&(x=function(ye,Pe){for(ye.M=0;ye.M<ye.Va;++ye.M){var Ne,ge=ye.Jc[ye.M&ye.Xb],Be=ye.m,Oe=ye;for(Ne=0;Ne<Oe.za;++Ne){var Ge=Be,De=Oe,lt=De.Ac,At=De.Bc+4*Ne,wt=De.zc,at=De.ya[De.aa+Ne];if(De.Qa.Bb?at.$b=fe(Ge,De.Pa.jb[0])?2+fe(Ge,De.Pa.jb[2]):fe(Ge,De.Pa.jb[1]):at.$b=0,De.kc&&(at.Ad=fe(Ge,De.Bd)),at.Za=!fe(Ge,145)+0,at.Za){var Yt=at.Ob,ar=0;for(De=0;4>De;++De){var zt,Rt=wt[0+De];for(zt=0;4>zt;++zt){Rt=OJ[lt[At+zt]][Rt];for(var ur=Jb[fe(Ge,Rt[0])];0<ur;)ur=Jb[2*ur+fe(Ge,Rt[ur])];Rt=-ur,lt[At+zt]=Rt}A(Yt,ar,lt,At,4),ar+=4,wt[0+De]=Rt}}else Rt=fe(Ge,156)?fe(Ge,128)?1:3:fe(Ge,163)?2:0,at.Ob[0]=Rt,n(lt,At,Rt,4),n(wt,0,Rt,4);at.Dd=fe(Ge,142)?fe(Ge,114)?fe(Ge,183)?1:3:2:0}if(Oe.m.Ka)return Hr(ye,7,"Premature end-of-partition0 encountered.");for(;ye.ja<ye.za;++ye.ja){if(Oe=ge,Ge=(Be=ye).rb[Be.sb-1],lt=Be.rb[Be.sb+Be.ja],Ne=Be.ya[Be.aa+Be.ja],At=Be.kc?Ne.Ad:0)Ge.la=lt.la=0,Ne.Za||(Ge.Na=lt.Na=0),Ne.Hc=0,Ne.Gc=0,Ne.ia=0;else{var lr,Lt;if(Ge=lt,lt=Oe,At=Be.Pa.Xc,wt=Be.ya[Be.aa+Be.ja],at=Be.pb[wt.$b],De=wt.ad,Yt=0,ar=Be.rb[Be.sb-1],Rt=zt=0,n(De,Yt,0,384),wt.Za)var Yr=0,sn=At[3];else{ur=a(16);var Jr=Ge.Na+ar.Na;if(Jr=qc(lt,At[1],Jr,at.Eb,0,ur,0),Ge.Na=ar.Na=(0<Jr)+0,1<Jr)oa(ur,0,De,Yt);else{var on=ur[0]+3>>3;for(ur=0;256>ur;ur+=16)De[Yt+ur]=on}Yr=1,sn=At[0]}var ir=15&Ge.la,Bn=15&ar.la;for(ur=0;4>ur;++ur){var yn=1&Bn;for(on=Lt=0;4>on;++on)ir=ir>>1|(yn=(Jr=qc(lt,sn,Jr=yn+(1&ir),at.Sc,Yr,De,Yt))>Yr)<<7,Lt=Lt<<2|(3<Jr?3:1<Jr?2:De[Yt+0]!=0),Yt+=16;ir>>=4,Bn=Bn>>1|yn<<7,zt=(zt<<8|Lt)>>>0}for(sn=ir,Yr=Bn>>4,lr=0;4>lr;lr+=2){for(Lt=0,ir=Ge.la>>4+lr,Bn=ar.la>>4+lr,ur=0;2>ur;++ur){for(yn=1&Bn,on=0;2>on;++on)Jr=yn+(1&ir),ir=ir>>1|(yn=0<(Jr=qc(lt,At[2],Jr,at.Qc,0,De,Yt)))<<3,Lt=Lt<<2|(3<Jr?3:1<Jr?2:De[Yt+0]!=0),Yt+=16;ir>>=2,Bn=Bn>>1|yn<<5}Rt|=Lt<<4*lr,sn|=ir<<4<<lr,Yr|=(240&Bn)<<lr}Ge.la=sn,ar.la=Yr,wt.Hc=zt,wt.Gc=Rt,wt.ia=43690&Rt?0:at.ia,At=!(zt|Rt)}if(0<Be.L&&(Be.wa[Be.Y+Be.ja]=Be.gd[Ne.$b][Ne.Za],Be.wa[Be.Y+Be.ja].La|=!At),Oe.Ka)return Hr(ye,7,"Premature end-of-file encountered.")}if(_c(ye),Be=Pe,Oe=1,Ne=(ge=ye).D,Ge=0<ge.L&&ge.M>=ge.zb&&ge.M<=ge.Va,ge.Aa==0)e:{if(Ne.M=ge.M,Ne.uc=Ge,Vc(ge,Ne),Oe=1,Ne=(Lt=ge.D).Nb,Ge=(Rt=g0[ge.L])*ge.R,lt=Rt/2*ge.B,ur=16*Ne*ge.R,on=8*Ne*ge.B,At=ge.sa,wt=ge.ta-Ge+ur,at=ge.qa,De=ge.ra-lt+on,Yt=ge.Ha,ar=ge.Ia-lt+on,Bn=(ir=Lt.M)==0,zt=ir>=ge.Va-1,ge.Aa==2&&Vc(ge,Lt),Lt.uc)for(yn=(Jr=ge).D.M,e(Jr.D.uc),Lt=Jr.yb;Lt<Jr.Hb;++Lt){Yr=Lt,sn=yn;var fA=(CA=(Lr=Jr).D).Nb;lr=Lr.R;var CA=CA.wa[CA.Y+Yr],WA=Lr.sa,On=Lr.ta+16*fA*lr+16*Yr,La=CA.dd,uA=CA.tc;if(uA!=0)if(e(3<=uA),Lr.L==1)0<Yr&&Vr(WA,On,lr,uA+4),CA.La&&ii(WA,On,lr,uA),0<sn&&mr(WA,On,lr,uA+4),CA.La&&AA(WA,On,lr,uA);else{var oi=Lr.B,Ms=Lr.qa,nl=Lr.ra+8*fA*oi+8*Yr,Wi=Lr.Ha,Lr=Lr.Ia+8*fA*oi+8*Yr;fA=CA.ld,0<Yr&&(rl(WA,On,lr,uA+4,La,fA),Ki(Ms,nl,Wi,Lr,oi,uA+4,La,fA)),CA.La&&(Ln(WA,On,lr,uA,La,fA),pr(Ms,nl,Wi,Lr,oi,uA,La,fA)),0<sn&&(Ds(WA,On,lr,uA+4,La,fA),Ps(Ms,nl,Wi,Lr,oi,uA+4,La,fA)),CA.La&&($c(WA,On,lr,uA,La,fA),ai(Ms,nl,Wi,Lr,oi,uA,La,fA))}}if(ge.ia&&alert("todo:DitherRow"),Be.put!=null){if(Lt=16*ir,ir=16*(ir+1),Bn?(Be.y=ge.sa,Be.O=ge.ta+ur,Be.f=ge.qa,Be.N=ge.ra+on,Be.ea=ge.Ha,Be.W=ge.Ia+on):(Lt-=Rt,Be.y=At,Be.O=wt,Be.f=at,Be.N=De,Be.ea=Yt,Be.W=ar),zt||(ir-=Rt),ir>Be.o&&(ir=Be.o),Be.F=null,Be.J=null,ge.Fa!=null&&0<ge.Fa.length&&Lt<ir&&(Be.J=Rc(ge,Be,Lt,ir-Lt),Be.F=ge.mb,Be.F==null&&Be.F.length==0)){Oe=Hr(ge,3,"Could not decode alpha data.");break e}Lt<Be.j&&(Rt=Be.j-Lt,Lt=Be.j,e(!(1&Rt)),Be.O+=ge.R*Rt,Be.N+=ge.B*(Rt>>1),Be.W+=ge.B*(Rt>>1),Be.F!=null&&(Be.J+=Be.width*Rt)),Lt<ir&&(Be.O+=Be.v,Be.N+=Be.v>>1,Be.W+=Be.v>>1,Be.F!=null&&(Be.J+=Be.v),Be.ka=Lt-Be.j,Be.U=Be.va-Be.v,Be.T=ir-Lt,Oe=Be.put(Be))}Ne+1!=ge.Ic||zt||(A(ge.sa,ge.ta-Ge,At,wt+16*ge.R,Ge),A(ge.qa,ge.ra-lt,at,De+8*ge.B,lt),A(ge.Ha,ge.Ia-lt,Yt,ar+8*ge.B,lt))}if(!Oe)return Hr(ye,6,"Output aborted.")}return 1}(u,m)),m.bc!=null&&m.bc(m),x&=1}return x?(u.cb=0,x):0}function Aa(u,m,x,E,I){I=u[m+x+32*E]+(I>>3),u[m+x+32*E]=-256&I?0>I?0:255:I}function Ho(u,m,x,E,I,P){Aa(u,m,0,x,E+I),Aa(u,m,1,x,E+P),Aa(u,m,2,x,E-P),Aa(u,m,3,x,E-I)}function An(u){return(20091*u>>16)+u}function Tc(u,m,x,E){var I,P=0,M=a(16);for(I=0;4>I;++I){var R=u[m+0]+u[m+8],j=u[m+0]-u[m+8],Z=(35468*u[m+4]>>16)-An(u[m+12]),de=An(u[m+4])+(35468*u[m+12]>>16);M[P+0]=R+de,M[P+1]=j+Z,M[P+2]=j-Z,M[P+3]=R-de,P+=4,m++}for(I=P=0;4>I;++I)R=(u=M[P+0]+4)+M[P+8],j=u-M[P+8],Z=(35468*M[P+4]>>16)-An(M[P+12]),Aa(x,E,0,0,R+(de=An(M[P+4])+(35468*M[P+12]>>16))),Aa(x,E,1,0,j+Z),Aa(x,E,2,0,j-Z),Aa(x,E,3,0,R-de),P++,E+=32}function jh(u,m,x,E){var I=u[m+0]+4,P=35468*u[m+4]>>16,M=An(u[m+4]),R=35468*u[m+1]>>16;Ho(x,E,0,I+M,u=An(u[m+1]),R),Ho(x,E,1,I+P,u,R),Ho(x,E,2,I-P,u,R),Ho(x,E,3,I-M,u,R)}function n2(u,m,x,E,I){Tc(u,m,x,E),I&&Tc(u,m+16,x,E+4)}function zh(u,m,x,E){tl(u,m+0,x,E,1),tl(u,m+32,x,E+128,1)}function a2(u,m,x,E){var I;for(u=u[m+0]+4,I=0;4>I;++I)for(m=0;4>m;++m)Aa(x,E,m,I,u)}function Wh(u,m,x,E){u[m+0]&&la(u,m+0,x,E),u[m+16]&&la(u,m+16,x,E+4),u[m+32]&&la(u,m+32,x,E+128),u[m+48]&&la(u,m+48,x,E+128+4)}function i2(u,m,x,E){var I,P=a(16);for(I=0;4>I;++I){var M=u[m+0+I]+u[m+12+I],R=u[m+4+I]+u[m+8+I],j=u[m+4+I]-u[m+8+I],Z=u[m+0+I]-u[m+12+I];P[0+I]=M+R,P[8+I]=M-R,P[4+I]=Z+j,P[12+I]=Z-j}for(I=0;4>I;++I)M=(u=P[0+4*I]+3)+P[3+4*I],R=P[1+4*I]+P[2+4*I],j=P[1+4*I]-P[2+4*I],Z=u-P[3+4*I],x[E+0]=M+R>>3,x[E+16]=Z+j>>3,x[E+32]=M-R>>3,x[E+48]=Z-j>>3,E+=64}function Uc(u,m,x){var E,I=m-32,P=wn,M=255-u[I-1];for(E=0;E<x;++E){var R,j=P,Z=M+u[m-1];for(R=0;R<x;++R)u[m+R]=j[Z+u[I+R]];m+=32}}function s2(u,m){Uc(u,m,4)}function o2(u,m){Uc(u,m,8)}function l2(u,m){Uc(u,m,16)}function ei(u,m){var x;for(x=0;16>x;++x)A(u,m+32*x,u,m-32,16)}function Vo(u,m){var x;for(x=16;0<x;--x)n(u,m,u[m-1],16),m+=32}function Ko(u,m,x){var E;for(E=0;16>E;++E)n(m,x+32*E,u,16)}function Xh(u,m){var x,E=16;for(x=0;16>x;++x)E+=u[m-1+32*x]+u[m+x-32];Ko(E>>5,u,m)}function QA(u,m){var x,E=8;for(x=0;16>x;++x)E+=u[m-1+32*x];Ko(E>>4,u,m)}function c2(u,m){var x,E=8;for(x=0;16>x;++x)E+=u[m+x-32];Ko(E>>4,u,m)}function $h(u,m){Ko(128,u,m)}function Ft(u,m,x){return u+2*m+x+2>>2}function f2(u,m){var x,E=m-32;for(E=new Uint8Array([Ft(u[E-1],u[E+0],u[E+1]),Ft(u[E+0],u[E+1],u[E+2]),Ft(u[E+1],u[E+2],u[E+3]),Ft(u[E+2],u[E+3],u[E+4])]),x=0;4>x;++x)A(u,m+32*x,E,0,E.length)}function u2(u,m){var x=u[m-1],E=u[m-1+32],I=u[m-1+64],P=u[m-1+96];xe(u,m+0,16843009*Ft(u[m-1-32],x,E)),xe(u,m+32,16843009*Ft(x,E,I)),xe(u,m+64,16843009*Ft(E,I,P)),xe(u,m+96,16843009*Ft(I,P,P))}function Na(u,m){var x,E=4;for(x=0;4>x;++x)E+=u[m+x-32]+u[m-1+32*x];for(E>>=3,x=0;4>x;++x)n(u,m+32*x,E,4)}function qh(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1-32],M=u[m+0-32],R=u[m+1-32],j=u[m+2-32],Z=u[m+3-32];u[m+0+96]=Ft(E,I,u[m-1+96]),u[m+1+96]=u[m+0+64]=Ft(x,E,I),u[m+2+96]=u[m+1+64]=u[m+0+32]=Ft(P,x,E),u[m+3+96]=u[m+2+64]=u[m+1+32]=u[m+0+0]=Ft(M,P,x),u[m+3+64]=u[m+2+32]=u[m+1+0]=Ft(R,M,P),u[m+3+32]=u[m+2+0]=Ft(j,R,M),u[m+3+0]=Ft(Z,j,R)}function Yh(u,m){var x=u[m+1-32],E=u[m+2-32],I=u[m+3-32],P=u[m+4-32],M=u[m+5-32],R=u[m+6-32],j=u[m+7-32];u[m+0+0]=Ft(u[m+0-32],x,E),u[m+1+0]=u[m+0+32]=Ft(x,E,I),u[m+2+0]=u[m+1+32]=u[m+0+64]=Ft(E,I,P),u[m+3+0]=u[m+2+32]=u[m+1+64]=u[m+0+96]=Ft(I,P,M),u[m+3+32]=u[m+2+64]=u[m+1+96]=Ft(P,M,R),u[m+3+64]=u[m+2+96]=Ft(M,R,j),u[m+3+96]=Ft(R,j,j)}function Go(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1-32],M=u[m+0-32],R=u[m+1-32],j=u[m+2-32],Z=u[m+3-32];u[m+0+0]=u[m+1+64]=P+M+1>>1,u[m+1+0]=u[m+2+64]=M+R+1>>1,u[m+2+0]=u[m+3+64]=R+j+1>>1,u[m+3+0]=j+Z+1>>1,u[m+0+96]=Ft(I,E,x),u[m+0+64]=Ft(E,x,P),u[m+0+32]=u[m+1+96]=Ft(x,P,M),u[m+1+32]=u[m+2+96]=Ft(P,M,R),u[m+2+32]=u[m+3+96]=Ft(M,R,j),u[m+3+32]=Ft(R,j,Z)}function Nc(u,m){var x=u[m+0-32],E=u[m+1-32],I=u[m+2-32],P=u[m+3-32],M=u[m+4-32],R=u[m+5-32],j=u[m+6-32],Z=u[m+7-32];u[m+0+0]=x+E+1>>1,u[m+1+0]=u[m+0+64]=E+I+1>>1,u[m+2+0]=u[m+1+64]=I+P+1>>1,u[m+3+0]=u[m+2+64]=P+M+1>>1,u[m+0+32]=Ft(x,E,I),u[m+1+32]=u[m+0+96]=Ft(E,I,P),u[m+2+32]=u[m+1+96]=Ft(I,P,M),u[m+3+32]=u[m+2+96]=Ft(P,M,R),u[m+3+64]=Ft(M,R,j),u[m+3+96]=Ft(R,j,Z)}function h2(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1+96];u[m+0+0]=x+E+1>>1,u[m+2+0]=u[m+0+32]=E+I+1>>1,u[m+2+32]=u[m+0+64]=I+P+1>>1,u[m+1+0]=Ft(x,E,I),u[m+3+0]=u[m+1+32]=Ft(E,I,P),u[m+3+32]=u[m+1+64]=Ft(I,P,P),u[m+3+64]=u[m+2+64]=u[m+0+96]=u[m+1+96]=u[m+2+96]=u[m+3+96]=P}function d2(u,m){var x=u[m-1+0],E=u[m-1+32],I=u[m-1+64],P=u[m-1+96],M=u[m-1-32],R=u[m+0-32],j=u[m+1-32],Z=u[m+2-32];u[m+0+0]=u[m+2+32]=x+M+1>>1,u[m+0+32]=u[m+2+64]=E+x+1>>1,u[m+0+64]=u[m+2+96]=I+E+1>>1,u[m+0+96]=P+I+1>>1,u[m+3+0]=Ft(R,j,Z),u[m+2+0]=Ft(M,R,j),u[m+1+0]=u[m+3+32]=Ft(x,M,R),u[m+1+32]=u[m+3+64]=Ft(E,x,M),u[m+1+64]=u[m+3+96]=Ft(I,E,x),u[m+1+96]=Ft(P,I,E)}function g2(u,m){var x;for(x=0;8>x;++x)A(u,m+32*x,u,m-32,8)}function Ic(u,m){var x;for(x=0;8>x;++x)n(u,m,u[m-1],8),m+=32}function Ls(u,m,x){var E;for(E=0;8>E;++E)n(m,x+32*E,u,8)}function Oi(u,m){var x,E=8;for(x=0;8>x;++x)E+=u[m+x-32]+u[m-1+32*x];Ls(E>>4,u,m)}function p2(u,m){var x,E=4;for(x=0;8>x;++x)E+=u[m+x-32];Ls(E>>3,u,m)}function ks(u,m){var x,E=4;for(x=0;8>x;++x)E+=u[m-1+32*x];Ls(E>>3,u,m)}function Lc(u,m){Ls(128,u,m)}function jo(u,m,x){var E=u[m-x],I=u[m+0],P=3*(I-E)+b2[1020+u[m-2*x]-u[m+x]],M=s0[112+(P+4>>3)];u[m-x]=wn[255+E+s0[112+(P+3>>3)]],u[m+0]=wn[255+I-M]}function Jh(u,m,x,E){var I=u[m+0],P=u[m+x];return kn[255+u[m-2*x]-u[m-x]]>E||kn[255+P-I]>E}function Zh(u,m,x,E){return 4*kn[255+u[m-x]-u[m+0]]+kn[255+u[m-2*x]-u[m+x]]<=E}function e0(u,m,x,E,I){var P=u[m-3*x],M=u[m-2*x],R=u[m-x],j=u[m+0],Z=u[m+x],de=u[m+2*x],Fe=u[m+3*x];return 4*kn[255+R-j]+kn[255+M-Z]>E?0:kn[255+u[m-4*x]-P]<=I&&kn[255+P-M]<=I&&kn[255+M-R]<=I&&kn[255+Fe-de]<=I&&kn[255+de-Z]<=I&&kn[255+Z-j]<=I}function t0(u,m,x,E){var I=2*E+1;for(E=0;16>E;++E)Zh(u,m+E,x,I)&&jo(u,m+E,x)}function ti(u,m,x,E){var I=2*E+1;for(E=0;16>E;++E)Zh(u,m+E*x,1,I)&&jo(u,m+E*x,1)}function Di(u,m,x,E){var I;for(I=3;0<I;--I)t0(u,m+=4*x,x,E)}function m2(u,m,x,E){var I;for(I=3;0<I;--I)ti(u,m+=4,x,E)}function Pi(u,m,x,E,I,P,M,R){for(P=2*P+1;0<I--;){if(e0(u,m,x,P,M))if(Jh(u,m,x,R))jo(u,m,x);else{var j=u,Z=m,de=x,Fe=j[Z-2*de],Se=j[Z-de],ye=j[Z+0],Pe=j[Z+de],Ne=j[Z+2*de],ge=27*(Oe=b2[1020+3*(ye-Se)+b2[1020+Fe-Pe]])+63>>7,Be=18*Oe+63>>7,Oe=9*Oe+63>>7;j[Z-3*de]=wn[255+j[Z-3*de]+Oe],j[Z-2*de]=wn[255+Fe+Be],j[Z-de]=wn[255+Se+ge],j[Z+0]=wn[255+ye-ge],j[Z+de]=wn[255+Pe-Be],j[Z+2*de]=wn[255+Ne-Oe]}m+=E}}function na(u,m,x,E,I,P,M,R){for(P=2*P+1;0<I--;){if(e0(u,m,x,P,M))if(Jh(u,m,x,R))jo(u,m,x);else{var j=u,Z=m,de=x,Fe=j[Z-de],Se=j[Z+0],ye=j[Z+de],Pe=s0[112+((Ne=3*(Se-Fe))+4>>3)],Ne=s0[112+(Ne+3>>3)],ge=Pe+1>>1;j[Z-2*de]=wn[255+j[Z-2*de]+ge],j[Z-de]=wn[255+Fe+Ne],j[Z+0]=wn[255+Se-Pe],j[Z+de]=wn[255+ye-ge]}m+=E}}function kc(u,m,x,E,I,P){Pi(u,m,x,1,16,E,I,P)}function Qs(u,m,x,E,I,P){Pi(u,m,1,x,16,E,I,P)}function v2(u,m,x,E,I,P){var M;for(M=3;0<M;--M)na(u,m+=4*x,x,1,16,E,I,P)}function zo(u,m,x,E,I,P){var M;for(M=3;0<M;--M)na(u,m+=4,1,x,16,E,I,P)}function w2(u,m,x,E,I,P,M,R){Pi(u,m,I,1,8,P,M,R),Pi(x,E,I,1,8,P,M,R)}function Qc(u,m,x,E,I,P,M,R){Pi(u,m,1,I,8,P,M,R),Pi(x,E,1,I,8,P,M,R)}function Oc(u,m,x,E,I,P,M,R){na(u,m+4*I,I,1,8,P,M,R),na(x,E+4*I,I,1,8,P,M,R)}function r0(u,m,x,E,I,P,M,R){na(u,m+4,1,I,8,P,M,R),na(x,E+4,1,I,8,P,M,R)}function Wo(){this.ba=new rA,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Gt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Dc(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Pc(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function A0(){this.ua=0,this.Wa=new ne,this.vb=new ne,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Y,this.yc=new T}function B2(){this.xb=this.a=0,this.l=new Ua,this.ca=new rA,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new B,this.Pb=0,this.wd=new B,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new A0,this.ab=0,this.gc=i(4,Pc),this.Oc=0}function Xo(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ua,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Os(u,m,x,E,I,P,M){for(u=u==null?0:u[m+0],m=0;m<M;++m)I[P+m]=u+x[E+m]&255,u=I[P+m]}function Mc(u,m,x,E,I,P,M){var R;if(u==null)Os(null,null,x,E,I,P,M);else for(R=0;R<M;++R)I[P+R]=u[m+R]+x[E+R]&255}function Mi(u,m,x,E,I,P,M){if(u==null)Os(null,null,x,E,I,P,M);else{var R,j=u[m+0],Z=j,de=j;for(R=0;R<M;++R)Z=de+(j=u[m+R])-Z,de=x[E+R]+(-256&Z?0>Z?0:255:Z)&255,Z=j,I[P+R]=de}}function Rc(u,m,x,E){var I=m.width,P=m.o;if(e(u!=null&&m!=null),0>x||0>=E||x+E>P)return null;if(!u.Cc){if(u.ga==null){var M;if(u.ga=new Xo,(M=u.ga==null)||(M=m.width*m.o,e(u.Gb.length==0),u.Gb=a(M),u.Uc=0,u.Gb==null?M=0:(u.mb=u.Gb,u.nb=u.Uc,u.rc=null,M=1),M=!M),!M){M=u.ga;var R=u.Fa,j=u.P,Z=u.qc,de=u.mb,Fe=u.nb,Se=j+1,ye=Z-1,Pe=M.l;if(e(R!=null&&de!=null&&m!=null),zi[0]=null,zi[1]=Os,zi[2]=Mc,zi[3]=Mi,M.ca=de,M.tb=Fe,M.c=m.width,M.i=m.height,e(0<M.c&&0<M.i),1>=Z)m=0;else if(M.$a=R[j+0]>>0&3,M.Z=R[j+0]>>2&3,M.Lc=R[j+0]>>4&3,j=R[j+0]>>6&3,0>M.$a||1<M.$a||4<=M.Z||1<M.Lc||j)m=0;else if(Pe.put=zA,Pe.ac=Nr,Pe.bc=tn,Pe.ma=M,Pe.width=m.width,Pe.height=m.height,Pe.Da=m.Da,Pe.v=m.v,Pe.va=m.va,Pe.j=m.j,Pe.o=m.o,M.$a)e:{e(M.$a==1),m=Ue();t:for(;;){if(m==null){m=0;break e}if(e(M!=null),M.mc=m,m.c=M.c,m.i=M.i,m.l=M.l,m.l.ma=M,m.l.width=M.c,m.l.height=M.i,m.a=0,ve(m.m,R,Se,ye),!be(M.c,M.i,1,m,null)||(m.ab==1&&m.gc[0].hc==3&&z(m.s)?(M.ic=1,R=m.c*m.i,m.Ta=null,m.Ua=0,m.V=a(R),m.Ba=0,m.V==null?(m.a=1,m=0):m=1):(M.ic=0,m=ue(m,M.c)),!m))break t;m=1;break e}M.mc=null,m=0}else m=ye>=M.c*M.i;M=!m}if(M)return null;u.ga.Lc!=1?u.Ga=0:E=P-x}e(u.ga!=null),e(x+E<=P);e:{if(m=(R=u.ga).c,P=R.l.o,R.$a==0){if(Se=u.rc,ye=u.Vc,Pe=u.Fa,j=u.P+1+x*m,Z=u.mb,de=u.nb+x*m,e(j<=u.P+u.qc),R.Z!=0)for(e(zi[R.Z]!=null),M=0;M<E;++M)zi[R.Z](Se,ye,Pe,j,Z,de,m),Se=Z,ye=de,de+=m,j+=m;else for(M=0;M<E;++M)A(Z,de,Pe,j,m),Se=Z,ye=de,de+=m,j+=m;u.rc=Se,u.Vc=ye}else{if(e(R.mc!=null),m=x+E,e((M=R.mc)!=null),e(m<=M.i),M.C>=m)m=1;else if(R.ic||Ce(),R.ic){R=M.V,Se=M.Ba,ye=M.c;var Ne=M.i,ge=(Pe=1,j=M.$/ye,Z=M.$%ye,de=M.m,Fe=M.s,M.$),Be=ye*Ne,Oe=ye*m,Ge=Fe.wc,De=ge<Oe?yr(Fe,Z,j):null;e(ge<=Be),e(m<=Ne),e(z(Fe));t:for(;;){for(;!de.h&&ge<Oe;){if(Z&Ge||(De=yr(Fe,Z,j)),e(De!=null),G(de),256>(Ne=gr(De.G[0],De.H[0],de)))R[Se+ge]=Ne,++ge,++Z>=ye&&(Z=0,++j<=m&&!(j%16)&&ee(M,j));else{if(!(280>Ne)){Pe=0;break t}Ne=xA(Ne-256,de);var lt,At=gr(De.G[4],De.H[4],de);if(G(de),!(ge>=(At=kA(ye,At=xA(At,de)))&&Be-ge>=Ne)){Pe=0;break t}for(lt=0;lt<Ne;++lt)R[Se+ge+lt]=R[Se+ge+lt-At];for(ge+=Ne,Z+=Ne;Z>=ye;)Z-=ye,++j<=m&&!(j%16)&&ee(M,j);ge<Oe&&Z&Ge&&(De=yr(Fe,Z,j))}e(de.h==S(de))}ee(M,j>m?m:j);break t}!Pe||de.h&&ge<Be?(Pe=0,M.a=de.h?5:3):M.$=ge,m=Pe}else m=Ae(M,M.V,M.Ba,M.c,M.i,m,V);if(!m){E=0;break e}}x+E>=P&&(u.Cc=1),E=1}if(!E)return null;if(u.Cc&&((E=u.ga)!=null&&(E.mc=null),u.ga=null,0<u.Ga))return alert("todo:WebPDequantizeLevels"),null}return u.nb+x*I}function w(u,m,x,E,I,P){for(;0<I--;){var M,R=u,j=m+(x?1:0),Z=u,de=m+(x?0:3);for(M=0;M<E;++M){var Fe=Z[de+4*M];Fe!=255&&(Fe*=32897,R[j+4*M+0]=R[j+4*M+0]*Fe>>23,R[j+4*M+1]=R[j+4*M+1]*Fe>>23,R[j+4*M+2]=R[j+4*M+2]*Fe>>23)}m+=P}}function L(u,m,x,E,I){for(;0<E--;){var P;for(P=0;P<x;++P){var M=u[m+2*P+0],R=15&(Z=u[m+2*P+1]),j=4369*R,Z=(240&Z|Z>>4)*j>>16;u[m+2*P+0]=(240&M|M>>4)*j>>16&240|(15&M|M<<4)*j>>16>>4&15,u[m+2*P+1]=240&Z|R}m+=I}}function ae(u,m,x,E,I,P,M,R){var j,Z,de=255;for(Z=0;Z<I;++Z){for(j=0;j<E;++j){var Fe=u[m+j];P[M+4*j]=Fe,de&=Fe}m+=x,M+=R}return de!=255}function he(u,m,x,E,I){var P;for(P=0;P<I;++P)x[E+P]=u[m+P]>>8}function Ce(){Gi=w,Al=L,i0=ae,Kb=he}function Le(u,m,x){Q[u]=function(E,I,P,M,R,j,Z,de,Fe,Se,ye,Pe,Ne,ge,Be,Oe,Ge){var De,lt=Ge-1>>1,At=R[j+0]|Z[de+0]<<16,wt=Fe[Se+0]|ye[Pe+0]<<16;e(E!=null);var at=3*At+wt+131074>>2;for(m(E[I+0],255&at,at>>16,Ne,ge),P!=null&&(at=3*wt+At+131074>>2,m(P[M+0],255&at,at>>16,Be,Oe)),De=1;De<=lt;++De){var Yt=R[j+De]|Z[de+De]<<16,ar=Fe[Se+De]|ye[Pe+De]<<16,zt=At+Yt+wt+ar+524296,Rt=zt+2*(Yt+wt)>>3;at=Rt+At>>1,At=(zt=zt+2*(At+ar)>>3)+Yt>>1,m(E[I+2*De-1],255&at,at>>16,Ne,ge+(2*De-1)*x),m(E[I+2*De-0],255&At,At>>16,Ne,ge+(2*De-0)*x),P!=null&&(at=zt+wt>>1,At=Rt+ar>>1,m(P[M+2*De-1],255&at,at>>16,Be,Oe+(2*De-1)*x),m(P[M+2*De+0],255&At,At>>16,Be,Oe+(2*De+0)*x)),At=Yt,wt=ar}1&Ge||(at=3*At+wt+131074>>2,m(E[I+Ge-1],255&at,at>>16,Ne,ge+(Ge-1)*x),P!=null&&(at=3*wt+At+131074>>2,m(P[M+Ge-1],255&at,at>>16,Be,Oe+(Ge-1)*x)))}}function We(){Qn[o0]=RJ,Qn[l0]=eE,Qn[$b]=HJ,Qn[c0]=tE,Qn[f0]=rE,Qn[E2]=AE,Qn[qb]=VJ,Qn[F2]=eE,Qn[S2]=tE,Qn[u0]=rE,Qn[_2]=AE}function ot(u){return u&~KJ?0>u?0:255:u>>nE}function mt(u,m){return ot((19077*u>>8)+(26149*m>>8)-14234)}function It(u,m,x){return ot((19077*u>>8)-(6419*m>>8)-(13320*x>>8)+8708)}function Dt(u,m){return ot((19077*u>>8)+(33050*m>>8)-17685)}function jt(u,m,x,E,I){E[I+0]=mt(u,x),E[I+1]=It(u,m,x),E[I+2]=Dt(u,m)}function Er(u,m,x,E,I){E[I+0]=Dt(u,m),E[I+1]=It(u,m,x),E[I+2]=mt(u,x)}function Ir(u,m,x,E,I){var P=It(u,m,x);m=P<<3&224|Dt(u,m)>>3,E[I+0]=248&mt(u,x)|P>>5,E[I+1]=m}function qr(u,m,x,E,I){var P=240&Dt(u,m)|15;E[I+0]=240&mt(u,x)|It(u,m,x)>>4,E[I+1]=P}function OA(u,m,x,E,I){E[I+0]=255,jt(u,m,x,E,I+1)}function cA(u,m,x,E,I){Er(u,m,x,E,I),E[I+3]=255}function aa(u,m,x,E,I){jt(u,m,x,E,I),E[I+3]=255}function vn(u,m){return 0>u?0:u>m?m:u}function ri(u,m,x){Q[u]=function(E,I,P,M,R,j,Z,de,Fe){for(var Se=de+(-2&Fe)*x;de!=Se;)m(E[I+0],P[M+0],R[j+0],Z,de),m(E[I+1],P[M+0],R[j+0],Z,de+x),I+=2,++M,++j,de+=2*x;1&Fe&&m(E[I+0],P[M+0],R[j+0],Z,de)}}function n0(u,m,x){return x==0?u==0?m==0?6:5:m==0?4:0:x}function Hc(u,m,x,E,I){switch(u>>>30){case 3:tl(m,x,E,I,0);break;case 2:Xc(m,x,E,I);break;case 1:la(m,x,E,I)}}function Vc(u,m){var x,E,I=m.M,P=m.Nb,M=u.oc,R=u.pc+40,j=u.oc,Z=u.pc+584,de=u.oc,Fe=u.pc+600;for(x=0;16>x;++x)M[R+32*x-1]=129;for(x=0;8>x;++x)j[Z+32*x-1]=129,de[Fe+32*x-1]=129;for(0<I?M[R-1-32]=j[Z-1-32]=de[Fe-1-32]=129:(n(M,R-32-1,127,21),n(j,Z-32-1,127,9),n(de,Fe-32-1,127,9)),E=0;E<u.za;++E){var Se=m.ya[m.aa+E];if(0<E){for(x=-1;16>x;++x)A(M,R+32*x-4,M,R+32*x+12,4);for(x=-1;8>x;++x)A(j,Z+32*x-4,j,Z+32*x+4,4),A(de,Fe+32*x-4,de,Fe+32*x+4,4)}var ye=u.Gd,Pe=u.Hd+E,Ne=Se.ad,ge=Se.Hc;if(0<I&&(A(M,R-32,ye[Pe].y,0,16),A(j,Z-32,ye[Pe].f,0,8),A(de,Fe-32,ye[Pe].ea,0,8)),Se.Za){var Be=M,Oe=R-32+16;for(0<I&&(E>=u.za-1?n(Be,Oe,ye[Pe].y[15],4):A(Be,Oe,ye[Pe+1].y,0,4)),x=0;4>x;x++)Be[Oe+128+x]=Be[Oe+256+x]=Be[Oe+384+x]=Be[Oe+0+x];for(x=0;16>x;++x,ge<<=2)Be=M,Oe=R+iE[x],ca[Se.Ob[x]](Be,Oe),Hc(ge,Ne,16*+x,Be,Oe)}else if(Be=n0(E,I,Se.Ob[0]),ji[Be](M,R),ge!=0)for(x=0;16>x;++x,ge<<=2)Hc(ge,Ne,16*+x,M,R+iE[x]);for(x=Se.Gc,Be=n0(E,I,Se.Dd),si[Be](j,Z),si[Be](de,Fe),ge=Ne,Be=j,Oe=Z,255&(Se=x>>0)&&(170&Se?Vi(ge,256,Be,Oe):ni(ge,256,Be,Oe)),Se=de,ge=Fe,255&(x>>=8)&&(170&x?Vi(Ne,320,Se,ge):ni(Ne,320,Se,ge)),I<u.Ub-1&&(A(ye[Pe].y,0,M,R+480,16),A(ye[Pe].f,0,j,Z+224,8),A(ye[Pe].ea,0,de,Fe+224,8)),x=8*P*u.B,ye=u.sa,Pe=u.ta+16*E+16*P*u.R,Ne=u.qa,Se=u.ra+8*E+x,ge=u.Ha,Be=u.Ia+8*E+x,x=0;16>x;++x)A(ye,Pe+x*u.R,M,R+32*x,16);for(x=0;8>x;++x)A(Ne,Se+x*u.B,j,Z+32*x,8),A(ge,Be+x*u.B,de,Fe+32*x,8)}}function $o(u,m,x,E,I,P,M,R,j){var Z=[0],de=[0],Fe=0,Se=j!=null?j.kd:0,ye=j??new Dc;if(u==null||12>x)return 7;ye.data=u,ye.w=m,ye.ha=x,m=[m],x=[x],ye.gb=[ye.gb];e:{var Pe=m,Ne=x,ge=ye.gb;if(e(u!=null),e(Ne!=null),e(ge!=null),ge[0]=0,12<=Ne[0]&&!r(u,Pe[0],"RIFF")){if(r(u,Pe[0]+8,"WEBP")){ge=3;break e}var Be=Xe(u,Pe[0]+4);if(12>Be||4294967286<Be){ge=3;break e}if(Se&&Be>Ne[0]-8){ge=7;break e}ge[0]=Be,Pe[0]+=12,Ne[0]-=12}ge=0}if(ge!=0)return ge;for(Be=0<ye.gb[0],x=x[0];;){e:{var Oe=u;Ne=m,ge=x;var Ge=Z,De=de,lt=Pe=[0];if((at=Fe=[Fe])[0]=0,8>ge[0])ge=7;else{if(!r(Oe,Ne[0],"VP8X")){if(Xe(Oe,Ne[0]+4)!=10){ge=3;break e}if(18>ge[0]){ge=7;break e}var At=Xe(Oe,Ne[0]+8),wt=1+Me(Oe,Ne[0]+12);if(2147483648<=wt*(Oe=1+Me(Oe,Ne[0]+15))){ge=3;break e}lt!=null&&(lt[0]=At),Ge!=null&&(Ge[0]=wt),De!=null&&(De[0]=Oe),Ne[0]+=18,ge[0]-=18,at[0]=1}ge=0}}if(Fe=Fe[0],Pe=Pe[0],ge!=0)return ge;if(Ne=!!(2&Pe),!Be&&Fe)return 3;if(P!=null&&(P[0]=!!(16&Pe)),M!=null&&(M[0]=Ne),R!=null&&(R[0]=0),M=Z[0],Pe=de[0],Fe&&Ne&&j==null){ge=0;break}if(4>x){ge=7;break}if(Be&&Fe||!Be&&!Fe&&!r(u,m[0],"ALPH")){x=[x],ye.na=[ye.na],ye.P=[ye.P],ye.Sa=[ye.Sa];e:{At=u,ge=m,Be=x;var at=ye.gb;Ge=ye.na,De=ye.P,lt=ye.Sa,wt=22,e(At!=null),e(Be!=null),Oe=ge[0];var Yt=Be[0];for(e(Ge!=null),e(lt!=null),Ge[0]=null,De[0]=null,lt[0]=0;;){if(ge[0]=Oe,Be[0]=Yt,8>Yt){ge=7;break e}var ar=Xe(At,Oe+4);if(4294967286<ar){ge=3;break e}var zt=8+ar+1&-2;if(wt+=zt,0<at&&wt>at){ge=3;break e}if(!r(At,Oe,"VP8 ")||!r(At,Oe,"VP8L")){ge=0;break e}if(Yt[0]<zt){ge=7;break e}r(At,Oe,"ALPH")||(Ge[0]=At,De[0]=Oe+8,lt[0]=ar),Oe+=zt,Yt-=zt}}if(x=x[0],ye.na=ye.na[0],ye.P=ye.P[0],ye.Sa=ye.Sa[0],ge!=0)break}x=[x],ye.Ja=[ye.Ja],ye.xa=[ye.xa];e:if(at=u,ge=m,Be=x,Ge=ye.gb[0],De=ye.Ja,lt=ye.xa,At=ge[0],Oe=!r(at,At,"VP8 "),wt=!r(at,At,"VP8L"),e(at!=null),e(Be!=null),e(De!=null),e(lt!=null),8>Be[0])ge=7;else{if(Oe||wt){if(at=Xe(at,At+4),12<=Ge&&at>Ge-12){ge=3;break e}if(Se&&at>Be[0]-8){ge=7;break e}De[0]=at,ge[0]+=8,Be[0]-=8,lt[0]=wt}else lt[0]=5<=Be[0]&&at[At+0]==47&&!(at[At+4]>>5),De[0]=Be[0];ge=0}if(x=x[0],ye.Ja=ye.Ja[0],ye.xa=ye.xa[0],m=m[0],ge!=0)break;if(4294967286<ye.Ja)return 3;if(R==null||Ne||(R[0]=ye.xa?2:1),M=[M],Pe=[Pe],ye.xa){if(5>x){ge=7;break}R=M,Se=Pe,Ne=P,u==null||5>x?u=0:5<=x&&u[m+0]==47&&!(u[m+4]>>5)?(Be=[0],at=[0],Ge=[0],ve(De=new B,u,m,x),gt(De,Be,at,Ge)?(R!=null&&(R[0]=Be[0]),Se!=null&&(Se[0]=at[0]),Ne!=null&&(Ne[0]=Ge[0]),u=1):u=0):u=0}else{if(10>x){ge=7;break}R=Pe,u==null||10>x||!Vh(u,m+3,x-3)?u=0:(Se=u[m+0]|u[m+1]<<8|u[m+2]<<16,Ne=16383&(u[m+7]<<8|u[m+6]),u=16383&(u[m+9]<<8|u[m+8]),1&Se||3<(Se>>1&7)||!(Se>>4&1)||Se>>5>=ye.Ja||!Ne||!u?u=0:(M&&(M[0]=Ne),R&&(R[0]=u),u=1))}if(!u||(M=M[0],Pe=Pe[0],Fe&&(Z[0]!=M||de[0]!=Pe)))return 3;j!=null&&(j[0]=ye,j.offset=m-j.w,e(4294967286>m-j.w),e(j.offset==j.ha-x));break}return ge==0||ge==7&&Fe&&j==null?(P!=null&&(P[0]|=ye.na!=null&&0<ye.na.length),E!=null&&(E[0]=M),I!=null&&(I[0]=Pe),0):ge}function Kc(u,m,x){var E=m.width,I=m.height,P=0,M=0,R=E,j=I;if(m.Da=u!=null&&0<u.Da,m.Da&&(R=u.cd,j=u.bd,P=u.v,M=u.j,11>x||(P&=-2,M&=-2),0>P||0>M||0>=R||0>=j||P+R>E||M+j>I))return 0;if(m.v=P,m.j=M,m.va=P+R,m.o=M+j,m.U=R,m.T=j,m.da=u!=null&&0<u.da,m.da){if(!Qe(R,j,x=[u.ib],P=[u.hb]))return 0;m.ib=x[0],m.hb=P[0]}return m.ob=u!=null&&u.ob,m.Kb=u==null||!u.Sd,m.da&&(m.ob=m.ib<3*E/4&&m.hb<3*I/4,m.Kb=0),1}function Gc(u){if(u==null)return 2;if(11>u.S){var m=u.f.RGBA;m.fb+=(u.height-1)*m.A,m.A=-m.A}else m=u.f.kb,u=u.height,m.O+=(u-1)*m.fa,m.fa=-m.fa,m.N+=(u-1>>1)*m.Ab,m.Ab=-m.Ab,m.W+=(u-1>>1)*m.Db,m.Db=-m.Db,m.F!=null&&(m.J+=(u-1)*m.lb,m.lb=-m.lb);return 0}function qo(u,m,x,E){if(E==null||0>=u||0>=m)return 2;if(x!=null){if(x.Da){var I=x.cd,P=x.bd,M=-2&x.v,R=-2&x.j;if(0>M||0>R||0>=I||0>=P||M+I>u||R+P>m)return 2;u=I,m=P}if(x.da){if(!Qe(u,m,I=[x.ib],P=[x.hb]))return 2;u=I[0],m=P[0]}}E.width=u,E.height=m;e:{var j=E.width,Z=E.height;if(u=E.S,0>=j||0>=Z||!(u>=o0&&13>u))u=2;else{if(0>=E.Rd&&E.sd==null){M=P=I=m=0;var de=(R=j*sE[u])*Z;if(11>u||(P=(Z+1)/2*(m=(j+1)/2),u==12&&(M=(I=j)*Z)),(Z=a(de+2*P+M))==null){u=1;break e}E.sd=Z,11>u?((j=E.f.RGBA).eb=Z,j.fb=0,j.A=R,j.size=de):((j=E.f.kb).y=Z,j.O=0,j.fa=R,j.Fd=de,j.f=Z,j.N=0+de,j.Ab=m,j.Cd=P,j.ea=Z,j.W=0+de+P,j.Db=m,j.Ed=P,u==12&&(j.F=Z,j.J=0+de+2*P),j.Tc=M,j.lb=I)}if(m=1,I=E.S,P=E.width,M=E.height,I>=o0&&13>I)if(11>I)u=E.f.RGBA,m&=(R=Math.abs(u.A))*(M-1)+P<=u.size,m&=R>=P*sE[I],m&=u.eb!=null;else{u=E.f.kb,R=(P+1)/2,de=(M+1)/2,j=Math.abs(u.fa),Z=Math.abs(u.Ab);var Fe=Math.abs(u.Db),Se=Math.abs(u.lb),ye=Se*(M-1)+P;m&=j*(M-1)+P<=u.Fd,m&=Z*(de-1)+R<=u.Cd,m=(m&=Fe*(de-1)+R<=u.Ed)&j>=P&Z>=R&Fe>=R,m&=u.y!=null,m&=u.f!=null,m&=u.ea!=null,I==12&&(m&=Se>=P,m&=ye<=u.Tc,m&=u.F!=null)}else m=0;u=m?0:2}}return u!=0||x!=null&&x.fd&&(u=Gc(E)),u}var nn=64,Yo=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Jo=24,Zo=32,jc=8,an=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];ze("Predictor0","PredictorAdd0"),Q.Predictor0=function(){return 4278190080},Q.Predictor1=function(u){return u},Q.Predictor2=function(u,m,x){return m[x+0]},Q.Predictor3=function(u,m,x){return m[x+1]},Q.Predictor4=function(u,m,x){return m[x-1]},Q.Predictor5=function(u,m,x){return Je(Je(u,m[x+1]),m[x+0])},Q.Predictor6=function(u,m,x){return Je(u,m[x-1])},Q.Predictor7=function(u,m,x){return Je(u,m[x+0])},Q.Predictor8=function(u,m,x){return Je(m[x-1],m[x+0])},Q.Predictor9=function(u,m,x){return Je(m[x+0],m[x+1])},Q.Predictor10=function(u,m,x){return Je(Je(u,m[x-1]),Je(m[x+0],m[x+1]))},Q.Predictor11=function(u,m,x){var E=m[x+0];return 0>=ht(E>>24&255,u>>24&255,(m=m[x-1])>>24&255)+ht(E>>16&255,u>>16&255,m>>16&255)+ht(E>>8&255,u>>8&255,m>>8&255)+ht(255&E,255&u,255&m)?E:u},Q.Predictor12=function(u,m,x){var E=m[x+0];return(st((u>>24&255)+(E>>24&255)-((m=m[x-1])>>24&255))<<24|st((u>>16&255)+(E>>16&255)-(m>>16&255))<<16|st((u>>8&255)+(E>>8&255)-(m>>8&255))<<8|st((255&u)+(255&E)-(255&m)))>>>0},Q.Predictor13=function(u,m,x){var E=m[x-1];return(nt((u=Je(u,m[x+0]))>>24&255,E>>24&255)<<24|nt(u>>16&255,E>>16&255)<<16|nt(u>>8&255,E>>8&255)<<8|nt(u>>0&255,E>>0&255))>>>0};var y2=Q.PredictorAdd0;Q.PredictorAdd1=vt,ze("Predictor2","PredictorAdd2"),ze("Predictor3","PredictorAdd3"),ze("Predictor4","PredictorAdd4"),ze("Predictor5","PredictorAdd5"),ze("Predictor6","PredictorAdd6"),ze("Predictor7","PredictorAdd7"),ze("Predictor8","PredictorAdd8"),ze("Predictor9","PredictorAdd9"),ze("Predictor10","PredictorAdd10"),ze("Predictor11","PredictorAdd11"),ze("Predictor12","PredictorAdd12"),ze("Predictor13","PredictorAdd13");var zc=Q.PredictorAdd2;xt("ColorIndexInverseTransform","MapARGB","32b",function(u){return u>>8&255},function(u){return u}),xt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(u){return u},function(u){return u>>8&255});var a0,ia=Q.ColorIndexInverseTransform,Wc=Q.MapARGB,x2=Q.VP8LColorIndexInverseTransformAlpha,C2=Q.MapAlpha,Ri=Q.VP8LPredictorsAdd=[];Ri.length=16,(Q.VP8LPredictors=[]).length=16,(Q.VP8LPredictorsAdd_C=[]).length=16,(Q.VP8LPredictors_C=[]).length=16;var In,sa,Hi,Ia,Ai,el,oa,tl,Xc,Vi,la,ni,Ds,rl,Ps,Ki,$c,Ln,ai,pr,mr,Vr,AA,ii,Gi,Al,i0,Kb,Gb=a(511),jb=a(2041),zb=a(225),Wb=a(767),Xb=0,b2=jb,s0=zb,wn=Wb,kn=Gb,o0=0,l0=1,$b=2,c0=3,f0=4,E2=5,qb=6,F2=7,S2=8,u0=9,_2=10,FJ=[2,3,7],SJ=[3,3,11],Yb=[280,256,256,256,40],_J=[0,1,1,1,0],TJ=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],UJ=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],NJ=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],IJ=8,T2=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],U2=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],qc=null,LJ=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],kJ=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Jb=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],QJ=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],OJ=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],DJ=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],PJ=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ji=[],ca=[],si=[],MJ=1,Zb=2,zi=[],Qn=[];Le("UpsampleRgbLinePair",jt,3),Le("UpsampleBgrLinePair",Er,3),Le("UpsampleRgbaLinePair",aa,4),Le("UpsampleBgraLinePair",cA,4),Le("UpsampleArgbLinePair",OA,4),Le("UpsampleRgba4444LinePair",qr,2),Le("UpsampleRgb565LinePair",Ir,2);var RJ=Q.UpsampleRgbLinePair,HJ=Q.UpsampleBgrLinePair,eE=Q.UpsampleRgbaLinePair,tE=Q.UpsampleBgraLinePair,rE=Q.UpsampleArgbLinePair,AE=Q.UpsampleRgba4444LinePair,VJ=Q.UpsampleRgb565LinePair,h0=16,d0=1<<h0-1,Yc=-227,N2=482,nE=6,KJ=(256<<nE)-1,aE=0,GJ=a(256),jJ=a(256),zJ=a(256),WJ=a(256),XJ=a(N2-Yc),$J=a(N2-Yc);ri("YuvToRgbRow",jt,3),ri("YuvToBgrRow",Er,3),ri("YuvToRgbaRow",aa,4),ri("YuvToBgraRow",cA,4),ri("YuvToArgbRow",OA,4),ri("YuvToRgba4444Row",qr,2),ri("YuvToRgb565Row",Ir,2);var iE=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],g0=[0,2,8],qJ=[8,7,6,4,4,2,2,2,1,1,1,1],YJ=1;this.WebPDecodeRGBA=function(u,m,x,E,I){var P=l0,M=new Wo,R=new rA;M.ba=R,R.S=P,R.width=[R.width],R.height=[R.height];var j=R.width,Z=R.height,de=new Et;if(de==null||u==null)var Fe=2;else e(de!=null),Fe=$o(u,m,x,de.width,de.height,de.Pd,de.Qd,de.format,null);if(Fe!=0?j=0:(j!=null&&(j[0]=de.width[0]),Z!=null&&(Z[0]=de.height[0]),j=1),j){R.width=R.width[0],R.height=R.height[0],E!=null&&(E[0]=R.width),I!=null&&(I[0]=R.height);e:{if(E=new Ua,(I=new Dc).data=u,I.w=m,I.ha=x,I.kd=1,m=[0],e(I!=null),((u=$o(I.data,I.w,I.ha,null,null,null,m,null,I))==0||u==7)&&m[0]&&(u=4),(m=u)==0){if(e(M!=null),E.data=I.data,E.w=I.w+I.offset,E.ha=I.ha-I.offset,E.put=zA,E.ac=Nr,E.bc=tn,E.ma=M,I.xa){if((u=Ue())==null){M=1;break e}if(function(Se,ye){var Pe=[0],Ne=[0],ge=[0];t:for(;;){if(Se==null)return 0;if(ye==null)return Se.a=2,0;if(Se.l=ye,Se.a=0,ve(Se.m,ye.data,ye.w,ye.ha),!gt(Se.m,Pe,Ne,ge)){Se.a=3;break t}if(Se.xb=Zb,ye.width=Pe[0],ye.height=Ne[0],!be(Pe[0],Ne[0],1,Se,null))break t;return 1}return e(Se.a!=0),0}(u,E)){if(E=(m=qo(E.width,E.height,M.Oa,M.ba))==0){t:{E=u;r:for(;;){if(E==null){E=0;break t}if(e(E.s.yc!=null),e(E.s.Ya!=null),e(0<E.s.Wb),e((x=E.l)!=null),e((I=x.ma)!=null),E.xb!=0){if(E.ca=I.ba,E.tb=I.tb,e(E.ca!=null),!Kc(I.Oa,x,c0)){E.a=2;break r}if(!ue(E,x.width)||x.da)break r;if((x.da||Pt(E.ca.S))&&Ce(),11>E.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),E.ca.f.kb.F!=null&&Ce()),E.Pb&&0<E.s.ua&&E.s.vb.X==null&&!$e(E.s.vb,E.s.Wa.Xa)){E.a=1;break r}E.xb=0}if(!Ae(E,E.V,E.Ba,E.c,E.i,x.o,te))break r;I.Dc=E.Ma,E=1;break t}e(E.a!=0),E=0}E=!E}E&&(m=u.a)}else m=u.a}else{if((u=new mn)==null){M=1;break e}if(u.Fa=I.na,u.P=I.P,u.qc=I.Sa,Kh(u,E)){if((m=qo(E.width,E.height,M.Oa,M.ba))==0){if(u.Aa=0,x=M.Oa,e((I=u)!=null),x!=null){if(0<(j=0>(j=x.Md)?0:100<j?255:255*j/100)){for(Z=de=0;4>Z;++Z)12>(Fe=I.pb[Z]).lc&&(Fe.ia=j*qJ[0>Fe.lc?0:Fe.lc]>>3),de|=Fe.ia;de&&(alert("todo:VP8InitRandom"),I.ia=1)}I.Ga=x.Id,100<I.Ga?I.Ga=100:0>I.Ga&&(I.Ga=0)}A2(u,E)||(m=u.a)}}else m=u.a}m==0&&M.Oa!=null&&M.Oa.fd&&(m=Gc(M.ba))}M=m}P=M!=0?null:11>P?R.f.RGBA.eb:R.f.kb.y}else P=null;return P};var sE=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(Q,K){for(var re="",U=0;U<4;U++)re+=String.fromCharCode(Q[K++]);return re}function c(Q,K){return(Q[K+0]<<0|Q[K+1]<<8|Q[K+2]<<16)>>>0}function d(Q,K){return(Q[K+0]<<0|Q[K+1]<<8|Q[K+2]<<16|Q[K+3]<<24)>>>0}new o;var g=[0],h=[0],p=[],v=new o,y=t,C=function(Q,K){var re={},U=0,T=!1,H=0,Y=0;if(re.frames=[],!function(_,S,N,G){for(var ie=0;ie<G;ie++)if(_[S+ie]!=N.charCodeAt(ie))return!0;return!1}(Q,K,"RIFF",4)){var le,pe;for(d(Q,K+=4),K+=8;K<Q.length;){var me=l(Q,K),ve=d(Q,K+=4);K+=4;var se=ve+(1&ve);switch(me){case"VP8 ":case"VP8L":re.frames[U]===void 0&&(re.frames[U]={}),(B=re.frames[U]).src_off=T?Y:K-8,B.src_size=H+ve+8,U++,T&&(T=!1,H=0,Y=0);break;case"VP8X":(B=re.header={}).feature_flags=Q[K];var J=K+4;B.canvas_width=1+c(Q,J),J+=3,B.canvas_height=1+c(Q,J),J+=3;break;case"ALPH":T=!0,H=se+8,Y=K-8;break;case"ANIM":(B=re.header).bgcolor=d(Q,K),J=K+4,B.loop_count=(le=Q)[(pe=J)+0]<<0|le[pe+1]<<8,J+=2;break;case"ANMF":var oe,B;(B=re.frames[U]={}).offset_x=2*c(Q,K),K+=3,B.offset_y=2*c(Q,K),K+=3,B.width=1+c(Q,K),K+=3,B.height=1+c(Q,K),K+=3,B.duration=c(Q,K),K+=3,oe=Q[K++],B.dispose=1&oe,B.blend=oe>>1&1}me!="ANMF"&&(K+=se)}return re}}(y,0);C.response=y,C.rgbaoutput=!0,C.dataurl=!1;var b=C.header?C.header:null,F=C.frames?C.frames:null;if(b){b.loop_counter=b.loop_count,g=[b.canvas_height],h=[b.canvas_width];for(var O=0;O<F.length&&F[O].blend!=0;O++);}var W=F[0],X=v.WebPDecodeRGBA(y,W.src_off,W.src_size,h,g);W.rgba=X,W.imgwidth=h[0],W.imgheight=g[0];for(var k=0;k<h[0]*g[0]*4;k++)p[k]=X[k];return this.width=h,this.height=g,this.data=p,this}(function(t){var e=function(){return typeof Nd=="function"},r=function(g,h,p,v){var y=4,C=i;switch(v){case t.image_compression.FAST:y=1,C=a;break;case t.image_compression.MEDIUM:y=6,C=s;break;case t.image_compression.SLOW:y=9,C=o}g=A(g,h,p,C);var b=Nd(g,{level:y});return t.__addimage__.arrayBufferToBinaryString(b)},A=function(g,h,p,v){for(var y,C,b,F=g.length/h,O=new Uint8Array(g.length+F),W=c(),X=0;X<F;X+=1){if(b=X*h,y=g.subarray(b,b+h),v)O.set(v(y,p,C),b+X);else{for(var k,Q=W.length,K=[];k<Q;k+=1)K[k]=W[k](y,p,C);var re=d(K.concat());O.set(K[re],b+X)}C=y}return O},n=function(g){var h=Array.apply([],g);return h.unshift(0),h},a=function(g,h){var p,v=[],y=g.length;v[0]=1;for(var C=0;C<y;C+=1)p=g[C-h]||0,v[C+1]=g[C]-p+256&255;return v},i=function(g,h,p){var v,y=[],C=g.length;y[0]=2;for(var b=0;b<C;b+=1)v=p&&p[b]||0,y[b+1]=g[b]-v+256&255;return y},s=function(g,h,p){var v,y,C=[],b=g.length;C[0]=3;for(var F=0;F<b;F+=1)v=g[F-h]||0,y=p&&p[F]||0,C[F+1]=g[F]+256-(v+y>>>1)&255;return C},o=function(g,h,p){var v,y,C,b,F=[],O=g.length;F[0]=4;for(var W=0;W<O;W+=1)v=g[W-h]||0,y=p&&p[W]||0,C=p&&p[W-h]||0,b=l(v,y,C),F[W+1]=g[W]-b+256&255;return F},l=function(g,h,p){if(g===h&&h===p)return g;var v=Math.abs(h-p),y=Math.abs(g-p),C=Math.abs(g+h-p-p);return v<=y&&v<=C?g:y<=C?h:p},c=function(){return[n,a,i,s,o]},d=function(g){var h=g.map(function(p){return p.reduce(function(v,y){return v+Math.abs(y)},0)});return h.indexOf(Math.min.apply(null,h))};t.processPNG=function(g,h,p,v){var y,C,b,F,O,W,X,k,Q,K,re,U,T,H,Y,le=this.decode.FLATE_DECODE,pe="";if(this.__addimage__.isArrayBuffer(g)&&(g=new Uint8Array(g)),this.__addimage__.isArrayBufferView(g)){if(g=(b=new _U(g)).imgData,C=b.bits,y=b.colorSpace,O=b.colors,[4,6].indexOf(b.colorType)!==-1){if(b.bits===8){Q=(k=b.pixelBitlength==32?new Uint32Array(b.decodePixels().buffer):b.pixelBitlength==16?new Uint16Array(b.decodePixels().buffer):new Uint8Array(b.decodePixels().buffer)).length,re=new Uint8Array(Q*b.colors),K=new Uint8Array(Q);var me,ve=b.pixelBitlength-b.bits;for(H=0,Y=0;H<Q;H++){for(T=k[H],me=0;me<ve;)re[Y++]=T>>>me&255,me+=b.bits;K[H]=T>>>me&255}}if(b.bits===16){Q=(k=new Uint32Array(b.decodePixels().buffer)).length,re=new Uint8Array(Q*(32/b.pixelBitlength)*b.colors),K=new Uint8Array(Q*(32/b.pixelBitlength)),U=b.colors>1,H=0,Y=0;for(var se=0;H<Q;)T=k[H++],re[Y++]=T>>>0&255,U&&(re[Y++]=T>>>16&255,T=k[H++],re[Y++]=T>>>0&255),K[se++]=T>>>16&255;C=8}v!==t.image_compression.NONE&&e()?(g=r(re,b.width*b.colors,b.colors,v),X=r(K,b.width,1,v)):(g=re,X=K,le=void 0)}if(b.colorType===3&&(y=this.color_spaces.INDEXED,W=b.palette,b.transparency.indexed)){var J=b.transparency.indexed,oe=0;for(H=0,Q=J.length;H<Q;++H)oe+=J[H];if((oe/=255)===Q-1&&J.indexOf(0)!==-1)F=[J.indexOf(0)];else if(oe!==Q){for(k=b.decodePixels(),K=new Uint8Array(k.length),H=0,Q=k.length;H<Q;H++)K[H]=J[k[H]];X=r(K,b.width,1)}}var B=function(_){var S;switch(_){case t.image_compression.FAST:S=11;break;case t.image_compression.MEDIUM:S=13;break;case t.image_compression.SLOW:S=14;break;default:S=12}return S}(v);return le===this.decode.FLATE_DECODE&&(pe="/Predictor "+B+" "),pe+="/Colors "+O+" /BitsPerComponent "+C+" /Columns "+b.width,(this.__addimage__.isArrayBuffer(g)||this.__addimage__.isArrayBufferView(g))&&(g=this.__addimage__.arrayBufferToBinaryString(g)),(X&&this.__addimage__.isArrayBuffer(X)||this.__addimage__.isArrayBufferView(X))&&(X=this.__addimage__.arrayBufferToBinaryString(X)),{alias:p,data:g,index:h,filter:le,decodeParameters:pe,transparency:F,palette:W,sMask:X,predictor:B,width:b.width,height:b.height,bitsPerComponent:C,colorSpace:y}}}})(yt.API),function(t){t.processGIF89A=function(e,r,A,n){var a=new TU(e),i=a.width,s=a.height,o=[];a.decodeAndBlitFrameRGBA(0,o);var l={data:o,width:i,height:s},c=new Gd(100).encode(l,100);return t.processJPEG.call(this,c,r,A,n)},t.processGIF87A=t.processGIF89A}(yt.API),Hn.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:n,green:A,blue:r,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Hn.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(r){cr.log("bit decode error:"+r)}},Hn.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var A=this.bottom_up?t:this.height-1-t,n=0;n<e;n++)for(var a=this.datav.getUint8(this.pos++,!0),i=A*this.width*4+8*n*4,s=0;s<8&&8*n+s<this.width;s++){var o=this.palette[a>>7-s&1];this.data[i+4*s]=o.blue,this.data[i+4*s+1]=o.green,this.data[i+4*s+2]=o.red,this.data[i+4*s+3]=255}r!==0&&(this.pos+=4-r)}},Hn.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var A=this.bottom_up?r:this.height-1-r,n=0;n<t;n++){var a=this.datav.getUint8(this.pos++,!0),i=A*this.width*4+2*n*4,s=a>>4,o=15&a,l=this.palette[s];if(this.data[i]=l.blue,this.data[i+1]=l.green,this.data[i+2]=l.red,this.data[i+3]=255,2*n+1>=this.width)break;l=this.palette[o],this.data[i+4]=l.blue,this.data[i+4+1]=l.green,this.data[i+4+2]=l.red,this.data[i+4+3]=255}e!==0&&(this.pos+=4-e)}},Hn.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,A=0;A<this.width;A++){var n=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+4*A;if(n<this.palette.length){var i=this.palette[n];this.data[a]=i.red,this.data[a+1]=i.green,this.data[a+2]=i.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}t!==0&&(this.pos+=4-t)}},Hn.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var A=this.bottom_up?r:this.height-1-r,n=0;n<this.width;n++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var i=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,o=(a>>10&e)/e*255|0,l=a>>15?255:0,c=A*this.width*4+4*n;this.data[c]=o,this.data[c+1]=s,this.data[c+2]=i,this.data[c+3]=l}this.pos+=t}},Hn.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),A=this.height-1;A>=0;A--){for(var n=this.bottom_up?A:this.height-1-A,a=0;a<this.width;a++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(i&e)/e*255|0,o=(i>>5&r)/r*255|0,l=(i>>11)/e*255|0,c=n*this.width*4+4*a;this.data[c]=l,this.data[c+1]=o,this.data[c+2]=s,this.data[c+3]=255}this.pos+=t}},Hn.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=e*this.width*4+4*r;this.data[i]=a,this.data[i+1]=n,this.data[i+2]=A,this.data[i+3]=255}this.pos+=this.width%4}},Hn.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=a,this.data[s+1]=n,this.data[s+2]=A,this.data[s+3]=i}},Hn.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,r,A,n){var a=new Hn(e,!1),i=a.width,s=a.height,o={data:a.getData(),width:i,height:s},l=new Gd(100).encode(o,100);return t.processJPEG.call(this,l,r,A,n)}}(yt.API),Cw.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,r,A,n){var a=new Cw(e),i=a.width,s=a.height,o={data:a.getData(),width:i,height:s},l=new Gd(100).encode(o,100);return t.processJPEG.call(this,l,r,A,n)}}(yt.API),yt.API.processRGBA=function(t,e,r){for(var A=t.data,n=A.length,a=new Uint8Array(n/4*3),i=new Uint8Array(n/4),s=0,o=0,l=0;l<n;l+=4){var c=A[l],d=A[l+1],g=A[l+2],h=A[l+3];a[s++]=c,a[s++]=d,a[s++]=g,i[o++]=h}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(i),data:p,index:e,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},yt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},io=yt.API,lu=io.getCharWidthsArray=function(t,e){var r,A,n=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),i=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:n.metadata.Unicode.widths,o=s.fof?s.fof:1,l=e.kerning?e.kerning:n.metadata.Unicode.kerning,c=l.fof?l.fof:1,d=e.doKerning!==!1,g=0,h=t.length,p=0,v=s[0]||o,y=[];for(r=0;r<h;r++)A=t.charCodeAt(r),typeof n.metadata.widthOfString=="function"?y.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(A))+i*(1e3/a)||0)/1e3):(g=d&&Wt(l[A])==="object"&&!isNaN(parseInt(l[A][p],10))?l[A][p]/c:0,y.push((s[A]||v)/o+g)),p=A;return y},ww=io.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),A=e.font||this.internal.getFont(),n=e.charSpace||this.internal.getCharSpace();return io.processArabic&&(t=io.processArabic(t)),typeof A.metadata.widthOfString=="function"?A.metadata.widthOfString(t,r,n)/r:lu.apply(this,arguments).reduce(function(a,i){return a+i},0)},Bw=function(t,e,r,A){for(var n=[],a=0,i=t.length,s=0;a!==i&&s+e[a]<r;)s+=e[a],a++;n.push(t.slice(0,a));var o=a;for(s=0;a!==i;)s+e[a]>A&&(n.push(t.slice(o,a)),s=0,o=a),s+=e[a],a++;return o!==a&&n.push(t.slice(o,a)),n},yw=function(t,e,r){r||(r={});var A,n,a,i,s,o,l,c=[],d=[c],g=r.textIndent||0,h=0,p=0,v=t.split(" "),y=lu.apply(this,[" ",r])[0];if(o=r.lineIndent===-1?v[0].length+2:r.lineIndent||0){var C=Array(o).join(" "),b=[];v.map(function(O){(O=O.split(/\s*\n/)).length>1?b=b.concat(O.map(function(W,X){return(X&&W.length?`
|
|
234
234
|
`:"")+W})):b.push(O[0])}),v=b,o=ww.apply(this,[C,r])}for(a=0,i=v.length;a<i;a++){var F=0;if(A=v[a],o&&A[0]==`
|
|
235
|
-
`&&(A=A.substr(1),F=1),g+h+(p=(n=lu.apply(this,[A,r])).reduce(function(O,W){return O+W},0))>e||F){if(p>e){for(s=Bw.apply(this,[A,n,e-(g+h),e]),c.push(s.shift()),c=[s.pop()];s.length;)d.push([s.shift()]);p=n.slice(A.length-(c[0]?c[0].length:0)).reduce(function(O,W){return O+W},0)}else c=[A];d.push(c),g=p+o,h=y}else c.push(A),g+=h+p,h=y}return l=o?function(O,W){return(W?C:"")+O.join(" ")}:function(O){return O.join(" ")},d.map(l)},io.splitTextToSize=function(t,e,r){var A,n=(r=r||{}).fontSize||this.internal.getFontSize(),a=(function(c){if(c.widths&&c.kerning)return{widths:c.widths,kerning:c.kerning};var d=this.internal.getFont(c.fontName,c.fontStyle);return d.metadata.Unicode?{widths:d.metadata.Unicode.widths||{0:1},kerning:d.metadata.Unicode.kerning||{}}:{font:d.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);A=Array.isArray(t)?t:String(t).split(/\r?\n/);var i=1*this.internal.scaleFactor*e/n;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/n:0,a.lineIndent=r.lineIndent;var s,o,l=[];for(s=0,o=A.length;s<o;s++)l=l.concat(yw.apply(this,[A[s],i,a]));return l},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",r={},A={},n=0;n<e.length;n++)r[e[n]]="0123456789abcdef"[n],A["0123456789abcdef"[n]]=e[n];var a=function(d){return"0x"+parseInt(d,10).toString(16)},i=t.__fontmetrics__.compress=function(d){var g,h,p,v,y=["{"];for(var C in d){if(g=d[C],isNaN(parseInt(C,10))?h="'"+C+"'":(C=parseInt(C,10),h=(h=a(C).slice(2)).slice(0,-1)+A[h.slice(-1)]),typeof g=="number")g<0?(p=a(g).slice(3),v="-"):(p=a(g).slice(2),v=""),p=v+p.slice(0,-1)+A[p.slice(-1)];else{if(Wt(g)!=="object")throw new Error("Don't know what to do with value type "+Wt(g)+".");p=i(g)}y.push(h+p)}return y.push("}"),y.join("")},s=t.__fontmetrics__.uncompress=function(d){if(typeof d!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,h,p,v,y={},C=1,b=y,F=[],O="",W="",X=d.length-1,k=1;k<X;k+=1)(v=d[k])=="'"?g?(p=g.join(""),g=void 0):g=[]:g?g.push(v):v=="{"?(F.push([b,p]),b={},p=void 0):v=="}"?((h=F.pop())[0][h[1]]=b,p=void 0,b=h[0]):v=="-"?C=-1:p===void 0?r.hasOwnProperty(v)?(O+=r[v],p=parseInt(O,16)*C,C=1,O=""):O+=v:r.hasOwnProperty(v)?(W+=r[v],b[p]=parseInt(W,16)*C,C=1,p=void 0,W=""):W+=v;return y},o={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},l={Unicode:{Courier:o,"Courier-Bold":o,"Courier-BoldOblique":o,"Courier-Oblique":o,Helvetica:o,"Helvetica-Bold":o,"Helvetica-BoldOblique":o,"Helvetica-Oblique":o,"Times-Roman":o,"Times-Bold":o,"Times-BoldItalic":o,"Times-Italic":o}},c={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":s("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(d){var g=d.font,h=c.Unicode[g.postScriptName];h&&(g.metadata.Unicode={},g.metadata.Unicode.widths=h.widths,g.metadata.Unicode.kerning=h.kerning);var p=l.Unicode[g.postScriptName];p&&(g.metadata.Unicode.encoding=p,g.encoding=p.codePages[0])}])}(yt.API),function(t){var e=function(r){for(var A=r.length,n=new Uint8Array(A),a=0;a<A;a++)n[a]=r.charCodeAt(a);return n};t.API.events.push(["addFont",function(r){var A=void 0,n=r.font,a=r.instance;if(!n.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if(typeof(A=a.existsFileInVFS(n.postScriptName)===!1?a.loadFile(n.postScriptName):a.getFileFromVFS(n.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");(function(i,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(Ll(s)),i.metadata=t.API.TTFFont.open(s),i.metadata.Unicode=i.metadata.Unicode||{encoding:{},kerning:{},widths:[]},i.metadata.glyIdsUsed=[0]})(n,A)}}])}(yt),function(t){function e(){return(Bt.canvg?Promise.resolve(Bt.canvg):Promise.resolve().then(()=>bJ)).catch(function(r){return Promise.reject(new Error("Could not load canvg: "+r))}).then(function(r){return r.default?r.default:r})}yt.API.addSvgAsImage=function(r,A,n,a,i,s,o,l){if(isNaN(A)||isNaN(n))throw cr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(i))throw cr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=a,c.height=i;var d=c.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,c.width,c.height);var g={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return e().then(function(p){return p.fromString(d,r,g)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(g)}).then(function(){h.addImage(c.toDataURL("image/jpeg",1),A,n,a,i,o,l)})}}(),yt.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var A=1;A<=this.internal.getNumberOfPages();A++)for(var n=0;n<this.internal.pages[A].length;n++)this.internal.pages[A][n]=this.internal.pages[A][n].replace(e,r);return this},yt.API.viewerPreferences=function(t,e){var r;t=t||{},e=e||!1;var A,n,a,i={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(i),o=[],l=0,c=0,d=0;function g(p,v){var y,C=!1;for(y=0;y<p.length;y+=1)p[y]===v&&(C=!0);return C}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(i)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var h=s.length;for(d=0;d<h;d+=1)r[s[d]].value=r[s[d]].defaultValue,r[s[d]].explicitSet=!1}if(Wt(t)==="object"){for(n in t)if(a=t[n],g(s,n)&&a!==void 0){if(r[n].type==="boolean"&&typeof a=="boolean")r[n].value=a;else if(r[n].type==="name"&&g(r[n].valueSet,a))r[n].value=a;else if(r[n].type==="integer"&&Number.isInteger(a))r[n].value=a;else if(r[n].type==="array"){for(l=0;l<a.length;l+=1)if(A=!0,a[l].length===1&&typeof a[l][0]=="number")o.push(String(a[l]-1));else if(a[l].length>1){for(c=0;c<a[l].length;c+=1)typeof a[l][c]!="number"&&(A=!1);A===!0&&o.push([a[l][0]-1,a[l][1]-1].join(" "))}r[n].value="["+o.join(" ")+"]"}else r[n].value=r[n].defaultValue;r[n].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,v=[];for(p in r)r[p].explicitSet===!0&&(r[p].type==="name"?v.push("/"+p+" /"+r[p].value):v.push("/"+p+" "+r[p].value));v.length!==0&&this.internal.write(`/ViewerPreferences
|
|
235
|
+
`&&(A=A.substr(1),F=1),g+h+(p=(n=lu.apply(this,[A,r])).reduce(function(O,W){return O+W},0))>e||F){if(p>e){for(s=Bw.apply(this,[A,n,e-(g+h),e]),c.push(s.shift()),c=[s.pop()];s.length;)d.push([s.shift()]);p=n.slice(A.length-(c[0]?c[0].length:0)).reduce(function(O,W){return O+W},0)}else c=[A];d.push(c),g=p+o,h=y}else c.push(A),g+=h+p,h=y}return l=o?function(O,W){return(W?C:"")+O.join(" ")}:function(O){return O.join(" ")},d.map(l)},io.splitTextToSize=function(t,e,r){var A,n=(r=r||{}).fontSize||this.internal.getFontSize(),a=(function(c){if(c.widths&&c.kerning)return{widths:c.widths,kerning:c.kerning};var d=this.internal.getFont(c.fontName,c.fontStyle);return d.metadata.Unicode?{widths:d.metadata.Unicode.widths||{0:1},kerning:d.metadata.Unicode.kerning||{}}:{font:d.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);A=Array.isArray(t)?t:String(t).split(/\r?\n/);var i=1*this.internal.scaleFactor*e/n;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/n:0,a.lineIndent=r.lineIndent;var s,o,l=[];for(s=0,o=A.length;s<o;s++)l=l.concat(yw.apply(this,[A[s],i,a]));return l},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",r={},A={},n=0;n<e.length;n++)r[e[n]]="0123456789abcdef"[n],A["0123456789abcdef"[n]]=e[n];var a=function(d){return"0x"+parseInt(d,10).toString(16)},i=t.__fontmetrics__.compress=function(d){var g,h,p,v,y=["{"];for(var C in d){if(g=d[C],isNaN(parseInt(C,10))?h="'"+C+"'":(C=parseInt(C,10),h=(h=a(C).slice(2)).slice(0,-1)+A[h.slice(-1)]),typeof g=="number")g<0?(p=a(g).slice(3),v="-"):(p=a(g).slice(2),v=""),p=v+p.slice(0,-1)+A[p.slice(-1)];else{if(Wt(g)!=="object")throw new Error("Don't know what to do with value type "+Wt(g)+".");p=i(g)}y.push(h+p)}return y.push("}"),y.join("")},s=t.__fontmetrics__.uncompress=function(d){if(typeof d!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,h,p,v,y={},C=1,b=y,F=[],O="",W="",X=d.length-1,k=1;k<X;k+=1)(v=d[k])=="'"?g?(p=g.join(""),g=void 0):g=[]:g?g.push(v):v=="{"?(F.push([b,p]),b={},p=void 0):v=="}"?((h=F.pop())[0][h[1]]=b,p=void 0,b=h[0]):v=="-"?C=-1:p===void 0?r.hasOwnProperty(v)?(O+=r[v],p=parseInt(O,16)*C,C=1,O=""):O+=v:r.hasOwnProperty(v)?(W+=r[v],b[p]=parseInt(W,16)*C,C=1,p=void 0,W=""):W+=v;return y},o={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},l={Unicode:{Courier:o,"Courier-Bold":o,"Courier-BoldOblique":o,"Courier-Oblique":o,Helvetica:o,"Helvetica-Bold":o,"Helvetica-BoldOblique":o,"Helvetica-Oblique":o,"Times-Roman":o,"Times-Bold":o,"Times-BoldItalic":o,"Times-Italic":o}},c={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":s("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(d){var g=d.font,h=c.Unicode[g.postScriptName];h&&(g.metadata.Unicode={},g.metadata.Unicode.widths=h.widths,g.metadata.Unicode.kerning=h.kerning);var p=l.Unicode[g.postScriptName];p&&(g.metadata.Unicode.encoding=p,g.encoding=p.codePages[0])}])}(yt.API),function(t){var e=function(r){for(var A=r.length,n=new Uint8Array(A),a=0;a<A;a++)n[a]=r.charCodeAt(a);return n};t.API.events.push(["addFont",function(r){var A=void 0,n=r.font,a=r.instance;if(!n.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if(typeof(A=a.existsFileInVFS(n.postScriptName)===!1?a.loadFile(n.postScriptName):a.getFileFromVFS(n.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");(function(i,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(Ll(s)),i.metadata=t.API.TTFFont.open(s),i.metadata.Unicode=i.metadata.Unicode||{encoding:{},kerning:{},widths:[]},i.metadata.glyIdsUsed=[0]})(n,A)}}])}(yt),function(t){function e(){return(Bt.canvg?Promise.resolve(Bt.canvg):Promise.resolve().then(()=>EJ)).catch(function(r){return Promise.reject(new Error("Could not load canvg: "+r))}).then(function(r){return r.default?r.default:r})}yt.API.addSvgAsImage=function(r,A,n,a,i,s,o,l){if(isNaN(A)||isNaN(n))throw cr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(i))throw cr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=a,c.height=i;var d=c.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,c.width,c.height);var g={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return e().then(function(p){return p.fromString(d,r,g)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(g)}).then(function(){h.addImage(c.toDataURL("image/jpeg",1),A,n,a,i,o,l)})}}(),yt.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var A=1;A<=this.internal.getNumberOfPages();A++)for(var n=0;n<this.internal.pages[A].length;n++)this.internal.pages[A][n]=this.internal.pages[A][n].replace(e,r);return this},yt.API.viewerPreferences=function(t,e){var r;t=t||{},e=e||!1;var A,n,a,i={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(i),o=[],l=0,c=0,d=0;function g(p,v){var y,C=!1;for(y=0;y<p.length;y+=1)p[y]===v&&(C=!0);return C}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(i)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var h=s.length;for(d=0;d<h;d+=1)r[s[d]].value=r[s[d]].defaultValue,r[s[d]].explicitSet=!1}if(Wt(t)==="object"){for(n in t)if(a=t[n],g(s,n)&&a!==void 0){if(r[n].type==="boolean"&&typeof a=="boolean")r[n].value=a;else if(r[n].type==="name"&&g(r[n].valueSet,a))r[n].value=a;else if(r[n].type==="integer"&&Number.isInteger(a))r[n].value=a;else if(r[n].type==="array"){for(l=0;l<a.length;l+=1)if(A=!0,a[l].length===1&&typeof a[l][0]=="number")o.push(String(a[l]-1));else if(a[l].length>1){for(c=0;c<a[l].length;c+=1)typeof a[l][c]!="number"&&(A=!1);A===!0&&o.push([a[l][0]-1,a[l][1]-1].join(" "))}r[n].value="["+o.join(" ")+"]"}else r[n].value=r[n].defaultValue;r[n].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,v=[];for(p in r)r[p].explicitSet===!0&&(r[p].type==="name"?v.push("/"+p+" /"+r[p].value):v.push("/"+p+" "+r[p].value));v.length!==0&&this.internal.write(`/ViewerPreferences
|
|
236
236
|
<<
|
|
237
237
|
`+v.join(`
|
|
238
238
|
`)+`
|
|
@@ -355,9 +355,9 @@ end`};e.events.push(["putFont",function(a){(function(i){var s=i.font,o=i.out,l=i
|
|
|
355
355
|
`),o.push(` </office:body>
|
|
356
356
|
`),s.bookType=="fods"?o.push("</office:document>"):o.push("</office:document-content>"),o.join("")}}();function Ry(t,e){if(e.bookType=="fods")return My(t,e);var r=Yd(),A="",n=[],a=[];return A="mimetype",Qt(r,A,"application/vnd.oasis.opendocument.spreadsheet"),A="content.xml",Qt(r,A,My(t,e)),n.push([A,"text/xml"]),a.push([A,"ContentFile"]),A="styles.xml",Qt(r,A,aO(t,e)),n.push([A,"text/xml"]),a.push([A,"StylesFile"]),A="meta.xml",Qt(r,A,Gr+RB()),n.push([A,"text/xml"]),a.push([A,"MetadataFile"]),A="manifest.rdf",Qt(r,A,m6(a)),n.push([A,"application/rdf+xml"]),A="META-INF/manifest.xml",Qt(r,A,g6(n)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function Du(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function iO(t){return typeof TextEncoder<"u"?new TextEncoder().encode(t):Kn(Ka(t))}function sO(t,e){e:for(var r=0;r<=t.length-e.length;++r){for(var A=0;A<e.length;++A)if(t[r+A]!=e[A])continue e;return!0}return!1}function Ti(t){var e=t.reduce(function(n,a){return n+a.length},0),r=new Uint8Array(e),A=0;return t.forEach(function(n){r.set(n,A),A+=n.length}),r}function oO(t,e,r){var A=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,n=r/Math.pow(10,A-6176);t[e+15]|=A>>7,t[e+14]|=(A&127)<<1;for(var a=0;n>=1;++a,n/=256)t[e+a]=n&255;t[e+15]|=r>=0?0:128}function Jl(t,e){var r=e?e[0]:0,A=t[r]&127;e:if(t[r++]>=128&&(A|=(t[r]&127)<<7,t[r++]<128||(A|=(t[r]&127)<<14,t[r++]<128)||(A|=(t[r]&127)<<21,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,28),++r,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,35),++r,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,42),++r,t[r++]<128)))break e;return e&&(e[0]=r),A}function Ar(t){var e=new Uint8Array(7);e[0]=t&127;var r=1;e:if(t>127){if(e[r-1]|=128,e[r]=t>>7&127,++r,t<=16383||(e[r-1]|=128,e[r]=t>>14&127,++r,t<=2097151)||(e[r-1]|=128,e[r]=t>>21&127,++r,t<=268435455)||(e[r-1]|=128,e[r]=t/256>>>21&127,++r,t<=34359738367)||(e[r-1]|=128,e[r]=t/65536>>>21&127,++r,t<=4398046511103))break e;e[r-1]|=128,e[r]=t/16777216>>>21&127,++r}return e.slice(0,r)}function wo(t){var e=0,r=t[e]&127;e:if(t[e++]>=128){if(r|=(t[e]&127)<<7,t[e++]<128||(r|=(t[e]&127)<<14,t[e++]<128)||(r|=(t[e]&127)<<21,t[e++]<128))break e;r|=(t[e]&127)<<28}return r}function eA(t){for(var e=[],r=[0];r[0]<t.length;){var A=r[0],n=Jl(t,r),a=n&7;n=Math.floor(n/8);var i=0,s;if(n==0)break;switch(a){case 0:{for(var o=r[0];t[r[0]++]>=128;);s=t.slice(o,r[0])}break;case 5:i=4,s=t.slice(r[0],r[0]+i),r[0]+=i;break;case 1:i=8,s=t.slice(r[0],r[0]+i),r[0]+=i;break;case 2:i=Jl(t,r),s=t.slice(r[0],r[0]+i),r[0]+=i;break;case 3:case 4:default:throw new Error("PB Type ".concat(a," for Field ").concat(n," at offset ").concat(A))}var l={data:s,type:a};e[n]==null?e[n]=[l]:e[n].push(l)}return e}function BA(t){var e=[];return t.forEach(function(r,A){r.forEach(function(n){n.data&&(e.push(Ar(A*8+n.type)),n.type==2&&e.push(Ar(n.data.length)),e.push(n.data))})}),Ti(e)}function zn(t){for(var e,r=[],A=[0];A[0]<t.length;){var n=Jl(t,A),a=eA(t.slice(A[0],A[0]+n));A[0]+=n;var i={id:wo(a[1][0].data),messages:[]};a[2].forEach(function(s){var o=eA(s.data),l=wo(o[3][0].data);i.messages.push({meta:o,data:t.slice(A[0],A[0]+l)}),A[0]+=l}),(e=a[3])!=null&&e[0]&&(i.merge=wo(a[3][0].data)>>>0>0),r.push(i)}return r}function Bo(t){var e=[];return t.forEach(function(r){var A=[];A[1]=[{data:Ar(r.id),type:0}],A[2]=[],r.merge!=null&&(A[3]=[{data:Ar(+!!r.merge),type:0}]);var n=[];r.messages.forEach(function(i){n.push(i.data),i.meta[3]=[{type:0,data:Ar(i.data.length)}],A[2].push({data:BA(i.meta),type:2})});var a=BA(A);e.push(Ar(a.length)),e.push(a),n.forEach(function(i){return e.push(i)})}),Ti(e)}function lO(t,e){if(t!=0)throw new Error("Unexpected Snappy chunk type ".concat(t));for(var r=[0],A=Jl(e,r),n=[];r[0]<e.length;){var a=e[r[0]]&3;if(a==0){var i=e[r[0]++]>>2;if(i<60)++i;else{var s=i-59;i=e[r[0]],s>1&&(i|=e[r[0]+1]<<8),s>2&&(i|=e[r[0]+2]<<16),s>3&&(i|=e[r[0]+3]<<24),i>>>=0,i++,r[0]+=s}n.push(e.slice(r[0],r[0]+i)),r[0]+=i;continue}else{var o=0,l=0;if(a==1?(l=(e[r[0]]>>2&7)+4,o=(e[r[0]++]&224)<<3,o|=e[r[0]++]):(l=(e[r[0]++]>>2)+1,a==2?(o=e[r[0]]|e[r[0]+1]<<8,r[0]+=2):(o=(e[r[0]]|e[r[0]+1]<<8|e[r[0]+2]<<16|e[r[0]+3]<<24)>>>0,r[0]+=4)),n=[Ti(n)],o==0)throw new Error("Invalid offset 0");if(o>n[0].length)throw new Error("Invalid offset beyond length");if(l>=o)for(n.push(n[0].slice(-o)),l-=o;l>=n[n.length-1].length;)n.push(n[n.length-1]),l-=n[n.length-1].length;n.push(n[0].slice(-o,-o+l))}}var c=Ti(n);if(c.length!=A)throw new Error("Unexpected length: ".concat(c.length," != ").concat(A));return c}function Wn(t){for(var e=[],r=0;r<t.length;){var A=t[r++],n=t[r]|t[r+1]<<8|t[r+2]<<16;r+=3,e.push(lO(A,t.slice(r,r+n))),r+=n}if(r!==t.length)throw new Error("data is not a valid framed stream!");return Ti(e)}function yo(t){for(var e=[],r=0;r<t.length;){var A=Math.min(t.length-r,268435455),n=new Uint8Array(4);e.push(n);var a=Ar(A),i=a.length;e.push(a),A<=60?(i++,e.push(new Uint8Array([A-1<<2]))):A<=256?(i+=2,e.push(new Uint8Array([240,A-1&255]))):A<=65536?(i+=3,e.push(new Uint8Array([244,A-1&255,A-1>>8&255]))):A<=16777216?(i+=4,e.push(new Uint8Array([248,A-1&255,A-1>>8&255,A-1>>16&255]))):A<=4294967296&&(i+=5,e.push(new Uint8Array([252,A-1&255,A-1>>8&255,A-1>>16&255,A-1>>>24&255]))),e.push(t.slice(r,r+A)),i+=A,n[0]=0,n[1]=i&255,n[2]=i>>8&255,n[3]=i>>16&255,r+=A}return Ti(e)}function y1(t,e){var r=new Uint8Array(32),A=Du(r),n=12,a=0;switch(r[0]=5,t.t){case"n":r[1]=2,oO(r,n,t.v),a|=1,n+=16;break;case"b":r[1]=6,A.setFloat64(n,t.v?1:0,!0),a|=2,n+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[1]=3,A.setUint32(n,e.indexOf(t.v),!0),a|=8,n+=4;break;default:throw"unsupported cell type "+t.t}return A.setUint32(8,a,!0),r.slice(0,n)}function x1(t,e){var r=new Uint8Array(32),A=Du(r),n=12,a=0;switch(r[0]=3,t.t){case"n":r[2]=2,A.setFloat64(n,t.v,!0),a|=32,n+=8;break;case"b":r[2]=6,A.setFloat64(n,t.v?1:0,!0),a|=32,n+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[2]=3,A.setUint32(n,e.indexOf(t.v),!0),a|=16,n+=4;break;default:throw"unsupported cell type "+t.t}return A.setUint32(4,a,!0),r.slice(0,n)}function Ui(t){var e=eA(t);return Jl(e[1][0].data)}function cO(t,e,r){var A,n,a,i;if(!((A=t[6])!=null&&A[0])||!((n=t[7])!=null&&n[0]))throw"Mutation only works on post-BNC storages!";var s=((i=(a=t[8])==null?void 0:a[0])==null?void 0:i.data)&&wo(t[8][0].data)>0||!1;if(s)throw"Math only works with normal offsets";for(var o=0,l=Du(t[7][0].data),c=0,d=[],g=Du(t[4][0].data),h=0,p=[],v=0;v<e.length;++v){if(e[v]==null){l.setUint16(v*2,65535,!0),g.setUint16(v*2,65535);continue}l.setUint16(v*2,c,!0),g.setUint16(v*2,h,!0);var y,C;switch(typeof e[v]){case"string":y=y1({t:"s",v:e[v]},r),C=x1({t:"s",v:e[v]},r);break;case"number":y=y1({t:"n",v:e[v]},r),C=x1({t:"n",v:e[v]},r);break;case"boolean":y=y1({t:"b",v:e[v]},r),C=x1({t:"b",v:e[v]},r);break;default:throw new Error("Unsupported value "+e[v])}d.push(y),c+=y.length,p.push(C),h+=C.length,++o}for(t[2][0].data=Ar(o);v<t[7][0].data.length/2;++v)l.setUint16(v*2,65535,!0),g.setUint16(v*2,65535,!0);return t[6][0].data=Ti(d),t[3][0].data=Ti(p),o}function fO(t,e){if(!e||!e.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=t.Sheets[t.SheetNames[0]];t.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var A=hn(r["!ref"]);A.s.r=A.s.c=0;var n=!1;A.e.c>9&&(n=!0,A.e.c=9),A.e.r>49&&(n=!0,A.e.r=49),n&&console.error("The Numbers writer is currently limited to ".concat(jr(A)));var a=Mu(r,{range:A,header:1}),i=["~Sh33tJ5~"];a.forEach(function(_){return _.forEach(function(S){typeof S=="string"&&i.push(S)})});var s={},o=[],l=or.read(e.numbers,{type:"base64"});l.FileIndex.map(function(_,S){return[_,l.FullPaths[S]]}).forEach(function(_){var S=_[0],N=_[1];if(S.type==2&&S.name.match(/\.iwa/)){var G=S.content,ie=Wn(G),ce=zn(ie);ce.forEach(function(fe){o.push(fe.id),s[fe.id]={deps:[],location:N,type:wo(fe.messages[0].meta[1][0].data)}})}}),o.sort(function(_,S){return _-S});var c=o.filter(function(_){return _>1}).map(function(_){return[_,Ar(_)]});l.FileIndex.map(function(_,S){return[_,l.FullPaths[S]]}).forEach(function(_){var S=_[0];if(_[1],!!S.name.match(/\.iwa/)){var N=zn(Wn(S.content));N.forEach(function(G){G.messages.forEach(function(ie){c.forEach(function(ce){G.messages.some(function(fe){return wo(fe.meta[1][0].data)!=11006&&sO(fe.data,ce[1])})&&s[ce[0]].deps.push(G.id)})})})}});for(var d=or.find(l,s[1].location),g=zn(Wn(d.content)),h,p=0;p<g.length;++p){var v=g[p];v.id==1&&(h=v)}var y=Ui(eA(h.messages[0].data)[1][0].data);for(d=or.find(l,s[y].location),g=zn(Wn(d.content)),p=0;p<g.length;++p)v=g[p],v.id==y&&(h=v);for(y=Ui(eA(h.messages[0].data)[2][0].data),d=or.find(l,s[y].location),g=zn(Wn(d.content)),p=0;p<g.length;++p)v=g[p],v.id==y&&(h=v);for(y=Ui(eA(h.messages[0].data)[2][0].data),d=or.find(l,s[y].location),g=zn(Wn(d.content)),p=0;p<g.length;++p)v=g[p],v.id==y&&(h=v);var C=eA(h.messages[0].data);{C[6][0].data=Ar(A.e.r+1),C[7][0].data=Ar(A.e.c+1);var b=Ui(C[46][0].data),F=or.find(l,s[b].location),O=zn(Wn(F.content));{for(var W=0;W<O.length&&O[W].id!=b;++W);if(O[W].id!=b)throw"Bad ColumnRowUIDMapArchive";var X=eA(O[W].messages[0].data);X[1]=[],X[2]=[],X[3]=[];for(var k=0;k<=A.e.c;++k){var Q=[];Q[1]=Q[2]=[{type:0,data:Ar(k+420690)}],X[1].push({type:2,data:BA(Q)}),X[2].push({type:0,data:Ar(k)}),X[3].push({type:0,data:Ar(k)})}X[4]=[],X[5]=[],X[6]=[];for(var K=0;K<=A.e.r;++K)Q=[],Q[1]=Q[2]=[{type:0,data:Ar(K+726270)}],X[4].push({type:2,data:BA(Q)}),X[5].push({type:0,data:Ar(K)}),X[6].push({type:0,data:Ar(K)});O[W].messages[0].data=BA(X)}F.content=yo(Bo(O)),F.size=F.content.length,delete C[46];var re=eA(C[4][0].data);{re[7][0].data=Ar(A.e.r+1);var U=eA(re[1][0].data),T=Ui(U[2][0].data);F=or.find(l,s[T].location),O=zn(Wn(F.content));{if(O[0].id!=T)throw"Bad HeaderStorageBucket";var H=eA(O[0].messages[0].data);for(K=0;K<a.length;++K){var Y=eA(H[2][0].data);Y[1][0].data=Ar(K),Y[4][0].data=Ar(a[K].length),H[2][K]={type:H[2][0].type,data:BA(Y)}}O[0].messages[0].data=BA(H)}F.content=yo(Bo(O)),F.size=F.content.length;var le=Ui(re[2][0].data);F=or.find(l,s[le].location),O=zn(Wn(F.content));{if(O[0].id!=le)throw"Bad HeaderStorageBucket";for(H=eA(O[0].messages[0].data),k=0;k<=A.e.c;++k)Y=eA(H[2][0].data),Y[1][0].data=Ar(k),Y[4][0].data=Ar(A.e.r+1),H[2][k]={type:H[2][0].type,data:BA(Y)};O[0].messages[0].data=BA(H)}F.content=yo(Bo(O)),F.size=F.content.length;var pe=Ui(re[4][0].data);(function(){for(var _=or.find(l,s[pe].location),S=zn(Wn(_.content)),N,G=0;G<S.length;++G){var ie=S[G];ie.id==pe&&(N=ie)}var ce=eA(N.messages[0].data);{ce[3]=[];var fe=[];i.forEach(function(Me,Xe){fe[1]=[{type:0,data:Ar(Xe)}],fe[2]=[{type:0,data:Ar(1)}],fe[3]=[{type:2,data:iO(Me)}],ce[3].push({type:2,data:BA(fe)})})}N.messages[0].data=BA(ce);var xe=Bo(S),Ie=yo(xe);_.content=Ie,_.size=_.content.length})();var me=eA(re[3][0].data);{var ve=me[1][0];delete me[2];var se=eA(ve.data);{var J=Ui(se[2][0].data);(function(){for(var _=or.find(l,s[J].location),S=zn(Wn(_.content)),N,G=0;G<S.length;++G){var ie=S[G];ie.id==J&&(N=ie)}var ce=eA(N.messages[0].data);{delete ce[6],delete me[7];var fe=new Uint8Array(ce[5][0].data);ce[5]=[];for(var xe=0,Ie=0;Ie<=A.e.r;++Ie){var Me=eA(fe);xe+=cO(Me,a[Ie],i),Me[1][0].data=Ar(Ie),ce[5].push({data:BA(Me),type:2})}ce[1]=[{type:0,data:Ar(A.e.c+1)}],ce[2]=[{type:0,data:Ar(A.e.r+1)}],ce[3]=[{type:0,data:Ar(xe)}],ce[4]=[{type:0,data:Ar(A.e.r+1)}]}N.messages[0].data=BA(ce);var Xe=Bo(S),$e=yo(Xe);_.content=$e,_.size=_.content.length})()}ve.data=BA(se)}re[3][0].data=BA(me)}C[4][0].data=BA(re)}h.messages[0].data=BA(C);var oe=Bo(g),B=yo(oe);return d.content=B,d.size=d.content.length,l}function uO(t){return function(r){for(var A=0;A!=t.length;++A){var n=t[A];r[n[0]]===void 0&&(r[n[0]]=n[1]),n[2]==="n"&&(r[n[0]]=Number(r[n[0]]))}}}function C1(t){uO([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(t)}function hO(t,e){return e.bookType=="ods"?Ry(t,e):e.bookType=="numbers"?fO(t,e):e.bookType=="xlsb"?dO(t,e):gO(t,e)}function dO(t,e){mo=1024,t&&!t.SSF&&(t.SSF=YA(Sr)),t&&t.SSF&&(wu(),vu(t.SSF),e.revssf=Bu(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,ql?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r=e.bookType=="xlsb"?"bin":"xml",A=my.indexOf(e.bookType)>-1,n=OB();C1(e=e||{});var a=Yd(),i="",s=0;if(e.cellXfs=[],_i(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),i="docProps/core.xml",Qt(a,i,HB(t.Props,e)),n.coreprops.push(i),rr(e.rels,2,i,Xt.CORE_PROPS),i="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var o=[],l=0;l<t.SheetNames.length;++l)(t.Workbook.Sheets[l]||{}).Hidden!=2&&o.push(t.SheetNames[l]);t.Props.SheetNames=o}for(t.Props.Worksheets=t.Props.SheetNames.length,Qt(a,i,KB(t.Props)),n.extprops.push(i),rr(e.rels,3,i,Xt.EXT_PROPS),t.Custprops!==t.Props&&pA(t.Custprops||{}).length>0&&(i="docProps/custom.xml",Qt(a,i,GB(t.Custprops)),n.custprops.push(i),rr(e.rels,4,i,Xt.CUST_PROPS)),s=1;s<=t.SheetNames.length;++s){var c={"!id":{}},d=t.Sheets[t.SheetNames[s-1]],g=(d||{})["!type"]||"sheet";switch(g){case"chart":default:i="xl/worksheets/sheet"+s+"."+r,Qt(a,i,mQ(s-1,i,e,t,c)),n.sheets.push(i),rr(e.wbrels,-1,"worksheets/sheet"+s+"."+r,Xt.WS[0])}if(d){var h=d["!comments"],p=!1,v="";h&&h.length>0&&(v="xl/comments"+s+"."+r,Qt(a,v,BQ(h,v)),n.comments.push(v),rr(c,-1,"../comments"+s+"."+r,Xt.CMNT),p=!0),d["!legacy"]&&p&&Qt(a,"xl/drawings/vmlDrawing"+s+".vml",gy(s,d["!comments"])),delete d["!comments"],delete d["!legacy"]}c["!id"].rId1&&Qt(a,PB(i),go(c))}return e.Strings!=null&&e.Strings.length>0&&(i="xl/sharedStrings."+r,Qt(a,i,wQ(e.Strings,i,e)),n.strs.push(i),rr(e.wbrels,-1,"sharedStrings."+r,Xt.SST)),i="xl/workbook."+r,Qt(a,i,pQ(t,i)),n.workbooks.push(i),rr(e.rels,1,i,Xt.WB),i="xl/theme/theme1.xml",Qt(a,i,hy(t.Themes,e)),n.themes.push(i),rr(e.wbrels,-1,"theme/theme1.xml",Xt.THEME),i="xl/styles."+r,Qt(a,i,vQ(t,i,e)),n.styles.push(i),rr(e.wbrels,-1,"styles."+r,Xt.STY),t.vbaraw&&A&&(i="xl/vbaProject.bin",Qt(a,i,t.vbaraw),n.vba.push(i),rr(e.wbrels,-1,"vbaProject.bin",Xt.VBA)),i="xl/metadata."+r,Qt(a,i,yQ(i)),n.metadata.push(i),rr(e.wbrels,-1,"metadata."+r,Xt.XLMETA),Qt(a,"[Content_Types].xml",DB(n,e)),Qt(a,"_rels/.rels",go(e.rels)),Qt(a,"xl/_rels/workbook."+r+".rels",go(e.wbrels)),delete e.revssf,delete e.ssf,a}function gO(t,e){mo=1024,t&&!t.SSF&&(t.SSF=YA(Sr)),t&&t.SSF&&(wu(),vu(t.SSF),e.revssf=Bu(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,ql?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r="xml",A=my.indexOf(e.bookType)>-1,n=OB();C1(e=e||{});var a=Yd(),i="",s=0;if(e.cellXfs=[],_i(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),i="docProps/core.xml",Qt(a,i,HB(t.Props,e)),n.coreprops.push(i),rr(e.rels,2,i,Xt.CORE_PROPS),i="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var o=[],l=0;l<t.SheetNames.length;++l)(t.Workbook.Sheets[l]||{}).Hidden!=2&&o.push(t.SheetNames[l]);t.Props.SheetNames=o}t.Props.Worksheets=t.Props.SheetNames.length,Qt(a,i,KB(t.Props)),n.extprops.push(i),rr(e.rels,3,i,Xt.EXT_PROPS),t.Custprops!==t.Props&&pA(t.Custprops||{}).length>0&&(i="docProps/custom.xml",Qt(a,i,GB(t.Custprops)),n.custprops.push(i),rr(e.rels,4,i,Xt.CUST_PROPS));var c=["SheetJ5"];for(e.tcid=0,s=1;s<=t.SheetNames.length;++s){var d={"!id":{}},g=t.Sheets[t.SheetNames[s-1]],h=(g||{})["!type"]||"sheet";switch(h){case"chart":default:i="xl/worksheets/sheet"+s+"."+r,Qt(a,i,Ty(s-1,e,t,d)),n.sheets.push(i),rr(e.wbrels,-1,"worksheets/sheet"+s+"."+r,Xt.WS[0])}if(g){var p=g["!comments"],v=!1,y="";if(p&&p.length>0){var C=!1;p.forEach(function(b){b[1].forEach(function(F){F.T==!0&&(C=!0)})}),C&&(y="xl/threadedComments/threadedComment"+s+"."+r,Qt(a,y,zI(p,c,e)),n.threadedcomments.push(y),rr(d,-1,"../threadedComments/threadedComment"+s+"."+r,Xt.TCMNT)),y="xl/comments"+s+"."+r,Qt(a,y,py(p)),n.comments.push(y),rr(d,-1,"../comments"+s+"."+r,Xt.CMNT),v=!0}g["!legacy"]&&v&&Qt(a,"xl/drawings/vmlDrawing"+s+".vml",gy(s,g["!comments"])),delete g["!comments"],delete g["!legacy"]}d["!id"].rId1&&Qt(a,PB(i),go(d))}return e.Strings!=null&&e.Strings.length>0&&(i="xl/sharedStrings."+r,Qt(a,i,ay(e.Strings,e)),n.strs.push(i),rr(e.wbrels,-1,"sharedStrings."+r,Xt.SST)),i="xl/workbook."+r,Qt(a,i,Iy(t)),n.workbooks.push(i),rr(e.rels,1,i,Xt.WB),i="xl/theme/theme1.xml",Qt(a,i,hy(t.Themes,e)),n.themes.push(i),rr(e.wbrels,-1,"theme/theme1.xml",Xt.THEME),i="xl/styles."+r,Qt(a,i,cy(t,e)),n.styles.push(i),rr(e.wbrels,-1,"styles."+r,Xt.STY),t.vbaraw&&A&&(i="xl/vbaProject.bin",Qt(a,i,t.vbaraw),n.vba.push(i),rr(e.wbrels,-1,"vbaProject.bin",Xt.VBA)),i="xl/metadata."+r,Qt(a,i,dy()),n.metadata.push(i),rr(e.wbrels,-1,"metadata."+r,Xt.XLMETA),c.length>1&&(i="xl/persons/person.xml",Qt(a,i,WI(c)),n.people.push(i),rr(e.wbrels,-1,"persons/person.xml",Xt.PEOPLE)),Qt(a,"[Content_Types].xml",DB(n,e)),Qt(a,"_rels/.rels",go(e.rels)),Qt(a,"xl/_rels/workbook."+r+".rels",go(e.wbrels)),delete e.revssf,delete e.ssf,a}function pO(t,e){var r="";switch((e||{}).type||"base64"){case"buffer":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":r=Ma(t.slice(0,12));break;case"binary":r=t;break;case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];default:throw new Error("Unrecognized type "+(e&&e.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function Hy(t,e){switch(e.type){case"base64":case"binary":break;case"buffer":case"array":e.type="";break;case"file":return Pl(e.file,or.write(t,{type:qt?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");default:throw new Error("Unrecognized type "+e.type)}return or.write(t,e)}function mO(t,e){var r=YA(e||{}),A=hO(t,r);return vO(A,r)}function vO(t,e){var r={},A=qt?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(e.compression&&(r.compression="DEFLATE"),e.password)r.type=A;else switch(e.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");case"buffer":case"file":r.type=A;break;default:throw new Error("Unrecognized type "+e.type)}var n=t.FullPaths?or.write(t,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!e.compression}):t.generate(r);if(typeof Deno<"u"&&typeof n=="string"){if(e.type=="binary"||e.type=="base64")return n;n=new Uint8Array(uu(n))}return e.password&&typeof encrypt_agile<"u"?Hy(encrypt_agile(n,e.password),e):e.type==="file"?Pl(e.file,n):e.type=="string"?Rl(n):n}function wO(t,e){var r=e||{},A=QQ(t,r);return Hy(A,r)}function xa(t,e,r){r||(r="");var A=r+t;switch(e.type){case"base64":return Ql(Ka(A));case"binary":return Ka(A);case"string":return t;case"file":return Pl(e.file,A,"utf8");case"buffer":return qt?Ra(A,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(A):xa(A,{type:"binary"}).split("").map(function(n){return n.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function BO(t,e){switch(e.type){case"base64":return Ql(t);case"binary":return t;case"string":return t;case"file":return Pl(e.file,t,"binary");case"buffer":return qt?Ra(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function Pu(t,e){switch(e.type){case"string":case"base64":case"binary":for(var r="",A=0;A<t.length;++A)r+=String.fromCharCode(t[A]);return e.type=="base64"?Ql(r):e.type=="string"?Rl(r):r;case"file":return Pl(e.file,t);case"buffer":return t;default:throw new Error("Unrecognized type "+e.type)}}function Zl(t,e){WU(),aQ(t);var r=YA(e||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var A=Zl(t,r);return r.type="array",uu(A)}var n=0;if(r.sheet&&(typeof r.sheet=="number"?n=r.sheet:n=t.SheetNames.indexOf(r.sheet),!t.SheetNames[n]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return xa(LQ(t,r),r);case"slk":case"sylk":return xa(rI.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"htm":case"html":return xa(Qy(t.Sheets[t.SheetNames[n]],r),r);case"txt":return BO(Ky(t.Sheets[t.SheetNames[n]],r),r);case"csv":return xa(b1(t.Sheets[t.SheetNames[n]],r),r,"\uFEFF");case"dif":return xa(AI.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"dbf":return Pu(tI.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"prn":return xa(nI.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"rtf":return xa(fI.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"eth":return xa(Ay.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"fods":return xa(Ry(t,r),r);case"wk1":return Pu(ny.sheet_to_wk1(t.Sheets[t.SheetNames[n]],r),r);case"wk3":return Pu(ny.book_to_wk3(t,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),Pu(ky(t,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),wO(t,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return mO(t,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function yO(t,e,r,A,n,a,i,s){var o=vA(r),l=s.defval,c=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),d=!0,g=n===1?[]:{};if(n!==1)if(Object.defineProperty)try{Object.defineProperty(g,"__rowNum__",{value:r,enumerable:!1})}catch{g.__rowNum__=r}else g.__rowNum__=r;if(!i||t[r])for(var h=e.s.c;h<=e.e.c;++h){var p=i?t[r][h]:t[A[h]+o];if(p===void 0||p.t===void 0){if(l===void 0)continue;a[h]!=null&&(g[a[h]]=l);continue}var v=p.v;switch(p.t){case"z":if(v==null)break;continue;case"e":v=v==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+p.t)}if(a[h]!=null){if(v==null)if(p.t=="e"&&v===null)g[a[h]]=null;else if(l!==void 0)g[a[h]]=l;else if(c&&v===null)g[a[h]]=null;else continue;else g[a[h]]=c&&(p.t!=="n"||p.t==="n"&&s.rawNumbers!==!1)?v:Ga(p,v,s);v!=null&&(d=!1)}}return{row:g,isempty:d}}function Mu(t,e){if(t==null||t["!ref"]==null)return[];var r={t:"n",v:0},A=0,n=1,a=[],i=0,s="",o={s:{r:0,c:0},e:{r:0,c:0}},l=e||{},c=l.range!=null?l.range:t["!ref"];switch(l.header===1?A=1:l.header==="A"?A=2:Array.isArray(l.header)?A=3:l.header==null&&(A=0),typeof c){case"string":o=wr(c);break;case"number":o=wr(t["!ref"]),o.s.r=c;break;default:o=c}A>0&&(n=0);var d=vA(o.s.r),g=[],h=[],p=0,v=0,y=Array.isArray(t),C=o.s.r,b=0,F={};y&&!t[C]&&(t[C]=[]);var O=l.skipHidden&&t["!cols"]||[],W=l.skipHidden&&t["!rows"]||[];for(b=o.s.c;b<=o.e.c;++b)if(!(O[b]||{}).hidden)switch(g[b]=UA(b),r=y?t[C][b]:t[g[b]+d],A){case 1:a[b]=b-o.s.c;break;case 2:a[b]=g[b];break;case 3:a[b]=l.header[b-o.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),s=i=Ga(r,null,l),v=F[i]||0,!v)F[i]=1;else{do s=i+"_"+v++;while(F[s]);F[i]=v,F[s]=1}a[b]=s}for(C=o.s.r+n;C<=o.e.r;++C)if(!(W[C]||{}).hidden){var X=yO(t,o,C,g,A,a,y,l);(X.isempty===!1||(A===1?l.blankrows!==!1:l.blankrows))&&(h[p++]=X.row)}return h.length=p,h}var Vy=/"/g;function xO(t,e,r,A,n,a,i,s){for(var o=!0,l=[],c="",d=vA(r),g=e.s.c;g<=e.e.c;++g)if(A[g]){var h=s.dense?(t[r]||[])[g]:t[A[g]+d];if(h==null)c="";else if(h.v!=null){o=!1,c=""+(s.rawNumbers&&h.t=="n"?h.v:Ga(h,null,s));for(var p=0,v=0;p!==c.length;++p)if((v=c.charCodeAt(p))===n||v===a||v===34||s.forceQuotes){c='"'+c.replace(Vy,'""')+'"';break}c=="ID"&&(c='"ID"')}else h.f!=null&&!h.F?(o=!1,c="="+h.f,c.indexOf(",")>=0&&(c='"'+c.replace(Vy,'""')+'"')):c="";l.push(c)}return s.blankrows===!1&&o?null:l.join(i)}function b1(t,e){var r=[],A=e??{};if(t==null||t["!ref"]==null)return"";var n=wr(t["!ref"]),a=A.FS!==void 0?A.FS:",",i=a.charCodeAt(0),s=A.RS!==void 0?A.RS:`
|
|
357
357
|
`,o=s.charCodeAt(0),l=new RegExp((a=="|"?"\\|":a)+"+$"),c="",d=[];A.dense=Array.isArray(t);for(var g=A.skipHidden&&t["!cols"]||[],h=A.skipHidden&&t["!rows"]||[],p=n.s.c;p<=n.e.c;++p)(g[p]||{}).hidden||(d[p]=UA(p));for(var v=0,y=n.s.r;y<=n.e.r;++y)(h[y]||{}).hidden||(c=xO(t,n,y,d,i,o,a,A),c!=null&&(A.strip&&(c=c.replace(l,"")),(c||A.blankrows!==!1)&&r.push((v++?s:"")+c)));return delete A.dense,r.join("")}function Ky(t,e){e||(e={}),e.FS=" ",e.RS=`
|
|
358
|
-
`;var r=b1(t,e);return r}function CO(t){var e="",r,A="";if(t==null||t["!ref"]==null)return[];var n=wr(t["!ref"]),a="",i=[],s,o=[],l=Array.isArray(t);for(s=n.s.c;s<=n.e.c;++s)i[s]=UA(s);for(var c=n.s.r;c<=n.e.r;++c)for(a=vA(c),s=n.s.c;s<=n.e.c;++s)if(e=i[s]+a,r=l?(t[c]||[])[s]:t[e],A="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;A=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)A=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)A=""+r.v;else if(r.t=="b")A=r.v?"TRUE":"FALSE";else if(r.w!==void 0)A="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?A="'"+r.v:A=""+r.v}}o[o.length]=e+"="+A}return o}function Gy(t,e,r){var A=r||{},n=+!A.skipHeader,a=t||{},i=0,s=0;if(a&&A.origin!=null)if(typeof A.origin=="number")i=A.origin;else{var o=typeof A.origin=="string"?sA(A.origin):A.origin;i=o.r,s=o.c}var l,c={s:{c:0,r:0},e:{c:s,r:i+e.length-1+n}};if(a["!ref"]){var d=wr(a["!ref"]);c.e.c=Math.max(c.e.c,d.e.c),c.e.r=Math.max(c.e.r,d.e.r),i==-1&&(i=d.e.r+1,c.e.r=i+e.length-1+n)}else i==-1&&(i=0,c.e.r=e.length-1+n);var g=A.header||[],h=0;e.forEach(function(v,y){pA(v).forEach(function(C){(h=g.indexOf(C))==-1&&(g[h=g.length]=C);var b=v[C],F="z",O="",W=tr({c:s+h,r:i+y+n});l=ec(a,W),b&&typeof b=="object"&&!(b instanceof Date)?a[W]=b:(typeof b=="number"?F="n":typeof b=="boolean"?F="b":typeof b=="string"?F="s":b instanceof Date?(F="d",A.cellDates||(F="n",b=qA(b)),O=A.dateNF||Sr[14]):b===null&&A.nullError&&(F="e",b=0),l?(l.t=F,l.v=b,delete l.w,delete l.R,O&&(l.z=O)):a[W]=l={t:F,v:b},O&&(l.z=O))})}),c.e.c=Math.max(c.e.c,s+g.length-1);var p=vA(i);if(n)for(h=0;h<g.length;++h)a[UA(h+s)+p]={t:"s",v:g[h]};return a["!ref"]=jr(c),a}function bO(t,e){return Gy(null,t,e)}function ec(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var A=sA(e);return t[A.r]||(t[A.r]=[]),t[A.r][A.c]||(t[A.r][A.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?ec(t,tr(e)):ec(t,tr({r:e,c:r||0}))}function EO(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function FO(){return{SheetNames:[],Sheets:{}}}function SO(t,e,r,A){var n=1;if(!r)for(;n<=65535&&t.SheetNames.indexOf(r="Sheet"+n)!=-1;++n,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(A&&t.SheetNames.indexOf(r)>=0){var a=r.match(/(^.*?)(\d+)$/);n=a&&+a[2]||0;var i=a&&a[1]||r;for(++n;n<=65535&&t.SheetNames.indexOf(r=i+n)!=-1;++n);}if(Ny(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function _O(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var A=EO(t,e);switch(t.Workbook.Sheets[A]||(t.Workbook.Sheets[A]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[A].Hidden=r}function TO(t,e){return t.z=e,t}function jy(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function UO(t,e,r){return jy(t,"#"+e,r)}function NO(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function IO(t,e,r,A){for(var n=typeof e!="string"?e:wr(e),a=typeof e=="string"?e:jr(e),i=n.s.r;i<=n.e.r;++i)for(var s=n.s.c;s<=n.e.c;++s){var o=ec(t,i,s);o.t="n",o.F=a,delete o.v,i==n.s.r&&s==n.s.c&&(o.f=r,A&&(o.D=!0))}return t}var Tn={encode_col:UA,encode_row:vA,encode_cell:tr,encode_range:jr,decode_col:i1,decode_row:a1,split_cell:XN,decode_cell:sA,decode_range:hn,format_cell:Ga,sheet_add_aoa:_B,sheet_add_json:Gy,sheet_add_dom:Oy,aoa_to_sheet:fo,json_to_sheet:bO,table_to_sheet:Dy,table_to_book:AO,sheet_to_csv:b1,sheet_to_txt:Ky,sheet_to_json:Mu,sheet_to_html:Qy,sheet_to_formulae:CO,sheet_to_row_object_array:Mu,sheet_get_cell:ec,book_new:FO,book_append_sheet:SO,book_set_sheet_visibility:_O,cell_set_number_format:TO,cell_set_hyperlink:jy,cell_set_internal_link:UO,cell_add_comment:NO,sheet_set_array_formula:IO,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function zy(t,e,r,A,n){let{series:a}=t;if(!a||t.base===0)return{...a,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const i=[...a].map(l=>l.value).reduce((l,c)=>l+c,0),s=[];let o=0;for(let l=0;l<a.length;l+=1){let c=a[l].value/i;const d=c*(Math.PI*1.9999),h=a[l].value/2/i*(Math.PI*2),{startX:p,startY:v,endX:y,endY:C,path:b}=$y([e,r],[A,n],[o,d],110);s.push({...a[l],proportion:c,ratio:d,path:b,startX:p,startY:v,endX:y,endY:C,center:$y([e,r],[A*1.45,n*1.45],[o,h],110)}),o+=d}return s}function Wy([t,e],[r,A]){return[t+r,e+A]}function Xy([[t,e],[r,A]],[n,a]){return[t*n+e*a,r*n+A*a]}function LO(t){return[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]]}function $y([t,e],[r,A],[n,a],i){a=a%(2*Math.PI);const s=LO(i),[o,l]=Wy(Xy(s,[r*Math.cos(n),A*Math.sin(n)]),[t,e]),[c,d]=Wy(Xy(s,[r*Math.cos(n+a),A*Math.sin(n+a)]),[t,e]),g=a>Math.PI?1:0,h=a>0?1:0;return{startX:o,startY:l,endX:c,endY:d,path:`M${o} ${l} A ${[r,A,i/(2*Math.PI)*360,g,h,c,d].join(" ")}`}}function tc({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(A=>{if(Object.hasOwn(e,A)){const n=e[A];typeof n=="boolean"?r[A]=n:["string","number"].includes(typeof n)?OO(n)&&(r[A]=n):Array.isArray(r[A])?kO({userConfig:e,key:A})&&(r[A]=n):QO({userConfig:e,key:A})&&(r[A]=tc({defaultConfig:r[A],userConfig:n}))}}),r}function kO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length}function QO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"}function OO(t){return![null,void 0,NaN,1/0,-1/0].includes(t)}function DO(t){return![void 0,NaN,1/0,-1/0].includes(t)}function PO(t,e=0){return isNaN(t)?e:t}const ZA=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"];function qy(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${xo(a)}${xo(i)}${xo(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=MO(Number(a),Number(i),Number(s));return`#${xo(o[0])}${xo(o[1])}${xo(o[2])}`}return null}function xo(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e}function MO(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]}function Yy(t,e){const r=l=>({r:parseInt(l.substring(1,3),16),g:parseInt(l.substring(3,5),16),b:parseInt(l.substring(5,7),16)}),A=({r:l,g:c,b:d})=>{l/=255,c/=255,d/=255;const g=Math.max(l,c,d),h=Math.min(l,c,d);let p,v,y=(g+h)/2;if(g===h)p=v=0;else{const C=g-h;switch(v=y>.5?C/(2-g-h):C/(g+h),g){case l:p=(c-d)/C+(c<d?6:0);break;case c:p=(d-l)/C+2;break;case d:p=(l-c)/C+4;break}p/=6}return{h:p,s:v,l:y}},n=({h:l,s:c,l:d})=>{let g,h,p;if(c===0)g=h=p=d;else{const v=(b,F,O)=>(O<0&&(O+=1),O>1&&(O-=1),O<.16666666666666666?b+(F-b)*6*O:O<.5?F:O<.6666666666666666?b+(F-b)*(.6666666666666666-O)*6:b),y=d<.5?d*(1+c):d+c-d*c,C=2*d-y;g=v(C,y,l+.3333333333333333),h=v(C,y,l),p=v(C,y,l-.3333333333333333)}return{r:Math.round(g*255),g:Math.round(h*255),b:Math.round(p*255)}},a=r(t),i=A(a);i.h+=e,i.h=(i.h+1)%1;const s=n(i);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`}const oZ="",Ru=(t,e)=>{const r=t.__vccOpts||t;for(const[A,n]of e)r[A]=n;return r},RO={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){const t=`vue-data-ui-xy_${Math.random()}_${Math.random()}`;return{useSafeValues:!0,palette:ZA,defaultConfig:{showWarnings:!0,showTable:!0,chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#2D353C",height:300,width:500,padding:{top:36,right:12,bottom:12,left:48},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{color:"#2D353C",show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{color:"#2D353C",show:!0,values:[],fontSize:6}}},labels:{fontSize:10},legend:{color:"#2D353C",show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#2D353C",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{color:"#2D353C",backgroundColor:"white",show:!0,showValue:!0,showPercentage:!1,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},table:{rounding:0,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8"}}},clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:t}},computed:{chartConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null),id:`uniqueId_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,A)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*A*this.absoluteDataset.filter(n=>n.type==="bar").filter(n=>!this.segregatedSeries.includes(n.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[A]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){return Math.min(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.min(...t.series)))},maxSeries(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>t.series.length))},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=[...this.plotSet,...this.barSet,...this.lineSet].map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.chartConfig.chart.grid.labels.xAxisLabels.values.forEach((r,A)=>{const n=[r];this.plotSet.length&&this.plotSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.barSet.length&&this.barSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.lineSet.length&&this.lineSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),e.push(n)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(n=>({name:n.name,color:n.color,type:n.type,value:n.absoluteValues.find((a,i)=>i===this.selectedSerieIndex)}));let e="",r=t.map(n=>n.value).filter(n=>this.isSafeValue(n)&&n!==null).reduce((n,a)=>Math.abs(n)+Math.abs(a),0);const A=this.chartConfig.chart.grid.labels.xAxisLabels.values[this.selectedSerieIndex];return A&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${A}</div>`),t.forEach(n=>{this.isSafeValue(n.value)&&n.value!==null&&(e+=`<div><span style="color:${n.color}; margin-right: 3px">${this.icons[n.type]}</span>${n.name} : <b>${this.chartConfig.chart.tooltip.showValue?n.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(n.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums; background:${this.chartConfig.chart.tooltip.backgroundColor};color:${this.chartConfig.chart.tooltip.color}">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,A=48;if(t&&e){const{width:n,height:a}=t.getBoundingClientRect(),i=e.getBoundingClientRect();this.clientPosition.x+n/2>i.right?r=-n:this.clientPosition.x-n/2<i.left?r=0:r=-n/2,this.clientPosition.y+a>i.bottom&&(A=-a-48)}return{top:this.clientPosition.y+A,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let n=5;n>0;n-=1){const a=t*n;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*n),value:a})}const r=this.closestDecimal(this.min/5),A=[];for(let n=5;n>=0;n-=1){const a=Math.abs(r)*n;A.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*n),value:-a})}return[...e,...A]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,A=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${A})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",A),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,A)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
358
|
+
`;var r=b1(t,e);return r}function CO(t){var e="",r,A="";if(t==null||t["!ref"]==null)return[];var n=wr(t["!ref"]),a="",i=[],s,o=[],l=Array.isArray(t);for(s=n.s.c;s<=n.e.c;++s)i[s]=UA(s);for(var c=n.s.r;c<=n.e.r;++c)for(a=vA(c),s=n.s.c;s<=n.e.c;++s)if(e=i[s]+a,r=l?(t[c]||[])[s]:t[e],A="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;A=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)A=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)A=""+r.v;else if(r.t=="b")A=r.v?"TRUE":"FALSE";else if(r.w!==void 0)A="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?A="'"+r.v:A=""+r.v}}o[o.length]=e+"="+A}return o}function Gy(t,e,r){var A=r||{},n=+!A.skipHeader,a=t||{},i=0,s=0;if(a&&A.origin!=null)if(typeof A.origin=="number")i=A.origin;else{var o=typeof A.origin=="string"?sA(A.origin):A.origin;i=o.r,s=o.c}var l,c={s:{c:0,r:0},e:{c:s,r:i+e.length-1+n}};if(a["!ref"]){var d=wr(a["!ref"]);c.e.c=Math.max(c.e.c,d.e.c),c.e.r=Math.max(c.e.r,d.e.r),i==-1&&(i=d.e.r+1,c.e.r=i+e.length-1+n)}else i==-1&&(i=0,c.e.r=e.length-1+n);var g=A.header||[],h=0;e.forEach(function(v,y){pA(v).forEach(function(C){(h=g.indexOf(C))==-1&&(g[h=g.length]=C);var b=v[C],F="z",O="",W=tr({c:s+h,r:i+y+n});l=ec(a,W),b&&typeof b=="object"&&!(b instanceof Date)?a[W]=b:(typeof b=="number"?F="n":typeof b=="boolean"?F="b":typeof b=="string"?F="s":b instanceof Date?(F="d",A.cellDates||(F="n",b=qA(b)),O=A.dateNF||Sr[14]):b===null&&A.nullError&&(F="e",b=0),l?(l.t=F,l.v=b,delete l.w,delete l.R,O&&(l.z=O)):a[W]=l={t:F,v:b},O&&(l.z=O))})}),c.e.c=Math.max(c.e.c,s+g.length-1);var p=vA(i);if(n)for(h=0;h<g.length;++h)a[UA(h+s)+p]={t:"s",v:g[h]};return a["!ref"]=jr(c),a}function bO(t,e){return Gy(null,t,e)}function ec(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var A=sA(e);return t[A.r]||(t[A.r]=[]),t[A.r][A.c]||(t[A.r][A.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?ec(t,tr(e)):ec(t,tr({r:e,c:r||0}))}function EO(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function FO(){return{SheetNames:[],Sheets:{}}}function SO(t,e,r,A){var n=1;if(!r)for(;n<=65535&&t.SheetNames.indexOf(r="Sheet"+n)!=-1;++n,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(A&&t.SheetNames.indexOf(r)>=0){var a=r.match(/(^.*?)(\d+)$/);n=a&&+a[2]||0;var i=a&&a[1]||r;for(++n;n<=65535&&t.SheetNames.indexOf(r=i+n)!=-1;++n);}if(Ny(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function _O(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var A=EO(t,e);switch(t.Workbook.Sheets[A]||(t.Workbook.Sheets[A]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[A].Hidden=r}function TO(t,e){return t.z=e,t}function jy(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function UO(t,e,r){return jy(t,"#"+e,r)}function NO(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function IO(t,e,r,A){for(var n=typeof e!="string"?e:wr(e),a=typeof e=="string"?e:jr(e),i=n.s.r;i<=n.e.r;++i)for(var s=n.s.c;s<=n.e.c;++s){var o=ec(t,i,s);o.t="n",o.F=a,delete o.v,i==n.s.r&&s==n.s.c&&(o.f=r,A&&(o.D=!0))}return t}var Tn={encode_col:UA,encode_row:vA,encode_cell:tr,encode_range:jr,decode_col:i1,decode_row:a1,split_cell:XN,decode_cell:sA,decode_range:hn,format_cell:Ga,sheet_add_aoa:_B,sheet_add_json:Gy,sheet_add_dom:Oy,aoa_to_sheet:fo,json_to_sheet:bO,table_to_sheet:Dy,table_to_book:AO,sheet_to_csv:b1,sheet_to_txt:Ky,sheet_to_json:Mu,sheet_to_html:Qy,sheet_to_formulae:CO,sheet_to_row_object_array:Mu,sheet_get_cell:ec,book_new:FO,book_append_sheet:SO,book_set_sheet_visibility:_O,cell_set_number_format:TO,cell_set_hyperlink:jy,cell_set_internal_link:UO,cell_add_comment:NO,sheet_set_array_formula:IO,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function zy(t,e,r,A,n){let{series:a}=t;if(!a||t.base===0)return{...a,proportion:0,ratio:0,path:"",startX:0,startY:0,endX:0,center:{}};const i=[...a].map(l=>l.value).reduce((l,c)=>l+c,0),s=[];let o=0;for(let l=0;l<a.length;l+=1){let c=a[l].value/i;const d=c*(Math.PI*1.9999),h=a[l].value/2/i*(Math.PI*2),{startX:p,startY:v,endX:y,endY:C,path:b}=$y([e,r],[A,n],[o,d],110);s.push({...a[l],proportion:c,ratio:d,path:b,startX:p,startY:v,endX:y,endY:C,center:$y([e,r],[A*1.45,n*1.45],[o,h],110)}),o+=d}return s}function Wy([t,e],[r,A]){return[t+r,e+A]}function Xy([[t,e],[r,A]],[n,a]){return[t*n+e*a,r*n+A*a]}function LO(t){return[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]]}function $y([t,e],[r,A],[n,a],i){a=a%(2*Math.PI);const s=LO(i),[o,l]=Wy(Xy(s,[r*Math.cos(n),A*Math.sin(n)]),[t,e]),[c,d]=Wy(Xy(s,[r*Math.cos(n+a),A*Math.sin(n+a)]),[t,e]),g=a>Math.PI?1:0,h=a>0?1:0;return{startX:o,startY:l,endX:c,endY:d,path:`M${o} ${l} A ${[r,A,i/(2*Math.PI)*360,g,h,c,d].join(" ")}`}}function tc({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(A=>{if(Object.hasOwn(e,A)){const n=e[A];typeof n=="boolean"?r[A]=n:["string","number"].includes(typeof n)?OO(n)&&(r[A]=n):Array.isArray(r[A])?kO({userConfig:e,key:A})&&(r[A]=n):QO({userConfig:e,key:A})&&(r[A]=tc({defaultConfig:r[A],userConfig:n}))}}),r}function kO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length}function QO({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"}function OO(t){return![null,void 0,NaN,1/0,-1/0].includes(t)}function DO(t){return![void 0,NaN,1/0,-1/0].includes(t)}function PO(t,e=0){return isNaN(t)?e:t}const ZA=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"];function qy(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${xo(a)}${xo(i)}${xo(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=MO(Number(a),Number(i),Number(s));return`#${xo(o[0])}${xo(o[1])}${xo(o[2])}`}return null}function xo(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e}function MO(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]}function Yy(t,e){const r=l=>({r:parseInt(l.substring(1,3),16),g:parseInt(l.substring(3,5),16),b:parseInt(l.substring(5,7),16)}),A=({r:l,g:c,b:d})=>{l/=255,c/=255,d/=255;const g=Math.max(l,c,d),h=Math.min(l,c,d);let p,v,y=(g+h)/2;if(g===h)p=v=0;else{const C=g-h;switch(v=y>.5?C/(2-g-h):C/(g+h),g){case l:p=(c-d)/C+(c<d?6:0);break;case c:p=(d-l)/C+2;break;case d:p=(l-c)/C+4;break}p/=6}return{h:p,s:v,l:y}},n=({h:l,s:c,l:d})=>{let g,h,p;if(c===0)g=h=p=d;else{const v=(b,F,O)=>(O<0&&(O+=1),O>1&&(O-=1),O<.16666666666666666?b+(F-b)*6*O:O<.5?F:O<.6666666666666666?b+(F-b)*(.6666666666666666-O)*6:b),y=d<.5?d*(1+c):d+c-d*c,C=2*d-y;g=v(C,y,l+.3333333333333333),h=v(C,y,l),p=v(C,y,l-.3333333333333333)}return{r:Math.round(g*255),g:Math.round(h*255),b:Math.round(p*255)}},a=r(t),i=A(a);i.h+=e,i.h=(i.h+1)%1;const s=n(i);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`}const lZ="",Ru=(t,e)=>{const r=t.__vccOpts||t;for(const[A,n]of e)r[A]=n;return r},RO={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){const t=`vue-data-ui-xy_${Math.random()}_${Math.random()}`;return{useSafeValues:!0,palette:ZA,defaultConfig:{showWarnings:!0,showTable:!0,chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#2D353C",height:300,width:500,padding:{top:36,right:12,bottom:12,left:48},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{color:"#2D353C",show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{color:"#2D353C",show:!0,values:[],fontSize:6}}},labels:{fontSize:10},legend:{color:"#2D353C",show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#2D353C",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{color:"#2D353C",backgroundColor:"white",show:!0,showValue:!0,showPercentage:!1,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#2D353C"}},table:{rounding:0,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8"}}},clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:t}},computed:{chartConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null),id:`uniqueId_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.palette[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,A)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*A*this.absoluteDataset.filter(n=>n.type==="bar").filter(n=>!this.segregatedSeries.includes(n.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[A]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){return Math.min(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.min(...t.series)))},maxSeries(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>t.series.length))},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=[...this.plotSet,...this.barSet,...this.lineSet].map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.chartConfig.chart.grid.labels.xAxisLabels.values.forEach((r,A)=>{const n=[r];this.plotSet.length&&this.plotSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.barSet.length&&this.barSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.lineSet.length&&this.lineSet.forEach(a=>{n.push(this.canShowValue(a.absoluteValues[A])?Number(a.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),e.push(n)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(n=>({name:n.name,color:n.color,type:n.type,value:n.absoluteValues.find((a,i)=>i===this.selectedSerieIndex)}));let e="",r=t.map(n=>n.value).filter(n=>this.isSafeValue(n)&&n!==null).reduce((n,a)=>Math.abs(n)+Math.abs(a),0);const A=this.chartConfig.chart.grid.labels.xAxisLabels.values[this.selectedSerieIndex];return A&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${A}</div>`),t.forEach(n=>{this.isSafeValue(n.value)&&n.value!==null&&(e+=`<div><span style="color:${n.color}; margin-right: 3px">${this.icons[n.type]}</span>${n.name} : <b>${this.chartConfig.chart.tooltip.showValue?n.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(n.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums; background:${this.chartConfig.chart.tooltip.backgroundColor};color:${this.chartConfig.chart.tooltip.color}">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,A=48;if(t&&e){const{width:n,height:a}=t.getBoundingClientRect(),i=e.getBoundingClientRect();this.clientPosition.x+n/2>i.right?r=-n:this.clientPosition.x-n/2<i.left?r=0:r=-n/2,this.clientPosition.y+a>i.bottom&&(A=-a-48)}return{top:this.clientPosition.y+A,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let n=5;n>0;n-=1){const a=t*n;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*n),value:a})}const r=this.closestDecimal(this.min/5),A=[];for(let n=5;n>=0;n-=1){const a=Math.abs(r)*n;A.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*n),value:-a})}return[...e,...A]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,A=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${A})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",A),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,A)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
359
359
|
-----> The serie '${e.name}' contains the value '${r}' at index ${A}.
|
|
360
|
-
'${r}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",e=>{this.clientPosition={x:e.clientX,y:e.clientY}}),this.mutableConfig={dataLabels:{show:!0},titleInside:!this.chartConfig.chart.title.useDiv,legendInside:!this.chartConfig.chart.legend.useDiv}},methods:{checkNaN:PO,isSafeValue:DO,treeShake:tc,shiftHue:Yy,pdf:jd,calcRectHeight(t){return t.value>=0?this.zero-t.y:t.y-this.zero},calcRectWidth(){return this.slot.bar*.9},calcRectX(t){return t.x+this.slot.bar*.05+this.slot.bar/2},calcRectY(t){return t.value>=0?t.y:this.zero},canShowValue(t){return![null,void 0,NaN].includes(t)},closeDetails(){const t=this.$refs.details;t&&t.removeAttribute("open")},closestDecimal(t){if(t===0)return 0;const r=10**Math.floor(Math.log10(Math.abs(t)));let A;return t<0,A=Math.round(t/r)*r,A},convertColorToHex(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${this.decimalToHex(a)}${this.decimalToHex(i)}${this.decimalToHex(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=this.hslToRgb(Number(a),Number(i),Number(s));return`#${this.decimalToHex(o[0])}${this.decimalToHex(o[1])}${this.decimalToHex(o[2])}`}return null},decimalToHex(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e},hslToRgb(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]},ratioToMax(t){return t/this.absoluteMax},segregate(t){if(this.segregatedSeries.includes(t.id))this.segregatedSeries=this.segregatedSeries.filter(e=>e!==t.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(t.id)}},toggleTooltip(t,e=null){this.isTooltip=t,t?this.selectedSerieIndex=e:this.selectedSerieIndex=null},generatePdf(){this.isPrinting=!0,this.pdf({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.chartConfig.chart.title.text||"vue-ui-xy"}).finally(()=>{this.isPrinting=!1})},generateXls(){const t=[[this.chartConfig.chart.title.text],[this.chartConfig.chart.title.subtitle.text],[""]],e=["",...this.table.head.map(c=>c.label)],r=this.table.body,A=t.concat([e]).concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Tn.book_new(),i=Tn.aoa_to_sheet(A);Tn.book_append_sheet(a,i,"Sheet1");const s=Zl(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download=`${this.chartConfig.chart.title.text.replaceAll(" ","_")||"vue-ui-xy"}.xlsx`,l.click(),window.URL.revokeObjectURL(l.href)}}},HO=t=>(f.pushScopeId("data-v-46298a92"),t=t(),f.popScopeId(),t),VO=["id"],KO={class:"vue-ui-xy-user-option-item"},GO=["id","name"],jO=["for"],zO={class:"vue-ui-xy-user-option-item"},WO=["id","name"],XO=["for"],$O={class:"vue-ui-xy-user-option-item"},qO=["id","name"],YO=["for"],JO={class:"vue-ui-xy-user-option-item"},ZO=["id","name"],eD=["for"],tD=["disabled"],rD={key:0,class:"vue-ui-xy-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},AD=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-46298a92></path><path d="M18 16v.01" data-v-46298a92></path><path d="M6 16v.01" data-v-46298a92></path><path d="M12 5v.01" data-v-46298a92></path><path d="M12 12v.01" data-v-46298a92></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-46298a92></path>',6)],nD={key:1},aD=["viewBox"],iD={class:"vue-ui-xy-grid"},sD=["stroke","x1","x2","y1","y2"],oD=["stroke","x1","x2","y1","y2"],lD={key:0},cD=["x1","x2","y1","y2","stroke"],fD=["id"],uD=["stop-color"],hD=["stop-color"],dD=["stop-color"],gD=["id"],pD=["stop-color"],mD=["stop-color"],vD=["stop-color"],wD=["id"],BD=["stop-color"],yD=["stop-color"],xD=["id"],CD=["stop-color"],bD=["stop-color"],ED=["x","y","height","width","fill"],FD=["cx","cy","r","fill","stroke"],SD=["x1","x2","y1","y2","stroke","stroke-width"],_D=["cx","cy","r","fill","stroke"],TD={key:0},UD=["x","y","font-size","fill"],ND={key:1},ID=["x","y","font-size","fill"],LD={key:2},kD=["x","y","font-size","fill"],QD={key:3},OD=["x1","x2","y1","y2","stroke"],DD=["x","y","font-size","fill"],PD=["font-size","fill"],MD=["x","y","font-size","fill"],RD={key:4},HD={x:"0",y:"0",width:"100%",height:"40px",style:{overflow:"visible"}},VD={key:5},KD=["y"],GD={class:"vue-ui-xy-legend"},jD=["onClick"],zD={key:6},WD=["y","x","font-size","fill"],XD={key:7},$D=["x","y","height","width","fill","onMouseenter"],qD=["onClick"],YD=["innerHTML"],JD=["innerHTML"],ZD={class:"vue-ui-xy-table"},eP={style:{"max-width":"200px",margin:"0 auto","text-align":"center"}},tP=[HO(()=>f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],rP=["onMouseover"];function AP(t,e,r,A,n,a){return f.openBlock(),f.createElementBlock("div",{id:`vue-ui-xy_${n.uniqueId}`,class:"vue-ui-xy",ref:"chart",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color};width:100%`)},[a.chartConfig.chart.title.show&&(!n.mutableConfig.titleInside||n.isPrinting)?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-xy-title",style:f.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[f.createElementVNode("div",{class:"vue-ui-xy-title-main",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},f.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize}px; color:${a.chartConfig.chart.title.subtitle.color}`)},f.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)):f.createCommentVNode("",!0),a.chartConfig.chart.userOptions.show?(f.openBlock(),f.createElementBlock("details",{key:1,class:"vue-ui-xy-user-options",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`),"data-html2canvas-ignore":"",ref:"details"},[f.createElementVNode("summary",{style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},f.toDisplayString(a.chartConfig.chart.userOptions.title),5),f.createElementVNode("div",{class:"vue-ui-xy-user-options-items",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},[f.createElementVNode("div",KO,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-datalabels_${n.uniqueId}`,name:`vue-ui-xy-option-datalabels_${n.uniqueId}`,"onUpdate:modelValue":e[0]||(e[0]=i=>n.mutableConfig.dataLabels.show=i)},null,8,GO),[[f.vModelCheckbox,n.mutableConfig.dataLabels.show]]),f.createElementVNode("label",{for:`vue-ui-xy-option-datalabels_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.dataLabels),9,jO)]),f.createElementVNode("div",zO,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-title_${n.uniqueId}`,name:`vue-ui-xy-option-title_${n.uniqueId}`,"onUpdate:modelValue":e[1]||(e[1]=i=>n.mutableConfig.titleInside=i)},null,8,WO),[[f.vModelCheckbox,n.mutableConfig.titleInside]]),f.createElementVNode("label",{for:`vue-ui-xy-option-title_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.titleInside),9,XO)]),f.createElementVNode("div",$O,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-legend_${n.uniqueId}`,name:`vue-ui-xy-option-legend_${n.uniqueId}`,"onUpdate:modelValue":e[2]||(e[2]=i=>n.mutableConfig.legendInside=i)},null,8,qO),[[f.vModelCheckbox,n.mutableConfig.legendInside]]),f.createElementVNode("label",{for:`vue-ui-xy-option-legend_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.legendInside),9,YO)]),f.createElementVNode("div",JO,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-table_${n.uniqueId}`,name:`vue-ui-xy-option-table_${n.uniqueId}`,"onUpdate:modelValue":e[3]||(e[3]=i=>n.mutableConfig.showTable=i)},null,8,ZO),[[f.vModelCheckbox,n.mutableConfig.showTable]]),f.createElementVNode("label",{for:`vue-ui-xy-option-table_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.showTable),9,eD)]),f.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[4]||(e[4]=(...i)=>a.generatePdf&&a.generatePdf(...i)),disabled:n.isPrinting,style:{"margin-top":"12px"}},[n.isPrinting?(f.openBlock(),f.createElementBlock("svg",rD,AD)):(f.openBlock(),f.createElementBlock("span",nD,"PDF"))],8,tD),f.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[5]||(e[5]=(...i)=>a.generateXls&&a.generateXls(...i))}," XLSX ")],4)],4)):f.createCommentVNode("",!0),(f.openBlock(),f.createElementBlock("svg",{width:"100%",viewBox:a.viewBox,class:"vue-ui-xy-svg",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color}; font-family:${a.chartConfig.chart.fontFamily}`),onClick:e[7]||(e[7]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[f.createElementVNode("g",iD,[f.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-linecap":"round"},null,8,sD),f.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.right,y1:a.zero,y2:a.zero,"stroke-linecap":"round"},null,8,oD),a.chartConfig.chart.grid.showVerticalLines?(f.openBlock(),f.createElementBlock("g",lD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.maxSeries+1,(i,s)=>(f.openBlock(),f.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,x2:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-width":"0.5",stroke:a.chartConfig.chart.grid.stroke},null,8,cD))),128))])):f.createCommentVNode("",!0)]),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.barSet,(i,s)=>(f.openBlock(),f.createElementBlock("defs",{key:`def_rect_${s}`},[f.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[f.createElementVNode("stop",{offset:"0%","stop-color":i.color},null,8,uD),f.createElementVNode("stop",{offset:"62%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,hD),f.createElementVNode("stop",{offset:"100%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,dD)],8,fD),f.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[f.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,pD),f.createElementVNode("stop",{offset:"38%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,mD),f.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,vD)],8,gD)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.plotSet,(i,s)=>(f.openBlock(),f.createElementBlock("defs",{key:`def_plot_${s}`},[f.createElementVNode("radialGradient",{id:`plotGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[f.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,BD),f.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,yD)],8,wD)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.lineSet,(i,s)=>(f.openBlock(),f.createElementBlock("defs",{key:`def_line_${s}`},[f.createElementVNode("radialGradient",{id:`lineGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[f.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,CD),f.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,bD)],8,xD)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.barSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`serie_bar_${s}`,class:f.normalizeClass(`serie_bar_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`bar_plot_${s}_${l}`},[a.canShowValue(o.value)?(f.openBlock(),f.createElementBlock("rect",{key:0,x:a.calcRectX(o),y:a.calcRectY(o),height:a.calcRectHeight(o),width:a.calcRectWidth(),fill:a.chartConfig.bar.useGradient?o.value>=0?`url(#rectGradient_pos_${s}_${n.uniqueId})`:`url(#rectGradient_neg_${s}_${n.uniqueId})`:i.color},null,8,ED)):f.createCommentVNode("",!0)]))),128))],2))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.plotSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`serie_plot_${s}`,class:f.normalizeClass(`serie_plot_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`circle_plot_${s}_${l}`},[a.canShowValue(o.value)?(f.openBlock(),f.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.plot.radius,fill:a.chartConfig.plot.useGradient?`url(#plotGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,FD)):f.createCommentVNode("",!0)]))),128))],2))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.lineSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`serie_line_${s}`,class:f.normalizeClass(`serie_line_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`line_${s}_${l}`},[l<i.plots.length-1&&a.canShowValue(o.value)&&a.canShowValue(i.plots[l+1].value)?(f.openBlock(),f.createElementBlock("line",{key:0,x1:o.x,x2:i.plots[l+1].x,y1:o.y,y2:i.plots[l+1].y,stroke:i.color,"stroke-width":a.chartConfig.line.strokeWidth},null,8,SD)):f.createCommentVNode("",!0)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`circle_line_${s}_${l}`},[a.canShowValue(o.value)?(f.openBlock(),f.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.line.radius,fill:a.chartConfig.line.useGradient?`url(#lineGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,_D)):f.createCommentVNode("",!0)]))),128))],2))),128)),a.chartConfig.bar.labels.show&&n.mutableConfig.dataLabels.show?(f.openBlock(),f.createElementBlock("g",TD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.barSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_bar_${s}`,class:f.normalizeClass(`xLabel_bar_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_bar_${s}_${l}`},[f.createElementVNode("text",{x:o.x+a.calcRectWidth(),y:o.y+a.chartConfig.bar.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.bar.labels.color},f.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.bar.labels.rounding):""),9,UD)]))),128))],2))),128))])):f.createCommentVNode("",!0),a.chartConfig.plot.labels.show&&n.mutableConfig.dataLabels.show?(f.openBlock(),f.createElementBlock("g",ND,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.plotSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_plot_${s}`,class:f.normalizeClass(`xLabel_plot_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_plot_${s}_${l}`},[f.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.plot.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.plot.labels.color},f.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.plot.labels.rounding):""),9,ID)]))),128))],2))),128))])):f.createCommentVNode("",!0),a.chartConfig.line.labels.show&&n.mutableConfig.dataLabels.show?(f.openBlock(),f.createElementBlock("g",LD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.lineSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_line_${s}`,class:f.normalizeClass(`xLabel_line_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_line_${s}_${l}`},[f.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.line.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.line.labels.color},f.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.line.labels.rounding):""),9,kD)]))),128))],2))),128))])):f.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.show?(f.openBlock(),f.createElementBlock("g",QD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.yLabels,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`yLabel_${s}`},[i.value>=a.min&&i.value<=a.max?(f.openBlock(),f.createElementBlock("line",{key:0,x1:a.drawingArea.left,x2:a.drawingArea.left-5,y1:i.y,y2:i.y,stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1"},null,8,OD)):f.createCommentVNode("",!0),i.value>=a.min&&i.value<=a.max?(f.openBlock(),f.createElementBlock("text",{key:1,x:a.drawingArea.left-5,y:i.y+a.chartConfig.chart.labels.fontSize/3,"font-size":a.chartConfig.chart.grid.labels.fontSize,"text-anchor":"end",fill:a.chartConfig.chart.grid.labels.color},f.toDisplayString(a.canShowValue(i.value)?i.value.toFixed(0):""),9,DD)):f.createCommentVNode("",!0)]))),128))])):f.createCommentVNode("",!0),f.createElementVNode("g",null,[a.chartConfig.chart.grid.labels.axis.yLabel?(f.openBlock(),f.createElementBlock("text",{key:0,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color,id:"yAxisLabel","text-anchor":"middle",style:{transition:"none"}},f.toDisplayString(a.chartConfig.chart.grid.labels.axis.yLabel),9,PD)):f.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.axis.xLabel?(f.openBlock(),f.createElementBlock("text",{key:1,"text-anchor":"middle",x:a.chartConfig.chart.width/2,y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.axis.fontSize+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color},f.toDisplayString(a.chartConfig.chart.grid.labels.axis.xLabel),9,MD)):f.createCommentVNode("",!0)]),a.chartConfig.chart.title.show&&n.mutableConfig.titleInside&&!n.isPrinting?(f.openBlock(),f.createElementBlock("g",RD,[(f.openBlock(),f.createElementBlock("foreignObject",HD,[f.createElementVNode("div",{class:"vue-ui-xy-title",style:f.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[f.createElementVNode("div",{class:"vue-ui-xy-title-main",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize*.6}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},f.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize*.6}px; color:${a.chartConfig.chart.title.subtitle.color}`)},f.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)]))])):f.createCommentVNode("",!0),a.chartConfig.chart.legend.show&&n.mutableConfig.legendInside&&!n.isPrinting?(f.openBlock(),f.createElementBlock("g",VD,[(f.openBlock(),f.createElementBlock("foreignObject",{x:"0",y:a.drawingArea.bottom+a.chartConfig.chart.padding.bottom/3+12,width:"100%",height:"20px",style:f.normalizeStyle(`overflow:visible; font-size:${a.chartConfig.chart.legend.fontSize*.6}px`)},[f.createElementVNode("div",GD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.absoluteDataset,(i,s)=>(f.openBlock(),f.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:f.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[["plot"].includes(i.type)?(f.openBlock(),f.createElementBlock("span",{key:0,style:f.normalizeStyle(`color:${i.color}`)},"●",4)):f.createCommentVNode("",!0),["line"].includes(i.type)?(f.openBlock(),f.createElementBlock("span",{key:1,style:f.normalizeStyle(`color:${i.color}`)},"▬",4)):f.createCommentVNode("",!0),["bar"].includes(i.type)?(f.openBlock(),f.createElementBlock("span",{key:2,style:f.normalizeStyle(`color:${i.color}`)},"◼",4)):f.createCommentVNode("",!0),f.createElementVNode("span",{style:f.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},f.toDisplayString(i.name),5)],10,jD))),128))])],12,KD))])):f.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.xAxisLabels.show?(f.openBlock(),f.createElementBlock("g",zD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.maxSeries,(i,s)=>(f.openBlock(),f.createElementBlock("text",{key:`time_label_${s}`,"text-anchor":"middle",y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s+a.drawingArea.width/a.maxSeries/2,"font-size":a.chartConfig.chart.grid.labels.xAxisLabels.fontSize,fill:a.chartConfig.chart.grid.labels.xAxisLabels.color},f.toDisplayString(a.chartConfig.chart.grid.labels.xAxisLabels.values[s]||""),9,WD))),128))])):f.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show?(f.openBlock(),f.createElementBlock("g",XD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.maxSeries,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`tooltip_trap_${s}`},[f.createElementVNode("rect",{x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s,y:a.drawingArea.top,height:a.drawingArea.height,width:a.drawingArea.width/a.maxSeries,fill:n.selectedSerieIndex===s||n.selectedRowIndex===s?"rgba(0,0,0,0.03)":"transparent",onMouseenter:o=>a.toggleTooltip(!0,s),onMouseleave:e[6]||(e[6]=o=>a.toggleTooltip(!1))},null,40,$D)]))),128))])):f.createCommentVNode("",!0)],12,aD)),a.chartConfig.chart.legend.show&&(!n.mutableConfig.legendInside||n.isPrinting)?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-xy-legend",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.legend.fontSize}px`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.absoluteDataset,(i,s)=>(f.openBlock(),f.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:f.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${i.color}`),innerHTML:n.icons[i.type]},null,12,YD),f.createElementVNode("span",{style:f.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},f.toDisplayString(i.name),5)],10,qD))),128))],4)):f.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show&&n.isTooltip?(f.openBlock(),f.createElementBlock("div",{key:3,class:"vue-ui-xy-tooltip",ref:"tooltip",style:f.normalizeStyle(`top:${a.tooltipPosition.top}px;left:${a.tooltipPosition.left}px; background-color:${a.chartConfig.chart.tooltip.backgroundColor};color:${a.chartConfig.chart.tooltip.color}`),innerHTML:a.tooltipContent},null,12,JD)):f.createCommentVNode("",!0),a.chartConfig.showTable&&n.mutableConfig.showTable?(f.openBlock(),f.createElementBlock("div",{key:4,class:f.normalizeClass({"vue-ui-xy-table-wrapper":!0,"vue-ui-xy-table-wrapper-printing":n.isPrinting}),onClick:e[9]||(e[9]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[f.createElementVNode("table",ZD,[f.createElementVNode("thead",null,[f.createElementVNode("tr",null,[f.createElementVNode("th",{style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},null,4),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.table.head,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`th_${s}`,style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},[f.createElementVNode("div",eP,[f.createElementVNode("span",{style:f.normalizeStyle(`color:${i.color}; margin-right:3px`)},f.toDisplayString(n.icons[i.type]),5),f.createTextVNode(f.toDisplayString(i.label),1)])],4))),128))]),f.createElementVNode("tr",null,[f.createElementVNode("th",{align:"right",style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},tP,4),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.table.head,(i,s)=>(f.openBlock(),f.createElementBlock("th",{align:"right",key:`th_sum_${s}`,style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color};padding-right:6px`)},f.toDisplayString(a.relativeDataset[s].absoluteValues.reduce((o,l)=>o+l,0).toFixed(a.chartConfig.table.rounding)),5))),128))])]),f.createElementVNode("tbody",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.table.body,(i,s)=>(f.openBlock(),f.createElementBlock("tr",{key:`tr_${s}`,class:f.normalizeClass({"vue-ui-xy-table-tr-selected":n.selectedSerieIndex===s||n.selectedRowIndex===s}),onMouseover:o=>n.selectedRowIndex=s,onMouseleave:e[8]||(e[8]=o=>n.selectedRowIndex=null)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i,(o,l)=>(f.openBlock(),f.createElementBlock("td",{key:`td_${s}_${l}`,style:f.normalizeStyle(`background:${a.chartConfig.table.td.backgroundColor};color:${a.chartConfig.table.td.color};padding-right:6px;`)},f.toDisplayString(o),5))),128))],42,rP))),128))])])],2)):f.createCommentVNode("",!0)],12,VO)}const nP=Ru(RO,[["render",AP],["__scopeId","data-v-46298a92"]]),fZ="",aP={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,defaultConfig:{fontFamily:"inherit",maxHeight:500,rowsPerPage:25,style:{th:{backgroundColor:"#E1E5E8",color:"#2D353C",outline:"1px solid #FFFFFF",selected:{backgroundColor:"#6376DD",color:"#FFFFFF"}},rows:{even:{backgroundColor:"#f3f5f7",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}},odd:{backgroundColor:"#FFFFFF",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}}},inputs:{backgroundColor:"#FFFFFF",color:"#2D353C",border:"1px solid #CCCCCC",accentColor:"#6376DD"},dropdowns:{backgroundColor:"#E1E5E8",color:"#2D353C",icons:{selected:{color:"#008000",unicode:"✔"},unselected:{color:"#ff0000",unicode:"✖"}}},infoBar:{backgroundColor:"#E1E5E8",color:"#2D353C"},pagination:{buttons:{backgroundColor:"#E1E5E8",color:"#2D353C",opacityDisabled:.5},navigationIndicator:{backgroundColor:"#6376DD"}},exportMenu:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{backgroundColor:"#FAFAFA",color:"#2D353C"}},closeButtons:{backgroundColor:"transparent",color:"#2D353C",borderRadius:"50%"},chart:{modal:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{selected:{backgroundColor:"#6376DD",color:"#FFFFFF"},unselected:{backgroundColor:"#FFFFFF",color:"#2D353C"}}},layout:{backgroundColor:"#FFFFFF",axis:{stroke:"#ccd1d4",strokeWidth:2},bar:{fill:"",stroke:"#FFFFFF"},line:{stroke:"#6376DD75",strokeWidth:4,plot:{fill:"#22348f",stroke:"#FFFFFF",strokeWidth:1,radius:{selected:6,unselected:4}},selector:{stroke:"#ccc",strokeWidth:1,strokeDasharray:5}},labels:{color:"#2D353C"},progression:{stroke:"#2D353C",strokeWidth:2,strokeDasharray:4,arrowSize:7}}}},translations:{average:"Average",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"From",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"To",total:"Total",totalRows:"Total rows"},useChart:!0},bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((e,r)=>e-r),palette:ZA,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(e=>({average:Object.hasOwn(e,"average")?e.average:!1,decimals:Object.hasOwn(e,"decimals")?e.decimals:0,isMultiselect:Object.hasOwn(e,"isMultiselect")?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,"isPercentage")?e.isPercentage:!1,isSearch:Object.hasOwn(e,"isSearch")?e.isSearch:!1,isSort:Object.hasOwn(e,"isSort")?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,"percentageTo")?e.percentageTo:void 0,prefix:Object.hasOwn(e,"prefix")?e.prefix:"",rangeFilter:Object.hasOwn(e,"rangeFilter")?e.rangeFilter:!1,suffix:Object.hasOwn(e,"suffix")?e.suffix:"",sum:Object.hasOwn(e,"sum")?e.sum:!1,type:e.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
360
|
+
'${r}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",e=>{this.clientPosition={x:e.clientX,y:e.clientY}}),this.mutableConfig={dataLabels:{show:!0},titleInside:!this.chartConfig.chart.title.useDiv,legendInside:!this.chartConfig.chart.legend.useDiv}},methods:{checkNaN:PO,isSafeValue:DO,treeShake:tc,shiftHue:Yy,pdf:jd,calcRectHeight(t){return t.value>=0?this.zero-t.y:t.y-this.zero},calcRectWidth(){return this.slot.bar*.9},calcRectX(t){return t.x+this.slot.bar*.05+this.slot.bar/2},calcRectY(t){return t.value>=0?t.y:this.zero},canShowValue(t){return![null,void 0,NaN].includes(t)},closeDetails(){const t=this.$refs.details;t&&t.removeAttribute("open")},closestDecimal(t){if(t===0)return 0;const r=10**Math.floor(Math.log10(Math.abs(t)));let A;return t<0,A=Math.round(t/r)*r,A},convertColorToHex(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,a,i,s]=n;return`#${a}${i}${s}`}else if(n=t.match(r)){const[,a,i,s]=n;return`#${this.decimalToHex(a)}${this.decimalToHex(i)}${this.decimalToHex(s)}`}else if(n=t.match(A)){const[,a,i,s]=n,o=this.hslToRgb(Number(a),Number(i),Number(s));return`#${this.decimalToHex(o[0])}${this.decimalToHex(o[1])}${this.decimalToHex(o[2])}`}return null},decimalToHex(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e},hslToRgb(t,e,r){t/=360,e/=100,r/=100;let A,n,a;if(e===0)A=n=a=r;else{const i=(l,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?l+(c-l)*6*d:d<.5?c:d<.6666666666666666?l+(c-l)*(.6666666666666666-d)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=i(o,s,t+1/3),n=i(o,s,t),a=i(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(a*255)]},ratioToMax(t){return t/this.absoluteMax},segregate(t){if(this.segregatedSeries.includes(t.id))this.segregatedSeries=this.segregatedSeries.filter(e=>e!==t.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(t.id)}},toggleTooltip(t,e=null){this.isTooltip=t,t?this.selectedSerieIndex=e:this.selectedSerieIndex=null},generatePdf(){this.isPrinting=!0,this.pdf({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.chartConfig.chart.title.text||"vue-ui-xy"}).finally(()=>{this.isPrinting=!1})},generateXls(){const t=[[this.chartConfig.chart.title.text],[this.chartConfig.chart.title.subtitle.text],[""]],e=["",...this.table.head.map(c=>c.label)],r=this.table.body,A=t.concat([e]).concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Tn.book_new(),i=Tn.aoa_to_sheet(A);Tn.book_append_sheet(a,i,"Sheet1");const s=Zl(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download=`${this.chartConfig.chart.title.text.replaceAll(" ","_")||"vue-ui-xy"}.xlsx`,l.click(),window.URL.revokeObjectURL(l.href)}}},HO=t=>(f.pushScopeId("data-v-46298a92"),t=t(),f.popScopeId(),t),VO=["id"],KO={class:"vue-ui-xy-user-option-item"},GO=["id","name"],jO=["for"],zO={class:"vue-ui-xy-user-option-item"},WO=["id","name"],XO=["for"],$O={class:"vue-ui-xy-user-option-item"},qO=["id","name"],YO=["for"],JO={class:"vue-ui-xy-user-option-item"},ZO=["id","name"],eD=["for"],tD=["disabled"],rD={key:0,class:"vue-ui-xy-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},AD=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-46298a92></path><path d="M18 16v.01" data-v-46298a92></path><path d="M6 16v.01" data-v-46298a92></path><path d="M12 5v.01" data-v-46298a92></path><path d="M12 12v.01" data-v-46298a92></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-46298a92></path>',6)],nD={key:1},aD=["viewBox"],iD={class:"vue-ui-xy-grid"},sD=["stroke","x1","x2","y1","y2"],oD=["stroke","x1","x2","y1","y2"],lD={key:0},cD=["x1","x2","y1","y2","stroke"],fD=["id"],uD=["stop-color"],hD=["stop-color"],dD=["stop-color"],gD=["id"],pD=["stop-color"],mD=["stop-color"],vD=["stop-color"],wD=["id"],BD=["stop-color"],yD=["stop-color"],xD=["id"],CD=["stop-color"],bD=["stop-color"],ED=["x","y","height","width","fill"],FD=["cx","cy","r","fill","stroke"],SD=["x1","x2","y1","y2","stroke","stroke-width"],_D=["cx","cy","r","fill","stroke"],TD={key:0},UD=["x","y","font-size","fill"],ND={key:1},ID=["x","y","font-size","fill"],LD={key:2},kD=["x","y","font-size","fill"],QD={key:3},OD=["x1","x2","y1","y2","stroke"],DD=["x","y","font-size","fill"],PD=["font-size","fill"],MD=["x","y","font-size","fill"],RD={key:4},HD={x:"0",y:"0",width:"100%",height:"40px",style:{overflow:"visible"}},VD={key:5},KD=["y"],GD={class:"vue-ui-xy-legend"},jD=["onClick"],zD={key:6},WD=["y","x","font-size","fill"],XD={key:7},$D=["x","y","height","width","fill","onMouseenter"],qD=["onClick"],YD=["innerHTML"],JD=["innerHTML"],ZD={class:"vue-ui-xy-table"},eP={style:{"max-width":"200px",margin:"0 auto","text-align":"center"}},tP=[HO(()=>f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],rP=["onMouseover"];function AP(t,e,r,A,n,a){return f.openBlock(),f.createElementBlock("div",{id:`vue-ui-xy_${n.uniqueId}`,class:"vue-ui-xy",ref:"chart",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color};width:100%`)},[a.chartConfig.chart.title.show&&(!n.mutableConfig.titleInside||n.isPrinting)?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-xy-title",style:f.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[f.createElementVNode("div",{class:"vue-ui-xy-title-main",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},f.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize}px; color:${a.chartConfig.chart.title.subtitle.color}`)},f.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)):f.createCommentVNode("",!0),a.chartConfig.chart.userOptions.show?(f.openBlock(),f.createElementBlock("details",{key:1,class:"vue-ui-xy-user-options",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`),"data-html2canvas-ignore":"",ref:"details"},[f.createElementVNode("summary",{style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},f.toDisplayString(a.chartConfig.chart.userOptions.title),5),f.createElementVNode("div",{class:"vue-ui-xy-user-options-items",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor};color:${a.chartConfig.chart.color}`)},[f.createElementVNode("div",KO,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-datalabels_${n.uniqueId}`,name:`vue-ui-xy-option-datalabels_${n.uniqueId}`,"onUpdate:modelValue":e[0]||(e[0]=i=>n.mutableConfig.dataLabels.show=i)},null,8,GO),[[f.vModelCheckbox,n.mutableConfig.dataLabels.show]]),f.createElementVNode("label",{for:`vue-ui-xy-option-datalabels_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.dataLabels),9,jO)]),f.createElementVNode("div",zO,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-title_${n.uniqueId}`,name:`vue-ui-xy-option-title_${n.uniqueId}`,"onUpdate:modelValue":e[1]||(e[1]=i=>n.mutableConfig.titleInside=i)},null,8,WO),[[f.vModelCheckbox,n.mutableConfig.titleInside]]),f.createElementVNode("label",{for:`vue-ui-xy-option-title_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.titleInside),9,XO)]),f.createElementVNode("div",$O,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-legend_${n.uniqueId}`,name:`vue-ui-xy-option-legend_${n.uniqueId}`,"onUpdate:modelValue":e[2]||(e[2]=i=>n.mutableConfig.legendInside=i)},null,8,qO),[[f.vModelCheckbox,n.mutableConfig.legendInside]]),f.createElementVNode("label",{for:`vue-ui-xy-option-legend_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.legendInside),9,YO)]),f.createElementVNode("div",JO,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-xy-option-table_${n.uniqueId}`,name:`vue-ui-xy-option-table_${n.uniqueId}`,"onUpdate:modelValue":e[3]||(e[3]=i=>n.mutableConfig.showTable=i)},null,8,ZO),[[f.vModelCheckbox,n.mutableConfig.showTable]]),f.createElementVNode("label",{for:`vue-ui-xy-option-table_${n.uniqueId}`},f.toDisplayString(a.chartConfig.chart.userOptions.labels.showTable),9,eD)]),f.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[4]||(e[4]=(...i)=>a.generatePdf&&a.generatePdf(...i)),disabled:n.isPrinting,style:{"margin-top":"12px"}},[n.isPrinting?(f.openBlock(),f.createElementBlock("svg",rD,AD)):(f.openBlock(),f.createElementBlock("span",nD,"PDF"))],8,tD),f.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[5]||(e[5]=(...i)=>a.generateXls&&a.generateXls(...i))}," XLSX ")],4)],4)):f.createCommentVNode("",!0),(f.openBlock(),f.createElementBlock("svg",{width:"100%",viewBox:a.viewBox,class:"vue-ui-xy-svg",style:f.normalizeStyle(`background:${a.chartConfig.chart.backgroundColor}; color:${a.chartConfig.chart.color}; font-family:${a.chartConfig.chart.fontFamily}`),onClick:e[7]||(e[7]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[f.createElementVNode("g",iD,[f.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-linecap":"round"},null,8,sD),f.createElementVNode("line",{stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:a.drawingArea.left,x2:a.drawingArea.right,y1:a.zero,y2:a.zero,"stroke-linecap":"round"},null,8,oD),a.chartConfig.chart.grid.showVerticalLines?(f.openBlock(),f.createElementBlock("g",lD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.maxSeries+1,(i,s)=>(f.openBlock(),f.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,x2:a.drawingArea.width/a.maxSeries*s+a.drawingArea.left,y1:a.drawingArea.top,y2:a.drawingArea.bottom,"stroke-width":"0.5",stroke:a.chartConfig.chart.grid.stroke},null,8,cD))),128))])):f.createCommentVNode("",!0)]),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.barSet,(i,s)=>(f.openBlock(),f.createElementBlock("defs",{key:`def_rect_${s}`},[f.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[f.createElementVNode("stop",{offset:"0%","stop-color":i.color},null,8,uD),f.createElementVNode("stop",{offset:"62%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,hD),f.createElementVNode("stop",{offset:"100%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,dD)],8,fD),f.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[f.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}66`},null,8,pD),f.createElementVNode("stop",{offset:"38%","stop-color":`${a.shiftHue(i.color,.02)}DE`},null,8,mD),f.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,vD)],8,gD)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.plotSet,(i,s)=>(f.openBlock(),f.createElementBlock("defs",{key:`def_plot_${s}`},[f.createElementVNode("radialGradient",{id:`plotGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[f.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,BD),f.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,yD)],8,wD)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.lineSet,(i,s)=>(f.openBlock(),f.createElementBlock("defs",{key:`def_line_${s}`},[f.createElementVNode("radialGradient",{id:`lineGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[f.createElementVNode("stop",{offset:"0%","stop-color":`${a.shiftHue(i.color,.05)}`},null,8,CD),f.createElementVNode("stop",{offset:"100%","stop-color":i.color},null,8,bD)],8,xD)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.barSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`serie_bar_${s}`,class:f.normalizeClass(`serie_bar_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`bar_plot_${s}_${l}`},[a.canShowValue(o.value)?(f.openBlock(),f.createElementBlock("rect",{key:0,x:a.calcRectX(o),y:a.calcRectY(o),height:a.calcRectHeight(o),width:a.calcRectWidth(),fill:a.chartConfig.bar.useGradient?o.value>=0?`url(#rectGradient_pos_${s}_${n.uniqueId})`:`url(#rectGradient_neg_${s}_${n.uniqueId})`:i.color},null,8,ED)):f.createCommentVNode("",!0)]))),128))],2))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.plotSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`serie_plot_${s}`,class:f.normalizeClass(`serie_plot_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`circle_plot_${s}_${l}`},[a.canShowValue(o.value)?(f.openBlock(),f.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.plot.radius,fill:a.chartConfig.plot.useGradient?`url(#plotGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,FD)):f.createCommentVNode("",!0)]))),128))],2))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.lineSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`serie_line_${s}`,class:f.normalizeClass(`serie_line_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`line_${s}_${l}`},[l<i.plots.length-1&&a.canShowValue(o.value)&&a.canShowValue(i.plots[l+1].value)?(f.openBlock(),f.createElementBlock("line",{key:0,x1:o.x,x2:i.plots[l+1].x,y1:o.y,y2:i.plots[l+1].y,stroke:i.color,"stroke-width":a.chartConfig.line.strokeWidth},null,8,SD)):f.createCommentVNode("",!0)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`circle_line_${s}_${l}`},[a.canShowValue(o.value)?(f.openBlock(),f.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:a.chartConfig.line.radius,fill:a.chartConfig.line.useGradient?`url(#lineGradient_${s}_${n.uniqueId})`:i.color,stroke:a.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,_D)):f.createCommentVNode("",!0)]))),128))],2))),128)),a.chartConfig.bar.labels.show&&n.mutableConfig.dataLabels.show?(f.openBlock(),f.createElementBlock("g",TD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.barSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_bar_${s}`,class:f.normalizeClass(`xLabel_bar_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_bar_${s}_${l}`},[f.createElementVNode("text",{x:o.x+a.calcRectWidth(),y:o.y+a.chartConfig.bar.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.bar.labels.color},f.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.bar.labels.rounding):""),9,UD)]))),128))],2))),128))])):f.createCommentVNode("",!0),a.chartConfig.plot.labels.show&&n.mutableConfig.dataLabels.show?(f.openBlock(),f.createElementBlock("g",ND,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.plotSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_plot_${s}`,class:f.normalizeClass(`xLabel_plot_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_plot_${s}_${l}`},[f.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.plot.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.plot.labels.color},f.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.plot.labels.rounding):""),9,ID)]))),128))],2))),128))])):f.createCommentVNode("",!0),a.chartConfig.line.labels.show&&n.mutableConfig.dataLabels.show?(f.openBlock(),f.createElementBlock("g",LD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.lineSet,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_line_${s}`,class:f.normalizeClass(`xLabel_line_${s}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.plots,(o,l)=>(f.openBlock(),f.createElementBlock("g",{key:`xLabel_line_${s}_${l}`},[f.createElementVNode("text",{x:o.x,y:o.y+a.chartConfig.line.labels.offsetY,"text-anchor":"middle","font-size":a.chartConfig.chart.labels.fontSize,fill:a.chartConfig.line.labels.color},f.toDisplayString(a.canShowValue(o.value)?o.value.toFixed(a.chartConfig.line.labels.rounding):""),9,kD)]))),128))],2))),128))])):f.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.show?(f.openBlock(),f.createElementBlock("g",QD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.yLabels,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`yLabel_${s}`},[i.value>=a.min&&i.value<=a.max?(f.openBlock(),f.createElementBlock("line",{key:0,x1:a.drawingArea.left,x2:a.drawingArea.left-5,y1:i.y,y2:i.y,stroke:a.chartConfig.chart.grid.stroke,"stroke-width":"1"},null,8,OD)):f.createCommentVNode("",!0),i.value>=a.min&&i.value<=a.max?(f.openBlock(),f.createElementBlock("text",{key:1,x:a.drawingArea.left-5,y:i.y+a.chartConfig.chart.labels.fontSize/3,"font-size":a.chartConfig.chart.grid.labels.fontSize,"text-anchor":"end",fill:a.chartConfig.chart.grid.labels.color},f.toDisplayString(a.canShowValue(i.value)?i.value.toFixed(0):""),9,DD)):f.createCommentVNode("",!0)]))),128))])):f.createCommentVNode("",!0),f.createElementVNode("g",null,[a.chartConfig.chart.grid.labels.axis.yLabel?(f.openBlock(),f.createElementBlock("text",{key:0,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color,id:"yAxisLabel","text-anchor":"middle",style:{transition:"none"}},f.toDisplayString(a.chartConfig.chart.grid.labels.axis.yLabel),9,PD)):f.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.axis.xLabel?(f.openBlock(),f.createElementBlock("text",{key:1,"text-anchor":"middle",x:a.chartConfig.chart.width/2,y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.axis.fontSize+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,"font-size":a.chartConfig.chart.grid.labels.axis.fontSize,fill:a.chartConfig.chart.grid.labels.color},f.toDisplayString(a.chartConfig.chart.grid.labels.axis.xLabel),9,MD)):f.createCommentVNode("",!0)]),a.chartConfig.chart.title.show&&n.mutableConfig.titleInside&&!n.isPrinting?(f.openBlock(),f.createElementBlock("g",RD,[(f.openBlock(),f.createElementBlock("foreignObject",HD,[f.createElementVNode("div",{class:"vue-ui-xy-title",style:f.normalizeStyle(`font-family:${a.chartConfig.chart.fontFamily}`)},[f.createElementVNode("div",{class:"vue-ui-xy-title-main",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.fontSize*.6}px; color:${a.chartConfig.chart.title.color}; font-weight:${a.chartConfig.chart.title.bold?"bold":"400"}`)},f.toDisplayString(a.chartConfig.chart.title.text),5),a.chartConfig.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.title.subtitle.fontSize*.6}px; color:${a.chartConfig.chart.title.subtitle.color}`)},f.toDisplayString(a.chartConfig.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)]))])):f.createCommentVNode("",!0),a.chartConfig.chart.legend.show&&n.mutableConfig.legendInside&&!n.isPrinting?(f.openBlock(),f.createElementBlock("g",VD,[(f.openBlock(),f.createElementBlock("foreignObject",{x:"0",y:a.drawingArea.bottom+a.chartConfig.chart.padding.bottom/3+12,width:"100%",height:"20px",style:f.normalizeStyle(`overflow:visible; font-size:${a.chartConfig.chart.legend.fontSize*.6}px`)},[f.createElementVNode("div",GD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.absoluteDataset,(i,s)=>(f.openBlock(),f.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:f.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[["plot"].includes(i.type)?(f.openBlock(),f.createElementBlock("span",{key:0,style:f.normalizeStyle(`color:${i.color}`)},"●",4)):f.createCommentVNode("",!0),["line"].includes(i.type)?(f.openBlock(),f.createElementBlock("span",{key:1,style:f.normalizeStyle(`color:${i.color}`)},"▬",4)):f.createCommentVNode("",!0),["bar"].includes(i.type)?(f.openBlock(),f.createElementBlock("span",{key:2,style:f.normalizeStyle(`color:${i.color}`)},"◼",4)):f.createCommentVNode("",!0),f.createElementVNode("span",{style:f.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},f.toDisplayString(i.name),5)],10,jD))),128))])],12,KD))])):f.createCommentVNode("",!0),a.chartConfig.chart.grid.labels.xAxisLabels.show?(f.openBlock(),f.createElementBlock("g",zD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.maxSeries,(i,s)=>(f.openBlock(),f.createElementBlock("text",{key:`time_label_${s}`,"text-anchor":"middle",y:a.drawingArea.bottom+a.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s+a.drawingArea.width/a.maxSeries/2,"font-size":a.chartConfig.chart.grid.labels.xAxisLabels.fontSize,fill:a.chartConfig.chart.grid.labels.xAxisLabels.color},f.toDisplayString(a.chartConfig.chart.grid.labels.xAxisLabels.values[s]||""),9,WD))),128))])):f.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show?(f.openBlock(),f.createElementBlock("g",XD,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.maxSeries,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`tooltip_trap_${s}`},[f.createElementVNode("rect",{x:a.drawingArea.left+a.drawingArea.width/a.maxSeries*s,y:a.drawingArea.top,height:a.drawingArea.height,width:a.drawingArea.width/a.maxSeries,fill:n.selectedSerieIndex===s||n.selectedRowIndex===s?"rgba(0,0,0,0.03)":"transparent",onMouseenter:o=>a.toggleTooltip(!0,s),onMouseleave:e[6]||(e[6]=o=>a.toggleTooltip(!1))},null,40,$D)]))),128))])):f.createCommentVNode("",!0)],12,aD)),a.chartConfig.chart.legend.show&&(!n.mutableConfig.legendInside||n.isPrinting)?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-xy-legend",style:f.normalizeStyle(`font-size:${a.chartConfig.chart.legend.fontSize}px`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.absoluteDataset,(i,s)=>(f.openBlock(),f.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>a.segregate(i),class:f.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(i.id)})},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${i.color}`),innerHTML:n.icons[i.type]},null,12,YD),f.createElementVNode("span",{style:f.normalizeStyle(`color:${a.chartConfig.chart.legend.color}`)},f.toDisplayString(i.name),5)],10,qD))),128))],4)):f.createCommentVNode("",!0),a.chartConfig.chart.tooltip.show&&n.isTooltip?(f.openBlock(),f.createElementBlock("div",{key:3,class:"vue-ui-xy-tooltip",ref:"tooltip",style:f.normalizeStyle(`top:${a.tooltipPosition.top}px;left:${a.tooltipPosition.left}px; background-color:${a.chartConfig.chart.tooltip.backgroundColor};color:${a.chartConfig.chart.tooltip.color}`),innerHTML:a.tooltipContent},null,12,JD)):f.createCommentVNode("",!0),a.chartConfig.showTable&&n.mutableConfig.showTable?(f.openBlock(),f.createElementBlock("div",{key:4,class:f.normalizeClass({"vue-ui-xy-table-wrapper":!0,"vue-ui-xy-table-wrapper-printing":n.isPrinting}),onClick:e[9]||(e[9]=(...i)=>a.closeDetails&&a.closeDetails(...i))},[f.createElementVNode("table",ZD,[f.createElementVNode("thead",null,[f.createElementVNode("tr",null,[f.createElementVNode("th",{style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},null,4),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.table.head,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`th_${s}`,style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},[f.createElementVNode("div",eP,[f.createElementVNode("span",{style:f.normalizeStyle(`color:${i.color}; margin-right:3px`)},f.toDisplayString(n.icons[i.type]),5),f.createTextVNode(f.toDisplayString(i.label),1)])],4))),128))]),f.createElementVNode("tr",null,[f.createElementVNode("th",{align:"right",style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color}`)},tP,4),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.table.head,(i,s)=>(f.openBlock(),f.createElementBlock("th",{align:"right",key:`th_sum_${s}`,style:f.normalizeStyle(`background:${a.chartConfig.table.th.backgroundColor};color:${a.chartConfig.table.th.color};padding-right:6px`)},f.toDisplayString(a.relativeDataset[s].absoluteValues.reduce((o,l)=>o+l,0).toFixed(a.chartConfig.table.rounding)),5))),128))])]),f.createElementVNode("tbody",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.table.body,(i,s)=>(f.openBlock(),f.createElementBlock("tr",{key:`tr_${s}`,class:f.normalizeClass({"vue-ui-xy-table-tr-selected":n.selectedSerieIndex===s||n.selectedRowIndex===s}),onMouseover:o=>n.selectedRowIndex=s,onMouseleave:e[8]||(e[8]=o=>n.selectedRowIndex=null)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i,(o,l)=>(f.openBlock(),f.createElementBlock("td",{key:`td_${s}_${l}`,style:f.normalizeStyle(`background:${a.chartConfig.table.td.backgroundColor};color:${a.chartConfig.table.td.color};padding-right:6px;`)},f.toDisplayString(o),5))),128))],42,rP))),128))])])],2)):f.createCommentVNode("",!0)],12,VO)}const nP=Ru(RO,[["render",AP],["__scopeId","data-v-46298a92"]]),uZ="",aP={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,defaultConfig:{fontFamily:"inherit",maxHeight:500,rowsPerPage:25,style:{th:{backgroundColor:"#E1E5E8",color:"#2D353C",outline:"1px solid #FFFFFF",selected:{backgroundColor:"#6376DD",color:"#FFFFFF"}},rows:{even:{backgroundColor:"#f3f5f7",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}},odd:{backgroundColor:"#FFFFFF",color:"#2D353C",selectedCell:{backgroundColor:"#6375dd5b",color:"#2D353C"},selectedNeighbors:{backgroundColor:"#63dd821e",color:"#2D353C"}}},inputs:{backgroundColor:"#FFFFFF",color:"#2D353C",border:"1px solid #CCCCCC",accentColor:"#6376DD"},dropdowns:{backgroundColor:"#E1E5E8",color:"#2D353C",icons:{selected:{color:"#008000",unicode:"✔"},unselected:{color:"#ff0000",unicode:"✖"}}},infoBar:{backgroundColor:"#E1E5E8",color:"#2D353C"},pagination:{buttons:{backgroundColor:"#E1E5E8",color:"#2D353C",opacityDisabled:.5},navigationIndicator:{backgroundColor:"#6376DD"}},exportMenu:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{backgroundColor:"#FAFAFA",color:"#2D353C"}},closeButtons:{backgroundColor:"transparent",color:"#2D353C",borderRadius:"50%"},chart:{modal:{backgroundColor:"#E1E5E8",color:"#2D353C",buttons:{selected:{backgroundColor:"#6376DD",color:"#FFFFFF"},unselected:{backgroundColor:"#FFFFFF",color:"#2D353C"}}},layout:{backgroundColor:"#FFFFFF",axis:{stroke:"#ccd1d4",strokeWidth:2},bar:{fill:"",stroke:"#FFFFFF"},line:{stroke:"#6376DD75",strokeWidth:4,plot:{fill:"#22348f",stroke:"#FFFFFF",strokeWidth:1,radius:{selected:6,unselected:4}},selector:{stroke:"#ccc",strokeWidth:1,strokeDasharray:5}},labels:{color:"#2D353C"},progression:{stroke:"#2D353C",strokeWidth:2,strokeDasharray:4,arrowSize:7}}}},translations:{average:"Average",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"From",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"To",total:"Total",totalRows:"Total rows"},useChart:!0},bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((e,r)=>e-r),palette:ZA,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((e,r)=>({...e,absoluteIndex:r})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(e=>({average:Object.hasOwn(e,"average")?e.average:!1,decimals:Object.hasOwn(e,"decimals")?e.decimals:0,isMultiselect:Object.hasOwn(e,"isMultiselect")?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,"isPercentage")?e.isPercentage:!1,isSearch:Object.hasOwn(e,"isSearch")?e.isSearch:!1,isSort:Object.hasOwn(e,"isSort")?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,"percentageTo")?e.percentageTo:void 0,prefix:Object.hasOwn(e,"prefix")?e.prefix:"",rangeFilter:Object.hasOwn(e,"rangeFilter")?e.rangeFilter:!1,suffix:Object.hasOwn(e,"suffix")?e.suffix:"",sum:Object.hasOwn(e,"sum")?e.sum:!1,type:e.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
361
361
|
Provide an array of objects of type:
|
|
362
362
|
{
|
|
363
363
|
name: string;
|
|
@@ -370,12 +370,12 @@ Provide an array of objects of type:
|
|
|
370
370
|
isMultiselect: boolean;
|
|
371
371
|
isPercentage: boolean;
|
|
372
372
|
percentageTo: string; (or '')
|
|
373
|
-
}`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,A=e/r,n=Math.max(...this.currentSelectionSpan.rows.map(g=>g.value)),a=Math.min(...this.currentSelectionSpan.rows.map(g=>g.value)),i=a>=0?0:Math.abs(a),s=n+i,o=n<0&&a<0,l=this.dataset.header[this.currentSelectionSpan.col].isPercentage,c=this.currentSelectionSpan.rows.map((g,h)=>({x:A*h+A/2,y:(1-(g.value+i)/s)*t,value:l?g.value*100:g.value,suffix:l?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:g.index,absoluteValue:l?Math.abs(g.value)*100:Math.abs(g.value)})),d=t-t*(i/s);return{isAllNegative:o,zero:d,plots:c,slot:A,progression:c.length>=2?this.calcChartProgression(c):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:tc,makeDonut:zy,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>Math.abs(A)+Math.abs(n),0),absoluteValue:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>A+n,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(c=>c.name),r=t==="all"?this.bodyCopy.map(c=>c.td):this.visibleRows.map(c=>c.td),A=[e].concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Tn.book_new(),i=Tn.aoa_to_sheet(A);Tn.book_append_sheet(a,i,"Sheet1");const s=Zl(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download="data.xlsx",l.click(),window.URL.revokeObjectURL(l.href),this.isExportRequest=!1},calcChartProgression(t){let e,r,A,n;const a=t.length;let i=0,s=0,o=0,l=0;for(const{x:g,y:h}of t)i+=g,s+=h,o+=g*h,l+=g*g;const c=(a*o-i*s)/(a*l-i*i),d=(s-c*i)/a;return e=t[0].x,A=t[a-1].x,r=c*e+d,n=c*A+d,{x1:e,y1:r,x2:A,y2:n,slope:c}},closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(A=>A===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),A=new Date(this.dates[e].from),n=new Date(this.dates[e].to);if(r<A||r>n)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(g=>new Date(g.td[t])),r=new Date(Math.min(...e)),A=new Date(Math.max(...e)),n=r.getFullYear(),a=A.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(A.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0"),l=String(A.getDate()).padStart(2,"0"),c=`${n}-${i}-${o}`,d=`${a}-${s}-${l}`;return{from:c,to:d}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,A=e.isSearch,n=e.isMultiselect&&this.multiselects[t],a=e.rangeFilter,i=s=>{if(a&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&A&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&A&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&A&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&i(t);if(r&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&n&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&n)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&n&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(A&&n)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&a)return["",void 0].includes(this.searches[t])&&i(t);if(A)return["",void 0].includes(this.searches[t]);if(r&&a)return[void 0].includes(this.sorts[t])&&i(t);if(r)return[void 0].includes(this.sorts[t]);if(n&&a)return this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(n)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,A=40,n=37,a=39;if(![r,A,n,a].includes(e))return;const i=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,o=i.match(s),l=parseInt(o[1]),c=parseInt(o[2]),d=document.getElementById(`cell_${l}_${c+1}_${this.uid}`),g=document.getElementById(`cell_${l}_${c-1}_${this.uid}`),h=document.getElementById(`cell_${l+1}_${c}_${this.uid}`),p=document.getElementById(`cell_${l-1}_${c}_${this.uid}`);let v;switch(!0){case e===a:v=d;break;case e===n:v=g;break;case e===r:v=p;break;case e===A:v=h;break;default:return}v&&(v.focus(),v.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const A=e.y-38,n=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?A:t.value>e.value&&r.value>e.value?n:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,A):t&&!r?t.value>e.value?n:A:!t&&r&&r.value>e.value?n:A},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,A)=>{if(r.isSearch&&Object.assign(this.searches,{[A]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[A]:this.getDropdownOptions(A)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[A]:this.getDatesRange(A)}),Object.assign(this.filteredDatesIndexes,{[A]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[A]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(n=>n.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}}),Object.assign(this.immutableRangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}})),r.isPercentage){const n=this.dataset.header.map(i=>i.name).indexOf(r.percentageTo),a=this.dataset.body.map(i=>i.td[n]).reduce((i,s)=>i+s,0);e.push([A,n,a])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[A]:this.includesNaN(this.dataset.body.map(n=>Number(n.td[A])))})}),this.bodyCopy.forEach((r,A)=>{e.map(n=>{const[a,i,s]=n;r.td[a]=r.td[i]/s}),r.td.forEach((n,a)=>{this.dataset.header[a].type===this.constants.TEXT&&this.dataset.header[a].isSearch&&(r[a]=this.stringToNumber(n)),this.dataset.header[a].type===this.constants.DATE&&(r[a]=new Date(n).getTime()),this.dataset.header[a].type===this.constants.NUMERIC&&(r[a]=isNaN(Number(n))?a:n),this.tableBody[A][a]=r[a]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,A)=>{t().then(n=>{try{const a=e(n);r(a)}catch(a){A(a)}}).catch(n=>{A(n)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:A,event:n}){if(A!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const a=n.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(i=>i.index).includes(e)?(a.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(i=>i.index!==e),n.currentTarget.classList.remove(this.cssClass.CELL),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.backgroundColor,i.style.color=this.tableConfig.style.rows.even.olor):(i.style.background=this.tableConfig.style.rows.odd.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.color)}),n.currentTarget.dataset.row==="even"?(n.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.color):(n.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(a.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(i.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),n.currentTarget.dataset.row==="odd"?(n.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(n.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((i,s)=>i.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,A=this.bodyCopy.map(n=>n.td[r]).reduce((n,a)=>n+a,0);this.bodyCopy.forEach(n=>{n.td[e]=n.td[r]/A})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,A)=>r[e]-A[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,A)=>A[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200);const n=document.getElementById(`th_dropdown_${t}`);n.dataset.isOpen==="false"?n.dataset.isOpen="true":n.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},Xn=t=>(f.pushScopeId("data-v-80d709a0"),t=t(),f.popScopeId(),t),iP={class:"vue-ui-table-export-hub"},sP=["innerHTML"],oP=["data-is-open"],lP=Xn(()=>f.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),cP={class:"vue-ui-table-export-hub-options"},fP={class:"vue-ui-table-export-hub-option-wrapper"},uP={class:"label"},hP=["innerHTML"],dP={class:"vue-ui-table-export-hub-option-wrapper"},gP={class:"label"},pP=["innerHTML"],mP={class:"vue-ui-table"},vP={id:"tableHead"},wP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),BP={key:0},yP={key:0},xP={key:1},CP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),bP={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},EP=["innerHTML"],FP={key:0,style:{"margin-left":"3px"}},SP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),_P={key:0},TP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),UP={class:"th-filter"},NP={key:0,class:"th-date"},IP={class:"date-wrapper--inputs"},LP={class:"date-fieldset"},kP=["for"],QP=["id","onUpdate:modelValue","onInput"],OP={class:"date-fieldset"},DP=["for"],PP=["id","onUpdate:modelValue","onInput"],MP={class:"date-wrapper--button"},RP=["onClick"],HP=["innerHTML"],VP=["innerHTML"],KP=["innerHTML"],GP=["onClick","disabled"],jP=["placeholder","onUpdate:modelValue","name"],zP=["onClick"],WP=["innerHTML"],XP=["innerHTML"],$P=["innerHTML"],qP=["onClick","innerHTML"],YP=["innerHTML"],JP={key:5,class:"th-range-filter"},ZP=["for"],e7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),t7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),r7=["id","max","min","onUpdate:modelValue"],A7=["id","max","min","onUpdate:modelValue"],n7=["for"],a7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),i7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),s7=["onClick","disabled"],o7=["id"],l7=["onClick"],c7=["onClick","onKeyup"],f7=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),u7=["innerHTML","onClick","onKeyup"],h7=["data-row"],d7=["data-row"],g7=["data-row","onClick","onKeyup","id"],p7=["innerHTML"],m7={key:1},v7={key:2},w7={key:5},B7=["innerHTML"],y7={key:0},x7={style:{"margin-left":"12px"}},C7={class:"format-num"},b7={style:{"margin-left":"12px"}},E7={key:0,class:"format-num"},F7={key:1,class:"format-num"},S7={key:2},_7={style:{"margin-left":"12px"}},T7={key:0,class:"format-num"},U7={key:1,class:"format-num"},N7={key:2},I7={key:0,class:"vue-ui-table-paginator format-num"},L7={key:1,class:"vue-ui-table-size-warning"},k7=["innerHTML"],Q7={key:3,class:"vue-ui-table-pagination format-num"},O7=["innerHTML","disabled"],D7=["disabled"],P7={key:0,class:"vue-ui-table-page-scroller-wrapper"},M7={for:"pageScroller",style:{"font-size":"14px"}},R7=["max","value"],H7={key:1},V7=["disabled"],K7=["innerHTML","disabled"],G7={class:"chart-modal-options"},j7=["innerHTML"],z7=["innerHTML"],W7=["innerHTML"],X7={style:{"margin-bottom":"12px"}},$7={key:0},q7={key:1},Y7={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},J7={class:"vue-ui-table-fieldset"},Z7={class:"vue-ui-table-fieldset-wrapper"},eM=["name","id","checked","onInput"],tM=["for"],rM=["disabled"],AM=["innerHTML"],nM=["viewBox"],aM=["markerWidth","markerHeight","refY"],iM=["points","fill"],sM=["x2","y1","y2","stroke","stroke-width"],oM=["y2","stroke","stroke-width"],lM=["x","width","height","fill"],cM=f.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD80" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD80" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DDB3" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD66" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD66" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DDB3" data-v-80d709a0></stop></linearGradient>',4),fM=["x","y","height","width","fill","stroke"],uM=["x","y","width"],hM=["x1","y1","x2","y2","stroke-width","stroke"],dM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],gM=["cx","cy","r","fill","stroke","stroke-width"],pM=["x","y","width"],mM=["x","width","height","onMouseenter"],vM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],wM=Xn(()=>f.createElementVNode("span",null,"---",-1)),BM=["d","stroke"],yM=["x","y"],xM={class:"vue-ui-table-donut-label-name"},CM=["fill"],bM=["fill"],EM=["fill"],FM=["fill"],SM={class:"vue-ui-table-donut-legend"};function _M(t,e,r,A,n,a){return f.openBlock(),f.createElementBlock("div",{class:"vue-ui-table-main",style:f.normalizeStyle(`font-family: ${a.tableConfig.fontFamily}`)},[f.createElementVNode("div",iP,[f.createElementVNode("button",{onClick:e[0]||(e[0]=i=>n.isExportRequest=!n.isExportRequest),innerHTML:a.icons.export,style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},null,12,sP),f.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":n.isExportRequest||"false",style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},[lP,f.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=i=>n.isExportRequest=!1),style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),f.createElementVNode("div",cP,[f.createElementVNode("div",fP,[f.createElementVNode("div",uP,f.toDisplayString(a.tableConfig.translations.exportAllLabel)+" ("+f.toDisplayString(n.bodyCopy.length)+") ",1),f.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=i=>a.createXls("all")),style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[f.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,hP),f.createElementVNode("span",null,f.toDisplayString(a.tableConfig.translations.exportAllButton),1)],4)]),f.createElementVNode("div",dP,[f.createElementVNode("div",gP,f.toDisplayString(a.tableConfig.translations.exportPageLabel),1),f.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=i=>a.createXls("page")),style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[f.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,pP),f.createElementVNode("span",null,f.toDisplayString(a.tableConfig.translations.exportPageButton),1)],4)])])],12,oP)]),f.createElementVNode("div",{class:"vue-ui-table__wrapper",style:f.normalizeStyle(`max-height:${a.tableConfig.maxHeight}px`),ref:"tableWrapper"},[f.createElementVNode("table",mP,[f.createElementVNode("thead",vP,[f.createElementVNode("tr",null,[wP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,style:f.normalizeStyle(`overflow: visible;background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`),class:f.normalizeClass({"th-has-nan":n.hasNaN[s]})},[a.hasNumericTypes&&([n.constants.TEXT,n.constants.DATE].includes(i.type)||i.isPercentage)?(f.openBlock(),f.createElementBlock("span",BP,[f.createTextVNode(f.toDisplayString(i.name)+" ",1),i.isPercentage?(f.openBlock(),f.createElementBlock("span",yP," / "+f.toDisplayString(i.percentageTo),1)):f.createCommentVNode("",!0)])):(f.openBlock(),f.createElementBlock("span",xP,f.toDisplayString(i.name),1))],6))),128))]),a.hasNumericTypes?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("tr",null,[CP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,class:f.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.sum&&!n.hasNaN[s]?(f.openBlock(),f.createElementBlock("span",bP,[f.createElementVNode("span",{innerHTML:a.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,EP),f.createTextVNode(" "+f.toDisplayString(i.prefix)+" "+f.toDisplayString(Number(a.getSum(s).toFixed(i.decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix)+" ",1),n.percentages[s]&&i.percentageTo&&!i.isPercentage?(f.openBlock(),f.createElementBlock("span",FP," ("+f.toDisplayString(isNaN(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex))?"-":(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex)*100).toFixed(i.decimals))+"%) ",1)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],6))),128))]),f.createElementVNode("tr",null,[SP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,class:f.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.average&&!n.hasNaN[s]?(f.openBlock(),f.createElementBlock("span",_P," ~ "+f.toDisplayString(i.prefix)+" "+f.toDisplayString(isNaN(a.getAverage(s))?"":Number(a.getAverage(s).toFixed(i.decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix),1)):f.createCommentVNode("",!0)],6))),128))]),f.createElementVNode("tr",null,[TP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,class:f.normalizeClass({"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[f.createElementVNode("div",UP,[i.type===n.constants.DATE&&n.dates[s]?(f.openBlock(),f.createElementBlock("div",NP,[f.createElementVNode("div",IP,[f.createElementVNode("div",LP,[f.createElementVNode("label",{for:`from_${s}`},f.toDisplayString(a.tableConfig.translations.from),9,kP),f.withDirectives(f.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].from=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,QP),[[f.vModelText,n.dates[s].from]])]),f.createElementVNode("div",OP,[f.createElementVNode("label",{for:`to_${s}`},f.toDisplayString(a.tableConfig.translations.to),9,DP),f.withDirectives(f.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].to=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,PP),[[f.vModelText,n.dates[s].to]])])]),f.createElementVNode("div",MP,[i.isSort?(f.openBlock(),f.createElementBlock("button",{key:0,onClick:o=>a.sortTh(s,o),class:f.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:f.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(f.openBlock(),f.createElementBlock("span",{key:0,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort09:a.icons.sortAZ},null,8,HP)):n.sorts[s]===n.constants.DESC?(f.openBlock(),f.createElementBlock("span",{key:1,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort90:a.icons.sortZA},null,8,VP)):(f.openBlock(),f.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,KP))],14,RP)):f.createCommentVNode("",!0),f.createElementVNode("button",{onClick:o=>{a.resetDates(s),a.resetFilter(s,i,o)},disabled:!n.filteredDatesIndexes[s]&&a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,GP)])])):f.createCommentVNode("",!0),i.isSearch?f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:1,placeholder:a.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":o=>n.searches[s]=o,onInput:e[4]||(e[4]=o=>a.debounce(a.filterBody,400)),name:`search_${s}`,style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,jP)),[[f.vModelText,n.searches[s]]]):f.createCommentVNode("",!0),!n.hasNaN[s]&&i.isSort&&i.type!==n.constants.DATE?(f.openBlock(),f.createElementBlock("button",{key:2,onClick:o=>a.sortTh(s,o),class:f.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:f.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(f.openBlock(),f.createElementBlock("span",{key:0,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort09:a.icons.sortZA},null,8,WP)):n.sorts[s]===n.constants.DESC?(f.openBlock(),f.createElementBlock("span",{key:1,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort90:a.icons.sortAZ},null,8,XP)):(f.openBlock(),f.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,$P))],14,zP)):f.createCommentVNode("",!0),i.isMultiselect?(f.openBlock(),f.createElementBlock("button",{key:3,onClick:o=>a.toggleMultiselect(s,i,o),innerHTML:a.icons.filter,class:f.normalizeClass({"th-button-active":n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length}),style:f.normalizeStyle(`background:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,qP)):f.createCommentVNode("",!0),n.currentSelectionSpan.col===s&&a.canChart?(f.openBlock(),f.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=o=>n.showChart=!n.showChart),innerHTML:a.icons.chart,class:f.normalizeClass({"th-button-active":n.showChart}),style:f.normalizeStyle(`background:${n.showChart?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.showChart?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,YP)):f.createCommentVNode("",!0),i.rangeFilter&&n.rangeFilters[s]&&!n.hasNaN[s]?(f.openBlock(),f.createElementBlock("div",JP,[f.createElementVNode("label",{for:`rangeMin${s}`},[e7,f.createTextVNode(" min "),t7],8,ZP),f.withDirectives(f.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].min=o,onInput:e[6]||(e[6]=o=>a.debounce(a.filterBody,400)),style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,r7),[[f.vModelText,n.rangeFilters[s].min,void 0,{number:!0}]]),f.withDirectives(f.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].max=o,onInput:e[7]||(e[7]=o=>a.debounce(a.filterBody,400)),style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,A7),[[f.vModelText,n.rangeFilters[s].max,void 0,{number:!0}]]),f.createElementVNode("label",{for:`rangeMax${s}`},[a7,f.createTextVNode(" max "),i7],8,n7)])):f.createCommentVNode("",!0),a.canResetColumn(s,i)?(f.openBlock(),f.createElementBlock("button",{key:6,onClick:o=>a.resetFilter(s,i,o),disabled:a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,s7)):f.createCommentVNode("",!0),i.isMultiselect?(f.openBlock(),f.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:f.normalizeStyle(`background:${a.tableConfig.style.dropdowns.backgroundColor};color:${a.tableConfig.style.dropdowns.color}`)},[f.createElementVNode("button",{class:"close-dropdown",onClick:o=>a.toggleMultiselect(s,i,o),style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color}`)}," ✖ ",12,l7),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.getDropdownOptions(s),(o,l)=>(f.openBlock(),f.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${l}`,onClick:c=>a.selectDropdownOption(o,s),onKeyup:[f.withKeys(c=>a.selectDropdownOption(o,s),["enter"]),f.withKeys(c=>a.selectDropdownOption(o,s),["space"])],style:f.normalizeStyle(`opacity:${a.isDropdownOptionSelected(o,s)?1:.5}`),tabindex:"0"},[a.isDropdownOptionSelected(o,s)?(f.openBlock(),f.createElementBlock("span",{key:0,style:f.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},f.toDisplayString(a.tableConfig.style.dropdowns.icons.selected.unicode),5)):(f.openBlock(),f.createElementBlock("span",{key:1,style:f.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},f.toDisplayString(a.tableConfig.style.dropdowns.icons.unselected.unicode),5)),f.createElementVNode("span",null,f.toDisplayString(o),1)],44,c7))),128))],12,o7)):f.createCommentVNode("",!0)])],6))),128))])],64)):f.createCommentVNode("",!0),f.createElementVNode("tr",null,[f7,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`col_selector_${s}`,class:f.normalizeClass({"vue-ui-table-col-selector":!n.hasNaN[s],"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.backgroundColor:a.tableConfig.style.th.backgroundColor};color:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.color:a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[n.hasNaN[s]?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",{key:0,innerHTML:n.tableHead[s].type===n.constants.NUMERIC?a.icons.chevronDown:"",class:f.normalizeClass({"col-selector":n.tableHead[s].type===n.constants.NUMERIC}),tabindex:"0",onClick:f.withModifiers(o=>a.selectColumn(s),["stop"]),onKeyup:f.withKeys(o=>a.selectColumn(s),["enter"])},null,42,u7))],6))),128))])]),f.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...i)=>a.closeAllDropdowns&&a.closeAllDropdowns(...i)),onKeydown:e[9]||(e[9]=i=>a.navigateCell(i))},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.visibleRows,(i,s)=>(f.openBlock(),f.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:f.normalizeClass(`tr_${n.uid}`),style:f.normalizeStyle(`${s%2===0?`background:${a.tableConfig.style.rows.odd.backgroundColor};color:${a.tableConfig.style.rows.odd.color}`:`background:${a.tableConfig.style.rows.even.backgroundColor};color:${a.tableConfig.style.rows.even.color}`}`)},[f.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},f.toDisplayString(i.absoluteIndex+1),9,d7),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.td,(o,l)=>(f.openBlock(),f.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${l}`,style:f.normalizeStyle(a.isNumeric(o)||r.dataset.header[l].type===n.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),onKeyup:[f.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["enter"]),f.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["space"])],class:f.normalizeClass({"td-numeric":r.dataset.header[l].type===n.constants.NUMERIC,"td-focusable":!0,"td-has-nan":n.hasNaN[l]}),id:`cell_${s}_${l}_${n.uid}`,tabindex:"0"},[i.meta&&i.meta.markerIndices.includes(l)&&i.meta.unicodeIcon?(f.openBlock(),f.createElementBlock("span",{key:0,style:f.normalizeStyle(`color:${i.meta.color};margin-right:3px`),innerHTML:i.meta.unicodeIcon},null,12,p7)):f.createCommentVNode("",!0),r.dataset.header[l].type===n.constants.DATE?(f.openBlock(),f.createElementBlock("span",m7,f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(new Date(o).toLocaleString().slice(0,10))+" "+f.toDisplayString(r.dataset.header[l].suffix),1)):r.dataset.header[l].isPercentage?(f.openBlock(),f.createElementBlock("span",v7,f.toDisplayString(Number((o*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"% ",1)):n.percentages[l]&&r.dataset.header[l].percentageTo&&!r.dataset.header[l].isPercentage?(f.openBlock(),f.createElementBlock("span",{key:3,class:f.normalizeClass({"td-nan":isNaN(Number(o))})},f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+f.toDisplayString(r.dataset.header[l].suffix)+" ("+f.toDisplayString(isNaN(Number(o))?"":Number((o/a.getSum(n.percentages[l].referenceIndex)*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[l].type===n.constants.NUMERIC?(f.openBlock(),f.createElementBlock("span",{key:4,class:f.normalizeClass({"td-nan":isNaN(Number(o))})},f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+f.toDisplayString(r.dataset.header[l].suffix),3)):(f.openBlock(),f.createElementBlock("span",w7,f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(o)+" "+f.toDisplayString(r.dataset.header[l].suffix),1))],46,g7))),128))],14,h7))),128))],32)])],4),f.createElementVNode("div",{class:f.normalizeClass({"td-selector-info":!0,"td-selector-info--active":n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length}),style:f.normalizeStyle(`background:${a.tableConfig.style.infoBar.backgroundColor};color:${a.tableConfig.style.infoBar.color}`)},[n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",{innerHTML:a.icons.table,class:"td-selector-icon"},null,8,B7),f.createElementVNode("span",null,[f.createElementVNode("b",null,[f.createTextVNode(f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("span",y7," / "+f.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):f.createCommentVNode("",!0)]),f.createElementVNode("span",x7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.nb)+" : ",1),f.createElementVNode("b",C7,f.toDisplayString(n.currentSelectionSpan.rows.length),1)]),f.createElementVNode("span",b7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.sum)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",E7,f.toDisplayString(a.selectedCellsCalculations.sumPercentage),1)):(f.openBlock(),f.createElementBlock("b",F7,f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.selectedCellsCalculations.sumRegular)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",S7,"%")):f.createCommentVNode("",!0)]),f.createElementVNode("span",_7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.average)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",T7,f.toDisplayString(a.selectedCellsCalculations.averagePercentage),1)):(f.openBlock(),f.createElementBlock("b",U7,f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.selectedCellsCalculations.averageRegular)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",N7,"%")):f.createCommentVNode("",!0)])]),f.createElementVNode("button",{onClick:e[10]||(e[10]=(...i)=>a.resetSelection&&a.resetSelection(...i)),class:"td-selector-info-reset",style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):f.createCommentVNode("",!0)],6),n.bodyCopy.length>10?(f.openBlock(),f.createElementBlock("div",I7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.totalRows)+" : "+f.toDisplayString(r.dataset.body.length)+" | "+f.toDisplayString(a.tableConfig.translations.paginatorLabel)+" : ",1),n.bodyCopy.length>10?f.withDirectives((f.openBlock(),f.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=i=>n.itemsPerPage=i),onChange:e[12]||(e[12]=(...i)=>a.resetSelection&&a.resetSelection(...i)),style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.paginatorOptions,(i,s)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[n.bodyCopy.length>i||r.dataset.body.length===i?(f.openBlock(),f.createElementBlock("option",{key:`paginator_option_${s}`},f.toDisplayString(i),1)):f.createCommentVNode("",!0)],64))),256))],36)),[[f.vModelSelect,n.itemsPerPage,void 0,{number:!0}]]):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),n.itemsPerPage>=250?(f.openBlock(),f.createElementBlock("div",L7,[f.createElementVNode("span",{innerHTML:a.icons.warning},null,8,k7),f.createTextVNode(f.toDisplayString(a.tableConfig.translations.sizeWarning),1)])):f.createCommentVNode("",!0),a.pages.length>1&&a.pages.length<=10?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${n.currentPage/(a.pages.length-1)*100}%)`)},null,4)):f.createCommentVNode("",!0),a.pages.length>1?(f.openBlock(),f.createElementBlock("div",Q7,[f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=f.withModifiers(i=>a.navigate("previous"),["stop"])),innerHTML:a.icons.chevronLeft,disabled:n.currentPage===0,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,O7),a.pages.length>3?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=f.withModifiers(i=>a.navigate(1),["stop"])),disabled:n.currentPage===0,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,D7),a.pages.length>10?(f.openBlock(),f.createElementBlock("div",P7,[f.createElementVNode("label",M7,f.toDisplayString(a.tableConfig.translations.page)+" "+f.toDisplayString(n.currentPage+1)+" / "+f.toDisplayString(a.pages.length),1),f.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:a.pages.length-1,onInput:e[15]||(e[15]=i=>a.updateCurrentPage(i)),value:n.currentPage,style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,R7)])):(f.openBlock(),f.createElementBlock("span",H7,f.toDisplayString(a.tableConfig.translations.page)+" "+f.toDisplayString(n.currentPage+1)+" / "+f.toDisplayString(a.pages.length),1)),f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=f.withModifiers(i=>a.navigate(a.pages.length),["stop"])),disabled:n.currentPage===a.pages.length-1,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},f.toDisplayString(a.pages.length),13,V7)],64)):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.page)+" "+f.toDisplayString(n.currentPage+1)+" / "+f.toDisplayString(a.pages.length),1)],64)),f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=f.withModifiers(i=>a.navigate("next"),["stop"])),innerHTML:a.icons.chevronRight,disabled:n.currentPage===a.pages.length-1,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,K7)])):f.createCommentVNode("",!0),n.showChart&&a.canChart?(f.openBlock(),f.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:f.normalizeStyle(`top:${n.clientY}px; left:${n.clientX}px;background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[f.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=i=>n.showChart=!1),style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),f.createElementVNode("div",G7,[a.availableDonutCategories.length?(f.openBlock(),f.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=i=>n.showDonutOptions=!0),innerHTML:a.icons.donut,class:f.normalizeClass({"is-active-chart":n.chart.type===n.constants.DONUT||n.showDonutOptions}),style:f.normalizeStyle(`background:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,j7)):f.createCommentVNode("",!0),f.createElementVNode("button",{onClick:e[20]||(e[20]=i=>{n.chart.type=n.constants.LINE,n.showDonutOptions=!1}),innerHTML:a.icons.chart,class:f.normalizeClass({"is-active-chart":n.chart.type===n.constants.LINE&&!n.showDonutOptions}),style:f.normalizeStyle(`background:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,z7),f.createElementVNode("button",{onClick:e[21]||(e[21]=i=>{n.chart.type=n.constants.BAR,n.showDonutOptions=!1}),innerHTML:a.icons.bar,class:f.normalizeClass({"is-active-chart":n.chart.type===n.constants.BAR&&!n.showDonutOptions}),style:f.normalizeStyle(`background:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,W7)]),f.createElementVNode("div",X7,[f.createElementVNode("b",null,[f.createTextVNode(f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage&&r.dataset.header[n.currentSelectionSpan.col].percentageTo?(f.openBlock(),f.createElementBlock("span",$7," / "+f.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):f.createCommentVNode("",!0),n.chart.type===n.constants.DONUT&&n.selectedDonutCategory&&n.selectedDonutCategory.name?(f.openBlock(),f.createElementBlock("span",q7,f.toDisplayString(a.tableConfig.translations.by)+" "+f.toDisplayString(n.selectedDonutCategory.name),1)):f.createCommentVNode("",!0)])]),f.createElementVNode("div",Y7,[n.showDonutOptions&&a.availableDonutCategories.length?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[f.createElementVNode("fieldset",J7,[f.createElementVNode("legend",null,f.toDisplayString(a.tableConfig.translations.chooseCategoryColumn),1),f.createElementVNode("div",Z7,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.availableDonutCategories,(i,s)=>(f.openBlock(),f.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[f.createElementVNode("input",{type:"radio",name:i.name,id:i.name,checked:n.selectedDonutCategory&&i.name===n.selectedDonutCategory.name,onInput:o=>n.selectedDonutCategory=a.availableDonutCategories[s],style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,eM),f.createElementVNode("label",{for:i.name},f.toDisplayString(i.name),9,tM)]))),128))]),f.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!n.selectedDonutCategory,onClick:e[22]||(e[22]=(...i)=>a.applyDonutOption&&a.applyDonutOption(...i)),style:f.normalizeStyle(`background:${a.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${a.tableConfig.style.chart.modal.buttons.selected.color}`)},[f.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:a.icons.donut},null,8,AM),f.createTextVNode(" "+f.toDisplayString(a.tableConfig.translations.makeDonut),1)],12,rM)])],4)):f.createCommentVNode("",!0),[n.constants.BAR,n.constants.LINE].includes(n.chart.type)&&!n.showDonutOptions?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[(f.openBlock(),f.createElementBlock("svg",{viewBox:`0 0 ${n.chart.width} ${n.chart.height}`,class:"vue-ui-table-chart-svg",style:f.normalizeStyle(`background:${a.tableConfig.style.chart.layout.backgroundColor}`)},[f.createElementVNode("defs",null,[f.createElementVNode("marker",{id:"arrowhead",markerWidth:a.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:a.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:a.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[f.createElementVNode("polygon",{points:`0 0, ${a.tableConfig.style.chart.layout.progression.arrowSize} ${a.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${a.tableConfig.style.chart.layout.progression.arrowSize}`,fill:a.tableConfig.style.chart.layout.progression.stroke},null,8,iM)],8,aM)]),f.createElementVNode("g",null,[f.createElementVNode("line",{x1:0,x2:n.chart.width,y1:a.chartData.zero,y2:a.chartData.zero,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,sM),f.createElementVNode("line",{x1:0,x2:0,y1:0,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,oM)]),n.chart.type===n.constants.LINE?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(a.chartData.plots,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`trap_fill_${s}`},[f.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:n.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,lM)]))),128)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.chartData.plots,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`plot_${s}`},[n.chart.type===n.constants.BAR?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[cM,f.createElementVNode("rect",{x:i.x-a.chartData.slot/2,y:a.chartData.isAllNegative?0:a.calcRectY(i.value,i.y),height:i.value>=0?a.chartData.zero-i.y:a.chartData.isAllNegative?i.y:i.y-a.chartData.zero,width:a.chartData.slot,fill:a.tableConfig.style.chart.layout.bar.fill?a.tableConfig.style.chart.layout.bar.fill:n.selectedPlot===s?i.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(i.value>=0,"url(#barGradient)"),stroke:a.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,fM),n.selectedPlot===s?(f.openBlock(),f.createElementBlock("foreignObject",{key:0,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:i.value>=0?i.y-32:i.y+4,height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},f.toDisplayString(i.prefix)+" "+f.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix),5)],8,uM)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),n.chart.type===n.constants.LINE?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[s+1<a.chartData.plots.length?(f.openBlock(),f.createElementBlock("line",{key:0,x1:i.x,y1:i.y,x2:a.chartData.plots[s+1].x,y2:a.chartData.plots[s+1].y,"stroke-width":a.tableConfig.style.chart.layout.line.strokeWidth,stroke:a.tableConfig.style.chart.layout.line.stroke},null,8,hM)):f.createCommentVNode("",!0),n.selectedPlot===s?(f.openBlock(),f.createElementBlock("line",{key:1,x1:i.x,y1:i.y,x2:i.x,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,dM)):f.createCommentVNode("",!0),f.createElementVNode("circle",{cx:i.x,cy:i.y,r:n.selectedPlot===s?a.tableConfig.style.chart.layout.line.plot.radius.selected:a.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:a.tableConfig.style.chart.layout.line.plot.fill,stroke:a.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,gM),n.selectedPlot===s?(f.openBlock(),f.createElementBlock("foreignObject",{key:2,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:a.placeLabelOnTopOrBottom({previousPlot:a.chartData.plots[s-1],currentPlot:i,nextPlot:a.chartData.plots[s+1]}),height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},f.toDisplayString(i.prefix)+" "+f.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix),5)],8,pM)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.chartData.plots,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`trap_${s}`},[f.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:"transparent",onMouseenter:o=>n.selectedPlot=s,onMouseleave:e[23]||(e[23]=o=>n.selectedPlot=void 0)},null,40,mM)]))),128)),a.chartData.progression&&a.chartData.plots.length>2?(f.openBlock(),f.createElementBlock("line",{key:1,x1:a.chartData.progression.x1,y1:a.chartData.progression.y1,x2:a.chartData.progression.x2,y2:a.chartData.progression.y2,stroke:a.tableConfig.style.chart.layout.progression.stroke,"stroke-width":a.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,vM)):f.createCommentVNode("",!0)],12,nM)),a.chartData.plots.length>=2?(f.openBlock(),f.createElementBlock("div",{key:0,class:"chart-trend",style:f.normalizeStyle(`color:${a.tableConfig.style.chart.modal.color}`)},[wM,f.createTextVNode(" Trend: "),f.createElementVNode("span",null,f.toDisplayString(a.chartData.progression.slope<0?"+":"-"),1),f.createTextVNode(" "+f.toDisplayString((Math.abs(a.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),[n.constants.DONUT].includes(n.chart.type)&&!n.showDonutOptions?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[(f.openBlock(),f.createElementBlock("svg",{viewBox:"0 0 100 100",style:f.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${a.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.currentDonut,(i,s)=>(f.openBlock(),f.createElementBlock("path",{key:`arc_${s}`,d:i.path,stroke:`${i.color}CC`,"stroke-width":20,fill:"none"},null,8,BM))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.currentDonut,(i,s)=>(f.openBlock(),f.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:a.calcDonutMarkerLabelPositionX(i)-15,y:i.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[a.isArcBigEnough(i)?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:f.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[f.createElementVNode("b",null,f.toDisplayString(a.displayArcPercentage(i,n.currentDonut)),1),f.createElementVNode("span",xM,f.toDisplayString(i.name),1)],4)):f.createCommentVNode("",!0)],8,yM))),128)),f.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(a.tableConfig.translations.total),9,CM),f.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.donutHollowLabels.total)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,bM),f.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(a.tableConfig.translations.average),9,EM),f.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.donutHollowLabels.average)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,FM)],4)),f.createElementVNode("div",SM,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.currentDonut.filter(i=>i.value>0),(i,s)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:f.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${i.color}`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(i.name)+" : ",1),f.createElementVNode("b",null,f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.getDonutLegendValue(i.absoluteValue))+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1),f.createElementVNode("span",null,"("+f.toDisplayString((i.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):f.createCommentVNode("",!0)],512)],4)):f.createCommentVNode("",!0)],4)}const TM=Ru(aP,[["render",_M],["__scopeId","data-v-80d709a0"]]),uZ="",UM=t=>(f.pushScopeId("data-v-2d188518"),t=t(),f.popScopeId(),t),NM=["id"],IM={class:"vue-ui-donut-user-option-item"},LM=["id","name"],kM=["for"],QM={class:"vue-ui-donut-user-option-item"},OM=["id","name"],DM=["for"],PM={class:"vue-ui-donut-user-option-item"},MM=["id","name"],RM=["for"],HM=["disabled"],VM={key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},KM=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-2d188518></path><path d="M18 16v.01" data-v-2d188518></path><path d="M6 16v.01" data-v-2d188518></path><path d="M12 5v.01" data-v-2d188518></path><path d="M12 12v.01" data-v-2d188518></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-2d188518></path>',6)],GM={key:1},jM=["viewBox"],zM=["id"],WM=["stop-color"],XM=["stop-color"],$M=["stop-color"],qM={key:0},YM=["font-size","fill","x"],JM=["font-size","fill","x","y"],ZM=["d","stroke","stroke-width"],eR=["cx","cy","fill"],tR=["d","stroke","stroke-width","onMouseenter","onClick"],rR=["cx","cy","r","fill"],AR=["x","y","fill","font-size"],nR=["x","y","fill","font-size"],aR=["x","y","fill","font-size"],iR=["x","y","fill","font-size"],sR=["x","y","fill","font-size"],oR=["x","y","fill","font-size"],lR=["y"],cR=["onClick"],fR=["onClick"],uR={key:0},hR=["innerHTML"],dR={key:0},gR={key:0},pR=[UM(()=>f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],mR={style:{"max-width":"200px margin:0 auto"}},vR=Ru({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=f.ref(`vue-ui-donut-${Math.random()}`),A=f.ref({style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),n=f.ref(!1),a=f.ref(null),i=f.ref(null),s=f.ref(null),o=f.ref({x:0,y:0}),l=f.ref(!1),c=f.ref(""),d=f.ref(null);f.onMounted(()=>{document.addEventListener("mousemove",g)}),f.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(se){o.value.x=se.clientX,o.value.y=se.clientY}const h=f.computed(()=>{let se=0,J=48;if(i.value&&a.value){const{width:oe,height:B}=i.value.getBoundingClientRect(),_=a.value.getBoundingClientRect();o.value.x+oe/2>_.right?se=-oe:o.value.x-oe/2<_.left?se=0:se=-oe/2,o.value.y+B>_.bottom&&(J=-B-48)}return{top:o.value.y+J,left:o.value.x+se}}),p=f.computed(()=>Object.keys(e.config||{}).length?tc({defaultConfig:A.value,userConfig:e.config}):A.value),v=f.ref({dataLabels:{show:p.value.style.chart.layout.labels.dataLabels.show},inside:p.value.style.chart.layout.useDiv,showTable:p.value.table.show}),y=f.computed(()=>({height:v.value.inside||n.value?512:360,width:512})),C=f.ref([]);function b(se){C.value.includes(se)?C.value=C.value.filter(J=>J!==se):C.value.push(se)}const F=f.computed(()=>e.dataset.map((se,J)=>({name:se.name,color:se.color||ZA[J]||ZA[J%ZA.length],value:se.values.reduce((oe,B)=>oe+B,0),absoluteValues:se.values})).sort((se,J)=>J.value-se.value).filter((se,J)=>!C.value.includes(J))),O=f.computed(()=>e.dataset.map((se,J)=>({name:se.name,color:se.color||ZA[J]||ZA[J%ZA.length],value:se.values.reduce((oe,B)=>oe+B,0)})).sort((se,J)=>J.value-se.value)),W=f.computed(()=>zy({series:F.value},y.value.width/2,y.value.height/2,100,100));function X(se){return se.center.endX+k(se,256)}function k(se,J){return se.center.endX-J>=0?30:-30}function Q(se){return se.proportion*100>p.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(se,J){return isNaN(se.value/re(J))?0:(se.value/re(J)*100).toFixed(0)+"%"}function re(se){return[...se].map(J=>J.value).reduce((J,oe)=>J+oe,0)}const U=f.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),T=f.computed(()=>F.value.map(se=>se.value).reduce((se,J)=>se+J,0)),H=f.computed(()=>T.value/F.value.length);function Y(){s.value&&s.value.removeAttribute("open")}function le(se,J,oe=!0){l.value=oe,d.value=J;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${se.name}</div>`,B+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${se.color};font-size:${p.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,p.value.style.chart.tooltip.showValue&&(B+=`<b>${se.value.toFixed(p.value.style.chart.tooltip.roundingValue)}</b>`),p.value.style.chart.tooltip.showPercentage&&(p.value.style.chart.tooltip.showValue?B+=`<span>(${(se.proportion*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:B+=`<b>${(se.proportion*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),c.value=`<div>${B}</div>`}function pe(){n.value=!0,jd({domElement:document.getElementById(`donut__${r.value}`),fileName:p.value.style.chart.title.text||"vue-ui-donut"}).finally(()=>{n.value=!1})}const me=f.computed(()=>{const se=F.value.map(oe=>({name:oe.name,color:oe.color})),J=F.value.map(oe=>oe.value);return{head:se,body:J}});function ve(){f.nextTick(()=>{const se=me.value.head.map((ie,ce)=>[[ie.name],[me.value.body[ce]],[isNaN(me.value.body[ce]/T.value)?"-":me.value.body[ce]/T.value*100]]),J=[[p.value.style.chart.title.text],[p.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(se);function oe(ie){let ce=new ArrayBuffer(ie.length),fe=new Uint8Array(ce);for(let xe=0;xe<ie.length;xe++)fe[xe]=ie.charCodeAt(xe)&255;return ce}const B=Tn.book_new(),_=Tn.aoa_to_sheet(J);Tn.book_append_sheet(B,_,"Sheet1");const S=Zl(B,{bookType:"xlsx",type:"binary"}),N=new Blob([oe(S)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),G=document.createElement("a");G.href=window.URL.createObjectURL(N),G.download=`${p.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-donut"}.xlsx`,G.click(),window.URL.revokeObjectURL(G.href)})}return(se,J)=>(f.openBlock(),f.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:f.normalizeStyle(`font-family:${p.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${r.value}`},[(!v.value.inside||n.value)&&p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;background:${p.value.style.chart.backgroundColor}`)},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.color};font-size:${p.value.style.chart.title.fontSize}px;font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),5),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.subtitle.color};font-size:${p.value.style.chart.title.subtitle.fontSize}px;font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)):f.createCommentVNode("",!0),p.value.userOptions.show?(f.openBlock(),f.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[f.createElementVNode("summary",{style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},f.toDisplayString(p.value.userOptions.title),5),f.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},[f.createElementVNode("div",IM,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${r.value}`,name:`vue-ui-donut-option-datalabels_${r.value}`,"onUpdate:modelValue":J[0]||(J[0]=oe=>v.value.dataLabels.show=oe)},null,8,LM),[[f.vModelCheckbox,v.value.dataLabels.show]]),f.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${r.value}`},f.toDisplayString(p.value.userOptions.labels.dataLabels),9,kM)]),f.createElementVNode("div",QM,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${r.value}`,name:`vue-ui-donut-option-title_${r.value}`,"onUpdate:modelValue":J[1]||(J[1]=oe=>v.value.inside=oe)},null,8,OM),[[f.vModelCheckbox,v.value.inside]]),f.createElementVNode("label",{for:`vue-ui-donut-option-title_${r.value}`},f.toDisplayString(p.value.userOptions.labels.useDiv),9,DM)]),f.createElementVNode("div",PM,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${r.value}`,name:`vue-ui-donut-option-table_${r.value}`,"onUpdate:modelValue":J[2]||(J[2]=oe=>v.value.showTable=oe)},null,8,MM),[[f.vModelCheckbox,v.value.showTable]]),f.createElementVNode("label",{for:`vue-ui-donut-option-table_${r.value}`},f.toDisplayString(p.value.userOptions.labels.showTable),9,RM)]),f.createElementVNode("button",{class:"vue-ui-donut-button",onClick:pe,disabled:n.value,style:f.normalizeStyle([{"margin-top":"12px"},`color:${p.value.style.chart.color}`])},[n.value?(f.openBlock(),f.createElementBlock("svg",VM,KM)):(f.openBlock(),f.createElementBlock("span",GM,"PDF"))],12,HM),f.createElementVNode("button",{class:"vue-ui-donut-button",onClick:ve,style:f.normalizeStyle(`color:${p.value.style.chart.color}`)}," XLSX ",4)],4)],4)):f.createCommentVNode("",!0),(f.openBlock(),f.createElementBlock("svg",{viewBox:`0 0 ${y.value.width} ${y.value.height}`,style:f.normalizeStyle(`max-width:100%; overflow: visible; background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),onClick:Y},[f.createElementVNode("defs",null,[p.value.style.chart.useGradient?(f.openBlock(),f.createElementBlock("radialGradient",{key:0,id:`gradient_${r.value}`},[f.createElementVNode("stop",{offset:"0%","stop-color":`${f.unref(qy)(p.value.style.chart.backgroundColor)}00`},null,8,WM),f.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+U.value[p.value.style.chart.gradientIntensity]},null,8,XM),f.createElementVNode("stop",{offset:"100%","stop-color":`${f.unref(qy)(p.value.style.chart.backgroundColor)}00`},null,8,$M)],8,zM)):f.createCommentVNode("",!0)]),p.value.style.chart.title.text&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("g",qM,[f.createElementVNode("text",{"font-size":p.value.style.chart.title.fontSize,fill:p.value.style.chart.title.color,x:y.value.width/2,y:48,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),13,YM),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("text",{key:0,"font-size":p.value.style.chart.title.subtitle.fontSize,fill:p.value.style.chart.title.subtitle.color,x:y.value.width/2,y:48+p.value.style.chart.title.fontSize,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),13,JM)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W.value,(oe,B)=>(f.openBlock(),f.createElementBlock("path",{d:oe.path,stroke:`${oe.color}CC`,"stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,ZM))),256)),p.value.style.chart.useGradient?(f.openBlock(),f.createElementBlock("circle",{key:1,cx:y.value.width/2,cy:y.value.height/2,r:136,fill:`url(#gradient_${r.value})`},null,8,eR)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W.value,(oe,B)=>(f.openBlock(),f.createElementBlock("path",{d:oe.path,stroke:d.value===B?"rgba(0,0,0,0.1)":"transparent","stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:_=>le(oe,B,!0),onMouseleave:J[3]||(J[3]=_=>{l.value=!1,d.value=null}),onClick:_=>b(B)},null,40,tR))),256)),f.createElementVNode("circle",{cx:y.value.width/2,cy:y.value.height/2,r:y.value.width-400-p.value.style.chart.layout.donut.strokeWidth/2,fill:p.value.style.chart.backgroundColor},null,8,rR),p.value.style.chart.layout.labels.hollow.total.show?(f.openBlock(),f.createElementBlock("text",{key:2,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2-(p.value.style.chart.layout.labels.hollow.average.show?p.value.style.chart.layout.labels.hollow.total.fontSize:0)+p.value.style.chart.layout.labels.hollow.total.offsetY,fill:p.value.style.chart.layout.labels.hollow.total.color,"font-size":p.value.style.chart.layout.labels.hollow.total.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.total.text),13,AR)):f.createCommentVNode("",!0),p.value.style.chart.layout.labels.hollow.total.show?(f.openBlock(),f.createElementBlock("text",{key:3,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2+p.value.style.chart.layout.labels.hollow.total.fontSize-(p.value.style.chart.layout.labels.hollow.average.show?p.value.style.chart.layout.labels.hollow.total.fontSize:0)+p.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:p.value.style.chart.layout.labels.hollow.total.value.color,"font-size":p.value.style.chart.layout.labels.hollow.total.value.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+f.toDisplayString(T.value.toFixed(p.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+f.toDisplayString(p.value.style.chart.layout.labels.hollow.total.value.suffix),13,nR)):f.createCommentVNode("",!0),p.value.style.chart.layout.labels.hollow.average.show?(f.openBlock(),f.createElementBlock("text",{key:4,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2+(p.value.style.chart.layout.labels.hollow.total.show?p.value.style.chart.layout.labels.hollow.average.fontSize:0)+p.value.style.chart.layout.labels.hollow.average.offsetY,fill:p.value.style.chart.layout.labels.hollow.average.color,"font-size":p.value.style.chart.layout.labels.hollow.average.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.average.text),13,aR)):f.createCommentVNode("",!0),p.value.style.chart.layout.labels.hollow.average.show?(f.openBlock(),f.createElementBlock("text",{key:5,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2+(p.value.style.chart.layout.labels.hollow.total.show?p.value.style.chart.layout.labels.hollow.average.fontSize:0)+p.value.style.chart.layout.labels.hollow.average.fontSize+p.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:p.value.style.chart.layout.labels.hollow.average.value.color,"font-size":p.value.style.chart.layout.labels.hollow.average.value.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+f.toDisplayString(isNaN(H.value.toFixed(p.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":H.value.toFixed(p.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+f.toDisplayString(p.value.style.chart.layout.labels.hollow.average.value.suffix),13,iR)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W.value,(oe,B)=>(f.openBlock(),f.createElementBlock("g",null,[Q(oe)&&v.value.dataLabels.show?(f.openBlock(),f.createElementBlock("text",{key:0,"text-anchor":"middle",x:X(oe),y:oe.center.endY-p.value.style.chart.layout.labels.percentage.fontSize/2,fill:p.value.style.chart.layout.labels.percentage.color,"font-size":p.value.style.chart.layout.labels.percentage.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},f.toDisplayString(K(oe,W.value)),13,sR)):f.createCommentVNode("",!0),Q(oe)&&v.value.dataLabels.show?(f.openBlock(),f.createElementBlock("text",{key:1,"text-anchor":"middle",x:X(oe),y:oe.center.endY+p.value.style.chart.layout.labels.percentage.fontSize/2,fill:p.value.style.chart.layout.labels.name.color,"font-size":p.value.style.chart.layout.labels.name.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.name.bold?"bold":""}`)},f.toDisplayString(oe.name),13,oR)):f.createCommentVNode("",!0)]))),256)),p.value.style.chart.legend.show&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("foreignObject",{key:6,x:0,y:y.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[f.createElementVNode("div",{class:"vue-ui-donut-legend",style:f.normalizeStyle(`background:transparent;color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.value,(oe,B)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(B),style:f.normalizeStyle(`opacity:${C.value.includes(B)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${oe.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(oe.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(oe.value),1),f.createElementVNode("span",null,"("+f.toDisplayString(isNaN(oe.value/T.value)?"-":(oe.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1)],12,cR))),256))],4)],8,lR)):f.createCommentVNode("",!0)],12,jM)),p.value.style.chart.legend.show&&(!v.value.inside||n.value)?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:f.normalizeStyle(`background:${p.value.style.chart.legend.backgroundColor};color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`),onClick:Y},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.value,(oe,B)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(B),style:f.normalizeStyle(`opacity:${C.value.includes(B)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${oe.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(oe.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(oe.value.toFixed(p.value.style.chart.legend.roundingValue)),1),C.value.includes(B)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",uR,"("+f.toDisplayString(isNaN(oe.value/T.value)?"-":(oe.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1))],12,fR))),256))],4)):f.createCommentVNode("",!0),p.value.style.chart.tooltip.show&&l.value?(f.openBlock(),f.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:i,style:f.normalizeStyle(`top:${h.value.top}px;left:${h.value.left}px;background:${p.value.style.chart.tooltip.backgroundColor};color:${p.value.style.chart.tooltip.color}`),innerHTML:c.value},null,12,hR)):f.createCommentVNode("",!0),v.value.showTable?(f.openBlock(),f.createElementBlock("div",{key:4,onClick:Y,class:"vue-ui-donut-table",style:f.normalizeStyle(`width:100%;margin-top:${v.value.inside?"48px":""}`)},[f.createElementVNode("table",null,[f.createElementVNode("thead",null,[p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("tr",dR,[f.createElementVNode("th",{colspan:"3",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline}`)},[f.createElementVNode("span",null,f.toDisplayString(p.value.style.chart.title.text),1),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("span",gR," : "+f.toDisplayString(p.value.style.chart.title.subtitle.text),1)):f.createCommentVNode("",!0)],4)])):f.createCommentVNode("",!0),f.createElementVNode("tr",null,[f.createElementVNode("th",{align:"right",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};padding-right:6px`)},pR,4),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)},f.toDisplayString(T.value.toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),f.createElementVNode("tbody",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(me.value.head,(oe,B)=>(f.openBlock(),f.createElementBlock("tr",null,[f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},[f.createElementVNode("div",mR,[f.createElementVNode("span",{style:f.normalizeStyle(`color:${oe.color};margin-right:6px;`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(oe.name),1)])],4),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(me.value.body[B].toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(isNaN(me.value.body[B]/T.value)?"-":(me.value.body[B]/T.value*100).toFixed(p.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):f.createCommentVNode("",!0)],12,NM))}},[["__scopeId","data-v-2d188518"]]),pZ="",wR=t=>(f.pushScopeId("data-v-e5331d10"),t=t(),f.popScopeId(),t),BR=["id"],yR={class:"vue-ui-waffle-user-option-item"},xR=["id","name"],CR=["for"],bR={class:"vue-ui-waffle-user-option-item"},ER=["id","name"],FR=["for"],SR=["disabled"],_R={key:0,class:"vue-ui-waffle-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},TR=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-e5331d10></path><path d="M18 16v.01" data-v-e5331d10></path><path d="M6 16v.01" data-v-e5331d10></path><path d="M12 5v.01" data-v-e5331d10></path><path d="M12 12v.01" data-v-e5331d10></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-e5331d10></path>',6)],UR={key:1},NR=["viewBox"],IR=["id"],LR=["stop-color"],kR=["stop-color"],QR={key:0},OR=["font-size","fill","x","y"],DR=["font-size","fill","x","y"],PR=["onMouseover","rx","x","y","height","width","fill","stroke","stroke-width"],MR={key:1,x:0,y:512+64,width:"100%",height:"100",style:{overflow:"visible"}},RR=["onClick"],HR={key:0},VR=["onClick"],KR={key:0},GR=["innerHTML"],jR={key:0},zR={key:0},WR=[wR(()=>f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],XR={style:{"max-width":"200px margin:0 auto"}},$R=Ru({__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=f.ref(`vue-ui-waffle-${Math.random()}`),A=f.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grid:{size:20,spaceBetween:2,vertical:!1},rect:{rounded:!0,rounding:2,stroke:"#2D353C",strokeWidth:1,useGradient:!0,gradientIntensity:40},useDiv:!0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),n=f.ref(!1),a=f.ref(null),i=f.ref(null),s=f.ref(null),o=f.ref({x:0,y:0}),l=f.ref(!1),c=f.ref(""),d=f.ref(null),g=f.computed(()=>{let J=0,oe=48;if(i.value&&a.value){const{width:B,height:_}=i.value.getBoundingClientRect(),S=a.value.getBoundingClientRect();o.value.x+B/2>S.right?J=-B:o.value.x-B/2<S.left?J=0:J=-B/2,o.value.y+_>S.bottom&&(oe=-_-48)}return{top:o.value.y+oe,left:o.value.x+J}});f.onMounted(()=>{document.addEventListener("mousemove",h)}),f.onBeforeUnmount(()=>{document.removeEventListener("mousemove",h)});function h(J){o.value.x=J.clientX,o.value.y=J.clientY}const p=f.computed(()=>Object.keys(e.config||{}).length?tc({defaultConfig:A.value,userConfig:e.config}):A.value),v=f.ref({inside:!p.value.style.chart.layout.useDiv}),y=f.computed(()=>({height:v.value.inside?704:512,width:512})),C=f.computed(()=>({top:v.value.inside?64:0,left:0,height:512,width:512})),b=f.computed(()=>(C.value.width-p.value.style.chart.layout.grid.size*p.value.style.chart.layout.grid.spaceBetween)/p.value.style.chart.layout.grid.size);function F(J){const oe=J.reduce((S,N)=>S+N,0),B=J.map(S=>Math.round(S/oe*100)/100),_=B.reduce((S,N)=>S+N,0);if(_!==1){const S=B.length-1;B[S]+=1-_,B[S]=Math.round(B[S]*100)/100}return B}const O=f.computed(()=>e.dataset.map((J,oe)=>({...J,color:J.color||ZA[oe]||ZA[oe%ZA.length],uid:`serie_${oe}`}))),W=f.computed(()=>{const J=O.value.filter((oe,B)=>!le.value.includes(oe.uid)).map((oe,B)=>oe.values.reduce((_,S)=>_+S));return F(J)}),X=f.computed(()=>O.value.filter((J,oe)=>!le.value.includes(J.uid)).map((J,oe)=>({uid:J.uid,name:J.name,color:J.color,value:J.values.reduce((B,_)=>B+_,0),absoluteValues:J.values,proportion:W.value[oe]*Math.pow(p.value.style.chart.layout.grid.size,2)})).sort((J,oe)=>oe.value-J.value)),k=f.computed(()=>X.value.map((J,oe)=>{const B=oe>0?X.value.filter((N,G)=>G<oe).map(N=>N.proportion).reduce((N,G)=>N+G)+J.proportion-X.value[oe-1].proportion:J.proportion-J.proportion,_=B+J.proportion,S=[];for(let N=B;N<=_;N+=1)S.push(N);return{...J,start:oe>0?X.value.filter((N,G)=>G<oe).map(N=>N.proportion).reduce((N,G)=>N+G)+J.proportion-X.value[oe-1].proportion:J.proportion-J.proportion,rects:S}})),Q=f.computed(()=>k.value.flatMap((J,oe)=>J.rects.map((B,_)=>({name:J.name,color:J.color,value:J.value,serieIndex:oe,...J})))),K=f.computed(()=>{const J=[];for(let oe=0;oe<p.value.style.chart.layout.grid.size;oe+=1)for(let B=0;B<p.value.style.chart.layout.grid.size;B+=1)J.push({x:(p.value.style.chart.layout.grid.vertical?oe:B)*(b.value+p.value.style.chart.layout.grid.spaceBetween),y:(p.value.style.chart.layout.grid.vertical?B:oe)*(b.value+p.value.style.chart.layout.grid.spaceBetween)+C.value.top});return J}),re=f.computed(()=>O.value.map((J,oe)=>({name:J.name,color:J.color||ZA[oe]||ZA[oe%ZA.length],value:J.values.reduce((B,_)=>B+_,0),uid:J.uid})).sort((J,oe)=>oe.value-J.value)),U=f.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),T=f.computed(()=>X.value.map(J=>J.value).reduce((J,oe)=>J+oe,0));f.computed(()=>T.value/X.value.length);function H(){s.value&&s.value.removeAttribute("open")}function Y(J){if(le.value.length===e.dataset.length)return;const oe=Q.value[J];l.value=!0,d.value=Q.value[J].serieIndex;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${oe.name}</div>`,B+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${oe.color};font-size:${p.value.style.chart.tooltip.fontSize*1.6}px;">◼</span>`,p.value.style.chart.tooltip.showValue&&(B+=`<b>${oe.value.toFixed(p.value.style.chart.tooltip.roundingValue)}</b>`),p.value.style.chart.tooltip.showPercentage&&(p.value.style.chart.tooltip.showValue?B+=`<span>(${(oe.value/T.value*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:B+=`<b>${(oe.value/T.value*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),c.value=B}const le=f.ref([]);function pe(J){le.value.includes(J)?le.value=le.value.filter(oe=>oe!==J):le.value.push(J)}const me=f.computed(()=>{const J=X.value.map(B=>({name:B.name,color:B.color})),oe=X.value.map(B=>B.value);return{head:J,body:oe}});function ve(){n.value=!0,jd({domElement:document.getElementById(`vue-ui-waffle_${r.value}`),fileName:p.value.style.chart.title.text||"vue-ui-waffle"}).finally(()=>{n.value=!1})}function se(){f.nextTick(()=>{const J=me.value.head.map((ce,fe)=>[[ce.name],[me.value.body[fe]],[isNaN(me.value.body[fe]/T.value)?"-":me.value.body[fe]/T.value*100]]),oe=[[p.value.style.chart.title.text],[p.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(J);function B(ce){let fe=new ArrayBuffer(ce.length),xe=new Uint8Array(fe);for(let Ie=0;Ie<ce.length;Ie++)xe[Ie]=ce.charCodeAt(Ie)&255;return fe}const _=Tn.book_new(),S=Tn.aoa_to_sheet(oe);Tn.book_append_sheet(_,S,"Sheet1");const N=Zl(_,{bookType:"xlsx",type:"binary"}),G=new Blob([B(N)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),ie=document.createElement("a");ie.href=window.URL.createObjectURL(G),ie.download=`${p.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-waffle"}.xlsx`,ie.click(),window.URL.revokeObjectURL(ie.href)})}return(J,oe)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-waffle",ref_key:"waffleChart",ref:a,id:`vue-ui-waffle_${r.value}`,style:f.normalizeStyle(`font-family:${p.value.style.fontFamily};width:100%; text-align:center`)},[(!v.value.inside||n.value)&&p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;background:${p.value.style.chart.backgroundColor};padding-bottom:12px`)},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.color};font-size:${p.value.style.chart.title.fontSize}px;font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),5),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.subtitle.color};font-size:${p.value.style.chart.title.subtitle.fontSize}px;font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)):f.createCommentVNode("",!0),p.value.userOptions.show?(f.openBlock(),f.createElementBlock("details",{key:1,class:"vue-ui-waffle-user-options",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[f.createElementVNode("summary",{style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},f.toDisplayString(p.value.userOptions.title),5),f.createElementVNode("div",{class:"vue-ui-waffle-user-options-items",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},[f.createElementVNode("div",yR,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-title_${r.value}`,name:`vue-ui-waffle-option-title_${r.value}`,"onUpdate:modelValue":oe[0]||(oe[0]=B=>v.value.inside=B)},null,8,xR),[[f.vModelCheckbox,v.value.inside]]),f.createElementVNode("label",{for:`vue-ui-waffle-option-title_${r.value}`},f.toDisplayString(p.value.userOptions.labels.useDiv),9,CR)]),f.createElementVNode("div",bR,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-table_${r.value}`,name:`vue-ui-waffle-option-table_${r.value}`,"onUpdate:modelValue":oe[1]||(oe[1]=B=>v.value.showTable=B)},null,8,ER),[[f.vModelCheckbox,v.value.showTable]]),f.createElementVNode("label",{for:`vue-ui-waffle-option-table_${r.value}`},f.toDisplayString(p.value.userOptions.labels.showTable),9,FR)]),f.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:ve,disabled:n.value,style:f.normalizeStyle([{"margin-top":"12px"},`color:${p.value.style.chart.color}`])},[n.value?(f.openBlock(),f.createElementBlock("svg",_R,TR)):(f.openBlock(),f.createElementBlock("span",UR,"PDF"))],12,SR),f.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:se,style:f.normalizeStyle(`color:${p.value.style.chart.color}`)}," XLSX ",4)],4)],4)):f.createCommentVNode("",!0),(f.openBlock(),f.createElementBlock("svg",{viewBox:`0 0 ${y.value.width} ${y.value.height}`,style:f.normalizeStyle(`max-width:100%;overflow:visible;background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),onClick:H},[f.createElementVNode("defs",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(Q.value,(B,_)=>(f.openBlock(),f.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${r.value}_${_}`},[f.createElementVNode("stop",{offset:"0%","stop-color":`${f.unref(Yy)(B.color,.05)}${U.value[100-p.value.style.chart.layout.rect.gradientIntensity]}`},null,8,LR),f.createElementVNode("stop",{offset:"100%","stop-color":B.color},null,8,kR)],8,IR))),256))]),p.value.style.chart.title.text&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("g",QR,[f.createElementVNode("text",{"font-size":p.value.style.chart.title.fontSize,fill:p.value.style.chart.title.color,x:y.value.width/2,y:p.value.style.chart.title.fontSize,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),13,OR),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("text",{key:0,"font-size":p.value.style.chart.title.subtitle.fontSize,fill:p.value.style.chart.title.subtitle.color,x:y.value.width/2,y:p.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),13,DR)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(K.value,(B,_)=>(f.openBlock(),f.createElementBlock("rect",{onMouseover:S=>Y(_),onMouseleave:oe[2]||(oe[2]=S=>{l.value=!1,d.value=null}),rx:p.value.style.chart.layout.rect.rounded?p.value.style.chart.layout.rect.rounding:0,x:B.x,y:B.y,height:b.value,width:b.value,fill:`url(#gradient_${r.value}_${_})`,stroke:p.value.style.chart.layout.rect.stroke,"stroke-width":p.value.style.chart.layout.rect.strokeWidth},null,40,PR))),256)),p.value.style.chart.legend.show&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("foreignObject",MR,[f.createElementVNode("div",{class:"vue-ui-waffle-legend",style:f.normalizeStyle(`background:${p.value.style.chart.legend.backgroundColor};color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`),onClick:H},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(re.value,(B,_)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:S=>pe(B.uid),style:f.normalizeStyle(`opacity:${le.value.includes(B.uid)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${B.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),f.createElementVNode("span",null,f.toDisplayString(B.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(B.value.toFixed(p.value.style.chart.legend.roundingValue)),1),le.value.includes(B.uid)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",HR,"("+f.toDisplayString(isNaN(B.value/T.value)?"-":(B.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1))],12,RR))),256))],4)])):f.createCommentVNode("",!0)],12,NR)),p.value.style.chart.legend.show&&(!v.value.inside||n.value)?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-waffle-legend",style:f.normalizeStyle(`background:${p.value.style.chart.legend.backgroundColor};color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`),onClick:H},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(re.value,(B,_)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:S=>pe(B.uid),style:f.normalizeStyle(`opacity:${le.value.includes(B.uid)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${B.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),f.createElementVNode("span",null,f.toDisplayString(B.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(B.value.toFixed(p.value.style.chart.legend.roundingValue)),1),le.value.includes(B.uid)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",KR,"("+f.toDisplayString(isNaN(B.value/T.value)?"-":(B.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1))],12,VR))),256))],4)):f.createCommentVNode("",!0),p.value.style.chart.tooltip.show&&l.value&&le.value.length<e.dataset.length?(f.openBlock(),f.createElementBlock("div",{key:3,class:"vue-ui-waffle-tooltip",ref_key:"tooltip",ref:i,style:f.normalizeStyle(`top:${g.value.top}px;left:${g.value.left}px;background:${p.value.style.chart.tooltip.backgroundColor};color:${p.value.style.chart.tooltip.color}`),innerHTML:c.value},null,12,GR)):f.createCommentVNode("",!0),v.value.showTable?(f.openBlock(),f.createElementBlock("div",{key:4,onClick:H,class:"vue-ui-waffle-table",style:f.normalizeStyle(`width:100%;margin-top:${v.value.inside?"48px":""}`)},[f.createElementVNode("table",null,[f.createElementVNode("thead",null,[p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("tr",jR,[f.createElementVNode("th",{colspan:"3",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline}`)},[f.createElementVNode("span",null,f.toDisplayString(p.value.style.chart.title.text),1),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("span",zR," : "+f.toDisplayString(p.value.style.chart.title.subtitle.text),1)):f.createCommentVNode("",!0)],4)])):f.createCommentVNode("",!0),f.createElementVNode("tr",null,[f.createElementVNode("th",{align:"right",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};padding-right:6px`)},WR,4),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)},f.toDisplayString(T.value.toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),f.createElementVNode("tbody",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(me.value.head,(B,_)=>(f.openBlock(),f.createElementBlock("tr",null,[f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},[f.createElementVNode("div",XR,[f.createElementVNode("span",{style:f.normalizeStyle(`color:${B.color};margin-right:6px;`)},"◼",4),f.createElementVNode("span",null,f.toDisplayString(B.name),1)])],4),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(me.value.body[_].toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(isNaN(me.value.body[_]/T.value)?"-":(me.value.body[_]/T.value*100).toFixed(p.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):f.createCommentVNode("",!0)],12,BR))}},[["__scopeId","data-v-e5331d10"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Ni(t){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ni(t)}function E1(t,e){return E1=Object.setPrototypeOf||function(A,n){return A.__proto__=n,A},E1(t,e)}function qR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hu(t,e,r){return qR()?Hu=Reflect.construct:Hu=function(n,a,i){var s=[null];s.push.apply(s,a);var o=Function.bind.apply(n,s),l=new o;return i&&E1(l,i.prototype),l},Hu.apply(null,arguments)}function $n(t){return YR(t)||JR(t)||ZR(t)||eH()}function YR(t){if(Array.isArray(t))return F1(t)}function JR(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ZR(t,e){if(t){if(typeof t=="string")return F1(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F1(t,e)}}function F1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,A=new Array(e);r<e;r++)A[r]=t[r];return A}function eH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
374
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tH=Object.hasOwnProperty,Jy=Object.setPrototypeOf,rH=Object.isFrozen,AH=Object.getPrototypeOf,nH=Object.getOwnPropertyDescriptor,KA=Object.freeze,qn=Object.seal,aH=Object.create,Zy=typeof Reflect<"u"&&Reflect,Vu=Zy.apply,S1=Zy.construct;Vu||(Vu=function(e,r,A){return e.apply(r,A)}),KA||(KA=function(e){return e}),qn||(qn=function(e){return e}),S1||(S1=function(e,r){return Hu(e,$n(r))});var iH=Un(Array.prototype.forEach),ex=Un(Array.prototype.pop),rc=Un(Array.prototype.push),Ku=Un(String.prototype.toLowerCase),_1=Un(String.prototype.toString),sH=Un(String.prototype.match),Yn=Un(String.prototype.replace),oH=Un(String.prototype.indexOf),lH=Un(String.prototype.trim),GA=Un(RegExp.prototype.test),T1=cH(TypeError);function Un(t){return function(e){for(var r=arguments.length,A=new Array(r>1?r-1:0),n=1;n<r;n++)A[n-1]=arguments[n];return Vu(t,e,A)}}function cH(t){return function(){for(var e=arguments.length,r=new Array(e),A=0;A<e;A++)r[A]=arguments[A];return S1(t,r)}}function Ot(t,e,r){var A;r=(A=r)!==null&&A!==void 0?A:Ku,Jy&&Jy(t,null);for(var n=e.length;n--;){var a=e[n];if(typeof a=="string"){var i=r(a);i!==a&&(rH(e)||(e[n]=i),a=i)}t[a]=!0}return t}function vs(t){var e=aH(null),r;for(r in t)Vu(tH,t,[r])===!0&&(e[r]=t[r]);return e}function Gu(t,e){for(;t!==null;){var r=nH(t,e);if(r){if(r.get)return Un(r.get);if(typeof r.value=="function")return Un(r.value)}t=AH(t)}function A(n){return console.warn("fallback value for",n),null}return A}var tx=KA(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),U1=KA(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N1=KA(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fH=KA(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I1=KA(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),uH=KA(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rx=KA(["#text"]),Ax=KA(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L1=KA(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nx=KA(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ju=KA(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hH=qn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dH=qn(/<%[\w\W]*|[\w\W]*%>/gm),gH=qn(/\${[\w\W]*}/gm),pH=qn(/^data-[\-\w.\u00B7-\uFFFF]/),mH=qn(/^aria-[\-\w]+$/),vH=qn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wH=qn(/^(?:\w+script|data):/i),BH=qn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yH=qn(/^html$/i),xH=function(){return typeof window>"u"?null:window},CH=function(e,r){if(Ni(e)!=="object"||typeof e.createPolicy!="function")return null;var A=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(A=r.currentScript.getAttribute(n));var a="dompurify"+(A?"#"+A:"");try{return e.createPolicy(a,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function ax(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xH(),e=function(V){return ax(V)};if(e.version="2.4.7",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,A=t.document,n=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,s=t.Element,o=t.NodeFilter,l=t.NamedNodeMap,c=l===void 0?t.NamedNodeMap||t.MozNamedAttrMap:l,d=t.HTMLFormElement,g=t.DOMParser,h=t.trustedTypes,p=s.prototype,v=Gu(p,"cloneNode"),y=Gu(p,"nextSibling"),C=Gu(p,"childNodes"),b=Gu(p,"parentNode");if(typeof a=="function"){var F=A.createElement("template");F.content&&F.content.ownerDocument&&(A=F.content.ownerDocument)}var O=CH(h,r),W=O?O.createHTML(""):"",X=A,k=X.implementation,Q=X.createNodeIterator,K=X.createDocumentFragment,re=X.getElementsByTagName,U=r.importNode,T={};try{T=vs(A).documentMode?A.documentMode:{}}catch{}var H={};e.isSupported=typeof b=="function"&&k&&k.createHTMLDocument!==void 0&&T!==9;var Y=hH,le=dH,pe=gH,me=pH,ve=mH,se=wH,J=BH,oe=vH,B=null,_=Ot({},[].concat($n(tx),$n(U1),$n(N1),$n(I1),$n(rx))),S=null,N=Ot({},[].concat($n(Ax),$n(L1),$n(nx),$n(ju))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ce=null,fe=!0,xe=!0,Ie=!1,Me=!0,Xe=!1,$e=!1,Te=!1,ne=!1,Qe=!1,rt=!1,Re=!1,ze=!0,Ye=!1,Je="user-content-",st=!0,nt=!1,ht={},vt=null,_t=Ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ut=null,dt=Ot({},["audio","video","img","source","image","track"]),xt=null,tt=Ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nr="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",fr="http://www.w3.org/1999/xhtml",kt=fr,Kt=!1,$r=null,Pt=Ot({},[nr,Nt,fr],_1),br,$t=["application/xhtml+xml","text/html"],rA="text/html",Et,Gt=null,Ct=A.createElement("form"),Ht=function(V){return V instanceof RegExp||V instanceof Function},pn=function(V){Gt&&Gt===V||((!V||Ni(V)!=="object")&&(V={}),V=vs(V),br=$t.indexOf(V.PARSER_MEDIA_TYPE)===-1?br=rA:br=V.PARSER_MEDIA_TYPE,Et=br==="application/xhtml+xml"?_1:Ku,B="ALLOWED_TAGS"in V?Ot({},V.ALLOWED_TAGS,Et):_,S="ALLOWED_ATTR"in V?Ot({},V.ALLOWED_ATTR,Et):N,$r="ALLOWED_NAMESPACES"in V?Ot({},V.ALLOWED_NAMESPACES,_1):Pt,xt="ADD_URI_SAFE_ATTR"in V?Ot(vs(tt),V.ADD_URI_SAFE_ATTR,Et):tt,Ut="ADD_DATA_URI_TAGS"in V?Ot(vs(dt),V.ADD_DATA_URI_TAGS,Et):dt,vt="FORBID_CONTENTS"in V?Ot({},V.FORBID_CONTENTS,Et):_t,ie="FORBID_TAGS"in V?Ot({},V.FORBID_TAGS,Et):{},ce="FORBID_ATTR"in V?Ot({},V.FORBID_ATTR,Et):{},ht="USE_PROFILES"in V?V.USE_PROFILES:!1,fe=V.ALLOW_ARIA_ATTR!==!1,xe=V.ALLOW_DATA_ATTR!==!1,Ie=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xe=V.SAFE_FOR_TEMPLATES||!1,$e=V.WHOLE_DOCUMENT||!1,Qe=V.RETURN_DOM||!1,rt=V.RETURN_DOM_FRAGMENT||!1,Re=V.RETURN_TRUSTED_TYPE||!1,ne=V.FORCE_BODY||!1,ze=V.SANITIZE_DOM!==!1,Ye=V.SANITIZE_NAMED_PROPS||!1,st=V.KEEP_CONTENT!==!1,nt=V.IN_PLACE||!1,oe=V.ALLOWED_URI_REGEXP||oe,kt=V.NAMESPACE||fr,G=V.CUSTOM_ELEMENT_HANDLING||{},V.CUSTOM_ELEMENT_HANDLING&&Ht(V.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=V.CUSTOM_ELEMENT_HANDLING.tagNameCheck),V.CUSTOM_ELEMENT_HANDLING&&Ht(V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xe&&(xe=!1),rt&&(Qe=!0),ht&&(B=Ot({},$n(rx)),S=[],ht.html===!0&&(Ot(B,tx),Ot(S,Ax)),ht.svg===!0&&(Ot(B,U1),Ot(S,L1),Ot(S,ju)),ht.svgFilters===!0&&(Ot(B,N1),Ot(S,L1),Ot(S,ju)),ht.mathMl===!0&&(Ot(B,I1),Ot(S,nx),Ot(S,ju))),V.ADD_TAGS&&(B===_&&(B=vs(B)),Ot(B,V.ADD_TAGS,Et)),V.ADD_ATTR&&(S===N&&(S=vs(S)),Ot(S,V.ADD_ATTR,Et)),V.ADD_URI_SAFE_ATTR&&Ot(xt,V.ADD_URI_SAFE_ATTR,Et),V.FORBID_CONTENTS&&(vt===_t&&(vt=vs(vt)),Ot(vt,V.FORBID_CONTENTS,Et)),st&&(B["#text"]=!0),$e&&Ot(B,["html","head","body"]),B.table&&(Ot(B,["tbody"]),delete ie.tbody),KA&&KA(V),Gt=V)},Nr=Ot({},["mi","mo","mn","ms","mtext"]),zA=Ot({},["foreignobject","desc","title","annotation-xml"]),tn=Ot({},["title","style","font","a","script"]),gt=Ot({},U1);Ot(gt,N1),Ot(gt,fH);var xA=Ot({},I1);Ot(xA,uH);var kA=function(V){var we=b(V);(!we||!we.tagName)&&(we={namespaceURI:kt,tagName:"template"});var _e=Ku(V.tagName),Ke=Ku(we.tagName);return $r[V.namespaceURI]?V.namespaceURI===Nt?we.namespaceURI===fr?_e==="svg":we.namespaceURI===nr?_e==="svg"&&(Ke==="annotation-xml"||Nr[Ke]):!!gt[_e]:V.namespaceURI===nr?we.namespaceURI===fr?_e==="math":we.namespaceURI===Nt?_e==="math"&&zA[Ke]:!!xA[_e]:V.namespaceURI===fr?we.namespaceURI===Nt&&!zA[Ke]||we.namespaceURI===nr&&!Nr[Ke]?!1:!xA[_e]&&(tn[_e]||!gt[_e]):!!(br==="application/xhtml+xml"&&$r[V.namespaceURI]):!1},gr=function(V){rc(e.removed,{element:V});try{V.parentNode.removeChild(V)}catch{try{V.outerHTML=W}catch{V.remove()}}},Br=function(V,we){try{rc(e.removed,{attribute:we.getAttributeNode(V),from:we})}catch{rc(e.removed,{attribute:null,from:we})}if(we.removeAttribute(V),V==="is"&&!S[V])if(Qe||rt)try{gr(we)}catch{}else try{we.setAttribute(V,"")}catch{}},yr=function(V){var we,_e;if(ne)V="<remove></remove>"+V;else{var Ke=sH(V,/^[\r\n\t ]+/);_e=Ke&&Ke[0]}br==="application/xhtml+xml"&&kt===fr&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");var Ve=O?O.createHTML(V):V;if(kt===fr)try{we=new g().parseFromString(Ve,br)}catch{}if(!we||!we.documentElement){we=k.createDocument(kt,"template",null);try{we.documentElement.innerHTML=Kt?W:Ve}catch{}}var qe=we.body||we.documentElement;return V&&_e&&qe.insertBefore(A.createTextNode(_e),qe.childNodes[0]||null),kt===fr?re.call(we,$e?"html":"body")[0]:$e?we.documentElement:qe},D=function(V){return Q.call(V.ownerDocument||V,V,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT,null,!1)},te=function(V){return V instanceof d&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof c)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function")},z=function(V){return Ni(i)==="object"?V instanceof i:V&&Ni(V)==="object"&&typeof V.nodeType=="number"&&typeof V.nodeName=="string"},q=function(V,we,_e){H[V]&&iH(H[V],function(Ke){Ke.call(e,we,_e,Gt)})},ee=function(V){var we;if(q("beforeSanitizeElements",V,null),te(V)||GA(/[\u0080-\uFFFF]/,V.nodeName))return gr(V),!0;var _e=Et(V.nodeName);if(q("uponSanitizeElement",V,{tagName:_e,allowedTags:B}),V.hasChildNodes()&&!z(V.firstElementChild)&&(!z(V.content)||!z(V.content.firstElementChild))&&GA(/<[/\w]/g,V.innerHTML)&&GA(/<[/\w]/g,V.textContent)||_e==="select"&&GA(/<template/i,V.innerHTML))return gr(V),!0;if(!B[_e]||ie[_e]){if(!ie[_e]&&Ee(_e)&&(G.tagNameCheck instanceof RegExp&&GA(G.tagNameCheck,_e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(_e)))return!1;if(st&&!vt[_e]){var Ke=b(V)||V.parentNode,Ve=C(V)||V.childNodes;if(Ve&&Ke)for(var qe=Ve.length,ft=qe-1;ft>=0;--ft)Ke.insertBefore(v(Ve[ft],!0),y(V))}return gr(V),!0}return V instanceof s&&!kA(V)||(_e==="noscript"||_e==="noembed"||_e==="noframes")&&GA(/<\/no(script|embed|frames)/i,V.innerHTML)?(gr(V),!0):(Xe&&V.nodeType===3&&(we=V.textContent,we=Yn(we,Y," "),we=Yn(we,le," "),we=Yn(we,pe," "),V.textContent!==we&&(rc(e.removed,{element:V.cloneNode()}),V.textContent=we)),q("afterSanitizeElements",V,null),!1)},Ae=function(V,we,_e){if(ze&&(we==="id"||we==="name")&&(_e in A||_e in Ct))return!1;if(!(xe&&!ce[we]&&GA(me,we))){if(!(fe&&GA(ve,we))){if(!S[we]||ce[we]){if(!(Ee(V)&&(G.tagNameCheck instanceof RegExp&&GA(G.tagNameCheck,V)||G.tagNameCheck instanceof Function&&G.tagNameCheck(V))&&(G.attributeNameCheck instanceof RegExp&&GA(G.attributeNameCheck,we)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(we))||we==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&GA(G.tagNameCheck,_e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(_e))))return!1}else if(!xt[we]){if(!GA(oe,Yn(_e,J,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&V!=="script"&&oH(_e,"data:")===0&&Ut[V])){if(!(Ie&&!GA(se,Yn(_e,J,"")))){if(_e)return!1}}}}}}return!0},Ee=function(V){return V.indexOf("-")>0},Ue=function(V){var we,_e,Ke,Ve;q("beforeSanitizeAttributes",V,null);var qe=V.attributes;if(qe){var ft={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};for(Ve=qe.length;Ve--;){we=qe[Ve];var Vt=we,bt=Vt.name,Cr=Vt.namespaceURI;if(_e=bt==="value"?we.value:lH(we.value),Ke=Et(bt),ft.attrName=Ke,ft.attrValue=_e,ft.keepAttr=!0,ft.forceKeepAttr=void 0,q("uponSanitizeAttribute",V,ft),_e=ft.attrValue,!ft.forceKeepAttr&&(Br(bt,V),!!ft.keepAttr)){if(!Me&&GA(/\/>/i,_e)){Br(bt,V);continue}Xe&&(_e=Yn(_e,Y," "),_e=Yn(_e,le," "),_e=Yn(_e,pe," "));var rn=Et(V.nodeName);if(Ae(rn,Ke,_e)){if(Ye&&(Ke==="id"||Ke==="name")&&(Br(bt,V),_e=Je+_e),O&&Ni(h)==="object"&&typeof h.getAttributeType=="function"&&!Cr)switch(h.getAttributeType(rn,Ke)){case"TrustedHTML":{_e=O.createHTML(_e);break}case"TrustedScriptURL":{_e=O.createScriptURL(_e);break}}try{Cr?V.setAttributeNS(Cr,bt,_e):V.setAttribute(bt,_e),ex(e.removed)}catch{}}}}q("afterSanitizeAttributes",V,null)}},be=function ue(V){var we,_e=D(V);for(q("beforeSanitizeShadowDOM",V,null);we=_e.nextNode();)q("uponSanitizeShadowNode",we,null),!ee(we)&&(we.content instanceof n&&ue(we.content),Ue(we));q("afterSanitizeShadowDOM",V,null)};return e.sanitize=function(ue){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we,_e,Ke,Ve,qe;if(Kt=!ue,Kt&&(ue="<!-->"),typeof ue!="string"&&!z(ue))if(typeof ue.toString=="function"){if(ue=ue.toString(),typeof ue!="string")throw T1("dirty is not a string, aborting")}else throw T1("toString is not a function");if(!e.isSupported){if(Ni(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof ue=="string")return t.toStaticHTML(ue);if(z(ue))return t.toStaticHTML(ue.outerHTML)}return ue}if(Te||pn(V),e.removed=[],typeof ue=="string"&&(nt=!1),nt){if(ue.nodeName){var ft=Et(ue.nodeName);if(!B[ft]||ie[ft])throw T1("root node is forbidden and cannot be sanitized in-place")}}else if(ue instanceof i)we=yr("<!---->"),_e=we.ownerDocument.importNode(ue,!0),_e.nodeType===1&&_e.nodeName==="BODY"||_e.nodeName==="HTML"?we=_e:we.appendChild(_e);else{if(!Qe&&!Xe&&!$e&&ue.indexOf("<")===-1)return O&&Re?O.createHTML(ue):ue;if(we=yr(ue),!we)return Qe?null:Re?W:""}we&&ne&&gr(we.firstChild);for(var Vt=D(nt?ue:we);Ke=Vt.nextNode();)Ke.nodeType===3&&Ke===Ve||ee(Ke)||(Ke.content instanceof n&&be(Ke.content),Ue(Ke),Ve=Ke);if(Ve=null,nt)return ue;if(Qe){if(rt)for(qe=K.call(we.ownerDocument);we.firstChild;)qe.appendChild(we.firstChild);else qe=we;return(S.shadowroot||S.shadowrootmod)&&(qe=U.call(r,qe,!0)),qe}var bt=$e?we.outerHTML:we.innerHTML;return $e&&B["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&GA(yH,we.ownerDocument.doctype.name)&&(bt="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
|
|
375
|
-
`+bt),Xe&&(bt=Yn(bt,Y," "),bt=Yn(bt,le," "),bt=Yn(bt,pe," ")),O&&Re?O.createHTML(bt):bt},e.setConfig=function(ue){pn(ue),Te=!0},e.clearConfig=function(){Gt=null,Te=!1},e.isValidAttribute=function(ue,V,we){Gt||pn({});var _e=Et(ue),Ke=Et(V);return Ae(_e,Ke,we)},e.addHook=function(ue,V){typeof V=="function"&&(H[ue]=H[ue]||[],rc(H[ue],V))},e.removeHook=function(ue){if(H[ue])return ex(H[ue])},e.removeHooks=function(ue){H[ue]&&(H[ue]=[])},e.removeAllHooks=function(){H={}},e}var bH=ax();const EH=Object.freeze(Object.defineProperty({__proto__:null,default:bH},Symbol.toStringTag,{value:"Module"}));var Ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ix(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zu=function(t){return t&&t.Math==Math&&t},tA=zu(typeof globalThis=="object"&&globalThis)||zu(typeof window=="object"&&window)||zu(typeof self=="object"&&self)||zu(typeof Ac=="object"&&Ac)||function(){return this}()||Ac||Function("return this")(),Co={},Mr=function(t){try{return!!t()}catch{return!0}},FH=Mr,Ca=!FH(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),SH=Mr,Wu=!SH(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),_H=Wu,Xu=Function.prototype.call,yA=_H?Xu.bind(Xu):function(){return Xu.apply(Xu,arguments)},sx={},ox={}.propertyIsEnumerable,lx=Object.getOwnPropertyDescriptor,TH=lx&&!ox.call({1:2},1);sx.f=TH?function(e){var r=lx(this,e);return!!r&&r.enumerable}:ox;var $u=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},cx=Wu,fx=Function.prototype,k1=fx.call,UH=cx&&fx.bind.bind(k1,k1),Rr=cx?UH:function(t){return function(){return k1.apply(t,arguments)}},ux=Rr,NH=ux({}.toString),IH=ux("".slice),ws=function(t){return IH(NH(t),8,-1)},LH=Rr,kH=Mr,QH=ws,Q1=Object,OH=LH("".split),hx=kH(function(){return!Q1("z").propertyIsEnumerable(0)})?function(t){return QH(t)=="String"?OH(t,""):Q1(t)}:Q1,Bs=function(t){return t==null},DH=Bs,PH=TypeError,ba=function(t){if(DH(t))throw PH("Can't call method on "+t);return t},MH=hx,RH=ba,nc=function(t){return MH(RH(t))},O1=typeof document=="object"&&document.all,HH=typeof O1>"u"&&O1!==void 0,dx={all:O1,IS_HTMLDDA:HH},gx=dx,VH=gx.all,Tr=gx.IS_HTMLDDA?function(t){return typeof t=="function"||t===VH}:function(t){return typeof t=="function"},px=Tr,mx=dx,KH=mx.all,za=mx.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:px(t)||t===KH}:function(t){return typeof t=="object"?t!==null:px(t)},D1=tA,GH=Tr,jH=function(t){return GH(t)?t:void 0},ys=function(t,e){return arguments.length<2?jH(D1[t]):D1[t]&&D1[t][e]},zH=Rr,qu=zH({}.isPrototypeOf),Yu=typeof navigator<"u"&&String(navigator.userAgent)||"",vx=tA,P1=Yu,wx=vx.process,Bx=vx.Deno,yx=wx&&wx.versions||Bx&&Bx.version,xx=yx&&yx.v8,Jn,Ju;xx&&(Jn=xx.split("."),Ju=Jn[0]>0&&Jn[0]<4?1:+(Jn[0]+Jn[1])),!Ju&&P1&&(Jn=P1.match(/Edge\/(\d+)/),(!Jn||Jn[1]>=74)&&(Jn=P1.match(/Chrome\/(\d+)/),Jn&&(Ju=+Jn[1])));var M1=Ju,Cx=M1,WH=Mr,XH=tA,$H=XH.String,bx=!!Object.getOwnPropertySymbols&&!WH(function(){var t=Symbol();return!$H(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Cx&&Cx<41}),qH=bx,Ex=qH&&!Symbol.sham&&typeof Symbol.iterator=="symbol",YH=ys,JH=Tr,ZH=qu,e9=Ex,t9=Object,Fx=e9?function(t){return typeof t=="symbol"}:function(t){var e=YH("Symbol");return JH(e)&&ZH(e.prototype,t9(t))},r9=String,Zu=function(t){try{return r9(t)}catch{return"Object"}},A9=Tr,n9=Zu,a9=TypeError,Wa=function(t){if(A9(t))return t;throw a9(n9(t)+" is not a function")},i9=Wa,s9=Bs,bo=function(t,e){var r=t[e];return s9(r)?void 0:i9(r)},R1=yA,H1=Tr,V1=za,o9=TypeError,l9=function(t,e){var r,A;if(e==="string"&&H1(r=t.toString)&&!V1(A=R1(r,t))||H1(r=t.valueOf)&&!V1(A=R1(r,t))||e!=="string"&&H1(r=t.toString)&&!V1(A=R1(r,t)))return A;throw o9("Can't convert object to primitive value")},Sx={exports:{}},_x=tA,c9=Object.defineProperty,K1=function(t,e){try{c9(_x,t,{value:e,configurable:!0,writable:!0})}catch{_x[t]=e}return e},f9=tA,u9=K1,Tx="__core-js_shared__",h9=f9[Tx]||u9(Tx,{}),G1=h9,Ux=G1;(Sx.exports=function(t,e){return Ux[t]||(Ux[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"});var j1=Sx.exports,d9=ba,g9=Object,eh=function(t){return g9(d9(t))},p9=Rr,m9=eh,v9=p9({}.hasOwnProperty),Zn=Object.hasOwn||function(e,r){return v9(m9(e),r)},w9=Rr,B9=0,y9=Math.random(),x9=w9(1 .toString),Nx=function(t){return"Symbol("+(t===void 0?"":t)+")_"+x9(++B9+y9,36)},C9=tA,b9=j1,Ix=Zn,E9=Nx,F9=bx,S9=Ex,Eo=C9.Symbol,z1=b9("wks"),_9=S9?Eo.for||Eo:Eo&&Eo.withoutSetter||E9,lA=function(t){return Ix(z1,t)||(z1[t]=F9&&Ix(Eo,t)?Eo[t]:_9("Symbol."+t)),z1[t]},T9=yA,Lx=za,kx=Fx,U9=bo,N9=l9,I9=lA,L9=TypeError,k9=I9("toPrimitive"),Q9=function(t,e){if(!Lx(t)||kx(t))return t;var r=U9(t,k9),A;if(r){if(e===void 0&&(e="default"),A=T9(r,t,e),!Lx(A)||kx(A))return A;throw L9("Can't convert object to primitive value")}return e===void 0&&(e="number"),N9(t,e)},O9=Q9,D9=Fx,W1=function(t){var e=O9(t,"string");return D9(e)?e:e+""},P9=tA,Qx=za,X1=P9.document,M9=Qx(X1)&&Qx(X1.createElement),th=function(t){return M9?X1.createElement(t):{}},R9=Ca,H9=Mr,V9=th,Ox=!R9&&!H9(function(){return Object.defineProperty(V9("div"),"a",{get:function(){return 7}}).a!=7}),K9=Ca,G9=yA,j9=sx,z9=$u,W9=nc,X9=W1,$9=Zn,q9=Ox,Dx=Object.getOwnPropertyDescriptor;Co.f=K9?Dx:function(e,r){if(e=W9(e),r=X9(r),q9)try{return Dx(e,r)}catch{}if($9(e,r))return z9(!G9(j9.f,e,r),e[r])};var Ea={},Y9=Ca,J9=Mr,Px=Y9&&J9(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),Z9=za,eV=String,tV=TypeError,IA=function(t){if(Z9(t))return t;throw tV(eV(t)+" is not an object")},rV=Ca,AV=Ox,nV=Px,rh=IA,Mx=W1,aV=TypeError,$1=Object.defineProperty,iV=Object.getOwnPropertyDescriptor,q1="enumerable",Y1="configurable",J1="writable";Ea.f=rV?nV?function(e,r,A){if(rh(e),r=Mx(r),rh(A),typeof e=="function"&&r==="prototype"&&"value"in A&&J1 in A&&!A[J1]){var n=iV(e,r);n&&n[J1]&&(e[r]=A.value,A={configurable:Y1 in A?A[Y1]:n[Y1],enumerable:q1 in A?A[q1]:n[q1],writable:!1})}return $1(e,r,A)}:$1:function(e,r,A){if(rh(e),r=Mx(r),rh(A),AV)try{return $1(e,r,A)}catch{}if("get"in A||"set"in A)throw aV("Accessors not supported");return"value"in A&&(e[r]=A.value),e};var sV=Ca,oV=Ea,lV=$u,ac=sV?function(t,e,r){return oV.f(t,e,lV(1,r))}:function(t,e,r){return t[e]=r,t},Rx={exports:{}},Z1=Ca,cV=Zn,Hx=Function.prototype,fV=Z1&&Object.getOwnPropertyDescriptor,eg=cV(Hx,"name"),uV=eg&&(function(){}).name==="something",hV=eg&&(!Z1||Z1&&fV(Hx,"name").configurable),Ah={EXISTS:eg,PROPER:uV,CONFIGURABLE:hV},dV=Rr,gV=Tr,tg=G1,pV=dV(Function.toString);gV(tg.inspectSource)||(tg.inspectSource=function(t){return pV(t)});var rg=tg.inspectSource,mV=tA,vV=Tr,Vx=mV.WeakMap,wV=vV(Vx)&&/native code/.test(String(Vx)),BV=j1,yV=Nx,Kx=BV("keys"),Ag=function(t){return Kx[t]||(Kx[t]=yV(t))},ng={},xV=wV,Gx=tA,CV=za,bV=ac,ag=Zn,ig=G1,EV=Ag,FV=ng,jx="Object already initialized",sg=Gx.TypeError,SV=Gx.WeakMap,nh,ic,ah,_V=function(t){return ah(t)?ic(t):nh(t,{})},TV=function(t){return function(e){var r;if(!CV(e)||(r=ic(e)).type!==t)throw sg("Incompatible receiver, "+t+" required");return r}};if(xV||ig.state){var Fa=ig.state||(ig.state=new SV);Fa.get=Fa.get,Fa.has=Fa.has,Fa.set=Fa.set,nh=function(t,e){if(Fa.has(t))throw sg(jx);return e.facade=t,Fa.set(t,e),e},ic=function(t){return Fa.get(t)||{}},ah=function(t){return Fa.has(t)}}else{var Fo=EV("state");FV[Fo]=!0,nh=function(t,e){if(ag(t,Fo))throw sg(jx);return e.facade=t,bV(t,Fo,e),e},ic=function(t){return ag(t,Fo)?t[Fo]:{}},ah=function(t){return ag(t,Fo)}}var ih={set:nh,get:ic,has:ah,enforce:_V,getterFor:TV},og=Rr,UV=Mr,NV=Tr,sh=Zn,lg=Ca,IV=Ah.CONFIGURABLE,LV=rg,zx=ih,kV=zx.enforce,QV=zx.get,Wx=String,oh=Object.defineProperty,OV=og("".slice),DV=og("".replace),PV=og([].join),MV=lg&&!UV(function(){return oh(function(){},"length",{value:8}).length!==8}),RV=String(String).split("String"),HV=Rx.exports=function(t,e,r){OV(Wx(e),0,7)==="Symbol("&&(e="["+DV(Wx(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!sh(t,"name")||IV&&t.name!==e)&&(lg?oh(t,"name",{value:e,configurable:!0}):t.name=e),MV&&r&&sh(r,"arity")&&t.length!==r.arity&&oh(t,"length",{value:r.arity});try{r&&sh(r,"constructor")&&r.constructor?lg&&oh(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var A=kV(t);return sh(A,"source")||(A.source=PV(RV,typeof e=="string"?e:"")),t};Function.prototype.toString=HV(function(){return NV(this)&&QV(this).source||LV(this)},"toString");var Xx=Rx.exports,VV=Tr,KV=Ea,GV=Xx,jV=K1,xs=function(t,e,r,A){A||(A={});var n=A.enumerable,a=A.name!==void 0?A.name:e;if(VV(r)&&GV(r,a,A),A.global)n?t[e]=r:jV(e,r);else{try{A.unsafe?t[e]&&(n=!0):delete t[e]}catch{}n?t[e]=r:KV.f(t,e,{value:r,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return t},$x={},zV=Math.ceil,WV=Math.floor,XV=Math.trunc||function(e){var r=+e;return(r>0?WV:zV)(r)},$V=XV,lh=function(t){var e=+t;return e!==e||e===0?0:$V(e)},qV=lh,YV=Math.max,JV=Math.min,qx=function(t,e){var r=qV(t);return r<0?YV(r+e,0):JV(r,e)},ZV=lh,eK=Math.min,So=function(t){return t>0?eK(ZV(t),9007199254740991):0},tK=So,ch=function(t){return tK(t.length)},rK=nc,AK=qx,nK=ch,Yx=function(t){return function(e,r,A){var n=rK(e),a=nK(n),i=AK(A,a),s;if(t&&r!=r){for(;a>i;)if(s=n[i++],s!=s)return!0}else for(;a>i;i++)if((t||i in n)&&n[i]===r)return t||i||0;return!t&&-1}},Jx={includes:Yx(!0),indexOf:Yx(!1)},aK=Rr,cg=Zn,iK=nc,sK=Jx.indexOf,oK=ng,Zx=aK([].push),e5=function(t,e){var r=iK(t),A=0,n=[],a;for(a in r)!cg(oK,a)&&cg(r,a)&&Zx(n,a);for(;e.length>A;)cg(r,a=e[A++])&&(~sK(n,a)||Zx(n,a));return n},fg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],lK=e5,cK=fg,fK=cK.concat("length","prototype");$x.f=Object.getOwnPropertyNames||function(e){return lK(e,fK)};var t5={};t5.f=Object.getOwnPropertySymbols;var uK=ys,hK=Rr,dK=$x,gK=t5,pK=IA,mK=hK([].concat),vK=uK("Reflect","ownKeys")||function(e){var r=dK.f(pK(e)),A=gK.f;return A?mK(r,A(e)):r},r5=Zn,wK=vK,BK=Co,yK=Ea,xK=function(t,e,r){for(var A=wK(e),n=yK.f,a=BK.f,i=0;i<A.length;i++){var s=A[i];!r5(t,s)&&!(r&&r5(r,s))&&n(t,s,a(e,s))}},CK=Mr,bK=Tr,EK=/#|\.prototype\./,sc=function(t,e){var r=SK[FK(t)];return r==TK?!0:r==_K?!1:bK(e)?CK(e):!!e},FK=sc.normalize=function(t){return String(t).replace(EK,".").toLowerCase()},SK=sc.data={},_K=sc.NATIVE="N",TK=sc.POLYFILL="P",A5=sc,ug=tA,UK=Co.f,NK=ac,IK=xs,LK=K1,kK=xK,QK=A5,jA=function(t,e){var r=t.target,A=t.global,n=t.stat,a,i,s,o,l,c;if(A?i=ug:n?i=ug[r]||LK(r,{}):i=(ug[r]||{}).prototype,i)for(s in e){if(l=e[s],t.dontCallGetSet?(c=UK(i,s),o=c&&c.value):o=i[s],a=QK(A?s:r+(n?".":"#")+s,t.forced),!a&&o!==void 0){if(typeof l==typeof o)continue;kK(l,o)}(t.sham||o&&o.sham)&&NK(l,"sham",!0),IK(i,s,l,t)}},OK=ws,oc=typeof process<"u"&&OK(process)=="process",DK=Rr,PK=Wa,MK=function(t,e,r){try{return DK(PK(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},RK=Tr,HK=String,VK=TypeError,KK=function(t){if(typeof t=="object"||RK(t))return t;throw VK("Can't set "+HK(t)+" as a prototype")},GK=MK,jK=IA,zK=KK,n5=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=GK(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(n,a){return jK(n),zK(a),t?r(n,a):n.__proto__=a,n}}():void 0),WK=Ea.f,XK=Zn,$K=lA,a5=$K("toStringTag"),hg=function(t,e,r){t&&!r&&(t=t.prototype),t&&!XK(t,a5)&&WK(t,a5,{configurable:!0,value:e})},i5=Xx,qK=Ea,YK=function(t,e,r){return r.get&&i5(r.get,e,{getter:!0}),r.set&&i5(r.set,e,{setter:!0}),qK.f(t,e,r)},JK=ys,ZK=YK,eG=lA,tG=Ca,s5=eG("species"),rG=function(t){var e=JK(t);tG&&e&&!e[s5]&&ZK(e,s5,{configurable:!0,get:function(){return this}})},AG=qu,nG=TypeError,aG=function(t,e){if(AG(e,t))return t;throw nG("Incorrect invocation")},iG=lA,sG=iG("toStringTag"),o5={};o5[sG]="z";var oG=String(o5)==="[object z]",lG=oG,cG=Tr,fh=ws,fG=lA,uG=fG("toStringTag"),hG=Object,dG=fh(function(){return arguments}())=="Arguments",gG=function(t,e){try{return t[e]}catch{}},dg=lG?fh:function(t){var e,r,A;return t===void 0?"Undefined":t===null?"Null":typeof(r=gG(e=hG(t),uG))=="string"?r:dG?fh(e):(A=fh(e))=="Object"&&cG(e.callee)?"Arguments":A},pG=Rr,mG=Mr,l5=Tr,vG=dg,wG=ys,BG=rg,c5=function(){},yG=[],f5=wG("Reflect","construct"),gg=/^\s*(?:class|function)\b/,xG=pG(gg.exec),CG=!gg.exec(c5),lc=function(e){if(!l5(e))return!1;try{return f5(c5,yG,e),!0}catch{return!1}},u5=function(e){if(!l5(e))return!1;switch(vG(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return CG||!!xG(gg,BG(e))}catch{return!0}};u5.sham=!0;var bG=!f5||mG(function(){var t;return lc(lc.call)||!lc(Object)||!lc(function(){t=!0})||t})?u5:lc,EG=bG,FG=Zu,SG=TypeError,_G=function(t){if(EG(t))return t;throw SG(FG(t)+" is not a constructor")},h5=IA,TG=_G,UG=Bs,NG=lA,IG=NG("species"),d5=function(t,e){var r=h5(t).constructor,A;return r===void 0||UG(A=h5(r)[IG])?e:TG(A)},LG=Wu,g5=Function.prototype,p5=g5.apply,m5=g5.call,pg=typeof Reflect=="object"&&Reflect.apply||(LG?m5.bind(p5):function(){return m5.apply(p5,arguments)}),kG=ws,QG=Rr,cc=function(t){if(kG(t)==="Function")return QG(t)},v5=cc,OG=Wa,DG=Wu,PG=v5(v5.bind),mg=function(t,e){return OG(t),e===void 0?t:DG?PG(t,e):function(){return t.apply(e,arguments)}},MG=ys,w5=MG("document","documentElement"),RG=Rr,HG=RG([].slice),VG=TypeError,KG=function(t,e){if(t<e)throw VG("Not enough arguments");return t},GG=Yu,B5=/(?:ipad|iphone|ipod).*applewebkit/i.test(GG),gn=tA,jG=pg,zG=mg,y5=Tr,WG=Zn,x5=Mr,C5=w5,XG=HG,b5=th,$G=KG,qG=B5,YG=oc,vg=gn.setImmediate,wg=gn.clearImmediate,JG=gn.process,Bg=gn.Dispatch,ZG=gn.Function,E5=gn.MessageChannel,ej=gn.String,yg=0,fc={},F5="onreadystatechange",uc,Cs,xg,Cg;x5(function(){uc=gn.location});var bg=function(t){if(WG(fc,t)){var e=fc[t];delete fc[t],e()}},Eg=function(t){return function(){bg(t)}},S5=function(t){bg(t.data)},_5=function(t){gn.postMessage(ej(t),uc.protocol+"//"+uc.host)};(!vg||!wg)&&(vg=function(e){$G(arguments.length,1);var r=y5(e)?e:ZG(e),A=XG(arguments,1);return fc[++yg]=function(){jG(r,void 0,A)},Cs(yg),yg},wg=function(e){delete fc[e]},YG?Cs=function(t){JG.nextTick(Eg(t))}:Bg&&Bg.now?Cs=function(t){Bg.now(Eg(t))}:E5&&!qG?(xg=new E5,Cg=xg.port2,xg.port1.onmessage=S5,Cs=zG(Cg.postMessage,Cg)):gn.addEventListener&&y5(gn.postMessage)&&!gn.importScripts&&uc&&uc.protocol!=="file:"&&!x5(_5)?(Cs=_5,gn.addEventListener("message",S5,!1)):F5 in b5("script")?Cs=function(t){C5.appendChild(b5("script"))[F5]=function(){C5.removeChild(this),bg(t)}}:Cs=function(t){setTimeout(Eg(t),0)});var T5={set:vg,clear:wg},U5=function(){this.head=null,this.tail=null};U5.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var N5=U5,tj=Yu,rj=/ipad|iphone|ipod/i.test(tj)&&typeof Pebble<"u",Aj=Yu,nj=/web0s(?!.*chrome)/i.test(Aj),bs=tA,I5=mg,aj=Co.f,Fg=T5.set,ij=N5,sj=B5,oj=rj,lj=nj,Sg=oc,L5=bs.MutationObserver||bs.WebKitMutationObserver,k5=bs.document,Q5=bs.process,uh=bs.Promise,O5=aj(bs,"queueMicrotask"),_g=O5&&O5.value,_o,Tg,Ug,hh,D5;if(!_g){var dh=new ij,gh=function(){var t,e;for(Sg&&(t=Q5.domain)&&t.exit();e=dh.get();)try{e()}catch(r){throw dh.head&&_o(),r}t&&t.enter()};!sj&&!Sg&&!lj&&L5&&k5?(Tg=!0,Ug=k5.createTextNode(""),new L5(gh).observe(Ug,{characterData:!0}),_o=function(){Ug.data=Tg=!Tg}):!oj&&uh&&uh.resolve?(hh=uh.resolve(void 0),hh.constructor=uh,D5=I5(hh.then,hh),_o=function(){D5(gh)}):Sg?_o=function(){Q5.nextTick(gh)}:(Fg=I5(Fg,bs),_o=function(){Fg(gh)}),_g=function(t){dh.head||_o(),dh.add(t)}}var cj=_g,fj=function(t,e){try{arguments.length==1?console.error(t):console.error(t,e)}catch{}},Ng=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},uj=tA,ph=uj.Promise,P5=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",hj=P5,dj=oc,gj=!hj&&!dj&&typeof window=="object"&&typeof document=="object",pj=tA,hc=ph,mj=Tr,vj=A5,wj=rg,Bj=lA,yj=gj,xj=P5,Ig=M1;hc&&hc.prototype;var Cj=Bj("species"),Lg=!1,M5=mj(pj.PromiseRejectionEvent),bj=vj("Promise",function(){var t=wj(hc),e=t!==String(hc);if(!e&&Ig===66)return!0;if(!Ig||Ig<51||!/native code/.test(t)){var r=new hc(function(a){a(1)}),A=function(a){a(function(){},function(){})},n=r.constructor={};if(n[Cj]=A,Lg=r.then(function(){})instanceof A,!Lg)return!0}return!e&&(yj||xj)&&!M5}),dc={CONSTRUCTOR:bj,REJECTION_EVENT:M5,SUBCLASSING:Lg},To={},R5=Wa,Ej=TypeError,Fj=function(t){var e,r;this.promise=new t(function(A,n){if(e!==void 0||r!==void 0)throw Ej("Bad Promise constructor");e=A,r=n}),this.resolve=R5(e),this.reject=R5(r)};To.f=function(t){return new Fj(t)};var Sj=jA,mh=oc,Ii=tA,Uo=yA,H5=xs,V5=n5,_j=hg,Tj=rG,Uj=Wa,vh=Tr,Nj=za,Ij=aG,Lj=d5,K5=T5.set,kg=cj,kj=fj,Qj=Ng,Oj=N5,G5=ih,wh=ph,Qg=dc,j5=To,Bh="Promise",z5=Qg.CONSTRUCTOR,Dj=Qg.REJECTION_EVENT,Pj=Qg.SUBCLASSING,Og=G5.getterFor(Bh),Mj=G5.set,No=wh&&wh.prototype,Es=wh,yh=No,W5=Ii.TypeError,Dg=Ii.document,Pg=Ii.process,Mg=j5.f,Rj=Mg,Hj=!!(Dg&&Dg.createEvent&&Ii.dispatchEvent),X5="unhandledrejection",Vj="rejectionhandled",$5=0,q5=1,Kj=2,Rg=1,Y5=2,xh,J5,Gj,Z5,eC=function(t){var e;return Nj(t)&&vh(e=t.then)?e:!1},tC=function(t,e){var r=e.value,A=e.state==q5,n=A?t.ok:t.fail,a=t.resolve,i=t.reject,s=t.domain,o,l,c;try{n?(A||(e.rejection===Y5&&zj(e),e.rejection=Rg),n===!0?o=r:(s&&s.enter(),o=n(r),s&&(s.exit(),c=!0)),o===t.promise?i(W5("Promise-chain cycle")):(l=eC(o))?Uo(l,o,a,i):a(o)):i(r)}catch(d){s&&!c&&s.exit(),i(d)}},rC=function(t,e){t.notified||(t.notified=!0,kg(function(){for(var r=t.reactions,A;A=r.get();)tC(A,t);t.notified=!1,e&&!t.rejection&&jj(t)}))},AC=function(t,e,r){var A,n;Hj?(A=Dg.createEvent("Event"),A.promise=e,A.reason=r,A.initEvent(t,!1,!0),Ii.dispatchEvent(A)):A={promise:e,reason:r},!Dj&&(n=Ii["on"+t])?n(A):t===X5&&kj("Unhandled promise rejection",r)},jj=function(t){Uo(K5,Ii,function(){var e=t.facade,r=t.value,A=nC(t),n;if(A&&(n=Qj(function(){mh?Pg.emit("unhandledRejection",r,e):AC(X5,e,r)}),t.rejection=mh||nC(t)?Y5:Rg,n.error))throw n.value})},nC=function(t){return t.rejection!==Rg&&!t.parent},zj=function(t){Uo(K5,Ii,function(){var e=t.facade;mh?Pg.emit("rejectionHandled",e):AC(Vj,e,t.value)})},Io=function(t,e,r){return function(A){t(e,A,r)}},Lo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=Kj,rC(t,!0))},Hg=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw W5("Promise can't be resolved itself");var A=eC(e);A?kg(function(){var n={done:!1};try{Uo(A,e,Io(Hg,n,t),Io(Lo,n,t))}catch(a){Lo(n,a,t)}}):(t.value=e,t.state=q5,rC(t,!1))}catch(n){Lo({done:!1},n,t)}}};if(z5&&(Es=function(e){Ij(this,yh),Uj(e),Uo(xh,this);var r=Og(this);try{e(Io(Hg,r),Io(Lo,r))}catch(A){Lo(r,A)}},yh=Es.prototype,xh=function(e){Mj(this,{type:Bh,done:!1,notified:!1,parent:!1,reactions:new Oj,rejection:!1,state:$5,value:void 0})},xh.prototype=H5(yh,"then",function(e,r){var A=Og(this),n=Mg(Lj(this,Es));return A.parent=!0,n.ok=vh(e)?e:!0,n.fail=vh(r)&&r,n.domain=mh?Pg.domain:void 0,A.state==$5?A.reactions.add(n):kg(function(){tC(n,A)}),n.promise}),J5=function(){var t=new xh,e=Og(t);this.promise=t,this.resolve=Io(Hg,e),this.reject=Io(Lo,e)},j5.f=Mg=function(t){return t===Es||t===Gj?new J5(t):Rj(t)},vh(wh)&&No!==Object.prototype)){Z5=No.then,Pj||H5(No,"then",function(e,r){var A=this;return new Es(function(n,a){Uo(Z5,A,n,a)}).then(e,r)},{unsafe:!0});try{delete No.constructor}catch{}V5&&V5(No,yh)}Sj({global:!0,constructor:!0,wrap:!0,forced:z5},{Promise:Es}),_j(Es,Bh,!1),Tj(Bh);var gc={},Wj=lA,Xj=gc,$j=Wj("iterator"),qj=Array.prototype,Yj=function(t){return t!==void 0&&(Xj.Array===t||qj[$j]===t)},Jj=dg,aC=bo,Zj=Bs,ez=gc,tz=lA,rz=tz("iterator"),iC=function(t){if(!Zj(t))return aC(t,rz)||aC(t,"@@iterator")||ez[Jj(t)]},Az=yA,nz=Wa,az=IA,iz=Zu,sz=iC,oz=TypeError,lz=function(t,e){var r=arguments.length<2?sz(t):e;if(nz(r))return az(Az(r,t));throw oz(iz(t)+" is not iterable")},cz=yA,sC=IA,fz=bo,uz=function(t,e,r){var A,n;sC(t);try{if(A=fz(t,"return"),!A){if(e==="throw")throw r;return r}A=cz(A,t)}catch(a){n=!0,A=a}if(e==="throw")throw r;if(n)throw A;return sC(A),r},hz=mg,dz=yA,gz=IA,pz=Zu,mz=Yj,vz=ch,oC=qu,wz=lz,Bz=iC,lC=uz,yz=TypeError,Ch=function(t,e){this.stopped=t,this.result=e},cC=Ch.prototype,fC=function(t,e,r){var A=r&&r.that,n=!!(r&&r.AS_ENTRIES),a=!!(r&&r.IS_RECORD),i=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),o=hz(e,A),l,c,d,g,h,p,v,y=function(b){return l&&lC(l,"normal",b),new Ch(!0,b)},C=function(b){return n?(gz(b),s?o(b[0],b[1],y):o(b[0],b[1])):s?o(b,y):o(b)};if(a)l=t.iterator;else if(i)l=t;else{if(c=Bz(t),!c)throw yz(pz(t)+" is not iterable");if(mz(c)){for(d=0,g=vz(t);g>d;d++)if(h=C(t[d]),h&&oC(cC,h))return h;return new Ch(!1)}l=wz(t,c)}for(p=a?t.next:l.next;!(v=dz(p,l)).done;){try{h=C(v.value)}catch(b){lC(l,"throw",b)}if(typeof h=="object"&&h&&oC(cC,h))return h}return new Ch(!1)},xz=lA,uC=xz("iterator"),hC=!1;try{var Cz=0,dC={next:function(){return{done:!!Cz++}},return:function(){hC=!0}};dC[uC]=function(){return this},Array.from(dC,function(){throw 2})}catch{}var bz=function(t,e){if(!e&&!hC)return!1;var r=!1;try{var A={};A[uC]=function(){return{next:function(){return{done:r=!0}}}},t(A)}catch{}return r},Ez=ph,Fz=bz,Sz=dc.CONSTRUCTOR,gC=Sz||!Fz(function(t){Ez.all(t).then(void 0,function(){})}),_z=jA,Tz=yA,Uz=Wa,Nz=To,Iz=Ng,Lz=fC,kz=gC;_z({target:"Promise",stat:!0,forced:kz},{all:function(e){var r=this,A=Nz.f(r),n=A.resolve,a=A.reject,i=Iz(function(){var s=Uz(r.resolve),o=[],l=0,c=1;Lz(e,function(d){var g=l++,h=!1;c++,Tz(s,r,d).then(function(p){h||(h=!0,o[g]=p,--c||n(o))},a)}),--c||n(o)});return i.error&&a(i.value),A.promise}});var Qz=jA,Oz=dc.CONSTRUCTOR,Vg=ph,Dz=ys,Pz=Tr,Mz=xs,pC=Vg&&Vg.prototype;if(Qz({target:"Promise",proto:!0,forced:Oz,real:!0},{catch:function(t){return this.then(void 0,t)}}),Pz(Vg)){var mC=Dz("Promise").prototype.catch;pC.catch!==mC&&Mz(pC,"catch",mC,{unsafe:!0})}var Rz=jA,Hz=yA,Vz=Wa,Kz=To,Gz=Ng,jz=fC,zz=gC;Rz({target:"Promise",stat:!0,forced:zz},{race:function(e){var r=this,A=Kz.f(r),n=A.reject,a=Gz(function(){var i=Vz(r.resolve);jz(e,function(s){Hz(i,r,s).then(A.resolve,n)})});return a.error&&n(a.value),A.promise}});var Wz=jA,Xz=yA,$z=To,qz=dc.CONSTRUCTOR;Wz({target:"Promise",stat:!0,forced:qz},{reject:function(e){var r=$z.f(this);return Xz(r.reject,void 0,e),r.promise}});var Yz=IA,Jz=za,Zz=To,eW=function(t,e){if(Yz(t),Jz(e)&&e.constructor===t)return e;var r=Zz.f(t),A=r.resolve;return A(e),r.promise},tW=jA,rW=ys,AW=dc.CONSTRUCTOR,nW=eW;rW("Promise"),tW({target:"Promise",stat:!0,forced:AW},{resolve:function(e){return nW(this,e)}});function vC(t,e,r,A,n,a,i){try{var s=t[a](i),o=s.value}catch(l){r(l);return}s.done?e(o):Promise.resolve(o).then(A,n)}function Xa(t){return function(){var e=this,r=arguments;return new Promise(function(A,n){var a=t.apply(e,r);function i(o){vC(a,A,n,i,s,"next",o)}function s(o){vC(a,A,n,i,s,"throw",o)}i(void 0)})}}var aW=dg,iW=String,Sa=function(t){if(aW(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return iW(t)},sW=IA,wC=function(){var t=sW(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Kg=Mr,oW=tA,Gg=oW.RegExp,jg=Kg(function(){var t=Gg("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),lW=jg||Kg(function(){return!Gg("a","y").sticky}),cW=jg||Kg(function(){var t=Gg("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),BC={BROKEN_CARET:cW,MISSED_STICKY:lW,UNSUPPORTED_Y:jg},yC={},fW=e5,uW=fg,hW=Object.keys||function(e){return fW(e,uW)},dW=Ca,gW=Px,pW=Ea,mW=IA,vW=nc,wW=hW;yC.f=dW&&!gW?Object.defineProperties:function(e,r){mW(e);for(var A=vW(r),n=wW(r),a=n.length,i=0,s;a>i;)pW.f(e,s=n[i++],A[s]);return e};var BW=IA,yW=yC,xC=fg,xW=ng,CW=w5,bW=th,EW=Ag,CC=">",bC="<",zg="prototype",Wg="script",EC=EW("IE_PROTO"),Xg=function(){},FC=function(t){return bC+Wg+CC+t+bC+"/"+Wg+CC},SC=function(t){t.write(FC("")),t.close();var e=t.parentWindow.Object;return t=null,e},FW=function(){var t=bW("iframe"),e="java"+Wg+":",r;return t.style.display="none",CW.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(FC("document.F=Object")),r.close(),r.F},bh,Eh=function(){try{bh=new ActiveXObject("htmlfile")}catch{}Eh=typeof document<"u"?document.domain&&bh?SC(bh):FW():SC(bh);for(var t=xC.length;t--;)delete Eh[zg][xC[t]];return Eh()};xW[EC]=!0;var $g=Object.create||function(e,r){var A;return e!==null?(Xg[zg]=BW(e),A=new Xg,Xg[zg]=null,A[EC]=e):A=Eh(),r===void 0?A:yW.f(A,r)},SW=Mr,_W=tA,TW=_W.RegExp,UW=SW(function(){var t=TW(".","s");return!(t.dotAll&&t.exec(`
|
|
376
|
-
`)&&t.flags==="s")}),
|
|
377
|
-
`)&&(y="(?: "+y+")",b=" "+b,C++),s=new RegExp("^(?:"+y+")",v)),Zg&&(s=new RegExp("^"+y+"$(?!\\s)",v)),Jg&&(o=r.lastIndex),l=ko(Sh,p?s:r,b),p?l?(l.input=Yg(l.input,C),l[0]=Yg(l[0],C),l.index=r.lastIndex,r.lastIndex+=l[0].length):r.lastIndex=0:Jg&&l&&(r.lastIndex=r.global?l.index+l[0].length:o),Zg&&l&&l.length>1&&ko(KW,l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&h)for(l.groups=d=MW(null),c=0;c<h.length;c++)g=h[c],d[g[0]]=l[g[1]];return l});var _h=qg,XW=jA,TC=_h;XW({target:"RegExp",proto:!0,forced:/./.exec!==TC},{exec:TC});var UC=cc,NC=xs,$W=_h,IC=Mr,LC=lA,qW=ac,YW=LC("species"),ep=RegExp.prototype,tp=function(t,e,r,A){var n=LC(t),a=!IC(function(){var l={};return l[n]=function(){return 7},""[t](l)!=7}),i=a&&!IC(function(){var l=!1,c=/a/;return t==="split"&&(c={},c.constructor={},c.constructor[YW]=function(){return c},c.flags="",c[n]=/./[n]),c.exec=function(){return l=!0,null},c[n](""),!l});if(!a||!i||r){var s=UC(/./[n]),o=e(n,""[t],function(l,c,d,g,h){var p=UC(l),v=c.exec;return v===$W||v===ep.exec?a&&!h?{done:!0,value:s(c,d,g)}:{done:!0,value:p(d,c,g)}:{done:!1}});NC(String.prototype,t,o[0]),NC(ep,n,o[1])}A&&qW(ep[n],"sham",!0)},rp=Rr,JW=lh,ZW=Sa,eX=ba,tX=rp("".charAt),kC=rp("".charCodeAt),rX=rp("".slice),QC=function(t){return function(e,r){var A=ZW(eX(e)),n=JW(r),a=A.length,i,s;return n<0||n>=a?t?"":void 0:(i=kC(A,n),i<55296||i>56319||n+1===a||(s=kC(A,n+1))<56320||s>57343?t?tX(A,n):i:t?rX(A,n,n+2):(i-55296<<10)+(s-56320)+65536)}},AX={codeAt:QC(!1),charAt:QC(!0)},nX=AX.charAt,Ap=function(t,e,r){return e+(r?nX(t,e).length:1)},OC=yA,aX=IA,iX=Tr,sX=ws,oX=_h,lX=TypeError,np=function(t,e){var r=t.exec;if(iX(r)){var A=OC(r,t,e);return A!==null&&aX(A),A}if(sX(t)==="RegExp")return OC(oX,t,e);throw lX("RegExp#exec called on incompatible receiver")},cX=yA,fX=tp,uX=IA,hX=Bs,dX=So,ap=Sa,gX=ba,pX=bo,mX=Ap,DC=np;fX("match",function(t,e,r){return[function(n){var a=gX(this),i=hX(n)?void 0:pX(n,t);return i?cX(i,n,a):new RegExp(n)[t](ap(a))},function(A){var n=uX(this),a=ap(A),i=r(e,n,a);if(i.done)return i.value;if(!n.global)return DC(n,a);var s=n.unicode;n.lastIndex=0;for(var o=[],l=0,c;(c=DC(n,a))!==null;){var d=ap(c[0]);o[l]=d,d===""&&(n.lastIndex=mX(a,dX(n.lastIndex),s)),l++}return l===0?null:o}]});var ip=Rr,vX=eh,wX=Math.floor,sp=ip("".charAt),BX=ip("".replace),op=ip("".slice),yX=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xX=/\$([$&'`]|\d{1,2})/g,CX=function(t,e,r,A,n,a){var i=r+t.length,s=A.length,o=xX;return n!==void 0&&(n=vX(n),o=yX),BX(a,o,function(l,c){var d;switch(sp(c,0)){case"$":return"$";case"&":return t;case"`":return op(e,0,r);case"'":return op(e,i);case"<":d=n[op(c,1,-1)];break;default:var g=+c;if(g===0)return l;if(g>s){var h=wX(g/10);return h===0?l:h<=s?A[h-1]===void 0?sp(c,1):A[h-1]+sp(c,1):l}d=A[g-1]}return d===void 0?"":d})},bX=pg,PC=yA,Th=Rr,EX=tp,FX=Mr,SX=IA,_X=Tr,TX=Bs,UX=lh,NX=So,Qo=Sa,IX=ba,LX=Ap,kX=bo,QX=CX,OX=np,DX=lA,lp=DX("replace"),PX=Math.max,MX=Math.min,RX=Th([].concat),cp=Th([].push),MC=Th("".indexOf),RC=Th("".slice),HX=function(t){return t===void 0?t:String(t)},VX=function(){return"a".replace(/./,"$0")==="$0"}(),HC=function(){return/./[lp]?/./[lp]("a","$0")==="":!1}(),KX=!FX(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"});EX("replace",function(t,e,r){var A=HC?"$":"$0";return[function(a,i){var s=IX(this),o=TX(a)?void 0:kX(a,lp);return o?PC(o,a,s,i):PC(e,Qo(s),a,i)},function(n,a){var i=SX(this),s=Qo(n);if(typeof a=="string"&&MC(a,A)===-1&&MC(a,"$<")===-1){var o=r(e,i,s,a);if(o.done)return o.value}var l=_X(a);l||(a=Qo(a));var c=i.global;if(c){var d=i.unicode;i.lastIndex=0}for(var g=[];;){var h=OX(i,s);if(h===null||(cp(g,h),!c))break;var p=Qo(h[0]);p===""&&(i.lastIndex=LX(s,NX(i.lastIndex),d))}for(var v="",y=0,C=0;C<g.length;C++){h=g[C];for(var b=Qo(h[0]),F=PX(MX(UX(h.index),s.length),0),O=[],W=1;W<h.length;W++)cp(O,HX(h[W]));var X=h.groups;if(l){var k=RX([b],O,F,s);X!==void 0&&cp(k,X);var Q=Qo(bX(a,void 0,k))}else Q=QX(b,s,F,O,X,a);F>=y&&(v+=RC(s,y,F)+Q,y=F+b.length)}return v+RC(s,y)}]},!KX||!VX||HC);var GX=za,jX=ws,zX=lA,WX=zX("match"),VC=function(t){var e;return GX(t)&&((e=t[WX])!==void 0?!!e:jX(t)=="RegExp")},XX=VC,$X=TypeError,fp=function(t){if(XX(t))throw $X("The method doesn't accept regular expressions");return t},qX=lA,YX=qX("match"),up=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[YX]=!1,"/./"[t](e)}catch{}}return!1},JX=jA,KC=cc,ZX=Co.f,e$=So,GC=Sa,t$=fp,r$=ba,A$=up,jC=KC("".startsWith),n$=KC("".slice),a$=Math.min,zC=A$("startsWith"),i$=!zC&&!!function(){var t=ZX(String.prototype,"startsWith");return t&&!t.writable}();JX({target:"String",proto:!0,forced:!i$&&!zC},{startsWith:function(e){var r=GC(r$(this));t$(e);var A=e$(a$(arguments.length>1?arguments[1]:void 0,r.length)),n=GC(e);return jC?jC(r,n,A):n$(r,A,A+n.length)===n}});var s$=lA,o$=$g,l$=Ea.f,hp=s$("unscopables"),dp=Array.prototype;dp[hp]==null&&l$(dp,hp,{configurable:!0,value:o$(null)});var c$=function(t){dp[hp][t]=!0},f$=Mr,u$=!f$(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),h$=Zn,d$=Tr,g$=eh,p$=Ag,m$=u$,WC=p$("IE_PROTO"),gp=Object,v$=gp.prototype,XC=m$?gp.getPrototypeOf:function(t){var e=g$(t);if(h$(e,WC))return e[WC];var r=e.constructor;return d$(r)&&e instanceof r?r.prototype:e instanceof gp?v$:null},w$=Mr,B$=Tr,y$=za,$C=XC,x$=xs,C$=lA,pp=C$("iterator"),qC=!1,Fs,mp,vp;[].keys&&(vp=[].keys(),"next"in vp?(mp=$C($C(vp)),mp!==Object.prototype&&(Fs=mp)):qC=!0);var b$=!y$(Fs)||w$(function(){var t={};return Fs[pp].call(t)!==t});b$&&(Fs={}),B$(Fs[pp])||x$(Fs,pp,function(){return this});var YC={IteratorPrototype:Fs,BUGGY_SAFARI_ITERATORS:qC},E$=YC.IteratorPrototype,F$=$g,S$=$u,_$=hg,T$=gc,U$=function(){return this},N$=function(t,e,r,A){var n=e+" Iterator";return t.prototype=F$(E$,{next:S$(+!A,r)}),_$(t,n,!1),T$[n]=U$,t},I$=jA,L$=yA,JC=Ah,k$=Tr,Q$=N$,ZC=XC,e4=n5,O$=hg,D$=ac,wp=xs,P$=lA,M$=gc,t4=YC,R$=JC.PROPER,H$=JC.CONFIGURABLE,r4=t4.IteratorPrototype,Uh=t4.BUGGY_SAFARI_ITERATORS,pc=P$("iterator"),A4="keys",mc="values",n4="entries",V$=function(){return this},K$=function(t,e,r,A,n,a,i){Q$(r,e,A);var s=function(C){if(C===n&&g)return g;if(!Uh&&C in c)return c[C];switch(C){case A4:return function(){return new r(this,C)};case mc:return function(){return new r(this,C)};case n4:return function(){return new r(this,C)}}return function(){return new r(this)}},o=e+" Iterator",l=!1,c=t.prototype,d=c[pc]||c["@@iterator"]||n&&c[n],g=!Uh&&d||s(n),h=e=="Array"&&c.entries||d,p,v,y;if(h&&(p=ZC(h.call(new t)),p!==Object.prototype&&p.next&&(ZC(p)!==r4&&(e4?e4(p,r4):k$(p[pc])||wp(p,pc,V$)),O$(p,o,!0))),R$&&n==mc&&d&&d.name!==mc&&(H$?D$(c,"name",mc):(l=!0,g=function(){return L$(d,this)})),n)if(v={values:s(mc),keys:a?g:s(A4),entries:s(n4)},i)for(y in v)(Uh||l||!(y in c))&&wp(c,y,v[y]);else I$({target:e,proto:!0,forced:Uh||l},v);return c[pc]!==g&&wp(c,pc,g,{name:n}),M$[e]=g,v},G$=function(t,e){return{value:t,done:e}},j$=nc,Bp=c$,a4=gc,i4=ih,z$=Ea.f,W$=K$,Nh=G$,X$=Ca,s4="Array Iterator",$$=i4.set,q$=i4.getterFor(s4),Y$=W$(Array,"Array",function(t,e){$$(this,{type:s4,target:j$(t),index:0,kind:e})},function(){var t=q$(this),e=t.target,r=t.kind,A=t.index++;return!e||A>=e.length?(t.target=void 0,Nh(void 0,!0)):r=="keys"?Nh(A,!1):r=="values"?Nh(e[A],!1):Nh([A,e[A]],!1)},"values"),o4=a4.Arguments=a4.Array;if(Bp("keys"),Bp("values"),Bp("entries"),X$&&o4.name!=="values")try{z$(o4,"name",{value:"values"})}catch{}var J$={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Z$=th,yp=Z$("span").classList,l4=yp&&yp.constructor&&yp.constructor.prototype,eq=l4===Object.prototype?void 0:l4,c4=tA,f4=J$,tq=eq,vc=Y$,xp=ac,u4=lA,Cp=u4("iterator"),h4=u4("toStringTag"),bp=vc.values,d4=function(t,e){if(t){if(t[Cp]!==bp)try{xp(t,Cp,bp)}catch{t[Cp]=bp}if(t[h4]||xp(t,h4,e),f4[e]){for(var r in vc)if(t[r]!==vc[r])try{xp(t,r,vc[r])}catch{t[r]=vc[r]}}}};for(var Ep in f4)d4(c4[Ep]&&c4[Ep].prototype,Ep);d4(tq,"DOMTokenList");function rq(t,e){if(Wt(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var A=r.call(t,e||"default");if(Wt(A)!=="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Aq(t){var e=rq(t,"string");return Wt(e)==="symbol"?e:String(e)}function Fp(t,e,r){return e=Aq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var nq=Wa,aq=eh,iq=hx,sq=ch,oq=TypeError,g4=function(t){return function(e,r,A,n){nq(r);var a=aq(e),i=iq(a),s=sq(a),o=t?s-1:0,l=t?-1:1;if(A<2)for(;;){if(o in i){n=i[o],o+=l;break}if(o+=l,t?o<0:s<=o)throw oq("Reduce of empty array with no initial value")}for(;t?o>=0:s>o;o+=l)o in i&&(n=r(n,i[o],o,a));return n}},lq={left:g4(!1),right:g4(!0)},cq=Mr,p4=function(t,e){var r=[][t];return!!r&&cq(function(){r.call(null,e||function(){return 1},1)})},fq=jA,uq=lq.left,hq=p4,m4=M1,dq=oc,gq=!dq&&m4>79&&m4<83,pq=gq||!hq("reduce");fq({target:"Array",proto:!0,forced:pq},{reduce:function(e){var r=arguments.length;return uq(this,e,r,r>1?arguments[1]:void 0)}});var mq=jA,v4=cc,vq=Co.f,wq=So,w4=Sa,Bq=fp,yq=ba,xq=up,B4=v4("".endsWith),Cq=v4("".slice),bq=Math.min,y4=xq("endsWith"),Eq=!y4&&!!function(){var t=vq(String.prototype,"endsWith");return t&&!t.writable}();mq({target:"String",proto:!0,forced:!Eq&&!y4},{endsWith:function(e){var r=w4(yq(this));Bq(e);var A=arguments.length>1?arguments[1]:void 0,n=r.length,a=A===void 0?n:bq(wq(A),n),i=w4(e);return B4?B4(r,i,a):Cq(r,a-i.length,a)===i}});var Fq=W1,Sq=Ea,_q=$u,Tq=function(t,e,r){var A=Fq(e);A in t?Sq.f(t,A,_q(0,r)):t[A]=r},x4=qx,Uq=ch,Nq=Tq,Iq=Array,Lq=Math.max,kq=function(t,e,r){for(var A=Uq(t),n=x4(e,A),a=x4(r===void 0?A:r,A),i=Iq(Lq(a-n,0)),s=0;n<a;n++,s++)Nq(i,s,t[n]);return i.length=s,i},Qq=pg,wc=yA,Sp=Rr,Oq=tp,Dq=IA,Pq=Bs,Mq=VC,C4=ba,Rq=d5,Hq=Ap,Vq=So,_p=Sa,Kq=bo,b4=kq,E4=np,Gq=_h,jq=BC,zq=Mr,Oo=jq.UNSUPPORTED_Y,F4=4294967295,Wq=Math.min,S4=[].push,Xq=Sp(/./.exec),Do=Sp(S4),Bc=Sp("".slice),$q=!zq(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return r.length!==2||r[0]!=="a"||r[1]!=="b"});Oq("split",function(t,e,r){var A;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?A=function(n,a){var i=_p(C4(this)),s=a===void 0?F4:a>>>0;if(s===0)return[];if(n===void 0)return[i];if(!Mq(n))return wc(e,i,n,s);for(var o=[],l=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),c=0,d=new RegExp(n.source,l+"g"),g,h,p;(g=wc(Gq,d,i))&&(h=d.lastIndex,!(h>c&&(Do(o,Bc(i,c,g.index)),g.length>1&&g.index<i.length&&Qq(S4,o,b4(g,1)),p=g[0].length,c=h,o.length>=s)));)d.lastIndex===g.index&&d.lastIndex++;return c===i.length?(p||!Xq(d,""))&&Do(o,""):Do(o,Bc(i,c)),o.length>s?b4(o,0,s):o}:"0".split(void 0,0).length?A=function(n,a){return n===void 0&&a===0?[]:wc(e,this,n,a)}:A=e,[function(a,i){var s=C4(this),o=Pq(a)?void 0:Kq(a,t);return o?wc(o,a,s,i):wc(A,_p(s),a,i)},function(n,a){var i=Dq(this),s=_p(n),o=r(A,i,s,a,A!==e);if(o.done)return o.value;var l=Rq(i,RegExp),c=i.unicode,d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(Oo?"g":"y"),g=new l(Oo?"^(?:"+i.source+")":i,d),h=a===void 0?F4:a>>>0;if(h===0)return[];if(s.length===0)return E4(g,s)===null?[s]:[];for(var p=0,v=0,y=[];v<s.length;){g.lastIndex=Oo?0:v;var C=E4(g,Oo?Bc(s,v):s),b;if(C===null||(b=Wq(Vq(g.lastIndex+(Oo?v:0)),s.length))===p)v=Hq(s,v,c);else{if(Do(y,Bc(s,p,v)),y.length===h)return y;for(var F=1;F<=C.length-1;F++)if(Do(y,C[F]),y.length===h)return y;v=p=b}}return Do(y,Bc(s,p)),y}]},!$q,Oo);var Ih={exports:{}},yc={exports:{}};(function(){var t,e,r,A,n,a;typeof performance<"u"&&performance!==null&&performance.now?yc.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(yc.exports=function(){return(t()-n)/1e6},e=process.hrtime,t=function(){var i;return i=e(),i[0]*1e9+i[1]},A=t(),a=process.uptime()*1e9,n=A-a):Date.now?(yc.exports=function(){return Date.now()-r},r=Date.now()):(yc.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Ac);for(var qq=yc.exports,Yq=qq,$a=typeof window>"u"?Ac:window,Lh=["moz","webkit"],Po="AnimationFrame",Mo=$a["request"+Po],xc=$a["cancel"+Po]||$a["cancelRequest"+Po],Cc=0;!Mo&&Cc<Lh.length;Cc++)Mo=$a[Lh[Cc]+"Request"+Po],xc=$a[Lh[Cc]+"Cancel"+Po]||$a[Lh[Cc]+"CancelRequest"+Po];if(!Mo||!xc){var Tp=0,_4=0,Ss=[],Jq=1e3/60;Mo=function(t){if(Ss.length===0){var e=Yq(),r=Math.max(0,Jq-(e-Tp));Tp=r+e,setTimeout(function(){var A=Ss.slice(0);Ss.length=0;for(var n=0;n<A.length;n++)if(!A[n].cancelled)try{A[n].callback(Tp)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return Ss.push({handle:++_4,callback:t,cancelled:!1}),_4},xc=function(t){for(var e=0;e<Ss.length;e++)Ss[e].handle===t&&(Ss[e].cancelled=!0)}}Ih.exports=function(t){return Mo.call($a,t)},Ih.exports.cancel=function(){xc.apply($a,arguments)},Ih.exports.polyfill=function(t){t||(t=$a),t.requestAnimationFrame=Mo,t.cancelAnimationFrame=xc};var Zq=Ih.exports;const Up=ix(Zq);var T4=`
|
|
378
|
-
\v\f\r \u2028\u2029\uFEFF`,
|
|
373
|
+
}`);if(this.dataset.body.length===0)throw new Error("vue-ui-table error: missing body data");this.isLoading=!0,this.promiseWithAsyncFunction(this.prepareBodyCopy,()=>{this.$forceUpdate(),this.isLoading=!1}),document.addEventListener("keydown",t=>{const e=document.activeElement;(e&&Array.from(e.classList).includes("td-focusable")&&t.key.includes("Arrow")||t.code==="Space")&&t.preventDefault()})},watch:{showChart:function(t){t&&this.$nextTick(()=>{this.closeDragElement();const e=this.$refs.chartModal;e.onmousedown=this.dragMouseDown})}},computed:{availableDonutCategories(){return Object.keys(this.multiselects).map(t=>({index:t,name:this.dataset.header[t].name,options:this.multiselects[t]}))},canChart(){return this.tableConfig.useChart&&this.currentSelectionSpan.rows.length>1},chartData(){if(!this.canChart)return[];const t=316,e=512,r=this.currentSelectionSpan.rows.length,A=e/r,n=Math.max(...this.currentSelectionSpan.rows.map(g=>g.value)),a=Math.min(...this.currentSelectionSpan.rows.map(g=>g.value)),i=a>=0?0:Math.abs(a),s=n+i,o=n<0&&a<0,l=this.dataset.header[this.currentSelectionSpan.col].isPercentage,c=this.currentSelectionSpan.rows.map((g,h)=>({x:A*h+A/2,y:(1-(g.value+i)/s)*t,value:l?g.value*100:g.value,suffix:l?"%":this.dataset.header[this.currentSelectionSpan.col].suffix?this.dataset.header[this.currentSelectionSpan.col].suffix:"",prefix:this.dataset.header[this.currentSelectionSpan.col].prefix?this.dataset.header[this.currentSelectionSpan.col].prefix:"",index:g.index,absoluteValue:l?Math.abs(g.value)*100:Math.abs(g.value)})),d=t-t*(i/s);return{isAllNegative:o,zero:d,plots:c,slot:A,progression:c.length>=2?this.calcChartProgression(c):!1}},donutHollowLabels(){return{total:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),average:Number((this.currentDonut.map(t=>t.absoluteValue).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},hasNumericTypes(){return this.dataset.header.map(t=>t.type).includes(this.constants.NUMERIC)},icons(){return{arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*1.6}" height="${this.iconSize*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize*.8}" height="${this.iconSize*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`}},pages(){const t=[];if(this.bodyCopy.length)for(let e=0;e<this.bodyCopy.length;e+=this.itemsPerPage)t.push(this.bodyCopy.slice(e,e+this.itemsPerPage));return t},rows(){return this.bodyCopy.map(t=>t.td)},selectedCellsCalculations(){return{sumPercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),sumRegular:Number(this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averagePercentage:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length*100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),averageRegular:Number((this.currentSelectionSpan.rows.map(t=>t.value).reduce((t,e)=>t+e,0)/this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()}},tableConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},visibleRows(){return this.pages[this.currentPage]}},methods:{treeShake:tc,makeDonut:zy,applyDonutOption(){const t=this.selectedDonutCategory.options.map((e,r)=>({name:e,color:this.palette[r]||this.palette[r%this.palette.length],value:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>Math.abs(A)+Math.abs(n),0),absoluteValue:this.visibleRows.filter((A,n)=>A.td[this.selectedDonutCategory.index]===e&&this.currentSelectionSpan.rows.map(a=>a.index).includes(n)).map(A=>A.td[this.currentSelectionSpan.col]).reduce((A,n)=>A+n,0)})).sort((e,r)=>r.value-e.value);this.currentDonut=this.makeDonut({series:t},50,50,30,30),this.$nextTick(()=>{this.chart.type=this.constants.DONUT,this.showDonutOptions=!1})},calcRectY(t,e){return t>=0?e:this.chartData.zero},canResetColumn(t,e){return!this.hasNaN[t]&&(e.isSort||e.isSearch||e.isMultiselect||e.rangeFilter)&&![this.constants.DATE].includes(e.type)},createXls(t="all"){const e=this.dataset.header.map(c=>c.name),r=t==="all"?this.bodyCopy.map(c=>c.td):this.visibleRows.map(c=>c.td),A=[e].concat(r);function n(c){let d=new ArrayBuffer(c.length),g=new Uint8Array(d);for(let h=0;h<c.length;h++)g[h]=c.charCodeAt(h)&255;return d}const a=Tn.book_new(),i=Tn.aoa_to_sheet(A);Tn.book_append_sheet(a,i,"Sheet1");const s=Zl(a,{bookType:"xlsx",type:"binary"}),o=new Blob([n(s)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=window.URL.createObjectURL(o),l.download="data.xlsx",l.click(),window.URL.revokeObjectURL(l.href),this.isExportRequest=!1},calcChartProgression(t){let e,r,A,n;const a=t.length;let i=0,s=0,o=0,l=0;for(const{x:g,y:h}of t)i+=g,s+=h,o+=g*h,l+=g*g;const c=(a*o-i*s)/(a*l-i*i),d=(s-c*i)/a;return e=t[0].x,A=t[a-1].x,r=c*e+d,n=c*A+d,{x1:e,y1:r,x2:A,y2:n,slope:c}},closeAllDropdowns(){const t=document.getElementsByClassName("th-dropdown");t.length&&Array.from(t).forEach(e=>{e.dataset.isOpen=!1})},debounce(t,e){let r;clearTimeout(r),r=setTimeout(t,e)},filterBody(){this.bodyCopy=this.tableBody.filter(t=>{for(const e in this.searches)if(!t.td[e].toUpperCase().includes(this.searches[e].toUpperCase()))return!1;for(const e in this.multiselects)if(!this.multiselects[e].some(A=>A===t.td[e]))return!1;for(const e in this.dates){const r=new Date(t.td[e]),A=new Date(this.dates[e].from),n=new Date(this.dates[e].to);if(r<A||r>n)return!1}return!0}),this.sortBody()},getAverage(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)/this.bodyCopy.length},getDatesRange(t){const e=this.dataset.body.map(g=>new Date(g.td[t])),r=new Date(Math.min(...e)),A=new Date(Math.max(...e)),n=r.getFullYear(),a=A.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(A.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0"),l=String(A.getDate()).padStart(2,"0"),c=`${n}-${i}-${o}`,d=`${a}-${s}-${l}`;return{from:c,to:d}},getDonutLegendValue(t){return Number((t*(this.dataset.header[this.currentSelectionSpan.col].isPercentage?100:1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()},getDropdownOptions(t){return[...new Set(this.dataset.body.map(e=>e.td[t]))]},getSum(t){return this.rows.map(e=>e[t]).map(e=>isNaN(Number(e))?0:e).reduce((e,r)=>e+r,0)},includesNaN(t){return t.includes(NaN)},isDropdownOptionSelected(t,e){return this.multiselects[e]?this.multiselects[e].includes(t):!0},isNumeric(t){return!isNaN(Number(String(t).replaceAll("%","")))},isResetDisabled(t,e){const r=e.isSort,A=e.isSearch,n=e.isMultiselect&&this.multiselects[t],a=e.rangeFilter,i=s=>{if(a&&this.rangeFilters[s])return Math.round(this.rangeFilters[s].min)===this.immutableRangeFilters[s].min&&Math.round(this.rangeFilters[s].max)===this.immutableRangeFilters[s].max};if(r&&A&&n&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&A&&n)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(r&&A&&a)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t])&&i(t);if(r&&A)return["",void 0].includes(this.searches[t])&&[void 0].includes(this.sorts[t]);if(r&&n&&a)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(r&&n)return[void 0].includes(this.sorts[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&n&&a)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(A&&n)return["",void 0].includes(this.searches[t])&&this.multiselects[t].length===this.getDropdownOptions(t).length;if(A&&a)return["",void 0].includes(this.searches[t])&&i(t);if(A)return["",void 0].includes(this.searches[t]);if(r&&a)return[void 0].includes(this.sorts[t])&&i(t);if(r)return[void 0].includes(this.sorts[t]);if(n&&a)return this.multiselects[t].length===this.getDropdownOptions(t).length&&i(t);if(n)return this.multiselects[t].length===this.getDropdownOptions(t).length},navigate(t){this.resetSelection(),t==="next"&&this.currentPage<this.pages.length?this.currentPage+=1:t==="previous"&&this.currentPage>=1?this.currentPage-=1:this.currentPage=t-1,this.$refs.tableWrapper.scrollTo({top:0,left:0,behavior:"smooth"})},navigateCell(t){t.preventDefault();const e=t.keyCode,r=38,A=40,n=37,a=39;if(![r,A,n,a].includes(e))return;const i=t.target.id,s=/cell_(\d+)_(\d+)_vue-ui-table-(\d+)/,o=i.match(s),l=parseInt(o[1]),c=parseInt(o[2]),d=document.getElementById(`cell_${l}_${c+1}_${this.uid}`),g=document.getElementById(`cell_${l}_${c-1}_${this.uid}`),h=document.getElementById(`cell_${l+1}_${c}_${this.uid}`),p=document.getElementById(`cell_${l-1}_${c}_${this.uid}`);let v;switch(!0){case e===a:v=d;break;case e===n:v=g;break;case e===r:v=p;break;case e===A:v=h;break;default:return}v&&(v.focus(),v.scrollIntoView({behavior:"smooth",block:"center"}))},openDonutOptions(){this.selectedDonutCategory=this.availableDonutCategories[0],this.showDonutOptions=!0},placeLabelOnTopOrBottom({previousPlot:t,currentPlot:e,nextPlot:r}){const A=e.y-38,n=e.y+16;return t&&r?t.value<e.value&&r.value<e.value?A:t.value>e.value&&r.value>e.value?n:(t.value>e.value&&r.value<e.value||t.value<e.value&&r.value>e.value,A):t&&!r?t.value>e.value?n:A:!t&&r&&r.value>e.value?n:A},async prepareBodyCopy(){return new Promise(t=>{const e=[];this.tableHead.forEach((r,A)=>{if(r.isSearch&&Object.assign(this.searches,{[A]:""}),r.isMultiselect&&Object.assign(this.multiselects,{[A]:this.getDropdownOptions(A)}),r.type===this.constants.DATE&&(Object.assign(this.dates,{[A]:this.getDatesRange(A)}),Object.assign(this.filteredDatesIndexes,{[A]:!1})),(r.isPercentage||r.percentageTo)&&Object.assign(this.percentages,{[A]:{reference:r.percentageTo,referenceIndex:this.dataset.header.map(n=>n.name).indexOf(r.percentageTo)}}),r.rangeFilter&&(Object.assign(this.rangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}}),Object.assign(this.immutableRangeFilters,{[A]:{min:Math.round(Math.min(...this.dataset.body.map(n=>n.td).map(n=>n[A]))),max:Math.round(Math.max(...this.dataset.body.map(n=>n.td).map(n=>n[A])))}})),r.isPercentage){const n=this.dataset.header.map(i=>i.name).indexOf(r.percentageTo),a=this.dataset.body.map(i=>i.td[n]).reduce((i,s)=>i+s,0);e.push([A,n,a])}r.type===this.constants.NUMERIC&&!r.isPercentage&&Object.assign(this.hasNaN,{[A]:this.includesNaN(this.dataset.body.map(n=>Number(n.td[A])))})}),this.bodyCopy.forEach((r,A)=>{e.map(n=>{const[a,i,s]=n;r.td[a]=r.td[i]/s}),r.td.forEach((n,a)=>{this.dataset.header[a].type===this.constants.TEXT&&this.dataset.header[a].isSearch&&(r[a]=this.stringToNumber(n)),this.dataset.header[a].type===this.constants.DATE&&(r[a]=new Date(n).getTime()),this.dataset.header[a].type===this.constants.NUMERIC&&(r[a]=isNaN(Number(n))?a:n),this.tableBody[A][a]=r[a]})}),t(!0)})},promiseWithAsyncFunction(t,e){return new Promise((r,A)=>{t().then(n=>{try{const a=e(n);r(a)}catch(a){A(a)}}).catch(n=>{A(n)})})},resetDates(t){this.dates[t]={from:this.getDatesRange(t).from,to:this.getDatesRange(t).to},this.filteredDatesIndexes[t]=!1,this.$forceUpdate(),this.filterBody()},resetFilter(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200),this.currentFilter=void 0,e.rangeFilter&&(this.rangeFilters[t].min=this.immutableRangeFilters[t].min,this.rangeFilters[t].max=this.immutableRangeFilters[t].max),e.isMultiselect?(this.multiselects[t]=this.getDropdownOptions(t),e.type===this.constants.TEXT&&(this.sorts[t]=void 0),e.isSearch&&(this.searches[t]="")):e.type===this.constants.NUMERIC?this.sorts[t]=void 0:e.type===this.constants.TEXT?(this.sorts[t]=void 0,this.searches[t]=""):e.type===this.constants.DATE&&(this.sorts[t]=void 0),this.filterBody()},resetSelection(){const t=document.getElementsByClassName(`tr_${this.uid}`);Array.from(t).forEach(e=>{Array.from(e.getElementsByTagName("td")).forEach(r=>{r.dataset.row==="even"?(r.style.background=this.tableConfig.style.rows.even.backgroundColor,r.style.color=this.tableConfig.style.rows.even.color):(r.style.background=this.tableConfig.style.rows.odd.backgroundColor,r.style.color=this.tableConfig.style.rows.odd.color)})}),Array.from(t).forEach(e=>e.dataset.selected="false"),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),this.showChart=!1,this.currentDonut=void 0,this.selectedColumn=void 0,this.chart.type=this.constants.BAR,this.currentSelectionSpan={col:void 0,rows:[]},this.clientX=100,this.clientY=100},selectColumn(t){this.currentSelectionSpan.col!==t?(this.visibleRows.forEach((e,r)=>{this.selectTd({td:e.td[t],rowIndex:r,colIndex:t,headerType:this.constants.NUMERIC,event:{currentTarget:document.getElementById(`cell_${r}_${t}_${this.uid}`)}})}),this.selectedColumn=t):(this.selectedColumn=void 0,this.resetSelection())},selectDropdownOption(t,e){this.multiselects[e].includes(t)?this.multiselects[e]=this.multiselects[e].filter(r=>r!==t):this.multiselects[e].push(t),this.$forceUpdate(),this.filterBody()},selectTd({td:t,rowIndex:e,colIndex:r,headerType:A,event:n}){if(A!==this.constants.NUMERIC||isNaN(Number(t))){this.resetSelection();return}this.currentSelectionSpan.col!==r&&this.resetSelection();const a=n.currentTarget.parentNode;this.currentSelectionSpan.col=r,this.currentSelectionSpan.rows.map(i=>i.index).includes(e)?(a.dataset.selected="false",this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.filter(i=>i.index!==e),n.currentTarget.classList.remove(this.cssClass.CELL),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.backgroundColor,i.style.color=this.tableConfig.style.rows.even.olor):(i.style.background=this.tableConfig.style.rows.odd.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.color)}),n.currentTarget.dataset.row==="even"?(n.currentTarget.style.background=this.tableConfig.style.rows.even.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.color):(n.currentTarget.style.background=this.tableConfig.style.rows.odd.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.color)):(a.dataset.selected="true",this.currentSelectionSpan.rows.push({index:e,value:t}),Array.from(a.children).forEach((i,s)=>{i.dataset.row==="even"?(i.style.background=this.tableConfig.style.rows.even.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.even.selectedNeighbors.color):(i.style.background=this.tableConfig.style.rows.odd.selectedNeighbors.backgroundColor,i.style.color=this.tableConfig.style.rows.odd.selectedNeighbors.color)}),n.currentTarget.dataset.row==="odd"?(n.currentTarget.style.background=this.tableConfig.style.rows.odd.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.odd.selectedCell.color):(n.currentTarget.style.background=this.tableConfig.style.rows.even.selectedCell.backgroundColor,n.currentTarget.style.color=this.tableConfig.style.rows.even.selectedCell.color)),this.currentSelectionSpan.rows=this.currentSelectionSpan.rows.sort((i,s)=>i.index-s.index),this.chart.type===this.constants.DONUT&&this.currentSelectionSpan.rows.length>0&&this.applyDonutOption()},setFilterDatesIndexes(t){this.filteredDatesIndexes[t]=!(this.getDatesRange(t).from===this.dates[t].from&&this.getDatesRange(t).to===this.dates[t].to)},sortBody(){this.resetSelection(),Object.keys(this.rangeFilters).forEach(t=>{this.filterByRange(this.bodyCopy,t)}),Object.keys(this.sorts).forEach(t=>{this.sortByNumber(this.bodyCopy,t)}),this.currentFilter!==void 0&&this.sortByNumber(this.bodyCopy,this.currentFilter),this.dataset.header.forEach((t,e)=>{if(t.isPercentage){const r=this.percentages[e].referenceIndex,A=this.bodyCopy.map(n=>n.td[r]).reduce((n,a)=>n+a,0);this.bodyCopy.forEach(n=>{n.td[e]=n.td[r]/A})}}),this.currentPage>this.pages.length-1&&(this.currentPage=this.pages.length-1),[-1].includes(this.currentPage)&&(this.currentPage=0),this.$forceUpdate()},filterByRange(t,e){this.bodyCopy=t.filter(r=>r.td[e]>=this.rangeFilters[e].min&&r[e]<=this.rangeFilters[e].max)},sortByNumber(t,e){if(this.sorts[e]===this.constants.ASC&&(t=t.sort((r,A)=>r[e]-A[e])),this.sorts[e]===this.constants.DESC)t=t.sort((r,A)=>A[e]-r[e]);else return 0},sortTh(t,e){this.currentFilter=t;const r=e.currentTarget;clearTimeout(this.buttonTimeout),r.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{r.classList.remove("clicked")},200),this.sorts[t]===1?this.sorts[t]=this.constants.DESC:this.sorts[t]=this.constants.ASC,this.sortBody()},stringToNumber(t){let e=0;for(let r=0;r<t.length;r+=1)e+=t.charCodeAt(r);return e},toggleMultiselect(t,e,r){const A=r.currentTarget;clearTimeout(this.buttonTimeout),A.classList.add("clicked"),this.buttonTimeout=setTimeout(()=>{A.classList.remove("clicked")},200);const n=document.getElementById(`th_dropdown_${t}`);n.dataset.isOpen==="false"?n.dataset.isOpen="true":n.dataset.isOpen="false"},updateCurrentPage(t){this.resetSelection(),this.currentPage=Number(t.target.value)},calcDonutMarkerConnectorColor(t){return t.proportion*100>3?t.color:"transparent"},calcDonutMarkerLabelPositionX(t){return t.center.endX+this.calcMarkerOffset(t,50)},calcMarkerOffset(t,e){return t.center.endX-e>=0?3:-2},displayArcPercentage(t,e){return isNaN(t.value/this.sumValues(e))?0:(t.value/this.sumValues(e)*100).toFixed(0)+"%"},isArcBigEnough(t){return t.proportion*100>3},sumValues(t){return[...t].map(e=>e.value).reduce((e,r)=>e+r,0)},closeDragElement(){document.onmouseup=null,document.onmousemove=null},dragMouseDown(t){t=t||window.event,t.preventDefault(),document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag(t){this.rafId||(this.rafId=window.requestAnimationFrame(()=>this.onElementDrag(t)))},onElementDrag(t){t=t||window.event,t.preventDefault();const r=this.$refs.chartModal.getBoundingClientRect();this.clientX=t.clientX-r.width/2,this.clientY=t.clientY-r.height/2,this.rafId=null}}},Xn=t=>(f.pushScopeId("data-v-80d709a0"),t=t(),f.popScopeId(),t),iP={class:"vue-ui-table-export-hub"},sP=["innerHTML"],oP=["data-is-open"],lP=Xn(()=>f.createElementVNode("b",{class:"vue-ui-table-export-hub-title"}," Export ",-1)),cP={class:"vue-ui-table-export-hub-options"},fP={class:"vue-ui-table-export-hub-option-wrapper"},uP={class:"label"},hP=["innerHTML"],dP={class:"vue-ui-table-export-hub-option-wrapper"},gP={class:"label"},pP=["innerHTML"],mP={class:"vue-ui-table"},vP={id:"tableHead"},wP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),BP={key:0},yP={key:0},xP={key:1},CP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),bP={key:0,style:{display:"flex","align-items":"center","justify-content":"flex-end"}},EP=["innerHTML"],FP={key:0,style:{"margin-left":"3px"}},SP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),_P={key:0},TP=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),UP={class:"th-filter"},NP={key:0,class:"th-date"},IP={class:"date-wrapper--inputs"},LP={class:"date-fieldset"},kP=["for"],QP=["id","onUpdate:modelValue","onInput"],OP={class:"date-fieldset"},DP=["for"],PP=["id","onUpdate:modelValue","onInput"],MP={class:"date-wrapper--button"},RP=["onClick"],HP=["innerHTML"],VP=["innerHTML"],KP=["innerHTML"],GP=["onClick","disabled"],jP=["placeholder","onUpdate:modelValue","name"],zP=["onClick"],WP=["innerHTML"],XP=["innerHTML"],$P=["innerHTML"],qP=["onClick","innerHTML"],YP=["innerHTML"],JP={key:5,class:"th-range-filter"},ZP=["for"],e7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒥ",-1)),t7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒣ",-1)),r7=["id","max","min","onUpdate:modelValue"],A7=["id","max","min","onUpdate:modelValue"],n7=["for"],a7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒪ",-1)),i7=Xn(()=>f.createElementVNode("span",{style:{color:"grey"}},"ᒧ",-1)),s7=["onClick","disabled"],o7=["id"],l7=["onClick"],c7=["onClick","onKeyup"],f7=Xn(()=>f.createElementVNode("th",{class:"invisible-cell"},null,-1)),u7=["innerHTML","onClick","onKeyup"],h7=["data-row"],d7=["data-row"],g7=["data-row","onClick","onKeyup","id"],p7=["innerHTML"],m7={key:1},v7={key:2},w7={key:5},B7=["innerHTML"],y7={key:0},x7={style:{"margin-left":"12px"}},C7={class:"format-num"},b7={style:{"margin-left":"12px"}},E7={key:0,class:"format-num"},F7={key:1,class:"format-num"},S7={key:2},_7={style:{"margin-left":"12px"}},T7={key:0,class:"format-num"},U7={key:1,class:"format-num"},N7={key:2},I7={key:0,class:"vue-ui-table-paginator format-num"},L7={key:1,class:"vue-ui-table-size-warning"},k7=["innerHTML"],Q7={key:3,class:"vue-ui-table-pagination format-num"},O7=["innerHTML","disabled"],D7=["disabled"],P7={key:0,class:"vue-ui-table-page-scroller-wrapper"},M7={for:"pageScroller",style:{"font-size":"14px"}},R7=["max","value"],H7={key:1},V7=["disabled"],K7=["innerHTML","disabled"],G7={class:"chart-modal-options"},j7=["innerHTML"],z7=["innerHTML"],W7=["innerHTML"],X7={style:{"margin-bottom":"12px"}},$7={key:0},q7={key:1},Y7={style:{width:"100%",height:"fit-content",cursor:"move"},ref:"chartModal"},J7={class:"vue-ui-table-fieldset"},Z7={class:"vue-ui-table-fieldset-wrapper"},eM=["name","id","checked","onInput"],tM=["for"],rM=["disabled"],AM=["innerHTML"],nM=["viewBox"],aM=["markerWidth","markerHeight","refY"],iM=["points","fill"],sM=["x2","y1","y2","stroke","stroke-width"],oM=["y2","stroke","stroke-width"],lM=["x","width","height","fill"],cM=f.createStaticVNode('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD80" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD80" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DDB3" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DD66" data-v-80d709a0></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-80d709a0><stop offset="0.2" stop-color="#6376DD66" data-v-80d709a0></stop><stop offset="1" stop-color="#6376DDB3" data-v-80d709a0></stop></linearGradient>',4),fM=["x","y","height","width","fill","stroke"],uM=["x","y","width"],hM=["x1","y1","x2","y2","stroke-width","stroke"],dM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],gM=["cx","cy","r","fill","stroke","stroke-width"],pM=["x","y","width"],mM=["x","width","height","onMouseenter"],vM=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],wM=Xn(()=>f.createElementVNode("span",null,"---",-1)),BM=["d","stroke"],yM=["x","y"],xM={class:"vue-ui-table-donut-label-name"},CM=["fill"],bM=["fill"],EM=["fill"],FM=["fill"],SM={class:"vue-ui-table-donut-legend"};function _M(t,e,r,A,n,a){return f.openBlock(),f.createElementBlock("div",{class:"vue-ui-table-main",style:f.normalizeStyle(`font-family: ${a.tableConfig.fontFamily}`)},[f.createElementVNode("div",iP,[f.createElementVNode("button",{onClick:e[0]||(e[0]=i=>n.isExportRequest=!n.isExportRequest),innerHTML:a.icons.export,style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},null,12,sP),f.createElementVNode("div",{class:"vue-ui-table-export-hub-dropdown","data-is-open":n.isExportRequest||"false",style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.backgroundColor};color:${a.tableConfig.style.exportMenu.color}`)},[lP,f.createElementVNode("button",{class:"close-dropdown",onClick:e[1]||(e[1]=i=>n.isExportRequest=!1),style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),f.createElementVNode("div",cP,[f.createElementVNode("div",fP,[f.createElementVNode("div",uP,f.toDisplayString(a.tableConfig.translations.exportAllLabel)+" ("+f.toDisplayString(n.bodyCopy.length)+") ",1),f.createElementVNode("button",{id:"exportAll",onClick:e[2]||(e[2]=i=>a.createXls("all")),style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[f.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,hP),f.createElementVNode("span",null,f.toDisplayString(a.tableConfig.translations.exportAllButton),1)],4)]),f.createElementVNode("div",dP,[f.createElementVNode("div",gP,f.toDisplayString(a.tableConfig.translations.exportPageLabel),1),f.createElementVNode("button",{id:"exportPage",onClick:e[3]||(e[3]=i=>a.createXls("page")),style:f.normalizeStyle(`background:${a.tableConfig.style.exportMenu.buttons.backgroundColor};color:${a.tableConfig.style.exportMenu.buttons.color}`)},[f.createElementVNode("div",{innerHTML:a.icons.fileDownload},null,8,pP),f.createElementVNode("span",null,f.toDisplayString(a.tableConfig.translations.exportPageButton),1)],4)])])],12,oP)]),f.createElementVNode("div",{class:"vue-ui-table__wrapper",style:f.normalizeStyle(`max-height:${a.tableConfig.maxHeight}px`),ref:"tableWrapper"},[f.createElementVNode("table",mP,[f.createElementVNode("thead",vP,[f.createElementVNode("tr",null,[wP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,style:f.normalizeStyle(`overflow: visible;background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`),class:f.normalizeClass({"th-has-nan":n.hasNaN[s]})},[a.hasNumericTypes&&([n.constants.TEXT,n.constants.DATE].includes(i.type)||i.isPercentage)?(f.openBlock(),f.createElementBlock("span",BP,[f.createTextVNode(f.toDisplayString(i.name)+" ",1),i.isPercentage?(f.openBlock(),f.createElementBlock("span",yP," / "+f.toDisplayString(i.percentageTo),1)):f.createCommentVNode("",!0)])):(f.openBlock(),f.createElementBlock("span",xP,f.toDisplayString(i.name),1))],6))),128))]),a.hasNumericTypes?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("tr",null,[CP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,class:f.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.sum&&!n.hasNaN[s]?(f.openBlock(),f.createElementBlock("span",bP,[f.createElementVNode("span",{innerHTML:a.icons.sum,style:{"margin-bottom":"-4px","margin-right":"3px"}},null,8,EP),f.createTextVNode(" "+f.toDisplayString(i.prefix)+" "+f.toDisplayString(Number(a.getSum(s).toFixed(i.decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix)+" ",1),n.percentages[s]&&i.percentageTo&&!i.isPercentage?(f.openBlock(),f.createElementBlock("span",FP," ("+f.toDisplayString(isNaN(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex))?"-":(a.getSum(s)/a.getSum(n.percentages[s].referenceIndex)*100).toFixed(i.decimals))+"%) ",1)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],6))),128))]),f.createElementVNode("tr",null,[SP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,class:f.normalizeClass({"th-numeric":!0,"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[i.average&&!n.hasNaN[s]?(f.openBlock(),f.createElementBlock("span",_P," ~ "+f.toDisplayString(i.prefix)+" "+f.toDisplayString(isNaN(a.getAverage(s))?"":Number(a.getAverage(s).toFixed(i.decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix),1)):f.createCommentVNode("",!0)],6))),128))]),f.createElementVNode("tr",null,[TP,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`thead_${s}`,class:f.normalizeClass({"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${a.tableConfig.style.th.backgroundColor};color:${a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[f.createElementVNode("div",UP,[i.type===n.constants.DATE&&n.dates[s]?(f.openBlock(),f.createElementBlock("div",NP,[f.createElementVNode("div",IP,[f.createElementVNode("div",LP,[f.createElementVNode("label",{for:`from_${s}`},f.toDisplayString(a.tableConfig.translations.from),9,kP),f.withDirectives(f.createElementVNode("input",{id:`from_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].from=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,QP),[[f.vModelText,n.dates[s].from]])]),f.createElementVNode("div",OP,[f.createElementVNode("label",{for:`to_${s}`},f.toDisplayString(a.tableConfig.translations.to),9,DP),f.withDirectives(f.createElementVNode("input",{id:`to_${s}`,type:"date","onUpdate:modelValue":o=>n.dates[s].to=o,onInput:o=>{a.filterBody(),a.setFilterDatesIndexes(s)},style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,PP),[[f.vModelText,n.dates[s].to]])])]),f.createElementVNode("div",MP,[i.isSort?(f.openBlock(),f.createElementBlock("button",{key:0,onClick:o=>a.sortTh(s,o),class:f.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:f.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(f.openBlock(),f.createElementBlock("span",{key:0,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort09:a.icons.sortAZ},null,8,HP)):n.sorts[s]===n.constants.DESC?(f.openBlock(),f.createElementBlock("span",{key:1,innerHTML:[n.constants.DATE].includes(i.type)?a.icons.sort90:a.icons.sortZA},null,8,VP)):(f.openBlock(),f.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,KP))],14,RP)):f.createCommentVNode("",!0),f.createElementVNode("button",{onClick:o=>{a.resetDates(s),a.resetFilter(s,i,o)},disabled:!n.filteredDatesIndexes[s]&&a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,GP)])])):f.createCommentVNode("",!0),i.isSearch?f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:1,placeholder:a.tableConfig.translations.inputPlaceholder,"onUpdate:modelValue":o=>n.searches[s]=o,onInput:e[4]||(e[4]=o=>a.debounce(a.filterBody,400)),name:`search_${s}`,style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,jP)),[[f.vModelText,n.searches[s]]]):f.createCommentVNode("",!0),!n.hasNaN[s]&&i.isSort&&i.type!==n.constants.DATE?(f.openBlock(),f.createElementBlock("button",{key:2,onClick:o=>a.sortTh(s,o),class:f.normalizeClass({"th-button-active":[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])}),style:f.normalizeStyle(`background:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${[n.constants.DESC,n.constants.ASC].includes(n.sorts[s])?"":a.tableConfig.style.pagination.buttons.color}`)},[n.sorts[s]===n.constants.ASC?(f.openBlock(),f.createElementBlock("span",{key:0,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort09:a.icons.sortZA},null,8,WP)):n.sorts[s]===n.constants.DESC?(f.openBlock(),f.createElementBlock("span",{key:1,innerHTML:[n.constants.NUMERIC].includes(i.type)?a.icons.sort90:a.icons.sortAZ},null,8,XP)):(f.openBlock(),f.createElementBlock("span",{key:2,innerHTML:a.icons.arrowSort},null,8,$P))],14,zP)):f.createCommentVNode("",!0),i.isMultiselect?(f.openBlock(),f.createElementBlock("button",{key:3,onClick:o=>a.toggleMultiselect(s,i,o),innerHTML:a.icons.filter,class:f.normalizeClass({"th-button-active":n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length}),style:f.normalizeStyle(`background:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.multiselects[s]&&n.multiselects[s].length!==a.getDropdownOptions(s).length?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,qP)):f.createCommentVNode("",!0),n.currentSelectionSpan.col===s&&a.canChart?(f.openBlock(),f.createElementBlock("button",{key:4,onClick:e[5]||(e[5]=o=>n.showChart=!n.showChart),innerHTML:a.icons.chart,class:f.normalizeClass({"th-button-active":n.showChart}),style:f.normalizeStyle(`background:${n.showChart?"":a.tableConfig.style.pagination.buttons.backgroundColor};color:${n.showChart?"":a.tableConfig.style.pagination.buttons.color}`)},null,14,YP)):f.createCommentVNode("",!0),i.rangeFilter&&n.rangeFilters[s]&&!n.hasNaN[s]?(f.openBlock(),f.createElementBlock("div",JP,[f.createElementVNode("label",{for:`rangeMin${s}`},[e7,f.createTextVNode(" min "),t7],8,ZP),f.withDirectives(f.createElementVNode("input",{type:"number",id:`rangeMin${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].min=o,onInput:e[6]||(e[6]=o=>a.debounce(a.filterBody,400)),style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,r7),[[f.vModelText,n.rangeFilters[s].min,void 0,{number:!0}]]),f.withDirectives(f.createElementVNode("input",{type:"number",id:`rangeMax${s}`,max:n.immutableRangeFilters[s].max,min:n.immutableRangeFilters[s].min,"onUpdate:modelValue":o=>n.rangeFilters[s].max=o,onInput:e[7]||(e[7]=o=>a.debounce(a.filterBody,400)),style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},null,44,A7),[[f.vModelText,n.rangeFilters[s].max,void 0,{number:!0}]]),f.createElementVNode("label",{for:`rangeMax${s}`},[a7,f.createTextVNode(" max "),i7],8,n7)])):f.createCommentVNode("",!0),a.canResetColumn(s,i)?(f.openBlock(),f.createElementBlock("button",{key:6,onClick:o=>a.resetFilter(s,i,o),disabled:a.isResetDisabled(s,i),class:"th-reset"}," ✖ ",8,s7)):f.createCommentVNode("",!0),i.isMultiselect?(f.openBlock(),f.createElementBlock("div",{key:7,class:"th-dropdown","data-is-open":"false",id:`th_dropdown_${s}`,style:f.normalizeStyle(`background:${a.tableConfig.style.dropdowns.backgroundColor};color:${a.tableConfig.style.dropdowns.color}`)},[f.createElementVNode("button",{class:"close-dropdown",onClick:o=>a.toggleMultiselect(s,i,o),style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color}`)}," ✖ ",12,l7),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.getDropdownOptions(s),(o,l)=>(f.openBlock(),f.createElementBlock("span",{class:"th-option",key:`th_option_${s}_${l}`,onClick:c=>a.selectDropdownOption(o,s),onKeyup:[f.withKeys(c=>a.selectDropdownOption(o,s),["enter"]),f.withKeys(c=>a.selectDropdownOption(o,s),["space"])],style:f.normalizeStyle(`opacity:${a.isDropdownOptionSelected(o,s)?1:.5}`),tabindex:"0"},[a.isDropdownOptionSelected(o,s)?(f.openBlock(),f.createElementBlock("span",{key:0,style:f.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.selected.color};margin-right:5px`),class:"th-icon-green"},f.toDisplayString(a.tableConfig.style.dropdowns.icons.selected.unicode),5)):(f.openBlock(),f.createElementBlock("span",{key:1,style:f.normalizeStyle(`color:${a.tableConfig.style.dropdowns.icons.unselected.color};margin-right:5px`),class:"th-icon-red"},f.toDisplayString(a.tableConfig.style.dropdowns.icons.unselected.unicode),5)),f.createElementVNode("span",null,f.toDisplayString(o),1)],44,c7))),128))],12,o7)):f.createCommentVNode("",!0)])],6))),128))])],64)):f.createCommentVNode("",!0),f.createElementVNode("tr",null,[f7,(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.tableHead,(i,s)=>(f.openBlock(),f.createElementBlock("th",{key:`col_selector_${s}`,class:f.normalizeClass({"vue-ui-table-col-selector":!n.hasNaN[s],"th-has-nan":n.hasNaN[s]}),style:f.normalizeStyle(`background:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.backgroundColor:a.tableConfig.style.th.backgroundColor};color:${s===n.selectedColumn&&!n.hasNaN[s]?a.tableConfig.style.th.selected.color:a.tableConfig.style.th.color};outline:${a.tableConfig.style.th.outline}`)},[n.hasNaN[s]?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",{key:0,innerHTML:n.tableHead[s].type===n.constants.NUMERIC?a.icons.chevronDown:"",class:f.normalizeClass({"col-selector":n.tableHead[s].type===n.constants.NUMERIC}),tabindex:"0",onClick:f.withModifiers(o=>a.selectColumn(s),["stop"]),onKeyup:f.withKeys(o=>a.selectColumn(s),["enter"])},null,42,u7))],6))),128))])]),f.createElementVNode("tbody",{onClick:e[8]||(e[8]=(...i)=>a.closeAllDropdowns&&a.closeAllDropdowns(...i)),onKeydown:e[9]||(e[9]=i=>a.navigateCell(i))},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.visibleRows,(i,s)=>(f.openBlock(),f.createElementBlock("tr",{key:`tbody_${s}`,"data-row":s%2===0?"odd":"even",class:f.normalizeClass(`tr_${n.uid}`),style:f.normalizeStyle(`${s%2===0?`background:${a.tableConfig.style.rows.odd.backgroundColor};color:${a.tableConfig.style.rows.odd.color}`:`background:${a.tableConfig.style.rows.even.backgroundColor};color:${a.tableConfig.style.rows.even.color}`}`)},[f.createElementVNode("td",{class:"vue-ui-table-td-iteration","data-row":s%2===0?"odd":"even"},f.toDisplayString(i.absoluteIndex+1),9,d7),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.td,(o,l)=>(f.openBlock(),f.createElementBlock("td",{"data-row":s%2===0?"odd":"even",key:`td_${s}_${l}`,style:f.normalizeStyle(a.isNumeric(o)||r.dataset.header[l].type===n.constants.DATE?"text-align:right;font-variant-numeric: tabular-nums;":""),onClick:c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),onKeyup:[f.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["enter"]),f.withKeys(c=>a.selectTd({td:o,rowIndex:s,colIndex:l,headerType:r.dataset.header[l].type,event:c}),["space"])],class:f.normalizeClass({"td-numeric":r.dataset.header[l].type===n.constants.NUMERIC,"td-focusable":!0,"td-has-nan":n.hasNaN[l]}),id:`cell_${s}_${l}_${n.uid}`,tabindex:"0"},[i.meta&&i.meta.markerIndices.includes(l)&&i.meta.unicodeIcon?(f.openBlock(),f.createElementBlock("span",{key:0,style:f.normalizeStyle(`color:${i.meta.color};margin-right:3px`),innerHTML:i.meta.unicodeIcon},null,12,p7)):f.createCommentVNode("",!0),r.dataset.header[l].type===n.constants.DATE?(f.openBlock(),f.createElementBlock("span",m7,f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(new Date(o).toLocaleString().slice(0,10))+" "+f.toDisplayString(r.dataset.header[l].suffix),1)):r.dataset.header[l].isPercentage?(f.openBlock(),f.createElementBlock("span",v7,f.toDisplayString(Number((o*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"% ",1)):n.percentages[l]&&r.dataset.header[l].percentageTo&&!r.dataset.header[l].isPercentage?(f.openBlock(),f.createElementBlock("span",{key:3,class:f.normalizeClass({"td-nan":isNaN(Number(o))})},f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+f.toDisplayString(r.dataset.header[l].suffix)+" ("+f.toDisplayString(isNaN(Number(o))?"":Number((o/a.getSum(n.percentages[l].referenceIndex)*100).toFixed(r.dataset.header[l].decimals)).toLocaleString())+"%) ",3)):r.dataset.header[l].type===n.constants.NUMERIC?(f.openBlock(),f.createElementBlock("span",{key:4,class:f.normalizeClass({"td-nan":isNaN(Number(o))})},f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(isNaN(Number(o))?`${o} is not ${n.constants.NUMERIC}`:Number(o.toFixed(r.dataset.header[l].decimals)).toLocaleString())+" "+f.toDisplayString(r.dataset.header[l].suffix),3)):(f.openBlock(),f.createElementBlock("span",w7,f.toDisplayString(r.dataset.header[l].prefix)+" "+f.toDisplayString(o)+" "+f.toDisplayString(r.dataset.header[l].suffix),1))],46,g7))),128))],14,h7))),128))],32)])],4),f.createElementVNode("div",{class:f.normalizeClass({"td-selector-info":!0,"td-selector-info--active":n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length}),style:f.normalizeStyle(`background:${a.tableConfig.style.infoBar.backgroundColor};color:${a.tableConfig.style.infoBar.color}`)},[n.currentSelectionSpan.col!==void 0&&n.currentSelectionSpan.rows.length?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",{innerHTML:a.icons.table,class:"td-selector-icon"},null,8,B7),f.createElementVNode("span",null,[f.createElementVNode("b",null,[f.createTextVNode(f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("span",y7," / "+f.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):f.createCommentVNode("",!0)]),f.createElementVNode("span",x7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.nb)+" : ",1),f.createElementVNode("b",C7,f.toDisplayString(n.currentSelectionSpan.rows.length),1)]),f.createElementVNode("span",b7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.sum)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",E7,f.toDisplayString(a.selectedCellsCalculations.sumPercentage),1)):(f.openBlock(),f.createElementBlock("b",F7,f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.selectedCellsCalculations.sumRegular)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",S7,"%")):f.createCommentVNode("",!0)]),f.createElementVNode("span",_7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.average)+" : ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",T7,f.toDisplayString(a.selectedCellsCalculations.averagePercentage),1)):(f.openBlock(),f.createElementBlock("b",U7,f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.selectedCellsCalculations.averageRegular)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1)),r.dataset.header[n.currentSelectionSpan.col].isPercentage?(f.openBlock(),f.createElementBlock("b",N7,"%")):f.createCommentVNode("",!0)])]),f.createElementVNode("button",{onClick:e[10]||(e[10]=(...i)=>a.resetSelection&&a.resetSelection(...i)),class:"td-selector-info-reset",style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4)],64)):f.createCommentVNode("",!0)],6),n.bodyCopy.length>10?(f.openBlock(),f.createElementBlock("div",I7,[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.totalRows)+" : "+f.toDisplayString(r.dataset.body.length)+" | "+f.toDisplayString(a.tableConfig.translations.paginatorLabel)+" : ",1),n.bodyCopy.length>10?f.withDirectives((f.openBlock(),f.createElementBlock("select",{key:0,id:"paginatorSelector","onUpdate:modelValue":e[11]||(e[11]=i=>n.itemsPerPage=i),onChange:e[12]||(e[12]=(...i)=>a.resetSelection&&a.resetSelection(...i)),style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.paginatorOptions,(i,s)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[n.bodyCopy.length>i||r.dataset.body.length===i?(f.openBlock(),f.createElementBlock("option",{key:`paginator_option_${s}`},f.toDisplayString(i),1)):f.createCommentVNode("",!0)],64))),256))],36)),[[f.vModelSelect,n.itemsPerPage,void 0,{number:!0}]]):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),n.itemsPerPage>=250?(f.openBlock(),f.createElementBlock("div",L7,[f.createElementVNode("span",{innerHTML:a.icons.warning},null,8,k7),f.createTextVNode(f.toDisplayString(a.tableConfig.translations.sizeWarning),1)])):f.createCommentVNode("",!0),a.pages.length>1&&a.pages.length<=10?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-table-navigation-indicator",style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.navigationIndicator.backgroundColor};width:calc(${n.currentPage/(a.pages.length-1)*100}%)`)},null,4)):f.createCommentVNode("",!0),a.pages.length>1?(f.openBlock(),f.createElementBlock("div",Q7,[f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[13]||(e[13]=f.withModifiers(i=>a.navigate("previous"),["stop"])),innerHTML:a.icons.chevronLeft,disabled:n.currentPage===0,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,O7),a.pages.length>3?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[14]||(e[14]=f.withModifiers(i=>a.navigate(1),["stop"])),disabled:n.currentPage===0,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===0?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)}," 1 ",12,D7),a.pages.length>10?(f.openBlock(),f.createElementBlock("div",P7,[f.createElementVNode("label",M7,f.toDisplayString(a.tableConfig.translations.page)+" "+f.toDisplayString(n.currentPage+1)+" / "+f.toDisplayString(a.pages.length),1),f.createElementVNode("input",{class:"vue-ui-table-page-scroller",id:"pageScroller",type:"range",step:"1",min:0,max:a.pages.length-1,onInput:e[15]||(e[15]=i=>a.updateCurrentPage(i)),value:n.currentPage,style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,R7)])):(f.openBlock(),f.createElementBlock("span",H7,f.toDisplayString(a.tableConfig.translations.page)+" "+f.toDisplayString(n.currentPage+1)+" / "+f.toDisplayString(a.pages.length),1)),f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[16]||(e[16]=f.withModifiers(i=>a.navigate(a.pages.length),["stop"])),disabled:n.currentPage===a.pages.length-1,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},f.toDisplayString(a.pages.length),13,V7)],64)):(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createTextVNode(f.toDisplayString(a.tableConfig.translations.page)+" "+f.toDisplayString(n.currentPage+1)+" / "+f.toDisplayString(a.pages.length),1)],64)),f.createElementVNode("button",{class:"vue-ui-table-navigation",onClick:e[17]||(e[17]=f.withModifiers(i=>a.navigate("next"),["stop"])),innerHTML:a.icons.chevronRight,disabled:n.currentPage===a.pages.length-1,style:f.normalizeStyle(`background:${a.tableConfig.style.pagination.buttons.backgroundColor};color:${a.tableConfig.style.pagination.buttons.color};opacity:${n.currentPage===a.pages.length-1?a.tableConfig.style.pagination.buttons.opacityDisabled:1}`)},null,12,K7)])):f.createCommentVNode("",!0),n.showChart&&a.canChart?(f.openBlock(),f.createElementBlock("div",{key:4,class:"vue-ui-table-chart-modal",style:f.normalizeStyle(`top:${n.clientY}px; left:${n.clientX}px;background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[f.createElementVNode("button",{class:"close-chart-modal",onClick:e[18]||(e[18]=i=>n.showChart=!1),style:f.normalizeStyle(`background:${a.tableConfig.style.closeButtons.backgroundColor};color:${a.tableConfig.style.closeButtons.color};border-radius:${a.tableConfig.style.closeButtons.borderRadius}`)}," ✖ ",4),f.createElementVNode("div",G7,[a.availableDonutCategories.length?(f.openBlock(),f.createElementBlock("button",{key:0,onClick:e[19]||(e[19]=i=>n.showDonutOptions=!0),innerHTML:a.icons.donut,class:f.normalizeClass({"is-active-chart":n.chart.type===n.constants.DONUT||n.showDonutOptions}),style:f.normalizeStyle(`background:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.DONUT||n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,j7)):f.createCommentVNode("",!0),f.createElementVNode("button",{onClick:e[20]||(e[20]=i=>{n.chart.type=n.constants.LINE,n.showDonutOptions=!1}),innerHTML:a.icons.chart,class:f.normalizeClass({"is-active-chart":n.chart.type===n.constants.LINE&&!n.showDonutOptions}),style:f.normalizeStyle(`background:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.LINE&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,z7),f.createElementVNode("button",{onClick:e[21]||(e[21]=i=>{n.chart.type=n.constants.BAR,n.showDonutOptions=!1}),innerHTML:a.icons.bar,class:f.normalizeClass({"is-active-chart":n.chart.type===n.constants.BAR&&!n.showDonutOptions}),style:f.normalizeStyle(`background:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.backgroundColor:a.tableConfig.style.chart.modal.buttons.unselected.backgroundColor};color:${n.chart.type===n.constants.BAR&&!n.showDonutOptions?a.tableConfig.style.chart.modal.buttons.selected.color:a.tableConfig.style.chart.modal.buttons.unselected.color}`)},null,14,W7)]),f.createElementVNode("div",X7,[f.createElementVNode("b",null,[f.createTextVNode(f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].name)+" ",1),r.dataset.header[n.currentSelectionSpan.col].isPercentage&&r.dataset.header[n.currentSelectionSpan.col].percentageTo?(f.openBlock(),f.createElementBlock("span",$7," / "+f.toDisplayString(r.dataset.header[n.percentages[n.currentSelectionSpan.col].referenceIndex].name),1)):f.createCommentVNode("",!0),n.chart.type===n.constants.DONUT&&n.selectedDonutCategory&&n.selectedDonutCategory.name?(f.openBlock(),f.createElementBlock("span",q7,f.toDisplayString(a.tableConfig.translations.by)+" "+f.toDisplayString(n.selectedDonutCategory.name),1)):f.createCommentVNode("",!0)])]),f.createElementVNode("div",Y7,[n.showDonutOptions&&a.availableDonutCategories.length?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`background:${a.tableConfig.style.chart.modal.backgroundColor};color:${a.tableConfig.style.chart.modal.color}`)},[f.createElementVNode("fieldset",J7,[f.createElementVNode("legend",null,f.toDisplayString(a.tableConfig.translations.chooseCategoryColumn),1),f.createElementVNode("div",Z7,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.availableDonutCategories,(i,s)=>(f.openBlock(),f.createElementBlock("div",{key:`donut_radio_${s}`,class:"vue-ui-table-fieldset-option"},[f.createElementVNode("input",{type:"radio",name:i.name,id:i.name,checked:n.selectedDonutCategory&&i.name===n.selectedDonutCategory.name,onInput:o=>n.selectedDonutCategory=a.availableDonutCategories[s],style:f.normalizeStyle(`background:${a.tableConfig.style.inputs.backgroundColor};color:${a.tableConfig.style.inputs.color};border:${a.tableConfig.style.inputs.border};accent-color:${a.tableConfig.style.inputs.accentColor}`)},null,44,eM),f.createElementVNode("label",{for:i.name},f.toDisplayString(i.name),9,tM)]))),128))]),f.createElementVNode("button",{class:"vue-ui-table-generate-donut",disabled:!n.selectedDonutCategory,onClick:e[22]||(e[22]=(...i)=>a.applyDonutOption&&a.applyDonutOption(...i)),style:f.normalizeStyle(`background:${a.tableConfig.style.chart.modal.buttons.selected.backgroundColor};color:${a.tableConfig.style.chart.modal.buttons.selected.color}`)},[f.createElementVNode("div",{style:{"margin-bottom":"-3px"},innerHTML:a.icons.donut},null,8,AM),f.createTextVNode(" "+f.toDisplayString(a.tableConfig.translations.makeDonut),1)],12,rM)])],4)):f.createCommentVNode("",!0),[n.constants.BAR,n.constants.LINE].includes(n.chart.type)&&!n.showDonutOptions?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[(f.openBlock(),f.createElementBlock("svg",{viewBox:`0 0 ${n.chart.width} ${n.chart.height}`,class:"vue-ui-table-chart-svg",style:f.normalizeStyle(`background:${a.tableConfig.style.chart.layout.backgroundColor}`)},[f.createElementVNode("defs",null,[f.createElementVNode("marker",{id:"arrowhead",markerWidth:a.tableConfig.style.chart.layout.progression.arrowSize,markerHeight:a.tableConfig.style.chart.layout.progression.arrowSize,refX:"0",refY:a.tableConfig.style.chart.layout.progression.arrowSize/2,orient:"auto"},[f.createElementVNode("polygon",{points:`0 0, ${a.tableConfig.style.chart.layout.progression.arrowSize} ${a.tableConfig.style.chart.layout.progression.arrowSize/2}, 0 ${a.tableConfig.style.chart.layout.progression.arrowSize}`,fill:a.tableConfig.style.chart.layout.progression.stroke},null,8,iM)],8,aM)]),f.createElementVNode("g",null,[f.createElementVNode("line",{x1:0,x2:n.chart.width,y1:a.chartData.zero,y2:a.chartData.zero,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,sM),f.createElementVNode("line",{x1:0,x2:0,y1:0,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.axis.stroke,"stroke-width":a.tableConfig.style.chart.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,oM)]),n.chart.type===n.constants.LINE?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(a.chartData.plots,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`trap_fill_${s}`},[f.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:n.selectedPlot===s?"rgba(0,0,0,0.03)":"transparent"},null,8,lM)]))),128)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.chartData.plots,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`plot_${s}`},[n.chart.type===n.constants.BAR?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[cM,f.createElementVNode("rect",{x:i.x-a.chartData.slot/2,y:a.chartData.isAllNegative?0:a.calcRectY(i.value,i.y),height:i.value>=0?a.chartData.zero-i.y:a.chartData.isAllNegative?i.y:i.y-a.chartData.zero,width:a.chartData.slot,fill:a.tableConfig.style.chart.layout.bar.fill?a.tableConfig.style.chart.layout.bar.fill:n.selectedPlot===s?i.value>=0?"url(#barGradientSelected)":"url(#barGradientSelectedNeg)":(i.value>=0,"url(#barGradient)"),stroke:a.tableConfig.style.chart.layout.bar.stroke,"stroke-width":"1"},null,8,fM),n.selectedPlot===s?(f.openBlock(),f.createElementBlock("foreignObject",{key:0,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:i.value>=0?i.y-32:i.y+4,height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},f.toDisplayString(i.prefix)+" "+f.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix),5)],8,uM)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),n.chart.type===n.constants.LINE?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[s+1<a.chartData.plots.length?(f.openBlock(),f.createElementBlock("line",{key:0,x1:i.x,y1:i.y,x2:a.chartData.plots[s+1].x,y2:a.chartData.plots[s+1].y,"stroke-width":a.tableConfig.style.chart.layout.line.strokeWidth,stroke:a.tableConfig.style.chart.layout.line.stroke},null,8,hM)):f.createCommentVNode("",!0),n.selectedPlot===s?(f.openBlock(),f.createElementBlock("line",{key:1,x1:i.x,y1:i.y,x2:i.x,y2:n.chart.height,stroke:a.tableConfig.style.chart.layout.line.selector.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.selector.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.line.selector.strokeDasharray},null,8,dM)):f.createCommentVNode("",!0),f.createElementVNode("circle",{cx:i.x,cy:i.y,r:n.selectedPlot===s?a.tableConfig.style.chart.layout.line.plot.radius.selected:a.tableConfig.style.chart.layout.line.plot.radius.unselected,fill:a.tableConfig.style.chart.layout.line.plot.fill,stroke:a.tableConfig.style.chart.layout.line.plot.stroke,"stroke-width":a.tableConfig.style.chart.layout.line.plot.strokeWidth},null,8,gM),n.selectedPlot===s?(f.openBlock(),f.createElementBlock("foreignObject",{key:2,x:i.x-(a.chartData.slot<100?50:a.chartData.slot/2),y:a.placeLabelOnTopOrBottom({previousPlot:a.chartData.plots[s-1],currentPlot:i,nextPlot:a.chartData.plots[s+1]}),height:"20",width:a.chartData.slot<100?100:a.chartData.slot,style:{overflow:"visible"}},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;font-size:20px;color:${a.tableConfig.style.chart.layout.labels.color}`)},f.toDisplayString(i.prefix)+" "+f.toDisplayString(Number(i.value.toFixed(r.dataset.header[n.currentSelectionSpan.col].decimals)).toLocaleString())+" "+f.toDisplayString(i.suffix),5)],8,pM)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)]))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.chartData.plots,(i,s)=>(f.openBlock(),f.createElementBlock("g",{key:`trap_${s}`},[f.createElementVNode("rect",{x:s*a.chartData.slot,y:0,width:a.chartData.slot,height:n.chart.height,fill:"transparent",onMouseenter:o=>n.selectedPlot=s,onMouseleave:e[23]||(e[23]=o=>n.selectedPlot=void 0)},null,40,mM)]))),128)),a.chartData.progression&&a.chartData.plots.length>2?(f.openBlock(),f.createElementBlock("line",{key:1,x1:a.chartData.progression.x1,y1:a.chartData.progression.y1,x2:a.chartData.progression.x2,y2:a.chartData.progression.y2,stroke:a.tableConfig.style.chart.layout.progression.stroke,"stroke-width":a.tableConfig.style.chart.layout.progression.strokeWidth,"stroke-dasharray":a.tableConfig.style.chart.layout.progression.strokeDasharray,"marker-end":"url(#arrowhead)"},null,8,vM)):f.createCommentVNode("",!0)],12,nM)),a.chartData.plots.length>=2?(f.openBlock(),f.createElementBlock("div",{key:0,class:"chart-trend",style:f.normalizeStyle(`color:${a.tableConfig.style.chart.modal.color}`)},[wM,f.createTextVNode(" Trend: "),f.createElementVNode("span",null,f.toDisplayString(a.chartData.progression.slope<0?"+":"-"),1),f.createTextVNode(" "+f.toDisplayString((Math.abs(a.chartData.progression.slope)*100).toFixed(1))+" % ",1)],4)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),[n.constants.DONUT].includes(n.chart.type)&&!n.showDonutOptions?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[(f.openBlock(),f.createElementBlock("svg",{viewBox:"0 0 100 100",style:f.normalizeStyle(`max-width:100%; overflow: visible; padding: 0 24px;background:${a.tableConfig.style.chart.layout.backgroundColor}`),class:"vue-ui-table-donut-chart"},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.currentDonut,(i,s)=>(f.openBlock(),f.createElementBlock("path",{key:`arc_${s}`,d:i.path,stroke:`${i.color}CC`,"stroke-width":20,fill:"none"},null,8,BM))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.currentDonut,(i,s)=>(f.openBlock(),f.createElementBlock("foreignObject",{key:`text_marker_${s}`,x:a.calcDonutMarkerLabelPositionX(i)-15,y:i.center.endY-15,height:"30",width:"30",style:{overflow:"visible",display:"flex","align-items":"center","justify-content":"center"}},[a.isArcBigEnough(i)?(f.openBlock(),f.createElementBlock("div",{key:0,class:"vue-ui-table-donut-label",style:f.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[f.createElementVNode("b",null,f.toDisplayString(a.displayArcPercentage(i,n.currentDonut)),1),f.createElementVNode("span",xM,f.toDisplayString(i.name),1)],4)):f.createCommentVNode("",!0)],8,yM))),128)),f.createElementVNode("text",{x:50,y:42,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(a.tableConfig.translations.total),9,CM),f.createElementVNode("text",{x:50,y:48,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.donutHollowLabels.total)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,bM),f.createElementVNode("text",{x:50,y:56,"text-anchor":"middle","font-size":"6",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(a.tableConfig.translations.average),9,EM),f.createElementVNode("text",{x:50,y:62,"text-anchor":"middle","font-size":"4",fill:a.tableConfig.style.chart.layout.labels.color},f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.donutHollowLabels.average)+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),9,FM)],4)),f.createElementVNode("div",SM,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.currentDonut.filter(i=>i.value>0),(i,s)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-table-donut-legend-item",key:`donut_legend_${s}`,style:f.normalizeStyle(`color:${a.tableConfig.style.chart.layout.labels.color}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${i.color}`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(i.name)+" : ",1),f.createElementVNode("b",null,f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].prefix)+" "+f.toDisplayString(a.getDonutLegendValue(i.absoluteValue))+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].isPercentage?"%":"")+" "+f.toDisplayString(r.dataset.header[n.currentSelectionSpan.col].suffix),1),f.createElementVNode("span",null,"("+f.toDisplayString((i.proportion*100).toFixed(1))+"%)",1)],4))),128))])],64)):f.createCommentVNode("",!0)],512)],4)):f.createCommentVNode("",!0)],4)}const TM=Ru(aP,[["render",_M],["__scopeId","data-v-80d709a0"]]),hZ="",UM=t=>(f.pushScopeId("data-v-2d188518"),t=t(),f.popScopeId(),t),NM=["id"],IM={class:"vue-ui-donut-user-option-item"},LM=["id","name"],kM=["for"],QM={class:"vue-ui-donut-user-option-item"},OM=["id","name"],DM=["for"],PM={class:"vue-ui-donut-user-option-item"},MM=["id","name"],RM=["for"],HM=["disabled"],VM={key:0,class:"vue-ui-donut-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},KM=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-2d188518></path><path d="M18 16v.01" data-v-2d188518></path><path d="M6 16v.01" data-v-2d188518></path><path d="M12 5v.01" data-v-2d188518></path><path d="M12 12v.01" data-v-2d188518></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-2d188518></path>',6)],GM={key:1},jM=["viewBox"],zM=["id"],WM=["stop-color"],XM=["stop-color"],$M=["stop-color"],qM={key:0},YM=["font-size","fill","x"],JM=["font-size","fill","x","y"],ZM=["d","stroke","stroke-width"],eR=["cx","cy","fill"],tR=["d","stroke","stroke-width","onMouseenter","onClick"],rR=["cx","cy","r","fill"],AR=["x","y","fill","font-size"],nR=["x","y","fill","font-size"],aR=["x","y","fill","font-size"],iR=["x","y","fill","font-size"],sR=["x","y","fill","font-size"],oR=["x","y","fill","font-size"],lR=["y"],cR=["onClick"],fR=["onClick"],uR={key:0},hR=["innerHTML"],dR={key:0},gR={key:0},pR=[UM(()=>f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],mR={style:{"max-width":"200px margin:0 auto"}},vR=Ru({__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=f.ref(`vue-ui-donut-${Math.random()}`),A=f.ref({style:{fontFamily:"inherit",chart:{useGradient:!0,gradientIntensity:40,backgroundColor:"#FFFFFF",color:"#2D353C",layout:{useDiv:!1,labels:{dataLabels:{show:!0,hideUnderValue:3},percentage:{color:"#2D353C",bold:!0,fontSize:18},name:{color:"#2D353C",bold:!1,fontSize:14},hollow:{total:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Total",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}},average:{show:!0,bold:!1,fontSize:18,color:"#AAAAAA",text:"Average",offsetY:0,value:{color:"#2D353C",fontSize:18,bold:!0,suffix:"",prefix:"",offsetY:0,rounding:0}}}},donut:{strokeWidth:64}},legend:{backgroundColor:"#FFFFFF",color:"#2D353C",show:!0,fontSize:16,bold:!1,roundingValue:0,roundingPercentage:0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,color:"#2D353C",backgroundColor:"#FFFFFF",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",useDiv:"Title & legend inside",showTable:"Show table"}},translations:{total:"Total",average:"Average"},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),n=f.ref(!1),a=f.ref(null),i=f.ref(null),s=f.ref(null),o=f.ref({x:0,y:0}),l=f.ref(!1),c=f.ref(""),d=f.ref(null);f.onMounted(()=>{document.addEventListener("mousemove",g)}),f.onBeforeUnmount(()=>{document.removeEventListener("mousemove",g)});function g(se){o.value.x=se.clientX,o.value.y=se.clientY}const h=f.computed(()=>{let se=0,J=48;if(i.value&&a.value){const{width:oe,height:B}=i.value.getBoundingClientRect(),_=a.value.getBoundingClientRect();o.value.x+oe/2>_.right?se=-oe:o.value.x-oe/2<_.left?se=0:se=-oe/2,o.value.y+B>_.bottom&&(J=-B-48)}return{top:o.value.y+J,left:o.value.x+se}}),p=f.computed(()=>Object.keys(e.config||{}).length?tc({defaultConfig:A.value,userConfig:e.config}):A.value),v=f.ref({dataLabels:{show:p.value.style.chart.layout.labels.dataLabels.show},inside:p.value.style.chart.layout.useDiv,showTable:p.value.table.show}),y=f.computed(()=>({height:v.value.inside||n.value?512:360,width:512})),C=f.ref([]);function b(se){C.value.includes(se)?C.value=C.value.filter(J=>J!==se):C.value.push(se)}const F=f.computed(()=>e.dataset.map((se,J)=>({name:se.name,color:se.color||ZA[J]||ZA[J%ZA.length],value:se.values.reduce((oe,B)=>oe+B,0),absoluteValues:se.values})).sort((se,J)=>J.value-se.value).filter((se,J)=>!C.value.includes(J))),O=f.computed(()=>e.dataset.map((se,J)=>({name:se.name,color:se.color||ZA[J]||ZA[J%ZA.length],value:se.values.reduce((oe,B)=>oe+B,0)})).sort((se,J)=>J.value-se.value)),W=f.computed(()=>zy({series:F.value},y.value.width/2,y.value.height/2,100,100));function X(se){return se.center.endX+k(se,256)}function k(se,J){return se.center.endX-J>=0?30:-30}function Q(se){return se.proportion*100>p.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(se,J){return isNaN(se.value/re(J))?0:(se.value/re(J)*100).toFixed(0)+"%"}function re(se){return[...se].map(J=>J.value).reduce((J,oe)=>J+oe,0)}const U=f.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),T=f.computed(()=>F.value.map(se=>se.value).reduce((se,J)=>se+J,0)),H=f.computed(()=>T.value/F.value.length);function Y(){s.value&&s.value.removeAttribute("open")}function le(se,J,oe=!0){l.value=oe,d.value=J;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${se.name}</div>`,B+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${se.color};font-size:${p.value.style.chart.tooltip.fontSize*1.6}px;">●</span>`,p.value.style.chart.tooltip.showValue&&(B+=`<b>${se.value.toFixed(p.value.style.chart.tooltip.roundingValue)}</b>`),p.value.style.chart.tooltip.showPercentage&&(p.value.style.chart.tooltip.showValue?B+=`<span>(${(se.proportion*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:B+=`<b>${(se.proportion*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),c.value=`<div>${B}</div>`}function pe(){n.value=!0,jd({domElement:document.getElementById(`donut__${r.value}`),fileName:p.value.style.chart.title.text||"vue-ui-donut"}).finally(()=>{n.value=!1})}const me=f.computed(()=>{const se=F.value.map(oe=>({name:oe.name,color:oe.color})),J=F.value.map(oe=>oe.value);return{head:se,body:J}});function ve(){f.nextTick(()=>{const se=me.value.head.map((ie,ce)=>[[ie.name],[me.value.body[ce]],[isNaN(me.value.body[ce]/T.value)?"-":me.value.body[ce]/T.value*100]]),J=[[p.value.style.chart.title.text],[p.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(se);function oe(ie){let ce=new ArrayBuffer(ie.length),fe=new Uint8Array(ce);for(let xe=0;xe<ie.length;xe++)fe[xe]=ie.charCodeAt(xe)&255;return ce}const B=Tn.book_new(),_=Tn.aoa_to_sheet(J);Tn.book_append_sheet(B,_,"Sheet1");const S=Zl(B,{bookType:"xlsx",type:"binary"}),N=new Blob([oe(S)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),G=document.createElement("a");G.href=window.URL.createObjectURL(N),G.download=`${p.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-donut"}.xlsx`,G.click(),window.URL.revokeObjectURL(G.href)})}return(se,J)=>(f.openBlock(),f.createElementBlock("div",{ref:"donutChart",class:"vue-ui-donut",style:f.normalizeStyle(`font-family:${p.value.style.fontFamily};width:100%; text-align:center`),id:`donut__${r.value}`},[(!v.value.inside||n.value)&&p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;background:${p.value.style.chart.backgroundColor}`)},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.color};font-size:${p.value.style.chart.title.fontSize}px;font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),5),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.subtitle.color};font-size:${p.value.style.chart.title.subtitle.fontSize}px;font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)):f.createCommentVNode("",!0),p.value.userOptions.show?(f.openBlock(),f.createElementBlock("details",{key:1,class:"vue-ui-donut-user-options",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[f.createElementVNode("summary",{style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},f.toDisplayString(p.value.userOptions.title),5),f.createElementVNode("div",{class:"vue-ui-donut-user-options-items",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},[f.createElementVNode("div",IM,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-datalabels_${r.value}`,name:`vue-ui-donut-option-datalabels_${r.value}`,"onUpdate:modelValue":J[0]||(J[0]=oe=>v.value.dataLabels.show=oe)},null,8,LM),[[f.vModelCheckbox,v.value.dataLabels.show]]),f.createElementVNode("label",{for:`vue-ui-donut-option-datalabels_${r.value}`},f.toDisplayString(p.value.userOptions.labels.dataLabels),9,kM)]),f.createElementVNode("div",QM,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-title_${r.value}`,name:`vue-ui-donut-option-title_${r.value}`,"onUpdate:modelValue":J[1]||(J[1]=oe=>v.value.inside=oe)},null,8,OM),[[f.vModelCheckbox,v.value.inside]]),f.createElementVNode("label",{for:`vue-ui-donut-option-title_${r.value}`},f.toDisplayString(p.value.userOptions.labels.useDiv),9,DM)]),f.createElementVNode("div",PM,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-donut-option-table_${r.value}`,name:`vue-ui-donut-option-table_${r.value}`,"onUpdate:modelValue":J[2]||(J[2]=oe=>v.value.showTable=oe)},null,8,MM),[[f.vModelCheckbox,v.value.showTable]]),f.createElementVNode("label",{for:`vue-ui-donut-option-table_${r.value}`},f.toDisplayString(p.value.userOptions.labels.showTable),9,RM)]),f.createElementVNode("button",{class:"vue-ui-donut-button",onClick:pe,disabled:n.value,style:f.normalizeStyle([{"margin-top":"12px"},`color:${p.value.style.chart.color}`])},[n.value?(f.openBlock(),f.createElementBlock("svg",VM,KM)):(f.openBlock(),f.createElementBlock("span",GM,"PDF"))],12,HM),f.createElementVNode("button",{class:"vue-ui-donut-button",onClick:ve,style:f.normalizeStyle(`color:${p.value.style.chart.color}`)}," XLSX ",4)],4)],4)):f.createCommentVNode("",!0),(f.openBlock(),f.createElementBlock("svg",{viewBox:`0 0 ${y.value.width} ${y.value.height}`,style:f.normalizeStyle(`max-width:100%; overflow: visible; background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),onClick:Y},[f.createElementVNode("defs",null,[p.value.style.chart.useGradient?(f.openBlock(),f.createElementBlock("radialGradient",{key:0,id:`gradient_${r.value}`},[f.createElementVNode("stop",{offset:"0%","stop-color":`${f.unref(qy)(p.value.style.chart.backgroundColor)}00`},null,8,WM),f.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+U.value[p.value.style.chart.gradientIntensity]},null,8,XM),f.createElementVNode("stop",{offset:"100%","stop-color":`${f.unref(qy)(p.value.style.chart.backgroundColor)}00`},null,8,$M)],8,zM)):f.createCommentVNode("",!0)]),p.value.style.chart.title.text&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("g",qM,[f.createElementVNode("text",{"font-size":p.value.style.chart.title.fontSize,fill:p.value.style.chart.title.color,x:y.value.width/2,y:48,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),13,YM),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("text",{key:0,"font-size":p.value.style.chart.title.subtitle.fontSize,fill:p.value.style.chart.title.subtitle.color,x:y.value.width/2,y:48+p.value.style.chart.title.fontSize,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),13,JM)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W.value,(oe,B)=>(f.openBlock(),f.createElementBlock("path",{d:oe.path,stroke:`${oe.color}CC`,"stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none"},null,8,ZM))),256)),p.value.style.chart.useGradient?(f.openBlock(),f.createElementBlock("circle",{key:1,cx:y.value.width/2,cy:y.value.height/2,r:136,fill:`url(#gradient_${r.value})`},null,8,eR)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W.value,(oe,B)=>(f.openBlock(),f.createElementBlock("path",{d:oe.path,stroke:d.value===B?"rgba(0,0,0,0.1)":"transparent","stroke-width":A.value.style.chart.layout.donut.strokeWidth,fill:"none",onMouseenter:_=>le(oe,B,!0),onMouseleave:J[3]||(J[3]=_=>{l.value=!1,d.value=null}),onClick:_=>b(B)},null,40,tR))),256)),f.createElementVNode("circle",{cx:y.value.width/2,cy:y.value.height/2,r:y.value.width-400-p.value.style.chart.layout.donut.strokeWidth/2,fill:p.value.style.chart.backgroundColor},null,8,rR),p.value.style.chart.layout.labels.hollow.total.show?(f.openBlock(),f.createElementBlock("text",{key:2,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2-(p.value.style.chart.layout.labels.hollow.average.show?p.value.style.chart.layout.labels.hollow.total.fontSize:0)+p.value.style.chart.layout.labels.hollow.total.offsetY,fill:p.value.style.chart.layout.labels.hollow.total.color,"font-size":p.value.style.chart.layout.labels.hollow.total.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.total.text),13,AR)):f.createCommentVNode("",!0),p.value.style.chart.layout.labels.hollow.total.show?(f.openBlock(),f.createElementBlock("text",{key:3,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2+p.value.style.chart.layout.labels.hollow.total.fontSize-(p.value.style.chart.layout.labels.hollow.average.show?p.value.style.chart.layout.labels.hollow.total.fontSize:0)+p.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:p.value.style.chart.layout.labels.hollow.total.value.color,"font-size":p.value.style.chart.layout.labels.hollow.total.value.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.total.value.prefix)+" "+f.toDisplayString(T.value.toFixed(p.value.style.chart.layout.labels.hollow.total.value.rounding))+" "+f.toDisplayString(p.value.style.chart.layout.labels.hollow.total.value.suffix),13,nR)):f.createCommentVNode("",!0),p.value.style.chart.layout.labels.hollow.average.show?(f.openBlock(),f.createElementBlock("text",{key:4,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2+(p.value.style.chart.layout.labels.hollow.total.show?p.value.style.chart.layout.labels.hollow.average.fontSize:0)+p.value.style.chart.layout.labels.hollow.average.offsetY,fill:p.value.style.chart.layout.labels.hollow.average.color,"font-size":p.value.style.chart.layout.labels.hollow.average.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.average.text),13,aR)):f.createCommentVNode("",!0),p.value.style.chart.layout.labels.hollow.average.show?(f.openBlock(),f.createElementBlock("text",{key:5,"text-anchor":"middle",x:y.value.width/2,y:y.value.height/2+(p.value.style.chart.layout.labels.hollow.total.show?p.value.style.chart.layout.labels.hollow.average.fontSize:0)+p.value.style.chart.layout.labels.hollow.average.fontSize+p.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:p.value.style.chart.layout.labels.hollow.average.value.color,"font-size":p.value.style.chart.layout.labels.hollow.average.value.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.layout.labels.hollow.average.value.prefix)+" "+f.toDisplayString(isNaN(H.value.toFixed(p.value.style.chart.layout.labels.hollow.average.value.rounding))?"-":H.value.toFixed(p.value.style.chart.layout.labels.hollow.average.value.rounding))+" "+f.toDisplayString(p.value.style.chart.layout.labels.hollow.average.value.suffix),13,iR)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(W.value,(oe,B)=>(f.openBlock(),f.createElementBlock("g",null,[Q(oe)&&v.value.dataLabels.show?(f.openBlock(),f.createElementBlock("text",{key:0,"text-anchor":"middle",x:X(oe),y:oe.center.endY-p.value.style.chart.layout.labels.percentage.fontSize/2,fill:p.value.style.chart.layout.labels.percentage.color,"font-size":p.value.style.chart.layout.labels.percentage.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.percentage.bold?"bold":""}`)},f.toDisplayString(K(oe,W.value)),13,sR)):f.createCommentVNode("",!0),Q(oe)&&v.value.dataLabels.show?(f.openBlock(),f.createElementBlock("text",{key:1,"text-anchor":"middle",x:X(oe),y:oe.center.endY+p.value.style.chart.layout.labels.percentage.fontSize/2,fill:p.value.style.chart.layout.labels.name.color,"font-size":p.value.style.chart.layout.labels.name.fontSize,style:f.normalizeStyle(`font-weight:${p.value.style.chart.layout.labels.name.bold?"bold":""}`)},f.toDisplayString(oe.name),13,oR)):f.createCommentVNode("",!0)]))),256)),p.value.style.chart.legend.show&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("foreignObject",{key:6,x:0,y:y.value.height/2+150,width:"100%",height:"100",style:{overflow:"visible"}},[f.createElementVNode("div",{class:"vue-ui-donut-legend",style:f.normalizeStyle(`background:transparent;color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`)},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.value,(oe,B)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(B),style:f.normalizeStyle(`opacity:${C.value.includes(B)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${oe.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(oe.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(oe.value),1),f.createElementVNode("span",null,"("+f.toDisplayString(isNaN(oe.value/T.value)?"-":(oe.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1)],12,cR))),256))],4)],8,lR)):f.createCommentVNode("",!0)],12,jM)),p.value.style.chart.legend.show&&(!v.value.inside||n.value)?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-donut-legend",style:f.normalizeStyle(`background:${p.value.style.chart.legend.backgroundColor};color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`),onClick:Y},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(O.value,(oe,B)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-donut-legend-item",onClick:_=>b(B),style:f.normalizeStyle(`opacity:${C.value.includes(B)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${oe.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(oe.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(oe.value.toFixed(p.value.style.chart.legend.roundingValue)),1),C.value.includes(B)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",uR,"("+f.toDisplayString(isNaN(oe.value/T.value)?"-":(oe.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1))],12,fR))),256))],4)):f.createCommentVNode("",!0),p.value.style.chart.tooltip.show&&l.value?(f.openBlock(),f.createElementBlock("div",{key:3,class:"vue-ui-donut-tooltip",ref_key:"tooltip",ref:i,style:f.normalizeStyle(`top:${h.value.top}px;left:${h.value.left}px;background:${p.value.style.chart.tooltip.backgroundColor};color:${p.value.style.chart.tooltip.color}`),innerHTML:c.value},null,12,hR)):f.createCommentVNode("",!0),v.value.showTable?(f.openBlock(),f.createElementBlock("div",{key:4,onClick:Y,class:"vue-ui-donut-table",style:f.normalizeStyle(`width:100%;margin-top:${v.value.inside?"48px":""}`)},[f.createElementVNode("table",null,[f.createElementVNode("thead",null,[p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("tr",dR,[f.createElementVNode("th",{colspan:"3",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline}`)},[f.createElementVNode("span",null,f.toDisplayString(p.value.style.chart.title.text),1),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("span",gR," : "+f.toDisplayString(p.value.style.chart.title.subtitle.text),1)):f.createCommentVNode("",!0)],4)])):f.createCommentVNode("",!0),f.createElementVNode("tr",null,[f.createElementVNode("th",{align:"right",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};padding-right:6px`)},pR,4),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)},f.toDisplayString(T.value.toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),f.createElementVNode("tbody",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(me.value.head,(oe,B)=>(f.openBlock(),f.createElementBlock("tr",null,[f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},[f.createElementVNode("div",mR,[f.createElementVNode("span",{style:f.normalizeStyle(`color:${oe.color};margin-right:6px;`)},"●",4),f.createElementVNode("span",null,f.toDisplayString(oe.name),1)])],4),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(me.value.body[B].toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(isNaN(me.value.body[B]/T.value)?"-":(me.value.body[B]/T.value*100).toFixed(p.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):f.createCommentVNode("",!0)],12,NM))}},[["__scopeId","data-v-2d188518"]]),mZ="",wR=t=>(f.pushScopeId("data-v-ca86fc8d"),t=t(),f.popScopeId(),t),BR=["id"],yR={class:"vue-ui-waffle-user-option-item"},xR=["id","name"],CR=["for"],bR={class:"vue-ui-waffle-user-option-item"},ER=["id","name"],FR=["for"],SR=["disabled"],_R={key:0,class:"vue-ui-waffle-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},TR=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-ca86fc8d></path><path d="M18 16v.01" data-v-ca86fc8d></path><path d="M6 16v.01" data-v-ca86fc8d></path><path d="M12 5v.01" data-v-ca86fc8d></path><path d="M12 12v.01" data-v-ca86fc8d></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-ca86fc8d></path>',6)],UR={key:1},NR=["viewBox"],IR=["id"],LR=["stop-color"],kR=["stop-color"],QR={key:0},OR=["font-size","fill","x","y"],DR=["font-size","fill","x","y"],PR=["rx","x","y","height","width","stroke","stroke-width"],MR=["onMouseover","rx","x","y","height","width","fill","stroke","stroke-width"],RR={key:1,x:0,y:512+64,width:"100%",height:"100",style:{overflow:"visible"}},HR=["onClick"],VR={key:0},KR=["onClick"],GR={key:0},jR=["innerHTML"],zR={key:0},WR={key:0},XR=[wR(()=>f.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.createElementVNode("path",{d:"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2"})],-1))],$R={style:{"max-width":"200px margin:0 auto"}},qR=Ru({__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t){const e=t,r=f.ref(`vue-ui-waffle-${Math.random()}`),A=f.ref({style:{fontFamily:"inherit",chart:{backgroundColor:"#FFFFFF",color:"#2D353C",layout:{grid:{size:20,spaceBetween:2,vertical:!1},rect:{rounded:!0,rounding:2,stroke:"#2D353C",strokeWidth:1,useGradient:!0,gradientIntensity:40},useDiv:!0},title:{text:"",color:"#2D353C",fontSize:20,bold:!0,subtitle:{color:"#A1A1A1",text:"",fontSize:16,bold:!1}},tooltip:{show:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},legend:{show:!0,bold:!0,backgroundColor:"#FFFFFF",color:"#2D353C",fontSize:14,roundingValue:0,roundingPercentage:0}}},userOptions:{show:!0,title:"options",labels:{useDiv:"Title & legend inside",showTable:"Show table"}},table:{show:!1,th:{backgroundColor:"#FAFAFA",color:"#2D353C",outline:"1px solid #e1e5e8"},td:{backgroundColor:"#FFFFFF",color:"#2D353C",outline:"1px solid #e1e5e8",roundingValue:0,roundingPercentage:0}}}),n=f.ref(!1),a=f.ref(null),i=f.ref(null),s=f.ref(null),o=f.ref({x:0,y:0}),l=f.ref(!1),c=f.ref(""),d=f.ref(null),g=f.computed(()=>{let J=0,oe=48;if(i.value&&a.value){const{width:B,height:_}=i.value.getBoundingClientRect(),S=a.value.getBoundingClientRect();o.value.x+B/2>S.right?J=-B:o.value.x-B/2<S.left?J=0:J=-B/2,o.value.y+_>S.bottom&&(oe=-_-48)}return{top:o.value.y+oe,left:o.value.x+J}});f.onMounted(()=>{document.addEventListener("mousemove",h)}),f.onBeforeUnmount(()=>{document.removeEventListener("mousemove",h)});function h(J){o.value.x=J.clientX,o.value.y=J.clientY}const p=f.computed(()=>Object.keys(e.config||{}).length?tc({defaultConfig:A.value,userConfig:e.config}):A.value),v=f.ref({inside:!p.value.style.chart.layout.useDiv,showTable:p.value.table.show}),y=f.computed(()=>({height:v.value.inside?704:512,width:512})),C=f.computed(()=>({top:v.value.inside?64:0,left:0,height:512,width:512})),b=f.computed(()=>(C.value.width-p.value.style.chart.layout.grid.size*p.value.style.chart.layout.grid.spaceBetween)/p.value.style.chart.layout.grid.size);function F(J){const oe=J.reduce((S,N)=>S+N,0),B=J.map(S=>Math.round(S/oe*100)/100),_=B.reduce((S,N)=>S+N,0);if(_!==1){const S=B.length-1;B[S]+=1-_,B[S]=Math.round(B[S]*100)/100}return B}const O=f.computed(()=>e.dataset.map((J,oe)=>({...J,color:J.color||ZA[oe]||ZA[oe%ZA.length],uid:`serie_${oe}`}))),W=f.computed(()=>{const J=O.value.filter((oe,B)=>!le.value.includes(oe.uid)).map((oe,B)=>oe.values.reduce((_,S)=>_+S));return F(J)}),X=f.computed(()=>O.value.filter((J,oe)=>!le.value.includes(J.uid)).map((J,oe)=>({uid:J.uid,name:J.name,color:J.color,value:J.values.reduce((B,_)=>B+_,0),absoluteValues:J.values,proportion:W.value[oe]*Math.pow(p.value.style.chart.layout.grid.size,2)})).sort((J,oe)=>oe.value-J.value)),k=f.computed(()=>X.value.map((J,oe)=>{const B=oe>0?X.value.filter((N,G)=>G<oe).map(N=>N.proportion).reduce((N,G)=>N+G)+J.proportion-X.value[oe-1].proportion:J.proportion-J.proportion,_=B+J.proportion,S=[];for(let N=B;N<=_;N+=1)S.push(N);return{...J,start:oe>0?X.value.filter((N,G)=>G<oe).map(N=>N.proportion).reduce((N,G)=>N+G)+J.proportion-X.value[oe-1].proportion:J.proportion-J.proportion,rects:S}})),Q=f.computed(()=>k.value.flatMap((J,oe)=>J.rects.map((B,_)=>({name:J.name,color:J.color,value:J.value,serieIndex:oe,...J})))),K=f.computed(()=>{const J=[];for(let oe=0;oe<p.value.style.chart.layout.grid.size;oe+=1)for(let B=0;B<p.value.style.chart.layout.grid.size;B+=1)J.push({x:(p.value.style.chart.layout.grid.vertical?oe:B)*(b.value+p.value.style.chart.layout.grid.spaceBetween),y:(p.value.style.chart.layout.grid.vertical?B:oe)*(b.value+p.value.style.chart.layout.grid.spaceBetween)+C.value.top});return J}),re=f.computed(()=>O.value.map((J,oe)=>({name:J.name,color:J.color||ZA[oe]||ZA[oe%ZA.length],value:J.values.reduce((B,_)=>B+_,0),uid:J.uid})).sort((J,oe)=>oe.value-J.value)),U=f.ref(["00","03","05","08","0A","0D","0F","12","14","17","1A","1C","1F","21","24","26","29","2B","2E","30","33","36","38","3B","3D","40","42","45","47","4A","4D","4F","52","54","57","59","5C","5E","61","63","66","69","6B","6E","70","73","75","78","7A","7D","80","82","85","87","8A","8C","8F","91","94","96","99","9C","9E","A1","A3","A6","A8","AB","AD","B0","B3","B5","B8","BA","BD","BF","C2","C4","C7","C9","CC","CF","D1","D4","D6","D9","DB","DE","E0","E3","E6","E8","EB","ED","F0","F2","F5","F7","FA","FC","FF"]),T=f.computed(()=>X.value.map(J=>J.value).reduce((J,oe)=>J+oe,0));f.computed(()=>T.value/X.value.length);function H(){s.value&&s.value.removeAttribute("open")}function Y(J){if(le.value.length===e.dataset.length)return;const oe=Q.value[J];l.value=!0,d.value=Q.value[J].serieIndex;let B="";B+=`<div style="width:100%;text-align:center;border-bottom:1px solid #ccc;padding-bottom:6px;margin-bottom:3px;">${oe.name}</div>`,B+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><span style="color:${oe.color};font-size:${p.value.style.chart.tooltip.fontSize*1.6}px;">◼</span>`,p.value.style.chart.tooltip.showValue&&(B+=`<b>${oe.value.toFixed(p.value.style.chart.tooltip.roundingValue)}</b>`),p.value.style.chart.tooltip.showPercentage&&(p.value.style.chart.tooltip.showValue?B+=`<span>(${(oe.value/T.value*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:B+=`<b>${(oe.value/T.value*100).toFixed(p.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),c.value=B}const le=f.ref([]);function pe(J){le.value.includes(J)?le.value=le.value.filter(oe=>oe!==J):le.value.push(J)}const me=f.computed(()=>{const J=X.value.map(B=>({name:B.name,color:B.color})),oe=X.value.map(B=>B.value);return{head:J,body:oe}});function ve(){n.value=!0,jd({domElement:document.getElementById(`vue-ui-waffle_${r.value}`),fileName:p.value.style.chart.title.text||"vue-ui-waffle"}).finally(()=>{n.value=!1})}function se(){f.nextTick(()=>{const J=me.value.head.map((ce,fe)=>[[ce.name],[me.value.body[fe]],[isNaN(me.value.body[fe]/T.value)?"-":me.value.body[fe]/T.value*100]]),oe=[[p.value.style.chart.title.text],[p.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(J);function B(ce){let fe=new ArrayBuffer(ce.length),xe=new Uint8Array(fe);for(let Ie=0;Ie<ce.length;Ie++)xe[Ie]=ce.charCodeAt(Ie)&255;return fe}const _=Tn.book_new(),S=Tn.aoa_to_sheet(oe);Tn.book_append_sheet(_,S,"Sheet1");const N=Zl(_,{bookType:"xlsx",type:"binary"}),G=new Blob([B(N)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),ie=document.createElement("a");ie.href=window.URL.createObjectURL(G),ie.download=`${p.value.style.chart.title.text.replaceAll(" ","_")||"vue-ui-waffle"}.xlsx`,ie.click(),window.URL.revokeObjectURL(ie.href)})}return(J,oe)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-waffle",ref_key:"waffleChart",ref:a,id:`vue-ui-waffle_${r.value}`,style:f.normalizeStyle(`font-family:${p.value.style.fontFamily};width:100%; text-align:center`)},[(!v.value.inside||n.value)&&p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;background:${p.value.style.chart.backgroundColor};padding-bottom:12px`)},[f.createElementVNode("div",{style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.color};font-size:${p.value.style.chart.title.fontSize}px;font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),5),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("div",{key:0,style:f.normalizeStyle(`width:100%;text-align:center;color:${p.value.style.chart.title.subtitle.color};font-size:${p.value.style.chart.title.subtitle.fontSize}px;font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),5)):f.createCommentVNode("",!0)],4)):f.createCommentVNode("",!0),p.value.userOptions.show?(f.openBlock(),f.createElementBlock("details",{key:1,class:"vue-ui-waffle-user-options",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),"data-html2canvas-ignore":"",ref_key:"details",ref:s},[f.createElementVNode("summary",{style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},f.toDisplayString(p.value.userOptions.title),5),f.createElementVNode("div",{class:"vue-ui-waffle-user-options-items",style:f.normalizeStyle(`background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`)},[f.createElementVNode("div",yR,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-title_${r.value}`,name:`vue-ui-waffle-option-title_${r.value}`,"onUpdate:modelValue":oe[0]||(oe[0]=B=>v.value.inside=B)},null,8,xR),[[f.vModelCheckbox,v.value.inside]]),f.createElementVNode("label",{for:`vue-ui-waffle-option-title_${r.value}`},f.toDisplayString(p.value.userOptions.labels.useDiv),9,CR)]),f.createElementVNode("div",bR,[f.withDirectives(f.createElementVNode("input",{type:"checkbox",id:`vue-ui-waffle-option-table_${r.value}`,name:`vue-ui-waffle-option-table_${r.value}`,"onUpdate:modelValue":oe[1]||(oe[1]=B=>v.value.showTable=B)},null,8,ER),[[f.vModelCheckbox,v.value.showTable]]),f.createElementVNode("label",{for:`vue-ui-waffle-option-table_${r.value}`},f.toDisplayString(p.value.userOptions.labels.showTable),9,FR)]),f.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:ve,disabled:n.value,style:f.normalizeStyle([{"margin-top":"12px"},`color:${p.value.style.chart.color}`])},[n.value?(f.openBlock(),f.createElementBlock("svg",_R,TR)):(f.openBlock(),f.createElementBlock("span",UR,"PDF"))],12,SR),f.createElementVNode("button",{class:"vue-ui-waffle-button",onClick:se,style:f.normalizeStyle(`color:${p.value.style.chart.color}`)}," XLSX ",4)],4)],4)):f.createCommentVNode("",!0),(f.openBlock(),f.createElementBlock("svg",{viewBox:`0 0 ${y.value.width} ${y.value.height}`,style:f.normalizeStyle(`max-width:100%;overflow:visible;background:${p.value.style.chart.backgroundColor};color:${p.value.style.chart.color}`),onClick:H},[f.createElementVNode("defs",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(Q.value,(B,_)=>(f.openBlock(),f.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${r.value}_${_}`},[f.createElementVNode("stop",{offset:"0%","stop-color":`${f.unref(Yy)(B.color,.05)}${U.value[100-p.value.style.chart.layout.rect.gradientIntensity]}`},null,8,LR),f.createElementVNode("stop",{offset:"100%","stop-color":B.color},null,8,kR)],8,IR))),256))]),p.value.style.chart.title.text&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("g",QR,[f.createElementVNode("text",{"font-size":p.value.style.chart.title.fontSize,fill:p.value.style.chart.title.color,x:y.value.width/2,y:p.value.style.chart.title.fontSize,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.text),13,OR),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("text",{key:0,"font-size":p.value.style.chart.title.subtitle.fontSize,fill:p.value.style.chart.title.subtitle.color,x:y.value.width/2,y:p.value.style.chart.title.fontSize*2,"text-anchor":"middle",style:f.normalizeStyle(`font-weight:${p.value.style.chart.title.subtitle.bold?"bold":""}`)},f.toDisplayString(p.value.style.chart.title.subtitle.text),13,DR)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(K.value,(B,_)=>(f.openBlock(),f.createElementBlock("rect",{rx:p.value.style.chart.layout.rect.rounded?p.value.style.chart.layout.rect.rounding:0,x:B.x,y:B.y,height:b.value,width:b.value,fill:"white",stroke:p.value.style.chart.layout.rect.stroke,"stroke-width":p.value.style.chart.layout.rect.strokeWidth},null,8,PR))),256)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(K.value,(B,_)=>(f.openBlock(),f.createElementBlock("rect",{onMouseover:S=>Y(_),onMouseleave:oe[2]||(oe[2]=S=>{l.value=!1,d.value=null}),rx:p.value.style.chart.layout.rect.rounded?p.value.style.chart.layout.rect.rounding:0,x:B.x,y:B.y,height:b.value,width:b.value,fill:p.value.style.chart.layout.rect.useGradient&&p.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${r.value}_${_})`:Q.value[_].color,stroke:p.value.style.chart.layout.rect.stroke,"stroke-width":p.value.style.chart.layout.rect.strokeWidth},null,40,MR))),256)),p.value.style.chart.legend.show&&v.value.inside&&!n.value?(f.openBlock(),f.createElementBlock("foreignObject",RR,[f.createElementVNode("div",{class:"vue-ui-waffle-legend",style:f.normalizeStyle(`font-weight:${p.value.style.chart.legend.bold?"bold":""};background:${p.value.style.chart.legend.backgroundColor};color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`),onClick:H},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(re.value,(B,_)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:S=>pe(B.uid),style:f.normalizeStyle(`opacity:${le.value.includes(B.uid)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${B.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),f.createElementVNode("span",null,f.toDisplayString(B.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(B.value.toFixed(p.value.style.chart.legend.roundingValue)),1),le.value.includes(B.uid)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",VR,"("+f.toDisplayString(isNaN(B.value/T.value)?"-":(B.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1))],12,HR))),256))],4)])):f.createCommentVNode("",!0)],12,NR)),p.value.style.chart.legend.show&&(!v.value.inside||n.value)?(f.openBlock(),f.createElementBlock("div",{key:2,class:"vue-ui-waffle-legend",style:f.normalizeStyle(`font-weight:${p.value.style.chart.legend.bold?"bold":""};background:${p.value.style.chart.legend.backgroundColor};color:${p.value.style.chart.legend.color};font-size:${p.value.style.chart.legend.fontSize}px;padding-bottom:12px;font-weight:${p.value.style.chart.legend.bold?"bold":""}`),onClick:H},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(re.value,(B,_)=>(f.openBlock(),f.createElementBlock("div",{class:"vue-ui-waffle-legend-item",onClick:S=>pe(B.uid),style:f.normalizeStyle(`opacity:${le.value.includes(B.uid)?.5:1}`)},[f.createElementVNode("span",{style:f.normalizeStyle(`color:${B.color};font-size:${p.value.style.chart.legend.fontSize*1.6}px`)},"◼",4),f.createElementVNode("span",null,f.toDisplayString(B.name)+" : ",1),f.createElementVNode("span",null,f.toDisplayString(B.value.toFixed(p.value.style.chart.legend.roundingValue)),1),le.value.includes(B.uid)?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",GR,"("+f.toDisplayString(isNaN(B.value/T.value)?"-":(B.value/T.value*100).toFixed(p.value.style.chart.legend.roundingPercentage))+"%)",1))],12,KR))),256))],4)):f.createCommentVNode("",!0),p.value.style.chart.tooltip.show&&l.value&&le.value.length<e.dataset.length?(f.openBlock(),f.createElementBlock("div",{key:3,class:"vue-ui-waffle-tooltip",ref_key:"tooltip",ref:i,style:f.normalizeStyle(`top:${g.value.top}px;left:${g.value.left}px;background:${p.value.style.chart.tooltip.backgroundColor};color:${p.value.style.chart.tooltip.color}`),innerHTML:c.value},null,12,jR)):f.createCommentVNode("",!0),v.value.showTable?(f.openBlock(),f.createElementBlock("div",{key:4,onClick:H,class:"vue-ui-waffle-table",style:f.normalizeStyle(`width:100%;margin-top:${v.value.inside?"48px":""}`)},[f.createElementVNode("table",null,[f.createElementVNode("thead",null,[p.value.style.chart.title.text?(f.openBlock(),f.createElementBlock("tr",zR,[f.createElementVNode("th",{colspan:"3",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline}`)},[f.createElementVNode("span",null,f.toDisplayString(p.value.style.chart.title.text),1),p.value.style.chart.title.subtitle.text?(f.openBlock(),f.createElementBlock("span",WR," : "+f.toDisplayString(p.value.style.chart.title.subtitle.text),1)):f.createCommentVNode("",!0)],4)])):f.createCommentVNode("",!0),f.createElementVNode("tr",null,[f.createElementVNode("th",{align:"right",style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};padding-right:6px`)},XR,4),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)},f.toDisplayString(T.value.toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("th",{style:f.normalizeStyle(`background:${p.value.table.th.backgroundColor};color:${p.value.table.th.color};outline:${p.value.table.th.outline};text-align:right;padding-right:6px`)}," 100% ",4)])]),f.createElementVNode("tbody",null,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(me.value.head,(B,_)=>(f.openBlock(),f.createElementBlock("tr",null,[f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},[f.createElementVNode("div",$R,[f.createElementVNode("span",{style:f.normalizeStyle(`color:${B.color};margin-right:6px;`)},"◼",4),f.createElementVNode("span",null,f.toDisplayString(B.name),1)])],4),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(me.value.body[_].toFixed(p.value.table.td.roundingValue)),5),f.createElementVNode("td",{style:f.normalizeStyle(`background:${p.value.table.td.backgroundColor};color:${p.value.table.td.color};outline:${p.value.table.td.outline}`)},f.toDisplayString(isNaN(me.value.body[_]/T.value)?"-":(me.value.body[_]/T.value*100).toFixed(p.value.table.td.roundingPercentage))+"% ",5)]))),256))])])],4)):f.createCommentVNode("",!0)],12,BR))}},[["__scopeId","data-v-ca86fc8d"]]);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Ni(t){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ni(t)}function E1(t,e){return E1=Object.setPrototypeOf||function(A,n){return A.__proto__=n,A},E1(t,e)}function YR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hu(t,e,r){return YR()?Hu=Reflect.construct:Hu=function(n,a,i){var s=[null];s.push.apply(s,a);var o=Function.bind.apply(n,s),l=new o;return i&&E1(l,i.prototype),l},Hu.apply(null,arguments)}function $n(t){return JR(t)||ZR(t)||eH(t)||tH()}function JR(t){if(Array.isArray(t))return F1(t)}function ZR(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function eH(t,e){if(t){if(typeof t=="string")return F1(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F1(t,e)}}function F1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,A=new Array(e);r<e;r++)A[r]=t[r];return A}function tH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
374
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var rH=Object.hasOwnProperty,Jy=Object.setPrototypeOf,AH=Object.isFrozen,nH=Object.getPrototypeOf,aH=Object.getOwnPropertyDescriptor,KA=Object.freeze,qn=Object.seal,iH=Object.create,Zy=typeof Reflect<"u"&&Reflect,Vu=Zy.apply,S1=Zy.construct;Vu||(Vu=function(e,r,A){return e.apply(r,A)}),KA||(KA=function(e){return e}),qn||(qn=function(e){return e}),S1||(S1=function(e,r){return Hu(e,$n(r))});var sH=Un(Array.prototype.forEach),ex=Un(Array.prototype.pop),rc=Un(Array.prototype.push),Ku=Un(String.prototype.toLowerCase),_1=Un(String.prototype.toString),oH=Un(String.prototype.match),Yn=Un(String.prototype.replace),lH=Un(String.prototype.indexOf),cH=Un(String.prototype.trim),GA=Un(RegExp.prototype.test),T1=fH(TypeError);function Un(t){return function(e){for(var r=arguments.length,A=new Array(r>1?r-1:0),n=1;n<r;n++)A[n-1]=arguments[n];return Vu(t,e,A)}}function fH(t){return function(){for(var e=arguments.length,r=new Array(e),A=0;A<e;A++)r[A]=arguments[A];return S1(t,r)}}function Ot(t,e,r){var A;r=(A=r)!==null&&A!==void 0?A:Ku,Jy&&Jy(t,null);for(var n=e.length;n--;){var a=e[n];if(typeof a=="string"){var i=r(a);i!==a&&(AH(e)||(e[n]=i),a=i)}t[a]=!0}return t}function vs(t){var e=iH(null),r;for(r in t)Vu(rH,t,[r])===!0&&(e[r]=t[r]);return e}function Gu(t,e){for(;t!==null;){var r=aH(t,e);if(r){if(r.get)return Un(r.get);if(typeof r.value=="function")return Un(r.value)}t=nH(t)}function A(n){return console.warn("fallback value for",n),null}return A}var tx=KA(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),U1=KA(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N1=KA(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uH=KA(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I1=KA(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),hH=KA(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rx=KA(["#text"]),Ax=KA(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L1=KA(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nx=KA(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ju=KA(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dH=qn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gH=qn(/<%[\w\W]*|[\w\W]*%>/gm),pH=qn(/\${[\w\W]*}/gm),mH=qn(/^data-[\-\w.\u00B7-\uFFFF]/),vH=qn(/^aria-[\-\w]+$/),wH=qn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),BH=qn(/^(?:\w+script|data):/i),yH=qn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xH=qn(/^html$/i),CH=function(){return typeof window>"u"?null:window},bH=function(e,r){if(Ni(e)!=="object"||typeof e.createPolicy!="function")return null;var A=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(A=r.currentScript.getAttribute(n));var a="dompurify"+(A?"#"+A:"");try{return e.createPolicy(a,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function ax(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CH(),e=function(V){return ax(V)};if(e.version="2.4.7",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,A=t.document,n=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,s=t.Element,o=t.NodeFilter,l=t.NamedNodeMap,c=l===void 0?t.NamedNodeMap||t.MozNamedAttrMap:l,d=t.HTMLFormElement,g=t.DOMParser,h=t.trustedTypes,p=s.prototype,v=Gu(p,"cloneNode"),y=Gu(p,"nextSibling"),C=Gu(p,"childNodes"),b=Gu(p,"parentNode");if(typeof a=="function"){var F=A.createElement("template");F.content&&F.content.ownerDocument&&(A=F.content.ownerDocument)}var O=bH(h,r),W=O?O.createHTML(""):"",X=A,k=X.implementation,Q=X.createNodeIterator,K=X.createDocumentFragment,re=X.getElementsByTagName,U=r.importNode,T={};try{T=vs(A).documentMode?A.documentMode:{}}catch{}var H={};e.isSupported=typeof b=="function"&&k&&k.createHTMLDocument!==void 0&&T!==9;var Y=dH,le=gH,pe=pH,me=mH,ve=vH,se=BH,J=yH,oe=wH,B=null,_=Ot({},[].concat($n(tx),$n(U1),$n(N1),$n(I1),$n(rx))),S=null,N=Ot({},[].concat($n(Ax),$n(L1),$n(nx),$n(ju))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ce=null,fe=!0,xe=!0,Ie=!1,Me=!0,Xe=!1,$e=!1,Te=!1,ne=!1,Qe=!1,rt=!1,Re=!1,ze=!0,Ye=!1,Je="user-content-",st=!0,nt=!1,ht={},vt=null,_t=Ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ut=null,dt=Ot({},["audio","video","img","source","image","track"]),xt=null,tt=Ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nr="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",fr="http://www.w3.org/1999/xhtml",kt=fr,Kt=!1,$r=null,Pt=Ot({},[nr,Nt,fr],_1),br,$t=["application/xhtml+xml","text/html"],rA="text/html",Et,Gt=null,Ct=A.createElement("form"),Ht=function(V){return V instanceof RegExp||V instanceof Function},pn=function(V){Gt&&Gt===V||((!V||Ni(V)!=="object")&&(V={}),V=vs(V),br=$t.indexOf(V.PARSER_MEDIA_TYPE)===-1?br=rA:br=V.PARSER_MEDIA_TYPE,Et=br==="application/xhtml+xml"?_1:Ku,B="ALLOWED_TAGS"in V?Ot({},V.ALLOWED_TAGS,Et):_,S="ALLOWED_ATTR"in V?Ot({},V.ALLOWED_ATTR,Et):N,$r="ALLOWED_NAMESPACES"in V?Ot({},V.ALLOWED_NAMESPACES,_1):Pt,xt="ADD_URI_SAFE_ATTR"in V?Ot(vs(tt),V.ADD_URI_SAFE_ATTR,Et):tt,Ut="ADD_DATA_URI_TAGS"in V?Ot(vs(dt),V.ADD_DATA_URI_TAGS,Et):dt,vt="FORBID_CONTENTS"in V?Ot({},V.FORBID_CONTENTS,Et):_t,ie="FORBID_TAGS"in V?Ot({},V.FORBID_TAGS,Et):{},ce="FORBID_ATTR"in V?Ot({},V.FORBID_ATTR,Et):{},ht="USE_PROFILES"in V?V.USE_PROFILES:!1,fe=V.ALLOW_ARIA_ATTR!==!1,xe=V.ALLOW_DATA_ATTR!==!1,Ie=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xe=V.SAFE_FOR_TEMPLATES||!1,$e=V.WHOLE_DOCUMENT||!1,Qe=V.RETURN_DOM||!1,rt=V.RETURN_DOM_FRAGMENT||!1,Re=V.RETURN_TRUSTED_TYPE||!1,ne=V.FORCE_BODY||!1,ze=V.SANITIZE_DOM!==!1,Ye=V.SANITIZE_NAMED_PROPS||!1,st=V.KEEP_CONTENT!==!1,nt=V.IN_PLACE||!1,oe=V.ALLOWED_URI_REGEXP||oe,kt=V.NAMESPACE||fr,G=V.CUSTOM_ELEMENT_HANDLING||{},V.CUSTOM_ELEMENT_HANDLING&&Ht(V.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=V.CUSTOM_ELEMENT_HANDLING.tagNameCheck),V.CUSTOM_ELEMENT_HANDLING&&Ht(V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xe&&(xe=!1),rt&&(Qe=!0),ht&&(B=Ot({},$n(rx)),S=[],ht.html===!0&&(Ot(B,tx),Ot(S,Ax)),ht.svg===!0&&(Ot(B,U1),Ot(S,L1),Ot(S,ju)),ht.svgFilters===!0&&(Ot(B,N1),Ot(S,L1),Ot(S,ju)),ht.mathMl===!0&&(Ot(B,I1),Ot(S,nx),Ot(S,ju))),V.ADD_TAGS&&(B===_&&(B=vs(B)),Ot(B,V.ADD_TAGS,Et)),V.ADD_ATTR&&(S===N&&(S=vs(S)),Ot(S,V.ADD_ATTR,Et)),V.ADD_URI_SAFE_ATTR&&Ot(xt,V.ADD_URI_SAFE_ATTR,Et),V.FORBID_CONTENTS&&(vt===_t&&(vt=vs(vt)),Ot(vt,V.FORBID_CONTENTS,Et)),st&&(B["#text"]=!0),$e&&Ot(B,["html","head","body"]),B.table&&(Ot(B,["tbody"]),delete ie.tbody),KA&&KA(V),Gt=V)},Nr=Ot({},["mi","mo","mn","ms","mtext"]),zA=Ot({},["foreignobject","desc","title","annotation-xml"]),tn=Ot({},["title","style","font","a","script"]),gt=Ot({},U1);Ot(gt,N1),Ot(gt,uH);var xA=Ot({},I1);Ot(xA,hH);var kA=function(V){var we=b(V);(!we||!we.tagName)&&(we={namespaceURI:kt,tagName:"template"});var _e=Ku(V.tagName),Ke=Ku(we.tagName);return $r[V.namespaceURI]?V.namespaceURI===Nt?we.namespaceURI===fr?_e==="svg":we.namespaceURI===nr?_e==="svg"&&(Ke==="annotation-xml"||Nr[Ke]):!!gt[_e]:V.namespaceURI===nr?we.namespaceURI===fr?_e==="math":we.namespaceURI===Nt?_e==="math"&&zA[Ke]:!!xA[_e]:V.namespaceURI===fr?we.namespaceURI===Nt&&!zA[Ke]||we.namespaceURI===nr&&!Nr[Ke]?!1:!xA[_e]&&(tn[_e]||!gt[_e]):!!(br==="application/xhtml+xml"&&$r[V.namespaceURI]):!1},gr=function(V){rc(e.removed,{element:V});try{V.parentNode.removeChild(V)}catch{try{V.outerHTML=W}catch{V.remove()}}},Br=function(V,we){try{rc(e.removed,{attribute:we.getAttributeNode(V),from:we})}catch{rc(e.removed,{attribute:null,from:we})}if(we.removeAttribute(V),V==="is"&&!S[V])if(Qe||rt)try{gr(we)}catch{}else try{we.setAttribute(V,"")}catch{}},yr=function(V){var we,_e;if(ne)V="<remove></remove>"+V;else{var Ke=oH(V,/^[\r\n\t ]+/);_e=Ke&&Ke[0]}br==="application/xhtml+xml"&&kt===fr&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");var Ve=O?O.createHTML(V):V;if(kt===fr)try{we=new g().parseFromString(Ve,br)}catch{}if(!we||!we.documentElement){we=k.createDocument(kt,"template",null);try{we.documentElement.innerHTML=Kt?W:Ve}catch{}}var qe=we.body||we.documentElement;return V&&_e&&qe.insertBefore(A.createTextNode(_e),qe.childNodes[0]||null),kt===fr?re.call(we,$e?"html":"body")[0]:$e?we.documentElement:qe},D=function(V){return Q.call(V.ownerDocument||V,V,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT,null,!1)},te=function(V){return V instanceof d&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof c)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function")},z=function(V){return Ni(i)==="object"?V instanceof i:V&&Ni(V)==="object"&&typeof V.nodeType=="number"&&typeof V.nodeName=="string"},q=function(V,we,_e){H[V]&&sH(H[V],function(Ke){Ke.call(e,we,_e,Gt)})},ee=function(V){var we;if(q("beforeSanitizeElements",V,null),te(V)||GA(/[\u0080-\uFFFF]/,V.nodeName))return gr(V),!0;var _e=Et(V.nodeName);if(q("uponSanitizeElement",V,{tagName:_e,allowedTags:B}),V.hasChildNodes()&&!z(V.firstElementChild)&&(!z(V.content)||!z(V.content.firstElementChild))&&GA(/<[/\w]/g,V.innerHTML)&&GA(/<[/\w]/g,V.textContent)||_e==="select"&&GA(/<template/i,V.innerHTML))return gr(V),!0;if(!B[_e]||ie[_e]){if(!ie[_e]&&Ee(_e)&&(G.tagNameCheck instanceof RegExp&&GA(G.tagNameCheck,_e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(_e)))return!1;if(st&&!vt[_e]){var Ke=b(V)||V.parentNode,Ve=C(V)||V.childNodes;if(Ve&&Ke)for(var qe=Ve.length,ft=qe-1;ft>=0;--ft)Ke.insertBefore(v(Ve[ft],!0),y(V))}return gr(V),!0}return V instanceof s&&!kA(V)||(_e==="noscript"||_e==="noembed"||_e==="noframes")&&GA(/<\/no(script|embed|frames)/i,V.innerHTML)?(gr(V),!0):(Xe&&V.nodeType===3&&(we=V.textContent,we=Yn(we,Y," "),we=Yn(we,le," "),we=Yn(we,pe," "),V.textContent!==we&&(rc(e.removed,{element:V.cloneNode()}),V.textContent=we)),q("afterSanitizeElements",V,null),!1)},Ae=function(V,we,_e){if(ze&&(we==="id"||we==="name")&&(_e in A||_e in Ct))return!1;if(!(xe&&!ce[we]&&GA(me,we))){if(!(fe&&GA(ve,we))){if(!S[we]||ce[we]){if(!(Ee(V)&&(G.tagNameCheck instanceof RegExp&&GA(G.tagNameCheck,V)||G.tagNameCheck instanceof Function&&G.tagNameCheck(V))&&(G.attributeNameCheck instanceof RegExp&&GA(G.attributeNameCheck,we)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(we))||we==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&GA(G.tagNameCheck,_e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(_e))))return!1}else if(!xt[we]){if(!GA(oe,Yn(_e,J,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&V!=="script"&&lH(_e,"data:")===0&&Ut[V])){if(!(Ie&&!GA(se,Yn(_e,J,"")))){if(_e)return!1}}}}}}return!0},Ee=function(V){return V.indexOf("-")>0},Ue=function(V){var we,_e,Ke,Ve;q("beforeSanitizeAttributes",V,null);var qe=V.attributes;if(qe){var ft={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};for(Ve=qe.length;Ve--;){we=qe[Ve];var Vt=we,bt=Vt.name,Cr=Vt.namespaceURI;if(_e=bt==="value"?we.value:cH(we.value),Ke=Et(bt),ft.attrName=Ke,ft.attrValue=_e,ft.keepAttr=!0,ft.forceKeepAttr=void 0,q("uponSanitizeAttribute",V,ft),_e=ft.attrValue,!ft.forceKeepAttr&&(Br(bt,V),!!ft.keepAttr)){if(!Me&&GA(/\/>/i,_e)){Br(bt,V);continue}Xe&&(_e=Yn(_e,Y," "),_e=Yn(_e,le," "),_e=Yn(_e,pe," "));var rn=Et(V.nodeName);if(Ae(rn,Ke,_e)){if(Ye&&(Ke==="id"||Ke==="name")&&(Br(bt,V),_e=Je+_e),O&&Ni(h)==="object"&&typeof h.getAttributeType=="function"&&!Cr)switch(h.getAttributeType(rn,Ke)){case"TrustedHTML":{_e=O.createHTML(_e);break}case"TrustedScriptURL":{_e=O.createScriptURL(_e);break}}try{Cr?V.setAttributeNS(Cr,bt,_e):V.setAttribute(bt,_e),ex(e.removed)}catch{}}}}q("afterSanitizeAttributes",V,null)}},be=function ue(V){var we,_e=D(V);for(q("beforeSanitizeShadowDOM",V,null);we=_e.nextNode();)q("uponSanitizeShadowNode",we,null),!ee(we)&&(we.content instanceof n&&ue(we.content),Ue(we));q("afterSanitizeShadowDOM",V,null)};return e.sanitize=function(ue){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we,_e,Ke,Ve,qe;if(Kt=!ue,Kt&&(ue="<!-->"),typeof ue!="string"&&!z(ue))if(typeof ue.toString=="function"){if(ue=ue.toString(),typeof ue!="string")throw T1("dirty is not a string, aborting")}else throw T1("toString is not a function");if(!e.isSupported){if(Ni(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof ue=="string")return t.toStaticHTML(ue);if(z(ue))return t.toStaticHTML(ue.outerHTML)}return ue}if(Te||pn(V),e.removed=[],typeof ue=="string"&&(nt=!1),nt){if(ue.nodeName){var ft=Et(ue.nodeName);if(!B[ft]||ie[ft])throw T1("root node is forbidden and cannot be sanitized in-place")}}else if(ue instanceof i)we=yr("<!---->"),_e=we.ownerDocument.importNode(ue,!0),_e.nodeType===1&&_e.nodeName==="BODY"||_e.nodeName==="HTML"?we=_e:we.appendChild(_e);else{if(!Qe&&!Xe&&!$e&&ue.indexOf("<")===-1)return O&&Re?O.createHTML(ue):ue;if(we=yr(ue),!we)return Qe?null:Re?W:""}we&&ne&&gr(we.firstChild);for(var Vt=D(nt?ue:we);Ke=Vt.nextNode();)Ke.nodeType===3&&Ke===Ve||ee(Ke)||(Ke.content instanceof n&&be(Ke.content),Ue(Ke),Ve=Ke);if(Ve=null,nt)return ue;if(Qe){if(rt)for(qe=K.call(we.ownerDocument);we.firstChild;)qe.appendChild(we.firstChild);else qe=we;return(S.shadowroot||S.shadowrootmod)&&(qe=U.call(r,qe,!0)),qe}var bt=$e?we.outerHTML:we.innerHTML;return $e&&B["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&GA(xH,we.ownerDocument.doctype.name)&&(bt="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
|
|
375
|
+
`+bt),Xe&&(bt=Yn(bt,Y," "),bt=Yn(bt,le," "),bt=Yn(bt,pe," ")),O&&Re?O.createHTML(bt):bt},e.setConfig=function(ue){pn(ue),Te=!0},e.clearConfig=function(){Gt=null,Te=!1},e.isValidAttribute=function(ue,V,we){Gt||pn({});var _e=Et(ue),Ke=Et(V);return Ae(_e,Ke,we)},e.addHook=function(ue,V){typeof V=="function"&&(H[ue]=H[ue]||[],rc(H[ue],V))},e.removeHook=function(ue){if(H[ue])return ex(H[ue])},e.removeHooks=function(ue){H[ue]&&(H[ue]=[])},e.removeAllHooks=function(){H={}},e}var EH=ax();const FH=Object.freeze(Object.defineProperty({__proto__:null,default:EH},Symbol.toStringTag,{value:"Module"}));var Ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ix(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zu=function(t){return t&&t.Math==Math&&t},tA=zu(typeof globalThis=="object"&&globalThis)||zu(typeof window=="object"&&window)||zu(typeof self=="object"&&self)||zu(typeof Ac=="object"&&Ac)||function(){return this}()||Ac||Function("return this")(),Co={},Mr=function(t){try{return!!t()}catch{return!0}},SH=Mr,Ca=!SH(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),_H=Mr,Wu=!_H(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),TH=Wu,Xu=Function.prototype.call,yA=TH?Xu.bind(Xu):function(){return Xu.apply(Xu,arguments)},sx={},ox={}.propertyIsEnumerable,lx=Object.getOwnPropertyDescriptor,UH=lx&&!ox.call({1:2},1);sx.f=UH?function(e){var r=lx(this,e);return!!r&&r.enumerable}:ox;var $u=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},cx=Wu,fx=Function.prototype,k1=fx.call,NH=cx&&fx.bind.bind(k1,k1),Rr=cx?NH:function(t){return function(){return k1.apply(t,arguments)}},ux=Rr,IH=ux({}.toString),LH=ux("".slice),ws=function(t){return LH(IH(t),8,-1)},kH=Rr,QH=Mr,OH=ws,Q1=Object,DH=kH("".split),hx=QH(function(){return!Q1("z").propertyIsEnumerable(0)})?function(t){return OH(t)=="String"?DH(t,""):Q1(t)}:Q1,Bs=function(t){return t==null},PH=Bs,MH=TypeError,ba=function(t){if(PH(t))throw MH("Can't call method on "+t);return t},RH=hx,HH=ba,nc=function(t){return RH(HH(t))},O1=typeof document=="object"&&document.all,VH=typeof O1>"u"&&O1!==void 0,dx={all:O1,IS_HTMLDDA:VH},gx=dx,KH=gx.all,Tr=gx.IS_HTMLDDA?function(t){return typeof t=="function"||t===KH}:function(t){return typeof t=="function"},px=Tr,mx=dx,GH=mx.all,za=mx.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:px(t)||t===GH}:function(t){return typeof t=="object"?t!==null:px(t)},D1=tA,jH=Tr,zH=function(t){return jH(t)?t:void 0},ys=function(t,e){return arguments.length<2?zH(D1[t]):D1[t]&&D1[t][e]},WH=Rr,qu=WH({}.isPrototypeOf),Yu=typeof navigator<"u"&&String(navigator.userAgent)||"",vx=tA,P1=Yu,wx=vx.process,Bx=vx.Deno,yx=wx&&wx.versions||Bx&&Bx.version,xx=yx&&yx.v8,Jn,Ju;xx&&(Jn=xx.split("."),Ju=Jn[0]>0&&Jn[0]<4?1:+(Jn[0]+Jn[1])),!Ju&&P1&&(Jn=P1.match(/Edge\/(\d+)/),(!Jn||Jn[1]>=74)&&(Jn=P1.match(/Chrome\/(\d+)/),Jn&&(Ju=+Jn[1])));var M1=Ju,Cx=M1,XH=Mr,$H=tA,qH=$H.String,bx=!!Object.getOwnPropertySymbols&&!XH(function(){var t=Symbol();return!qH(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Cx&&Cx<41}),YH=bx,Ex=YH&&!Symbol.sham&&typeof Symbol.iterator=="symbol",JH=ys,ZH=Tr,e9=qu,t9=Ex,r9=Object,Fx=t9?function(t){return typeof t=="symbol"}:function(t){var e=JH("Symbol");return ZH(e)&&e9(e.prototype,r9(t))},A9=String,Zu=function(t){try{return A9(t)}catch{return"Object"}},n9=Tr,a9=Zu,i9=TypeError,Wa=function(t){if(n9(t))return t;throw i9(a9(t)+" is not a function")},s9=Wa,o9=Bs,bo=function(t,e){var r=t[e];return o9(r)?void 0:s9(r)},R1=yA,H1=Tr,V1=za,l9=TypeError,c9=function(t,e){var r,A;if(e==="string"&&H1(r=t.toString)&&!V1(A=R1(r,t))||H1(r=t.valueOf)&&!V1(A=R1(r,t))||e!=="string"&&H1(r=t.toString)&&!V1(A=R1(r,t)))return A;throw l9("Can't convert object to primitive value")},Sx={exports:{}},_x=tA,f9=Object.defineProperty,K1=function(t,e){try{f9(_x,t,{value:e,configurable:!0,writable:!0})}catch{_x[t]=e}return e},u9=tA,h9=K1,Tx="__core-js_shared__",d9=u9[Tx]||h9(Tx,{}),G1=d9,Ux=G1;(Sx.exports=function(t,e){return Ux[t]||(Ux[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.32.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"});var j1=Sx.exports,g9=ba,p9=Object,eh=function(t){return p9(g9(t))},m9=Rr,v9=eh,w9=m9({}.hasOwnProperty),Zn=Object.hasOwn||function(e,r){return w9(v9(e),r)},B9=Rr,y9=0,x9=Math.random(),C9=B9(1 .toString),Nx=function(t){return"Symbol("+(t===void 0?"":t)+")_"+C9(++y9+x9,36)},b9=tA,E9=j1,Ix=Zn,F9=Nx,S9=bx,_9=Ex,Eo=b9.Symbol,z1=E9("wks"),T9=_9?Eo.for||Eo:Eo&&Eo.withoutSetter||F9,lA=function(t){return Ix(z1,t)||(z1[t]=S9&&Ix(Eo,t)?Eo[t]:T9("Symbol."+t)),z1[t]},U9=yA,Lx=za,kx=Fx,N9=bo,I9=c9,L9=lA,k9=TypeError,Q9=L9("toPrimitive"),O9=function(t,e){if(!Lx(t)||kx(t))return t;var r=N9(t,Q9),A;if(r){if(e===void 0&&(e="default"),A=U9(r,t,e),!Lx(A)||kx(A))return A;throw k9("Can't convert object to primitive value")}return e===void 0&&(e="number"),I9(t,e)},D9=O9,P9=Fx,W1=function(t){var e=D9(t,"string");return P9(e)?e:e+""},M9=tA,Qx=za,X1=M9.document,R9=Qx(X1)&&Qx(X1.createElement),th=function(t){return R9?X1.createElement(t):{}},H9=Ca,V9=Mr,K9=th,Ox=!H9&&!V9(function(){return Object.defineProperty(K9("div"),"a",{get:function(){return 7}}).a!=7}),G9=Ca,j9=yA,z9=sx,W9=$u,X9=nc,$9=W1,q9=Zn,Y9=Ox,Dx=Object.getOwnPropertyDescriptor;Co.f=G9?Dx:function(e,r){if(e=X9(e),r=$9(r),Y9)try{return Dx(e,r)}catch{}if(q9(e,r))return W9(!j9(z9.f,e,r),e[r])};var Ea={},J9=Ca,Z9=Mr,Px=J9&&Z9(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),eV=za,tV=String,rV=TypeError,IA=function(t){if(eV(t))return t;throw rV(tV(t)+" is not an object")},AV=Ca,nV=Ox,aV=Px,rh=IA,Mx=W1,iV=TypeError,$1=Object.defineProperty,sV=Object.getOwnPropertyDescriptor,q1="enumerable",Y1="configurable",J1="writable";Ea.f=AV?aV?function(e,r,A){if(rh(e),r=Mx(r),rh(A),typeof e=="function"&&r==="prototype"&&"value"in A&&J1 in A&&!A[J1]){var n=sV(e,r);n&&n[J1]&&(e[r]=A.value,A={configurable:Y1 in A?A[Y1]:n[Y1],enumerable:q1 in A?A[q1]:n[q1],writable:!1})}return $1(e,r,A)}:$1:function(e,r,A){if(rh(e),r=Mx(r),rh(A),nV)try{return $1(e,r,A)}catch{}if("get"in A||"set"in A)throw iV("Accessors not supported");return"value"in A&&(e[r]=A.value),e};var oV=Ca,lV=Ea,cV=$u,ac=oV?function(t,e,r){return lV.f(t,e,cV(1,r))}:function(t,e,r){return t[e]=r,t},Rx={exports:{}},Z1=Ca,fV=Zn,Hx=Function.prototype,uV=Z1&&Object.getOwnPropertyDescriptor,eg=fV(Hx,"name"),hV=eg&&(function(){}).name==="something",dV=eg&&(!Z1||Z1&&uV(Hx,"name").configurable),Ah={EXISTS:eg,PROPER:hV,CONFIGURABLE:dV},gV=Rr,pV=Tr,tg=G1,mV=gV(Function.toString);pV(tg.inspectSource)||(tg.inspectSource=function(t){return mV(t)});var rg=tg.inspectSource,vV=tA,wV=Tr,Vx=vV.WeakMap,BV=wV(Vx)&&/native code/.test(String(Vx)),yV=j1,xV=Nx,Kx=yV("keys"),Ag=function(t){return Kx[t]||(Kx[t]=xV(t))},ng={},CV=BV,Gx=tA,bV=za,EV=ac,ag=Zn,ig=G1,FV=Ag,SV=ng,jx="Object already initialized",sg=Gx.TypeError,_V=Gx.WeakMap,nh,ic,ah,TV=function(t){return ah(t)?ic(t):nh(t,{})},UV=function(t){return function(e){var r;if(!bV(e)||(r=ic(e)).type!==t)throw sg("Incompatible receiver, "+t+" required");return r}};if(CV||ig.state){var Fa=ig.state||(ig.state=new _V);Fa.get=Fa.get,Fa.has=Fa.has,Fa.set=Fa.set,nh=function(t,e){if(Fa.has(t))throw sg(jx);return e.facade=t,Fa.set(t,e),e},ic=function(t){return Fa.get(t)||{}},ah=function(t){return Fa.has(t)}}else{var Fo=FV("state");SV[Fo]=!0,nh=function(t,e){if(ag(t,Fo))throw sg(jx);return e.facade=t,EV(t,Fo,e),e},ic=function(t){return ag(t,Fo)?t[Fo]:{}},ah=function(t){return ag(t,Fo)}}var ih={set:nh,get:ic,has:ah,enforce:TV,getterFor:UV},og=Rr,NV=Mr,IV=Tr,sh=Zn,lg=Ca,LV=Ah.CONFIGURABLE,kV=rg,zx=ih,QV=zx.enforce,OV=zx.get,Wx=String,oh=Object.defineProperty,DV=og("".slice),PV=og("".replace),MV=og([].join),RV=lg&&!NV(function(){return oh(function(){},"length",{value:8}).length!==8}),HV=String(String).split("String"),VV=Rx.exports=function(t,e,r){DV(Wx(e),0,7)==="Symbol("&&(e="["+PV(Wx(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!sh(t,"name")||LV&&t.name!==e)&&(lg?oh(t,"name",{value:e,configurable:!0}):t.name=e),RV&&r&&sh(r,"arity")&&t.length!==r.arity&&oh(t,"length",{value:r.arity});try{r&&sh(r,"constructor")&&r.constructor?lg&&oh(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var A=QV(t);return sh(A,"source")||(A.source=MV(HV,typeof e=="string"?e:"")),t};Function.prototype.toString=VV(function(){return IV(this)&&OV(this).source||kV(this)},"toString");var Xx=Rx.exports,KV=Tr,GV=Ea,jV=Xx,zV=K1,xs=function(t,e,r,A){A||(A={});var n=A.enumerable,a=A.name!==void 0?A.name:e;if(KV(r)&&jV(r,a,A),A.global)n?t[e]=r:zV(e,r);else{try{A.unsafe?t[e]&&(n=!0):delete t[e]}catch{}n?t[e]=r:GV.f(t,e,{value:r,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return t},$x={},WV=Math.ceil,XV=Math.floor,$V=Math.trunc||function(e){var r=+e;return(r>0?XV:WV)(r)},qV=$V,lh=function(t){var e=+t;return e!==e||e===0?0:qV(e)},YV=lh,JV=Math.max,ZV=Math.min,qx=function(t,e){var r=YV(t);return r<0?JV(r+e,0):ZV(r,e)},eK=lh,tK=Math.min,So=function(t){return t>0?tK(eK(t),9007199254740991):0},rK=So,ch=function(t){return rK(t.length)},AK=nc,nK=qx,aK=ch,Yx=function(t){return function(e,r,A){var n=AK(e),a=aK(n),i=nK(A,a),s;if(t&&r!=r){for(;a>i;)if(s=n[i++],s!=s)return!0}else for(;a>i;i++)if((t||i in n)&&n[i]===r)return t||i||0;return!t&&-1}},Jx={includes:Yx(!0),indexOf:Yx(!1)},iK=Rr,cg=Zn,sK=nc,oK=Jx.indexOf,lK=ng,Zx=iK([].push),e5=function(t,e){var r=sK(t),A=0,n=[],a;for(a in r)!cg(lK,a)&&cg(r,a)&&Zx(n,a);for(;e.length>A;)cg(r,a=e[A++])&&(~oK(n,a)||Zx(n,a));return n},fg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],cK=e5,fK=fg,uK=fK.concat("length","prototype");$x.f=Object.getOwnPropertyNames||function(e){return cK(e,uK)};var t5={};t5.f=Object.getOwnPropertySymbols;var hK=ys,dK=Rr,gK=$x,pK=t5,mK=IA,vK=dK([].concat),wK=hK("Reflect","ownKeys")||function(e){var r=gK.f(mK(e)),A=pK.f;return A?vK(r,A(e)):r},r5=Zn,BK=wK,yK=Co,xK=Ea,CK=function(t,e,r){for(var A=BK(e),n=xK.f,a=yK.f,i=0;i<A.length;i++){var s=A[i];!r5(t,s)&&!(r&&r5(r,s))&&n(t,s,a(e,s))}},bK=Mr,EK=Tr,FK=/#|\.prototype\./,sc=function(t,e){var r=_K[SK(t)];return r==UK?!0:r==TK?!1:EK(e)?bK(e):!!e},SK=sc.normalize=function(t){return String(t).replace(FK,".").toLowerCase()},_K=sc.data={},TK=sc.NATIVE="N",UK=sc.POLYFILL="P",A5=sc,ug=tA,NK=Co.f,IK=ac,LK=xs,kK=K1,QK=CK,OK=A5,jA=function(t,e){var r=t.target,A=t.global,n=t.stat,a,i,s,o,l,c;if(A?i=ug:n?i=ug[r]||kK(r,{}):i=(ug[r]||{}).prototype,i)for(s in e){if(l=e[s],t.dontCallGetSet?(c=NK(i,s),o=c&&c.value):o=i[s],a=OK(A?s:r+(n?".":"#")+s,t.forced),!a&&o!==void 0){if(typeof l==typeof o)continue;QK(l,o)}(t.sham||o&&o.sham)&&IK(l,"sham",!0),LK(i,s,l,t)}},DK=ws,oc=typeof process<"u"&&DK(process)=="process",PK=Rr,MK=Wa,RK=function(t,e,r){try{return PK(MK(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},HK=Tr,VK=String,KK=TypeError,GK=function(t){if(typeof t=="object"||HK(t))return t;throw KK("Can't set "+VK(t)+" as a prototype")},jK=RK,zK=IA,WK=GK,n5=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=jK(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(n,a){return zK(n),WK(a),t?r(n,a):n.__proto__=a,n}}():void 0),XK=Ea.f,$K=Zn,qK=lA,a5=qK("toStringTag"),hg=function(t,e,r){t&&!r&&(t=t.prototype),t&&!$K(t,a5)&&XK(t,a5,{configurable:!0,value:e})},i5=Xx,YK=Ea,JK=function(t,e,r){return r.get&&i5(r.get,e,{getter:!0}),r.set&&i5(r.set,e,{setter:!0}),YK.f(t,e,r)},ZK=ys,eG=JK,tG=lA,rG=Ca,s5=tG("species"),AG=function(t){var e=ZK(t);rG&&e&&!e[s5]&&eG(e,s5,{configurable:!0,get:function(){return this}})},nG=qu,aG=TypeError,iG=function(t,e){if(nG(e,t))return t;throw aG("Incorrect invocation")},sG=lA,oG=sG("toStringTag"),o5={};o5[oG]="z";var lG=String(o5)==="[object z]",cG=lG,fG=Tr,fh=ws,uG=lA,hG=uG("toStringTag"),dG=Object,gG=fh(function(){return arguments}())=="Arguments",pG=function(t,e){try{return t[e]}catch{}},dg=cG?fh:function(t){var e,r,A;return t===void 0?"Undefined":t===null?"Null":typeof(r=pG(e=dG(t),hG))=="string"?r:gG?fh(e):(A=fh(e))=="Object"&&fG(e.callee)?"Arguments":A},mG=Rr,vG=Mr,l5=Tr,wG=dg,BG=ys,yG=rg,c5=function(){},xG=[],f5=BG("Reflect","construct"),gg=/^\s*(?:class|function)\b/,CG=mG(gg.exec),bG=!gg.exec(c5),lc=function(e){if(!l5(e))return!1;try{return f5(c5,xG,e),!0}catch{return!1}},u5=function(e){if(!l5(e))return!1;switch(wG(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bG||!!CG(gg,yG(e))}catch{return!0}};u5.sham=!0;var EG=!f5||vG(function(){var t;return lc(lc.call)||!lc(Object)||!lc(function(){t=!0})||t})?u5:lc,FG=EG,SG=Zu,_G=TypeError,TG=function(t){if(FG(t))return t;throw _G(SG(t)+" is not a constructor")},h5=IA,UG=TG,NG=Bs,IG=lA,LG=IG("species"),d5=function(t,e){var r=h5(t).constructor,A;return r===void 0||NG(A=h5(r)[LG])?e:UG(A)},kG=Wu,g5=Function.prototype,p5=g5.apply,m5=g5.call,pg=typeof Reflect=="object"&&Reflect.apply||(kG?m5.bind(p5):function(){return m5.apply(p5,arguments)}),QG=ws,OG=Rr,cc=function(t){if(QG(t)==="Function")return OG(t)},v5=cc,DG=Wa,PG=Wu,MG=v5(v5.bind),mg=function(t,e){return DG(t),e===void 0?t:PG?MG(t,e):function(){return t.apply(e,arguments)}},RG=ys,w5=RG("document","documentElement"),HG=Rr,VG=HG([].slice),KG=TypeError,GG=function(t,e){if(t<e)throw KG("Not enough arguments");return t},jG=Yu,B5=/(?:ipad|iphone|ipod).*applewebkit/i.test(jG),gn=tA,zG=pg,WG=mg,y5=Tr,XG=Zn,x5=Mr,C5=w5,$G=VG,b5=th,qG=GG,YG=B5,JG=oc,vg=gn.setImmediate,wg=gn.clearImmediate,ZG=gn.process,Bg=gn.Dispatch,ej=gn.Function,E5=gn.MessageChannel,tj=gn.String,yg=0,fc={},F5="onreadystatechange",uc,Cs,xg,Cg;x5(function(){uc=gn.location});var bg=function(t){if(XG(fc,t)){var e=fc[t];delete fc[t],e()}},Eg=function(t){return function(){bg(t)}},S5=function(t){bg(t.data)},_5=function(t){gn.postMessage(tj(t),uc.protocol+"//"+uc.host)};(!vg||!wg)&&(vg=function(e){qG(arguments.length,1);var r=y5(e)?e:ej(e),A=$G(arguments,1);return fc[++yg]=function(){zG(r,void 0,A)},Cs(yg),yg},wg=function(e){delete fc[e]},JG?Cs=function(t){ZG.nextTick(Eg(t))}:Bg&&Bg.now?Cs=function(t){Bg.now(Eg(t))}:E5&&!YG?(xg=new E5,Cg=xg.port2,xg.port1.onmessage=S5,Cs=WG(Cg.postMessage,Cg)):gn.addEventListener&&y5(gn.postMessage)&&!gn.importScripts&&uc&&uc.protocol!=="file:"&&!x5(_5)?(Cs=_5,gn.addEventListener("message",S5,!1)):F5 in b5("script")?Cs=function(t){C5.appendChild(b5("script"))[F5]=function(){C5.removeChild(this),bg(t)}}:Cs=function(t){setTimeout(Eg(t),0)});var T5={set:vg,clear:wg},U5=function(){this.head=null,this.tail=null};U5.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var N5=U5,rj=Yu,Aj=/ipad|iphone|ipod/i.test(rj)&&typeof Pebble<"u",nj=Yu,aj=/web0s(?!.*chrome)/i.test(nj),bs=tA,I5=mg,ij=Co.f,Fg=T5.set,sj=N5,oj=B5,lj=Aj,cj=aj,Sg=oc,L5=bs.MutationObserver||bs.WebKitMutationObserver,k5=bs.document,Q5=bs.process,uh=bs.Promise,O5=ij(bs,"queueMicrotask"),_g=O5&&O5.value,_o,Tg,Ug,hh,D5;if(!_g){var dh=new sj,gh=function(){var t,e;for(Sg&&(t=Q5.domain)&&t.exit();e=dh.get();)try{e()}catch(r){throw dh.head&&_o(),r}t&&t.enter()};!oj&&!Sg&&!cj&&L5&&k5?(Tg=!0,Ug=k5.createTextNode(""),new L5(gh).observe(Ug,{characterData:!0}),_o=function(){Ug.data=Tg=!Tg}):!lj&&uh&&uh.resolve?(hh=uh.resolve(void 0),hh.constructor=uh,D5=I5(hh.then,hh),_o=function(){D5(gh)}):Sg?_o=function(){Q5.nextTick(gh)}:(Fg=I5(Fg,bs),_o=function(){Fg(gh)}),_g=function(t){dh.head||_o(),dh.add(t)}}var fj=_g,uj=function(t,e){try{arguments.length==1?console.error(t):console.error(t,e)}catch{}},Ng=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},hj=tA,ph=hj.Promise,P5=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",dj=P5,gj=oc,pj=!dj&&!gj&&typeof window=="object"&&typeof document=="object",mj=tA,hc=ph,vj=Tr,wj=A5,Bj=rg,yj=lA,xj=pj,Cj=P5,Ig=M1;hc&&hc.prototype;var bj=yj("species"),Lg=!1,M5=vj(mj.PromiseRejectionEvent),Ej=wj("Promise",function(){var t=Bj(hc),e=t!==String(hc);if(!e&&Ig===66)return!0;if(!Ig||Ig<51||!/native code/.test(t)){var r=new hc(function(a){a(1)}),A=function(a){a(function(){},function(){})},n=r.constructor={};if(n[bj]=A,Lg=r.then(function(){})instanceof A,!Lg)return!0}return!e&&(xj||Cj)&&!M5}),dc={CONSTRUCTOR:Ej,REJECTION_EVENT:M5,SUBCLASSING:Lg},To={},R5=Wa,Fj=TypeError,Sj=function(t){var e,r;this.promise=new t(function(A,n){if(e!==void 0||r!==void 0)throw Fj("Bad Promise constructor");e=A,r=n}),this.resolve=R5(e),this.reject=R5(r)};To.f=function(t){return new Sj(t)};var _j=jA,mh=oc,Ii=tA,Uo=yA,H5=xs,V5=n5,Tj=hg,Uj=AG,Nj=Wa,vh=Tr,Ij=za,Lj=iG,kj=d5,K5=T5.set,kg=fj,Qj=uj,Oj=Ng,Dj=N5,G5=ih,wh=ph,Qg=dc,j5=To,Bh="Promise",z5=Qg.CONSTRUCTOR,Pj=Qg.REJECTION_EVENT,Mj=Qg.SUBCLASSING,Og=G5.getterFor(Bh),Rj=G5.set,No=wh&&wh.prototype,Es=wh,yh=No,W5=Ii.TypeError,Dg=Ii.document,Pg=Ii.process,Mg=j5.f,Hj=Mg,Vj=!!(Dg&&Dg.createEvent&&Ii.dispatchEvent),X5="unhandledrejection",Kj="rejectionhandled",$5=0,q5=1,Gj=2,Rg=1,Y5=2,xh,J5,jj,Z5,eC=function(t){var e;return Ij(t)&&vh(e=t.then)?e:!1},tC=function(t,e){var r=e.value,A=e.state==q5,n=A?t.ok:t.fail,a=t.resolve,i=t.reject,s=t.domain,o,l,c;try{n?(A||(e.rejection===Y5&&Wj(e),e.rejection=Rg),n===!0?o=r:(s&&s.enter(),o=n(r),s&&(s.exit(),c=!0)),o===t.promise?i(W5("Promise-chain cycle")):(l=eC(o))?Uo(l,o,a,i):a(o)):i(r)}catch(d){s&&!c&&s.exit(),i(d)}},rC=function(t,e){t.notified||(t.notified=!0,kg(function(){for(var r=t.reactions,A;A=r.get();)tC(A,t);t.notified=!1,e&&!t.rejection&&zj(t)}))},AC=function(t,e,r){var A,n;Vj?(A=Dg.createEvent("Event"),A.promise=e,A.reason=r,A.initEvent(t,!1,!0),Ii.dispatchEvent(A)):A={promise:e,reason:r},!Pj&&(n=Ii["on"+t])?n(A):t===X5&&Qj("Unhandled promise rejection",r)},zj=function(t){Uo(K5,Ii,function(){var e=t.facade,r=t.value,A=nC(t),n;if(A&&(n=Oj(function(){mh?Pg.emit("unhandledRejection",r,e):AC(X5,e,r)}),t.rejection=mh||nC(t)?Y5:Rg,n.error))throw n.value})},nC=function(t){return t.rejection!==Rg&&!t.parent},Wj=function(t){Uo(K5,Ii,function(){var e=t.facade;mh?Pg.emit("rejectionHandled",e):AC(Kj,e,t.value)})},Io=function(t,e,r){return function(A){t(e,A,r)}},Lo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=Gj,rC(t,!0))},Hg=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw W5("Promise can't be resolved itself");var A=eC(e);A?kg(function(){var n={done:!1};try{Uo(A,e,Io(Hg,n,t),Io(Lo,n,t))}catch(a){Lo(n,a,t)}}):(t.value=e,t.state=q5,rC(t,!1))}catch(n){Lo({done:!1},n,t)}}};if(z5&&(Es=function(e){Lj(this,yh),Nj(e),Uo(xh,this);var r=Og(this);try{e(Io(Hg,r),Io(Lo,r))}catch(A){Lo(r,A)}},yh=Es.prototype,xh=function(e){Rj(this,{type:Bh,done:!1,notified:!1,parent:!1,reactions:new Dj,rejection:!1,state:$5,value:void 0})},xh.prototype=H5(yh,"then",function(e,r){var A=Og(this),n=Mg(kj(this,Es));return A.parent=!0,n.ok=vh(e)?e:!0,n.fail=vh(r)&&r,n.domain=mh?Pg.domain:void 0,A.state==$5?A.reactions.add(n):kg(function(){tC(n,A)}),n.promise}),J5=function(){var t=new xh,e=Og(t);this.promise=t,this.resolve=Io(Hg,e),this.reject=Io(Lo,e)},j5.f=Mg=function(t){return t===Es||t===jj?new J5(t):Hj(t)},vh(wh)&&No!==Object.prototype)){Z5=No.then,Mj||H5(No,"then",function(e,r){var A=this;return new Es(function(n,a){Uo(Z5,A,n,a)}).then(e,r)},{unsafe:!0});try{delete No.constructor}catch{}V5&&V5(No,yh)}_j({global:!0,constructor:!0,wrap:!0,forced:z5},{Promise:Es}),Tj(Es,Bh,!1),Uj(Bh);var gc={},Xj=lA,$j=gc,qj=Xj("iterator"),Yj=Array.prototype,Jj=function(t){return t!==void 0&&($j.Array===t||Yj[qj]===t)},Zj=dg,aC=bo,ez=Bs,tz=gc,rz=lA,Az=rz("iterator"),iC=function(t){if(!ez(t))return aC(t,Az)||aC(t,"@@iterator")||tz[Zj(t)]},nz=yA,az=Wa,iz=IA,sz=Zu,oz=iC,lz=TypeError,cz=function(t,e){var r=arguments.length<2?oz(t):e;if(az(r))return iz(nz(r,t));throw lz(sz(t)+" is not iterable")},fz=yA,sC=IA,uz=bo,hz=function(t,e,r){var A,n;sC(t);try{if(A=uz(t,"return"),!A){if(e==="throw")throw r;return r}A=fz(A,t)}catch(a){n=!0,A=a}if(e==="throw")throw r;if(n)throw A;return sC(A),r},dz=mg,gz=yA,pz=IA,mz=Zu,vz=Jj,wz=ch,oC=qu,Bz=cz,yz=iC,lC=hz,xz=TypeError,Ch=function(t,e){this.stopped=t,this.result=e},cC=Ch.prototype,fC=function(t,e,r){var A=r&&r.that,n=!!(r&&r.AS_ENTRIES),a=!!(r&&r.IS_RECORD),i=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),o=dz(e,A),l,c,d,g,h,p,v,y=function(b){return l&&lC(l,"normal",b),new Ch(!0,b)},C=function(b){return n?(pz(b),s?o(b[0],b[1],y):o(b[0],b[1])):s?o(b,y):o(b)};if(a)l=t.iterator;else if(i)l=t;else{if(c=yz(t),!c)throw xz(mz(t)+" is not iterable");if(vz(c)){for(d=0,g=wz(t);g>d;d++)if(h=C(t[d]),h&&oC(cC,h))return h;return new Ch(!1)}l=Bz(t,c)}for(p=a?t.next:l.next;!(v=gz(p,l)).done;){try{h=C(v.value)}catch(b){lC(l,"throw",b)}if(typeof h=="object"&&h&&oC(cC,h))return h}return new Ch(!1)},Cz=lA,uC=Cz("iterator"),hC=!1;try{var bz=0,dC={next:function(){return{done:!!bz++}},return:function(){hC=!0}};dC[uC]=function(){return this},Array.from(dC,function(){throw 2})}catch{}var Ez=function(t,e){if(!e&&!hC)return!1;var r=!1;try{var A={};A[uC]=function(){return{next:function(){return{done:r=!0}}}},t(A)}catch{}return r},Fz=ph,Sz=Ez,_z=dc.CONSTRUCTOR,gC=_z||!Sz(function(t){Fz.all(t).then(void 0,function(){})}),Tz=jA,Uz=yA,Nz=Wa,Iz=To,Lz=Ng,kz=fC,Qz=gC;Tz({target:"Promise",stat:!0,forced:Qz},{all:function(e){var r=this,A=Iz.f(r),n=A.resolve,a=A.reject,i=Lz(function(){var s=Nz(r.resolve),o=[],l=0,c=1;kz(e,function(d){var g=l++,h=!1;c++,Uz(s,r,d).then(function(p){h||(h=!0,o[g]=p,--c||n(o))},a)}),--c||n(o)});return i.error&&a(i.value),A.promise}});var Oz=jA,Dz=dc.CONSTRUCTOR,Vg=ph,Pz=ys,Mz=Tr,Rz=xs,pC=Vg&&Vg.prototype;if(Oz({target:"Promise",proto:!0,forced:Dz,real:!0},{catch:function(t){return this.then(void 0,t)}}),Mz(Vg)){var mC=Pz("Promise").prototype.catch;pC.catch!==mC&&Rz(pC,"catch",mC,{unsafe:!0})}var Hz=jA,Vz=yA,Kz=Wa,Gz=To,jz=Ng,zz=fC,Wz=gC;Hz({target:"Promise",stat:!0,forced:Wz},{race:function(e){var r=this,A=Gz.f(r),n=A.reject,a=jz(function(){var i=Kz(r.resolve);zz(e,function(s){Vz(i,r,s).then(A.resolve,n)})});return a.error&&n(a.value),A.promise}});var Xz=jA,$z=yA,qz=To,Yz=dc.CONSTRUCTOR;Xz({target:"Promise",stat:!0,forced:Yz},{reject:function(e){var r=qz.f(this);return $z(r.reject,void 0,e),r.promise}});var Jz=IA,Zz=za,eW=To,tW=function(t,e){if(Jz(t),Zz(e)&&e.constructor===t)return e;var r=eW.f(t),A=r.resolve;return A(e),r.promise},rW=jA,AW=ys,nW=dc.CONSTRUCTOR,aW=tW;AW("Promise"),rW({target:"Promise",stat:!0,forced:nW},{resolve:function(e){return aW(this,e)}});function vC(t,e,r,A,n,a,i){try{var s=t[a](i),o=s.value}catch(l){r(l);return}s.done?e(o):Promise.resolve(o).then(A,n)}function Xa(t){return function(){var e=this,r=arguments;return new Promise(function(A,n){var a=t.apply(e,r);function i(o){vC(a,A,n,i,s,"next",o)}function s(o){vC(a,A,n,i,s,"throw",o)}i(void 0)})}}var iW=dg,sW=String,Sa=function(t){if(iW(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return sW(t)},oW=IA,wC=function(){var t=oW(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Kg=Mr,lW=tA,Gg=lW.RegExp,jg=Kg(function(){var t=Gg("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),cW=jg||Kg(function(){return!Gg("a","y").sticky}),fW=jg||Kg(function(){var t=Gg("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),BC={BROKEN_CARET:fW,MISSED_STICKY:cW,UNSUPPORTED_Y:jg},yC={},uW=e5,hW=fg,dW=Object.keys||function(e){return uW(e,hW)},gW=Ca,pW=Px,mW=Ea,vW=IA,wW=nc,BW=dW;yC.f=gW&&!pW?Object.defineProperties:function(e,r){vW(e);for(var A=wW(r),n=BW(r),a=n.length,i=0,s;a>i;)mW.f(e,s=n[i++],A[s]);return e};var yW=IA,xW=yC,xC=fg,CW=ng,bW=w5,EW=th,FW=Ag,CC=">",bC="<",zg="prototype",Wg="script",EC=FW("IE_PROTO"),Xg=function(){},FC=function(t){return bC+Wg+CC+t+bC+"/"+Wg+CC},SC=function(t){t.write(FC("")),t.close();var e=t.parentWindow.Object;return t=null,e},SW=function(){var t=EW("iframe"),e="java"+Wg+":",r;return t.style.display="none",bW.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(FC("document.F=Object")),r.close(),r.F},bh,Eh=function(){try{bh=new ActiveXObject("htmlfile")}catch{}Eh=typeof document<"u"?document.domain&&bh?SC(bh):SW():SC(bh);for(var t=xC.length;t--;)delete Eh[zg][xC[t]];return Eh()};CW[EC]=!0;var $g=Object.create||function(e,r){var A;return e!==null?(Xg[zg]=yW(e),A=new Xg,Xg[zg]=null,A[EC]=e):A=Eh(),r===void 0?A:xW.f(A,r)},_W=Mr,TW=tA,UW=TW.RegExp,NW=_W(function(){var t=UW(".","s");return!(t.dotAll&&t.exec(`
|
|
376
|
+
`)&&t.flags==="s")}),IW=Mr,LW=tA,kW=LW.RegExp,QW=IW(function(){var t=kW("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),ko=yA,Fh=Rr,OW=Sa,DW=wC,PW=BC,MW=j1,RW=$g,HW=ih.get,VW=NW,KW=QW,GW=MW("native-string-replace",String.prototype.replace),Sh=RegExp.prototype.exec,qg=Sh,jW=Fh("".charAt),zW=Fh("".indexOf),WW=Fh("".replace),Yg=Fh("".slice),Jg=function(){var t=/a/,e=/b*/g;return ko(Sh,t,"a"),ko(Sh,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),_C=PW.BROKEN_CARET,Zg=/()??/.exec("")[1]!==void 0,XW=Jg||Zg||_C||VW||KW;XW&&(qg=function(e){var r=this,A=HW(r),n=OW(e),a=A.raw,i,s,o,l,c,d,g;if(a)return a.lastIndex=r.lastIndex,i=ko(qg,a,n),r.lastIndex=a.lastIndex,i;var h=A.groups,p=_C&&r.sticky,v=ko(DW,r),y=r.source,C=0,b=n;if(p&&(v=WW(v,"y",""),zW(v,"g")===-1&&(v+="g"),b=Yg(n,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&jW(n,r.lastIndex-1)!==`
|
|
377
|
+
`)&&(y="(?: "+y+")",b=" "+b,C++),s=new RegExp("^(?:"+y+")",v)),Zg&&(s=new RegExp("^"+y+"$(?!\\s)",v)),Jg&&(o=r.lastIndex),l=ko(Sh,p?s:r,b),p?l?(l.input=Yg(l.input,C),l[0]=Yg(l[0],C),l.index=r.lastIndex,r.lastIndex+=l[0].length):r.lastIndex=0:Jg&&l&&(r.lastIndex=r.global?l.index+l[0].length:o),Zg&&l&&l.length>1&&ko(GW,l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&h)for(l.groups=d=RW(null),c=0;c<h.length;c++)g=h[c],d[g[0]]=l[g[1]];return l});var _h=qg,$W=jA,TC=_h;$W({target:"RegExp",proto:!0,forced:/./.exec!==TC},{exec:TC});var UC=cc,NC=xs,qW=_h,IC=Mr,LC=lA,YW=ac,JW=LC("species"),ep=RegExp.prototype,tp=function(t,e,r,A){var n=LC(t),a=!IC(function(){var l={};return l[n]=function(){return 7},""[t](l)!=7}),i=a&&!IC(function(){var l=!1,c=/a/;return t==="split"&&(c={},c.constructor={},c.constructor[JW]=function(){return c},c.flags="",c[n]=/./[n]),c.exec=function(){return l=!0,null},c[n](""),!l});if(!a||!i||r){var s=UC(/./[n]),o=e(n,""[t],function(l,c,d,g,h){var p=UC(l),v=c.exec;return v===qW||v===ep.exec?a&&!h?{done:!0,value:s(c,d,g)}:{done:!0,value:p(d,c,g)}:{done:!1}});NC(String.prototype,t,o[0]),NC(ep,n,o[1])}A&&YW(ep[n],"sham",!0)},rp=Rr,ZW=lh,eX=Sa,tX=ba,rX=rp("".charAt),kC=rp("".charCodeAt),AX=rp("".slice),QC=function(t){return function(e,r){var A=eX(tX(e)),n=ZW(r),a=A.length,i,s;return n<0||n>=a?t?"":void 0:(i=kC(A,n),i<55296||i>56319||n+1===a||(s=kC(A,n+1))<56320||s>57343?t?rX(A,n):i:t?AX(A,n,n+2):(i-55296<<10)+(s-56320)+65536)}},nX={codeAt:QC(!1),charAt:QC(!0)},aX=nX.charAt,Ap=function(t,e,r){return e+(r?aX(t,e).length:1)},OC=yA,iX=IA,sX=Tr,oX=ws,lX=_h,cX=TypeError,np=function(t,e){var r=t.exec;if(sX(r)){var A=OC(r,t,e);return A!==null&&iX(A),A}if(oX(t)==="RegExp")return OC(lX,t,e);throw cX("RegExp#exec called on incompatible receiver")},fX=yA,uX=tp,hX=IA,dX=Bs,gX=So,ap=Sa,pX=ba,mX=bo,vX=Ap,DC=np;uX("match",function(t,e,r){return[function(n){var a=pX(this),i=dX(n)?void 0:mX(n,t);return i?fX(i,n,a):new RegExp(n)[t](ap(a))},function(A){var n=hX(this),a=ap(A),i=r(e,n,a);if(i.done)return i.value;if(!n.global)return DC(n,a);var s=n.unicode;n.lastIndex=0;for(var o=[],l=0,c;(c=DC(n,a))!==null;){var d=ap(c[0]);o[l]=d,d===""&&(n.lastIndex=vX(a,gX(n.lastIndex),s)),l++}return l===0?null:o}]});var ip=Rr,wX=eh,BX=Math.floor,sp=ip("".charAt),yX=ip("".replace),op=ip("".slice),xX=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,CX=/\$([$&'`]|\d{1,2})/g,bX=function(t,e,r,A,n,a){var i=r+t.length,s=A.length,o=CX;return n!==void 0&&(n=wX(n),o=xX),yX(a,o,function(l,c){var d;switch(sp(c,0)){case"$":return"$";case"&":return t;case"`":return op(e,0,r);case"'":return op(e,i);case"<":d=n[op(c,1,-1)];break;default:var g=+c;if(g===0)return l;if(g>s){var h=BX(g/10);return h===0?l:h<=s?A[h-1]===void 0?sp(c,1):A[h-1]+sp(c,1):l}d=A[g-1]}return d===void 0?"":d})},EX=pg,PC=yA,Th=Rr,FX=tp,SX=Mr,_X=IA,TX=Tr,UX=Bs,NX=lh,IX=So,Qo=Sa,LX=ba,kX=Ap,QX=bo,OX=bX,DX=np,PX=lA,lp=PX("replace"),MX=Math.max,RX=Math.min,HX=Th([].concat),cp=Th([].push),MC=Th("".indexOf),RC=Th("".slice),VX=function(t){return t===void 0?t:String(t)},KX=function(){return"a".replace(/./,"$0")==="$0"}(),HC=function(){return/./[lp]?/./[lp]("a","$0")==="":!1}(),GX=!SX(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"});FX("replace",function(t,e,r){var A=HC?"$":"$0";return[function(a,i){var s=LX(this),o=UX(a)?void 0:QX(a,lp);return o?PC(o,a,s,i):PC(e,Qo(s),a,i)},function(n,a){var i=_X(this),s=Qo(n);if(typeof a=="string"&&MC(a,A)===-1&&MC(a,"$<")===-1){var o=r(e,i,s,a);if(o.done)return o.value}var l=TX(a);l||(a=Qo(a));var c=i.global;if(c){var d=i.unicode;i.lastIndex=0}for(var g=[];;){var h=DX(i,s);if(h===null||(cp(g,h),!c))break;var p=Qo(h[0]);p===""&&(i.lastIndex=kX(s,IX(i.lastIndex),d))}for(var v="",y=0,C=0;C<g.length;C++){h=g[C];for(var b=Qo(h[0]),F=MX(RX(NX(h.index),s.length),0),O=[],W=1;W<h.length;W++)cp(O,VX(h[W]));var X=h.groups;if(l){var k=HX([b],O,F,s);X!==void 0&&cp(k,X);var Q=Qo(EX(a,void 0,k))}else Q=OX(b,s,F,O,X,a);F>=y&&(v+=RC(s,y,F)+Q,y=F+b.length)}return v+RC(s,y)}]},!GX||!KX||HC);var jX=za,zX=ws,WX=lA,XX=WX("match"),VC=function(t){var e;return jX(t)&&((e=t[XX])!==void 0?!!e:zX(t)=="RegExp")},$X=VC,qX=TypeError,fp=function(t){if($X(t))throw qX("The method doesn't accept regular expressions");return t},YX=lA,JX=YX("match"),up=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[JX]=!1,"/./"[t](e)}catch{}}return!1},ZX=jA,KC=cc,e$=Co.f,t$=So,GC=Sa,r$=fp,A$=ba,n$=up,jC=KC("".startsWith),a$=KC("".slice),i$=Math.min,zC=n$("startsWith"),s$=!zC&&!!function(){var t=e$(String.prototype,"startsWith");return t&&!t.writable}();ZX({target:"String",proto:!0,forced:!s$&&!zC},{startsWith:function(e){var r=GC(A$(this));r$(e);var A=t$(i$(arguments.length>1?arguments[1]:void 0,r.length)),n=GC(e);return jC?jC(r,n,A):a$(r,A,A+n.length)===n}});var o$=lA,l$=$g,c$=Ea.f,hp=o$("unscopables"),dp=Array.prototype;dp[hp]==null&&c$(dp,hp,{configurable:!0,value:l$(null)});var f$=function(t){dp[hp][t]=!0},u$=Mr,h$=!u$(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),d$=Zn,g$=Tr,p$=eh,m$=Ag,v$=h$,WC=m$("IE_PROTO"),gp=Object,w$=gp.prototype,XC=v$?gp.getPrototypeOf:function(t){var e=p$(t);if(d$(e,WC))return e[WC];var r=e.constructor;return g$(r)&&e instanceof r?r.prototype:e instanceof gp?w$:null},B$=Mr,y$=Tr,x$=za,$C=XC,C$=xs,b$=lA,pp=b$("iterator"),qC=!1,Fs,mp,vp;[].keys&&(vp=[].keys(),"next"in vp?(mp=$C($C(vp)),mp!==Object.prototype&&(Fs=mp)):qC=!0);var E$=!x$(Fs)||B$(function(){var t={};return Fs[pp].call(t)!==t});E$&&(Fs={}),y$(Fs[pp])||C$(Fs,pp,function(){return this});var YC={IteratorPrototype:Fs,BUGGY_SAFARI_ITERATORS:qC},F$=YC.IteratorPrototype,S$=$g,_$=$u,T$=hg,U$=gc,N$=function(){return this},I$=function(t,e,r,A){var n=e+" Iterator";return t.prototype=S$(F$,{next:_$(+!A,r)}),T$(t,n,!1),U$[n]=N$,t},L$=jA,k$=yA,JC=Ah,Q$=Tr,O$=I$,ZC=XC,e4=n5,D$=hg,P$=ac,wp=xs,M$=lA,R$=gc,t4=YC,H$=JC.PROPER,V$=JC.CONFIGURABLE,r4=t4.IteratorPrototype,Uh=t4.BUGGY_SAFARI_ITERATORS,pc=M$("iterator"),A4="keys",mc="values",n4="entries",K$=function(){return this},G$=function(t,e,r,A,n,a,i){O$(r,e,A);var s=function(C){if(C===n&&g)return g;if(!Uh&&C in c)return c[C];switch(C){case A4:return function(){return new r(this,C)};case mc:return function(){return new r(this,C)};case n4:return function(){return new r(this,C)}}return function(){return new r(this)}},o=e+" Iterator",l=!1,c=t.prototype,d=c[pc]||c["@@iterator"]||n&&c[n],g=!Uh&&d||s(n),h=e=="Array"&&c.entries||d,p,v,y;if(h&&(p=ZC(h.call(new t)),p!==Object.prototype&&p.next&&(ZC(p)!==r4&&(e4?e4(p,r4):Q$(p[pc])||wp(p,pc,K$)),D$(p,o,!0))),H$&&n==mc&&d&&d.name!==mc&&(V$?P$(c,"name",mc):(l=!0,g=function(){return k$(d,this)})),n)if(v={values:s(mc),keys:a?g:s(A4),entries:s(n4)},i)for(y in v)(Uh||l||!(y in c))&&wp(c,y,v[y]);else L$({target:e,proto:!0,forced:Uh||l},v);return c[pc]!==g&&wp(c,pc,g,{name:n}),R$[e]=g,v},j$=function(t,e){return{value:t,done:e}},z$=nc,Bp=f$,a4=gc,i4=ih,W$=Ea.f,X$=G$,Nh=j$,$$=Ca,s4="Array Iterator",q$=i4.set,Y$=i4.getterFor(s4),J$=X$(Array,"Array",function(t,e){q$(this,{type:s4,target:z$(t),index:0,kind:e})},function(){var t=Y$(this),e=t.target,r=t.kind,A=t.index++;return!e||A>=e.length?(t.target=void 0,Nh(void 0,!0)):r=="keys"?Nh(A,!1):r=="values"?Nh(e[A],!1):Nh([A,e[A]],!1)},"values"),o4=a4.Arguments=a4.Array;if(Bp("keys"),Bp("values"),Bp("entries"),$$&&o4.name!=="values")try{W$(o4,"name",{value:"values"})}catch{}var Z$={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},eq=th,yp=eq("span").classList,l4=yp&&yp.constructor&&yp.constructor.prototype,tq=l4===Object.prototype?void 0:l4,c4=tA,f4=Z$,rq=tq,vc=J$,xp=ac,u4=lA,Cp=u4("iterator"),h4=u4("toStringTag"),bp=vc.values,d4=function(t,e){if(t){if(t[Cp]!==bp)try{xp(t,Cp,bp)}catch{t[Cp]=bp}if(t[h4]||xp(t,h4,e),f4[e]){for(var r in vc)if(t[r]!==vc[r])try{xp(t,r,vc[r])}catch{t[r]=vc[r]}}}};for(var Ep in f4)d4(c4[Ep]&&c4[Ep].prototype,Ep);d4(rq,"DOMTokenList");function Aq(t,e){if(Wt(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var A=r.call(t,e||"default");if(Wt(A)!=="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nq(t){var e=Aq(t,"string");return Wt(e)==="symbol"?e:String(e)}function Fp(t,e,r){return e=nq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var aq=Wa,iq=eh,sq=hx,oq=ch,lq=TypeError,g4=function(t){return function(e,r,A,n){aq(r);var a=iq(e),i=sq(a),s=oq(a),o=t?s-1:0,l=t?-1:1;if(A<2)for(;;){if(o in i){n=i[o],o+=l;break}if(o+=l,t?o<0:s<=o)throw lq("Reduce of empty array with no initial value")}for(;t?o>=0:s>o;o+=l)o in i&&(n=r(n,i[o],o,a));return n}},cq={left:g4(!1),right:g4(!0)},fq=Mr,p4=function(t,e){var r=[][t];return!!r&&fq(function(){r.call(null,e||function(){return 1},1)})},uq=jA,hq=cq.left,dq=p4,m4=M1,gq=oc,pq=!gq&&m4>79&&m4<83,mq=pq||!dq("reduce");uq({target:"Array",proto:!0,forced:mq},{reduce:function(e){var r=arguments.length;return hq(this,e,r,r>1?arguments[1]:void 0)}});var vq=jA,v4=cc,wq=Co.f,Bq=So,w4=Sa,yq=fp,xq=ba,Cq=up,B4=v4("".endsWith),bq=v4("".slice),Eq=Math.min,y4=Cq("endsWith"),Fq=!y4&&!!function(){var t=wq(String.prototype,"endsWith");return t&&!t.writable}();vq({target:"String",proto:!0,forced:!Fq&&!y4},{endsWith:function(e){var r=w4(xq(this));yq(e);var A=arguments.length>1?arguments[1]:void 0,n=r.length,a=A===void 0?n:Eq(Bq(A),n),i=w4(e);return B4?B4(r,i,a):bq(r,a-i.length,a)===i}});var Sq=W1,_q=Ea,Tq=$u,Uq=function(t,e,r){var A=Sq(e);A in t?_q.f(t,A,Tq(0,r)):t[A]=r},x4=qx,Nq=ch,Iq=Uq,Lq=Array,kq=Math.max,Qq=function(t,e,r){for(var A=Nq(t),n=x4(e,A),a=x4(r===void 0?A:r,A),i=Lq(kq(a-n,0)),s=0;n<a;n++,s++)Iq(i,s,t[n]);return i.length=s,i},Oq=pg,wc=yA,Sp=Rr,Dq=tp,Pq=IA,Mq=Bs,Rq=VC,C4=ba,Hq=d5,Vq=Ap,Kq=So,_p=Sa,Gq=bo,b4=Qq,E4=np,jq=_h,zq=BC,Wq=Mr,Oo=zq.UNSUPPORTED_Y,F4=4294967295,Xq=Math.min,S4=[].push,$q=Sp(/./.exec),Do=Sp(S4),Bc=Sp("".slice),qq=!Wq(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return r.length!==2||r[0]!=="a"||r[1]!=="b"});Dq("split",function(t,e,r){var A;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?A=function(n,a){var i=_p(C4(this)),s=a===void 0?F4:a>>>0;if(s===0)return[];if(n===void 0)return[i];if(!Rq(n))return wc(e,i,n,s);for(var o=[],l=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),c=0,d=new RegExp(n.source,l+"g"),g,h,p;(g=wc(jq,d,i))&&(h=d.lastIndex,!(h>c&&(Do(o,Bc(i,c,g.index)),g.length>1&&g.index<i.length&&Oq(S4,o,b4(g,1)),p=g[0].length,c=h,o.length>=s)));)d.lastIndex===g.index&&d.lastIndex++;return c===i.length?(p||!$q(d,""))&&Do(o,""):Do(o,Bc(i,c)),o.length>s?b4(o,0,s):o}:"0".split(void 0,0).length?A=function(n,a){return n===void 0&&a===0?[]:wc(e,this,n,a)}:A=e,[function(a,i){var s=C4(this),o=Mq(a)?void 0:Gq(a,t);return o?wc(o,a,s,i):wc(A,_p(s),a,i)},function(n,a){var i=Pq(this),s=_p(n),o=r(A,i,s,a,A!==e);if(o.done)return o.value;var l=Hq(i,RegExp),c=i.unicode,d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(Oo?"g":"y"),g=new l(Oo?"^(?:"+i.source+")":i,d),h=a===void 0?F4:a>>>0;if(h===0)return[];if(s.length===0)return E4(g,s)===null?[s]:[];for(var p=0,v=0,y=[];v<s.length;){g.lastIndex=Oo?0:v;var C=E4(g,Oo?Bc(s,v):s),b;if(C===null||(b=Xq(Kq(g.lastIndex+(Oo?v:0)),s.length))===p)v=Vq(s,v,c);else{if(Do(y,Bc(s,p,v)),y.length===h)return y;for(var F=1;F<=C.length-1;F++)if(Do(y,C[F]),y.length===h)return y;v=p=b}}return Do(y,Bc(s,p)),y}]},!qq,Oo);var Ih={exports:{}},yc={exports:{}};(function(){var t,e,r,A,n,a;typeof performance<"u"&&performance!==null&&performance.now?yc.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(yc.exports=function(){return(t()-n)/1e6},e=process.hrtime,t=function(){var i;return i=e(),i[0]*1e9+i[1]},A=t(),a=process.uptime()*1e9,n=A-a):Date.now?(yc.exports=function(){return Date.now()-r},r=Date.now()):(yc.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Ac);for(var Yq=yc.exports,Jq=Yq,$a=typeof window>"u"?Ac:window,Lh=["moz","webkit"],Po="AnimationFrame",Mo=$a["request"+Po],xc=$a["cancel"+Po]||$a["cancelRequest"+Po],Cc=0;!Mo&&Cc<Lh.length;Cc++)Mo=$a[Lh[Cc]+"Request"+Po],xc=$a[Lh[Cc]+"Cancel"+Po]||$a[Lh[Cc]+"CancelRequest"+Po];if(!Mo||!xc){var Tp=0,_4=0,Ss=[],Zq=1e3/60;Mo=function(t){if(Ss.length===0){var e=Jq(),r=Math.max(0,Zq-(e-Tp));Tp=r+e,setTimeout(function(){var A=Ss.slice(0);Ss.length=0;for(var n=0;n<A.length;n++)if(!A[n].cancelled)try{A[n].callback(Tp)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return Ss.push({handle:++_4,callback:t,cancelled:!1}),_4},xc=function(t){for(var e=0;e<Ss.length;e++)Ss[e].handle===t&&(Ss[e].cancelled=!0)}}Ih.exports=function(t){return Mo.call($a,t)},Ih.exports.cancel=function(){xc.apply($a,arguments)},Ih.exports.polyfill=function(t){t||(t=$a),t.requestAnimationFrame=Mo,t.cancelAnimationFrame=xc};var eY=Ih.exports;const Up=ix(eY);var T4=`
|
|
378
|
+
\v\f\r \u2028\u2029\uFEFF`,tY=Rr,rY=ba,AY=Sa,Np=T4,U4=tY("".replace),nY=RegExp("^["+Np+"]+"),aY=RegExp("(^|[^"+Np+"])["+Np+"]+$"),Ip=function(t){return function(e){var r=AY(rY(e));return t&1&&(r=U4(r,nY,"")),t&2&&(r=U4(r,aY,"$1")),r}},iY={start:Ip(1),end:Ip(2),trim:Ip(3)},sY=Ah.PROPER,oY=Mr,N4=T4,I4="
",lY=function(t){return oY(function(){return!!N4[t]()||I4[t]()!==I4||sY&&N4[t].name!==t})},cY=jA,fY=iY.trim,uY=lY;cY({target:"String",proto:!0,forced:uY("trim")},{trim:function(){return fY(this)}});var hY=function(t){this.ok=!1,this.alpha=1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t=t.replace(/ /g,""),t=t.toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),parseFloat(o[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(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],A=0;A<r.length;A++){var n=r[A].re,a=r[A].process,i=n.exec(t);if(i){var s=a(i);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[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 o=this.r.toString(16),l=this.g.toString(16),c=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),"#"+o+l+c},this.getHelpXML=function(){for(var o=new Array,l=0;l<r.length;l++)for(var c=r[l].example,d=0;d<c.length;d++)o[o.length]=c[d];for(var g in e)o[o.length]=g;var h=document.createElement("ul");h.setAttribute("id","rgbcolor-examples");for(var l=0;l<o.length;l++)try{var p=document.createElement("li"),v=new RGBColor(o[l]),y=document.createElement("div");y.style.cssText="margin: 3px; border: 1px solid black; background:"+v.toHex()+"; color:"+v.toHex(),y.appendChild(document.createTextNode("test"));var C=document.createTextNode(" "+o[l]+" -> "+v.toRGB()+" -> "+v.toHex());p.appendChild(y),p.appendChild(C),h.appendChild(p)}catch{}return h}};const Lp=ix(hY);var dY=jA,gY=cc,pY=Jx.indexOf,mY=p4,kp=gY([].indexOf),L4=!!kp&&1/kp([1],1,-0)<0,vY=L4||!mY("indexOf");dY({target:"Array",proto:!0,forced:vY},{indexOf:function(e){var r=arguments.length>1?arguments[1]:void 0;return L4?kp(this,e,r)||0:pY(this,e,r)}});var wY=jA,BY=Rr,yY=fp,xY=ba,k4=Sa,CY=up,bY=BY("".indexOf);wY({target:"String",proto:!0,forced:!CY("includes")},{includes:function(e){return!!~bY(k4(xY(this)),k4(yY(e)),arguments.length>1?arguments[1]:void 0)}});var EY=ws,FY=Array.isArray||function(e){return EY(e)=="Array"},SY=jA,_Y=Rr,TY=FY,UY=_Y([].reverse),Q4=[1,2];SY({target:"Array",proto:!0,forced:String(Q4)===String(Q4.reverse())},{reverse:function(){return TY(this)&&(this.length=this.length),UY(this)}});/*! *****************************************************************************
|
|
379
379
|
Copyright (c) Microsoft Corporation.
|
|
380
380
|
|
|
381
381
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -388,5 +388,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
388
388
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
389
389
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
390
390
|
PERFORMANCE OF THIS SOFTWARE.
|
|
391
|
-
***************************************************************************** */var O4=function(t,e){return(O4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,A){r.__proto__=A}||function(r,A){for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(r[n]=A[n])})(t,e)};function D4(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}O4(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function UY(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var A=t[r];if(A.type===je.CLOSE_PATH)e+="z";else if(A.type===je.HORIZ_LINE_TO)e+=(A.relative?"h":"H")+A.x;else if(A.type===je.VERT_LINE_TO)e+=(A.relative?"v":"V")+A.y;else if(A.type===je.MOVE_TO)e+=(A.relative?"m":"M")+A.x+" "+A.y;else if(A.type===je.LINE_TO)e+=(A.relative?"l":"L")+A.x+" "+A.y;else if(A.type===je.CURVE_TO)e+=(A.relative?"c":"C")+A.x1+" "+A.y1+" "+A.x2+" "+A.y2+" "+A.x+" "+A.y;else if(A.type===je.SMOOTH_CURVE_TO)e+=(A.relative?"s":"S")+A.x2+" "+A.y2+" "+A.x+" "+A.y;else if(A.type===je.QUAD_TO)e+=(A.relative?"q":"Q")+A.x1+" "+A.y1+" "+A.x+" "+A.y;else if(A.type===je.SMOOTH_QUAD_TO)e+=(A.relative?"t":"T")+A.x+" "+A.y;else{if(A.type!==je.ARC)throw new Error('Unexpected command type "'+A.type+'" at index '+r+".");e+=(A.relative?"a":"A")+A.rX+" "+A.rY+" "+A.xRot+" "+ +A.lArcFlag+" "+ +A.sweepFlag+" "+A.x+" "+A.y}}return e}function Qp(t,e){var r=t[0],A=t[1];return[r*Math.cos(e)-A*Math.sin(e),r*Math.sin(e)+A*Math.cos(e)]}function ea(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if(typeof t[r]!="number")throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var Li=Math.PI;function Op(t,e,r){t.lArcFlag=t.lArcFlag===0?0:1,t.sweepFlag=t.sweepFlag===0?0:1;var A=t.rX,n=t.rY,a=t.x,i=t.y;A=Math.abs(t.rX),n=Math.abs(t.rY);var s=Qp([(e-a)/2,(r-i)/2],-t.xRot/180*Li),o=s[0],l=s[1],c=Math.pow(o,2)/Math.pow(A,2)+Math.pow(l,2)/Math.pow(n,2);1<c&&(A*=Math.sqrt(c),n*=Math.sqrt(c)),t.rX=A,t.rY=n;var d=Math.pow(A,2)*Math.pow(l,2)+Math.pow(n,2)*Math.pow(o,2),g=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(A,2)*Math.pow(n,2)-d)/d)),h=A*l/n*g,p=-n*o/A*g,v=Qp([h,p],t.xRot/180*Li);t.cX=v[0]+(e+a)/2,t.cY=v[1]+(r+i)/2,t.phi1=Math.atan2((l-p)/n,(o-h)/A),t.phi2=Math.atan2((-l-p)/n,(-o-h)/A),t.sweepFlag===0&&t.phi2>t.phi1&&(t.phi2-=2*Li),t.sweepFlag===1&&t.phi2<t.phi1&&(t.phi2+=2*Li),t.phi1*=180/Li,t.phi2*=180/Li}function P4(t,e,r){ea(t,e,r);var A=t*t+e*e-r*r;if(0>A)return[];if(A===0)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var n=Math.sqrt(A);return[[(t*r+e*n)/(t*t+e*e),(e*r-t*n)/(t*t+e*e)],[(t*r-e*n)/(t*t+e*e),(e*r+t*n)/(t*t+e*e)]]}var Wr,qa=Math.PI/180;function M4(t,e,r){return(1-r)*t+r*e}function R4(t,e,r,A){return t+Math.cos(A/180*Li)*e+Math.sin(A/180*Li)*r}function H4(t,e,r,A){var n=1e-6,a=e-t,i=r-e,s=3*a+3*(A-r)-6*i,o=6*(i-a),l=3*a;return Math.abs(s)<n?[-l/o]:function(c,d,g){g===void 0&&(g=1e-6);var h=c*c/4-d;if(h<-g)return[];if(h<=g)return[-c/2];var p=Math.sqrt(h);return[-c/2-p,-c/2+p]}(o/s,l/s,n)}function V4(t,e,r,A,n){var a=1-n;return t*(a*a*a)+e*(3*a*a*n)+r*(3*a*n*n)+A*(n*n*n)}(function(t){function e(){return n(function(s,o,l){return s.relative&&(s.x1!==void 0&&(s.x1+=o),s.y1!==void 0&&(s.y1+=l),s.x2!==void 0&&(s.x2+=o),s.y2!==void 0&&(s.y2+=l),s.x!==void 0&&(s.x+=o),s.y!==void 0&&(s.y+=l),s.relative=!1),s})}function r(){var s=NaN,o=NaN,l=NaN,c=NaN;return n(function(d,g,h){return d.type&je.SMOOTH_CURVE_TO&&(d.type=je.CURVE_TO,s=isNaN(s)?g:s,o=isNaN(o)?h:o,d.x1=d.relative?g-s:2*g-s,d.y1=d.relative?h-o:2*h-o),d.type&je.CURVE_TO?(s=d.relative?g+d.x2:d.x2,o=d.relative?h+d.y2:d.y2):(s=NaN,o=NaN),d.type&je.SMOOTH_QUAD_TO&&(d.type=je.QUAD_TO,l=isNaN(l)?g:l,c=isNaN(c)?h:c,d.x1=d.relative?g-l:2*g-l,d.y1=d.relative?h-c:2*h-c),d.type&je.QUAD_TO?(l=d.relative?g+d.x1:d.x1,c=d.relative?h+d.y1:d.y1):(l=NaN,c=NaN),d})}function A(){var s=NaN,o=NaN;return n(function(l,c,d){if(l.type&je.SMOOTH_QUAD_TO&&(l.type=je.QUAD_TO,s=isNaN(s)?c:s,o=isNaN(o)?d:o,l.x1=l.relative?c-s:2*c-s,l.y1=l.relative?d-o:2*d-o),l.type&je.QUAD_TO){s=l.relative?c+l.x1:l.x1,o=l.relative?d+l.y1:l.y1;var g=l.x1,h=l.y1;l.type=je.CURVE_TO,l.x1=((l.relative?0:c)+2*g)/3,l.y1=((l.relative?0:d)+2*h)/3,l.x2=(l.x+2*g)/3,l.y2=(l.y+2*h)/3}else s=NaN,o=NaN;return l})}function n(s){var o=0,l=0,c=NaN,d=NaN;return function(g){if(isNaN(c)&&!(g.type&je.MOVE_TO))throw new Error("path must start with moveto");var h=s(g,o,l,c,d);return g.type&je.CLOSE_PATH&&(o=c,l=d),g.x!==void 0&&(o=g.relative?o+g.x:g.x),g.y!==void 0&&(l=g.relative?l+g.y:g.y),g.type&je.MOVE_TO&&(c=o,d=l),h}}function a(s,o,l,c,d,g){return ea(s,o,l,c,d,g),n(function(h,p,v,y){var C=h.x1,b=h.x2,F=h.relative&&!isNaN(y),O=h.x!==void 0?h.x:F?0:p,W=h.y!==void 0?h.y:F?0:v;function X(B){return B*B}h.type&je.HORIZ_LINE_TO&&o!==0&&(h.type=je.LINE_TO,h.y=h.relative?0:v),h.type&je.VERT_LINE_TO&&l!==0&&(h.type=je.LINE_TO,h.x=h.relative?0:p),h.x!==void 0&&(h.x=h.x*s+W*l+(F?0:d)),h.y!==void 0&&(h.y=O*o+h.y*c+(F?0:g)),h.x1!==void 0&&(h.x1=h.x1*s+h.y1*l+(F?0:d)),h.y1!==void 0&&(h.y1=C*o+h.y1*c+(F?0:g)),h.x2!==void 0&&(h.x2=h.x2*s+h.y2*l+(F?0:d)),h.y2!==void 0&&(h.y2=b*o+h.y2*c+(F?0:g));var k=s*c-o*l;if(h.xRot!==void 0&&(s!==1||o!==0||l!==0||c!==1))if(k===0)delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag,h.type=je.LINE_TO;else{var Q=h.xRot*Math.PI/180,K=Math.sin(Q),re=Math.cos(Q),U=1/X(h.rX),T=1/X(h.rY),H=X(re)*U+X(K)*T,Y=2*K*re*(U-T),le=X(K)*U+X(re)*T,pe=H*c*c-Y*o*c+le*o*o,me=Y*(s*c+o*l)-2*(H*l*c+le*s*o),ve=H*l*l-Y*s*l+le*s*s,se=(Math.atan2(me,pe-ve)+Math.PI)%Math.PI/2,J=Math.sin(se),oe=Math.cos(se);h.rX=Math.abs(k)/Math.sqrt(pe*X(oe)+me*J*oe+ve*X(J)),h.rY=Math.abs(k)/Math.sqrt(pe*X(J)-me*J*oe+ve*X(oe)),h.xRot=180*se/Math.PI}return h.sweepFlag!==void 0&&0>k&&(h.sweepFlag=+!h.sweepFlag),h})}function i(){return function(s){var o={};for(var l in s)o[l]=s[l];return o}}t.ROUND=function(s){function o(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),ea(s),function(l){return l.x1!==void 0&&(l.x1=o(l.x1)),l.y1!==void 0&&(l.y1=o(l.y1)),l.x2!==void 0&&(l.x2=o(l.x2)),l.y2!==void 0&&(l.y2=o(l.y2)),l.x!==void 0&&(l.x=o(l.x)),l.y!==void 0&&(l.y=o(l.y)),l.rX!==void 0&&(l.rX=o(l.rX)),l.rY!==void 0&&(l.rY=o(l.rY)),l}},t.TO_ABS=e,t.TO_REL=function(){return n(function(s,o,l){return s.relative||(s.x1!==void 0&&(s.x1-=o),s.y1!==void 0&&(s.y1-=l),s.x2!==void 0&&(s.x2-=o),s.y2!==void 0&&(s.y2-=l),s.x!==void 0&&(s.x-=o),s.y!==void 0&&(s.y-=l),s.relative=!0),s})},t.NORMALIZE_HVZ=function(s,o,l){return s===void 0&&(s=!0),o===void 0&&(o=!0),l===void 0&&(l=!0),n(function(c,d,g,h,p){if(isNaN(h)&&!(c.type&je.MOVE_TO))throw new Error("path must start with moveto");return o&&c.type&je.HORIZ_LINE_TO&&(c.type=je.LINE_TO,c.y=c.relative?0:g),l&&c.type&je.VERT_LINE_TO&&(c.type=je.LINE_TO,c.x=c.relative?0:d),s&&c.type&je.CLOSE_PATH&&(c.type=je.LINE_TO,c.x=c.relative?h-d:h,c.y=c.relative?p-g:p),c.type&je.ARC&&(c.rX===0||c.rY===0)&&(c.type=je.LINE_TO,delete c.rX,delete c.rY,delete c.xRot,delete c.lArcFlag,delete c.sweepFlag),c})},t.NORMALIZE_ST=r,t.QT_TO_C=A,t.INFO=n,t.SANITIZE=function(s){s===void 0&&(s=0),ea(s);var o=NaN,l=NaN,c=NaN,d=NaN;return n(function(g,h,p,v,y){var C=Math.abs,b=!1,F=0,O=0;if(g.type&je.SMOOTH_CURVE_TO&&(F=isNaN(o)?0:h-o,O=isNaN(l)?0:p-l),g.type&(je.CURVE_TO|je.SMOOTH_CURVE_TO)?(o=g.relative?h+g.x2:g.x2,l=g.relative?p+g.y2:g.y2):(o=NaN,l=NaN),g.type&je.SMOOTH_QUAD_TO?(c=isNaN(c)?h:2*h-c,d=isNaN(d)?p:2*p-d):g.type&je.QUAD_TO?(c=g.relative?h+g.x1:g.x1,d=g.relative?p+g.y1:g.y2):(c=NaN,d=NaN),g.type&je.LINE_COMMANDS||g.type&je.ARC&&(g.rX===0||g.rY===0||!g.lArcFlag)||g.type&je.CURVE_TO||g.type&je.SMOOTH_CURVE_TO||g.type&je.QUAD_TO||g.type&je.SMOOTH_QUAD_TO){var W=g.x===void 0?0:g.relative?g.x:g.x-h,X=g.y===void 0?0:g.relative?g.y:g.y-p;F=isNaN(c)?g.x1===void 0?F:g.relative?g.x:g.x1-h:c-h,O=isNaN(d)?g.y1===void 0?O:g.relative?g.y:g.y1-p:d-p;var k=g.x2===void 0?0:g.relative?g.x:g.x2-h,Q=g.y2===void 0?0:g.relative?g.y:g.y2-p;C(W)<=s&&C(X)<=s&&C(F)<=s&&C(O)<=s&&C(k)<=s&&C(Q)<=s&&(b=!0)}return g.type&je.CLOSE_PATH&&C(h-v)<=s&&C(p-y)<=s&&(b=!0),b?[]:g})},t.MATRIX=a,t.ROTATE=function(s,o,l){o===void 0&&(o=0),l===void 0&&(l=0),ea(s,o,l);var c=Math.sin(s),d=Math.cos(s);return a(d,c,-c,d,o-o*d+l*c,l-o*c-l*d)},t.TRANSLATE=function(s,o){return o===void 0&&(o=0),ea(s,o),a(1,0,0,1,s,o)},t.SCALE=function(s,o){return o===void 0&&(o=s),ea(s,o),a(s,0,0,o,0,0)},t.SKEW_X=function(s){return ea(s),a(1,0,Math.atan(s),1,0,0)},t.SKEW_Y=function(s){return ea(s),a(1,Math.atan(s),0,1,0,0)},t.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ea(s),a(-1,0,0,1,s,0)},t.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ea(s),a(1,0,0,-1,0,s)},t.A_TO_C=function(){return n(function(s,o,l){return je.ARC===s.type?function(c,d,g){var h,p,v,y;c.cX||Op(c,d,g);for(var C=Math.min(c.phi1,c.phi2),b=Math.max(c.phi1,c.phi2)-C,F=Math.ceil(b/90),O=new Array(F),W=d,X=g,k=0;k<F;k++){var Q=M4(c.phi1,c.phi2,k/F),K=M4(c.phi1,c.phi2,(k+1)/F),re=K-Q,U=4/3*Math.tan(re*qa/4),T=[Math.cos(Q*qa)-U*Math.sin(Q*qa),Math.sin(Q*qa)+U*Math.cos(Q*qa)],H=T[0],Y=T[1],le=[Math.cos(K*qa),Math.sin(K*qa)],pe=le[0],me=le[1],ve=[pe+U*Math.sin(K*qa),me-U*Math.cos(K*qa)],se=ve[0],J=ve[1];O[k]={relative:c.relative,type:je.CURVE_TO};var oe=function(B,_){var S=Qp([B*c.rX,_*c.rY],c.xRot),N=S[0],G=S[1];return[c.cX+N,c.cY+G]};h=oe(H,Y),O[k].x1=h[0],O[k].y1=h[1],p=oe(se,J),O[k].x2=p[0],O[k].y2=p[1],v=oe(pe,me),O[k].x=v[0],O[k].y=v[1],c.relative&&(O[k].x1-=W,O[k].y1-=X,O[k].x2-=W,O[k].y2-=X,O[k].x-=W,O[k].y-=X),W=(y=[O[k].x,O[k].y])[0],X=y[1]}return O}(s,s.relative?0:o,s.relative?0:l):s})},t.ANNOTATE_ARCS=function(){return n(function(s,o,l){return s.relative&&(o=0,l=0),je.ARC===s.type&&Op(s,o,l),s})},t.CLONE=i,t.CALCULATE_BOUNDS=function(){var s=function(g){var h={};for(var p in g)h[p]=g[p];return h},o=e(),l=A(),c=r(),d=n(function(g,h,p){var v=c(l(o(s(g))));function y(J){J>d.maxX&&(d.maxX=J),J<d.minX&&(d.minX=J)}function C(J){J>d.maxY&&(d.maxY=J),J<d.minY&&(d.minY=J)}if(v.type&je.DRAWING_COMMANDS&&(y(h),C(p)),v.type&je.HORIZ_LINE_TO&&y(v.x),v.type&je.VERT_LINE_TO&&C(v.y),v.type&je.LINE_TO&&(y(v.x),C(v.y)),v.type&je.CURVE_TO){y(v.x),C(v.y);for(var b=0,F=H4(h,v.x1,v.x2,v.x);b<F.length;b++)0<(se=F[b])&&1>se&&y(V4(h,v.x1,v.x2,v.x,se));for(var O=0,W=H4(p,v.y1,v.y2,v.y);O<W.length;O++)0<(se=W[O])&&1>se&&C(V4(p,v.y1,v.y2,v.y,se))}if(v.type&je.ARC){y(v.x),C(v.y),Op(v,h,p);for(var X=v.xRot/180*Math.PI,k=Math.cos(X)*v.rX,Q=Math.sin(X)*v.rX,K=-Math.sin(X)*v.rY,re=Math.cos(X)*v.rY,U=v.phi1<v.phi2?[v.phi1,v.phi2]:-180>v.phi2?[v.phi2+360,v.phi1+360]:[v.phi2,v.phi1],T=U[0],H=U[1],Y=function(J){var oe=J[0],B=J[1],_=180*Math.atan2(B,oe)/Math.PI;return _<T?_+360:_},le=0,pe=P4(K,-k,0).map(Y);le<pe.length;le++)(se=pe[le])>T&&se<H&&y(R4(v.cX,k,K,se));for(var me=0,ve=P4(re,-Q,0).map(Y);me<ve.length;me++){var se;(se=ve[me])>T&&se<H&&C(R4(v.cY,Q,re,se))}}return g});return d.minX=1/0,d.maxX=-1/0,d.minY=1/0,d.maxY=-1/0,d}})(Wr||(Wr={}));var ta,K4=function(){function t(){}return t.prototype.round=function(e){return this.transform(Wr.ROUND(e))},t.prototype.toAbs=function(){return this.transform(Wr.TO_ABS())},t.prototype.toRel=function(){return this.transform(Wr.TO_REL())},t.prototype.normalizeHVZ=function(e,r,A){return this.transform(Wr.NORMALIZE_HVZ(e,r,A))},t.prototype.normalizeST=function(){return this.transform(Wr.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(Wr.QT_TO_C())},t.prototype.aToC=function(){return this.transform(Wr.A_TO_C())},t.prototype.sanitize=function(e){return this.transform(Wr.SANITIZE(e))},t.prototype.translate=function(e,r){return this.transform(Wr.TRANSLATE(e,r))},t.prototype.scale=function(e,r){return this.transform(Wr.SCALE(e,r))},t.prototype.rotate=function(e,r,A){return this.transform(Wr.ROTATE(e,r,A))},t.prototype.matrix=function(e,r,A,n,a,i){return this.transform(Wr.MATRIX(e,r,A,n,a,i))},t.prototype.skewX=function(e){return this.transform(Wr.SKEW_X(e))},t.prototype.skewY=function(e){return this.transform(Wr.SKEW_Y(e))},t.prototype.xSymmetry=function(e){return this.transform(Wr.X_AXIS_SYMMETRY(e))},t.prototype.ySymmetry=function(e){return this.transform(Wr.Y_AXIS_SYMMETRY(e))},t.prototype.annotateArcs=function(){return this.transform(Wr.ANNOTATE_ARCS())},t}(),NY=function(t){return t===" "||t===" "||t==="\r"||t===`
|
|
392
|
-
`},G4=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},IY=function(t){function e(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return D4(e,t),e.prototype.finish=function(r){if(r===void 0&&(r=[]),this.parse(" ",r),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return r},e.prototype.parse=function(r,A){var n=this;A===void 0&&(A=[]);for(var a=function(d){A.push(d),n.curArgs.length=0,n.canParseCommandOrComma=!0},i=0;i<r.length;i++){var s=r[i],o=!(this.curCommandType!==je.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=G4(s)&&(this.curNumber==="0"&&s==="0"||o);if(!G4(s)||l)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&this.curCommandType!==-1){var c=Number(this.curNumber);if(isNaN(c))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===je.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>c)throw new SyntaxError('Expected positive number, got "'+c+'" at index "'+i+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"')}this.curArgs.push(c),this.curArgs.length===LY[this.curCommandType]&&(je.HORIZ_LINE_TO===this.curCommandType?a({type:je.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):je.VERT_LINE_TO===this.curCommandType?a({type:je.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===je.MOVE_TO||this.curCommandType===je.LINE_TO||this.curCommandType===je.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),je.MOVE_TO===this.curCommandType&&(this.curCommandType=je.LINE_TO)):this.curCommandType===je.CURVE_TO?a({type:je.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===je.SMOOTH_CURVE_TO?a({type:je.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.QUAD_TO?a({type:je.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.ARC&&a({type:je.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(!NY(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(l)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=je.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=je.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=je.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=je.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=je.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=je.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=je.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=je.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+i+".");this.curCommandType=je.ARC,this.curCommandRelative=s==="a"}else A.push({type:je.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return A},e.prototype.transform=function(r){return Object.create(this,{parse:{value:function(A,n){n===void 0&&(n=[]);for(var a=0,i=Object.getPrototypeOf(this).parse.call(this,A);a<i.length;a++){var s=i[a],o=r(s);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return n}}})},e}(K4),je=function(t){function e(r){var A=t.call(this)||this;return A.commands=typeof r=="string"?e.parse(r):r,A}return D4(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var r=Wr.CALCULATE_BOUNDS();return this.transform(r),r},e.prototype.transform=function(r){for(var A=[],n=0,a=this.commands;n<a.length;n++){var i=r(a[n]);Array.isArray(i)?A.push.apply(A,i):A.push(i)}return this.commands=A,this},e.encode=function(r){return UY(r)},e.parse=function(r){var A=new IY,n=[];return A.parse(r,n),A.finish(n),n},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(K4),LY=((ta={})[je.MOVE_TO]=2,ta[je.LINE_TO]=2,ta[je.HORIZ_LINE_TO]=1,ta[je.VERT_LINE_TO]=1,ta[je.CLOSE_PATH]=0,ta[je.QUAD_TO]=4,ta[je.SMOOTH_QUAD_TO]=2,ta[je.CURVE_TO]=6,ta[je.SMOOTH_CURVE_TO]=4,ta[je.ARC]=7,ta),kY=yA,QY=Zn,OY=qu,DY=wC,j4=RegExp.prototype,PY=function(t){var e=t.flags;return e===void 0&&!("flags"in j4)&&!QY(t,"flags")&&OY(j4,t)?kY(DY,t):e},MY=Ah.PROPER,RY=xs,HY=IA,z4=Sa,VY=Mr,KY=PY,Dp="toString",GY=RegExp.prototype,W4=GY[Dp],jY=VY(function(){return W4.call({source:"a",flags:"b"})!="/a/b"}),zY=MY&&W4.name!=Dp;(jY||zY)&&RY(RegExp.prototype,Dp,function(){var e=HY(this),r=z4(e.source),A=z4(KY(e));return"/"+r+"/"+A},{unsafe:!0});function kh(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?kh=function(e){return typeof e}:kh=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kh(t)}function WY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var XY=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],$Y=[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 qY(t,e,r,A,n){if(typeof t=="string"&&(t=document.getElementById(t)),!t||kh(t)!=="object"||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=t.getContext("2d");try{return a.getImageData(e,r,A,n)}catch(i){throw new Error("unable to access image data: "+i)}}function YY(t,e,r,A,n,a){if(!(isNaN(a)||a<1)){a|=0;var i=qY(t,e,r,A,n);i=JY(i,e,r,A,n,a),t.getContext("2d").putImageData(i,e,r)}}function JY(t,e,r,A,n,a){for(var i=t.data,s=2*a+1,o=A-1,l=n-1,c=a+1,d=c*(c+1)/2,g=new X4,h=g,p,v=1;v<s;v++)h=h.next=new X4,v===c&&(p=h);h.next=g;for(var y=null,C=null,b=0,F=0,O=XY[a],W=$Y[a],X=0;X<n;X++){h=g;for(var k=i[F],Q=i[F+1],K=i[F+2],re=i[F+3],U=0;U<c;U++)h.r=k,h.g=Q,h.b=K,h.a=re,h=h.next;for(var T=0,H=0,Y=0,le=0,pe=c*k,me=c*Q,ve=c*K,se=c*re,J=d*k,oe=d*Q,B=d*K,_=d*re,S=1;S<c;S++){var N=F+((o<S?o:S)<<2),G=i[N],ie=i[N+1],ce=i[N+2],fe=i[N+3],xe=c-S;J+=(h.r=G)*xe,oe+=(h.g=ie)*xe,B+=(h.b=ce)*xe,_+=(h.a=fe)*xe,T+=G,H+=ie,Y+=ce,le+=fe,h=h.next}y=g,C=p;for(var Ie=0;Ie<A;Ie++){var Me=_*O>>W;if(i[F+3]=Me,Me!==0){var Xe=255/Me;i[F]=(J*O>>W)*Xe,i[F+1]=(oe*O>>W)*Xe,i[F+2]=(B*O>>W)*Xe}else i[F]=i[F+1]=i[F+2]=0;J-=pe,oe-=me,B-=ve,_-=se,pe-=y.r,me-=y.g,ve-=y.b,se-=y.a;var $e=Ie+a+1;$e=b+($e<o?$e:o)<<2,T+=y.r=i[$e],H+=y.g=i[$e+1],Y+=y.b=i[$e+2],le+=y.a=i[$e+3],J+=T,oe+=H,B+=Y,_+=le,y=y.next;var Te=C,ne=Te.r,Qe=Te.g,rt=Te.b,Re=Te.a;pe+=ne,me+=Qe,ve+=rt,se+=Re,T-=ne,H-=Qe,Y-=rt,le-=Re,C=C.next,F+=4}b+=A}for(var ze=0;ze<A;ze++){F=ze<<2;var Ye=i[F],Je=i[F+1],st=i[F+2],nt=i[F+3],ht=c*Ye,vt=c*Je,_t=c*st,Ut=c*nt,dt=d*Ye,xt=d*Je,tt=d*st,nr=d*nt;h=g;for(var Nt=0;Nt<c;Nt++)h.r=Ye,h.g=Je,h.b=st,h.a=nt,h=h.next;for(var fr=A,kt=0,Kt=0,$r=0,Pt=0,br=1;br<=a;br++){F=fr+ze<<2;var $t=c-br;dt+=(h.r=Ye=i[F])*$t,xt+=(h.g=Je=i[F+1])*$t,tt+=(h.b=st=i[F+2])*$t,nr+=(h.a=nt=i[F+3])*$t,Pt+=Ye,kt+=Je,Kt+=st,$r+=nt,h=h.next,br<l&&(fr+=A)}F=ze,y=g,C=p;for(var rA=0;rA<n;rA++){var Et=F<<2;i[Et+3]=nt=nr*O>>W,nt>0?(nt=255/nt,i[Et]=(dt*O>>W)*nt,i[Et+1]=(xt*O>>W)*nt,i[Et+2]=(tt*O>>W)*nt):i[Et]=i[Et+1]=i[Et+2]=0,dt-=ht,xt-=vt,tt-=_t,nr-=Ut,ht-=y.r,vt-=y.g,_t-=y.b,Ut-=y.a,Et=ze+((Et=rA+c)<l?Et:l)*A<<2,dt+=Pt+=y.r=i[Et],xt+=kt+=y.g=i[Et+1],tt+=Kt+=y.b=i[Et+2],nr+=$r+=y.a=i[Et+3],y=y.next,ht+=Ye=C.r,vt+=Je=C.g,_t+=st=C.b,Ut+=nt=C.a,Pt-=Ye,kt-=Je,Kt-=st,$r-=nt,C=C.next,F+=A}}return t}var X4=function t(){WY(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function ZY(){var{DOMParser:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas(r,A){return new OffscreenCanvas(r,A)},createImage(r){return Xa(function*(){var A=yield fetch(r),n=yield A.blob(),a=yield createImageBitmap(n);return a})()}};return(typeof DOMParser<"u"||typeof t>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function eJ(t){var{DOMParser:e,canvas:r,fetch:A}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:A,createCanvas:r.createCanvas,createImage:r.loadImage}}var tJ=Object.freeze({__proto__:null,offscreen:ZY,node:eJ});function _s(t){return t.replace(/(?!\u3000)\s+/gm," ")}function $4(t){return t.replace(/^[\n \t]+/,"")}function q4(t){return t.replace(/[\n \t]+$/,"")}function en(t){var e=(t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var rJ=/^[A-Z-]+$/;function Y4(t){return rJ.test(t)?t.toLowerCase():t}function Pp(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function J4(t){if(!t.startsWith("rgb"))return t;var e=3,r=t.replace(/\d+(\.\d+)?/g,(A,n)=>e--&&n?String(Math.round(parseFloat(A))):A);return r}var AJ=/(\[[^\]]+\])/g,nJ=/(#[^\s+>~.[:]+)/g,aJ=/(\.[^\s+>~.[:]+)/g,iJ=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,sJ=/(:[\w-]+\([^)]*\))/gi,oJ=/(:[^\s+>~.[:]+)/g,lJ=/([^\s+>~.[:]+)/g;function Ts(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function Z4(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),A=0;return[r,A]=Ts(r,AJ),e[1]+=A,[r,A]=Ts(r,nJ),e[0]+=A,[r,A]=Ts(r,aJ),e[1]+=A,[r,A]=Ts(r,iJ),e[2]+=A,[r,A]=Ts(r,sJ),e[1]+=A,[r,A]=Ts(r,oJ),e[1]+=A,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,A]=Ts(r,lJ),e[2]+=A,e.join("")}var Us=1e-8;function Mp(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Qh(t,e){return(t[0]*e[0]+t[1]*e[1])/(Mp(t)*Mp(e))}function Rp(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Qh(t,e))}function Hp(t){return t*t*t}function Vp(t){return 3*t*t*(1-t)}function Kp(t){return 3*t*(1-t)*(1-t)}function Gp(t){return(1-t)*(1-t)*(1-t)}function jp(t){return t*t}function zp(t){return 2*t*(1-t)}function Wp(t){return(1-t)*(1-t)}class pt{constructor(e,r,A){this.document=e,this.name=r,this.value=A,this.isNormalizedColor=!1}static empty(e){return new pt(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:r,name:A}=this;return _s(this.getString()).trim().split(e).map(n=>new pt(r,A,n))}hasValue(e){var{value:r}=this;return r!==null&&r!==""&&(e||r!==0)&&typeof r<"u"}isString(e){var{value:r}=this,A=typeof r=="string";return!A||!e?A:e.test(r)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var 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>"u"?0:parseFloat(e);var{value:r}=this,A=parseFloat(r);return this.isString(/%$/)&&(A/=100),A}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var r=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=J4(r),this.value=r),r}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[A,n]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:a}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&n):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*a.computeSize(A);default:{var i=this.getNumber();return r&&i<1?i*a.computeSize(A):i}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3: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(){var e=this.getString(),r=/#([^)'"]+)/.exec(e);return r&&(r=r[1]),r||(r=e),this.document.definitions[r]}getFillStyleDefinition(e,r){var A=this.getDefinition();if(!A)return null;if(typeof A.createGradient=="function")return A.createGradient(this.document.ctx,e,r);if(typeof A.createPattern=="function"){if(A.getHrefAttribute().hasValue()){var n=A.getAttribute("patternTransform");A=A.getHrefAttribute().getDefinition(),n.hasValue()&&A.getAttribute("patternTransform",!0).setValue(n.value)}return A.createPattern(this.document.ctx,e,r)}return null}getTextBaseline(){return this.hasValue()?pt.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var r=this.getColor(),A=r.length,n=0,a=0;a<A&&(r[a]===","&&n++,n!==3);a++);if(e.hasValue()&&this.isString()&&n!==3){var i=new Lp(r);i.ok&&(i.alpha=e.getNumber(),r=i.toRGBA())}return new pt(this.document,this.name,r)}}pt.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"};class eb{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,r){this.viewPorts.push({width:e,height:r})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Ur{constructor(e,r){this.x=e,this.y=r}static parse(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[A=r,n=r]=en(e);return new Ur(A,n)}static parseScale(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[A=r,n=A]=en(e);return new Ur(A,n)}static parsePath(e){for(var r=en(e),A=r.length,n=[],a=0;a<A;a+=2)n.push(new Ur(r[a],r[a+1]));return n}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:r,y:A}=this,n=r*e[0]+A*e[2]+e[4],a=r*e[1]+A*e[3]+e[5];this.x=n,this.y=a}}class tb{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:r,onMouseMove:A}=this,n=e.ctx.canvas;n.onclick=r,n.onmousemove=A,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:r,eventElements:A}=this,{style:n}=e.ctx.canvas;n&&(n.cursor=""),r.forEach((a,i)=>{for(var{run:s}=a,o=A[i];o;)s(o),o=o.parent}),this.events=[],this.eventElements=[]}}checkPath(e,r){if(!(!this.working||!r)){var{events:A,eventElements:n}=this;A.forEach((a,i)=>{var{x:s,y:o}=a;!n[i]&&r.isPointInPath&&r.isPointInPath(s,o)&&(n[i]=e)})}}checkBoundingBox(e,r){if(!(!this.working||!r)){var{events:A,eventElements:n}=this;A.forEach((a,i)=>{var{x:s,y:o}=a;!n[i]&&r.isPointInBox(s,o)&&(n[i]=e)})}}mapXY(e,r){for(var{window:A,ctx:n}=this.screen,a=new Ur(e,r),i=n.canvas;i;)a.x-=i.offsetLeft,a.y-=i.offsetTop,i=i.offsetParent;return A.scrollX&&(a.x+=A.scrollX),A.scrollY&&(a.y+=A.scrollY),a}onClick(e){var{x:r,y:A}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:r,y:A,run(n){n.onClick&&n.onClick()}})}onMouseMove(e){var{x:r,y:A}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:r,y:A,run(n){n.onMouseMove&&n.onMouseMove()}})}}var rb=typeof window<"u"?window:null,Ab=typeof fetch<"u"?fetch.bind(void 0):null;class bc{constructor(e){var{fetch:r=Ab,window:A=rb}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new eb,this.mouse=new tb(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=A,this.fetch=r}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(r=>r());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){var{document:r,ctx:A,aspectRatio:n,width:a,desiredWidth:i,height:s,desiredHeight:o,minX:l=0,minY:c=0,refX:d,refY:g,clip:h=!1,clipX:p=0,clipY:v=0}=e,y=_s(n).replace(/^defer\s/,""),[C,b]=y.split(" "),F=C||"xMidYMid",O=b||"meet",W=a/i,X=s/o,k=Math.min(W,X),Q=Math.max(W,X),K=i,re=o;O==="meet"&&(K*=k,re*=k),O==="slice"&&(K*=Q,re*=Q);var U=new pt(r,"refX",d),T=new pt(r,"refY",g),H=U.hasValue()&&T.hasValue();if(H&&A.translate(-k*U.getPixels("x"),-k*T.getPixels("y")),h){var Y=k*p,le=k*v;A.beginPath(),A.moveTo(Y,le),A.lineTo(a,le),A.lineTo(a,s),A.lineTo(Y,s),A.closePath(),A.clip()}if(!H){var pe=O==="meet"&&k===X,me=O==="slice"&&Q===X,ve=O==="meet"&&k===W,se=O==="slice"&&Q===W;F.startsWith("xMid")&&(pe||me)&&A.translate(a/2-K/2,0),F.endsWith("YMid")&&(ve||se)&&A.translate(0,s/2-re/2),F.startsWith("xMax")&&(pe||me)&&A.translate(a-K,0),F.endsWith("YMax")&&(ve||se)&&A.translate(0,s-re)}switch(!0){case F==="none":A.scale(W,X);break;case O==="meet":A.scale(k,k);break;case O==="slice":A.scale(Q,Q);break}A.translate(-l,-c)}start(e){var{enableRedraw:r=!1,ignoreMouse:A=!1,ignoreAnimation:n=!1,ignoreDimensions:a=!1,ignoreClear:i=!1,forceRedraw:s,scaleWidth:o,scaleHeight:l,offsetX:c,offsetY:d}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:g,mouse:h}=this,p=1e3/g;if(this.frameDuration=p,this.readyPromise=new Promise(F=>{this.resolveReady=F}),this.isReady()&&this.render(e,a,i,o,l,c,d),!!r){var v=Date.now(),y=v,C=0,b=()=>{v=Date.now(),C=v-y,C>=p&&(y=v-C%p,this.shouldUpdate(n,s)&&(this.render(e,a,i,o,l,c,d),h.runEvents())),this.intervalId=Up(b)};A||h.start(),this.intervalId=Up(b)}}stop(){this.intervalId&&(Up.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,r){if(!e){var{frameDuration:A}=this,n=this.animations.reduce((a,i)=>i.update(A)||a,!1);if(n)return!0}return!!(typeof r=="function"&&r()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,r,A,n,a,i,s){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:l,viewPort:c,ctx:d,isFirstRender:g}=this,h=d.canvas;c.clear(),h.width&&h.height?c.setCurrent(h.width,h.height):c.setCurrent(o,l);var p=e.getStyle("width"),v=e.getStyle("height");!r&&(g||typeof n!="number"&&typeof a!="number")&&(p.hasValue()&&(h.width=p.getPixels("x"),h.style&&(h.style.width="".concat(h.width,"px"))),v.hasValue()&&(h.height=v.getPixels("y"),h.style&&(h.style.height="".concat(h.height,"px"))));var y=h.clientWidth||h.width,C=h.clientHeight||h.height;if(r&&p.hasValue()&&v.hasValue()&&(y=p.getPixels("x"),C=v.getPixels("y")),c.setCurrent(y,C),typeof i=="number"&&e.getAttribute("x",!0).setValue(i),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof n=="number"||typeof a=="number"){var b=en(e.getAttribute("viewBox").getString()),F=0,O=0;if(typeof n=="number"){var W=e.getStyle("width");W.hasValue()?F=W.getPixels("x")/n:isNaN(b[2])||(F=b[2]/n)}if(typeof a=="number"){var X=e.getStyle("height");X.hasValue()?O=X.getPixels("y")/a:isNaN(b[3])||(O=b[3]/a)}F||(F=O),O||(O=F),e.getAttribute("width",!0).setValue(n),e.getAttribute("height",!0).setValue(a);var k=e.getStyle("transform",!0,!0);k.setValue("".concat(k.getString()," scale(").concat(1/F,", ").concat(1/O,")"))}A||d.clearRect(0,0,y,C),e.render(d),g&&(this.isFirstRender=!1)}}bc.defaultWindow=rb,bc.defaultFetch=Ab;var{defaultFetch:cJ}=bc,fJ=typeof DOMParser<"u"?DOMParser:null;class Oh{constructor(){var{fetch:e=cJ,DOMParser:r=fJ}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=r}parse(e){var r=this;return Xa(function*(){return e.startsWith("<")?r.parseFromString(e):r.load(e)})()}parseFromString(e){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(r.parseFromString(e,"text/xml"))}}checkDocument(e){var r=e.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return e}load(e){var r=this;return Xa(function*(){var A=yield r.fetch(e),n=yield A.text();return r.parseFromString(n)})()}}class nb{constructor(e,r){this.type="translate",this.point=null,this.point=Ur.parse(r)}apply(e){var{x:r,y:A}=this.point;e.translate(r||0,A||0)}unapply(e){var{x:r,y:A}=this.point;e.translate(-1*r||0,-1*A||0)}applyToPoint(e){var{x:r,y:A}=this.point;e.applyTransform([1,0,0,1,r||0,A||0])}}class ab{constructor(e,r,A){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var n=en(r);this.angle=new pt(e,"angle",n[0]),this.originX=A[0],this.originY=A[1],this.cx=n[1]||0,this.cy=n[2]||0}apply(e){var{cx:r,cy:A,originX:n,originY:a,angle:i}=this,s=r+n.getPixels("x"),o=A+a.getPixels("y");e.translate(s,o),e.rotate(i.getRadians()),e.translate(-s,-o)}unapply(e){var{cx:r,cy:A,originX:n,originY:a,angle:i}=this,s=r+n.getPixels("x"),o=A+a.getPixels("y");e.translate(s,o),e.rotate(-1*i.getRadians()),e.translate(-s,-o)}applyToPoint(e){var{cx:r,cy:A,angle:n}=this,a=n.getRadians();e.applyTransform([1,0,0,1,r||0,A||0]),e.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]),e.applyTransform([1,0,0,1,-r||0,-A||0])}}class ib{constructor(e,r,A){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var n=Ur.parseScale(r);(n.x===0||n.y===0)&&(n.x=Us,n.y=Us),this.scale=n,this.originX=A[0],this.originY=A[1]}apply(e){var{scale:{x:r,y:A},originX:n,originY:a}=this,i=n.getPixels("x"),s=a.getPixels("y");e.translate(i,s),e.scale(r,A||r),e.translate(-i,-s)}unapply(e){var{scale:{x:r,y:A},originX:n,originY:a}=this,i=n.getPixels("x"),s=a.getPixels("y");e.translate(i,s),e.scale(1/r,1/A||r),e.translate(-i,-s)}applyToPoint(e){var{x:r,y:A}=this.scale;e.applyTransform([r||0,0,0,A||0,0,0])}}class Xp{constructor(e,r,A){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=en(r),this.originX=A[0],this.originY=A[1]}apply(e){var{originX:r,originY:A,matrix:n}=this,a=r.getPixels("x"),i=A.getPixels("y");e.translate(a,i),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),e.translate(-a,-i)}unapply(e){var{originX:r,originY:A,matrix:n}=this,a=n[0],i=n[2],s=n[4],o=n[1],l=n[3],c=n[5],d=0,g=0,h=1,p=1/(a*(l*h-c*g)-i*(o*h-c*d)+s*(o*g-l*d)),v=r.getPixels("x"),y=A.getPixels("y");e.translate(v,y),e.transform(p*(l*h-c*g),p*(c*d-o*h),p*(s*g-i*h),p*(a*h-s*d),p*(i*c-s*l),p*(s*o-a*c)),e.translate(-v,-y)}applyToPoint(e){e.applyTransform(this.matrix)}}class $p extends Xp{constructor(e,r,A){super(e,r,A),this.type="skew",this.angle=null,this.angle=new pt(e,"angle",r)}}class sb extends $p{constructor(e,r,A){super(e,r,A),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class ob extends $p{constructor(e,r,A){super(e,r,A),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function uJ(t){return _s(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function hJ(t){var[e,r]=t.split("(");return[e.trim(),r.trim().replace(")","")]}class ki{constructor(e,r,A){this.document=e,this.transforms=[];var n=uJ(r);n.forEach(a=>{if(a!=="none"){var[i,s]=hJ(a),o=ki.transformTypes[i];typeof o<"u"&&this.transforms.push(new o(this.document,s,A))}})}static fromElement(e,r){var A=r.getStyle("transform",!1,!0),[n,a=n]=r.getStyle("transform-origin",!1,!0).split(),i=[n,a];return A.hasValue()?new ki(e,A.getString(),i):null}apply(e){for(var{transforms:r}=this,A=r.length,n=0;n<A;n++)r[n].apply(e)}unapply(e){for(var{transforms:r}=this,A=r.length,n=A-1;n>=0;n--)r[n].unapply(e)}applyToPoint(e){for(var{transforms:r}=this,A=r.length,n=0;n<A;n++)r[n].applyToPoint(e)}}ki.transformTypes={translate:nb,rotate:ab,scale:ib,matrix:Xp,skewX:sb,skewY:ob};class dr{constructor(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=r,this.captureTextNodes=A,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!r||r.nodeType!==1)){if(Array.from(r.attributes).forEach(s=>{var o=Y4(s.nodeName);this.attributes[o]=new pt(e,o,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var n=this.getAttribute("style").getString().split(";").map(s=>s.trim());n.forEach(s=>{if(s){var[o,l]=s.split(":").map(c=>c.trim());this.styles[o]=new pt(e,o,l)}})}var{definitions:a}=e,i=this.getAttribute("id");i.hasValue()&&(a[i.getString()]||(a[i.getString()]=this)),Array.from(r.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(A&&(s.nodeType===3||s.nodeType===4)){var o=e.createTextNode(s);o.getText().length>0&&this.addChild(o)}})}}getAttribute(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=this.attributes[e];if(!A&&r){var n=new pt(this.document,e,"");return this.attributes[e]=n,n}return A||pt.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return pt.empty(this.document)}getStyle(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.styles[e];if(n)return n;var a=this.getAttribute(e);if(a!=null&&a.hasValue())return this.styles[e]=a,a;if(!A){var{parent:i}=this;if(i){var s=i.getStyle(e);if(s!=null&&s.hasValue())return s}}if(r){var o=new pt(this.document,e,"");return this.styles[e]=o,o}return n||pt.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var A=this.getStyle("filter").getDefinition();A&&(this.applyEffects(e),A.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var r=ki.fromElement(this.document,this);r&&r.apply(e);var A=this.getStyle("clip-path",!1,!0);if(A.hasValue()){var n=A.getDefinition();n&&n.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(r=>{r.render(e)})}addChild(e){var r=e instanceof dr?e:this.document.createElement(e);r.parent=this,dr.ignoreChildTypes.includes(r.type)||this.children.push(r)}matchesSelector(e){var r,{node:A}=this;if(typeof A.matches=="function")return A.matches(e);var n=(r=A.getAttribute)===null||r===void 0?void 0:r.call(A,"class");return!n||n===""?!1:n.split(" ").some(a=>".".concat(a)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:r}=this.document;for(var A in e)if(!A.startsWith("@")&&this.matchesSelector(A)){var n=e[A],a=r[A];if(n)for(var i in n){var s=this.stylesSpecificity[i];typeof s>"u"&&(s="000"),a>=s&&(this.styles[i]=n[i],this.stylesSpecificity[i]=a)}}}removeStyles(e,r){var A=r.reduce((n,a)=>{var i=e.getStyle(a);if(!i.hasValue())return n;var s=i.getString();return i.setValue(""),[...n,[a,s]]},[]);return A}restoreStyles(e,r){r.forEach(A=>{var[n,a]=A;e.getStyle(n,!0).setValue(a)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}dr.ignoreChildTypes=["title"];class lb extends dr{constructor(e,r,A){super(e,r,A)}}function dJ(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function gJ(t){return typeof process>"u"?t:t.trim().split(",").map(dJ).join(",")}function pJ(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function mJ(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class LA{constructor(e,r,A,n,a,i){var s=i?typeof i=="string"?LA.parse(i):i:{};this.fontFamily=a||s.fontFamily,this.fontSize=n||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=A||s.fontWeight,this.fontVariant=r||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,A="",n="",a="",i="",s="",o=_s(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(c=>{switch(!0){case(!l.fontStyle&&LA.styles.includes(c)):c!=="inherit"&&(A=c),l.fontStyle=!0;break;case(!l.fontVariant&&LA.variants.includes(c)):c!=="inherit"&&(n=c),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&LA.weights.includes(c)):c!=="inherit"&&(a=c),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:c!=="inherit"&&([i]=c.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:c!=="inherit"&&(s+=c)}}),new LA(A,n,a,i,s,r)}toString(){return[pJ(this.fontStyle),this.fontVariant,mJ(this.fontWeight),this.fontSize,gJ(this.fontFamily)].join(" ").trim()}}LA.styles="normal|italic|oblique|inherit",LA.variants="normal|small-caps|inherit",LA.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Nn{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=r,this.x2=A,this.y2=n,this.addPoint(e,r),this.addPoint(A,n)}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(e,r){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:r,y1:A,x2:n,y2:a}=e;this.addPoint(r,A),this.addPoint(n,a)}}sumCubic(e,r,A,n,a){return Math.pow(1-e,3)*r+3*Math.pow(1-e,2)*e*A+3*(1-e)*Math.pow(e,2)*n+Math.pow(e,3)*a}bezierCurveAdd(e,r,A,n,a){var i=6*r-12*A+6*n,s=-3*r+9*A-9*n+3*a,o=3*A-3*r;if(s===0){if(i===0)return;var l=-o/i;0<l&&l<1&&(e?this.addX(this.sumCubic(l,r,A,n,a)):this.addY(this.sumCubic(l,r,A,n,a)));return}var c=Math.pow(i,2)-4*o*s;if(!(c<0)){var d=(-i+Math.sqrt(c))/(2*s);0<d&&d<1&&(e?this.addX(this.sumCubic(d,r,A,n,a)):this.addY(this.sumCubic(d,r,A,n,a)));var g=(-i-Math.sqrt(c))/(2*s);0<g&&g<1&&(e?this.addX(this.sumCubic(g,r,A,n,a)):this.addY(this.sumCubic(g,r,A,n,a)))}}addBezierCurve(e,r,A,n,a,i,s,o){this.addPoint(e,r),this.addPoint(s,o),this.bezierCurveAdd(!0,e,A,a,s),this.bezierCurveAdd(!1,r,n,i,o)}addQuadraticCurve(e,r,A,n,a,i){var s=e+.6666666666666666*(A-e),o=r+2/3*(n-r),l=s+1/3*(a-e),c=o+1/3*(i-r);this.addBezierCurve(e,r,s,l,o,c,a,i)}isPointInBox(e,r){var{x1:A,y1:n,x2:a,y2:i}=this;return A<=e&&e<=a&&n<=r&&r<=i}}class Tt extends je{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Ur(0,0),this.control=new Ur(0,0),this.current=new Ur(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:r}=this;return e>=r.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",A=new Ur(this.command[e],this.command[r]);return this.makeAbsolute(A)}getAsControlPoint(e,r){var A=this.getPoint(e,r);return this.control=A,A}getAsCurrentPoint(e,r){var A=this.getPoint(e,r);return this.current=A,A}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==je.CURVE_TO&&e!==je.SMOOTH_CURVE_TO&&e!==je.QUAD_TO&&e!==je.SMOOTH_QUAD_TO)return this.current;var{current:{x:r,y:A},control:{x:n,y:a}}=this,i=new Ur(2*r-n,2*A-a);return i}makeAbsolute(e){if(this.command.relative){var{x:r,y:A}=this.current;e.x+=r,e.y+=A}return e}addMarker(e,r,A){var{points:n,angles:a}=this;A&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=n[n.length-1].angleTo(A)),this.addMarkerAngle(e,r?r.angleTo(e):null)}addMarkerAngle(e,r){this.points.push(e),this.angles.push(r)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,r=e.length,A=0;A<r;A++)if(!e[A]){for(var n=A+1;n<r;n++)if(e[n]){e[A]=e[n];break}}return e}}class Qi extends dr{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,r=this;r;){var A=r.getStyle("opacity",!1,!0);A.hasValue(!0)&&(e*=A.getNumber()),r=r.parent}return e}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r){var A=this.getStyle("fill"),n=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(A.isUrlDefinition()){var s=A.getFillStyleDefinition(this,n);s&&(e.fillStyle=s)}else if(A.hasValue()){A.getString()==="currentColor"&&A.setValue(this.getStyle("color").getColor());var o=A.getColor();o!=="inherit"&&(e.fillStyle=o==="none"?"rgba(0,0,0,0)":o)}if(n.hasValue()){var l=new pt(this.document,"fill",e.fillStyle).addOpacity(n).getColor();e.fillStyle=l}if(a.isUrlDefinition()){var c=a.getFillStyleDefinition(this,i);c&&(e.strokeStyle=c)}else if(a.hasValue()){a.getString()==="currentColor"&&a.setValue(this.getStyle("color").getColor());var d=a.getString();d!=="inherit"&&(e.strokeStyle=d==="none"?"rgba(0,0,0,0)":d)}if(i.hasValue()){var g=new pt(this.document,"stroke",e.strokeStyle).addOpacity(i).getString();e.strokeStyle=g}var h=this.getStyle("stroke-width");if(h.hasValue()){var p=h.getPixels();e.lineWidth=p||Us}var v=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),C=this.getStyle("stroke-miterlimit"),b=this.getStyle("stroke-dasharray"),F=this.getStyle("stroke-dashoffset");if(v.hasValue()&&(e.lineCap=v.getString()),y.hasValue()&&(e.lineJoin=y.getString()),C.hasValue()&&(e.miterLimit=C.getNumber()),b.hasValue()&&b.getString()!=="none"){var O=en(b.getString());typeof e.setLineDash<"u"?e.setLineDash(O):typeof e.webkitLineDash<"u"?e.webkitLineDash=O:typeof e.mozDash<"u"&&!(O.length===1&&O[0]===0)&&(e.mozDash=O);var W=F.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=W:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=W:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=W)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var X=this.getStyle("font"),k=this.getStyle("font-style"),Q=this.getStyle("font-variant"),K=this.getStyle("font-weight"),re=this.getStyle("font-size"),U=this.getStyle("font-family"),T=new LA(k.getString(),Q.getString(),K.getString(),re.hasValue()?"".concat(re.getPixels(!0),"px"):"",U.getString(),LA.parse(X.getString(),e.font));k.setValue(T.fontStyle),Q.setValue(T.fontVariant),K.setValue(T.fontWeight),re.setValue(T.fontSize),U.setValue(T.fontFamily),e.font=T.toString(),re.isPixels()&&(this.document.emSize=re.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class Zt extends Qi{constructor(e,r,A){super(e,r,A),this.type="path",this.pathParser=null,this.pathParser=new Tt(this.getAttribute("d").getString())}path(e){var{pathParser:r}=this,A=new Nn;for(r.reset(),e&&e.beginPath();!r.isEnd();)switch(r.next().type){case Tt.MOVE_TO:this.pathM(e,A);break;case Tt.LINE_TO:this.pathL(e,A);break;case Tt.HORIZ_LINE_TO:this.pathH(e,A);break;case Tt.VERT_LINE_TO:this.pathV(e,A);break;case Tt.CURVE_TO:this.pathC(e,A);break;case Tt.SMOOTH_CURVE_TO:this.pathS(e,A);break;case Tt.QUAD_TO:this.pathQ(e,A);break;case Tt.SMOOTH_QUAD_TO:this.pathT(e,A);break;case Tt.ARC:this.pathA(e,A);break;case Tt.CLOSE_PATH:this.pathZ(e,A);break}return A}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,r=e.getMarkerPoints(),A=e.getMarkerAngles(),n=r.map((a,i)=>[a,A[i]]);return n}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var r=this.getStyle("fill-rule");e.fillStyle!==""&&(r.getString("inherit")!=="inherit"?e.fill(r.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var A=this.getMarkers();if(A){var n=A.length-1,a=this.getStyle("marker-start"),i=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(a.isUrlDefinition()){var o=a.getDefinition(),[l,c]=A[0];o.render(e,l,c)}if(i.isUrlDefinition())for(var d=i.getDefinition(),g=1;g<n;g++){var[h,p]=A[g];d.render(e,h,p)}if(s.isUrlDefinition()){var v=s.getDefinition(),[y,C]=A[n];v.render(e,y,C)}}}static pathM(e){var r=e.getAsCurrentPoint();return e.start=e.current,{point:r}}pathM(e,r){var{pathParser:A}=this,{point:n}=Zt.pathM(A),{x:a,y:i}=n;A.addMarker(n),r.addPoint(a,i),e&&e.moveTo(a,i)}static pathL(e){var{current:r}=e,A=e.getAsCurrentPoint();return{current:r,point:A}}pathL(e,r){var{pathParser:A}=this,{current:n,point:a}=Zt.pathL(A),{x:i,y:s}=a;A.addMarker(a,n),r.addPoint(i,s),e&&e.lineTo(i,s)}static pathH(e){var{current:r,command:A}=e,n=new Ur((A.relative?r.x:0)+A.x,r.y);return e.current=n,{current:r,point:n}}pathH(e,r){var{pathParser:A}=this,{current:n,point:a}=Zt.pathH(A),{x:i,y:s}=a;A.addMarker(a,n),r.addPoint(i,s),e&&e.lineTo(i,s)}static pathV(e){var{current:r,command:A}=e,n=new Ur(r.x,(A.relative?r.y:0)+A.y);return e.current=n,{current:r,point:n}}pathV(e,r){var{pathParser:A}=this,{current:n,point:a}=Zt.pathV(A),{x:i,y:s}=a;A.addMarker(a,n),r.addPoint(i,s),e&&e.lineTo(i,s)}static pathC(e){var{current:r}=e,A=e.getPoint("x1","y1"),n=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:r,point:A,controlPoint:n,currentPoint:a}}pathC(e,r){var{pathParser:A}=this,{current:n,point:a,controlPoint:i,currentPoint:s}=Zt.pathC(A);A.addMarker(s,i,a),r.addBezierCurve(n.x,n.y,a.x,a.y,i.x,i.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,i.x,i.y,s.x,s.y)}static pathS(e){var{current:r}=e,A=e.getReflectedControlPoint(),n=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:r,point:A,controlPoint:n,currentPoint:a}}pathS(e,r){var{pathParser:A}=this,{current:n,point:a,controlPoint:i,currentPoint:s}=Zt.pathS(A);A.addMarker(s,i,a),r.addBezierCurve(n.x,n.y,a.x,a.y,i.x,i.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,i.x,i.y,s.x,s.y)}static pathQ(e){var{current:r}=e,A=e.getAsControlPoint("x1","y1"),n=e.getAsCurrentPoint();return{current:r,controlPoint:A,currentPoint:n}}pathQ(e,r){var{pathParser:A}=this,{current:n,controlPoint:a,currentPoint:i}=Zt.pathQ(A);A.addMarker(i,a,a),r.addQuadraticCurve(n.x,n.y,a.x,a.y,i.x,i.y),e&&e.quadraticCurveTo(a.x,a.y,i.x,i.y)}static pathT(e){var{current:r}=e,A=e.getReflectedControlPoint();e.control=A;var n=e.getAsCurrentPoint();return{current:r,controlPoint:A,currentPoint:n}}pathT(e,r){var{pathParser:A}=this,{current:n,controlPoint:a,currentPoint:i}=Zt.pathT(A);A.addMarker(i,a,a),r.addQuadraticCurve(n.x,n.y,a.x,a.y,i.x,i.y),e&&e.quadraticCurveTo(a.x,a.y,i.x,i.y)}static pathA(e){var{current:r,command:A}=e,{rX:n,rY:a,xRot:i,lArcFlag:s,sweepFlag:o}=A,l=i*(Math.PI/180),c=e.getAsCurrentPoint(),d=new Ur(Math.cos(l)*(r.x-c.x)/2+Math.sin(l)*(r.y-c.y)/2,-Math.sin(l)*(r.x-c.x)/2+Math.cos(l)*(r.y-c.y)/2),g=Math.pow(d.x,2)/Math.pow(n,2)+Math.pow(d.y,2)/Math.pow(a,2);g>1&&(n*=Math.sqrt(g),a*=Math.sqrt(g));var h=(s===o?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(a,2)-Math.pow(n,2)*Math.pow(d.y,2)-Math.pow(a,2)*Math.pow(d.x,2))/(Math.pow(n,2)*Math.pow(d.y,2)+Math.pow(a,2)*Math.pow(d.x,2)));isNaN(h)&&(h=0);var p=new Ur(h*n*d.y/a,h*-a*d.x/n),v=new Ur((r.x+c.x)/2+Math.cos(l)*p.x-Math.sin(l)*p.y,(r.y+c.y)/2+Math.sin(l)*p.x+Math.cos(l)*p.y),y=Rp([1,0],[(d.x-p.x)/n,(d.y-p.y)/a]),C=[(d.x-p.x)/n,(d.y-p.y)/a],b=[(-d.x-p.x)/n,(-d.y-p.y)/a],F=Rp(C,b);return Qh(C,b)<=-1&&(F=Math.PI),Qh(C,b)>=1&&(F=0),{currentPoint:c,rX:n,rY:a,sweepFlag:o,xAxisRotation:l,centp:v,a1:y,ad:F}}pathA(e,r){var{pathParser:A}=this,{currentPoint:n,rX:a,rY:i,sweepFlag:s,xAxisRotation:o,centp:l,a1:c,ad:d}=Zt.pathA(A),g=1-s?1:-1,h=c+g*(d/2),p=new Ur(l.x+a*Math.cos(h),l.y+i*Math.sin(h));if(A.addMarkerAngle(p,h-g*Math.PI/2),A.addMarkerAngle(n,h-g*Math.PI),r.addPoint(n.x,n.y),e&&!isNaN(c)&&!isNaN(d)){var v=a>i?a:i,y=a>i?1:a/i,C=a>i?i/a:1;e.translate(l.x,l.y),e.rotate(o),e.scale(y,C),e.arc(0,0,v,c,c+d,!!(1-s)),e.scale(1/y,1/C),e.rotate(-o),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,r){Zt.pathZ(this.pathParser),e&&r.x1!==r.x2&&r.y1!==r.y2&&e.closePath()}}class qp extends Zt{constructor(e,r,A){super(e,r,A),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 Ya extends Qi{constructor(e,r,A){super(e,r,new.target===Ya?!0:A),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,r);var A=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();A&&(e.textBaseline=A)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var r=null;return this.children.forEach((A,n)=>{var a=this.getChildBoundingBox(e,this,this,n);r?r.addBoundingBox(a):r=a}),r}getFontSize(){var{document:e,parent:r}=this,A=LA.parse(e.ctx.font).fontSize,n=r.getStyle("font-size").getNumber(A);return n}getTElementBoundingBox(e){var r=this.getFontSize();return new Nn(this.x,this.y-r,this.x+this.measureText(e),this.y)}getGlyph(e,r,A){var n=r[A],a=null;if(e.isArabic){var i=r.length,s=r[A-1],o=r[A+1],l="isolated";if((A===0||s===" ")&&A<i-1&&o!==" "&&(l="terminal"),A>0&&s!==" "&&A<i-1&&o!==" "&&(l="medial"),A>0&&s!==" "&&(A===i-1||o===" ")&&(l="initial"),typeof e.glyphs[n]<"u"){var c=e.glyphs[n];a=c instanceof qp?c:c[l]}}else a=e.glyphs[n];return a||(a=e.missingGlyph),a}getText(){return""}getTextFromNode(e){var r=e||this.node,A=Array.from(r.parentNode.childNodes),n=A.indexOf(r),a=A.length-1,i=_s(r.textContent||"");return n===0&&(i=$4(i)),n===a&&(i=q4(i)),i}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((A,n)=>{this.renderChild(e,this,this,n)});var{mouse:r}=this.document.screen;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:r,parent:A}=this,n=this.getText(),a=A.getStyle("font-family").getDefinition();if(a){for(var{unitsPerEm:i}=a.fontFace,s=LA.parse(r.ctx.font),o=A.getStyle("font-size").getNumber(s.fontSize),l=A.getStyle("font-style").getString(s.fontStyle),c=o/i,d=a.isRTL?n.split("").reverse().join(""):n,g=en(A.getAttribute("dx").getString()),h=d.length,p=0;p<h;p++){var v=this.getGlyph(a,d,p);e.translate(this.x,this.y),e.scale(c,-c);var y=e.lineWidth;e.lineWidth=e.lineWidth*i/o,l==="italic"&&e.transform(1,0,.4,1,0,0),v.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=y,e.scale(1/c,-1/c),e.translate(-this.x,-this.y),this.x+=o*(v.horizAdvX||a.horizAdvX)/i,typeof g[p]<"u"&&!isNaN(g[p])&&(this.x+=g[p])}return}var{x:C,y:b}=this;e.fillStyle&&e.fillText(n,C,b),e.strokeStyle&&e.strokeText(n,C,b)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],r=e.getStyle("text-anchor").getString("start"),A=!1,n=0;r==="start"&&!A||r==="end"&&A?n=e.x-this.minX:r==="end"&&!A||r==="start"&&A?n=e.x-this.maxX:n=e.x-(this.minX+this.maxX)/2;for(var a=this.textChunkStart;a<this.leafTexts.length;a++)this.leafTexts[a].x+=n;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((r,A)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,A)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,r,A,n){var a=A.children[n];a.children.length>0?a.children.forEach((i,s)=>{r.adjustChildCoordinatesRecursiveCore(e,r,a,s)}):this.adjustChildCoordinates(e,r,A,n)}adjustChildCoordinates(e,r,A,n){var a=A.children[n];if(typeof a.measureText!="function")return a;e.save(),a.setContext(e,!0);var i=a.getAttribute("x"),s=a.getAttribute("y"),o=a.getAttribute("dx"),l=a.getAttribute("dy"),c=a.getStyle("font-family").getDefinition(),d=!!c&&c.isRTL;n===0&&(i.hasValue()||i.setValue(a.getInheritedAttribute("x")),s.hasValue()||s.setValue(a.getInheritedAttribute("y")),o.hasValue()||o.setValue(a.getInheritedAttribute("dx")),l.hasValue()||l.setValue(a.getInheritedAttribute("dy")));var g=a.measureText(e);return d&&(r.x-=g),i.hasValue()?(r.applyAnchoring(),a.x=i.getPixels("x"),o.hasValue()&&(a.x+=o.getPixels("x"))):(o.hasValue()&&(r.x+=o.getPixels("x")),a.x=r.x),r.x=a.x,d||(r.x+=g),s.hasValue()?(a.y=s.getPixels("y"),l.hasValue()&&(a.y+=l.getPixels("y"))):(l.hasValue()&&(r.y+=l.getPixels("y")),a.y=r.y),r.y=a.y,r.leafTexts.push(a),r.minX=Math.min(r.minX,a.x,a.x+g),r.maxX=Math.max(r.maxX,a.x,a.x+g),a.clearContext(e),e.restore(),a}getChildBoundingBox(e,r,A,n){var a=A.children[n];if(typeof a.getBoundingBox!="function")return null;var i=a.getBoundingBox(e);return i?(a.children.forEach((s,o)=>{var l=r.getChildBoundingBox(e,r,a,o);i.addBoundingBox(l)}),i):null}renderChild(e,r,A,n){var a=A.children[n];a.render(e),a.children.forEach((i,s)=>{r.renderChild(e,r,a,s)})}measureText(e){var{measureCache:r}=this;if(~r)return r;var A=this.getText(),n=this.measureTargetText(e,A);return this.measureCache=n,n}measureTargetText(e,r){if(!r.length)return 0;var{parent:A}=this,n=A.getStyle("font-family").getDefinition();if(n){for(var a=this.getFontSize(),i=n.isRTL?r.split("").reverse().join(""):r,s=en(A.getAttribute("dx").getString()),o=i.length,l=0,c=0;c<o;c++){var d=this.getGlyph(n,i,c);l+=(d.horizAdvX||n.horizAdvX)*a/n.fontFace.unitsPerEm,typeof s[c]<"u"&&!isNaN(s[c])&&(l+=s[c])}return l}if(!e.measureText)return r.length*10;e.save(),this.setContext(e,!0);var{width:g}=e.measureText(r);return this.clearContext(e),e.restore(),g}getInheritedAttribute(e){for(var r=this;r instanceof Ya&&r.isFirstChild();){var A=r.parent.getAttribute(e);if(A.hasValue(!0))return A.getValue("0");r=r.parent}return null}}class Ec extends Ya{constructor(e,r,A){super(e,r,new.target===Ec?!0:A),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class vJ extends Ec{constructor(){super(...arguments),this.type="textNode"}}class Ro extends Qi{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var r,{document:A}=this,{screen:n,window:a}=A,i=e.canvas;if(n.setDefaults(e),i.style&&typeof e.font<"u"&&a&&typeof a.getComputedStyle<"u"){e.font=a.getComputedStyle(i).getPropertyValue("font");var s=new pt(A,"fontSize",LA.parse(e.font).fontSize);s.hasValue()&&(A.rootEmSize=s.getPixels("y"),A.emSize=A.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:o,height:l}=n.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");var c=this.getAttribute("refX"),d=this.getAttribute("refY"),g=this.getAttribute("viewBox"),h=g.hasValue()?en(g.getString()):null,p=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",v=0,y=0,C=0,b=0;h&&(v=h[0],y=h[1]),this.root||(o=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(C=v,b=y,v=0,y=0)),n.viewPort.setCurrent(o,l),this.node&&(!this.parent||((r=this.node.parentNode)===null||r===void 0?void 0:r.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),h&&(o=h[2],l=h[3]),A.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:o,height:n.viewPort.height,desiredHeight:l,minX:v,minY:y,refX:c.getValue(),refY:d.getValue(),clip:p,clipX:C,clipY:b}),h&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(o,l))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.getAttribute("width",!0),a=this.getAttribute("height",!0),i=this.getAttribute("viewBox"),s=this.getAttribute("style"),o=n.getNumber(0),l=a.getNumber(0);if(A)if(typeof A=="string")this.getAttribute("preserveAspectRatio",!0).setValue(A);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(e),a.setValue(r),i.hasValue()||i.setValue("0 0 ".concat(o||e," ").concat(l||r)),s.hasValue()){var d=this.getStyle("width"),g=this.getStyle("height");d.hasValue()&&d.setValue("".concat(e,"px")),g.hasValue()&&g.setValue("".concat(r,"px"))}}}class Yp extends Zt{constructor(){super(...arguments),this.type="rect"}path(e){var r=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),a=this.getStyle("height",!1,!0).getPixels("y"),i=this.getAttribute("rx"),s=this.getAttribute("ry"),o=i.getPixels("x"),l=s.getPixels("y");if(i.hasValue()&&!s.hasValue()&&(l=o),s.hasValue()&&!i.hasValue()&&(o=l),o=Math.min(o,n/2),l=Math.min(l,a/2),e){var c=4*((Math.sqrt(2)-1)/3);e.beginPath(),a>0&&n>0&&(e.moveTo(r+o,A),e.lineTo(r+n-o,A),e.bezierCurveTo(r+n-o+c*o,A,r+n,A+l-c*l,r+n,A+l),e.lineTo(r+n,A+a-l),e.bezierCurveTo(r+n,A+a-l+c*l,r+n-o+c*o,A+a,r+n-o,A+a),e.lineTo(r+o,A+a),e.bezierCurveTo(r+o-c*o,A+a,r,A+a-l+c*l,r,A+a-l),e.lineTo(r,A+l),e.bezierCurveTo(r,A+l-c*l,r+o-c*o,A,r+o,A),e.closePath())}return new Nn(r,A,r+n,A+a)}getMarkers(){return null}}class cb extends Zt{constructor(){super(...arguments),this.type="circle"}path(e){var r=this.getAttribute("cx").getPixels("x"),A=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return e&&n>0&&(e.beginPath(),e.arc(r,A,n,0,Math.PI*2,!1),e.closePath()),new Nn(r-n,A-n,r+n,A+n)}getMarkers(){return null}}class fb extends Zt{constructor(){super(...arguments),this.type="ellipse"}path(e){var r=4*((Math.sqrt(2)-1)/3),A=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y");return e&&A>0&&n>0&&(e.beginPath(),e.moveTo(a+A,i),e.bezierCurveTo(a+A,i+r*n,a+r*A,i+n,a,i+n),e.bezierCurveTo(a-r*A,i+n,a-A,i+r*n,a-A,i),e.bezierCurveTo(a-A,i-r*n,a-r*A,i-n,a,i-n),e.bezierCurveTo(a+r*A,i-n,a+A,i-r*n,a+A,i),e.closePath()),new Nn(a-A,i-n,a+A,i+n)}getMarkers(){return null}}class ub extends Zt{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Ur(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Ur(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:r,y:A},{x:n,y:a}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(r,A),e.lineTo(n,a)),new Nn(r,A,n,a)}getMarkers(){var[e,r]=this.getPoints(),A=e.angleTo(r);return[[e,A],[r,A]]}}class Jp extends Zt{constructor(e,r,A){super(e,r,A),this.type="polyline",this.points=[],this.points=Ur.parsePath(this.getAttribute("points").getString())}path(e){var{points:r}=this,[{x:A,y:n}]=r,a=new Nn(A,n);return e&&(e.beginPath(),e.moveTo(A,n)),r.forEach(i=>{var{x:s,y:o}=i;a.addPoint(s,o),e&&e.lineTo(s,o)}),a}getMarkers(){var{points:e}=this,r=e.length-1,A=[];return e.forEach((n,a)=>{a!==r&&A.push([n,n.angleTo(e[a+1])])}),A.length>0&&A.push([e[e.length-1],A[A.length-1][1]]),A}}class hb extends Jp{constructor(){super(...arguments),this.type="polygon"}path(e){var r=super.path(e),[{x:A,y:n}]=this.points;return e&&(e.lineTo(A,n),e.closePath()),r}}class db extends dr{constructor(){super(...arguments),this.type="pattern"}createPattern(e,r,A){var n=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),i=new Ro(this.document,null);i.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),i.attributes.width=new pt(this.document,"width","".concat(n,"px")),i.attributes.height=new pt(this.document,"height","".concat(a,"px")),i.attributes.transform=new pt(this.document,"transform",this.getAttribute("patternTransform").getValue()),i.children=this.children;var s=this.document.createCanvas(n,a),o=s.getContext("2d"),l=this.getAttribute("x"),c=this.getAttribute("y");l.hasValue()&&c.hasValue()&&o.translate(l.getPixels("x",!0),c.getPixels("y",!0)),A.hasValue()?this.styles["fill-opacity"]=A:Reflect.deleteProperty(this.styles,"fill-opacity");for(var d=-1;d<=1;d++)for(var g=-1;g<=1;g++)o.save(),i.attributes.x=new pt(this.document,"x",d*s.width),i.attributes.y=new pt(this.document,"y",g*s.height),i.render(o),o.restore();var h=e.createPattern(s,"repeat");return h}}class gb extends dr{constructor(){super(...arguments),this.type="marker"}render(e,r,A){if(r){var{x:n,y:a}=r,i=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(n,a),i==="auto"&&e.rotate(A),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var o=new Ro(this.document,null);o.type=this.type,o.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new pt(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new pt(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new pt(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new pt(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new pt(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new pt(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new pt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),i==="auto"&&e.rotate(-A),e.translate(-n,-a)}}}class pb extends dr{constructor(){super(...arguments),this.type="defs"}render(){}}class Dh extends Qi{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var r=new Nn;return this.children.forEach(A=>{r.addBoundingBox(A.getBoundingBox(e))}),r}}class Zp extends dr{constructor(e,r,A){super(e,r,A),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:n,children:a}=this;a.forEach(i=>{i.type==="stop"&&n.push(i)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,r,A){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));var{stops:a}=n,i=this.getGradient(e,r);if(!i)return this.addParentOpacity(A,a[a.length-1].color);if(a.forEach(y=>{i.addColorStop(y.offset,this.addParentOpacity(A,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:o,viewPort:l}=s.screen,[c]=l.viewPorts,d=new Yp(s,null);d.attributes.x=new pt(s,"x",-o/3),d.attributes.y=new pt(s,"y",-o/3),d.attributes.width=new pt(s,"width",o),d.attributes.height=new pt(s,"height",o);var g=new Dh(s,null);g.attributes.transform=new pt(s,"transform",this.getAttribute("gradientTransform").getValue()),g.children=[d];var h=new Ro(s,null);h.attributes.x=new pt(s,"x",0),h.attributes.y=new pt(s,"y",0),h.attributes.width=new pt(s,"width",c.width),h.attributes.height=new pt(s,"height",c.height),h.children=[g];var p=s.createCanvas(c.width,c.height),v=p.getContext("2d");return v.fillStyle=i,h.render(v),v.createPattern(p,"no-repeat")}return i}inheritStopContainer(e){this.attributesToInherit.forEach(r=>{!this.getAttribute(r).hasValue()&&e.getAttribute(r).hasValue()&&this.getAttribute(r,!0).setValue(e.getAttribute(r).getValue())})}addParentOpacity(e,r){if(e.hasValue()){var A=new pt(this.document,"color",r);return A.addOpacity(e).getColor()}return r}}class mb extends Zp{constructor(e,r,A){super(e,r,A),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,r){var A=this.getGradientUnits()==="objectBoundingBox",n=A?r.getBoundingBox(e):null;if(A&&!n)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var a=A?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),i=A?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=A?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=A?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===s&&i===o?null:e.createLinearGradient(a,i,s,o)}}class vb extends Zp{constructor(e,r,A){super(e,r,A),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,r){var A=this.getGradientUnits()==="objectBoundingBox",n=r.getBoundingBox(e);if(A&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var a=A?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),i=A?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=a,o=i;this.getAttribute("fx").hasValue()&&(s=A?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=A?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=A?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,o,c,a,i,l)}}class wb extends dr{constructor(e,r,A){super(e,r,A),this.type="stop";var n=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),a=this.getStyle("stop-opacity"),i=this.getStyle("stop-color",!0);i.getString()===""&&i.setValue("#000"),a.hasValue()&&(i=i.addOpacity(a)),this.offset=n,this.color=i.getColor()}}class Ph extends dr{constructor(e,r,A){super(e,r,A),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.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 pt(e,"values",null);var n=this.getAttribute("values");n.hasValue()&&this.values.setValue(n.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}calcValue(){var{initialUnits:e}=this,{progress:r,from:A,to:n}=this.getProgress(),a=A.getNumber()+(n.getNumber()-A.getNumber())*r;return e==="%"&&(a*=100),"".concat(a).concat(e)}update(e){var{parent:r}=this,A=this.getProperty();if(this.initialValue||(this.initialValue=A.getString(),this.initialUnits=A.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(n==="freeze"&&!this.frozen)this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=A.getString();else if(n==="remove"&&!this.removed)return this.removed=!0,A.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var a=!1;if(this.begin<this.duration){var i=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var o=s.getString();i="".concat(o,"(").concat(i,")")}A.setValue(i),a=!0}return a}getProgress(){var{document:e,values:r}=this,A={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var n=A.progress*(r.getValue().length-1),a=Math.floor(n),i=Math.ceil(n);A.from=new pt(e,"from",parseFloat(r.getValue()[a])),A.to=new pt(e,"to",parseFloat(r.getValue()[i])),A.progress=(n-a)/(i-a)}else A.from=this.from,A.to=this.to;return A}}class Bb extends Ph{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:r,to:A}=this.getProgress(),n=new Lp(r.getColor()),a=new Lp(A.getColor());if(n.ok&&a.ok){var i=n.r+(a.r-n.r)*e,s=n.g+(a.g-n.g)*e,o=n.b+(a.b-n.b)*e;return"rgb(".concat(Math.floor(i),", ").concat(Math.floor(s),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}class yb extends Ph{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:r,to:A}=this.getProgress(),n=en(r.getString()),a=en(A.getString()),i=n.map((s,o)=>{var l=a[o];return s+(l-s)*e}).join(" ");return i}}class xb extends dr{constructor(e,r,A){super(e,r,A),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:n}=e,{children:a}=this;for(var i of a)switch(i.type){case"font-face":{this.fontFace=i;var s=i.getStyle("font-family");s.hasValue()&&(n[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=i;break;case"glyph":{var o=i;o.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[o.unicode]>"u"&&(this.glyphs[o.unicode]={}),this.glyphs[o.unicode][o.arabicForm]=o):this.glyphs[o.unicode]=o;break}}}render(){}}class Cb extends dr{constructor(e,r,A){super(e,r,A),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 bb extends Zt{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Eb extends Ya{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var r=e.children[0];if(r)return r.getText()}return""}}class Fb extends Ya{constructor(e,r,A){super(e,r,A),this.type="a";var{childNodes:n}=r,a=n[0],i=n.length>0&&Array.from(n).every(s=>s.nodeType===3);this.hasText=i,this.text=i?this.getTextFromNode(a):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:r,x:A,y:n}=this,{mouse:a}=r.screen,i=new pt(r,"fontSize",LA.parse(r.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new Nn(A,n-i.getPixels("y"),A+this.measureText(e),n))}else if(this.children.length>0){var s=new Dh(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function Sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function Mh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sb(Object(r),!0).forEach(function(A){Fp(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sb(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}class _b extends Ya{constructor(e,r,A){super(e,r,A),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var n=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(n)}getText(){return this.text}path(e){var{dataArray:r}=this;e&&e.beginPath(),r.forEach(A=>{var{type:n,points:a}=A;switch(n){case Tt.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case Tt.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case Tt.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case Tt.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case Tt.ARC:{var[i,s,o,l,c,d,g,h]=a,p=o>l?o:l,v=o>l?1:o/l,y=o>l?l/o:1;e&&(e.translate(i,s),e.rotate(g),e.scale(v,y),e.arc(0,0,p,c,c+d,!!(1-h)),e.scale(1/v,1/y),e.rotate(-g),e.translate(-i,-s));break}case Tt.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var r=this.parent.getStyle("text-decoration").getString(),A=this.getFontSize(),{glyphInfo:n}=this,a=e.fillStyle;r==="underline"&&e.beginPath(),n.forEach((i,s)=>{var{p0:o,p1:l,rotation:c,text:d}=i;e.save(),e.translate(o.x,o.y),e.rotate(c),e.fillStyle&&e.fillText(d,0,0),e.strokeStyle&&e.strokeText(d,0,0),e.restore(),r==="underline"&&(s===0&&e.moveTo(o.x,o.y+A/8),e.lineTo(l.x,l.y+A/5))}),r==="underline"&&(e.lineWidth=A/20,e.strokeStyle=a,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,r,A,n,a,i,s,o,l){var c=i,d=this.measureText(e,o);o===" "&&r==="justify"&&A<n&&(d+=(n-A)/a),l>-1&&(c+=this.getLetterSpacingAt(l));var g=this.textHeight/20,h=this.getEquidistantPointOnPath(c,g,0),p=this.getEquidistantPointOnPath(c+d,g,0),v={p0:h,p1:p},y=h&&p?Math.atan2(p.y-h.y,p.x-h.x):0;if(s){var C=Math.cos(Math.PI/2+y)*s,b=Math.cos(-y)*s;v.p0=Mh(Mh({},h),{},{x:h.x+C,y:h.y+b}),v.p1=Mh(Mh({},p),{},{x:p.x+C,y:p.y+b})}return c+=d,{offset:c,segment:v,rotation:y}}measureText(e,r){var{measuresCache:A}=this,n=r||this.getText();if(A.has(n))return A.get(n);var a=this.measureTargetText(e,n);return A.set(n,a),a}setTextData(e){if(!this.glyphInfo){var r=this.getText(),A=r.split(""),n=r.split(" ").length-1,a=this.parent.getAttribute("dx").split().map(O=>O.getPixels("x")),i=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),c=0;!o.hasValue()||o.getValue()==="inherit"?c=l.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(c=o.getPixels());var d=[],g=r.length;this.letterSpacingCache=d;for(var h=0;h<g;h++)d.push(typeof a[h]<"u"?a[h]:c);var p=d.reduce((O,W,X)=>X===0?0:O+W||0,0),v=this.measureText(e),y=Math.max(v+p,0);this.textWidth=v,this.textHeight=this.getFontSize(),this.glyphInfo=[];var C=this.getPathLength(),b=this.getStyle("startOffset").getNumber(0)*C,F=0;(s==="middle"||s==="center")&&(F=-y/2),(s==="end"||s==="right")&&(F=-y),F+=b,A.forEach((O,W)=>{var{offset:X,segment:k,rotation:Q}=this.findSegmentToFitChar(e,s,y,C,n,F,i,O,W);F=X,!(!k.p0||!k.p1)&&this.glyphInfo.push({text:A[W],p0:k.p0,p1:k.p1,rotation:Q})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var r=[],{pathParser:A}=e;for(A.reset();!A.isEnd();){var{current:n}=A,a=n?n.x:0,i=n?n.y:0,s=A.next(),o=s.type,l=[];switch(s.type){case Tt.MOVE_TO:this.pathM(A,l);break;case Tt.LINE_TO:o=this.pathL(A,l);break;case Tt.HORIZ_LINE_TO:o=this.pathH(A,l);break;case Tt.VERT_LINE_TO:o=this.pathV(A,l);break;case Tt.CURVE_TO:this.pathC(A,l);break;case Tt.SMOOTH_CURVE_TO:o=this.pathS(A,l);break;case Tt.QUAD_TO:this.pathQ(A,l);break;case Tt.SMOOTH_QUAD_TO:o=this.pathT(A,l);break;case Tt.ARC:l=this.pathA(A);break;case Tt.CLOSE_PATH:Zt.pathZ(A);break}s.type!==Tt.CLOSE_PATH?r.push({type:o,points:l,start:{x:a,y:i},pathLength:this.calcLength(a,i,o,l)}):r.push({type:Tt.CLOSE_PATH,points:[],pathLength:0})}return r}pathM(e,r){var{x:A,y:n}=Zt.pathM(e).point;r.push(A,n)}pathL(e,r){var{x:A,y:n}=Zt.pathL(e).point;return r.push(A,n),Tt.LINE_TO}pathH(e,r){var{x:A,y:n}=Zt.pathH(e).point;return r.push(A,n),Tt.LINE_TO}pathV(e,r){var{x:A,y:n}=Zt.pathV(e).point;return r.push(A,n),Tt.LINE_TO}pathC(e,r){var{point:A,controlPoint:n,currentPoint:a}=Zt.pathC(e);r.push(A.x,A.y,n.x,n.y,a.x,a.y)}pathS(e,r){var{point:A,controlPoint:n,currentPoint:a}=Zt.pathS(e);return r.push(A.x,A.y,n.x,n.y,a.x,a.y),Tt.CURVE_TO}pathQ(e,r){var{controlPoint:A,currentPoint:n}=Zt.pathQ(e);r.push(A.x,A.y,n.x,n.y)}pathT(e,r){var{controlPoint:A,currentPoint:n}=Zt.pathT(e);return r.push(A.x,A.y,n.x,n.y),Tt.QUAD_TO}pathA(e){var{rX:r,rY:A,sweepFlag:n,xAxisRotation:a,centp:i,a1:s,ad:o}=Zt.pathA(e);return n===0&&o>0&&(o-=2*Math.PI),n===1&&o<0&&(o+=2*Math.PI),[i.x,i.y,r,A,s,o,a,n]}calcLength(e,r,A,n){var a=0,i=null,s=null,o=0;switch(A){case Tt.LINE_TO:return this.getLineLength(e,r,n[0],n[1]);case Tt.CURVE_TO:for(a=0,i=this.getPointOnCubicBezier(0,e,r,n[0],n[1],n[2],n[3],n[4],n[5]),o=.01;o<=1;o+=.01)s=this.getPointOnCubicBezier(o,e,r,n[0],n[1],n[2],n[3],n[4],n[5]),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;return a;case Tt.QUAD_TO:for(a=0,i=this.getPointOnQuadraticBezier(0,e,r,n[0],n[1],n[2],n[3]),o=.01;o<=1;o+=.01)s=this.getPointOnQuadraticBezier(o,e,r,n[0],n[1],n[2],n[3]),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;return a;case Tt.ARC:{a=0;var l=n[4],c=n[5],d=n[4]+c,g=Math.PI/180;if(Math.abs(l-d)<g&&(g=Math.abs(l-d)),i=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),c<0)for(o=l-g;o>d;o-=g)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;else for(o=l+g;o<d;o+=g)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;return s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],d,0),a+=this.getLineLength(i.x,i.y,s.x,s.y),a}}return 0}getPointOnLine(e,r,A,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:A,o=(a-A)/(n-r+Us),l=Math.sqrt(e*e/(1+o*o));n<r&&(l*=-1);var c=o*l,d=null;if(n===r)d={x:i,y:s+c};else if((s-A)/(i-r+Us)===o)d={x:i+l,y:s+c};else{var g=0,h=0,p=this.getLineLength(r,A,n,a);if(p<Us)return null;var v=(i-r)*(n-r)+(s-A)*(a-A);v/=p*p,g=r+v*(n-r),h=A+v*(a-A);var y=this.getLineLength(i,s,g,h),C=Math.sqrt(e*e-y*y);l=Math.sqrt(C*C/(1+o*o)),n<r&&(l*=-1),c=o*l,d={x:g+l,y:h+c}}return d}getPointOnPath(e){var r=this.getPathLength(),A=0,n=null;if(e<-5e-5||e-5e-5>r)return null;var{dataArray:a}=this;for(var i of a){if(i&&(i.pathLength<5e-5||A+i.pathLength+5e-5<e)){A+=i.pathLength;continue}var s=e-A,o=0;switch(i.type){case Tt.LINE_TO:n=this.getPointOnLine(s,i.start.x,i.start.y,i.points[0],i.points[1],i.start.x,i.start.y);break;case Tt.ARC:{var l=i.points[4],c=i.points[5],d=i.points[4]+c;if(o=l+s/i.pathLength*c,c<0&&o<d||c>=0&&o>d)break;n=this.getPointOnEllipticalArc(i.points[0],i.points[1],i.points[2],i.points[3],o,i.points[6]);break}case Tt.CURVE_TO:o=s/i.pathLength,o>1&&(o=1),n=this.getPointOnCubicBezier(o,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3],i.points[4],i.points[5]);break;case Tt.QUAD_TO:o=s/i.pathLength,o>1&&(o=1),n=this.getPointOnQuadraticBezier(o,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3]);break}if(n)return n;break}return null}getLineLength(e,r,A,n){return Math.sqrt((A-e)*(A-e)+(n-r)*(n-r))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,r)=>r.pathLength>0?e+r.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,r,A,n,a,i,s,o,l){var c=o*Hp(e)+i*Vp(e)+n*Kp(e)+r*Gp(e),d=l*Hp(e)+s*Vp(e)+a*Kp(e)+A*Gp(e);return{x:c,y:d}}getPointOnQuadraticBezier(e,r,A,n,a,i,s){var o=i*jp(e)+n*zp(e)+r*Wp(e),l=s*jp(e)+a*zp(e)+A*Wp(e);return{x:o,y:l}}getPointOnEllipticalArc(e,r,A,n,a,i){var s=Math.cos(i),o=Math.sin(i),l={x:A*Math.cos(a),y:n*Math.sin(a)};return{x:e+(l.x*s-l.y*o),y:r+(l.x*o+l.y*s)}}buildEquidistantCache(e,r){var A=this.getPathLength(),n=r||.25,a=e||A/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==n){this.equidistantCache={step:a,precision:n,points:[]};for(var i=0,s=0;s<=A;s+=n){var o=this.getPointOnPath(s),l=this.getPointOnPath(s+n);!o||!l||(i+=this.getLineLength(o.x,o.y,l.x,l.y),i>=a&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:s}),i-=a))}}}getEquidistantPointOnPath(e,r,A){if(this.buildEquidistantCache(r,A),e<0||e-this.getPathLength()>5e-5)return null;var n=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}var wJ=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Tb extends Qi{constructor(e,r,A){super(e,r,A),this.type="image",this.loaded=!1;var n=this.getHrefAttribute().getString();if(n){var a=n.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(n);e.images.push(this),a?this.loadSvg(n):this.loadImage(n),this.isSvg=a}}loadImage(e){var r=this;return Xa(function*(){try{var A=yield r.document.createImage(e);r.image=A}catch(n){console.error('Error while loading image "'.concat(e,'":'),n)}r.loaded=!0})()}loadSvg(e){var r=this;return Xa(function*(){var A=wJ.exec(e);if(A){var n=A[5];A[4]==="base64"?r.image=atob(n):r.image=decodeURIComponent(n)}else try{var a=yield r.document.fetch(e),i=yield a.text();r.image=i}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}r.loaded=!0})()}renderChildren(e){var{document:r,image:A,loaded:n}=this,a=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!n||!A||!s||!o)){if(e.save(),e.translate(a,i),this.isSvg){var l=r.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:o});l.document.documentElement.parent=this,l.render()}else{var c=this.image;r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:c.width,height:o,desiredHeight:c.height}),this.loaded&&(typeof c.complete>"u"||c.complete)&&e.drawImage(c,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new Nn(e,r,e+A,r+n)}}class Ub extends Qi{constructor(){super(...arguments),this.type="symbol"}render(e){}}class Nb{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,r){var A=this;return Xa(function*(){try{var{document:n}=A,a=yield n.canvg.parser.load(r),i=a.getElementsByTagName("font");Array.from(i).forEach(s=>{var o=n.createElement(s);n.definitions[e]=o})}catch(s){console.error('Error while loading font "'.concat(r,'":'),s)}A.loaded=!0})()}}class e2 extends dr{constructor(e,r,A){super(e,r,A),this.type="style";var n=_s(Array.from(r.childNodes).map(i=>i.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),a=n.split("}");a.forEach(i=>{var s=i.trim();if(s){var o=s.split("{"),l=o[0].split(","),c=o[1].split(";");l.forEach(d=>{var g=d.trim();if(g){var h=e.styles[g]||{};if(c.forEach(y=>{var C=y.indexOf(":"),b=y.substr(0,C).trim(),F=y.substr(C+1,y.length-C).trim();b&&F&&(h[b]=new pt(e,b,F))}),e.styles[g]=h,e.stylesSpecificity[g]=Z4(g),g==="@font-face"){var p=h["font-family"].getString().replace(/"|'/g,""),v=h.src.getString().split(",");v.forEach(y=>{if(y.indexOf('format("svg")')>0){var C=Pp(y);C&&new Nb(e).load(p,C)}})}}})}})}}e2.parseExternalUrl=Pp;class Ib extends Qi{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var r=this.getAttribute("x"),A=this.getAttribute("y");r.hasValue()&&e.translate(r.getPixels("x"),0),A.hasValue()&&e.translate(0,A.getPixels("y"))}path(e){var{element:r}=this;r&&r.path(e)}renderChildren(e){var{document:r,element:A}=this;if(A){var n=A;if(A.type==="symbol"&&(n=new Ro(r,null),n.attributes.viewBox=new pt(r,"viewBox",A.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new pt(r,"preserveAspectRatio",A.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new pt(r,"overflow",A.getAttribute("overflow").getString()),n.children=A.children,A.styles.opacity=new pt(r,"opacity",this.calculateOpacity())),n.type==="svg"){var a=this.getStyle("width",!1,!0),i=this.getStyle("height",!1,!0);a.hasValue()&&(n.attributes.width=new pt(r,"width",a.getString())),i.hasValue()&&(n.attributes.height=new pt(r,"height",i.getString()))}var s=n.parent;n.parent=this,n.render(e),n.parent=s}}getBoundingBox(e){var{element:r}=this;return r?r.getBoundingBox(e):null}elementTransform(){var{document:e,element:r}=this;return ki.fromElement(e,r)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function Rh(t,e,r,A,n,a){return t[r*A*4+e*4+a]}function Hh(t,e,r,A,n,a,i){t[r*A*4+e*4+a]=i}function Xr(t,e,r){var A=t[e];return A*r}function Ja(t,e,r,A){return e+Math.cos(t)*r+Math.sin(t)*A}class t2 extends dr{constructor(e,r,A){super(e,r,A),this.type="feColorMatrix";var n=en(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var a=n[0];n=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var i=n[0]*Math.PI/180;n=[Ja(i,.213,.787,-.213),Ja(i,.715,-.715,-.715),Ja(i,.072,-.072,.928),0,0,Ja(i,.213,-.213,.143),Ja(i,.715,.285,.14),Ja(i,.072,-.072,-.283),0,0,Ja(i,.213,-.213,-.787),Ja(i,.715,-.715,.715),Ja(i,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=n,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,r,A,n,a){for(var{includeOpacity:i,matrix:s}=this,o=e.getImageData(0,0,n,a),l=0;l<a;l++)for(var c=0;c<n;c++){var d=Rh(o.data,c,l,n,a,0),g=Rh(o.data,c,l,n,a,1),h=Rh(o.data,c,l,n,a,2),p=Rh(o.data,c,l,n,a,3),v=Xr(s,0,d)+Xr(s,1,g)+Xr(s,2,h)+Xr(s,3,p)+Xr(s,4,1),y=Xr(s,5,d)+Xr(s,6,g)+Xr(s,7,h)+Xr(s,8,p)+Xr(s,9,1),C=Xr(s,10,d)+Xr(s,11,g)+Xr(s,12,h)+Xr(s,13,p)+Xr(s,14,1),b=Xr(s,15,d)+Xr(s,16,g)+Xr(s,17,h)+Xr(s,18,p)+Xr(s,19,1);i&&(v=0,y=0,C=0,b*=p/255),Hh(o.data,c,l,n,a,0,v),Hh(o.data,c,l,n,a,1,y),Hh(o.data,c,l,n,a,2,C),Hh(o.data,c,l,n,a,3,b)}e.clearRect(0,0,n,a),e.putImageData(o,0,0)}}class Fc extends dr{constructor(){super(...arguments),this.type="mask"}apply(e,r){var{document:A}=this,n=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!i&&!s){var o=new Nn;this.children.forEach(p=>{o.addBoundingBox(p.getBoundingBox(e))}),n=Math.floor(o.x1),a=Math.floor(o.y1),i=Math.floor(o.width),s=Math.floor(o.height)}var l=this.removeStyles(r,Fc.ignoreStyles),c=A.createCanvas(n+i,a+s),d=c.getContext("2d");A.screen.setDefaults(d),this.renderChildren(d),new t2(A,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(d,0,0,n+i,a+s);var g=A.createCanvas(n+i,a+s),h=g.getContext("2d");A.screen.setDefaults(h),r.render(h),h.globalCompositeOperation="destination-in",h.fillStyle=d.createPattern(c,"no-repeat"),h.fillRect(0,0,n+i,a+s),e.fillStyle=h.createPattern(g,"no-repeat"),e.fillRect(0,0,n+i,a+s),this.restoreStyles(r,l)}render(e){}}Fc.ignoreStyles=["mask","transform","clip-path"];var Lb=()=>{};class kb extends dr{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:r}=this,A=Reflect.getPrototypeOf(e),{beginPath:n,closePath:a}=e;A&&(A.beginPath=Lb,A.closePath=Lb),Reflect.apply(n,e,[]),this.children.forEach(i=>{if(!(typeof i.path>"u")){var s=typeof i.elementTransform<"u"?i.elementTransform():null;s||(s=ki.fromElement(r,i)),s&&s.apply(e),i.path(e),A&&(A.closePath=a),s&&s.unapply(e)}}),Reflect.apply(a,e,[]),e.clip(),A&&(A.beginPath=n,A.closePath=a)}render(e){}}class Sc extends dr{constructor(){super(...arguments),this.type="filter"}apply(e,r){var{document:A,children:n}=this,a=r.getBoundingBox(e);if(a){var i=0,s=0;n.forEach(C=>{var b=C.extraFilterDistance||0;i=Math.max(i,b),s=Math.max(s,b)});var o=Math.floor(a.width),l=Math.floor(a.height),c=o+2*i,d=l+2*s;if(!(c<1||d<1)){var g=Math.floor(a.x),h=Math.floor(a.y),p=this.removeStyles(r,Sc.ignoreStyles),v=A.createCanvas(c,d),y=v.getContext("2d");A.screen.setDefaults(y),y.translate(-g+i,-h+s),r.render(y),n.forEach(C=>{typeof C.apply=="function"&&C.apply(y,0,0,c,d)}),e.drawImage(v,0,0,c,d,g-i,h-s,c,d),this.restoreStyles(r,p)}}}render(e){}}Sc.ignoreStyles=["filter","transform","clip-path"];class Qb extends dr{constructor(e,r,A){super(e,r,A),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,r,A,n,a){}}class Ob extends dr{constructor(){super(...arguments),this.type="feMorphology"}apply(e,r,A,n,a){}}class Db extends dr{constructor(){super(...arguments),this.type="feComposite"}apply(e,r,A,n,a){}}class Pb extends dr{constructor(e,r,A){super(e,r,A),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,r,A,n,a){var{document:i,blurRadius:s}=this,o=i.window?i.window.document.body:null,l=e.canvas;l.id=i.getUniqueId(),o&&(l.style.display="none",o.appendChild(l)),YY(l,r,A,n,a,s),o&&o.removeChild(l)}}class Mb extends dr{constructor(){super(...arguments),this.type="title"}}class Rb extends dr{constructor(){super(...arguments),this.type="desc"}}var BJ={svg:Ro,rect:Yp,circle:cb,ellipse:fb,line:ub,polyline:Jp,polygon:hb,path:Zt,pattern:db,marker:gb,defs:pb,linearGradient:mb,radialGradient:vb,stop:wb,animate:Ph,animateColor:Bb,animateTransform:yb,font:xb,"font-face":Cb,"missing-glyph":bb,glyph:qp,text:Ya,tspan:Ec,tref:Eb,a:Fb,textPath:_b,image:Tb,g:Dh,symbol:Ub,style:e2,use:Ib,mask:Fc,clipPath:kb,filter:Sc,feDropShadow:Qb,feMorphology:Ob,feComposite:Db,feColorMatrix:t2,feGaussianBlur:Pb,title:Mb,desc:Rb};function Hb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function yJ(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hb(Object(r),!0).forEach(function(A){Fp(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hb(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}function xJ(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}function CJ(t){return r2.apply(this,arguments)}function r2(){return r2=Xa(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=document.createElement("img");return e&&(r.crossOrigin="Anonymous"),new Promise((A,n)=>{r.onload=()=>{A(r)},r.onerror=(a,i,s,o,l)=>{n(l)},r.src=t})}),r2.apply(this,arguments)}class Za{constructor(e){var{rootEmSize:r=12,emSize:A=12,createCanvas:n=Za.createCanvas,createImage:a=Za.createImage,anonymousCrossOrigin:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=r,this.emSize=A,this.createCanvas=n,this.createImage=this.bindCreateImage(a,i),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,r){return typeof r=="boolean"?(A,n)=>e(A,typeof n=="boolean"?n:r):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:r}=this;r.push(e)}popEmSize(){var{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){var r=this.createElement(e.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}createElement(e){var r=e.nodeName.replace(/^[^:]+:/,""),A=Za.elementTypes[r];return typeof A<"u"?new A(this,e):new lb(this,e)}createTextNode(e){return new vJ(this,e)}setViewBox(e){this.screen.setViewBox(yJ({document:this},e))}}Za.createCanvas=xJ,Za.createImage=CJ,Za.elementTypes=BJ;function Vb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function Ns(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vb(Object(r),!0).forEach(function(A){Fp(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vb(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}class Is{constructor(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Oh(A),this.screen=new bc(e,A),this.options=A;var n=new Za(this,A),a=n.createDocumentElement(r);this.document=n,this.documentElement=a}static from(e,r){var A=arguments;return Xa(function*(){var n=A.length>2&&A[2]!==void 0?A[2]:{},a=new Oh(n),i=yield a.parse(r);return new Is(e,i,n)})()}static fromString(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=new Oh(A),a=n.parseFromString(r);return new Is(e,a,A)}fork(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Is.from(e,r,Ns(Ns({},this.options),A))}forkString(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Is.fromString(e,r,Ns(Ns({},this.options),A))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,r=this;return Xa(function*(){var A=e.length>0&&e[0]!==void 0?e[0]:{};r.start(Ns({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},A)),yield r.ready(),r.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:r,screen:A,options:n}=this;A.start(r,Ns(Ns({enableRedraw:!0},n),e))}stop(){this.screen.stop()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,r,A)}}const bJ=Object.freeze(Object.defineProperty({__proto__:null,AElement:Fb,AnimateColorElement:Bb,AnimateElement:Ph,AnimateTransformElement:yb,BoundingBox:Nn,CB1:Hp,CB2:Vp,CB3:Kp,CB4:Gp,Canvg:Is,CircleElement:cb,ClipPathElement:kb,DefsElement:pb,DescElement:Rb,Document:Za,Element:dr,EllipseElement:fb,FeColorMatrixElement:t2,FeCompositeElement:Db,FeDropShadowElement:Qb,FeGaussianBlurElement:Pb,FeMorphologyElement:Ob,FilterElement:Sc,Font:LA,FontElement:xb,FontFaceElement:Cb,GElement:Dh,GlyphElement:qp,GradientElement:Zp,ImageElement:Tb,LineElement:ub,LinearGradientElement:mb,MarkerElement:gb,MaskElement:Fc,Matrix:Xp,MissingGlyphElement:bb,Mouse:tb,PSEUDO_ZERO:Us,Parser:Oh,PathElement:Zt,PathParser:Tt,PatternElement:db,Point:Ur,PolygonElement:hb,PolylineElement:Jp,Property:pt,QB1:jp,QB2:zp,QB3:Wp,RadialGradientElement:vb,RectElement:Yp,RenderedElement:Qi,Rotate:ab,SVGElement:Ro,SVGFontLoader:Nb,Scale:ib,Screen:bc,Skew:$p,SkewX:sb,SkewY:ob,StopElement:wb,StyleElement:e2,SymbolElement:Ub,TRefElement:Eb,TSpanElement:Ec,TextElement:Ya,TextPathElement:_b,TitleElement:Mb,Transform:ki,Translate:nb,UnknownElement:lb,UseElement:Ib,ViewPort:eb,compressSpaces:_s,default:Is,getSelectorSpecificity:Z4,normalizeAttributeName:Y4,normalizeColor:J4,parseExternalUrl:Pp,presets:tJ,toNumbers:en,trimLeft:$4,trimRight:q4,vectorMagnitude:Mp,vectorsAngle:Rp,vectorsRatio:Qh},Symbol.toStringTag,{value:"Module"}));ua.VueUiDonut=vR,ua.VueUiTable=TM,ua.VueUiWaffle=$R,ua.VueUiXy=nP,Object.defineProperty(ua,Symbol.toStringTag,{value:"Module"})});
|
|
391
|
+
***************************************************************************** */var O4=function(t,e){return(O4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,A){r.__proto__=A}||function(r,A){for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(r[n]=A[n])})(t,e)};function D4(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}O4(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function NY(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var A=t[r];if(A.type===je.CLOSE_PATH)e+="z";else if(A.type===je.HORIZ_LINE_TO)e+=(A.relative?"h":"H")+A.x;else if(A.type===je.VERT_LINE_TO)e+=(A.relative?"v":"V")+A.y;else if(A.type===je.MOVE_TO)e+=(A.relative?"m":"M")+A.x+" "+A.y;else if(A.type===je.LINE_TO)e+=(A.relative?"l":"L")+A.x+" "+A.y;else if(A.type===je.CURVE_TO)e+=(A.relative?"c":"C")+A.x1+" "+A.y1+" "+A.x2+" "+A.y2+" "+A.x+" "+A.y;else if(A.type===je.SMOOTH_CURVE_TO)e+=(A.relative?"s":"S")+A.x2+" "+A.y2+" "+A.x+" "+A.y;else if(A.type===je.QUAD_TO)e+=(A.relative?"q":"Q")+A.x1+" "+A.y1+" "+A.x+" "+A.y;else if(A.type===je.SMOOTH_QUAD_TO)e+=(A.relative?"t":"T")+A.x+" "+A.y;else{if(A.type!==je.ARC)throw new Error('Unexpected command type "'+A.type+'" at index '+r+".");e+=(A.relative?"a":"A")+A.rX+" "+A.rY+" "+A.xRot+" "+ +A.lArcFlag+" "+ +A.sweepFlag+" "+A.x+" "+A.y}}return e}function Qp(t,e){var r=t[0],A=t[1];return[r*Math.cos(e)-A*Math.sin(e),r*Math.sin(e)+A*Math.cos(e)]}function ea(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if(typeof t[r]!="number")throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var Li=Math.PI;function Op(t,e,r){t.lArcFlag=t.lArcFlag===0?0:1,t.sweepFlag=t.sweepFlag===0?0:1;var A=t.rX,n=t.rY,a=t.x,i=t.y;A=Math.abs(t.rX),n=Math.abs(t.rY);var s=Qp([(e-a)/2,(r-i)/2],-t.xRot/180*Li),o=s[0],l=s[1],c=Math.pow(o,2)/Math.pow(A,2)+Math.pow(l,2)/Math.pow(n,2);1<c&&(A*=Math.sqrt(c),n*=Math.sqrt(c)),t.rX=A,t.rY=n;var d=Math.pow(A,2)*Math.pow(l,2)+Math.pow(n,2)*Math.pow(o,2),g=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(A,2)*Math.pow(n,2)-d)/d)),h=A*l/n*g,p=-n*o/A*g,v=Qp([h,p],t.xRot/180*Li);t.cX=v[0]+(e+a)/2,t.cY=v[1]+(r+i)/2,t.phi1=Math.atan2((l-p)/n,(o-h)/A),t.phi2=Math.atan2((-l-p)/n,(-o-h)/A),t.sweepFlag===0&&t.phi2>t.phi1&&(t.phi2-=2*Li),t.sweepFlag===1&&t.phi2<t.phi1&&(t.phi2+=2*Li),t.phi1*=180/Li,t.phi2*=180/Li}function P4(t,e,r){ea(t,e,r);var A=t*t+e*e-r*r;if(0>A)return[];if(A===0)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var n=Math.sqrt(A);return[[(t*r+e*n)/(t*t+e*e),(e*r-t*n)/(t*t+e*e)],[(t*r-e*n)/(t*t+e*e),(e*r+t*n)/(t*t+e*e)]]}var Wr,qa=Math.PI/180;function M4(t,e,r){return(1-r)*t+r*e}function R4(t,e,r,A){return t+Math.cos(A/180*Li)*e+Math.sin(A/180*Li)*r}function H4(t,e,r,A){var n=1e-6,a=e-t,i=r-e,s=3*a+3*(A-r)-6*i,o=6*(i-a),l=3*a;return Math.abs(s)<n?[-l/o]:function(c,d,g){g===void 0&&(g=1e-6);var h=c*c/4-d;if(h<-g)return[];if(h<=g)return[-c/2];var p=Math.sqrt(h);return[-c/2-p,-c/2+p]}(o/s,l/s,n)}function V4(t,e,r,A,n){var a=1-n;return t*(a*a*a)+e*(3*a*a*n)+r*(3*a*n*n)+A*(n*n*n)}(function(t){function e(){return n(function(s,o,l){return s.relative&&(s.x1!==void 0&&(s.x1+=o),s.y1!==void 0&&(s.y1+=l),s.x2!==void 0&&(s.x2+=o),s.y2!==void 0&&(s.y2+=l),s.x!==void 0&&(s.x+=o),s.y!==void 0&&(s.y+=l),s.relative=!1),s})}function r(){var s=NaN,o=NaN,l=NaN,c=NaN;return n(function(d,g,h){return d.type&je.SMOOTH_CURVE_TO&&(d.type=je.CURVE_TO,s=isNaN(s)?g:s,o=isNaN(o)?h:o,d.x1=d.relative?g-s:2*g-s,d.y1=d.relative?h-o:2*h-o),d.type&je.CURVE_TO?(s=d.relative?g+d.x2:d.x2,o=d.relative?h+d.y2:d.y2):(s=NaN,o=NaN),d.type&je.SMOOTH_QUAD_TO&&(d.type=je.QUAD_TO,l=isNaN(l)?g:l,c=isNaN(c)?h:c,d.x1=d.relative?g-l:2*g-l,d.y1=d.relative?h-c:2*h-c),d.type&je.QUAD_TO?(l=d.relative?g+d.x1:d.x1,c=d.relative?h+d.y1:d.y1):(l=NaN,c=NaN),d})}function A(){var s=NaN,o=NaN;return n(function(l,c,d){if(l.type&je.SMOOTH_QUAD_TO&&(l.type=je.QUAD_TO,s=isNaN(s)?c:s,o=isNaN(o)?d:o,l.x1=l.relative?c-s:2*c-s,l.y1=l.relative?d-o:2*d-o),l.type&je.QUAD_TO){s=l.relative?c+l.x1:l.x1,o=l.relative?d+l.y1:l.y1;var g=l.x1,h=l.y1;l.type=je.CURVE_TO,l.x1=((l.relative?0:c)+2*g)/3,l.y1=((l.relative?0:d)+2*h)/3,l.x2=(l.x+2*g)/3,l.y2=(l.y+2*h)/3}else s=NaN,o=NaN;return l})}function n(s){var o=0,l=0,c=NaN,d=NaN;return function(g){if(isNaN(c)&&!(g.type&je.MOVE_TO))throw new Error("path must start with moveto");var h=s(g,o,l,c,d);return g.type&je.CLOSE_PATH&&(o=c,l=d),g.x!==void 0&&(o=g.relative?o+g.x:g.x),g.y!==void 0&&(l=g.relative?l+g.y:g.y),g.type&je.MOVE_TO&&(c=o,d=l),h}}function a(s,o,l,c,d,g){return ea(s,o,l,c,d,g),n(function(h,p,v,y){var C=h.x1,b=h.x2,F=h.relative&&!isNaN(y),O=h.x!==void 0?h.x:F?0:p,W=h.y!==void 0?h.y:F?0:v;function X(B){return B*B}h.type&je.HORIZ_LINE_TO&&o!==0&&(h.type=je.LINE_TO,h.y=h.relative?0:v),h.type&je.VERT_LINE_TO&&l!==0&&(h.type=je.LINE_TO,h.x=h.relative?0:p),h.x!==void 0&&(h.x=h.x*s+W*l+(F?0:d)),h.y!==void 0&&(h.y=O*o+h.y*c+(F?0:g)),h.x1!==void 0&&(h.x1=h.x1*s+h.y1*l+(F?0:d)),h.y1!==void 0&&(h.y1=C*o+h.y1*c+(F?0:g)),h.x2!==void 0&&(h.x2=h.x2*s+h.y2*l+(F?0:d)),h.y2!==void 0&&(h.y2=b*o+h.y2*c+(F?0:g));var k=s*c-o*l;if(h.xRot!==void 0&&(s!==1||o!==0||l!==0||c!==1))if(k===0)delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag,h.type=je.LINE_TO;else{var Q=h.xRot*Math.PI/180,K=Math.sin(Q),re=Math.cos(Q),U=1/X(h.rX),T=1/X(h.rY),H=X(re)*U+X(K)*T,Y=2*K*re*(U-T),le=X(K)*U+X(re)*T,pe=H*c*c-Y*o*c+le*o*o,me=Y*(s*c+o*l)-2*(H*l*c+le*s*o),ve=H*l*l-Y*s*l+le*s*s,se=(Math.atan2(me,pe-ve)+Math.PI)%Math.PI/2,J=Math.sin(se),oe=Math.cos(se);h.rX=Math.abs(k)/Math.sqrt(pe*X(oe)+me*J*oe+ve*X(J)),h.rY=Math.abs(k)/Math.sqrt(pe*X(J)-me*J*oe+ve*X(oe)),h.xRot=180*se/Math.PI}return h.sweepFlag!==void 0&&0>k&&(h.sweepFlag=+!h.sweepFlag),h})}function i(){return function(s){var o={};for(var l in s)o[l]=s[l];return o}}t.ROUND=function(s){function o(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),ea(s),function(l){return l.x1!==void 0&&(l.x1=o(l.x1)),l.y1!==void 0&&(l.y1=o(l.y1)),l.x2!==void 0&&(l.x2=o(l.x2)),l.y2!==void 0&&(l.y2=o(l.y2)),l.x!==void 0&&(l.x=o(l.x)),l.y!==void 0&&(l.y=o(l.y)),l.rX!==void 0&&(l.rX=o(l.rX)),l.rY!==void 0&&(l.rY=o(l.rY)),l}},t.TO_ABS=e,t.TO_REL=function(){return n(function(s,o,l){return s.relative||(s.x1!==void 0&&(s.x1-=o),s.y1!==void 0&&(s.y1-=l),s.x2!==void 0&&(s.x2-=o),s.y2!==void 0&&(s.y2-=l),s.x!==void 0&&(s.x-=o),s.y!==void 0&&(s.y-=l),s.relative=!0),s})},t.NORMALIZE_HVZ=function(s,o,l){return s===void 0&&(s=!0),o===void 0&&(o=!0),l===void 0&&(l=!0),n(function(c,d,g,h,p){if(isNaN(h)&&!(c.type&je.MOVE_TO))throw new Error("path must start with moveto");return o&&c.type&je.HORIZ_LINE_TO&&(c.type=je.LINE_TO,c.y=c.relative?0:g),l&&c.type&je.VERT_LINE_TO&&(c.type=je.LINE_TO,c.x=c.relative?0:d),s&&c.type&je.CLOSE_PATH&&(c.type=je.LINE_TO,c.x=c.relative?h-d:h,c.y=c.relative?p-g:p),c.type&je.ARC&&(c.rX===0||c.rY===0)&&(c.type=je.LINE_TO,delete c.rX,delete c.rY,delete c.xRot,delete c.lArcFlag,delete c.sweepFlag),c})},t.NORMALIZE_ST=r,t.QT_TO_C=A,t.INFO=n,t.SANITIZE=function(s){s===void 0&&(s=0),ea(s);var o=NaN,l=NaN,c=NaN,d=NaN;return n(function(g,h,p,v,y){var C=Math.abs,b=!1,F=0,O=0;if(g.type&je.SMOOTH_CURVE_TO&&(F=isNaN(o)?0:h-o,O=isNaN(l)?0:p-l),g.type&(je.CURVE_TO|je.SMOOTH_CURVE_TO)?(o=g.relative?h+g.x2:g.x2,l=g.relative?p+g.y2:g.y2):(o=NaN,l=NaN),g.type&je.SMOOTH_QUAD_TO?(c=isNaN(c)?h:2*h-c,d=isNaN(d)?p:2*p-d):g.type&je.QUAD_TO?(c=g.relative?h+g.x1:g.x1,d=g.relative?p+g.y1:g.y2):(c=NaN,d=NaN),g.type&je.LINE_COMMANDS||g.type&je.ARC&&(g.rX===0||g.rY===0||!g.lArcFlag)||g.type&je.CURVE_TO||g.type&je.SMOOTH_CURVE_TO||g.type&je.QUAD_TO||g.type&je.SMOOTH_QUAD_TO){var W=g.x===void 0?0:g.relative?g.x:g.x-h,X=g.y===void 0?0:g.relative?g.y:g.y-p;F=isNaN(c)?g.x1===void 0?F:g.relative?g.x:g.x1-h:c-h,O=isNaN(d)?g.y1===void 0?O:g.relative?g.y:g.y1-p:d-p;var k=g.x2===void 0?0:g.relative?g.x:g.x2-h,Q=g.y2===void 0?0:g.relative?g.y:g.y2-p;C(W)<=s&&C(X)<=s&&C(F)<=s&&C(O)<=s&&C(k)<=s&&C(Q)<=s&&(b=!0)}return g.type&je.CLOSE_PATH&&C(h-v)<=s&&C(p-y)<=s&&(b=!0),b?[]:g})},t.MATRIX=a,t.ROTATE=function(s,o,l){o===void 0&&(o=0),l===void 0&&(l=0),ea(s,o,l);var c=Math.sin(s),d=Math.cos(s);return a(d,c,-c,d,o-o*d+l*c,l-o*c-l*d)},t.TRANSLATE=function(s,o){return o===void 0&&(o=0),ea(s,o),a(1,0,0,1,s,o)},t.SCALE=function(s,o){return o===void 0&&(o=s),ea(s,o),a(s,0,0,o,0,0)},t.SKEW_X=function(s){return ea(s),a(1,0,Math.atan(s),1,0,0)},t.SKEW_Y=function(s){return ea(s),a(1,Math.atan(s),0,1,0,0)},t.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ea(s),a(-1,0,0,1,s,0)},t.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ea(s),a(1,0,0,-1,0,s)},t.A_TO_C=function(){return n(function(s,o,l){return je.ARC===s.type?function(c,d,g){var h,p,v,y;c.cX||Op(c,d,g);for(var C=Math.min(c.phi1,c.phi2),b=Math.max(c.phi1,c.phi2)-C,F=Math.ceil(b/90),O=new Array(F),W=d,X=g,k=0;k<F;k++){var Q=M4(c.phi1,c.phi2,k/F),K=M4(c.phi1,c.phi2,(k+1)/F),re=K-Q,U=4/3*Math.tan(re*qa/4),T=[Math.cos(Q*qa)-U*Math.sin(Q*qa),Math.sin(Q*qa)+U*Math.cos(Q*qa)],H=T[0],Y=T[1],le=[Math.cos(K*qa),Math.sin(K*qa)],pe=le[0],me=le[1],ve=[pe+U*Math.sin(K*qa),me-U*Math.cos(K*qa)],se=ve[0],J=ve[1];O[k]={relative:c.relative,type:je.CURVE_TO};var oe=function(B,_){var S=Qp([B*c.rX,_*c.rY],c.xRot),N=S[0],G=S[1];return[c.cX+N,c.cY+G]};h=oe(H,Y),O[k].x1=h[0],O[k].y1=h[1],p=oe(se,J),O[k].x2=p[0],O[k].y2=p[1],v=oe(pe,me),O[k].x=v[0],O[k].y=v[1],c.relative&&(O[k].x1-=W,O[k].y1-=X,O[k].x2-=W,O[k].y2-=X,O[k].x-=W,O[k].y-=X),W=(y=[O[k].x,O[k].y])[0],X=y[1]}return O}(s,s.relative?0:o,s.relative?0:l):s})},t.ANNOTATE_ARCS=function(){return n(function(s,o,l){return s.relative&&(o=0,l=0),je.ARC===s.type&&Op(s,o,l),s})},t.CLONE=i,t.CALCULATE_BOUNDS=function(){var s=function(g){var h={};for(var p in g)h[p]=g[p];return h},o=e(),l=A(),c=r(),d=n(function(g,h,p){var v=c(l(o(s(g))));function y(J){J>d.maxX&&(d.maxX=J),J<d.minX&&(d.minX=J)}function C(J){J>d.maxY&&(d.maxY=J),J<d.minY&&(d.minY=J)}if(v.type&je.DRAWING_COMMANDS&&(y(h),C(p)),v.type&je.HORIZ_LINE_TO&&y(v.x),v.type&je.VERT_LINE_TO&&C(v.y),v.type&je.LINE_TO&&(y(v.x),C(v.y)),v.type&je.CURVE_TO){y(v.x),C(v.y);for(var b=0,F=H4(h,v.x1,v.x2,v.x);b<F.length;b++)0<(se=F[b])&&1>se&&y(V4(h,v.x1,v.x2,v.x,se));for(var O=0,W=H4(p,v.y1,v.y2,v.y);O<W.length;O++)0<(se=W[O])&&1>se&&C(V4(p,v.y1,v.y2,v.y,se))}if(v.type&je.ARC){y(v.x),C(v.y),Op(v,h,p);for(var X=v.xRot/180*Math.PI,k=Math.cos(X)*v.rX,Q=Math.sin(X)*v.rX,K=-Math.sin(X)*v.rY,re=Math.cos(X)*v.rY,U=v.phi1<v.phi2?[v.phi1,v.phi2]:-180>v.phi2?[v.phi2+360,v.phi1+360]:[v.phi2,v.phi1],T=U[0],H=U[1],Y=function(J){var oe=J[0],B=J[1],_=180*Math.atan2(B,oe)/Math.PI;return _<T?_+360:_},le=0,pe=P4(K,-k,0).map(Y);le<pe.length;le++)(se=pe[le])>T&&se<H&&y(R4(v.cX,k,K,se));for(var me=0,ve=P4(re,-Q,0).map(Y);me<ve.length;me++){var se;(se=ve[me])>T&&se<H&&C(R4(v.cY,Q,re,se))}}return g});return d.minX=1/0,d.maxX=-1/0,d.minY=1/0,d.maxY=-1/0,d}})(Wr||(Wr={}));var ta,K4=function(){function t(){}return t.prototype.round=function(e){return this.transform(Wr.ROUND(e))},t.prototype.toAbs=function(){return this.transform(Wr.TO_ABS())},t.prototype.toRel=function(){return this.transform(Wr.TO_REL())},t.prototype.normalizeHVZ=function(e,r,A){return this.transform(Wr.NORMALIZE_HVZ(e,r,A))},t.prototype.normalizeST=function(){return this.transform(Wr.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(Wr.QT_TO_C())},t.prototype.aToC=function(){return this.transform(Wr.A_TO_C())},t.prototype.sanitize=function(e){return this.transform(Wr.SANITIZE(e))},t.prototype.translate=function(e,r){return this.transform(Wr.TRANSLATE(e,r))},t.prototype.scale=function(e,r){return this.transform(Wr.SCALE(e,r))},t.prototype.rotate=function(e,r,A){return this.transform(Wr.ROTATE(e,r,A))},t.prototype.matrix=function(e,r,A,n,a,i){return this.transform(Wr.MATRIX(e,r,A,n,a,i))},t.prototype.skewX=function(e){return this.transform(Wr.SKEW_X(e))},t.prototype.skewY=function(e){return this.transform(Wr.SKEW_Y(e))},t.prototype.xSymmetry=function(e){return this.transform(Wr.X_AXIS_SYMMETRY(e))},t.prototype.ySymmetry=function(e){return this.transform(Wr.Y_AXIS_SYMMETRY(e))},t.prototype.annotateArcs=function(){return this.transform(Wr.ANNOTATE_ARCS())},t}(),IY=function(t){return t===" "||t===" "||t==="\r"||t===`
|
|
392
|
+
`},G4=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},LY=function(t){function e(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return D4(e,t),e.prototype.finish=function(r){if(r===void 0&&(r=[]),this.parse(" ",r),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return r},e.prototype.parse=function(r,A){var n=this;A===void 0&&(A=[]);for(var a=function(d){A.push(d),n.curArgs.length=0,n.canParseCommandOrComma=!0},i=0;i<r.length;i++){var s=r[i],o=!(this.curCommandType!==je.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=G4(s)&&(this.curNumber==="0"&&s==="0"||o);if(!G4(s)||l)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&this.curCommandType!==-1){var c=Number(this.curNumber);if(isNaN(c))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===je.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>c)throw new SyntaxError('Expected positive number, got "'+c+'" at index "'+i+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"')}this.curArgs.push(c),this.curArgs.length===kY[this.curCommandType]&&(je.HORIZ_LINE_TO===this.curCommandType?a({type:je.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):je.VERT_LINE_TO===this.curCommandType?a({type:je.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===je.MOVE_TO||this.curCommandType===je.LINE_TO||this.curCommandType===je.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),je.MOVE_TO===this.curCommandType&&(this.curCommandType=je.LINE_TO)):this.curCommandType===je.CURVE_TO?a({type:je.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===je.SMOOTH_CURVE_TO?a({type:je.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.QUAD_TO?a({type:je.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===je.ARC&&a({type:je.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(!IY(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(l)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=je.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=je.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=je.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=je.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=je.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=je.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=je.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=je.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+i+".");this.curCommandType=je.ARC,this.curCommandRelative=s==="a"}else A.push({type:je.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return A},e.prototype.transform=function(r){return Object.create(this,{parse:{value:function(A,n){n===void 0&&(n=[]);for(var a=0,i=Object.getPrototypeOf(this).parse.call(this,A);a<i.length;a++){var s=i[a],o=r(s);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return n}}})},e}(K4),je=function(t){function e(r){var A=t.call(this)||this;return A.commands=typeof r=="string"?e.parse(r):r,A}return D4(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var r=Wr.CALCULATE_BOUNDS();return this.transform(r),r},e.prototype.transform=function(r){for(var A=[],n=0,a=this.commands;n<a.length;n++){var i=r(a[n]);Array.isArray(i)?A.push.apply(A,i):A.push(i)}return this.commands=A,this},e.encode=function(r){return NY(r)},e.parse=function(r){var A=new LY,n=[];return A.parse(r,n),A.finish(n),n},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(K4),kY=((ta={})[je.MOVE_TO]=2,ta[je.LINE_TO]=2,ta[je.HORIZ_LINE_TO]=1,ta[je.VERT_LINE_TO]=1,ta[je.CLOSE_PATH]=0,ta[je.QUAD_TO]=4,ta[je.SMOOTH_QUAD_TO]=2,ta[je.CURVE_TO]=6,ta[je.SMOOTH_CURVE_TO]=4,ta[je.ARC]=7,ta),QY=yA,OY=Zn,DY=qu,PY=wC,j4=RegExp.prototype,MY=function(t){var e=t.flags;return e===void 0&&!("flags"in j4)&&!OY(t,"flags")&&DY(j4,t)?QY(PY,t):e},RY=Ah.PROPER,HY=xs,VY=IA,z4=Sa,KY=Mr,GY=MY,Dp="toString",jY=RegExp.prototype,W4=jY[Dp],zY=KY(function(){return W4.call({source:"a",flags:"b"})!="/a/b"}),WY=RY&&W4.name!=Dp;(zY||WY)&&HY(RegExp.prototype,Dp,function(){var e=VY(this),r=z4(e.source),A=z4(GY(e));return"/"+r+"/"+A},{unsafe:!0});function kh(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?kh=function(e){return typeof e}:kh=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kh(t)}function XY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var $Y=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],qY=[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 YY(t,e,r,A,n){if(typeof t=="string"&&(t=document.getElementById(t)),!t||kh(t)!=="object"||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=t.getContext("2d");try{return a.getImageData(e,r,A,n)}catch(i){throw new Error("unable to access image data: "+i)}}function JY(t,e,r,A,n,a){if(!(isNaN(a)||a<1)){a|=0;var i=YY(t,e,r,A,n);i=ZY(i,e,r,A,n,a),t.getContext("2d").putImageData(i,e,r)}}function ZY(t,e,r,A,n,a){for(var i=t.data,s=2*a+1,o=A-1,l=n-1,c=a+1,d=c*(c+1)/2,g=new X4,h=g,p,v=1;v<s;v++)h=h.next=new X4,v===c&&(p=h);h.next=g;for(var y=null,C=null,b=0,F=0,O=$Y[a],W=qY[a],X=0;X<n;X++){h=g;for(var k=i[F],Q=i[F+1],K=i[F+2],re=i[F+3],U=0;U<c;U++)h.r=k,h.g=Q,h.b=K,h.a=re,h=h.next;for(var T=0,H=0,Y=0,le=0,pe=c*k,me=c*Q,ve=c*K,se=c*re,J=d*k,oe=d*Q,B=d*K,_=d*re,S=1;S<c;S++){var N=F+((o<S?o:S)<<2),G=i[N],ie=i[N+1],ce=i[N+2],fe=i[N+3],xe=c-S;J+=(h.r=G)*xe,oe+=(h.g=ie)*xe,B+=(h.b=ce)*xe,_+=(h.a=fe)*xe,T+=G,H+=ie,Y+=ce,le+=fe,h=h.next}y=g,C=p;for(var Ie=0;Ie<A;Ie++){var Me=_*O>>W;if(i[F+3]=Me,Me!==0){var Xe=255/Me;i[F]=(J*O>>W)*Xe,i[F+1]=(oe*O>>W)*Xe,i[F+2]=(B*O>>W)*Xe}else i[F]=i[F+1]=i[F+2]=0;J-=pe,oe-=me,B-=ve,_-=se,pe-=y.r,me-=y.g,ve-=y.b,se-=y.a;var $e=Ie+a+1;$e=b+($e<o?$e:o)<<2,T+=y.r=i[$e],H+=y.g=i[$e+1],Y+=y.b=i[$e+2],le+=y.a=i[$e+3],J+=T,oe+=H,B+=Y,_+=le,y=y.next;var Te=C,ne=Te.r,Qe=Te.g,rt=Te.b,Re=Te.a;pe+=ne,me+=Qe,ve+=rt,se+=Re,T-=ne,H-=Qe,Y-=rt,le-=Re,C=C.next,F+=4}b+=A}for(var ze=0;ze<A;ze++){F=ze<<2;var Ye=i[F],Je=i[F+1],st=i[F+2],nt=i[F+3],ht=c*Ye,vt=c*Je,_t=c*st,Ut=c*nt,dt=d*Ye,xt=d*Je,tt=d*st,nr=d*nt;h=g;for(var Nt=0;Nt<c;Nt++)h.r=Ye,h.g=Je,h.b=st,h.a=nt,h=h.next;for(var fr=A,kt=0,Kt=0,$r=0,Pt=0,br=1;br<=a;br++){F=fr+ze<<2;var $t=c-br;dt+=(h.r=Ye=i[F])*$t,xt+=(h.g=Je=i[F+1])*$t,tt+=(h.b=st=i[F+2])*$t,nr+=(h.a=nt=i[F+3])*$t,Pt+=Ye,kt+=Je,Kt+=st,$r+=nt,h=h.next,br<l&&(fr+=A)}F=ze,y=g,C=p;for(var rA=0;rA<n;rA++){var Et=F<<2;i[Et+3]=nt=nr*O>>W,nt>0?(nt=255/nt,i[Et]=(dt*O>>W)*nt,i[Et+1]=(xt*O>>W)*nt,i[Et+2]=(tt*O>>W)*nt):i[Et]=i[Et+1]=i[Et+2]=0,dt-=ht,xt-=vt,tt-=_t,nr-=Ut,ht-=y.r,vt-=y.g,_t-=y.b,Ut-=y.a,Et=ze+((Et=rA+c)<l?Et:l)*A<<2,dt+=Pt+=y.r=i[Et],xt+=kt+=y.g=i[Et+1],tt+=Kt+=y.b=i[Et+2],nr+=$r+=y.a=i[Et+3],y=y.next,ht+=Ye=C.r,vt+=Je=C.g,_t+=st=C.b,Ut+=nt=C.a,Pt-=Ye,kt-=Je,Kt-=st,$r-=nt,C=C.next,F+=A}}return t}var X4=function t(){XY(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function eJ(){var{DOMParser:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas(r,A){return new OffscreenCanvas(r,A)},createImage(r){return Xa(function*(){var A=yield fetch(r),n=yield A.blob(),a=yield createImageBitmap(n);return a})()}};return(typeof DOMParser<"u"||typeof t>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function tJ(t){var{DOMParser:e,canvas:r,fetch:A}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:A,createCanvas:r.createCanvas,createImage:r.loadImage}}var rJ=Object.freeze({__proto__:null,offscreen:eJ,node:tJ});function _s(t){return t.replace(/(?!\u3000)\s+/gm," ")}function $4(t){return t.replace(/^[\n \t]+/,"")}function q4(t){return t.replace(/[\n \t]+$/,"")}function en(t){var e=(t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var AJ=/^[A-Z-]+$/;function Y4(t){return AJ.test(t)?t.toLowerCase():t}function Pp(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function J4(t){if(!t.startsWith("rgb"))return t;var e=3,r=t.replace(/\d+(\.\d+)?/g,(A,n)=>e--&&n?String(Math.round(parseFloat(A))):A);return r}var nJ=/(\[[^\]]+\])/g,aJ=/(#[^\s+>~.[:]+)/g,iJ=/(\.[^\s+>~.[:]+)/g,sJ=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,oJ=/(:[\w-]+\([^)]*\))/gi,lJ=/(:[^\s+>~.[:]+)/g,cJ=/([^\s+>~.[:]+)/g;function Ts(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function Z4(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),A=0;return[r,A]=Ts(r,nJ),e[1]+=A,[r,A]=Ts(r,aJ),e[0]+=A,[r,A]=Ts(r,iJ),e[1]+=A,[r,A]=Ts(r,sJ),e[2]+=A,[r,A]=Ts(r,oJ),e[1]+=A,[r,A]=Ts(r,lJ),e[1]+=A,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,A]=Ts(r,cJ),e[2]+=A,e.join("")}var Us=1e-8;function Mp(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Qh(t,e){return(t[0]*e[0]+t[1]*e[1])/(Mp(t)*Mp(e))}function Rp(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Qh(t,e))}function Hp(t){return t*t*t}function Vp(t){return 3*t*t*(1-t)}function Kp(t){return 3*t*(1-t)*(1-t)}function Gp(t){return(1-t)*(1-t)*(1-t)}function jp(t){return t*t}function zp(t){return 2*t*(1-t)}function Wp(t){return(1-t)*(1-t)}class pt{constructor(e,r,A){this.document=e,this.name=r,this.value=A,this.isNormalizedColor=!1}static empty(e){return new pt(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:r,name:A}=this;return _s(this.getString()).trim().split(e).map(n=>new pt(r,A,n))}hasValue(e){var{value:r}=this;return r!==null&&r!==""&&(e||r!==0)&&typeof r<"u"}isString(e){var{value:r}=this,A=typeof r=="string";return!A||!e?A:e.test(r)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var 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>"u"?0:parseFloat(e);var{value:r}=this,A=parseFloat(r);return this.isString(/%$/)&&(A/=100),A}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var r=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=J4(r),this.value=r),r}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[A,n]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:a}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&n):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*a.computeSize(A);default:{var i=this.getNumber();return r&&i<1?i*a.computeSize(A):i}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3: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(){var e=this.getString(),r=/#([^)'"]+)/.exec(e);return r&&(r=r[1]),r||(r=e),this.document.definitions[r]}getFillStyleDefinition(e,r){var A=this.getDefinition();if(!A)return null;if(typeof A.createGradient=="function")return A.createGradient(this.document.ctx,e,r);if(typeof A.createPattern=="function"){if(A.getHrefAttribute().hasValue()){var n=A.getAttribute("patternTransform");A=A.getHrefAttribute().getDefinition(),n.hasValue()&&A.getAttribute("patternTransform",!0).setValue(n.value)}return A.createPattern(this.document.ctx,e,r)}return null}getTextBaseline(){return this.hasValue()?pt.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var r=this.getColor(),A=r.length,n=0,a=0;a<A&&(r[a]===","&&n++,n!==3);a++);if(e.hasValue()&&this.isString()&&n!==3){var i=new Lp(r);i.ok&&(i.alpha=e.getNumber(),r=i.toRGBA())}return new pt(this.document,this.name,r)}}pt.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"};class eb{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,r){this.viewPorts.push({width:e,height:r})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Ur{constructor(e,r){this.x=e,this.y=r}static parse(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[A=r,n=r]=en(e);return new Ur(A,n)}static parseScale(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[A=r,n=A]=en(e);return new Ur(A,n)}static parsePath(e){for(var r=en(e),A=r.length,n=[],a=0;a<A;a+=2)n.push(new Ur(r[a],r[a+1]));return n}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:r,y:A}=this,n=r*e[0]+A*e[2]+e[4],a=r*e[1]+A*e[3]+e[5];this.x=n,this.y=a}}class tb{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:r,onMouseMove:A}=this,n=e.ctx.canvas;n.onclick=r,n.onmousemove=A,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:r,eventElements:A}=this,{style:n}=e.ctx.canvas;n&&(n.cursor=""),r.forEach((a,i)=>{for(var{run:s}=a,o=A[i];o;)s(o),o=o.parent}),this.events=[],this.eventElements=[]}}checkPath(e,r){if(!(!this.working||!r)){var{events:A,eventElements:n}=this;A.forEach((a,i)=>{var{x:s,y:o}=a;!n[i]&&r.isPointInPath&&r.isPointInPath(s,o)&&(n[i]=e)})}}checkBoundingBox(e,r){if(!(!this.working||!r)){var{events:A,eventElements:n}=this;A.forEach((a,i)=>{var{x:s,y:o}=a;!n[i]&&r.isPointInBox(s,o)&&(n[i]=e)})}}mapXY(e,r){for(var{window:A,ctx:n}=this.screen,a=new Ur(e,r),i=n.canvas;i;)a.x-=i.offsetLeft,a.y-=i.offsetTop,i=i.offsetParent;return A.scrollX&&(a.x+=A.scrollX),A.scrollY&&(a.y+=A.scrollY),a}onClick(e){var{x:r,y:A}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:r,y:A,run(n){n.onClick&&n.onClick()}})}onMouseMove(e){var{x:r,y:A}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:r,y:A,run(n){n.onMouseMove&&n.onMouseMove()}})}}var rb=typeof window<"u"?window:null,Ab=typeof fetch<"u"?fetch.bind(void 0):null;class bc{constructor(e){var{fetch:r=Ab,window:A=rb}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new eb,this.mouse=new tb(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=A,this.fetch=r}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(r=>r());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){var{document:r,ctx:A,aspectRatio:n,width:a,desiredWidth:i,height:s,desiredHeight:o,minX:l=0,minY:c=0,refX:d,refY:g,clip:h=!1,clipX:p=0,clipY:v=0}=e,y=_s(n).replace(/^defer\s/,""),[C,b]=y.split(" "),F=C||"xMidYMid",O=b||"meet",W=a/i,X=s/o,k=Math.min(W,X),Q=Math.max(W,X),K=i,re=o;O==="meet"&&(K*=k,re*=k),O==="slice"&&(K*=Q,re*=Q);var U=new pt(r,"refX",d),T=new pt(r,"refY",g),H=U.hasValue()&&T.hasValue();if(H&&A.translate(-k*U.getPixels("x"),-k*T.getPixels("y")),h){var Y=k*p,le=k*v;A.beginPath(),A.moveTo(Y,le),A.lineTo(a,le),A.lineTo(a,s),A.lineTo(Y,s),A.closePath(),A.clip()}if(!H){var pe=O==="meet"&&k===X,me=O==="slice"&&Q===X,ve=O==="meet"&&k===W,se=O==="slice"&&Q===W;F.startsWith("xMid")&&(pe||me)&&A.translate(a/2-K/2,0),F.endsWith("YMid")&&(ve||se)&&A.translate(0,s/2-re/2),F.startsWith("xMax")&&(pe||me)&&A.translate(a-K,0),F.endsWith("YMax")&&(ve||se)&&A.translate(0,s-re)}switch(!0){case F==="none":A.scale(W,X);break;case O==="meet":A.scale(k,k);break;case O==="slice":A.scale(Q,Q);break}A.translate(-l,-c)}start(e){var{enableRedraw:r=!1,ignoreMouse:A=!1,ignoreAnimation:n=!1,ignoreDimensions:a=!1,ignoreClear:i=!1,forceRedraw:s,scaleWidth:o,scaleHeight:l,offsetX:c,offsetY:d}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:g,mouse:h}=this,p=1e3/g;if(this.frameDuration=p,this.readyPromise=new Promise(F=>{this.resolveReady=F}),this.isReady()&&this.render(e,a,i,o,l,c,d),!!r){var v=Date.now(),y=v,C=0,b=()=>{v=Date.now(),C=v-y,C>=p&&(y=v-C%p,this.shouldUpdate(n,s)&&(this.render(e,a,i,o,l,c,d),h.runEvents())),this.intervalId=Up(b)};A||h.start(),this.intervalId=Up(b)}}stop(){this.intervalId&&(Up.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,r){if(!e){var{frameDuration:A}=this,n=this.animations.reduce((a,i)=>i.update(A)||a,!1);if(n)return!0}return!!(typeof r=="function"&&r()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,r,A,n,a,i,s){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:l,viewPort:c,ctx:d,isFirstRender:g}=this,h=d.canvas;c.clear(),h.width&&h.height?c.setCurrent(h.width,h.height):c.setCurrent(o,l);var p=e.getStyle("width"),v=e.getStyle("height");!r&&(g||typeof n!="number"&&typeof a!="number")&&(p.hasValue()&&(h.width=p.getPixels("x"),h.style&&(h.style.width="".concat(h.width,"px"))),v.hasValue()&&(h.height=v.getPixels("y"),h.style&&(h.style.height="".concat(h.height,"px"))));var y=h.clientWidth||h.width,C=h.clientHeight||h.height;if(r&&p.hasValue()&&v.hasValue()&&(y=p.getPixels("x"),C=v.getPixels("y")),c.setCurrent(y,C),typeof i=="number"&&e.getAttribute("x",!0).setValue(i),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof n=="number"||typeof a=="number"){var b=en(e.getAttribute("viewBox").getString()),F=0,O=0;if(typeof n=="number"){var W=e.getStyle("width");W.hasValue()?F=W.getPixels("x")/n:isNaN(b[2])||(F=b[2]/n)}if(typeof a=="number"){var X=e.getStyle("height");X.hasValue()?O=X.getPixels("y")/a:isNaN(b[3])||(O=b[3]/a)}F||(F=O),O||(O=F),e.getAttribute("width",!0).setValue(n),e.getAttribute("height",!0).setValue(a);var k=e.getStyle("transform",!0,!0);k.setValue("".concat(k.getString()," scale(").concat(1/F,", ").concat(1/O,")"))}A||d.clearRect(0,0,y,C),e.render(d),g&&(this.isFirstRender=!1)}}bc.defaultWindow=rb,bc.defaultFetch=Ab;var{defaultFetch:fJ}=bc,uJ=typeof DOMParser<"u"?DOMParser:null;class Oh{constructor(){var{fetch:e=fJ,DOMParser:r=uJ}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=r}parse(e){var r=this;return Xa(function*(){return e.startsWith("<")?r.parseFromString(e):r.load(e)})()}parseFromString(e){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(r.parseFromString(e,"text/xml"))}}checkDocument(e){var r=e.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return e}load(e){var r=this;return Xa(function*(){var A=yield r.fetch(e),n=yield A.text();return r.parseFromString(n)})()}}class nb{constructor(e,r){this.type="translate",this.point=null,this.point=Ur.parse(r)}apply(e){var{x:r,y:A}=this.point;e.translate(r||0,A||0)}unapply(e){var{x:r,y:A}=this.point;e.translate(-1*r||0,-1*A||0)}applyToPoint(e){var{x:r,y:A}=this.point;e.applyTransform([1,0,0,1,r||0,A||0])}}class ab{constructor(e,r,A){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var n=en(r);this.angle=new pt(e,"angle",n[0]),this.originX=A[0],this.originY=A[1],this.cx=n[1]||0,this.cy=n[2]||0}apply(e){var{cx:r,cy:A,originX:n,originY:a,angle:i}=this,s=r+n.getPixels("x"),o=A+a.getPixels("y");e.translate(s,o),e.rotate(i.getRadians()),e.translate(-s,-o)}unapply(e){var{cx:r,cy:A,originX:n,originY:a,angle:i}=this,s=r+n.getPixels("x"),o=A+a.getPixels("y");e.translate(s,o),e.rotate(-1*i.getRadians()),e.translate(-s,-o)}applyToPoint(e){var{cx:r,cy:A,angle:n}=this,a=n.getRadians();e.applyTransform([1,0,0,1,r||0,A||0]),e.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]),e.applyTransform([1,0,0,1,-r||0,-A||0])}}class ib{constructor(e,r,A){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var n=Ur.parseScale(r);(n.x===0||n.y===0)&&(n.x=Us,n.y=Us),this.scale=n,this.originX=A[0],this.originY=A[1]}apply(e){var{scale:{x:r,y:A},originX:n,originY:a}=this,i=n.getPixels("x"),s=a.getPixels("y");e.translate(i,s),e.scale(r,A||r),e.translate(-i,-s)}unapply(e){var{scale:{x:r,y:A},originX:n,originY:a}=this,i=n.getPixels("x"),s=a.getPixels("y");e.translate(i,s),e.scale(1/r,1/A||r),e.translate(-i,-s)}applyToPoint(e){var{x:r,y:A}=this.scale;e.applyTransform([r||0,0,0,A||0,0,0])}}class Xp{constructor(e,r,A){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=en(r),this.originX=A[0],this.originY=A[1]}apply(e){var{originX:r,originY:A,matrix:n}=this,a=r.getPixels("x"),i=A.getPixels("y");e.translate(a,i),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),e.translate(-a,-i)}unapply(e){var{originX:r,originY:A,matrix:n}=this,a=n[0],i=n[2],s=n[4],o=n[1],l=n[3],c=n[5],d=0,g=0,h=1,p=1/(a*(l*h-c*g)-i*(o*h-c*d)+s*(o*g-l*d)),v=r.getPixels("x"),y=A.getPixels("y");e.translate(v,y),e.transform(p*(l*h-c*g),p*(c*d-o*h),p*(s*g-i*h),p*(a*h-s*d),p*(i*c-s*l),p*(s*o-a*c)),e.translate(-v,-y)}applyToPoint(e){e.applyTransform(this.matrix)}}class $p extends Xp{constructor(e,r,A){super(e,r,A),this.type="skew",this.angle=null,this.angle=new pt(e,"angle",r)}}class sb extends $p{constructor(e,r,A){super(e,r,A),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class ob extends $p{constructor(e,r,A){super(e,r,A),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function hJ(t){return _s(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function dJ(t){var[e,r]=t.split("(");return[e.trim(),r.trim().replace(")","")]}class ki{constructor(e,r,A){this.document=e,this.transforms=[];var n=hJ(r);n.forEach(a=>{if(a!=="none"){var[i,s]=dJ(a),o=ki.transformTypes[i];typeof o<"u"&&this.transforms.push(new o(this.document,s,A))}})}static fromElement(e,r){var A=r.getStyle("transform",!1,!0),[n,a=n]=r.getStyle("transform-origin",!1,!0).split(),i=[n,a];return A.hasValue()?new ki(e,A.getString(),i):null}apply(e){for(var{transforms:r}=this,A=r.length,n=0;n<A;n++)r[n].apply(e)}unapply(e){for(var{transforms:r}=this,A=r.length,n=A-1;n>=0;n--)r[n].unapply(e)}applyToPoint(e){for(var{transforms:r}=this,A=r.length,n=0;n<A;n++)r[n].applyToPoint(e)}}ki.transformTypes={translate:nb,rotate:ab,scale:ib,matrix:Xp,skewX:sb,skewY:ob};class dr{constructor(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=r,this.captureTextNodes=A,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!r||r.nodeType!==1)){if(Array.from(r.attributes).forEach(s=>{var o=Y4(s.nodeName);this.attributes[o]=new pt(e,o,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var n=this.getAttribute("style").getString().split(";").map(s=>s.trim());n.forEach(s=>{if(s){var[o,l]=s.split(":").map(c=>c.trim());this.styles[o]=new pt(e,o,l)}})}var{definitions:a}=e,i=this.getAttribute("id");i.hasValue()&&(a[i.getString()]||(a[i.getString()]=this)),Array.from(r.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(A&&(s.nodeType===3||s.nodeType===4)){var o=e.createTextNode(s);o.getText().length>0&&this.addChild(o)}})}}getAttribute(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=this.attributes[e];if(!A&&r){var n=new pt(this.document,e,"");return this.attributes[e]=n,n}return A||pt.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return pt.empty(this.document)}getStyle(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.styles[e];if(n)return n;var a=this.getAttribute(e);if(a!=null&&a.hasValue())return this.styles[e]=a,a;if(!A){var{parent:i}=this;if(i){var s=i.getStyle(e);if(s!=null&&s.hasValue())return s}}if(r){var o=new pt(this.document,e,"");return this.styles[e]=o,o}return n||pt.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var A=this.getStyle("filter").getDefinition();A&&(this.applyEffects(e),A.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var r=ki.fromElement(this.document,this);r&&r.apply(e);var A=this.getStyle("clip-path",!1,!0);if(A.hasValue()){var n=A.getDefinition();n&&n.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(r=>{r.render(e)})}addChild(e){var r=e instanceof dr?e:this.document.createElement(e);r.parent=this,dr.ignoreChildTypes.includes(r.type)||this.children.push(r)}matchesSelector(e){var r,{node:A}=this;if(typeof A.matches=="function")return A.matches(e);var n=(r=A.getAttribute)===null||r===void 0?void 0:r.call(A,"class");return!n||n===""?!1:n.split(" ").some(a=>".".concat(a)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:r}=this.document;for(var A in e)if(!A.startsWith("@")&&this.matchesSelector(A)){var n=e[A],a=r[A];if(n)for(var i in n){var s=this.stylesSpecificity[i];typeof s>"u"&&(s="000"),a>=s&&(this.styles[i]=n[i],this.stylesSpecificity[i]=a)}}}removeStyles(e,r){var A=r.reduce((n,a)=>{var i=e.getStyle(a);if(!i.hasValue())return n;var s=i.getString();return i.setValue(""),[...n,[a,s]]},[]);return A}restoreStyles(e,r){r.forEach(A=>{var[n,a]=A;e.getStyle(n,!0).setValue(a)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}dr.ignoreChildTypes=["title"];class lb extends dr{constructor(e,r,A){super(e,r,A)}}function gJ(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function pJ(t){return typeof process>"u"?t:t.trim().split(",").map(gJ).join(",")}function mJ(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function vJ(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class LA{constructor(e,r,A,n,a,i){var s=i?typeof i=="string"?LA.parse(i):i:{};this.fontFamily=a||s.fontFamily,this.fontSize=n||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=A||s.fontWeight,this.fontVariant=r||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,A="",n="",a="",i="",s="",o=_s(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(c=>{switch(!0){case(!l.fontStyle&&LA.styles.includes(c)):c!=="inherit"&&(A=c),l.fontStyle=!0;break;case(!l.fontVariant&&LA.variants.includes(c)):c!=="inherit"&&(n=c),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&LA.weights.includes(c)):c!=="inherit"&&(a=c),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:c!=="inherit"&&([i]=c.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:c!=="inherit"&&(s+=c)}}),new LA(A,n,a,i,s,r)}toString(){return[mJ(this.fontStyle),this.fontVariant,vJ(this.fontWeight),this.fontSize,pJ(this.fontFamily)].join(" ").trim()}}LA.styles="normal|italic|oblique|inherit",LA.variants="normal|small-caps|inherit",LA.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Nn{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=r,this.x2=A,this.y2=n,this.addPoint(e,r),this.addPoint(A,n)}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(e,r){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:r,y1:A,x2:n,y2:a}=e;this.addPoint(r,A),this.addPoint(n,a)}}sumCubic(e,r,A,n,a){return Math.pow(1-e,3)*r+3*Math.pow(1-e,2)*e*A+3*(1-e)*Math.pow(e,2)*n+Math.pow(e,3)*a}bezierCurveAdd(e,r,A,n,a){var i=6*r-12*A+6*n,s=-3*r+9*A-9*n+3*a,o=3*A-3*r;if(s===0){if(i===0)return;var l=-o/i;0<l&&l<1&&(e?this.addX(this.sumCubic(l,r,A,n,a)):this.addY(this.sumCubic(l,r,A,n,a)));return}var c=Math.pow(i,2)-4*o*s;if(!(c<0)){var d=(-i+Math.sqrt(c))/(2*s);0<d&&d<1&&(e?this.addX(this.sumCubic(d,r,A,n,a)):this.addY(this.sumCubic(d,r,A,n,a)));var g=(-i-Math.sqrt(c))/(2*s);0<g&&g<1&&(e?this.addX(this.sumCubic(g,r,A,n,a)):this.addY(this.sumCubic(g,r,A,n,a)))}}addBezierCurve(e,r,A,n,a,i,s,o){this.addPoint(e,r),this.addPoint(s,o),this.bezierCurveAdd(!0,e,A,a,s),this.bezierCurveAdd(!1,r,n,i,o)}addQuadraticCurve(e,r,A,n,a,i){var s=e+.6666666666666666*(A-e),o=r+2/3*(n-r),l=s+1/3*(a-e),c=o+1/3*(i-r);this.addBezierCurve(e,r,s,l,o,c,a,i)}isPointInBox(e,r){var{x1:A,y1:n,x2:a,y2:i}=this;return A<=e&&e<=a&&n<=r&&r<=i}}class Tt extends je{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Ur(0,0),this.control=new Ur(0,0),this.current=new Ur(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:r}=this;return e>=r.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",A=new Ur(this.command[e],this.command[r]);return this.makeAbsolute(A)}getAsControlPoint(e,r){var A=this.getPoint(e,r);return this.control=A,A}getAsCurrentPoint(e,r){var A=this.getPoint(e,r);return this.current=A,A}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==je.CURVE_TO&&e!==je.SMOOTH_CURVE_TO&&e!==je.QUAD_TO&&e!==je.SMOOTH_QUAD_TO)return this.current;var{current:{x:r,y:A},control:{x:n,y:a}}=this,i=new Ur(2*r-n,2*A-a);return i}makeAbsolute(e){if(this.command.relative){var{x:r,y:A}=this.current;e.x+=r,e.y+=A}return e}addMarker(e,r,A){var{points:n,angles:a}=this;A&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=n[n.length-1].angleTo(A)),this.addMarkerAngle(e,r?r.angleTo(e):null)}addMarkerAngle(e,r){this.points.push(e),this.angles.push(r)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,r=e.length,A=0;A<r;A++)if(!e[A]){for(var n=A+1;n<r;n++)if(e[n]){e[A]=e[n];break}}return e}}class Qi extends dr{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,r=this;r;){var A=r.getStyle("opacity",!1,!0);A.hasValue(!0)&&(e*=A.getNumber()),r=r.parent}return e}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r){var A=this.getStyle("fill"),n=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(A.isUrlDefinition()){var s=A.getFillStyleDefinition(this,n);s&&(e.fillStyle=s)}else if(A.hasValue()){A.getString()==="currentColor"&&A.setValue(this.getStyle("color").getColor());var o=A.getColor();o!=="inherit"&&(e.fillStyle=o==="none"?"rgba(0,0,0,0)":o)}if(n.hasValue()){var l=new pt(this.document,"fill",e.fillStyle).addOpacity(n).getColor();e.fillStyle=l}if(a.isUrlDefinition()){var c=a.getFillStyleDefinition(this,i);c&&(e.strokeStyle=c)}else if(a.hasValue()){a.getString()==="currentColor"&&a.setValue(this.getStyle("color").getColor());var d=a.getString();d!=="inherit"&&(e.strokeStyle=d==="none"?"rgba(0,0,0,0)":d)}if(i.hasValue()){var g=new pt(this.document,"stroke",e.strokeStyle).addOpacity(i).getString();e.strokeStyle=g}var h=this.getStyle("stroke-width");if(h.hasValue()){var p=h.getPixels();e.lineWidth=p||Us}var v=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),C=this.getStyle("stroke-miterlimit"),b=this.getStyle("stroke-dasharray"),F=this.getStyle("stroke-dashoffset");if(v.hasValue()&&(e.lineCap=v.getString()),y.hasValue()&&(e.lineJoin=y.getString()),C.hasValue()&&(e.miterLimit=C.getNumber()),b.hasValue()&&b.getString()!=="none"){var O=en(b.getString());typeof e.setLineDash<"u"?e.setLineDash(O):typeof e.webkitLineDash<"u"?e.webkitLineDash=O:typeof e.mozDash<"u"&&!(O.length===1&&O[0]===0)&&(e.mozDash=O);var W=F.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=W:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=W:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=W)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var X=this.getStyle("font"),k=this.getStyle("font-style"),Q=this.getStyle("font-variant"),K=this.getStyle("font-weight"),re=this.getStyle("font-size"),U=this.getStyle("font-family"),T=new LA(k.getString(),Q.getString(),K.getString(),re.hasValue()?"".concat(re.getPixels(!0),"px"):"",U.getString(),LA.parse(X.getString(),e.font));k.setValue(T.fontStyle),Q.setValue(T.fontVariant),K.setValue(T.fontWeight),re.setValue(T.fontSize),U.setValue(T.fontFamily),e.font=T.toString(),re.isPixels()&&(this.document.emSize=re.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class Zt extends Qi{constructor(e,r,A){super(e,r,A),this.type="path",this.pathParser=null,this.pathParser=new Tt(this.getAttribute("d").getString())}path(e){var{pathParser:r}=this,A=new Nn;for(r.reset(),e&&e.beginPath();!r.isEnd();)switch(r.next().type){case Tt.MOVE_TO:this.pathM(e,A);break;case Tt.LINE_TO:this.pathL(e,A);break;case Tt.HORIZ_LINE_TO:this.pathH(e,A);break;case Tt.VERT_LINE_TO:this.pathV(e,A);break;case Tt.CURVE_TO:this.pathC(e,A);break;case Tt.SMOOTH_CURVE_TO:this.pathS(e,A);break;case Tt.QUAD_TO:this.pathQ(e,A);break;case Tt.SMOOTH_QUAD_TO:this.pathT(e,A);break;case Tt.ARC:this.pathA(e,A);break;case Tt.CLOSE_PATH:this.pathZ(e,A);break}return A}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,r=e.getMarkerPoints(),A=e.getMarkerAngles(),n=r.map((a,i)=>[a,A[i]]);return n}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var r=this.getStyle("fill-rule");e.fillStyle!==""&&(r.getString("inherit")!=="inherit"?e.fill(r.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var A=this.getMarkers();if(A){var n=A.length-1,a=this.getStyle("marker-start"),i=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(a.isUrlDefinition()){var o=a.getDefinition(),[l,c]=A[0];o.render(e,l,c)}if(i.isUrlDefinition())for(var d=i.getDefinition(),g=1;g<n;g++){var[h,p]=A[g];d.render(e,h,p)}if(s.isUrlDefinition()){var v=s.getDefinition(),[y,C]=A[n];v.render(e,y,C)}}}static pathM(e){var r=e.getAsCurrentPoint();return e.start=e.current,{point:r}}pathM(e,r){var{pathParser:A}=this,{point:n}=Zt.pathM(A),{x:a,y:i}=n;A.addMarker(n),r.addPoint(a,i),e&&e.moveTo(a,i)}static pathL(e){var{current:r}=e,A=e.getAsCurrentPoint();return{current:r,point:A}}pathL(e,r){var{pathParser:A}=this,{current:n,point:a}=Zt.pathL(A),{x:i,y:s}=a;A.addMarker(a,n),r.addPoint(i,s),e&&e.lineTo(i,s)}static pathH(e){var{current:r,command:A}=e,n=new Ur((A.relative?r.x:0)+A.x,r.y);return e.current=n,{current:r,point:n}}pathH(e,r){var{pathParser:A}=this,{current:n,point:a}=Zt.pathH(A),{x:i,y:s}=a;A.addMarker(a,n),r.addPoint(i,s),e&&e.lineTo(i,s)}static pathV(e){var{current:r,command:A}=e,n=new Ur(r.x,(A.relative?r.y:0)+A.y);return e.current=n,{current:r,point:n}}pathV(e,r){var{pathParser:A}=this,{current:n,point:a}=Zt.pathV(A),{x:i,y:s}=a;A.addMarker(a,n),r.addPoint(i,s),e&&e.lineTo(i,s)}static pathC(e){var{current:r}=e,A=e.getPoint("x1","y1"),n=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:r,point:A,controlPoint:n,currentPoint:a}}pathC(e,r){var{pathParser:A}=this,{current:n,point:a,controlPoint:i,currentPoint:s}=Zt.pathC(A);A.addMarker(s,i,a),r.addBezierCurve(n.x,n.y,a.x,a.y,i.x,i.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,i.x,i.y,s.x,s.y)}static pathS(e){var{current:r}=e,A=e.getReflectedControlPoint(),n=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:r,point:A,controlPoint:n,currentPoint:a}}pathS(e,r){var{pathParser:A}=this,{current:n,point:a,controlPoint:i,currentPoint:s}=Zt.pathS(A);A.addMarker(s,i,a),r.addBezierCurve(n.x,n.y,a.x,a.y,i.x,i.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,i.x,i.y,s.x,s.y)}static pathQ(e){var{current:r}=e,A=e.getAsControlPoint("x1","y1"),n=e.getAsCurrentPoint();return{current:r,controlPoint:A,currentPoint:n}}pathQ(e,r){var{pathParser:A}=this,{current:n,controlPoint:a,currentPoint:i}=Zt.pathQ(A);A.addMarker(i,a,a),r.addQuadraticCurve(n.x,n.y,a.x,a.y,i.x,i.y),e&&e.quadraticCurveTo(a.x,a.y,i.x,i.y)}static pathT(e){var{current:r}=e,A=e.getReflectedControlPoint();e.control=A;var n=e.getAsCurrentPoint();return{current:r,controlPoint:A,currentPoint:n}}pathT(e,r){var{pathParser:A}=this,{current:n,controlPoint:a,currentPoint:i}=Zt.pathT(A);A.addMarker(i,a,a),r.addQuadraticCurve(n.x,n.y,a.x,a.y,i.x,i.y),e&&e.quadraticCurveTo(a.x,a.y,i.x,i.y)}static pathA(e){var{current:r,command:A}=e,{rX:n,rY:a,xRot:i,lArcFlag:s,sweepFlag:o}=A,l=i*(Math.PI/180),c=e.getAsCurrentPoint(),d=new Ur(Math.cos(l)*(r.x-c.x)/2+Math.sin(l)*(r.y-c.y)/2,-Math.sin(l)*(r.x-c.x)/2+Math.cos(l)*(r.y-c.y)/2),g=Math.pow(d.x,2)/Math.pow(n,2)+Math.pow(d.y,2)/Math.pow(a,2);g>1&&(n*=Math.sqrt(g),a*=Math.sqrt(g));var h=(s===o?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(a,2)-Math.pow(n,2)*Math.pow(d.y,2)-Math.pow(a,2)*Math.pow(d.x,2))/(Math.pow(n,2)*Math.pow(d.y,2)+Math.pow(a,2)*Math.pow(d.x,2)));isNaN(h)&&(h=0);var p=new Ur(h*n*d.y/a,h*-a*d.x/n),v=new Ur((r.x+c.x)/2+Math.cos(l)*p.x-Math.sin(l)*p.y,(r.y+c.y)/2+Math.sin(l)*p.x+Math.cos(l)*p.y),y=Rp([1,0],[(d.x-p.x)/n,(d.y-p.y)/a]),C=[(d.x-p.x)/n,(d.y-p.y)/a],b=[(-d.x-p.x)/n,(-d.y-p.y)/a],F=Rp(C,b);return Qh(C,b)<=-1&&(F=Math.PI),Qh(C,b)>=1&&(F=0),{currentPoint:c,rX:n,rY:a,sweepFlag:o,xAxisRotation:l,centp:v,a1:y,ad:F}}pathA(e,r){var{pathParser:A}=this,{currentPoint:n,rX:a,rY:i,sweepFlag:s,xAxisRotation:o,centp:l,a1:c,ad:d}=Zt.pathA(A),g=1-s?1:-1,h=c+g*(d/2),p=new Ur(l.x+a*Math.cos(h),l.y+i*Math.sin(h));if(A.addMarkerAngle(p,h-g*Math.PI/2),A.addMarkerAngle(n,h-g*Math.PI),r.addPoint(n.x,n.y),e&&!isNaN(c)&&!isNaN(d)){var v=a>i?a:i,y=a>i?1:a/i,C=a>i?i/a:1;e.translate(l.x,l.y),e.rotate(o),e.scale(y,C),e.arc(0,0,v,c,c+d,!!(1-s)),e.scale(1/y,1/C),e.rotate(-o),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,r){Zt.pathZ(this.pathParser),e&&r.x1!==r.x2&&r.y1!==r.y2&&e.closePath()}}class qp extends Zt{constructor(e,r,A){super(e,r,A),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 Ya extends Qi{constructor(e,r,A){super(e,r,new.target===Ya?!0:A),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,r);var A=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();A&&(e.textBaseline=A)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var r=null;return this.children.forEach((A,n)=>{var a=this.getChildBoundingBox(e,this,this,n);r?r.addBoundingBox(a):r=a}),r}getFontSize(){var{document:e,parent:r}=this,A=LA.parse(e.ctx.font).fontSize,n=r.getStyle("font-size").getNumber(A);return n}getTElementBoundingBox(e){var r=this.getFontSize();return new Nn(this.x,this.y-r,this.x+this.measureText(e),this.y)}getGlyph(e,r,A){var n=r[A],a=null;if(e.isArabic){var i=r.length,s=r[A-1],o=r[A+1],l="isolated";if((A===0||s===" ")&&A<i-1&&o!==" "&&(l="terminal"),A>0&&s!==" "&&A<i-1&&o!==" "&&(l="medial"),A>0&&s!==" "&&(A===i-1||o===" ")&&(l="initial"),typeof e.glyphs[n]<"u"){var c=e.glyphs[n];a=c instanceof qp?c:c[l]}}else a=e.glyphs[n];return a||(a=e.missingGlyph),a}getText(){return""}getTextFromNode(e){var r=e||this.node,A=Array.from(r.parentNode.childNodes),n=A.indexOf(r),a=A.length-1,i=_s(r.textContent||"");return n===0&&(i=$4(i)),n===a&&(i=q4(i)),i}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((A,n)=>{this.renderChild(e,this,this,n)});var{mouse:r}=this.document.screen;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:r,parent:A}=this,n=this.getText(),a=A.getStyle("font-family").getDefinition();if(a){for(var{unitsPerEm:i}=a.fontFace,s=LA.parse(r.ctx.font),o=A.getStyle("font-size").getNumber(s.fontSize),l=A.getStyle("font-style").getString(s.fontStyle),c=o/i,d=a.isRTL?n.split("").reverse().join(""):n,g=en(A.getAttribute("dx").getString()),h=d.length,p=0;p<h;p++){var v=this.getGlyph(a,d,p);e.translate(this.x,this.y),e.scale(c,-c);var y=e.lineWidth;e.lineWidth=e.lineWidth*i/o,l==="italic"&&e.transform(1,0,.4,1,0,0),v.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=y,e.scale(1/c,-1/c),e.translate(-this.x,-this.y),this.x+=o*(v.horizAdvX||a.horizAdvX)/i,typeof g[p]<"u"&&!isNaN(g[p])&&(this.x+=g[p])}return}var{x:C,y:b}=this;e.fillStyle&&e.fillText(n,C,b),e.strokeStyle&&e.strokeText(n,C,b)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],r=e.getStyle("text-anchor").getString("start"),A=!1,n=0;r==="start"&&!A||r==="end"&&A?n=e.x-this.minX:r==="end"&&!A||r==="start"&&A?n=e.x-this.maxX:n=e.x-(this.minX+this.maxX)/2;for(var a=this.textChunkStart;a<this.leafTexts.length;a++)this.leafTexts[a].x+=n;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((r,A)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,A)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,r,A,n){var a=A.children[n];a.children.length>0?a.children.forEach((i,s)=>{r.adjustChildCoordinatesRecursiveCore(e,r,a,s)}):this.adjustChildCoordinates(e,r,A,n)}adjustChildCoordinates(e,r,A,n){var a=A.children[n];if(typeof a.measureText!="function")return a;e.save(),a.setContext(e,!0);var i=a.getAttribute("x"),s=a.getAttribute("y"),o=a.getAttribute("dx"),l=a.getAttribute("dy"),c=a.getStyle("font-family").getDefinition(),d=!!c&&c.isRTL;n===0&&(i.hasValue()||i.setValue(a.getInheritedAttribute("x")),s.hasValue()||s.setValue(a.getInheritedAttribute("y")),o.hasValue()||o.setValue(a.getInheritedAttribute("dx")),l.hasValue()||l.setValue(a.getInheritedAttribute("dy")));var g=a.measureText(e);return d&&(r.x-=g),i.hasValue()?(r.applyAnchoring(),a.x=i.getPixels("x"),o.hasValue()&&(a.x+=o.getPixels("x"))):(o.hasValue()&&(r.x+=o.getPixels("x")),a.x=r.x),r.x=a.x,d||(r.x+=g),s.hasValue()?(a.y=s.getPixels("y"),l.hasValue()&&(a.y+=l.getPixels("y"))):(l.hasValue()&&(r.y+=l.getPixels("y")),a.y=r.y),r.y=a.y,r.leafTexts.push(a),r.minX=Math.min(r.minX,a.x,a.x+g),r.maxX=Math.max(r.maxX,a.x,a.x+g),a.clearContext(e),e.restore(),a}getChildBoundingBox(e,r,A,n){var a=A.children[n];if(typeof a.getBoundingBox!="function")return null;var i=a.getBoundingBox(e);return i?(a.children.forEach((s,o)=>{var l=r.getChildBoundingBox(e,r,a,o);i.addBoundingBox(l)}),i):null}renderChild(e,r,A,n){var a=A.children[n];a.render(e),a.children.forEach((i,s)=>{r.renderChild(e,r,a,s)})}measureText(e){var{measureCache:r}=this;if(~r)return r;var A=this.getText(),n=this.measureTargetText(e,A);return this.measureCache=n,n}measureTargetText(e,r){if(!r.length)return 0;var{parent:A}=this,n=A.getStyle("font-family").getDefinition();if(n){for(var a=this.getFontSize(),i=n.isRTL?r.split("").reverse().join(""):r,s=en(A.getAttribute("dx").getString()),o=i.length,l=0,c=0;c<o;c++){var d=this.getGlyph(n,i,c);l+=(d.horizAdvX||n.horizAdvX)*a/n.fontFace.unitsPerEm,typeof s[c]<"u"&&!isNaN(s[c])&&(l+=s[c])}return l}if(!e.measureText)return r.length*10;e.save(),this.setContext(e,!0);var{width:g}=e.measureText(r);return this.clearContext(e),e.restore(),g}getInheritedAttribute(e){for(var r=this;r instanceof Ya&&r.isFirstChild();){var A=r.parent.getAttribute(e);if(A.hasValue(!0))return A.getValue("0");r=r.parent}return null}}class Ec extends Ya{constructor(e,r,A){super(e,r,new.target===Ec?!0:A),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class wJ extends Ec{constructor(){super(...arguments),this.type="textNode"}}class Ro extends Qi{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var r,{document:A}=this,{screen:n,window:a}=A,i=e.canvas;if(n.setDefaults(e),i.style&&typeof e.font<"u"&&a&&typeof a.getComputedStyle<"u"){e.font=a.getComputedStyle(i).getPropertyValue("font");var s=new pt(A,"fontSize",LA.parse(e.font).fontSize);s.hasValue()&&(A.rootEmSize=s.getPixels("y"),A.emSize=A.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:o,height:l}=n.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");var c=this.getAttribute("refX"),d=this.getAttribute("refY"),g=this.getAttribute("viewBox"),h=g.hasValue()?en(g.getString()):null,p=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",v=0,y=0,C=0,b=0;h&&(v=h[0],y=h[1]),this.root||(o=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(C=v,b=y,v=0,y=0)),n.viewPort.setCurrent(o,l),this.node&&(!this.parent||((r=this.node.parentNode)===null||r===void 0?void 0:r.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),h&&(o=h[2],l=h[3]),A.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:o,height:n.viewPort.height,desiredHeight:l,minX:v,minY:y,refX:c.getValue(),refY:d.getValue(),clip:p,clipX:C,clipY:b}),h&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(o,l))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.getAttribute("width",!0),a=this.getAttribute("height",!0),i=this.getAttribute("viewBox"),s=this.getAttribute("style"),o=n.getNumber(0),l=a.getNumber(0);if(A)if(typeof A=="string")this.getAttribute("preserveAspectRatio",!0).setValue(A);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(e),a.setValue(r),i.hasValue()||i.setValue("0 0 ".concat(o||e," ").concat(l||r)),s.hasValue()){var d=this.getStyle("width"),g=this.getStyle("height");d.hasValue()&&d.setValue("".concat(e,"px")),g.hasValue()&&g.setValue("".concat(r,"px"))}}}class Yp extends Zt{constructor(){super(...arguments),this.type="rect"}path(e){var r=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),a=this.getStyle("height",!1,!0).getPixels("y"),i=this.getAttribute("rx"),s=this.getAttribute("ry"),o=i.getPixels("x"),l=s.getPixels("y");if(i.hasValue()&&!s.hasValue()&&(l=o),s.hasValue()&&!i.hasValue()&&(o=l),o=Math.min(o,n/2),l=Math.min(l,a/2),e){var c=4*((Math.sqrt(2)-1)/3);e.beginPath(),a>0&&n>0&&(e.moveTo(r+o,A),e.lineTo(r+n-o,A),e.bezierCurveTo(r+n-o+c*o,A,r+n,A+l-c*l,r+n,A+l),e.lineTo(r+n,A+a-l),e.bezierCurveTo(r+n,A+a-l+c*l,r+n-o+c*o,A+a,r+n-o,A+a),e.lineTo(r+o,A+a),e.bezierCurveTo(r+o-c*o,A+a,r,A+a-l+c*l,r,A+a-l),e.lineTo(r,A+l),e.bezierCurveTo(r,A+l-c*l,r+o-c*o,A,r+o,A),e.closePath())}return new Nn(r,A,r+n,A+a)}getMarkers(){return null}}class cb extends Zt{constructor(){super(...arguments),this.type="circle"}path(e){var r=this.getAttribute("cx").getPixels("x"),A=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return e&&n>0&&(e.beginPath(),e.arc(r,A,n,0,Math.PI*2,!1),e.closePath()),new Nn(r-n,A-n,r+n,A+n)}getMarkers(){return null}}class fb extends Zt{constructor(){super(...arguments),this.type="ellipse"}path(e){var r=4*((Math.sqrt(2)-1)/3),A=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y");return e&&A>0&&n>0&&(e.beginPath(),e.moveTo(a+A,i),e.bezierCurveTo(a+A,i+r*n,a+r*A,i+n,a,i+n),e.bezierCurveTo(a-r*A,i+n,a-A,i+r*n,a-A,i),e.bezierCurveTo(a-A,i-r*n,a-r*A,i-n,a,i-n),e.bezierCurveTo(a+r*A,i-n,a+A,i-r*n,a+A,i),e.closePath()),new Nn(a-A,i-n,a+A,i+n)}getMarkers(){return null}}class ub extends Zt{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Ur(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Ur(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:r,y:A},{x:n,y:a}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(r,A),e.lineTo(n,a)),new Nn(r,A,n,a)}getMarkers(){var[e,r]=this.getPoints(),A=e.angleTo(r);return[[e,A],[r,A]]}}class Jp extends Zt{constructor(e,r,A){super(e,r,A),this.type="polyline",this.points=[],this.points=Ur.parsePath(this.getAttribute("points").getString())}path(e){var{points:r}=this,[{x:A,y:n}]=r,a=new Nn(A,n);return e&&(e.beginPath(),e.moveTo(A,n)),r.forEach(i=>{var{x:s,y:o}=i;a.addPoint(s,o),e&&e.lineTo(s,o)}),a}getMarkers(){var{points:e}=this,r=e.length-1,A=[];return e.forEach((n,a)=>{a!==r&&A.push([n,n.angleTo(e[a+1])])}),A.length>0&&A.push([e[e.length-1],A[A.length-1][1]]),A}}class hb extends Jp{constructor(){super(...arguments),this.type="polygon"}path(e){var r=super.path(e),[{x:A,y:n}]=this.points;return e&&(e.lineTo(A,n),e.closePath()),r}}class db extends dr{constructor(){super(...arguments),this.type="pattern"}createPattern(e,r,A){var n=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),i=new Ro(this.document,null);i.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),i.attributes.width=new pt(this.document,"width","".concat(n,"px")),i.attributes.height=new pt(this.document,"height","".concat(a,"px")),i.attributes.transform=new pt(this.document,"transform",this.getAttribute("patternTransform").getValue()),i.children=this.children;var s=this.document.createCanvas(n,a),o=s.getContext("2d"),l=this.getAttribute("x"),c=this.getAttribute("y");l.hasValue()&&c.hasValue()&&o.translate(l.getPixels("x",!0),c.getPixels("y",!0)),A.hasValue()?this.styles["fill-opacity"]=A:Reflect.deleteProperty(this.styles,"fill-opacity");for(var d=-1;d<=1;d++)for(var g=-1;g<=1;g++)o.save(),i.attributes.x=new pt(this.document,"x",d*s.width),i.attributes.y=new pt(this.document,"y",g*s.height),i.render(o),o.restore();var h=e.createPattern(s,"repeat");return h}}class gb extends dr{constructor(){super(...arguments),this.type="marker"}render(e,r,A){if(r){var{x:n,y:a}=r,i=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(n,a),i==="auto"&&e.rotate(A),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var o=new Ro(this.document,null);o.type=this.type,o.attributes.viewBox=new pt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new pt(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new pt(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new pt(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new pt(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new pt(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new pt(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new pt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),i==="auto"&&e.rotate(-A),e.translate(-n,-a)}}}class pb extends dr{constructor(){super(...arguments),this.type="defs"}render(){}}class Dh extends Qi{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var r=new Nn;return this.children.forEach(A=>{r.addBoundingBox(A.getBoundingBox(e))}),r}}class Zp extends dr{constructor(e,r,A){super(e,r,A),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:n,children:a}=this;a.forEach(i=>{i.type==="stop"&&n.push(i)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,r,A){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));var{stops:a}=n,i=this.getGradient(e,r);if(!i)return this.addParentOpacity(A,a[a.length-1].color);if(a.forEach(y=>{i.addColorStop(y.offset,this.addParentOpacity(A,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:o,viewPort:l}=s.screen,[c]=l.viewPorts,d=new Yp(s,null);d.attributes.x=new pt(s,"x",-o/3),d.attributes.y=new pt(s,"y",-o/3),d.attributes.width=new pt(s,"width",o),d.attributes.height=new pt(s,"height",o);var g=new Dh(s,null);g.attributes.transform=new pt(s,"transform",this.getAttribute("gradientTransform").getValue()),g.children=[d];var h=new Ro(s,null);h.attributes.x=new pt(s,"x",0),h.attributes.y=new pt(s,"y",0),h.attributes.width=new pt(s,"width",c.width),h.attributes.height=new pt(s,"height",c.height),h.children=[g];var p=s.createCanvas(c.width,c.height),v=p.getContext("2d");return v.fillStyle=i,h.render(v),v.createPattern(p,"no-repeat")}return i}inheritStopContainer(e){this.attributesToInherit.forEach(r=>{!this.getAttribute(r).hasValue()&&e.getAttribute(r).hasValue()&&this.getAttribute(r,!0).setValue(e.getAttribute(r).getValue())})}addParentOpacity(e,r){if(e.hasValue()){var A=new pt(this.document,"color",r);return A.addOpacity(e).getColor()}return r}}class mb extends Zp{constructor(e,r,A){super(e,r,A),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,r){var A=this.getGradientUnits()==="objectBoundingBox",n=A?r.getBoundingBox(e):null;if(A&&!n)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var a=A?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),i=A?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=A?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=A?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===s&&i===o?null:e.createLinearGradient(a,i,s,o)}}class vb extends Zp{constructor(e,r,A){super(e,r,A),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,r){var A=this.getGradientUnits()==="objectBoundingBox",n=r.getBoundingBox(e);if(A&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var a=A?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),i=A?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=a,o=i;this.getAttribute("fx").hasValue()&&(s=A?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=A?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=A?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,o,c,a,i,l)}}class wb extends dr{constructor(e,r,A){super(e,r,A),this.type="stop";var n=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),a=this.getStyle("stop-opacity"),i=this.getStyle("stop-color",!0);i.getString()===""&&i.setValue("#000"),a.hasValue()&&(i=i.addOpacity(a)),this.offset=n,this.color=i.getColor()}}class Ph extends dr{constructor(e,r,A){super(e,r,A),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.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 pt(e,"values",null);var n=this.getAttribute("values");n.hasValue()&&this.values.setValue(n.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}calcValue(){var{initialUnits:e}=this,{progress:r,from:A,to:n}=this.getProgress(),a=A.getNumber()+(n.getNumber()-A.getNumber())*r;return e==="%"&&(a*=100),"".concat(a).concat(e)}update(e){var{parent:r}=this,A=this.getProperty();if(this.initialValue||(this.initialValue=A.getString(),this.initialUnits=A.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(n==="freeze"&&!this.frozen)this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=A.getString();else if(n==="remove"&&!this.removed)return this.removed=!0,A.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var a=!1;if(this.begin<this.duration){var i=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var o=s.getString();i="".concat(o,"(").concat(i,")")}A.setValue(i),a=!0}return a}getProgress(){var{document:e,values:r}=this,A={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var n=A.progress*(r.getValue().length-1),a=Math.floor(n),i=Math.ceil(n);A.from=new pt(e,"from",parseFloat(r.getValue()[a])),A.to=new pt(e,"to",parseFloat(r.getValue()[i])),A.progress=(n-a)/(i-a)}else A.from=this.from,A.to=this.to;return A}}class Bb extends Ph{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:r,to:A}=this.getProgress(),n=new Lp(r.getColor()),a=new Lp(A.getColor());if(n.ok&&a.ok){var i=n.r+(a.r-n.r)*e,s=n.g+(a.g-n.g)*e,o=n.b+(a.b-n.b)*e;return"rgb(".concat(Math.floor(i),", ").concat(Math.floor(s),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}class yb extends Ph{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:r,to:A}=this.getProgress(),n=en(r.getString()),a=en(A.getString()),i=n.map((s,o)=>{var l=a[o];return s+(l-s)*e}).join(" ");return i}}class xb extends dr{constructor(e,r,A){super(e,r,A),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:n}=e,{children:a}=this;for(var i of a)switch(i.type){case"font-face":{this.fontFace=i;var s=i.getStyle("font-family");s.hasValue()&&(n[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=i;break;case"glyph":{var o=i;o.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[o.unicode]>"u"&&(this.glyphs[o.unicode]={}),this.glyphs[o.unicode][o.arabicForm]=o):this.glyphs[o.unicode]=o;break}}}render(){}}class Cb extends dr{constructor(e,r,A){super(e,r,A),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 bb extends Zt{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Eb extends Ya{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var r=e.children[0];if(r)return r.getText()}return""}}class Fb extends Ya{constructor(e,r,A){super(e,r,A),this.type="a";var{childNodes:n}=r,a=n[0],i=n.length>0&&Array.from(n).every(s=>s.nodeType===3);this.hasText=i,this.text=i?this.getTextFromNode(a):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:r,x:A,y:n}=this,{mouse:a}=r.screen,i=new pt(r,"fontSize",LA.parse(r.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new Nn(A,n-i.getPixels("y"),A+this.measureText(e),n))}else if(this.children.length>0){var s=new Dh(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function Sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function Mh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sb(Object(r),!0).forEach(function(A){Fp(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sb(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}class _b extends Ya{constructor(e,r,A){super(e,r,A),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var n=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(n)}getText(){return this.text}path(e){var{dataArray:r}=this;e&&e.beginPath(),r.forEach(A=>{var{type:n,points:a}=A;switch(n){case Tt.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case Tt.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case Tt.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case Tt.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case Tt.ARC:{var[i,s,o,l,c,d,g,h]=a,p=o>l?o:l,v=o>l?1:o/l,y=o>l?l/o:1;e&&(e.translate(i,s),e.rotate(g),e.scale(v,y),e.arc(0,0,p,c,c+d,!!(1-h)),e.scale(1/v,1/y),e.rotate(-g),e.translate(-i,-s));break}case Tt.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var r=this.parent.getStyle("text-decoration").getString(),A=this.getFontSize(),{glyphInfo:n}=this,a=e.fillStyle;r==="underline"&&e.beginPath(),n.forEach((i,s)=>{var{p0:o,p1:l,rotation:c,text:d}=i;e.save(),e.translate(o.x,o.y),e.rotate(c),e.fillStyle&&e.fillText(d,0,0),e.strokeStyle&&e.strokeText(d,0,0),e.restore(),r==="underline"&&(s===0&&e.moveTo(o.x,o.y+A/8),e.lineTo(l.x,l.y+A/5))}),r==="underline"&&(e.lineWidth=A/20,e.strokeStyle=a,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,r,A,n,a,i,s,o,l){var c=i,d=this.measureText(e,o);o===" "&&r==="justify"&&A<n&&(d+=(n-A)/a),l>-1&&(c+=this.getLetterSpacingAt(l));var g=this.textHeight/20,h=this.getEquidistantPointOnPath(c,g,0),p=this.getEquidistantPointOnPath(c+d,g,0),v={p0:h,p1:p},y=h&&p?Math.atan2(p.y-h.y,p.x-h.x):0;if(s){var C=Math.cos(Math.PI/2+y)*s,b=Math.cos(-y)*s;v.p0=Mh(Mh({},h),{},{x:h.x+C,y:h.y+b}),v.p1=Mh(Mh({},p),{},{x:p.x+C,y:p.y+b})}return c+=d,{offset:c,segment:v,rotation:y}}measureText(e,r){var{measuresCache:A}=this,n=r||this.getText();if(A.has(n))return A.get(n);var a=this.measureTargetText(e,n);return A.set(n,a),a}setTextData(e){if(!this.glyphInfo){var r=this.getText(),A=r.split(""),n=r.split(" ").length-1,a=this.parent.getAttribute("dx").split().map(O=>O.getPixels("x")),i=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),c=0;!o.hasValue()||o.getValue()==="inherit"?c=l.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(c=o.getPixels());var d=[],g=r.length;this.letterSpacingCache=d;for(var h=0;h<g;h++)d.push(typeof a[h]<"u"?a[h]:c);var p=d.reduce((O,W,X)=>X===0?0:O+W||0,0),v=this.measureText(e),y=Math.max(v+p,0);this.textWidth=v,this.textHeight=this.getFontSize(),this.glyphInfo=[];var C=this.getPathLength(),b=this.getStyle("startOffset").getNumber(0)*C,F=0;(s==="middle"||s==="center")&&(F=-y/2),(s==="end"||s==="right")&&(F=-y),F+=b,A.forEach((O,W)=>{var{offset:X,segment:k,rotation:Q}=this.findSegmentToFitChar(e,s,y,C,n,F,i,O,W);F=X,!(!k.p0||!k.p1)&&this.glyphInfo.push({text:A[W],p0:k.p0,p1:k.p1,rotation:Q})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var r=[],{pathParser:A}=e;for(A.reset();!A.isEnd();){var{current:n}=A,a=n?n.x:0,i=n?n.y:0,s=A.next(),o=s.type,l=[];switch(s.type){case Tt.MOVE_TO:this.pathM(A,l);break;case Tt.LINE_TO:o=this.pathL(A,l);break;case Tt.HORIZ_LINE_TO:o=this.pathH(A,l);break;case Tt.VERT_LINE_TO:o=this.pathV(A,l);break;case Tt.CURVE_TO:this.pathC(A,l);break;case Tt.SMOOTH_CURVE_TO:o=this.pathS(A,l);break;case Tt.QUAD_TO:this.pathQ(A,l);break;case Tt.SMOOTH_QUAD_TO:o=this.pathT(A,l);break;case Tt.ARC:l=this.pathA(A);break;case Tt.CLOSE_PATH:Zt.pathZ(A);break}s.type!==Tt.CLOSE_PATH?r.push({type:o,points:l,start:{x:a,y:i},pathLength:this.calcLength(a,i,o,l)}):r.push({type:Tt.CLOSE_PATH,points:[],pathLength:0})}return r}pathM(e,r){var{x:A,y:n}=Zt.pathM(e).point;r.push(A,n)}pathL(e,r){var{x:A,y:n}=Zt.pathL(e).point;return r.push(A,n),Tt.LINE_TO}pathH(e,r){var{x:A,y:n}=Zt.pathH(e).point;return r.push(A,n),Tt.LINE_TO}pathV(e,r){var{x:A,y:n}=Zt.pathV(e).point;return r.push(A,n),Tt.LINE_TO}pathC(e,r){var{point:A,controlPoint:n,currentPoint:a}=Zt.pathC(e);r.push(A.x,A.y,n.x,n.y,a.x,a.y)}pathS(e,r){var{point:A,controlPoint:n,currentPoint:a}=Zt.pathS(e);return r.push(A.x,A.y,n.x,n.y,a.x,a.y),Tt.CURVE_TO}pathQ(e,r){var{controlPoint:A,currentPoint:n}=Zt.pathQ(e);r.push(A.x,A.y,n.x,n.y)}pathT(e,r){var{controlPoint:A,currentPoint:n}=Zt.pathT(e);return r.push(A.x,A.y,n.x,n.y),Tt.QUAD_TO}pathA(e){var{rX:r,rY:A,sweepFlag:n,xAxisRotation:a,centp:i,a1:s,ad:o}=Zt.pathA(e);return n===0&&o>0&&(o-=2*Math.PI),n===1&&o<0&&(o+=2*Math.PI),[i.x,i.y,r,A,s,o,a,n]}calcLength(e,r,A,n){var a=0,i=null,s=null,o=0;switch(A){case Tt.LINE_TO:return this.getLineLength(e,r,n[0],n[1]);case Tt.CURVE_TO:for(a=0,i=this.getPointOnCubicBezier(0,e,r,n[0],n[1],n[2],n[3],n[4],n[5]),o=.01;o<=1;o+=.01)s=this.getPointOnCubicBezier(o,e,r,n[0],n[1],n[2],n[3],n[4],n[5]),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;return a;case Tt.QUAD_TO:for(a=0,i=this.getPointOnQuadraticBezier(0,e,r,n[0],n[1],n[2],n[3]),o=.01;o<=1;o+=.01)s=this.getPointOnQuadraticBezier(o,e,r,n[0],n[1],n[2],n[3]),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;return a;case Tt.ARC:{a=0;var l=n[4],c=n[5],d=n[4]+c,g=Math.PI/180;if(Math.abs(l-d)<g&&(g=Math.abs(l-d)),i=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),c<0)for(o=l-g;o>d;o-=g)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;else for(o=l+g;o<d;o+=g)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),a+=this.getLineLength(i.x,i.y,s.x,s.y),i=s;return s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],d,0),a+=this.getLineLength(i.x,i.y,s.x,s.y),a}}return 0}getPointOnLine(e,r,A,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:A,o=(a-A)/(n-r+Us),l=Math.sqrt(e*e/(1+o*o));n<r&&(l*=-1);var c=o*l,d=null;if(n===r)d={x:i,y:s+c};else if((s-A)/(i-r+Us)===o)d={x:i+l,y:s+c};else{var g=0,h=0,p=this.getLineLength(r,A,n,a);if(p<Us)return null;var v=(i-r)*(n-r)+(s-A)*(a-A);v/=p*p,g=r+v*(n-r),h=A+v*(a-A);var y=this.getLineLength(i,s,g,h),C=Math.sqrt(e*e-y*y);l=Math.sqrt(C*C/(1+o*o)),n<r&&(l*=-1),c=o*l,d={x:g+l,y:h+c}}return d}getPointOnPath(e){var r=this.getPathLength(),A=0,n=null;if(e<-5e-5||e-5e-5>r)return null;var{dataArray:a}=this;for(var i of a){if(i&&(i.pathLength<5e-5||A+i.pathLength+5e-5<e)){A+=i.pathLength;continue}var s=e-A,o=0;switch(i.type){case Tt.LINE_TO:n=this.getPointOnLine(s,i.start.x,i.start.y,i.points[0],i.points[1],i.start.x,i.start.y);break;case Tt.ARC:{var l=i.points[4],c=i.points[5],d=i.points[4]+c;if(o=l+s/i.pathLength*c,c<0&&o<d||c>=0&&o>d)break;n=this.getPointOnEllipticalArc(i.points[0],i.points[1],i.points[2],i.points[3],o,i.points[6]);break}case Tt.CURVE_TO:o=s/i.pathLength,o>1&&(o=1),n=this.getPointOnCubicBezier(o,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3],i.points[4],i.points[5]);break;case Tt.QUAD_TO:o=s/i.pathLength,o>1&&(o=1),n=this.getPointOnQuadraticBezier(o,i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3]);break}if(n)return n;break}return null}getLineLength(e,r,A,n){return Math.sqrt((A-e)*(A-e)+(n-r)*(n-r))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,r)=>r.pathLength>0?e+r.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,r,A,n,a,i,s,o,l){var c=o*Hp(e)+i*Vp(e)+n*Kp(e)+r*Gp(e),d=l*Hp(e)+s*Vp(e)+a*Kp(e)+A*Gp(e);return{x:c,y:d}}getPointOnQuadraticBezier(e,r,A,n,a,i,s){var o=i*jp(e)+n*zp(e)+r*Wp(e),l=s*jp(e)+a*zp(e)+A*Wp(e);return{x:o,y:l}}getPointOnEllipticalArc(e,r,A,n,a,i){var s=Math.cos(i),o=Math.sin(i),l={x:A*Math.cos(a),y:n*Math.sin(a)};return{x:e+(l.x*s-l.y*o),y:r+(l.x*o+l.y*s)}}buildEquidistantCache(e,r){var A=this.getPathLength(),n=r||.25,a=e||A/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==n){this.equidistantCache={step:a,precision:n,points:[]};for(var i=0,s=0;s<=A;s+=n){var o=this.getPointOnPath(s),l=this.getPointOnPath(s+n);!o||!l||(i+=this.getLineLength(o.x,o.y,l.x,l.y),i>=a&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:s}),i-=a))}}}getEquidistantPointOnPath(e,r,A){if(this.buildEquidistantCache(r,A),e<0||e-this.getPathLength()>5e-5)return null;var n=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}var BJ=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Tb extends Qi{constructor(e,r,A){super(e,r,A),this.type="image",this.loaded=!1;var n=this.getHrefAttribute().getString();if(n){var a=n.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(n);e.images.push(this),a?this.loadSvg(n):this.loadImage(n),this.isSvg=a}}loadImage(e){var r=this;return Xa(function*(){try{var A=yield r.document.createImage(e);r.image=A}catch(n){console.error('Error while loading image "'.concat(e,'":'),n)}r.loaded=!0})()}loadSvg(e){var r=this;return Xa(function*(){var A=BJ.exec(e);if(A){var n=A[5];A[4]==="base64"?r.image=atob(n):r.image=decodeURIComponent(n)}else try{var a=yield r.document.fetch(e),i=yield a.text();r.image=i}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}r.loaded=!0})()}renderChildren(e){var{document:r,image:A,loaded:n}=this,a=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!n||!A||!s||!o)){if(e.save(),e.translate(a,i),this.isSvg){var l=r.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:o});l.document.documentElement.parent=this,l.render()}else{var c=this.image;r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:c.width,height:o,desiredHeight:c.height}),this.loaded&&(typeof c.complete>"u"||c.complete)&&e.drawImage(c,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new Nn(e,r,e+A,r+n)}}class Ub extends Qi{constructor(){super(...arguments),this.type="symbol"}render(e){}}class Nb{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,r){var A=this;return Xa(function*(){try{var{document:n}=A,a=yield n.canvg.parser.load(r),i=a.getElementsByTagName("font");Array.from(i).forEach(s=>{var o=n.createElement(s);n.definitions[e]=o})}catch(s){console.error('Error while loading font "'.concat(r,'":'),s)}A.loaded=!0})()}}class e2 extends dr{constructor(e,r,A){super(e,r,A),this.type="style";var n=_s(Array.from(r.childNodes).map(i=>i.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),a=n.split("}");a.forEach(i=>{var s=i.trim();if(s){var o=s.split("{"),l=o[0].split(","),c=o[1].split(";");l.forEach(d=>{var g=d.trim();if(g){var h=e.styles[g]||{};if(c.forEach(y=>{var C=y.indexOf(":"),b=y.substr(0,C).trim(),F=y.substr(C+1,y.length-C).trim();b&&F&&(h[b]=new pt(e,b,F))}),e.styles[g]=h,e.stylesSpecificity[g]=Z4(g),g==="@font-face"){var p=h["font-family"].getString().replace(/"|'/g,""),v=h.src.getString().split(",");v.forEach(y=>{if(y.indexOf('format("svg")')>0){var C=Pp(y);C&&new Nb(e).load(p,C)}})}}})}})}}e2.parseExternalUrl=Pp;class Ib extends Qi{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var r=this.getAttribute("x"),A=this.getAttribute("y");r.hasValue()&&e.translate(r.getPixels("x"),0),A.hasValue()&&e.translate(0,A.getPixels("y"))}path(e){var{element:r}=this;r&&r.path(e)}renderChildren(e){var{document:r,element:A}=this;if(A){var n=A;if(A.type==="symbol"&&(n=new Ro(r,null),n.attributes.viewBox=new pt(r,"viewBox",A.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new pt(r,"preserveAspectRatio",A.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new pt(r,"overflow",A.getAttribute("overflow").getString()),n.children=A.children,A.styles.opacity=new pt(r,"opacity",this.calculateOpacity())),n.type==="svg"){var a=this.getStyle("width",!1,!0),i=this.getStyle("height",!1,!0);a.hasValue()&&(n.attributes.width=new pt(r,"width",a.getString())),i.hasValue()&&(n.attributes.height=new pt(r,"height",i.getString()))}var s=n.parent;n.parent=this,n.render(e),n.parent=s}}getBoundingBox(e){var{element:r}=this;return r?r.getBoundingBox(e):null}elementTransform(){var{document:e,element:r}=this;return ki.fromElement(e,r)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function Rh(t,e,r,A,n,a){return t[r*A*4+e*4+a]}function Hh(t,e,r,A,n,a,i){t[r*A*4+e*4+a]=i}function Xr(t,e,r){var A=t[e];return A*r}function Ja(t,e,r,A){return e+Math.cos(t)*r+Math.sin(t)*A}class t2 extends dr{constructor(e,r,A){super(e,r,A),this.type="feColorMatrix";var n=en(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var a=n[0];n=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var i=n[0]*Math.PI/180;n=[Ja(i,.213,.787,-.213),Ja(i,.715,-.715,-.715),Ja(i,.072,-.072,.928),0,0,Ja(i,.213,-.213,.143),Ja(i,.715,.285,.14),Ja(i,.072,-.072,-.283),0,0,Ja(i,.213,-.213,-.787),Ja(i,.715,-.715,.715),Ja(i,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=n,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,r,A,n,a){for(var{includeOpacity:i,matrix:s}=this,o=e.getImageData(0,0,n,a),l=0;l<a;l++)for(var c=0;c<n;c++){var d=Rh(o.data,c,l,n,a,0),g=Rh(o.data,c,l,n,a,1),h=Rh(o.data,c,l,n,a,2),p=Rh(o.data,c,l,n,a,3),v=Xr(s,0,d)+Xr(s,1,g)+Xr(s,2,h)+Xr(s,3,p)+Xr(s,4,1),y=Xr(s,5,d)+Xr(s,6,g)+Xr(s,7,h)+Xr(s,8,p)+Xr(s,9,1),C=Xr(s,10,d)+Xr(s,11,g)+Xr(s,12,h)+Xr(s,13,p)+Xr(s,14,1),b=Xr(s,15,d)+Xr(s,16,g)+Xr(s,17,h)+Xr(s,18,p)+Xr(s,19,1);i&&(v=0,y=0,C=0,b*=p/255),Hh(o.data,c,l,n,a,0,v),Hh(o.data,c,l,n,a,1,y),Hh(o.data,c,l,n,a,2,C),Hh(o.data,c,l,n,a,3,b)}e.clearRect(0,0,n,a),e.putImageData(o,0,0)}}class Fc extends dr{constructor(){super(...arguments),this.type="mask"}apply(e,r){var{document:A}=this,n=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!i&&!s){var o=new Nn;this.children.forEach(p=>{o.addBoundingBox(p.getBoundingBox(e))}),n=Math.floor(o.x1),a=Math.floor(o.y1),i=Math.floor(o.width),s=Math.floor(o.height)}var l=this.removeStyles(r,Fc.ignoreStyles),c=A.createCanvas(n+i,a+s),d=c.getContext("2d");A.screen.setDefaults(d),this.renderChildren(d),new t2(A,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(d,0,0,n+i,a+s);var g=A.createCanvas(n+i,a+s),h=g.getContext("2d");A.screen.setDefaults(h),r.render(h),h.globalCompositeOperation="destination-in",h.fillStyle=d.createPattern(c,"no-repeat"),h.fillRect(0,0,n+i,a+s),e.fillStyle=h.createPattern(g,"no-repeat"),e.fillRect(0,0,n+i,a+s),this.restoreStyles(r,l)}render(e){}}Fc.ignoreStyles=["mask","transform","clip-path"];var Lb=()=>{};class kb extends dr{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:r}=this,A=Reflect.getPrototypeOf(e),{beginPath:n,closePath:a}=e;A&&(A.beginPath=Lb,A.closePath=Lb),Reflect.apply(n,e,[]),this.children.forEach(i=>{if(!(typeof i.path>"u")){var s=typeof i.elementTransform<"u"?i.elementTransform():null;s||(s=ki.fromElement(r,i)),s&&s.apply(e),i.path(e),A&&(A.closePath=a),s&&s.unapply(e)}}),Reflect.apply(a,e,[]),e.clip(),A&&(A.beginPath=n,A.closePath=a)}render(e){}}class Sc extends dr{constructor(){super(...arguments),this.type="filter"}apply(e,r){var{document:A,children:n}=this,a=r.getBoundingBox(e);if(a){var i=0,s=0;n.forEach(C=>{var b=C.extraFilterDistance||0;i=Math.max(i,b),s=Math.max(s,b)});var o=Math.floor(a.width),l=Math.floor(a.height),c=o+2*i,d=l+2*s;if(!(c<1||d<1)){var g=Math.floor(a.x),h=Math.floor(a.y),p=this.removeStyles(r,Sc.ignoreStyles),v=A.createCanvas(c,d),y=v.getContext("2d");A.screen.setDefaults(y),y.translate(-g+i,-h+s),r.render(y),n.forEach(C=>{typeof C.apply=="function"&&C.apply(y,0,0,c,d)}),e.drawImage(v,0,0,c,d,g-i,h-s,c,d),this.restoreStyles(r,p)}}}render(e){}}Sc.ignoreStyles=["filter","transform","clip-path"];class Qb extends dr{constructor(e,r,A){super(e,r,A),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,r,A,n,a){}}class Ob extends dr{constructor(){super(...arguments),this.type="feMorphology"}apply(e,r,A,n,a){}}class Db extends dr{constructor(){super(...arguments),this.type="feComposite"}apply(e,r,A,n,a){}}class Pb extends dr{constructor(e,r,A){super(e,r,A),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,r,A,n,a){var{document:i,blurRadius:s}=this,o=i.window?i.window.document.body:null,l=e.canvas;l.id=i.getUniqueId(),o&&(l.style.display="none",o.appendChild(l)),JY(l,r,A,n,a,s),o&&o.removeChild(l)}}class Mb extends dr{constructor(){super(...arguments),this.type="title"}}class Rb extends dr{constructor(){super(...arguments),this.type="desc"}}var yJ={svg:Ro,rect:Yp,circle:cb,ellipse:fb,line:ub,polyline:Jp,polygon:hb,path:Zt,pattern:db,marker:gb,defs:pb,linearGradient:mb,radialGradient:vb,stop:wb,animate:Ph,animateColor:Bb,animateTransform:yb,font:xb,"font-face":Cb,"missing-glyph":bb,glyph:qp,text:Ya,tspan:Ec,tref:Eb,a:Fb,textPath:_b,image:Tb,g:Dh,symbol:Ub,style:e2,use:Ib,mask:Fc,clipPath:kb,filter:Sc,feDropShadow:Qb,feMorphology:Ob,feComposite:Db,feColorMatrix:t2,feGaussianBlur:Pb,title:Mb,desc:Rb};function Hb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function xJ(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hb(Object(r),!0).forEach(function(A){Fp(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hb(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}function CJ(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}function bJ(t){return r2.apply(this,arguments)}function r2(){return r2=Xa(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=document.createElement("img");return e&&(r.crossOrigin="Anonymous"),new Promise((A,n)=>{r.onload=()=>{A(r)},r.onerror=(a,i,s,o,l)=>{n(l)},r.src=t})}),r2.apply(this,arguments)}class Za{constructor(e){var{rootEmSize:r=12,emSize:A=12,createCanvas:n=Za.createCanvas,createImage:a=Za.createImage,anonymousCrossOrigin:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=r,this.emSize=A,this.createCanvas=n,this.createImage=this.bindCreateImage(a,i),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,r){return typeof r=="boolean"?(A,n)=>e(A,typeof n=="boolean"?n:r):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:r}=this;r.push(e)}popEmSize(){var{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){var r=this.createElement(e.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}createElement(e){var r=e.nodeName.replace(/^[^:]+:/,""),A=Za.elementTypes[r];return typeof A<"u"?new A(this,e):new lb(this,e)}createTextNode(e){return new wJ(this,e)}setViewBox(e){this.screen.setViewBox(xJ({document:this},e))}}Za.createCanvas=CJ,Za.createImage=bJ,Za.elementTypes=yJ;function Vb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function Ns(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vb(Object(r),!0).forEach(function(A){Fp(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vb(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}class Is{constructor(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Oh(A),this.screen=new bc(e,A),this.options=A;var n=new Za(this,A),a=n.createDocumentElement(r);this.document=n,this.documentElement=a}static from(e,r){var A=arguments;return Xa(function*(){var n=A.length>2&&A[2]!==void 0?A[2]:{},a=new Oh(n),i=yield a.parse(r);return new Is(e,i,n)})()}static fromString(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=new Oh(A),a=n.parseFromString(r);return new Is(e,a,A)}fork(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Is.from(e,r,Ns(Ns({},this.options),A))}forkString(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Is.fromString(e,r,Ns(Ns({},this.options),A))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,r=this;return Xa(function*(){var A=e.length>0&&e[0]!==void 0?e[0]:{};r.start(Ns({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},A)),yield r.ready(),r.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:r,screen:A,options:n}=this;A.start(r,Ns(Ns({enableRedraw:!0},n),e))}stop(){this.screen.stop()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,r,A)}}const EJ=Object.freeze(Object.defineProperty({__proto__:null,AElement:Fb,AnimateColorElement:Bb,AnimateElement:Ph,AnimateTransformElement:yb,BoundingBox:Nn,CB1:Hp,CB2:Vp,CB3:Kp,CB4:Gp,Canvg:Is,CircleElement:cb,ClipPathElement:kb,DefsElement:pb,DescElement:Rb,Document:Za,Element:dr,EllipseElement:fb,FeColorMatrixElement:t2,FeCompositeElement:Db,FeDropShadowElement:Qb,FeGaussianBlurElement:Pb,FeMorphologyElement:Ob,FilterElement:Sc,Font:LA,FontElement:xb,FontFaceElement:Cb,GElement:Dh,GlyphElement:qp,GradientElement:Zp,ImageElement:Tb,LineElement:ub,LinearGradientElement:mb,MarkerElement:gb,MaskElement:Fc,Matrix:Xp,MissingGlyphElement:bb,Mouse:tb,PSEUDO_ZERO:Us,Parser:Oh,PathElement:Zt,PathParser:Tt,PatternElement:db,Point:Ur,PolygonElement:hb,PolylineElement:Jp,Property:pt,QB1:jp,QB2:zp,QB3:Wp,RadialGradientElement:vb,RectElement:Yp,RenderedElement:Qi,Rotate:ab,SVGElement:Ro,SVGFontLoader:Nb,Scale:ib,Screen:bc,Skew:$p,SkewX:sb,SkewY:ob,StopElement:wb,StyleElement:e2,SymbolElement:Ub,TRefElement:Eb,TSpanElement:Ec,TextElement:Ya,TextPathElement:_b,TitleElement:Mb,Transform:ki,Translate:nb,UnknownElement:lb,UseElement:Ib,ViewPort:eb,compressSpaces:_s,default:Is,getSelectorSpecificity:Z4,normalizeAttributeName:Y4,normalizeColor:J4,parseExternalUrl:Pp,presets:rJ,toNumbers:en,trimLeft:$4,trimRight:q4,vectorMagnitude:Mp,vectorsAngle:Rp,vectorsRatio:Qh},Symbol.toStringTag,{value:"Module"}));ua.VueUiDonut=vR,ua.VueUiTable=TM,ua.VueUiWaffle=qR,ua.VueUiXy=nP,Object.defineProperty(ua,Symbol.toStringTag,{value:"Module"})});
|