@mescius/spread-sheets-pdf
Version:
SpreadJS PDF export plugin
12 lines • 2.03 MB
JavaScript
/*!
*
* SpreadJS Library 19.1.0
*
* Copyright(c) MESCIUS inc. All rights reserved.
*
* Licensed under the SpreadJS Commercial License.
* us.sales@mescius.com
* https://developer.mescius.com/spreadjs
*
*/
!function(n){"object"==typeof module&&"object"==typeof module.exports?(require("@mescius/spread-sheets-print"),module.exports=n(require("@mescius/spread-sheets"))):"function"==typeof define&&define.amd?define(["@mescius/spread-sheets","@mescius/spread-sheets-print"],n):"object"==typeof exports?(require("@mescius/spread-sheets-print"),exports.Spread=n(require("@mescius/spread-sheets"))):n(GC)}((function(n){!function(){var e,r={55:function(n,e,r){"use strict";var t,a,i,c,o,u,s,X,P,K,l,m,f,d=this&&this.vJr||(h=function(n,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])},h(n,e)},function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}h(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),h;function g(n,e,r,t,a,i,c){if(r)if(e.getState(r)){var o=e.getImage(r);try{n.drawImage(o,0,0,o.width,o.height,t,a,i,c)}catch(n){}}else e.addImage(r)}Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFontsManager=e.ErrorCode=e.BlobStream=void 0,t=r(234),i=(a=r(376)).GC$,c=r(65),o=r(869),e.BlobStream=r(940),u=r(549),s=r(926),X=null,P=new t.Common.ResourceManager(s.SR,"PDF"),K=P.getResource.bind(P),e.ErrorCode={fileIOError:0,fontError:1},l=u.PDFFontsManager,e.PDFFontsManager=l,m=function(n){function e(e,r,t){var a=n.call(this,e,r)||this;return a.fce=function(n,e,r,t,a){var i=this,c=.96,o=i.dce.getContext();o._blackAndWhite=a&&a.blackAndWhite(),e.forEach((function(e){var r=e.x,t=e.y,a=e.width,i=e.height,u=e.imageSrc;g(o,n,u,r*c,t*c,a*c,i*c)}))},a.dce=t,a}return d(e,n),e.prototype.initBuild=function(){var n=this,e=n.dce;e.clear()},e.prototype.initContainer=function(n,e){var r=this,t=r.dce.getContext(),a={width:n.width,height:n.height};t.addPage(e,a)},e.prototype.processHeader=function(n,e,r,t,a,i,c,o,u,s,X){var P,K,l=this,m=l.dce.getContext();m._blackAndWhite=r&&r.blackAndWhite(),P=o.marginLeft,K=o.marginHeader,m.save(),m.translate(P,K),l.moe(m,n,e,r,t,a,i,c,u,s,X),m.restore()},e.prototype.processBody=function(n,e,r,t,i,c,o){var u,s,X,P,K,l,m,f,d,h,g,A,v,C=this,W=C.dce.getContext(),b=i.marginLeft,y=i.marginTop,N=i.contentWidth,B=i.bodyContentHeight,p=i.showBorder,O=i.centering,w=i.sheetPaginator,k=1;1!==O&&3!==O||(b+=(N-e-2*k)/2),2!==O&&3!==O||(y+=(B-r-2*k)/2),W.save(),W.translate(b,y),u=0,s=0,X=e,P=r,W._blackAndWhite=o&&o.blackAndWhite(),p&&(W.save(),W.beginPath(),W.lineWidth=k,W.fillStyle="black",W.strokeRect(0,0,e,r),W.restore(),u+=1,s+=1,X-=2,P-=2),K=X,l=P,m=o.zoomFactor(),f=1,d=o.fitPagesWide(),h=o.fitPagesTall(),-1===d&&-1===h?(W.scale(m,m),K=X/m,l=P/m):(g=w.horizontalZoomFactor(),A=w.verticalZoomFactor(),f=Math.min(g,A)),v=n.options.sheetAreaOffset,p||(K+=v.left,l+=v.top),C.D1(n,W,new a.Rect(u,s,K,l),t,f),C.boe(n,W,new a.Rect(u,s,K,l),t,f),n.shapes&&(n.MC=t,n.shapes.TnV(n,W,new a.Rect(0,0,K,l),f)),W.restore()},e.prototype.processFooter=function(n,e,r,t,a,i,c,o,u,s,X){var P=this,K=P.dce.getContext(),l=o.marginLeft,m=o.paperHeight,f=o.marginFooter;K._blackAndWhite=r&&r.blackAndWhite(),K.save(),K.translate(l,m-f-e),P.xoe(K,n,e,r,t,a,i,c,u,s,X),K.restore()},e.prototype.processBlackAndWhite=function(){},e.prototype.clearAfterBuild=function(){},e.prototype.dispose=function(){var n,e=this;e.MC&&(e.MC.L0(),e.MC=X),e.gce&&(e.gce.L0(),e.gce=X),(n=e.Vv)&&(n.destroy(),e.Vv=X),e.Ace=X,e.cE={},e.dce=X},e}(c.Iie),a.Workbook.ch("printPDF",{onCultureChanged:function(){K()}}),f=function(n){function r(e,r){var t=n.call(this)||this,a=t;return a.hce=e,a.LEt=r,a.Hc(),t}return d(r,n),r.prototype.Hc=function(){var n=this,r=new o.PDFContext;r.info(n.LEt),r.fontsManager(l),n.xf=r,n.mne=r.nce(new e.BlobStream)},r.prototype.pwn=function(){var n=this,e=n.xf,r=n.mne;r.on("finish",(function(){var e=r.toBlob("application/pdf");n.hce(e),n.dispose()})),e.end()},r.prototype.print=function(n,e){var r,t,i,c,o=this;function u(n,e,r){var i,c=o.xf;return r&&(n=a.q.tt(n)),(i=c.measureText(n,e)).width>0?i.width:t(n,e,r)}o.Vv=n,r=o.zie(n),t=a.q.Wt;try{a.q.Wt=u,i=o.prepareContext(r,e),c=new m(r,i,o),o.vce=c,c.onBuildCompleted=function(){o.pwn()},c.build()}finally{a.q.Wt=t}},r.prototype.dispose=function(){var n=this;n.hce=X,n.xf&&n.xf.dispose(),n.xf=X,n.vce&&n.vce.dispose(),n.vce=X,n.mne=X},r.prototype.clear=function(){this.Hc()},r.prototype.getContext=function(){return this.xf},r}(c.kie),a.Workbook.prototype.savePDF=function(n,r,t,a){var i,c,o,u,s;n||(n=function(n){}),r||(r=function(n){}),o=this,u=new f(n,t);try{null===(i=o.suspendOp)||void 0===i||i.call(o),u.print(o,a)}catch(n){u.dispose(),s={},"Not a supported font format or standard PDF font."===n.message?(s.errorCode=e.ErrorCode.fontError,s.errorMessage=K().Exp_FontError):(s.errorCode=e.ErrorCode.fileIOError,s.errorMessage=K().Exp_FileIOError),r(s)}finally{null===(c=o.resumeOp)||void 0===c||c.call(o)}}},65:function(e){"use strict";e.exports=n.Spread.Sheets.Print},184:function(n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TTF_STRING=void 0,e.TTF_STRING="AAEAAAANAIAAAwBQR1BPU6/9vusAAADcAAAANk9TLzKEnFQtAAABFAAAAGBjbWFw5AZ48wAAAXQAAAHCZ2FzcP//AAMAAAM4AAAACGdseWYsYSo+AAADQAAAAphoZWFkJlMS7AAABdgAAAA2aGhlYQWOAaYAAAYQAAAAJGhtdHgJ7QDPAAAGNAAAABxrZXJuAAEADwAABlAAAAASbG9jYQAABpgAAAZkAAAAIG1heHAACgBBAAAGhAAAACBuYW1lVUk8eQAABqQAAAJkcG9zdK2qdV4AAAkIAAAASAABAAAACgAeACwAAURGTFQACAAEAAAAAAAAAAEAAAABa2VybgAIAAAAAQAAAAEABAAJAAAAAAAAAAIB4AGQAAUAAAKKArwALwCMAooCvP9cAeAAMQECAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEJpcmQAQAAgJc8DH/8pAGYDHwDXAD4AAd/9AAACewMfAAAAIAACAAAAAwABAAAAAAAcAAMAAQAAASIAAwAKAAABagAAAQYAAAEAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABABIAAAADgAIAAIABgAAAA0AICWgJcslz///AAAAAAANACAloCXLJc///wAB//X/49pk2jraNwABAAAAAAAAAAAAAAAAAAAADAAAAAAAWAAAAAAAAAAGAAAAAAAAAAAAAAABAAAADQAAAA0AAAACAAAAIAAAACAAAAADAAAloAAAJaAAAAAEAAAlywAAJcsAAAAFAAAlzwAAJc8AAAAGAAAAAAAB//8AAgACAAAAMwGaAkgABwAPAAABAAEAAQABAAEAAQABAAEAADMAZwDMAAAAAP+a/zMAAP/NAIkBEQAAAAD/d/7vAAAAZgAAAAAAkAEfAAAAAP9wAMMAAAAA/07+nQAAAAAAsgABADkAawIHAg8ABwAAAQABAAEAAQAAOQB0AVoAAAAA/4z+pgAAAg8AAAAA/5f+xQAAAAAAaQAAAAIASwBxAe8CFAAfAD8AAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABsf/k/9j/2P/Y/9j/2P/Y/+T/4//w/+8AAAAAABEAEAAdABwAKAAoACgAKAAoACgAHAAcABEAEQAAAAD/7//vABUAAP/x//D/5v/l/9r/2//a/9r/2//a/+X/5v/w//EAAAAAAA8AEAAaABsAJgAlACYAJgAlACYAGwAaABAADwCu/+T/7//wAAAAAAAQABEAHAAcACgAKAAoACgAKAAoABwAHQAQABEAAAAA/+//8P/j/+T/2P/Y/9j/2P/Y/9gAdwAmACYAJQAbABsADwAQAAAAAP/w//H/5f/l/9v/2v/a/9v/2v/b/+X/5f/x//AAAAAAABAADwAbABsAJQAmAAEASwBwAe4CEwAfAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAGx/+P/2P/Y/9j/2P/Y/9n/4//k/+//8AAAAAAAEAARABwAHQAnACgAKAAoACgAKAAdABwAEAARAAAAAP/v//AArf/k/+//8AAAAAAAEAARABwAHQAoACcAKQAoACcAKAAdABwAEQAQAAAAAP/w/+//5P/j/9j/2f/Y/9f/2f/YAAAAAQAAAAEAAI/jJ6pfDzz1AAsEAAAAAADilue6AAAAAOKW57oAAAAzAgcCSAAAAAcAAgABAAAAAAABAAADH/8pAGYCPgAAADcCBwABAAAAAAAAAAAAAAAAAAAABwIfAAAAAAAAAAAAAAEUAAACPgA5Aj4ASwI+AEsAAAABAAAADgABAAAAAAAAAAAAAAAAAAAAAABgAAAAYAAAAGAAAABgAAAAmAAAAegAAAKYAAEAAAAHAEAAAgAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAASAN4AAQAAAAAAAAAbAAAAAQAAAAAAAQANABsAAQAAAAAAAgAHACgAAQAAAAAAAwADAC8AAQAAAAAABAADADIAAQAAAAAABQALADUAAQAAAAAABgANAEAAAQAAAAAADQAbAE0AAQAAAAAADgAaAGgAAwABBAkAAAA2AIIAAwABBAkAAQAaALgAAwABBAkAAgAOANIAAwABBAkAAwAGAOAAAwABBAkABAAGAOYAAwABBAkABQAWAOwAAwABBAkABgAaAQIAAwABBAkADQA2ARwAAwABBAkADgA0AVJTSUwgT3BlbiBGb250IExpY2Vuc2UgKE9GTClzcHJlYWRKU1JhZGlvUmVndWxhclpzYVpzYVZlcnNpb24gMS4wc3ByZWFkSlNSYWRpb1NJTCBPcGVuIEZvbnQgTGljZW5zZSAoT0ZMKWh0dHA6Ly9zY3JpcHRzLnNpbC5vcmcvT0ZMAFMASQBMACAATwBwAGUAbgAgAEYAbwBuAHQAIABMAGkAYwBlAG4AcwBlACAAKABPAEYATAApAHMAcAByAGUAYQBkAEoAUwBSAGEAZABpAG8AUgBlAGcAdQBsAGEAcgBaAHMAYQBaAHMAYQBWAGUAcgBzAGkAbwBuACAAMQAuADAAcwBwAHIAZQBhAGQASgBTAFIAYQBkAGkAbwBTAEkATAAgAE8AcABlAG4AIABGAG8AbgB0ACAATABpAGMAZQBuAHMAZQAgACgATwBGAEwAKQBoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAgAAAAAAAP+aACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQACAAMBAgEDAQQHdW5pMjVhMAd1bmkyNWNiB3VuaTI1Y2Y="},234:function(e){"use strict";e.exports=n.Spread},376:function(e){"use strict";e.exports=n.Spread.Sheets},549:function(n,e,r){"use strict";var t,a,i;function c(n){var e,r=window.atob(n),t=r.length,a=new Uint8Array(t);for(e=0;e<t;e++)a[e]=r.charCodeAt(e);return a.buffer}Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFontsManager=void 0,t=r(184),a=r(376),e.PDFFontsManager={_registeredFonts:{},Kce:{}},i=["normal","bold","italic","boldItalic"],e.PDFFontsManager.lce=function(){var n=this.Kce;n.TIMES={normal:"Times-Roman",bold:"Times-Bold",italic:"Times-Italic",boldItalic:"Times-BoldItalic"},n.COURIER={normal:"Courier",bold:"Courier-Bold",italic:"Courier-Oblique",boldItalic:"Courier-BoldOblique"},n.HELVETICA={normal:"Helvetica",bold:"Helvetica-Bold",italic:"Helvetica-Oblique",boldItalic:"Helvetica-BoldOblique"},n.SYMBOL={normal:"Symbol",bold:"Symbol",italic:"Symbol",boldItalic:"Symbol"},n.ZAPFDINGBATS={normal:"ZapfDingbats",bold:"ZapfDingbats",italic:"ZapfDingbats",boldItalic:"ZapfDingbats"}},e.PDFFontsManager.lce(),e.PDFFontsManager.registerFont=function(n,e){var r,t,a;e&&n&&((r=n.toUpperCase())&&(r=r.split(",")[0]),t=this,a={},i.forEach((function(n){if("string"==typeof e[n])try{a[n]=c(e[n])}catch(n){throw new Error("Not a supported font format or standard PDF font.")}else a[n]=e[n]})),t._registeredFonts[r]=a)},e.PDFFontsManager.getFont=function(n){var e,r,t=n.toUpperCase();return t&&(t=t.split(",")[0]),!(e=this._registeredFonts[t]||this.Kce[t])&&t&&((r=t.length)>2&&'"'===t[0]&&'"'===t[r-1]&&(t=t.substr(1,r-2)),e=this._registeredFonts[t]||this.Kce[t]),e},e.PDFFontsManager.fallbackFont=function(n){return null},e.PDFFontsManager.mce=function(n){var e;return n.toUpperCase()in this.Kce},e.PDFFontsManager.registerFont(a.SYMBOL_FONT_FAMILY,{normal:t.TTF_STRING})},822:function(n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Exp_FontError=e.Exp_FileIOError=void 0,e.Exp_FileIOError="File read and write exception.",e.Exp_FontError="Not a supported font format or standard PDF font."},869:function(n,e,r){"use strict";var t,a,i,c,o,u,s,X,P,K,l,m,f,d,h,g,A,v,C,W,b,y,N,B,p,O,w;function k(n){return 72*n/96}function x(n){return 96*n/72}function T(n){return 180*n/g}function U(n){return A(n)<v?0:n}function Y(n,e,r,t){return{x:U(n+r*Math.cos(t)),y:U(e+r*Math.sin(t))}}function R(n,e,r,t,a){return{x:n+r*Math.cos(a),y:e+t*Math.sin(a)}}function S(n){return"bold"===n||"bolder"===n||parseInt(n,10)>=600?W:C}function E(n,e){return A(n-e)<=1e-5}function V(n,e,r){if(n>=0&&e<0&&!r)e+=2*g;else if(n>0&&e>0&&n>e&&!r)e+=2*g;else if(n<0&&e>0&&r){if((n+=2*g)>e)return n-e}else if(n>0&&e<0&&r)return n-e;return e-n}function L(n,e,r,t,a){var i=Y(n,e,r,t),c=Y(n,e,r,a),o=a-t<=g?"0":"1";return["M",k(i.x),k(i.y),"A",k(r),k(r),0,o,1,k(c.x),k(c.y)].join(" ")}function F(n,e,r,t,a,i,c,o,u){var s=R(n,e,r,t,i),X=R(n,e,r,t,c),P=V(i,c,o)<=g?"0":"1",K=!0===o?"0":"1";return[u?"M":"L",k(s.x),k(s.y),"A",k(r),k(t),a,P,K,k(X.x),k(X.y)].join(" ")}function D(n){var e=n,r;return"rgb"===(n=n===B?p:n).substr(0,3)&&(e=[(r=l._(n)).r,r.g,r.b]),{color:e,opacity:r?r.a/255:1}}function q(){return new Date}function M(n){var e=X(n,1).fontSize;return a.PDFFontsManager.adjustPdfFont?a.PDFFontsManager.adjustPdfFont(e):e}function j(n){return"jpeg"===n||"jpg"===n?"image/jpeg":"image/png"}Object.defineProperty(e,"__esModule",{value:!0}),e.PDFContext=e.PDFDocument=void 0,t=r(376),a=r(549),c=(i=t.GC$).extend,o=t.mt.vt,u=t.mt.K0,s=t.W,X=s.V,P=s.Ne,K=r(234),l=K.Common.ft,m=K.Common.lt.ht,f=r(914),e.PDFDocument=f.default,d=null,h=void 0,g=Math.PI,A=Math.abs,v=1e-13,C="normal",W="bold",b="italic",y="boldItalic",N="Times",B="transparent",p="rgba(0,0,0,0)",O=function(){function n(n,e){this.image=n,this.repeat=e}return n}(),w=function(){function n(){var n,r,t=this;t.Hae=[],t.Zae=document.createElement("canvas"),Object.defineProperty(t,"font",{set:function(n){t.textfont=n},get:function(){return t.textfont}}),(r=(n=new e.PDFDocument({autoFirstPage:!1})).info).Producer="SpreadJS Pdf Library JS",r.CreationDate=q(),t.Qae=n,t._ae={},t.nn0=!0,t.$ae={}}return n.prototype.ellipse=function(n,e,r,t,a,i,c,o,u){var s,X,P=this.Qae;E(c-i,2*g)||E(c-i,2*-g)?(s=F(n,e,r,t,a,i,i+(X=(c-i)/2),o,u),P.path(s),s=F(n,e,r,t,a,i+X,c,o,u),P.path(s)):(s=F(n,e,r,t,a,i,c,o,u),P.path(s))},n.prototype.quadraticCurveTo=function(n,e,r,t){this.Qae.quadraticCurveTo(k(n),k(e),k(r),k(t))},n.prototype.setLineDash=function(n){var e=n.map((function(n){return k(+n)}));this.Qae.addContent("["+e.join(" ")+"] 0 d")},n.prototype.nce=function(n){var e;return this.Qae.pipe(n)},n.prototype.info=function(n){if(n){var e,r=this.Qae.info;r.Creator=n.creator||"",r.Title=n.title||"",r.Author=n.author||"",r.Keywords=n.keywords||"",r.Subject=n.subject||"",this.onDrawImage=n.onDrawImage}},n.prototype.fontsManager=function(n){this.ece=n},n.prototype.end=function(){var n,e;this.Qae.end()},n.prototype.addPage=function(n,e,r){var t=this.Qae,a={top:k(n.top),left:k(n.left),bottom:k(n.bottom),right:k(n.right)};t.addPage({margins:a,size:[k(e.width),k(e.height)],layout:r})},n.prototype.save=function(){var n=this,e=n.Qae;n.Hae.push({fillStyle:n.fillStyle,font:n.font,strokeStyle:n.strokeStyle,lineWidth:n.lineWidth,textBaseline:n.textBaseline}),e.save()},n.prototype.restore=function(){var n=this,e=n.Qae,r=n.Hae.pop();n.fillStyle=r.fillStyle,n.font=r.font,n.strokeStyle=r.strokeStyle,n.lineWidth=r.lineWidth,n.textBaseline=r.textBaseline,e.restore()},n.prototype.translate=function(n,e){var r;this.Qae.translate(k(n),k(e))},n.prototype.scale=function(n,e){var r;this.Qae.scale(n,e,{})},n.prototype.rect=function(n,e,r,t){var a=this.Qae;n=k(n),e=k(e),r=k(r),t=k(t),this.patternFill?this.patternFillRange={x:n,y:e,w:r,h:t}:a.rect(n,e,r,t)},n.prototype.clip=function(){var n;this.Qae.clip()},n.prototype.rce=function(n){var e,r,t,a,i,c,o,u,s=.24,X=document.createElement("canvas"),P=X.getContext("2d");if(this.patternFillRange.w)e=this.patternFillRange.x,r=this.patternFillRange.y,t=this.patternFillRange.w,a=this.patternFillRange.h,X.width=t/s,X.height=a/s,P.rect(0,0,t/s,a/s);else{if(!this.patternFillRange.m)return;for(e=this.patternFillRange.m.x,r=this.patternFillRange.m.y,t=0,a=0,i=this.patternFillRange.l,c=0;c<i.length;c++)i[c].x<e&&(t+=e-i[c].x,e=i[c].x),i[c].x>e+t&&(t=i[c].x-e),i[c].y<r&&(a+=r-i[c].y,r=i[c].y),i[c].y>r+a&&(a=i[c].y-r);for(X.width=t/s,X.height=a/s,P.moveTo((this.patternFillRange.m.x-e)/s,(this.patternFillRange.m.y-r)/s),c=0;c<i.length;c++)P.lineTo((i[c].x-e)/s,(i[c].y-r)/s)}o=P.createPattern(n.image,n.repeat),P.fillStyle=o,P.fill(),u=X.toDataURL(),this.Qae.image(u,e,r,{scale:s})},n.prototype.fill=function(){var n=this.Qae,e=this.getFillColor(),r=e.color,t=r.stops;this.patternFill?(this._blackAndWhite||this.rce(r),this.patternFill=!1,this.patternFillRange=null):t?this._blackAndWhite||(t.sort((function(n,e){return n[0]-e[0]})),n.fill(e.color)):(n.fillColor(e.color,e.opacity),n.fill())},n.prototype.tce=function(n,e){var r,t,a,i,c,o;return e.style.color=n,o=(c=window.getComputedStyle(e).color).replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(","),[r=parseInt(o[0],10),t=parseInt(o[1],10),a=parseInt(o[2],10),i=o[3]?parseInt(o[3],10):1]},n.prototype.ace=function(n){var e,r,t=document.createElement("span");return t.style.display="none",document.body.appendChild(t),e=this.tce(n,t),r=Math.floor((30*e[0]+59*e[1]+11*e[2]+50)/100),isNaN(r)?n:"rgba("+(e=[r,r,r,e[3]]).join(" ,")+")"},n.prototype.getFillColor=function(){var n,e=this.fillStyle;return e&&this._blackAndWhite&&!e.stops&&!e.image&&(e=this.ace(e)),n={color:e},"string"==typeof e&&(n=D(e.toLowerCase())),n},n.prototype.fillRect=function(n,e,r,t){this.rect(n,e,r,t),this.fill()},n.prototype.stroke=function(){var n,e=this.Qae;e.lineWidth(k(this.lineWidth||1)),n=this.getStrokeColor(),e.strokeColor(n.color,n.opacity),e.stroke()},n.prototype.getStrokeColor=function(){var n,e=this.strokeStyle;return e&&this._blackAndWhite&&(e=this.ace(e)),n={color:e},"string"==typeof e&&(n=D(e.toLowerCase())),n},n.prototype.strokeRect=function(n,e,r,t){this.rect(n,e,r,t),this.stroke()},n.prototype.fillText=function(n,r,t){var a,i,c,o,u,s=this,X=this.Qae;"string"==typeof n&&(n=n.replace(new RegExp(String.fromCharCode(160),"g"),String.fromCharCode(32))),a=s.ice(n,r,t,s.font),i=s.oce(s.font),c=s.getFillColor(),X.fillColor(c.color,c.opacity),X.fontAscender||(X.fontAscender=function(n){if(m(n))return this._font?this._font.ascender:null;this._font&&(this._font.ascender=n)}),null!=(o=X.fontAscender())&&(o<600?X.fontAscender(600):o>683&&X.fontAscender(683)),"string"==typeof n&&(n=n.replace(/(\r\n)|(\n)|(\t)/g," ")),u={lineBreak:!1,baseline:h,oblique:i&&i.noFontTypeFont&&i.isItalic},"rtl"===s.direction&&(u.features=["rtla"]),e.PDFDocument.supportTextBaseline?(u.baseline=s.textBaseline,X.text(n,k(a.x),k(t),u)):X.text(n,k(a.x),k(a.y),u)},n.prototype.ml=function(n,e){var r,t,a,i,c,o=this,u=o.Qae,s=o.ece,X=P(n),K=X.fontStyle,l=S(X.fontWeight),m=X.fontFamily,f=e||{};return l!==C&&K!==C?(t=y,f.isBold=!0,f.isItalic=!0):l!==C?(t=W,f.isBold=!0):K!==C?(t=b,f.isItalic=!0):t=C,(a=s.getFont(m))&&a[t]||((r=s.fallbackFont(n))&&(i={},a&&(i=a),i[t]=r,s.registerFont(m,i),a=s.getFont(m)),a||(a=s.getFont(N)),f.noFontTypeFont=!a[t]),"string"==typeof(r=f&&f.isBold?a[t]||a[W]||a[C]||a[b]||a[y]:a[t]||a[C]||a[W]||a[b]||a[y])?r:(c=m+"-"+t,u.registerFont(c,r),c)},n.prototype.oce=function(n){if(!m(n)){var e=this,r=e.Qae,t=r._font.name,a={},i=e.ml(n,a),c=e.uce(i),o=r._fontSize,u=k(M(n));return i!==t&&c!==t&&(r.font(i),e.sce(i,r._font.name)),u!==o&&r.fontSize(u),a}},n.prototype.ice=function(n,e,r,t){var a,i,c,u=this,s=u.measureText(n,t).width,X=o(this.font),P=M(this.font),K=P>8?Math.floor((P-8)/5+2):1,l=X/2-P/2+K-1,m=0,f=u.textBaseline;switch(f){case"bottom":case"ideographic":m=X;break;case"alphabetic":m=X-l;break;case"middle":m=X/2;break;case"hanging":m=l}return i=e,(a=this.textAlign)&&("center"===a?i=e-s/2:"right"===a&&(i=e-s)),{x:i,y:c=r-m+l}},n.prototype.rotate=function(n){var e;this.Qae.rotate(T(n))},n.prototype.arc=function(n,e,r,t,a){var i,c,o=this.Qae;E(a-t,2*g)||E(a-t,2*-g)?(i=L(n,e,r,t,t+(c=(a-t)/2)),o.path(i),i=L(n,e,r,t+c,a),o.path(i)):(i=L(n,e,r,t,a),o.path(i))},n.prototype.beginPath=function(){this.Qae.moveTo(0,0)},n.prototype.closePath=function(){this.Qae.closePath()},n.prototype.moveTo=function(n,e){var r=k(n),t=k(e);isNaN(r)||isNaN(t)||(this.patternFill?this.patternFillRange={m:{x:r,y:t},l:[]}:(A(r)<=v&&(r=0),A(t)<=v&&(t=0),this.Qae.moveTo(r,t)))},n.prototype.lineTo=function(n,e){var r=k(n),t=k(e);isNaN(r)||isNaN(t)||(this.patternFill?this.patternFillRange.l.push({x:r,y:t}):(A(r)<=v&&(r=0),A(t)<=v&&(t=0),this.Qae.lineTo(r,t)))},n.prototype.bezierCurveTo=function(n,e,r,t,a,i){var c=k(n),o=k(e),u=k(r),s=k(t),X=k(a),P=k(i);A(c)<=v&&(c=0),A(o)<=v&&(o=0),A(u)<=v&&(u=0),A(s)<=v&&(s=0),A(X)<=v&&(X=0),A(P)<=v&&(P=0),this.Qae.bezierCurveTo(c,o,u,s,X,P)},n.prototype.drawImage=function(n,e,r,a,i,c,o,s,X,P){var K,l,m,f,d,g,A,v,C,W,b,y=this,N=y.Qae;if(!y.onDrawImage||!(K=y.onDrawImage(N,n,e,r,a,i,c,o,s,X))){l=y.Zae,A=a||n.width,v=i||n.height,a===h?(m=e,f=r,d=s,g=X):c===h?(m=e,f=r,d=a,g=i):(m=c,f=o,d=s,g=X),l.width=A,l.height=v,(C=l.getContext("2d")).clearRect(0,0,l.width,l.height);try{C.drawImage(n,e,r,A,v,0,0,A,v)}catch(n){}y._blackAndWhite&&u(C,new t.Rect(0,0,A,v)),W=n.sjsToDataURLImageType||j(null==P?void 0:P.imageType),b=function(n){N.image(n,k(m),k(f),{width:k(d),height:k(g)})};try{b(l.toDataURL(W))}catch(n){b(l.toDataURL())}}},n.prototype.createLinearGradient=function(n,e,r,t){var a=this,i=a.Qae,c=i.linearGradient(k(n),k(e),k(r),k(t));return c.addColorStop=function(n,e){var r=D(e);this.stop(n,r.color,r.opacity)},c},n.prototype.createRadialGradient=function(n,e,r,t,a,i){var c=this,o=c.Qae,u=o.radialGradient(k(n),k(e),k(r),k(t),k(a),k(i));return u.addColorStop=function(n,e){var r=D(e);this.stop(n,r.color,r.opacity)},u},n.prototype.createPattern=function(n,e){return this.patternFill=!0,new O(n,e)},n.prototype.measureText=function(n,e){var r,t=this,a=t.Qae;return e||(e=t.font),(r=t.Xce(e,n))||(t.oce(e),r=x(a.widthOfString(null!=n?n:"")),t.Pce(n,r)),{width:r}},n.prototype.uce=function(n){var e,r=this.$ae;return r[n]?r[n]:n},n.prototype.sce=function(n,e){var r,t;this.$ae[n]=e},n.prototype.Pce=function(n,e){var r=this,t=r.Qae,a=r._ae,i=Number(x(t._fontSize).toFixed(4))+"px "+t._font.name;m(a[i])&&(a[i]={}),a[i][n]=e},n.prototype.Xce=function(n,e){var r=this,t=r.Qae,a=r._ae;return m(a[n])||m(a[n][e])?(n=M(n)+"px "+(n?r.uce(r.ml(n)):t._font.name),m(a[n])||m(a[n][e])?h:a[n][e]):a[n][e]},n.prototype.dispose=function(){var n=this;n.Hae=d,n.Zae=d,n.Qae=d,n._ae=d,n.$ae=d},n}(),e.PDFContext=w},914:function(n){!function e(r,t){var a,i;n.exports=t()}("undefined"!=typeof self?self:this,(function(){return function(n){var e={};function r(t){if(e[t])return e[t].exports;var a=e[t]={i:t,l:!1,exports:{}};return n[t].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,e){var t,a;if(1&e&&(n=r(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;if(t=Object.create(null),r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(a in n)r.d(t,a,function(e){return n[e]}.bind(null,a));return t},r.n=function(n){var e=n&&n.__esModule?function e(){return n.default}:function e(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.p="",r(r.s=296)}([function(n,e,r){(function(e){var r=function(n){return n&&n.Math==Math&&n};n.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(43))},function(n,e){var r=Function.prototype,t=r.bind,a=r.call,i=t&&t.bind(a);n.exports=t?function(n){return n&&i(a,n)}:function(n){return n&&function(){return a.apply(n,arguments)}}},function(n,e){n.exports=function(n){try{return!!n()}catch(n){return!0}}},function(n,e,r){(function(t){var a,i;a=this,i=function(){var n=n||function(n,e){var a,i,c,o,u,s,X,P,K,l,m,f,d,h;if("undefined"!=typeof window&&window.crypto&&(a=window.crypto),"undefined"!=typeof self&&self.crypto&&(a=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(a=globalThis.crypto),!a&&"undefined"!=typeof window&&window.msCrypto&&(a=window.msCrypto),!a&&void 0!==t&&t.crypto&&(a=t.crypto),!a)try{a=r(378)}catch(n){}return i=function(){if(a){if("function"==typeof a.getRandomValues)try{return a.getRandomValues(new Uint32Array(1))[0]}catch(n){}if("function"==typeof a.randomBytes)try{return a.randomBytes(4).readInt32LE()}catch(n){}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||function(){function n(){}return function(e){var r;return n.prototype=e,r=new n,n.prototype=null,r}}(),u=(o={}).lib={},s=u.Base={extend:function(n){var e=c(this);return n&&e.mixIn(n),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var e in n)n.hasOwnProperty(e)&&(this[e]=n[e]);n.hasOwnProperty("toString")&&(this.toString=n.toString)},clone:function(){return this.init.prototype.extend(this)}},X=u.WordArray=s.extend({init:function(n,r){n=this.words=n||[],this.sigBytes=r!=e?r:4*n.length},toString:function(n){return(n||K).stringify(this)},concat:function(n){var e,r,t,a=this.words,i=n.words,c=this.sigBytes,o=n.sigBytes;if(this.clamp(),c%4)for(e=0;e<o;e++)r=i[e>>>2]>>>24-e%4*8&255,a[c+e>>>2]|=r<<24-(c+e)%4*8;else for(t=0;t<o;t+=4)a[c+t>>>2]=i[t>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=n.ceil(r/4)},clone:function(){var n=s.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){var e,r=[];for(e=0;e<n;e+=4)r.push(i());return new X.init(r,n)}}),P=o.enc={},K=P.Hex={stringify:function(n){var e,r,t=n.words,a=n.sigBytes,i=[];for(e=0;e<a;e++)r=t[e>>>2]>>>24-e%4*8&255,i.push((r>>>4).toString(16)),i.push((15&r).toString(16));return i.join("")},parse:function(n){var e,r=n.length,t=[];for(e=0;e<r;e+=2)t[e>>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new X.init(t,r/2)}},l=P.Latin1={stringify:function(n){var e,r,t=n.words,a=n.sigBytes,i=[];for(e=0;e<a;e++)r=t[e>>>2]>>>24-e%4*8&255,i.push(String.fromCharCode(r));return i.join("")},parse:function(n){var e,r=n.length,t=[];for(e=0;e<r;e++)t[e>>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new X.init(t,r)}},m=P.Utf8={stringify:function(n){try{return decodeURIComponent(escape(l.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return l.parse(unescape(encodeURIComponent(n)))}},f=u.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new X.init,this.c0e=0},sBn:function(n){"string"==typeof n&&(n=m.parse(n)),this._data.concat(n),this.c0e+=n.sigBytes},_process:function(e){var r,t,a,i,c=this._data,o=c.words,u=c.sigBytes,s=this.blockSize,P=4*s,K=u/P;if(t=(K=e?n.ceil(K):n.max((0|K)-this.i0e,0))*s,a=n.min(4*t,u),t){for(i=0;i<t;i+=s)this.o0e(o,i);r=o.splice(0,t),c.sigBytes-=a}return new X.init(r,a)},clone:function(){var n=s.clone.call(this);return n._data=this._data.clone(),n},i0e:0}),d=u.Hasher=f.extend({cfg:s.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset()},reset:function(){f.reset.call(this),this.u0e()},update:function(n){return this.sBn(n),this._process(),this},finalize:function(n){var e;return n&&this.sBn(n),this.s0e()},blockSize:16,X0e:function(n){return function(e,r){return new n.init(r).finalize(e)}},P0e:function(n){return function(e,r){return new h.HMAC.init(n,r).finalize(e)}}}),h=o.algo={},o}(Math);return n},n.exports=e=i()}).call(this,r(43))},function(n,e,r){var t=r(0),a=r(44).f,i=r(28),c=r(29),o=r(145),u=r(202),s=r(205);n.exports=function(n,e){var r,X,P,K,l,m,f=n.target,d=n.global,h=n.stat;if(X=d?t:h?t[f]||o(f,{}):(t[f]||{}).prototype)for(P in e){if(l=e[P],K=n.noTargetGet?(m=a(X,P))&&m.value:X[P],!(r=s(d?P:f+(h?".":"#")+P,n.forced))&&void 0!==K){if(typeof l==typeof K)continue;u(l,K)}(n.sham||K&&K.sham)&&i(l,"sham",!0),c(X,P,l,n)}}},function(n,e,r){"use strict";var t,a,i,c=r(238),o=r(10),u=r(0),s=r(8),X=r(14),P=r(15),K=r(61),l=r(112),m=r(28),f=r(29),d=r(18).f,h=r(36),g=r(97),A=r(99),v=r(6),C=r(115),W=u.Int8Array,b=W&&W.prototype,y=u.Uint8ClampedArray,N=y&&y.prototype,B=W&&g(W),p=b&&g(b),O=Object.prototype,w=u.TypeError,k=v("toStringTag"),x=C("TYPED_ARRAY_TAG"),T=C("TYPED_ARRAY_CONSTRUCTOR"),U=c&&!!A&&"Opera"!==K(u.opera),Y=!1,R={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},S={BigInt64Array:8,BigUint64Array:8},E=function n(e){if(!X(e))return!1;var r=K(e);return"DataView"===r||P(R,r)||P(S,r)},V=function(n){if(!X(n))return!1;var e=K(n);return P(R,e)||P(S,e)},L=function(n){if(V(n))return n;throw w("Target is not a typed array")},F=function(n){if(s(n)&&(!A||h(B,n)))return n;throw w(l(n)+" is not a typed array constructor")},D=function(n,e,r){var t,a;if(o){if(r)for(t in R)if((a=u[t])&&P(a.prototype,n))try{delete a.prototype[n]}catch(n){}p[n]&&!r||f(p,n,r?e:U&&b[n]||e)}},q=function(n,e,r){var t,a;if(o){if(A){if(r)for(t in R)if((a=u[t])&&P(a,n))try{delete a[n]}catch(n){}if(B[n]&&!r)return;try{return f(B,n,r?e:U&&B[n]||e)}catch(n){}}for(t in R)!(a=u[t])||a[n]&&!r||f(a,n,e)}};for(t in R)(i=(a=u[t])&&a.prototype)?m(i,T,a):U=!1;for(t in S)(i=(a=u[t])&&a.prototype)&&m(i,T,a);if((!U||!s(B)||B===Function.prototype)&&(B=function n(){throw w("Incorrect invocation")},U))for(t in R)u[t]&&A(u[t],B);if((!U||!p||p===O)&&(p=B.prototype,U))for(t in R)u[t]&&A(u[t].prototype,p);if(U&&g(N)!==p&&A(N,p),o&&!P(p,k))for(t in Y=!0,d(p,k,{get:function(){return X(this)?this[x]:void 0}}),R)u[t]&&m(u[t],x,t);n.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_CONSTRUCTOR:T,TYPED_ARRAY_TAG:Y&&x,aTypedArray:L,aTypedArrayConstructor:F,exportTypedArrayMethod:D,exportTypedArrayStaticMethod:q,isView:E,isTypedArray:V,TypedArray:B,TypedArrayPrototype:p}},function(n,e,r){var t=r(0),a=r(113),i=r(15),c=r(115),o=r(143),u=r(200),s=a("wks"),X=t.Symbol,P=X&&X.for,K=u?X:X&&X.withoutSetter||c;n.exports=function(n){if(!i(s,n)||!o&&"string"!=typeof s[n]){var e="Symbol."+n;o&&i(X,n)?s[n]=X[n]:s[n]=u&&P?P(e):K(e)}return s[n]}},function(n,e){var r=n.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},function(n,e){n.exports=function(n){return"function"==typeof n}},function(n,e,r){var t=r(19),a=r(7),i=r(33),c=r(42),o=r(54),u="prototype",s=function(n,e,r){var X,P,K,l=n&s.F,m=n&s.G,f=n&s.S,d=n&s.P,h=n&s.B,g=n&s.W,A=m?a:a[e]||(a[e]={}),v=A[u],C=m?t:f?t[e]:(t[e]||{})[u];for(X in m&&(r=e),r)(P=!l&&C&&void 0!==C[X])&&o(A,X)||(K=P?C[X]:r[X],A[X]=m&&"function"!=typeof C[X]?r[X]:h&&P?i(K,t):g&&C[X]==K?function(n){var e=function(e,r,t){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(e);case 2:return new n(e,r)}return new n(e,r,t)}return n.apply(this,arguments)};return e[u]=n[u],e}(K):d&&"function"==typeof K?i(Function.call,K):K,d&&((A.virtual||(A.virtual={}))[X]=K,n&s.R&&v&&!v[X]&&c(v,X,K)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,n.exports=s},function(n,e,r){var t=r(2);n.exports=!t((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(n,e){var r=Function.prototype.call;n.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(n,e,r){var t=r(0),a=r(14),i=t.String,c=t.TypeError;n.exports=function(n){if(a(n))return n;throw c(i(n)+" is not an object")}},function(n,e,r){var t,a,i;t=this,a=function(n){n.lib.Cipher||function(e){var r=n,t=r.lib,a=t.Base,i=t.WordArray,c=t.BufferedBlockAlgorithm,o=r.enc,u=o.Utf8,s=o.Base64,X=r.algo,P=X.EvpKDF,K=t.Cipher=c.extend({cfg:a.extend(),createEncryptor:function(n,e){return this.create(this.l0e,n,e)},createDecryptor:function(n,e){return this.create(this.m0e,n,e)},init:function(n,e,r){this.cfg=this.cfg.extend(r),this.f0e=n,this.Kyn=e,this.reset()},reset:function(){c.reset.call(this),this.u0e()},process:function(n){return this.sBn(n),this._process()},finalize:function(n){var e;return n&&this.sBn(n),this.s0e()},keySize:4,ivSize:4,l0e:1,m0e:2,X0e:function(){function n(n){return"string"==typeof n?B:b}return function(e){return{encrypt:function(r,t,a){return n(t).encrypt(e,r,t,a)},decrypt:function(r,t,a){return n(t).decrypt(e,r,t,a)}}}}()}),l=t.StreamCipher=K.extend({s0e:function(){var n;return this._process(!0)},blockSize:1}),m=r.mode={},f=t.BlockCipherMode=a.extend({createEncryptor:function(n,e){return this.Encryptor.create(n,e)},createDecryptor:function(n,e){return this.Decryptor.create(n,e)},init:function(n,e){this.d0e=n,this._iv=e}}),d=m.CBC=function(){var n=f.extend();function r(n,r,t){var a,i,c=this._iv;for(c?(a=c,this._iv=e):a=this.K0e,i=0;i<t;i++)n[r+i]^=a[i]}return n.Encryptor=n.extend({processBlock:function(n,e){var t=this.d0e,a=t.blockSize;r.call(this,n,e,a),t.encryptBlock(n,e),this.K0e=n.slice(e,e+a)}}),n.Decryptor=n.extend({processBlock:function(n,e){var t=this.d0e,a=t.blockSize,i=n.slice(e,e+a);t.decryptBlock(n,e),r.call(this,n,e,a),this.K0e=i}}),n}(),h=r.pad={},g=h.Pkcs7={pad:function(n,e){var r,t,a=4*e,c=a-n.sigBytes%a,o=c<<24|c<<16|c<<8|c,u=[];for(r=0;r<c;r+=4)u.push(o);t=i.create(u,c),n.concat(t)},unpad:function(n){var e=255&n.words[n.sigBytes-1>>>2];n.sigBytes-=e}},A=t.BlockCipher=K.extend({cfg:K.cfg.extend({mode:d,padding:g}),reset:function(){var n,e,r,t;K.reset.call(this),r=(e=this.cfg).iv,t=e.mode,this.f0e==this.l0e?n=t.createEncryptor:(n=t.createDecryptor,this.i0e=1),this._mode&&this._mode.g0e==n?this._mode.init(this,r&&r.words):(this._mode=n.call(t,this,r&&r.words),this._mode.g0e=n)},o0e:function(n,e){this._mode.processBlock(n,e)},s0e:function(){var n,e=this.cfg.padding;return this.f0e==this.l0e?(e.pad(this._data,this.blockSize),n=this._process(!0)):(n=this._process(!0),e.unpad(n)),n},blockSize:4}),v=t.CipherParams=a.extend({init:function(n){this.mixIn(n)},toString:function(n){return(n||this.formatter).stringify(this)}}),C=r.format={},W=C.OpenSSL={stringify:function(n){var e,r=n.ciphertext,t=n.salt;return(e=t?i.create([1398893684,1701076831]).concat(t).concat(r):r).toString(s)},parse:function(n){var e,r=s.parse(n),t=r.words;return 1398893684==t[0]&&1701076831==t[1]&&(e=i.create(t.slice(2,4)),t.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},b=t.SerializableCipher=a.extend({cfg:a.extend({format:W}),encrypt:function(n,e,r,t){var a,i,c;return t=this.cfg.extend(t),i=(a=n.createEncryptor(r,t)).finalize(e),c=a.cfg,v.create({ciphertext:i,key:r,iv:c.iv,algorithm:n,mode:c.mode,padding:c.padding,blockSize:n.blockSize,formatter:t.format})},decrypt:function(n,e,r,t){var a;return t=this.cfg.extend(t),e=this.Ost(e,t.format),n.createDecryptor(r,t).finalize(e.ciphertext)},Ost:function(n,e){return"string"==typeof n?e.parse(n,this):n}}),y=r.kdf={},N=y.OpenSSL={execute:function(n,e,r,t){var a,c;return t||(t=i.random(8)),a=P.create({keySize:e+r}).compute(n,t),c=i.create(a.words.slice(e),4*r),a.sigBytes=4*e,v.create({key:a,iv:c,salt:t})}},B=t.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:N}),encrypt:function(n,e,r,t){var a,i;return a=(t=this.cfg.extend(t)).kdf.execute(r,n.keySize,n.ivSize),t.iv=a.iv,(i=b.encrypt.call(this,n,e,a.key,t)).mixIn(a),i},decrypt:function(n,e,r,t){var a,i;return t=this.cfg.extend(t),e=this.Ost(e,t.format),a=t.kdf.execute(r,n.keySize,n.ivSize,e.salt),t.iv=a.iv,i=b.decrypt.call(this,n,e,a.key,t)}})}()},n.exports=e=a(r(3),r(52))},function(n,e,r){var t=r(8);n.exports=function(n){return"object"==typeof n?null!==n:t(n)}},function(n,e,r){var t=r(1),a=r(16),i=t({}.hasOwnProperty);n.exports=Object.hasOwn||function n(e,r){return i(a(e),r)}},function(n,e,r){var t=r(0),a=r(34),i=t.Object;n.exports=function(n){return i(a(n))}},function(n,e,r){"use strict";(function(n){var t,a,i=r(141),c=r(297),o=r(198);function u(){try{var n=new Uint8Array(1);return n.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===n.foo()&&"function"==typeof n.subarray&&0===n.subarray(1,1).byteLength}catch(n){return!1}}function s(){return P.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function X(n,e){if(s()<e)throw new RangeError("Invalid typed array length");return P.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=P.prototype:(null===n&&(n=new P(e)),n.length=e),n}function P(n,e,r){if(!(P.TYPED_ARRAY_SUPPORT||this instanceof P))return new P(n,e,r);if("number"==typeof n){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,n)}return K(this,n,e,r)}function K(n,e,r,t){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?g(n,e,r,t):"string"==typeof e?d(n,e,r):A(n,e)}function l(n){if("number"!=typeof n)throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function m(n,e,r,t){return l(e),e<=0?X(n,e):void 0!==r?"string"==typeof t?X(n,e).fill(r,t):X(n,e).fill(r):X(n,e)}function f(n,e){if(l(e),n=X(n,e<0?0:0|v(e)),!P.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)n[r]=0;return n}function d(n,e,r){var t,a;if("string"==typeof r&&""!==r||(r="utf8"),!P.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');return(a=(n=X(n,t=0|W(e,r))).write(e,r))!==t&&(n=n.slice(0,a)),n}function h(n,e){var r,t=e.length<0?0:0|v(e.length);for(n=X(n,t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function g(n,e,r,t){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(t||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===t?new Uint8Array(e):void 0===t?new Uint8Array(e,r):new Uint8Array(e,r,t),P.TYPED_ARRAY_SUPPORT?(n=e).__proto__=P.prototype:n=h(n,e),n}function A(n,e){if(P.isBuffer(e)){var r=0|v(e.length);return 0===(n=X(n,r)).length||e.copy(n,0,0,r),n}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||en(e.length)?X(n,0):h(n,e);if("Buffer"===e.type&&o(e.data))return h(n,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(n){if(n>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|n}function C(n){return+n!=n&&(n=0),P.alloc(+n)}function W(n,e){var r,t;if(P.isBuffer(n))return n.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;if("string"!=typeof n&&(n=""+n),0===(r=n.length))return 0;for(t=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(n).length;default:if(t)return Z(n).length;e=(""+e).toLowerCase(),t=!0}}function b(n,e,r){var t=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return V(this,e,r);case"utf8":case"utf-8":return Y(this,e,r);case"ascii":return S(this,e,r);case"latin1":case"binary":return E(this,e,r);case"base64":return U(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(t)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),t=!0}}function y(n,e,r){var t=n[e];n[e]=n[r],n[r]=t}function N(n,e,r,t,a){if(0===n.length)return-1;if("string"==typeof r?(t=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:n.length-1),r<0&&(r=n.length+r),r>=n.length){if(a)return-1;r=n.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=P.from(e,t)),P.isBuffer(e))return 0===e.length?-1:B(n,e,r,t,a);if("number"==typeof e)return e&=255,P.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(n,e,r):Uint8Array.prototype.lastIndexOf.call(n,e,r):B(n,[e],r,t,a);throw new TypeError("val must be string, number or Buffer")}function B(n,e,r,t,a){var i,c,o,u,s=1,X=n.length,P=e.length;if(void 0!==t&&("ucs2"===(t=String(t).toLowerCase())||"ucs-2"===t||"utf16le"===t||"utf-16le"===t)){if(n.length<2||e.length<2)return-1;s=2,X/=2,P/=2,r/=2}function K(n,e){return 1===s?n[e]:n.readUInt16BE(e*s)}if(a)for(c=-1,i=r;i<X;i++)if(K(n,i)===K(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===P)return c*s}else-1!==c&&(i-=i-c),c=-1;else for(r+P>X&&(r=X-P),i=r;i>=0;i--){for(o=!0,u=0;u<P;u++)if(K(n,i+u)!==K(e,u)){o=!1;break}if(o)return i}return-1}function p(n,e,r,t){var a,i,c,o;if(r=Number(r)||0,a=n.length-r,t?(t=Number(t))>a&&(t=a):t=a,(i=e.length)%2!=0)throw new TypeError("Invalid hex string");for(t>i/2&&(t=i/2),c=0;c<t;++c){if(o=parseInt(e.substr(2*c,2),16),isNaN(o))return c;n[r+c]=o}return c}function O(n,e,r,t){return nn(Z(e,n.length-r),n,r,t)}function w(n,e,r,t){return nn(Q(e),n,r,t)}function k(n,e,r,t){return w(n,e,r,t)}function x(n,e,r,t){return nn($(e),n,r,t)}function T(n,e,r,t){return nn(_(e,n.length-r),n,r,t)}function U(n,e,r){return 0===e&&r===n.length?i.fromByteArray(n):i.fromByteArray(n.slice(e,r))}function Y(n,e,r){var t,a,i,c,o,u,s,X,P;for(r=Math.min(n.length,r),t=[],a=e;a<r;){if(c=null,a+(o=(i=n[a])>239?4:i>223?3:i>191?2:1)<=r)switch(o){case 1:i<128&&(c=i);break;case 2:128==(192&(u=n[a+1]))&&(P=(31&i)<<6|63&u)>127&&(c=P);break;case 3:u=n[a+1],s=n[a+2],128==(192&u)&&128==(192&s)&&(P=(15&i)<<12|(63&u)<<6|63&s)>2047&&(P<55296||P>57343)&&(c=P);break;case 4:u=n[a+1],s=n[a+2],X=n[a+3],128==(192&u)&&128==(192&s)&&128==(192&X)&&(P=(15&i)<<18|(63&u)<<12|(63&s)<<6|63&X)>65535&&P<1114112&&(c=P)}null===c?(c=65533,o=1):c>65535&&(c-=65536,t.push(c>>>10&1023|55296),c=56320|1023&c),t.push(c),a+=o}return R(t)}function R(n){var e,r,a=n.length;if(a<=t)return String.fromCharCode.apply(String,n);for(e="",r=0;r<a;)e+=String.fromCharCode.apply(String,n.slice(r,r+=t));return e}function S(n,e,r){var t,a="";for(r=Math.min(n.length,r),t=e;t<r;++t)a+=String.fromCharCode(127&n[t]);return a}function E(n,e,r){var t,a="";for(r=Math.min(n.length,r),t=e;t<r;++t)a+=String.fromCharCode(n[t]);return a}function V(n,e,r){var t,a,i=n.length;for((!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i),t="",a=e;a<r;++a)t+=H(n[a]);return t}function L(n,e,r){var t,a=n.slice(e,r),i="";for(t=0;t<a.length;t+=2)i+=String.fromCharCode(a[t]+256*a[t+1]);return i}function F(n,e,r){if(n%1!=0||n<0)throw new RangeError("offset is not uint");if(n+e>r)throw new RangeError("Trying to access beyond buffer length")}function D(n,e,r,t,a,i){if(!P.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||e<i)throw new RangeError('"value" argument is out of bounds');if(r+t>n.length)throw new RangeError("Index out of range")}function q(n,e,r,t){e<0&&(e=65535+e+1);for(var a=0,i=Math.min(n.length-r,2);a<i;++a)n[r+a]=(e&255<<8*(t?a:1-a))>>>8*(t?a:1-a)}function M(n,e,r,t){e<0&&(e=4294967295+e+1);for(var a=0,i=Math.min(n.length-r,4);a<i;++a)n[r+a]=e>>>8*(t?a:3-a)&255}function j(n,e,r,t,a,i){if(r+t>n.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(n,e,r,t,a){return a||j(n,e,r,4,34028234663852886e22,-34028234663852886e22),c.write(n,e,r,t,23,4),r+4}function z(n,e,r,t,a){return a||j(n,e,r,8,17976931348623157e292,-17976931348623157e292),c.write(n,e,r,t,52,8),r+8}function G(n){if((n=J(n).replace(a,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}function J(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function H(n){return n<16?"0"+n.toString(16):n.toString(16)}function Z(n,e){var r,t,a,i,c;for(e=e||1/0,t=n.length,a=null,i=[],c=0;c<t;++c){if((r=n.charCodeAt(c))>55295&&r<57344){if(!a){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(c+1===t){(e-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(e-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Q(n){var e,r=[];for(e=0;e<n.length;++e)r.push(255&n.charCodeAt(e));return r}function _(n,e){var r,t,a,i,c=[];for(i=0;i<n.length&&!((e-=2)<0);++i)t=(r=n.charCodeAt(i))>>8,a=r%256,c.push(a),c.push(t);return c}function $(n){return i.toByteArray(G(n))}function nn(n,e,r,t){for(var a=0;a<t&&!(a+r>=e.length||a>=n.length);++a)e[a+r]=n[a];return a}function en(n){return n!=n}e.Buffer=P,e.SlowBuffer=C,e.INSPECT_MAX_BYTES=50,P.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:u(),e.kMaxLength=s(),P.poolSize=8192,P.Zen=function(n){return n.__proto__=P.prototype,n},P.from=function(n,e,r){return K(null,n,e,r)},P.TYPED_ARRAY_SUPPORT&&(P.prototype.__proto__=Uint8Array.prototype,P.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&P[Symbol.species]===P&&Object.defineProperty(P,Symbol.species,{value:null,configurable:!0})),P.alloc=function(n,e,r){return m(null,n,e,r)},P.allocUnsafe=function(n){return f(null,n)},P.allocUnsafeSlow=function(n){return f(null,n)},P.isBuffer=function n(e){return!(null==e||!e.bin)},P.compare=function n(e,r){var t,a,i,c;if(!P.isBuffer(e)||!P.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(t=e.length,a=r.length,i=0,c=Math.min(t,a);i<c;++i)if(e[i]!==r[i]){t=e[i],a=r[i];break}return t<a?-1:a<t?1:0},P.isEncoding=function n(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},P.concat=function n(e,r){var t,a,i,c;if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return P.alloc(0);if(void 0===r)for(r=0,t=0;t<e.length;++t)r+=e[t].length;for(a=P.allocUnsafe(r),i=0,t=0;t<e.length;++t){if(c=e[t],!P.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(a,i),i+=c.length}return a},P.byteLength=W,P.prototype.bin=!0,P.prototype.swap16=function n(){var e,r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(e=0;e<r;e+=2)y(this,e,e+1);return this},P.prototype.swap32=function n(){var e,r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(e=0;e<r;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},P.prototype.swap64=function n(){var e,r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(e=0;e<r;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},P.prototype.toString=function n(){var e=0|this.length;return 0===e?"":0===arguments.length?Y(this,0,e):b.apply(this,arguments)},P.prototype.equals=function n(e){if(!P.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===P.compare(this,e)},P.prototype.inspect=function n(){var r="",t=e.INSPECT_MAX_BYTES;return this.length>0&&(r=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(r+=" ... ")),"<Buffer "+r+">"},P.prototype.compare=function n(e,r,t,a,i){var c,o,u,s,X,K;if(!P.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===t&&(t=e?e.length:0),void 0===a&&(a=0),void 0===i&&(i=this.length),r<0||t>e.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=t)return 0;if(a>=i)return-1;if(r>=t)return 1;if(this===e)return 0;for(c=(i>>>=0)-(a>>>=0),o=(t>>>=0)-(r>>>=0),u=Math.min(c,o),s=this.slice(a,i),X=e.slice(r,t),K=0;K<u;++K)if(s[K]!==X[K]){c=s[K],o=X[K];break}return c<o?-1:o<c?1:0},P.prototype.includes=function n(e,r,t){return-1!==this.indexOf(e,r,t)},P.prototype.indexOf=function n(e,r,t){return N(this,e,r,t,!0)},P.prototype.lastIndexOf=function n(e,r,t){return N(this,e,r,t,!1)},P.prototype.write=function n(e,r,t,a){var i,c;if(void 0===r)a="utf8",t=this.length,r=0;else if(void 0===t&&"string"==typeof r)a=r,t=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(t)?(t|=0,void 0===a&&(a="utf8")):(a=t,t=void 0)}if(i=this.length-r,(void 0===t||t>i)&&(t=i),e.length>0&&(t<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");for(a||(a="utf8"),c=!1;;)switch(a){case"hex":return p(this,e,r,t);case"utf8":case"utf-8":return O(this,e,r,t);case"ascii":return w(this,e,r,t);case"latin1":case"binary":return k(this,e,r,t);case"base64":return x(this,e,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r,t);default:if(c)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),c=!0}},P.prototype.toJSON=function n(){return{type:"Buffer",data:Array.prototype.slice.call(this.X$r||this,0)}},t=4096,P.prototype.slice=function n(e,r){var t,a,i,c=this.length;if((e=~~e)<0?(e+=c)<0&&(e=0):e>c&&(e=c),(r=void 0===r?c:~~r)<0?(r+=c)<0&&(r=0):r>c&&(r=c),r<e&&(r=e),P.TYPED_ARRAY_SUPPORT)(t=this.subarray(e,r)).__proto__=P.prototype;else for(t=new P(a=r-e,void 0),i=0;i<a;++i)t[i]=this[i+e];return t},P.prototype.readUIntLE=function n(e,r,t){var a,i,c;for(e|=0,r|=0,t||F(e,r,this.length),a=this[e],i=1,c=0;++c<r&&(i*=256);)a+=this[e+c]*i;return a},P.prototype.readUIntBE=function n(e,r,t){var a,i;for(e|=0,r|=0,t||F(e,r,this.length),a=this[e+--r],i=1;r>0&&(i*=256);)a+=this[e+--r]*i;return a},P.prototype.readUInt8=function n(e,r){return r||F(e,1,this.length),this[e]},P.prototype.readUInt16LE=function n(e,r){return r||F(e,2,this.length),this[e]|this[e+1]<<8},P.prototype.readUInt16BE=function n(e,r){return r||F(e,2,this.length),this[e]<<8|this[e+1]},P.prototype.readUInt32LE=function n(e,r){return r||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},P.prototype.readUInt32BE=function n(e,r){return r||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},P.prototype.readIntLE=function n(e,r,t){var a,i,c;for(e|=0,r|=0,t||F(e,r,this.length),a=this[e],i=1,c=0;++c<r&&(i*=256);)a+=this[e+c]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*r)),a},P.prototype.readIntBE=function n(e,r,t){var a,i,c;for(e|=0,r|=0,t||F(e,r,this.length),a=r,i=1,c=this[e+--a];a>0&&(i*=256);)c+=this[e+--a]*i;return c>=(i*=128)&&(c-=Math.pow(2,8*r)),c},P.prototype.readInt8=function n(e,r){return r||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},P.prototype.readInt16LE=function n(e,r){r||F(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},P.prototype.readInt16BE=function n(e,r){r||F(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},P.prototype.readInt32LE=function n(e,r){return r||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},P.prototype.readInt32BE=function n(e,r){return r||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},P.prototype.readFloatLE=function n(e,r){return r||F(e,4,this.length),c.read(this,e,!0,23,4)},P.prototype.readFloatB