/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var Bp=Object.create;var Ra=Object.defineProperty,Up=Object.defineProperties,zp=Object.getOwnPropertyDescriptor,Hp=Object.getOwnPropertyDescriptors,Wp=Object.getOwnPropertyNames,$f=Object.getOwnPropertySymbols,Vp=Object.getPrototypeOf,Zf=Object.prototype.hasOwnProperty,Xp=Object.prototype.propertyIsEnumerable;var qf=(e,r,t)=>r in e?Ra(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Er=(e,r)=>{for(var t in r||(r={}))Zf.call(r,t)&&qf(e,t,r[t]);if($f)for(var t of $f(r))Xp.call(r,t)&&qf(e,t,r[t]);return e},rn=(e,r)=>Up(e,Hp(r));var Gf=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),$p=(e,r)=>{for(var t in r)Ra(e,t,{get:r[t],enumerable:!0})},Yf=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Wp(r))!Zf.call(e,i)&&i!==t&&Ra(e,i,{get:()=>r[i],enumerable:!(n=zp(r,i))||n.enumerable});return e};var _s=(e,r,t)=>(t=e!=null?Bp(Vp(e)):{},Yf(r||!e||!e.__esModule?Ra(t,"default",{value:e,enumerable:!0}):t,e)),qp=e=>Yf(Ra({},"__esModule",{value:!0}),e);var wn=(e,r,t)=>new Promise((n,i)=>{var u=p=>{try{m(t.next(p))}catch(g){i(g)}},l=p=>{try{m(t.throw(p))}catch(g){i(g)}},m=p=>p.done?n(p.value):Promise.resolve(p.value).then(u,l);m((t=t.apply(e,r)).next())});var Xc=Gf((pd,Vc)=>{(function(e){typeof pd=="object"&&typeof Vc!="undefined"?Vc.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).ExcelJS=e()})(function(){return function e(r,t,n){function i(m,p){if(!t[m]){if(!r[m]){var g=typeof require=="function"&&require;if(!p&&g)return g(m,!0);if(u)return u(m,!0);var v=new Error("Cannot find module '"+m+"'");throw v.code="MODULE_NOT_FOUND",v}var c=t[m]={exports:{}};r[m][0].call(c.exports,function(o){return i(r[m][1][o]||o)},c,c.exports,e,r,t,n)}return t[m].exports}for(var u=typeof require=="function"&&require,l=0;l2&&arguments[2]!==void 0?arguments[2]:0;if(n(this,m),o)if(typeof o=="string"){var s=u.decodeAddress(o);this.nativeCol=s.col+a,this.nativeColOff=0,this.nativeRow=s.row+a,this.nativeRowOff=0}else o.nativeCol!==void 0?(this.nativeCol=o.nativeCol||0,this.nativeColOff=o.nativeColOff||0,this.nativeRow=o.nativeRow||0,this.nativeRowOff=o.nativeRowOff||0):o.col!==void 0?(this.col=o.col+a,this.row=o.row+a):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;this.worksheet=c}var p,g,v;return p=m,v=[{key:"asInstance",value:function(c){return c instanceof m||c==null?c:new m(c)}}],(g=[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(c){this.nativeCol=Math.floor(c),this.nativeColOff=Math.floor((c-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(c){this.nativeRow=Math.floor(c),this.nativeRowOff=Math.floor((c-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(c){this.nativeCol=c.nativeCol,this.nativeColOff=c.nativeColOff,this.nativeRow=c.nativeRow,this.nativeRowOff=c.nativeRowOff}}])&&i(p.prototype,g),v&&i(p,v),m}();r.exports=l},{"../utils/col-cache":19}],3:[function(e,r,t){"use strict";function n(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function i(S,A){for(var k=0;k0||this.type===S.Types.Merge}},{key:"master",get:function(){return this.type===S.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===S.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(A){this.type!==S.Types.Merge?(this._value.release(),this._value=P.create(P.getType(A),this,A)):this._value.master.value=A}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(A){this._comment=new v(A)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return m.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(A){this.names=[A]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(A){var k=this,T=this.workbook.definedNames;T.removeAllNames(this.fullAddress),A.forEach(function(I){T.addEx(k.fullAddress,I)})}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(A){this._dataValidations.add(this.address,A)}},{key:"model",get:function(){var A=this._value.model;return A.style=this.style,this._comment&&(A.comment=this._comment.model),A},set:function(A){if(this._value.release(),this._value=P.create(A.type,this),this._value.model=A,A.comment)switch(A.comment.type){case"note":this._comment=v.fromModel(A.comment)}A.style?this.style=A.style:this.style={}}}]),S}();c.Types=p.ValueType;var o=function(){function S(A){n(this,S),this.model={address:A.address,type:c.Types.Null}}return u(S,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(A){}},{key:"type",get:function(){return c.Types.Null}},{key:"effectiveType",get:function(){return c.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),a=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.Number,value:k}}return u(S,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(A){this.model.value=A}},{key:"type",get:function(){return c.Types.Number}},{key:"effectiveType",get:function(){return c.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),s=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.String,value:k}}return u(S,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(A){this.model.value=A}},{key:"type",get:function(){return c.Types.String}},{key:"effectiveType",get:function(){return c.Types.String}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),d=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.String,value:k}}return u(S,[{key:"toString",value:function(){return this.model.value.richText.map(function(A){return A.text}).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(A){this.model.value=A}},{key:"type",get:function(){return c.Types.RichText}},{key:"effectiveType",get:function(){return c.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),h=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.Date,value:k}}return u(S,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(A){this.model.value=A}},{key:"type",get:function(){return c.Types.Date}},{key:"effectiveType",get:function(){return c.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),y=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.Hyperlink,text:k?k.text:void 0,hyperlink:k?k.hyperlink:void 0},k&&k.tooltip&&(this.model.tooltip=k.tooltip)}return u(S,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var A={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(A.tooltip=this.model.tooltip),A},set:function(A){this.model={text:A.text,hyperlink:A.hyperlink},A.tooltip&&(this.model.tooltip=A.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(A){this.model.text=A}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(A){this.model.hyperlink=A}},{key:"type",get:function(){return c.Types.Hyperlink}},{key:"effectiveType",get:function(){return c.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),b=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.Merge,master:k?k.address:void 0},this._master=k,k&&k.addMergeRef()}return u(S,[{key:"isMergedTo",value:function(A){return A===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(A){A instanceof c?(this._master&&this._master.releaseMergeRef(),A.addMergeRef(),this._master=A):this._master.value=A}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return c.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),w=function(){function S(A,k){n(this,S),this.cell=A,this.model={address:A.address,type:c.Types.Formula,shareType:k?k.shareType:void 0,ref:k?k.ref:void 0,formula:k?k.formula:void 0,sharedFormula:k?k.sharedFormula:void 0,result:k?k.result:void 0}}return u(S,[{key:"_copyModel",value:function(A){var k={},T=function(I){var E=A[I];E&&(k[I]=E)};return T("formula"),T("result"),T("ref"),T("shareType"),T("sharedFormula"),k}},{key:"validate",value:function(A){switch(P.getType(A)){case c.Types.Null:case c.Types.String:case c.Types.Number:case c.Types.Date:break;case c.Types.Hyperlink:case c.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var A=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=A&&g(A.formula,A.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(A){this.model=this._copyModel(A)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(A){this.model.formula=A}},{key:"formulaType",get:function(){return this.model.formula?p.FormulaType.Master:this.model.sharedFormula?p.FormulaType.Shared:p.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(A){this.model.result=A}},{key:"type",get:function(){return c.Types.Formula}},{key:"effectiveType",get:function(){var A=this.model.result;return A==null?p.ValueType.Null:A instanceof String||typeof A=="string"?p.ValueType.String:typeof A=="number"?p.ValueType.Number:A instanceof Date?p.ValueType.Date:A.text&&A.hyperlink?p.ValueType.Hyperlink:A.formula?p.ValueType.Formula:p.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),x=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.SharedString,value:k}}return u(S,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(A){this.model.value=A}},{key:"type",get:function(){return c.Types.SharedString}},{key:"effectiveType",get:function(){return c.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),_=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.Boolean,value:k}}return u(S,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(A){this.model.value=A}},{key:"type",get:function(){return c.Types.Boolean}},{key:"effectiveType",get:function(){return c.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),C=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.Error,value:k}}return u(S,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(A){this.model.value=A}},{key:"type",get:function(){return c.Types.Error}},{key:"effectiveType",get:function(){return c.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),R=function(){function S(A,k){n(this,S),this.model={address:A.address,type:c.Types.String,value:JSON.stringify(k),rawValue:k}}return u(S,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(A){this.model.rawValue=A,this.model.value=JSON.stringify(A)}},{key:"type",get:function(){return c.Types.String}},{key:"effectiveType",get:function(){return c.Types.String}},{key:"address",get:function(){return this.model.address},set:function(A){this.model.address=A}}]),S}(),P={getType:function(S){return S==null?c.Types.Null:S instanceof String||typeof S=="string"?c.Types.String:typeof S=="number"?c.Types.Number:typeof S=="boolean"?c.Types.Boolean:S instanceof Date?c.Types.Date:S.text&&S.hyperlink?c.Types.Hyperlink:S.formula||S.sharedFormula?c.Types.Formula:S.richText?c.Types.RichText:S.sharedString?c.Types.SharedString:S.error?c.Types.Error:c.Types.JSON},types:[{t:c.Types.Null,f:o},{t:c.Types.Number,f:a},{t:c.Types.String,f:s},{t:c.Types.Date,f:h},{t:c.Types.Hyperlink,f:y},{t:c.Types.Formula,f:w},{t:c.Types.Merge,f:b},{t:c.Types.JSON,f:R},{t:c.Types.SharedString,f:x},{t:c.Types.RichText,f:d},{t:c.Types.Boolean,f:_},{t:c.Types.Error,f:C}].reduce(function(S,A){return S[A.t]=A.f,S},[]),create:function(S,A,k){var T=this.types[S];if(!T)throw new Error("Could not create Value of type ".concat(S));return new T(A,k)}};r.exports=c},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(e,r,t){"use strict";function n(p,g){for(var v=0;v=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var o=this.style;return!o||!(o.font||o.numFmt||o.alignment||o.border||o.fill||o.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var o=[];return this.eachCell(function(a,s){a&&a.type!==u.ValueType.Null&&(o[s]=a.value)}),o},set:function(o){var a=this;if(o){var s=this.number,d=0;o.hasOwnProperty("0")&&(d=1),o.forEach(function(h,y){a._worksheet.getCell(y+d,s).value=h})}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(o){this._applyStyle("numFmt",o)}},{key:"font",get:function(){return this.style.font},set:function(o){this._applyStyle("font",o)}},{key:"alignment",get:function(){return this.style.alignment},set:function(o){this._applyStyle("alignment",o)}},{key:"protection",get:function(){return this.style.protection},set:function(o){this._applyStyle("protection",o)}},{key:"border",get:function(){return this.style.border},set:function(o){this._applyStyle("border",o)}},{key:"fill",get:function(){return this.style.fill},set:function(o){this._applyStyle("fill",o)}}])&&n(g.prototype,v),c&&n(g,c),p}();r.exports=m},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(e,r,t){"use strict";function n(u,l){for(var m=0;mthis.bottom)&&(this.bottom=a),(!this.model.right||s>this.right)&&(this.right=s)}},{key:"expandRow",value:function(c){if(c){var o=c.dimensions,a=c.number;o&&this.expand(a,o.min,a,o.max)}}},{key:"expandToAddress",value:function(c){var o=u.decodeEx(c);this.expand(o.row,o.col,o.row,o.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(c){return!(c.sheetName&&this.sheetName&&c.sheetName!==this.sheetName||c.bottomthis.bottom||c.rightthis.right)}},{key:"contains",value:function(c){var o=u.decodeEx(c);return this.containsEx(o)}},{key:"containsEx",value:function(c){return(!c.sheetName||!this.sheetName||c.sheetName===this.sheetName)&&c.row>=this.top&&c.row<=this.bottom&&c.col>=this.left&&c.col<=this.right}},{key:"forEachAddress",value:function(c){for(var o=this.left;o<=this.right;o++)for(var a=this.top;a<=this.bottom;a++)c(u.encodeAddress(a,o),a,o)}},{key:"top",get:function(){return this.model.top||1},set:function(c){this.model.top=c}},{key:"left",get:function(){return this.model.left||1},set:function(c){this.model.left=c}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(c){this.model.bottom=c}},{key:"right",get:function(){return this.model.right||1},set:function(c){this.model.right=c}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(c){this.model.sheetName=c}},{key:"_serialisedSheetName",get:function(){var c=this.model.sheetName;return c?/^[a-zA-Z0-9]*$/.test(c)?"".concat(c,"!"):"'".concat(c,"'!"):""}},{key:"tl",get:function(){return u.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(u.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return u.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(u.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}])&&i(p.prototype,g),v&&i(p,v),m}();r.exports=l},{"../utils/col-cache":19}],11:[function(e,r,t){"use strict";function n(g,v){for(var c=0;c2?h-2:0),b=2;b0)for(w=R;w>=d;w--)(x=this._cells[w-1])?((_=this.getCell(w+C)).value=x.value,_.style=x.style,_._comment=x._comment):this._cells[w+C-1]=void 0;for(w=0;wd.col)&&(a=d.col),s0?{min:a,max:s}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(a){this._applyStyle("numFmt",a)}},{key:"font",get:function(){return this.style.font},set:function(a){this._applyStyle("font",a)}},{key:"alignment",get:function(){return this.style.alignment},set:function(a){this._applyStyle("alignment",a)}},{key:"protection",get:function(){return this.style.protection},set:function(a){this._applyStyle("protection",a)}},{key:"border",get:function(){return this.style.border},set:function(a){this._applyStyle("border",a)}},{key:"fill",get:function(){return this.style.fill},set:function(a){this._applyStyle("fill",a)}},{key:"hidden",get:function(){return!!this._hidden},set:function(a){this._hidden=a}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(a){this._outlineLevel=a}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var a=[],s=0,d=0;return this._cells.forEach(function(h){if(h){var y=h.model;y&&((!s||s>h.col)&&(s=h.col),d0,"Table must be on valid row"),a(h>0,"Table must be on valid col");var y=this.width,b=this.filterHeight,w=this.tableHeight;c.autoFilterRef=l.encode(d,h,d+b-1,h+y-1),c.tableRef=l.encode(d,h,d+w-1,h+y-1),c.columns.forEach(function(x,_){a(x.name,"Column ".concat(_," must have a name")),_===0?o(x,"totalsRowLabel","Total"):(o(x,"totalsRowFunction","none"),x.totalsRowFormula=v.getFormula(x))})}},{key:"store",value:function(){var v=this,c=function(x,_){_&&Object.keys(_).forEach(function(C){x[C]=_[C]})},o=this.worksheet,a=this.table,s=a.tl,d=s.row,h=s.col,y=0;if(a.headerRow){var b=o.getRow(d+y++);a.columns.forEach(function(x,_){var C=x.style,R=x.name,P=b.getCell(h+_);P.value=R,c(P,C)})}if(a.rows.forEach(function(x){var _=o.getRow(d+y++);x.forEach(function(C,R){var P=_.getCell(h+R);P.value=C,c(P,a.columns[R].style)})}),a.totalsRow){var w=o.getRow(d+y++);a.columns.forEach(function(x,_){var C=w.getCell(h+_);if(_===0)C.value=x.totalsRowLabel;else{var R=v.getFormula(x);C.value=R?{formula:x.totalsRowFormula,result:x.totalsRowResult}:null}c(C,x.style)})}}},{key:"load",value:function(v){var c=this,o=this.table,a=o.tl,s=a.row,d=a.col,h=0;if(o.headerRow){var y=v.getRow(s+h++);o.columns.forEach(function(w,x){y.getCell(d+x).value=w.name})}if(o.rows.forEach(function(w){var x=v.getRow(s+h++);w.forEach(function(_,C){x.getCell(d+C).value=_})}),o.totalsRow){var b=v.getRow(s+h++);o.columns.forEach(function(w,x){var _=b.getCell(d+x);x===0?_.value=w.totalsRowLabel:c.getFormula(w)&&(_.value={formula:w.totalsRowFormula,result:w.totalsRowResult})})}}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var v=l.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(v,c)}},{key:"getColumn",value:function(v){var c=this.table.columns[v];return new m(this,c,v)}},{key:"addColumn",value:function(v,c,o){this.cacheState(),o===void 0?(this.table.columns.push(v),this.table.rows.forEach(function(a,s){a.push(c[s])})):(this.table.columns.splice(o,0,v),this.table.rows.forEach(function(a,s){a.splice(o,0,c[s])}))}},{key:"removeColumns",value:function(v){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(v,c),this.table.rows.forEach(function(o){o.splice(v,c)})}},{key:"_assign",value:function(v,c,o){this.cacheState(),v[c]=o}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(v){this.table=v}},{key:"ref",get:function(){return this.table.ref},set:function(v){this._assign(this.table,"ref",v)}},{key:"name",get:function(){return this.table.name},set:function(v){this.table.name=v}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(v){this.table.displayName=v}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(v){this._assign(this.table,"headerRow",v)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(v){this._assign(this.table,"totalsRow",v)}},{key:"theme",get:function(){return this.table.style.name},set:function(v){this.table.style.name=v}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(v){this.table.style.showFirstColumn=v}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(v){this.table.style.showLastColumn=v}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(v){this.table.style.showRowStripes=v}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(v){this.table.style.showColumnStripes=v}}]),g}();r.exports=p},{"../utils/col-cache":19}],13:[function(e,r,t){"use strict";function n(g,v){for(var c=0;c31&&console.warn("Worksheet name ".concat(a," exceeds 31 chars. This will be truncated")),/[*?:/\\[\]]/.test(a))throw new Error("Worksheet name ".concat(a," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(a))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(a));if(a=(a||"sheet".concat(d)).substring(0,31),this._worksheets.find(function(w){return w&&w.name.toLowerCase()===a.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(a));s&&(typeof s=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),s={properties:{tabColor:{argb:s}}}):(s.argb||s.theme||s.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),s={properties:{tabColor:s}}));var h=this._worksheets.reduce(function(w,x){return(x&&x.orderNo)>w?x.orderNo:w},0),y=Object.assign({},s,{id:d,name:a,orderNo:h+1,workbook:this}),b=new i(y);return this._worksheets[d]=b,b}},{key:"removeWorksheetEx",value:function(a){delete this._worksheets[a.id]}},{key:"removeWorksheet",value:function(a){var s=this.getWorksheet(a);s&&s.destroy()}},{key:"getWorksheet",value:function(a){return a===void 0?this._worksheets.find(Boolean):typeof a=="number"?this._worksheets[a]:typeof a=="string"?this._worksheets.find(function(s){return s&&s.name===a}):void 0}},{key:"eachSheet",value:function(a){this.worksheets.forEach(function(s){a(s,s.id)})}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(a){var s=this.media.length;return this.media.push(Object.assign({},a,{type:"image"})),s}},{key:"getImage",value:function(a){return this.media[a]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new l(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new m(this)),this._csv}},{key:"nextId",get:function(){for(var a=1;ax.length)&&(_=x.length);for(var C=0,R=new Array(_);C<_;C++)R[C]=x[C];return R}function p(x,_){for(var C=0;C<_.length;C++){var R=_[C];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(x,R.key,R)}}var g=e("../utils/under-dash"),v=e("../utils/col-cache"),c=e("./range"),o=e("./row"),a=e("./column"),s=e("./enums"),d=e("./image"),h=e("./table"),y=e("./data-validations"),b=e("../utils/encryptor"),w=function(){function x(P){(function(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")})(this,x),P=P||{},this.id=P.id,this.orderNo=P.orderNo,this.name=P.name||"Sheet".concat(this.id),this.state=P.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this._workbook=P.workbook,this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},P.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!P.pageSetup||!P.pageSetup.fitToWidth&&!P.pageSetup.fitToHeight||P.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},P.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},P.headerFooter),this.dataValidations=new y,this.views=P.views||[],this.autoFilter=P.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}var _,C,R;return _=x,(C=[{key:"destroy",value:function(){this._workbook.removeWorksheetEx(this)}},{key:"getColumnKey",value:function(P){return this._keys[P]}},{key:"setColumnKey",value:function(P,S){this._keys[P]=S}},{key:"deleteColumnKey",value:function(P){delete this._keys[P]}},{key:"eachColumnKey",value:function(P){g.each(this._keys,P)}},{key:"getColumn",value:function(P){if(typeof P=="string"){var S=this._keys[P];if(S)return S;P=v.l2n(P)}if(this._columns||(this._columns=[]),P>this._columns.length)for(var A=this._columns.length+1;A<=P;)this._columns.push(new a(this,A++));return this._columns[P-1]}},{key:"spliceColumns",value:function(P,S){for(var A=this,k=this._rows,T=k.length,I=arguments.length,E=new Array(I>2?I-2:0),O=2;O0)for(var j=function(ee){var ne=[P,S];E.forEach(function(M){ne.push(M[ee]||null)});var te=A.getRow(ee+1);te.splice.apply(te,ne)},L=0;L0)for(var X=U;X>=D;X--)this.getColumn(X+N).defn=this.getColumn(X).defn;for(var Y=P;Y1&&arguments[1]!==void 0?arguments[1]:"n",A=this._nextRow,k=this.getRow(A);return k.values=P,this._setStyleOption(A,S[0]==="i"?S:"n"),k}},{key:"addRows",value:function(P){var S=this,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",k=[];return P.forEach(function(T){k.push(S.addRow(T,A))}),k}},{key:"insertRow",value:function(P,S){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(P,0,S),this._setStyleOption(P,A),this.getRow(P)}},{key:"insertRows",value:function(P,S){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows.apply(this,[P,0].concat(l(S))),A!=="n")for(var k=0;k1&&arguments[1]!==void 0?arguments[1]:"n";S[0]==="o"&&this.findRow(P+1)!==void 0?this._copyStyle(P+1,P,S[1]==="+"):S[0]==="i"&&this.findRow(P-1)!==void 0&&this._copyStyle(P-1,P,S[1]==="+")}},{key:"_copyStyle",value:function(P,S){var A=arguments.length>2&&arguments[2]!==void 0&&arguments[2],k=this.getRow(P),T=this.getRow(S);T.style=Object.freeze(i({},k.style)),k.eachCell({includeEmpty:A},function(I,E){T.getCell(E).style=Object.freeze(i({},I.style))}),T.height=k.height}},{key:"duplicateRow",value:function(P,S){var A=this,k=arguments.length>2&&arguments[2]!==void 0&&arguments[2],T=this._rows[P-1],I=new Array(S).fill(T.values);this.spliceRows.apply(this,[P+1,k?0:S].concat(l(I)));for(var E=function(j){var L=A._rows[P+j];L.style=T.style,L.height=T.height,T.eachCell({includeEmpty:!0},function(N,D){L.getCell(D).style=N.style})},O=0;O2?T-2:0),E=2;E0)for(O=D;O>=k;O--)(j=this._rows[O-1])?function(){var G=A.getRow(O+N);G.values=j.values,G.style=j.style,G.height=j.height,j.eachCell({includeEmpty:!0},function(X,Y){if(G.getCell(Y).style=X.style,X._value.constructor.name==="MergeValue"){var ee=A.getRow(X._row._number+L).getCell(Y),ne=X._value._master,te=A.getRow(ne._row._number+L).getCell(ne._column._number);ee.merge(te)}})}():this._rows[O+N-1]=void 0;for(O=0;OP.top||T>P.left)&&this.getCell(k,T).merge(A,S);this._merges[A.address]=P}},{key:"_unMergeMaster",value:function(P){var S=this._merges[P.address];if(S){for(var A=S.top;A<=S.bottom;A++)for(var k=S.left;k<=S.right;k++)this.getCell(A,k).unmerge();delete this._merges[P.address]}}},{key:"unMergeCells",value:function(){for(var P=arguments.length,S=new Array(P),A=0;A3&&arguments[3]!==void 0?arguments[3]:"shared",I=v.decode(P),E=I.top,O=I.left,j=I.bottom,L=I.right,N=L-O+1,D=v.encodeAddress(E,O),U=T==="shared";k=typeof A=="function"?A:Array.isArray(A)?Array.isArray(A[0])?function(ee,ne){return A[ee-E][ne-O]}:function(ee,ne){return A[(ee-E)*N+(ne-O)]}:function(){};for(var G=!0,X=E;X<=j;X++)for(var Y=O;Y<=L;Y++)G?(this.getCell(X,Y).value={shareType:T,formula:S,ref:P,result:k(X,Y)},G=!1):this.getCell(X,Y).value=U?{sharedFormula:D,result:k(X,Y)}:k(X,Y)}},{key:"addImage",value:function(P,S){var A={type:"image",imageId:P,range:S};this._media.push(new d(this,A))}},{key:"getImages",value:function(){return this._media.filter(function(P){return P.type==="image"})}},{key:"addBackgroundImage",value:function(P){var S={type:"background",imageId:P};this._media.push(new d(this,S))}},{key:"getBackgroundImageId",value:function(){var P=this._media.find(function(S){return S.type==="background"});return P&&P.imageId}},{key:"protect",value:function(P,S){var A=this;return new Promise(function(k){A.sheetProtection={sheet:!0},S&&"spinCount"in S&&(S.spinCount=Number.isFinite(S.spinCount)?Math.round(Math.max(0,S.spinCount)):1e5),P&&(A.sheetProtection.algorithmName="SHA-512",A.sheetProtection.saltValue=b.randomBytes(16).toString("base64"),A.sheetProtection.spinCount=S&&"spinCount"in S?S.spinCount:1e5,A.sheetProtection.hashValue=b.convertPasswordToHash(P,"SHA512",A.sheetProtection.saltValue,A.sheetProtection.spinCount)),S&&(A.sheetProtection=Object.assign(A.sheetProtection,S),!P&&"spinCount"in S&&delete A.sheetProtection.spinCount),k()})}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(P){var S=new h(this,P);return this.tables[P.name]=S,S}},{key:"getTable",value:function(P){return this.tables[P]}},{key:"removeTable",value:function(P){delete this.tables[P]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(P){this.conditionalFormattings.push(P)}},{key:"removeConditionalFormatting",value:function(P){typeof P=="number"?this.conditionalFormattings.splice(P,1):this.conditionalFormattings=P instanceof Function?this.conditionalFormattings.filter(P):[]}},{key:"_parseRows",value:function(P){var S=this;this._rows=[],P.rows.forEach(function(A){var k=new o(S,A.number);S._rows[k.number-1]=k,k.model=A})}},{key:"_parseMergeCells",value:function(P){var S=this;g.each(P.mergeCells,function(A){S.mergeCellsWithoutStyle(A)})}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var P=new c;return this._rows.forEach(function(S){if(S){var A=S.dimensions;A&&P.expand(S.number,A.min,S.number,A.max)}}),P}},{key:"columns",get:function(){return this._columns},set:function(P){var S=this;this._headerRowCount=P.reduce(function(T,I){var E=(I.header?1:I.headers&&I.headers.length)||0;return Math.max(T,E)},0);var A=1,k=this._columns=[];P.forEach(function(T){var I=new a(S,A++,!1);k.push(I),I.defn=T})}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var P=0;return this.eachRow(function(S){P=Math.max(P,S.cellCount)}),P}},{key:"actualColumnCount",get:function(){var P=[],S=0;return this.eachRow(function(A){A.eachCell(function(k){var T=k.col;P[T]||(P[T]=!0,S++)})}),S}},{key:"_lastRowNumber",get:function(){for(var P=this._rows,S=P.length;S>0&&P[S-1]===void 0;)S--;return S}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var P=0;return this.eachRow(function(){P++}),P}},{key:"hasMerges",get:function(){return g.some(this._merges,Boolean)}},{key:"tabColor",get:function(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor},set:function(P){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=P}},{key:"model",get:function(){var P={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(function(k){return k.model}),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(function(k){return k.model}),conditionalFormattings:this.conditionalFormattings};P.cols=a.toModel(this.columns);var S=P.rows=[],A=P.dimensions=new c;return this._rows.forEach(function(k){var T=k&&k.model;T&&(A.expand(T.number,T.min,T.number,T.max),S.push(T))}),P.merges=[],g.each(this._merges,function(k){P.merges.push(k.range)}),P},set:function(P){var S=this;this.name=P.name,this._columns=a.fromModel(this,P.cols),this._parseRows(P),this._parseMergeCells(P),this.dataValidations=new y(P.dataValidations),this.properties=P.properties,this.pageSetup=P.pageSetup,this.headerFooter=P.headerFooter,this.views=P.views,this.autoFilter=P.autoFilter,this._media=P.media.map(function(A){return new d(S,A)}),this.sheetProtection=P.sheetProtection,this.tables=P.tables.reduce(function(A,k){var T=new h;return T.model=k,A[k.name]=T,A},{}),this.conditionalFormattings=P.conditionalFormattings}}])&&p(_.prototype,C),R&&p(_,R),x}();r.exports=w},{"../utils/col-cache":19,"../utils/encryptor":20,"../utils/under-dash":25,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,r,t){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");var n={Workbook:e("./doc/workbook")},i=e("./doc/enums");Object.keys(i).forEach(function(u){n[u]=i[u]}),r.exports=n},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":316,"core-js/modules/es.array.find-index":315,"core-js/modules/es.array.includes":317,"core-js/modules/es.array.iterator":318,"core-js/modules/es.number.is-nan":319,"core-js/modules/es.object.assign":320,"core-js/modules/es.object.keys":321,"core-js/modules/es.object.values":322,"core-js/modules/es.promise":323,"core-js/modules/es.string.from-code-point":324,"core-js/modules/es.string.includes":325,"core-js/modules/es.symbol":327,"core-js/modules/es.symbol.async-iterator":326,"regenerator-runtime/runtime":492}],16:[function(e,r,t){"use strict";var n=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");t.bufferToString=function(i){return typeof i=="string"?i:n?n.decode(i):i.toString()}},{}],17:[function(e,r,t){"use strict";var n=typeof TextEncoder=="undefined"?null:new TextEncoder("utf-8"),i=e("buffer").Buffer;t.stringToBuffer=function(u){return typeof u!="string"?u:n?i.from(n.encode(u).buffer):i.from(u)}},{buffer:216}],18:[function(e,r,t){"use strict";function n(m,p){for(var g=0;gg.length)&&(v=g.length);for(var c=0,o=new Array(v);c=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&g>=1){for(;d<=26;)v=this._dictionary[d-1],this._n2l[d]=v,this._l2n[v]=d,d++;this._l2nFill=1}if(this._l2nFill<2&&g>=2){for(d=27;d<=702;)o=(c=d-27)%26,a=Math.floor(c/26),v=this._dictionary[a]+this._dictionary[o],this._n2l[d]=v,this._l2n[v]=d,d++;this._l2nFill=2}if(this._l2nFill<3&&g>=3){for(d=703;d<=16384;)o=(c=d-703)%26,a=Math.floor(c/26)%26,s=Math.floor(c/676),v=this._dictionary[s]+this._dictionary[a]+this._dictionary[o],this._n2l[d]=v,this._l2n[v]=d,d++;this._l2nFill=3}},l2n:function(g){if(this._l2n[g]||this._fill(g.length),!this._l2n[g])throw new Error("Out of bounds. Invalid column letter: ".concat(g));return this._l2n[g]},n2l:function(g){if(g<1||g>16384)throw new Error("".concat(g," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[g]||this._fill(this._level(g)),this._n2l[g]},_hash:{},validateAddress:function(g){if(!m.test(g))throw new Error("Invalid Address: ".concat(g));return!0},decodeAddress:function(g){var v=g.length<5&&this._hash[g];if(v)return v;for(var c,o=!1,a="",s=0,d=!1,h="",y=0,b=0;b=65&&c<=90)o=!0,a+=g[b],s=26*s+c-64;else if(c>=48&&c<=57)d=!0,h+=g[b],y=10*y+c-48;else if(d&&o&&c!==36)break;if(o){if(s>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(a))}else s=void 0;d||(y=void 0);var w={address:g=a+h,col:s,row:y,$col$row:"$".concat(a,"$").concat(h)};return s<=100&&y<=100&&(this._hash[g]=w,this._hash[w.$col$row]=w),w},getAddress:function(g,v){if(v){var c=this.n2l(v)+g;return this.decodeAddress(c)}return this.decodeAddress(g)},decode:function(g){var v=g.split(":");if(v.length===2){var c=this.decodeAddress(v[0]),o=this.decodeAddress(v[1]),a={top:Math.min(c.row,o.row),left:Math.min(c.col,o.col),bottom:Math.max(c.row,o.row),right:Math.max(c.col,o.col)};return a.tl=this.n2l(a.left)+a.top,a.br=this.n2l(a.right)+a.bottom,a.dimensions="".concat(a.tl,":").concat(a.br),a}return this.decodeAddress(g)},decodeEx:function(g){var v=g.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),c=v[1]||v[2],o=v[3],a=o.split(":");if(a.length>1){var s=this.decodeAddress(a[0]),d=this.decodeAddress(a[1]),h=Math.min(s.row,d.row),y=Math.min(s.col,d.col),b=Math.max(s.row,d.row),w=Math.max(s.col,d.col);return s=this.n2l(y)+h,d=this.n2l(w)+b,{top:h,left:y,bottom:b,right:w,sheetName:c,tl:{address:s,col:y,row:h,$col$row:"$".concat(this.n2l(y),"$").concat(h),sheetName:c},br:{address:d,col:w,row:b,$col$row:"$".concat(this.n2l(w),"$").concat(b),sheetName:c},dimensions:"".concat(s,":").concat(d)}}if(o.startsWith("#"))return c?{sheetName:c,error:o}:{error:o};var x=this.decodeAddress(o);return c?function(_){for(var C=1;C=o&&y<=s&&b>=a&&b<=d}};r.exports=p},{}],20:[function(e,r,t){(function(n){"use strict";var i=e("crypto"),u={hash:function(l){for(var m=i.createHash(l),p=arguments.length,g=new Array(p>1?p-1:0),v=1;v3||b.length===3&&b>"XFD")return c;var _=n.l2n(b),C=parseInt(x,10);return y||(_+=v.col-g.col),w||(C+=v.row-g.row),(o||"")+(y||"")+n.n2l(_)+(w||"")+C}return c})}}},{"./col-cache":19}],23:[function(e,r,t){(function(n,i){"use strict";function u(b,w,x,_,C,R,P){try{var S=b[R](P),A=S.value}catch(k){return void x(k)}S.done?w(A):Promise.resolve(A).then(_,C)}function l(b){return function(){var w=this,x=arguments;return new Promise(function(_,C){var R=b.apply(w,x);function P(A){u(R,_,C,P,S,"next",A)}function S(A){u(R,_,C,P,S,"throw",A)}P(void 0)})}}function m(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function p(b,w){for(var x=0;x=this.length?(x=this.toBuffer(),this.iRead=this.iWrite,x):(x=i.alloc(w),this.buffer.copy(x,0,this.iRead,w),this.iRead+=w,x)}},{key:"write",value:function(w,x,_){var C=Math.min(_,this.size-this.iWrite);return w.copy(this.buffer,this.iWrite,x,x+C),this.iWrite+=C,C}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}}]),b}(),y=function(b){b=b||{},this.bufSize=b.bufSize||1048576,this.buffers=[],this.batch=b.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};c.inherits(y,v.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return i.concat(this.buffers.map(function(b){return b.toBuffer()}))}},_getWritableBuffer:function(){if(this.buffers.length){var b=this.buffers[this.buffers.length-1];if(!b.full)return b}var w=new h(this.bufSize);return this.buffers.push(w),w},_pipe:function(b){var w=this;return l(regeneratorRuntime.mark(function x(){var _;return regeneratorRuntime.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return _=function(R){return new Promise(function(P){R.write(b.toBuffer(),function(){P()})})},C.next=3,Promise.all(w.pipes.map(_));case 3:case"end":return C.stop()}},x)}))()},_writeToBuffers:function(b){for(var w=0,x=b.length;w1;)_._pipe(_.buffers.shift());P.next=29;break;case 21:if(_.corked){P.next=27;break}return P.next=24,_._pipe(R);case 24:x(),P.next=29;break;case 27:_._writeToBuffers(R),n.nextTick(x);case 29:P.next=34;break;case 31:_.paused||_.emit("data",R.toBuffer()),_._writeToBuffers(R),_.emit("readable");case 34:return P.abrupt("return",!0);case 35:case"end":return P.stop()}},C)}))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(b,w,x){var _=this,C=function(R){R?x(R):(_._flush(),_.pipes.forEach(function(P){P.end()}),_.emit("finish"))};b?this.write(b,w,C):C()},read:function(b){var w;if(b){for(w=[];b&&this.buffers.length&&!this.buffers[0].eod;){var x=this.buffers[0],_=x.read(b);b-=_.length,w.push(_),x.eod&&x.full&&this.buffers.shift()}return i.concat(w)}return w=this.buffers.map(function(C){return C.toBuffer()}).filter(Boolean),this.buffers=[],i.concat(w)},setEncoding:function(b){this.encoding=b},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(b){this.pipes.push(b),!this.paused&&this.buffers.length&&this.end()},unpipe:function(b){this.pipes=this.pipes.filter(function(w){return w!==b})},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),r.exports=y}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:467,buffer:216,"readable-stream":491}],24:[function(e,r,t){(function(n){"use strict";function i(l,m){for(var p=0;p=this._buf.length-4;)this._grow(this._inPos+v.length),c=this._inPos+this._buf.write(v,this._inPos,this._encoding);this._inPos=c}},{key:"addStringBuf",value:function(v){v.length&&(this._buffer=void 0,this.length+v.length>this.capacity&&this._grow(this.length+v.length),v._buf.copy(this._buf,this._inPos,0,v.length),this._inPos+=v.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}])&&i(m.prototype,p),g&&i(m,g),l}();r.exports=u}).call(this,e("buffer").Buffer)},{buffer:216}],25:[function(e,r,t){"use strict";function n(m){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(m)}var i=Object.prototype.toString,u=/["&<>]/,l={each:function(m,p){m&&(Array.isArray(m)?m.forEach(p):Object.keys(m).forEach(function(g){p(m[g],g)}))},some:function(m,p){return!!m&&(Array.isArray(m)?m.some(p):Object.keys(m).some(function(g){return p(m[g],g)}))},every:function(m,p){return!m||(Array.isArray(m)?m.every(p):Object.keys(m).every(function(g){return p(m[g],g)}))},map:function(m,p){return m?Array.isArray(m)?m.map(p):Object.keys(m).map(function(g){return p(m[g],g)}):[]},keyBy:function(m,p){return m.reduce(function(g,v){return g[v[p]]=v,g},{})},isEqual:function(m,p){var g=n(m),v=n(p),c=Array.isArray(m),o=Array.isArray(p);if(g!==v)return!1;switch(n(m)){case"object":return c||o?!(!c||!o)&&m.length===p.length&&m.every(function(a,s){var d=p[s];return l.isEqual(a,d)}):l.every(m,function(a,s){var d=p[s];return l.isEqual(a,d)});default:return m===p}},escapeHtml:function(m){var p=u.exec(m);if(!p)return m;for(var g="",v="",c=0,o=p.index;o":v=">";break;default:continue}c!==o&&(g+=m.substring(c,o)),c=o+1,g+=v}return c!==o?g+m.substring(c,o):g},strcmp:function(m,p){return mp?1:0},isUndefined:function(m){return i.call(m)==="[object Undefined]"},isObject:function(m){return i.call(m)==="[object Object]"},deepMerge:function(){var m,p,g,v=arguments[0]||{},c=arguments.length;function o(s,d){m=v[d],g=Array.isArray(s),l.isObject(s)||g?(g?(g=!1,p=m&&Array.isArray(m)?m:[]):p=m&&l.isObject(m)?m:{},v[d]=l.deepMerge(p,s)):l.isUndefined(s)||(v[d]=s)}for(var a=0;a&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,m={nop:function(){},promiseImmediate:function(p){return new Promise(function(g){n.setImmediate?i(function(){g(p)}):setTimeout(function(){g(p)},1)})},inherits:function(p,g,v,c){p.super_=g,c||(c=v,v=null),v&&Object.keys(v).forEach(function(a){Object.defineProperty(p,a,Object.getOwnPropertyDescriptor(v,a))});var o={constructor:{value:p,enumerable:!1,writable:!1,configurable:!0}};c&&Object.keys(c).forEach(function(a){o[a]=Object.getOwnPropertyDescriptor(c,a)}),p.prototype=Object.create(g.prototype,o)},dateToExcel:function(p,g){return 25569+p.getTime()/864e5-(g?1462:0)},excelToDate:function(p,g){var v=Math.round(24*(p-25569+(g?1462:0))*3600*1e3);return new Date(v)},parsePath:function(p){var g=p.lastIndexOf("/");return{path:p.substring(0,g),name:p.substring(g+1)}},getRelsPath:function(p){var g=m.parsePath(p);return"".concat(g.path,"/_rels/").concat(g.name,".rels")},xmlEncode:function(p){var g=l.exec(p);if(!g)return p;for(var v="",c="",o=0,a=g.index;a=11&&s!==13)){c="";break}continue}o!==a&&(v+=p.substring(o,a)),o=a+1,c&&(v+=c)}return o!==a?v+p.substring(o,a):v},xmlDecode:function(p){return p.replace(/&([a-z]*);/g,function(g){switch(g){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return g}})},validInt:function(p){var g=parseInt(p,10);return Number.isNaN(g)?0:g},isDateFmt:function(p){return!!p&&(p=(p=p.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null},fs:{exists:function(p){return new Promise(function(g){u.access(p,u.constants.F_OK,function(v){g(!v)})})}},toIsoDateString:function(p){return p.toIsoString().subsstr(0,10)}};r.exports=m}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},e("timers").setImmediate)},{fs:215,timers:521}],27:[function(e,r,t){"use strict";function n(g,v){for(var c=0;c `)}},{key:"openNode",value:function(a,s){var d=this.tos,h=this._xml;d&&this.open&&h.push(">"),this._stack.push(a),h.push("<"),h.push(a),m(h,s),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(a,s){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");s!==void 0&&l(this._xml,a,s)}},{key:"addAttributes",value:function(a){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");m(this._xml,a)}},{key:"writeText",value:function(a){var s=this._xml;this.open&&(s.push(">"),this.open=!1),this.leaf=!1,s.push(u.xmlEncode(a.toString()))}},{key:"writeXml",value:function(a){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(a)}},{key:"closeNode",value:function(){var a=this._stack.pop(),s=this._xml;this.leaf?s.push("/>"):(s.push("")),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(a,s,d){this.openNode(a,s),d!==void 0&&this.writeText(d),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var a=this._rollbacks.pop();this._xml.length>a.xml&&this._xml.splice(a.xml,this._xml.length-a.xml),this._stack.length>a.stack&&this._stack.splice(a.stack,this._stack.length-a.stack),this.leaf=a.leaf,this.open=a.open}},{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}])&&n(v.prototype,c),o&&n(v,o),g}();p.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},r.exports=p},{"./under-dash":25,"./utils":26}],28:[function(e,r,t){(function(n){"use strict";function i(h){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(h)}function u(h,y,b,w,x,_,C){try{var R=h[_](C),P=R.value}catch(S){return void b(S)}R.done?y(P):Promise.resolve(P).then(w,x)}function l(h,y){for(var b=0;b=o.length?{done:!0}:{done:!1,value:o[d++]}},e:function(x){throw x},f:h}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y,b=!0,w=!1;return{s:function(){s=o[Symbol.iterator]()},n:function(){var x=s.next();return b=x.done,x},e:function(x){w=!0,y=x},f:function(){try{b||s.return==null||s.return()}finally{if(w)throw y}}}}function i(o,a){(a==null||a>o.length)&&(a=o.length);for(var s=0,d=new Array(a);s2&&arguments[2]!==void 0&&arguments[2];if(b===void 0){if(x)return w}else if(x||b!==w)return b.toString()}},{key:"toStringAttribute",value:function(b,w){var x=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return o.toAttribute(b,w,x)}},{key:"toStringValue",value:function(b,w){return b===void 0?w:b}},{key:"toBoolAttribute",value:function(b,w){var x=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(b===void 0){if(x)return w}else if(x||b!==w)return b?"1":"0"}},{key:"toBoolValue",value:function(b,w){return b===void 0?w:b==="1"}},{key:"toIntAttribute",value:function(b,w){var x=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return o.toAttribute(b,w,x)}},{key:"toIntValue",value:function(b,w){return b===void 0?w:parseInt(b,10)}},{key:"toFloatAttribute",value:function(b,w){var x=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return o.toAttribute(b,w,x)}},{key:"toFloatValue",value:function(b,w){return b===void 0?w:parseFloat(b)}}],s&&m(a.prototype,s),d&&m(a,d),o}();r.exports=c},{"../../utils/parse-sax":21,"../../utils/xml-stream":27}],32:[function(e,r,t){"use strict";function n(d){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(d)}function i(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}function u(d,h){for(var y=0;ythis.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(h,y){if(h){var b=this.childXform;h.forEach(function(w){b.reconcile(w,y)})}}}])&&i(c.prototype,o),a&&i(c,a),d}(e("./base-xform"));r.exports=g},{"./base-xform":31}],71:[function(e,r,t){"use strict";function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function i(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function u(o,a){for(var s=0;sh.length)&&(y=h.length);for(var b=0,w=new Array(y);bh.length)&&(y=h.length);for(var b=0,w=new Array(y);b0");case"containsErrors":return"ISERROR(".concat(j,")");case"notContainsErrors":return"NOT(ISERROR(".concat(j,"))");default:return}}(I);E&&this.formulaXform.render(T,E),T.closeNode()}},{key:"renderTimePeriod",value:function(T,I){T.openNode(this.tag,{type:"timePeriod",dxfId:I.dxfId,priority:I.priority,timePeriod:I.timePeriod});var E=function(O){if(O.formulae&&O.formulae[0])return O.formulae[0];var j=new s(O.ref).tl;switch(O.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(j,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(j,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(j,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(j,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(j,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(j,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(j,",1)=TODAY()-1");case"today":return"FLOOR(".concat(j,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(j,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(j,",1)<=6,FLOOR(").concat(j,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(j,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(j,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(j,")=MONTH(TODAY()),YEAR(").concat(j,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(j,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(j,")=YEAR(EDATE(TODAY(),0+1)))");default:return}}(I);E&&this.formulaXform.render(T,E),T.closeNode()}},{key:"createNewModel",value:function(T){var I=T.attributes;return u(u({},function(E){var O=E.type,j=E.operator;switch(O){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:O};default:return{type:O,operator:j}}}(I)),{},{dxfId:o.toIntValue(I.dxfId),priority:o.toIntValue(I.priority),timePeriod:I.timePeriod,percent:o.toBoolValue(I.percent),bottom:o.toBoolValue(I.bottom),rank:o.toIntValue(I.rank),aboveAverage:o.toBoolValue(I.aboveAverage)})}},{key:"onParserClose",value:function(T,I){switch(T){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,I.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(I.model)}}},{key:"tag",get:function(){return"cfRule"}}])&&m(R.prototype,P),S&&m(R,S),k}(a);r.exports=_},{"../../../../doc/range":10,"../../base-xform":31,"../../composite-xform":47,"./color-scale-xform":84,"./databar-xform":87,"./ext-lst-ref-xform":88,"./formula-xform":89,"./icon-set-xform":90}],83:[function(e,r,t){"use strict";function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function i(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function u(o,a){for(var s=0;ss.length)&&(d=s.length);for(var h=0,y=new Array(d);h1||X>1){var ne=D.row+(U-1),te=D.col+(X-1);return c(c({},N.dataValidation),{},{sqref:"".concat(N.address,":").concat(d.encodeAddress(ne,te))})}return c(c({},N.dataValidation),{},{sqref:N.address})}return null}).filter(Boolean)}(T);I.length&&(k.openNode("dataValidations",{count:I.length}),I.forEach(function(E){k.openNode("dataValidation"),E.type!=="any"&&(k.addAttribute("type",E.type),E.operator&&E.type!=="list"&&E.operator!=="between"&&k.addAttribute("operator",E.operator),E.allowBlank&&k.addAttribute("allowBlank","1")),E.showInputMessage&&k.addAttribute("showInputMessage","1"),E.promptTitle&&k.addAttribute("promptTitle",E.promptTitle),E.prompt&&k.addAttribute("prompt",E.prompt),E.showErrorMessage&&k.addAttribute("showErrorMessage","1"),E.errorStyle&&k.addAttribute("errorStyle",E.errorStyle),E.errorTitle&&k.addAttribute("errorTitle",E.errorTitle),E.error&&k.addAttribute("error",E.error),k.addAttribute("sqref",E.sqref),(E.formulae||[]).forEach(function(O,j){k.openNode("formula".concat(j+1)),E.type==="date"?k.writeText(s.dateToExcel(new Date(O))):k.writeText(O),k.closeNode()}),k.closeNode()}),k.closeNode())}},{key:"parseOpen",value:function(k){switch(k.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=k.attributes.sqref;var T={type:k.attributes.type||"any",formulae:[]};switch(k.attributes.type&&w(T,k.attributes,"allowBlank"),w(T,k.attributes,"showInputMessage"),w(T,k.attributes,"showErrorMessage"),T.type){case"any":case"list":case"custom":break;default:b(T,k.attributes,"operator","between")}return b(T,k.attributes,"promptTitle"),b(T,k.attributes,"prompt"),b(T,k.attributes,"errorStyle"),b(T,k.attributes,"errorTitle"),b(T,k.attributes,"error"),this._dataValidation=T,!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(k){this._formula&&this._formula.push(k)}},{key:"parseClose",value:function(k){var T=this;switch(k){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(function(E){E.includes(":")?new y(E).forEachAddress(function(O){T.model[O]=T._dataValidation}):T.model[E]=T._dataValidation}),!0;case"formula1":case"formula2":var I=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":I=parseInt(I,10);break;case"decimal":I=parseFloat(I);break;case"date":I=s.excelToDate(parseFloat(I))}return this._dataValidation.formulae.push(I),this._formula=void 0,!0;default:return!0}}},{key:"tag",get:function(){return"dataValidations"}}])&&u(C.prototype,R),P&&u(C,P),A}(h);r.exports=x},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/utils":26,"../base-xform":31}],93:[function(e,r,t){"use strict";function n(c){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(c)}function i(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}function u(c,o){for(var a=0;a0&&w.max>0&&w.min<=w.max&&b.addAttribute("spans","".concat(w.min,":").concat(w.max)),w.styleId&&(b.addAttribute("s",w.styleId),b.addAttribute("customFormat","1")),b.addAttribute("x14ac:dyDescent","0.25"),w.outlineLevel&&b.addAttribute("outlineLevel",w.outlineLevel),w.collapsed&&b.addAttribute("collapsed","1");var _=this.map.c;w.cells.forEach(function(C){_.render(b,C,x)}),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;if(b.name==="row"){this.numRowsSeen+=1;var w=b.attributes.spans?b.attributes.spans.split(":").map(function(_){return parseInt(_,10)}):[void 0,void 0],x=this.model={number:parseInt(b.attributes.r,10),min:w[0],max:w[1],cells:[]};return b.attributes.s&&(x.styleId=parseInt(b.attributes.s,10)),b.attributes.hidden!==!0&&b.attributes.hidden!=="true"&&b.attributes.hidden!==1&&b.attributes.hidden!=="1"||(x.hidden=!0),b.attributes.bestFit&&(x.bestFit=!0),b.attributes.ht&&(x.height=parseFloat(b.attributes.ht)),b.attributes.outlineLevel&&(x.outlineLevel=parseInt(b.attributes.outlineLevel,10)),b.attributes.collapsed&&(x.collapsed=!0),!0}return this.parser=this.map[b.name],!!this.parser&&(this.parser.parseOpen(b),!0)}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser){if(!this.parser.parseClose(b)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error("Max column count (".concat(this.maxItems,") exceeded"));this.parser=void 0}return!0}return!1}},{key:"reconcile",value:function(b,w){b.style=b.styleId?w.styles.getStyleModel(b.styleId):{},b.styleId!==void 0&&(b.styleId=void 0);var x=this.map.c;b.cells.forEach(function(_){x.reconcile(_,w)})}},{key:"tag",get:function(){return"row"}}])&&i(a.prototype,s),d&&i(a,d),y}(g);r.exports=c},{"../base-xform":31,"./cell-xform":72}],109:[function(e,r,t){"use strict";function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function i(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function u(o,a){for(var s=0;s0){var ie={Id:K(Q),Type:o.Comments,Target:"../comments".concat(z.id,".xml")};Q.push(ie);var Z={Id:K(Q),Type:o.VmlDrawing,Target:"../drawings/vmlDrawing".concat(z.id,".vml")};Q.push(Z),z.comments.forEach(function(ce){ce.refAddress=v.decodeAddress(ce.ref)}),q.commentRefs.push({commentName:"comments".concat(z.id),vmlDrawing:"vmlDrawing".concat(z.id)})}var re,ae=[];z.media.forEach(function(ce){if(ce.type==="background"){var ke=K(Q);re=q.media[ce.imageId],Q.push({Id:ke,Type:o.Image,Target:"../media/".concat(re.name,".").concat(re.extension)}),z.background={rId:ke},z.image=q.media[ce.imageId]}else if(ce.type==="image"){var we=z.drawing;re=q.media[ce.imageId],we||(we=z.drawing={rId:K(Q),name:"drawing".concat(++q.drawingsCount),anchors:[],rels:[]},q.drawings.push(we),Q.push({Id:we.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(we.name,".xml")}));var Se=J.preImageId===ce.imageId?ae[ce.imageId]:ae[we.rels.length];Se||(Se=K(we.rels),ae[we.rels.length]=Se,we.rels.push({Id:Se,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(re.name,".").concat(re.extension)}));var Ge={picture:{rId:Se},range:ce.range};if(ce.hyperlinks&&ce.hyperlinks.hyperlink){var xe=K(we.rels);ae[we.rels.length]=xe,Ge.picture.hyperlinks={tooltip:ce.hyperlinks.tooltip,rId:xe},we.rels.push({Id:xe,Type:o.Hyperlink,Target:ce.hyperlinks.hyperlink,TargetMode:"External"})}J.preImageId=ce.imageId,we.anchors.push(Ge)}}),z.tables.forEach(function(ce){var ke=K(Q);ce.rId=ke,Q.push({Id:ke,Type:o.Table,Target:"../tables/".concat(ce.target)}),ce.columns.forEach(function(we){var Se=we.style;Se&&(we.dxfId=q.styles.addDxfStyle(Se))})}),this.map.extLst.prepare(z,q)}},{key:"render",value:function(z,q){z.openXml(c.StdDocAttributes),z.openNode("worksheet",B.WORKSHEET_ATTRIBUTES);var J=q.properties?{defaultRowHeight:q.properties.defaultRowHeight,dyDescent:q.properties.dyDescent,outlineLevelCol:q.properties.outlineLevelCol,outlineLevelRow:q.properties.outlineLevelRow}:void 0;q.properties&&q.properties.defaultColWidth&&(J.defaultColWidth=q.properties.defaultColWidth);var Q={outlineProperties:q.properties&&q.properties.outlineProperties,tabColor:q.properties&&q.properties.tabColor,pageSetup:q.pageSetup&&q.pageSetup.fitToPage?{fitToPage:q.pageSetup.fitToPage}:void 0},K=q.pageSetup&&q.pageSetup.margins,ie={showRowColHeaders:q.pageSetup&&q.pageSetup.showRowColHeaders,showGridLines:q.pageSetup&&q.pageSetup.showGridLines,horizontalCentered:q.pageSetup&&q.pageSetup.horizontalCentered,verticalCentered:q.pageSetup&&q.pageSetup.verticalCentered},Z=q.sheetProtection;this.map.sheetPr.render(z,Q),this.map.dimension.render(z,q.dimensions),this.map.sheetViews.render(z,q.views),this.map.sheetFormatPr.render(z,J),this.map.cols.render(z,q.cols),this.map.sheetData.render(z,q.rows),this.map.sheetProtection.render(z,Z),this.map.autoFilter.render(z,q.autoFilter),this.map.mergeCells.render(z,q.mergeCells),this.map.conditionalFormatting.render(z,q.conditionalFormattings),this.map.dataValidations.render(z,q.dataValidations),this.map.hyperlinks.render(z,q.hyperlinks),this.map.printOptions.render(z,ie),this.map.pageMargins.render(z,K),this.map.pageSetup.render(z,q.pageSetup),this.map.headerFooter.render(z,q.headerFooter),this.map.rowBreaks.render(z,q.rowBreaks),this.map.drawing.render(z,q.drawing),this.map.picture.render(z,q.background),this.map.tableParts.render(z,q.tables),this.map.extLst.render(z,q),q.rels&&q.rels.forEach(function(re){re.Type===o.VmlDrawing&&z.leafNode("legacyDrawing",{"r:id":re.Id})}),z.closeNode()}},{key:"parseOpen",value:function(z){return this.parser?(this.parser.parseOpen(z),!0):z.name==="worksheet"?(g.each(this.map,function(q){q.reset()}),!0):(this.parser=this.map[z.name],this.parser&&this.parser.parseOpen(z),!0)}},{key:"parseText",value:function(z){this.parser&&this.parser.parseText(z)}},{key:"parseClose",value:function(z){if(this.parser)return this.parser.parseClose(z)||(this.parser=void 0),!0;switch(z){case"worksheet":var q=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(q.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(q.outlineProperties=this.map.sheetPr.model.outlineProperties);var J={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},Q=Object.assign(J,this.map.pageSetup.model,this.map.printOptions.model),K=G(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:q,views:this.map.sheetViews.model,pageSetup:Q,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:K},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1;default:return!0}}},{key:"reconcile",value:function(z,q){var J=(z.relationships||[]).reduce(function(ae,ce){if(ae[ce.Id]=ce,ce.Type===o.Comments&&(z.comments=q.comments[ce.Target].comments),ce.Type===o.VmlDrawing&&z.comments&&z.comments.length){var ke=q.vmlDrawings[ce.Target].comments;z.comments.forEach(function(we,Se){we.note=Object.assign({},we.note,ke[Se])})}return ae},{});if(q.commentsMap=(z.comments||[]).reduce(function(ae,ce){return ce.ref&&(ae[ce.ref]=ce),ae},{}),q.hyperlinkMap=(z.hyperlinks||[]).reduce(function(ae,ce){return ce.rId&&(ae[ce.address]=J[ce.rId].Target),ae},{}),q.formulae={},z.rows=z.rows&&z.rows.filter(Boolean)||[],z.rows.forEach(function(ae){ae.cells=ae.cells&&ae.cells.filter(Boolean)||[]}),this.map.cols.reconcile(z.cols,q),this.map.sheetData.reconcile(z.rows,q),this.map.conditionalFormatting.reconcile(z.conditionalFormattings,q),z.media=[],z.drawing){var Q=J[z.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(Q){var K=Q[1];q.drawings[K].anchors.forEach(function(ae){if(ae.medium){var ce={type:"image",imageId:ae.medium.index,range:ae.range,hyperlinks:ae.picture.hyperlinks};z.media.push(ce)}})}}var ie=z.background&&J[z.background.rId];if(ie){var Z=ie.Target.split("/media/")[1],re=q.mediaIndex&&q.mediaIndex[Z];re!==void 0&&z.media.push({type:"background",imageId:re})}z.tables=(z.tables||[]).map(function(ae){var ce=J[ae.rId];return q.tables[ce.Target]}),delete z.relationships,delete z.hyperlinks,delete z.comments}}])&&i(ee.prototype,ne),te&&i(ee,te),B}(s);X.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},r.exports=X},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../../rel-type":30,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":71,"./cf/conditional-formattings-xform":86,"./col-xform":91,"./data-validations-xform":92,"./dimension-xform":93,"./drawing-xform":94,"./ext-lst-xform":95,"./header-footer-xform":96,"./hyperlink-xform":97,"./merge-cell-xform":98,"./merges":99,"./page-margins-xform":102,"./page-setup-xform":104,"./picture-xform":105,"./print-options-xform":106,"./row-breaks-xform":107,"./row-xform":108,"./sheet-format-properties-xform":109,"./sheet-properties-xform":110,"./sheet-protection-xform":111,"./sheet-view-xform":112,"./table-part-xform":113}],115:[function(e,r,t){"use strict";function n(v){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(v)}function i(v,c){for(var o=0;o=-90&&y<=90?y:void 0}},indent:function(y){return y=c.validInt(y),Math.max(0,y)},readingOrder:function(y){switch(y){case"ltr":return v.ReadingOrder.LeftToRight;case"rtl":return v.ReadingOrder.RightToLeft;default:return}}},s=function(y){if(y=a.textRotation(y)){if(y==="vertical")return 255;var b=Math.round(y);if(b>=0&&b<=90)return b;if(b<0&&b>=-90)return 90-b}},d=function(y){var b=c.validInt(y);if(b!==void 0){if(b===255)return"vertical";if(b>=0&&b<=90)return b;if(b>90&&b<=180)return 90-b}},h=function(y){(function(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),P&&l(R,P)})(C,y);var b,w,x,_=m(C);function C(){return i(this,C),_.apply(this,arguments)}return b=C,(w=[{key:"render",value:function(R,P){R.addRollback(),R.openNode("alignment");var S=!1;function A(k,T){T&&(R.addAttribute(k,T),S=!0)}A("horizontal",a.horizontal(P.horizontal)),A("vertical",a.vertical(P.vertical)),A("wrapText",!!a.wrapText(P.wrapText)&&"1"),A("shrinkToFit",!!a.shrinkToFit(P.shrinkToFit)&&"1"),A("indent",a.indent(P.indent)),A("textRotation",s(P.textRotation)),A("readingOrder",a.readingOrder(P.readingOrder)),R.closeNode(),S?R.commit():R.rollback()}},{key:"parseOpen",value:function(R){var P={},S=!1;function A(k,T,I){k&&(P[T]=I,S=!0)}A(R.attributes.horizontal,"horizontal",R.attributes.horizontal),A(R.attributes.vertical,"vertical",R.attributes.vertical==="center"?"middle":R.attributes.vertical),A(R.attributes.wrapText,"wrapText",!!R.attributes.wrapText),A(R.attributes.shrinkToFit,"shrinkToFit",!!R.attributes.shrinkToFit),A(R.attributes.indent,"indent",parseInt(R.attributes.indent,10)),A(R.attributes.textRotation,"textRotation",d(R.attributes.textRotation)),A(R.attributes.readingOrder,"readingOrder",R.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=S?P:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"alignment"}}])&&u(b.prototype,w),x&&u(b,x),C}(o);r.exports=h},{"../../../doc/enums":7,"../../../utils/utils":26,"../base-xform":31}],126:[function(e,r,t){"use strict";function n(w,x){var _=Object.keys(w);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(w);x&&(C=C.filter(function(R){return Object.getOwnPropertyDescriptor(w,R).enumerable})),_.push.apply(_,C)}return _}function i(w){for(var x=1;x=1)){Ve.next=6;break}return Re=ze.substr(Me+1),Pe=ze.substr(0,Me),Ve.next=6,new Promise(function(He,nt){var he=new a;he.on("finish",function(){Fe.mediaIndex[ze]=Fe.media.length,Fe.mediaIndex[Pe]=Fe.media.length;var ue={type:"image",name:Pe,extension:Re,buffer:he.toBuffer()};Fe.media.push(ue),He()}),Oe.on("error",function(ue){nt(ue)}),Oe.pipe(he)});case 6:case"end":return Ve.stop()}},_e)})),function(_e,Oe,Fe){return ke.apply(this,arguments)})},{key:"_processDrawingEntry",value:(ce=l(regeneratorRuntime.mark(function _e(Oe,Fe,ze){var Me,Re;return regeneratorRuntime.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Me=new S,Pe.next=3,Me.parseStream(Oe);case 3:Re=Pe.sent,Fe.drawings[ze]=Re;case 5:case"end":return Pe.stop()}},_e)})),function(_e,Oe,Fe){return ce.apply(this,arguments)})},{key:"_processDrawingRelsEntry",value:(ae=l(regeneratorRuntime.mark(function _e(Oe,Fe,ze){var Me,Re;return regeneratorRuntime.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Me=new x,Pe.next=3,Me.parseStream(Oe);case 3:Re=Pe.sent,Fe.drawingRels[ze]=Re;case 5:case"end":return Pe.stop()}},_e)})),function(_e,Oe,Fe){return ae.apply(this,arguments)})},{key:"_processVmlDrawingEntry",value:(re=l(regeneratorRuntime.mark(function _e(Oe,Fe,ze){var Me,Re;return regeneratorRuntime.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Me=new T,Pe.next=3,Me.parseStream(Oe);case 3:Re=Pe.sent,Fe.vmlDrawings["../drawings/".concat(ze,".vml")]=Re;case 5:case"end":return Pe.stop()}},_e)})),function(_e,Oe,Fe){return re.apply(this,arguments)})},{key:"_processThemeEntry",value:(Z=l(regeneratorRuntime.mark(function _e(Oe,Fe,ze){return regeneratorRuntime.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,new Promise(function(Re,Pe){var Ve=new a;Oe.on("error",Pe),Ve.on("error",Pe),Ve.on("finish",function(){Fe.themes[ze]=Ve.read().toString(),Re()}),Oe.pipe(Ve)});case 2:case"end":return Me.stop()}},_e)})),function(_e,Oe,Fe){return Z.apply(this,arguments)})},{key:"createInputStream",value:function(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"read",value:(ie=l(regeneratorRuntime.mark(function _e(Oe,Fe){var ze,Me,Re,Pe,Ve,He,nt,he;return regeneratorRuntime.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:!Oe[Symbol.asyncIterator]&&Oe.pipe&&(Oe=Oe.pipe(new c)),ze=[],Me=!0,Re=!1,ue.prev=4,Ve=p(Oe);case 6:return ue.next=8,Ve.next();case 8:return He=ue.sent,Me=He.done,ue.next=12,He.value;case 12:if(nt=ue.sent,Me){ue.next=19;break}he=nt,ze.push(he);case 16:Me=!0,ue.next=6;break;case 19:ue.next=25;break;case 21:ue.prev=21,ue.t0=ue.catch(4),Re=!0,Pe=ue.t0;case 25:if(ue.prev=25,ue.prev=26,Me||Ve.return==null){ue.next=30;break}return ue.next=30,Ve.return();case 30:if(ue.prev=30,!Re){ue.next=33;break}throw Pe;case 33:return ue.finish(30);case 34:return ue.finish(25);case 35:return ue.abrupt("return",this.load(i.concat(ze),Fe));case 36:case"end":return ue.stop()}},_e,this,[[4,21,25,35],[26,,30,34]])})),function(_e,Oe){return ie.apply(this,arguments)})},{key:"load",value:(K=l(regeneratorRuntime.mark(function _e(Oe,Fe){var ze,Me,Re,Pe,Ve,He,nt,he,ue,Te,Ne,Xe,dt,Qe,Ke,Ie;return regeneratorRuntime.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return ze=Fe&&Fe.base64?i.from(Oe.toString(),"base64"):Oe,Me={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},Le.next=4,v.loadAsync(ze);case 4:Re=Le.sent,Pe=0,Ve=Object.values(Re.files);case 6:if(!(Pe0&&(nt=new d,Re.render(nt,He),Oe.append(nt.xml,{name:"xl/comments".concat(He.id,".xml")}),nt=new d,Pe.render(nt,He),Oe.append(nt.xml,{name:"xl/drawings/vmlDrawing".concat(He.id,".vml")}))});case 5:case"end":return Ve.stop()}},_e)})),function(_e,Oe){return X.apply(this,arguments)})},{key:"_finalize",value:function(_e){var Oe=this;return new Promise(function(Fe,ze){_e.on("finish",function(){Fe(Oe)}),_e.on("error",ze),_e.finalize()})}},{key:"prepareModel",value:function(_e,Oe){_e.creator=_e.creator||"ExcelJS",_e.lastModifiedBy=_e.lastModifiedBy||"ExcelJS",_e.created=_e.created||new Date,_e.modified=_e.modified||new Date,_e.useSharedStrings=Oe.useSharedStrings===void 0||Oe.useSharedStrings,_e.useStyles=Oe.useStyles===void 0||Oe.useStyles,_e.sharedStrings=new w,_e.styles=_e.useStyles?new y(!0):new y.Mock;var Fe=new R,ze=new P;Fe.prepare(_e);var Me={sharedStrings:_e.sharedStrings,styles:_e.styles,date1904:_e.properties.date1904,drawingsCount:0,media:_e.media};Me.drawings=_e.drawings=[],Me.commentRefs=_e.commentRefs=[];var Re=0;_e.tables=[],_e.worksheets.forEach(function(Pe){Pe.tables.forEach(function(Ve){Re++,Ve.target="table".concat(Re,".xml"),Ve.id=Re,_e.tables.push(Ve)}),ze.prepare(Pe,Me)})}},{key:"write",value:(G=l(regeneratorRuntime.mark(function _e(Oe,Fe){var ze,Me;return regeneratorRuntime.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Fe=Fe||{},ze=this.workbook.model,(Me=new o.ZipWriter(Fe.zip)).pipe(Oe),this.prepareModel(ze,Fe),Re.next=7,this.addContentTypes(Me,ze);case 7:return Re.next=9,this.addOfficeRels(Me,ze);case 9:return Re.next=11,this.addWorkbookRels(Me,ze);case 11:return Re.next=13,this.addWorksheets(Me,ze);case 13:return Re.next=15,this.addSharedStrings(Me,ze);case 15:return Re.next=17,this.addDrawings(Me,ze);case 17:return Re.next=19,this.addTables(Me,ze);case 19:return Re.next=21,Promise.all([this.addThemes(Me,ze),this.addStyles(Me,ze)]);case 21:return Re.next=23,this.addMedia(Me,ze);case 23:return Re.next=25,Promise.all([this.addApp(Me,ze),this.addCore(Me,ze)]);case 25:return Re.next=27,this.addWorkbook(Me,ze);case 27:return Re.abrupt("return",this._finalize(Me));case 28:case"end":return Re.stop()}},_e,this)})),function(_e,Oe){return G.apply(this,arguments)})},{key:"writeFile",value:function(_e,Oe){var Fe=this,ze=g.createWriteStream(_e);return new Promise(function(Me,Re){ze.on("finish",function(){Me()}),ze.on("error",function(Pe){Re(Pe)}),Fe.write(ze,Oe).then(function(){ze.end()})})}},{key:"writeBuffer",value:(U=l(regeneratorRuntime.mark(function _e(Oe){var Fe;return regeneratorRuntime.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Fe=new a,ze.next=3,this.write(Fe,Oe);case 3:return ze.abrupt("return",Fe.read());case 4:case"end":return ze.stop()}},_e,this)})),function(_e){return U.apply(this,arguments)})}])&&m(L.prototype,N),D&&m(L,D),j}();O.RelType=e("./rel-type"),r.exports=O}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":23,"../utils/utils":26,"../utils/xml-stream":27,"../utils/zip-stream":28,"./rel-type":30,"./xform/book/workbook-xform":37,"./xform/comment/comments-xform":39,"./xform/comment/vml-notes-xform":44,"./xform/core/app-xform":50,"./xform/core/content-types-xform":51,"./xform/core/core-xform":52,"./xform/core/relationships-xform":54,"./xform/drawing/drawing-xform":61,"./xform/sheet/worksheet-xform":114,"./xform/strings/shared-strings-xform":123,"./xform/style/styles-xform":134,"./xform/table/table-xform":140,"./xml/theme1.js":142,_process:467,buffer:216,fs:215,jszip:399,"readable-stream":491}],142:[function(e,r,t){"use strict";r.exports=` `},{}],143:[function(e,r,t){(function(n){"use strict";function i(a){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(a)}function u(a,s){for(var d=0;d0&&arguments[0]!==void 0?arguments[0]:{};n(this,i),this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,l||{}),(l==null?void 0:l.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(l==null?void 0:l.quote)===!0?this.quote='"':(l==null?void 0:l.quote)===!1&&(this.quote=""),typeof(l==null?void 0:l.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((u=l.writeHeaders)===null||u===void 0||u),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)}},{}],145:[function(e,r,t){"use strict";function n(g,v){for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:{},y=[],b=new g.Writable({write:function(w,x,_){y.push(w),_()}});return new Promise(function(w,x){b.on("error",x).on("finish",function(){return w(n.concat(y))}),t.write(d,h).pipe(b)})},t.writeToString=function(d,h){return t.writeToBuffer(d,h).then(function(y){return y.toString()})},t.writeToPath=function(d,h,y){var b=v.createWriteStream(d,{encoding:"utf8"});return t.write(h,y).pipe(b)}}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":143,"./FormatterOptions":144,"./types":149,buffer:216,fs:215,stream:506,util:525}],149:[function(e,r,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=function(n){return n.length===1}},{}],150:[function(e,r,t){(function(n){"use strict";function i(h){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(h)}function u(h,y){for(var b=0;b1?P-1:0),A=1;A=S||P.hasHitRowLimit)return R();if(P.parsedLineCount+=1,P.shouldSkipLine)return T();var I=C[k];P.rowCount+=1,P.parsedRowCount+=1;var E=P.rowCount;return P.transformRow(I,function(O,j){if(O)return P.rowCount-=1,T(O);if(!j)return T(new Error("expected transform result"));if(j.isValid){if(j.row)return P.pushRow(j.row,T)}else P.emit("data-invalid",j.row,E,j.reason);return T()})})(0)}},{key:"transformRow",value:function(C,R){var P=this;try{this.headerTransformer.transform(C,function(S,A){return S?R(S):A?A.isValid?A.row?P.shouldEmitRows?P.rowTransformerValidator.transformAndValidate(A.row,R):P.skipRow(R):(P.rowCount-=1,P.parsedRowCount-=1,R(null,{row:null,isValid:!0})):P.shouldEmitRows?R(null,{isValid:!1,row:C}):P.skipRow(R):R(new Error("Expected result from header transform"))})}catch(S){R(S)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(C){return this.rowCount-=1,C(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(C,R){try{this.parserOptions.objectMode?this.push(C):this.push(JSON.stringify(C)),R()}catch(P){R(P)}}},{key:"hasHitRowLimit",get:function(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}},{key:"shouldEmitRows",get:function(){return this.parsedRowCount>this.parserOptions.skipRows}},{key:"shouldSkipLine",get:function(){return this.parsedLineCount<=this.parserOptions.skipLines}}])&&u(y.prototype,b),w&&u(y,w),_}(o.Transform);t.CsvParserStream=d}).call(this,e("timers").setImmediate)},{"./parser":162,"./transforms":165,stream:506,string_decoder:520,timers:521}],151:[function(e,r,t){"use strict";var n=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserOptions=void 0;var i=n(e("lodash.escaperegexp")),u=n(e("lodash.isnil"));t.ParserOptions=function l(m){var p;if(function(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}(this,l),this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,m||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=(p=this.escape)!==null&&p!==void 0?p:this.quote,this.supportsComments=!u.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),this.maxRows>0&&(this.limitRows=!0)}},{"lodash.escaperegexp":426,"lodash.isnil":431}],152:[function(e,r,t){"use strict";var n=Object.create?function(a,s,d,h){h===void 0&&(h=d),Object.defineProperty(a,h,{enumerable:!0,get:function(){return s[d]}})}:function(a,s,d,h){h===void 0&&(h=d),a[h]=s[d]},i=Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s},u=function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var d in a)d!=="default"&&Object.hasOwnProperty.call(a,d)&&n(s,a,d);return i(s,a),s},l=function(a,s){for(var d in a)d==="default"||s.hasOwnProperty(d)||n(s,a,d)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=void 0;var m=u(e("fs")),p=e("stream"),g=e("./ParserOptions"),v=e("./CsvParserStream");l(e("./types"),t);var c=e("./CsvParserStream");Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return c.CsvParserStream}});var o=e("./ParserOptions");Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return o.ParserOptions}}),t.parse=function(a){return new v.CsvParserStream(new g.ParserOptions(a))},t.parseStream=function(a,s){return a.pipe(new v.CsvParserStream(new g.ParserOptions(s)))},t.parseFile=function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.createReadStream(a).pipe(new v.CsvParserStream(new g.ParserOptions(s)))},t.parseString=function(a,s){var d=new p.Readable;return d.push(a),d.push(null),d.pipe(new v.CsvParserStream(new g.ParserOptions(s)))}},{"./CsvParserStream":150,"./ParserOptions":151,"./types":166,fs:215,stream:506}],153:[function(e,r,t){"use strict";function n(g,v){for(var c=0;cthis.cursor}},{key:"nextNonSpaceToken",get:function(){var c=this.lineFromCursor,o=this.parserOptions.NEXT_TOKEN_REGEXP;if(c.search(o)===-1)return null;var a=o.exec(c);if(a==null)return null;var s=a[1],d=this.cursor+(a.index||0);return new i.Token({token:s,startCursor:d,endCursor:d+s.length-1})}},{key:"nextCharacterToken",get:function(){var c=this.cursor;return this.lineLength<=c?null:new i.Token({token:this.line[c],startCursor:c,endCursor:c})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}}])&&n(p.prototype,g),v&&n(p,v),m}();t.Scanner=l},{"./Token":156}],156:[function(e,r,t){"use strict";function n(u,l){for(var m=0;mthis.headersLength){if(!d.strictColumnHandling)throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(s.length));return{row:s,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(s.length)}}return d.strictColumnHandling&&s.length1});throw new Error("Duplicate headers found ".concat(JSON.stringify(b)))}this.headers=s,this.receivedHeaders=!0,this.headersLength=((d=this.headers)===null||d===void 0?void 0:d.length)||0}}])&&n(c.prototype,o),a&&n(c,a),v}();t.HeaderTransformer=g},{"lodash.groupby":427,"lodash.isfunction":430,"lodash.isundefined":432,"lodash.uniq":433}],164:[function(e,r,t){"use strict";function n(p,g){for(var v=0;v>6],h=(32&s)==0;if((31&s)==31){var y=s;for(s=0;(128&y)==128;){if(y=o.readUInt8(a),o.isError(y))return y;s<<=7,s|=127&y}}else s&=31;return{cls:d,primitive:h,tag:s,tagStr:m.tag[s]}}function c(o,a,s){var d=o.readUInt8(s);if(o.isError(d))return d;if(!a&&d===128)return null;if((128&d)==0)return d;var h=127&d;if(h>4)return o.error("length octect is too long");d=0;for(var y=0;y=31?P.error("Multi-octet tag encoding unsupported"):(C||(S|=32),S|=l.tagClassByName[R||"universal"]<<6)}(v,c,o,this.reporter);if(a.length<128){var d=i.alloc(2);return d[0]=s,d[1]=a.length,this._createEncoderBuffer([d,a])}for(var h=1,y=a.length;y>=256;y>>=8)h++;var b=i.alloc(2+h);b[0]=s,b[1]=128|h;for(var w=1+h,x=a.length;x>0;w--,x>>=8)b[w]=255&x;return this._createEncoderBuffer([b,a])},p.prototype._encodeStr=function(v,c){if(c==="bitstr")return this._createEncoderBuffer([0|v.unused,v.data]);if(c==="bmpstr"){for(var o=i.alloc(2*v.length),a=0;a=40)return this.reporter.error("Second objid identifier OOB");v.splice(0,2,40*v[0]+v[1])}for(var d=0,h=0;h=128;y>>=7)d++}for(var b=i.alloc(d),w=b.length-1,x=v.length-1;x>=0;x--){var _=v[x];for(b[w--]=127&_;(_>>=7)>0;)b[w--]=128|127&_}return this._createEncoderBuffer(b)},p.prototype._encodeTime=function(v,c){var o,a=new Date(v);return c==="gentime"?o=[g(a.getUTCFullYear()),g(a.getUTCMonth()+1),g(a.getUTCDate()),g(a.getUTCHours()),g(a.getUTCMinutes()),g(a.getUTCSeconds()),"Z"].join(""):c==="utctime"?o=[g(a.getUTCFullYear()%100),g(a.getUTCMonth()+1),g(a.getUTCDate()),g(a.getUTCHours()),g(a.getUTCMinutes()),g(a.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+c+" time is not supported yet"),this._encodeStr(o,"octstr")},p.prototype._encodeNull=function(){return this._createEncoderBuffer("")},p.prototype._encodeInt=function(v,c){if(typeof v=="string"){if(!c)return this.reporter.error("String int or enum given, but no values map");if(!c.hasOwnProperty(v))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(v));v=c[v]}if(typeof v!="number"&&!i.isBuffer(v)){var o=v.toArray();!v.sign&&128&o[0]&&o.unshift(0),v=i.from(o)}if(i.isBuffer(v)){var a=v.length;v.length===0&&a++;var s=i.alloc(a);return v.copy(s),v.length===0&&(s[0]=0),this._createEncoderBuffer(s)}if(v<128)return this._createEncoderBuffer(v);if(v<256)return this._createEncoderBuffer([0,v]);for(var d=1,h=v;h>=256;h>>=8)d++;for(var y=new Array(d),b=y.length-1;b>=0;b--)y[b]=255&v,v>>=8;return 128&y[0]&&y.unshift(0),this._createEncoderBuffer(i.from(y))},p.prototype._encodeBool=function(v){return this._createEncoderBuffer(v?255:0)},p.prototype._use=function(v,c){return typeof v=="function"&&(v=v(c)),v._getEncoder("der").tree},p.prototype._skipDefault=function(v,c,o){var a,s=this._baseState;if(s.default===null)return!1;var d=v.join();if(s.defaultBuffer===void 0&&(s.defaultBuffer=this._encodeValue(s.default,c,o).join()),d.length!==s.defaultBuffer.length)return!1;for(a=0;a=49&&L<=54?L-49+10:L>=17&&L<=22?L-17+10:15&L}return E}function c(k,T,I,E){for(var O=0,j=Math.min(k.length,I),L=T;L=49?N-49+10:N>=17?N-17+10:N}return O}p.isBN=function(k){return k instanceof p||k!==null&&n(k)==="object"&&k.constructor.wordSize===p.wordSize&&Array.isArray(k.words)},p.max=function(k,T){return k.cmp(T)>0?k:T},p.min=function(k,T){return k.cmp(T)<0?k:T},p.prototype._init=function(k,T,I){if(typeof k=="number")return this._initNumber(k,T,I);if(n(k)==="object")return this._initArray(k,T,I);T==="hex"&&(T=16),l(T===(0|T)&&T>=2&&T<=36);var E=0;(k=k.toString().replace(/\s+/g,""))[0]==="-"&&E++,T===16?this._parseHex(k,E):this._parseBase(k,T,E),k[0]==="-"&&(this.negative=1),this.strip(),I==="le"&&this._initArray(this.toArray(),T,I)},p.prototype._initNumber=function(k,T,I){k<0&&(this.negative=1,k=-k),k<67108864?(this.words=[67108863&k],this.length=1):k<4503599627370496?(this.words=[67108863&k,k/67108864&67108863],this.length=2):(l(k<9007199254740992),this.words=[67108863&k,k/67108864&67108863,1],this.length=3),I==="le"&&this._initArray(this.toArray(),T,I)},p.prototype._initArray=function(k,T,I){if(l(typeof k.length=="number"),k.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(k.length/3),this.words=new Array(this.length);for(var E=0;E=0;E-=3)j=k[E]|k[E-1]<<8|k[E-2]<<16,this.words[O]|=j<>>26-L&67108863,(L+=24)>=26&&(L-=26,O++);else if(I==="le")for(E=0,O=0;E>>26-L&67108863,(L+=24)>=26&&(L-=26,O++);return this.strip()},p.prototype._parseHex=function(k,T){this.length=Math.ceil((k.length-T)/6),this.words=new Array(this.length);for(var I=0;I=T;I-=6)O=v(k,I,I+6),this.words[E]|=O<>>26-j&4194303,(j+=24)>=26&&(j-=26,E++);I+6!==T&&(O=v(k,T,I+6),this.words[E]|=O<>>26-j&4194303),this.strip()},p.prototype._parseBase=function(k,T,I){this.words=[0],this.length=1;for(var E=0,O=1;O<=67108863;O*=T)E++;E--,O=O/T|0;for(var j=k.length-I,L=j%E,N=Math.min(j,j-L)+I,D=0,U=I;U1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},p.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},p.prototype.inspect=function(){return(this.red?""};var o=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],a=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],s=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(k,T,I){I.negative=T.negative^k.negative;var E=k.length+T.length|0;I.length=E,E=E-1|0;var O=0|k.words[0],j=0|T.words[0],L=O*j,N=67108863&L,D=L/67108864|0;I.words[0]=N;for(var U=1;U>>26,X=67108863&D,Y=Math.min(U,T.length-1),ee=Math.max(0,U-k.length+1);ee<=Y;ee++){var ne=U-ee|0;G+=(L=(O=0|k.words[ne])*(j=0|T.words[ee])+X)/67108864|0,X=67108863&L}I.words[U]=0|X,D=0|G}return D!==0?I.words[U]=0|D:I.length--,I.strip()}p.prototype.toString=function(k,T){var I;if(T=0|T||1,(k=k||10)===16||k==="hex"){I="";for(var E=0,O=0,j=0;j>>24-E&16777215)!==0||j!==this.length-1?o[6-N.length]+N+I:N+I,(E+=2)>=26&&(E-=26,j--)}for(O!==0&&(I=O.toString(16)+I);I.length%T!=0;)I="0"+I;return this.negative!==0&&(I="-"+I),I}if(k===(0|k)&&k>=2&&k<=36){var D=a[k],U=s[k];I="";var G=this.clone();for(G.negative=0;!G.isZero();){var X=G.modn(U).toString(k);I=(G=G.idivn(U)).isZero()?X+I:o[D-X.length]+X+I}for(this.isZero()&&(I="0"+I);I.length%T!=0;)I="0"+I;return this.negative!==0&&(I="-"+I),I}l(!1,"Base should be between 2 and 36")},p.prototype.toNumber=function(){var k=this.words[0];return this.length===2?k+=67108864*this.words[1]:this.length===3&&this.words[2]===1?k+=4503599627370496+67108864*this.words[1]:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-k:k},p.prototype.toJSON=function(){return this.toString(16)},p.prototype.toBuffer=function(k,T){return l(g!==void 0),this.toArrayLike(g,k,T)},p.prototype.toArray=function(k,T){return this.toArrayLike(Array,k,T)},p.prototype.toArrayLike=function(k,T,I){var E=this.byteLength(),O=I||Math.max(1,E);l(E<=O,"byte array longer than desired length"),l(O>0,"Requested array length <= 0"),this.strip();var j,L,N=T==="le",D=new k(O),U=this.clone();if(N){for(L=0;!U.isZero();L++)j=U.andln(255),U.iushrn(8),D[L]=j;for(;L=4096&&(I+=13,T>>>=13),T>=64&&(I+=7,T>>>=7),T>=8&&(I+=4,T>>>=4),T>=2&&(I+=2,T>>>=2),I+T},p.prototype._zeroBits=function(k){if(k===0)return 26;var T=k,I=0;return(8191&T)==0&&(I+=13,T>>>=13),(127&T)==0&&(I+=7,T>>>=7),(15&T)==0&&(I+=4,T>>>=4),(3&T)==0&&(I+=2,T>>>=2),(1&T)==0&&I++,I},p.prototype.bitLength=function(){var k=this.words[this.length-1],T=this._countBits(k);return 26*(this.length-1)+T},p.prototype.zeroBits=function(){if(this.isZero())return 0;for(var k=0,T=0;Tk.length?this.clone().ior(k):k.clone().ior(this)},p.prototype.uor=function(k){return this.length>k.length?this.clone().iuor(k):k.clone().iuor(this)},p.prototype.iuand=function(k){var T;T=this.length>k.length?k:this;for(var I=0;Ik.length?this.clone().iand(k):k.clone().iand(this)},p.prototype.uand=function(k){return this.length>k.length?this.clone().iuand(k):k.clone().iuand(this)},p.prototype.iuxor=function(k){var T,I;this.length>k.length?(T=this,I=k):(T=k,I=this);for(var E=0;Ek.length?this.clone().ixor(k):k.clone().ixor(this)},p.prototype.uxor=function(k){return this.length>k.length?this.clone().iuxor(k):k.clone().iuxor(this)},p.prototype.inotn=function(k){l(typeof k=="number"&&k>=0);var T=0|Math.ceil(k/26),I=k%26;this._expand(T),I>0&&T--;for(var E=0;E0&&(this.words[E]=~this.words[E]&67108863>>26-I),this.strip()},p.prototype.notn=function(k){return this.clone().inotn(k)},p.prototype.setn=function(k,T){l(typeof k=="number"&&k>=0);var I=k/26|0,E=k%26;return this._expand(I+1),this.words[I]=T?this.words[I]|1<k.length?(I=this,E=k):(I=k,E=this);for(var O=0,j=0;j>>26;for(;O!==0&&j>>26;if(this.length=I.length,O!==0)this.words[this.length]=O,this.length++;else if(I!==this)for(;jk.length?this.clone().iadd(k):k.clone().iadd(this)},p.prototype.isub=function(k){if(k.negative!==0){k.negative=0;var T=this.iadd(k);return k.negative=1,T._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(k),this.negative=1,this._normSign();var I,E,O=this.cmp(k);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;O>0?(I=this,E=k):(I=k,E=this);for(var j=0,L=0;L>26,this.words[L]=67108863&T;for(;j!==0&&L>26,this.words[L]=67108863&T;if(j===0&&L>>13,ee=0|L[1],ne=8191&ee,te=ee>>>13,M=0|L[2],B=8191&M,z=M>>>13,q=0|L[3],J=8191&q,Q=q>>>13,K=0|L[4],ie=8191&K,Z=K>>>13,re=0|L[5],ae=8191&re,ce=re>>>13,ke=0|L[6],we=8191&ke,Se=ke>>>13,Ge=0|L[7],xe=8191&Ge,be=Ge>>>13,_e=0|L[8],Oe=8191&_e,Fe=_e>>>13,ze=0|L[9],Me=8191&ze,Re=ze>>>13,Pe=0|N[0],Ve=8191&Pe,He=Pe>>>13,nt=0|N[1],he=8191&nt,ue=nt>>>13,Te=0|N[2],Ne=8191&Te,Xe=Te>>>13,dt=0|N[3],Qe=8191&dt,Ke=dt>>>13,Ie=0|N[4],Le=8191&Ie,pt=Ie>>>13,gt=0|N[5],ot=8191>,bt=gt>>>13,xt=0|N[6],Je=8191&xt,ct=xt>>>13,Ce=0|N[7],je=8191&Ce,qe=Ce>>>13,mt=0|N[8],se=8191&mt,fe=mt>>>13,ve=0|N[9],pe=8191&ve,de=ve>>>13;I.negative=k.negative^T.negative,I.length=19;var ge=(U+(E=Math.imul(X,Ve))|0)+((8191&(O=(O=Math.imul(X,He))+Math.imul(Y,Ve)|0))<<13)|0;U=((j=Math.imul(Y,He))+(O>>>13)|0)+(ge>>>26)|0,ge&=67108863,E=Math.imul(ne,Ve),O=(O=Math.imul(ne,He))+Math.imul(te,Ve)|0,j=Math.imul(te,He);var Ee=(U+(E=E+Math.imul(X,he)|0)|0)+((8191&(O=(O=O+Math.imul(X,ue)|0)+Math.imul(Y,he)|0))<<13)|0;U=((j=j+Math.imul(Y,ue)|0)+(O>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,E=Math.imul(B,Ve),O=(O=Math.imul(B,He))+Math.imul(z,Ve)|0,j=Math.imul(z,He),E=E+Math.imul(ne,he)|0,O=(O=O+Math.imul(ne,ue)|0)+Math.imul(te,he)|0,j=j+Math.imul(te,ue)|0;var $e=(U+(E=E+Math.imul(X,Ne)|0)|0)+((8191&(O=(O=O+Math.imul(X,Xe)|0)+Math.imul(Y,Ne)|0))<<13)|0;U=((j=j+Math.imul(Y,Xe)|0)+(O>>>13)|0)+($e>>>26)|0,$e&=67108863,E=Math.imul(J,Ve),O=(O=Math.imul(J,He))+Math.imul(Q,Ve)|0,j=Math.imul(Q,He),E=E+Math.imul(B,he)|0,O=(O=O+Math.imul(B,ue)|0)+Math.imul(z,he)|0,j=j+Math.imul(z,ue)|0,E=E+Math.imul(ne,Ne)|0,O=(O=O+Math.imul(ne,Xe)|0)+Math.imul(te,Ne)|0,j=j+Math.imul(te,Xe)|0;var Be=(U+(E=E+Math.imul(X,Qe)|0)|0)+((8191&(O=(O=O+Math.imul(X,Ke)|0)+Math.imul(Y,Qe)|0))<<13)|0;U=((j=j+Math.imul(Y,Ke)|0)+(O>>>13)|0)+(Be>>>26)|0,Be&=67108863,E=Math.imul(ie,Ve),O=(O=Math.imul(ie,He))+Math.imul(Z,Ve)|0,j=Math.imul(Z,He),E=E+Math.imul(J,he)|0,O=(O=O+Math.imul(J,ue)|0)+Math.imul(Q,he)|0,j=j+Math.imul(Q,ue)|0,E=E+Math.imul(B,Ne)|0,O=(O=O+Math.imul(B,Xe)|0)+Math.imul(z,Ne)|0,j=j+Math.imul(z,Xe)|0,E=E+Math.imul(ne,Qe)|0,O=(O=O+Math.imul(ne,Ke)|0)+Math.imul(te,Qe)|0,j=j+Math.imul(te,Ke)|0;var We=(U+(E=E+Math.imul(X,Le)|0)|0)+((8191&(O=(O=O+Math.imul(X,pt)|0)+Math.imul(Y,Le)|0))<<13)|0;U=((j=j+Math.imul(Y,pt)|0)+(O>>>13)|0)+(We>>>26)|0,We&=67108863,E=Math.imul(ae,Ve),O=(O=Math.imul(ae,He))+Math.imul(ce,Ve)|0,j=Math.imul(ce,He),E=E+Math.imul(ie,he)|0,O=(O=O+Math.imul(ie,ue)|0)+Math.imul(Z,he)|0,j=j+Math.imul(Z,ue)|0,E=E+Math.imul(J,Ne)|0,O=(O=O+Math.imul(J,Xe)|0)+Math.imul(Q,Ne)|0,j=j+Math.imul(Q,Xe)|0,E=E+Math.imul(B,Qe)|0,O=(O=O+Math.imul(B,Ke)|0)+Math.imul(z,Qe)|0,j=j+Math.imul(z,Ke)|0,E=E+Math.imul(ne,Le)|0,O=(O=O+Math.imul(ne,pt)|0)+Math.imul(te,Le)|0,j=j+Math.imul(te,pt)|0;var Ye=(U+(E=E+Math.imul(X,ot)|0)|0)+((8191&(O=(O=O+Math.imul(X,bt)|0)+Math.imul(Y,ot)|0))<<13)|0;U=((j=j+Math.imul(Y,bt)|0)+(O>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,E=Math.imul(we,Ve),O=(O=Math.imul(we,He))+Math.imul(Se,Ve)|0,j=Math.imul(Se,He),E=E+Math.imul(ae,he)|0,O=(O=O+Math.imul(ae,ue)|0)+Math.imul(ce,he)|0,j=j+Math.imul(ce,ue)|0,E=E+Math.imul(ie,Ne)|0,O=(O=O+Math.imul(ie,Xe)|0)+Math.imul(Z,Ne)|0,j=j+Math.imul(Z,Xe)|0,E=E+Math.imul(J,Qe)|0,O=(O=O+Math.imul(J,Ke)|0)+Math.imul(Q,Qe)|0,j=j+Math.imul(Q,Ke)|0,E=E+Math.imul(B,Le)|0,O=(O=O+Math.imul(B,pt)|0)+Math.imul(z,Le)|0,j=j+Math.imul(z,pt)|0,E=E+Math.imul(ne,ot)|0,O=(O=O+Math.imul(ne,bt)|0)+Math.imul(te,ot)|0,j=j+Math.imul(te,bt)|0;var ut=(U+(E=E+Math.imul(X,Je)|0)|0)+((8191&(O=(O=O+Math.imul(X,ct)|0)+Math.imul(Y,Je)|0))<<13)|0;U=((j=j+Math.imul(Y,ct)|0)+(O>>>13)|0)+(ut>>>26)|0,ut&=67108863,E=Math.imul(xe,Ve),O=(O=Math.imul(xe,He))+Math.imul(be,Ve)|0,j=Math.imul(be,He),E=E+Math.imul(we,he)|0,O=(O=O+Math.imul(we,ue)|0)+Math.imul(Se,he)|0,j=j+Math.imul(Se,ue)|0,E=E+Math.imul(ae,Ne)|0,O=(O=O+Math.imul(ae,Xe)|0)+Math.imul(ce,Ne)|0,j=j+Math.imul(ce,Xe)|0,E=E+Math.imul(ie,Qe)|0,O=(O=O+Math.imul(ie,Ke)|0)+Math.imul(Z,Qe)|0,j=j+Math.imul(Z,Ke)|0,E=E+Math.imul(J,Le)|0,O=(O=O+Math.imul(J,pt)|0)+Math.imul(Q,Le)|0,j=j+Math.imul(Q,pt)|0,E=E+Math.imul(B,ot)|0,O=(O=O+Math.imul(B,bt)|0)+Math.imul(z,ot)|0,j=j+Math.imul(z,bt)|0,E=E+Math.imul(ne,Je)|0,O=(O=O+Math.imul(ne,ct)|0)+Math.imul(te,Je)|0,j=j+Math.imul(te,ct)|0;var vt=(U+(E=E+Math.imul(X,je)|0)|0)+((8191&(O=(O=O+Math.imul(X,qe)|0)+Math.imul(Y,je)|0))<<13)|0;U=((j=j+Math.imul(Y,qe)|0)+(O>>>13)|0)+(vt>>>26)|0,vt&=67108863,E=Math.imul(Oe,Ve),O=(O=Math.imul(Oe,He))+Math.imul(Fe,Ve)|0,j=Math.imul(Fe,He),E=E+Math.imul(xe,he)|0,O=(O=O+Math.imul(xe,ue)|0)+Math.imul(be,he)|0,j=j+Math.imul(be,ue)|0,E=E+Math.imul(we,Ne)|0,O=(O=O+Math.imul(we,Xe)|0)+Math.imul(Se,Ne)|0,j=j+Math.imul(Se,Xe)|0,E=E+Math.imul(ae,Qe)|0,O=(O=O+Math.imul(ae,Ke)|0)+Math.imul(ce,Qe)|0,j=j+Math.imul(ce,Ke)|0,E=E+Math.imul(ie,Le)|0,O=(O=O+Math.imul(ie,pt)|0)+Math.imul(Z,Le)|0,j=j+Math.imul(Z,pt)|0,E=E+Math.imul(J,ot)|0,O=(O=O+Math.imul(J,bt)|0)+Math.imul(Q,ot)|0,j=j+Math.imul(Q,bt)|0,E=E+Math.imul(B,Je)|0,O=(O=O+Math.imul(B,ct)|0)+Math.imul(z,Je)|0,j=j+Math.imul(z,ct)|0,E=E+Math.imul(ne,je)|0,O=(O=O+Math.imul(ne,qe)|0)+Math.imul(te,je)|0,j=j+Math.imul(te,qe)|0;var Et=(U+(E=E+Math.imul(X,se)|0)|0)+((8191&(O=(O=O+Math.imul(X,fe)|0)+Math.imul(Y,se)|0))<<13)|0;U=((j=j+Math.imul(Y,fe)|0)+(O>>>13)|0)+(Et>>>26)|0,Et&=67108863,E=Math.imul(Me,Ve),O=(O=Math.imul(Me,He))+Math.imul(Re,Ve)|0,j=Math.imul(Re,He),E=E+Math.imul(Oe,he)|0,O=(O=O+Math.imul(Oe,ue)|0)+Math.imul(Fe,he)|0,j=j+Math.imul(Fe,ue)|0,E=E+Math.imul(xe,Ne)|0,O=(O=O+Math.imul(xe,Xe)|0)+Math.imul(be,Ne)|0,j=j+Math.imul(be,Xe)|0,E=E+Math.imul(we,Qe)|0,O=(O=O+Math.imul(we,Ke)|0)+Math.imul(Se,Qe)|0,j=j+Math.imul(Se,Ke)|0,E=E+Math.imul(ae,Le)|0,O=(O=O+Math.imul(ae,pt)|0)+Math.imul(ce,Le)|0,j=j+Math.imul(ce,pt)|0,E=E+Math.imul(ie,ot)|0,O=(O=O+Math.imul(ie,bt)|0)+Math.imul(Z,ot)|0,j=j+Math.imul(Z,bt)|0,E=E+Math.imul(J,Je)|0,O=(O=O+Math.imul(J,ct)|0)+Math.imul(Q,Je)|0,j=j+Math.imul(Q,ct)|0,E=E+Math.imul(B,je)|0,O=(O=O+Math.imul(B,qe)|0)+Math.imul(z,je)|0,j=j+Math.imul(z,qe)|0,E=E+Math.imul(ne,se)|0,O=(O=O+Math.imul(ne,fe)|0)+Math.imul(te,se)|0,j=j+Math.imul(te,fe)|0;var wt=(U+(E=E+Math.imul(X,pe)|0)|0)+((8191&(O=(O=O+Math.imul(X,de)|0)+Math.imul(Y,pe)|0))<<13)|0;U=((j=j+Math.imul(Y,de)|0)+(O>>>13)|0)+(wt>>>26)|0,wt&=67108863,E=Math.imul(Me,he),O=(O=Math.imul(Me,ue))+Math.imul(Re,he)|0,j=Math.imul(Re,ue),E=E+Math.imul(Oe,Ne)|0,O=(O=O+Math.imul(Oe,Xe)|0)+Math.imul(Fe,Ne)|0,j=j+Math.imul(Fe,Xe)|0,E=E+Math.imul(xe,Qe)|0,O=(O=O+Math.imul(xe,Ke)|0)+Math.imul(be,Qe)|0,j=j+Math.imul(be,Ke)|0,E=E+Math.imul(we,Le)|0,O=(O=O+Math.imul(we,pt)|0)+Math.imul(Se,Le)|0,j=j+Math.imul(Se,pt)|0,E=E+Math.imul(ae,ot)|0,O=(O=O+Math.imul(ae,bt)|0)+Math.imul(ce,ot)|0,j=j+Math.imul(ce,bt)|0,E=E+Math.imul(ie,Je)|0,O=(O=O+Math.imul(ie,ct)|0)+Math.imul(Z,Je)|0,j=j+Math.imul(Z,ct)|0,E=E+Math.imul(J,je)|0,O=(O=O+Math.imul(J,qe)|0)+Math.imul(Q,je)|0,j=j+Math.imul(Q,qe)|0,E=E+Math.imul(B,se)|0,O=(O=O+Math.imul(B,fe)|0)+Math.imul(z,se)|0,j=j+Math.imul(z,fe)|0;var me=(U+(E=E+Math.imul(ne,pe)|0)|0)+((8191&(O=(O=O+Math.imul(ne,de)|0)+Math.imul(te,pe)|0))<<13)|0;U=((j=j+Math.imul(te,de)|0)+(O>>>13)|0)+(me>>>26)|0,me&=67108863,E=Math.imul(Me,Ne),O=(O=Math.imul(Me,Xe))+Math.imul(Re,Ne)|0,j=Math.imul(Re,Xe),E=E+Math.imul(Oe,Qe)|0,O=(O=O+Math.imul(Oe,Ke)|0)+Math.imul(Fe,Qe)|0,j=j+Math.imul(Fe,Ke)|0,E=E+Math.imul(xe,Le)|0,O=(O=O+Math.imul(xe,pt)|0)+Math.imul(be,Le)|0,j=j+Math.imul(be,pt)|0,E=E+Math.imul(we,ot)|0,O=(O=O+Math.imul(we,bt)|0)+Math.imul(Se,ot)|0,j=j+Math.imul(Se,bt)|0,E=E+Math.imul(ae,Je)|0,O=(O=O+Math.imul(ae,ct)|0)+Math.imul(ce,Je)|0,j=j+Math.imul(ce,ct)|0,E=E+Math.imul(ie,je)|0,O=(O=O+Math.imul(ie,qe)|0)+Math.imul(Z,je)|0,j=j+Math.imul(Z,qe)|0,E=E+Math.imul(J,se)|0,O=(O=O+Math.imul(J,fe)|0)+Math.imul(Q,se)|0,j=j+Math.imul(Q,fe)|0;var Ue=(U+(E=E+Math.imul(B,pe)|0)|0)+((8191&(O=(O=O+Math.imul(B,de)|0)+Math.imul(z,pe)|0))<<13)|0;U=((j=j+Math.imul(z,de)|0)+(O>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,E=Math.imul(Me,Qe),O=(O=Math.imul(Me,Ke))+Math.imul(Re,Qe)|0,j=Math.imul(Re,Ke),E=E+Math.imul(Oe,Le)|0,O=(O=O+Math.imul(Oe,pt)|0)+Math.imul(Fe,Le)|0,j=j+Math.imul(Fe,pt)|0,E=E+Math.imul(xe,ot)|0,O=(O=O+Math.imul(xe,bt)|0)+Math.imul(be,ot)|0,j=j+Math.imul(be,bt)|0,E=E+Math.imul(we,Je)|0,O=(O=O+Math.imul(we,ct)|0)+Math.imul(Se,Je)|0,j=j+Math.imul(Se,ct)|0,E=E+Math.imul(ae,je)|0,O=(O=O+Math.imul(ae,qe)|0)+Math.imul(ce,je)|0,j=j+Math.imul(ce,qe)|0,E=E+Math.imul(ie,se)|0,O=(O=O+Math.imul(ie,fe)|0)+Math.imul(Z,se)|0,j=j+Math.imul(Z,fe)|0;var at=(U+(E=E+Math.imul(J,pe)|0)|0)+((8191&(O=(O=O+Math.imul(J,de)|0)+Math.imul(Q,pe)|0))<<13)|0;U=((j=j+Math.imul(Q,de)|0)+(O>>>13)|0)+(at>>>26)|0,at&=67108863,E=Math.imul(Me,Le),O=(O=Math.imul(Me,pt))+Math.imul(Re,Le)|0,j=Math.imul(Re,pt),E=E+Math.imul(Oe,ot)|0,O=(O=O+Math.imul(Oe,bt)|0)+Math.imul(Fe,ot)|0,j=j+Math.imul(Fe,bt)|0,E=E+Math.imul(xe,Je)|0,O=(O=O+Math.imul(xe,ct)|0)+Math.imul(be,Je)|0,j=j+Math.imul(be,ct)|0,E=E+Math.imul(we,je)|0,O=(O=O+Math.imul(we,qe)|0)+Math.imul(Se,je)|0,j=j+Math.imul(Se,qe)|0,E=E+Math.imul(ae,se)|0,O=(O=O+Math.imul(ae,fe)|0)+Math.imul(ce,se)|0,j=j+Math.imul(ce,fe)|0;var it=(U+(E=E+Math.imul(ie,pe)|0)|0)+((8191&(O=(O=O+Math.imul(ie,de)|0)+Math.imul(Z,pe)|0))<<13)|0;U=((j=j+Math.imul(Z,de)|0)+(O>>>13)|0)+(it>>>26)|0,it&=67108863,E=Math.imul(Me,ot),O=(O=Math.imul(Me,bt))+Math.imul(Re,ot)|0,j=Math.imul(Re,bt),E=E+Math.imul(Oe,Je)|0,O=(O=O+Math.imul(Oe,ct)|0)+Math.imul(Fe,Je)|0,j=j+Math.imul(Fe,ct)|0,E=E+Math.imul(xe,je)|0,O=(O=O+Math.imul(xe,qe)|0)+Math.imul(be,je)|0,j=j+Math.imul(be,qe)|0,E=E+Math.imul(we,se)|0,O=(O=O+Math.imul(we,fe)|0)+Math.imul(Se,se)|0,j=j+Math.imul(Se,fe)|0;var ft=(U+(E=E+Math.imul(ae,pe)|0)|0)+((8191&(O=(O=O+Math.imul(ae,de)|0)+Math.imul(ce,pe)|0))<<13)|0;U=((j=j+Math.imul(ce,de)|0)+(O>>>13)|0)+(ft>>>26)|0,ft&=67108863,E=Math.imul(Me,Je),O=(O=Math.imul(Me,ct))+Math.imul(Re,Je)|0,j=Math.imul(Re,ct),E=E+Math.imul(Oe,je)|0,O=(O=O+Math.imul(Oe,qe)|0)+Math.imul(Fe,je)|0,j=j+Math.imul(Fe,qe)|0,E=E+Math.imul(xe,se)|0,O=(O=O+Math.imul(xe,fe)|0)+Math.imul(be,se)|0,j=j+Math.imul(be,fe)|0;var Tt=(U+(E=E+Math.imul(we,pe)|0)|0)+((8191&(O=(O=O+Math.imul(we,de)|0)+Math.imul(Se,pe)|0))<<13)|0;U=((j=j+Math.imul(Se,de)|0)+(O>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,E=Math.imul(Me,je),O=(O=Math.imul(Me,qe))+Math.imul(Re,je)|0,j=Math.imul(Re,qe),E=E+Math.imul(Oe,se)|0,O=(O=O+Math.imul(Oe,fe)|0)+Math.imul(Fe,se)|0,j=j+Math.imul(Fe,fe)|0;var At=(U+(E=E+Math.imul(xe,pe)|0)|0)+((8191&(O=(O=O+Math.imul(xe,de)|0)+Math.imul(be,pe)|0))<<13)|0;U=((j=j+Math.imul(be,de)|0)+(O>>>13)|0)+(At>>>26)|0,At&=67108863,E=Math.imul(Me,se),O=(O=Math.imul(Me,fe))+Math.imul(Re,se)|0,j=Math.imul(Re,fe);var Ut=(U+(E=E+Math.imul(Oe,pe)|0)|0)+((8191&(O=(O=O+Math.imul(Oe,de)|0)+Math.imul(Fe,pe)|0))<<13)|0;U=((j=j+Math.imul(Fe,de)|0)+(O>>>13)|0)+(Ut>>>26)|0,Ut&=67108863;var Ft=(U+(E=Math.imul(Me,pe))|0)+((8191&(O=(O=Math.imul(Me,de))+Math.imul(Re,pe)|0))<<13)|0;return U=((j=Math.imul(Re,de))+(O>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,D[0]=ge,D[1]=Ee,D[2]=$e,D[3]=Be,D[4]=We,D[5]=Ye,D[6]=ut,D[7]=vt,D[8]=Et,D[9]=wt,D[10]=me,D[11]=Ue,D[12]=at,D[13]=it,D[14]=ft,D[15]=Tt,D[16]=At,D[17]=Ut,D[18]=Ft,U!==0&&(D[19]=U,I.length++),I};function y(k,T,I){return new b().mulp(k,T,I)}function b(k,T){this.x=k,this.y=T}Math.imul||(h=d),p.prototype.mulTo=function(k,T){var I=this.length+k.length;return this.length===10&&k.length===10?h(this,k,T):I<63?d(this,k,T):I<1024?function(E,O,j){j.negative=O.negative^E.negative,j.length=E.length+O.length;for(var L=0,N=0,D=0;D>>26)|0)>>>26,U&=67108863}j.words[D]=G,L=U,U=N}return L!==0?j.words[D]=L:j.length--,j.strip()}(this,k,T):y(this,k,T)},b.prototype.makeRBT=function(k){for(var T=new Array(k),I=p.prototype._countBits(k)-1,E=0;E>=1;return E},b.prototype.permute=function(k,T,I,E,O,j){for(var L=0;L>>=1)O++;return 1<>>=13,I[2*j+1]=8191&O,O>>>=13;for(j=2*T;j>=26,T+=E/67108864|0,T+=O>>>26,this.words[I]=67108863&O}return T!==0&&(this.words[I]=T,this.length++),this},p.prototype.muln=function(k){return this.clone().imuln(k)},p.prototype.sqr=function(){return this.mul(this)},p.prototype.isqr=function(){return this.imul(this.clone())},p.prototype.pow=function(k){var T=function(j){for(var L=new Array(j.bitLength()),N=0;N>>U}return L}(k);if(T.length===0)return new p(1);for(var I=this,E=0;E=0);var T,I=k%26,E=(k-I)/26,O=67108863>>>26-I<<26-I;if(I!==0){var j=0;for(T=0;T>>26-I}j&&(this.words[T]=j,this.length++)}if(E!==0){for(T=this.length-1;T>=0;T--)this.words[T+E]=this.words[T];for(T=0;T=0),E=T?(T-T%26)/26:0;var O=k%26,j=Math.min((k-O)/26,this.length),L=67108863^67108863>>>O<j)for(this.length-=j,D=0;D=0&&(U!==0||D>=E);D--){var G=0|this.words[D];this.words[D]=U<<26-O|G>>>O,U=G&L}return N&&U!==0&&(N.words[N.length++]=U),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},p.prototype.ishrn=function(k,T,I){return l(this.negative===0),this.iushrn(k,T,I)},p.prototype.shln=function(k){return this.clone().ishln(k)},p.prototype.ushln=function(k){return this.clone().iushln(k)},p.prototype.shrn=function(k){return this.clone().ishrn(k)},p.prototype.ushrn=function(k){return this.clone().iushrn(k)},p.prototype.testn=function(k){l(typeof k=="number"&&k>=0);var T=k%26,I=(k-T)/26,E=1<=0);var T=k%26,I=(k-T)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=I)return this;if(T!==0&&I++,this.length=Math.min(I,this.length),T!==0){var E=67108863^67108863>>>T<=67108864;T++)this.words[T]-=67108864,T===this.length-1?this.words[T+1]=1:this.words[T+1]++;return this.length=Math.max(this.length,T+1),this},p.prototype.isubn=function(k){if(l(typeof k=="number"),l(k<67108864),k<0)return this.iaddn(-k);if(this.negative!==0)return this.negative=0,this.iaddn(k),this.negative=1,this;if(this.words[0]-=k,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var T=0;T>26)-(N/67108864|0),this.words[E+I]=67108863&O}for(;E>26,this.words[E+I]=67108863&O;if(L===0)return this.strip();for(l(L===-1),L=0,E=0;E>26,this.words[E]=67108863&O;return this.negative=1,this.strip()},p.prototype._wordDiv=function(k,T){var I=(this.length,k.length),E=this.clone(),O=k,j=0|O.words[O.length-1];(I=26-this._countBits(j))!==0&&(O=O.ushln(I),E.iushln(I),j=0|O.words[O.length-1]);var L,N=E.length-O.length;if(T!=="mod"){(L=new p(null)).length=N+1,L.words=new Array(L.length);for(var D=0;D=0;G--){var X=67108864*(0|E.words[O.length+G])+(0|E.words[O.length+G-1]);for(X=Math.min(X/j|0,67108863),E._ishlnsubmul(O,X,G);E.negative!==0;)X--,E.negative=0,E._ishlnsubmul(O,1,G),E.isZero()||(E.negative^=1);L&&(L.words[G]=X)}return L&&L.strip(),E.strip(),T!=="div"&&I!==0&&E.iushrn(I),{div:L||null,mod:E}},p.prototype.divmod=function(k,T,I){return l(!k.isZero()),this.isZero()?{div:new p(0),mod:new p(0)}:this.negative!==0&&k.negative===0?(j=this.neg().divmod(k,T),T!=="mod"&&(E=j.div.neg()),T!=="div"&&(O=j.mod.neg(),I&&O.negative!==0&&O.iadd(k)),{div:E,mod:O}):this.negative===0&&k.negative!==0?(j=this.divmod(k.neg(),T),T!=="mod"&&(E=j.div.neg()),{div:E,mod:j.mod}):(this.negative&k.negative)!=0?(j=this.neg().divmod(k.neg(),T),T!=="div"&&(O=j.mod.neg(),I&&O.negative!==0&&O.isub(k)),{div:j.div,mod:O}):k.length>this.length||this.cmp(k)<0?{div:new p(0),mod:this}:k.length===1?T==="div"?{div:this.divn(k.words[0]),mod:null}:T==="mod"?{div:null,mod:new p(this.modn(k.words[0]))}:{div:this.divn(k.words[0]),mod:new p(this.modn(k.words[0]))}:this._wordDiv(k,T);var E,O,j},p.prototype.div=function(k){return this.divmod(k,"div",!1).div},p.prototype.mod=function(k){return this.divmod(k,"mod",!1).mod},p.prototype.umod=function(k){return this.divmod(k,"mod",!0).mod},p.prototype.divRound=function(k){var T=this.divmod(k);if(T.mod.isZero())return T.div;var I=T.div.negative!==0?T.mod.isub(k):T.mod,E=k.ushrn(1),O=k.andln(1),j=I.cmp(E);return j<0||O===1&&j===0?T.div:T.div.negative!==0?T.div.isubn(1):T.div.iaddn(1)},p.prototype.modn=function(k){l(k<=67108863);for(var T=(1<<26)%k,I=0,E=this.length-1;E>=0;E--)I=(T*I+(0|this.words[E]))%k;return I},p.prototype.idivn=function(k){l(k<=67108863);for(var T=0,I=this.length-1;I>=0;I--){var E=(0|this.words[I])+67108864*T;this.words[I]=E/k|0,T=E%k}return this.strip()},p.prototype.divn=function(k){return this.clone().idivn(k)},p.prototype.egcd=function(k){l(k.negative===0),l(!k.isZero());var T=this,I=k.clone();T=T.negative!==0?T.umod(k):T.clone();for(var E=new p(1),O=new p(0),j=new p(0),L=new p(1),N=0;T.isEven()&&I.isEven();)T.iushrn(1),I.iushrn(1),++N;for(var D=I.clone(),U=T.clone();!T.isZero();){for(var G=0,X=1;(T.words[0]&X)==0&&G<26;++G,X<<=1);if(G>0)for(T.iushrn(G);G-- >0;)(E.isOdd()||O.isOdd())&&(E.iadd(D),O.isub(U)),E.iushrn(1),O.iushrn(1);for(var Y=0,ee=1;(I.words[0]&ee)==0&&Y<26;++Y,ee<<=1);if(Y>0)for(I.iushrn(Y);Y-- >0;)(j.isOdd()||L.isOdd())&&(j.iadd(D),L.isub(U)),j.iushrn(1),L.iushrn(1);T.cmp(I)>=0?(T.isub(I),E.isub(j),O.isub(L)):(I.isub(T),j.isub(E),L.isub(O))}return{a:j,b:L,gcd:I.iushln(N)}},p.prototype._invmp=function(k){l(k.negative===0),l(!k.isZero());var T=this,I=k.clone();T=T.negative!==0?T.umod(k):T.clone();for(var E,O=new p(1),j=new p(0),L=I.clone();T.cmpn(1)>0&&I.cmpn(1)>0;){for(var N=0,D=1;(T.words[0]&D)==0&&N<26;++N,D<<=1);if(N>0)for(T.iushrn(N);N-- >0;)O.isOdd()&&O.iadd(L),O.iushrn(1);for(var U=0,G=1;(I.words[0]&G)==0&&U<26;++U,G<<=1);if(U>0)for(I.iushrn(U);U-- >0;)j.isOdd()&&j.iadd(L),j.iushrn(1);T.cmp(I)>=0?(T.isub(I),O.isub(j)):(I.isub(T),j.isub(O))}return(E=T.cmpn(1)===0?O:j).cmpn(0)<0&&E.iadd(k),E},p.prototype.gcd=function(k){if(this.isZero())return k.abs();if(k.isZero())return this.abs();var T=this.clone(),I=k.clone();T.negative=0,I.negative=0;for(var E=0;T.isEven()&&I.isEven();E++)T.iushrn(1),I.iushrn(1);for(;;){for(;T.isEven();)T.iushrn(1);for(;I.isEven();)I.iushrn(1);var O=T.cmp(I);if(O<0){var j=T;T=I,I=j}else if(O===0||I.cmpn(1)===0)break;T.isub(I)}return I.iushln(E)},p.prototype.invm=function(k){return this.egcd(k).a.umod(k)},p.prototype.isEven=function(){return(1&this.words[0])==0},p.prototype.isOdd=function(){return(1&this.words[0])==1},p.prototype.andln=function(k){return this.words[0]&k},p.prototype.bincn=function(k){l(typeof k=="number");var T=k%26,I=(k-T)/26,E=1<>>26,L&=67108863,this.words[j]=L}return O!==0&&(this.words[j]=O,this.length++),this},p.prototype.isZero=function(){return this.length===1&&this.words[0]===0},p.prototype.cmpn=function(k){var T,I=k<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;if(this.strip(),this.length>1)T=1;else{I&&(k=-k),l(k<=67108863,"Number is too big");var E=0|this.words[0];T=E===k?0:Ek.length)return 1;if(this.length=0;I--){var E=0|this.words[I],O=0|k.words[I];if(E!==O){EO&&(T=1);break}}return T},p.prototype.gtn=function(k){return this.cmpn(k)===1},p.prototype.gt=function(k){return this.cmp(k)===1},p.prototype.gten=function(k){return this.cmpn(k)>=0},p.prototype.gte=function(k){return this.cmp(k)>=0},p.prototype.ltn=function(k){return this.cmpn(k)===-1},p.prototype.lt=function(k){return this.cmp(k)===-1},p.prototype.lten=function(k){return this.cmpn(k)<=0},p.prototype.lte=function(k){return this.cmp(k)<=0},p.prototype.eqn=function(k){return this.cmpn(k)===0},p.prototype.eq=function(k){return this.cmp(k)===0},p.red=function(k){return new S(k)},p.prototype.toRed=function(k){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),k.convertTo(this)._forceRed(k)},p.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},p.prototype._forceRed=function(k){return this.red=k,this},p.prototype.forceRed=function(k){return l(!this.red,"Already a number in reduction context"),this._forceRed(k)},p.prototype.redAdd=function(k){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,k)},p.prototype.redIAdd=function(k){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,k)},p.prototype.redSub=function(k){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,k)},p.prototype.redISub=function(k){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,k)},p.prototype.redShl=function(k){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,k)},p.prototype.redMul=function(k){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.mul(this,k)},p.prototype.redIMul=function(k){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.imul(this,k)},p.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},p.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},p.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},p.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},p.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},p.prototype.redPow=function(k){return l(this.red&&!k.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,k)};var w={k256:null,p224:null,p192:null,p25519:null};function x(k,T){this.name=k,this.p=new p(T,16),this.n=this.p.bitLength(),this.k=new p(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function R(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(k){if(typeof k=="string"){var T=p._prime(k);this.m=T.p,this.prime=T}else l(k.gtn(1),"modulus must be greater than 1"),this.m=k,this.prime=null}function A(k){S.call(this,k),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new p(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var k=new p(null);return k.words=new Array(Math.ceil(this.n/13)),k},x.prototype.ireduce=function(k){var T,I=k;do this.split(I,this.tmp),T=(I=(I=this.imulK(I)).iadd(this.tmp)).bitLength();while(T>this.n);var E=T0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},x.prototype.split=function(k,T){k.iushrn(this.n,0,T)},x.prototype.imulK=function(k){return k.imul(this.k)},m(_,x),_.prototype.split=function(k,T){for(var I=Math.min(k.length,9),E=0;E>>22,O=j}O>>>=22,k.words[E-10]=O,O===0&&k.length>10?k.length-=10:k.length-=9},_.prototype.imulK=function(k){k.words[k.length]=0,k.words[k.length+1]=0,k.length+=2;for(var T=0,I=0;I>>=26,k.words[I]=O,T=E}return T!==0&&(k.words[k.length++]=T),k},p._prime=function(k){if(w[k])return w[k];var T;if(k==="k256")T=new _;else if(k==="p224")T=new C;else if(k==="p192")T=new R;else{if(k!=="p25519")throw new Error("Unknown prime "+k);T=new P}return w[k]=T,T},S.prototype._verify1=function(k){l(k.negative===0,"red works only with positives"),l(k.red,"red works only with red numbers")},S.prototype._verify2=function(k,T){l((k.negative|T.negative)==0,"red works only with positives"),l(k.red&&k.red===T.red,"red works only with red numbers")},S.prototype.imod=function(k){return this.prime?this.prime.ireduce(k)._forceRed(this):k.umod(this.m)._forceRed(this)},S.prototype.neg=function(k){return k.isZero()?k.clone():this.m.sub(k)._forceRed(this)},S.prototype.add=function(k,T){this._verify2(k,T);var I=k.add(T);return I.cmp(this.m)>=0&&I.isub(this.m),I._forceRed(this)},S.prototype.iadd=function(k,T){this._verify2(k,T);var I=k.iadd(T);return I.cmp(this.m)>=0&&I.isub(this.m),I},S.prototype.sub=function(k,T){this._verify2(k,T);var I=k.sub(T);return I.cmpn(0)<0&&I.iadd(this.m),I._forceRed(this)},S.prototype.isub=function(k,T){this._verify2(k,T);var I=k.isub(T);return I.cmpn(0)<0&&I.iadd(this.m),I},S.prototype.shl=function(k,T){return this._verify1(k),this.imod(k.ushln(T))},S.prototype.imul=function(k,T){return this._verify2(k,T),this.imod(k.imul(T))},S.prototype.mul=function(k,T){return this._verify2(k,T),this.imod(k.mul(T))},S.prototype.isqr=function(k){return this.imul(k,k.clone())},S.prototype.sqr=function(k){return this.mul(k,k)},S.prototype.sqrt=function(k){if(k.isZero())return k.clone();var T=this.m.andln(3);if(l(T%2==1),T===3){var I=this.m.add(new p(1)).iushrn(2);return this.pow(k,I)}for(var E=this.m.subn(1),O=0;!E.isZero()&&E.andln(1)===0;)O++,E.iushrn(1);l(!E.isZero());var j=new p(1).toRed(this),L=j.redNeg(),N=this.m.subn(1).iushrn(1),D=this.m.bitLength();for(D=new p(2*D*D).toRed(this);this.pow(D,N).cmp(L)!==0;)D.redIAdd(L);for(var U=this.pow(D,E),G=this.pow(k,E.addn(1).iushrn(1)),X=this.pow(k,E),Y=O;X.cmp(j)!==0;){for(var ee=X,ne=0;ee.cmp(j)!==0;ne++)ee=ee.redSqr();l(ne=0;E--){for(var D=T.words[E],U=N-1;U>=0;U--){var G=D>>U&1;O!==I[0]&&(O=this.sqr(O)),G!==0||j!==0?(j<<=1,j|=G,(++L===4||E===0&&U===0)&&(O=this.mul(O,I[j]),L=0,j=0)):L=0}N=26}return O},S.prototype.convertTo=function(k){var T=k.umod(this.m);return T===k?T.clone():T},S.prototype.convertFrom=function(k){var T=k.clone();return T.red=null,T},p.mont=function(k){return new A(k)},m(A,S),A.prototype.convertTo=function(k){return this.imod(k.ushln(this.shift))},A.prototype.convertFrom=function(k){var T=this.imod(k.mul(this.rinv));return T.red=null,T},A.prototype.imul=function(k,T){if(k.isZero()||T.isZero())return k.words[0]=0,k.length=1,k;var I=k.imul(T),E=I.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=I.isub(E).iushrn(this.shift),j=O;return O.cmp(this.m)>=0?j=O.isub(this.m):O.cmpn(0)<0&&(j=O.iadd(this.m)),j._forceRed(this)},A.prototype.mul=function(k,T){if(k.isZero()||T.isZero())return new p(0)._forceRed(this);var I=k.mul(T),E=I.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=I.isub(E).iushrn(this.shift),j=O;return O.cmp(this.m)>=0?j=O.isub(this.m):O.cmpn(0)<0&&(j=O.iadd(this.m)),j._forceRed(this)},A.prototype.invm=function(k){return this.imod(k._invmp(this.m).mul(this.r2))._forceRed(this)}})(r===void 0||r)},{buffer:185}],182:[function(e,r,t){"use strict";t.byteLength=function(c){var o=g(c),a=o[0],s=o[1];return 3*(a+s)/4-s},t.toByteArray=function(c){var o,a,s=g(c),d=s[0],h=s[1],y=new u(function(x,_,C){return 3*(_+C)/4-C}(0,d,h)),b=0,w=h>0?d-4:d;for(a=0;a>16&255,y[b++]=o>>8&255,y[b++]=255&o;return h===2&&(o=i[c.charCodeAt(a)]<<2|i[c.charCodeAt(a+1)]>>4,y[b++]=255&o),h===1&&(o=i[c.charCodeAt(a)]<<10|i[c.charCodeAt(a+1)]<<4|i[c.charCodeAt(a+2)]>>2,y[b++]=o>>8&255,y[b++]=255&o),y},t.fromByteArray=function(c){for(var o,a=c.length,s=a%3,d=[],h=0,y=a-s;hy?y:h+16383));return s===1?(o=c[a-1],d.push(n[o>>2]+n[o<<4&63]+"==")):s===2&&(o=(c[a-2]<<8)+c[a-1],d.push(n[o>>10]+n[o>>4&63]+n[o<<2&63]+"=")),d.join("")};for(var n=[],i=[],u=typeof Uint8Array!="undefined"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,p=l.length;m0)throw new Error("Invalid string. Length must be a multiple of 4");var a=c.indexOf("=");return a===-1&&(a=o),[a,a===o?0:4-a%4]}function v(c,o,a){for(var s,d,h=[],y=o;y>18&63]+n[d>>12&63]+n[d>>6&63]+n[63&d]);return h.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],183:[function(e,r,t){"use strict";function n(i){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(i)}(function(i,u){function l(E,O){if(!E)throw new Error(O||"Assertion failed")}function m(E,O){E.super_=O;var j=function(){};j.prototype=O.prototype,E.prototype=new j,E.prototype.constructor=E}function p(E,O,j){if(p.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&(O!=="le"&&O!=="be"||(j=O,O=10),this._init(E||0,O||10,j||"be"))}var g;n(i)==="object"?i.exports=p:(void 0).BN=p,p.BN=p,p.wordSize=26;try{g=e("buffer").Buffer}catch(E){}function v(E,O,j){for(var L=0,N=Math.min(E.length,j),D=0,U=O;U=49&&X<=54?X-49+10:X>=17&&X<=22?X-17+10:X,D|=G}return l(!(240&D),"Invalid character in "+E),L}function c(E,O,j,L){for(var N=0,D=0,U=Math.min(E.length,j),G=O;G=49?X-49+10:X>=17?X-17+10:X,l(X>=0&&D0?E:O},p.min=function(E,O){return E.cmp(O)<0?E:O},p.prototype._init=function(E,O,j){if(typeof E=="number")return this._initNumber(E,O,j);if(n(E)==="object")return this._initArray(E,O,j);O==="hex"&&(O=16),l(O===(0|O)&&O>=2&&O<=36);var L=0;(E=E.toString().replace(/\s+/g,""))[0]==="-"&&L++,O===16?this._parseHex(E,L):this._parseBase(E,O,L),E[0]==="-"&&(this.negative=1),this._strip(),j==="le"&&this._initArray(this.toArray(),O,j)},p.prototype._initNumber=function(E,O,j){E<0&&(this.negative=1,E=-E),E<67108864?(this.words=[67108863&E],this.length=1):E<4503599627370496?(this.words=[67108863&E,E/67108864&67108863],this.length=2):(l(E<9007199254740992),this.words=[67108863&E,E/67108864&67108863,1],this.length=3),j==="le"&&this._initArray(this.toArray(),O,j)},p.prototype._initArray=function(E,O,j){if(l(typeof E.length=="number"),E.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(E.length/3),this.words=new Array(this.length);for(var L=0;L=0;L-=3)D=E[L]|E[L-1]<<8|E[L-2]<<16,this.words[N]|=D<>>26-U&67108863,(U+=24)>=26&&(U-=26,N++);else if(j==="le")for(L=0,N=0;L>>26-U&67108863,(U+=24)>=26&&(U-=26,N++);return this._strip()},p.prototype._parseHex=function(E,O){this.length=Math.ceil((E.length-O)/6),this.words=new Array(this.length);for(var j=0;j=O;j-=6)N=v(E,j,j+6),this.words[L]|=N<>>26-D&4194303,(D+=24)>=26&&(D-=26,L++);j+6!==O&&(N=v(E,O,j+6),this.words[L]|=N<>>26-D&4194303),this._strip()},p.prototype._parseBase=function(E,O,j){this.words=[0],this.length=1;for(var L=0,N=1;N<=67108863;N*=O)L++;L--,N=N/O|0;for(var D=E.length-j,U=D%L,G=Math.min(D,D-U)+j,X=0,Y=j;Y1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},p.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol!="undefined"&&typeof Symbol.for=="function")try{p.prototype[Symbol.for("nodejs.util.inspect.custom")]=a}catch(E){p.prototype.inspect=a}else p.prototype.inspect=a;function a(){return(this.red?""}var s=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];p.prototype.toString=function(E,O){var j;if(O=0|O||1,(E=E||10)===16||E==="hex"){j="";for(var L=0,N=0,D=0;D>>24-L&16777215)!==0||D!==this.length-1?s[6-G.length]+G+j:G+j,(L+=2)>=26&&(L-=26,D--)}for(N!==0&&(j=N.toString(16)+j);j.length%O!=0;)j="0"+j;return this.negative!==0&&(j="-"+j),j}if(E===(0|E)&&E>=2&&E<=36){var X=d[E],Y=h[E];j="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var ne=ee.modrn(Y).toString(E);j=(ee=ee.idivn(Y)).isZero()?ne+j:s[X-ne.length]+ne+j}for(this.isZero()&&(j="0"+j);j.length%O!=0;)j="0"+j;return this.negative!==0&&(j="-"+j),j}l(!1,"Base should be between 2 and 36")},p.prototype.toNumber=function(){var E=this.words[0];return this.length===2?E+=67108864*this.words[1]:this.length===3&&this.words[2]===1?E+=4503599627370496+67108864*this.words[1]:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-E:E},p.prototype.toJSON=function(){return this.toString(16,2)},g&&(p.prototype.toBuffer=function(E,O){return this.toArrayLike(g,E,O)}),p.prototype.toArray=function(E,O){return this.toArrayLike(Array,E,O)};function y(E,O,j){j.negative=O.negative^E.negative;var L=E.length+O.length|0;j.length=L,L=L-1|0;var N=0|E.words[0],D=0|O.words[0],U=N*D,G=67108863&U,X=U/67108864|0;j.words[0]=G;for(var Y=1;Y>>26,ne=67108863&X,te=Math.min(Y,O.length-1),M=Math.max(0,Y-E.length+1);M<=te;M++){var B=Y-M|0;ee+=(U=(N=0|E.words[B])*(D=0|O.words[M])+ne)/67108864|0,ne=67108863&U}j.words[Y]=0|ne,X=0|ee}return X!==0?j.words[Y]=0|X:j.length--,j._strip()}p.prototype.toArrayLike=function(E,O,j){this._strip();var L=this.byteLength(),N=j||Math.max(1,L);l(L<=N,"byte array longer than desired length"),l(N>0,"Requested array length <= 0");var D=function(U,G){return U.allocUnsafe?U.allocUnsafe(G):new U(G)}(E,N);return this["_toArrayLike"+(O==="le"?"LE":"BE")](D,L),D},p.prototype._toArrayLikeLE=function(E,O){for(var j=0,L=0,N=0,D=0;N>8&255),j>16&255),D===6?(j>24&255),L=0,D=0):(L=U>>>24,D+=2)}if(j=0&&(E[j--]=U>>8&255),j>=0&&(E[j--]=U>>16&255),D===6?(j>=0&&(E[j--]=U>>24&255),L=0,D=0):(L=U>>>24,D+=2)}if(j>=0)for(E[j--]=L;j>=0;)E[j--]=0},Math.clz32?p.prototype._countBits=function(E){return 32-Math.clz32(E)}:p.prototype._countBits=function(E){var O=E,j=0;return O>=4096&&(j+=13,O>>>=13),O>=64&&(j+=7,O>>>=7),O>=8&&(j+=4,O>>>=4),O>=2&&(j+=2,O>>>=2),j+O},p.prototype._zeroBits=function(E){if(E===0)return 26;var O=E,j=0;return(8191&O)==0&&(j+=13,O>>>=13),(127&O)==0&&(j+=7,O>>>=7),(15&O)==0&&(j+=4,O>>>=4),(3&O)==0&&(j+=2,O>>>=2),(1&O)==0&&j++,j},p.prototype.bitLength=function(){var E=this.words[this.length-1],O=this._countBits(E);return 26*(this.length-1)+O},p.prototype.zeroBits=function(){if(this.isZero())return 0;for(var E=0,O=0;OE.length?this.clone().ior(E):E.clone().ior(this)},p.prototype.uor=function(E){return this.length>E.length?this.clone().iuor(E):E.clone().iuor(this)},p.prototype.iuand=function(E){var O;O=this.length>E.length?E:this;for(var j=0;jE.length?this.clone().iand(E):E.clone().iand(this)},p.prototype.uand=function(E){return this.length>E.length?this.clone().iuand(E):E.clone().iuand(this)},p.prototype.iuxor=function(E){var O,j;this.length>E.length?(O=this,j=E):(O=E,j=this);for(var L=0;LE.length?this.clone().ixor(E):E.clone().ixor(this)},p.prototype.uxor=function(E){return this.length>E.length?this.clone().iuxor(E):E.clone().iuxor(this)},p.prototype.inotn=function(E){l(typeof E=="number"&&E>=0);var O=0|Math.ceil(E/26),j=E%26;this._expand(O),j>0&&O--;for(var L=0;L0&&(this.words[L]=~this.words[L]&67108863>>26-j),this._strip()},p.prototype.notn=function(E){return this.clone().inotn(E)},p.prototype.setn=function(E,O){l(typeof E=="number"&&E>=0);var j=E/26|0,L=E%26;return this._expand(j+1),this.words[j]=O?this.words[j]|1<E.length?(j=this,L=E):(j=E,L=this);for(var N=0,D=0;D>>26;for(;N!==0&&D>>26;if(this.length=j.length,N!==0)this.words[this.length]=N,this.length++;else if(j!==this)for(;DE.length?this.clone().iadd(E):E.clone().iadd(this)},p.prototype.isub=function(E){if(E.negative!==0){E.negative=0;var O=this.iadd(E);return E.negative=1,O._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(E),this.negative=1,this._normSign();var j,L,N=this.cmp(E);if(N===0)return this.negative=0,this.length=1,this.words[0]=0,this;N>0?(j=this,L=E):(j=E,L=this);for(var D=0,U=0;U>26,this.words[U]=67108863&O;for(;D!==0&&U>26,this.words[U]=67108863&O;if(D===0&&U>>13,M=0|U[1],B=8191&M,z=M>>>13,q=0|U[2],J=8191&q,Q=q>>>13,K=0|U[3],ie=8191&K,Z=K>>>13,re=0|U[4],ae=8191&re,ce=re>>>13,ke=0|U[5],we=8191&ke,Se=ke>>>13,Ge=0|U[6],xe=8191&Ge,be=Ge>>>13,_e=0|U[7],Oe=8191&_e,Fe=_e>>>13,ze=0|U[8],Me=8191&ze,Re=ze>>>13,Pe=0|U[9],Ve=8191&Pe,He=Pe>>>13,nt=0|G[0],he=8191&nt,ue=nt>>>13,Te=0|G[1],Ne=8191&Te,Xe=Te>>>13,dt=0|G[2],Qe=8191&dt,Ke=dt>>>13,Ie=0|G[3],Le=8191&Ie,pt=Ie>>>13,gt=0|G[4],ot=8191>,bt=gt>>>13,xt=0|G[5],Je=8191&xt,ct=xt>>>13,Ce=0|G[6],je=8191&Ce,qe=Ce>>>13,mt=0|G[7],se=8191&mt,fe=mt>>>13,ve=0|G[8],pe=8191&ve,de=ve>>>13,ge=0|G[9],Ee=8191&ge,$e=ge>>>13;j.negative=E.negative^O.negative,j.length=19;var Be=(Y+(L=Math.imul(ne,he))|0)+((8191&(N=(N=Math.imul(ne,ue))+Math.imul(te,he)|0))<<13)|0;Y=((D=Math.imul(te,ue))+(N>>>13)|0)+(Be>>>26)|0,Be&=67108863,L=Math.imul(B,he),N=(N=Math.imul(B,ue))+Math.imul(z,he)|0,D=Math.imul(z,ue);var We=(Y+(L=L+Math.imul(ne,Ne)|0)|0)+((8191&(N=(N=N+Math.imul(ne,Xe)|0)+Math.imul(te,Ne)|0))<<13)|0;Y=((D=D+Math.imul(te,Xe)|0)+(N>>>13)|0)+(We>>>26)|0,We&=67108863,L=Math.imul(J,he),N=(N=Math.imul(J,ue))+Math.imul(Q,he)|0,D=Math.imul(Q,ue),L=L+Math.imul(B,Ne)|0,N=(N=N+Math.imul(B,Xe)|0)+Math.imul(z,Ne)|0,D=D+Math.imul(z,Xe)|0;var Ye=(Y+(L=L+Math.imul(ne,Qe)|0)|0)+((8191&(N=(N=N+Math.imul(ne,Ke)|0)+Math.imul(te,Qe)|0))<<13)|0;Y=((D=D+Math.imul(te,Ke)|0)+(N>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,L=Math.imul(ie,he),N=(N=Math.imul(ie,ue))+Math.imul(Z,he)|0,D=Math.imul(Z,ue),L=L+Math.imul(J,Ne)|0,N=(N=N+Math.imul(J,Xe)|0)+Math.imul(Q,Ne)|0,D=D+Math.imul(Q,Xe)|0,L=L+Math.imul(B,Qe)|0,N=(N=N+Math.imul(B,Ke)|0)+Math.imul(z,Qe)|0,D=D+Math.imul(z,Ke)|0;var ut=(Y+(L=L+Math.imul(ne,Le)|0)|0)+((8191&(N=(N=N+Math.imul(ne,pt)|0)+Math.imul(te,Le)|0))<<13)|0;Y=((D=D+Math.imul(te,pt)|0)+(N>>>13)|0)+(ut>>>26)|0,ut&=67108863,L=Math.imul(ae,he),N=(N=Math.imul(ae,ue))+Math.imul(ce,he)|0,D=Math.imul(ce,ue),L=L+Math.imul(ie,Ne)|0,N=(N=N+Math.imul(ie,Xe)|0)+Math.imul(Z,Ne)|0,D=D+Math.imul(Z,Xe)|0,L=L+Math.imul(J,Qe)|0,N=(N=N+Math.imul(J,Ke)|0)+Math.imul(Q,Qe)|0,D=D+Math.imul(Q,Ke)|0,L=L+Math.imul(B,Le)|0,N=(N=N+Math.imul(B,pt)|0)+Math.imul(z,Le)|0,D=D+Math.imul(z,pt)|0;var vt=(Y+(L=L+Math.imul(ne,ot)|0)|0)+((8191&(N=(N=N+Math.imul(ne,bt)|0)+Math.imul(te,ot)|0))<<13)|0;Y=((D=D+Math.imul(te,bt)|0)+(N>>>13)|0)+(vt>>>26)|0,vt&=67108863,L=Math.imul(we,he),N=(N=Math.imul(we,ue))+Math.imul(Se,he)|0,D=Math.imul(Se,ue),L=L+Math.imul(ae,Ne)|0,N=(N=N+Math.imul(ae,Xe)|0)+Math.imul(ce,Ne)|0,D=D+Math.imul(ce,Xe)|0,L=L+Math.imul(ie,Qe)|0,N=(N=N+Math.imul(ie,Ke)|0)+Math.imul(Z,Qe)|0,D=D+Math.imul(Z,Ke)|0,L=L+Math.imul(J,Le)|0,N=(N=N+Math.imul(J,pt)|0)+Math.imul(Q,Le)|0,D=D+Math.imul(Q,pt)|0,L=L+Math.imul(B,ot)|0,N=(N=N+Math.imul(B,bt)|0)+Math.imul(z,ot)|0,D=D+Math.imul(z,bt)|0;var Et=(Y+(L=L+Math.imul(ne,Je)|0)|0)+((8191&(N=(N=N+Math.imul(ne,ct)|0)+Math.imul(te,Je)|0))<<13)|0;Y=((D=D+Math.imul(te,ct)|0)+(N>>>13)|0)+(Et>>>26)|0,Et&=67108863,L=Math.imul(xe,he),N=(N=Math.imul(xe,ue))+Math.imul(be,he)|0,D=Math.imul(be,ue),L=L+Math.imul(we,Ne)|0,N=(N=N+Math.imul(we,Xe)|0)+Math.imul(Se,Ne)|0,D=D+Math.imul(Se,Xe)|0,L=L+Math.imul(ae,Qe)|0,N=(N=N+Math.imul(ae,Ke)|0)+Math.imul(ce,Qe)|0,D=D+Math.imul(ce,Ke)|0,L=L+Math.imul(ie,Le)|0,N=(N=N+Math.imul(ie,pt)|0)+Math.imul(Z,Le)|0,D=D+Math.imul(Z,pt)|0,L=L+Math.imul(J,ot)|0,N=(N=N+Math.imul(J,bt)|0)+Math.imul(Q,ot)|0,D=D+Math.imul(Q,bt)|0,L=L+Math.imul(B,Je)|0,N=(N=N+Math.imul(B,ct)|0)+Math.imul(z,Je)|0,D=D+Math.imul(z,ct)|0;var wt=(Y+(L=L+Math.imul(ne,je)|0)|0)+((8191&(N=(N=N+Math.imul(ne,qe)|0)+Math.imul(te,je)|0))<<13)|0;Y=((D=D+Math.imul(te,qe)|0)+(N>>>13)|0)+(wt>>>26)|0,wt&=67108863,L=Math.imul(Oe,he),N=(N=Math.imul(Oe,ue))+Math.imul(Fe,he)|0,D=Math.imul(Fe,ue),L=L+Math.imul(xe,Ne)|0,N=(N=N+Math.imul(xe,Xe)|0)+Math.imul(be,Ne)|0,D=D+Math.imul(be,Xe)|0,L=L+Math.imul(we,Qe)|0,N=(N=N+Math.imul(we,Ke)|0)+Math.imul(Se,Qe)|0,D=D+Math.imul(Se,Ke)|0,L=L+Math.imul(ae,Le)|0,N=(N=N+Math.imul(ae,pt)|0)+Math.imul(ce,Le)|0,D=D+Math.imul(ce,pt)|0,L=L+Math.imul(ie,ot)|0,N=(N=N+Math.imul(ie,bt)|0)+Math.imul(Z,ot)|0,D=D+Math.imul(Z,bt)|0,L=L+Math.imul(J,Je)|0,N=(N=N+Math.imul(J,ct)|0)+Math.imul(Q,Je)|0,D=D+Math.imul(Q,ct)|0,L=L+Math.imul(B,je)|0,N=(N=N+Math.imul(B,qe)|0)+Math.imul(z,je)|0,D=D+Math.imul(z,qe)|0;var me=(Y+(L=L+Math.imul(ne,se)|0)|0)+((8191&(N=(N=N+Math.imul(ne,fe)|0)+Math.imul(te,se)|0))<<13)|0;Y=((D=D+Math.imul(te,fe)|0)+(N>>>13)|0)+(me>>>26)|0,me&=67108863,L=Math.imul(Me,he),N=(N=Math.imul(Me,ue))+Math.imul(Re,he)|0,D=Math.imul(Re,ue),L=L+Math.imul(Oe,Ne)|0,N=(N=N+Math.imul(Oe,Xe)|0)+Math.imul(Fe,Ne)|0,D=D+Math.imul(Fe,Xe)|0,L=L+Math.imul(xe,Qe)|0,N=(N=N+Math.imul(xe,Ke)|0)+Math.imul(be,Qe)|0,D=D+Math.imul(be,Ke)|0,L=L+Math.imul(we,Le)|0,N=(N=N+Math.imul(we,pt)|0)+Math.imul(Se,Le)|0,D=D+Math.imul(Se,pt)|0,L=L+Math.imul(ae,ot)|0,N=(N=N+Math.imul(ae,bt)|0)+Math.imul(ce,ot)|0,D=D+Math.imul(ce,bt)|0,L=L+Math.imul(ie,Je)|0,N=(N=N+Math.imul(ie,ct)|0)+Math.imul(Z,Je)|0,D=D+Math.imul(Z,ct)|0,L=L+Math.imul(J,je)|0,N=(N=N+Math.imul(J,qe)|0)+Math.imul(Q,je)|0,D=D+Math.imul(Q,qe)|0,L=L+Math.imul(B,se)|0,N=(N=N+Math.imul(B,fe)|0)+Math.imul(z,se)|0,D=D+Math.imul(z,fe)|0;var Ue=(Y+(L=L+Math.imul(ne,pe)|0)|0)+((8191&(N=(N=N+Math.imul(ne,de)|0)+Math.imul(te,pe)|0))<<13)|0;Y=((D=D+Math.imul(te,de)|0)+(N>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,L=Math.imul(Ve,he),N=(N=Math.imul(Ve,ue))+Math.imul(He,he)|0,D=Math.imul(He,ue),L=L+Math.imul(Me,Ne)|0,N=(N=N+Math.imul(Me,Xe)|0)+Math.imul(Re,Ne)|0,D=D+Math.imul(Re,Xe)|0,L=L+Math.imul(Oe,Qe)|0,N=(N=N+Math.imul(Oe,Ke)|0)+Math.imul(Fe,Qe)|0,D=D+Math.imul(Fe,Ke)|0,L=L+Math.imul(xe,Le)|0,N=(N=N+Math.imul(xe,pt)|0)+Math.imul(be,Le)|0,D=D+Math.imul(be,pt)|0,L=L+Math.imul(we,ot)|0,N=(N=N+Math.imul(we,bt)|0)+Math.imul(Se,ot)|0,D=D+Math.imul(Se,bt)|0,L=L+Math.imul(ae,Je)|0,N=(N=N+Math.imul(ae,ct)|0)+Math.imul(ce,Je)|0,D=D+Math.imul(ce,ct)|0,L=L+Math.imul(ie,je)|0,N=(N=N+Math.imul(ie,qe)|0)+Math.imul(Z,je)|0,D=D+Math.imul(Z,qe)|0,L=L+Math.imul(J,se)|0,N=(N=N+Math.imul(J,fe)|0)+Math.imul(Q,se)|0,D=D+Math.imul(Q,fe)|0,L=L+Math.imul(B,pe)|0,N=(N=N+Math.imul(B,de)|0)+Math.imul(z,pe)|0,D=D+Math.imul(z,de)|0;var at=(Y+(L=L+Math.imul(ne,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(ne,$e)|0)+Math.imul(te,Ee)|0))<<13)|0;Y=((D=D+Math.imul(te,$e)|0)+(N>>>13)|0)+(at>>>26)|0,at&=67108863,L=Math.imul(Ve,Ne),N=(N=Math.imul(Ve,Xe))+Math.imul(He,Ne)|0,D=Math.imul(He,Xe),L=L+Math.imul(Me,Qe)|0,N=(N=N+Math.imul(Me,Ke)|0)+Math.imul(Re,Qe)|0,D=D+Math.imul(Re,Ke)|0,L=L+Math.imul(Oe,Le)|0,N=(N=N+Math.imul(Oe,pt)|0)+Math.imul(Fe,Le)|0,D=D+Math.imul(Fe,pt)|0,L=L+Math.imul(xe,ot)|0,N=(N=N+Math.imul(xe,bt)|0)+Math.imul(be,ot)|0,D=D+Math.imul(be,bt)|0,L=L+Math.imul(we,Je)|0,N=(N=N+Math.imul(we,ct)|0)+Math.imul(Se,Je)|0,D=D+Math.imul(Se,ct)|0,L=L+Math.imul(ae,je)|0,N=(N=N+Math.imul(ae,qe)|0)+Math.imul(ce,je)|0,D=D+Math.imul(ce,qe)|0,L=L+Math.imul(ie,se)|0,N=(N=N+Math.imul(ie,fe)|0)+Math.imul(Z,se)|0,D=D+Math.imul(Z,fe)|0,L=L+Math.imul(J,pe)|0,N=(N=N+Math.imul(J,de)|0)+Math.imul(Q,pe)|0,D=D+Math.imul(Q,de)|0;var it=(Y+(L=L+Math.imul(B,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(B,$e)|0)+Math.imul(z,Ee)|0))<<13)|0;Y=((D=D+Math.imul(z,$e)|0)+(N>>>13)|0)+(it>>>26)|0,it&=67108863,L=Math.imul(Ve,Qe),N=(N=Math.imul(Ve,Ke))+Math.imul(He,Qe)|0,D=Math.imul(He,Ke),L=L+Math.imul(Me,Le)|0,N=(N=N+Math.imul(Me,pt)|0)+Math.imul(Re,Le)|0,D=D+Math.imul(Re,pt)|0,L=L+Math.imul(Oe,ot)|0,N=(N=N+Math.imul(Oe,bt)|0)+Math.imul(Fe,ot)|0,D=D+Math.imul(Fe,bt)|0,L=L+Math.imul(xe,Je)|0,N=(N=N+Math.imul(xe,ct)|0)+Math.imul(be,Je)|0,D=D+Math.imul(be,ct)|0,L=L+Math.imul(we,je)|0,N=(N=N+Math.imul(we,qe)|0)+Math.imul(Se,je)|0,D=D+Math.imul(Se,qe)|0,L=L+Math.imul(ae,se)|0,N=(N=N+Math.imul(ae,fe)|0)+Math.imul(ce,se)|0,D=D+Math.imul(ce,fe)|0,L=L+Math.imul(ie,pe)|0,N=(N=N+Math.imul(ie,de)|0)+Math.imul(Z,pe)|0,D=D+Math.imul(Z,de)|0;var ft=(Y+(L=L+Math.imul(J,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(J,$e)|0)+Math.imul(Q,Ee)|0))<<13)|0;Y=((D=D+Math.imul(Q,$e)|0)+(N>>>13)|0)+(ft>>>26)|0,ft&=67108863,L=Math.imul(Ve,Le),N=(N=Math.imul(Ve,pt))+Math.imul(He,Le)|0,D=Math.imul(He,pt),L=L+Math.imul(Me,ot)|0,N=(N=N+Math.imul(Me,bt)|0)+Math.imul(Re,ot)|0,D=D+Math.imul(Re,bt)|0,L=L+Math.imul(Oe,Je)|0,N=(N=N+Math.imul(Oe,ct)|0)+Math.imul(Fe,Je)|0,D=D+Math.imul(Fe,ct)|0,L=L+Math.imul(xe,je)|0,N=(N=N+Math.imul(xe,qe)|0)+Math.imul(be,je)|0,D=D+Math.imul(be,qe)|0,L=L+Math.imul(we,se)|0,N=(N=N+Math.imul(we,fe)|0)+Math.imul(Se,se)|0,D=D+Math.imul(Se,fe)|0,L=L+Math.imul(ae,pe)|0,N=(N=N+Math.imul(ae,de)|0)+Math.imul(ce,pe)|0,D=D+Math.imul(ce,de)|0;var Tt=(Y+(L=L+Math.imul(ie,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(ie,$e)|0)+Math.imul(Z,Ee)|0))<<13)|0;Y=((D=D+Math.imul(Z,$e)|0)+(N>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,L=Math.imul(Ve,ot),N=(N=Math.imul(Ve,bt))+Math.imul(He,ot)|0,D=Math.imul(He,bt),L=L+Math.imul(Me,Je)|0,N=(N=N+Math.imul(Me,ct)|0)+Math.imul(Re,Je)|0,D=D+Math.imul(Re,ct)|0,L=L+Math.imul(Oe,je)|0,N=(N=N+Math.imul(Oe,qe)|0)+Math.imul(Fe,je)|0,D=D+Math.imul(Fe,qe)|0,L=L+Math.imul(xe,se)|0,N=(N=N+Math.imul(xe,fe)|0)+Math.imul(be,se)|0,D=D+Math.imul(be,fe)|0,L=L+Math.imul(we,pe)|0,N=(N=N+Math.imul(we,de)|0)+Math.imul(Se,pe)|0,D=D+Math.imul(Se,de)|0;var At=(Y+(L=L+Math.imul(ae,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(ae,$e)|0)+Math.imul(ce,Ee)|0))<<13)|0;Y=((D=D+Math.imul(ce,$e)|0)+(N>>>13)|0)+(At>>>26)|0,At&=67108863,L=Math.imul(Ve,Je),N=(N=Math.imul(Ve,ct))+Math.imul(He,Je)|0,D=Math.imul(He,ct),L=L+Math.imul(Me,je)|0,N=(N=N+Math.imul(Me,qe)|0)+Math.imul(Re,je)|0,D=D+Math.imul(Re,qe)|0,L=L+Math.imul(Oe,se)|0,N=(N=N+Math.imul(Oe,fe)|0)+Math.imul(Fe,se)|0,D=D+Math.imul(Fe,fe)|0,L=L+Math.imul(xe,pe)|0,N=(N=N+Math.imul(xe,de)|0)+Math.imul(be,pe)|0,D=D+Math.imul(be,de)|0;var Ut=(Y+(L=L+Math.imul(we,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(we,$e)|0)+Math.imul(Se,Ee)|0))<<13)|0;Y=((D=D+Math.imul(Se,$e)|0)+(N>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,L=Math.imul(Ve,je),N=(N=Math.imul(Ve,qe))+Math.imul(He,je)|0,D=Math.imul(He,qe),L=L+Math.imul(Me,se)|0,N=(N=N+Math.imul(Me,fe)|0)+Math.imul(Re,se)|0,D=D+Math.imul(Re,fe)|0,L=L+Math.imul(Oe,pe)|0,N=(N=N+Math.imul(Oe,de)|0)+Math.imul(Fe,pe)|0,D=D+Math.imul(Fe,de)|0;var Ft=(Y+(L=L+Math.imul(xe,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(xe,$e)|0)+Math.imul(be,Ee)|0))<<13)|0;Y=((D=D+Math.imul(be,$e)|0)+(N>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,L=Math.imul(Ve,se),N=(N=Math.imul(Ve,fe))+Math.imul(He,se)|0,D=Math.imul(He,fe),L=L+Math.imul(Me,pe)|0,N=(N=N+Math.imul(Me,de)|0)+Math.imul(Re,pe)|0,D=D+Math.imul(Re,de)|0;var Nt=(Y+(L=L+Math.imul(Oe,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(Oe,$e)|0)+Math.imul(Fe,Ee)|0))<<13)|0;Y=((D=D+Math.imul(Fe,$e)|0)+(N>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,L=Math.imul(Ve,pe),N=(N=Math.imul(Ve,de))+Math.imul(He,pe)|0,D=Math.imul(He,de);var Lt=(Y+(L=L+Math.imul(Me,Ee)|0)|0)+((8191&(N=(N=N+Math.imul(Me,$e)|0)+Math.imul(Re,Ee)|0))<<13)|0;Y=((D=D+Math.imul(Re,$e)|0)+(N>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var dr=(Y+(L=Math.imul(Ve,Ee))|0)+((8191&(N=(N=Math.imul(Ve,$e))+Math.imul(He,Ee)|0))<<13)|0;return Y=((D=Math.imul(He,$e))+(N>>>13)|0)+(dr>>>26)|0,dr&=67108863,X[0]=Be,X[1]=We,X[2]=Ye,X[3]=ut,X[4]=vt,X[5]=Et,X[6]=wt,X[7]=me,X[8]=Ue,X[9]=at,X[10]=it,X[11]=ft,X[12]=Tt,X[13]=At,X[14]=Ut,X[15]=Ft,X[16]=Nt,X[17]=Lt,X[18]=dr,Y!==0&&(X[19]=Y,j.length++),j};function w(E,O,j){j.negative=O.negative^E.negative,j.length=E.length+O.length;for(var L=0,N=0,D=0;D>>26)|0)>>>26,U&=67108863}j.words[D]=G,L=U,U=N}return L!==0?j.words[D]=L:j.length--,j._strip()}function x(E,O,j){return w(E,O,j)}function _(E,O){this.x=E,this.y=O}Math.imul||(b=y),p.prototype.mulTo=function(E,O){var j=this.length+E.length;return this.length===10&&E.length===10?b(this,E,O):j<63?y(this,E,O):j<1024?w(this,E,O):x(this,E,O)},_.prototype.makeRBT=function(E){for(var O=new Array(E),j=p.prototype._countBits(E)-1,L=0;L>=1;return L},_.prototype.permute=function(E,O,j,L,N,D){for(var U=0;U>>=1)N++;return 1<>>=13,j[2*D+1]=8191&N,N>>>=13;for(D=2*O;D>=26,j+=N/67108864|0,j+=D>>>26,this.words[L]=67108863&D}return j!==0&&(this.words[L]=j,this.length++),O?this.ineg():this},p.prototype.muln=function(E){return this.clone().imuln(E)},p.prototype.sqr=function(){return this.mul(this)},p.prototype.isqr=function(){return this.imul(this.clone())},p.prototype.pow=function(E){var O=function(D){for(var U=new Array(D.bitLength()),G=0;G>>Y&1}return U}(E);if(O.length===0)return new p(1);for(var j=this,L=0;L=0);var O,j=E%26,L=(E-j)/26,N=67108863>>>26-j<<26-j;if(j!==0){var D=0;for(O=0;O>>26-j}D&&(this.words[O]=D,this.length++)}if(L!==0){for(O=this.length-1;O>=0;O--)this.words[O+L]=this.words[O];for(O=0;O=0),L=O?(O-O%26)/26:0;var N=E%26,D=Math.min((E-N)/26,this.length),U=67108863^67108863>>>N<D)for(this.length-=D,X=0;X=0&&(Y!==0||X>=L);X--){var ee=0|this.words[X];this.words[X]=Y<<26-N|ee>>>N,Y=ee&U}return G&&Y!==0&&(G.words[G.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},p.prototype.ishrn=function(E,O,j){return l(this.negative===0),this.iushrn(E,O,j)},p.prototype.shln=function(E){return this.clone().ishln(E)},p.prototype.ushln=function(E){return this.clone().iushln(E)},p.prototype.shrn=function(E){return this.clone().ishrn(E)},p.prototype.ushrn=function(E){return this.clone().iushrn(E)},p.prototype.testn=function(E){l(typeof E=="number"&&E>=0);var O=E%26,j=(E-O)/26,L=1<=0);var O=E%26,j=(E-O)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=j)return this;if(O!==0&&j++,this.length=Math.min(j,this.length),O!==0){var L=67108863^67108863>>>O<=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},p.prototype.isubn=function(E){if(l(typeof E=="number"),l(E<67108864),E<0)return this.iaddn(-E);if(this.negative!==0)return this.negative=0,this.iaddn(E),this.negative=1,this;if(this.words[0]-=E,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O>26)-(G/67108864|0),this.words[L+j]=67108863&N}for(;L>26,this.words[L+j]=67108863&N;if(U===0)return this._strip();for(l(U===-1),U=0,L=0;L>26,this.words[L]=67108863&N;return this.negative=1,this._strip()},p.prototype._wordDiv=function(E,O){var j=(this.length,E.length),L=this.clone(),N=E,D=0|N.words[N.length-1];(j=26-this._countBits(D))!==0&&(N=N.ushln(j),L.iushln(j),D=0|N.words[N.length-1]);var U,G=L.length-N.length;if(O!=="mod"){(U=new p(null)).length=G+1,U.words=new Array(U.length);for(var X=0;X=0;ee--){var ne=67108864*(0|L.words[N.length+ee])+(0|L.words[N.length+ee-1]);for(ne=Math.min(ne/D|0,67108863),L._ishlnsubmul(N,ne,ee);L.negative!==0;)ne--,L.negative=0,L._ishlnsubmul(N,1,ee),L.isZero()||(L.negative^=1);U&&(U.words[ee]=ne)}return U&&U._strip(),L._strip(),O!=="div"&&j!==0&&L.iushrn(j),{div:U||null,mod:L}},p.prototype.divmod=function(E,O,j){return l(!E.isZero()),this.isZero()?{div:new p(0),mod:new p(0)}:this.negative!==0&&E.negative===0?(D=this.neg().divmod(E,O),O!=="mod"&&(L=D.div.neg()),O!=="div"&&(N=D.mod.neg(),j&&N.negative!==0&&N.iadd(E)),{div:L,mod:N}):this.negative===0&&E.negative!==0?(D=this.divmod(E.neg(),O),O!=="mod"&&(L=D.div.neg()),{div:L,mod:D.mod}):(this.negative&E.negative)!=0?(D=this.neg().divmod(E.neg(),O),O!=="div"&&(N=D.mod.neg(),j&&N.negative!==0&&N.isub(E)),{div:D.div,mod:N}):E.length>this.length||this.cmp(E)<0?{div:new p(0),mod:this}:E.length===1?O==="div"?{div:this.divn(E.words[0]),mod:null}:O==="mod"?{div:null,mod:new p(this.modrn(E.words[0]))}:{div:this.divn(E.words[0]),mod:new p(this.modrn(E.words[0]))}:this._wordDiv(E,O);var L,N,D},p.prototype.div=function(E){return this.divmod(E,"div",!1).div},p.prototype.mod=function(E){return this.divmod(E,"mod",!1).mod},p.prototype.umod=function(E){return this.divmod(E,"mod",!0).mod},p.prototype.divRound=function(E){var O=this.divmod(E);if(O.mod.isZero())return O.div;var j=O.div.negative!==0?O.mod.isub(E):O.mod,L=E.ushrn(1),N=E.andln(1),D=j.cmp(L);return D<0||N===1&&D===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},p.prototype.modrn=function(E){var O=E<0;O&&(E=-E),l(E<=67108863);for(var j=(1<<26)%E,L=0,N=this.length-1;N>=0;N--)L=(j*L+(0|this.words[N]))%E;return O?-L:L},p.prototype.modn=function(E){return this.modrn(E)},p.prototype.idivn=function(E){var O=E<0;O&&(E=-E),l(E<=67108863);for(var j=0,L=this.length-1;L>=0;L--){var N=(0|this.words[L])+67108864*j;this.words[L]=N/E|0,j=N%E}return this._strip(),O?this.ineg():this},p.prototype.divn=function(E){return this.clone().idivn(E)},p.prototype.egcd=function(E){l(E.negative===0),l(!E.isZero());var O=this,j=E.clone();O=O.negative!==0?O.umod(E):O.clone();for(var L=new p(1),N=new p(0),D=new p(0),U=new p(1),G=0;O.isEven()&&j.isEven();)O.iushrn(1),j.iushrn(1),++G;for(var X=j.clone(),Y=O.clone();!O.isZero();){for(var ee=0,ne=1;(O.words[0]&ne)==0&&ee<26;++ee,ne<<=1);if(ee>0)for(O.iushrn(ee);ee-- >0;)(L.isOdd()||N.isOdd())&&(L.iadd(X),N.isub(Y)),L.iushrn(1),N.iushrn(1);for(var te=0,M=1;(j.words[0]&M)==0&&te<26;++te,M<<=1);if(te>0)for(j.iushrn(te);te-- >0;)(D.isOdd()||U.isOdd())&&(D.iadd(X),U.isub(Y)),D.iushrn(1),U.iushrn(1);O.cmp(j)>=0?(O.isub(j),L.isub(D),N.isub(U)):(j.isub(O),D.isub(L),U.isub(N))}return{a:D,b:U,gcd:j.iushln(G)}},p.prototype._invmp=function(E){l(E.negative===0),l(!E.isZero());var O=this,j=E.clone();O=O.negative!==0?O.umod(E):O.clone();for(var L,N=new p(1),D=new p(0),U=j.clone();O.cmpn(1)>0&&j.cmpn(1)>0;){for(var G=0,X=1;(O.words[0]&X)==0&&G<26;++G,X<<=1);if(G>0)for(O.iushrn(G);G-- >0;)N.isOdd()&&N.iadd(U),N.iushrn(1);for(var Y=0,ee=1;(j.words[0]&ee)==0&&Y<26;++Y,ee<<=1);if(Y>0)for(j.iushrn(Y);Y-- >0;)D.isOdd()&&D.iadd(U),D.iushrn(1);O.cmp(j)>=0?(O.isub(j),N.isub(D)):(j.isub(O),D.isub(N))}return(L=O.cmpn(1)===0?N:D).cmpn(0)<0&&L.iadd(E),L},p.prototype.gcd=function(E){if(this.isZero())return E.abs();if(E.isZero())return this.abs();var O=this.clone(),j=E.clone();O.negative=0,j.negative=0;for(var L=0;O.isEven()&&j.isEven();L++)O.iushrn(1),j.iushrn(1);for(;;){for(;O.isEven();)O.iushrn(1);for(;j.isEven();)j.iushrn(1);var N=O.cmp(j);if(N<0){var D=O;O=j,j=D}else if(N===0||j.cmpn(1)===0)break;O.isub(j)}return j.iushln(L)},p.prototype.invm=function(E){return this.egcd(E).a.umod(E)},p.prototype.isEven=function(){return(1&this.words[0])==0},p.prototype.isOdd=function(){return(1&this.words[0])==1},p.prototype.andln=function(E){return this.words[0]&E},p.prototype.bincn=function(E){l(typeof E=="number");var O=E%26,j=(E-O)/26,L=1<>>26,U&=67108863,this.words[D]=U}return N!==0&&(this.words[D]=N,this.length++),this},p.prototype.isZero=function(){return this.length===1&&this.words[0]===0},p.prototype.cmpn=function(E){var O,j=E<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;if(this._strip(),this.length>1)O=1;else{j&&(E=-E),l(E<=67108863,"Number is too big");var L=0|this.words[0];O=L===E?0:LE.length)return 1;if(this.length=0;j--){var L=0|this.words[j],N=0|E.words[j];if(L!==N){LN&&(O=1);break}}return O},p.prototype.gtn=function(E){return this.cmpn(E)===1},p.prototype.gt=function(E){return this.cmp(E)===1},p.prototype.gten=function(E){return this.cmpn(E)>=0},p.prototype.gte=function(E){return this.cmp(E)>=0},p.prototype.ltn=function(E){return this.cmpn(E)===-1},p.prototype.lt=function(E){return this.cmp(E)===-1},p.prototype.lten=function(E){return this.cmpn(E)<=0},p.prototype.lte=function(E){return this.cmp(E)<=0},p.prototype.eqn=function(E){return this.cmpn(E)===0},p.prototype.eq=function(E){return this.cmp(E)===0},p.red=function(E){return new T(E)},p.prototype.toRed=function(E){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),E.convertTo(this)._forceRed(E)},p.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},p.prototype._forceRed=function(E){return this.red=E,this},p.prototype.forceRed=function(E){return l(!this.red,"Already a number in reduction context"),this._forceRed(E)},p.prototype.redAdd=function(E){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,E)},p.prototype.redIAdd=function(E){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,E)},p.prototype.redSub=function(E){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,E)},p.prototype.redISub=function(E){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,E)},p.prototype.redShl=function(E){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,E)},p.prototype.redMul=function(E){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.mul(this,E)},p.prototype.redIMul=function(E){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.imul(this,E)},p.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},p.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},p.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},p.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},p.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},p.prototype.redPow=function(E){return l(this.red&&!E.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,E)};var C={k256:null,p224:null,p192:null,p25519:null};function R(E,O){this.name=E,this.p=new p(O,16),this.n=this.p.bitLength(),this.k=new p(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function P(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){R.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){R.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){R.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(E){if(typeof E=="string"){var O=p._prime(E);this.m=O.p,this.prime=O}else l(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}function I(E){T.call(this,E),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new p(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R.prototype._tmp=function(){var E=new p(null);return E.words=new Array(Math.ceil(this.n/13)),E},R.prototype.ireduce=function(E){var O,j=E;do this.split(j,this.tmp),O=(j=(j=this.imulK(j)).iadd(this.tmp)).bitLength();while(O>this.n);var L=O0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},R.prototype.split=function(E,O){E.iushrn(this.n,0,O)},R.prototype.imulK=function(E){return E.imul(this.k)},m(P,R),P.prototype.split=function(E,O){for(var j=Math.min(E.length,9),L=0;L>>22,N=D}N>>>=22,E.words[L-10]=N,N===0&&E.length>10?E.length-=10:E.length-=9},P.prototype.imulK=function(E){E.words[E.length]=0,E.words[E.length+1]=0,E.length+=2;for(var O=0,j=0;j>>=26,E.words[j]=N,O=L}return O!==0&&(E.words[E.length++]=O),E},p._prime=function(E){if(C[E])return C[E];var O;if(E==="k256")O=new P;else if(E==="p224")O=new S;else if(E==="p192")O=new A;else{if(E!=="p25519")throw new Error("Unknown prime "+E);O=new k}return C[E]=O,O},T.prototype._verify1=function(E){l(E.negative===0,"red works only with positives"),l(E.red,"red works only with red numbers")},T.prototype._verify2=function(E,O){l((E.negative|O.negative)==0,"red works only with positives"),l(E.red&&E.red===O.red,"red works only with red numbers")},T.prototype.imod=function(E){return this.prime?this.prime.ireduce(E)._forceRed(this):(o(E,E.umod(this.m)._forceRed(this)),E)},T.prototype.neg=function(E){return E.isZero()?E.clone():this.m.sub(E)._forceRed(this)},T.prototype.add=function(E,O){this._verify2(E,O);var j=E.add(O);return j.cmp(this.m)>=0&&j.isub(this.m),j._forceRed(this)},T.prototype.iadd=function(E,O){this._verify2(E,O);var j=E.iadd(O);return j.cmp(this.m)>=0&&j.isub(this.m),j},T.prototype.sub=function(E,O){this._verify2(E,O);var j=E.sub(O);return j.cmpn(0)<0&&j.iadd(this.m),j._forceRed(this)},T.prototype.isub=function(E,O){this._verify2(E,O);var j=E.isub(O);return j.cmpn(0)<0&&j.iadd(this.m),j},T.prototype.shl=function(E,O){return this._verify1(E),this.imod(E.ushln(O))},T.prototype.imul=function(E,O){return this._verify2(E,O),this.imod(E.imul(O))},T.prototype.mul=function(E,O){return this._verify2(E,O),this.imod(E.mul(O))},T.prototype.isqr=function(E){return this.imul(E,E.clone())},T.prototype.sqr=function(E){return this.mul(E,E)},T.prototype.sqrt=function(E){if(E.isZero())return E.clone();var O=this.m.andln(3);if(l(O%2==1),O===3){var j=this.m.add(new p(1)).iushrn(2);return this.pow(E,j)}for(var L=this.m.subn(1),N=0;!L.isZero()&&L.andln(1)===0;)N++,L.iushrn(1);l(!L.isZero());var D=new p(1).toRed(this),U=D.redNeg(),G=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new p(2*X*X).toRed(this);this.pow(X,G).cmp(U)!==0;)X.redIAdd(U);for(var Y=this.pow(X,L),ee=this.pow(E,L.addn(1).iushrn(1)),ne=this.pow(E,L),te=N;ne.cmp(D)!==0;){for(var M=ne,B=0;M.cmp(D)!==0;B++)M=M.redSqr();l(B=0;L--){for(var X=O.words[L],Y=G-1;Y>=0;Y--){var ee=X>>Y&1;N!==j[0]&&(N=this.sqr(N)),ee!==0||D!==0?(D<<=1,D|=ee,(++U===4||L===0&&Y===0)&&(N=this.mul(N,j[D]),U=0,D=0)):U=0}G=26}return N},T.prototype.convertTo=function(E){var O=E.umod(this.m);return O===E?O.clone():O},T.prototype.convertFrom=function(E){var O=E.clone();return O.red=null,O},p.mont=function(E){return new I(E)},m(I,T),I.prototype.convertTo=function(E){return this.imod(E.ushln(this.shift))},I.prototype.convertFrom=function(E){var O=this.imod(E.mul(this.rinv));return O.red=null,O},I.prototype.imul=function(E,O){if(E.isZero()||O.isZero())return E.words[0]=0,E.length=1,E;var j=E.imul(O),L=j.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=j.isub(L).iushrn(this.shift),D=N;return N.cmp(this.m)>=0?D=N.isub(this.m):N.cmpn(0)<0&&(D=N.iadd(this.m)),D._forceRed(this)},I.prototype.mul=function(E,O){if(E.isZero()||O.isZero())return new p(0)._forceRed(this);var j=E.mul(O),L=j.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),N=j.isub(L).iushrn(this.shift),D=N;return N.cmp(this.m)>=0?D=N.isub(this.m):N.cmpn(0)<0&&(D=N.iadd(this.m)),D._forceRed(this)},I.prototype.invm=function(E){return this.imod(E._invmp(this.m).mul(this.r2))._forceRed(this)}})(r===void 0||r)},{buffer:185}],184:[function(e,r,t){"use strict";function n(m){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(m)}var i;function u(m){this.rand=m}if(r.exports=function(m){return i||(i=new u(null)),i.generate(m)},r.exports.Rand=u,u.prototype.generate=function(m){return this._rand(m)},u.prototype._rand=function(m){if(this.rand.getBytes)return this.rand.getBytes(m);for(var p=new Uint8Array(m),g=0;g>>24]^x[P>>>16&255]^_[S>>>8&255]^C[255&A]^c[k++],h=w[P>>>24]^x[S>>>16&255]^_[A>>>8&255]^C[255&R]^c[k++],y=w[S>>>24]^x[A>>>16&255]^_[R>>>8&255]^C[255&P]^c[k++],b=w[A>>>24]^x[R>>>16&255]^_[P>>>8&255]^C[255&S]^c[k++],R=d,P=h,S=y,A=b;return d=(a[R>>>24]<<24|a[P>>>16&255]<<16|a[S>>>8&255]<<8|a[255&A])^c[k++],h=(a[P>>>24]<<24|a[S>>>16&255]<<16|a[A>>>8&255]<<8|a[255&R])^c[k++],y=(a[S>>>24]<<24|a[A>>>16&255]<<16|a[R>>>8&255]<<8|a[255&P])^c[k++],b=(a[A>>>24]<<24|a[R>>>16&255]<<16|a[P>>>8&255]<<8|a[255&S])^c[k++],[d>>>=0,h>>>=0,y>>>=0,b>>>=0]}var m=[0,1,2,4,8,16,32,64,128,27,54],p=function(){for(var v=new Array(256),c=0;c<256;c++)v[c]=c<128?c<<1:c<<1^283;for(var o=[],a=[],s=[[],[],[],[]],d=[[],[],[],[]],h=0,y=0,b=0;b<256;++b){var w=y^y<<1^y<<2^y<<3^y<<4;w=w>>>8^255&w^99,o[h]=w,a[w]=h;var x=v[h],_=v[x],C=v[_],R=257*v[w]^16843008*w;s[0][h]=R<<24|R>>>8,s[1][h]=R<<16|R>>>16,s[2][h]=R<<8|R>>>24,s[3][h]=R,R=16843009*C^65537*_^257*x^16843008*h,d[0][w]=R<<24|R>>>8,d[1][w]=R<<16|R>>>16,d[2][w]=R<<8|R>>>24,d[3][w]=R,h===0?h=y=1:(h=x^v[v[v[C^x]]],y^=v[v[y]])}return{SBOX:o,INV_SBOX:a,SUB_MIX:s,INV_SUB_MIX:d}}();function g(v){this._key=i(v),this._reset()}g.blockSize=16,g.keySize=32,g.prototype.blockSize=g.blockSize,g.prototype.keySize=g.keySize,g.prototype._reset=function(){for(var v=this._key,c=v.length,o=c+6,a=4*(o+1),s=[],d=0;d>>24,h=p.SBOX[h>>>24]<<24|p.SBOX[h>>>16&255]<<16|p.SBOX[h>>>8&255]<<8|p.SBOX[255&h],h^=m[d/c|0]<<24):c>6&&d%c==4&&(h=p.SBOX[h>>>24]<<24|p.SBOX[h>>>16&255]<<16|p.SBOX[h>>>8&255]<<8|p.SBOX[255&h]),s[d]=s[d-c]^h}for(var y=[],b=0;b>>24]]^p.INV_SUB_MIX[1][p.SBOX[x>>>16&255]]^p.INV_SUB_MIX[2][p.SBOX[x>>>8&255]]^p.INV_SUB_MIX[3][p.SBOX[255&x]]}this._nRounds=o,this._keySchedule=s,this._invKeySchedule=y},g.prototype.encryptBlockRaw=function(v){return l(v=i(v),this._keySchedule,p.SUB_MIX,p.SBOX,this._nRounds)},g.prototype.encryptBlock=function(v){var c=this.encryptBlockRaw(v),o=n.allocUnsafe(16);return o.writeUInt32BE(c[0],0),o.writeUInt32BE(c[1],4),o.writeUInt32BE(c[2],8),o.writeUInt32BE(c[3],12),o},g.prototype.decryptBlock=function(v){var c=(v=i(v))[1];v[1]=v[3],v[3]=c;var o=l(v,this._invKeySchedule,p.INV_SUB_MIX,p.INV_SBOX,this._nRounds),a=n.allocUnsafe(16);return a.writeUInt32BE(o[0],0),a.writeUInt32BE(o[3],4),a.writeUInt32BE(o[2],8),a.writeUInt32BE(o[1],12),a},g.prototype.scrub=function(){u(this._keySchedule),u(this._invKeySchedule),u(this._key)},r.exports.AES=g},{"safe-buffer":494}],187:[function(e,r,t){"use strict";var n=e("./aes"),i=e("safe-buffer").Buffer,u=e("cipher-base"),l=e("inherits"),m=e("./ghash"),p=e("buffer-xor"),g=e("./incr32");function v(c,o,a,s){u.call(this);var d=i.alloc(4,0);this._cipher=new n.AES(o);var h=this._cipher.encryptBlock(d);this._ghash=new m(h),a=function(y,b,w){if(b.length===12)return y._finID=i.concat([b,i.from([0,0,0,1])]),i.concat([b,i.from([0,0,0,2])]);var x=new m(w),_=b.length,C=_%16;x.update(b),C&&(C=16-C,x.update(i.alloc(C,0))),x.update(i.alloc(8,0));var R=8*_,P=i.alloc(8);P.writeUIntBE(R,0,8),x.update(P),y._finID=x.state;var S=i.from(y._finID);return g(S),S}(this,a,h),this._prev=i.from(a),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=c,this._authTag=null,this._called=!1}l(v,u),v.prototype._update=function(c){if(!this._called&&this._alen){var o=16-this._alen%16;o<16&&(o=i.alloc(o,0),this._ghash.update(o))}this._called=!0;var a=this._mode.encrypt(this,c);return this._decrypt?this._ghash.update(c):this._ghash.update(a),this._len+=c.length,a},v.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var c=p(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(o,a){var s=0;o.length!==a.length&&s++;for(var d=Math.min(o.length,a.length),h=0;h16)throw new Error("unable to decrypt data");for(var h=-1;++h16)return s=this.cache.slice(0,16),this.cache=this.cache.slice(16),s}else if(this.cache.length>=16)return s=this.cache.slice(0,16),this.cache=this.cache.slice(16),s;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(a,s){var d=u[a.toLowerCase()];if(!d)throw new TypeError("invalid suite type");var h=g(s,!1,d.key,d.iv);return o(a,h.key,h.iv)},t.createDecipheriv=o},{"./aes":186,"./authCipher":187,"./modes":199,"./streamCipher":202,"cipher-base":218,evp_bytestokey:368,inherits:387,"safe-buffer":494}],190:[function(e,r,t){"use strict";var n=e("./modes"),i=e("./authCipher"),u=e("safe-buffer").Buffer,l=e("./streamCipher"),m=e("cipher-base"),p=e("./aes"),g=e("evp_bytestokey");function v(s,d,h){m.call(this),this._cache=new o,this._cipher=new p.AES(d),this._prev=u.from(h),this._mode=s,this._autopadding=!0}e("inherits")(v,m),v.prototype._update=function(s){var d,h;this._cache.add(s);for(var y=[];d=this._cache.get();)h=this._mode.encrypt(this,d),y.push(h);return u.concat(y)};var c=u.alloc(16,16);function o(){this.cache=u.allocUnsafe(0)}function a(s,d,h){var y=n[s.toLowerCase()];if(!y)throw new TypeError("invalid suite type");if(typeof d=="string"&&(d=u.from(d)),d.length!==y.key/8)throw new TypeError("invalid key length "+d.length);if(typeof h=="string"&&(h=u.from(h)),y.mode!=="GCM"&&h.length!==y.iv)throw new TypeError("invalid iv length "+h.length);return y.type==="stream"?new l(y.module,d,h):y.type==="auth"?new i(y.module,d,h):new v(y.module,d,h)}v.prototype._final=function(){var s=this._cache.flush();if(this._autopadding)return s=this._mode.encrypt(this,s),this._cipher.scrub(),s;if(!s.equals(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(s){return this._autopadding=!!s,this},o.prototype.add=function(s){this.cache=u.concat([this.cache,s])},o.prototype.get=function(){if(this.cache.length>15){var s=this.cache.slice(0,16);return this.cache=this.cache.slice(16),s}return null},o.prototype.flush=function(){for(var s=16-this.cache.length,d=u.allocUnsafe(s),h=-1;++h>>0,0),p.writeUInt32BE(m[1]>>>0,4),p.writeUInt32BE(m[2]>>>0,8),p.writeUInt32BE(m[3]>>>0,12),p}function l(m){this.h=m,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}l.prototype.ghash=function(m){for(var p=-1;++p0;p--)v[p]=v[p]>>>1|(1&v[p-1])<<31;v[0]=v[0]>>>1,g&&(v[0]=v[0]^225<<24)}this.state=u(c)},l.prototype.update=function(m){var p;for(this.cache=n.concat([this.cache,m]);this.cache.length>=16;)p=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(p)},l.prototype.final=function(m,p){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(u([0,m,0,p])),this.state},r.exports=l},{"safe-buffer":494}],192:[function(e,r,t){"use strict";r.exports=function(n){for(var i,u=n.length;u--;){if((i=n.readUInt8(u))!==255){i++,n.writeUInt8(i,u);break}n.writeUInt8(0,u)}}},{}],193:[function(e,r,t){"use strict";var n=e("buffer-xor");t.encrypt=function(i,u){var l=n(u,i._prev);return i._prev=i._cipher.encryptBlock(l),i._prev},t.decrypt=function(i,u){var l=i._prev;i._prev=u;var m=i._cipher.decryptBlock(u);return n(m,l)}},{"buffer-xor":217}],194:[function(e,r,t){"use strict";var n=e("safe-buffer").Buffer,i=e("buffer-xor");function u(l,m,p){var g=m.length,v=i(m,l._cache);return l._cache=l._cache.slice(g),l._prev=n.concat([l._prev,p?m:v]),v}t.encrypt=function(l,m,p){for(var g,v=n.allocUnsafe(0);m.length;){if(l._cache.length===0&&(l._cache=l._cipher.encryptBlock(l._prev),l._prev=n.allocUnsafe(0)),!(l._cache.length<=m.length)){v=n.concat([v,u(l,m,p)]);break}g=l._cache.length,v=n.concat([v,u(l,m.slice(0,g),p)]),m=m.slice(g)}return v}},{"buffer-xor":217,"safe-buffer":494}],195:[function(e,r,t){"use strict";var n=e("safe-buffer").Buffer;function i(l,m,p){for(var g,v,c=-1,o=0;++c<8;)g=m&1<<7-c?128:0,o+=(128&(v=l._cipher.encryptBlock(l._prev)[0]^g))>>c%8,l._prev=u(l._prev,p?g:v);return o}function u(l,m){var p=l.length,g=-1,v=n.allocUnsafe(l.length);for(l=n.concat([l,n.from([m])]);++g>7;return v}t.encrypt=function(l,m,p){for(var g=m.length,v=n.allocUnsafe(g),c=-1;++c=0||!v.umod(p.prime1)||!v.umod(p.prime2);)v=new i(u(g));return v}r.exports=l,l.getr=m}).call(this,e("buffer").Buffer)},{"bn.js":207,buffer:216,randombytes:475}],207:[function(e,r,t){arguments[4][181][0].apply(t,arguments)},{buffer:185,dup:181}],208:[function(e,r,t){"use strict";r.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":209}],209:[function(e,r,t){r.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],210:[function(e,r,t){r.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],211:[function(e,r,t){"use strict";var n=e("safe-buffer").Buffer,i=e("create-hash"),u=e("readable-stream"),l=e("inherits"),m=e("./sign"),p=e("./verify"),g=e("./algorithms.json");function v(s){u.Writable.call(this);var d=g[s];if(!d)throw new Error("Unknown message digest");this._hashType=d.hash,this._hash=i(d.hash),this._tag=d.id,this._signType=d.sign}function c(s){u.Writable.call(this);var d=g[s];if(!d)throw new Error("Unknown message digest");this._hash=i(d.hash),this._tag=d.id,this._signType=d.sign}function o(s){return new v(s)}function a(s){return new c(s)}Object.keys(g).forEach(function(s){g[s].id=n.from(g[s].id,"hex"),g[s.toLowerCase()]=g[s]}),l(v,u.Writable),v.prototype._write=function(s,d,h){this._hash.update(s),h()},v.prototype.update=function(s,d){return typeof s=="string"&&(s=n.from(s,d)),this._hash.update(s),this},v.prototype.sign=function(s,d){this.end();var h=this._hash.digest(),y=m(h,s,this._hashType,this._signType,this._tag);return d?y.toString(d):y},l(c,u.Writable),c.prototype._write=function(s,d,h){this._hash.update(s),h()},c.prototype.update=function(s,d){return typeof s=="string"&&(s=n.from(s,d)),this._hash.update(s),this},c.prototype.verify=function(s,d,h){typeof d=="string"&&(d=n.from(d,h)),this.end();var y=this._hash.digest();return p(d,y,s,this._signType,this._tag)},r.exports={Sign:o,Verify:a,createSign:o,createVerify:a}},{"./algorithms.json":209,"./sign":212,"./verify":213,"create-hash":331,inherits:387,"readable-stream":491,"safe-buffer":214}],212:[function(e,r,t){"use strict";var n=e("safe-buffer").Buffer,i=e("create-hmac"),u=e("browserify-rsa"),l=e("elliptic").ec,m=e("bn.js"),p=e("parse-asn1"),g=e("./curves.json");function v(s,d,h,y){if((s=n.from(s.toArray())).length0&&h.ishrn(y),h}function o(s,d,h){var y,b;do{for(y=n.alloc(0);8*y.length=v)throw new Error("invalid sig")}r.exports=function(g,v,c,o,a){var s=l(c);if(s.type==="ec"){if(o!=="ecdsa"&&o!=="ecdsa/rsa")throw new Error("wrong public key type");return function(_,C,R){var P=m[R.data.algorithm.curve.join(".")];if(!P)throw new Error("unknown curve "+R.data.algorithm.curve.join("."));var S=new u(P),A=R.data.subjectPrivateKey.data;return S.verify(C,_,A)}(g,v,s)}if(s.type==="dsa"){if(o!=="dsa")throw new Error("wrong public key type");return function(_,C,R){var P=R.data.p,S=R.data.q,A=R.data.g,k=R.data.pub_key,T=l.signature.decode(_,"der"),I=T.s,E=T.r;p(I,S),p(E,S);var O=i.mont(P),j=I.invm(S);return A.toRed(O).redPow(new i(C).mul(j).mod(S)).fromRed().mul(k.toRed(O).redPow(E.mul(j).mod(S)).fromRed()).mod(P).mod(S).cmp(E)===0}(g,v,s)}if(o!=="rsa"&&o!=="ecdsa/rsa")throw new Error("wrong public key type");v=n.concat([a,v]);for(var d=s.modulus.byteLength(),h=[1],y=0;v.length+h.length+22147483647)throw new RangeError('The value "'+M+'" is invalid for option "size"');var B=new Uint8Array(M);return B.__proto__=p.prototype,B}function p(M,B,z){if(typeof M=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(M)}return g(M,B,z)}function g(M,B,z){if(typeof M=="string")return function(Q,K){if(typeof K=="string"&&K!==""||(K="utf8"),!p.isEncoding(K))throw new TypeError("Unknown encoding: "+K);var ie=0|s(Q,K),Z=m(ie),re=Z.write(Q,K);return re!==ie&&(Z=Z.slice(0,re)),Z}(M,B);if(ArrayBuffer.isView(M))return o(M);if(M==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+i(M));if(ne(M,ArrayBuffer)||M&&ne(M.buffer,ArrayBuffer))return function(Q,K,ie){if(K<0||Q.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|M}function s(M,B){if(p.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||ne(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+i(M));var z=M.length,q=arguments.length>2&&arguments[2]===!0;if(!q&&z===0)return 0;for(var J=!1;;)switch(B){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return X(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return Y(M).length;default:if(J)return q?-1:X(M).length;B=(""+B).toLowerCase(),J=!0}}function d(M,B,z){var q=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0)<=(B>>>=0))return"";for(M||(M="utf8");;)switch(M){case"hex":return I(this,B,z);case"utf8":case"utf-8":return A(this,B,z);case"ascii":return k(this,B,z);case"latin1":case"binary":return T(this,B,z);case"base64":return S(this,B,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,B,z);default:if(q)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),q=!0}}function h(M,B,z){var q=M[B];M[B]=M[z],M[z]=q}function y(M,B,z,q,J){if(M.length===0)return-1;if(typeof z=="string"?(q=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),te(z=+z)&&(z=J?0:M.length-1),z<0&&(z=M.length+z),z>=M.length){if(J)return-1;z=M.length-1}else if(z<0){if(!J)return-1;z=0}if(typeof B=="string"&&(B=p.from(B,q)),p.isBuffer(B))return B.length===0?-1:b(M,B,z,q,J);if(typeof B=="number")return B&=255,typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(M,B,z):Uint8Array.prototype.lastIndexOf.call(M,B,z):b(M,[B],z,q,J);throw new TypeError("val must be string, number or Buffer")}function b(M,B,z,q,J){var Q,K=1,ie=M.length,Z=B.length;if(q!==void 0&&((q=String(q).toLowerCase())==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(M.length<2||B.length<2)return-1;K=2,ie/=2,Z/=2,z/=2}function re(we,Se){return K===1?we[Se]:we.readUInt16BE(Se*K)}if(J){var ae=-1;for(Q=z;Qie&&(z=ie-Z),Q=z;Q>=0;Q--){for(var ce=!0,ke=0;keJ&&(q=J):q=J;var Q=B.length;q>Q/2&&(q=Q/2);for(var K=0;K>8,Z=K%256,re.push(Z),re.push(ie);return re}(B,M.length-z),M,z,q)}function S(M,B,z){return B===0&&z===M.length?u.fromByteArray(M):u.fromByteArray(M.slice(B,z))}function A(M,B,z){z=Math.min(M.length,z);for(var q=[],J=B;J239?4:re>223?3:re>191?2:1;if(J+ce<=z)switch(ce){case 1:re<128&&(ae=re);break;case 2:(192&(Q=M[J+1]))==128&&(Z=(31&re)<<6|63&Q)>127&&(ae=Z);break;case 3:Q=M[J+1],K=M[J+2],(192&Q)==128&&(192&K)==128&&(Z=(15&re)<<12|(63&Q)<<6|63&K)>2047&&(Z<55296||Z>57343)&&(ae=Z);break;case 4:Q=M[J+1],K=M[J+2],ie=M[J+3],(192&Q)==128&&(192&K)==128&&(192&ie)==128&&(Z=(15&re)<<18|(63&Q)<<12|(63&K)<<6|63&ie)>65535&&Z<1114112&&(ae=Z)}ae===null?(ae=65533,ce=1):ae>65535&&(ae-=65536,q.push(ae>>>10&1023|55296),ae=56320|1023&ae),q.push(ae),J+=ce}return function(ke){var we=ke.length;if(we<=4096)return String.fromCharCode.apply(String,ke);for(var Se="",Ge=0;GeB&&(M+=" ... "),""},p.prototype.compare=function(M,B,z,q,J){if(ne(M,Uint8Array)&&(M=p.from(M,M.offset,M.byteLength)),!p.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+i(M));if(B===void 0&&(B=0),z===void 0&&(z=M?M.length:0),q===void 0&&(q=0),J===void 0&&(J=this.length),B<0||z>M.length||q<0||J>this.length)throw new RangeError("out of range index");if(q>=J&&B>=z)return 0;if(q>=J)return-1;if(B>=z)return 1;if(this===M)return 0;for(var Q=(J>>>=0)-(q>>>=0),K=(z>>>=0)-(B>>>=0),ie=Math.min(Q,K),Z=this.slice(q,J),re=M.slice(B,z),ae=0;ae>>=0,isFinite(z)?(z>>>=0,q===void 0&&(q="utf8")):(q=z,z=void 0)}var J=this.length-B;if((z===void 0||z>J)&&(z=J),M.length>0&&(z<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");q||(q="utf8");for(var Q=!1;;)switch(q){case"hex":return w(this,M,B,z);case"utf8":case"utf-8":return x(this,M,B,z);case"ascii":return _(this,M,B,z);case"latin1":case"binary":return C(this,M,B,z);case"base64":return R(this,M,B,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,M,B,z);default:if(Q)throw new TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),Q=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(M,B,z){var q="";z=Math.min(M.length,z);for(var J=B;Jq)&&(z=q);for(var J="",Q=B;Qz)throw new RangeError("Trying to access beyond buffer length")}function j(M,B,z,q,J,Q){if(!p.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>J||BM.length)throw new RangeError("Index out of range")}function L(M,B,z,q,J,Q){if(z+q>M.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function N(M,B,z,q,J){return B=+B,z>>>=0,J||L(M,0,z,4),l.write(M,B,z,q,23,4),z+4}function D(M,B,z,q,J){return B=+B,z>>>=0,J||L(M,0,z,8),l.write(M,B,z,q,52,8),z+8}p.prototype.slice=function(M,B){var z=this.length;(M=~~M)<0?(M+=z)<0&&(M=0):M>z&&(M=z),(B=B===void 0?z:~~B)<0?(B+=z)<0&&(B=0):B>z&&(B=z),B>>=0,B>>>=0,z||O(M,B,this.length);for(var q=this[M],J=1,Q=0;++Q>>=0,B>>>=0,z||O(M,B,this.length);for(var q=this[M+--B],J=1;B>0&&(J*=256);)q+=this[M+--B]*J;return q},p.prototype.readUInt8=function(M,B){return M>>>=0,B||O(M,1,this.length),this[M]},p.prototype.readUInt16LE=function(M,B){return M>>>=0,B||O(M,2,this.length),this[M]|this[M+1]<<8},p.prototype.readUInt16BE=function(M,B){return M>>>=0,B||O(M,2,this.length),this[M]<<8|this[M+1]},p.prototype.readUInt32LE=function(M,B){return M>>>=0,B||O(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+16777216*this[M+3]},p.prototype.readUInt32BE=function(M,B){return M>>>=0,B||O(M,4,this.length),16777216*this[M]+(this[M+1]<<16|this[M+2]<<8|this[M+3])},p.prototype.readIntLE=function(M,B,z){M>>>=0,B>>>=0,z||O(M,B,this.length);for(var q=this[M],J=1,Q=0;++Q=(J*=128)&&(q-=Math.pow(2,8*B)),q},p.prototype.readIntBE=function(M,B,z){M>>>=0,B>>>=0,z||O(M,B,this.length);for(var q=B,J=1,Q=this[M+--q];q>0&&(J*=256);)Q+=this[M+--q]*J;return Q>=(J*=128)&&(Q-=Math.pow(2,8*B)),Q},p.prototype.readInt8=function(M,B){return M>>>=0,B||O(M,1,this.length),128&this[M]?-1*(255-this[M]+1):this[M]},p.prototype.readInt16LE=function(M,B){M>>>=0,B||O(M,2,this.length);var z=this[M]|this[M+1]<<8;return 32768&z?4294901760|z:z},p.prototype.readInt16BE=function(M,B){M>>>=0,B||O(M,2,this.length);var z=this[M+1]|this[M]<<8;return 32768&z?4294901760|z:z},p.prototype.readInt32LE=function(M,B){return M>>>=0,B||O(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},p.prototype.readInt32BE=function(M,B){return M>>>=0,B||O(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},p.prototype.readFloatLE=function(M,B){return M>>>=0,B||O(M,4,this.length),l.read(this,M,!0,23,4)},p.prototype.readFloatBE=function(M,B){return M>>>=0,B||O(M,4,this.length),l.read(this,M,!1,23,4)},p.prototype.readDoubleLE=function(M,B){return M>>>=0,B||O(M,8,this.length),l.read(this,M,!0,52,8)},p.prototype.readDoubleBE=function(M,B){return M>>>=0,B||O(M,8,this.length),l.read(this,M,!1,52,8)},p.prototype.writeUIntLE=function(M,B,z,q){M=+M,B>>>=0,z>>>=0,q||j(this,M,B,z,Math.pow(2,8*z)-1,0);var J=1,Q=0;for(this[B]=255&M;++Q>>=0,z>>>=0,q||j(this,M,B,z,Math.pow(2,8*z)-1,0);var J=z-1,Q=1;for(this[B+J]=255&M;--J>=0&&(Q*=256);)this[B+J]=M/Q&255;return B+z},p.prototype.writeUInt8=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,1,255,0),this[B]=255&M,B+1},p.prototype.writeUInt16LE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,2,65535,0),this[B]=255&M,this[B+1]=M>>>8,B+2},p.prototype.writeUInt16BE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,2,65535,0),this[B]=M>>>8,this[B+1]=255&M,B+2},p.prototype.writeUInt32LE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,4,4294967295,0),this[B+3]=M>>>24,this[B+2]=M>>>16,this[B+1]=M>>>8,this[B]=255&M,B+4},p.prototype.writeUInt32BE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,4,4294967295,0),this[B]=M>>>24,this[B+1]=M>>>16,this[B+2]=M>>>8,this[B+3]=255&M,B+4},p.prototype.writeIntLE=function(M,B,z,q){if(M=+M,B>>>=0,!q){var J=Math.pow(2,8*z-1);j(this,M,B,z,J-1,-J)}var Q=0,K=1,ie=0;for(this[B]=255&M;++Q>0)-ie&255;return B+z},p.prototype.writeIntBE=function(M,B,z,q){if(M=+M,B>>>=0,!q){var J=Math.pow(2,8*z-1);j(this,M,B,z,J-1,-J)}var Q=z-1,K=1,ie=0;for(this[B+Q]=255&M;--Q>=0&&(K*=256);)M<0&&ie===0&&this[B+Q+1]!==0&&(ie=1),this[B+Q]=(M/K>>0)-ie&255;return B+z},p.prototype.writeInt8=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,1,127,-128),M<0&&(M=255+M+1),this[B]=255&M,B+1},p.prototype.writeInt16LE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,2,32767,-32768),this[B]=255&M,this[B+1]=M>>>8,B+2},p.prototype.writeInt16BE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,2,32767,-32768),this[B]=M>>>8,this[B+1]=255&M,B+2},p.prototype.writeInt32LE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,4,2147483647,-2147483648),this[B]=255&M,this[B+1]=M>>>8,this[B+2]=M>>>16,this[B+3]=M>>>24,B+4},p.prototype.writeInt32BE=function(M,B,z){return M=+M,B>>>=0,z||j(this,M,B,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[B]=M>>>24,this[B+1]=M>>>16,this[B+2]=M>>>8,this[B+3]=255&M,B+4},p.prototype.writeFloatLE=function(M,B,z){return N(this,M,B,!0,z)},p.prototype.writeFloatBE=function(M,B,z){return N(this,M,B,!1,z)},p.prototype.writeDoubleLE=function(M,B,z){return D(this,M,B,!0,z)},p.prototype.writeDoubleBE=function(M,B,z){return D(this,M,B,!1,z)},p.prototype.copy=function(M,B,z,q){if(!p.isBuffer(M))throw new TypeError("argument should be a Buffer");if(z||(z=0),q||q===0||(q=this.length),B>=M.length&&(B=M.length),B||(B=0),q>0&&q=this.length)throw new RangeError("Index out of range");if(q<0)throw new RangeError("sourceEnd out of bounds");q>this.length&&(q=this.length),M.length-B=0;--Q)M[Q+B]=this[Q+z];else Uint8Array.prototype.set.call(M,this.subarray(z,q),B);return J},p.prototype.fill=function(M,B,z,q){if(typeof M=="string"){if(typeof B=="string"?(q=B,B=0,z=this.length):typeof z=="string"&&(q=z,z=this.length),q!==void 0&&typeof q!="string")throw new TypeError("encoding must be a string");if(typeof q=="string"&&!p.isEncoding(q))throw new TypeError("Unknown encoding: "+q);if(M.length===1){var J=M.charCodeAt(0);(q==="utf8"&&J<128||q==="latin1")&&(M=J)}}else typeof M=="number"&&(M&=255);if(B<0||this.length>>=0,z=z===void 0?this.length:z>>>0,M||(M=0),typeof M=="number")for(Q=B;Q55295&&z<57344){if(!J){if(z>56319){(B-=3)>-1&&Q.push(239,191,189);continue}if(K+1===q){(B-=3)>-1&&Q.push(239,191,189);continue}J=z;continue}if(z<56320){(B-=3)>-1&&Q.push(239,191,189),J=z;continue}z=65536+(J-55296<<10|z-56320)}else J&&(B-=3)>-1&&Q.push(239,191,189);if(J=null,z<128){if((B-=1)<0)break;Q.push(z)}else if(z<2048){if((B-=2)<0)break;Q.push(z>>6|192,63&z|128)}else if(z<65536){if((B-=3)<0)break;Q.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((B-=4)<0)break;Q.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return Q}function Y(M){return u.toByteArray(function(B){if((B=(B=B.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;B.length%4!=0;)B+="=";return B}(M))}function ee(M,B,z,q){for(var J=0;J=B.length||J>=M.length);++J)B[J+z]=M[J];return J}function ne(M,B){return M instanceof B||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===B.name}function te(M){return M!=M}}).call(this,e("buffer").Buffer)},{"base64-js":182,buffer:216,ieee754:385}],217:[function(e,r,t){(function(n){"use strict";r.exports=function(i,u){for(var l=Math.min(i.length,u.length),m=new n(l),p=0;ps;)if((c=o[s++])!=c)return!0}else for(;a>s;s++)if((m||s in o)&&o[s]===g)return m||s||0;return!m&&-1}};r.exports={includes:l(!0),indexOf:l(!1)}},{"../internals/to-absolute-index":304,"../internals/to-indexed-object":305,"../internals/to-length":307}],225:[function(e,r,t){var n=e("../internals/function-bind-context"),i=e("../internals/indexed-object"),u=e("../internals/to-object"),l=e("../internals/to-length"),m=e("../internals/array-species-create"),p=[].push,g=function(v){var c=v==1,o=v==2,a=v==3,s=v==4,d=v==6,h=v==5||d;return function(y,b,w,x){for(var _,C,R=u(y),P=i(R),S=n(b,w,3),A=l(P.length),k=0,T=x||m,I=c?T(y,A):o?T(y,0):void 0;A>k;k++)if((h||k in P)&&(C=S(_=P[k],k,R),v)){if(c)I[k]=C;else if(C)switch(v){case 3:return!0;case 5:return _;case 6:return k;case 2:p.call(I,_)}else if(s)return!1}return d?-1:a||s?s:I}};r.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6)}},{"../internals/array-species-create":227,"../internals/function-bind-context":248,"../internals/indexed-object":257,"../internals/to-length":307,"../internals/to-object":308}],226:[function(e,r,t){var n=e("../internals/descriptors"),i=e("../internals/fails"),u=e("../internals/has"),l=Object.defineProperty,m={},p=function(g){throw g};r.exports=function(g,v){if(u(m,g))return m[g];v||(v={});var c=[][g],o=!!u(v,"ACCESSORS")&&v.ACCESSORS,a=u(v,0)?v[0]:p,s=u(v,1)?v[1]:void 0;return m[g]=!!c&&!i(function(){if(o&&!n)return!0;var d={length:-1};o?l(d,1,{enumerable:!0,get:p}):d[1]=1,c.call(d,a,s)})}},{"../internals/descriptors":240,"../internals/fails":247,"../internals/has":252}],227:[function(e,r,t){var n=e("../internals/is-object"),i=e("../internals/is-array"),u=e("../internals/well-known-symbol")("species");r.exports=function(l,m){var p;return i(l)&&(typeof(p=l.constructor)!="function"||p!==Array&&!i(p.prototype)?n(p)&&(p=p[u])===null&&(p=void 0):p=void 0),new(p===void 0?Array:p)(m===0?0:m)}},{"../internals/is-array":261,"../internals/is-object":263,"../internals/well-known-symbol":314}],228:[function(e,r,t){var n=e("../internals/an-object");r.exports=function(i,u,l,m){try{return m?u(n(l)[0],l[1]):u(l)}catch(g){var p=i.return;throw p!==void 0&&n(p.call(i)),g}}},{"../internals/an-object":223}],229:[function(e,r,t){var n=e("../internals/well-known-symbol")("iterator"),i=!1;try{var u=0,l={next:function(){return{done:!!u++}},return:function(){i=!0}};l[n]=function(){return this},Array.from(l,function(){throw 2})}catch(m){}r.exports=function(m,p){if(!p&&!i)return!1;var g=!1;try{var v={};v[n]=function(){return{next:function(){return{done:g=!0}}}},m(v)}catch(c){}return g}},{"../internals/well-known-symbol":314}],230:[function(e,r,t){var n={}.toString;r.exports=function(i){return n.call(i).slice(8,-1)}},{}],231:[function(e,r,t){var n=e("../internals/to-string-tag-support"),i=e("../internals/classof-raw"),u=e("../internals/well-known-symbol")("toStringTag"),l=i(function(){return arguments}())=="Arguments";r.exports=n?i:function(m){var p,g,v;return m===void 0?"Undefined":m===null?"Null":typeof(g=function(c,o){try{return c[o]}catch(a){}}(p=Object(m),u))=="string"?g:l?i(p):(v=i(p))=="Object"&&typeof p.callee=="function"?"Arguments":v}},{"../internals/classof-raw":230,"../internals/to-string-tag-support":310,"../internals/well-known-symbol":314}],232:[function(e,r,t){var n=e("../internals/has"),i=e("../internals/own-keys"),u=e("../internals/object-get-own-property-descriptor"),l=e("../internals/object-define-property");r.exports=function(m,p){for(var g=i(p),v=l.f,c=u.f,o=0;o=74)&&(n=l.match(/Chrome\/(\d+)/))&&(i=n[1]),r.exports=i&&+i},{"../internals/engine-user-agent":243,"../internals/global":251}],245:[function(e,r,t){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],246:[function(e,r,t){var n=e("../internals/global"),i=e("../internals/object-get-own-property-descriptor").f,u=e("../internals/create-non-enumerable-property"),l=e("../internals/redefine"),m=e("../internals/set-global"),p=e("../internals/copy-constructor-properties"),g=e("../internals/is-forced");r.exports=function(v,c){var o,a,s,d,h,y=v.target,b=v.global,w=v.stat;if(o=b?n:w?n[y]||m(y,{}):(n[y]||{}).prototype)for(a in c){if(d=c[a],s=v.noTargetGet?(h=i(o,a))&&h.value:o[a],!g(b?a:y+(w?".":"#")+a,v.forced)&&s!==void 0){if(typeof d==typeof s)continue;p(d,s)}(v.sham||s&&s.sham)&&u(d,"sham",!0),l(o,a,d,v)}}},{"../internals/copy-constructor-properties":232,"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/is-forced":262,"../internals/object-get-own-property-descriptor":279,"../internals/redefine":294,"../internals/set-global":296}],247:[function(e,r,t){r.exports=function(n){try{return!!n()}catch(i){return!0}}},{}],248:[function(e,r,t){var n=e("../internals/a-function");r.exports=function(i,u,l){if(n(i),u===void 0)return i;switch(l){case 0:return function(){return i.call(u)};case 1:return function(m){return i.call(u,m)};case 2:return function(m,p){return i.call(u,m,p)};case 3:return function(m,p,g){return i.call(u,m,p,g)}}return function(){return i.apply(u,arguments)}}},{"../internals/a-function":219}],249:[function(e,r,t){var n=e("../internals/path"),i=e("../internals/global"),u=function(l){return typeof l=="function"?l:void 0};r.exports=function(l,m){return arguments.length<2?u(n[l])||u(i[l]):n[l]&&n[l][m]||i[l]&&i[l][m]}},{"../internals/global":251,"../internals/path":290}],250:[function(e,r,t){var n=e("../internals/classof"),i=e("../internals/iterators"),u=e("../internals/well-known-symbol")("iterator");r.exports=function(l){if(l!=null)return l[u]||l["@@iterator"]||i[n(l)]}},{"../internals/classof":231,"../internals/iterators":268,"../internals/well-known-symbol":314}],251:[function(e,r,t){(function(n){var i=function(u){return u&&u.Math==Math&&u};r.exports=i(typeof globalThis=="object"&&globalThis)||i(typeof window=="object"&&window)||i(typeof self=="object"&&self)||i(typeof n=="object"&&n)||Function("return this")()}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],252:[function(e,r,t){var n={}.hasOwnProperty;r.exports=function(i,u){return n.call(i,u)}},{}],253:[function(e,r,t){r.exports={}},{}],254:[function(e,r,t){var n=e("../internals/global");r.exports=function(i,u){var l=n.console;l&&l.error&&(arguments.length===1?l.error(i):l.error(i,u))}},{"../internals/global":251}],255:[function(e,r,t){var n=e("../internals/get-built-in");r.exports=n("document","documentElement")},{"../internals/get-built-in":249}],256:[function(e,r,t){var n=e("../internals/descriptors"),i=e("../internals/fails"),u=e("../internals/document-create-element");r.exports=!n&&!i(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":240,"../internals/document-create-element":241,"../internals/fails":247}],257:[function(e,r,t){var n=e("../internals/fails"),i=e("../internals/classof-raw"),u="".split;r.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(l){return i(l)=="String"?u.call(l,""):Object(l)}:Object},{"../internals/classof-raw":230,"../internals/fails":247}],258:[function(e,r,t){var n=e("../internals/shared-store"),i=Function.toString;typeof n.inspectSource!="function"&&(n.inspectSource=function(u){return i.call(u)}),r.exports=n.inspectSource},{"../internals/shared-store":300}],259:[function(e,r,t){var n,i,u,l=e("../internals/native-weak-map"),m=e("../internals/global"),p=e("../internals/is-object"),g=e("../internals/create-non-enumerable-property"),v=e("../internals/has"),c=e("../internals/shared-key"),o=e("../internals/hidden-keys"),a=m.WeakMap;if(l){var s=new a,d=s.get,h=s.has,y=s.set;n=function(w,x){return y.call(s,w,x),x},i=function(w){return d.call(s,w)||{}},u=function(w){return h.call(s,w)}}else{var b=c("state");o[b]=!0,n=function(w,x){return g(w,b,x),x},i=function(w){return v(w,b)?w[b]:{}},u=function(w){return v(w,b)}}r.exports={set:n,get:i,has:u,enforce:function(w){return u(w)?i(w):n(w,{})},getterFor:function(w){return function(x){var _;if(!p(x)||(_=i(x)).type!==w)throw TypeError("Incompatible receiver, "+w+" required");return _}}}},{"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/has":252,"../internals/hidden-keys":253,"../internals/is-object":263,"../internals/native-weak-map":272,"../internals/shared-key":299}],260:[function(e,r,t){var n=e("../internals/well-known-symbol"),i=e("../internals/iterators"),u=n("iterator"),l=Array.prototype;r.exports=function(m){return m!==void 0&&(i.Array===m||l[u]===m)}},{"../internals/iterators":268,"../internals/well-known-symbol":314}],261:[function(e,r,t){var n=e("../internals/classof-raw");r.exports=Array.isArray||function(i){return n(i)=="Array"}},{"../internals/classof-raw":230}],262:[function(e,r,t){var n=e("../internals/fails"),i=/#|\.prototype\./,u=function(v,c){var o=m[l(v)];return o==g||o!=p&&(typeof c=="function"?n(c):!!c)},l=u.normalize=function(v){return String(v).replace(i,".").toLowerCase()},m=u.data={},p=u.NATIVE="N",g=u.POLYFILL="P";r.exports=u},{"../internals/fails":247}],263:[function(e,r,t){r.exports=function(n){return typeof n=="object"?n!==null:typeof n=="function"}},{}],264:[function(e,r,t){r.exports=!1},{}],265:[function(e,r,t){var n=e("../internals/is-object"),i=e("../internals/classof-raw"),u=e("../internals/well-known-symbol")("match");r.exports=function(l){var m;return n(l)&&((m=l[u])!==void 0?!!m:i(l)=="RegExp")}},{"../internals/classof-raw":230,"../internals/is-object":263,"../internals/well-known-symbol":314}],266:[function(e,r,t){var n=e("../internals/an-object"),i=e("../internals/is-array-iterator-method"),u=e("../internals/to-length"),l=e("../internals/function-bind-context"),m=e("../internals/get-iterator-method"),p=e("../internals/call-with-safe-iteration-closing"),g=function(v,c){this.stopped=v,this.result=c};(r.exports=function(v,c,o,a,s){var d,h,y,b,w,x,_,C=l(c,o,a?2:1);if(s)d=v;else{if(typeof(h=m(v))!="function")throw TypeError("Target is not iterable");if(i(h)){for(y=0,b=u(v.length);b>y;y++)if((w=a?C(n(_=v[y])[0],_[1]):C(v[y]))&&w instanceof g)return w;return new g(!1)}d=h.call(v)}for(x=d.next;!(_=x.call(d)).done;)if(typeof(w=p(d,C,_.value,a))=="object"&&w&&w instanceof g)return w;return new g(!1)}).stop=function(v){return new g(!0,v)}},{"../internals/an-object":223,"../internals/call-with-safe-iteration-closing":228,"../internals/function-bind-context":248,"../internals/get-iterator-method":250,"../internals/is-array-iterator-method":260,"../internals/to-length":307}],267:[function(e,r,t){"use strict";var n,i,u,l=e("../internals/object-get-prototype-of"),m=e("../internals/create-non-enumerable-property"),p=e("../internals/has"),g=e("../internals/well-known-symbol"),v=e("../internals/is-pure"),c=g("iterator"),o=!1;[].keys&&("next"in(u=[].keys())?(i=l(l(u)))!==Object.prototype&&(n=i):o=!0),n==null&&(n={}),v||p(n,c)||m(n,c,function(){return this}),r.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:o}},{"../internals/create-non-enumerable-property":236,"../internals/has":252,"../internals/is-pure":264,"../internals/object-get-prototype-of":283,"../internals/well-known-symbol":314}],268:[function(e,r,t){arguments[4][253][0].apply(t,arguments)},{dup:253}],269:[function(e,r,t){var n,i,u,l,m,p,g,v,c=e("../internals/global"),o=e("../internals/object-get-own-property-descriptor").f,a=e("../internals/classof-raw"),s=e("../internals/task").set,d=e("../internals/engine-is-ios"),h=c.MutationObserver||c.WebKitMutationObserver,y=c.process,b=c.Promise,w=a(y)=="process",x=o(c,"queueMicrotask"),_=x&&x.value;_||(n=function(){var C,R;for(w&&(C=y.domain)&&C.exit();i;){R=i.fn,i=i.next;try{R()}catch(P){throw i?l():u=void 0,P}}u=void 0,C&&C.enter()},w?l=function(){y.nextTick(n)}:h&&!d?(m=!0,p=document.createTextNode(""),new h(n).observe(p,{characterData:!0}),l=function(){p.data=m=!m}):b&&b.resolve?(g=b.resolve(void 0),v=g.then,l=function(){v.call(g,n)}):l=function(){s.call(c,n)}),r.exports=_||function(C){var R={fn:C,next:void 0};u&&(u.next=R),i||(i=R,l()),u=R}},{"../internals/classof-raw":230,"../internals/engine-is-ios":242,"../internals/global":251,"../internals/object-get-own-property-descriptor":279,"../internals/task":303}],270:[function(e,r,t){var n=e("../internals/global");r.exports=n.Promise},{"../internals/global":251}],271:[function(e,r,t){var n=e("../internals/fails");r.exports=!!Object.getOwnPropertySymbols&&!n(function(){return!String(Symbol())})},{"../internals/fails":247}],272:[function(e,r,t){var n=e("../internals/global"),i=e("../internals/inspect-source"),u=n.WeakMap;r.exports=typeof u=="function"&&/native code/.test(i(u))},{"../internals/global":251,"../internals/inspect-source":258}],273:[function(e,r,t){"use strict";var n=e("../internals/a-function"),i=function(u){var l,m;this.promise=new u(function(p,g){if(l!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");l=p,m=g}),this.resolve=n(l),this.reject=n(m)};r.exports.f=function(u){return new i(u)}},{"../internals/a-function":219}],274:[function(e,r,t){var n=e("../internals/is-regexp");r.exports=function(i){if(n(i))throw TypeError("The method doesn't accept regular expressions");return i}},{"../internals/is-regexp":265}],275:[function(e,r,t){"use strict";var n=e("../internals/descriptors"),i=e("../internals/fails"),u=e("../internals/object-keys"),l=e("../internals/object-get-own-property-symbols"),m=e("../internals/object-property-is-enumerable"),p=e("../internals/to-object"),g=e("../internals/indexed-object"),v=Object.assign,c=Object.defineProperty;r.exports=!v||i(function(){if(n&&v({b:1},v(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var o={},a={},s=Symbol();return o[s]=7,"abcdefghijklmnopqrst".split("").forEach(function(d){a[d]=d}),v({},o)[s]!=7||u(v({},a)).join("")!="abcdefghijklmnopqrst"})?function(o,a){for(var s=p(o),d=arguments.length,h=1,y=l.f,b=m.f;d>h;)for(var w,x=g(arguments[h++]),_=y?u(x).concat(y(x)):u(x),C=_.length,R=0;C>R;)w=_[R++],n&&!b.call(x,w)||(s[w]=x[w]);return s}:v},{"../internals/descriptors":240,"../internals/fails":247,"../internals/indexed-object":257,"../internals/object-get-own-property-symbols":282,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/to-object":308}],276:[function(e,r,t){var n,i=e("../internals/an-object"),u=e("../internals/object-define-properties"),l=e("../internals/enum-bug-keys"),m=e("../internals/hidden-keys"),p=e("../internals/html"),g=e("../internals/document-create-element"),v=e("../internals/shared-key"),c=v("IE_PROTO"),o=function(){},a=function(d){return"