import{y as Vt,z as Bi}from"./index-0ea73789.js";import{c as Do}from"./_commonjs-dynamic-modules-302442b1.js";import{g as Zv}from"./url-de9b02cf.js";class Xi{constructor(k,e=""){typeof k=="string"?(this.el=document.createElement(k),this.el.className=e):this.el=k,this.data={}}data(k,e){return e!==void 0?(this.data[k]=e,this):this.data[k]}on(k,e){const[x,..._]=k.split(".");let u=x;return u==="mousewheel"&&/Firefox/i.test(window.navigator.userAgent)&&(u="DOMMouseScroll"),this.el.addEventListener(u,m=>{e(m);for(let g=0;g<_.length;g+=1){const b=_[g];if(b==="left"&&m.button!==0||b==="right"&&m.button!==2)return;b==="stop"&&m.stopPropagation()}}),this}offset(k){if(k!==void 0)return Object.keys(k).forEach(m=>{this.css(m,`${k[m]}px`)}),this;const{offsetTop:e,offsetLeft:x,offsetHeight:_,offsetWidth:u}=this.el;return{top:e,left:x,height:_,width:u}}scroll(k){const{el:e}=this;return k!==void 0&&(k.left!==void 0&&(e.scrollLeft=k.left),k.top!==void 0&&(e.scrollTop=k.top)),{left:e.scrollLeft,top:e.scrollTop}}box(){return this.el.getBoundingClientRect()}parent(){return new Xi(this.el.parentNode)}children(...k){return arguments.length===0?this.el.childNodes:(k.forEach(e=>this.child(e)),this)}removeChild(k){this.el.removeChild(k)}child(k){let e=k;return typeof k=="string"?e=document.createTextNode(k):k instanceof Xi&&(e=k.el),this.el.appendChild(e),this}contains(k){return this.el.contains(k)}className(k){return k!==void 0?(this.el.className=k,this):this.el.className}addClass(k){return this.el.classList.add(k),this}hasClass(k){return this.el.classList.contains(k)}removeClass(k){return this.el.classList.remove(k),this}toggle(k="active"){return this.toggleClass(k)}toggleClass(k){return this.el.classList.toggle(k)}active(k=!0,e="active"){return k?this.addClass(e):this.removeClass(e),this}checked(k=!0){return this.active(k,"checked"),this}disabled(k=!0){return k?this.addClass("disabled"):this.removeClass("disabled"),this}attr(k,e){if(e!==void 0)this.el.setAttribute(k,e);else{if(typeof k=="string")return this.el.getAttribute(k);Object.keys(k).forEach(x=>{this.el.setAttribute(x,k[x])})}return this}removeAttr(k){return this.el.removeAttribute(k),this}html(k){return k!==void 0?(this.el.innerHTML=k,this):this.el.innerHTML}val(k){return k!==void 0?(this.el.value=k,this):this.el.value}focus(){this.el.focus()}cssRemoveKeys(...k){return k.forEach(e=>this.el.style.removeProperty(e)),this}css(k,e){return e===void 0&&typeof k!="string"?(Object.keys(k).forEach(x=>{this.el.style[x]=k[x]}),this):e!==void 0?(this.el.style[k]=e,this):this.el.style[k]}computedStyle(){return window.getComputedStyle(this.el,null)}show(){return this.css("display","block"),this}hide(){return this.css("display","none"),this}}const We=(X,k="")=>new Xi(X,k),Ei=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function rc(X){let k="",e=X;for(;e>=Ei.length;)e/=Ei.length,e-=1,k+=Ei[parseInt(e,10)%Ei.length];const x=X%Ei.length;return k+=Ei[x],k}function Yv(X){let k=0;for(let e=0;e="0"&&X.charAt(x)<="9"?e+=X.charAt(x):k+=X.charAt(x);return[Yv(k),parseInt(e,10)-1]}function hi(X,k){return`${rc(X)}${k+1}`}function Xa(X,k,e,x=()=>!0){if(k===0&&e===0)return X;const[_,u]=Ti(X);return x(_,u)?hi(_+k,u+e):X}class kr{constructor(k,e,x,_,u=0,m=0){this.sri=k,this.sci=e,this.eri=x,this.eci=_,this.w=u,this.h=m}set(k,e,x,_){this.sri=k,this.sci=e,this.eri=x,this.eci=_}multiple(){return this.eri-this.sri>0||this.eci-this.sci>0}includes(...k){let[e,x]=[0,0];k.length===1?[x,e]=Ti(k[0]):k.length===2&&([e,x]=k);const{sri:_,sci:u,eri:m,eci:g}=this;return _<=e&&e<=m&&u<=x&&x<=g}each(k,e=()=>!0){const{sri:x,sci:_,eri:u,eci:m}=this;for(let g=x;g<=u;g+=1)if(e(g))for(let b=_;b<=m;b+=1)k(g,b)}contains(k){return this.sri<=k.sri&&this.sci<=k.sci&&this.eri>=k.eri&&this.eci>=k.eci}within(k){return this.sri>=k.sri&&this.sci>=k.sci&&this.eri<=k.eri&&this.eci<=k.eci}disjoint(k){return this.sri>k.eri||this.sci>k.eci||k.sri>this.eri||k.sci>this.eci}intersects(k){return this.sri<=k.eri&&this.sci<=k.eci&&k.sri<=this.eri&&k.sci<=this.eci}union(k){const{sri:e,sci:x,eri:_,eci:u}=this;return new kr(k.sri_?k.eri:_,k.eci>u?k.eci:u)}difference(k){const e=[],x=(h,l,d,s)=>{e.push(new kr(h,l,d,s))},{sri:_,sci:u,eri:m,eci:g}=this,b=k.sri-_,w=k.sci-u,f=m-k.eri,y=g-k.eci;return b>0?(x(_,u,k.sri-1,g),f>0?(x(k.eri+1,u,m,g),w>0&&x(k.sri,u,k.eri,k.sci-1),y>0&&x(k.sri,k.eci+1,k.eri,g)):(w>0&&x(k.sri,u,m,k.sci-1),y>0&&x(k.sri,k.eci+1,m,g))):f>0&&(x(k.eri+1,u,m,g),w>0&&x(_,u,k.eri,k.sci-1),y>0&&x(_,k.eci+1,k.eri,g)),w>0?(x(_,u,m,k.sci-1),y>0?(x(_,k.eri+1,m,g),b>0&&x(_,k.sci,k.sri-1,k.eci),f>0&&x(k.sri+1,k.sci,m,k.eci)):(b>0&&x(_,k.sci,k.sri-1,g),f>0&&x(k.sri+1,k.sci,m,g))):y>0&&(x(m,k.eci+1,m,g),b>0&&x(_,u,k.sri-1,k.eci),f>0&&x(k.eri+1,u,m,k.eci)),e}size(){return[this.eri-this.sri+1,this.eci-this.sci+1]}toString(){const{sri:k,sci:e,eri:x,eci:_}=this;let u=hi(e,k);return this.multiple()&&(u=`${u}:${hi(_,x)}`),u}clone(){const{sri:k,sci:e,eri:x,eci:_,w:u,h:m}=this;return new kr(k,e,x,_,u,m)}equals(k){return this.eri===k.eri&&this.eci===k.eci&&this.sri===k.sri&&this.sci===k.sci}static valueOf(k){const e=k.split(":"),[x,_]=Ti(e[0]);let[u,m]=[_,x];return e.length>1&&([m,u]=Ti(e[1])),new kr(_,x,u,m)}}let Jv=class{constructor(){this.range=new kr(0,0,0,0),this.ri=0,this.ci=0}multiple(){return this.range.multiple()}setIndexes(k,e){this.ri=k,this.ci=e}size(){return this.range.size()}};class Qv{constructor(){this.x=0,this.y=0,this.ri=0,this.ci=0}}class qv{constructor(){this.undoItems=[],this.redoItems=[]}add(k){this.undoItems.push(JSON.stringify(k)),this.redoItems=[]}canUndo(){return this.undoItems.length>0}canRedo(){return this.redoItems.length>0}undo(k,e){const{undoItems:x,redoItems:_}=this;this.canUndo()&&(_.push(JSON.stringify(k)),e(JSON.parse(x.pop())))}redo(k,e){const{undoItems:x,redoItems:_}=this;this.canRedo()&&(x.push(JSON.stringify(k)),e(JSON.parse(_.pop())))}}class em{constructor(){this.range=null,this.state="clear"}copy(k){return this.range=k,this.state="copy",this}cut(k){return this.range=k,this.state="cut",this}isCopy(){return this.state==="copy"}isCut(){return this.state==="cut"}isClear(){return this.state==="clear"}clear(){this.range=null,this.state="clear"}}class Sl{constructor(k,e,x){this.ci=k,this.operator=e,this.value=x}set(k,e){this.operator=k,this.value=e}includes(k){const{operator:e,value:x}=this;return e==="all"?!0:e==="in"?x.includes(k):!1}vlength(){const{operator:k,value:e}=this;return k==="in"?e.length:0}getData(){const{ci:k,operator:e,value:x}=this;return{ci:k,operator:e,value:x}}}class kl{constructor(k,e){this.ci=k,this.order=e}asc(){return this.order==="asc"}desc(){return this.order==="desc"}}class tm{constructor(){this.ref=null,this.filters=[],this.sort=null}setData({ref:k,filters:e,sort:x}){k!=null&&(this.ref=k,this.filters=e.map(_=>new Sl(_.ci,_.operator,_.value)),x&&(this.sort=new kl(x.ci,x.order)))}getData(){if(this.active()){const{ref:k,filters:e,sort:x}=this;return{ref:k,filters:e.map(_=>_.getData()),sort:x}}return{}}addFilter(k,e,x){const _=this.getFilter(k);_==null?this.filters.push(new Sl(k,e,x)):_.set(e,x)}setSort(k,e){this.sort=e?new kl(k,e):null}includes(k,e){return this.active()?this.hrange().includes(k,e):!1}getSort(k){const{sort:e}=this;return e&&e.ci===k?e:null}getFilter(k){const{filters:e}=this;for(let x=0;x!e.within(k))}getFirstIncludes(k,e){for(let x=0;xe.intersects(k)))}intersects(k){for(let e=0;e{x.intersects(e)&&(e=x.union(e))}),e}add(k){this.deleteWithin(k),this._.push(k)}shift(k,e,x,_){this._.forEach(u=>{const{sri:m,sci:g,eri:b,eci:w}=u,f=u;k==="row"?m>=e?(f.sri+=x,f.eri+=x):m=e?(f.sci+=x,f.eci+=x):g{const u=_;u.within(k)&&(u.eri+=e,u.sri+=e,u.sci+=x,u.eci+=x)})}setData(k){return this._=k.map(e=>kr.valueOf(e)),this}getData(){return this._.map(k=>k.toString())}}function rm(X){return JSON.parse(JSON.stringify(X))}const nc=(X={},...k)=>(k.forEach(e=>{Object.keys(e).forEach(x=>{const _=e[x];typeof _=="string"||typeof _=="number"||typeof _=="boolean"?X[x]=_:typeof _!="function"&&!Array.isArray(_)&&_ instanceof Object?(X[x]=X[x]||{},nc(X[x],_)):X[x]=_})}),X);function uf(X,k){const e=Object.keys(X);if(e.length!==Object.keys(k).length)return!1;for(let x=0;xe)=>{let e=0,x=0;return Object.keys(X).forEach(_=>{e+=k(X[_],_),x+=1}),[e,x]};function im(X,k){const e=X[`${k}`];return delete X[`${k}`],e}function am(X,k,e,x,_,u){let m=e,g=x,b=X;for(;b_);b+=1)g=u(b),m+=g;return[b,m-g,g]}function om(X,k,e){let x=0;for(let _=X;_5?g.toFixed(2):g;return g.toFixed(Math.max(x,_))}const fn={cloneDeep:rm,merge:(...X)=>nc({},...X),equals:uf,arrayEquals:fm,sum:nm,rangeEach:sm,rangeSum:om,rangeReduceIf:am,deleteProperty:im,numberCalc:ji};class um{constructor({len:k,height:e}){this._={},this.len=k,this.height=e}getHeight(k){if(this.isHide(k))return 0;const e=this.get(k);return e&&e.height?e.height:this.height}setHeight(k,e){const x=this.getOrNew(k);x.height=e}unhide(k){let e=k;for(;e>0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}isHide(k){const e=this.get(k);return e&&e.hide}setHide(k,e){const x=this.getOrNew(k);e===!0?x.hide=!0:delete x.hide}setStyle(k,e){const x=this.getOrNew(k);x.style=e}sumHeight(k,e,x){return fn.rangeSum(k,e,_=>x&&x.has(_)?0:this.getHeight(_))}totalHeight(){return this.sumHeight(0,this.len)}get(k){return this._[k]}getOrNew(k){return this._[k]=this._[k]||{cells:{}},this._[k]}getCell(k,e){const x=this.get(k);return x!==void 0&&x.cells!==void 0&&x.cells[e]!==void 0?x.cells[e]:null}getCellMerge(k,e){const x=this.getCell(k,e);return x&&x.merge?x.merge:[0,0]}getCellOrNew(k,e){const x=this.getOrNew(k);return x.cells[e]=x.cells[e]||{},x.cells[e]}setCell(k,e,x,_="all"){const u=this.getOrNew(k);_==="all"?u.cells[e]=x:_==="text"?(u.cells[e]=u.cells[e]||{},u.cells[e].text=x.text):_==="format"&&(u.cells[e]=u.cells[e]||{},u.cells[e].style=x.style,x.merge&&(u.cells[e].merge=x.merge))}setCellText(k,e,x){const _=this.getCellOrNew(k,e);_.editable!==!1&&(_.text=x)}copyPaste(k,e,x,_=!1,u=()=>{}){const{sri:m,sci:g,eri:b,eci:w}=k,f=e.sri,y=e.sci,h=e.eri,l=e.eci,[d,s]=k.size(),[v,c]=e.size();let a=!0,r=0;(h0){const{text:N}=C;let L=o-y+(n-f)+2;if(a||(L-=r+1),N[0]==="=")C.text=N.replace(/[a-zA-Z]{1,3}\d+/g,F=>{let[M,D]=[0,0];return m===f?M=L-1:D=L-1,/^\d+$/.test(F)?F:Xa(F,M,D)});else if(d<=1&&s>1&&(f>b||h1&&(y>w||l{this.eachCells(_,u=>{let m=parseInt(_,10),g=parseInt(u,10);k.includes(_,u)&&(m=e.sri+(m-k.sri),g=e.sci+(g-k.sci)),x[m]=x[m]||{cells:{}},x[m].cells[g]=this._[_].cells[u]})}),this._=x}paste(k,e){if(k.length<=0)return;const{sri:x,sci:_}=e;k.forEach((u,m)=>{const g=x+m;u.forEach((b,w)=>{const f=_+w;this.setCellText(g,f,b)})})}insert(k,e=1){const x={};this.each((_,u)=>{let m=parseInt(_,10);m>=k&&(m+=e,this.eachCells(_,(g,b)=>{b.text&&b.text[0]==="="&&(b.text=b.text.replace(/[a-zA-Z]{1,3}\d+/g,w=>Xa(w,0,e,(f,y)=>y>=k)))})),x[m]=u}),this._=x,this.len+=e}delete(k,e){const x=e-k+1,_={};this.each((u,m)=>{const g=parseInt(u,10);ge&&(_[g-x]=m,this.eachCells(u,(b,w)=>{w.text&&w.text[0]==="="&&(w.text=w.text.replace(/[a-zA-Z]{1,3}\d+/g,f=>Xa(f,0,-x,(y,h)=>h>e)))}))}),this._=_,this.len-=x}insertColumn(k,e=1){this.each((x,_)=>{const u={};this.eachCells(x,(m,g)=>{let b=parseInt(m,10);b>=k&&(b+=e,g.text&&g.text[0]==="="&&(g.text=g.text.replace(/[a-zA-Z]{1,3}\d+/g,w=>Xa(w,e,0,f=>f>=k)))),u[b]=g}),_.cells=u})}deleteColumn(k,e){const x=e-k+1;this.each((_,u)=>{const m={};this.eachCells(_,(g,b)=>{const w=parseInt(g,10);we&&(m[w-x]=b,b.text&&b.text[0]==="="&&(b.text=b.text.replace(/[a-zA-Z]{1,3}\d+/g,f=>Xa(f,-x,0,y=>y>e))))}),u.cells=m})}deleteCells(k,e="all"){k.each((x,_)=>{this.deleteCell(x,_,e)})}deleteCell(k,e,x="all"){const _=this.get(k);if(_!==null){const u=this.getCell(k,e);u!==null&&u.editable!==!1&&(x==="all"?delete _.cells[e]:x==="text"?(u.text&&delete u.text,u.value&&delete u.value):x==="format"?(u.style!==void 0&&delete u.style,u.merge&&delete u.merge):x==="merge"&&u.merge&&delete u.merge)}}maxCell(){const k=Object.keys(this._),e=k[k.length-1],x=this._[e];if(x){const{cells:_}=x,u=Object.keys(_),m=u[u.length-1];return[parseInt(e,10),parseInt(m,10)]}return[0,0]}each(k){Object.entries(this._).forEach(([e,x])=>{k(e,x)})}eachCells(k,e){this._[k]&&this._[k].cells&&Object.entries(this._[k].cells).forEach(([x,_])=>{e(x,_)})}setData(k){k.len&&(this.len=k.len,delete k.len),this._=k}getData(){const{len:k}=this;return Object.assign({len:k},this._)}}class lm{constructor({len:k,width:e,indexWidth:x,minWidth:_}){this._={},this.len=k,this.width=e,this.indexWidth=x,this.minWidth=_}setData(k){k.len&&(this.len=k.len,delete k.len),this._=k}getData(){const{len:k}=this;return Object.assign({len:k},this._)}getWidth(k){if(this.isHide(k))return 0;const e=this._[k];return e&&e.width?e.width:this.width}getOrNew(k){return this._[k]=this._[k]||{},this._[k]}setWidth(k,e){const x=this.getOrNew(k);x.width=e}unhide(k){let e=k;for(;e>0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}isHide(k){const e=this._[k];return e&&e.hide}setHide(k,e){const x=this.getOrNew(k);e===!0?x.hide=!0:delete x.hide}setStyle(k,e){const x=this.getOrNew(k);x.style=e}sumWidth(k,e){return fn.rangeSum(k,e,x=>this.getWidth(x))}totalWidth(){return this.sumWidth(0,this.len)}}const cm={toolbar:{undo:"Undo",redo:"Redo",print:"Print",paintformat:"Paint format",clearformat:"Clear format",format:"Format",fontName:"Font",fontSize:"Font size",fontBold:"Font bold",fontItalic:"Font italic",underline:"Underline",strike:"Strike",color:"Text color",bgcolor:"Fill color",border:"Borders",merge:"Merge cells",align:"Horizontal align",valign:"Vertical align",textwrap:"Text wrapping",freeze:"Freeze cell",autofilter:"Filter",formula:"Functions",more:"More"},contextmenu:{copy:"Copy",cut:"Cut",paste:"Paste",pasteValue:"Paste values only",pasteFormat:"Paste format only",hide:"Hide",insertRow:"Insert row",insertColumn:"Insert column",deleteSheet:"Delete",deleteRow:"Delete row",deleteColumn:"Delete column",deleteCell:"Delete cell",deleteCellText:"Delete cell text",validation:"Data validations",cellprintable:"Enable export",cellnonprintable:"Disable export",celleditable:"Enable editing",cellnoneditable:"Disable editing"},print:{size:"Paper size",orientation:"Page orientation",orientations:["Landscape","Portrait"]},format:{normal:"Normal",text:"Plain Text",number:"Number",percent:"Percent",rmb:"RMB",usd:"USD",eur:"EUR",date:"Date",time:"Time",datetime:"Date time",duration:"Duration"},formula:{sum:"Sum",average:"Average",max:"Max",min:"Min",_if:"IF",and:"AND",or:"OR",concat:"Concat"},validation:{required:"it must be required",notMatch:"it not match its validation rule",between:"it is between {} and {}",notBetween:"it is not between {} and {}",notIn:"it is not in list",equal:"it equal to {}",notEqual:"it not equal to {}",lessThan:"it less than {}",lessThanEqual:"it less than or equal to {}",greaterThan:"it greater than {}",greaterThanEqual:"it greater than or equal to {}"},error:{pasteForMergedCell:"Unable to do this for merged cells"},calendar:{weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},button:{next:"Next",cancel:"Cancel",remove:"Remove",save:"Save",ok:"OK"},sort:{desc:"Sort Z -> A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}};let lf=["en"];const ic={en:cm};function Ol(X,k){if(k)for(const e of lf){if(!k[e])break;let x=k[e];const _=X.match(/(?:\\.|[^.])+/g);for(let u=0;u<_.length;u+=1){const m=_[u],g=x[m];if(!g)break;if(u===_.length-1)return g;x=g}}}function Cr(X){let k=Ol(X,ic);return!k&&window&&window.x_spreadsheet&&window.x_spreadsheet.$messages&&(k=Ol(X,window.x_spreadsheet.$messages)),k||""}function Jt(X){return()=>Cr(X)}function ac(X,k,e=!1){e?lf=[X]:lf.unshift(X),k&&(ic[X]=k)}const El={phone:/^[1-9]\d{10}$/,email:/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/};function Un(X,k,...e){let x="";return X||(x=Cr(`validation.${k}`,...e)),[X,x]}class oc{constructor(k,e,x,_){this.required=e,this.value=x,this.type=k,this.operator=_,this.message=""}parseValue(k){const{type:e}=this;return e==="date"?new Date(k):e==="number"?Number(k):k}equals(k){let e=this.type===k.type&&this.required===k.required&&this.operator===k.operator;return e&&(Array.isArray(this.value)?e=fn.arrayEquals(this.value,k.value):e=this.value===k.value),e}values(){return this.value.split(",")}validate(k){const{required:e,operator:x,value:_,type:u}=this;if(e&&/^\s*$/.test(k))return Un(!1,"required");if(/^\s*$/.test(k))return[!0];if(El[u]&&!El[u].test(k))return Un(!1,"notMatch");if(u==="list")return Un(this.values().includes(k),"notIn");if(x){const m=this.parseValue(k);if(x==="be"){const[g,b]=_;return Un(m>=this.parseValue(g)&&m<=this.parseValue(b),"between",g,b)}if(x==="nbe"){const[g,b]=_;return Un(mthis.parseValue(b),"notBetween",g,b)}if(x==="eq")return Un(m===this.parseValue(_),"equal",_);if(x==="neq")return Un(m!==this.parseValue(_),"notEqual",_);if(x==="lt")return Un(mthis.parseValue(_),"greaterThan",_);if(x==="gte")return Un(m>=this.parseValue(_),"greaterThanEqual",_)}return[!0]}}class Vo{constructor(k,e,x){this.refs=e,this.mode=k,this.validator=x}includes(k,e){const{refs:x}=this;for(let _=0;_{const _=kr.valueOf(x);_.intersects(k)?_.difference(k).forEach(m=>e.push(m.toString())):e.push(x)}),this.refs=e}getData(){const{refs:k,mode:e,validator:x}=this,{type:_,required:u,operator:m,value:g}=x;return{refs:k,mode:e,type:_,required:u,operator:m,value:g}}static valueOf({refs:k,mode:e,type:x,required:_,operator:u,value:m}){return new Vo(e,k,new oc(x,_,m,u))}}class hm{constructor(){this._=[],this.errors=new Map}getError(k,e){return this.errors.get(`${k}_${e}`)}validate(k,e,x){const _=this.get(k,e),u=`${k}_${e}`,{errors:m}=this;if(_!==null){const[g,b]=_.validator.validate(x);g?m.delete(u):m.set(u,b)}else m.delete(u);return!0}add(k,e,{type:x,required:_,value:u,operator:m}){const g=new oc(x,_,u,m),b=this.getByValidator(g);b!==null?b.addRef(e):this._.push(new Vo(k,[e],g))}getByValidator(k){for(let e=0;e{e.remove(k)})}each(k){this._.forEach(e=>k(e))}getData(){return this._.filter(k=>k.refs.length>0).map(k=>k.getData())}setData(k){this._=k.map(e=>Vo.valueOf(e))}}const dm={mode:"edit",view:{height:()=>document.documentElement.clientHeight,width:()=>document.documentElement.clientWidth},showGrid:!0,showToolbar:!0,showContextmenu:!0,showBottomBar:!0,row:{len:100,height:25},col:{len:26,width:100,indexWidth:60,minWidth:60},style:{bgcolor:"#ffffff",align:"left",valign:"middle",textwrap:!1,strike:!1,underline:!1,color:"#0a0a0a",font:{name:"Arial",size:10,bold:!1,italic:!1},format:"normal"}},pm=41,ym=41,Tl=(X,k)=>Object.prototype.hasOwnProperty.call(X,k);function Rl(X,k,e=()=>{}){const{merges:x}=this,_=k.clone(),[u,m]=X.size(),[g,b]=k.size();return u>g&&(_.eri=k.sri+u-1),m>b&&(_.eci=k.sci+m-1),x.intersects(_)?(e(Cr("error.pasteForMergedCell")),!1):!0}function Cl(X,k,e,x=!1){const{rows:_,merges:u}=this;(e==="all"||e==="format")&&(_.deleteCells(k,e),u.deleteWithin(k)),_.copyPaste(X,k,e,x,(m,g,b)=>{if(b&&b.merge){const[w,f]=b.merge;if(w<=0&&f<=0)return;u.add(new kr(m,g,m+w,g+f))}})}function vm(X,k){const{clipboard:e,rows:x,merges:_}=this;x.cutPaste(X,k),_.move(X,k.sri-X.sri,k.sci-X.sci),e.clear()}function pa(X,k,e){const{styles:x,rows:_}=this,u=_.getCellOrNew(X,k);let m={};u.style!==void 0&&(m=fn.cloneDeep(x[u.style])),m=fn.merge(m,{border:e}),u.style=this.addStyle(m)}function mm({mode:X,style:k,color:e}){const{styles:x,selector:_,rows:u}=this,{sri:m,sci:g,eri:b,eci:w}=_.range,f=!this.isSignleSelected();if(!(!f&&(X==="inside"||X==="horizontal"||X==="vertical"))){if(X==="outside"&&!f)pa.call(this,m,g,{top:[k,e],bottom:[k,e],left:[k,e],right:[k,e]});else if(X==="none")_.range.each((y,h)=>{const l=u.getCell(y,h);if(l&&l.style!==void 0){const d=fn.cloneDeep(x[l.style]);delete d.border,l.style=this.addStyle(d)}});else if(X==="all"||X==="inside"||X==="outside"||X==="horizontal"||X==="vertical"){const y=[];for(let h=m;h<=b;h+=1)for(let l=g;l<=w;l+=1){const d=[];for(let i=0;iy.splice(i,1)),l>w)break;const s=u.getCell(h,l);let[v,c]=[0,0];s&&s.merge&&([v,c]=s.merge,y.push([h,l,v,c]));const a=v>0&&h+v===b,r=c>0&&l+c===w;let t={};X==="all"?t={bottom:[k,e],top:[k,e],left:[k,e],right:[k,e]}:X==="inside"?(!r&&l0&&pa.call(this,h,l,t),l+=c}}else if(X==="top"||X==="bottom")for(let y=g;y<=w;y+=1)X==="top"&&(pa.call(this,m,y,{top:[k,e]}),y+=u.getCellMerge(m,y)[1]),X==="bottom"&&(pa.call(this,b,y,{bottom:[k,e]}),y+=u.getCellMerge(b,y)[1]);else if(X==="left"||X==="right")for(let y=m;y<=b;y+=1)X==="left"&&(pa.call(this,y,g,{left:[k,e]}),y+=u.getCellMerge(y,g)[0]),X==="right"&&(pa.call(this,y,w,{right:[k,e]}),y+=u.getCellMerge(y,w)[0])}}function bm(X,k){const{rows:e}=this,x=this.freezeTotalHeight();let _=e.height;x+e.heightX);m+=1)u.has(m)||(b=e.getHeight(m),g+=b);return g-=b,g<=0?{ri:-1,top:0,height:b}:{ri:m-1,top:g,height:b}}function gm(X,k){const{cols:e}=this,x=this.freezeTotalWidth();let _=e.indexWidth;x+e.indexWidthe.getWidth(b));return m<=0?{ci:-1,left:0,width:e.indexWidth}:{ci:u-1,left:m,width:g}}class _m{constructor(k,e){this.settings=fn.merge(dm,e||{}),this.name=k||"sheet",this.freeze=[0,0],this.styles=[],this.merges=new gf,this.rows=new um(this.settings.row),this.cols=new lm(this.settings.col),this.validations=new hm,this.hyperlinks={},this.comments={},this.selector=new Jv,this.scroll=new Qv,this.history=new qv,this.clipboard=new em,this.autoFilter=new tm,this.change=()=>{},this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map}addValidation(k,e,x){this.changeData(()=>{this.validations.add(k,e,x)})}removeValidation(){const{range:k}=this.selector;this.changeData(()=>{this.validations.remove(k)})}getSelectedValidator(){const{ri:k,ci:e}=this.selector,x=this.validations.get(k,e);return x?x.validator:null}getSelectedValidation(){const{ri:k,ci:e,range:x}=this.selector,_=this.validations.get(k,e),u={ref:x.toString()};return _!==null&&(u.mode=_.mode,u.validator=_.validator),u}canUndo(){return this.history.canUndo()}canRedo(){return this.history.canRedo()}undo(){this.history.undo(this.getData(),k=>{this.setData(k)})}redo(){this.history.redo(this.getData(),k=>{this.setData(k)})}copy(){this.clipboard.copy(this.selector.range)}copyToSystemClipboard(){if(navigator.clipboard===void 0)return;let k="";const e=this.rows.getData();for(let x=this.selector.range.sri;x<=this.selector.range.eri;x+=1){if(Tl(e,x)){for(let _=this.selector.range.sci;_<=this.selector.range.eci;_+=1)if(_>this.selector.range.sci&&(k+=" "),Tl(e[x].cells,_)){const u=String(e[x].cells[_].text);u.indexOf(` `)===-1&&u.indexOf(" ")===-1&&u.indexOf('"')===-1?k+=u:k+=`"${u}"`}}else for(let _=this.selector.range.sci;_<=this.selector.range.eci;_+=1)k+=" ";k+=` `}navigator.clipboard.writeText(k).then(()=>{},x=>{console.log("text copy to the system clipboard error ",k,x)})}cut(){this.clipboard.cut(this.selector.range)}paste(k="all",e=()=>{}){const{clipboard:x,selector:_}=this;return x.isClear()||!Rl.call(this,x.range,_.range,e)?!1:(this.changeData(()=>{x.isCopy()?Cl.call(this,x.range,_.range,k):x.isCut()&&vm.call(this,x.range,_.range)}),!0)}pasteFromText(k){const e=k.split(`\r `).map(u=>u.replace(/"/g,"").split(" "));e.length>0&&(e.length-=1);const{rows:x,selector:_}=this;this.changeData(()=>{x.paste(e,_.range)})}autofill(k,e,x=()=>{}){const _=this.selector.range;return Rl.call(this,_,k,x)?(this.changeData(()=>{Cl.call(this,_,k,e,!0)}),!0):!1}clearClipboard(){this.clipboard.clear()}calSelectedRangeByEnd(k,e){const{selector:x,rows:_,cols:u,merges:m}=this;let{sri:g,sci:b,eri:w,eci:f}=x.range;const y=x.ri,h=x.ci;let[l,d]=[k,e];return k<0&&(l=_.len-1),e<0&&(d=u.len-1),l>y?[g,w]=[y,l]:[g,w]=[l,y],d>h?[b,f]=[h,d]:[b,f]=[d,h],x.range=m.union(new kr(g,b,w,f)),x.range=m.union(x.range),x.range}calSelectedRangeByStart(k,e){const{selector:x,rows:_,cols:u,merges:m}=this;let g=m.getFirstIncludes(k,e);return g===null&&(g=new kr(k,e,k,e),k===-1&&(g.sri=0,g.eri=_.len-1),e===-1&&(g.sci=0,g.eci=u.len-1)),x.range=g,g}setSelectedCellAttr(k,e){this.changeData(()=>{const{selector:x,styles:_,rows:u}=this;if(k==="merge")e?this.merge():this.unmerge();else if(k==="border")mm.call(this,e);else if(k==="formula"){const{ri:m,ci:g,range:b}=x;if(x.multiple()){const[w,f]=x.size(),{sri:y,sci:h,eri:l,eci:d}=b;if(w>1)for(let s=h;s<=d;s+=1){const v=u.getCellOrNew(l+1,s);v.text=`=${e}(${hi(s,y)}:${hi(s,l)})`}else if(f>1){const s=u.getCellOrNew(m,d+1);s.text=`=${e}(${hi(h,m)}:${hi(d,m)})`}}else{const w=u.getCellOrNew(m,g);w.text=`=${e}()`}}else x.range.each((m,g)=>{const b=u.getCellOrNew(m,g);let w={};if(b.style!==void 0&&(w=fn.cloneDeep(_[b.style])),k==="format")w.format=e,b.style=this.addStyle(w);else if(k==="font-bold"||k==="font-italic"||k==="font-name"||k==="font-size"){const f={};f[k.split("-")[1]]=e,w.font=Object.assign(w.font||{},f),b.style=this.addStyle(w)}else k==="strike"||k==="textwrap"||k==="underline"||k==="align"||k==="valign"||k==="color"||k==="bgcolor"?(w[k]=e,b.style=this.addStyle(w)):b[k]=e})})}setSelectedCellText(k,e="input"){const{autoFilter:x,selector:_,rows:u}=this,{ri:m,ci:g}=_;let b=m;this.unsortedRowMap.has(m)&&(b=this.unsortedRowMap.get(m));const w=u.getCell(b,g),f=w?w.text:"";if(this.setCellText(b,g,k,e),x.active()){const y=x.getFilter(g);if(y){const h=y.value.findIndex(l=>l===f);h>=0&&y.value.splice(h,1,k)}}}getSelectedCell(){const{ri:k,ci:e}=this.selector;let x=k;return this.unsortedRowMap.has(k)&&(x=this.unsortedRowMap.get(k)),this.rows.getCell(x,e)}xyInSelectedRect(k,e){const{left:x,top:_,width:u,height:m}=this.getSelectedRect(),g=k-this.cols.indexWidth,b=e-this.rows.height;return g>x&&g_&&b<_+m}getSelectedRect(){return this.getRect(this.selector.range)}getClipboardRect(){const{clipboard:k}=this;return k.isClear()?{left:-100,top:-100}:this.getRect(k.range)}getRect(k){const{scroll:e,rows:x,cols:_,exceptRowSet:u}=this,{sri:m,sci:g,eri:b,eci:w}=k;if(m<0&&g<0)return{left:0,l:0,top:0,t:0,scroll:e};const f=_.sumWidth(0,g),y=x.sumHeight(0,m,u),h=x.sumHeight(m,b+1,u),l=_.sumWidth(g,w+1);let d=f-e.x,s=y-e.y;const v=this.freezeTotalHeight(),c=this.freezeTotalWidth();return c>0&&c>f&&(d=f),v>0&&v>y&&(s=y),{l:f,t:y,left:d,top:s,height:h,width:l,scroll:e}}getCellRectByXY(k,e){const{scroll:x,merges:_,rows:u,cols:m}=this;let{ri:g,top:b,height:w}=bm.call(this,e,x.y),{ci:f,left:y,width:h}=gm.call(this,k,x.x);if(f===-1&&(h=m.totalWidth()),g===-1&&(w=u.totalHeight()),g>=0||f>=0){const l=_.getFirstIncludes(g,f);l&&(g=l.sri,f=l.sci,{left:y,top:b,width:h,height:w}=this.cellRect(g,f))}return{ri:g,ci:f,left:y,top:b,width:h,height:w}}isSignleSelected(){const{sri:k,sci:e,eri:x,eci:_}=this.selector.range,u=this.getCell(k,e);if(u&&u.merge){const[m,g]=u.merge;if(k+m===x&&e+g===_)return!0}return!this.selector.multiple()}canUnmerge(){const{sri:k,sci:e,eri:x,eci:_}=this.selector.range,u=this.getCell(k,e);if(u&&u.merge){const[m,g]=u.merge;if(k+m===x&&e+g===_)return!0}return!1}merge(){const{selector:k,rows:e}=this;if(this.isSignleSelected())return;const[x,_]=k.size();if(x>1||_>1){const{sri:u,sci:m}=k.range;this.changeData(()=>{const g=e.getCellOrNew(u,m);g.merge=[x-1,_-1],this.merges.add(k.range),this.rows.deleteCells(k.range),this.rows.setCell(u,m,g)})}}unmerge(){const{selector:k}=this;if(!this.isSignleSelected())return;const{sri:e,sci:x}=k.range;this.changeData(()=>{this.rows.deleteCell(e,x,"merge"),this.merges.deleteWithin(k.range)})}canAutofilter(){return!this.autoFilter.active()}autofilter(){const{autoFilter:k,selector:e}=this;this.changeData(()=>{k.active()?(k.clear(),this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map):k.ref=e.range.toString()})}setAutoFilter(k,e,x,_){const{autoFilter:u}=this;u.addFilter(k,x,_),u.setSort(k,e),this.resetAutoFilter()}resetAutoFilter(){const{autoFilter:k,rows:e}=this;if(!k.active())return;const{sort:x}=k,{rset:_,fset:u}=k.filteredRows((b,w)=>e.getCell(b,w)),m=Array.from(u),g=Array.from(u);x&&m.sort((b,w)=>x.order==="asc"?b-w:x.order==="desc"?w-b:0),this.exceptRowSet=_,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,m.forEach((b,w)=>{this.sortedRowMap.set(g[w],b),this.unsortedRowMap.set(b,g[w])})}deleteCell(k="all"){const{selector:e}=this;this.changeData(()=>{this.rows.deleteCells(e.range,k),(k==="all"||k==="format")&&this.merges.deleteWithin(e.range)})}insert(k,e=1){this.changeData(()=>{const{sri:x,sci:_}=this.selector.range,{rows:u,merges:m,cols:g}=this;let b=x;k==="row"?u.insert(x,e):k==="column"&&(u.insertColumn(_,e),b=_,g.len+=1),m.shift(k,b,e,(w,f,y,h)=>{const l=u.getCell(w,f);l.merge[0]+=y,l.merge[1]+=h})})}delete(k){this.changeData(()=>{const{rows:e,merges:x,selector:_,cols:u}=this,{range:m}=_,{sri:g,sci:b,eri:w,eci:f}=_.range,[y,h]=_.range.size();let l=g,d=y;k==="row"?e.delete(g,w):k==="column"&&(e.deleteColumn(b,f),l=m.sci,d=h,u.len-=1),x.shift(k,l,-d,(s,v,c,a)=>{const r=e.getCell(s,v);r.merge[0]+=c,r.merge[1]+=a,r.merge[0]===0&&r.merge[1]===0&&delete r.merge})})}scrollx(k,e){const{scroll:x,freeze:_,cols:u}=this,[,m]=_,[g,b,w]=fn.rangeReduceIf(m,u.len,0,0,k,y=>u.getWidth(y));let f=b;k>0&&(f+=w),x.x!==f&&(x.ci=k>0?g:0,x.x=f,e())}scrolly(k,e){const{scroll:x,freeze:_,rows:u}=this,[m]=_,[g,b,w]=fn.rangeReduceIf(m,u.len,0,0,k,y=>u.getHeight(y));let f=b;k>0&&(f+=w),x.y!==f&&(x.ri=k>0?g:0,x.y=f,e())}cellRect(k,e){const{rows:x,cols:_}=this,u=_.sumWidth(0,e),m=x.sumHeight(0,k),g=x.getCell(k,e);let b=_.getWidth(e),w=x.getHeight(k);if(g!==null&&g.merge){const[f,y]=g.merge;if(f>0)for(let h=1;h<=f;h+=1)w+=x.getHeight(k+h);if(y>0)for(let h=1;h<=y;h+=1)b+=_.getWidth(e+h)}return{left:u,top:m,width:b,height:w,cell:g}}getCell(k,e){return this.rows.getCell(k,e)}getCellTextOrDefault(k,e){const x=this.getCell(k,e);return x&&x.text?x.text:""}getCellStyle(k,e){const x=this.getCell(k,e);return x&&x.style!==void 0?this.styles[x.style]:null}getCellStyleOrDefault(k,e){const{styles:x,rows:_}=this,u=_.getCell(k,e),m=u&&u.style!==void 0?x[u.style]:{};return fn.merge(this.defaultStyle(),m)}getSelectedCellStyle(){const{ri:k,ci:e}=this.selector;return this.getCellStyleOrDefault(k,e)}setCellText(k,e,x,_){const{rows:u,history:m,validations:g}=this;_==="finished"?(u.setCellText(k,e,""),m.add(this.getData()),u.setCellText(k,e,x)):(u.setCellText(k,e,x),this.change(this.getData())),g.validate(k,e,x)}freezeIsActive(){const[k,e]=this.freeze;return k>0||e>0}setFreeze(k,e){this.changeData(()=>{this.freeze=[k,e]})}freezeTotalWidth(){return this.cols.sumWidth(0,this.freeze[1])}freezeTotalHeight(){return this.rows.sumHeight(0,this.freeze[0])}setRowHeight(k,e){this.changeData(()=>{this.rows.setHeight(k,e)})}setColWidth(k,e){this.changeData(()=>{this.cols.setWidth(k,e)})}viewHeight(){const{view:k,showToolbar:e,showBottomBar:x}=this.settings;let _=k.height();return x&&(_-=ym),e&&(_-=pm),_}viewWidth(){return this.settings.view.width()}freezeViewRange(){const[k,e]=this.freeze;return new kr(0,0,k-1,e-1,this.freezeTotalWidth(),this.freezeTotalHeight())}contentRange(){const{rows:k,cols:e}=this,[x,_]=k.maxCell(),u=k.sumHeight(0,x+1),m=e.sumWidth(0,_+1);return new kr(0,0,x,_,m,u)}exceptRowTotalHeight(k,e){const{exceptRowSet:x,rows:_}=this,u=Array.from(x);let m=0;return u.forEach(g=>{if(ge){const b=_.getHeight(g);m+=b}}),m}viewRange(){const{scroll:k,rows:e,cols:x,freeze:_,exceptRowSet:u}=this;let{ri:m,ci:g}=k;m<=0&&([m]=_),g<=0&&([,g]=_);let[b,w]=[0,0],[f,y]=[e.len,x.len];for(let h=m;hthis.viewHeight()));h+=1);for(let h=g;hthis.viewWidth()));h+=1);return new kr(m,g,f,y,b,w)}eachMergesInView(k,e){this.merges.filterIntersects(k).forEach(x=>e(x))}hideRowsOrCols(){const{rows:k,cols:e,selector:x}=this,[_,u]=x.size(),{sri:m,sci:g,eri:b,eci:w}=x.range;if(_===k.len)for(let f=g;f<=w;f+=1)e.setHide(f,!0);else if(u===e.len)for(let f=m;f<=b;f+=1)k.setHide(f,!0)}unhideRowsOrCols(k,e){this[`${k}s`].unhide(e)}rowEach(k,e,x){let _=0;const{rows:u}=this,m=this.exceptRowSet,g=[...m];let b=0;for(let w=0;w0&&(x(w,_,f),_+=f,_>this.viewHeight()))break}}colEach(k,e,x){let _=0;const{cols:u}=this;for(let m=k;m<=e;m+=1){const g=u.getWidth(m);if(g>0&&(x(m,_,g),_+=g,_>this.viewWidth()))break}}defaultStyle(){return this.settings.style}addStyle(k){const{styles:e}=this;for(let x=0;x{if(e==="merges"||e==="rows"||e==="cols"||e==="validations")this[e].setData(k[e]);else if(e==="freeze"){const[x,_]=Ti(k[e]);this.freeze=[_,x]}else e==="autofilter"?this.autoFilter.setData(k[e]):k[e]!==void 0&&(this[e]=k[e])}),this}getData(){const{name:k,freeze:e,styles:x,merges:_,rows:u,cols:m,validations:g,autoFilter:b}=this;return{name:k,freeze:hi(e[1],e[0]),styles:x,merges:_.getData(),rows:u.getData(),cols:m.getData(),validations:g.getData(),autofilter:b.getData()}}}function ln(X,k,e){X.addEventListener(k,e)}function Ko(X,k,e){X.removeEventListener(k,e)}function _a(X){X.xclickoutside&&(Ko(window.document.body,"click",X.xclickoutside),delete X.xclickoutside)}function Va(X,k){X.xclickoutside=e=>{e.detail===2||X.contains(e.target)||(k?k(X):(X.hide(),_a(X)))},ln(window.document.body,"click",X.xclickoutside)}function sc(X,k,e){ln(X,"mousemove",k);const x=X;x.xEvtUp=_=>{Ko(X,"mousemove",k),Ko(X,"mouseup",X.xEvtUp),e(_)},ln(X,"mouseup",X.xEvtUp)}function Pl(X,k,e,x){let _="";Math.abs(X)>Math.abs(k)?(_=X>0?"right":"left",x(_,X,e)):(_=k>0?"down":"up",x(_,k,e))}function wm(X,{move:k,end:e}){let x=0,_=0;ln(X,"touchstart",u=>{const{pageX:m,pageY:g}=u.touches[0];x=m,_=g}),ln(X,"touchmove",u=>{if(!k)return;const{pageX:m,pageY:g}=u.changedTouches[0],b=m-x,w=g-_;(Math.abs(b)>10||Math.abs(w)>10)&&(Pl(b,w,u,k),x=m,_=g),u.preventDefault()}),ln(X,"touchend",u=>{if(!e)return;const{pageX:m,pageY:g}=u.changedTouches[0],b=m-x,w=g-_;Pl(b,w,u,e)})}function xm(){const X=new Map;function k(m,g){const b=()=>{const f=X.get(m);return Array.isArray(f)&&f.push(g)||!1},w=()=>X.set(m,[].concat(g));return X.has(m)&&b()||w()}function e(m,g){const b=()=>{const w=X.get(m);for(const f of w)f.call(null,...g)};return X.has(m)&&b()}function x(m,g){const b=()=>{const w=X.get(m),f=w.indexOf(g);return f>=0&&w.splice(f,1)&&X.get(m).length===0&&X.delete(m)};return X.has(m)&&b()}function _(m,g){const b=(...w)=>{g.call(null,...w),x(m,b)};return k(m,b)}function u(){X.clear()}return{get current(){return X},on:k,once:_,fire:e,removeListener:x,removeAllListeners:u}}const lt="x-spreadsheet";class Al{constructor(k=!1,e){this.moving=!1,this.vertical=k,this.el=We("div",`${lt}-resizer ${k?"vertical":"horizontal"}`).children(this.unhideHoverEl=We("div",`${lt}-resizer-hover`).on("dblclick.stop",x=>this.mousedblclickHandler(x)).css("position","absolute").hide(),this.hoverEl=We("div",`${lt}-resizer-hover`).on("mousedown.stop",x=>this.mousedownHandler(x)),this.lineEl=We("div",`${lt}-resizer-line`).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=e,this.unhideFn=()=>{}}showUnhide(k){this.unhideIndex=k,this.unhideHoverEl.show()}hideUnhide(){this.unhideHoverEl.hide()}show(k,e){const{moving:x,vertical:_,hoverEl:u,lineEl:m,el:g,unhideHoverEl:b}=this;if(x)return;this.cRect=k;const{left:w,top:f,width:y,height:h}=k;g.offset({left:_?w+y-5:w,top:_?f:f+h-5}).show(),u.offset({width:_?5:y,height:_?h:5}),m.offset({width:_?0:e.width,height:_?e.height:0}),b.offset({left:_?5-y:w,top:_?f:5-h,width:_?5:y,height:_?h:5})}hide(){this.el.offset({left:0,top:0}).hide(),this.hideUnhide()}mousedblclickHandler(){this.unhideIndex&&this.unhideFn(this.unhideIndex)}mousedownHandler(k){let e=k;const{el:x,lineEl:_,cRect:u,vertical:m,minDistance:g}=this;let b=m?u.width:u.height;_.show(),sc(window,w=>{this.moving=!0,e!==null&&w.buttons===1&&(m?(b+=w.movementX,b>g&&x.css("left",`${u.left+b}px`)):(b+=w.movementY,b>g&&x.css("top",`${u.top+b}px`)),e=w)},()=>{e=null,_.hide(),this.moving=!1,this.hide(),this.finishedFn&&(b{}).on("scroll.stop",e=>{const{scrollTop:x,scrollLeft:_}=e.target;this.moveFn&&this.moveFn(this.vertical?x:_,e)})}move(k){return this.el.scroll(k),this}scroll(){return this.el.scroll()}set(k,e){const x=k-1;if(e>x){const _=this.vertical?"height":"width";this.el.css(_,`${x-15}px`).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(_,`${e}px`)}else this.el.hide();return this}}const No=2*2-1;let cf=10;class Fo{constructor(k=!1){this.useHideInput=k,this.inputChange=()=>{},this.cornerEl=We("div",`${lt}-selector-corner`),this.areaEl=We("div",`${lt}-selector-area`).child(this.cornerEl).hide(),this.clipboardEl=We("div",`${lt}-selector-clipboard`).hide(),this.autofillEl=We("div",`${lt}-selector-autofill`).hide(),this.el=We("div",`${lt}-selector`).css("z-index",`${cf}`).children(this.areaEl,this.clipboardEl,this.autofillEl).hide(),k&&(this.hideInput=We("input","").on("compositionend",e=>{this.inputChange(e.target.value)}),this.el.child(this.hideInputDiv=We("div","hide-input").child(this.hideInput)),this.el.child(this.hideInputDiv=We("div","hide-input").child(this.hideInput))),cf+=1}setOffset(k){return this.el.offset(k).show(),this}hide(){return this.el.hide(),this}setAreaOffset(k){const{left:e,top:x,width:_,height:u}=k,m={width:_-No+.8,height:u-No+.8,left:e-.8,top:x-.8};this.areaEl.offset(m).show(),this.useHideInput&&(this.hideInputDiv.offset(m),this.hideInput.val("").focus())}setClipboardOffset(k){const{left:e,top:x,width:_,height:u}=k;this.clipboardEl.offset({left:e,top:x,width:_-5,height:u-5})}showAutofill(k){const{left:e,top:x,width:_,height:u}=k;this.autofillEl.offset({width:_-No,height:u-No,left:e,top:x}).show()}hideAutofill(){this.autofillEl.hide()}showClipboard(){this.clipboardEl.show()}hideClipboard(){this.clipboardEl.hide()}}function _f(X){const{data:k}=this,{left:e,top:x,width:_,height:u,scroll:m,l:g,t:b}=X,w=k.freezeTotalWidth(),f=k.freezeTotalHeight();let y=e-w;w>g&&(y-=m.x);let h=x-f;return f>b&&(h-=m.y),{left:y,top:h,width:_,height:u}}function wf(X){const{data:k}=this,{left:e,width:x,height:_,l:u,t:m,scroll:g}=X,b=k.freezeTotalWidth();let w=e-b;return b>u&&(w-=g.x),{left:w,top:m,width:x,height:_}}function xf(X){const{data:k}=this,{top:e,width:x,height:_,l:u,t:m,scroll:g}=X,b=k.freezeTotalHeight();let w=e-b;return b>m&&(w-=g.y),{left:u,top:w,width:x,height:_}}function hf(X){const{br:k}=this;k.setAreaOffset(_f.call(this,X))}function Sm(X){const{tl:k}=this;k.setAreaOffset(X)}function fc(X){const{t:k}=this;k.setAreaOffset(wf.call(this,X))}function uc(X){const{l:k}=this;k.setAreaOffset(xf.call(this,X))}function lc(X){const{l:k}=this;k.setClipboardOffset(xf.call(this,X))}function df(X){const{br:k}=this;k.setClipboardOffset(_f.call(this,X))}function km(X){const{tl:k}=this;k.setClipboardOffset(X)}function cc(X){const{t:k}=this;k.setClipboardOffset(wf.call(this,X))}function Il(X){hf.call(this,X),Sm.call(this,X),fc.call(this,X),uc.call(this,X)}function Dl(X){df.call(this,X),km.call(this,X),cc.call(this,X),lc.call(this,X)}class Om{constructor(k){this.inputChange=()=>{},this.data=k,this.br=new Fo(!0),this.t=new Fo,this.l=new Fo,this.tl=new Fo,this.br.inputChange=e=>{this.inputChange(e)},this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=We("div",`${lt}-selectors`).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,cf+=1}resetData(k){this.data=k,this.range=k.selector.range,this.resetAreaOffset()}hide(){this.el.hide()}resetOffset(){const{data:k,tl:e,t:x,l:_,br:u}=this,m=k.freezeTotalHeight(),g=k.freezeTotalWidth();m>0||g>0?(e.setOffset({width:g,height:m}),x.setOffset({left:g,height:m}),_.setOffset({top:m,width:g}),u.setOffset({left:g,top:m})):(e.hide(),x.hide(),_.hide(),u.setOffset({left:0,top:0}))}resetAreaOffset(){const k=this.data.getSelectedRect(),e=this.data.getClipboardRect();Il.call(this,k),Dl.call(this,e),this.resetOffset()}resetBRTAreaOffset(){const k=this.data.getSelectedRect(),e=this.data.getClipboardRect();hf.call(this,k),fc.call(this,k),df.call(this,e),cc.call(this,e),this.resetOffset()}resetBRLAreaOffset(){const k=this.data.getSelectedRect(),e=this.data.getClipboardRect();hf.call(this,k),uc.call(this,k),df.call(this,e),lc.call(this,e),this.resetOffset()}set(k,e,x=!0){const{data:_}=this,u=_.calSelectedRangeByStart(k,e),{sri:m,sci:g}=u;if(x){let[b,w]=[k,e];k<0&&(b=0),e<0&&(w=0),_.selector.setIndexes(b,w),this.indexes=[b,w]}this.moveIndexes=[m,g],this.range=u,this.resetAreaOffset(),this.el.show()}setEnd(k,e,x=!0){const{data:_,lastri:u,lastci:m}=this;if(x){if(k===u&&e===m)return;this.lastri=k,this.lastci=e}this.range=_.calSelectedRangeByEnd(k,e),Il.call(this,this.data.getSelectedRect())}reset(){const{eri:k,eci:e}=this.data.selector.range;this.setEnd(k,e)}showAutofill(k,e){if(k===-1&&e===-1)return;const{sri:x,sci:_,eri:u,eci:m}=this.range,[g,b]=[k,e],w=x-k,f=_-e,y=u-k,h=m-e;if(f>0)this.arange=new kr(x,b,u,_-1);else if(w>0)this.arange=new kr(g,_,x-1,m);else if(h<0)this.arange=new kr(x,m+1,u,b);else if(y<0)this.arange=new kr(u+1,_,g,m);else{this.arange=null;return}if(this.arange!==null){const l=this.data.getRect(this.arange);l.width+=2,l.height+=2;const{br:d,l:s,t:v,tl:c}=this;d.showAutofill(_f.call(this,l)),s.showAutofill(xf.call(this,l)),v.showAutofill(wf.call(this,l)),c.showAutofill(l)}}hideAutofill(){["br","l","t","tl"].forEach(k=>{this[k].hideAutofill()})}showClipboard(){const k=this.data.getClipboardRect();Dl.call(this,k),["br","l","t","tl"].forEach(e=>{this[e].showClipboard()})}hideClipboard(){["br","l","t","tl"].forEach(k=>{this[k].hideClipboard()})}}function Em(X){X.preventDefault(),X.stopPropagation();const{filterItems:k}=this;k.length<=0||(this.itemIndex>=0&&k[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=k.length-1),k[this.itemIndex].toggle())}function Tm(X){X.stopPropagation();const{filterItems:k}=this;k.length<=0||(this.itemIndex>=0&&k[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>k.length-1&&(this.itemIndex=0),k[this.itemIndex].toggle())}function Nl(X){X.preventDefault();const{filterItems:k}=this;k.length<=0||(X.stopPropagation(),this.itemIndex<0&&(this.itemIndex=0),k[this.itemIndex].el.click(),this.hide())}function Rm(X){const{keyCode:k}=X;switch(X.ctrlKey&&X.stopPropagation(),k){case 37:X.stopPropagation();break;case 38:Em.call(this,X);break;case 39:X.stopPropagation();break;case 40:Tm.call(this,X);break;case 13:Nl.call(this,X);break;case 9:Nl.call(this,X);break;default:X.stopPropagation();break}}class hc{constructor(k,e,x="200px"){this.filterItems=[],this.items=k,this.el=We("div",`${lt}-suggest`).css("width",x).hide(),this.itemClick=e,this.itemIndex=-1}setOffset(k){this.el.cssRemoveKeys("top","bottom").offset(k)}hide(){const{el:k}=this;this.filterItems=[],this.itemIndex=-1,k.hide(),_a(this.el.parent())}setItems(k){this.items=k}search(k){let{items:e}=this;if(/^\s*$/.test(k)||(e=e.filter(_=>(_.key||_).startsWith(k.toUpperCase()))),e=e.map(_=>{let{title:u}=_;u?typeof u=="function"&&(u=u()):u=_;const m=We("div",`${lt}-item`).child(u).on("click.stop",()=>{this.itemClick(_),this.hide()});return _.label&&m.child(We("div","label").html(_.label)),m}),this.filterItems=e,e.length<=0)return;const{el:x}=this;x.html("").children(...e).show(),Va(x.parent(),()=>{this.hide()})}bindInputEvents(k){k.on("keydown",e=>Rm.call(this,e))}}class Kr extends Xi{constructor(k){super("div",`${lt}-icon`),this.iconNameEl=We("div",`${lt}-icon-img ${k}`),this.child(this.iconNameEl)}setName(k){this.iconNameEl.className(`${lt}-icon-img ${k}`)}}function Fl(X,k){X.setMonth(X.getMonth()+k)}function Cm(X,k){const e=new Date(X);return e.setDate(k-X.getDay()+1),e}function Pm(X,k,e){const x=new Date(X,k,1,23,59,59),_=[[],[],[],[],[],[]];for(let u=0;u<6;u+=1)for(let m=0;m<7;m+=1){const g=u*7+m,b=Cm(x,g),w=b.getMonth()!==k,f=b.getMonth()===e.getMonth()&&b.getDate()===e.getDate();_[u][m]={d:b,disabled:w,active:f}}return _}class Am{constructor(k){this.value=k,this.cvalue=new Date(k),this.headerLeftEl=We("div","calendar-header-left"),this.bodyEl=We("tbody",""),this.buildAll(),this.el=We("div","x-spreadsheet-calendar").children(We("div","calendar-header").children(this.headerLeftEl,We("div","calendar-header-right").children(We("a","calendar-prev").on("click.stop",()=>this.prev()).child(new Kr("chevron-left")),We("a","calendar-next").on("click.stop",()=>this.next()).child(new Kr("chevron-right")))),We("table","calendar-body").children(We("thead","").child(We("tr","").children(...Cr("calendar.weeks").map(e=>We("th","cell").child(e)))),this.bodyEl)),this.selectChange=()=>{}}setValue(k){this.value=k,this.cvalue=new Date(k),this.buildAll()}prev(){const{value:k}=this;Fl(k,-1),this.buildAll()}next(){const{value:k}=this;Fl(k,1),this.buildAll()}buildAll(){this.buildHeaderLeft(),this.buildBody()}buildHeaderLeft(){const{value:k}=this;this.headerLeftEl.html(`${Cr("calendar.months")[k.getMonth()]} ${k.getFullYear()}`)}buildBody(){const{value:k,cvalue:e,bodyEl:x}=this,u=Pm(k.getFullYear(),k.getMonth(),e).map(m=>{const g=m.map(b=>{let w="cell";return b.disabled&&(w+=" disabled"),b.active&&(w+=" active"),We("td","").child(We("div",w).on("click.stop",()=>{this.selectChange(b.d)}).child(b.d.getDate().toString()))});return We("tr","").children(...g)});x.html("").children(...u)}}class Mm{constructor(){this.calendar=new Am(new Date),this.el=We("div",`${lt}-datepicker`).child(this.calendar.el).hide()}setValue(k){const{calendar:e}=this;return typeof k=="string"?/^\d{4}-\d{1,2}-\d{1,2}$/.test(k)&&e.setValue(new Date(k.replace(new RegExp("-","g"),"/"))):k instanceof Date&&e.setValue(k),this}change(k){this.calendar.selectChange=e=>{k(e),this.hide()}}show(){this.el.show()}hide(){this.el.hide()}}function Go(){const{inputText:X}=this;if(!/^\s*$/.test(X)){const{textlineEl:k,textEl:e,areaOffset:x}=this,_=X.split(` `),u=Math.max(..._.map(y=>y.length)),g=k.offset().width/X.length,b=(u+1)*g+5,w=this.viewFn().width-x.left-g;let f=_.length;if(b>x.width){let y=b;b>w&&(y=w,f+=parseInt(b/w,10),f+=b%w>0?1:0),e.css("width",`${y}px`)}f*=this.rowHeight,f>x.height&&e.css("height",`${f}px`)}}function Im({target:X},k){const{value:e,selectionEnd:x}=X,_=`${e.slice(0,x)}${k}${e.slice(x)}`;X.value=_,X.setSelectionRange(x+1,x+1),this.inputText=_,this.textlineEl.html(_),Go.call(this)}function Dm(X){const{keyCode:k,altKey:e}=X;k!==13&&k!==9&&X.stopPropagation(),k===13&&e&&(Im.call(this,X,` `),X.stopPropagation()),k===13&&!e&&X.preventDefault()}function Nm(X){const k=X.target.value,{suggest:e,textlineEl:x,validator:_}=this,{cell:u}=this;if(u!==null)if("editable"in u&&u.editable===!0||u.editable===void 0){if(this.inputText=k,_)_.type==="list"?e.search(k):e.hide();else{const m=k.lastIndexOf("=");m!==-1?e.search(k.substring(m+1)):e.hide()}x.html(k),Go.call(this),this.change("input",k)}else X.target.value=u.text;else{if(this.inputText=k,_)_.type==="list"?e.search(k):e.hide();else{const m=k.lastIndexOf("=");m!==-1?e.search(k.substring(m+1)):e.hide()}x.html(k),Go.call(this),this.change("input",k)}}function Fm(X){const{el:k}=this.textEl;setTimeout(()=>{k.focus(),k.setSelectionRange(X,X)},0)}function dc(X,k){const{textEl:e,textlineEl:x}=this;e.el.blur(),e.val(X),x.html(X),Fm.call(this,k)}function Bm(X){const{inputText:k,validator:e}=this;let x=0;if(e&&e.type==="list")this.inputText=X,x=this.inputText.length;else{const _=k.lastIndexOf("="),u=k.substring(0,_+1);let m=k.substring(_+1);m.indexOf(")")!==-1?m=m.substring(m.indexOf(")")):m="",this.inputText=`${u+X.key}(`,x=this.inputText.length,this.inputText+=`)${m}`}dc.call(this,this.inputText,x)}function jm(){this.suggest.setItems(this.formulas)}function Lm(X){let k=X.getMonth()+1,e=X.getDate();return k<10&&(k=`0${k}`),e<10&&(e=`0${e}`),`${X.getFullYear()}-${k}-${e}`}class zm{constructor(k,e,x){this.viewFn=e,this.rowHeight=x,this.formulas=k,this.suggest=new hc(k,_=>{Bm.call(this,_)}),this.datepicker=new Mm,this.datepicker.change(_=>{this.setText(Lm(_)),this.clear()}),this.areaEl=We("div",`${lt}-editor-area`).children(this.textEl=We("textarea","").on("input",_=>Nm.call(this,_)).on("paste.stop",()=>{}).on("keydown",_=>Dm.call(this,_)),this.textlineEl=We("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",()=>{}).on("mousedown.stop",()=>{}),this.el=We("div",`${lt}-editor`).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=()=>{}}setFreezeLengths(k,e){this.freeze.w=k,this.freeze.h=e}clear(){this.inputText!==""&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),jm.call(this),this.datepicker.hide()}setOffset(k,e="top"){const{textEl:x,areaEl:_,suggest:u,freeze:m,el:g}=this;if(k){this.areaOffset=k;const{left:b,top:w,width:f,height:y,l:h,t:l}=k,d={left:0,top:0};m.w>h&&m.h>l||(m.wh?d.top=m.h:m.h>l&&(d.left=m.w)),g.offset(d),_.offset({left:b-d.left-.8,top:w-d.top-.8}),x.offset({width:f-9+.8,height:y-3+.8});const s={left:0};s[e]=y,u.setOffset(s),u.hide()}}setCell(k,e){const{el:x,datepicker:_,suggest:u}=this;x.show(),this.cell=k;const m=k&&k.text||"";if(this.setText(m),this.validator=e,e){const{type:g}=e;g==="date"&&(_.show(),/^\s*$/.test(m)||_.setValue(m)),g==="list"&&(u.setItems(e.values()),u.search(""))}}setText(k){this.inputText=k,dc.call(this,k,k.length),Go.call(this)}}class Li extends Xi{constructor(k,e=""){super("div",`${lt}-button ${e}`),this.child(Cr(`button.${k}`))}}function Zo(){return window.devicePixelRatio||1}function Sf(){return Zo()-.5}function zt(X){return parseInt(X*Zo(),10)}function ya(X){const k=zt(X);return k>0?k-.5:.5}class Xm{constructor(k,e,x,_,u=0){this.x=k,this.y=e,this.width=x,this.height=_,this.padding=u,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}setBorders({top:k,bottom:e,left:x,right:_}){k&&(this.borderTop=k),_&&(this.borderRight=_),e&&(this.borderBottom=e),x&&(this.borderLeft=x)}innerWidth(){return this.width-this.padding*2-2}innerHeight(){return this.height-this.padding*2-2}textx(k){const{width:e,padding:x}=this;let{x:_}=this;return k==="left"?_+=x:k==="center"?_+=e/2:k==="right"&&(_+=e-x),_}texty(k,e){const{height:x,padding:_}=this;let{y:u}=this;return k==="top"?u+=_:k==="middle"?u+=x/2-e/2:k==="bottom"&&(u+=x-_-e),u}topxys(){const{x:k,y:e,width:x}=this;return[[k,e],[k+x,e]]}rightxys(){const{x:k,y:e,width:x,height:_}=this;return[[k+x,e],[k+x,e+_]]}bottomxys(){const{x:k,y:e,width:x,height:_}=this;return[[k,e+_],[k+x,e+_]]}leftxys(){const{x:k,y:e,height:x}=this;return[[k,e],[k,e+x]]}}function Bl(X,k,e,x,_,u,m){const g={x:0,y:0};X==="underline"?_==="bottom"?g.y=0:_==="top"?g.y=-(u+2):g.y=-u/2:X==="strike"&&(_==="bottom"?g.y=u/2:_==="top"&&(g.y=-(u/2+2))),x==="center"?g.x=m/2:x==="right"&&(g.x=m),this.line([k-g.x,e-g.y],[k-g.x+m,e-g.y])}class pc{constructor(k,e,x){this.el=k,this.ctx=k.getContext("2d"),this.resize(e,x),this.ctx.scale(Zo(),Zo())}resize(k,e){this.el.style.width=`${k}px`,this.el.style.height=`${e}px`,this.el.width=zt(k),this.el.height=zt(e)}clear(){const{width:k,height:e}=this.el;return this.ctx.clearRect(0,0,k,e),this}attr(k){return Object.assign(this.ctx,k),this}save(){return this.ctx.save(),this.ctx.beginPath(),this}restore(){return this.ctx.restore(),this}beginPath(){return this.ctx.beginPath(),this}translate(k,e){return this.ctx.translate(zt(k),zt(e)),this}scale(k,e){return this.ctx.scale(k,e),this}clearRect(k,e,x,_){return this.ctx.clearRect(k,e,x,_),this}fillRect(k,e,x,_){return this.ctx.fillRect(zt(k)-.5,zt(e)-.5,zt(x),zt(_)),this}fillText(k,e,x){return this.ctx.fillText(k,zt(e),zt(x)),this}text(k,e,x={},_=!0){const{ctx:u}=this,{align:m,valign:g,font:b,color:w,strike:f,underline:y}=x,h=e.textx(m);u.save(),u.beginPath(),this.attr({textAlign:m,textBaseline:g,font:`${b.italic?"italic":""} ${b.bold?"bold":""} ${zt(b.size)}px ${b.name}`,fillStyle:w,strokeStyle:w});const l=`${k}`.split(` `),d=e.innerWidth(),s=[];l.forEach(a=>{const r=u.measureText(a).width;if(_&&r>zt(d)){let t={w:0,len:0,start:0};for(let i=0;i=zt(d)&&(s.push(a.substr(t.start,t.len)),t={w:0,len:0,start:i}),t.len+=1,t.w+=u.measureText(a[i]).width+1;t.len>0&&s.push(a.substr(t.start,t.len))}else s.push(a)});const v=(s.length-1)*(b.size+2);let c=e.texty(g,v);return s.forEach(a=>{const r=u.measureText(a).width;this.fillText(a,h,c),f&&Bl.call(this,"strike",h,c,m,g,b.size,r),y&&Bl.call(this,"underline",h,c,m,g,b.size,r),c+=b.size+2}),u.restore(),this}border(k,e){const{ctx:x}=this;return x.lineWidth=Sf,x.strokeStyle=e,k==="medium"?x.lineWidth=zt(2)-.5:k==="thick"?x.lineWidth=zt(3):k==="dashed"?x.setLineDash([zt(3),zt(2)]):k==="dotted"?x.setLineDash([zt(1),zt(1)]):k==="double"&&x.setLineDash([zt(2),0]),this}line(...k){const{ctx:e}=this;if(k.length>1){e.beginPath();const[x,_]=k[0];e.moveTo(ya(x),ya(_));for(let u=1;u{const k=[],e=[];let x=[],_=0,u="",m=1,g="";for(let b=0;b="a"&&w<="z")x.push(w.toUpperCase());else if(w>="0"&&w<="9"||w>="A"&&w<="Z"||w===".")x.push(w);else if(w==='"'){for(b+=1;X.charAt(b)!=='"';)x.push(X.charAt(b)),b+=1;e.push(`"${x.join("")}`),x=[]}else if(w==="-"&&/[+\-*/,(]/.test(g))x.push(w);else{if(w!=="("&&x.length>0&&e.push(x.join("")),w===")"){let f=k.pop();if(_===2)try{const[y,h]=Ti(e.pop()),[l,d]=Ti(e.pop());let s=0;for(let v=l;v<=y;v+=1)for(let c=d;c<=h;c+=1)e.push(hi(v,c)),s+=1;e.push([f,s])}catch{}else if(_===1||_===3)_===3&&e.push(u),e.push([f,m]),m=1;else for(;f!=="("&&(e.push(f),!(k.length<=0));)f=k.pop();_=0}else if(w==="="||w===">"||w==="<"){const f=X.charAt(b+1);u=w,(f==="="||f==="-")&&(u+=f,b+=1),_=3}else if(w===":")_=2;else if(w===",")_===3&&e.push(u),_=1,m+=1;else if(w==="("&&x.length>0)k.push(x.join(""));else{if(k.length>0&&(w==="+"||w==="-")){let f=k[k.length-1];if(f!=="("&&e.push(k.pop()),f==="*"||f==="/")for(;k.length>0&&(f=k[k.length-1],f!=="(");)e.push(k.pop())}else if(k.length>0){const f=k[k.length-1];(f==="*"||f==="/")&&e.push(k.pop())}k.push(w)}x=[]}g=w}}for(x.length>0&&e.push(x.join(""));k.length>0;)e.push(k.pop());return e},Wm=(X,k)=>{const[e]=X;let x=X;if(e==='"')return X.substring(1);let _=1;if(e==="-"&&(x=X.substring(1),_=-1),x[0]>="0"&&x[0]<="9")return _*Number(x);const[u,m]=Ti(x);return _*k(u,m)},$m=(X,k,e,x)=>{const _=[];for(let u=0;u"||g==="<"){let b=_.pop();Number.isNaN(b)||(b=Number(b));let w=_.pop();Number.isNaN(w)||(w=Number(w));let f=!1;g==="="?f=w===b:m===">"?f=w>b:m===">="?f=w>=b:m==="<"?f=w="a"&&g<="z"||g>="A"&&g<="Z")&&x.push(m),_.push(Wm(m,e)),x.pop()}}return _[0]},yc=(X,k,e,x=[])=>{if(X[0]==="="){const _=Um(X.substring(1));return _.length<=0?X:$m(_,k,(u,m)=>yc(e(u,m),k,e,x),x)}return X},Vm={render:yc},kf=[{key:"SUM",title:Jt("formula.sum"),render:X=>X.reduce((k,e)=>ji("+",k,e),0)},{key:"AVERAGE",title:Jt("formula.average"),render:X=>X.reduce((k,e)=>Number(k)+Number(e),0)/X.length},{key:"MAX",title:Jt("formula.max"),render:X=>Math.max(...X.map(k=>Number(k)))},{key:"MIN",title:Jt("formula.min"),render:X=>Math.min(...X.map(k=>Number(k)))},{key:"IF",title:Jt("formula._if"),render:([X,k,e])=>X?k:e},{key:"AND",title:Jt("formula.and"),render:X=>X.every(k=>k)},{key:"OR",title:Jt("formula.or"),render:X=>X.some(k=>k)},{key:"CONCAT",title:Jt("formula.concat"),render:X=>X.join("")}],Km=kf,vc={};kf.forEach(X=>{vc[X.key]=X});const va=X=>X,Bo=X=>{if(/^(-?\d*.?\d*)$/.test(X)){const k=Number(X).toFixed(2).toString(),[e,...x]=k.split("\\.");return[e.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),...x]}return X},Ha=[{key:"normal",title:Jt("format.normal"),type:"string",render:va},{key:"text",title:Jt("format.text"),type:"string",render:va},{key:"number",title:Jt("format.number"),type:"number",label:"1,000.12",render:Bo},{key:"percent",title:Jt("format.percent"),type:"number",label:"10.12%",render:X=>`${X}%`},{key:"rmb",title:Jt("format.rmb"),type:"number",label:"¥10.00",render:X=>`¥${Bo(X)}`},{key:"usd",title:Jt("format.usd"),type:"number",label:"$10.00",render:X=>`$${Bo(X)}`},{key:"eur",title:Jt("format.eur"),type:"number",label:"€10.00",render:X=>`€${Bo(X)}`},{key:"date",title:Jt("format.date"),type:"date",label:"26/09/2008",render:va},{key:"time",title:Jt("format.time"),type:"date",label:"15:59:00",render:va},{key:"datetime",title:Jt("format.datetime"),type:"date",label:"26/09/2008 15:59:00",render:va},{key:"duration",title:Jt("format.duration"),type:"date",label:"24:01:00",render:va}],mc={};Ha.forEach(X=>{mc[X.key]=X});const Gm=5,Zm={fillStyle:"#f4f5f8"},Ym={fillStyle:"#fff",lineWidth:Sf,strokeStyle:"#e6e6e6"};function Jm(){return{textAlign:"center",textBaseline:"middle",font:`500 ${zt(12)}px Source Sans Pro`,fillStyle:"#585757",lineWidth:Sf(),strokeStyle:"#e6e6e6"}}function bc(X,k,e,x=0){const{left:_,top:u,width:m,height:g}=X.cellRect(k,e);return new Xm(_,u+x,m,g,Gm)}function Yo(X,k,e,x,_=0){const{sortedRowMap:u,rows:m,cols:g}=k;if(m.isHide(e)||g.isHide(x))return;let b=e;u.has(e)&&(b=u.get(e));const w=k.getCell(b,x);if(w===null)return;let f=!1;"editable"in w&&w.editable===!1&&(f=!0);const y=k.getCellStyleOrDefault(b,x),h=bc(k,e,x,_);h.bgcolor=y.bgcolor,y.border!==void 0&&(h.setBorders(y.border),X.strokeBorders(h)),X.rect(h,()=>{let l="";k.settings.evalPaused?l=w.text||"":l=Vm.render(w.text||"",vc,(v,c)=>k.getCellTextOrDefault(c,v)),y.format&&(l=mc[y.format].render(l));const d=Object.assign({},y.font);d.size=Hm(d.size),X.text(l,h,{align:y.align,valign:y.valign,font:d,color:y.color,strike:y.strike,underline:y.underline},y.textwrap),k.validations.getError(e,x)&&X.error(h),f&&X.frozen(h)})}function Qm(X){const{data:k,draw:e}=this;if(X){const{autoFilter:x}=k;if(!x.active())return;const _=x.hrange();X.intersects(_)&&_.each((u,m)=>{const g=bc(k,u,m);e.dropdown(g)})}}function jo(X,k,e,x,_){const{draw:u,data:m}=this;u.save(),u.translate(k,e).translate(x,_);const{exceptRowSet:g}=m,b=y=>{const h=g.has(y);if(h){const l=m.rows.getHeight(y);u.translate(0,-l)}return!h},w=m.exceptRowTotalHeight(X.sri,X.eri);u.save(),u.translate(0,-w),X.each((y,h)=>{Yo(u,m,y,h)},y=>b(y)),u.restore();const f=new Set;u.save(),u.translate(0,-w),m.eachMergesInView(X,({sri:y,sci:h,eri:l})=>{if(!g.has(y))Yo(u,m,y,h);else if(!f.has(y)){f.add(y);const d=m.rows.sumHeight(y,l+1);u.translate(0,-d)}}),u.restore(),Qm.call(this,X),u.restore()}function Ll(X,k,e,x){const{draw:_}=this;_.save(),_.attr({fillStyle:"rgba(75, 137, 255, 0.08)"}).fillRect(X,k,e,x),_.restore()}function Lo(X,k,e,x,_,u){const{draw:m,data:g}=this,b=k.h,w=k.w,f=u+x,y=_+e;m.save(),m.attr(Zm),(X==="all"||X==="left")&&m.fillRect(0,f,e,b),(X==="all"||X==="top")&&m.fillRect(y,0,w,x);const{sri:h,sci:l,eri:d,eci:s}=g.selector.range;m.attr(Jm()),(X==="all"||X==="left")&&(g.rowEach(k.sri,k.eri,(v,c,a)=>{const r=f+c,t=v;m.line([0,r],[e,r]),h<=t&&t0&&g.rows.isHide(v-1)&&(m.save(),m.attr({strokeStyle:"#c6c6c6"}),m.line([5,r+5],[e-5,r+5]),m.restore())}),m.line([0,b+f],[e,b+f]),m.line([e,f],[e,b+f])),(X==="all"||X==="top")&&(g.colEach(k.sci,k.eci,(v,c,a)=>{const r=y+c,t=v;m.line([r,0],[r,x]),l<=t&&t0&&g.cols.isHide(v-1)&&(m.save(),m.attr({strokeStyle:"#c6c6c6"}),m.line([r+5,5],[r+5,x-5]),m.restore())}),m.line([w+y,0],[w+y,x]),m.line([0,x],[w+y,x])),m.restore()}function qm(X,k){const{draw:e}=this;e.save(),e.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,X,k),e.restore()}function zo({sri:X,sci:k,eri:e,eci:x,w:_,h:u},m,g,b,w){const{draw:f,data:y}=this,{settings:h}=y;if(f.save(),f.attr(Ym).translate(m+b,g+w),!h.showGrid){f.restore();return}y.rowEach(X,e,(l,d,s)=>{l!==X&&f.line([0,d],[_,d]),l===e&&f.line([0,d+s],[_,d+s])}),y.colEach(k,x,(l,d,s)=>{l!==k&&f.line([d,0],[d,u]),l===x&&f.line([d+s,0],[d+s,u])}),f.restore()}function eb(X,k,e,x){const{draw:_,data:u}=this,m=u.viewWidth()-X,g=u.viewHeight()-k;_.save().translate(X,k).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),_.line([0,x],[m,x]),_.line([e,0],[e,g]),_.restore()}class tb{constructor(k,e){this.el=k,this.draw=new pc(k,e.viewWidth(),e.viewHeight()),this.data=e}resetData(k){this.data=k,this.render()}render(){const{data:k}=this,{rows:e,cols:x}=k,_=x.indexWidth,u=e.height;this.draw.resize(k.viewWidth(),k.viewHeight()),this.clear();const m=k.viewRange(),g=k.freezeTotalWidth(),b=k.freezeTotalHeight(),{x:w,y:f}=k.scroll;zo.call(this,m,_,u,g,b),jo.call(this,m,_,u,-w,-f),Lo.call(this,"all",m,_,u,g,b),qm.call(this,_,u);const[y,h]=k.freeze;if(y>0||h>0){if(y>0){const d=m.clone();d.sri=0,d.eri=y-1,d.h=b,zo.call(this,d,_,u,g,0),jo.call(this,d,_,u,-w,0),Lo.call(this,"top",d,_,u,g,0)}if(h>0){const d=m.clone();d.sci=0,d.eci=h-1,d.w=g,zo.call(this,d,_,u,0,b),Lo.call(this,"left",d,_,u,0,b),jo.call(this,d,_,u,0,-f)}const l=k.freezeViewRange();zo.call(this,l,_,u,0,0),Lo.call(this,"all",l,_,u,0,0),jo.call(this,l,_,u,0,0),eb.call(this,_,u,g,b)}}clear(){this.draw.clear()}}const Xo=[["A3",11.69,16.54],["A4",8.27,11.69],["A5",5.83,8.27],["B4",9.84,13.9],["B5",6.93,9.84]],yf=["landscape","portrait"];function Jo(X){return parseInt(96*X,10)}function zl(X){X==="cancel"?this.el.hide():this.toPrint()}function rb(X){const{paper:k}=this,{value:e}=X.target,x=Xo[e];k.w=Jo(x[1]),k.h=Jo(x[2]),this.preview()}function nb(X){const{paper:k}=this,{value:e}=X.target,x=yf[e];k.orientation=x,this.preview()}let ib=class{constructor(k){this.paper={w:Jo(Xo[0][1]),h:Jo(Xo[0][2]),padding:50,orientation:yf[0],get width(){return this.orientation==="landscape"?this.h:this.w},get height(){return this.orientation==="landscape"?this.w:this.h}},this.data=k,this.el=We("div",`${lt}-print`).children(We("div",`${lt}-print-bar`).children(We("div","-title").child("Print settings"),We("div","-right").children(We("div",`${lt}-buttons`).children(new Li("cancel").on("click",zl.bind(this,"cancel")),new Li("next","primary").on("click",zl.bind(this,"next"))))),We("div",`${lt}-print-content`).children(this.contentEl=We("div","-content"),We("div","-sider").child(We("form","").children(We("fieldset","").children(We("label","").child(`${Cr("print.size")}`),We("select","").children(...Xo.map((e,x)=>We("option","").attr("value",x).child(`${e[0]} ( ${e[1]}''x${e[2]}'' )`))).on("change",rb.bind(this))),We("fieldset","").children(We("label","").child(`${Cr("print.orientation")}`),We("select","").children(...yf.map((e,x)=>We("option","").attr("value",x).child(`${Cr("print.orientations")[x]}`))).on("change",nb.bind(this))))))).hide()}resetData(k){this.data=k}preview(){const{data:k,paper:e}=this,{width:x,height:_,padding:u}=e,m=x-u*2,g=_-u*2,b=k.contentRange(),w=parseInt(b.h/g,10)+1,f=m/b.w;let y=u;const h=u;f>1&&(y+=(m-b.w)/2);let l=0,d=0;this.contentEl.html(""),this.canvases=[];const s={sri:0,sci:0,eri:0,eci:0};for(let v=0;v{Yo(i,k,o,p,n)}),i.restore(),s.sri=s.eri,s.sci=s.eci,d+=a,this.contentEl.child(We("div",`${lt}-canvas-card-wraper`).child(r.child(t)))}this.el.show()}toPrint(){this.el.hide();const{paper:k}=this,e=We("iframe","").hide(),{el:x}=e;window.document.body.appendChild(x);const{contentWindow:_}=x,u=_.document,m=document.createElement("style");m.innerHTML=` @page { size: ${k.width}px ${k.height}px; }; canvas { page-break-before: auto; page-break-after: always; image-rendering: pixelated; }; `,u.head.appendChild(m),this.canvases.forEach(g=>{const b=g.cloneNode(!1);b.getContext("2d").drawImage(g,0,0),u.body.appendChild(b)}),_.print()}};const ab=[{key:"copy",title:Jt("contextmenu.copy"),label:"Ctrl+C"},{key:"cut",title:Jt("contextmenu.cut"),label:"Ctrl+X"},{key:"paste",title:Jt("contextmenu.paste"),label:"Ctrl+V"},{key:"paste-value",title:Jt("contextmenu.pasteValue"),label:"Ctrl+Shift+V"},{key:"paste-format",title:Jt("contextmenu.pasteFormat"),label:"Ctrl+Alt+V"},{key:"divider"},{key:"insert-row",title:Jt("contextmenu.insertRow")},{key:"insert-column",title:Jt("contextmenu.insertColumn")},{key:"divider"},{key:"delete-row",title:Jt("contextmenu.deleteRow")},{key:"delete-column",title:Jt("contextmenu.deleteColumn")},{key:"delete-cell-text",title:Jt("contextmenu.deleteCellText")},{key:"hide",title:Jt("contextmenu.hide")},{key:"divider"},{key:"validation",title:Jt("contextmenu.validation")},{key:"divider"},{key:"cell-printable",title:Jt("contextmenu.cellprintable")},{key:"cell-non-printable",title:Jt("contextmenu.cellnonprintable")},{key:"divider"},{key:"cell-editable",title:Jt("contextmenu.celleditable")},{key:"cell-non-editable",title:Jt("contextmenu.cellnoneditable")}];function ob(X){return X.key==="divider"?We("div",`${lt}-item divider`):We("div",`${lt}-item`).on("click",()=>{this.itemClick(X.key),this.hide()}).children(X.title(),We("div","label").child(X.label||""))}function sb(){return ab.map(X=>ob.call(this,X))}let fb=class{constructor(k,e=!1){this.menuItems=sb.call(this),this.el=We("div",`${lt}-contextmenu`).children(...this.menuItems).hide(),this.viewFn=k,this.itemClick=()=>{},this.isHide=e,this.setMode("range")}setMode(k){const e=this.menuItems[12];k==="row-col"?e.show():e.hide()}hide(){const{el:k}=this;k.hide(),_a(k)}setPosition(k,e){if(this.isHide)return;const{el:x}=this,{width:_}=x.show().offset(),u=this.viewFn(),m=u.height/2;let g=k;u.width-k<=_&&(g-=_),x.css("left",`${g}px`),e>m?x.css("bottom",`${u.height-e}px`).css("max-height",`${e}px`).css("top","auto"):x.css("top",`${e}px`).css("max-height",`${u.height-e}px`).css("bottom","auto"),Va(x)}};function ub(X,k){if(k.classList.contains("active"))return;const{left:e,top:x,width:_,height:u}=k.getBoundingClientRect(),m=We("div",`${lt}-tooltip`).html(X).show();document.body.appendChild(m.el);const g=m.box();m.css("left",`${e+_/2-g.width/2}px`).css("top",`${x+u+2}px`),ln(k,"mouseleave",()=>{document.body.contains(m.el)&&document.body.removeChild(m.el)}),ln(k,"click",()=>{document.body.contains(m.el)&&document.body.removeChild(m.el)})}class Of{constructor(k,e,x){this.tip=Cr(`toolbar.${k.replace(/-[a-z]/g,_=>_[1].toUpperCase())}`),e&&(this.tip+=` (${e})`),this.tag=k,this.shortcut=e,this.value=x,this.el=this.element(),this.change=()=>{}}element(){const{tip:k}=this;return We("div",`${lt}-toolbar-btn`).on("mouseenter",e=>{ub(k,e.target)}).attr("data-tooltip",k)}setState(){}}class Qn extends Of{dropdown(){}getValue(k){return k}element(){const{tag:k}=this;return this.dd=this.dropdown(),this.dd.change=e=>this.change(k,this.getValue(e)),super.element().child(this.dd)}setState(k){k&&(this.value=k,this.dd.setTitle(k))}}class qn extends Xi{constructor(k,e,x,_,...u){super("div",`${lt}-dropdown ${_}`),this.title=k,this.change=()=>{},this.headerClick=()=>{},typeof k=="string"?this.title=We("div",`${lt}-dropdown-title`).child(k):x&&this.title.addClass("arrow-left"),this.contentEl=We("div",`${lt}-dropdown-content`).css("width",e).hide(),this.setContentChildren(...u),this.headerEl=We("div",`${lt}-dropdown-header`),this.headerEl.on("click",()=>{this.contentEl.css("display")!=="block"?this.show():this.hide()}).children(this.title,x?We("div",`${lt}-icon arrow-right`).child(We("div",`${lt}-icon-img arrow-down`)):""),this.children(this.headerEl,this.contentEl)}setContentChildren(...k){this.contentEl.html(""),k.length>0&&this.contentEl.children(...k)}setTitle(k){this.title.html(k),this.hide()}show(){const{contentEl:k}=this;k.show(),this.parent().active(),Va(this.parent(),()=>{this.hide()})}hide(){this.parent().active(!1),this.contentEl.hide(),_a(this.parent())}}function lb(X){return We("div",`${lt}-item`).child(new Kr(X))}class gc extends qn{constructor(k,e){const x=new Kr(`align-${e}`),_=k.map(u=>lb(`align-${u}`).on("click",()=>{this.setTitle(u),this.change(u)}));super(x,"auto",!0,"bottom-left",..._)}setTitle(k){this.title.setName(`align-${k}`),this.hide()}}class cb extends Qn{constructor(k){super("align","",k)}dropdown(){const{value:k}=this;return new gc(["left","center","right"],k)}}class hb extends Qn{constructor(k){super("valign","",k)}dropdown(){const{value:k}=this;return new gc(["top","middle","bottom"],k)}}class di extends Of{element(){const{tag:k}=this;return super.element().child(new Kr(k)).on("click",()=>this.click())}click(){this.change(this.tag,this.toggle())}setState(k){this.el.active(k)}toggle(){return this.el.toggle()}active(){return this.el.hasClass("active")}}class db extends di{constructor(){super("autofilter")}setState(){}}class pb extends di{constructor(){super("font-bold","Ctrl+B")}}class yb extends di{constructor(){super("font-italic","Ctrl+I")}}class vb extends di{constructor(){super("strike","Ctrl+U")}}class mb extends di{constructor(){super("underline","Ctrl+U")}}const bb=["#ffffff","#000100","#e7e5e6","#445569","#5b9cd6","#ed7d31","#a5a5a5","#ffc001","#4371c6","#71ae47"],gb=[["#f2f2f2","#7f7f7f","#d0cecf","#d5dce4","#deeaf6","#fce5d5","#ededed","#fff2cd","#d9e2f3","#e3efd9"],["#d8d8d8","#595959","#afabac","#adb8ca","#bdd7ee","#f7ccac","#dbdbdb","#ffe59a","#b3c6e7","#c5e0b3"],["#bfbfbf","#3f3f3f","#756f6f","#8596b0","#9cc2e6","#f4b184","#c9c9c9","#fed964","#8eaada","#a7d08c"],["#a5a5a5","#262626","#3a3839","#333f4f","#2e75b5","#c45a10","#7b7b7b","#bf8e01","#2f5596","#538136"],["#7f7f7f","#0c0c0c","#171516","#222a35","#1f4e7a","#843c0a","#525252","#7e6000","#203864","#365624"]],_b=["#c00000","#fe0000","#fdc101","#ffff01","#93d051","#00b04e","#01b0f1","#0170c1","#012060","#7030a0"];function Qs(X){return We("td","").child(We("div",`${lt}-color-palette-cell`).on("click.stop",()=>this.change(X)).css("background-color",X))}class wb{constructor(){this.el=We("div",`${lt}-color-palette`),this.change=()=>{};const k=We("table","").children(We("tbody","").children(We("tr",`${lt}-theme-color-placeholders`).children(...bb.map(e=>Qs.call(this,e))),...gb.map(e=>We("tr",`${lt}-theme-colors`).children(...e.map(x=>Qs.call(this,x)))),We("tr",`${lt}-standard-colors`).children(..._b.map(e=>Qs.call(this,e)))));this.el.child(k)}}class Ef extends qn{constructor(k,e){const x=new Kr(k).css("height","16px").css("border-bottom",`3px solid ${e}`),_=new wb;_.change=u=>{this.setTitle(u),this.change(u)},super(x,"auto",!1,"bottom-left",_.el)}setTitle(k){this.title.css("border-color",k),this.hide()}}const xb=[["thin",''],["medium",''],["thick",''],["dashed",''],["dotted",'']];class Sb extends qn{constructor(k){const e=new Kr("line-type");let x=0;const _=xb.map((u,m)=>We("div",`${lt}-item state ${k===u[0]?"checked":""}`).on("click",()=>{_[x].toggle("checked"),_[m].toggle("checked"),x=m,this.hide(),this.change(u)}).child(We("div",`${lt}-line-type`).html(u[1])));super(e,"auto",!1,"bottom-left",..._)}}function Xl(...X){return We("table","").child(We("tbody","").children(...X))}function Hl(X){return We("td","").child(We("div",`${lt}-border-palette-cell`).child(new Kr(`border-${X}`)).on("click",()=>{this.mode=X;const{mode:k,style:e,color:x}=this;this.change({mode:k,style:e,color:x})}))}class kb{constructor(){this.color="#000",this.style="thin",this.mode="all",this.change=()=>{},this.ddColor=new Ef("line-color",this.color),this.ddColor.change=e=>{this.color=e},this.ddType=new Sb(this.style),this.ddType.change=([e])=>{this.style=e},this.el=We("div",`${lt}-border-palette`);const k=Xl(We("tr","").children(We("td",`${lt}-border-palette-left`).child(Xl(We("tr","").children(...["all","inside","horizontal","vertical","outside"].map(e=>Hl.call(this,e))),We("tr","").children(...["left","top","right","bottom","none"].map(e=>Hl.call(this,e))))),We("td",`${lt}-border-palette-right`).children(We("div",`${lt}-toolbar-btn`).child(this.ddColor.el),We("div",`${lt}-toolbar-btn`).child(this.ddType.el))));this.el.child(k)}}class Ob extends qn{constructor(){const k=new Kr("border-all"),e=new kb;e.change=x=>{this.change(x),this.hide()},super(k,"auto",!1,"bottom-left",e.el)}}class Eb extends Qn{constructor(){super("border")}dropdown(){return new Ob}}class qo extends Of{element(){return super.element().child(new Kr(this.tag)).on("click",()=>this.change(this.tag))}setState(k){this.el.disabled(k)}}class Tb extends qo{constructor(){super("clearformat")}}class Rb extends di{constructor(){super("paintformat")}setState(){}}class Cb extends Qn{constructor(k){super("color",void 0,k)}dropdown(){const{tag:k,value:e}=this;return new Ef(k,e)}}class Pb extends Qn{constructor(k){super("bgcolor",void 0,k)}dropdown(){const{tag:k,value:e}=this;return new Ef(k,e)}}class Ab extends qn{constructor(){const k=pf.map(e=>We("div",`${lt}-item`).on("click",()=>{this.setTitle(`${e.pt}`),this.change(e)}).child(`${e.pt}`));super("10","60px",!0,"bottom-left",...k)}}let Mb=class extends Qn{constructor(){super("font-size")}getValue(k){return k.pt}dropdown(){return new Ab}};class Ib extends qn{constructor(){const k=jl.map(e=>We("div",`${lt}-item`).on("click",()=>{this.setTitle(e.title),this.change(e)}).child(e.title));super(jl[0].title,"160px",!0,"bottom-left",...k)}}class Db extends Qn{constructor(){super("font-name")}getValue(k){return k.key}dropdown(){return new Ib}}class Nb extends qn{constructor(){let k=Ha.slice(0);k.splice(2,0,{key:"divider"}),k.splice(8,0,{key:"divider"}),k=k.map(e=>{const x=We("div",`${lt}-item`);return e.key==="divider"?x.addClass("divider"):(x.child(e.title()).on("click",()=>{this.setTitle(e.title()),this.change(e)}),e.label&&x.child(We("div","label").html(e.label))),x}),super("Normal","220px",!0,"bottom-left",...k)}setTitle(k){for(let e=0;eWe("div",`${lt}-item`).on("click",()=>{this.hide(),this.change(e)}).child(e.key));super(new Kr("formula"),"180px",!0,"bottom-left",...k)}}class jb extends Qn{constructor(){super("formula")}getValue(k){return k.key}dropdown(){return new Bb}}class Lb extends di{constructor(){super("freeze")}}class zb extends di{constructor(){super("merge")}setState(k,e){this.el.active(k).disabled(e)}}class Xb extends qo{constructor(){super("redo","Ctrl+Y")}}class Hb extends qo{constructor(){super("undo","Ctrl+Z")}}class Ub extends qo{constructor(){super("print","Ctrl+P")}}class Wb extends di{constructor(){super("textwrap")}}let $b=class extends qn{constructor(){const k=new Kr("ellipsis"),e=We("div",`${lt}-toolbar-more`);super(k,"auto",!1,"bottom-right",e),this.moreBtns=e,this.contentEl.css("max-width","420px")}};class Vb extends Qn{constructor(){super("more"),this.el.hide()}dropdown(){return new $b}show(){this.el.show()}hide(){this.el.hide()}}function ma(){return We("div",`${lt}-toolbar-divider`)}function Kb(){this.btns2=[],this.items.forEach(X=>{if(Array.isArray(X))X.forEach(({el:k})=>{const e=k.box(),{marginLeft:x,marginRight:_}=k.computedStyle();this.btns2.push([k,e.width+parseInt(x,10)+parseInt(_,10)])});else{const k=X.box(),{marginLeft:e,marginRight:x}=X.computedStyle();this.btns2.push([X,k.width+parseInt(e,10)+parseInt(x,10)])}})}function Ul(){const{el:X,btns:k,moreEl:e,btns2:x}=this,{moreBtns:_,contentEl:u}=e.dd;X.css("width",`${this.widthFn()-60}px`);const m=X.box();let g=160,b=12;const w=[],f=[];x.forEach(([y,h],l)=>{g+=h,l===x.length-1||g0?e.show():e.hide()}class Gb{constructor(k,e,x=!1){this.data=k,this.change=()=>{},this.widthFn=e,this.isHide=x;const _=k.defaultStyle();this.items=[[this.undoEl=new Hb,this.redoEl=new Xb,new Ub,this.paintformatEl=new Rb,this.clearformatEl=new Tb],ma(),[this.formatEl=new Fb],ma(),[this.fontEl=new Db,this.fontSizeEl=new Mb],ma(),[this.boldEl=new pb,this.italicEl=new yb,this.underlineEl=new mb,this.strikeEl=new vb,this.textColorEl=new Cb(_.color)],ma(),[this.fillColorEl=new Pb(_.bgcolor),this.borderEl=new Eb,this.mergeEl=new zb],ma(),[this.alignEl=new cb(_.align),this.valignEl=new hb(_.valign),this.textwrapEl=new Wb],ma(),[this.freezeEl=new Lb,this.autofilterEl=new db,this.formulaEl=new jb,this.moreEl=new Vb]],this.el=We("div",`${lt}-toolbar`),this.btns=We("div",`${lt}-toolbar-btns`),this.items.forEach(u=>{Array.isArray(u)?u.forEach(m=>{this.btns.child(m.el),m.change=(...g)=>{this.change(...g)}}):this.btns.child(u.el)}),this.el.child(this.btns),x?this.el.hide():(this.reset(),setTimeout(()=>{Kb.call(this),Ul.call(this)},0),ln(window,"resize",()=>{Ul.call(this)}))}paintformatActive(){return this.paintformatEl.active()}paintformatToggle(){this.paintformatEl.toggle()}trigger(k){this[`${k}El`].click()}resetData(k){this.data=k,this.reset()}reset(){if(this.isHide)return;const{data:k}=this,e=k.getSelectedCellStyle();this.undoEl.setState(!k.canUndo()),this.redoEl.setState(!k.canRedo()),this.mergeEl.setState(k.canUnmerge(),!k.selector.multiple()),this.autofilterEl.setState(!k.canAutofilter());const{font:x,format:_}=e;this.formatEl.setState(_),this.fontEl.setState(x.name),this.fontSizeEl.setState(x.size),this.boldEl.setState(x.bold),this.italicEl.setState(x.italic),this.underlineEl.setState(e.underline),this.strikeEl.setState(e.strike),this.textColorEl.setState(e.color),this.fillColorEl.setState(e.bgcolor),this.alignEl.setState(e.align),this.valignEl.setState(e.valign),this.textwrapEl.setState(e.textwrap),this.freezeEl.setState(k.freezeIsActive())}}class Zb{constructor(k,e,x="600px"){this.title=k,this.el=We("div",`${lt}-modal`).css("width",x).children(We("div",`${lt}-modal-header`).children(new Kr("close").on("click.stop",()=>this.hide()),this.title),We("div",`${lt}-modal-content`).children(...e)).hide()}show(){this.dimmer=We("div",`${lt}-dimmer active`),document.body.appendChild(this.dimmer.el);const{width:k,height:e}=this.el.show().box(),{clientHeight:x,clientWidth:_}=document.documentElement;this.el.offset({left:(_-k)/2,top:(x-e)/3}),window.xkeydownEsc=u=>{u.keyCode===27&&this.hide()},ln(window,"keydown",window.xkeydownEsc)}hide(){this.el.hide(),document.body.removeChild(this.dimmer.el),Ko(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}class ba{constructor(k,e){this.vchange=()=>{},this.el=We("div",`${lt}-form-input`),this.input=We("input","").css("width",k).on("input",x=>this.vchange(x)).attr("placeholder",e),this.el.child(this.input)}focus(){setTimeout(()=>{this.input.el.focus()},10)}hint(k){this.input.attr("placeholder",k)}val(k){return this.input.val(k)}}class qs{constructor(k,e,x,_=m=>m,u=()=>{}){this.key=k,this.getTitle=_,this.vchange=()=>{},this.el=We("div",`${lt}-form-select`),this.suggest=new hc(e.map(m=>({key:m,title:this.getTitle(m)})),m=>{this.itemClick(m.key),u(m.key),this.vchange(m.key)},x,this.el),this.el.children(this.itemEl=We("div","input-text").html(this.getTitle(k)),this.suggest.el).on("click",()=>this.show())}show(){this.suggest.search("")}itemClick(k){this.key=k,this.itemEl.html(this.getTitle(k))}val(k){return k!==void 0?(this.key=k,this.itemEl.html(this.getTitle(k)),this):this.key}}const Yb={number:/(^\d+$)|(^\d+(\.\d{0,4})?$)/,date:/^\d{4}-\d{1,2}-\d{1,2}$/};class Oi{constructor(k,e,x,_){this.label="",this.rule=e,x&&(this.label=We("label","label").css("width",`${_}px`).html(x)),this.tip=We("div","tip").child("tip").hide(),this.input=k,this.input.vchange=()=>this.validate(),this.el=We("div",`${lt}-form-field`).children(this.label,k.el,this.tip)}isShow(){return this.el.css("display")!=="none"}show(){this.el.show()}hide(){return this.el.hide(),this}val(k){return this.input.val(k)}hint(k){this.input.hint(k)}validate(){const{input:k,rule:e,tip:x,el:_}=this,u=k.val();return e.required&&/^\s*$/.test(u)?(x.html(Cr("validation.required")),_.addClass("error"),!1):(e.type||e.pattern)&&!(e.pattern||Yb[e.type]).test(u)?(x.html(Cr("validation.notMatch")),_.addClass("error"),!1):(_.removeClass("error"),!0)}}const Wl=100;class Jb extends Zb{constructor(){const k=new Oi(new qs("cell",["cell"],"100%",w=>Cr(`dataValidation.modeType.${w}`)),{required:!0},`${Cr("dataValidation.range")}:`,Wl),e=new Oi(new ba("120px","E3 or E3:F12"),{required:!0,pattern:/^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/}),x=new Oi(new qs("list",["list","number","date","phone","email"],"100%",w=>Cr(`dataValidation.type.${w}`),w=>this.criteriaSelected(w)),{required:!0},`${Cr("dataValidation.criteria")}:`,Wl),_=new Oi(new qs("be",["be","nbe","eq","neq","lt","lte","gt","gte"],"160px",w=>Cr(`dataValidation.operator.${w}`),w=>this.criteriaOperatorSelected(w)),{required:!0}).hide(),u=new Oi(new ba("70px","10"),{required:!0}).hide(),m=new Oi(new ba("70px","100"),{required:!0,type:"number"}).hide(),g=new Oi(new ba("120px","a,b,c"),{required:!0}),b=new Oi(new ba("70px","10"),{required:!0,type:"number"}).hide();super(Cr("contextmenu.validation"),[We("div",`${lt}-form-fields`).children(k.el,e.el),We("div",`${lt}-form-fields`).children(x.el,_.el,u.el,m.el,b.el,g.el),We("div",`${lt}-buttons`).children(new Li("cancel").on("click",()=>this.btnClick("cancel")),new Li("remove").on("click",()=>this.btnClick("remove")),new Li("save","primary").on("click",()=>this.btnClick("save")))]),this.mf=k,this.rf=e,this.cf=x,this.of=_,this.minvf=u,this.maxvf=m,this.vf=b,this.svf=g,this.change=()=>{}}showVf(k){const e=k==="date"?"2018-11-12":"10",{vf:x}=this;x.input.hint(e),x.show()}criteriaSelected(k){const{of:e,minvf:x,maxvf:_,vf:u,svf:m}=this;k==="date"||k==="number"?(e.show(),x.rule.type=k,_.rule.type=k,k==="date"?(x.hint("2018-11-12"),_.hint("2019-11-12")):(x.hint("10"),_.hint("100")),x.show(),_.show(),u.hide(),m.hide()):(k==="list"?m.show():m.hide(),u.hide(),e.hide(),x.hide(),_.hide())}criteriaOperatorSelected(k){if(!k)return;const{minvf:e,maxvf:x,vf:_}=this;if(k==="be"||k==="nbe")e.show(),x.show(),_.hide();else{const u=this.cf.val();_.rule.type=u,u==="date"?_.hint("2018-11-12"):_.hint("10"),_.show(),e.hide(),x.hide()}}btnClick(k){if(k==="cancel")this.hide();else if(k==="remove")this.change("remove"),this.hide();else if(k==="save"){const e=["mf","rf","cf","of","svf","vf","minvf","maxvf"];for(let b=0;bthis.itemClick(X))}function Qb(X){const{filterbEl:k,filterValues:e}=this;k.html(""),Object.keys(X).forEach((_,u)=>{const m=X[_],g=e.includes(_)?"checked":"";k.child(We("div",`${lt}-item state ${g}`).on("click.stop",()=>this.filterClick(u,_)).children(_===""?Cr("filter.empty"):_,We("div","label").html(`(${m})`)))})}function Vl(){const{filterhEl:X,filterValues:k,values:e}=this;X.html(`${k.length} / ${e.length}`),X.checked(k.length===e.length)}class qb{constructor(){this.filterbEl=We("div",`${lt}-body`),this.filterhEl=We("div",`${lt}-header state`).on("click.stop",()=>this.filterClick(0,"all")),this.el=We("div",`${lt}-sort-filter`).children(this.sortAscEl=$l.call(this,"asc"),this.sortDescEl=$l.call(this,"desc"),_c("divider"),We("div",`${lt}-filter`).children(this.filterhEl,this.filterbEl),We("div",`${lt}-buttons`).children(new Li("cancel").on("click",()=>this.btnClick("cancel")),new Li("ok","primary").on("click",()=>this.btnClick("ok")))).hide(),this.ci=null,this.sortDesc=null,this.values=null,this.filterValues=[]}btnClick(k){if(k==="ok"){const{ci:e,sort:x,filterValues:_}=this;this.ok&&this.ok(e,x,"in",_)}this.hide()}itemClick(k){this.sort=k;const{sortAscEl:e,sortDescEl:x}=this;e.checked(k==="asc"),x.checked(k==="desc")}filterClick(k,e){const{filterbEl:x,filterValues:_,values:u}=this,m=x.children();e==="all"?m.length===_.length?(this.filterValues=[],m.forEach(g=>We(g).checked(!1))):(this.filterValues=Array.from(u),m.forEach(g=>We(g).checked(!0))):We(m[k]).toggle("checked")?_.push(e):_.splice(_.findIndex(b=>b===e),1),Vl.call(this)}set(k,e,x,_){this.ci=k;const{sortAscEl:u,sortDescEl:m}=this;_!==null?(this.sort=_.order,u.checked(_.asc()),m.checked(_.desc())):(this.sortDesc=null,u.checked(!1),m.checked(!1)),this.values=Object.keys(e),this.filterValues=x?Array.from(x.value):Object.keys(e),Qb.call(this,e,x),Vl.call(this)}setOffset(k){this.el.offset(k).show();let e=1;Va(this.el,()=>{e<=0&&this.hide(),e-=1})}show(){this.el.show()}hide(){this.el.hide(),_a(this.el)}}function wc(X,k){const e=We("div",`${lt}-toast`),x=We("div",`${lt}-dimmer active`),_=()=>{document.body.removeChild(e.el),document.body.removeChild(x.el)};e.children(We("div",`${lt}-toast-header`).children(new Kr("close").on("click.stop",()=>_()),X),We("div",`${lt}-toast-content`).html(k)),document.body.appendChild(e.el),document.body.appendChild(x.el);const{width:u,height:m}=e.box(),{clientHeight:g,clientWidth:b}=document.documentElement;e.offset({left:(b-u)/2,top:(g-m)/3})}function ef(X,k){let e;return(...x)=>{const _=this,u=x;e||(e=setTimeout(()=>{e=null,X.apply(_,u)},k))}}function eg(){const{data:X,verticalScrollbar:k,horizontalScrollbar:e}=this,{l:x,t:_,left:u,top:m,width:g,height:b}=X.getSelectedRect(),w=this.getTableOffset();if(Math.abs(u)+g>w.width)e.move({left:x+g-w.width});else{const f=X.freezeTotalWidth();uw.height)k.move({top:_+b-w.height-1});else{const f=X.freezeTotalHeight();m0&&(g-=1):k==="right"?(w!==g&&(g=w),g0&&(m-=1):k==="down"?(b!==m&&(m=b),m<_.len-1&&(m+=1)):k==="row-first"?g=0:k==="row-last"?g=u.len-1:k==="col-first"?m=0:k==="col-last"&&(m=_.len-1),X&&(e.moveIndexes=[m,g]),zi.call(this,X,m,g),eg.call(this)}function tg(X){if(X.buttons!==0||X.target.className===`${lt}-resizer-hover`)return;const{offsetX:k,offsetY:e}=X,{rowResizer:x,colResizer:_,tableEl:u,data:m}=this,{rows:g,cols:b}=m;if(k>b.indexWidth&&e>g.height){x.hide(),_.hide();return}const w=u.box(),f=m.getCellRectByXY(X.offsetX,X.offsetY);f.ri>=0&&f.ci===-1?(f.width=b.indexWidth,x.show(f,{width:w.width}),g.isHide(f.ri-1)?x.showUnhide(f.ri):x.hideUnhide()):x.hide(),f.ri===-1&&f.ci>=0?(f.height=g.height,_.show(f,{height:w.height}),b.isHide(f.ci-1)?_.showUnhide(f.ci):_.hideUnhide()):_.hide()}function rg(X){const{verticalScrollbar:k,horizontalScrollbar:e,data:x}=this,{top:_}=k.scroll(),{left:u}=e.scroll(),{rows:m,cols:g}=x,{deltaY:b,deltaX:w}=X,f=(v,c)=>{let a=v,r=0;do r=c(a),a+=1;while(r<=0);return r},y=v=>{if(v>0){const c=x.scroll.ri+1;if(cm.getHeight(r));k.move({top:_+a-1})}}else{const c=x.scroll.ri-1;if(c>=0){const a=f(c,r=>m.getHeight(r));k.move({top:c===0?0:_-a})}}},h=v=>{if(v>0){const c=x.scroll.ci+1;if(cg.getWidth(r));e.move({left:u+a-1})}}else{const c=x.scroll.ci-1;if(c>=0){const a=f(c,r=>g.getWidth(r));e.move({left:c===0?0:u-a})}}},l=Math.abs(b),d=Math.abs(w),s=Math.max(l,d);/Firefox/i.test(window.navigator.userAgent)&&ef(y(X.detail),50),s===d&&ef(h(w),50),s===l&&ef(y(b),50)}function ng(X,k){const{verticalScrollbar:e,horizontalScrollbar:x}=this,{top:_}=e.scroll(),{left:u}=x.scroll();X==="left"||X==="right"?x.move({left:u-k}):(X==="up"||X==="down")&&e.move({top:_-k})}function Tf(){const{data:X,verticalScrollbar:k}=this,{height:e}=this.getTableOffset(),x=X.exceptRowTotalHeight(0,-1);k.set(e,X.rows.totalHeight()-x)}function Rf(){const{data:X,horizontalScrollbar:k}=this,{width:e}=this.getTableOffset();X&&k.set(e,X.cols.totalWidth())}function ig(){const{selector:X,data:k,editor:e}=this,[x,_]=k.freeze;if(x>0||_>0){const u=k.freezeTotalWidth(),m=k.freezeTotalHeight();e.setFreezeLengths(u,m)}X.resetAreaOffset()}function un(){const{tableEl:X,overlayerEl:k,overlayerCEl:e,table:x,toolbar:_,selector:u,el:m}=this,g=this.getTableOffset(),b=this.getRect();X.attr(b),k.offset(b),e.offset(g),m.css("width",`${b.width}px`),Tf.call(this),Rf.call(this),ig.call(this),x.render(),_.reset(),u.reset()}function Ka(){const{data:X,selector:k}=this;X.clearClipboard(),k.hideClipboard()}function vf(){const{data:X,selector:k}=this;X.copy(),X.copyToSystemClipboard(),k.showClipboard()}function Kl(){const{data:X,selector:k}=this;X.cut(),k.showClipboard()}function Ua(X,k){const{data:e}=this;if(e.settings.mode!=="read"){if(e.paste(X,x=>wc("Tip",x)))un.call(this);else if(k){const x=k.clipboardData.getData("text/plain");this.data.pasteFromText(x),un.call(this)}}}function ag(){this.data.hideRowsOrCols(),un.call(this)}function Gl(X,k){this.data.unhideRowsOrCols(X,k),un.call(this)}function og(){const{data:X}=this;X.autofilter(),un.call(this)}function sg(){const{toolbar:X}=this;X.paintformatActive()&&(Ua.call(this,"format"),Ka.call(this),X.paintformatToggle())}function Zl(X){const{selector:k,data:e,table:x,sortFilter:_}=this,{offsetX:u,offsetY:m}=X,g=X.target.className===`${lt}-selector-corner`,b=e.getCellRectByXY(u,m),{left:w,top:f,width:y,height:h}=b;let{ri:l,ci:d}=b;const{autoFilter:s}=e;if(s.includes(l,d)&&w+y-20e.rows.getCell(c,a));_.hide(),_.set(d,v,s.getFilter(d),s.getSort(d)),_.setOffset({left:w,top:f+h+2});return}X.shiftKey||(g?k.showAutofill(l,d):zi.call(this,!1,l,d),sc(window,v=>{({ri:l,ci:d}=e.getCellRectByXY(v.offsetX,v.offsetY)),g?k.showAutofill(l,d):v.buttons===1&&!v.shiftKey&&zi.call(this,!0,l,d,!0,!0)},()=>{g&&k.arange&&e.settings.mode!=="read"&&e.autofill(k.arange,"all",v=>wc("Tip",v))&&x.render(),k.hideAutofill(),sg.call(this)})),!g&&X.buttons===1&&X.shiftKey&&zi.call(this,!0,l,d)}function Ga(){const{editor:X,data:k}=this,e=k.getSelectedRect(),x=this.getTableOffset();let _="top";e.top>x.height/2&&(_="bottom"),X.setOffset(e,_)}function Wa(){const{editor:X,data:k}=this;k.settings.mode!=="read"&&(Ga.call(this),X.setCell(k.getSelectedCell(),k.getSelectedValidator()),Ka.call(this))}function fg(X){const{data:k,table:e,selector:x}=this;k.scrolly(X,()=>{x.resetBRLAreaOffset(),Ga.call(this),e.render()})}function ug(X){const{data:k,table:e,selector:x}=this;k.scrollx(X,()=>{x.resetBRTAreaOffset(),Ga.call(this),e.render()})}function lg(X,k){const{ri:e}=X,{table:x,selector:_,data:u}=this;u.rows.setHeight(e,k),x.render(),_.resetAreaOffset(),Tf.call(this),Ga.call(this)}function cg(X,k){const{ci:e}=X,{table:x,selector:_,data:u}=this;u.cols.setWidth(e,k),x.render(),_.resetAreaOffset(),Rf.call(this),Ga.call(this)}function tf(X,k="finished"){const{data:e,table:x}=this;if(e.settings.mode==="read")return;e.setSelectedCellText(X,k);const{ri:_,ci:u}=e.selector;k==="finished"?x.render():this.trigger("cell-edited",X,_,u)}function Ho(X){const{data:k}=this;k.settings.mode!=="read"&&(X==="insert-row"?k.insert("row"):X==="delete-row"?k.delete("row"):X==="insert-column"?k.insert("column"):X==="delete-column"?k.delete("column"):X==="delete-cell"?k.deleteCell():X==="delete-cell-format"?k.deleteCell("format"):X==="delete-cell-text"?k.deleteCell("text"):X==="cell-printable"?k.setSelectedCellAttr("printable",!0):X==="cell-non-printable"?k.setSelectedCellAttr("printable",!1):X==="cell-editable"?k.setSelectedCellAttr("editable",!0):X==="cell-non-editable"&&k.setSelectedCellAttr("editable",!1),Ka.call(this),un.call(this))}function hg(X,k){const{data:e}=this;if(X==="undo")this.undo();else if(X==="redo")this.redo();else if(X==="print")this.print.preview();else if(X==="paintformat")k===!0?vf.call(this):Ka.call(this);else if(X==="clearformat")Ho.call(this,"delete-cell-format");else if(X!=="link"){if(X!=="chart")if(X==="autofilter")og.call(this);else if(X==="freeze")if(k){const{ri:x,ci:_}=e.selector;this.freeze(x,_)}else this.freeze(0,0);else e.setSelectedCellAttr(X,k),X==="formula"&&!e.selector.multiple()&&Wa.call(this),un.call(this)}}function dg(X,k,e,x){this.data.setAutoFilter(X,k,e,x),un.call(this)}function pg(){const{selector:X,overlayerEl:k,rowResizer:e,colResizer:x,verticalScrollbar:_,horizontalScrollbar:u,editor:m,contextMenu:g,toolbar:b,modalValidation:w,sortFilter:f}=this;k.on("mousemove",y=>{tg.call(this,y)}).on("mousedown",y=>{m.clear(),g.hide(),y.buttons===2?(this.data.xyInSelectedRect(y.offsetX,y.offsetY)||Zl.call(this,y),g.setPosition(y.offsetX,y.offsetY),y.stopPropagation()):y.detail===2?Wa.call(this):Zl.call(this,y)}).on("mousewheel.stop",y=>{rg.call(this,y)}).on("mouseout",y=>{const{offsetX:h,offsetY:l}=y;l<=0&&x.hide(),h<=0&&e.hide()}),X.inputChange=y=>{tf.call(this,y,"input"),Wa.call(this)},wm(k.el,{move:(y,h)=>{ng.call(this,y,h)}}),b.change=(y,h)=>hg.call(this,y,h),f.ok=(y,h,l,d)=>dg.call(this,y,h,l,d),e.finishedFn=(y,h)=>{lg.call(this,y,h)},x.finishedFn=(y,h)=>{cg.call(this,y,h)},e.unhideFn=y=>{Gl.call(this,"row",y)},x.unhideFn=y=>{Gl.call(this,"col",y)},_.moveFn=(y,h)=>{fg.call(this,y,h)},u.moveFn=(y,h)=>{ug.call(this,y,h)},m.change=(y,h)=>{tf.call(this,h,y)},w.change=(y,...h)=>{y==="save"?this.data.addValidation(...h):this.data.removeValidation()},g.itemClick=y=>{y==="validation"?w.setValue(this.data.getSelectedValidation()):y==="copy"?vf.call(this):y==="cut"?Kl.call(this):y==="paste"?Ua.call(this,"all"):y==="paste-value"?Ua.call(this,"text"):y==="paste-format"?Ua.call(this,"format"):y==="hide"?ag.call(this):Ho.call(this,y)},ln(window,"resize",()=>{this.reload()}),ln(window,"click",y=>{this.focusing=k.contains(y.target)}),ln(window,"paste",y=>{this.focusing&&(Ua.call(this,"all",y),y.preventDefault())}),ln(window,"keydown",y=>{if(!this.focusing)return;const h=y.keyCode||y.which,{key:l,ctrlKey:d,shiftKey:s,metaKey:v}=y;if(d||v)switch(h){case 90:this.undo(),y.preventDefault();break;case 89:this.redo(),y.preventDefault();break;case 67:vf.call(this),y.preventDefault();break;case 88:Kl.call(this),y.preventDefault();break;case 85:b.trigger("underline"),y.preventDefault();break;case 86:break;case 37:Yn.call(this,s,"row-first"),y.preventDefault();break;case 38:Yn.call(this,s,"col-first"),y.preventDefault();break;case 39:Yn.call(this,s,"row-last"),y.preventDefault();break;case 40:Yn.call(this,s,"col-last"),y.preventDefault();break;case 32:zi.call(this,!1,-1,this.data.selector.ci,!1),y.preventDefault();break;case 66:b.trigger("bold");break;case 73:b.trigger("italic");break}else{switch(h){case 32:s&&zi.call(this,!1,this.data.selector.ri,-1,!1);break;case 27:g.hide(),Ka.call(this);break;case 37:Yn.call(this,s,"left"),y.preventDefault();break;case 38:Yn.call(this,s,"up"),y.preventDefault();break;case 39:Yn.call(this,s,"right"),y.preventDefault();break;case 40:Yn.call(this,s,"down"),y.preventDefault();break;case 9:m.clear(),Yn.call(this,!1,s?"left":"right"),y.preventDefault();break;case 13:m.clear(),Yn.call(this,!1,s?"up":"down"),y.preventDefault();break;case 8:Ho.call(this,"delete-cell-text"),y.preventDefault();break}l==="Delete"?(Ho.call(this,"delete-cell-text"),y.preventDefault()):h>=65&&h<=90||h>=48&&h<=57||h>=96&&h<=105||y.key==="="?(tf.call(this,y.key,"input"),Wa.call(this)):h===113&&Wa.call(this)}})}class yg{constructor(k,e){this.eventMap=xm();const{view:x,showToolbar:_,showContextmenu:u}=e.settings;this.el=We("div",`${lt}-sheet`),this.toolbar=new Gb(e,x.width,!_),this.print=new ib(e),k.children(this.toolbar.el,this.el,this.print.el),this.data=e,this.tableEl=We("canvas",`${lt}-table`),this.rowResizer=new Al(!1,e.rows.height),this.colResizer=new Al(!0,e.cols.minWidth),this.verticalScrollbar=new Ml(!0),this.horizontalScrollbar=new Ml(!1),this.editor=new zm(Km,()=>this.getTableOffset(),e.rows.height),this.modalValidation=new Jb,this.contextMenu=new fb(()=>this.getRect(),!u),this.selector=new Om(e),this.overlayerCEl=We("div",`${lt}-overlayer-content`).children(this.editor.el,this.selector.el),this.overlayerEl=We("div",`${lt}-overlayer`).child(this.overlayerCEl),this.sortFilter=new qb,this.el.children(this.tableEl,this.overlayerEl.el,this.rowResizer.el,this.colResizer.el,this.verticalScrollbar.el,this.horizontalScrollbar.el,this.contextMenu.el,this.modalValidation.el,this.sortFilter.el),this.table=new tb(this.tableEl.el,e),pg.call(this),un.call(this),zi.call(this,!1,0,0)}on(k,e){return this.eventMap.on(k,e),this}trigger(k,...e){const{eventMap:x}=this;x.fire(k,e)}resetData(k){this.editor.clear(),this.data=k,Tf.call(this),Rf.call(this),this.toolbar.resetData(k),this.print.resetData(k),this.selector.resetData(k),this.table.resetData(k)}loadData(k){return this.data.setData(k),un.call(this),this}freeze(k,e){const{data:x}=this;return x.setFreeze(k,e),un.call(this),this}undo(){this.data.undo(),un.call(this)}redo(){this.data.redo(),un.call(this)}reload(){return un.call(this),this}getRect(){const{data:k}=this;return{width:k.viewWidth(),height:k.viewHeight()}}getTableOffset(){const{rows:k,cols:e}=this.data,{width:x,height:_}=this.getRect();return{width:x-e.indexWidth,height:_-k.height,left:e.indexWidth,top:k.height}}}class vg extends qn{constructor(k){const e=new Kr("ellipsis");super(e,"auto",!1,"top-left"),this.contentClick=k}reset(k){const e=k.map((x,_)=>We("div",`${lt}-item`).css("width","150px").css("font-weight","normal").on("click",()=>{this.contentClick(_),this.hide()}).child(x));this.setContentChildren(...e)}setTitle(){}}const mg=[{key:"delete",title:Jt("contextmenu.deleteSheet")}];function bg(X){return We("div",`${lt}-item`).child(X.title()).on("click",()=>{this.itemClick(X.key),this.hide()})}function gg(){return mg.map(X=>bg.call(this,X))}class _g{constructor(){this.el=We("div",`${lt}-contextmenu`).css("width","160px").children(...gg.call(this)).hide(),this.itemClick=()=>{}}hide(){const{el:k}=this;k.hide(),_a(k)}setOffset(k){const{el:e}=this;e.offset(k),e.show(),Va(e)}}class wg{constructor(k=()=>{},e=()=>{},x=()=>{},_=()=>{}){this.swapFunc=e,this.updateFunc=_,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new vg(u=>{this.clickSwap2(this.items[u])}),this.contextMenu=new _g,this.contextMenu.itemClick=x,this.el=We("div",`${lt}-bottombar`).children(this.contextMenu.el,this.menuEl=We("ul",`${lt}-menu`).child(We("li","").children(new Kr("add").on("click",()=>{k()}),We("span","").child(this.moreEl))))}addItem(k,e){this.dataNames.push(k);const x=We("li",e?"active":"").child(k);x.on("click",()=>{this.clickSwap2(x)}).on("contextmenu",_=>{const{offsetLeft:u,offsetHeight:m}=_.target;this.contextMenu.setOffset({left:u,bottom:m+1}),this.deleteEl=x}).on("dblclick",()=>{const _=x.html(),u=new ba("auto","");u.val(_),u.input.on("blur",({target:m})=>{const{value:g}=m,b=this.dataNames.findIndex(w=>w===_);this.renameItem(b,g)}),x.html("").child(u.el),u.focus()}),e&&this.clickSwap(x),this.items.push(x),this.menuEl.child(x),this.moreEl.reset(this.dataNames)}renameItem(k,e){this.dataNames.splice(k,1,e),this.moreEl.reset(this.dataNames),this.items[k].html("").child(e),this.updateFunc(k,e)}clear(){this.items.forEach(k=>{this.menuEl.removeChild(k.el)}),this.items=[],this.dataNames=[],this.moreEl.reset(this.dataNames)}deleteItem(){const{activeEl:k,deleteEl:e}=this;if(this.items.length>1){const x=this.items.findIndex(_=>_===e);if(this.items.splice(x,1),this.dataNames.splice(x,1),this.menuEl.removeChild(e.el),this.moreEl.reset(this.dataNames),k===e){const[_]=this.items;return this.activeEl=_,this.activeEl.toggle(),[x,0]}return[x,-1]}return[-1]}clickSwap2(k){const e=this.items.findIndex(x=>x===k);this.clickSwap(k),this.activeEl.toggle(),this.swapFunc(e)}clickSwap(k){this.activeEl!==null&&this.activeEl.toggle(),this.activeEl=k}}class xg{constructor(k,e={}){let x=k;this.options={showBottomBar:!0,...e},this.sheetIndex=1,this.datas=[],typeof k=="string"&&(x=document.querySelector(k)),this.bottombar=this.options.showBottomBar?new wg(()=>{const u=this.addSheet();this.sheet.resetData(u)},u=>{const m=this.datas[u];this.sheet.resetData(m)},()=>{this.deleteSheet()},(u,m)=>{this.datas[u].name=m}):null,this.data=this.addSheet();const _=We("div",`${lt}`).on("contextmenu",u=>u.preventDefault());x.appendChild(_.el),this.sheet=new yg(_,this.data),this.bottombar!==null&&_.child(this.bottombar.el)}addSheet(k,e=!0){const x=k||`sheet${this.sheetIndex}`,_=new _m(x,this.options);return _.change=(...u)=>{this.sheet.trigger("change",...u)},this.datas.push(_),this.bottombar!==null&&this.bottombar.addItem(x,e),this.sheetIndex+=1,_}deleteSheet(){if(this.bottombar===null)return;const[k,e]=this.bottombar.deleteItem();k>=0&&(this.datas.splice(k,1),e>=0&&this.sheet.resetData(this.datas[e]))}loadData(k){const e=Array.isArray(k)?k:[k];if(this.bottombar!==null&&this.bottombar.clear(),this.datas=[],e.length>0)for(let x=0;xk.getData())}cellText(k,e,x,_=0){return this.datas[_].setCellText(k,e,x,"finished"),this}cell(k,e,x=0){return this.datas[x].getCell(k,e)}cellStyle(k,e,x=0){return this.datas[x].getCellStyle(k,e)}reRender(){return this.sheet.table.render(),this}on(k,e){return this.sheet.on(k,e),this}validate(){const{validations:k}=this.data;return k.errors.size<=0}change(k){return this.sheet.on("change",k),this}static locale(k,e){ac(k,e)}}const Sg=(X,k={})=>new xg(X,k);window&&(window.x_spreadsheet=Sg,window.x_spreadsheet.locale=(X,k)=>ac(X,k));var mf={},kg={get exports(){return mf},set exports(X){mf=X}};(function(X,k){(function(e){X.exports=e()})(function(){return function(){function e(x,_,u){function m(w,f){if(!_[w]){if(!x[w]){var y=typeof Do=="function"&&Do;if(!f&&y)return y(w,!0);if(g)return g(w,!0);var h=new Error("Cannot find module '"+w+"'");throw h.code="MODULE_NOT_FOUND",h}var l=_[w]={exports:{}};x[w][0].call(l.exports,function(d){var s=x[w][1][d];return m(s||d)},l,l.exports,e,x,_,u)}return _[w].exports}for(var g=typeof Do=="function"&&Do,b=0;b2&&arguments[2]!==void 0?arguments[2]:0;if(u(this,f),!h)this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;else if(typeof h=="string"){var d=b.decodeAddress(h);this.nativeCol=d.col+l,this.nativeColOff=0,this.nativeRow=d.row+l,this.nativeRowOff=0}else h.nativeCol!==void 0?(this.nativeCol=h.nativeCol||0,this.nativeColOff=h.nativeColOff||0,this.nativeRow=h.nativeRow||0,this.nativeRowOff=h.nativeRowOff||0):h.col!==void 0?(this.col=h.col+l,this.row=h.row+l):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);this.worksheet=y}return g(f,[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(h){this.nativeCol=Math.floor(h),this.nativeColOff=Math.floor((h-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(h){this.nativeRow=Math.floor(h),this.nativeRowOff=Math.floor((h-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(this.worksheet.getColumn(this.nativeCol+1).width*1e4):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(this.worksheet.getRow(this.nativeRow+1).height*1e4):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(h){this.nativeCol=h.nativeCol,this.nativeColOff=h.nativeColOff,this.nativeRow=h.nativeRow,this.nativeRowOff=h.nativeRowOff}}],[{key:"asInstance",value:function(h){return h instanceof f||h==null?h:new f(h)}}]),f}();x.exports=w},{"../utils/col-cache":19}],3:[function(e,x,_){function u(L,F){if(!(L instanceof F))throw new TypeError("Cannot call a class as a function")}function m(L,F){for(var M=0;M0||this.type===L.Types.Merge}},{key:"master",get:function(){return this.type===L.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===L.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(M){if(this.type===L.Types.Merge){this._value.master.value=M;return}this._value.release(),this._value=N.create(N.getType(M),this,M)}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(M){this._comment=new l(M)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return w.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(){var M=this._row.worksheet;return{sheetName:M.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(M){this.names=[M]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(M){var D=this,R=this.workbook.definedNames;R.removeAllNames(this.fullAddress),M.forEach(function(P){R.addEx(D.fullAddress,P)})}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(M){this._dataValidations.add(this.address,M)}},{key:"model",get:function(){var M=this._value.model;return M.style=this.style,this._comment&&(M.comment=this._comment.model),M},set:function(M){if(this._value.release(),this._value=N.create(M.type,this),this._value.model=M,M.comment)switch(M.comment.type){case"note":this._comment=l.fromModel(M.comment);break}M.style?this.style=M.style:this.style={}}}]),L}();d.Types=f.ValueType;var s=function(){function L(F){u(this,L),this.model={address:F.address,type:d.Types.Null}}return g(L,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(M){}},{key:"type",get:function(){return d.Types.Null}},{key:"effectiveType",get:function(){return d.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),v=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.Number,value:M}}return g(L,[{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(M){this.model.value=M}},{key:"type",get:function(){return d.Types.Number}},{key:"effectiveType",get:function(){return d.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),c=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.String,value:M}}return g(L,[{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(M){this.model.value=M}},{key:"type",get:function(){return d.Types.String}},{key:"effectiveType",get:function(){return d.Types.String}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),a=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.String,value:M}}return g(L,[{key:"toString",value:function(){return this.model.value.richText.map(function(M){return M.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(M){this.model.value=M}},{key:"type",get:function(){return d.Types.RichText}},{key:"effectiveType",get:function(){return d.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),r=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.Date,value:M}}return g(L,[{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(M){this.model.value=M}},{key:"type",get:function(){return d.Types.Date}},{key:"effectiveType",get:function(){return d.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),t=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.Hyperlink,text:M?M.text:void 0,hyperlink:M?M.hyperlink:void 0},M&&M.tooltip&&(this.model.tooltip=M.tooltip)}return g(L,[{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 M={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(M.tooltip=this.model.tooltip),M},set:function(M){this.model={text:M.text,hyperlink:M.hyperlink},M.tooltip&&(this.model.tooltip=M.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(M){this.model.text=M}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(M){this.model.hyperlink=M}},{key:"type",get:function(){return d.Types.Hyperlink}},{key:"effectiveType",get:function(){return d.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),i=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.Merge,master:M?M.address:void 0},this._master=M,M&&M.addMergeRef()}return g(L,[{key:"isMergedTo",value:function(M){return M===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(M){M instanceof d?(this._master&&this._master.releaseMergeRef(),M.addMergeRef(),this._master=M):this._master.value=M}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return d.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),n=function(){function L(F,M){u(this,L),this.cell=F,this.model={address:F.address,type:d.Types.Formula,shareType:M?M.shareType:void 0,ref:M?M.ref:void 0,formula:M?M.formula:void 0,sharedFormula:M?M.sharedFormula:void 0,result:M?M.result:void 0}}return g(L,[{key:"_copyModel",value:function(M){var D={},R=function(E){var A=M[E];A&&(D[E]=A)};return R("formula"),R("result"),R("ref"),R("shareType"),R("sharedFormula"),D}},{key:"validate",value:function(M){switch(N.getType(M)){case d.Types.Null:case d.Types.String:case d.Types.Number:case d.Types.Date:break;case d.Types.Hyperlink:case d.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var M=this.cell.worksheet,D=M.findCell(this.model.sharedFormula);this._translatedFormula=D&&h(D.formula,D.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(M){this.model=this._copyModel(M)}},{key:"dependencies",get:function(){var M=this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),D=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);return{ranges:M,cells:D}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(M){this.model.formula=M}},{key:"formulaType",get:function(){return this.model.formula?f.FormulaType.Master:this.model.sharedFormula?f.FormulaType.Shared:f.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(M){this.model.result=M}},{key:"type",get:function(){return d.Types.Formula}},{key:"effectiveType",get:function(){var M=this.model.result;return M==null?f.ValueType.Null:M instanceof String||typeof M=="string"?f.ValueType.String:typeof M=="number"?f.ValueType.Number:M instanceof Date?f.ValueType.Date:M.text&&M.hyperlink?f.ValueType.Hyperlink:M.formula?f.ValueType.Formula:f.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),o=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.SharedString,value:M}}return g(L,[{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(M){this.model.value=M}},{key:"type",get:function(){return d.Types.SharedString}},{key:"effectiveType",get:function(){return d.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),p=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.Boolean,value:M}}return g(L,[{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(M){this.model.value=M}},{key:"type",get:function(){return d.Types.Boolean}},{key:"effectiveType",get:function(){return d.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),O=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.Error,value:M}}return g(L,[{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(M){this.model.value=M}},{key:"type",get:function(){return d.Types.Error}},{key:"effectiveType",get:function(){return d.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),C=function(){function L(F,M){u(this,L),this.model={address:F.address,type:d.Types.String,value:JSON.stringify(M),rawValue:M}}return g(L,[{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(M){this.model.rawValue=M,this.model.value=JSON.stringify(M)}},{key:"type",get:function(){return d.Types.String}},{key:"effectiveType",get:function(){return d.Types.String}},{key:"address",get:function(){return this.model.address},set:function(M){this.model.address=M}}]),L}(),N={getType:function(F){return F==null?d.Types.Null:F instanceof String||typeof F=="string"?d.Types.String:typeof F=="number"?d.Types.Number:typeof F=="boolean"?d.Types.Boolean:F instanceof Date?d.Types.Date:F.text&&F.hyperlink?d.Types.Hyperlink:F.formula||F.sharedFormula?d.Types.Formula:F.richText?d.Types.RichText:F.sharedString?d.Types.SharedString:F.error?d.Types.Error:d.Types.JSON},types:[{t:d.Types.Null,f:s},{t:d.Types.Number,f:v},{t:d.Types.String,f:c},{t:d.Types.Date,f:r},{t:d.Types.Hyperlink,f:t},{t:d.Types.Formula,f:n},{t:d.Types.Merge,f:i},{t:d.Types.JSON,f:C},{t:d.Types.SharedString,f:o},{t:d.Types.RichText,f:a},{t:d.Types.Boolean,f:p},{t:d.Types.Error,f:O}].reduce(function(L,F){return L[F.t]=F.f,L},[]),create:function(F,M,D){var R=this.types[F];if(!R)throw new Error("Could not create Value of type ".concat(F));return new R(M,D)}};x.exports=d},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(e,x,_){function u(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}function m(l,d){for(var s=0;s=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var s=this.style;return!(s&&(s.font||s.numFmt||s.alignment||s.border||s.fill||s.protection))}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var s=[];return this.eachCell(function(v,c){v&&v.type!==w.ValueType.Null&&(s[c]=v.value)}),s},set:function(s){var v=this;if(s){var c=this.number,a=0;s.hasOwnProperty("0")&&(a=1),s.forEach(function(r,t){v._worksheet.getCell(t+a,c).value=r})}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(s){this._applyStyle("numFmt",s)}},{key:"font",get:function(){return this.style.font},set:function(s){this._applyStyle("font",s)}},{key:"alignment",get:function(){return this.style.alignment},set:function(s){this._applyStyle("alignment",s)}},{key:"protection",get:function(){return this.style.protection},set:function(s){this._applyStyle("protection",s)}},{key:"border",get:function(){return this.style.border},set:function(s){this._applyStyle("border",s)}},{key:"fill",get:function(){return this.style.fill},set:function(s){this._applyStyle("fill",s)}}],[{key:"toModel",value:function(s){var v=[],c=null;return s&&s.forEach(function(a,r){a.isDefault?c&&(c=null):!c||!a.equivalentTo(c)?(c={min:r+1,max:r+1,width:a.width!==void 0?a.width:y,style:a.style,isCustomWidth:a.isCustomWidth,hidden:a.hidden,outlineLevel:a.outlineLevel,collapsed:a.collapsed},v.push(c)):c.max=r+1}),v.length?v:void 0}},{key:"fromModel",value:function(s,v){v=v||[];for(var c=[],a=1,r=0;rthis.bottom)&&(this.bottom=d),(!this.model.right||s>this.right)&&(this.right=s)}},{key:"expandRow",value:function(h){if(h){var l=h.dimensions,d=h.number;l&&this.expand(d,l.min,d,l.max)}}},{key:"expandToAddress",value:function(h){var l=b.decodeEx(h);this.expand(l.row,l.col,l.row,l.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(h){return!(h.sheetName&&this.sheetName&&h.sheetName!==this.sheetName||h.bottomthis.bottom||h.rightthis.right)}},{key:"contains",value:function(h){var l=b.decodeEx(h);return this.containsEx(l)}},{key:"containsEx",value:function(h){return h.sheetName&&this.sheetName&&h.sheetName!==this.sheetName?!1:h.row>=this.top&&h.row<=this.bottom&&h.col>=this.left&&h.col<=this.right}},{key:"forEachAddress",value:function(h){for(var l=this.left;l<=this.right;l++)for(var d=this.top;d<=this.bottom;d++)h(b.encodeAddress(d,l),d,l)}},{key:"top",get:function(){return this.model.top||1},set:function(h){this.model.top=h}},{key:"left",get:function(){return this.model.left||1},set:function(h){this.model.left=h}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(h){this.model.bottom=h}},{key:"right",get:function(){return this.model.right||1},set:function(h){this.model.right=h}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(h){this.model.sheetName=h}},{key:"_serialisedSheetName",get:function(){var h=this.model.sheetName;return h?/^[a-zA-Z0-9]*$/.test(h)?"".concat(h,"!"):"'".concat(h,"'!"):""}},{key:"tl",get:function(){return b.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(b.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return b.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(b.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)}}]),f}();x.exports=w},{"../utils/col-cache":19}],11:[function(e,x,_){function u(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}function m(l,d){for(var s=0;s2?a-2:0),t=2;t0)for(o=n;o>=c;o--)p=this._cells[o-1],p?(O=this.getCell(o+i),O.value=p.value,O.style=p.style,O._comment=p._comment):this._cells[o+i-1]=void 0;for(o=0;oc.col)&&(s=c.col),v0?{min:s,max:v}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(s){this._applyStyle("numFmt",s)}},{key:"font",get:function(){return this.style.font},set:function(s){this._applyStyle("font",s)}},{key:"alignment",get:function(){return this.style.alignment},set:function(s){this._applyStyle("alignment",s)}},{key:"protection",get:function(){return this.style.protection},set:function(s){this._applyStyle("protection",s)}},{key:"border",get:function(){return this.style.border},set:function(s){this._applyStyle("border",s)}},{key:"fill",get:function(){return this.style.fill},set:function(s){this._applyStyle("fill",s)}},{key:"hidden",get:function(){return!!this._hidden},set:function(s){this._hidden=s}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(s){this._outlineLevel=s}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var s=[],v=0,c=0;return this._cells.forEach(function(a){if(a){var r=a.model;r&&((!v||v>a.col)&&(v=a.col),c0,"Table must be on valid row"),v(r>0,"Table must be on valid col");var t=this.width,i=this.filterHeight,n=this.tableHeight;d.autoFilterRef=b.encode(a,r,a+i-1,r+t-1),d.tableRef=b.encode(a,r,a+n-1,r+t-1),d.columns.forEach(function(o,p){v(o.name,"Column ".concat(p," must have a name")),p===0?s(o,"totalsRowLabel","Total"):(s(o,"totalsRowFunction","none"),o.totalsRowFormula=l.getFormula(o))})}},{key:"store",value:function(){var l=this,d=function(p,O){O&&Object.keys(O).forEach(function(C){p[C]=O[C]})},s=this.worksheet,v=this.table,c=v.tl,a=c.row,r=c.col,t=0;if(v.headerRow){var i=s.getRow(a+t++);v.columns.forEach(function(o,p){var O=o.style,C=o.name,N=i.getCell(r+p);N.value=C,d(N,O)})}if(v.rows.forEach(function(o){var p=s.getRow(a+t++);o.forEach(function(O,C){var N=p.getCell(r+C);N.value=O,d(N,v.columns[C].style)})}),v.totalsRow){var n=s.getRow(a+t++);v.columns.forEach(function(o,p){var O=n.getCell(r+p);if(p===0)O.value=o.totalsRowLabel;else{var C=l.getFormula(o);C?O.value={formula:o.totalsRowFormula,result:o.totalsRowResult}:O.value=null}d(O,o.style)})}}},{key:"load",value:function(l){var d=this,s=this.table,v=s.tl,c=v.row,a=v.col,r=0;if(s.headerRow){var t=l.getRow(c+r++);s.columns.forEach(function(n,o){var p=t.getCell(a+o);p.value=n.name})}if(s.rows.forEach(function(n){var o=l.getRow(c+r++);n.forEach(function(p,O){var C=o.getCell(a+O);C.value=p})}),s.totalsRow){var i=l.getRow(c+r++);s.columns.forEach(function(n,o){var p=i.getCell(a+o);if(o===0)p.value=n.totalsRowLabel;else{var O=d.getFormula(n);O&&(p.value={formula:n.totalsRowFormula,result:n.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 l=b.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var d=0;d1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(l,d)}},{key:"getColumn",value:function(l){var d=this.table.columns[l];return new w(this,d,l)}},{key:"addColumn",value:function(l,d,s){this.cacheState(),s===void 0?(this.table.columns.push(l),this.table.rows.forEach(function(v,c){v.push(d[c])})):(this.table.columns.splice(s,0,l),this.table.rows.forEach(function(v,c){v.splice(s,0,d[c])}))}},{key:"removeColumns",value:function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(l,d),this.table.rows.forEach(function(s){s.splice(l,d)})}},{key:"_assign",value:function(l,d,s){this.cacheState(),l[d]=s}},{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(l){this.table=l}},{key:"ref",get:function(){return this.table.ref},set:function(l){this._assign(this.table,"ref",l)}},{key:"name",get:function(){return this.table.name},set:function(l){this.table.name=l}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(l){this.table.displayName=l}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(l){this._assign(this.table,"headerRow",l)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(l){this._assign(this.table,"totalsRow",l)}},{key:"theme",get:function(){return this.table.style.name},set:function(l){this.table.style.name=l}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(l){this.table.style.showFirstColumn=l}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(l){this.table.style.showLastColumn=l}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(l){this.table.style.showRowStripes=l}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(l){this.table.style.showColumnStripes=l}}]),y}();x.exports=f},{"../utils/col-cache":19}],13:[function(e,x,_){function u(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}function m(l,d){for(var s=0;s31&&console.warn("Worksheet name ".concat(s," exceeds 31 chars. This will be truncated")),/[*?:/\\[\]]/.test(s))throw new Error("Worksheet name ".concat(s," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(s))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(s));if(s=(s||"sheet".concat(c)).substring(0,31),this._worksheets.find(function(i){return i&&i.name.toLowerCase()===s.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(s));v&&(typeof v=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),v={properties:{tabColor:{argb:v}}}):(v.argb||v.theme||v.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),v={properties:{tabColor:v}}));var a=this._worksheets.reduce(function(i,n){return(n&&n.orderNo)>i?n.orderNo:i},0),r=Object.assign({},v,{id:c,name:s,orderNo:a+1,workbook:this}),t=new b(r);return this._worksheets[c]=t,t}},{key:"removeWorksheetEx",value:function(s){delete this._worksheets[s.id]}},{key:"removeWorksheet",value:function(s){var v=this.getWorksheet(s);v&&v.destroy()}},{key:"getWorksheet",value:function(s){if(s===void 0)return this._worksheets.find(Boolean);if(typeof s=="number")return this._worksheets[s];if(typeof s=="string")return this._worksheets.find(function(v){return v&&v.name===s})}},{key:"eachSheet",value:function(s){this.worksheets.forEach(function(v){s(v,v.id)})}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(s){var v=this.media.length;return this.media.push(Object.assign({},s,{type:"image"})),v}},{key:"getImage",value:function(s){return this.media[s]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new f(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new y(this)),this._csv}},{key:"nextId",get:function(){for(var s=1;sL.length)&&(F=L.length);for(var M=0,D=new Array(F);Mthis._columns.length)for(var R=this._columns.length+1;R<=M;)this._columns.push(new i(this,R++));return this._columns[M-1]}},{key:"spliceColumns",value:function(M,D){for(var R=this,P=this._rows,E=P.length,A=arguments.length,z=new Array(A>2?A-2:0),W=2;W0)for(var $=function(be){var _e=[M,D];z.forEach(function(J){_e.push(J[be]||null)});var oe=R.getRow(be+1);oe.splice.apply(oe,_e)},U=0;U0)for(var te=B;te>=j;te--)this.getColumn(te+I).defn=this.getColumn(te).defn;for(var ie=M;ie1&&arguments[1]!==void 0?arguments[1]:"n",R=this._nextRow,P=this.getRow(R);return P.values=M,this._setStyleOption(R,D[0]==="i"?D:"n"),P}},{key:"addRows",value:function(M){var D=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",P=[];return M.forEach(function(E){P.push(D.addRow(E,R))}),P}},{key:"insertRow",value:function(M,D){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(M,0,D),this._setStyleOption(M,R),this.getRow(M)}},{key:"insertRows",value:function(M,D){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows.apply(this,[M,0].concat(b(D))),R!=="n")for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:"n";D[0]==="o"&&this.findRow(M+1)!==void 0?this._copyStyle(M+1,M,D[1]==="+"):D[0]==="i"&&this.findRow(M-1)!==void 0&&this._copyStyle(M-1,M,D[1]==="+")}},{key:"_copyStyle",value:function(M,D){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,P=this.getRow(M),E=this.getRow(D);E.style=Object.freeze(m({},P.style)),P.eachCell({includeEmpty:R},function(A,z){E.getCell(z).style=Object.freeze(m({},A.style))}),E.height=P.height}},{key:"duplicateRow",value:function(M,D){var R=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,E=this._rows[M-1],A=new Array(D).fill(E.values);this.spliceRows.apply(this,[M+1,P?0:D].concat(b(A)));for(var z=function(U){var I=R._rows[M+U];I.style=E.style,I.height=E.height,E.eachCell({includeEmpty:!0},function(j,B){I.getCell(B).style=j.style})},W=0;W2?E-2:0),z=2;z0)for(I=U;I>=P;I--)j=this._rows[I-1],j?function(){var V=R.getRow(I+$);V.values=j.values,V.style=j.style,V.height=j.height,j.eachCell({includeEmpty:!0},function(te,ie){if(V.getCell(ie).style=te.style,te._value.constructor.name==="MergeValue"){var ce=R.getRow(te._row._number+W).getCell(ie),be=te._value._master,_e=R.getRow(be._row._number+W).getCell(be._column._number);ce.merge(_e)}})}():this._rows[I+$-1]=void 0;for(I=0;IM.top||E>M.left)&&this.getCell(P,E).merge(R,D);this._merges[R.address]=M}},{key:"_unMergeMaster",value:function(M){var D=this._merges[M.address];if(D){for(var R=D.top;R<=D.bottom;R++)for(var P=D.left;P<=D.right;P++)this.getCell(R,P).unmerge();delete this._merges[M.address]}}},{key:"unMergeCells",value:function(){for(var M=arguments.length,D=new Array(M),R=0;R3&&arguments[3]!==void 0?arguments[3]:"shared",E=a.decode(M),A=E.top,z=E.left,W=E.bottom,$=E.right,U=$-z+1,I=a.encodeAddress(A,z),j=P==="shared",B;typeof R=="function"?B=R:Array.isArray(R)?Array.isArray(R[0])?B=function(be,_e){return R[be-A][_e-z]}:B=function(be,_e){return R[(be-A)*U+(_e-z)]}:B=function(){};for(var V=!0,te=A;te<=W;te++)for(var ie=z;ie<=$;ie++)V?(this.getCell(te,ie).value={shareType:P,formula:D,ref:M,result:B(te,ie)},V=!1):this.getCell(te,ie).value=j?{sharedFormula:I,result:B(te,ie)}:B(te,ie)}},{key:"addImage",value:function(M,D){var R={type:"image",imageId:M,range:D};this._media.push(new o(this,R))}},{key:"getImages",value:function(){return this._media.filter(function(M){return M.type==="image"})}},{key:"addBackgroundImage",value:function(M){var D={type:"background",imageId:M};this._media.push(new o(this,D))}},{key:"getBackgroundImageId",value:function(){var M=this._media.find(function(D){return D.type==="background"});return M&&M.imageId}},{key:"protect",value:function(M,D){var R=this;return new Promise(function(P){R.sheetProtection={sheet:!0},D&&"spinCount"in D&&(D.spinCount=Number.isFinite(D.spinCount)?Math.round(Math.max(0,D.spinCount)):1e5),M&&(R.sheetProtection.algorithmName="SHA-512",R.sheetProtection.saltValue=C.randomBytes(16).toString("base64"),R.sheetProtection.spinCount=D&&"spinCount"in D?D.spinCount:1e5,R.sheetProtection.hashValue=C.convertPasswordToHash(M,"SHA512",R.sheetProtection.saltValue,R.sheetProtection.spinCount)),D&&(R.sheetProtection=Object.assign(R.sheetProtection,D),!M&&"spinCount"in D&&delete R.sheetProtection.spinCount),P()})}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(M){var D=new p(this,M);return this.tables[M.name]=D,D}},{key:"getTable",value:function(M){return this.tables[M]}},{key:"removeTable",value:function(M){delete this.tables[M]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(M){this.conditionalFormattings.push(M)}},{key:"removeConditionalFormatting",value:function(M){typeof M=="number"?this.conditionalFormattings.splice(M,1):M instanceof Function?this.conditionalFormattings=this.conditionalFormattings.filter(M):this.conditionalFormattings=[]}},{key:"_parseRows",value:function(M){var D=this;this._rows=[],M.rows.forEach(function(R){var P=new t(D,R.number);D._rows[P.number-1]=P,P.model=R})}},{key:"_parseMergeCells",value:function(M){var D=this;c.each(M.mergeCells,function(R){D.mergeCellsWithoutStyle(R)})}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var M=new r;return this._rows.forEach(function(D){if(D){var R=D.dimensions;R&&M.expand(D.number,R.min,D.number,R.max)}}),M}},{key:"columns",get:function(){return this._columns},set:function(M){var D=this;this._headerRowCount=M.reduce(function(E,A){var z=A.header&&1||A.headers&&A.headers.length||0;return Math.max(E,z)},0);var R=1,P=this._columns=[];M.forEach(function(E){var A=new i(D,R++,!1);P.push(A),A.defn=E})}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var M=0;return this.eachRow(function(D){M=Math.max(M,D.cellCount)}),M}},{key:"actualColumnCount",get:function(){var M=[],D=0;return this.eachRow(function(R){R.eachCell(function(P){var E=P.col;M[E]||(M[E]=!0,D++)})}),D}},{key:"_lastRowNumber",get:function(){for(var M=this._rows,D=M.length;D>0&&M[D-1]===void 0;)D--;return D}},{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 M=0;return this.eachRow(function(){M++}),M}},{key:"hasMerges",get:function(){return c.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(M){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=M}},{key:"model",get:function(){var M={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(P){return P.model}),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(function(P){return P.model}),conditionalFormattings:this.conditionalFormattings};M.cols=i.toModel(this.columns);var D=M.rows=[],R=M.dimensions=new r;return this._rows.forEach(function(P){var E=P&&P.model;E&&(R.expand(E.number,E.min,E.number,E.max),D.push(E))}),M.merges=[],c.each(this._merges,function(P){M.merges.push(P.range)}),M},set:function(M){var D=this;this.name=M.name,this._columns=i.fromModel(this,M.cols),this._parseRows(M),this._parseMergeCells(M),this.dataValidations=new O(M.dataValidations),this.properties=M.properties,this.pageSetup=M.pageSetup,this.headerFooter=M.headerFooter,this.views=M.views,this.autoFilter=M.autoFilter,this._media=M.media.map(function(R){return new o(D,R)}),this.sheetProtection=M.sheetProtection,this.tables=M.tables.reduce(function(R,P){var E=new p;return E.model=P,R[P.name]=E,R},{}),this.conditionalFormattings=M.conditionalFormattings}}]),L}();x.exports=N},{"../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,x,_){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 u={Workbook:e("./doc/workbook")},m=e("./doc/enums");Object.keys(m).forEach(function(g){u[g]=m[g]}),x.exports=u},{"./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,x,_){var u=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function m(g){return typeof g=="string"?g:u?u.decode(g):g.toString()}_.bufferToString=m},{}],17:[function(e,x,_){var u=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),m=e("buffer"),g=m.Buffer;function b(w){return typeof w!="string"?w:u?g.from(u.encode(w).buffer):g.from(w)}_.stringToBuffer=b},{buffer:216}],18:[function(e,x,_){function u(y,h){if(!(y instanceof h))throw new TypeError("Cannot call a class as a function")}function m(y,h){for(var l=0;lv.length)&&(c=v.length);for(var a=0,r=new Array(c);a"u"||!(Symbol.iterator in Object(v)))){var a=[],r=!0,t=!1,i=void 0;try{for(var n=v[Symbol.iterator](),o;!(r=(o=n.next()).done)&&(a.push(o.value),!(c&&a.length===c));r=!0);}catch(p){t=!0,i=p}finally{try{!r&&n.return!=null&&n.return()}finally{if(t)throw i}}return a}}function f(v){if(Array.isArray(v))return v}function y(v,c){var a=Object.keys(v);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(v);c&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(v,t).enumerable})),a.push.apply(a,r)}return a}function h(v){for(var c=1;c=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&c>=1){for(;o<=26;)a=this._dictionary[o-1],this._n2l[o]=a,this._l2n[a]=o,o++;this._l2nFill=1}if(this._l2nFill<2&&c>=2){for(o=27;o<=26+26*26;)r=o-(26+1),t=r%26,i=Math.floor(r/26),a=this._dictionary[i]+this._dictionary[t],this._n2l[o]=a,this._l2n[a]=o,o++;this._l2nFill=2}if(this._l2nFill<3&&c>=3){for(o=26+26*26+1;o<=16384;)r=o-(26*26+26+1),t=r%26,i=Math.floor(r/26)%26,n=Math.floor(r/(26*26)),a=this._dictionary[n]+this._dictionary[i]+this._dictionary[t],this._n2l[o]=a,this._l2n[a]=o,o++;this._l2nFill=3}},l2n:function(c){if(this._l2n[c]||this._fill(c.length),!this._l2n[c])throw new Error("Out of bounds. Invalid column letter: ".concat(c));return this._l2n[c]},n2l:function(c){if(c<1||c>16384)throw new Error("".concat(c," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[c]||this._fill(this._level(c)),this._n2l[c]},_hash:{},validateAddress:function(c){if(!d.test(c))throw new Error("Invalid Address: ".concat(c));return!0},decodeAddress:function(c){var a=c.length<5&&this._hash[c];if(a)return a;for(var r=!1,t="",i=0,n=!1,o="",p=0,O=0,C;O=65&&C<=90)r=!0,t+=c[O],i=i*26+C-64;else if(C>=48&&C<=57)n=!0,o+=c[O],p=p*10+C-48;else if(n&&r&&C!==36)break;if(!r)i=void 0;else if(i>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(t));n||(p=void 0),c=t+o;var N={address:c,col:i,row:p,$col$row:"$".concat(t,"$").concat(o)};return i<=100&&p<=100&&(this._hash[c]=N,this._hash[N.$col$row]=N),N},getAddress:function(c,a){if(a){var r=this.n2l(a)+c;return this.decodeAddress(r)}return this.decodeAddress(c)},decode:function(c){var a=c.split(":");if(a.length===2){var r=this.decodeAddress(a[0]),t=this.decodeAddress(a[1]),i={top:Math.min(r.row,t.row),left:Math.min(r.col,t.col),bottom:Math.max(r.row,t.row),right:Math.max(r.col,t.col)};return i.tl=this.n2l(i.left)+i.top,i.br=this.n2l(i.right)+i.bottom,i.dimensions="".concat(i.tl,":").concat(i.br),i}return this.decodeAddress(c)},decodeEx:function(c){var a=c.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=a[1]||a[2],t=a[3],i=t.split(":");if(i.length>1){var n=this.decodeAddress(i[0]),o=this.decodeAddress(i[1]),p=Math.min(n.row,o.row),O=Math.min(n.col,o.col),C=Math.max(n.row,o.row),N=Math.max(n.col,o.col);return n=this.n2l(O)+p,o=this.n2l(N)+C,{top:p,left:O,bottom:C,right:N,sheetName:r,tl:{address:n,col:O,row:p,$col$row:"$".concat(this.n2l(O),"$").concat(p),sheetName:r},br:{address:o,col:N,row:C,$col$row:"$".concat(this.n2l(N),"$").concat(C),sheetName:r},dimensions:"".concat(n,":").concat(o)}}if(t.startsWith("#"))return r?{sheetName:r,error:t}:{error:t};var L=this.decodeAddress(t);return r?h({sheetName:r},L):L},encodeAddress:function(c,a){return s.n2l(a)+c},encode:function(){switch(arguments.length){case 2:return s.encodeAddress(arguments[0],arguments[1]);case 4:return"".concat(s.encodeAddress(arguments[0],arguments[1]),":").concat(s.encodeAddress(arguments[2],arguments[3]));default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange:function(c,a){var r=u(c,5),t=r[0],i=r[1],n=r[3],o=r[4],p=u(a,2),O=p[0],C=p[1];return O>=t&&O<=n&&C>=i&&C<=o}};x.exports=s},{}],20:[function(e,x,_){(function(u){var m=e("crypto"),g={hash:function(w){for(var f=m.createHash(w),y=arguments.length,h=new Array(y>1?y-1:0),l=1;l3||i.length===3&&i>"XFD")return d;var p=u.l2n(i),O=parseInt(o,10);t||(p+=l.col-h.col),n||(O+=l.row-h.row);var C=(s||"")+(t||"")+u.n2l(p)+(n||"")+O;return C}return d})}x.exports={slideFormula:b}},{"./col-cache":19}],23:[function(e,x,_){(function(u,m){function g(t,i,n,o,p,O,C){try{var N=t[O](C),L=N.value}catch(F){n(F);return}N.done?i(L):Promise.resolve(L).then(o,p)}function b(t){return function(){var i=this,n=arguments;return new Promise(function(o,p){var O=t.apply(i,n);function C(L){g(O,o,p,C,N,"next",L)}function N(L){g(O,o,p,C,N,"throw",L)}C(void 0)})}}function w(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function f(t,i){for(var n=0;n=this.length?(o=this.toBuffer(),this.iRead=this.iWrite,o):(o=m.alloc(n),this.buffer.copy(o,0,this.iRead,n),this.iRead+=n,o)}},{key:"write",value:function(n,o,p){var O=Math.min(p,this.size-this.iWrite);return n.copy(this.buffer,this.iWrite,o,o+O),this.iWrite+=O,O}},{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}}]),t}(),r=function(i){i=i||{},this.bufSize=i.bufSize||1024*1024,this.buffers=[],this.batch=i.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};l.inherits(r,h.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return m.concat(this.buffers.map(function(i){return i.toBuffer()}))}},_getWritableBuffer:function(){if(this.buffers.length){var i=this.buffers[this.buffers.length-1];if(!i.full)return i}var n=new a(this.bufSize);return this.buffers.push(n),n},_pipe:function(i){var n=this;return b(regeneratorRuntime.mark(function o(){var p;return regeneratorRuntime.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return p=function(L){return new Promise(function(F){L.write(i.toBuffer(),function(){F()})})},C.next=3,Promise.all(n.pipes.map(p));case 3:case"end":return C.stop()}},o)}))()},_writeToBuffers:function(i){for(var n=0,o=i.length;n1;)p._pipe(p.buffers.shift());L.next=29;break;case 21:if(p.corked){L.next=27;break}return L.next=24,p._pipe(C);case 24:o(),L.next=29;break;case 27:p._writeToBuffers(C),u.nextTick(o);case 29:L.next=34;break;case 31:p.paused||p.emit("data",C.toBuffer()),p._writeToBuffers(C),p.emit("readable");case 34:return L.abrupt("return",!0);case 35:case"end":return L.stop()}},O)}))()},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(i,n,o){var p=this,O=function(N){N?o(N):(p._flush(),p.pipes.forEach(function(L){L.end()}),p.emit("finish"))};i?this.write(i,n,O):O()},read:function(i){var n;if(i){for(n=[];i&&this.buffers.length&&!this.buffers[0].eod;){var o=this.buffers[0],p=o.read(i);i-=p.length,n.push(p),o.eod&&o.full&&this.buffers.shift()}return m.concat(n)}return n=this.buffers.map(function(O){return O.toBuffer()}).filter(Boolean),this.buffers=[],m.concat(n)},setEncoding:function(i){this.encoding=i},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(i){this.pipes.push(i),!this.paused&&this.buffers.length&&this.end()},unpipe:function(i){this.pipes=this.pipes.filter(function(n){return n!==i})},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),x.exports=r}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:467,buffer:216,"readable-stream":491}],24:[function(e,x,_){(function(u){function m(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}function g(f,y){for(var h=0;h=this._buf.length-4;)this._grow(this._inPos+h.length),l=this._inPos+this._buf.write(h,this._inPos,this._encoding);this._inPos=l}},{key:"addStringBuf",value:function(h){h.length&&(this._buffer=void 0,this.length+h.length>this.capacity&&this._grow(this.length+h.length),h._buf.copy(this._buf,this._inPos,0,h.length),this._inPos+=h.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}]),f}();x.exports=w}).call(this,e("buffer").Buffer)},{buffer:216}],25:[function(e,x,_){function u(w){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(y){return typeof y}:u=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},u(w)}var m=Object.prototype.toString,g=/["&<>]/,b={each:function(f,y){f&&(Array.isArray(f)?f.forEach(y):Object.keys(f).forEach(function(h){y(f[h],h)}))},some:function(f,y){return f?Array.isArray(f)?f.some(y):Object.keys(f).some(function(h){return y(f[h],h)}):!1},every:function(f,y){return f?Array.isArray(f)?f.every(y):Object.keys(f).every(function(h){return y(f[h],h)}):!0},map:function(f,y){return f?Array.isArray(f)?f.map(y):Object.keys(f).map(function(h){return y(f[h],h)}):[]},keyBy:function(f,y){return f.reduce(function(h,l){return h[l[y]]=l,h},{})},isEqual:function(f,y){var h=u(f),l=u(y),d=Array.isArray(f),s=Array.isArray(y);if(h!==l)return!1;switch(u(f)){case"object":return d||s?d&&s?f.length===y.length&&f.every(function(v,c){var a=y[c];return b.isEqual(v,a)}):!1:b.every(f,function(v,c){var a=y[c];return b.isEqual(v,a)});default:return f===y}},escapeHtml:function(f){var y=g.exec(f);if(!y)return f;for(var h="",l="",d=0,s=y.index;s":l=">";break;default:continue}d!==s&&(h+=f.substring(d,s)),d=s+1,h+=l}return d!==s?h+f.substring(d,s):h},strcmp:function(f,y){return fy?1:0},isUndefined:function(f){return m.call(f)==="[object Undefined]"},isObject:function(f){return m.call(f)==="[object Object]"},deepMerge:function(){var f=arguments[0]||{},y=arguments.length,h,l,d;function s(c,a){h=f[a],d=Array.isArray(c),b.isObject(c)||d?(d?(d=!1,l=h&&Array.isArray(h)?h:[]):l=h&&b.isObject(h)?h:{},f[a]=b.deepMerge(l,c)):b.isUndefined(c)||(f[a]=c)}for(var v=0;v&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,f={nop:function(){},promiseImmediate:function(h){return new Promise(function(l){u.setImmediate?m(function(){l(h)}):setTimeout(function(){l(h)},1)})},inherits:b,dateToExcel:function(h,l){return 25569+h.getTime()/(24*3600*1e3)-(l?1462:0)},excelToDate:function(h,l){var d=Math.round((h-25569+(l?1462:0))*24*3600*1e3);return new Date(d)},parsePath:function(h){var l=h.lastIndexOf("/");return{path:h.substring(0,l),name:h.substring(l+1)}},getRelsPath:function(h){var l=f.parsePath(h);return"".concat(l.path,"/_rels/").concat(l.name,".rels")},xmlEncode:function(h){var l=w.exec(h);if(!l)return h;for(var d="",s="",v=0,c=l.index;c=11&&a!==13)){s="";break}continue}}v!==c&&(d+=h.substring(v,c)),v=c+1,s&&(d+=s)}return v!==c?d+h.substring(v,c):d},xmlDecode:function(h){return h.replace(/&([a-z]*);/g,function(l){switch(l){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return l}})},validInt:function(h){var l=parseInt(h,10);return Number.isNaN(l)?0:l},isDateFmt:function(h){if(!h)return!1;h=h.replace(/\[[^\]]*]/g,""),h=h.replace(/"[^"]*"/g,"");var l=h.match(/[ymdhMsb]+/)!==null;return l},fs:{exists:function(h){return new Promise(function(l){g.access(h,g.constants.F_OK,function(d){l(!d)})})}},toIsoDateString:function(h){return h.toIsoString().subsstr(0,10)}};x.exports=f}).call(this,typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:215,timers:521}],27:[function(e,x,_){function u(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function m(t,i){for(var n=0;n",h="",d='="',s='"',v=" ";function c(t,i,n){t.push(v),t.push(i),t.push(d),t.push(w.xmlEncode(n.toString())),t.push(s)}function a(t,i){i&&b.each(i,function(n,o){n!==void 0&&c(t,o,n)})}var r=function(){function t(){u(this,t),this._xml=[],this._stack=[],this._rollbacks=[]}return g(t,[{key:"openXml",value:function(n){var o=this._xml;o.push(" `)}},{key:"openNode",value:function(n,o){var p=this.tos,O=this._xml;p&&this.open&&O.push(y),this._stack.push(n),O.push(f),O.push(n),a(O,o),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(n,o){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");o!==void 0&&c(this._xml,n,o)}},{key:"addAttributes",value:function(n){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");a(this._xml,n)}},{key:"writeText",value:function(n){var o=this._xml;this.open&&(o.push(y),this.open=!1),this.leaf=!1,o.push(w.xmlEncode(n.toString()))}},{key:"writeXml",value:function(n){this.open&&(this._xml.push(y),this.open=!1),this.leaf=!1,this._xml.push(n)}},{key:"closeNode",value:function(){var n=this._stack.pop(),o=this._xml;this.leaf?o.push(l):(o.push(h),o.push(n),o.push(y)),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(n,o,p){this.openNode(n,o),p!==void 0&&this.writeText(p),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 n=this._rollbacks.pop();this._xml.length>n.xml&&this._xml.splice(n.xml,this._xml.length-n.xml),this._stack.length>n.stack&&this._stack.splice(n.stack,this._stack.length-n.stack),this.leaf=n.leaf,this.open=n.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("")}}]),t}();r.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},x.exports=r},{"./under-dash":25,"./utils":26}],28:[function(e,x,_){(function(u){function m(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(N){return typeof N}:m=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},m(O)}function g(O,C,N,L,F,M,D){try{var R=O[M](D),P=R.value}catch(E){N(E);return}R.done?C(P):Promise.resolve(P).then(L,F)}function b(O){return function(){var C=this,N=arguments;return new Promise(function(L,F){var M=O.apply(C,N);function D(P){g(M,L,F,D,R,"next",P)}function R(P){g(M,L,F,D,R,"throw",P)}D(void 0)})}}function w(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}function f(O,C){for(var N=0;N"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},a(O)}var r=e("events"),t=e("jszip"),i=e("./stream-buf"),n=e("./browser-buffer-encode"),o=n.stringToBuffer,p=function(O){h(N,O);var C=d(N);function N(L){var F;return w(this,N),F=C.call(this),F.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},L),F.zip=new t,F.stream=new i,F}return y(N,[{key:"append",value:function(F,M){M.hasOwnProperty("base64")&&M.base64?this.zip.file(M.name,F,{base64:!0}):(u.browser&&typeof F=="string"&&(F=o(F)),this.zip.file(M.name,F))}},{key:"finalize",value:function(){var L=b(regeneratorRuntime.mark(function M(){var D;return regeneratorRuntime.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,this.zip.generateAsync(this.options);case 2:D=P.sent,this.stream.end(D),this.emit("finish");case 5:case"end":return P.stop()}},M,this)}));function F(){return L.apply(this,arguments)}return F}()},{key:"read",value:function(F){return this.stream.read(F)}},{key:"setEncoding",value:function(F){return this.stream.setEncoding(F)}},{key:"pause",value:function(){return this.stream.pause()}},{key:"resume",value:function(){return this.stream.resume()}},{key:"isPaused",value:function(){return this.stream.isPaused()}},{key:"pipe",value:function(F,M){return this.stream.pipe(F,M)}},{key:"unpipe",value:function(F){return this.stream.unpipe(F)}},{key:"unshift",value:function(F){return this.stream.unshift(F)}},{key:"wrap",value:function(F){return this.stream.wrap(F)}}]),N}(r.EventEmitter);x.exports={ZipWriter:p}}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":23,_process:467,events:367,jszip:399}],29:[function(e,x,_){x.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],30:[function(e,x,_){x.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],31:[function(e,x,_){function u(c,a){var r;if(typeof Symbol>"u"||c[Symbol.iterator]==null){if(Array.isArray(c)||(r=m(c))||a&&c&&typeof c.length=="number"){r&&(c=r);var t=0,i=function(){};return{s:i,n:function(){return t>=c.length?{done:!0}:{done:!1,value:c[t++]}},e:function(C){throw C},f:i}}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 n=!0,o=!1,p;return{s:function(){r=c[Symbol.iterator]()},n:function(){var C=r.next();return n=C.done,C},e:function(C){o=!0,p=C},f:function(){try{!n&&r.return!=null&&r.return()}finally{if(o)throw p}}}}function m(c,a){if(c){if(typeof c=="string")return g(c,a);var r=Object.prototype.toString.call(c).slice(8,-1);if(r==="Object"&&c.constructor&&(r=c.constructor.name),r==="Map"||r==="Set")return Array.from(c);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(c,a)}}function g(c,a){(a==null||a>c.length)&&(a=c.length);for(var r=0,t=new Array(a);r2&&arguments[2]!==void 0?arguments[2]:!1;if(r===void 0){if(i)return t}else if(i||r!==t)return r.toString()}},{key:"toStringAttribute",value:function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return c.toAttribute(r,t,i)}},{key:"toStringValue",value:function(r,t){return r===void 0?t:r}},{key:"toBoolAttribute",value:function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(r===void 0){if(i)return t}else if(i||r!==t)return r?"1":"0"}},{key:"toBoolValue",value:function(r,t){return r===void 0?t:r==="1"}},{key:"toIntAttribute",value:function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return c.toAttribute(r,t,i)}},{key:"toIntValue",value:function(r,t){return r===void 0?t:parseInt(r,10)}},{key:"toFloatAttribute",value:function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return c.toAttribute(r,t,i)}},{key:"toFloatValue",value:function(r,t){return r===void 0?t:parseFloat(r)}}]),c}();x.exports=v},{"../../utils/parse-sax":21,"../../utils/xml-stream":27}],32:[function(e,x,_){function u(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(o){return typeof o}:u=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},u(i)}function m(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function g(i,n){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(i){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},s(i)}var v=e("../base-xform"),c=e("../../../utils/col-cache"),a=function(i){w(o,i);var n=y(o);function o(){return m(this,o),n.apply(this,arguments)}return b(o,[{key:"render",value:function(O,C){O.openNode("definedName",{name:C.name,localSheetId:C.localSheetId}),O.writeText(C.ranges.join(",")),O.closeNode()}},{key:"parseOpen",value:function(O){switch(O.name){case"definedName":return this._parsedName=O.attributes.name,this._parsedLocalSheetId=O.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}},{key:"parseText",value:function(O){this._parsedText.push(O)}},{key:"parseClose",value:function(){return this.model={name:this._parsedName,ranges:t(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}]),o}(v);function r(i){try{return c.decodeEx(i),!0}catch{return!1}}function t(i){var n=[],o=!1,p="";return i.split(",").forEach(function(O){if(O){var C=(O.match(/'/g)||[]).length;if(!C){o?p+="".concat(O,","):r(O)&&n.push(O);return}var N=C%2===0;!o&&N&&r(O)?n.push(O):o&&!N?(o=!1,r(p+O)&&n.push(p+O),p=""):(o=!0,p+="".concat(O,","))}}),n}x.exports=a},{"../../../utils/col-cache":19,"../base-xform":31}],33:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../../../utils/utils"),c=e("../base-xform"),a=function(r){w(i,r);var t=y(i);function i(){return m(this,i),t.apply(this,arguments)}return b(i,[{key:"render",value:function(o,p){o.leafNode("sheet",{sheetId:p.id,name:p.name,state:p.state,"r:id":p.rId})}},{key:"parseOpen",value:function(o){return o.name==="sheet"?(this.model={name:v.xmlDecode(o.attributes.name),id:parseInt(o.attributes.sheetId,10),state:o.attributes.state,rId:o.attributes["r:id"]},!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),i}(c);x.exports=a},{"../../../utils/utils":26,"../base-xform":31}],34:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:o.fullCalcOnLoad?1:void 0})}},{key:"parseOpen",value:function(n){return n.name==="calcPr"?(this.model={},!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),t}(v);x.exports=c},{"../base-xform":31}],35:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode("workbookPr",{date1904:o.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}},{key:"parseOpen",value:function(n){return n.name==="workbookPr"?(this.model={date1904:n.attributes.date1904==="1"},!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),t}(v);x.exports=c},{"../base-xform":31}],36:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){var p={xWindow:o.x||0,yWindow:o.y||0,windowWidth:o.width||12e3,windowHeight:o.height||24e3,firstSheet:o.firstSheet,activeTab:o.activeTab};o.visibility&&o.visibility!=="visible"&&(p.visibility=o.visibility),n.leafNode("workbookView",p)}},{key:"parseOpen",value:function(n){if(n.name==="workbookView"){var o=this.model={},p=function(N,L,F){var M=L!==void 0?o[N]=L:F;M!==void 0&&(o[N]=M)},O=function(N,L,F){var M=L!==void 0?o[N]=parseInt(L,10):F;M!==void 0&&(o[N]=M)};return O("x",n.attributes.xWindow,0),O("y",n.attributes.yWindow,0),O("width",n.attributes.windowWidth,25e3),O("height",n.attributes.windowHeight,1e4),p("visibility",n.attributes.visibility,"visible"),O("activeTab",n.attributes.activeTab,void 0),O("firstSheet",n.attributes.firstSheet,void 0),!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),t}(v);x.exports=c},{"../base-xform":31}],37:[function(e,x,_){function u(L){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(M){return typeof M}:u=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},u(L)}function m(L,F){if(!(L instanceof F))throw new TypeError("Cannot call a class as a function")}function g(L,F){for(var M=0;M"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(L){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(M){return M.__proto__||Object.getPrototypeOf(M)},s(L)}var v=e("../../../utils/under-dash"),c=e("../../../utils/col-cache"),a=e("../../../utils/xml-stream"),r=e("../base-xform"),t=e("../static-xform"),i=e("../list-xform"),n=e("./defined-name-xform"),o=e("./sheet-xform"),p=e("./workbook-view-xform"),O=e("./workbook-properties-xform"),C=e("./workbook-calc-properties-xform"),N=function(L){w(M,L);var F=y(M);function M(){var D;return m(this,M),D=F.call(this),D.map={fileVersion:M.STATIC_XFORMS.fileVersion,workbookPr:new O,bookViews:new i({tag:"bookViews",count:!1,childXform:new p}),sheets:new i({tag:"sheets",count:!1,childXform:new o}),definedNames:new i({tag:"definedNames",count:!1,childXform:new n}),calcPr:new C},D}return b(M,[{key:"prepare",value:function(R){R.sheets=R.worksheets;var P=[],E=0;R.sheets.forEach(function(A){if(A.pageSetup&&A.pageSetup.printArea&&A.pageSetup.printArea.split("&&").forEach(function(I){var j=I.split(":"),B={name:"_xlnm.Print_Area",ranges:["'".concat(A.name,"'!$").concat(j[0],":$").concat(j[1])],localSheetId:E};P.push(B)}),A.pageSetup&&(A.pageSetup.printTitlesRow||A.pageSetup.printTitlesColumn)){var z=[];if(A.pageSetup.printTitlesColumn){var W=A.pageSetup.printTitlesColumn.split(":");z.push("'".concat(A.name,"'!$").concat(W[0],":$").concat(W[1]))}if(A.pageSetup.printTitlesRow){var $=A.pageSetup.printTitlesRow.split(":");z.push("'".concat(A.name,"'!$").concat($[0],":$").concat($[1]))}var U={name:"_xlnm.Print_Titles",ranges:z,localSheetId:E};P.push(U)}E++}),P.length&&(R.definedNames=R.definedNames.concat(P)),(R.media||[]).forEach(function(A,z){A.name=A.type+(z+1)})}},{key:"render",value:function(R,P){R.openXml(a.StdDocAttributes),R.openNode("workbook",M.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(R),this.map.workbookPr.render(R,P.properties),this.map.bookViews.render(R,P.views),this.map.sheets.render(R,P.sheets),this.map.definedNames.render(R,P.definedNames),this.map.calcPr.render(R,P.calcProperties),R.closeNode()}},{key:"parseOpen",value:function(R){if(this.parser)return this.parser.parseOpen(R),!0;switch(R.name){case"workbook":return!0;default:return this.parser=this.map[R.name],this.parser&&this.parser.parseOpen(R),!0}}},{key:"parseText",value:function(R){this.parser&&this.parser.parseText(R)}},{key:"parseClose",value:function(R){if(this.parser)return this.parser.parseClose(R)||(this.parser=void 0),!0;switch(R){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}},{key:"reconcile",value:function(R){var P=(R.workbookRels||[]).reduce(function($,U){return $[U.Id]=U,$},{}),E=[],A,z=0;(R.sheets||[]).forEach(function($){var U=P[$.rId];U&&(A=R.worksheetHash["xl/".concat(U.Target.replace(/^(\s|\/xl\/)+/,""))],A&&(A.name=$.name,A.id=$.id,A.state=$.state,E[z++]=A))});var W=[];v.each(R.definedNames,function($){if($.name==="_xlnm.Print_Area"){if(A=E[$.localSheetId],A){A.pageSetup||(A.pageSetup={});var U=c.decodeEx($.ranges[0]);A.pageSetup.printArea=A.pageSetup.printArea?"".concat(A.pageSetup.printArea,"&&").concat(U.dimensions):U.dimensions}}else if($.name==="_xlnm.Print_Titles"){if(A=E[$.localSheetId],A){A.pageSetup||(A.pageSetup={});var I=$.ranges.join(","),j=/\$/g,B=/\$\d+:\$\d+/,V=I.match(B);if(V&&V.length){var te=V[0];A.pageSetup.printTitlesRow=te.replace(j,"")}var ie=/\$[A-Z]+:\$[A-Z]+/,ce=I.match(ie);if(ce&&ce.length){var be=ce[0];A.pageSetup.printTitlesColumn=be.replace(j,"")}}}else W.push($)}),R.definedNames=W,R.media.forEach(function($,U){$.index=U})}}]),M}(r);N.WORKBOOK_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":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},N.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},x.exports=N},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./defined-name-xform":32,"./sheet-xform":33,"./workbook-calc-properties-xform":34,"./workbook-properties-xform":35,"./workbook-view-xform":36}],38:[function(e,x,_){function u(h,l){var d=Object.keys(h);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(h);l&&(s=s.filter(function(v){return Object.getOwnPropertyDescriptor(h,v).enumerable})),d.push.apply(d,s)}return d}function m(h){for(var l=1;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n._model=i,n}return b(t,[{key:"render",value:function(n,o,p){o===p[2]?n.leafNode(this.tag):this.tag==="x:SizeWithCells"&&o===p[1]&&n.leafNode(this.tag)}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}]),t}(v);x.exports=c},{"../../base-xform":31}],41:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n._model=i,n}return b(t,[{key:"render",value:function(n,o){n.leafNode(this.tag,null,o)}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(n){this.text=n}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}]),t}(v);x.exports=c},{"../../base-xform":31}],42:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"getAnchorRect",value:function(n){var o=Math.floor(n.left),p=Math.floor((n.left-o)*68),O=Math.floor(n.top),C=Math.floor((n.top-O)*18),N=Math.floor(n.right),L=Math.floor((n.right-N)*68),F=Math.floor(n.bottom),M=Math.floor((n.bottom-F)*18);return[o,p,O,C,N,L,F,M]}},{key:"getDefaultRect",value:function(n){var o=n.col,p=6,O=Math.max(n.row-2,0),C=14,N=o+2,L=2,F=O+4,M=16;return[o,p,O,C,N,L,F,M]}},{key:"render",value:function(n,o){var p=o.anchor?this.getAnchorRect(o.anchor):this.getDefaultRect(o.refAddress);n.leafNode("x:Anchor",null,p.join(", "))}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(n){this.text=n}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"x:Anchor"}}]),t}(v);x.exports=c},{"../base-xform":31}],43:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("../base-xform"),c=e("./vml-anchor-xform"),a=e("./style/vml-protection-xform"),r=e("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"],i=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={"x:Anchor":new c,"x:Locked":new a({tag:"x:Locked"}),"x:LockText":new a({tag:"x:LockText"}),"x:SizeWithCells":new r({tag:"x:SizeWithCells"}),"x:MoveWithCells":new r({tag:"x:MoveWithCells"})},O}return b(p,[{key:"render",value:function(C,N){var L=N.note,F=L.protection,M=L.editAs;C.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(C,M,t),this.map["x:SizeWithCells"].render(C,M,t),this.map["x:Anchor"].render(C,N),this.map["x:Locked"].render(C,F.locked),C.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(C,F.lockText),C.leafNode("x:Row",null,N.refAddress.row-1),C.leafNode("x:Column",null,N.refAddress.col-1),C.closeNode()}},{key:"parseOpen",value:function(C){switch(C.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C);break}return!0}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case this.tag:return this.normalizeModel(),!1;default:return!0}}},{key:"normalizeModel",value:function(){var C=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),N=Object.keys(C).length;this.model.editAs=t[N],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}},{key:"tag",get:function(){return"x:ClientData"}}]),p}(v);x.exports=i},{"../base-xform":31,"./style/vml-position-xform":40,"./style/vml-protection-xform":41,"./vml-anchor-xform":42}],44:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../../utils/xml-stream"),c=e("../base-xform"),a=e("./vml-shape-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={"v:shape":new a},o}return b(n,[{key:"render",value:function(p,O){var C=this;p.openXml(v.StdDocAttributes),p.openNode(this.tag,n.DRAWING_ATTRIBUTES),p.openNode("o:shapelayout",{"v:ext":"edit"}),p.leafNode("o:idmap",{"v:ext":"edit",data:1}),p.closeNode(),p.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),p.leafNode("v:stroke",{joinstyle:"miter"}),p.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),p.closeNode(),O.comments.forEach(function(N,L){C.map["v:shape"].render(p,N,L)}),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[p.name],this.parser&&this.parser.parseOpen(p);break}return!0}},{key:"parseText",value:function(p){this.parser&&this.parser.parseText(p)}},{key:"parseClose",value:function(p){if(this.parser)return this.parser.parseClose(p)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(p){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(p,O){var C=this;p.anchors.forEach(function(N){N.br?C.map["xdr:twoCellAnchor"].reconcile(N,O):C.map["xdr:oneCellAnchor"].reconcile(N,O)})}},{key:"tag",get:function(){return"xml"}}]),n}(c);r.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},x.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"./vml-shape-xform":45}],45:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../base-xform"),c=e("./vml-textbox-xform"),a=e("./vml-client-data-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={"v:textbox":new c,"x:ClientData":new a},o}return b(n,[{key:"render",value:function(p,O,C){p.openNode("v:shape",n.V_SHAPE_ATTRIBUTES(O,C)),p.leafNode("v:fill",{color2:"infoBackground [80]"}),p.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),p.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(p,O),this.map["x:ClientData"].render(p,O),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case this.tag:this.reset(),this.model={margins:{insetmode:p.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[p.name],this.parser&&this.parser.parseOpen(p);break}return!0}},{key:"parseText",value:function(p){this.parser&&this.parser.parseText(p)}},{key:"parseClose",value:function(p){if(this.parser)return this.parser.parseClose(p)||(this.parser=void 0),!0;switch(p){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}},{key:"tag",get:function(){return"v:shape"}}]),n}(v);r.V_SHAPE_ATTRIBUTES=function(t,i){return{id:"_x0000_s".concat(1025+i),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":t.note.margins&&t.note.margins.insetmode}},x.exports=r},{"../base-xform":31,"./vml-client-data-xform":43,"./vml-textbox-xform":46}],46:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"conversionUnit",value:function(n,o,p){return"".concat(parseFloat(n)*o.toFixed(2)).concat(p)}},{key:"reverseConversionUnit",value:function(n){var o=this;return(n||"").split(",").map(function(p){return Number(parseFloat(o.conversionUnit(parseFloat(p),.1,"")).toFixed(2))})}},{key:"render",value:function(n,o){var p=this,O={style:"mso-direction-alt:auto"};if(o&&o.note){var C=o.note&&o.note.margins,N=C.inset;Array.isArray(N)&&(N=N.map(function(L){return p.conversionUnit(L,10,"mm")}).join(",")),N&&(O.inset=N)}n.openNode("v:textbox",O),n.leafNode("div",{style:"text-align:left"}),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={inset:this.reverseConversionUnit(n.attributes.inset)},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"v:textbox"}}]),t}(v);x.exports=c},{"../base-xform":31}],47:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("./base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"createNewModel",value:function(n){return{}}},{key:"parseOpen",value:function(n){return this.parser=this.parser||this.map[n.name],this.parser?(this.parser.parseOpen(n),!0):n.name===this.tag?(this.model=this.createNewModel(n),!0):!1}},{key:"parseText",value:function(n){this.parser&&this.parser.parseText(n)}},{key:"onParserClose",value:function(n,o){this.model[n]=o.model}},{key:"parseClose",value:function(n){return this.parser?(this.parser.parseClose(n)||(this.onParserClose(n,this.parser),this.parser=void 0),!0):n!==this.tag}}]),t}(v);x.exports=c},{"./base-xform":31}],48:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.openNode("HeadingPairs"),n.openNode("vt:vector",{size:2,baseType:"variant"}),n.openNode("vt:variant"),n.leafNode("vt:lpstr",void 0,"Worksheets"),n.closeNode(),n.openNode("vt:variant"),n.leafNode("vt:i4",void 0,o.length),n.closeNode(),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name==="HeadingPairs"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){return n!=="HeadingPairs"}}]),t}(v);x.exports=c},{"../base-xform":31}],49:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.openNode("TitlesOfParts"),n.openNode("vt:vector",{size:o.length,baseType:"lpstr"}),o.forEach(function(p){n.leafNode("vt:lpstr",void 0,p.name)}),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name==="TitlesOfParts"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){return n!=="TitlesOfParts"}}]),t}(v);x.exports=c},{"../base-xform":31}],50:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("../../../utils/xml-stream"),c=e("../base-xform"),a=e("../simple/string-xform"),r=e("./app-heading-pairs-xform"),t=e("./app-titles-of-parts-xform"),i=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={Company:new a({tag:"Company"}),Manager:new a({tag:"Manager"}),HeadingPairs:new r,TitleOfParts:new t},O}return b(p,[{key:"render",value:function(C,N){C.openXml(v.StdDocAttributes),C.openNode("Properties",p.PROPERTY_ATTRIBUTES),C.leafNode("Application",void 0,"Microsoft Excel"),C.leafNode("DocSecurity",void 0,"0"),C.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(C,N.worksheets),this.map.TitleOfParts.render(C,N.worksheets),this.map.Company.render(C,N.company||""),this.map.Manager.render(C,N.manager),C.leafNode("LinksUpToDate",void 0,"false"),C.leafNode("SharedDoc",void 0,"false"),C.leafNode("HyperlinksChanged",void 0,"false"),C.leafNode("AppVersion",void 0,"16.0300"),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"Properties":return!0;default:return this.parser=this.map[C.name],this.parser?(this.parser.parseOpen(C),!0):!1}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}]),p}(c);i.DateFormat=function(n){return n.toISOString().replace(/[.]\d{3,6}/,"")},i.DateAttrs={"xsi:type":"dcterms:W3CDTF"},i.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},x.exports=i},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/string-xform":118,"./app-heading-pairs-xform":48,"./app-titles-of-parts-xform":49}],51:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../../../utils/xml-stream"),c=e("../base-xform"),a=function(r){w(i,r);var t=y(i);function i(){return m(this,i),t.apply(this,arguments)}return b(i,[{key:"render",value:function(o,p){o.openXml(v.StdDocAttributes),o.openNode("Types",i.PROPERTY_ATTRIBUTES);var O={};(p.media||[]).forEach(function(N){if(N.type==="image"){var L=N.extension;O[L]||(O[L]=!0,o.leafNode("Default",{Extension:L,ContentType:"image/".concat(L)}))}}),o.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),o.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),o.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),p.worksheets.forEach(function(N){var L="/xl/worksheets/sheet".concat(N.id,".xml");o.leafNode("Override",{PartName:L,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),o.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),o.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"});var C=p.sharedStrings&&p.sharedStrings.count;C&&o.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),p.tables&&p.tables.forEach(function(N){o.leafNode("Override",{PartName:"/xl/tables/".concat(N.target),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),p.drawings&&p.drawings.forEach(function(N){o.leafNode("Override",{PartName:"/xl/drawings/".concat(N.name,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),p.commentRefs&&(o.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),p.commentRefs.forEach(function(N){var L=N.commentName;o.leafNode("Override",{PartName:"/xl/".concat(L,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),o.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),o.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),o.closeNode()}},{key:"parseOpen",value:function(){return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),i}(c);a.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},x.exports=a},{"../../../utils/xml-stream":27,"../base-xform":31}],52:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("../../../utils/xml-stream"),c=e("../base-xform"),a=e("../simple/date-xform"),r=e("../simple/string-xform"),t=e("../simple/integer-xform"),i=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={"dc:creator":new r({tag:"dc:creator"}),"dc:title":new r({tag:"dc:title"}),"dc:subject":new r({tag:"dc:subject"}),"dc:description":new r({tag:"dc:description"}),"dc:identifier":new r({tag:"dc:identifier"}),"dc:language":new r({tag:"dc:language"}),"cp:keywords":new r({tag:"cp:keywords"}),"cp:category":new r({tag:"cp:category"}),"cp:lastModifiedBy":new r({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new a({tag:"cp:lastPrinted",format:p.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new r({tag:"cp:version"}),"cp:contentStatus":new r({tag:"cp:contentStatus"}),"cp:contentType":new r({tag:"cp:contentType"}),"dcterms:created":new a({tag:"dcterms:created",attrs:p.DateAttrs,format:p.DateFormat}),"dcterms:modified":new a({tag:"dcterms:modified",attrs:p.DateAttrs,format:p.DateFormat})},O}return b(p,[{key:"render",value:function(C,N){C.openXml(v.StdDocAttributes),C.openNode("cp:coreProperties",p.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(C,N.creator),this.map["dc:title"].render(C,N.title),this.map["dc:subject"].render(C,N.subject),this.map["dc:description"].render(C,N.description),this.map["dc:identifier"].render(C,N.identifier),this.map["dc:language"].render(C,N.language),this.map["cp:keywords"].render(C,N.keywords),this.map["cp:category"].render(C,N.category),this.map["cp:lastModifiedBy"].render(C,N.lastModifiedBy),this.map["cp:lastPrinted"].render(C,N.lastPrinted),this.map["cp:revision"].render(C,N.revision),this.map["cp:version"].render(C,N.version),this.map["cp:contentStatus"].render(C,N.contentStatus),this.map["cp:contentType"].render(C,N.contentType),this.map["dcterms:created"].render(C,N.created),this.map["dcterms:modified"].render(C,N.modified),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[C.name],this.parser)return this.parser.parseOpen(C),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(C)))}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(C))}}}]),p}(c);i.DateFormat=function(n){return n.toISOString().replace(/[.]\d{3}/,"")},i.DateAttrs={"xsi:type":"dcterms:W3CDTF"},i.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},x.exports=i},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/date-xform":116,"../simple/integer-xform":117,"../simple/string-xform":118}],53:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode("Relationship",o)}},{key:"parseOpen",value:function(n){switch(n.name){case"Relationship":return this.model=n.attributes,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),t}(v);x.exports=c},{"../base-xform":31}],54:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../../utils/xml-stream"),c=e("../base-xform"),a=e("./relationship-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={Relationship:new a},o}return b(n,[{key:"render",value:function(p,O){var C=this;O=O||this._values,p.openXml(v.StdDocAttributes),p.openNode("Relationships",n.RELATIONSHIPS_ATTRIBUTES),O.forEach(function(N){C.map.Relationship.render(p,N)}),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[p.name],this.parser)return this.parser.parseOpen(p),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(p)))}}},{key:"parseText",value:function(p){this.parser&&this.parser.parseText(p)}},{key:"parseClose",value:function(p){if(this.parser)return this.parser.parseClose(p)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(p){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(p))}}}]),n}(c);r.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},x.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"./relationship-xform":53}],55:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"parseOpen",value:function(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset(),this.model={range:{editAs:n.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n);break}return!0}},{key:"parseText",value:function(n){this.parser&&this.parser.parseText(n)}},{key:"reconcilePicture",value:function(n,o){if(n&&n.rId){var p=o.rels[n.rId],O=p.Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(O){var C=O[1],N=o.mediaIndex[C];return o.media[N]}}}}]),t}(v);x.exports=c},{"../base-xform":31}],56:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../base-xform"),c=e("./blip-xform"),a=function(r){w(i,r);var t=y(i);function i(){var n;return m(this,i),n=t.call(this),n.map={"a:blip":new c},n}return b(i,[{key:"render",value:function(o,p){o.openNode(this.tag),this.map["a:blip"].render(o,p),o.openNode("a:stretch"),o.leafNode("a:fillRect"),o.closeNode(),o.closeNode()}},{key:"parseOpen",value:function(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset();break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o);break}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(o){if(this.parser)return this.parser.parseClose(o)||(this.parser=void 0),!0;switch(o){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:blipFill"}}]),i}(v);x.exports=a},{"../base-xform":31,"./blip-xform":57}],57:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":o.rId,cstate:"print"})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:embed"]},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:blip"}}]),t}(v);x.exports=c},{"../base-xform":31}],58:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n){n.openNode(this.tag),n.leafNode("a:picLocks",{noChangeAspect:"1"}),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPicPr"}}]),t}(v);x.exports=c},{"../base-xform":31}],59:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../base-xform"),c=e("./hlink-click-xform"),a=e("./ext-lst-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={"a:hlinkClick":new c,"a:extLst":new a},o}return b(n,[{key:"render",value:function(p,O){p.openNode(this.tag,{id:O.index,name:"Picture ".concat(O.index)}),this.map["a:hlinkClick"].render(p,O),this.map["a:extLst"].render(p,O),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case this.tag:this.reset();break;default:this.parser=this.map[p.name],this.parser&&this.parser.parseOpen(p);break}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(p){if(this.parser)return this.parser.parseClose(p)||(this.parser=void 0),!0;switch(p){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPr"}}]),n}(v);x.exports=r},{"../base-xform":31,"./ext-lst-xform":62,"./hlink-click-xform":64}],60:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../base-xform"),c=e("../simple/integer-xform"),a=function(r){w(i,r);var t=y(i);function i(n){var o;return m(this,i),o=t.call(this),o.tag=n.tag,o.map={"xdr:col":new c({tag:"xdr:col",zero:!0}),"xdr:colOff":new c({tag:"xdr:colOff",zero:!0}),"xdr:row":new c({tag:"xdr:row",zero:!0}),"xdr:rowOff":new c({tag:"xdr:rowOff",zero:!0})},o}return b(i,[{key:"render",value:function(o,p){o.openNode(this.tag),this.map["xdr:col"].render(o,p.nativeCol),this.map["xdr:colOff"].render(o,p.nativeColOff),this.map["xdr:row"].render(o,p.nativeRow),this.map["xdr:rowOff"].render(o,p.nativeRowOff),o.closeNode()}},{key:"parseOpen",value:function(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset();break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o);break}return!0}},{key:"parseText",value:function(o){this.parser&&this.parser.parseText(o)}},{key:"parseClose",value:function(o){if(this.parser)return this.parser.parseClose(o)||(this.parser=void 0),!0;switch(o){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}]),i}(v);x.exports=a},{"../base-xform":31,"../simple/integer-xform":117}],61:[function(e,x,_){function u(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(O){return typeof O}:u=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},u(o)}function m(o,p){if(!(o instanceof p))throw new TypeError("Cannot call a class as a function")}function g(o,p){for(var O=0;O"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(o){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},s(o)}var v=e("../../../utils/col-cache"),c=e("../../../utils/xml-stream"),a=e("../base-xform"),r=e("./two-cell-anchor-xform"),t=e("./one-cell-anchor-xform");function i(o){var p=typeof o.range=="string"?v.decode(o.range):o.range;return p.br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}var n=function(o){w(O,o);var p=y(O);function O(){var C;return m(this,O),C=p.call(this),C.map={"xdr:twoCellAnchor":new r,"xdr:oneCellAnchor":new t},C}return b(O,[{key:"prepare",value:function(N){var L=this;N.anchors.forEach(function(F,M){F.anchorType=i(F);var D=L.map[F.anchorType];D.prepare(F,{index:M})})}},{key:"render",value:function(N,L){var F=this;N.openXml(c.StdDocAttributes),N.openNode(this.tag,O.DRAWING_ATTRIBUTES),L.anchors.forEach(function(M){var D=F.map[M.anchorType];D.render(N,M)}),N.closeNode()}},{key:"parseOpen",value:function(N){if(this.parser)return this.parser.parseOpen(N),!0;switch(N.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[N.name],this.parser&&this.parser.parseOpen(N);break}return!0}},{key:"parseText",value:function(N){this.parser&&this.parser.parseText(N)}},{key:"parseClose",value:function(N){if(this.parser)return this.parser.parseClose(N)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(N){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(N,L){var F=this;N.anchors.forEach(function(M){M.br?F.map["xdr:twoCellAnchor"].reconcile(M,L):F.map["xdr:oneCellAnchor"].reconcile(M,L)})}},{key:"tag",get:function(){return"xdr:wsDr"}}]),O}(a);n.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},x.exports=n},{"../../../utils/col-cache":19,"../../../utils/xml-stream":27,"../base-xform":31,"./one-cell-anchor-xform":66,"./two-cell-anchor-xform":69}],62:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n){n.openNode(this.tag),n.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),n.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:extLst"}}]),t}(v);x.exports=c},{"../base-xform":31}],63:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../base-xform"),c=9525,a=function(r){w(i,r);var t=y(i);function i(n){var o;return m(this,i),o=t.call(this),o.tag=n.tag,o.map={},o}return b(i,[{key:"render",value:function(o,p){o.openNode(this.tag);var O=Math.floor(p.width*c),C=Math.floor(p.height*c);o.addAttribute("cx",O),o.addAttribute("cy",C),o.closeNode()}},{key:"parseOpen",value:function(o){return o.name===this.tag?(this.model={width:parseInt(o.attributes.cx||"0",10)/c,height:parseInt(o.attributes.cy||"0",10)/c},!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),i}(v);x.exports=a},{"../base-xform":31}],64:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){o.hyperlinks&&o.hyperlinks.rId&&n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":o.hyperlinks.rId,tooltip:o.hyperlinks.tooltip})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={hyperlinks:{rId:n.attributes["r:id"],tooltip:n.attributes.tooltip}},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"a:hlinkClick"}}]),t}(v);x.exports=c},{"../base-xform":31}],65:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../base-xform"),c=e("./c-nv-pr-xform"),a=e("./c-nv-pic-pr-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={"xdr:cNvPr":new c,"xdr:cNvPicPr":new a},o}return b(n,[{key:"render",value:function(p,O){p.openNode(this.tag),this.map["xdr:cNvPr"].render(p,O),this.map["xdr:cNvPicPr"].render(p,O),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case this.tag:this.reset();break;default:this.parser=this.map[p.name],this.parser&&this.parser.parseOpen(p);break}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(p){if(this.parser)return this.parser.parseClose(p)||(this.parser=void 0),!0;switch(p){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:nvPicPr"}}]),n}(v);x.exports=r},{"../base-xform":31,"./c-nv-pic-pr-xform":58,"./c-nv-pr-xform":59}],66:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("./base-cell-anchor-xform"),c=e("../static-xform"),a=e("./cell-position-xform"),r=e("./ext-xform"),t=e("./pic-xform"),i=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:ext":new r({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new c({tag:"xdr:clientData"})},O}return b(p,[{key:"prepare",value:function(C,N){this.map["xdr:pic"].prepare(C.picture,N)}},{key:"render",value:function(C,N){C.openNode(this.tag,{editAs:N.range.editAs||"oneCell"}),this.map["xdr:from"].render(C,N.range.tl),this.map["xdr:ext"].render(C,N.range.ext),this.map["xdr:pic"].render(C,N.picture),this.map["xdr:clientData"].render(C,{}),C.closeNode()}},{key:"parseClose",value:function(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(C,N){C.medium=this.reconcilePicture(C.picture,N)}},{key:"tag",get:function(){return"xdr:oneCellAnchor"}}]),p}(v);x.exports=i},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./ext-xform":63,"./pic-xform":67}],67:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("../base-xform"),c=e("../static-xform"),a=e("./blip-fill-xform"),r=e("./nv-pic-pr-xform"),t=e("./sp-pr"),i=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={"xdr:nvPicPr":new r,"xdr:blipFill":new a,"xdr:spPr":new c(t)},O}return b(p,[{key:"prepare",value:function(C,N){C.index=N.index+1}},{key:"render",value:function(C,N){C.openNode(this.tag),this.map["xdr:nvPicPr"].render(C,N),this.map["xdr:blipFill"].render(C,N),this.map["xdr:spPr"].render(C,N),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case this.tag:this.reset();break;default:this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C);break}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(C){if(this.parser)return this.parser.parseClose(C)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(C){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:pic"}}]),p}(v);x.exports=i},{"../base-xform":31,"../static-xform":119,"./blip-fill-xform":56,"./nv-pic-pr-xform":65,"./sp-pr":68}],68:[function(e,x,_){x.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],69:[function(e,x,_){function u(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(o){return typeof o}:u=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},u(i)}function m(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function g(i,n){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(i){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},s(i)}var v=e("./base-cell-anchor-xform"),c=e("../static-xform"),a=e("./cell-position-xform"),r=e("./pic-xform"),t=function(i){w(o,i);var n=y(o);function o(){var p;return m(this,o),p=n.call(this),p.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:to":new a({tag:"xdr:to"}),"xdr:pic":new r,"xdr:clientData":new c({tag:"xdr:clientData"})},p}return b(o,[{key:"prepare",value:function(O,C){this.map["xdr:pic"].prepare(O.picture,C)}},{key:"render",value:function(O,C){O.openNode(this.tag,{editAs:C.range.editAs||"oneCell"}),this.map["xdr:from"].render(O,C.range.tl),this.map["xdr:to"].render(O,C.range.br),this.map["xdr:pic"].render(O,C.picture),this.map["xdr:clientData"].render(O,{}),O.closeNode()}},{key:"parseClose",value:function(O){if(this.parser)return this.parser.parseClose(O)||(this.parser=void 0),!0;switch(O){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(O,C){O.medium=this.reconcilePicture(O.picture,C)}},{key:"tag",get:function(){return"xdr:twoCellAnchor"}}]),o}(v);x.exports=t},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./pic-xform":67}],70:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("./base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n.tag=i.tag,n.always=!!i.always,n.count=i.count,n.empty=i.empty,n.$count=i.$count||"count",n.$=i.$,n.childXform=i.childXform,n.maxItems=i.maxItems,n}return b(t,[{key:"prepare",value:function(n,o){var p=this.childXform;n&&n.forEach(function(O,C){o.index=C,p.prepare(O,o)})}},{key:"render",value:function(n,o){if(this.always||o&&o.length){n.openNode(this.tag,this.$),this.count&&n.addAttribute(this.$count,o&&o.length||0);var p=this.childXform;(o||[]).forEach(function(O,C){p.render(n,O,C)}),n.closeNode()}else this.empty&&n.leafNode(this.tag)}},{key:"parseOpen",value:function(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:return this.model=[],!0;default:return this.childXform.parseOpen(n)?(this.parser=this.childXform,!0):!1}}},{key:"parseText",value:function(n){this.parser&&this.parser.parseText(n)}},{key:"parseClose",value:function(n){if(this.parser){if(!this.parser.parseClose(n)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(n,o){if(n){var p=this.childXform;n.forEach(function(O){p.reconcile(O,o)})}}}]),t}(v);x.exports=c},{"./base-xform":31}],71:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../../../utils/col-cache"),c=e("../base-xform"),a=function(r){w(i,r);var t=y(i);function i(){return m(this,i),t.apply(this,arguments)}return b(i,[{key:"render",value:function(o,p){if(p)if(typeof p=="string")o.leafNode("autoFilter",{ref:p});else{var O=function(F){return typeof F=="string"?F:v.getAddress(F.row,F.column).address},C=O(p.from),N=O(p.to);C&&N&&o.leafNode("autoFilter",{ref:"".concat(C,":").concat(N)})}}},{key:"parseOpen",value:function(o){o.name==="autoFilter"&&(this.model=o.attributes.ref)}},{key:"tag",get:function(){return"autoFilter"}}]),i}(c);x.exports=a},{"../../../utils/col-cache":19,"../base-xform":31}],72:[function(e,x,_){function u(N){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(F){return typeof F}:u=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},u(N)}function m(N,L){var F=Object.keys(N);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(N);L&&(M=M.filter(function(D){return Object.getOwnPropertyDescriptor(N,D).enumerable})),F.push.apply(F,M)}return F}function g(N){for(var L=1;L"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function a(N){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},a(N)}var r=e("../../../utils/utils"),t=e("../base-xform"),i=e("../../../doc/range"),n=e("../../../doc/enums"),o=e("../strings/rich-text-xform");function p(N){if(N==null)return n.ValueType.Null;if(N instanceof String||typeof N=="string")return n.ValueType.String;if(typeof N=="number")return n.ValueType.Number;if(typeof N=="boolean")return n.ValueType.Boolean;if(N instanceof Date)return n.ValueType.Date;if(N.text&&N.hyperlink)return n.ValueType.Hyperlink;if(N.formula)return n.ValueType.Formula;if(N.error)return n.ValueType.Error;throw new Error("I could not understand type of value")}function O(N){switch(N.type){case n.ValueType.Formula:return p(N.result);default:return N.type}}var C=function(N){h(F,N);var L=d(F);function F(){var M;return w(this,F),M=L.call(this),M.richTextXForm=new o,M}return y(F,[{key:"prepare",value:function(D,R){var P=R.styles.addStyleModel(D.style||{},O(D));switch(P&&(D.styleId=P),D.comment&&R.comments.push(g(g({},D.comment),{},{ref:D.address})),D.type){case n.ValueType.String:case n.ValueType.RichText:R.sharedStrings&&(D.ssId=R.sharedStrings.add(D.value));break;case n.ValueType.Date:R.date1904&&(D.date1904=!0);break;case n.ValueType.Hyperlink:R.sharedStrings&&D.text!==void 0&&D.text!==null&&(D.ssId=R.sharedStrings.add(D.text)),R.hyperlinks.push({address:D.address,target:D.hyperlink,tooltip:D.tooltip});break;case n.ValueType.Merge:R.merges.add(D);break;case n.ValueType.Formula:if(R.date1904&&(D.date1904=!0),D.shareType==="shared"&&(D.si=R.siFormulae++),D.formula)R.formulae[D.address]=D;else if(D.sharedFormula){var E=R.formulae[D.sharedFormula];if(!E)throw new Error("Shared Formula master must exist above and or left of clone for cell ".concat(D.address));E.si===void 0?(E.shareType="shared",E.si=R.siFormulae++,E.range=new i(E.address,D.address)):E.range&&E.range.expandToAddress(D.address),D.si=E.si}break}}},{key:"renderFormula",value:function(D,R){var P=null;switch(R.shareType){case"shared":P={t:"shared",ref:R.ref||R.range.range,si:R.si};break;case"array":P={t:"array",ref:R.ref};break;default:R.si!==void 0&&(P={t:"shared",si:R.si});break}switch(p(R.result)){case n.ValueType.Null:D.leafNode("f",P,R.formula);break;case n.ValueType.String:D.addAttribute("t","str"),D.leafNode("f",P,R.formula),D.leafNode("v",null,R.result);break;case n.ValueType.Number:D.leafNode("f",P,R.formula),D.leafNode("v",null,R.result);break;case n.ValueType.Boolean:D.addAttribute("t","b"),D.leafNode("f",P,R.formula),D.leafNode("v",null,R.result?1:0);break;case n.ValueType.Error:D.addAttribute("t","e"),D.leafNode("f",P,R.formula),D.leafNode("v",null,R.result.error);break;case n.ValueType.Date:D.leafNode("f",P,R.formula),D.leafNode("v",null,r.dateToExcel(R.result,R.date1904));break;default:throw new Error("I could not understand type of value")}}},{key:"render",value:function(D,R){var P=this;if(!(R.type===n.ValueType.Null&&!R.styleId)){switch(D.openNode("c"),D.addAttribute("r",R.address),R.styleId&&D.addAttribute("s",R.styleId),R.type){case n.ValueType.Null:break;case n.ValueType.Number:D.leafNode("v",null,R.value);break;case n.ValueType.Boolean:D.addAttribute("t","b"),D.leafNode("v",null,R.value?"1":"0");break;case n.ValueType.Error:D.addAttribute("t","e"),D.leafNode("v",null,R.value.error);break;case n.ValueType.String:case n.ValueType.RichText:R.ssId!==void 0?(D.addAttribute("t","s"),D.leafNode("v",null,R.ssId)):R.value&&R.value.richText?(D.addAttribute("t","inlineStr"),D.openNode("is"),R.value.richText.forEach(function(E){P.richTextXForm.render(D,E)}),D.closeNode("is")):(D.addAttribute("t","str"),D.leafNode("v",null,R.value));break;case n.ValueType.Date:D.leafNode("v",null,r.dateToExcel(R.value,R.date1904));break;case n.ValueType.Hyperlink:R.ssId!==void 0?(D.addAttribute("t","s"),D.leafNode("v",null,R.ssId)):(D.addAttribute("t","str"),D.leafNode("v",null,R.text));break;case n.ValueType.Formula:this.renderFormula(D,R);break;case n.ValueType.Merge:break}D.closeNode()}}},{key:"parseOpen",value:function(D){if(this.parser)return this.parser.parseOpen(D),!0;switch(D.name){case"c":return this.model={address:D.attributes.r},this.t=D.attributes.t,D.attributes.s&&(this.model.styleId=parseInt(D.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=D.attributes.si,this.model.shareType=D.attributes.t,this.model.ref=D.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(D),!0;default:return!1}}},{key:"parseText",value:function(D){if(this.parser){this.parser.parseText(D);return}switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+D:D;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+D:D:this.model.value=this.model.value?this.model.value+D:D;break}}},{key:"parseClose",value:function(D){switch(D){case"c":{var R=this.model;if(R.formula||R.shareType)R.type=n.ValueType.Formula,R.value&&(this.t==="str"?R.result=r.xmlDecode(R.value):this.t==="b"?R.result=parseInt(R.value,10)!==0:this.t==="e"?R.result={error:R.value}:R.result=parseFloat(R.value),R.value=void 0);else if(R.value!==void 0)switch(this.t){case"s":R.type=n.ValueType.String,R.value=parseInt(R.value,10);break;case"str":R.type=n.ValueType.String,R.value=r.xmlDecode(R.value);break;case"inlineStr":R.type=n.ValueType.String;break;case"b":R.type=n.ValueType.Boolean,R.value=parseInt(R.value,10)!==0;break;case"e":R.type=n.ValueType.Error,R.value={error:R.value};break;default:R.type=n.ValueType.Number,R.value=parseFloat(R.value);break}else R.styleId?R.type=n.ValueType.Null:R.type=n.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(D),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return this.parser?(this.parser.parseClose(D),!0):!1}}},{key:"reconcile",value:function(D,R){var P=D.styleId&&R.styles&&R.styles.getStyleModel(D.styleId);switch(P&&(D.style=P),D.styleId!==void 0&&(D.styleId=void 0),D.type){case n.ValueType.String:typeof D.value=="number"&&R.sharedStrings&&(D.value=R.sharedStrings.getString(D.value)),D.value.richText&&(D.type=n.ValueType.RichText);break;case n.ValueType.Number:P&&r.isDateFmt(P.numFmt)&&(D.type=n.ValueType.Date,D.value=r.excelToDate(D.value,R.date1904));break;case n.ValueType.Formula:D.result!==void 0&&P&&r.isDateFmt(P.numFmt)&&(D.result=r.excelToDate(D.result,R.date1904)),D.shareType==="shared"&&(D.ref?R.formulae[D.si]=D.address:(D.sharedFormula=R.formulae[D.si],delete D.shareType),delete D.si);break}var E=R.hyperlinkMap[D.address];E&&(D.type===n.ValueType.Formula?(D.text=D.result,D.result=void 0):(D.text=D.value,D.value=void 0),D.type=n.ValueType.Hyperlink,D.hyperlink=E);var A=R.commentsMap&&R.commentsMap[D.address];A&&(D.comment=A)}},{key:"tag",get:function(){return"c"}}]),F}(t);x.exports=C},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":26,"../base-xform":31,"../strings/rich-text-xform":121}],73:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode(this.tag,{iconSet:o.iconSet,iconId:o.iconId})}},{key:"parseOpen",value:function(n){var o=n.attributes;this.model={iconSet:o.iconSet,iconId:v.toIntValue(o.iconId)}}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"x14:cfIcon"}}]),t}(v);x.exports=c},{"../../base-xform":31}],74:[function(e,x,_){function u(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(C){return typeof C}:u=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},u(p)}function m(p,O){if(!(p instanceof O))throw new TypeError("Cannot call a class as a function")}function g(p,O){for(var C=0;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(p){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},s(p)}var v=e("uuid"),c=v.v4,a=e("../../base-xform"),r=e("../../composite-xform"),t=e("./databar-ext-xform"),i=e("./icon-set-ext-xform"),n={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},o=function(p){w(C,p);var O=y(C);function C(){var N;return m(this,C),N=O.call(this),N.map={"x14:dataBar":N.databarXform=new t,"x14:iconSet":N.iconSetXform=new i},N}return b(C,[{key:"prepare",value:function(L){C.isExt(L)&&(L.x14Id="{".concat(c(),"}").toUpperCase())}},{key:"render",value:function(L,F){if(C.isExt(F))switch(F.type){case"dataBar":this.renderDataBar(L,F);break;case"iconSet":this.renderIconSet(L,F);break}}},{key:"renderDataBar",value:function(L,F){L.openNode(this.tag,{type:"dataBar",id:F.x14Id}),this.databarXform.render(L,F),L.closeNode()}},{key:"renderIconSet",value:function(L,F){L.openNode(this.tag,{type:"iconSet",priority:F.priority,id:F.x14Id||"{".concat(c(),"}")}),this.iconSetXform.render(L,F),L.closeNode()}},{key:"createNewModel",value:function(L){var F=L.attributes;return{type:F.type,x14Id:F.id,priority:a.toIntValue(F.priority)}}},{key:"onParserClose",value:function(L,F){Object.assign(this.model,F.model)}},{key:"tag",get:function(){return"x14:cfRule"}}],[{key:"isExt",value:function(L){return L.type==="dataBar"?t.isExt(L):!!(L.type==="iconSet"&&(L.custom||n[L.iconSet]))}}]),C}(r);x.exports=o},{"../../base-xform":31,"../../composite-xform":47,"./databar-ext-xform":78,"./icon-set-ext-xform":80,uuid:526}],75:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../../composite-xform"),c=e("./f-ext-xform"),a=function(r){w(i,r);var t=y(i);function i(){var n;return m(this,i),n=t.call(this),n.map={"xm:f":n.fExtXform=new c},n}return b(i,[{key:"render",value:function(o,p){o.openNode(this.tag,{type:p.type}),p.value!==void 0&&this.fExtXform.render(o,p.value),o.closeNode()}},{key:"createNewModel",value:function(o){return{type:o.attributes.type}}},{key:"onParserClose",value:function(o,p){switch(o){case"xm:f":this.model.value=p.model?parseFloat(p.model):0;break}}},{key:"tag",get:function(){return"x14:cfvo"}}]),i}(v);x.exports=a},{"../../composite-xform":47,"./f-ext-xform":79}],76:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../composite-xform"),c=e("./sqref-ext-xform"),a=e("./cf-rule-ext-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={"xm:sqref":o.sqRef=new c,"x14:cfRule":o.cfRule=new a},o}return b(n,[{key:"prepare",value:function(p,O){var C=this;p.rules.forEach(function(N){C.cfRule.prepare(N,O)})}},{key:"render",value:function(p,O){var C=this;O.rules.some(a.isExt)&&(p.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),O.rules.filter(a.isExt).forEach(function(N){return C.cfRule.render(p,N)}),this.sqRef.render(p,O.ref),p.closeNode())}},{key:"createNewModel",value:function(){return{rules:[]}}},{key:"onParserClose",value:function(p,O){switch(p){case"xm:sqref":this.model.ref=O.model;break;case"x14:cfRule":this.model.rules.push(O.model);break}}},{key:"tag",get:function(){return"x14:conditionalFormatting"}}]),n}(v);x.exports=r},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./sqref-ext-xform":81}],77:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../composite-xform"),c=e("./cf-rule-ext-xform"),a=e("./conditional-formatting-ext-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={"x14:conditionalFormatting":o.cfXform=new a},o}return b(n,[{key:"hasContent",value:function(p){return p.hasExtContent===void 0&&(p.hasExtContent=p.some(function(O){return O.rules.some(c.isExt)})),p.hasExtContent}},{key:"prepare",value:function(p,O){var C=this;p.forEach(function(N){C.cfXform.prepare(N,O)})}},{key:"render",value:function(p,O){var C=this;this.hasContent(O)&&(p.openNode(this.tag),O.forEach(function(N){return C.cfXform.render(p,N)}),p.closeNode())}},{key:"createNewModel",value:function(){return[]}},{key:"onParserClose",value:function(p,O){this.model.push(O.model)}},{key:"tag",get:function(){return"x14:conditionalFormattings"}}]),n}(v);x.exports=r},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./conditional-formatting-ext-xform":76}],78:[function(e,x,_){function u(N){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(F){return typeof F}:u=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},u(N)}function m(N,L){return y(N)||f(N,L)||b(N,L)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(N,L){if(N){if(typeof N=="string")return w(N,L);var F=Object.prototype.toString.call(N).slice(8,-1);if(F==="Object"&&N.constructor&&(F=N.constructor.name),F==="Map"||F==="Set")return Array.from(N);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return w(N,L)}}function w(N,L){(L==null||L>N.length)&&(L=N.length);for(var F=0,M=new Array(L);F"u"||!(Symbol.iterator in Object(N)))){var F=[],M=!0,D=!1,R=void 0;try{for(var P=N[Symbol.iterator](),E;!(M=(E=P.next()).done)&&(F.push(E.value),!(L&&F.length===L));M=!0);}catch(A){D=!0,R=A}finally{try{!M&&P.return!=null&&P.return()}finally{if(D)throw R}}return F}}function y(N){if(Array.isArray(N))return N}function h(N,L){if(!(N instanceof L))throw new TypeError("Cannot call a class as a function")}function l(N,L){for(var F=0;F"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function i(N){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},i(N)}var n=e("../../base-xform"),o=e("../../composite-xform"),p=e("../../style/color-xform"),O=e("./cfvo-ext-xform"),C=function(N){s(F,N);var L=c(F);function F(){var M;return h(this,F),M=L.call(this),M.map={"x14:cfvo":M.cfvoXform=new O,"x14:borderColor":M.borderColorXform=new p("x14:borderColor"),"x14:negativeBorderColor":M.negativeBorderColorXform=new p("x14:negativeBorderColor"),"x14:negativeFillColor":M.negativeFillColorXform=new p("x14:negativeFillColor"),"x14:axisColor":M.axisColorXform=new p("x14:axisColor")},M}return d(F,[{key:"render",value:function(D,R){var P=this;D.openNode(this.tag,{minLength:n.toIntAttribute(R.minLength,0,!0),maxLength:n.toIntAttribute(R.maxLength,100,!0),border:n.toBoolAttribute(R.border,!1),gradient:n.toBoolAttribute(R.gradient,!0),negativeBarColorSameAsPositive:n.toBoolAttribute(R.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolAttribute(R.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toAttribute(R.axisPosition,"auto"),direction:n.toAttribute(R.direction,"leftToRight")}),R.cfvo.forEach(function(E){P.cfvoXform.render(D,E)}),this.borderColorXform.render(D,R.borderColor),this.negativeBorderColorXform.render(D,R.negativeBorderColor),this.negativeFillColorXform.render(D,R.negativeFillColor),this.axisColorXform.render(D,R.axisColor),D.closeNode()}},{key:"createNewModel",value:function(D){var R=D.attributes;return{cfvo:[],minLength:n.toIntValue(R.minLength,0),maxLength:n.toIntValue(R.maxLength,100),border:n.toBoolValue(R.border,!1),gradient:n.toBoolValue(R.gradient,!0),negativeBarColorSameAsPositive:n.toBoolValue(R.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolValue(R.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toStringValue(R.axisPosition,"auto"),direction:n.toStringValue(R.direction,"leftToRight")}}},{key:"onParserClose",value:function(D,R){var P=D.split(":"),E=m(P,2),A=E[1];switch(A){case"cfvo":this.model.cfvo.push(R.model);break;default:this.model[A]=R.model;break}}},{key:"tag",get:function(){return"x14:dataBar"}}],[{key:"isExt",value:function(D){return!D.gradient}}]),F}(o);x.exports=C},{"../../base-xform":31,"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-ext-xform":75}],79:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode(this.tag,null,o)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"xm:f"}}]),t}(v);x.exports=c},{"../../base-xform":31}],80:[function(e,x,_){function u(N){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(F){return typeof F}:u=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},u(N)}function m(N,L){return y(N)||f(N,L)||b(N,L)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(N,L){if(N){if(typeof N=="string")return w(N,L);var F=Object.prototype.toString.call(N).slice(8,-1);if(F==="Object"&&N.constructor&&(F=N.constructor.name),F==="Map"||F==="Set")return Array.from(N);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return w(N,L)}}function w(N,L){(L==null||L>N.length)&&(L=N.length);for(var F=0,M=new Array(L);F"u"||!(Symbol.iterator in Object(N)))){var F=[],M=!0,D=!1,R=void 0;try{for(var P=N[Symbol.iterator](),E;!(M=(E=P.next()).done)&&(F.push(E.value),!(L&&F.length===L));M=!0);}catch(A){D=!0,R=A}finally{try{!M&&P.return!=null&&P.return()}finally{if(D)throw R}}return F}}function y(N){if(Array.isArray(N))return N}function h(N,L){if(!(N instanceof L))throw new TypeError("Cannot call a class as a function")}function l(N,L){for(var F=0;F"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function i(N){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},i(N)}var n=e("../../base-xform"),o=e("../../composite-xform"),p=e("./cfvo-ext-xform"),O=e("./cf-icon-ext-xform"),C=function(N){s(F,N);var L=c(F);function F(){var M;return h(this,F),M=L.call(this),M.map={"x14:cfvo":M.cfvoXform=new p,"x14:cfIcon":M.cfIconXform=new O},M}return d(F,[{key:"render",value:function(D,R){var P=this;D.openNode(this.tag,{iconSet:n.toStringAttribute(R.iconSet),reverse:n.toBoolAttribute(R.reverse,!1),showValue:n.toBoolAttribute(R.showValue,!0),custom:n.toBoolAttribute(R.icons,!1)}),R.cfvo.forEach(function(E){P.cfvoXform.render(D,E)}),R.icons&&R.icons.forEach(function(E,A){E.iconId=A,P.cfIconXform.render(D,E)}),D.closeNode()}},{key:"createNewModel",value:function(D){var R=D.attributes;return{cfvo:[],iconSet:n.toStringValue(R.iconSet,"3TrafficLights"),reverse:n.toBoolValue(R.reverse,!1),showValue:n.toBoolValue(R.showValue,!0)}}},{key:"onParserClose",value:function(D,R){var P=D.split(":"),E=m(P,2),A=E[1];switch(A){case"cfvo":this.model.cfvo.push(R.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(R.model);break;default:this.model[A]=R.model;break}}},{key:"tag",get:function(){return"x14:iconSet"}}]),F}(o);x.exports=C},{"../../base-xform":31,"../../composite-xform":47,"./cf-icon-ext-xform":73,"./cfvo-ext-xform":75}],81:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode(this.tag,null,o)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"xm:sqref"}}]),t}(v);x.exports=c},{"../../base-xform":31}],82:[function(e,x,_){function u(R){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(E){return typeof E}:u=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},u(R)}function m(R,P){var E=Object.keys(R);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(R);P&&(A=A.filter(function(z){return Object.getOwnPropertyDescriptor(R,z).enumerable})),E.push.apply(E,A)}return E}function g(R){for(var P=1;P"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function a(R){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},a(R)}var r=e("../../base-xform"),t=e("../../composite-xform"),i=e("../../../../doc/range"),n=e("./databar-xform"),o=e("./ext-lst-ref-xform"),p=e("./formula-xform"),O=e("./color-scale-xform"),C=e("./icon-set-xform"),N={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},L=function(P){if(P.formulae&&P.formulae[0])return P.formulae[0];var E=new i(P.ref),A=E.tl;switch(P.operator){case"containsText":return'NOT(ISERROR(SEARCH("'.concat(P.text,'",').concat(A,")))");case"containsBlanks":return"LEN(TRIM(".concat(A,"))=0");case"notContainsBlanks":return"LEN(TRIM(".concat(A,"))>0");case"containsErrors":return"ISERROR(".concat(A,")");case"notContainsErrors":return"NOT(ISERROR(".concat(A,"))");default:return}},F=function(P){if(P.formulae&&P.formulae[0])return P.formulae[0];var E=new i(P.ref),A=E.tl;switch(P.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(A,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(A,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(A,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(A,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(A,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(A,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(A,",1)=TODAY()-1");case"today":return"FLOOR(".concat(A,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(A,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(A,",1)<=6,FLOOR(").concat(A,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(A,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(A,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(A,")=MONTH(TODAY()),YEAR(").concat(A,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(A,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(A,")=YEAR(EDATE(TODAY(),0+1)))");default:return}},M=function(P){var E=P.type,A=P.operator;switch(E){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:E};default:return{type:E,operator:A}}},D=function(R){h(E,R);var P=d(E);function E(){var A;return w(this,E),A=P.call(this),A.map={dataBar:A.databarXform=new n,extLst:A.extLstRefXform=new o,formula:A.formulaXform=new p,colorScale:A.colorScaleXform=new O,iconSet:A.iconSetXform=new C},A}return y(E,[{key:"render",value:function(z,W){switch(W.type){case"expression":this.renderExpression(z,W);break;case"cellIs":this.renderCellIs(z,W);break;case"top10":this.renderTop10(z,W);break;case"aboveAverage":this.renderAboveAverage(z,W);break;case"dataBar":this.renderDataBar(z,W);break;case"colorScale":this.renderColorScale(z,W);break;case"iconSet":this.renderIconSet(z,W);break;case"containsText":this.renderText(z,W);break;case"timePeriod":this.renderTimePeriod(z,W);break}}},{key:"renderExpression",value:function(z,W){z.openNode(this.tag,{type:"expression",dxfId:W.dxfId,priority:W.priority}),this.formulaXform.render(z,W.formulae[0]),z.closeNode()}},{key:"renderCellIs",value:function(z,W){var $=this;z.openNode(this.tag,{type:"cellIs",dxfId:W.dxfId,priority:W.priority,operator:W.operator}),W.formulae.forEach(function(U){$.formulaXform.render(z,U)}),z.closeNode()}},{key:"renderTop10",value:function(z,W){z.leafNode(this.tag,{type:"top10",dxfId:W.dxfId,priority:W.priority,percent:r.toBoolAttribute(W.percent,!1),bottom:r.toBoolAttribute(W.bottom,!1),rank:r.toIntValue(W.rank,10,!0)})}},{key:"renderAboveAverage",value:function(z,W){z.leafNode(this.tag,{type:"aboveAverage",dxfId:W.dxfId,priority:W.priority,aboveAverage:r.toBoolAttribute(W.aboveAverage,!0)})}},{key:"renderDataBar",value:function(z,W){z.openNode(this.tag,{type:"dataBar",priority:W.priority}),this.databarXform.render(z,W),this.extLstRefXform.render(z,W),z.closeNode()}},{key:"renderColorScale",value:function(z,W){z.openNode(this.tag,{type:"colorScale",priority:W.priority}),this.colorScaleXform.render(z,W),z.closeNode()}},{key:"renderIconSet",value:function(z,W){E.isPrimitive(W)&&(z.openNode(this.tag,{type:"iconSet",priority:W.priority}),this.iconSetXform.render(z,W),z.closeNode())}},{key:"renderText",value:function(z,W){z.openNode(this.tag,{type:W.operator,dxfId:W.dxfId,priority:W.priority,operator:r.toStringAttribute(W.operator,"containsText")});var $=L(W);$&&this.formulaXform.render(z,$),z.closeNode()}},{key:"renderTimePeriod",value:function(z,W){z.openNode(this.tag,{type:"timePeriod",dxfId:W.dxfId,priority:W.priority,timePeriod:W.timePeriod});var $=F(W);$&&this.formulaXform.render(z,$),z.closeNode()}},{key:"createNewModel",value:function(z){var W=z.attributes;return g(g({},M(W)),{},{dxfId:r.toIntValue(W.dxfId),priority:r.toIntValue(W.priority),timePeriod:W.timePeriod,percent:r.toBoolValue(W.percent),bottom:r.toBoolValue(W.bottom),rank:r.toIntValue(W.rank),aboveAverage:r.toBoolValue(W.aboveAverage)})}},{key:"onParserClose",value:function(z,W){switch(z){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,W.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(W.model);break}}},{key:"tag",get:function(){return"cfRule"}}],[{key:"isPrimitive",value:function(z){return!(z.type==="iconSet"&&(z.custom||N[z.iconSet]))}}]),E}(t);x.exports=D},{"../../../../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,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode(this.tag,{type:o.type,val:o.value})}},{key:"parseOpen",value:function(n){this.model={type:n.attributes.type,value:v.toFloatValue(n.attributes.val)}}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"cfvo"}}]),t}(v);x.exports=c},{"../../base-xform":31}],84:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../composite-xform"),c=e("../../style/color-xform"),a=e("./cfvo-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={cfvo:o.cfvoXform=new a,color:o.colorXform=new c},o}return b(n,[{key:"render",value:function(p,O){var C=this;p.openNode(this.tag),O.cfvo.forEach(function(N){C.cfvoXform.render(p,N)}),O.color.forEach(function(N){C.colorXform.render(p,N)}),p.closeNode()}},{key:"createNewModel",value:function(p){return{cfvo:[],color:[]}}},{key:"onParserClose",value:function(p,O){this.model[p].push(O.model)}},{key:"tag",get:function(){return"colorScale"}}]),n}(v);x.exports=r},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],85:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../../composite-xform"),c=e("./cf-rule-xform"),a=function(r){w(i,r);var t=y(i);function i(){var n;return m(this,i),n=t.call(this),n.map={cfRule:new c},n}return b(i,[{key:"render",value:function(o,p){var O=this;p.rules.some(c.isPrimitive)&&(o.openNode(this.tag,{sqref:p.ref}),p.rules.forEach(function(C){c.isPrimitive(C)&&(C.ref=p.ref,O.map.cfRule.render(o,C))}),o.closeNode())}},{key:"createNewModel",value:function(o){var p=o.attributes;return{ref:p.sqref,rules:[]}}},{key:"onParserClose",value:function(o,p){this.model.rules.push(p.model)}},{key:"tag",get:function(){return"conditionalFormatting"}}]),i}(v);x.exports=a},{"../../composite-xform":47,"./cf-rule-xform":82}],86:[function(e,x,_){function u(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(N){return typeof N}:u=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},u(O)}function m(O){return f(O)||w(O)||b(O)||g()}function g(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(O,C){if(O){if(typeof O=="string")return y(O,C);var N=Object.prototype.toString.call(O).slice(8,-1);if(N==="Object"&&O.constructor&&(N=O.constructor.name),N==="Map"||N==="Set")return Array.from(O);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return y(O,C)}}function w(O){if(typeof Symbol<"u"&&Symbol.iterator in Object(O))return Array.from(O)}function f(O){if(Array.isArray(O))return y(O)}function y(O,C){(C==null||C>O.length)&&(C=O.length);for(var N=0,L=new Array(C);N"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function i(O){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},i(O)}var n=e("../../base-xform"),o=e("./conditional-formatting-xform"),p=function(O){s(N,O);var C=c(N);function N(){var L;return h(this,N),L=C.call(this),L.cfXform=new o,L}return d(N,[{key:"reset",value:function(){this.model=[]}},{key:"prepare",value:function(F,M){var D=F.reduce(function(R,P){return Math.max.apply(Math,[R].concat(m(P.rules.map(function(E){return E.priority||0}))))},1);F.forEach(function(R){R.rules.forEach(function(P){P.priority||(P.priority=D++),P.style&&(P.dxfId=M.styles.addDxfStyle(P.style))})})}},{key:"render",value:function(F,M){var D=this;M.forEach(function(R){D.cfXform.render(F,R)})}},{key:"parseOpen",value:function(F){if(this.parser)return this.parser.parseOpen(F),!0;switch(F.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(F),!0;default:return!1}}},{key:"parseText",value:function(F){this.parser&&this.parser.parseText(F)}},{key:"parseClose",value:function(F){return this.parser?this.parser.parseClose(F)?!0:(this.model.push(this.parser.model),this.parser=void 0,!1):!1}},{key:"reconcile",value:function(F,M){F.forEach(function(D){D.rules.forEach(function(R){R.dxfId!==void 0&&(R.style=M.styles.getDxfStyle(R.dxfId),delete R.dxfId)})})}},{key:"tag",get:function(){return"conditionalFormatting"}}]),N}(n);x.exports=p},{"../../base-xform":31,"./conditional-formatting-xform":85}],87:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../composite-xform"),c=e("../../style/color-xform"),a=e("./cfvo-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={cfvo:o.cfvoXform=new a,color:o.colorXform=new c},o}return b(n,[{key:"render",value:function(p,O){var C=this;p.openNode(this.tag),O.cfvo.forEach(function(N){C.cfvoXform.render(p,N)}),this.colorXform.render(p,O.color),p.closeNode()}},{key:"createNewModel",value:function(){return{cfvo:[]}}},{key:"onParserClose",value:function(p,O){switch(p){case"cfvo":this.model.cfvo.push(O.model);break;case"color":this.model.color=O.model;break}}},{key:"tag",get:function(){return"dataBar"}}]),n}(v);x.exports=r},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],88:[function(e,x,_){function u(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(o){return typeof o}:u=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},u(i)}function m(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function g(i,n){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(i){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},s(i)}var v=e("../../base-xform"),c=e("../../composite-xform"),a=function(i){w(o,i);var n=y(o);function o(){return m(this,o),n.apply(this,arguments)}return b(o,[{key:"render",value:function(O,C){O.leafNode(this.tag,null,C)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(O){this.model+=O}},{key:"parseClose",value:function(O){return O!==this.tag}},{key:"tag",get:function(){return"x14:id"}}]),o}(v),r=function(i){w(o,i);var n=y(o);function o(){var p;return m(this,o),p=n.call(this),p.map={"x14:id":p.idXform=new a},p}return b(o,[{key:"render",value:function(O,C){O.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(O,C.x14Id),O.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(O,C){this.model.x14Id=C.model}},{key:"tag",get:function(){return"ext"}}]),o}(c),t=function(i){w(o,i);var n=y(o);function o(){var p;return m(this,o),p=n.call(this),p.map={ext:new r},p}return b(o,[{key:"render",value:function(O,C){O.openNode(this.tag),this.map.ext.render(O,C),O.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(O,C){Object.assign(this.model,C.model)}},{key:"tag",get:function(){return"extLst"}}]),o}(c);x.exports=t},{"../../base-xform":31,"../../composite-xform":47}],89:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode(this.tag,null,o)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"formula"}}]),t}(v);x.exports=c},{"../../base-xform":31}],90:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../base-xform"),c=e("../../composite-xform"),a=e("./cfvo-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={cfvo:o.cfvoXform=new a},o}return b(n,[{key:"render",value:function(p,O){var C=this;p.openNode(this.tag,{iconSet:v.toStringAttribute(O.iconSet,"3TrafficLights"),reverse:v.toBoolAttribute(O.reverse,!1),showValue:v.toBoolAttribute(O.showValue,!0)}),O.cfvo.forEach(function(N){C.cfvoXform.render(p,N)}),p.closeNode()}},{key:"createNewModel",value:function(p){var O=p.attributes;return{iconSet:v.toStringValue(O.iconSet,"3TrafficLights"),reverse:v.toBoolValue(O.reverse),showValue:v.toBoolValue(O.showValue),cfvo:[]}}},{key:"onParserClose",value:function(p,O){this.model[p].push(O.model)}},{key:"tag",get:function(){return"iconSet"}}]),n}(c);x.exports=r},{"../../base-xform":31,"../../composite-xform":47,"./cfvo-xform":83}],91:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"prepare",value:function(n,o){var p=o.styles.addStyleModel(n.style||{});p&&(n.styleId=p)}},{key:"render",value:function(n,o){n.openNode("col"),n.addAttribute("min",o.min),n.addAttribute("max",o.max),o.width&&n.addAttribute("width",o.width),o.styleId&&n.addAttribute("style",o.styleId),o.hidden&&n.addAttribute("hidden","1"),o.bestFit&&n.addAttribute("bestFit","1"),o.outlineLevel&&n.addAttribute("outlineLevel",o.outlineLevel),o.collapsed&&n.addAttribute("collapsed","1"),n.addAttribute("customWidth","1"),n.closeNode()}},{key:"parseOpen",value:function(n){if(n.name==="col"){var o=this.model={min:parseInt(n.attributes.min||"0",10),max:parseInt(n.attributes.max||"0",10),width:n.attributes.width===void 0?void 0:parseFloat(n.attributes.width||"0")};return n.attributes.style&&(o.styleId=parseInt(n.attributes.style,10)),(n.attributes.hidden===!0||n.attributes.hidden==="true"||n.attributes.hidden===1||n.attributes.hidden==="1")&&(o.hidden=!0),n.attributes.bestFit&&(o.bestFit=!0),n.attributes.outlineLevel&&(o.outlineLevel=parseInt(n.attributes.outlineLevel,10)),n.attributes.collapsed&&(o.collapsed=!0),!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"reconcile",value:function(n,o){n.styleId&&(n.style=o.styles.getStyleModel(n.styleId))}},{key:"tag",get:function(){return"col"}}]),t}(v);x.exports=c},{"../base-xform":31}],92:[function(e,x,_){function u(F){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(D){return typeof D}:u=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},u(F)}function m(F,M){if(!(F instanceof M))throw new TypeError("Cannot call a class as a function")}function g(F,M){for(var D=0;D"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(F){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)},s(F)}function v(F,M){var D=Object.keys(F);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(F);M&&(R=R.filter(function(P){return Object.getOwnPropertyDescriptor(F,P).enumerable})),D.push.apply(D,R)}return D}function c(F){for(var M=1;M1||W>1){var I=E.row+(A-1),j=E.col+(W-1);return c(c({},P.dataValidation),{},{sqref:"".concat(P.address,":").concat(i.encodeAddress(I,j))})}return c(c({},P.dataValidation),{},{sqref:P.address})}return null}).filter(Boolean)}var L=function(F){w(D,F);var M=y(D);function D(){return m(this,D),M.apply(this,arguments)}return b(D,[{key:"render",value:function(P,E){var A=N(E);A.length&&(P.openNode("dataValidations",{count:A.length}),A.forEach(function(z){P.openNode("dataValidation"),z.type!=="any"&&(P.addAttribute("type",z.type),z.operator&&z.type!=="list"&&z.operator!=="between"&&P.addAttribute("operator",z.operator),z.allowBlank&&P.addAttribute("allowBlank","1")),z.showInputMessage&&P.addAttribute("showInputMessage","1"),z.promptTitle&&P.addAttribute("promptTitle",z.promptTitle),z.prompt&&P.addAttribute("prompt",z.prompt),z.showErrorMessage&&P.addAttribute("showErrorMessage","1"),z.errorStyle&&P.addAttribute("errorStyle",z.errorStyle),z.errorTitle&&P.addAttribute("errorTitle",z.errorTitle),z.error&&P.addAttribute("error",z.error),P.addAttribute("sqref",z.sqref),(z.formulae||[]).forEach(function(W,$){P.openNode("formula".concat($+1)),z.type==="date"?P.writeText(t.dateToExcel(new Date(W))):P.writeText(W),P.closeNode()}),P.closeNode()}),P.closeNode())}},{key:"parseOpen",value:function(P){switch(P.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=P.attributes.sqref;var E={type:P.attributes.type||"any",formulae:[]};switch(P.attributes.type&&C(E,P.attributes,"allowBlank"),C(E,P.attributes,"showInputMessage"),C(E,P.attributes,"showErrorMessage"),E.type){case"any":case"list":case"custom":break;default:p(E,P.attributes,"operator","between");break}return p(E,P.attributes,"promptTitle"),p(E,P.attributes,"prompt"),p(E,P.attributes,"errorStyle"),p(E,P.attributes,"errorTitle"),p(E,P.attributes,"error"),this._dataValidation=E,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(P){this._formula&&this._formula.push(P)}},{key:"parseClose",value:function(P){var E=this;switch(P){case"dataValidations":return!1;case"dataValidation":{(!this._dataValidation.formulae||!this._dataValidation.formulae.length)&&(delete this._dataValidation.formulae,delete this._dataValidation.operator);var A=this._address.split(/\s+/g)||[];return A.forEach(function(W){if(W.includes(":")){var $=new o(W);$.forEachAddress(function(U){E.model[U]=E._dataValidation})}else E.model[W]=E._dataValidation}),!0}case"formula1":case"formula2":{var z=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":z=parseInt(z,10);break;case"decimal":z=parseFloat(z);break;case"date":z=t.excelToDate(parseFloat(z));break}return this._dataValidation.formulae.push(z),this._formula=void 0,!0}default:return!0}}},{key:"tag",get:function(){return"dataValidations"}}]),D}(n);x.exports=L},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/utils":26,"../base-xform":31}],93:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){o&&n.leafNode("dimension",{ref:o})}},{key:"parseOpen",value:function(n){return n.name==="dimension"?(this.model=n.attributes.ref,!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"dimension"}}]),t}(v);x.exports=c},{"../base-xform":31}],94:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){o&&n.leafNode(this.tag,{"r:id":o.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"drawing"}}]),t}(v);x.exports=c},{"../base-xform":31}],95:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../composite-xform"),c=e("./cf-ext/conditional-formattings-ext-xform"),a=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={"x14:conditionalFormattings":o.conditionalFormattings=new c},o}return b(n,[{key:"hasContent",value:function(p){return this.conditionalFormattings.hasContent(p.conditionalFormattings)}},{key:"prepare",value:function(p,O){this.conditionalFormattings.prepare(p.conditionalFormattings,O)}},{key:"render",value:function(p,O){p.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(p,O.conditionalFormattings),p.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(p,O){this.model[p]=O.model}},{key:"tag",get:function(){return"ext"}}]),n}(v),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={ext:o.ext=new a},o}return b(n,[{key:"prepare",value:function(p,O){this.ext.prepare(p,O)}},{key:"hasContent",value:function(p){return this.ext.hasContent(p)}},{key:"render",value:function(p,O){this.hasContent(O)&&(p.openNode("extLst"),this.ext.render(p,O),p.closeNode())}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(p,O){Object.assign(this.model,O.model)}},{key:"tag",get:function(){return"extLst"}}]),n}(v);x.exports=r},{"../composite-xform":47,"./cf-ext/conditional-formattings-ext-xform":77}],96:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){if(o){n.addRollback();var p=!1;n.openNode("headerFooter"),o.differentFirst&&(n.addAttribute("differentFirst","1"),p=!0),o.differentOddEven&&(n.addAttribute("differentOddEven","1"),p=!0),o.oddHeader&&typeof o.oddHeader=="string"&&(n.leafNode("oddHeader",null,o.oddHeader),p=!0),o.oddFooter&&typeof o.oddFooter=="string"&&(n.leafNode("oddFooter",null,o.oddFooter),p=!0),o.evenHeader&&typeof o.evenHeader=="string"&&(n.leafNode("evenHeader",null,o.evenHeader),p=!0),o.evenFooter&&typeof o.evenFooter=="string"&&(n.leafNode("evenFooter",null,o.evenFooter),p=!0),o.firstHeader&&typeof o.firstHeader=="string"&&(n.leafNode("firstHeader",null,o.firstHeader),p=!0),o.firstFooter&&typeof o.firstFooter=="string"&&(n.leafNode("firstFooter",null,o.firstFooter),p=!0),p?(n.closeNode(),n.commit()):n.rollback()}}},{key:"parseOpen",value:function(n){switch(n.name){case"headerFooter":return this.model={},n.attributes.differentFirst&&(this.model.differentFirst=parseInt(n.attributes.differentFirst,0)===1),n.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(n.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}},{key:"parseText",value:function(n){switch(this.currentNode){case"oddHeader":this.model.oddHeader=n;break;case"oddFooter":this.model.oddFooter=n;break;case"evenHeader":this.model.evenHeader=n;break;case"evenFooter":this.model.evenFooter=n;break;case"firstHeader":this.model.firstHeader=n;break;case"firstFooter":this.model.firstFooter=n;break}}},{key:"parseClose",value:function(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}},{key:"tag",get:function(){return"headerFooter"}}]),t}(v);x.exports=c},{"../base-xform":31}],97:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode("hyperlink",{ref:o.address,"r:id":o.rId,tooltip:o.tooltip})}},{key:"parseOpen",value:function(n){return n.name==="hyperlink"?(this.model={address:n.attributes.ref,rId:n.attributes["r:id"],tooltip:n.attributes.tooltip},!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"hyperlink"}}]),t}(v);x.exports=c},{"../base-xform":31}],98:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode("mergeCell",{ref:o})}},{key:"parseOpen",value:function(n){return n.name==="mergeCell"?(this.model=n.attributes.ref,!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"mergeCell"}}]),t}(v);x.exports=c},{"../base-xform":31}],99:[function(e,x,_){function u(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}function m(l,d){for(var s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../base-xform"),c=function(t){return typeof t<"u"},a=function(r){w(i,r);var t=y(i);function i(){return m(this,i),t.apply(this,arguments)}return b(i,[{key:"render",value:function(o,p){return p&&(c(p.summaryBelow)||c(p.summaryRight))?(o.leafNode(this.tag,{summaryBelow:c(p.summaryBelow)?Number(p.summaryBelow):void 0,summaryRight:c(p.summaryRight)?Number(p.summaryRight):void 0}),!0):!1}},{key:"parseOpen",value:function(o){return o.name===this.tag?(this.model={summaryBelow:c(o.attributes.summaryBelow)?!!Number(o.attributes.summaryBelow):void 0,summaryRight:c(o.attributes.summaryRight)?!!Number(o.attributes.summaryRight):void 0},!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"outlinePr"}}]),i}(v);x.exports=a},{"../base-xform":31}],101:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.leafNode("brk",o)}},{key:"parseOpen",value:function(n){return n.name==="brk"?(this.model=n.attributes.ref,!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"brk"}}]),t}(v);x.exports=c},{"../base-xform":31}],102:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../../../utils/under-dash"),c=e("../base-xform"),a=function(r){w(i,r);var t=y(i);function i(){return m(this,i),t.apply(this,arguments)}return b(i,[{key:"render",value:function(o,p){if(p){var O={left:p.left,right:p.right,top:p.top,bottom:p.bottom,header:p.header,footer:p.footer};v.some(O,function(C){return C!==void 0})&&o.leafNode(this.tag,O)}}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={left:parseFloat(o.attributes.left||.7),right:parseFloat(o.attributes.right||.7),top:parseFloat(o.attributes.top||.75),bottom:parseFloat(o.attributes.bottom||.75),header:parseFloat(o.attributes.header||.3),footer:parseFloat(o.attributes.footer||.3)},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageMargins"}}]),i}(c);x.exports=a},{"../../../utils/under-dash":25,"../base-xform":31}],103:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){return o&&o.fitToPage?(n.leafNode(this.tag,{fitToPage:o.fitToPage?"1":void 0}),!0):!1}},{key:"parseOpen",value:function(n){return n.name===this.tag?(this.model={fitToPage:n.attributes.fitToPage==="1"},!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetUpPr"}}]),t}(v);x.exports=c},{"../base-xform":31}],104:[function(e,x,_){function u(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(C){return typeof C}:u=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},u(p)}function m(p,O){if(!(p instanceof O))throw new TypeError("Cannot call a class as a function")}function g(p,O){for(var C=0;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(p){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},s(p)}var v=e("../../../utils/under-dash"),c=e("../base-xform");function a(p){return p?"1":void 0}function r(p){switch(p){case"overThenDown":return p;default:return}}function t(p){switch(p){case"atEnd":case"asDisplyed":return p;default:return}}function i(p){switch(p){case"dash":case"blank":case"NA":return p;default:return}}function n(p){return p!==void 0?parseInt(p,10):void 0}var o=function(p){w(C,p);var O=y(C);function C(){return m(this,C),O.apply(this,arguments)}return b(C,[{key:"render",value:function(L,F){if(F){var M={paperSize:F.paperSize,orientation:F.orientation,horizontalDpi:F.horizontalDpi,verticalDpi:F.verticalDpi,pageOrder:r(F.pageOrder),blackAndWhite:a(F.blackAndWhite),draft:a(F.draft),cellComments:t(F.cellComments),errors:i(F.errors),scale:F.scale,fitToWidth:F.fitToWidth,fitToHeight:F.fitToHeight,firstPageNumber:F.firstPageNumber,useFirstPageNumber:a(F.firstPageNumber),usePrinterDefaults:a(F.usePrinterDefaults),copies:F.copies};v.some(M,function(D){return D!==void 0})&&L.leafNode(this.tag,M)}}},{key:"parseOpen",value:function(L){switch(L.name){case this.tag:return this.model={paperSize:n(L.attributes.paperSize),orientation:L.attributes.orientation||"portrait",horizontalDpi:parseInt(L.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(L.attributes.verticalDpi||"4294967295",10),pageOrder:L.attributes.pageOrder||"downThenOver",blackAndWhite:L.attributes.blackAndWhite==="1",draft:L.attributes.draft==="1",cellComments:L.attributes.cellComments||"None",errors:L.attributes.errors||"displayed",scale:parseInt(L.attributes.scale||"100",10),fitToWidth:parseInt(L.attributes.fitToWidth||"1",10),fitToHeight:parseInt(L.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(L.attributes.firstPageNumber||"1",10),useFirstPageNumber:L.attributes.useFirstPageNumber==="1",usePrinterDefaults:L.attributes.usePrinterDefaults==="1",copies:parseInt(L.attributes.copies||"1",10)},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetup"}}]),C}(c);x.exports=o},{"../../../utils/under-dash":25,"../base-xform":31}],105:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){o&&n.leafNode(this.tag,{"r:id":o.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"picture"}}]),t}(v);x.exports=c},{"../base-xform":31}],106:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../../utils/under-dash"),c=e("../base-xform");function a(t){return t?"1":void 0}var r=function(t){w(n,t);var i=y(n);function n(){return m(this,n),i.apply(this,arguments)}return b(n,[{key:"render",value:function(p,O){if(O){var C={headings:a(O.showRowColHeaders),gridLines:a(O.showGridLines),horizontalCentered:a(O.horizontalCentered),verticalCentered:a(O.verticalCentered)};v.some(C,function(N){return N!==void 0})&&p.leafNode(this.tag,C)}}},{key:"parseOpen",value:function(p){switch(p.name){case this.tag:return this.model={showRowColHeaders:p.attributes.headings==="1",showGridLines:p.attributes.gridLines==="1",horizontalCentered:p.attributes.horizontalCentered==="1",verticalCentered:p.attributes.verticalCentered==="1"},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"printOptions"}}]),n}(c);x.exports=r},{"../../../utils/under-dash":25,"../base-xform":31}],107:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("./page-breaks-xform"),c=e("../list-xform"),a=function(r){w(i,r);var t=y(i);function i(){m(this,i);var n={tag:"rowBreaks",count:!0,childXform:new v};return t.call(this,n)}return b(i,[{key:"render",value:function(o,p){if(p&&p.length){o.openNode(this.tag,this.$),this.count&&(o.addAttribute(this.$count,p.length),o.addAttribute("manualBreakCount",p.length));var O=this.childXform;p.forEach(function(C){O.render(o,C)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}}]),i}(c);x.exports=a},{"../list-xform":70,"./page-breaks-xform":101}],108:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../base-xform"),c=e("./cell-xform"),a=function(r){w(i,r);var t=y(i);function i(n){var o;return m(this,i),o=t.call(this),o.maxItems=n&&n.maxItems,o.map={c:new c},o}return b(i,[{key:"prepare",value:function(o,p){var O=p.styles.addStyleModel(o.style);O&&(o.styleId=O);var C=this.map.c;o.cells.forEach(function(N){C.prepare(N,p)})}},{key:"render",value:function(o,p,O){o.openNode("row"),o.addAttribute("r",p.number),p.height&&(o.addAttribute("ht",p.height),o.addAttribute("customHeight","1")),p.hidden&&o.addAttribute("hidden","1"),p.min>0&&p.max>0&&p.min<=p.max&&o.addAttribute("spans","".concat(p.min,":").concat(p.max)),p.styleId&&(o.addAttribute("s",p.styleId),o.addAttribute("customFormat","1")),o.addAttribute("x14ac:dyDescent","0.25"),p.outlineLevel&&o.addAttribute("outlineLevel",p.outlineLevel),p.collapsed&&o.addAttribute("collapsed","1");var C=this.map.c;p.cells.forEach(function(N){C.render(o,N,O)}),o.closeNode()}},{key:"parseOpen",value:function(o){if(this.parser)return this.parser.parseOpen(o),!0;if(o.name==="row"){this.numRowsSeen+=1;var p=o.attributes.spans?o.attributes.spans.split(":").map(function(C){return parseInt(C,10)}):[void 0,void 0],O=this.model={number:parseInt(o.attributes.r,10),min:p[0],max:p[1],cells:[]};return o.attributes.s&&(O.styleId=parseInt(o.attributes.s,10)),(o.attributes.hidden===!0||o.attributes.hidden==="true"||o.attributes.hidden===1||o.attributes.hidden==="1")&&(O.hidden=!0),o.attributes.bestFit&&(O.bestFit=!0),o.attributes.ht&&(O.height=parseFloat(o.attributes.ht)),o.attributes.outlineLevel&&(O.outlineLevel=parseInt(o.attributes.outlineLevel,10)),o.attributes.collapsed&&(O.collapsed=!0),!0}return this.parser=this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):!1}},{key:"parseText",value:function(o){this.parser&&this.parser.parseText(o)}},{key:"parseClose",value:function(o){if(this.parser){if(!this.parser.parseClose(o)){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(o,p){o.style=o.styleId?p.styles.getStyleModel(o.styleId):{},o.styleId!==void 0&&(o.styleId=void 0);var O=this.map.c;o.cells.forEach(function(C){O.reconcile(C,p)})}},{key:"tag",get:function(){return"row"}}]),i}(v);x.exports=a},{"../base-xform":31,"./cell-xform":72}],109:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../../../utils/under-dash"),c=e("../base-xform"),a=function(r){w(i,r);var t=y(i);function i(){return m(this,i),t.apply(this,arguments)}return b(i,[{key:"render",value:function(o,p){if(p){var O={defaultRowHeight:p.defaultRowHeight,outlineLevelRow:p.outlineLevelRow,outlineLevelCol:p.outlineLevelCol,"x14ac:dyDescent":p.dyDescent};p.defaultColWidth&&(O.defaultColWidth=p.defaultColWidth),(!p.defaultRowHeight||p.defaultRowHeight!==15)&&(O.customHeight="1"),v.some(O,function(C){return C!==void 0})&&o.leafNode("sheetFormatPr",O)}}},{key:"parseOpen",value:function(o){return o.name==="sheetFormatPr"?(this.model={defaultRowHeight:parseFloat(o.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(o.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(o.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(o.attributes.outlineLevelCol||"0",10)},o.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(o.attributes.defaultColWidth)),!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetFormatPr"}}]),i}(c);x.exports=a},{"../../../utils/under-dash":25,"../base-xform":31}],110:[function(e,x,_){function u(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(o){return typeof o}:u=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},u(i)}function m(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function g(i,n){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(i){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},s(i)}var v=e("../base-xform"),c=e("../style/color-xform"),a=e("./page-setup-properties-xform"),r=e("./outline-properties-xform"),t=function(i){w(o,i);var n=y(o);function o(){var p;return m(this,o),p=n.call(this),p.map={tabColor:new c("tabColor"),pageSetUpPr:new a,outlinePr:new r},p}return b(o,[{key:"render",value:function(O,C){if(C){O.addRollback(),O.openNode("sheetPr");var N=!1;N=this.map.tabColor.render(O,C.tabColor)||N,N=this.map.pageSetUpPr.render(O,C.pageSetup)||N,N=this.map.outlinePr.render(O,C.outlineProperties)||N,N?(O.closeNode(),O.commit()):O.rollback()}}},{key:"parseOpen",value:function(O){return this.parser?(this.parser.parseOpen(O),!0):O.name===this.tag?(this.reset(),!0):this.map[O.name]?(this.parser=this.map[O.name],this.parser.parseOpen(O),!0):!1}},{key:"parseText",value:function(O){return this.parser?(this.parser.parseText(O),!0):!1}},{key:"parseClose",value:function(O){return this.parser?(this.parser.parseClose(O)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}},{key:"tag",get:function(){return"sheetPr"}}]),o}(v);x.exports=t},{"../base-xform":31,"../style/color-xform":127,"./outline-properties-xform":100,"./page-setup-properties-xform":103}],111:[function(e,x,_){function u(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(o){return typeof o}:u=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},u(i)}function m(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function g(i,n){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(i){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},s(i)}var v=e("../../../utils/under-dash"),c=e("../base-xform");function a(i,n){return i?n:void 0}function r(i,n){return i===n?!0:void 0}var t=function(i){w(o,i);var n=y(o);function o(){return m(this,o),n.apply(this,arguments)}return b(o,[{key:"render",value:function(O,C){if(C){var N={sheet:a(C.sheet,"1"),selectLockedCells:C.selectLockedCells===!1?"1":void 0,selectUnlockedCells:C.selectUnlockedCells===!1?"1":void 0,formatCells:a(C.formatCells,"0"),formatColumns:a(C.formatColumns,"0"),formatRows:a(C.formatRows,"0"),insertColumns:a(C.insertColumns,"0"),insertRows:a(C.insertRows,"0"),insertHyperlinks:a(C.insertHyperlinks,"0"),deleteColumns:a(C.deleteColumns,"0"),deleteRows:a(C.deleteRows,"0"),sort:a(C.sort,"0"),autoFilter:a(C.autoFilter,"0"),pivotTables:a(C.pivotTables,"0")};C.sheet&&(N.algorithmName=C.algorithmName,N.hashValue=C.hashValue,N.saltValue=C.saltValue,N.spinCount=C.spinCount,N.objects=a(C.objects===!1,"1"),N.scenarios=a(C.scenarios===!1,"1")),v.some(N,function(L){return L!==void 0})&&O.leafNode(this.tag,N)}}},{key:"parseOpen",value:function(O){switch(O.name){case this.tag:return this.model={sheet:r(O.attributes.sheet,"1"),objects:O.attributes.objects==="1"?!1:void 0,scenarios:O.attributes.scenarios==="1"?!1:void 0,selectLockedCells:O.attributes.selectLockedCells==="1"?!1:void 0,selectUnlockedCells:O.attributes.selectUnlockedCells==="1"?!1:void 0,formatCells:r(O.attributes.formatCells,"0"),formatColumns:r(O.attributes.formatColumns,"0"),formatRows:r(O.attributes.formatRows,"0"),insertColumns:r(O.attributes.insertColumns,"0"),insertRows:r(O.attributes.insertRows,"0"),insertHyperlinks:r(O.attributes.insertHyperlinks,"0"),deleteColumns:r(O.attributes.deleteColumns,"0"),deleteRows:r(O.attributes.deleteRows,"0"),sort:r(O.attributes.sort,"0"),autoFilter:r(O.attributes.autoFilter,"0"),pivotTables:r(O.attributes.pivotTables,"0")},O.attributes.algorithmName&&(this.model.algorithmName=O.attributes.algorithmName,this.model.hashValue=O.attributes.hashValue,this.model.saltValue=O.attributes.saltValue,this.model.spinCount=parseInt(O.attributes.spinCount,10)),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetProtection"}}]),o}(c);x.exports=t},{"../../../utils/under-dash":25,"../base-xform":31}],112:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../../utils/col-cache"),c=e("../base-xform"),a={frozen:"frozen",frozenSplit:"frozen",split:"split"},r=function(t){w(n,t);var i=y(n);function n(){return m(this,n),i.apply(this,arguments)}return b(n,[{key:"prepare",value:function(p){switch(p.state){case"frozen":case"split":break;default:p.state="normal";break}}},{key:"render",value:function(p,O){p.openNode("sheetView",{workbookViewId:O.workbookViewId||0});var C=function(R,P,E){E&&p.addAttribute(R,P)};C("rightToLeft","1",O.rightToLeft===!0),C("tabSelected","1",O.tabSelected),C("showRuler","0",O.showRuler===!1),C("showRowColHeaders","0",O.showRowColHeaders===!1),C("showGridLines","0",O.showGridLines===!1),C("zoomScale",O.zoomScale,O.zoomScale),C("zoomScaleNormal",O.zoomScaleNormal,O.zoomScaleNormal),C("view",O.style,O.style);var N,L,F,M;switch(O.state){case"frozen":L=O.xSplit||0,F=O.ySplit||0,N=O.topLeftCell||v.getAddress(F+1,L+1).address,M=O.xSplit&&O.ySplit&&"bottomRight"||O.xSplit&&"topRight"||"bottomLeft",p.leafNode("pane",{xSplit:O.xSplit||void 0,ySplit:O.ySplit||void 0,topLeftCell:N,activePane:M,state:"frozen"}),p.leafNode("selection",{pane:M,activeCell:O.activeCell,sqref:O.activeCell});break;case"split":O.activePane==="topLeft"&&(O.activePane=void 0),p.leafNode("pane",{xSplit:O.xSplit||void 0,ySplit:O.ySplit||void 0,topLeftCell:O.topLeftCell,activePane:O.activePane}),p.leafNode("selection",{pane:O.activePane,activeCell:O.activeCell,sqref:O.activeCell});break;case"normal":O.activeCell&&p.leafNode("selection",{activeCell:O.activeCell,sqref:O.activeCell});break}p.closeNode()}},{key:"parseOpen",value:function(p){switch(p.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(p.attributes.workbookViewId,10),rightToLeft:p.attributes.rightToLeft==="1",tabSelected:p.attributes.tabSelected==="1",showRuler:p.attributes.showRuler!=="0",showRowColHeaders:p.attributes.showRowColHeaders!=="0",showGridLines:p.attributes.showGridLines!=="0",zoomScale:parseInt(p.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(p.attributes.zoomScaleNormal||"100",10),style:p.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(p.attributes.xSplit||"0",10),ySplit:parseInt(p.attributes.ySplit||"0",10),topLeftCell:p.attributes.topLeftCell,activePane:p.attributes.activePane||"topLeft",state:p.attributes.state},!0;case"selection":{var O=p.attributes.pane||"topLeft";return this.selections[O]={pane:O,activeCell:p.attributes.activeCell},!0}default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(p){var O,C;switch(p){case"sheetView":return this.sheetView&&this.pane?(O=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:a[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(O.activePane=this.pane.activePane),C=this.selections[this.pane.activePane],C&&C.activeCell&&(O.activeCell=C.activeCell),this.sheetView.style&&(O.style=this.sheetView.style)):(O=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},C=this.selections.topLeft,C&&C.activeCell&&(O.activeCell=C.activeCell),this.sheetView.style&&(O.style=this.sheetView.style)),!1;default:return!0}}},{key:"reconcile",value:function(){}},{key:"tag",get:function(){return"sheetView"}}]),n}(c);x.exports=r},{"../../../utils/col-cache":19,"../base-xform":31}],113:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){o&&n.leafNode(this.tag,{"r:id":o.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tablePart"}}]),t}(v);x.exports=c},{"../base-xform":31}],114:[function(e,x,_){function u(be){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(oe){return typeof oe}:u=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},u(be)}function m(be,_e){if(!(be instanceof _e))throw new TypeError("Cannot call a class as a function")}function g(be,_e){for(var oe=0;oe<_e.length;oe++){var J=_e[oe];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(be,J.key,J)}}function b(be,_e,oe){return _e&&g(be.prototype,_e),oe&&g(be,oe),be}function w(be,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function");be.prototype=Object.create(_e&&_e.prototype,{constructor:{value:be,writable:!0,configurable:!0}}),_e&&f(be,_e)}function f(be,_e){return f=Object.setPrototypeOf||function(J,Q){return J.__proto__=Q,J},f(be,_e)}function y(be){var _e=d();return function(){var J=s(be),Q;if(_e){var he=s(this).constructor;Q=Reflect.construct(J,arguments,he)}else Q=J.apply(this,arguments);return h(this,Q)}}function h(be,_e){return _e&&(u(_e)==="object"||typeof _e=="function")?_e:l(be)}function l(be){if(be===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(be){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(oe){return oe.__proto__||Object.getPrototypeOf(oe)},s(be)}var v=e("../../../utils/under-dash"),c=e("../../../utils/col-cache"),a=e("../../../utils/xml-stream"),r=e("../../rel-type"),t=e("./merges"),i=e("../base-xform"),n=e("../list-xform"),o=e("./row-xform"),p=e("./col-xform"),O=e("./dimension-xform"),C=e("./hyperlink-xform"),N=e("./merge-cell-xform"),L=e("./data-validations-xform"),F=e("./sheet-properties-xform"),M=e("./sheet-format-properties-xform"),D=e("./sheet-view-xform"),R=e("./sheet-protection-xform"),P=e("./page-margins-xform"),E=e("./page-setup-xform"),A=e("./print-options-xform"),z=e("./auto-filter-xform"),W=e("./picture-xform"),$=e("./drawing-xform"),U=e("./table-part-xform"),I=e("./row-breaks-xform"),j=e("./header-footer-xform"),B=e("./cf/conditional-formattings-xform"),V=e("./ext-lst-xform"),te=function(_e,oe){Object.keys(oe).forEach(function(J){var Q=_e[J],he=oe[J];Q===void 0&&he!==void 0&&(_e[J]=he)})},ie=function(_e,oe){if(!oe||!oe.length)return _e;if(!_e||!_e.length)return oe;var J={},Q={};return _e.forEach(function(he){J[he.ref]=he,he.rules.forEach(function(ke){var re=ke.x14Id;re&&(Q[re]=ke)})}),oe.forEach(function(he){he.rules.forEach(function(ke){var re=Q[ke.x14Id];re?te(re,ke):J[he.ref]?J[he.ref].rules.push(ke):_e.push({ref:he.ref,rules:[ke]})})}),_e},ce=function(be){w(oe,be);var _e=y(oe);function oe(J){var Q;m(this,oe),Q=_e.call(this);var he=J||{},ke=he.maxRows,re=he.maxCols;return Q.map={sheetPr:new F,dimension:new O,sheetViews:new n({tag:"sheetViews",count:!1,childXform:new D}),sheetFormatPr:new M,cols:new n({tag:"cols",count:!1,childXform:new p}),sheetData:new n({tag:"sheetData",count:!1,empty:!0,childXform:new o({maxItems:re}),maxItems:ke}),autoFilter:new z,mergeCells:new n({tag:"mergeCells",count:!0,childXform:new N}),rowBreaks:new I,hyperlinks:new n({tag:"hyperlinks",count:!1,childXform:new C}),pageMargins:new P,dataValidations:new L,pageSetup:new E,headerFooter:new j,printOptions:new A,picture:new W,drawing:new $,sheetProtection:new R,tableParts:new n({tag:"tableParts",count:!0,childXform:new U}),conditionalFormatting:new B,extLst:new V},Q}return b(oe,[{key:"prepare",value:function(Q,he){var ke=this;he.merges=new t,Q.hyperlinks=he.hyperlinks=[],Q.comments=he.comments=[],he.formulae={},he.siFormulae=0,this.map.cols.prepare(Q.cols,he),this.map.sheetData.prepare(Q.rows,he),this.map.conditionalFormatting.prepare(Q.conditionalFormattings,he),Q.mergeCells=he.merges.mergeCells;var re=Q.rels=[];function se(fe){return"rId".concat(fe.length+1)}if(Q.hyperlinks.forEach(function(fe){var we=se(re);fe.rId=we,re.push({Id:we,Type:r.Hyperlink,Target:fe.target,TargetMode:"External"})}),Q.comments.length>0){var Ce={Id:se(re),Type:r.Comments,Target:"../comments".concat(Q.id,".xml")};re.push(Ce);var q={Id:se(re),Type:r.VmlDrawing,Target:"../drawings/vmlDrawing".concat(Q.id,".vml")};re.push(q),Q.comments.forEach(function(fe){fe.refAddress=c.decodeAddress(fe.ref)}),he.commentRefs.push({commentName:"comments".concat(Q.id),vmlDrawing:"vmlDrawing".concat(Q.id)})}var G=[],Z;Q.media.forEach(function(fe){if(fe.type==="background"){var we=se(re);Z=he.media[fe.imageId],re.push({Id:we,Type:r.Image,Target:"../media/".concat(Z.name,".").concat(Z.extension)}),Q.background={rId:we},Q.image=he.media[fe.imageId]}else if(fe.type==="image"){var ge=Q.drawing;Z=he.media[fe.imageId],ge||(ge=Q.drawing={rId:se(re),name:"drawing".concat(++he.drawingsCount),anchors:[],rels:[]},he.drawings.push(ge),re.push({Id:ge.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(ge.name,".xml")}));var je=ke.preImageId===fe.imageId?G[fe.imageId]:G[ge.rels.length];je||(je=se(ge.rels),G[ge.rels.length]=je,ge.rels.push({Id:je,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(Z.name,".").concat(Z.extension)}));var Ze={picture:{rId:je},range:fe.range};if(fe.hyperlinks&&fe.hyperlinks.hyperlink){var nt=se(ge.rels);G[ge.rels.length]=nt,Ze.picture.hyperlinks={tooltip:fe.hyperlinks.tooltip,rId:nt},ge.rels.push({Id:nt,Type:r.Hyperlink,Target:fe.hyperlinks.hyperlink,TargetMode:"External"})}ke.preImageId=fe.imageId,ge.anchors.push(Ze)}}),Q.tables.forEach(function(fe){var we=se(re);fe.rId=we,re.push({Id:we,Type:r.Table,Target:"../tables/".concat(fe.target)}),fe.columns.forEach(function(ge){var je=ge.style;je&&(ge.dxfId=he.styles.addDxfStyle(je))})}),this.map.extLst.prepare(Q,he)}},{key:"render",value:function(Q,he){Q.openXml(a.StdDocAttributes),Q.openNode("worksheet",oe.WORKSHEET_ATTRIBUTES);var ke=he.properties?{defaultRowHeight:he.properties.defaultRowHeight,dyDescent:he.properties.dyDescent,outlineLevelCol:he.properties.outlineLevelCol,outlineLevelRow:he.properties.outlineLevelRow}:void 0;he.properties&&he.properties.defaultColWidth&&(ke.defaultColWidth=he.properties.defaultColWidth);var re={outlineProperties:he.properties&&he.properties.outlineProperties,tabColor:he.properties&&he.properties.tabColor,pageSetup:he.pageSetup&&he.pageSetup.fitToPage?{fitToPage:he.pageSetup.fitToPage}:void 0},se=he.pageSetup&&he.pageSetup.margins,Ce={showRowColHeaders:he.pageSetup&&he.pageSetup.showRowColHeaders,showGridLines:he.pageSetup&&he.pageSetup.showGridLines,horizontalCentered:he.pageSetup&&he.pageSetup.horizontalCentered,verticalCentered:he.pageSetup&&he.pageSetup.verticalCentered},q=he.sheetProtection;this.map.sheetPr.render(Q,re),this.map.dimension.render(Q,he.dimensions),this.map.sheetViews.render(Q,he.views),this.map.sheetFormatPr.render(Q,ke),this.map.cols.render(Q,he.cols),this.map.sheetData.render(Q,he.rows),this.map.sheetProtection.render(Q,q),this.map.autoFilter.render(Q,he.autoFilter),this.map.mergeCells.render(Q,he.mergeCells),this.map.conditionalFormatting.render(Q,he.conditionalFormattings),this.map.dataValidations.render(Q,he.dataValidations),this.map.hyperlinks.render(Q,he.hyperlinks),this.map.printOptions.render(Q,Ce),this.map.pageMargins.render(Q,se),this.map.pageSetup.render(Q,he.pageSetup),this.map.headerFooter.render(Q,he.headerFooter),this.map.rowBreaks.render(Q,he.rowBreaks),this.map.drawing.render(Q,he.drawing),this.map.picture.render(Q,he.background),this.map.tableParts.render(Q,he.tables),this.map.extLst.render(Q,he),he.rels&&he.rels.forEach(function(G){G.Type===r.VmlDrawing&&Q.leafNode("legacyDrawing",{"r:id":G.Id})}),Q.closeNode()}},{key:"parseOpen",value:function(Q){return this.parser?(this.parser.parseOpen(Q),!0):Q.name==="worksheet"?(v.each(this.map,function(he){he.reset()}),!0):(this.parser=this.map[Q.name],this.parser&&this.parser.parseOpen(Q),!0)}},{key:"parseText",value:function(Q){this.parser&&this.parser.parseText(Q)}},{key:"parseClose",value:function(Q){if(this.parser)return this.parser.parseClose(Q)||(this.parser=void 0),!0;switch(Q){case"worksheet":{var he=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(he.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(he.outlineProperties=this.map.sheetPr.model.outlineProperties);var ke={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},re=Object.assign(ke,this.map.pageSetup.model,this.map.printOptions.model),se=ie(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:he,views:this.map.sheetViews.model,pageSetup:re,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:se},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(Q,he){var ke=(Q.relationships||[]).reduce(function(we,ge){if(we[ge.Id]=ge,ge.Type===r.Comments&&(Q.comments=he.comments[ge.Target].comments),ge.Type===r.VmlDrawing&&Q.comments&&Q.comments.length){var je=he.vmlDrawings[ge.Target].comments;Q.comments.forEach(function(Ze,nt){Ze.note=Object.assign({},Ze.note,je[nt])})}return we},{});if(he.commentsMap=(Q.comments||[]).reduce(function(we,ge){return ge.ref&&(we[ge.ref]=ge),we},{}),he.hyperlinkMap=(Q.hyperlinks||[]).reduce(function(we,ge){return ge.rId&&(we[ge.address]=ke[ge.rId].Target),we},{}),he.formulae={},Q.rows=Q.rows&&Q.rows.filter(Boolean)||[],Q.rows.forEach(function(we){we.cells=we.cells&&we.cells.filter(Boolean)||[]}),this.map.cols.reconcile(Q.cols,he),this.map.sheetData.reconcile(Q.rows,he),this.map.conditionalFormatting.reconcile(Q.conditionalFormattings,he),Q.media=[],Q.drawing){var re=ke[Q.drawing.rId],se=re.Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(se){var Ce=se[1],q=he.drawings[Ce];q.anchors.forEach(function(we){if(we.medium){var ge={type:"image",imageId:we.medium.index,range:we.range,hyperlinks:we.picture.hyperlinks};Q.media.push(ge)}})}}var G=Q.background&&ke[Q.background.rId];if(G){var Z=G.Target.split("/media/")[1],fe=he.mediaIndex&&he.mediaIndex[Z];fe!==void 0&&Q.media.push({type:"background",imageId:fe})}Q.tables=(Q.tables||[]).map(function(we){var ge=ke[we.rId];return he.tables[ge.Target]}),delete Q.relationships,delete Q.hyperlinks,delete Q.comments}}]),oe}(i);ce.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"},x.exports=ce},{"../../../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,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n.tag=i.tag,n.attr=i.attr,n}return b(t,[{key:"render",value:function(n,o){o&&(n.openNode(this.tag),n.closeNode())}},{key:"parseOpen",value:function(n){n.name===this.tag&&(this.model=!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),t}(v);x.exports=c},{"../base-xform":31}],116:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n.tag=i.tag,n.attr=i.attr,n.attrs=i.attrs,n._format=i.format||function(o){try{return Number.isNaN(o.getTime())?"":o.toISOString()}catch{return""}},n._parse=i.parse||function(o){return new Date(o)},n}return b(t,[{key:"render",value:function(n,o){o&&(n.openNode(this.tag),this.attrs&&n.addAttributes(this.attrs),this.attr?n.addAttribute(this.attr,this._format(o)):n.writeText(this._format(o)),n.closeNode())}},{key:"parseOpen",value:function(n){n.name===this.tag&&(this.attr?this.model=this._parse(n.attributes[this.attr]):this.text=[])}},{key:"parseText",value:function(n){this.attr||this.text.push(n)}},{key:"parseClose",value:function(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}]),t}(v);x.exports=c},{"../base-xform":31}],117:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n.tag=i.tag,n.attr=i.attr,n.attrs=i.attrs,n.zero=i.zero,n}return b(t,[{key:"render",value:function(n,o){(o||this.zero)&&(n.openNode(this.tag),this.attrs&&n.addAttributes(this.attrs),this.attr?n.addAttribute(this.attr,o):n.writeText(o),n.closeNode())}},{key:"parseOpen",value:function(n){return n.name===this.tag?(this.attr?this.model=parseInt(n.attributes[this.attr],10):this.text=[],!0):!1}},{key:"parseText",value:function(n){this.attr||this.text.push(n)}},{key:"parseClose",value:function(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}]),t}(v);x.exports=c},{"../base-xform":31}],118:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n.tag=i.tag,n.attr=i.attr,n.attrs=i.attrs,n}return b(t,[{key:"render",value:function(n,o){o!==void 0&&(n.openNode(this.tag),this.attrs&&n.addAttributes(this.attrs),this.attr?n.addAttribute(this.attr,o):n.writeText(o),n.closeNode())}},{key:"parseOpen",value:function(n){n.name===this.tag&&(this.attr?this.model=n.attributes[this.attr]:this.text=[])}},{key:"parseText",value:function(n){this.attr||this.text.push(n)}},{key:"parseClose",value:function(){return this.attr||(this.model=this.text.join("")),!1}}]),t}(v);x.exports=c},{"../base-xform":31}],119:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("./base-xform"),c=e("../../utils/xml-stream");function a(t,i){t.openNode(i.tag,i.$),i.c&&i.c.forEach(function(n){a(t,n)}),i.t&&t.writeText(i.t),t.closeNode()}var r=function(t){w(n,t);var i=y(n);function n(o){var p;return m(this,n),p=i.call(this),p._model=o,p}return b(n,[{key:"render",value:function(p){if(!this._xml){var O=new c;a(O,this._model),this._xml=O.xml}p.writeXml(this._xml)}},{key:"parseOpen",value:function(){return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(p){switch(p){case this._model.tag:return!1;default:return!0}}}]),n}(v);x.exports=r},{"../../utils/xml-stream":27,"./base-xform":31}],120:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("./text-xform"),c=e("./rich-text-xform"),a=e("../base-xform"),r=function(t){w(n,t);var i=y(n);function n(){var o;return m(this,n),o=i.call(this),o.map={r:new c,t:new v},o}return b(n,[{key:"render",value:function(p,O){if(p.openNode(this.tag,{sb:O.sb||0,eb:O.eb||0}),O&&O.hasOwnProperty("richText")&&O.richText){var C=this.map.r;O.richText.forEach(function(N){C.render(p,N)})}else O&&this.map.t.render(p,O.text);p.closeNode()}},{key:"parseOpen",value:function(p){var O=p.name;return this.parser?(this.parser.parseOpen(p),!0):O===this.tag?(this.model={sb:parseInt(p.attributes.sb,10),eb:parseInt(p.attributes.eb,10)},!0):(this.parser=this.map[O],this.parser?(this.parser.parseOpen(p),!0):!1)}},{key:"parseText",value:function(p){this.parser&&this.parser.parseText(p)}},{key:"parseClose",value:function(p){if(this.parser){if(!this.parser.parseClose(p)){switch(p){case"r":{var O=this.model.richText;O||(O=this.model.richText=[]),O.push(this.parser.model);break}case"t":this.model.text=this.parser.model;break}this.parser=void 0}return!0}switch(p){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"rPh"}}]),n}(a);x.exports=r},{"../base-xform":31,"./rich-text-xform":121,"./text-xform":124}],121:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("./text-xform"),c=e("../style/font-xform"),a=e("../base-xform"),r=function(t){w(n,t);var i=y(n);function n(o){var p;return m(this,n),p=i.call(this),p.model=o,p}return b(n,[{key:"render",value:function(p,O){O=O||this.model,p.openNode("r"),O.font&&this.fontXform.render(p,O.font),this.textXform.render(p,O.text),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(p),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(p),!0;default:return!1}}},{key:"parseText",value:function(p){this.parser&&this.parser.parseText(p)}},{key:"parseClose",value:function(p){switch(p){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(p),!0}}},{key:"tag",get:function(){return"r"}},{key:"textXform",get:function(){return this._textXform||(this._textXform=new v)}},{key:"fontXform",get:function(){return this._fontXform||(this._fontXform=new c(n.FONT_OPTIONS))}}]),n}(a);r.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},x.exports=r},{"../base-xform":31,"../style/font-xform":130,"./text-xform":124}],122:[function(e,x,_){function u(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(o){return typeof o}:u=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},u(i)}function m(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function g(i,n){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(i){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},s(i)}var v=e("./text-xform"),c=e("./rich-text-xform"),a=e("./phonetic-text-xform"),r=e("../base-xform"),t=function(i){w(o,i);var n=y(o);function o(p){var O;return m(this,o),O=n.call(this),O.model=p,O.map={r:new c,t:new v,rPh:new a},O}return b(o,[{key:"render",value:function(O,C){var N=this;O.openNode(this.tag),C&&C.hasOwnProperty("richText")&&C.richText?C.richText.length?C.richText.forEach(function(L){N.map.r.render(O,L)}):this.map.t.render(O,""):C!=null&&this.map.t.render(O,C),O.closeNode()}},{key:"parseOpen",value:function(O){var C=O.name;return this.parser?(this.parser.parseOpen(O),!0):C===this.tag?(this.model={},!0):(this.parser=this.map[C],this.parser?(this.parser.parseOpen(O),!0):!1)}},{key:"parseText",value:function(O){this.parser&&this.parser.parseText(O)}},{key:"parseClose",value:function(O){if(this.parser){if(!this.parser.parseClose(O)){switch(O){case"r":{var C=this.model.richText;C||(C=this.model.richText=[]),C.push(this.parser.model);break}case"t":this.model=this.parser.model;break}this.parser=void 0}return!0}switch(O){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"si"}}]),o}(r);x.exports=t},{"../base-xform":31,"./phonetic-text-xform":120,"./rich-text-xform":121,"./text-xform":124}],123:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../../../utils/xml-stream"),c=e("../base-xform"),a=e("./shared-string-xform"),r=function(t){w(n,t);var i=y(n);function n(o){var p;return m(this,n),p=i.call(this),p.model=o||{values:[],count:0},p.hash=Object.create(null),p.rich=Object.create(null),p}return b(n,[{key:"getString",value:function(p){return this.model.values[p]}},{key:"add",value:function(p){return p.richText?this.addRichText(p):this.addText(p)}},{key:"addText",value:function(p){var O=this.hash[p];return O===void 0&&(O=this.hash[p]=this.model.values.length,this.model.values.push(p)),this.model.count++,O}},{key:"addRichText",value:function(p){var O=this.sharedStringXform.toXml(p),C=this.rich[O];return C===void 0&&(C=this.rich[O]=this.model.values.length,this.model.values.push(p)),this.model.count++,C}},{key:"render",value:function(p,O){O=O||this._values,p.openXml(v.StdDocAttributes),p.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:O.count,uniqueCount:O.values.length});var C=this.sharedStringXform;O.values.forEach(function(N){C.render(p,N)}),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(p),!0;default:throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(p)))}}},{key:"parseText",value:function(p){this.parser&&this.parser.parseText(p)}},{key:"parseClose",value:function(p){if(this.parser)return this.parser.parseClose(p)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(p){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(p))}}},{key:"sharedStringXform",get:function(){return this._sharedStringXform||(this._sharedStringXform=new a)}},{key:"values",get:function(){return this.model.values}},{key:"uniqueCount",get:function(){return this.model.values.length}},{key:"count",get:function(){return this.model.count}}]),n}(c);x.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"./shared-string-xform":122}],124:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){n.openNode("t"),/^\s|\n|\s$/.test(o)&&n.addAttribute("xml:space","preserve"),n.writeText(o),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case"t":return this._text=[],!0;default:return!1}}},{key:"parseText",value:function(n){this._text.push(n)}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"t"}},{key:"model",get:function(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,function(n,o){return String.fromCharCode(parseInt(o,16))})}}]),t}(v);x.exports=c},{"../base-xform":31}],125:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("../../../doc/enums"),c=e("../../../utils/utils"),a=e("../base-xform"),r={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce(function(n,o){return n[o]=!0,n},{}),horizontal:function(o){return this.horizontalValues[o]?o:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce(function(n,o){return n[o]=!0,n},{}),vertical:function(o){return o==="middle"?"center":this.verticalValues[o]?o:void 0},wrapText:function(o){return o?!0:void 0},shrinkToFit:function(o){return o?!0:void 0},textRotation:function(o){switch(o){case"vertical":return o;default:return o=c.validInt(o),o>=-90&&o<=90?o:void 0}},indent:function(o){return o=c.validInt(o),Math.max(0,o)},readingOrder:function(o){switch(o){case"ltr":return v.ReadingOrder.LeftToRight;case"rtl":return v.ReadingOrder.RightToLeft;default:return}}},t={toXml:function(o){if(o=r.textRotation(o),o){if(o==="vertical")return 255;var p=Math.round(o);if(p>=0&&p<=90)return p;if(p<0&&p>=-90)return 90-p}},toModel:function(o){var p=c.validInt(o);if(p!==void 0){if(p===255)return"vertical";if(p>=0&&p<=90)return p;if(p>90&&p<=180)return 90-p}}},i=function(n){w(p,n);var o=y(p);function p(){return m(this,p),o.apply(this,arguments)}return b(p,[{key:"render",value:function(C,N){C.addRollback(),C.openNode("alignment");var L=!1;function F(M,D){D&&(C.addAttribute(M,D),L=!0)}F("horizontal",r.horizontal(N.horizontal)),F("vertical",r.vertical(N.vertical)),F("wrapText",r.wrapText(N.wrapText)?"1":!1),F("shrinkToFit",r.shrinkToFit(N.shrinkToFit)?"1":!1),F("indent",r.indent(N.indent)),F("textRotation",t.toXml(N.textRotation)),F("readingOrder",r.readingOrder(N.readingOrder)),C.closeNode(),L?C.commit():C.rollback()}},{key:"parseOpen",value:function(C){var N={},L=!1;function F(M,D,R){M&&(N[D]=R,L=!0)}F(C.attributes.horizontal,"horizontal",C.attributes.horizontal),F(C.attributes.vertical,"vertical",C.attributes.vertical==="center"?"middle":C.attributes.vertical),F(C.attributes.wrapText,"wrapText",!!C.attributes.wrapText),F(C.attributes.shrinkToFit,"shrinkToFit",!!C.attributes.shrinkToFit),F(C.attributes.indent,"indent",parseInt(C.attributes.indent,10)),F(C.attributes.textRotation,"textRotation",t.toModel(C.attributes.textRotation)),F(C.attributes.readingOrder,"readingOrder",C.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=L?N:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"alignment"}}]),p}(a);x.exports=i},{"../../../doc/enums":7,"../../../utils/utils":26,"../base-xform":31}],126:[function(e,x,_){function u(o,p){var O=Object.keys(o);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(o);p&&(C=C.filter(function(N){return Object.getOwnPropertyDescriptor(o,N).enumerable})),O.push.apply(O,C)}return O}function m(o){for(var p=1;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function a(o){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},a(o)}var r=e("../base-xform"),t=e("./color-xform"),i=function(o){h(O,o);var p=d(O);function O(C){var N;return w(this,O),N=p.call(this),N.name=C,N.map={color:new t},N}return y(O,[{key:"render",value:function(N,L,F){var M=L&&L.color||F||this.defaultColor;N.openNode(this.name),L&&L.style&&(N.addAttribute("style",L.style),M&&this.map.color.render(N,M)),N.closeNode()}},{key:"parseOpen",value:function(N){if(this.parser)return this.parser.parseOpen(N),!0;switch(N.name){case this.name:{var L=N.attributes.style;return L?this.model={style:L}:this.model=void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(N),!0;default:return!1}}},{key:"parseText",value:function(N){this.parser&&this.parser.parseText(N)}},{key:"parseClose",value:function(N){return this.parser?(this.parser.parseClose(N)||(this.parser=void 0),!0):(N===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}},{key:"validStyle",value:function(N){return O.validStyleValues[N]}},{key:"tag",get:function(){return this.name}}]),O}(r);i.validStyleValues=["thin","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce(function(o,p){return o[p]=!0,o},{});var n=function(o){h(O,o);var p=d(O);function O(){var C;return w(this,O),C=p.call(this),C.map={top:new i("top"),left:new i("left"),bottom:new i("bottom"),right:new i("right"),diagonal:new i("diagonal")},C}return y(O,[{key:"render",value:function(N,L){var F=L.color;N.openNode("border"),L.diagonal&&L.diagonal.style&&(L.diagonal.up&&N.addAttribute("diagonalUp","1"),L.diagonal.down&&N.addAttribute("diagonalDown","1"));function M(D,R){D&&!D.color&&L.color&&(D=m(m({},D),{},{color:L.color})),R.render(N,D,F)}M(L.left,this.map.left),M(L.right,this.map.right),M(L.top,this.map.top),M(L.bottom,this.map.bottom),M(L.diagonal,this.map.diagonal),N.closeNode()}},{key:"parseOpen",value:function(N){if(this.parser)return this.parser.parseOpen(N),!0;switch(N.name){case"border":return this.reset(),this.diagonalUp=!!N.attributes.diagonalUp,this.diagonalDown=!!N.attributes.diagonalDown,!0;default:return this.parser=this.map[N.name],this.parser?(this.parser.parseOpen(N),!0):!1}}},{key:"parseText",value:function(N){this.parser&&this.parser.parseText(N)}},{key:"parseClose",value:function(N){if(this.parser)return this.parser.parseClose(N)||(this.parser=void 0),!0;if(N==="border"){var L=this.model={},F=function(D,R,P){R&&(P&&Object.assign(R,P),L[D]=R)};F("left",this.map.left.model),F("right",this.map.right.model),F("top",this.map.top.model),F("bottom",this.map.bottom.model),F("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}]),O}(r);x.exports=n},{"../base-xform":31,"./color-xform":127}],127:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n.name=i||"color",n}return b(t,[{key:"render",value:function(n,o){return o?(n.openNode(this.name),o.argb?n.addAttribute("rgb",o.argb):o.theme!==void 0?(n.addAttribute("theme",o.theme),o.tint!==void 0&&n.addAttribute("tint",o.tint)):o.indexed!==void 0?n.addAttribute("indexed",o.indexed):n.addAttribute("auto","1"),n.closeNode(),!0):!1}},{key:"parseOpen",value:function(n){return n.name===this.name?(n.attributes.rgb?this.model={argb:n.attributes.rgb}:n.attributes.theme?(this.model={theme:parseInt(n.attributes.theme,10)},n.attributes.tint&&(this.model.tint=parseFloat(n.attributes.tint))):n.attributes.indexed?this.model={indexed:parseInt(n.attributes.indexed,10)}:this.model=void 0,!0):!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this.name}}]),t}(v);x.exports=c},{"../base-xform":31}],128:[function(e,x,_){function u(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(C){return typeof C}:u=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},u(p)}function m(p,O){if(!(p instanceof O))throw new TypeError("Cannot call a class as a function")}function g(p,O){for(var C=0;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(p){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},s(p)}var v=e("../base-xform"),c=e("./alignment-xform"),a=e("./border-xform"),r=e("./fill-xform"),t=e("./font-xform"),i=e("./numfmt-xform"),n=e("./protection-xform"),o=function(p){w(C,p);var O=y(C);function C(){var N;return m(this,C),N=O.call(this),N.map={alignment:new c,border:new a,fill:new r,font:new t,numFmt:new i,protection:new n},N}return b(C,[{key:"render",value:function(L,F){L.openNode(this.tag),F.font&&this.map.font.render(L,F.font),F.numFmt&&this.map.numFmt.render(L,F.numFmt),F.fill&&this.map.fill.render(L,F.fill),F.alignment&&this.map.alignment.render(L,F.alignment),F.border&&this.map.border.render(L,F.border),F.protection&&this.map.protection.render(L,F.protection),L.closeNode()}},{key:"parseOpen",value:function(L){if(this.parser)return this.parser.parseOpen(L),!0;switch(L.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[L.name],this.parser&&this.parser.parseOpen(L),!0}}},{key:"parseText",value:function(L){this.parser&&this.parser.parseText(L)}},{key:"parseClose",value:function(L){return this.parser?(this.parser.parseClose(L)||(this.parser=void 0),!0):L===this.tag?(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1):!0}},{key:"tag",get:function(){return"dxf"}}]),C}(v);x.exports=o},{"../base-xform":31,"./alignment-xform":125,"./border-xform":126,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./protection-xform":132}],129:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("../base-xform"),c=e("./color-xform"),a=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={color:new c},O}return b(p,[{key:"render",value:function(C,N){C.openNode("stop"),C.addAttribute("position",N.position),this.map.color.render(C,N.color),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"stop":return this.model={position:parseFloat(C.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(C),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(C){return this.parser?(this.parser.parseClose(C)||(this.model.color=this.parser.model,this.parser=void 0),!0):!1}},{key:"tag",get:function(){return"stop"}}]),p}(v),r=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={fgColor:new c("fgColor"),bgColor:new c("bgColor")},O}return b(p,[{key:"render",value:function(C,N){C.openNode("patternFill"),C.addAttribute("patternType",N.pattern),N.fgColor&&this.map.fgColor.render(C,N.fgColor),N.bgColor&&this.map.bgColor.render(C,N.bgColor),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"patternFill":return this.model={type:"pattern",pattern:C.attributes.patternType},!0;default:return this.parser=this.map[C.name],this.parser?(this.parser.parseOpen(C),!0):!1}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){return this.parser?(this.parser.parseClose(C)||(this.parser.model&&(this.model[C]=this.parser.model),this.parser=void 0),!0):!1}},{key:"name",get:function(){return"pattern"}},{key:"tag",get:function(){return"patternFill"}}]),p}(v),t=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={stop:new a},O}return b(p,[{key:"render",value:function(C,N){switch(C.openNode("gradientFill"),N.gradient){case"angle":C.addAttribute("degree",N.degree);break;case"path":C.addAttribute("type","path"),N.center.left&&(C.addAttribute("left",N.center.left),N.center.right===void 0&&C.addAttribute("right",N.center.left)),N.center.right&&C.addAttribute("right",N.center.right),N.center.top&&(C.addAttribute("top",N.center.top),N.center.bottom===void 0&&C.addAttribute("bottom",N.center.top)),N.center.bottom&&C.addAttribute("bottom",N.center.bottom);break}var L=this.map.stop;N.stops.forEach(function(F){L.render(C,F)}),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"gradientFill":{var N=this.model={stops:[]};return C.attributes.degree?(N.gradient="angle",N.degree=parseInt(C.attributes.degree,10)):C.attributes.type==="path"&&(N.gradient="path",N.center={left:C.attributes.left?parseFloat(C.attributes.left):0,top:C.attributes.top?parseFloat(C.attributes.top):0},C.attributes.right!==C.attributes.left&&(N.center.right=C.attributes.right?parseFloat(C.attributes.right):0),C.attributes.bottom!==C.attributes.top&&(N.center.bottom=C.attributes.bottom?parseFloat(C.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(C),!0;default:return!1}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){return this.parser?(this.parser.parseClose(C)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0):!1}},{key:"name",get:function(){return"gradient"}},{key:"tag",get:function(){return"gradientFill"}}]),p}(v),i=function(n){w(p,n);var o=y(p);function p(){var O;return m(this,p),O=o.call(this),O.map={patternFill:new r,gradientFill:new t},O}return b(p,[{key:"render",value:function(C,N){switch(C.addRollback(),C.openNode("fill"),N.type){case"pattern":this.map.patternFill.render(C,N);break;case"gradient":this.map.gradientFill.render(C,N);break;default:C.rollback();return}C.closeNode(),C.commit()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"fill":return this.model={},!0;default:return this.parser=this.map[C.name],this.parser?(this.parser.parseOpen(C),!0):!1}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){return this.parser?(this.parser.parseClose(C)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0):!1}},{key:"validStyle",value:function(C){return p.validPatternValues[C]}},{key:"tag",get:function(){return"fill"}}]),p}(v);i.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce(function(n,o){return n[o]=!0,n},{}),i.StopXform=a,i.PatternFillXform=r,i.GradientFillXform=t,x.exports=i},{"../base-xform":31,"./color-xform":127}],130:[function(e,x,_){function u(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(C){return typeof C}:u=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},u(p)}function m(p,O){if(!(p instanceof O))throw new TypeError("Cannot call a class as a function")}function g(p,O){for(var C=0;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(p){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},s(p)}var v=e("./color-xform"),c=e("../simple/boolean-xform"),a=e("../simple/integer-xform"),r=e("../simple/string-xform"),t=e("./underline-xform"),i=e("../../../utils/under-dash"),n=e("../base-xform"),o=function(p){w(C,p);var O=y(C);function C(N){var L;return m(this,C),L=O.call(this),L.options=N||C.OPTIONS,L.map={b:{prop:"bold",xform:new c({tag:"b",attr:"val"})},i:{prop:"italic",xform:new c({tag:"i",attr:"val"})},u:{prop:"underline",xform:new t},charset:{prop:"charset",xform:new a({tag:"charset",attr:"val"})},color:{prop:"color",xform:new v},condense:{prop:"condense",xform:new c({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new c({tag:"extend",attr:"val"})},family:{prop:"family",xform:new a({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new c({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new r({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new r({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new c({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new c({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new a({tag:"sz",attr:"val"})}},L.map[L.options.fontNameTag]={prop:"name",xform:new r({tag:L.options.fontNameTag,attr:"val"})},L}return b(C,[{key:"render",value:function(L,F){var M=this.map;L.openNode(this.options.tagName),i.each(this.map,function(D,R){M[R].xform.render(L,F[D.prop])}),L.closeNode()}},{key:"parseOpen",value:function(L){if(this.parser)return this.parser.parseOpen(L),!0;if(this.map[L.name])return this.parser=this.map[L.name].xform,this.parser.parseOpen(L);switch(L.name){case this.options.tagName:return this.model={},!0;default:return!1}}},{key:"parseText",value:function(L){this.parser&&this.parser.parseText(L)}},{key:"parseClose",value:function(L){if(this.parser&&!this.parser.parseClose(L)){var F=this.map[L];return this.parser.model&&(this.model[F.prop]=this.parser.model),this.parser=void 0,!0}switch(L){case this.options.tagName:return!1;default:return!0}}},{key:"tag",get:function(){return this.options.tagName}}]),C}(n);o.OPTIONS={tagName:"font",fontNameTag:"name"},x.exports=o},{"../../../utils/under-dash":25,"../base-xform":31,"../simple/boolean-xform":115,"../simple/integer-xform":117,"../simple/string-xform":118,"./color-xform":127,"./underline-xform":135}],131:[function(e,x,_){function u(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(p){return typeof p}:u=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u(n)}function m(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function g(n,o){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(n){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},s(n)}var v=e("../../../utils/under-dash"),c=e("../../defaultnumformats"),a=e("../base-xform");function r(){var n={};return v.each(c,function(o,p){o.f&&(n[o.f]=parseInt(p,10))}),n}var t=r(),i=function(n){w(p,n);var o=y(p);function p(O,C){var N;return m(this,p),N=o.call(this),N.id=O,N.formatCode=C,N}return b(p,[{key:"render",value:function(C,N){C.leafNode("numFmt",{numFmtId:N.id,formatCode:N.formatCode})}},{key:"parseOpen",value:function(C){switch(C.name){case"numFmt":return this.model={id:parseInt(C.attributes.numFmtId,10),formatCode:C.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"numFmt"}}]),p}(a);i.getDefaultFmtId=function(o){return t[o]},i.getDefaultFmtCode=function(o){return c[o]&&c[o].f},x.exports=i},{"../../../utils/under-dash":25,"../../defaultnumformats":29,"../base-xform":31}],132:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../base-xform"),c={boolean:function(t,i){return t===void 0?i:t}},a=function(r){w(i,r);var t=y(i);function i(){return m(this,i),t.apply(this,arguments)}return b(i,[{key:"render",value:function(o,p){o.addRollback(),o.openNode("protection");var O=!1;function C(N,L){L!==void 0&&(o.addAttribute(N,L),O=!0)}C("locked",c.boolean(p.locked,!0)?void 0:"0"),C("hidden",c.boolean(p.hidden,!1)?"1":void 0),o.closeNode(),O?o.commit():o.rollback()}},{key:"parseOpen",value:function(o){var p={locked:o.attributes.locked!=="0",hidden:o.attributes.hidden==="1"},O=!p.locked||p.hidden;this.model=O?p:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"protection"}}]),i}(v);x.exports=a},{"../base-xform":31}],133:[function(e,x,_){function u(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(n){return typeof n}:u=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u(t)}function m(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function g(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},s(t)}var v=e("../base-xform"),c=e("./alignment-xform"),a=e("./protection-xform"),r=function(t){w(n,t);var i=y(n);function n(o){var p;return m(this,n),p=i.call(this),p.xfId=!!(o&&o.xfId),p.map={alignment:new c,protection:new a},p}return b(n,[{key:"render",value:function(p,O){p.openNode("xf",{numFmtId:O.numFmtId||0,fontId:O.fontId||0,fillId:O.fillId||0,borderId:O.borderId||0}),this.xfId&&p.addAttribute("xfId",O.xfId||0),O.numFmtId&&p.addAttribute("applyNumberFormat","1"),O.fontId&&p.addAttribute("applyFont","1"),O.fillId&&p.addAttribute("applyFill","1"),O.borderId&&p.addAttribute("applyBorder","1"),O.alignment&&p.addAttribute("applyAlignment","1"),O.protection&&p.addAttribute("applyProtection","1"),O.alignment&&this.map.alignment.render(p,O.alignment),O.protection&&this.map.protection.render(p,O.protection),p.closeNode()}},{key:"parseOpen",value:function(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"xf":return this.model={numFmtId:parseInt(p.attributes.numFmtId,10),fontId:parseInt(p.attributes.fontId,10),fillId:parseInt(p.attributes.fillId,10),borderId:parseInt(p.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(p.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(p),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(p),!0;default:return!1}}},{key:"parseText",value:function(p){this.parser&&this.parser.parseText(p)}},{key:"parseClose",value:function(p){return this.parser?(this.parser.parseClose(p)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):p!=="xf"}},{key:"tag",get:function(){return"xf"}}]),n}(v);x.exports=r},{"../base-xform":31,"./alignment-xform":125,"./protection-xform":132}],134:[function(e,x,_){function u(M){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(R){return typeof R}:u=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},u(M)}function m(M,D){if(!(M instanceof D))throw new TypeError("Cannot call a class as a function")}function g(M,D){for(var R=0;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(M){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},s(M)}var v=e("../../../doc/enums"),c=e("../../../utils/xml-stream"),a=e("../base-xform"),r=e("../static-xform"),t=e("../list-xform"),i=e("./font-xform"),n=e("./fill-xform"),o=e("./border-xform"),p=e("./numfmt-xform"),O=e("./style-xform"),C=e("./dxf-xform"),N=164,L=function(M){w(R,M);var D=y(R);function R(P){var E;return m(this,R),E=D.call(this),E.map={numFmts:new t({tag:"numFmts",count:!0,childXform:new p}),fonts:new t({tag:"fonts",count:!0,childXform:new i,$:{"x14ac:knownFonts":1}}),fills:new t({tag:"fills",count:!0,childXform:new n}),borders:new t({tag:"borders",count:!0,childXform:new o}),cellStyleXfs:new t({tag:"cellStyleXfs",count:!0,childXform:new O}),cellXfs:new t({tag:"cellXfs",count:!0,childXform:new O({xfId:!0})}),dxfs:new t({tag:"dxfs",always:!0,count:!0,childXform:new C}),numFmt:new p,font:new i,fill:new n,border:new o,style:new O({xfId:!0}),cellStyles:R.STATIC_XFORMS.cellStyles,tableStyles:R.STATIC_XFORMS.tableStyles,extLst:R.STATIC_XFORMS.extLst},P&&E.init(),E}return b(R,[{key:"initIndex",value:function(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}},{key:"init",value:function(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}},{key:"render",value:function(E,A){A=A||this.model,E.openXml(c.StdDocAttributes),E.openNode("styleSheet",R.STYLESHEET_ATTRIBUTES),this.index?(A.numFmts&&A.numFmts.length&&(E.openNode("numFmts",{count:A.numFmts.length}),A.numFmts.forEach(function(z){E.writeXml(z)}),E.closeNode()),A.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),E.openNode("fonts",{count:A.fonts.length,"x14ac:knownFonts":1}),A.fonts.forEach(function(z){E.writeXml(z)}),E.closeNode(),E.openNode("fills",{count:A.fills.length}),A.fills.forEach(function(z){E.writeXml(z)}),E.closeNode(),E.openNode("borders",{count:A.borders.length}),A.borders.forEach(function(z){E.writeXml(z)}),E.closeNode(),this.map.cellStyleXfs.render(E,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),E.openNode("cellXfs",{count:A.styles.length}),A.styles.forEach(function(z){E.writeXml(z)}),E.closeNode()):(this.map.numFmts.render(E,A.numFmts),this.map.fonts.render(E,A.fonts),this.map.fills.render(E,A.fills),this.map.borders.render(E,A.borders),this.map.cellStyleXfs.render(E,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(E,A.styles)),R.STATIC_XFORMS.cellStyles.render(E),this.map.dxfs.render(E,A.dxfs),R.STATIC_XFORMS.tableStyles.render(E),R.STATIC_XFORMS.extLst.render(E),E.closeNode()}},{key:"parseOpen",value:function(E){if(this.parser)return this.parser.parseOpen(E),!0;switch(E.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[E.name],this.parser&&this.parser.parseOpen(E),!0}}},{key:"parseText",value:function(E){this.parser&&this.parser.parseText(E)}},{key:"parseClose",value:function(E){var A=this;if(this.parser)return this.parser.parseClose(E)||(this.parser=void 0),!0;switch(E){case"styleSheet":{this.model={};var z=function(U,I){I.model&&I.model.length&&(A.model[U]=I.model)};if(z("numFmts",this.map.numFmts),z("fonts",this.map.fonts),z("fills",this.map.fills),z("borders",this.map.borders),z("styles",this.map.cellXfs),z("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){var W=this.index.numFmt;this.model.numFmts.forEach(function($){W[$.id]=$.formatCode})}return!1}default:return!0}}},{key:"addStyleModel",value:function(E,A){if(!E)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(E))return this.weakMap.get(E);var z={};if(A=A||v.ValueType.Number,E.numFmt)z.numFmtId=this._addNumFmtStr(E.numFmt);else switch(A){case v.ValueType.Number:z.numFmtId=this._addNumFmtStr("General");break;case v.ValueType.Date:z.numFmtId=this._addNumFmtStr("mm-dd-yy");break}E.font&&(z.fontId=this._addFont(E.font)),E.border&&(z.borderId=this._addBorder(E.border)),E.fill&&(z.fillId=this._addFill(E.fill)),E.alignment&&(z.alignment=E.alignment),E.protection&&(z.protection=E.protection);var W=this._addStyle(z);return this.weakMap&&this.weakMap.set(E,W),W}},{key:"getStyleModel",value:function(E){var A=this.model.styles[E];if(!A)return null;var z=this.index.model[E];if(z)return z;if(z=this.index.model[E]={},A.numFmtId){var W=this.index.numFmt[A.numFmtId]||p.getDefaultFmtCode(A.numFmtId);W&&(z.numFmt=W)}function $(U,I,j){if(j||j===0){var B=I[j];B&&(z[U]=B)}}return $("font",this.model.fonts,A.fontId),$("border",this.model.borders,A.borderId),$("fill",this.model.fills,A.fillId),A.alignment&&(z.alignment=A.alignment),A.protection&&(z.protection=A.protection),z}},{key:"addDxfStyle",value:function(E){return this.model.dxfs.push(E),this.model.dxfs.length-1}},{key:"getDxfStyle",value:function(E){return this.model.dxfs[E]}},{key:"_addStyle",value:function(E){var A=this.map.style.toXml(E),z=this.index.style[A];return z===void 0&&(z=this.index.style[A]=this.model.styles.length,this.model.styles.push(A)),z}},{key:"_addNumFmtStr",value:function(E){var A=p.getDefaultFmtId(E);if(A!==void 0||(A=this.index.numFmt[E],A!==void 0))return A;A=this.index.numFmt[E]=N+this.model.numFmts.length;var z=this.map.numFmt.toXml({id:A,formatCode:E});return this.model.numFmts.push(z),A}},{key:"_addFont",value:function(E){var A=this.map.font.toXml(E),z=this.index.font[A];return z===void 0&&(z=this.index.font[A]=this.model.fonts.length,this.model.fonts.push(A)),z}},{key:"_addBorder",value:function(E){var A=this.map.border.toXml(E),z=this.index.border[A];return z===void 0&&(z=this.index.border[A]=this.model.borders.length,this.model.borders.push(A)),z}},{key:"_addFill",value:function(E){var A=this.map.fill.toXml(E),z=this.index.fill[A];return z===void 0&&(z=this.index.fill[A]=this.model.fills.length,this.model.fills.push(A)),z}}]),R}(a);L.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},L.STATIC_XFORMS={cellStyles:new r({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new r({tag:"dxfs",$:{count:0}}),tableStyles:new r({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new r({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})};var F=function(M){w(R,M);var D=y(R);function R(){var P;return m(this,R),P=D.call(this),P.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]},P}return b(R,[{key:"parseStream",value:function(E){return E.autodrain(),Promise.resolve()}},{key:"addStyleModel",value:function(E,A){switch(A){case v.ValueType.Date:return this.dateStyleId;default:return 0}}},{key:"getStyleModel",value:function(){return{}}},{key:"dateStyleId",get:function(){if(!this._dateStyleId){var E={numFmtId:p.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(E)}return this._dateStyleId}}]),R}(L);L.Mock=F,x.exports=L},{"../../../doc/enums":7,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./border-xform":126,"./dxf-xform":128,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./style-xform":133}],135:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(i){var n;return m(this,t),n=r.call(this),n.model=i,n}return b(t,[{key:"render",value:function(n,o){if(o=o||this.model,o===!0)n.leafNode("u");else{var p=t.Attributes[o];p&&n.leafNode("u",p)}}},{key:"parseOpen",value:function(n){n.name==="u"&&(this.model=n.attributes.val||!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"u"}}]),t}(v);c.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},x.exports=c},{"../base-xform":31}],136:[function(e,x,_){function u(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(i){return typeof i}:u=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},u(r)}function m(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function g(r,t){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(r)}var v=e("../base-xform"),c=e("./filter-column-xform"),a=function(r){w(i,r);var t=y(i);function i(){var n;return m(this,i),n=t.call(this),n.map={filterColumn:new c},n}return b(i,[{key:"prepare",value:function(o){var p=this;o.columns.forEach(function(O,C){p.map.filterColumn.prepare(O,{index:C})})}},{key:"render",value:function(o,p){var O=this;return o.openNode(this.tag,{ref:p.autoFilterRef}),p.columns.forEach(function(C){O.map.filterColumn.render(o,C)}),o.closeNode(),!0}},{key:"parseOpen",value:function(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:return this.model={autoFilterRef:o.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[o.name],this.parser)return this.parseOpen(o),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(o)))}}},{key:"parseText",value:function(o){this.parser&&this.parser.parseText(o)}},{key:"parseClose",value:function(o){if(this.parser)return this.parser.parseClose(o)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(o){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(o))}}},{key:"tag",get:function(){return"autoFilter"}}]),i}(v);x.exports=a},{"../base-xform":31,"./filter-column-xform":137}],137:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"prepare",value:function(n,o){n.colId=o.index.toString()}},{key:"render",value:function(n,o){return n.leafNode(this.tag,{colId:o.colId,hiddenButton:o.filterButton?"0":"1"}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var o=n.attributes;return this.model={filterButton:o.hiddenButton==="0"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"filterColumn"}}]),t}(v);x.exports=c},{"../base-xform":31}],138:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"prepare",value:function(n,o){n.id=o.index+1}},{key:"render",value:function(n,o){return n.leafNode(this.tag,{id:o.id.toString(),name:o.name,totalsRowLabel:o.totalsRowLabel,totalsRowFunction:o.totalsRowFunction,dxfId:o.dxfId}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var o=n.attributes;return this.model={name:o.name,totalsRowLabel:o.totalsRowLabel,totalsRowFunction:o.totalsRowFunction,dxfId:o.dxfId},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableColumn"}}]),t}(v);x.exports=c},{"../base-xform":31}],139:[function(e,x,_){function u(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(t){return typeof t}:u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(a)}function m(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function g(a,r){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function s(a){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(a)}var v=e("../base-xform"),c=function(a){w(t,a);var r=y(t);function t(){return m(this,t),r.apply(this,arguments)}return b(t,[{key:"render",value:function(n,o){return n.leafNode(this.tag,{name:o.theme?o.theme:void 0,showFirstColumn:o.showFirstColumn?"1":"0",showLastColumn:o.showLastColumn?"1":"0",showRowStripes:o.showRowStripes?"1":"0",showColumnStripes:o.showColumnStripes?"1":"0"}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var o=n.attributes;return this.model={theme:o.name?o.name:null,showFirstColumn:o.showFirstColumn==="1",showLastColumn:o.showLastColumn==="1",showRowStripes:o.showRowStripes==="1",showColumnStripes:o.showColumnStripes==="1"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableStyleInfo"}}]),t}(v);x.exports=c},{"../base-xform":31}],140:[function(e,x,_){function u(C){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(L){return typeof L}:u=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},u(C)}function m(C,N){var L=Object.keys(C);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(C);N&&(F=F.filter(function(M){return Object.getOwnPropertyDescriptor(C,M).enumerable})),L.push.apply(L,F)}return L}function g(C){for(var N=1;N"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function a(C){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},a(C)}var r=e("../../../utils/xml-stream"),t=e("../base-xform"),i=e("../list-xform"),n=e("./auto-filter-xform"),o=e("./table-column-xform"),p=e("./table-style-info-xform"),O=function(C){h(L,C);var N=d(L);function L(){var F;return w(this,L),F=N.call(this),F.map={autoFilter:new n,tableColumns:new i({tag:"tableColumns",count:!0,empty:!0,childXform:new o}),tableStyleInfo:new p},F}return y(L,[{key:"prepare",value:function(M,D){this.map.autoFilter.prepare(M),this.map.tableColumns.prepare(M.columns,D)}},{key:"render",value:function(M,D){M.openXml(r.StdDocAttributes),M.openNode(this.tag,g(g({},L.TABLE_ATTRIBUTES),{},{id:D.id,name:D.name,displayName:D.displayName||D.name,ref:D.tableRef,totalsRowCount:D.totalsRow?"1":void 0,totalsRowShown:D.totalsRow?void 0:"1",headerRowCount:D.headerRow?"1":"0"})),this.map.autoFilter.render(M,D),this.map.tableColumns.render(M,D.columns),this.map.tableStyleInfo.render(M,D.style),M.closeNode()}},{key:"parseOpen",value:function(M){if(this.parser)return this.parser.parseOpen(M),!0;var D=M.name,R=M.attributes;switch(D){case this.tag:this.reset(),this.model={name:R.name,displayName:R.displayName||R.name,tableRef:R.ref,totalsRow:R.totalsRowCount==="1",headerRow:R.headerRowCount==="1"};break;default:this.parser=this.map[M.name],this.parser&&this.parser.parseOpen(M);break}return!0}},{key:"parseText",value:function(M){this.parser&&this.parser.parseText(M)}},{key:"parseClose",value:function(M){var D=this;if(this.parser)return this.parser.parseClose(M)||(this.parser=void 0),!0;switch(M){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach(function(R,P){D.model.columns[P].filterButton=R.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}},{key:"reconcile",value:function(M,D){M.columns.forEach(function(R){R.dxfId!==void 0&&(R.style=D.styles.getDxfStyle(R.dxfId))})}},{key:"tag",get:function(){return"table"}}]),L}(t);O.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},x.exports=O},{"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":136,"./table-column-xform":138,"./table-style-info-xform":139}],141:[function(e,x,_){(function(u,m){function g($,U,I,j,B,V,te){try{var ie=$[V](te),ce=ie.value}catch(be){I(be);return}ie.done?U(ce):Promise.resolve(ce).then(j,B)}function b($){return function(){var U=this,I=arguments;return new Promise(function(j,B){var V=$.apply(U,I);function te(ce){g(V,j,B,te,ie,"next",ce)}function ie(ce){g(V,j,B,te,ie,"throw",ce)}te(void 0)})}}function w($,U){if(!($ instanceof U))throw new TypeError("Cannot call a class as a function")}function f($,U){for(var I=0;I=1)){oe.next=6;break}return ce=te.substr(ie+1),be=te.substr(0,ie),oe.next=6,new Promise(function(J,Q){var he=new a;he.on("finish",function(){V.mediaIndex[te]=V.media.length,V.mediaIndex[be]=V.media.length;var ke={type:"image",name:be,extension:ce,buffer:he.toBuffer()};V.media.push(ke),J()}),B.on("error",function(ke){Q(ke)}),B.pipe(he)});case 6:case"end":return oe.stop()}},j)}));function I(j,B,V){return U.apply(this,arguments)}return I}()},{key:"_processDrawingEntry",value:function(){var U=b(regeneratorRuntime.mark(function j(B,V,te){var ie,ce;return regeneratorRuntime.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return ie=new D,_e.next=3,ie.parseStream(B);case 3:ce=_e.sent,V.drawings[te]=ce;case 5:case"end":return _e.stop()}},j)}));function I(j,B,V){return U.apply(this,arguments)}return I}()},{key:"_processDrawingRelsEntry",value:function(){var U=b(regeneratorRuntime.mark(function j(B,V,te){var ie,ce;return regeneratorRuntime.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return ie=new C,_e.next=3,ie.parseStream(B);case 3:ce=_e.sent,V.drawingRels[te]=ce;case 5:case"end":return _e.stop()}},j)}));function I(j,B,V){return U.apply(this,arguments)}return I}()},{key:"_processVmlDrawingEntry",value:function(){var U=b(regeneratorRuntime.mark(function j(B,V,te){var ie,ce;return regeneratorRuntime.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return ie=new E,_e.next=3,ie.parseStream(B);case 3:ce=_e.sent,V.vmlDrawings["../drawings/".concat(te,".vml")]=ce;case 5:case"end":return _e.stop()}},j)}));function I(j,B,V){return U.apply(this,arguments)}return I}()},{key:"_processThemeEntry",value:function(){var U=b(regeneratorRuntime.mark(function j(B,V,te){return regeneratorRuntime.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return ce.next=2,new Promise(function(be,_e){var oe=new a;B.on("error",_e),oe.on("error",_e),oe.on("finish",function(){V.themes[te]=oe.read().toString(),be()}),B.pipe(oe)});case 2:case"end":return ce.stop()}},j)}));function I(j,B,V){return U.apply(this,arguments)}return I}()},{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:function(){var U=b(regeneratorRuntime.mark(function j(B,V){var te,ie,ce,be,_e,oe,J,Q;return regeneratorRuntime.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:!B[Symbol.asyncIterator]&&B.pipe&&(B=B.pipe(new v)),te=[],ie=!0,ce=!1,ke.prev=4,_e=h(B);case 6:return ke.next=8,_e.next();case 8:return oe=ke.sent,ie=oe.done,ke.next=12,oe.value;case 12:if(J=ke.sent,ie){ke.next=19;break}Q=J,te.push(Q);case 16:ie=!0,ke.next=6;break;case 19:ke.next=25;break;case 21:ke.prev=21,ke.t0=ke.catch(4),ce=!0,be=ke.t0;case 25:if(ke.prev=25,ke.prev=26,!(!ie&&_e.return!=null)){ke.next=30;break}return ke.next=30,_e.return();case 30:if(ke.prev=30,!ce){ke.next=33;break}throw be;case 33:return ke.finish(30);case 34:return ke.finish(25);case 35:return ke.abrupt("return",this.load(m.concat(te),V));case 36:case"end":return ke.stop()}},j,this,[[4,21,25,35],[26,,30,34]])}));function I(j,B){return U.apply(this,arguments)}return I}()},{key:"load",value:function(){var U=b(regeneratorRuntime.mark(function j(B,V){var te,ie,ce,be,_e,oe,J,Q,he,ke,re,se,Ce,q,G,Z,fe;return regeneratorRuntime.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return V&&V.base64?te=m.from(B.toString(),"base64"):te=B,ie={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},ge.next=4,d.loadAsync(te);case 4:ce=ge.sent,be=0,_e=Object.values(ce.files);case 6:if(!(be<_e.length)){ge.next=126;break}if(oe=_e[be],oe.dir){ge.next=123;break}if(J=oe.name,J[0]==="/"&&(J=J.substr(1)),Q=void 0,!(J.match(/xl\/media\//)||J.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))){ge.next=21;break}return Q=new v,ge.t0=Q,ge.next=17,oe.async("nodebuffer");case 17:ge.t1=ge.sent,ge.t0.write.call(ge.t0,ge.t1),ge.next=36;break;case 21:if(Q=new v({writableObjectMode:!0,readableObjectMode:!0}),he=void 0,!u.browser){ge.next=31;break}return ge.t2=n,ge.next=27,oe.async("nodebuffer");case 27:ge.t3=ge.sent,he=(0,ge.t2)(ge.t3),ge.next=34;break;case 31:return ge.next=33,oe.async("string");case 33:he=ge.sent;case 34:for(ke=16384,re=0;re0&&(Q=new t,ce.render(Q,J),B.append(Q.xml,{name:"xl/comments".concat(J.id,".xml")}),Q=new t,be.render(Q,J),B.append(Q.xml,{name:"xl/drawings/vmlDrawing".concat(J.id,".vml")}))});case 5:case"end":return oe.stop()}},j)}));function I(j,B){return U.apply(this,arguments)}return I}()},{key:"_finalize",value:function(I){var j=this;return new Promise(function(B,V){I.on("finish",function(){B(j)}),I.on("error",V),I.finalize()})}},{key:"prepareModel",value:function(I,j){I.creator=I.creator||"ExcelJS",I.lastModifiedBy=I.lastModifiedBy||"ExcelJS",I.created=I.created||new Date,I.modified=I.modified||new Date,I.useSharedStrings=j.useSharedStrings!==void 0?j.useSharedStrings:!0,I.useStyles=j.useStyles!==void 0?j.useStyles:!0,I.sharedStrings=new O,I.styles=I.useStyles?new o(!0):new o.Mock;var B=new F,V=new M;B.prepare(I);var te={sharedStrings:I.sharedStrings,styles:I.styles,date1904:I.properties.date1904,drawingsCount:0,media:I.media};te.drawings=I.drawings=[],te.commentRefs=I.commentRefs=[];var ie=0;I.tables=[],I.worksheets.forEach(function(ce){ce.tables.forEach(function(be){ie++,be.target="table".concat(ie,".xml"),be.id=ie,I.tables.push(be)}),V.prepare(ce,te)})}},{key:"write",value:function(){var U=b(regeneratorRuntime.mark(function j(B,V){var te,ie;return regeneratorRuntime.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return V=V||{},te=this.workbook.model,ie=new c.ZipWriter(V.zip),ie.pipe(B),this.prepareModel(te,V),be.next=7,this.addContentTypes(ie,te);case 7:return be.next=9,this.addOfficeRels(ie,te);case 9:return be.next=11,this.addWorkbookRels(ie,te);case 11:return be.next=13,this.addWorksheets(ie,te);case 13:return be.next=15,this.addSharedStrings(ie,te);case 15:return be.next=17,this.addDrawings(ie,te);case 17:return be.next=19,this.addTables(ie,te);case 19:return be.next=21,Promise.all([this.addThemes(ie,te),this.addStyles(ie,te)]);case 21:return be.next=23,this.addMedia(ie,te);case 23:return be.next=25,Promise.all([this.addApp(ie,te),this.addCore(ie,te)]);case 25:return be.next=27,this.addWorkbook(ie,te);case 27:return be.abrupt("return",this._finalize(ie));case 28:case"end":return be.stop()}},j,this)}));function I(j,B){return U.apply(this,arguments)}return I}()},{key:"writeFile",value:function(I,j){var B=this,V=l.createWriteStream(I);return new Promise(function(te,ie){V.on("finish",function(){te()}),V.on("error",function(ce){ie(ce)}),B.write(V,j).then(function(){V.end()})})}},{key:"writeBuffer",value:function(){var U=b(regeneratorRuntime.mark(function j(B){var V;return regeneratorRuntime.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return V=new a,ie.next=3,this.write(V,B);case 3:return ie.abrupt("return",V.read());case 4:case"end":return ie.stop()}},j,this)}));function I(j){return U.apply(this,arguments)}return I}()}]),$}();W.RelType=e("./rel-type"),x.exports=W}).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,x,_){x.exports=` `},{}],143:[function(e,x,_){(function(u){function m(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(n){return typeof n}:m=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},m(t)}function g(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function b(t,i){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},v(t)}Object.defineProperty(_,"__esModule",{value:!0}),_.CsvFormatterStream=void 0;var c=e("stream"),a=e("./formatter"),r=function(t){f(n,t);var i=h(n);function n(o){var p;return g(this,n),p=i.call(this,{writableObjectMode:o.objectMode}),p.hasWrittenBOM=!1,p.formatterOptions=o,p.rowFormatter=new a.RowFormatter(o),p.hasWrittenBOM=!o.writeBOM,p}return w(n,[{key:"transform",value:function(p){return this.rowFormatter.rowTransform=p,this}},{key:"_transform",value:function(p,O,C){var N=this,L=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(p,function(F,M){return F?(L=!0,C(F)):(M&&M.forEach(function(D){N.push(u.from(D,"utf8"))}),L=!0,C())})}catch(F){if(L)throw F;C(F)}}},{key:"_flush",value:function(p){var O=this;this.rowFormatter.finish(function(C,N){return C?p(C):(N&&N.forEach(function(L){O.push(u.from(L,"utf8"))}),p())})}}]),n}(c.Transform);_.CsvFormatterStream=r}).call(this,e("buffer").Buffer)},{"./formatter":147,buffer:216,stream:506}],144:[function(e,x,_){function u(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(_,"__esModule",{value:!0}),_.FormatterOptions=void 0;var m=function g(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u(this,g);var w;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,b||{}),typeof(b==null?void 0:b.quoteHeaders)>"u"&&(this.quoteHeaders=this.quoteColumns),(b==null?void 0:b.quote)===!0?this.quote='"':(b==null?void 0:b.quote)===!1&&(this.quote=""),typeof(b==null?void 0:b.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((w=b.writeHeaders)!==null&&w!==void 0?w:!0),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)};_.FormatterOptions=m},{}],145:[function(e,x,_){function u(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}function m(l,d){for(var s=0;s1&&arguments[1]!==void 0?arguments[1]:{},r=[],t=new y.Writable({write:function(n,o,p){r.push(n),p()}});return new Promise(function(i,n){t.on("error",n).on("finish",function(){return i(u.concat(r))}),_.write(c,a).pipe(t)})},_.writeToString=function(c,a){return _.writeToBuffer(c,a).then(function(r){return r.toString()})},_.writeToPath=function(c,a,r){var t=h.createWriteStream(c,{encoding:"utf8"});return _.write(a,r).pipe(t)}}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":143,"./FormatterOptions":144,"./types":149,buffer:216,fs:215,stream:506,util:525}],149:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.isSyncTransform=void 0,_.isSyncTransform=function(u){return u.length===1}},{}],150:[function(e,x,_){(function(u){function m(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(C){return typeof C}:m=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},m(p)}function g(p,O){if(!(p instanceof O))throw new TypeError("Cannot call a class as a function")}function b(p,O){for(var C=0;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function a(p){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},a(p)}Object.defineProperty(_,"__esModule",{value:!0}),_.CsvParserStream=void 0;var r=e("string_decoder"),t=e("stream"),i=e("./transforms"),n=e("./parser"),o=function(p){h(C,p);var O=d(C);function C(N){var L;return g(this,C),L=O.call(this,{objectMode:N.objectMode}),L.lines="",L.rowCount=0,L.parsedRowCount=0,L.parsedLineCount=0,L.endEmitted=!1,L.headersEmitted=!1,L.parserOptions=N,L.parser=new n.Parser(N),L.headerTransformer=new i.HeaderTransformer(N),L.decoder=new r.StringDecoder(N.encoding),L.rowTransformerValidator=new i.RowTransformerValidator,L}return w(C,[{key:"transform",value:function(L){return this.rowTransformerValidator.rowTransform=L,this}},{key:"validate",value:function(L){return this.rowTransformerValidator.rowValidator=L,this}},{key:"emit",value:function(L){var F;if(L==="end")return this.endEmitted||(this.endEmitted=!0,f(a(C.prototype),"emit",this).call(this,"end",this.rowCount)),!1;for(var M=arguments.length,D=new Array(M>1?M-1:0),R=1;R=D||M.hasHitRowLimit)return F();if(M.parsedLineCount+=1,M.shouldSkipLine)return A();var z=L[E];M.rowCount+=1,M.parsedRowCount+=1;var W=M.rowCount;return M.transformRow(z,function($,U){if($)return M.rowCount-=1,A($);if(!U)return A(new Error("expected transform result"));if(!U.isValid)M.emit("data-invalid",U.row,W,U.reason);else if(U.row)return M.pushRow(U.row,A);return A()})};R(0)}},{key:"transformRow",value:function(L,F){var M=this;try{this.headerTransformer.transform(L,function(D,R){return D?F(D):R?R.isValid?R.row?M.shouldEmitRows?M.rowTransformerValidator.transformAndValidate(R.row,F):M.skipRow(F):(M.rowCount-=1,M.parsedRowCount-=1,F(null,{row:null,isValid:!0})):M.shouldEmitRows?F(null,{isValid:!1,row:L}):M.skipRow(F):F(new Error("Expected result from header transform"))})}catch(D){F(D)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(L){return this.rowCount-=1,L(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(L,F){try{this.parserOptions.objectMode?this.push(L):this.push(JSON.stringify(L)),F()}catch(M){F(M)}}},{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}}]),C}(t.Transform);_.CsvParserStream=o}).call(this,e("timers").setImmediate)},{"./parser":162,"./transforms":165,stream:506,string_decoder:520,timers:521}],151:[function(e,x,_){function u(f,y){if(!(f instanceof y))throw new TypeError("Cannot call a class as a function")}var m=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(_,"__esModule",{value:!0}),_.ParserOptions=void 0;var g=m(e("lodash.escaperegexp")),b=m(e("lodash.isnil")),w=function f(y){u(this,f);var h;if(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,y||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=g.default(this.delimiter),this.escapeChar=(h=this.escape)!==null&&h!==void 0?h:this.quote,this.supportsComments=!b.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),this.maxRows>0&&(this.limitRows=!0)};_.ParserOptions=w},{"lodash.escaperegexp":426,"lodash.isnil":431}],152:[function(e,x,_){var u=Object.create?function(s,v,c,a){a===void 0&&(a=c),Object.defineProperty(s,a,{enumerable:!0,get:function(){return v[c]}})}:function(s,v,c,a){a===void 0&&(a=c),s[a]=v[c]},m=Object.create?function(s,v){Object.defineProperty(s,"default",{enumerable:!0,value:v})}:function(s,v){s.default=v},g=function(s){if(s&&s.__esModule)return s;var v={};if(s!=null)for(var c in s)c!=="default"&&Object.hasOwnProperty.call(s,c)&&u(v,s,c);return m(v,s),v},b=function(s,v){for(var c in s)c!=="default"&&!v.hasOwnProperty(c)&&u(v,s,c)};Object.defineProperty(_,"__esModule",{value:!0}),_.parseString=_.parseFile=_.parseStream=_.parse=void 0;var w=g(e("fs")),f=e("stream"),y=e("./ParserOptions"),h=e("./CsvParserStream");b(e("./types"),_);var l=e("./CsvParserStream");Object.defineProperty(_,"CsvParserStream",{enumerable:!0,get:function(){return l.CsvParserStream}});var d=e("./ParserOptions");Object.defineProperty(_,"ParserOptions",{enumerable:!0,get:function(){return d.ParserOptions}}),_.parse=function(s){return new h.CsvParserStream(new y.ParserOptions(s))},_.parseStream=function(s,v){return s.pipe(new h.CsvParserStream(new y.ParserOptions(v)))},_.parseFile=function(s){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return w.createReadStream(s).pipe(new h.CsvParserStream(new y.ParserOptions(v)))},_.parseString=function(s,v){var c=new f.Readable;return c.push(s),c.push(null),c.pipe(new h.CsvParserStream(new y.ParserOptions(v)))}},{"./CsvParserStream":150,"./ParserOptions":151,"./types":166,fs:215,stream:506}],153:[function(e,x,_){function u(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}function m(l,d){for(var s=0;sthis.cursor}},{key:"nextNonSpaceToken",get:function(){var l=this.lineFromCursor,d=this.parserOptions.NEXT_TOKEN_REGEXP;if(l.search(d)===-1)return null;var s=d.exec(l);if(s==null)return null;var v=s[1],c=this.cursor+(s.index||0);return new b.Token({token:v,startCursor:c,endCursor:c+v.length-1})}},{key:"nextCharacterToken",get:function(){var l=this.cursor,d=this.lineLength;return d<=l?null:new b.Token({token:this.line[l],startCursor:l,endCursor:l})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}}]),y}();_.Scanner=f},{"./Token":156}],156:[function(e,x,_){function u(w,f){if(!(w instanceof f))throw new TypeError("Cannot call a class as a function")}function m(w,f){for(var y=0;ythis.headersLength){if(!c.strictColumnHandling)throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(v.length));return{row:v,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(v.length)}}return c.strictColumnHandling&&v.length1});throw new Error("Duplicate headers found ".concat(JSON.stringify(t)))}this.headers=v,this.receivedHeaders=!0,this.headersLength=((c=this.headers)===null||c===void 0?void 0:c.length)||0}}]),d}();_.HeaderTransformer=l},{"lodash.groupby":427,"lodash.isfunction":430,"lodash.isundefined":432,"lodash.uniq":433}],164:[function(e,x,_){function u(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")}function m(h,l){for(var d=0;d>6],a=(v&32)===0;if((v&31)===31){var r=v;for(v=0;(r&128)===128;){if(r=d.readUInt8(s),d.isError(r))return r;v<<=7,v|=r&127}}else v&=31;var t=w.tag[v];return{cls:c,primitive:a,tag:v,tagStr:t}}function l(d,s,v){var c=d.readUInt8(v);if(d.isError(c))return c;if(!s&&c===128)return null;if(!(c&128))return c;var a=c&127;if(a>4)return d.error("length octect is too long");c=0;for(var r=0;r=256;i>>=8)t++;var n=m.alloc(1+1+t);n[0]=a,n[1]=128|t;for(var o=1+t,p=c.length;p>0;o--,p>>=8)n[o]=p&255;return this._createEncoderBuffer([n,c])},f.prototype._encodeStr=function(d,s){if(s==="bitstr")return this._createEncoderBuffer([d.unused|0,d.data]);if(s==="bmpstr"){for(var v=m.alloc(d.length*2),c=0;c=40)return this.reporter.error("Second objid identifier OOB");d.splice(0,2,d[0]*40+d[1])}for(var r=0,t=0;t=128;i>>=7)r++}for(var n=m.alloc(r),o=n.length-1,p=d.length-1;p>=0;p--){var O=d[p];for(n[o--]=O&127;(O>>=7)>0;)n[o--]=128|O&127}return this._createEncoderBuffer(n)};function y(l){return l<10?"0"+l:l}f.prototype._encodeTime=function(d,s){var v,c=new Date(d);return s==="gentime"?v=[y(c.getUTCFullYear()),y(c.getUTCMonth()+1),y(c.getUTCDate()),y(c.getUTCHours()),y(c.getUTCMinutes()),y(c.getUTCSeconds()),"Z"].join(""):s==="utctime"?v=[y(c.getUTCFullYear()%100),y(c.getUTCMonth()+1),y(c.getUTCDate()),y(c.getUTCHours()),y(c.getUTCMinutes()),y(c.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+s+" time is not supported yet"),this._encodeStr(v,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(d,s){if(typeof d=="string"){if(!s)return this.reporter.error("String int or enum given, but no values map");if(!s.hasOwnProperty(d))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(d));d=s[d]}if(typeof d!="number"&&!m.isBuffer(d)){var v=d.toArray();!d.sign&&v[0]&128&&v.unshift(0),d=m.from(v)}if(m.isBuffer(d)){var c=d.length;d.length===0&&c++;var a=m.alloc(c);return d.copy(a),d.length===0&&(a[0]=0),this._createEncoderBuffer(a)}if(d<128)return this._createEncoderBuffer(d);if(d<256)return this._createEncoderBuffer([0,d]);for(var r=1,t=d;t>=256;t>>=8)r++;for(var i=new Array(r),n=i.length-1;n>=0;n--)i[n]=d&255,d>>=8;return i[0]&128&&i.unshift(0),this._createEncoderBuffer(m.from(i))},f.prototype._encodeBool=function(d){return this._createEncoderBuffer(d?255:0)},f.prototype._use=function(d,s){return typeof d=="function"&&(d=d(s)),d._getEncoder("der").tree},f.prototype._skipDefault=function(d,s,v){var c=this._baseState,a;if(c.default===null)return!1;var r=d.join();if(c.defaultBuffer===void 0&&(c.defaultBuffer=this._encodeValue(c.default,s,v).join()),r.length!==c.defaultBuffer.length)return!1;for(a=0;a=31?v.error("Multi-octet tag encoding unsupported"):(d||(c|=32),c|=b.tagClassByName[s||"universal"]<<6,c)}},{"../base/node":171,"../constants/der":173,inherits:387,"safer-buffer":495}],179:[function(e,x,_){var u=_;u.der=e("./der"),u.pem=e("./pem")},{"./der":178,"./pem":180}],180:[function(e,x,_){var u=e("inherits"),m=e("./der");function g(b){m.call(this,b),this.enc="pem"}u(g,m),x.exports=g,g.prototype.encode=function(w,f){for(var y=m.prototype.encode.call(this,w),h=y.toString("base64"),l=["-----BEGIN "+f.label+"-----"],d=0;d0?R:P},f.min=function(R,P){return R.cmp(P)<0?R:P},f.prototype._init=function(R,P,E){if(typeof R=="number")return this._initNumber(R,P,E);if(u(R)==="object")return this._initArray(R,P,E);P==="hex"&&(P=16),b(P===(P|0)&&P>=2&&P<=36),R=R.toString().replace(/\s+/g,"");var A=0;R[0]==="-"&&A++,P===16?this._parseHex(R,A):this._parseBase(R,P,A),R[0]==="-"&&(this.negative=1),this.strip(),E==="le"&&this._initArray(this.toArray(),P,E)},f.prototype._initNumber=function(R,P,E){R<0&&(this.negative=1,R=-R),R<67108864?(this.words=[R&67108863],this.length=1):R<4503599627370496?(this.words=[R&67108863,R/67108864&67108863],this.length=2):(b(R<9007199254740992),this.words=[R&67108863,R/67108864&67108863,1],this.length=3),E==="le"&&this._initArray(this.toArray(),P,E)},f.prototype._initArray=function(R,P,E){if(b(typeof R.length=="number"),R.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(R.length/3),this.words=new Array(this.length);for(var A=0;A=0;A-=3)W=R[A]|R[A-1]<<8|R[A-2]<<16,this.words[z]|=W<<$&67108863,this.words[z+1]=W>>>26-$&67108863,$+=24,$>=26&&($-=26,z++);else if(E==="le")for(A=0,z=0;A>>26-$&67108863,$+=24,$>=26&&($-=26,z++);return this.strip()};function h(D,R,P){for(var E=0,A=Math.min(D.length,P),z=R;z=49&&W<=54?E|=W-49+10:W>=17&&W<=22?E|=W-17+10:E|=W&15}return E}f.prototype._parseHex=function(R,P){this.length=Math.ceil((R.length-P)/6),this.words=new Array(this.length);for(var E=0;E=P;E-=6)z=h(R,E,E+6),this.words[A]|=z<>>26-W&4194303,W+=24,W>=26&&(W-=26,A++);E+6!==P&&(z=h(R,P,E+6),this.words[A]|=z<>>26-W&4194303),this.strip()};function l(D,R,P,E){for(var A=0,z=Math.min(D.length,P),W=R;W=49?A+=$-49+10:$>=17?A+=$-17+10:A+=$}return A}f.prototype._parseBase=function(R,P,E){this.words=[0],this.length=1;for(var A=0,z=1;z<=67108863;z*=P)A++;A--,z=z/P|0;for(var W=R.length-E,$=W%A,U=Math.min(W,W-$)+E,I=0,j=E;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var d=["","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"],s=[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],v=[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];f.prototype.toString=function(R,P){R=R||10,P=P|0||1;var E;if(R===16||R==="hex"){E="";for(var A=0,z=0,W=0;W>>24-A&16777215,z!==0||W!==this.length-1?E=d[6-U.length]+U+E:E=U+E,A+=2,A>=26&&(A-=26,W--)}for(z!==0&&(E=z.toString(16)+E);E.length%P!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}if(R===(R|0)&&R>=2&&R<=36){var I=s[R],j=v[R];E="";var B=this.clone();for(B.negative=0;!B.isZero();){var V=B.modn(j).toString(R);B=B.idivn(j),B.isZero()?E=V+E:E=d[I-V.length]+V+E}for(this.isZero()&&(E="0"+E);E.length%P!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}b(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var R=this.words[0];return this.length===2?R+=this.words[1]*67108864:this.length===3&&this.words[2]===1?R+=4503599627370496+this.words[1]*67108864:this.length>2&&b(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-R:R},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(R,P){return b(typeof y<"u"),this.toArrayLike(y,R,P)},f.prototype.toArray=function(R,P){return this.toArrayLike(Array,R,P)},f.prototype.toArrayLike=function(R,P,E){var A=this.byteLength(),z=E||Math.max(1,A);b(A<=z,"byte array longer than desired length"),b(z>0,"Requested array length <= 0"),this.strip();var W=P==="le",$=new R(z),U,I,j=this.clone();if(W){for(I=0;!j.isZero();I++)U=j.andln(255),j.iushrn(8),$[I]=U;for(;I=4096&&(E+=13,P>>>=13),P>=64&&(E+=7,P>>>=7),P>=8&&(E+=4,P>>>=4),P>=2&&(E+=2,P>>>=2),E+P},f.prototype._zeroBits=function(R){if(R===0)return 26;var P=R,E=0;return P&8191||(E+=13,P>>>=13),P&127||(E+=7,P>>>=7),P&15||(E+=4,P>>>=4),P&3||(E+=2,P>>>=2),P&1||E++,E},f.prototype.bitLength=function(){var R=this.words[this.length-1],P=this._countBits(R);return(this.length-1)*26+P};function c(D){for(var R=new Array(D.bitLength()),P=0;P>>A}return R}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var R=0,P=0;PR.length?this.clone().ior(R):R.clone().ior(this)},f.prototype.uor=function(R){return this.length>R.length?this.clone().iuor(R):R.clone().iuor(this)},f.prototype.iuand=function(R){var P;this.length>R.length?P=R:P=this;for(var E=0;ER.length?this.clone().iand(R):R.clone().iand(this)},f.prototype.uand=function(R){return this.length>R.length?this.clone().iuand(R):R.clone().iuand(this)},f.prototype.iuxor=function(R){var P,E;this.length>R.length?(P=this,E=R):(P=R,E=this);for(var A=0;AR.length?this.clone().ixor(R):R.clone().ixor(this)},f.prototype.uxor=function(R){return this.length>R.length?this.clone().iuxor(R):R.clone().iuxor(this)},f.prototype.inotn=function(R){b(typeof R=="number"&&R>=0);var P=Math.ceil(R/26)|0,E=R%26;this._expand(P),E>0&&P--;for(var A=0;A0&&(this.words[A]=~this.words[A]&67108863>>26-E),this.strip()},f.prototype.notn=function(R){return this.clone().inotn(R)},f.prototype.setn=function(R,P){b(typeof R=="number"&&R>=0);var E=R/26|0,A=R%26;return this._expand(E+1),P?this.words[E]=this.words[E]|1<R.length?(E=this,A=R):(E=R,A=this);for(var z=0,W=0;W>>26;for(;z!==0&&W>>26;if(this.length=E.length,z!==0)this.words[this.length]=z,this.length++;else if(E!==this)for(;WR.length?this.clone().iadd(R):R.clone().iadd(this)},f.prototype.isub=function(R){if(R.negative!==0){R.negative=0;var P=this.iadd(R);return R.negative=1,P._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(R),this.negative=1,this._normSign();var E=this.cmp(R);if(E===0)return this.negative=0,this.length=1,this.words[0]=0,this;var A,z;E>0?(A=this,z=R):(A=R,z=this);for(var W=0,$=0;$>26,this.words[$]=P&67108863;for(;W!==0&&$>26,this.words[$]=P&67108863;if(W===0&&$>>26,B=U&67108863,V=Math.min(I,R.length-1),te=Math.max(0,I-D.length+1);te<=V;te++){var ie=I-te|0;A=D.words[ie]|0,z=R.words[te]|0,W=A*z+B,j+=W/67108864|0,B=W&67108863}P.words[I]=B|0,U=j|0}return U!==0?P.words[I]=U|0:P.length--,P.strip()}var r=function(R,P,E){var A=R.words,z=P.words,W=E.words,$=0,U,I,j,B=A[0]|0,V=B&8191,te=B>>>13,ie=A[1]|0,ce=ie&8191,be=ie>>>13,_e=A[2]|0,oe=_e&8191,J=_e>>>13,Q=A[3]|0,he=Q&8191,ke=Q>>>13,re=A[4]|0,se=re&8191,Ce=re>>>13,q=A[5]|0,G=q&8191,Z=q>>>13,fe=A[6]|0,we=fe&8191,ge=fe>>>13,je=A[7]|0,Ze=je&8191,nt=je>>>13,ut=A[8]|0,ot=ut&8191,Ue=ut>>>13,Ve=A[9]|0,Qe=Ve&8191,tt=Ve>>>13,ae=z[0]|0,Re=ae&8191,me=ae>>>13,Ee=z[1]|0,pe=Ee&8191,Pe=Ee>>>13,ee=z[2]|0,Xe=ee&8191,it=ee>>>13,K=z[3]|0,Me=K&8191,Le=K>>>13,ue=z[4]|0,Se=ue&8191,Ie=ue>>>13,st=z[5]|0,Ge=st&8191,rt=st>>>13,_t=z[6]|0,wt=_t&8191,Ot=_t>>>13,pt=z[7]|0,ct=pt&8191,At=pt>>>13,Pt=z[8]|0,bt=Pt&8191,Kt=Pt>>>13,Ct=z[9]|0,xt=Ct&8191,Ft=Ct>>>13;E.negative=R.negative^P.negative,E.length=19,U=Math.imul(V,Re),I=Math.imul(V,me),I=I+Math.imul(te,Re)|0,j=Math.imul(te,me);var Lt=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,U=Math.imul(ce,Re),I=Math.imul(ce,me),I=I+Math.imul(be,Re)|0,j=Math.imul(be,me),U=U+Math.imul(V,pe)|0,I=I+Math.imul(V,Pe)|0,I=I+Math.imul(te,pe)|0,j=j+Math.imul(te,Pe)|0;var Et=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Et>>>26)|0,Et&=67108863,U=Math.imul(oe,Re),I=Math.imul(oe,me),I=I+Math.imul(J,Re)|0,j=Math.imul(J,me),U=U+Math.imul(ce,pe)|0,I=I+Math.imul(ce,Pe)|0,I=I+Math.imul(be,pe)|0,j=j+Math.imul(be,Pe)|0,U=U+Math.imul(V,Xe)|0,I=I+Math.imul(V,it)|0,I=I+Math.imul(te,Xe)|0,j=j+Math.imul(te,it)|0;var Dr=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,U=Math.imul(he,Re),I=Math.imul(he,me),I=I+Math.imul(ke,Re)|0,j=Math.imul(ke,me),U=U+Math.imul(oe,pe)|0,I=I+Math.imul(oe,Pe)|0,I=I+Math.imul(J,pe)|0,j=j+Math.imul(J,Pe)|0,U=U+Math.imul(ce,Xe)|0,I=I+Math.imul(ce,it)|0,I=I+Math.imul(be,Xe)|0,j=j+Math.imul(be,it)|0,U=U+Math.imul(V,Me)|0,I=I+Math.imul(V,Le)|0,I=I+Math.imul(te,Me)|0,j=j+Math.imul(te,Le)|0;var Or=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Or>>>26)|0,Or&=67108863,U=Math.imul(se,Re),I=Math.imul(se,me),I=I+Math.imul(Ce,Re)|0,j=Math.imul(Ce,me),U=U+Math.imul(he,pe)|0,I=I+Math.imul(he,Pe)|0,I=I+Math.imul(ke,pe)|0,j=j+Math.imul(ke,Pe)|0,U=U+Math.imul(oe,Xe)|0,I=I+Math.imul(oe,it)|0,I=I+Math.imul(J,Xe)|0,j=j+Math.imul(J,it)|0,U=U+Math.imul(ce,Me)|0,I=I+Math.imul(ce,Le)|0,I=I+Math.imul(be,Me)|0,j=j+Math.imul(be,Le)|0,U=U+Math.imul(V,Se)|0,I=I+Math.imul(V,Ie)|0,I=I+Math.imul(te,Se)|0,j=j+Math.imul(te,Ie)|0;var Gr=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,U=Math.imul(G,Re),I=Math.imul(G,me),I=I+Math.imul(Z,Re)|0,j=Math.imul(Z,me),U=U+Math.imul(se,pe)|0,I=I+Math.imul(se,Pe)|0,I=I+Math.imul(Ce,pe)|0,j=j+Math.imul(Ce,Pe)|0,U=U+Math.imul(he,Xe)|0,I=I+Math.imul(he,it)|0,I=I+Math.imul(ke,Xe)|0,j=j+Math.imul(ke,it)|0,U=U+Math.imul(oe,Me)|0,I=I+Math.imul(oe,Le)|0,I=I+Math.imul(J,Me)|0,j=j+Math.imul(J,Le)|0,U=U+Math.imul(ce,Se)|0,I=I+Math.imul(ce,Ie)|0,I=I+Math.imul(be,Se)|0,j=j+Math.imul(be,Ie)|0,U=U+Math.imul(V,Ge)|0,I=I+Math.imul(V,rt)|0,I=I+Math.imul(te,Ge)|0,j=j+Math.imul(te,rt)|0;var Nr=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,U=Math.imul(we,Re),I=Math.imul(we,me),I=I+Math.imul(ge,Re)|0,j=Math.imul(ge,me),U=U+Math.imul(G,pe)|0,I=I+Math.imul(G,Pe)|0,I=I+Math.imul(Z,pe)|0,j=j+Math.imul(Z,Pe)|0,U=U+Math.imul(se,Xe)|0,I=I+Math.imul(se,it)|0,I=I+Math.imul(Ce,Xe)|0,j=j+Math.imul(Ce,it)|0,U=U+Math.imul(he,Me)|0,I=I+Math.imul(he,Le)|0,I=I+Math.imul(ke,Me)|0,j=j+Math.imul(ke,Le)|0,U=U+Math.imul(oe,Se)|0,I=I+Math.imul(oe,Ie)|0,I=I+Math.imul(J,Se)|0,j=j+Math.imul(J,Ie)|0,U=U+Math.imul(ce,Ge)|0,I=I+Math.imul(ce,rt)|0,I=I+Math.imul(be,Ge)|0,j=j+Math.imul(be,rt)|0,U=U+Math.imul(V,wt)|0,I=I+Math.imul(V,Ot)|0,I=I+Math.imul(te,wt)|0,j=j+Math.imul(te,Ot)|0;var Zr=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,U=Math.imul(Ze,Re),I=Math.imul(Ze,me),I=I+Math.imul(nt,Re)|0,j=Math.imul(nt,me),U=U+Math.imul(we,pe)|0,I=I+Math.imul(we,Pe)|0,I=I+Math.imul(ge,pe)|0,j=j+Math.imul(ge,Pe)|0,U=U+Math.imul(G,Xe)|0,I=I+Math.imul(G,it)|0,I=I+Math.imul(Z,Xe)|0,j=j+Math.imul(Z,it)|0,U=U+Math.imul(se,Me)|0,I=I+Math.imul(se,Le)|0,I=I+Math.imul(Ce,Me)|0,j=j+Math.imul(Ce,Le)|0,U=U+Math.imul(he,Se)|0,I=I+Math.imul(he,Ie)|0,I=I+Math.imul(ke,Se)|0,j=j+Math.imul(ke,Ie)|0,U=U+Math.imul(oe,Ge)|0,I=I+Math.imul(oe,rt)|0,I=I+Math.imul(J,Ge)|0,j=j+Math.imul(J,rt)|0,U=U+Math.imul(ce,wt)|0,I=I+Math.imul(ce,Ot)|0,I=I+Math.imul(be,wt)|0,j=j+Math.imul(be,Ot)|0,U=U+Math.imul(V,ct)|0,I=I+Math.imul(V,At)|0,I=I+Math.imul(te,ct)|0,j=j+Math.imul(te,At)|0;var Qt=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,U=Math.imul(ot,Re),I=Math.imul(ot,me),I=I+Math.imul(Ue,Re)|0,j=Math.imul(Ue,me),U=U+Math.imul(Ze,pe)|0,I=I+Math.imul(Ze,Pe)|0,I=I+Math.imul(nt,pe)|0,j=j+Math.imul(nt,Pe)|0,U=U+Math.imul(we,Xe)|0,I=I+Math.imul(we,it)|0,I=I+Math.imul(ge,Xe)|0,j=j+Math.imul(ge,it)|0,U=U+Math.imul(G,Me)|0,I=I+Math.imul(G,Le)|0,I=I+Math.imul(Z,Me)|0,j=j+Math.imul(Z,Le)|0,U=U+Math.imul(se,Se)|0,I=I+Math.imul(se,Ie)|0,I=I+Math.imul(Ce,Se)|0,j=j+Math.imul(Ce,Ie)|0,U=U+Math.imul(he,Ge)|0,I=I+Math.imul(he,rt)|0,I=I+Math.imul(ke,Ge)|0,j=j+Math.imul(ke,rt)|0,U=U+Math.imul(oe,wt)|0,I=I+Math.imul(oe,Ot)|0,I=I+Math.imul(J,wt)|0,j=j+Math.imul(J,Ot)|0,U=U+Math.imul(ce,ct)|0,I=I+Math.imul(ce,At)|0,I=I+Math.imul(be,ct)|0,j=j+Math.imul(be,At)|0,U=U+Math.imul(V,bt)|0,I=I+Math.imul(V,Kt)|0,I=I+Math.imul(te,bt)|0,j=j+Math.imul(te,Kt)|0;var Hr=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,U=Math.imul(Qe,Re),I=Math.imul(Qe,me),I=I+Math.imul(tt,Re)|0,j=Math.imul(tt,me),U=U+Math.imul(ot,pe)|0,I=I+Math.imul(ot,Pe)|0,I=I+Math.imul(Ue,pe)|0,j=j+Math.imul(Ue,Pe)|0,U=U+Math.imul(Ze,Xe)|0,I=I+Math.imul(Ze,it)|0,I=I+Math.imul(nt,Xe)|0,j=j+Math.imul(nt,it)|0,U=U+Math.imul(we,Me)|0,I=I+Math.imul(we,Le)|0,I=I+Math.imul(ge,Me)|0,j=j+Math.imul(ge,Le)|0,U=U+Math.imul(G,Se)|0,I=I+Math.imul(G,Ie)|0,I=I+Math.imul(Z,Se)|0,j=j+Math.imul(Z,Ie)|0,U=U+Math.imul(se,Ge)|0,I=I+Math.imul(se,rt)|0,I=I+Math.imul(Ce,Ge)|0,j=j+Math.imul(Ce,rt)|0,U=U+Math.imul(he,wt)|0,I=I+Math.imul(he,Ot)|0,I=I+Math.imul(ke,wt)|0,j=j+Math.imul(ke,Ot)|0,U=U+Math.imul(oe,ct)|0,I=I+Math.imul(oe,At)|0,I=I+Math.imul(J,ct)|0,j=j+Math.imul(J,At)|0,U=U+Math.imul(ce,bt)|0,I=I+Math.imul(ce,Kt)|0,I=I+Math.imul(be,bt)|0,j=j+Math.imul(be,Kt)|0,U=U+Math.imul(V,xt)|0,I=I+Math.imul(V,Ft)|0,I=I+Math.imul(te,xt)|0,j=j+Math.imul(te,Ft)|0;var Fr=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,U=Math.imul(Qe,pe),I=Math.imul(Qe,Pe),I=I+Math.imul(tt,pe)|0,j=Math.imul(tt,Pe),U=U+Math.imul(ot,Xe)|0,I=I+Math.imul(ot,it)|0,I=I+Math.imul(Ue,Xe)|0,j=j+Math.imul(Ue,it)|0,U=U+Math.imul(Ze,Me)|0,I=I+Math.imul(Ze,Le)|0,I=I+Math.imul(nt,Me)|0,j=j+Math.imul(nt,Le)|0,U=U+Math.imul(we,Se)|0,I=I+Math.imul(we,Ie)|0,I=I+Math.imul(ge,Se)|0,j=j+Math.imul(ge,Ie)|0,U=U+Math.imul(G,Ge)|0,I=I+Math.imul(G,rt)|0,I=I+Math.imul(Z,Ge)|0,j=j+Math.imul(Z,rt)|0,U=U+Math.imul(se,wt)|0,I=I+Math.imul(se,Ot)|0,I=I+Math.imul(Ce,wt)|0,j=j+Math.imul(Ce,Ot)|0,U=U+Math.imul(he,ct)|0,I=I+Math.imul(he,At)|0,I=I+Math.imul(ke,ct)|0,j=j+Math.imul(ke,At)|0,U=U+Math.imul(oe,bt)|0,I=I+Math.imul(oe,Kt)|0,I=I+Math.imul(J,bt)|0,j=j+Math.imul(J,Kt)|0,U=U+Math.imul(ce,xt)|0,I=I+Math.imul(ce,Ft)|0,I=I+Math.imul(be,xt)|0,j=j+Math.imul(be,Ft)|0;var Lr=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,U=Math.imul(Qe,Xe),I=Math.imul(Qe,it),I=I+Math.imul(tt,Xe)|0,j=Math.imul(tt,it),U=U+Math.imul(ot,Me)|0,I=I+Math.imul(ot,Le)|0,I=I+Math.imul(Ue,Me)|0,j=j+Math.imul(Ue,Le)|0,U=U+Math.imul(Ze,Se)|0,I=I+Math.imul(Ze,Ie)|0,I=I+Math.imul(nt,Se)|0,j=j+Math.imul(nt,Ie)|0,U=U+Math.imul(we,Ge)|0,I=I+Math.imul(we,rt)|0,I=I+Math.imul(ge,Ge)|0,j=j+Math.imul(ge,rt)|0,U=U+Math.imul(G,wt)|0,I=I+Math.imul(G,Ot)|0,I=I+Math.imul(Z,wt)|0,j=j+Math.imul(Z,Ot)|0,U=U+Math.imul(se,ct)|0,I=I+Math.imul(se,At)|0,I=I+Math.imul(Ce,ct)|0,j=j+Math.imul(Ce,At)|0,U=U+Math.imul(he,bt)|0,I=I+Math.imul(he,Kt)|0,I=I+Math.imul(ke,bt)|0,j=j+Math.imul(ke,Kt)|0,U=U+Math.imul(oe,xt)|0,I=I+Math.imul(oe,Ft)|0,I=I+Math.imul(J,xt)|0,j=j+Math.imul(J,Ft)|0;var Ur=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,U=Math.imul(Qe,Me),I=Math.imul(Qe,Le),I=I+Math.imul(tt,Me)|0,j=Math.imul(tt,Le),U=U+Math.imul(ot,Se)|0,I=I+Math.imul(ot,Ie)|0,I=I+Math.imul(Ue,Se)|0,j=j+Math.imul(Ue,Ie)|0,U=U+Math.imul(Ze,Ge)|0,I=I+Math.imul(Ze,rt)|0,I=I+Math.imul(nt,Ge)|0,j=j+Math.imul(nt,rt)|0,U=U+Math.imul(we,wt)|0,I=I+Math.imul(we,Ot)|0,I=I+Math.imul(ge,wt)|0,j=j+Math.imul(ge,Ot)|0,U=U+Math.imul(G,ct)|0,I=I+Math.imul(G,At)|0,I=I+Math.imul(Z,ct)|0,j=j+Math.imul(Z,At)|0,U=U+Math.imul(se,bt)|0,I=I+Math.imul(se,Kt)|0,I=I+Math.imul(Ce,bt)|0,j=j+Math.imul(Ce,Kt)|0,U=U+Math.imul(he,xt)|0,I=I+Math.imul(he,Ft)|0,I=I+Math.imul(ke,xt)|0,j=j+Math.imul(ke,Ft)|0;var vt=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(vt>>>26)|0,vt&=67108863,U=Math.imul(Qe,Se),I=Math.imul(Qe,Ie),I=I+Math.imul(tt,Se)|0,j=Math.imul(tt,Ie),U=U+Math.imul(ot,Ge)|0,I=I+Math.imul(ot,rt)|0,I=I+Math.imul(Ue,Ge)|0,j=j+Math.imul(Ue,rt)|0,U=U+Math.imul(Ze,wt)|0,I=I+Math.imul(Ze,Ot)|0,I=I+Math.imul(nt,wt)|0,j=j+Math.imul(nt,Ot)|0,U=U+Math.imul(we,ct)|0,I=I+Math.imul(we,At)|0,I=I+Math.imul(ge,ct)|0,j=j+Math.imul(ge,At)|0,U=U+Math.imul(G,bt)|0,I=I+Math.imul(G,Kt)|0,I=I+Math.imul(Z,bt)|0,j=j+Math.imul(Z,Kt)|0,U=U+Math.imul(se,xt)|0,I=I+Math.imul(se,Ft)|0,I=I+Math.imul(Ce,xt)|0,j=j+Math.imul(Ce,Ft)|0;var Ke=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,U=Math.imul(Qe,Ge),I=Math.imul(Qe,rt),I=I+Math.imul(tt,Ge)|0,j=Math.imul(tt,rt),U=U+Math.imul(ot,wt)|0,I=I+Math.imul(ot,Ot)|0,I=I+Math.imul(Ue,wt)|0,j=j+Math.imul(Ue,Ot)|0,U=U+Math.imul(Ze,ct)|0,I=I+Math.imul(Ze,At)|0,I=I+Math.imul(nt,ct)|0,j=j+Math.imul(nt,At)|0,U=U+Math.imul(we,bt)|0,I=I+Math.imul(we,Kt)|0,I=I+Math.imul(ge,bt)|0,j=j+Math.imul(ge,Kt)|0,U=U+Math.imul(G,xt)|0,I=I+Math.imul(G,Ft)|0,I=I+Math.imul(Z,xt)|0,j=j+Math.imul(Z,Ft)|0;var ve=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(ve>>>26)|0,ve&=67108863,U=Math.imul(Qe,wt),I=Math.imul(Qe,Ot),I=I+Math.imul(tt,wt)|0,j=Math.imul(tt,Ot),U=U+Math.imul(ot,ct)|0,I=I+Math.imul(ot,At)|0,I=I+Math.imul(Ue,ct)|0,j=j+Math.imul(Ue,At)|0,U=U+Math.imul(Ze,bt)|0,I=I+Math.imul(Ze,Kt)|0,I=I+Math.imul(nt,bt)|0,j=j+Math.imul(nt,Kt)|0,U=U+Math.imul(we,xt)|0,I=I+Math.imul(we,Ft)|0,I=I+Math.imul(ge,xt)|0,j=j+Math.imul(ge,Ft)|0;var Fe=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,U=Math.imul(Qe,ct),I=Math.imul(Qe,At),I=I+Math.imul(tt,ct)|0,j=Math.imul(tt,At),U=U+Math.imul(ot,bt)|0,I=I+Math.imul(ot,Kt)|0,I=I+Math.imul(Ue,bt)|0,j=j+Math.imul(Ue,Kt)|0,U=U+Math.imul(Ze,xt)|0,I=I+Math.imul(Ze,Ft)|0,I=I+Math.imul(nt,xt)|0,j=j+Math.imul(nt,Ft)|0;var Be=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(Be>>>26)|0,Be&=67108863,U=Math.imul(Qe,bt),I=Math.imul(Qe,Kt),I=I+Math.imul(tt,bt)|0,j=Math.imul(tt,Kt),U=U+Math.imul(ot,xt)|0,I=I+Math.imul(ot,Ft)|0,I=I+Math.imul(Ue,xt)|0,j=j+Math.imul(Ue,Ft)|0;var dt=($+U|0)+((I&8191)<<13)|0;$=(j+(I>>>13)|0)+(dt>>>26)|0,dt&=67108863,U=Math.imul(Qe,xt),I=Math.imul(Qe,Ft),I=I+Math.imul(tt,xt)|0,j=Math.imul(tt,Ft);var St=($+U|0)+((I&8191)<<13)|0;return $=(j+(I>>>13)|0)+(St>>>26)|0,St&=67108863,W[0]=Lt,W[1]=Et,W[2]=Dr,W[3]=Or,W[4]=Gr,W[5]=Nr,W[6]=Zr,W[7]=Qt,W[8]=Hr,W[9]=Fr,W[10]=Lr,W[11]=Ur,W[12]=vt,W[13]=Ke,W[14]=ve,W[15]=Fe,W[16]=Be,W[17]=dt,W[18]=St,$!==0&&(W[19]=$,E.length++),E};Math.imul||(r=a);function t(D,R,P){P.negative=R.negative^D.negative,P.length=D.length+R.length;for(var E=0,A=0,z=0;z>>26)|0,A+=W>>>26,W&=67108863}P.words[z]=$,E=W,W=A}return E!==0?P.words[z]=E:P.length--,P.strip()}function i(D,R,P){var E=new n;return E.mulp(D,R,P)}f.prototype.mulTo=function(R,P){var E,A=this.length+R.length;return this.length===10&&R.length===10?E=r(this,R,P):A<63?E=a(this,R,P):A<1024?E=t(this,R,P):E=i(this,R,P),E};function n(D,R){this.x=D,this.y=R}n.prototype.makeRBT=function(R){for(var P=new Array(R),E=f.prototype._countBits(R)-1,A=0;A>=1;return A},n.prototype.permute=function(R,P,E,A,z,W){for(var $=0;$>>1)z++;return 1<>>13,E[2*W+1]=z&8191,z=z>>>13;for(W=2*P;W>=26,P+=A/67108864|0,P+=z>>>26,this.words[E]=z&67108863}return P!==0&&(this.words[E]=P,this.length++),this},f.prototype.muln=function(R){return this.clone().imuln(R)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(R){var P=c(R);if(P.length===0)return new f(1);for(var E=this,A=0;A=0);var P=R%26,E=(R-P)/26,A=67108863>>>26-P<<26-P,z;if(P!==0){var W=0;for(z=0;z>>26-P}W&&(this.words[z]=W,this.length++)}if(E!==0){for(z=this.length-1;z>=0;z--)this.words[z+E]=this.words[z];for(z=0;z=0);var A;P?A=(P-P%26)/26:A=0;var z=R%26,W=Math.min((R-z)/26,this.length),$=67108863^67108863>>>z<W)for(this.length-=W,I=0;I=0&&(j!==0||I>=A);I--){var B=this.words[I]|0;this.words[I]=j<<26-z|B>>>z,j=B&$}return U&&j!==0&&(U.words[U.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(R,P,E){return b(this.negative===0),this.iushrn(R,P,E)},f.prototype.shln=function(R){return this.clone().ishln(R)},f.prototype.ushln=function(R){return this.clone().iushln(R)},f.prototype.shrn=function(R){return this.clone().ishrn(R)},f.prototype.ushrn=function(R){return this.clone().iushrn(R)},f.prototype.testn=function(R){b(typeof R=="number"&&R>=0);var P=R%26,E=(R-P)/26,A=1<=0);var P=R%26,E=(R-P)/26;if(b(this.negative===0,"imaskn works only with positive numbers"),this.length<=E)return this;if(P!==0&&E++,this.length=Math.min(E,this.length),P!==0){var A=67108863^67108863>>>P<=67108864;P++)this.words[P]-=67108864,P===this.length-1?this.words[P+1]=1:this.words[P+1]++;return this.length=Math.max(this.length,P+1),this},f.prototype.isubn=function(R){if(b(typeof R=="number"),b(R<67108864),R<0)return this.iaddn(-R);if(this.negative!==0)return this.negative=0,this.iaddn(R),this.negative=1,this;if(this.words[0]-=R,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var P=0;P>26)-(U/67108864|0),this.words[z+E]=W&67108863}for(;z>26,this.words[z+E]=W&67108863;if($===0)return this.strip();for(b($===-1),$=0,z=0;z>26,this.words[z]=W&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(R,P){var E=this.length-R.length,A=this.clone(),z=R,W=z.words[z.length-1]|0,$=this._countBits(W);E=26-$,E!==0&&(z=z.ushln(E),A.iushln(E),W=z.words[z.length-1]|0);var U=A.length-z.length,I;if(P!=="mod"){I=new f(null),I.length=U+1,I.words=new Array(I.length);for(var j=0;j=0;V--){var te=(A.words[z.length+V]|0)*67108864+(A.words[z.length+V-1]|0);for(te=Math.min(te/W|0,67108863),A._ishlnsubmul(z,te,V);A.negative!==0;)te--,A.negative=0,A._ishlnsubmul(z,1,V),A.isZero()||(A.negative^=1);I&&(I.words[V]=te)}return I&&I.strip(),A.strip(),P!=="div"&&E!==0&&A.iushrn(E),{div:I||null,mod:A}},f.prototype.divmod=function(R,P,E){if(b(!R.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var A,z,W;return this.negative!==0&&R.negative===0?(W=this.neg().divmod(R,P),P!=="mod"&&(A=W.div.neg()),P!=="div"&&(z=W.mod.neg(),E&&z.negative!==0&&z.iadd(R)),{div:A,mod:z}):this.negative===0&&R.negative!==0?(W=this.divmod(R.neg(),P),P!=="mod"&&(A=W.div.neg()),{div:A,mod:W.mod}):this.negative&R.negative?(W=this.neg().divmod(R.neg(),P),P!=="div"&&(z=W.mod.neg(),E&&z.negative!==0&&z.isub(R)),{div:W.div,mod:z}):R.length>this.length||this.cmp(R)<0?{div:new f(0),mod:this}:R.length===1?P==="div"?{div:this.divn(R.words[0]),mod:null}:P==="mod"?{div:null,mod:new f(this.modn(R.words[0]))}:{div:this.divn(R.words[0]),mod:new f(this.modn(R.words[0]))}:this._wordDiv(R,P)},f.prototype.div=function(R){return this.divmod(R,"div",!1).div},f.prototype.mod=function(R){return this.divmod(R,"mod",!1).mod},f.prototype.umod=function(R){return this.divmod(R,"mod",!0).mod},f.prototype.divRound=function(R){var P=this.divmod(R);if(P.mod.isZero())return P.div;var E=P.div.negative!==0?P.mod.isub(R):P.mod,A=R.ushrn(1),z=R.andln(1),W=E.cmp(A);return W<0||z===1&&W===0?P.div:P.div.negative!==0?P.div.isubn(1):P.div.iaddn(1)},f.prototype.modn=function(R){b(R<=67108863);for(var P=(1<<26)%R,E=0,A=this.length-1;A>=0;A--)E=(P*E+(this.words[A]|0))%R;return E},f.prototype.idivn=function(R){b(R<=67108863);for(var P=0,E=this.length-1;E>=0;E--){var A=(this.words[E]|0)+P*67108864;this.words[E]=A/R|0,P=A%R}return this.strip()},f.prototype.divn=function(R){return this.clone().idivn(R)},f.prototype.egcd=function(R){b(R.negative===0),b(!R.isZero());var P=this,E=R.clone();P.negative!==0?P=P.umod(R):P=P.clone();for(var A=new f(1),z=new f(0),W=new f(0),$=new f(1),U=0;P.isEven()&&E.isEven();)P.iushrn(1),E.iushrn(1),++U;for(var I=E.clone(),j=P.clone();!P.isZero();){for(var B=0,V=1;!(P.words[0]&V)&&B<26;++B,V<<=1);if(B>0)for(P.iushrn(B);B-- >0;)(A.isOdd()||z.isOdd())&&(A.iadd(I),z.isub(j)),A.iushrn(1),z.iushrn(1);for(var te=0,ie=1;!(E.words[0]&ie)&&te<26;++te,ie<<=1);if(te>0)for(E.iushrn(te);te-- >0;)(W.isOdd()||$.isOdd())&&(W.iadd(I),$.isub(j)),W.iushrn(1),$.iushrn(1);P.cmp(E)>=0?(P.isub(E),A.isub(W),z.isub($)):(E.isub(P),W.isub(A),$.isub(z))}return{a:W,b:$,gcd:E.iushln(U)}},f.prototype._invmp=function(R){b(R.negative===0),b(!R.isZero());var P=this,E=R.clone();P.negative!==0?P=P.umod(R):P=P.clone();for(var A=new f(1),z=new f(0),W=E.clone();P.cmpn(1)>0&&E.cmpn(1)>0;){for(var $=0,U=1;!(P.words[0]&U)&&$<26;++$,U<<=1);if($>0)for(P.iushrn($);$-- >0;)A.isOdd()&&A.iadd(W),A.iushrn(1);for(var I=0,j=1;!(E.words[0]&j)&&I<26;++I,j<<=1);if(I>0)for(E.iushrn(I);I-- >0;)z.isOdd()&&z.iadd(W),z.iushrn(1);P.cmp(E)>=0?(P.isub(E),A.isub(z)):(E.isub(P),z.isub(A))}var B;return P.cmpn(1)===0?B=A:B=z,B.cmpn(0)<0&&B.iadd(R),B},f.prototype.gcd=function(R){if(this.isZero())return R.abs();if(R.isZero())return this.abs();var P=this.clone(),E=R.clone();P.negative=0,E.negative=0;for(var A=0;P.isEven()&&E.isEven();A++)P.iushrn(1),E.iushrn(1);do{for(;P.isEven();)P.iushrn(1);for(;E.isEven();)E.iushrn(1);var z=P.cmp(E);if(z<0){var W=P;P=E,E=W}else if(z===0||E.cmpn(1)===0)break;P.isub(E)}while(!0);return E.iushln(A)},f.prototype.invm=function(R){return this.egcd(R).a.umod(R)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(R){return this.words[0]&R},f.prototype.bincn=function(R){b(typeof R=="number");var P=R%26,E=(R-P)/26,A=1<>>26,$&=67108863,this.words[W]=$}return z!==0&&(this.words[W]=z,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(R){var P=R<0;if(this.negative!==0&&!P)return-1;if(this.negative===0&&P)return 1;this.strip();var E;if(this.length>1)E=1;else{P&&(R=-R),b(R<=67108863,"Number is too big");var A=this.words[0]|0;E=A===R?0:AR.length)return 1;if(this.length=0;E--){var A=this.words[E]|0,z=R.words[E]|0;if(A!==z){Az&&(P=1);break}}return P},f.prototype.gtn=function(R){return this.cmpn(R)===1},f.prototype.gt=function(R){return this.cmp(R)===1},f.prototype.gten=function(R){return this.cmpn(R)>=0},f.prototype.gte=function(R){return this.cmp(R)>=0},f.prototype.ltn=function(R){return this.cmpn(R)===-1},f.prototype.lt=function(R){return this.cmp(R)===-1},f.prototype.lten=function(R){return this.cmpn(R)<=0},f.prototype.lte=function(R){return this.cmp(R)<=0},f.prototype.eqn=function(R){return this.cmpn(R)===0},f.prototype.eq=function(R){return this.cmp(R)===0},f.red=function(R){return new F(R)},f.prototype.toRed=function(R){return b(!this.red,"Already a number in reduction context"),b(this.negative===0,"red works only with positives"),R.convertTo(this)._forceRed(R)},f.prototype.fromRed=function(){return b(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(R){return this.red=R,this},f.prototype.forceRed=function(R){return b(!this.red,"Already a number in reduction context"),this._forceRed(R)},f.prototype.redAdd=function(R){return b(this.red,"redAdd works only with red numbers"),this.red.add(this,R)},f.prototype.redIAdd=function(R){return b(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,R)},f.prototype.redSub=function(R){return b(this.red,"redSub works only with red numbers"),this.red.sub(this,R)},f.prototype.redISub=function(R){return b(this.red,"redISub works only with red numbers"),this.red.isub(this,R)},f.prototype.redShl=function(R){return b(this.red,"redShl works only with red numbers"),this.red.shl(this,R)},f.prototype.redMul=function(R){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,R),this.red.mul(this,R)},f.prototype.redIMul=function(R){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,R),this.red.imul(this,R)},f.prototype.redSqr=function(){return b(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return b(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return b(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return b(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return b(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(R){return b(this.red&&!R.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,R)};var o={k256:null,p224:null,p192:null,p25519:null};function p(D,R){this.name=D,this.p=new f(R,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var R=new f(null);return R.words=new Array(Math.ceil(this.n/13)),R},p.prototype.ireduce=function(R){var P=R,E;do this.split(P,this.tmp),P=this.imulK(P),P=P.iadd(this.tmp),E=P.bitLength();while(E>this.n);var A=E0?P.isub(this.p):P.strip!==void 0?P.strip():P._strip(),P},p.prototype.split=function(R,P){R.iushrn(this.n,0,P)},p.prototype.imulK=function(R){return R.imul(this.k)};function O(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}w(O,p),O.prototype.split=function(R,P){for(var E=4194303,A=Math.min(R.length,9),z=0;z>>22,W=$}W>>>=22,R.words[z-10]=W,W===0&&R.length>10?R.length-=10:R.length-=9},O.prototype.imulK=function(R){R.words[R.length]=0,R.words[R.length+1]=0,R.length+=2;for(var P=0,E=0;E>>=26,R.words[E]=z,P=A}return P!==0&&(R.words[R.length++]=P),R},f._prime=function(R){if(o[R])return o[R];var P;if(R==="k256")P=new O;else if(R==="p224")P=new C;else if(R==="p192")P=new N;else if(R==="p25519")P=new L;else throw new Error("Unknown prime "+R);return o[R]=P,P};function F(D){if(typeof D=="string"){var R=f._prime(D);this.m=R.p,this.prime=R}else b(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}F.prototype._verify1=function(R){b(R.negative===0,"red works only with positives"),b(R.red,"red works only with red numbers")},F.prototype._verify2=function(R,P){b((R.negative|P.negative)===0,"red works only with positives"),b(R.red&&R.red===P.red,"red works only with red numbers")},F.prototype.imod=function(R){return this.prime?this.prime.ireduce(R)._forceRed(this):R.umod(this.m)._forceRed(this)},F.prototype.neg=function(R){return R.isZero()?R.clone():this.m.sub(R)._forceRed(this)},F.prototype.add=function(R,P){this._verify2(R,P);var E=R.add(P);return E.cmp(this.m)>=0&&E.isub(this.m),E._forceRed(this)},F.prototype.iadd=function(R,P){this._verify2(R,P);var E=R.iadd(P);return E.cmp(this.m)>=0&&E.isub(this.m),E},F.prototype.sub=function(R,P){this._verify2(R,P);var E=R.sub(P);return E.cmpn(0)<0&&E.iadd(this.m),E._forceRed(this)},F.prototype.isub=function(R,P){this._verify2(R,P);var E=R.isub(P);return E.cmpn(0)<0&&E.iadd(this.m),E},F.prototype.shl=function(R,P){return this._verify1(R),this.imod(R.ushln(P))},F.prototype.imul=function(R,P){return this._verify2(R,P),this.imod(R.imul(P))},F.prototype.mul=function(R,P){return this._verify2(R,P),this.imod(R.mul(P))},F.prototype.isqr=function(R){return this.imul(R,R.clone())},F.prototype.sqr=function(R){return this.mul(R,R)},F.prototype.sqrt=function(R){if(R.isZero())return R.clone();var P=this.m.andln(3);if(b(P%2===1),P===3){var E=this.m.add(new f(1)).iushrn(2);return this.pow(R,E)}for(var A=this.m.subn(1),z=0;!A.isZero()&&A.andln(1)===0;)z++,A.iushrn(1);b(!A.isZero());var W=new f(1).toRed(this),$=W.redNeg(),U=this.m.subn(1).iushrn(1),I=this.m.bitLength();for(I=new f(2*I*I).toRed(this);this.pow(I,U).cmp($)!==0;)I.redIAdd($);for(var j=this.pow(I,A),B=this.pow(R,A.addn(1).iushrn(1)),V=this.pow(R,A),te=z;V.cmp(W)!==0;){for(var ie=V,ce=0;ie.cmp(W)!==0;ce++)ie=ie.redSqr();b(ce=0;z--){for(var j=P.words[z],B=I-1;B>=0;B--){var V=j>>B&1;if(W!==A[0]&&(W=this.sqr(W)),V===0&&$===0){U=0;continue}$<<=1,$|=V,U++,!(U!==E&&(z!==0||B!==0))&&(W=this.mul(W,A[$]),U=0,$=0)}I=26}return W},F.prototype.convertTo=function(R){var P=R.umod(this.m);return P===R?P.clone():P},F.prototype.convertFrom=function(R){var P=R.clone();return P.red=null,P},f.mont=function(R){return new M(R)};function M(D){F.call(this,D),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}w(M,F),M.prototype.convertTo=function(R){return this.imod(R.ushln(this.shift))},M.prototype.convertFrom=function(R){var P=this.imod(R.mul(this.rinv));return P.red=null,P},M.prototype.imul=function(R,P){if(R.isZero()||P.isZero())return R.words[0]=0,R.length=1,R;var E=R.imul(P),A=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=E.isub(A).iushrn(this.shift),W=z;return z.cmp(this.m)>=0?W=z.isub(this.m):z.cmpn(0)<0&&(W=z.iadd(this.m)),W._forceRed(this)},M.prototype.mul=function(R,P){if(R.isZero()||P.isZero())return new f(0)._forceRed(this);var E=R.mul(P),A=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=E.isub(A).iushrn(this.shift),W=z;return z.cmp(this.m)>=0?W=z.isub(this.m):z.cmpn(0)<0&&(W=z.iadd(this.m)),W._forceRed(this)},M.prototype.invm=function(R){var P=this.imod(R._invmp(this.m).mul(this.r2));return P._forceRed(this)}})(typeof x>"u"||x,void 0)},{buffer:185}],182:[function(e,x,_){_.byteLength=h,_.toByteArray=d,_.fromByteArray=c;for(var u=[],m=[],g=typeof Uint8Array<"u"?Uint8Array:Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,f=b.length;w0)throw new Error("Invalid string. Length must be a multiple of 4");var t=a.indexOf("=");t===-1&&(t=r);var i=t===r?0:4-t%4;return[t,i]}function h(a){var r=y(a),t=r[0],i=r[1];return(t+i)*3/4-i}function l(a,r,t){return(r+t)*3/4-t}function d(a){var r,t=y(a),i=t[0],n=t[1],o=new g(l(a,i,n)),p=0,O=n>0?i-4:i,C;for(C=0;C>16&255,o[p++]=r>>8&255,o[p++]=r&255;return n===2&&(r=m[a.charCodeAt(C)]<<2|m[a.charCodeAt(C+1)]>>4,o[p++]=r&255),n===1&&(r=m[a.charCodeAt(C)]<<10|m[a.charCodeAt(C+1)]<<4|m[a.charCodeAt(C+2)]>>2,o[p++]=r>>8&255,o[p++]=r&255),o}function s(a){return u[a>>18&63]+u[a>>12&63]+u[a>>6&63]+u[a&63]}function v(a,r,t){for(var i,n=[],o=r;oO?O:p+o));return i===1?(r=a[t-1],n.push(u[r>>2]+u[r<<4&63]+"==")):i===2&&(r=(a[t-2]<<8)+a[t-1],n.push(u[r>>10]+u[r>>4&63]+u[r<<2&63]+"=")),n.join("")}},{}],183:[function(e,x,_){function u(m){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(b){return typeof b}:u=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},u(m)}(function(m,g){function b(P,E){if(!P)throw new Error(E||"Assertion failed")}function w(P,E){P.super_=E;var A=function(){};A.prototype=E.prototype,P.prototype=new A,P.prototype.constructor=P}function f(P,E,A){if(f.isBN(P))return P;this.negative=0,this.words=null,this.length=0,this.red=null,P!==null&&((E==="le"||E==="be")&&(A=E,E=10),this._init(P||0,E||10,A||"be"))}u(m)==="object"?m.exports=f:g.BN=f,f.BN=f,f.wordSize=26;var y;try{y=e("buffer").Buffer}catch{}f.isBN=function(E){return E instanceof f?!0:E!==null&&u(E)==="object"&&E.constructor.wordSize===f.wordSize&&Array.isArray(E.words)},f.max=function(E,A){return E.cmp(A)>0?E:A},f.min=function(E,A){return E.cmp(A)<0?E:A},f.prototype._init=function(E,A,z){if(typeof E=="number")return this._initNumber(E,A,z);if(u(E)==="object")return this._initArray(E,A,z);A==="hex"&&(A=16),b(A===(A|0)&&A>=2&&A<=36),E=E.toString().replace(/\s+/g,"");var W=0;E[0]==="-"&&W++,A===16?this._parseHex(E,W):this._parseBase(E,A,W),E[0]==="-"&&(this.negative=1),this._strip(),z==="le"&&this._initArray(this.toArray(),A,z)},f.prototype._initNumber=function(E,A,z){E<0&&(this.negative=1,E=-E),E<67108864?(this.words=[E&67108863],this.length=1):E<4503599627370496?(this.words=[E&67108863,E/67108864&67108863],this.length=2):(b(E<9007199254740992),this.words=[E&67108863,E/67108864&67108863,1],this.length=3),z==="le"&&this._initArray(this.toArray(),A,z)},f.prototype._initArray=function(E,A,z){if(b(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 W=0;W=0;W-=3)U=E[W]|E[W-1]<<8|E[W-2]<<16,this.words[$]|=U<>>26-I&67108863,I+=24,I>=26&&(I-=26,$++);else if(z==="le")for(W=0,$=0;W>>26-I&67108863,I+=24,I>=26&&(I-=26,$++);return this._strip()};function h(P,E,A){for(var z=0,W=Math.min(P.length,A),$=0,U=E;U=49&&I<=54?j=I-49+10:I>=17&&I<=22?j=I-17+10:j=I,z|=j,$|=j}return b(!($&240),"Invalid character in "+P),z}f.prototype._parseHex=function(E,A){this.length=Math.ceil((E.length-A)/6),this.words=new Array(this.length);for(var z=0;z=A;z-=6)$=h(E,z,z+6),this.words[W]|=$<>>26-U&4194303,U+=24,U>=26&&(U-=26,W++);z+6!==A&&($=h(E,A,z+6),this.words[W]|=$<>>26-U&4194303),this._strip()};function l(P,E,A,z){for(var W=0,$=0,U=Math.min(P.length,A),I=E;I=49?$=j-49+10:j>=17?$=j-17+10:$=j,b(j>=0&&$1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch{f.prototype.inspect=s}else f.prototype.inspect=s;function s(){return(this.red?""}var v=["","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"],c=[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],a=[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];f.prototype.toString=function(E,A){E=E||10,A=A|0||1;var z;if(E===16||E==="hex"){z="";for(var W=0,$=0,U=0;U>>24-W&16777215,$!==0||U!==this.length-1?z=v[6-j.length]+j+z:z=j+z,W+=2,W>=26&&(W-=26,U--)}for($!==0&&(z=$.toString(16)+z);z.length%A!==0;)z="0"+z;return this.negative!==0&&(z="-"+z),z}if(E===(E|0)&&E>=2&&E<=36){var B=c[E],V=a[E];z="";var te=this.clone();for(te.negative=0;!te.isZero();){var ie=te.modrn(V).toString(E);te=te.idivn(V),te.isZero()?z=ie+z:z=v[B-ie.length]+ie+z}for(this.isZero()&&(z="0"+z);z.length%A!==0;)z="0"+z;return this.negative!==0&&(z="-"+z),z}b(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var E=this.words[0];return this.length===2?E+=this.words[1]*67108864:this.length===3&&this.words[2]===1?E+=4503599627370496+this.words[1]*67108864:this.length>2&&b(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-E:E},f.prototype.toJSON=function(){return this.toString(16,2)},y&&(f.prototype.toBuffer=function(E,A){return this.toArrayLike(y,E,A)}),f.prototype.toArray=function(E,A){return this.toArrayLike(Array,E,A)};var r=function(E,A){return E.allocUnsafe?E.allocUnsafe(A):new E(A)};f.prototype.toArrayLike=function(E,A,z){this._strip();var W=this.byteLength(),$=z||Math.max(1,W);b(W<=$,"byte array longer than desired length"),b($>0,"Requested array length <= 0");var U=r(E,$),I=A==="le"?"LE":"BE";return this["_toArrayLike"+I](U,W),U},f.prototype._toArrayLikeLE=function(E,A){for(var z=0,W=0,$=0,U=0;$>8&255),z>16&255),U===6?(z>24&255),W=0,U=0):(W=I>>>24,U+=2)}if(z=0&&(E[z--]=I>>8&255),z>=0&&(E[z--]=I>>16&255),U===6?(z>=0&&(E[z--]=I>>24&255),W=0,U=0):(W=I>>>24,U+=2)}if(z>=0)for(E[z--]=W;z>=0;)E[z--]=0},Math.clz32?f.prototype._countBits=function(E){return 32-Math.clz32(E)}:f.prototype._countBits=function(E){var A=E,z=0;return A>=4096&&(z+=13,A>>>=13),A>=64&&(z+=7,A>>>=7),A>=8&&(z+=4,A>>>=4),A>=2&&(z+=2,A>>>=2),z+A},f.prototype._zeroBits=function(E){if(E===0)return 26;var A=E,z=0;return A&8191||(z+=13,A>>>=13),A&127||(z+=7,A>>>=7),A&15||(z+=4,A>>>=4),A&3||(z+=2,A>>>=2),A&1||z++,z},f.prototype.bitLength=function(){var E=this.words[this.length-1],A=this._countBits(E);return(this.length-1)*26+A};function t(P){for(var E=new Array(P.bitLength()),A=0;A>>W&1}return E}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var E=0,A=0;AE.length?this.clone().ior(E):E.clone().ior(this)},f.prototype.uor=function(E){return this.length>E.length?this.clone().iuor(E):E.clone().iuor(this)},f.prototype.iuand=function(E){var A;this.length>E.length?A=E:A=this;for(var z=0;zE.length?this.clone().iand(E):E.clone().iand(this)},f.prototype.uand=function(E){return this.length>E.length?this.clone().iuand(E):E.clone().iuand(this)},f.prototype.iuxor=function(E){var A,z;this.length>E.length?(A=this,z=E):(A=E,z=this);for(var W=0;WE.length?this.clone().ixor(E):E.clone().ixor(this)},f.prototype.uxor=function(E){return this.length>E.length?this.clone().iuxor(E):E.clone().iuxor(this)},f.prototype.inotn=function(E){b(typeof E=="number"&&E>=0);var A=Math.ceil(E/26)|0,z=E%26;this._expand(A),z>0&&A--;for(var W=0;W0&&(this.words[W]=~this.words[W]&67108863>>26-z),this._strip()},f.prototype.notn=function(E){return this.clone().inotn(E)},f.prototype.setn=function(E,A){b(typeof E=="number"&&E>=0);var z=E/26|0,W=E%26;return this._expand(z+1),A?this.words[z]=this.words[z]|1<E.length?(z=this,W=E):(z=E,W=this);for(var $=0,U=0;U>>26;for(;$!==0&&U>>26;if(this.length=z.length,$!==0)this.words[this.length]=$,this.length++;else if(z!==this)for(;UE.length?this.clone().iadd(E):E.clone().iadd(this)},f.prototype.isub=function(E){if(E.negative!==0){E.negative=0;var A=this.iadd(E);return E.negative=1,A._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(E),this.negative=1,this._normSign();var z=this.cmp(E);if(z===0)return this.negative=0,this.length=1,this.words[0]=0,this;var W,$;z>0?(W=this,$=E):(W=E,$=this);for(var U=0,I=0;I<$.length;I++)A=(W.words[I]|0)-($.words[I]|0)+U,U=A>>26,this.words[I]=A&67108863;for(;U!==0&&I>26,this.words[I]=A&67108863;if(U===0&&I>>26,te=j&67108863,ie=Math.min(B,E.length-1),ce=Math.max(0,B-P.length+1);ce<=ie;ce++){var be=B-ce|0;W=P.words[be]|0,$=E.words[ce]|0,U=W*$+te,V+=U/67108864|0,te=U&67108863}A.words[B]=te|0,j=V|0}return j!==0?A.words[B]=j|0:A.length--,A._strip()}var n=function(E,A,z){var W=E.words,$=A.words,U=z.words,I=0,j,B,V,te=W[0]|0,ie=te&8191,ce=te>>>13,be=W[1]|0,_e=be&8191,oe=be>>>13,J=W[2]|0,Q=J&8191,he=J>>>13,ke=W[3]|0,re=ke&8191,se=ke>>>13,Ce=W[4]|0,q=Ce&8191,G=Ce>>>13,Z=W[5]|0,fe=Z&8191,we=Z>>>13,ge=W[6]|0,je=ge&8191,Ze=ge>>>13,nt=W[7]|0,ut=nt&8191,ot=nt>>>13,Ue=W[8]|0,Ve=Ue&8191,Qe=Ue>>>13,tt=W[9]|0,ae=tt&8191,Re=tt>>>13,me=$[0]|0,Ee=me&8191,pe=me>>>13,Pe=$[1]|0,ee=Pe&8191,Xe=Pe>>>13,it=$[2]|0,K=it&8191,Me=it>>>13,Le=$[3]|0,ue=Le&8191,Se=Le>>>13,Ie=$[4]|0,st=Ie&8191,Ge=Ie>>>13,rt=$[5]|0,_t=rt&8191,wt=rt>>>13,Ot=$[6]|0,pt=Ot&8191,ct=Ot>>>13,At=$[7]|0,Pt=At&8191,bt=At>>>13,Kt=$[8]|0,Ct=Kt&8191,xt=Kt>>>13,Ft=$[9]|0,Lt=Ft&8191,Et=Ft>>>13;z.negative=E.negative^A.negative,z.length=19,j=Math.imul(ie,Ee),B=Math.imul(ie,pe),B=B+Math.imul(ce,Ee)|0,V=Math.imul(ce,pe);var Dr=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,j=Math.imul(_e,Ee),B=Math.imul(_e,pe),B=B+Math.imul(oe,Ee)|0,V=Math.imul(oe,pe),j=j+Math.imul(ie,ee)|0,B=B+Math.imul(ie,Xe)|0,B=B+Math.imul(ce,ee)|0,V=V+Math.imul(ce,Xe)|0;var Or=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Or>>>26)|0,Or&=67108863,j=Math.imul(Q,Ee),B=Math.imul(Q,pe),B=B+Math.imul(he,Ee)|0,V=Math.imul(he,pe),j=j+Math.imul(_e,ee)|0,B=B+Math.imul(_e,Xe)|0,B=B+Math.imul(oe,ee)|0,V=V+Math.imul(oe,Xe)|0,j=j+Math.imul(ie,K)|0,B=B+Math.imul(ie,Me)|0,B=B+Math.imul(ce,K)|0,V=V+Math.imul(ce,Me)|0;var Gr=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,j=Math.imul(re,Ee),B=Math.imul(re,pe),B=B+Math.imul(se,Ee)|0,V=Math.imul(se,pe),j=j+Math.imul(Q,ee)|0,B=B+Math.imul(Q,Xe)|0,B=B+Math.imul(he,ee)|0,V=V+Math.imul(he,Xe)|0,j=j+Math.imul(_e,K)|0,B=B+Math.imul(_e,Me)|0,B=B+Math.imul(oe,K)|0,V=V+Math.imul(oe,Me)|0,j=j+Math.imul(ie,ue)|0,B=B+Math.imul(ie,Se)|0,B=B+Math.imul(ce,ue)|0,V=V+Math.imul(ce,Se)|0;var Nr=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,j=Math.imul(q,Ee),B=Math.imul(q,pe),B=B+Math.imul(G,Ee)|0,V=Math.imul(G,pe),j=j+Math.imul(re,ee)|0,B=B+Math.imul(re,Xe)|0,B=B+Math.imul(se,ee)|0,V=V+Math.imul(se,Xe)|0,j=j+Math.imul(Q,K)|0,B=B+Math.imul(Q,Me)|0,B=B+Math.imul(he,K)|0,V=V+Math.imul(he,Me)|0,j=j+Math.imul(_e,ue)|0,B=B+Math.imul(_e,Se)|0,B=B+Math.imul(oe,ue)|0,V=V+Math.imul(oe,Se)|0,j=j+Math.imul(ie,st)|0,B=B+Math.imul(ie,Ge)|0,B=B+Math.imul(ce,st)|0,V=V+Math.imul(ce,Ge)|0;var Zr=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,j=Math.imul(fe,Ee),B=Math.imul(fe,pe),B=B+Math.imul(we,Ee)|0,V=Math.imul(we,pe),j=j+Math.imul(q,ee)|0,B=B+Math.imul(q,Xe)|0,B=B+Math.imul(G,ee)|0,V=V+Math.imul(G,Xe)|0,j=j+Math.imul(re,K)|0,B=B+Math.imul(re,Me)|0,B=B+Math.imul(se,K)|0,V=V+Math.imul(se,Me)|0,j=j+Math.imul(Q,ue)|0,B=B+Math.imul(Q,Se)|0,B=B+Math.imul(he,ue)|0,V=V+Math.imul(he,Se)|0,j=j+Math.imul(_e,st)|0,B=B+Math.imul(_e,Ge)|0,B=B+Math.imul(oe,st)|0,V=V+Math.imul(oe,Ge)|0,j=j+Math.imul(ie,_t)|0,B=B+Math.imul(ie,wt)|0,B=B+Math.imul(ce,_t)|0,V=V+Math.imul(ce,wt)|0;var Qt=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,j=Math.imul(je,Ee),B=Math.imul(je,pe),B=B+Math.imul(Ze,Ee)|0,V=Math.imul(Ze,pe),j=j+Math.imul(fe,ee)|0,B=B+Math.imul(fe,Xe)|0,B=B+Math.imul(we,ee)|0,V=V+Math.imul(we,Xe)|0,j=j+Math.imul(q,K)|0,B=B+Math.imul(q,Me)|0,B=B+Math.imul(G,K)|0,V=V+Math.imul(G,Me)|0,j=j+Math.imul(re,ue)|0,B=B+Math.imul(re,Se)|0,B=B+Math.imul(se,ue)|0,V=V+Math.imul(se,Se)|0,j=j+Math.imul(Q,st)|0,B=B+Math.imul(Q,Ge)|0,B=B+Math.imul(he,st)|0,V=V+Math.imul(he,Ge)|0,j=j+Math.imul(_e,_t)|0,B=B+Math.imul(_e,wt)|0,B=B+Math.imul(oe,_t)|0,V=V+Math.imul(oe,wt)|0,j=j+Math.imul(ie,pt)|0,B=B+Math.imul(ie,ct)|0,B=B+Math.imul(ce,pt)|0,V=V+Math.imul(ce,ct)|0;var Hr=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,j=Math.imul(ut,Ee),B=Math.imul(ut,pe),B=B+Math.imul(ot,Ee)|0,V=Math.imul(ot,pe),j=j+Math.imul(je,ee)|0,B=B+Math.imul(je,Xe)|0,B=B+Math.imul(Ze,ee)|0,V=V+Math.imul(Ze,Xe)|0,j=j+Math.imul(fe,K)|0,B=B+Math.imul(fe,Me)|0,B=B+Math.imul(we,K)|0,V=V+Math.imul(we,Me)|0,j=j+Math.imul(q,ue)|0,B=B+Math.imul(q,Se)|0,B=B+Math.imul(G,ue)|0,V=V+Math.imul(G,Se)|0,j=j+Math.imul(re,st)|0,B=B+Math.imul(re,Ge)|0,B=B+Math.imul(se,st)|0,V=V+Math.imul(se,Ge)|0,j=j+Math.imul(Q,_t)|0,B=B+Math.imul(Q,wt)|0,B=B+Math.imul(he,_t)|0,V=V+Math.imul(he,wt)|0,j=j+Math.imul(_e,pt)|0,B=B+Math.imul(_e,ct)|0,B=B+Math.imul(oe,pt)|0,V=V+Math.imul(oe,ct)|0,j=j+Math.imul(ie,Pt)|0,B=B+Math.imul(ie,bt)|0,B=B+Math.imul(ce,Pt)|0,V=V+Math.imul(ce,bt)|0;var Fr=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,j=Math.imul(Ve,Ee),B=Math.imul(Ve,pe),B=B+Math.imul(Qe,Ee)|0,V=Math.imul(Qe,pe),j=j+Math.imul(ut,ee)|0,B=B+Math.imul(ut,Xe)|0,B=B+Math.imul(ot,ee)|0,V=V+Math.imul(ot,Xe)|0,j=j+Math.imul(je,K)|0,B=B+Math.imul(je,Me)|0,B=B+Math.imul(Ze,K)|0,V=V+Math.imul(Ze,Me)|0,j=j+Math.imul(fe,ue)|0,B=B+Math.imul(fe,Se)|0,B=B+Math.imul(we,ue)|0,V=V+Math.imul(we,Se)|0,j=j+Math.imul(q,st)|0,B=B+Math.imul(q,Ge)|0,B=B+Math.imul(G,st)|0,V=V+Math.imul(G,Ge)|0,j=j+Math.imul(re,_t)|0,B=B+Math.imul(re,wt)|0,B=B+Math.imul(se,_t)|0,V=V+Math.imul(se,wt)|0,j=j+Math.imul(Q,pt)|0,B=B+Math.imul(Q,ct)|0,B=B+Math.imul(he,pt)|0,V=V+Math.imul(he,ct)|0,j=j+Math.imul(_e,Pt)|0,B=B+Math.imul(_e,bt)|0,B=B+Math.imul(oe,Pt)|0,V=V+Math.imul(oe,bt)|0,j=j+Math.imul(ie,Ct)|0,B=B+Math.imul(ie,xt)|0,B=B+Math.imul(ce,Ct)|0,V=V+Math.imul(ce,xt)|0;var Lr=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,j=Math.imul(ae,Ee),B=Math.imul(ae,pe),B=B+Math.imul(Re,Ee)|0,V=Math.imul(Re,pe),j=j+Math.imul(Ve,ee)|0,B=B+Math.imul(Ve,Xe)|0,B=B+Math.imul(Qe,ee)|0,V=V+Math.imul(Qe,Xe)|0,j=j+Math.imul(ut,K)|0,B=B+Math.imul(ut,Me)|0,B=B+Math.imul(ot,K)|0,V=V+Math.imul(ot,Me)|0,j=j+Math.imul(je,ue)|0,B=B+Math.imul(je,Se)|0,B=B+Math.imul(Ze,ue)|0,V=V+Math.imul(Ze,Se)|0,j=j+Math.imul(fe,st)|0,B=B+Math.imul(fe,Ge)|0,B=B+Math.imul(we,st)|0,V=V+Math.imul(we,Ge)|0,j=j+Math.imul(q,_t)|0,B=B+Math.imul(q,wt)|0,B=B+Math.imul(G,_t)|0,V=V+Math.imul(G,wt)|0,j=j+Math.imul(re,pt)|0,B=B+Math.imul(re,ct)|0,B=B+Math.imul(se,pt)|0,V=V+Math.imul(se,ct)|0,j=j+Math.imul(Q,Pt)|0,B=B+Math.imul(Q,bt)|0,B=B+Math.imul(he,Pt)|0,V=V+Math.imul(he,bt)|0,j=j+Math.imul(_e,Ct)|0,B=B+Math.imul(_e,xt)|0,B=B+Math.imul(oe,Ct)|0,V=V+Math.imul(oe,xt)|0,j=j+Math.imul(ie,Lt)|0,B=B+Math.imul(ie,Et)|0,B=B+Math.imul(ce,Lt)|0,V=V+Math.imul(ce,Et)|0;var Ur=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,j=Math.imul(ae,ee),B=Math.imul(ae,Xe),B=B+Math.imul(Re,ee)|0,V=Math.imul(Re,Xe),j=j+Math.imul(Ve,K)|0,B=B+Math.imul(Ve,Me)|0,B=B+Math.imul(Qe,K)|0,V=V+Math.imul(Qe,Me)|0,j=j+Math.imul(ut,ue)|0,B=B+Math.imul(ut,Se)|0,B=B+Math.imul(ot,ue)|0,V=V+Math.imul(ot,Se)|0,j=j+Math.imul(je,st)|0,B=B+Math.imul(je,Ge)|0,B=B+Math.imul(Ze,st)|0,V=V+Math.imul(Ze,Ge)|0,j=j+Math.imul(fe,_t)|0,B=B+Math.imul(fe,wt)|0,B=B+Math.imul(we,_t)|0,V=V+Math.imul(we,wt)|0,j=j+Math.imul(q,pt)|0,B=B+Math.imul(q,ct)|0,B=B+Math.imul(G,pt)|0,V=V+Math.imul(G,ct)|0,j=j+Math.imul(re,Pt)|0,B=B+Math.imul(re,bt)|0,B=B+Math.imul(se,Pt)|0,V=V+Math.imul(se,bt)|0,j=j+Math.imul(Q,Ct)|0,B=B+Math.imul(Q,xt)|0,B=B+Math.imul(he,Ct)|0,V=V+Math.imul(he,xt)|0,j=j+Math.imul(_e,Lt)|0,B=B+Math.imul(_e,Et)|0,B=B+Math.imul(oe,Lt)|0,V=V+Math.imul(oe,Et)|0;var vt=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(vt>>>26)|0,vt&=67108863,j=Math.imul(ae,K),B=Math.imul(ae,Me),B=B+Math.imul(Re,K)|0,V=Math.imul(Re,Me),j=j+Math.imul(Ve,ue)|0,B=B+Math.imul(Ve,Se)|0,B=B+Math.imul(Qe,ue)|0,V=V+Math.imul(Qe,Se)|0,j=j+Math.imul(ut,st)|0,B=B+Math.imul(ut,Ge)|0,B=B+Math.imul(ot,st)|0,V=V+Math.imul(ot,Ge)|0,j=j+Math.imul(je,_t)|0,B=B+Math.imul(je,wt)|0,B=B+Math.imul(Ze,_t)|0,V=V+Math.imul(Ze,wt)|0,j=j+Math.imul(fe,pt)|0,B=B+Math.imul(fe,ct)|0,B=B+Math.imul(we,pt)|0,V=V+Math.imul(we,ct)|0,j=j+Math.imul(q,Pt)|0,B=B+Math.imul(q,bt)|0,B=B+Math.imul(G,Pt)|0,V=V+Math.imul(G,bt)|0,j=j+Math.imul(re,Ct)|0,B=B+Math.imul(re,xt)|0,B=B+Math.imul(se,Ct)|0,V=V+Math.imul(se,xt)|0,j=j+Math.imul(Q,Lt)|0,B=B+Math.imul(Q,Et)|0,B=B+Math.imul(he,Lt)|0,V=V+Math.imul(he,Et)|0;var Ke=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,j=Math.imul(ae,ue),B=Math.imul(ae,Se),B=B+Math.imul(Re,ue)|0,V=Math.imul(Re,Se),j=j+Math.imul(Ve,st)|0,B=B+Math.imul(Ve,Ge)|0,B=B+Math.imul(Qe,st)|0,V=V+Math.imul(Qe,Ge)|0,j=j+Math.imul(ut,_t)|0,B=B+Math.imul(ut,wt)|0,B=B+Math.imul(ot,_t)|0,V=V+Math.imul(ot,wt)|0,j=j+Math.imul(je,pt)|0,B=B+Math.imul(je,ct)|0,B=B+Math.imul(Ze,pt)|0,V=V+Math.imul(Ze,ct)|0,j=j+Math.imul(fe,Pt)|0,B=B+Math.imul(fe,bt)|0,B=B+Math.imul(we,Pt)|0,V=V+Math.imul(we,bt)|0,j=j+Math.imul(q,Ct)|0,B=B+Math.imul(q,xt)|0,B=B+Math.imul(G,Ct)|0,V=V+Math.imul(G,xt)|0,j=j+Math.imul(re,Lt)|0,B=B+Math.imul(re,Et)|0,B=B+Math.imul(se,Lt)|0,V=V+Math.imul(se,Et)|0;var ve=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(ve>>>26)|0,ve&=67108863,j=Math.imul(ae,st),B=Math.imul(ae,Ge),B=B+Math.imul(Re,st)|0,V=Math.imul(Re,Ge),j=j+Math.imul(Ve,_t)|0,B=B+Math.imul(Ve,wt)|0,B=B+Math.imul(Qe,_t)|0,V=V+Math.imul(Qe,wt)|0,j=j+Math.imul(ut,pt)|0,B=B+Math.imul(ut,ct)|0,B=B+Math.imul(ot,pt)|0,V=V+Math.imul(ot,ct)|0,j=j+Math.imul(je,Pt)|0,B=B+Math.imul(je,bt)|0,B=B+Math.imul(Ze,Pt)|0,V=V+Math.imul(Ze,bt)|0,j=j+Math.imul(fe,Ct)|0,B=B+Math.imul(fe,xt)|0,B=B+Math.imul(we,Ct)|0,V=V+Math.imul(we,xt)|0,j=j+Math.imul(q,Lt)|0,B=B+Math.imul(q,Et)|0,B=B+Math.imul(G,Lt)|0,V=V+Math.imul(G,Et)|0;var Fe=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,j=Math.imul(ae,_t),B=Math.imul(ae,wt),B=B+Math.imul(Re,_t)|0,V=Math.imul(Re,wt),j=j+Math.imul(Ve,pt)|0,B=B+Math.imul(Ve,ct)|0,B=B+Math.imul(Qe,pt)|0,V=V+Math.imul(Qe,ct)|0,j=j+Math.imul(ut,Pt)|0,B=B+Math.imul(ut,bt)|0,B=B+Math.imul(ot,Pt)|0,V=V+Math.imul(ot,bt)|0,j=j+Math.imul(je,Ct)|0,B=B+Math.imul(je,xt)|0,B=B+Math.imul(Ze,Ct)|0,V=V+Math.imul(Ze,xt)|0,j=j+Math.imul(fe,Lt)|0,B=B+Math.imul(fe,Et)|0,B=B+Math.imul(we,Lt)|0,V=V+Math.imul(we,Et)|0;var Be=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Be>>>26)|0,Be&=67108863,j=Math.imul(ae,pt),B=Math.imul(ae,ct),B=B+Math.imul(Re,pt)|0,V=Math.imul(Re,ct),j=j+Math.imul(Ve,Pt)|0,B=B+Math.imul(Ve,bt)|0,B=B+Math.imul(Qe,Pt)|0,V=V+Math.imul(Qe,bt)|0,j=j+Math.imul(ut,Ct)|0,B=B+Math.imul(ut,xt)|0,B=B+Math.imul(ot,Ct)|0,V=V+Math.imul(ot,xt)|0,j=j+Math.imul(je,Lt)|0,B=B+Math.imul(je,Et)|0,B=B+Math.imul(Ze,Lt)|0,V=V+Math.imul(Ze,Et)|0;var dt=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(dt>>>26)|0,dt&=67108863,j=Math.imul(ae,Pt),B=Math.imul(ae,bt),B=B+Math.imul(Re,Pt)|0,V=Math.imul(Re,bt),j=j+Math.imul(Ve,Ct)|0,B=B+Math.imul(Ve,xt)|0,B=B+Math.imul(Qe,Ct)|0,V=V+Math.imul(Qe,xt)|0,j=j+Math.imul(ut,Lt)|0,B=B+Math.imul(ut,Et)|0,B=B+Math.imul(ot,Lt)|0,V=V+Math.imul(ot,Et)|0;var St=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(St>>>26)|0,St&=67108863,j=Math.imul(ae,Ct),B=Math.imul(ae,xt),B=B+Math.imul(Re,Ct)|0,V=Math.imul(Re,xt),j=j+Math.imul(Ve,Lt)|0,B=B+Math.imul(Ve,Et)|0,B=B+Math.imul(Qe,Lt)|0,V=V+Math.imul(Qe,Et)|0;var Xt=(I+j|0)+((B&8191)<<13)|0;I=(V+(B>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,j=Math.imul(ae,Lt),B=Math.imul(ae,Et),B=B+Math.imul(Re,Lt)|0,V=Math.imul(Re,Et);var lr=(I+j|0)+((B&8191)<<13)|0;return I=(V+(B>>>13)|0)+(lr>>>26)|0,lr&=67108863,U[0]=Dr,U[1]=Or,U[2]=Gr,U[3]=Nr,U[4]=Zr,U[5]=Qt,U[6]=Hr,U[7]=Fr,U[8]=Lr,U[9]=Ur,U[10]=vt,U[11]=Ke,U[12]=ve,U[13]=Fe,U[14]=Be,U[15]=dt,U[16]=St,U[17]=Xt,U[18]=lr,I!==0&&(U[19]=I,z.length++),z};Math.imul||(n=i);function o(P,E,A){A.negative=E.negative^P.negative,A.length=P.length+E.length;for(var z=0,W=0,$=0;$>>26)|0,W+=U>>>26,U&=67108863}A.words[$]=I,z=U,U=W}return z!==0?A.words[$]=z:A.length--,A._strip()}function p(P,E,A){return o(P,E,A)}f.prototype.mulTo=function(E,A){var z,W=this.length+E.length;return this.length===10&&E.length===10?z=n(this,E,A):W<63?z=i(this,E,A):W<1024?z=o(this,E,A):z=p(this,E,A),z},f.prototype.mul=function(E){var A=new f(null);return A.words=new Array(this.length+E.length),this.mulTo(E,A)},f.prototype.mulf=function(E){var A=new f(null);return A.words=new Array(this.length+E.length),p(this,E,A)},f.prototype.imul=function(E){return this.clone().mulTo(E,this)},f.prototype.imuln=function(E){var A=E<0;A&&(E=-E),b(typeof E=="number"),b(E<67108864);for(var z=0,W=0;W>=26,z+=$/67108864|0,z+=U>>>26,this.words[W]=U&67108863}return z!==0&&(this.words[W]=z,this.length++),A?this.ineg():this},f.prototype.muln=function(E){return this.clone().imuln(E)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(E){var A=t(E);if(A.length===0)return new f(1);for(var z=this,W=0;W=0);var A=E%26,z=(E-A)/26,W=67108863>>>26-A<<26-A,$;if(A!==0){var U=0;for($=0;$>>26-A}U&&(this.words[$]=U,this.length++)}if(z!==0){for($=this.length-1;$>=0;$--)this.words[$+z]=this.words[$];for($=0;$=0);var W;A?W=(A-A%26)/26:W=0;var $=E%26,U=Math.min((E-$)/26,this.length),I=67108863^67108863>>>$<<$,j=z;if(W-=U,W=Math.max(0,W),j){for(var B=0;BU)for(this.length-=U,B=0;B=0&&(V!==0||B>=W);B--){var te=this.words[B]|0;this.words[B]=V<<26-$|te>>>$,V=te&I}return j&&V!==0&&(j.words[j.length++]=V),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(E,A,z){return b(this.negative===0),this.iushrn(E,A,z)},f.prototype.shln=function(E){return this.clone().ishln(E)},f.prototype.ushln=function(E){return this.clone().iushln(E)},f.prototype.shrn=function(E){return this.clone().ishrn(E)},f.prototype.ushrn=function(E){return this.clone().iushrn(E)},f.prototype.testn=function(E){b(typeof E=="number"&&E>=0);var A=E%26,z=(E-A)/26,W=1<=0);var A=E%26,z=(E-A)/26;if(b(this.negative===0,"imaskn works only with positive numbers"),this.length<=z)return this;if(A!==0&&z++,this.length=Math.min(z,this.length),A!==0){var W=67108863^67108863>>>A<=67108864;A++)this.words[A]-=67108864,A===this.length-1?this.words[A+1]=1:this.words[A+1]++;return this.length=Math.max(this.length,A+1),this},f.prototype.isubn=function(E){if(b(typeof E=="number"),b(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 A=0;A>26)-(j/67108864|0),this.words[$+z]=U&67108863}for(;$>26,this.words[$+z]=U&67108863;if(I===0)return this._strip();for(b(I===-1),I=0,$=0;$>26,this.words[$]=U&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(E,A){var z=this.length-E.length,W=this.clone(),$=E,U=$.words[$.length-1]|0,I=this._countBits(U);z=26-I,z!==0&&($=$.ushln(z),W.iushln(z),U=$.words[$.length-1]|0);var j=W.length-$.length,B;if(A!=="mod"){B=new f(null),B.length=j+1,B.words=new Array(B.length);for(var V=0;V=0;ie--){var ce=(W.words[$.length+ie]|0)*67108864+(W.words[$.length+ie-1]|0);for(ce=Math.min(ce/U|0,67108863),W._ishlnsubmul($,ce,ie);W.negative!==0;)ce--,W.negative=0,W._ishlnsubmul($,1,ie),W.isZero()||(W.negative^=1);B&&(B.words[ie]=ce)}return B&&B._strip(),W._strip(),A!=="div"&&z!==0&&W.iushrn(z),{div:B||null,mod:W}},f.prototype.divmod=function(E,A,z){if(b(!E.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var W,$,U;return this.negative!==0&&E.negative===0?(U=this.neg().divmod(E,A),A!=="mod"&&(W=U.div.neg()),A!=="div"&&($=U.mod.neg(),z&&$.negative!==0&&$.iadd(E)),{div:W,mod:$}):this.negative===0&&E.negative!==0?(U=this.divmod(E.neg(),A),A!=="mod"&&(W=U.div.neg()),{div:W,mod:U.mod}):this.negative&E.negative?(U=this.neg().divmod(E.neg(),A),A!=="div"&&($=U.mod.neg(),z&&$.negative!==0&&$.isub(E)),{div:U.div,mod:$}):E.length>this.length||this.cmp(E)<0?{div:new f(0),mod:this}:E.length===1?A==="div"?{div:this.divn(E.words[0]),mod:null}:A==="mod"?{div:null,mod:new f(this.modrn(E.words[0]))}:{div:this.divn(E.words[0]),mod:new f(this.modrn(E.words[0]))}:this._wordDiv(E,A)},f.prototype.div=function(E){return this.divmod(E,"div",!1).div},f.prototype.mod=function(E){return this.divmod(E,"mod",!1).mod},f.prototype.umod=function(E){return this.divmod(E,"mod",!0).mod},f.prototype.divRound=function(E){var A=this.divmod(E);if(A.mod.isZero())return A.div;var z=A.div.negative!==0?A.mod.isub(E):A.mod,W=E.ushrn(1),$=E.andln(1),U=z.cmp(W);return U<0||$===1&&U===0?A.div:A.div.negative!==0?A.div.isubn(1):A.div.iaddn(1)},f.prototype.modrn=function(E){var A=E<0;A&&(E=-E),b(E<=67108863);for(var z=(1<<26)%E,W=0,$=this.length-1;$>=0;$--)W=(z*W+(this.words[$]|0))%E;return A?-W:W},f.prototype.modn=function(E){return this.modrn(E)},f.prototype.idivn=function(E){var A=E<0;A&&(E=-E),b(E<=67108863);for(var z=0,W=this.length-1;W>=0;W--){var $=(this.words[W]|0)+z*67108864;this.words[W]=$/E|0,z=$%E}return this._strip(),A?this.ineg():this},f.prototype.divn=function(E){return this.clone().idivn(E)},f.prototype.egcd=function(E){b(E.negative===0),b(!E.isZero());var A=this,z=E.clone();A.negative!==0?A=A.umod(E):A=A.clone();for(var W=new f(1),$=new f(0),U=new f(0),I=new f(1),j=0;A.isEven()&&z.isEven();)A.iushrn(1),z.iushrn(1),++j;for(var B=z.clone(),V=A.clone();!A.isZero();){for(var te=0,ie=1;!(A.words[0]&ie)&&te<26;++te,ie<<=1);if(te>0)for(A.iushrn(te);te-- >0;)(W.isOdd()||$.isOdd())&&(W.iadd(B),$.isub(V)),W.iushrn(1),$.iushrn(1);for(var ce=0,be=1;!(z.words[0]&be)&&ce<26;++ce,be<<=1);if(ce>0)for(z.iushrn(ce);ce-- >0;)(U.isOdd()||I.isOdd())&&(U.iadd(B),I.isub(V)),U.iushrn(1),I.iushrn(1);A.cmp(z)>=0?(A.isub(z),W.isub(U),$.isub(I)):(z.isub(A),U.isub(W),I.isub($))}return{a:U,b:I,gcd:z.iushln(j)}},f.prototype._invmp=function(E){b(E.negative===0),b(!E.isZero());var A=this,z=E.clone();A.negative!==0?A=A.umod(E):A=A.clone();for(var W=new f(1),$=new f(0),U=z.clone();A.cmpn(1)>0&&z.cmpn(1)>0;){for(var I=0,j=1;!(A.words[0]&j)&&I<26;++I,j<<=1);if(I>0)for(A.iushrn(I);I-- >0;)W.isOdd()&&W.iadd(U),W.iushrn(1);for(var B=0,V=1;!(z.words[0]&V)&&B<26;++B,V<<=1);if(B>0)for(z.iushrn(B);B-- >0;)$.isOdd()&&$.iadd(U),$.iushrn(1);A.cmp(z)>=0?(A.isub(z),W.isub($)):(z.isub(A),$.isub(W))}var te;return A.cmpn(1)===0?te=W:te=$,te.cmpn(0)<0&&te.iadd(E),te},f.prototype.gcd=function(E){if(this.isZero())return E.abs();if(E.isZero())return this.abs();var A=this.clone(),z=E.clone();A.negative=0,z.negative=0;for(var W=0;A.isEven()&&z.isEven();W++)A.iushrn(1),z.iushrn(1);do{for(;A.isEven();)A.iushrn(1);for(;z.isEven();)z.iushrn(1);var $=A.cmp(z);if($<0){var U=A;A=z,z=U}else if($===0||z.cmpn(1)===0)break;A.isub(z)}while(!0);return z.iushln(W)},f.prototype.invm=function(E){return this.egcd(E).a.umod(E)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(E){return this.words[0]&E},f.prototype.bincn=function(E){b(typeof E=="number");var A=E%26,z=(E-A)/26,W=1<>>26,I&=67108863,this.words[U]=I}return $!==0&&(this.words[U]=$,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(E){var A=E<0;if(this.negative!==0&&!A)return-1;if(this.negative===0&&A)return 1;this._strip();var z;if(this.length>1)z=1;else{A&&(E=-E),b(E<=67108863,"Number is too big");var W=this.words[0]|0;z=W===E?0:WE.length)return 1;if(this.length=0;z--){var W=this.words[z]|0,$=E.words[z]|0;if(W!==$){W<$?A=-1:W>$&&(A=1);break}}return A},f.prototype.gtn=function(E){return this.cmpn(E)===1},f.prototype.gt=function(E){return this.cmp(E)===1},f.prototype.gten=function(E){return this.cmpn(E)>=0},f.prototype.gte=function(E){return this.cmp(E)>=0},f.prototype.ltn=function(E){return this.cmpn(E)===-1},f.prototype.lt=function(E){return this.cmp(E)===-1},f.prototype.lten=function(E){return this.cmpn(E)<=0},f.prototype.lte=function(E){return this.cmp(E)<=0},f.prototype.eqn=function(E){return this.cmpn(E)===0},f.prototype.eq=function(E){return this.cmp(E)===0},f.red=function(E){return new D(E)},f.prototype.toRed=function(E){return b(!this.red,"Already a number in reduction context"),b(this.negative===0,"red works only with positives"),E.convertTo(this)._forceRed(E)},f.prototype.fromRed=function(){return b(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(E){return this.red=E,this},f.prototype.forceRed=function(E){return b(!this.red,"Already a number in reduction context"),this._forceRed(E)},f.prototype.redAdd=function(E){return b(this.red,"redAdd works only with red numbers"),this.red.add(this,E)},f.prototype.redIAdd=function(E){return b(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,E)},f.prototype.redSub=function(E){return b(this.red,"redSub works only with red numbers"),this.red.sub(this,E)},f.prototype.redISub=function(E){return b(this.red,"redISub works only with red numbers"),this.red.isub(this,E)},f.prototype.redShl=function(E){return b(this.red,"redShl works only with red numbers"),this.red.shl(this,E)},f.prototype.redMul=function(E){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.mul(this,E)},f.prototype.redIMul=function(E){return b(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.imul(this,E)},f.prototype.redSqr=function(){return b(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return b(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return b(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return b(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return b(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(E){return b(this.red&&!E.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,E)};var O={k256:null,p224:null,p192:null,p25519:null};function C(P,E){this.name=P,this.p=new f(E,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var E=new f(null);return E.words=new Array(Math.ceil(this.n/13)),E},C.prototype.ireduce=function(E){var A=E,z;do this.split(A,this.tmp),A=this.imulK(A),A=A.iadd(this.tmp),z=A.bitLength();while(z>this.n);var W=z0?A.isub(this.p):A.strip!==void 0?A.strip():A._strip(),A},C.prototype.split=function(E,A){E.iushrn(this.n,0,A)},C.prototype.imulK=function(E){return E.imul(this.k)};function N(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}w(N,C),N.prototype.split=function(E,A){for(var z=4194303,W=Math.min(E.length,9),$=0;$>>22,U=I}U>>>=22,E.words[$-10]=U,U===0&&E.length>10?E.length-=10:E.length-=9},N.prototype.imulK=function(E){E.words[E.length]=0,E.words[E.length+1]=0,E.length+=2;for(var A=0,z=0;z>>=26,E.words[z]=$,A=W}return A!==0&&(E.words[E.length++]=A),E},f._prime=function(E){if(O[E])return O[E];var A;if(E==="k256")A=new N;else if(E==="p224")A=new L;else if(E==="p192")A=new F;else if(E==="p25519")A=new M;else throw new Error("Unknown prime "+E);return O[E]=A,A};function D(P){if(typeof P=="string"){var E=f._prime(P);this.m=E.p,this.prime=E}else b(P.gtn(1),"modulus must be greater than 1"),this.m=P,this.prime=null}D.prototype._verify1=function(E){b(E.negative===0,"red works only with positives"),b(E.red,"red works only with red numbers")},D.prototype._verify2=function(E,A){b((E.negative|A.negative)===0,"red works only with positives"),b(E.red&&E.red===A.red,"red works only with red numbers")},D.prototype.imod=function(E){return this.prime?this.prime.ireduce(E)._forceRed(this):(d(E,E.umod(this.m)._forceRed(this)),E)},D.prototype.neg=function(E){return E.isZero()?E.clone():this.m.sub(E)._forceRed(this)},D.prototype.add=function(E,A){this._verify2(E,A);var z=E.add(A);return z.cmp(this.m)>=0&&z.isub(this.m),z._forceRed(this)},D.prototype.iadd=function(E,A){this._verify2(E,A);var z=E.iadd(A);return z.cmp(this.m)>=0&&z.isub(this.m),z},D.prototype.sub=function(E,A){this._verify2(E,A);var z=E.sub(A);return z.cmpn(0)<0&&z.iadd(this.m),z._forceRed(this)},D.prototype.isub=function(E,A){this._verify2(E,A);var z=E.isub(A);return z.cmpn(0)<0&&z.iadd(this.m),z},D.prototype.shl=function(E,A){return this._verify1(E),this.imod(E.ushln(A))},D.prototype.imul=function(E,A){return this._verify2(E,A),this.imod(E.imul(A))},D.prototype.mul=function(E,A){return this._verify2(E,A),this.imod(E.mul(A))},D.prototype.isqr=function(E){return this.imul(E,E.clone())},D.prototype.sqr=function(E){return this.mul(E,E)},D.prototype.sqrt=function(E){if(E.isZero())return E.clone();var A=this.m.andln(3);if(b(A%2===1),A===3){var z=this.m.add(new f(1)).iushrn(2);return this.pow(E,z)}for(var W=this.m.subn(1),$=0;!W.isZero()&&W.andln(1)===0;)$++,W.iushrn(1);b(!W.isZero());var U=new f(1).toRed(this),I=U.redNeg(),j=this.m.subn(1).iushrn(1),B=this.m.bitLength();for(B=new f(2*B*B).toRed(this);this.pow(B,j).cmp(I)!==0;)B.redIAdd(I);for(var V=this.pow(B,W),te=this.pow(E,W.addn(1).iushrn(1)),ie=this.pow(E,W),ce=$;ie.cmp(U)!==0;){for(var be=ie,_e=0;be.cmp(U)!==0;_e++)be=be.redSqr();b(_e=0;$--){for(var V=A.words[$],te=B-1;te>=0;te--){var ie=V>>te&1;if(U!==W[0]&&(U=this.sqr(U)),ie===0&&I===0){j=0;continue}I<<=1,I|=ie,j++,!(j!==z&&($!==0||te!==0))&&(U=this.mul(U,W[I]),j=0,I=0)}B=26}return U},D.prototype.convertTo=function(E){var A=E.umod(this.m);return A===E?A.clone():A},D.prototype.convertFrom=function(E){var A=E.clone();return A.red=null,A},f.mont=function(E){return new R(E)};function R(P){D.call(this,P),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}w(R,D),R.prototype.convertTo=function(E){return this.imod(E.ushln(this.shift))},R.prototype.convertFrom=function(E){var A=this.imod(E.mul(this.rinv));return A.red=null,A},R.prototype.imul=function(E,A){if(E.isZero()||A.isZero())return E.words[0]=0,E.length=1,E;var z=E.imul(A),W=z.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=z.isub(W).iushrn(this.shift),U=$;return $.cmp(this.m)>=0?U=$.isub(this.m):$.cmpn(0)<0&&(U=$.iadd(this.m)),U._forceRed(this)},R.prototype.mul=function(E,A){if(E.isZero()||A.isZero())return new f(0)._forceRed(this);var z=E.mul(A),W=z.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=z.isub(W).iushrn(this.shift),U=$;return $.cmp(this.m)>=0?U=$.isub(this.m):$.cmpn(0)<0&&(U=$.iadd(this.m)),U._forceRed(this)},R.prototype.invm=function(E){var A=this.imod(E._invmp(this.m).mul(this.r2));return A._forceRed(this)}})(typeof x>"u"||x,void 0)},{buffer:185}],184:[function(e,x,_){function u(w){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(y){return typeof y}:u=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},u(w)}var m;x.exports=function(f){return m||(m=new g(null)),m.generate(f)};function g(w){this.rand=w}if(x.exports.Rand=g,g.prototype.generate=function(f){return this._rand(f)},g.prototype._rand=function(f){if(this.rand.getBytes)return this.rand.getBytes(f);for(var y=new Uint8Array(f),h=0;h"u"?"undefined":u(self))==="object")self.crypto&&self.crypto.getRandomValues?g.prototype._rand=function(f){var y=new Uint8Array(f);return self.crypto.getRandomValues(y),y}:self.msCrypto&&self.msCrypto.getRandomValues?g.prototype._rand=function(f){var y=new Uint8Array(f);return self.msCrypto.getRandomValues(y),y}:(typeof window>"u"?"undefined":u(window))==="object"&&(g.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var b=e("crypto");if(typeof b.randomBytes!="function")throw new Error("Not supported");g.prototype._rand=function(f){return b.randomBytes(f)}}catch{}},{crypto:185}],185:[function(e,x,_){},{}],186:[function(e,x,_){var u=e("safe-buffer").Buffer;function m(h){u.isBuffer(h)||(h=u.from(h));for(var l=h.length/4|0,d=new Array(l),s=0;s>>24]^a[n>>>16&255]^r[o>>>8&255]^t[p&255]^l[F++],C=c[n>>>24]^a[o>>>16&255]^r[p>>>8&255]^t[i&255]^l[F++],N=c[o>>>24]^a[p>>>16&255]^r[i>>>8&255]^t[n&255]^l[F++],L=c[p>>>24]^a[i>>>16&255]^r[n>>>8&255]^t[o&255]^l[F++],i=O,n=C,o=N,p=L;return O=(s[i>>>24]<<24|s[n>>>16&255]<<16|s[o>>>8&255]<<8|s[p&255])^l[F++],C=(s[n>>>24]<<24|s[o>>>16&255]<<16|s[p>>>8&255]<<8|s[i&255])^l[F++],N=(s[o>>>24]<<24|s[p>>>16&255]<<16|s[i>>>8&255]<<8|s[n&255])^l[F++],L=(s[p>>>24]<<24|s[i>>>16&255]<<16|s[n>>>8&255]<<8|s[o&255])^l[F++],O=O>>>0,C=C>>>0,N=N>>>0,L=L>>>0,[O,C,N,L]}var w=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var h=new Array(256),l=0;l<256;l++)l<128?h[l]=l<<1:h[l]=l<<1^283;for(var d=[],s=[],v=[[],[],[],[]],c=[[],[],[],[]],a=0,r=0,t=0;t<256;++t){var i=r^r<<1^r<<2^r<<3^r<<4;i=i>>>8^i&255^99,d[a]=i,s[i]=a;var n=h[a],o=h[n],p=h[o],O=h[i]*257^i*16843008;v[0][a]=O<<24|O>>>8,v[1][a]=O<<16|O>>>16,v[2][a]=O<<8|O>>>24,v[3][a]=O,O=p*16843009^o*65537^n*257^a*16843008,c[0][i]=O<<24|O>>>8,c[1][i]=O<<16|O>>>16,c[2][i]=O<<8|O>>>24,c[3][i]=O,a===0?a=r=1:(a=n^h[h[h[p^n]]],r^=h[h[r]])}return{SBOX:d,INV_SBOX:s,SUB_MIX:v,INV_SUB_MIX:c}}();function y(h){this._key=m(h),this._reset()}y.blockSize=4*4,y.keySize=256/8,y.prototype.blockSize=y.blockSize,y.prototype.keySize=y.keySize,y.prototype._reset=function(){for(var h=this._key,l=h.length,d=l+6,s=(d+1)*4,v=[],c=0;c>>24,a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[a&255],a^=w[c/l|0]<<24):l>6&&c%l===4&&(a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[a&255]),v[c]=v[c-l]^a}for(var r=[],t=0;t>>24]]^f.INV_SUB_MIX[1][f.SBOX[n>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[n>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[n&255]]}this._nRounds=d,this._keySchedule=v,this._invKeySchedule=r},y.prototype.encryptBlockRaw=function(h){return h=m(h),b(h,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},y.prototype.encryptBlock=function(h){var l=this.encryptBlockRaw(h),d=u.allocUnsafe(16);return d.writeUInt32BE(l[0],0),d.writeUInt32BE(l[1],4),d.writeUInt32BE(l[2],8),d.writeUInt32BE(l[3],12),d},y.prototype.decryptBlock=function(h){h=m(h);var l=h[1];h[1]=h[3],h[3]=l;var d=b(h,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),s=u.allocUnsafe(16);return s.writeUInt32BE(d[0],0),s.writeUInt32BE(d[3],4),s.writeUInt32BE(d[2],8),s.writeUInt32BE(d[1],12),s},y.prototype.scrub=function(){g(this._keySchedule),g(this._invKeySchedule),g(this._key)},x.exports.AES=y},{"safe-buffer":494}],187:[function(e,x,_){var u=e("./aes"),m=e("safe-buffer").Buffer,g=e("cipher-base"),b=e("inherits"),w=e("./ghash"),f=e("buffer-xor"),y=e("./incr32");function h(s,v){var c=0;s.length!==v.length&&c++;for(var a=Math.min(s.length,v.length),r=0;r16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r}else if(this.cache.length>=16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache};function s(a){var r=a[15];if(r<1||r>16)throw new Error("unable to decrypt data");for(var t=-1;++t15){var a=this.cache.slice(0,16);return this.cache=this.cache.slice(16),a}return null},s.prototype.flush=function(){for(var a=16-this.cache.length,r=g.allocUnsafe(a),t=-1;++t>>0,0),y.writeUInt32BE(f[1]>>>0,4),y.writeUInt32BE(f[2]>>>0,8),y.writeUInt32BE(f[3]>>>0,12),y}function w(f){this.h=f,this.state=u.alloc(16,0),this.cache=u.allocUnsafe(0)}w.prototype.ghash=function(f){for(var y=-1;++y0;h--)f[h]=f[h]>>>1|(f[h-1]&1)<<31;f[0]=f[0]>>>1,d&&(f[0]=f[0]^225<<24)}this.state=b(y)},w.prototype.update=function(f){this.cache=u.concat([this.cache,f]);for(var y;this.cache.length>=16;)y=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(y)},w.prototype.final=function(f,y){return this.cache.length&&this.ghash(u.concat([this.cache,m],16)),this.ghash(b([0,f,0,y])),this.state},x.exports=w},{"safe-buffer":494}],192:[function(e,x,_){function u(m){for(var g=m.length,b;g--;)if(b=m.readUInt8(g),b===255)m.writeUInt8(0,g);else{b++,m.writeUInt8(b,g);break}}x.exports=u},{}],193:[function(e,x,_){var u=e("buffer-xor");_.encrypt=function(m,g){var b=u(g,m._prev);return m._prev=m._cipher.encryptBlock(b),m._prev},_.decrypt=function(m,g){var b=m._prev;m._prev=g;var w=m._cipher.decryptBlock(g);return u(w,b)}},{"buffer-xor":217}],194:[function(e,x,_){var u=e("safe-buffer").Buffer,m=e("buffer-xor");function g(b,w,f){var y=w.length,h=m(w,b._cache);return b._cache=b._cache.slice(y),b._prev=u.concat([b._prev,f?w:h]),h}_.encrypt=function(b,w,f){for(var y=u.allocUnsafe(0),h;w.length;)if(b._cache.length===0&&(b._cache=b._cipher.encryptBlock(b._prev),b._prev=u.allocUnsafe(0)),b._cache.length<=w.length)h=b._cache.length,y=u.concat([y,g(b,w.slice(0,h),f)]),w=w.slice(h);else{y=u.concat([y,g(b,w,f)]);break}return y}},{"buffer-xor":217,"safe-buffer":494}],195:[function(e,x,_){var u=e("safe-buffer").Buffer;function m(b,w,f){for(var y,h=-1,l=8,d=0,s,v;++h>h%8,b._prev=g(b._prev,f?s:v);return d}function g(b,w){var f=b.length,y=-1,h=u.allocUnsafe(b.length);for(b=u.concat([b,u.from([w])]);++y>7;return h}_.encrypt=function(b,w,f){for(var y=w.length,h=u.allocUnsafe(y),l=-1;++l=0||!l.umod(y.prime1)||!l.umod(y.prime2);)l=new m(g(h));return l}}).call(this,e("buffer").Buffer)},{"bn.js":207,buffer:216,randombytes:475}],207:[function(e,x,_){arguments[4][181][0].apply(_,arguments)},{buffer:185,dup:181}],208:[function(e,x,_){x.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":209}],209:[function(e,x,_){x.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,x,_){x.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,x,_){var u=e("safe-buffer").Buffer,m=e("create-hash"),g=e("readable-stream"),b=e("inherits"),w=e("./sign"),f=e("./verify"),y=e("./algorithms.json");Object.keys(y).forEach(function(v){y[v].id=u.from(y[v].id,"hex"),y[v.toLowerCase()]=y[v]});function h(v){g.Writable.call(this);var c=y[v];if(!c)throw new Error("Unknown message digest");this._hashType=c.hash,this._hash=m(c.hash),this._tag=c.id,this._signType=c.sign}b(h,g.Writable),h.prototype._write=function(c,a,r){this._hash.update(c),r()},h.prototype.update=function(c,a){return typeof c=="string"&&(c=u.from(c,a)),this._hash.update(c),this},h.prototype.sign=function(c,a){this.end();var r=this._hash.digest(),t=w(r,c,this._hashType,this._signType,this._tag);return a?t.toString(a):t};function l(v){g.Writable.call(this);var c=y[v];if(!c)throw new Error("Unknown message digest");this._hash=m(c.hash),this._tag=c.id,this._signType=c.sign}b(l,g.Writable),l.prototype._write=function(c,a,r){this._hash.update(c),r()},l.prototype.update=function(c,a){return typeof c=="string"&&(c=u.from(c,a)),this._hash.update(c),this},l.prototype.verify=function(c,a,r){typeof a=="string"&&(a=u.from(a,r)),this.end();var t=this._hash.digest();return f(a,t,c,this._signType,this._tag)};function d(v){return new h(v)}function s(v){return new l(v)}x.exports={Sign:d,Verify:s,createSign:d,createVerify:s}},{"./algorithms.json":209,"./sign":212,"./verify":213,"create-hash":331,inherits:387,"readable-stream":491,"safe-buffer":214}],212:[function(e,x,_){var u=e("safe-buffer").Buffer,m=e("create-hmac"),g=e("browserify-rsa"),b=e("elliptic").ec,w=e("bn.js"),f=e("parse-asn1"),y=e("./curves.json");function h(i,n,o,p,O){var C=f(n);if(C.curve){if(p!=="ecdsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");return l(i,C)}else if(C.type==="dsa"){if(p!=="dsa")throw new Error("wrong private key type");return d(i,C,o)}else if(p!=="rsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");i=u.concat([O,i]);for(var N=C.modulus.byteLength(),L=[0,1];i.length+L.length+10&&o.ishrn(p),o}function a(i,n){i=c(i,n),i=i.mod(n);var o=u.from(i.toArray());if(o.length=s)throw new Error("invalid sig")}x.exports=f},{"./curves.json":210,"bn.js":183,elliptic:350,"parse-asn1":459,"safe-buffer":214}],214:[function(e,x,_){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var u=e("buffer"),m=u.Buffer;function g(w,f){for(var y in w)f[y]=w[y]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?x.exports=u:(g(u,_),_.Buffer=b);function b(w,f,y){return m(w,f,y)}b.prototype=Object.create(m.prototype),g(m,b),b.from=function(w,f,y){if(typeof w=="number")throw new TypeError("Argument must not be a number");return m(w,f,y)},b.alloc=function(w,f,y){if(typeof w!="number")throw new TypeError("Argument must be a number");var h=m(w);return f!==void 0?typeof y=="string"?h.fill(f,y):h.fill(f):h.fill(0),h},b.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return m(w)},b.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(w)}},{buffer:216}],215:[function(e,x,_){arguments[4][185][0].apply(_,arguments)},{dup:185}],216:[function(e,x,_){(function(h){function m(q){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(Z){return typeof Z}:m=function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},m(q)}var g=e("base64-js"),b=e("ieee754");_.Buffer=h,_.SlowBuffer=n,_.INSPECT_MAX_BYTES=50;var w=2147483647;_.kMaxLength=w,h.TYPED_ARRAY_SUPPORT=f(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function f(){try{var q=new Uint8Array(1);return q.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},q.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function y(q){if(q>w)throw new RangeError('The value "'+q+'" is invalid for option "size"');var G=new Uint8Array(q);return G.__proto__=h.prototype,G}function h(q,G,Z){if(typeof q=="number"){if(typeof G=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(q)}return l(q,G,Z)}typeof Symbol<"u"&&Symbol.species!=null&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),h.poolSize=8192;function l(q,G,Z){if(typeof q=="string")return c(q,G);if(ArrayBuffer.isView(q))return a(q);if(q==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+m(q));if(se(q,ArrayBuffer)||q&&se(q.buffer,ArrayBuffer))return r(q,G,Z);if(typeof q=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var fe=q.valueOf&&q.valueOf();if(fe!=null&&fe!==q)return h.from(fe,G,Z);var we=t(q);if(we)return we;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof q[Symbol.toPrimitive]=="function")return h.from(q[Symbol.toPrimitive]("string"),G,Z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+m(q))}h.from=function(q,G,Z){return l(q,G,Z)},h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array;function d(q){if(typeof q!="number")throw new TypeError('"size" argument must be of type number');if(q<0)throw new RangeError('The value "'+q+'" is invalid for option "size"')}function s(q,G,Z){return d(q),q<=0?y(q):G!==void 0?typeof Z=="string"?y(q).fill(G,Z):y(q).fill(G):y(q)}h.alloc=function(q,G,Z){return s(q,G,Z)};function v(q){return d(q),y(q<0?0:i(q)|0)}h.allocUnsafe=function(q){return v(q)},h.allocUnsafeSlow=function(q){return v(q)};function c(q,G){if((typeof G!="string"||G==="")&&(G="utf8"),!h.isEncoding(G))throw new TypeError("Unknown encoding: "+G);var Z=o(q,G)|0,fe=y(Z),we=fe.write(q,G);return we!==Z&&(fe=fe.slice(0,we)),fe}function a(q){for(var G=q.length<0?0:i(q.length)|0,Z=y(G),fe=0;fe=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return q|0}function n(q){return+q!=q&&(q=0),h.alloc(+q)}h.isBuffer=function(G){return G!=null&&G._isBuffer===!0&&G!==h.prototype},h.compare=function(G,Z){if(se(G,Uint8Array)&&(G=h.from(G,G.offset,G.byteLength)),se(Z,Uint8Array)&&(Z=h.from(Z,Z.offset,Z.byteLength)),!h.isBuffer(G)||!h.isBuffer(Z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(G===Z)return 0;for(var fe=G.length,we=Z.length,ge=0,je=Math.min(fe,we);ge2&&arguments[2]===!0;if(!fe&&Z===0)return 0;for(var we=!1;;)switch(G){case"ascii":case"latin1":case"binary":return Z;case"utf8":case"utf-8":return J(q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z*2;case"hex":return Z>>>1;case"base64":return ke(q).length;default:if(we)return fe?-1:J(q).length;G=(""+G).toLowerCase(),we=!0}}h.byteLength=o;function p(q,G,Z){var fe=!1;if((G===void 0||G<0)&&(G=0),G>this.length||((Z===void 0||Z>this.length)&&(Z=this.length),Z<=0)||(Z>>>=0,G>>>=0,Z<=G))return"";for(q||(q="utf8");;)switch(q){case"hex":return I(this,G,Z);case"utf8":case"utf-8":return A(this,G,Z);case"ascii":return $(this,G,Z);case"latin1":case"binary":return U(this,G,Z);case"base64":return E(this,G,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,G,Z);default:if(fe)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),fe=!0}}h.prototype._isBuffer=!0;function O(q,G,Z){var fe=q[G];q[G]=q[Z],q[Z]=fe}h.prototype.swap16=function(){var G=this.length;if(G%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Z=0;ZZ&&(G+=" ... "),""},h.prototype.compare=function(G,Z,fe,we,ge){if(se(G,Uint8Array)&&(G=h.from(G,G.offset,G.byteLength)),!h.isBuffer(G))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+m(G));if(Z===void 0&&(Z=0),fe===void 0&&(fe=G?G.length:0),we===void 0&&(we=0),ge===void 0&&(ge=this.length),Z<0||fe>G.length||we<0||ge>this.length)throw new RangeError("out of range index");if(we>=ge&&Z>=fe)return 0;if(we>=ge)return-1;if(Z>=fe)return 1;if(Z>>>=0,fe>>>=0,we>>>=0,ge>>>=0,this===G)return 0;for(var je=ge-we,Ze=fe-Z,nt=Math.min(je,Ze),ut=this.slice(we,ge),ot=G.slice(Z,fe),Ue=0;Ue2147483647?Z=2147483647:Z<-2147483648&&(Z=-2147483648),Z=+Z,Ce(Z)&&(Z=we?0:q.length-1),Z<0&&(Z=q.length+Z),Z>=q.length){if(we)return-1;Z=q.length-1}else if(Z<0)if(we)Z=0;else return-1;if(typeof G=="string"&&(G=h.from(G,fe)),h.isBuffer(G))return G.length===0?-1:N(q,G,Z,fe,we);if(typeof G=="number")return G=G&255,typeof Uint8Array.prototype.indexOf=="function"?we?Uint8Array.prototype.indexOf.call(q,G,Z):Uint8Array.prototype.lastIndexOf.call(q,G,Z):N(q,[G],Z,fe,we);throw new TypeError("val must be string, number or Buffer")}function N(q,G,Z,fe,we){var ge=1,je=q.length,Ze=G.length;if(fe!==void 0&&(fe=String(fe).toLowerCase(),fe==="ucs2"||fe==="ucs-2"||fe==="utf16le"||fe==="utf-16le")){if(q.length<2||G.length<2)return-1;ge=2,je/=2,Ze/=2,Z/=2}function nt(Qe,tt){return ge===1?Qe[tt]:Qe.readUInt16BE(tt*ge)}var ut;if(we){var ot=-1;for(ut=Z;utje&&(Z=je-Ze),ut=Z;ut>=0;ut--){for(var Ue=!0,Ve=0;Vewe&&(fe=we)):fe=we;var ge=G.length;fe>ge/2&&(fe=ge/2);for(var je=0;je>>0,isFinite(fe)?(fe=fe>>>0,we===void 0&&(we="utf8")):(we=fe,fe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ge=this.length-Z;if((fe===void 0||fe>ge)&&(fe=ge),G.length>0&&(fe<0||Z<0)||Z>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");for(var je=!1;;)switch(we){case"hex":return L(this,G,Z,fe);case"utf8":case"utf-8":return F(this,G,Z,fe);case"ascii":return M(this,G,Z,fe);case"latin1":case"binary":return D(this,G,Z,fe);case"base64":return R(this,G,Z,fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,G,Z,fe);default:if(je)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),je=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(q,G,Z){return G===0&&Z===q.length?g.fromByteArray(q):g.fromByteArray(q.slice(G,Z))}function A(q,G,Z){Z=Math.min(q.length,Z);for(var fe=[],we=G;we239?4:ge>223?3:ge>191?2:1;if(we+Ze<=Z){var nt,ut,ot,Ue;switch(Ze){case 1:ge<128&&(je=ge);break;case 2:nt=q[we+1],(nt&192)===128&&(Ue=(ge&31)<<6|nt&63,Ue>127&&(je=Ue));break;case 3:nt=q[we+1],ut=q[we+2],(nt&192)===128&&(ut&192)===128&&(Ue=(ge&15)<<12|(nt&63)<<6|ut&63,Ue>2047&&(Ue<55296||Ue>57343)&&(je=Ue));break;case 4:nt=q[we+1],ut=q[we+2],ot=q[we+3],(nt&192)===128&&(ut&192)===128&&(ot&192)===128&&(Ue=(ge&15)<<18|(nt&63)<<12|(ut&63)<<6|ot&63,Ue>65535&&Ue<1114112&&(je=Ue))}}je===null?(je=65533,Ze=1):je>65535&&(je-=65536,fe.push(je>>>10&1023|55296),je=56320|je&1023),fe.push(je),we+=Ze}return W(fe)}var z=4096;function W(q){var G=q.length;if(G<=z)return String.fromCharCode.apply(String,q);for(var Z="",fe=0;fefe)&&(Z=fe);for(var we="",ge=G;gefe&&(G=fe),Z<0?(Z+=fe,Z<0&&(Z=0)):Z>fe&&(Z=fe),ZZ)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUIntLE=function(G,Z,fe){G=G>>>0,Z=Z>>>0,fe||B(G,Z,this.length);for(var we=this[G],ge=1,je=0;++je>>0,Z=Z>>>0,fe||B(G,Z,this.length);for(var we=this[G+--Z],ge=1;Z>0&&(ge*=256);)we+=this[G+--Z]*ge;return we},h.prototype.readUInt8=function(G,Z){return G=G>>>0,Z||B(G,1,this.length),this[G]},h.prototype.readUInt16LE=function(G,Z){return G=G>>>0,Z||B(G,2,this.length),this[G]|this[G+1]<<8},h.prototype.readUInt16BE=function(G,Z){return G=G>>>0,Z||B(G,2,this.length),this[G]<<8|this[G+1]},h.prototype.readUInt32LE=function(G,Z){return G=G>>>0,Z||B(G,4,this.length),(this[G]|this[G+1]<<8|this[G+2]<<16)+this[G+3]*16777216},h.prototype.readUInt32BE=function(G,Z){return G=G>>>0,Z||B(G,4,this.length),this[G]*16777216+(this[G+1]<<16|this[G+2]<<8|this[G+3])},h.prototype.readIntLE=function(G,Z,fe){G=G>>>0,Z=Z>>>0,fe||B(G,Z,this.length);for(var we=this[G],ge=1,je=0;++je=ge&&(we-=Math.pow(2,8*Z)),we},h.prototype.readIntBE=function(G,Z,fe){G=G>>>0,Z=Z>>>0,fe||B(G,Z,this.length);for(var we=Z,ge=1,je=this[G+--we];we>0&&(ge*=256);)je+=this[G+--we]*ge;return ge*=128,je>=ge&&(je-=Math.pow(2,8*Z)),je},h.prototype.readInt8=function(G,Z){return G=G>>>0,Z||B(G,1,this.length),this[G]&128?(255-this[G]+1)*-1:this[G]},h.prototype.readInt16LE=function(G,Z){G=G>>>0,Z||B(G,2,this.length);var fe=this[G]|this[G+1]<<8;return fe&32768?fe|4294901760:fe},h.prototype.readInt16BE=function(G,Z){G=G>>>0,Z||B(G,2,this.length);var fe=this[G+1]|this[G]<<8;return fe&32768?fe|4294901760:fe},h.prototype.readInt32LE=function(G,Z){return G=G>>>0,Z||B(G,4,this.length),this[G]|this[G+1]<<8|this[G+2]<<16|this[G+3]<<24},h.prototype.readInt32BE=function(G,Z){return G=G>>>0,Z||B(G,4,this.length),this[G]<<24|this[G+1]<<16|this[G+2]<<8|this[G+3]},h.prototype.readFloatLE=function(G,Z){return G=G>>>0,Z||B(G,4,this.length),b.read(this,G,!0,23,4)},h.prototype.readFloatBE=function(G,Z){return G=G>>>0,Z||B(G,4,this.length),b.read(this,G,!1,23,4)},h.prototype.readDoubleLE=function(G,Z){return G=G>>>0,Z||B(G,8,this.length),b.read(this,G,!0,52,8)},h.prototype.readDoubleBE=function(G,Z){return G=G>>>0,Z||B(G,8,this.length),b.read(this,G,!1,52,8)};function V(q,G,Z,fe,we,ge){if(!h.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(G>we||Gq.length)throw new RangeError("Index out of range")}h.prototype.writeUIntLE=function(G,Z,fe,we){if(G=+G,Z=Z>>>0,fe=fe>>>0,!we){var ge=Math.pow(2,8*fe)-1;V(this,G,Z,fe,ge,0)}var je=1,Ze=0;for(this[Z]=G&255;++Ze>>0,fe=fe>>>0,!we){var ge=Math.pow(2,8*fe)-1;V(this,G,Z,fe,ge,0)}var je=fe-1,Ze=1;for(this[Z+je]=G&255;--je>=0&&(Ze*=256);)this[Z+je]=G/Ze&255;return Z+fe},h.prototype.writeUInt8=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,1,255,0),this[Z]=G&255,Z+1},h.prototype.writeUInt16LE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,2,65535,0),this[Z]=G&255,this[Z+1]=G>>>8,Z+2},h.prototype.writeUInt16BE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,2,65535,0),this[Z]=G>>>8,this[Z+1]=G&255,Z+2},h.prototype.writeUInt32LE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,4,4294967295,0),this[Z+3]=G>>>24,this[Z+2]=G>>>16,this[Z+1]=G>>>8,this[Z]=G&255,Z+4},h.prototype.writeUInt32BE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,4,4294967295,0),this[Z]=G>>>24,this[Z+1]=G>>>16,this[Z+2]=G>>>8,this[Z+3]=G&255,Z+4},h.prototype.writeIntLE=function(G,Z,fe,we){if(G=+G,Z=Z>>>0,!we){var ge=Math.pow(2,8*fe-1);V(this,G,Z,fe,ge-1,-ge)}var je=0,Ze=1,nt=0;for(this[Z]=G&255;++je>0)-nt&255;return Z+fe},h.prototype.writeIntBE=function(G,Z,fe,we){if(G=+G,Z=Z>>>0,!we){var ge=Math.pow(2,8*fe-1);V(this,G,Z,fe,ge-1,-ge)}var je=fe-1,Ze=1,nt=0;for(this[Z+je]=G&255;--je>=0&&(Ze*=256);)G<0&&nt===0&&this[Z+je+1]!==0&&(nt=1),this[Z+je]=(G/Ze>>0)-nt&255;return Z+fe},h.prototype.writeInt8=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,1,127,-128),G<0&&(G=255+G+1),this[Z]=G&255,Z+1},h.prototype.writeInt16LE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,2,32767,-32768),this[Z]=G&255,this[Z+1]=G>>>8,Z+2},h.prototype.writeInt16BE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,2,32767,-32768),this[Z]=G>>>8,this[Z+1]=G&255,Z+2},h.prototype.writeInt32LE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,4,2147483647,-2147483648),this[Z]=G&255,this[Z+1]=G>>>8,this[Z+2]=G>>>16,this[Z+3]=G>>>24,Z+4},h.prototype.writeInt32BE=function(G,Z,fe){return G=+G,Z=Z>>>0,fe||V(this,G,Z,4,2147483647,-2147483648),G<0&&(G=4294967295+G+1),this[Z]=G>>>24,this[Z+1]=G>>>16,this[Z+2]=G>>>8,this[Z+3]=G&255,Z+4};function te(q,G,Z,fe,we,ge){if(Z+fe>q.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("Index out of range")}function ie(q,G,Z,fe,we){return G=+G,Z=Z>>>0,we||te(q,G,Z,4),b.write(q,G,Z,fe,23,4),Z+4}h.prototype.writeFloatLE=function(G,Z,fe){return ie(this,G,Z,!0,fe)},h.prototype.writeFloatBE=function(G,Z,fe){return ie(this,G,Z,!1,fe)};function ce(q,G,Z,fe,we){return G=+G,Z=Z>>>0,we||te(q,G,Z,8),b.write(q,G,Z,fe,52,8),Z+8}h.prototype.writeDoubleLE=function(G,Z,fe){return ce(this,G,Z,!0,fe)},h.prototype.writeDoubleBE=function(G,Z,fe){return ce(this,G,Z,!1,fe)},h.prototype.copy=function(G,Z,fe,we){if(!h.isBuffer(G))throw new TypeError("argument should be a Buffer");if(fe||(fe=0),!we&&we!==0&&(we=this.length),Z>=G.length&&(Z=G.length),Z||(Z=0),we>0&&we=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),G.length-Z=0;--je)G[je+Z]=this[je+fe];else Uint8Array.prototype.set.call(G,this.subarray(fe,we),Z);return ge},h.prototype.fill=function(G,Z,fe,we){if(typeof G=="string"){if(typeof Z=="string"?(we=Z,Z=0,fe=this.length):typeof fe=="string"&&(we=fe,fe=this.length),we!==void 0&&typeof we!="string")throw new TypeError("encoding must be a string");if(typeof we=="string"&&!h.isEncoding(we))throw new TypeError("Unknown encoding: "+we);if(G.length===1){var ge=G.charCodeAt(0);(we==="utf8"&&ge<128||we==="latin1")&&(G=ge)}}else typeof G=="number"&&(G=G&255);if(Z<0||this.length>>0,fe=fe===void 0?this.length:fe>>>0,G||(G=0);var je;if(typeof G=="number")for(je=Z;je55295&&Z<57344){if(!we){if(Z>56319){(G-=3)>-1&&ge.push(239,191,189);continue}else if(je+1===fe){(G-=3)>-1&&ge.push(239,191,189);continue}we=Z;continue}if(Z<56320){(G-=3)>-1&&ge.push(239,191,189),we=Z;continue}Z=(we-55296<<10|Z-56320)+65536}else we&&(G-=3)>-1&&ge.push(239,191,189);if(we=null,Z<128){if((G-=1)<0)break;ge.push(Z)}else if(Z<2048){if((G-=2)<0)break;ge.push(Z>>6|192,Z&63|128)}else if(Z<65536){if((G-=3)<0)break;ge.push(Z>>12|224,Z>>6&63|128,Z&63|128)}else if(Z<1114112){if((G-=4)<0)break;ge.push(Z>>18|240,Z>>12&63|128,Z>>6&63|128,Z&63|128)}else throw new Error("Invalid code point")}return ge}function Q(q){for(var G=[],Z=0;Z>8,we=Z%256,ge.push(we),ge.push(fe);return ge}function ke(q){return g.toByteArray(_e(q))}function re(q,G,Z,fe){for(var we=0;we=G.length||we>=q.length);++we)G[we+Z]=q[we];return we}function se(q,G){return q instanceof G||q!=null&&q.constructor!=null&&q.constructor.name!=null&&q.constructor.name===G.name}function Ce(q){return q!==q}}).call(this,e("buffer").Buffer)},{"base64-js":182,buffer:216,ieee754:385}],217:[function(e,x,_){(function(u){x.exports=function(g,b){for(var w=Math.min(g.length,b.length),f=new u(w),y=0;ys;)if(v=l[s++],v!=v)return!0}else for(;d>s;s++)if((w||s in l)&&l[s]===y)return w||s||0;return!w&&-1}};x.exports={includes:b(!0),indexOf:b(!1)}},{"../internals/to-absolute-index":304,"../internals/to-indexed-object":305,"../internals/to-length":307}],225:[function(e,x,_){var u=e("../internals/function-bind-context"),m=e("../internals/indexed-object"),g=e("../internals/to-object"),b=e("../internals/to-length"),w=e("../internals/array-species-create"),f=[].push,y=function(h){var l=h==1,d=h==2,s=h==3,v=h==4,c=h==6,a=h==5||c;return function(r,t,i,n){for(var o=g(r),p=m(o),O=u(t,i,3),C=b(p.length),N=0,L=n||w,F=l?L(r,C):d?L(r,0):void 0,M,D;C>N;N++)if((a||N in p)&&(M=p[N],D=O(M,N,o),h)){if(l)F[N]=D;else if(D)switch(h){case 3:return!0;case 5:return M;case 6:return N;case 2:f.call(F,M)}else if(v)return!1}return c?-1:s||v?v:F}};x.exports={forEach:y(0),map:y(1),filter:y(2),some:y(3),every:y(4),find:y(5),findIndex:y(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,x,_){var u=e("../internals/descriptors"),m=e("../internals/fails"),g=e("../internals/has"),b=Object.defineProperty,w={},f=function(y){throw y};x.exports=function(y,h){if(g(w,y))return w[y];h||(h={});var l=[][y],d=g(h,"ACCESSORS")?h.ACCESSORS:!1,s=g(h,0)?h[0]:f,v=g(h,1)?h[1]:void 0;return w[y]=!!l&&!m(function(){if(d&&!u)return!0;var c={length:-1};d?b(c,1,{enumerable:!0,get:f}):c[1]=1,l.call(c,s,v)})}},{"../internals/descriptors":240,"../internals/fails":247,"../internals/has":252}],227:[function(e,x,_){var u=e("../internals/is-object"),m=e("../internals/is-array"),g=e("../internals/well-known-symbol"),b=g("species");x.exports=function(w,f){var y;return m(w)&&(y=w.constructor,typeof y=="function"&&(y===Array||m(y.prototype))?y=void 0:u(y)&&(y=y[b],y===null&&(y=void 0))),new(y===void 0?Array:y)(f===0?0:f)}},{"../internals/is-array":261,"../internals/is-object":263,"../internals/well-known-symbol":314}],228:[function(e,x,_){var u=e("../internals/an-object");x.exports=function(m,g,b,w){try{return w?g(u(b)[0],b[1]):g(b)}catch(y){var f=m.return;throw f!==void 0&&u(f.call(m)),y}}},{"../internals/an-object":223}],229:[function(e,x,_){var u=e("../internals/well-known-symbol"),m=u("iterator"),g=!1;try{var b=0,w={next:function(){return{done:!!b++}},return:function(){g=!0}};w[m]=function(){return this},Array.from(w,function(){throw 2})}catch{}x.exports=function(f,y){if(!y&&!g)return!1;var h=!1;try{var l={};l[m]=function(){return{next:function(){return{done:h=!0}}}},f(l)}catch{}return h}},{"../internals/well-known-symbol":314}],230:[function(e,x,_){var u={}.toString;x.exports=function(m){return u.call(m).slice(8,-1)}},{}],231:[function(e,x,_){var u=e("../internals/to-string-tag-support"),m=e("../internals/classof-raw"),g=e("../internals/well-known-symbol"),b=g("toStringTag"),w=m(function(){return arguments}())=="Arguments",f=function(y,h){try{return y[h]}catch{}};x.exports=u?m:function(y){var h,l,d;return y===void 0?"Undefined":y===null?"Null":typeof(l=f(h=Object(y),b))=="string"?l:w?m(h):(d=m(h))=="Object"&&typeof h.callee=="function"?"Arguments":d}},{"../internals/classof-raw":230,"../internals/to-string-tag-support":310,"../internals/well-known-symbol":314}],232:[function(e,x,_){var u=e("../internals/has"),m=e("../internals/own-keys"),g=e("../internals/object-get-own-property-descriptor"),b=e("../internals/object-define-property");x.exports=function(w,f){for(var y=m(f),h=b.f,l=g.f,d=0;d=74)&&(f=m.match(/Chrome\/(\d+)/),f&&(y=f[1]))),x.exports=y&&+y},{"../internals/engine-user-agent":243,"../internals/global":251}],245:[function(e,x,_){x.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],246:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/object-get-own-property-descriptor").f,g=e("../internals/create-non-enumerable-property"),b=e("../internals/redefine"),w=e("../internals/set-global"),f=e("../internals/copy-constructor-properties"),y=e("../internals/is-forced");x.exports=function(h,l){var d=h.target,s=h.global,v=h.stat,c,a,r,t,i,n;if(s?a=u:v?a=u[d]||w(d,{}):a=(u[d]||{}).prototype,a)for(r in l){if(i=l[r],h.noTargetGet?(n=m(a,r),t=n&&n.value):t=a[r],c=y(s?r:d+(v?".":"#")+r,h.forced),!c&&t!==void 0){if(typeof i==typeof t)continue;f(i,t)}(h.sham||t&&t.sham)&&g(i,"sham",!0),b(a,r,i,h)}}},{"../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,x,_){x.exports=function(u){try{return!!u()}catch{return!0}}},{}],248:[function(e,x,_){var u=e("../internals/a-function");x.exports=function(m,g,b){if(u(m),g===void 0)return m;switch(b){case 0:return function(){return m.call(g)};case 1:return function(w){return m.call(g,w)};case 2:return function(w,f){return m.call(g,w,f)};case 3:return function(w,f,y){return m.call(g,w,f,y)}}return function(){return m.apply(g,arguments)}}},{"../internals/a-function":219}],249:[function(e,x,_){var u=e("../internals/path"),m=e("../internals/global"),g=function(b){return typeof b=="function"?b:void 0};x.exports=function(b,w){return arguments.length<2?g(u[b])||g(m[b]):u[b]&&u[b][w]||m[b]&&m[b][w]}},{"../internals/global":251,"../internals/path":290}],250:[function(e,x,_){var u=e("../internals/classof"),m=e("../internals/iterators"),g=e("../internals/well-known-symbol"),b=g("iterator");x.exports=function(w){if(w!=null)return w[b]||w["@@iterator"]||m[u(w)]}},{"../internals/classof":231,"../internals/iterators":268,"../internals/well-known-symbol":314}],251:[function(e,x,_){(function(u){var m=function(g){return g&&g.Math==Math&&g};x.exports=m(typeof globalThis=="object"&&globalThis)||m(typeof window=="object"&&window)||m(typeof self=="object"&&self)||m(typeof u=="object"&&u)||Function("return this")()}).call(this,typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],252:[function(e,x,_){var u={}.hasOwnProperty;x.exports=function(m,g){return u.call(m,g)}},{}],253:[function(e,x,_){x.exports={}},{}],254:[function(e,x,_){var u=e("../internals/global");x.exports=function(m,g){var b=u.console;b&&b.error&&(arguments.length===1?b.error(m):b.error(m,g))}},{"../internals/global":251}],255:[function(e,x,_){var u=e("../internals/get-built-in");x.exports=u("document","documentElement")},{"../internals/get-built-in":249}],256:[function(e,x,_){var u=e("../internals/descriptors"),m=e("../internals/fails"),g=e("../internals/document-create-element");x.exports=!u&&!m(function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":240,"../internals/document-create-element":241,"../internals/fails":247}],257:[function(e,x,_){var u=e("../internals/fails"),m=e("../internals/classof-raw"),g="".split;x.exports=u(function(){return!Object("z").propertyIsEnumerable(0)})?function(b){return m(b)=="String"?g.call(b,""):Object(b)}:Object},{"../internals/classof-raw":230,"../internals/fails":247}],258:[function(e,x,_){var u=e("../internals/shared-store"),m=Function.toString;typeof u.inspectSource!="function"&&(u.inspectSource=function(g){return m.call(g)}),x.exports=u.inspectSource},{"../internals/shared-store":300}],259:[function(e,x,_){var u=e("../internals/native-weak-map"),m=e("../internals/global"),g=e("../internals/is-object"),b=e("../internals/create-non-enumerable-property"),w=e("../internals/has"),f=e("../internals/shared-key"),y=e("../internals/hidden-keys"),h=m.WeakMap,l,d,s,v=function(o){return s(o)?d(o):l(o,{})},c=function(o){return function(p){var O;if(!g(p)||(O=d(p)).type!==o)throw TypeError("Incompatible receiver, "+o+" required");return O}};if(u){var a=new h,r=a.get,t=a.has,i=a.set;l=function(o,p){return i.call(a,o,p),p},d=function(o){return r.call(a,o)||{}},s=function(o){return t.call(a,o)}}else{var n=f("state");y[n]=!0,l=function(o,p){return b(o,n,p),p},d=function(o){return w(o,n)?o[n]:{}},s=function(o){return w(o,n)}}x.exports={set:l,get:d,has:s,enforce:v,getterFor:c}},{"../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,x,_){var u=e("../internals/well-known-symbol"),m=e("../internals/iterators"),g=u("iterator"),b=Array.prototype;x.exports=function(w){return w!==void 0&&(m.Array===w||b[g]===w)}},{"../internals/iterators":268,"../internals/well-known-symbol":314}],261:[function(e,x,_){var u=e("../internals/classof-raw");x.exports=Array.isArray||function(g){return u(g)=="Array"}},{"../internals/classof-raw":230}],262:[function(e,x,_){var u=e("../internals/fails"),m=/#|\.prototype\./,g=function(h,l){var d=w[b(h)];return d==y?!0:d==f?!1:typeof l=="function"?u(l):!!l},b=g.normalize=function(h){return String(h).replace(m,".").toLowerCase()},w=g.data={},f=g.NATIVE="N",y=g.POLYFILL="P";x.exports=g},{"../internals/fails":247}],263:[function(e,x,_){x.exports=function(u){return typeof u=="object"?u!==null:typeof u=="function"}},{}],264:[function(e,x,_){x.exports=!1},{}],265:[function(e,x,_){var u=e("../internals/is-object"),m=e("../internals/classof-raw"),g=e("../internals/well-known-symbol"),b=g("match");x.exports=function(w){var f;return u(w)&&((f=w[b])!==void 0?!!f:m(w)=="RegExp")}},{"../internals/classof-raw":230,"../internals/is-object":263,"../internals/well-known-symbol":314}],266:[function(e,x,_){var u=e("../internals/an-object"),m=e("../internals/is-array-iterator-method"),g=e("../internals/to-length"),b=e("../internals/function-bind-context"),w=e("../internals/get-iterator-method"),f=e("../internals/call-with-safe-iteration-closing"),y=function(l,d){this.stopped=l,this.result=d},h=x.exports=function(l,d,s,v,c){var a=b(d,s,v?2:1),r,t,i,n,o,p,O;if(c)r=l;else{if(t=w(l),typeof t!="function")throw TypeError("Target is not iterable");if(m(t)){for(i=0,n=g(l.length);n>i;i++)if(o=v?a(u(O=l[i])[0],O[1]):a(l[i]),o&&o instanceof y)return o;return new y(!1)}r=t.call(l)}for(p=r.next;!(O=p.call(r)).done;)if(o=f(r,a,O.value,v),typeof o=="object"&&o&&o instanceof y)return o;return new y(!1)};h.stop=function(l){return new y(!0,l)}},{"../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,x,_){var u=e("../internals/object-get-prototype-of"),m=e("../internals/create-non-enumerable-property"),g=e("../internals/has"),b=e("../internals/well-known-symbol"),w=e("../internals/is-pure"),f=b("iterator"),y=!1,h=function(){return this},l,d,s;[].keys&&(s=[].keys(),"next"in s?(d=u(u(s)),d!==Object.prototype&&(l=d)):y=!0),l==null&&(l={}),!w&&!g(l,f)&&m(l,f,h),x.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:y}},{"../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,x,_){arguments[4][253][0].apply(_,arguments)},{dup:253}],269:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/object-get-own-property-descriptor").f,g=e("../internals/classof-raw"),b=e("../internals/task").set,w=e("../internals/engine-is-ios"),f=u.MutationObserver||u.WebKitMutationObserver,y=u.process,h=u.Promise,l=g(y)=="process",d=m(u,"queueMicrotask"),s=d&&d.value,v,c,a,r,t,i,n,o;s||(v=function(){var p,O;for(l&&(p=y.domain)&&p.exit();c;){O=c.fn,c=c.next;try{O()}catch(C){throw c?r():a=void 0,C}}a=void 0,p&&p.enter()},l?r=function(){y.nextTick(v)}:f&&!w?(t=!0,i=document.createTextNode(""),new f(v).observe(i,{characterData:!0}),r=function(){i.data=t=!t}):h&&h.resolve?(n=h.resolve(void 0),o=n.then,r=function(){o.call(n,v)}):r=function(){b.call(u,v)}),x.exports=s||function(p){var O={fn:p,next:void 0};a&&(a.next=O),c||(c=O,r()),a=O}},{"../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,x,_){var u=e("../internals/global");x.exports=u.Promise},{"../internals/global":251}],271:[function(e,x,_){var u=e("../internals/fails");x.exports=!!Object.getOwnPropertySymbols&&!u(function(){return!String(Symbol())})},{"../internals/fails":247}],272:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/inspect-source"),g=u.WeakMap;x.exports=typeof g=="function"&&/native code/.test(m(g))},{"../internals/global":251,"../internals/inspect-source":258}],273:[function(e,x,_){var u=e("../internals/a-function"),m=function(g){var b,w;this.promise=new g(function(f,y){if(b!==void 0||w!==void 0)throw TypeError("Bad Promise constructor");b=f,w=y}),this.resolve=u(b),this.reject=u(w)};x.exports.f=function(g){return new m(g)}},{"../internals/a-function":219}],274:[function(e,x,_){var u=e("../internals/is-regexp");x.exports=function(m){if(u(m))throw TypeError("The method doesn't accept regular expressions");return m}},{"../internals/is-regexp":265}],275:[function(e,x,_){var u=e("../internals/descriptors"),m=e("../internals/fails"),g=e("../internals/object-keys"),b=e("../internals/object-get-own-property-symbols"),w=e("../internals/object-property-is-enumerable"),f=e("../internals/to-object"),y=e("../internals/indexed-object"),h=Object.assign,l=Object.defineProperty;x.exports=!h||m(function(){if(u&&h({b:1},h(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var d={},s={},v=Symbol(),c="abcdefghijklmnopqrst";return d[v]=7,c.split("").forEach(function(a){s[a]=a}),h({},d)[v]!=7||g(h({},s)).join("")!=c})?function(s,v){for(var c=f(s),a=arguments.length,r=1,t=b.f,i=w.f;a>r;)for(var n=y(arguments[r++]),o=t?g(n).concat(t(n)):g(n),p=o.length,O=0,C;p>O;)C=o[O++],(!u||i.call(n,C))&&(c[C]=n[C]);return c}:h},{"../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,x,_){var u=e("../internals/an-object"),m=e("../internals/object-define-properties"),g=e("../internals/enum-bug-keys"),b=e("../internals/hidden-keys"),w=e("../internals/html"),f=e("../internals/document-create-element"),y=e("../internals/shared-key"),h=">",l="<",d="prototype",s="script",v=y("IE_PROTO"),c=function(){},a=function(o){return l+s+h+o+l+"/"+s+h},r=function(o){o.write(a("")),o.close();var p=o.parentWindow.Object;return o=null,p},t=function(){var o=f("iframe"),p="java"+s+":",O;return o.style.display="none",w.appendChild(o),o.src=String(p),O=o.contentWindow.document,O.open(),O.write(a("document.F=Object")),O.close(),O.F},i,n=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch{}n=i?r(i):t();for(var o=g.length;o--;)delete n[d][g[o]];return n()};b[v]=!0,x.exports=Object.create||function(p,O){var C;return p!==null?(c[d]=u(p),C=new c,c[d]=null,C[v]=p):C=n(),O===void 0?C:m(C,O)}},{"../internals/an-object":223,"../internals/document-create-element":241,"../internals/enum-bug-keys":245,"../internals/hidden-keys":253,"../internals/html":255,"../internals/object-define-properties":277,"../internals/shared-key":299}],277:[function(e,x,_){var u=e("../internals/descriptors"),m=e("../internals/object-define-property"),g=e("../internals/an-object"),b=e("../internals/object-keys");x.exports=u?Object.defineProperties:function(f,y){g(f);for(var h=b(y),l=h.length,d=0,s;l>d;)m.f(f,s=h[d++],y[s]);return f}},{"../internals/an-object":223,"../internals/descriptors":240,"../internals/object-define-property":278,"../internals/object-keys":285}],278:[function(e,x,_){var u=e("../internals/descriptors"),m=e("../internals/ie8-dom-define"),g=e("../internals/an-object"),b=e("../internals/to-primitive"),w=Object.defineProperty;_.f=u?w:function(y,h,l){if(g(y),h=b(h,!0),g(l),m)try{return w(y,h,l)}catch{}if("get"in l||"set"in l)throw TypeError("Accessors not supported");return"value"in l&&(y[h]=l.value),y}},{"../internals/an-object":223,"../internals/descriptors":240,"../internals/ie8-dom-define":256,"../internals/to-primitive":309}],279:[function(e,x,_){var u=e("../internals/descriptors"),m=e("../internals/object-property-is-enumerable"),g=e("../internals/create-property-descriptor"),b=e("../internals/to-indexed-object"),w=e("../internals/to-primitive"),f=e("../internals/has"),y=e("../internals/ie8-dom-define"),h=Object.getOwnPropertyDescriptor;_.f=u?h:function(d,s){if(d=b(d),s=w(s,!0),y)try{return h(d,s)}catch{}if(f(d,s))return g(!m.f.call(d,s),d[s])}},{"../internals/create-property-descriptor":237,"../internals/descriptors":240,"../internals/has":252,"../internals/ie8-dom-define":256,"../internals/object-property-is-enumerable":286,"../internals/to-indexed-object":305,"../internals/to-primitive":309}],280:[function(e,x,_){var u=e("../internals/to-indexed-object"),m=e("../internals/object-get-own-property-names").f,g={}.toString,b=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],w=function(f){try{return m(f)}catch{return b.slice()}};x.exports.f=function(y){return b&&g.call(y)=="[object Window]"?w(y):m(u(y))}},{"../internals/object-get-own-property-names":281,"../internals/to-indexed-object":305}],281:[function(e,x,_){var u=e("../internals/object-keys-internal"),m=e("../internals/enum-bug-keys"),g=m.concat("length","prototype");_.f=Object.getOwnPropertyNames||function(w){return u(w,g)}},{"../internals/enum-bug-keys":245,"../internals/object-keys-internal":284}],282:[function(e,x,_){_.f=Object.getOwnPropertySymbols},{}],283:[function(e,x,_){var u=e("../internals/has"),m=e("../internals/to-object"),g=e("../internals/shared-key"),b=e("../internals/correct-prototype-getter"),w=g("IE_PROTO"),f=Object.prototype;x.exports=b?Object.getPrototypeOf:function(y){return y=m(y),u(y,w)?y[w]:typeof y.constructor=="function"&&y instanceof y.constructor?y.constructor.prototype:y instanceof Object?f:null}},{"../internals/correct-prototype-getter":234,"../internals/has":252,"../internals/shared-key":299,"../internals/to-object":308}],284:[function(e,x,_){var u=e("../internals/has"),m=e("../internals/to-indexed-object"),g=e("../internals/array-includes").indexOf,b=e("../internals/hidden-keys");x.exports=function(w,f){var y=m(w),h=0,l=[],d;for(d in y)!u(b,d)&&u(y,d)&&l.push(d);for(;f.length>h;)u(y,d=f[h++])&&(~g(l,d)||l.push(d));return l}},{"../internals/array-includes":224,"../internals/has":252,"../internals/hidden-keys":253,"../internals/to-indexed-object":305}],285:[function(e,x,_){var u=e("../internals/object-keys-internal"),m=e("../internals/enum-bug-keys");x.exports=Object.keys||function(b){return u(b,m)}},{"../internals/enum-bug-keys":245,"../internals/object-keys-internal":284}],286:[function(e,x,_){var u={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,g=m&&!u.call({1:2},1);_.f=g?function(w){var f=m(this,w);return!!f&&f.enumerable}:u},{}],287:[function(e,x,_){var u=e("../internals/an-object"),m=e("../internals/a-possible-prototype");x.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var g=!1,b={},w;try{w=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,w.call(b,[]),g=b instanceof Array}catch{}return function(y,h){return u(y),m(h),g?w.call(y,h):y.__proto__=h,y}}():void 0)},{"../internals/a-possible-prototype":220,"../internals/an-object":223}],288:[function(e,x,_){var u=e("../internals/descriptors"),m=e("../internals/object-keys"),g=e("../internals/to-indexed-object"),b=e("../internals/object-property-is-enumerable").f,w=function(f){return function(y){for(var h=g(y),l=m(h),d=l.length,s=0,v=[],c;d>s;)c=l[s++],(!u||b.call(h,c))&&v.push(f?[c,h[c]]:h[c]);return v}};x.exports={entries:w(!0),values:w(!1)}},{"../internals/descriptors":240,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/to-indexed-object":305}],289:[function(e,x,_){var u=e("../internals/get-built-in"),m=e("../internals/object-get-own-property-names"),g=e("../internals/object-get-own-property-symbols"),b=e("../internals/an-object");x.exports=u("Reflect","ownKeys")||function(f){var y=m.f(b(f)),h=g.f;return h?y.concat(h(f)):y}},{"../internals/an-object":223,"../internals/get-built-in":249,"../internals/object-get-own-property-names":281,"../internals/object-get-own-property-symbols":282}],290:[function(e,x,_){var u=e("../internals/global");x.exports=u},{"../internals/global":251}],291:[function(e,x,_){x.exports=function(u){try{return{error:!1,value:u()}}catch(m){return{error:!0,value:m}}}},{}],292:[function(e,x,_){var u=e("../internals/an-object"),m=e("../internals/is-object"),g=e("../internals/new-promise-capability");x.exports=function(b,w){if(u(b),m(w)&&w.constructor===b)return w;var f=g.f(b),y=f.resolve;return y(w),f.promise}},{"../internals/an-object":223,"../internals/is-object":263,"../internals/new-promise-capability":273}],293:[function(e,x,_){var u=e("../internals/redefine");x.exports=function(m,g,b){for(var w in g)u(m,w,g[w],b);return m}},{"../internals/redefine":294}],294:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/create-non-enumerable-property"),g=e("../internals/has"),b=e("../internals/set-global"),w=e("../internals/inspect-source"),f=e("../internals/internal-state"),y=f.get,h=f.enforce,l=String(String).split("String");(x.exports=function(d,s,v,c){var a=c?!!c.unsafe:!1,r=c?!!c.enumerable:!1,t=c?!!c.noTargetGet:!1;if(typeof v=="function"&&(typeof s=="string"&&!g(v,"name")&&m(v,"name",s),h(v).source=l.join(typeof s=="string"?s:"")),d===u){r?d[s]=v:b(s,v);return}else a?!t&&d[s]&&(r=!0):delete d[s];r?d[s]=v:m(d,s,v)})(Function.prototype,"toString",function(){return typeof this=="function"&&y(this).source||w(this)})},{"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/has":252,"../internals/inspect-source":258,"../internals/internal-state":259,"../internals/set-global":296}],295:[function(e,x,_){x.exports=function(u){if(u==null)throw TypeError("Can't call method on "+u);return u}},{}],296:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/create-non-enumerable-property");x.exports=function(g,b){try{m(u,g,b)}catch{u[g]=b}return b}},{"../internals/create-non-enumerable-property":236,"../internals/global":251}],297:[function(e,x,_){var u=e("../internals/get-built-in"),m=e("../internals/object-define-property"),g=e("../internals/well-known-symbol"),b=e("../internals/descriptors"),w=g("species");x.exports=function(f){var y=u(f),h=m.f;b&&y&&!y[w]&&h(y,w,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":240,"../internals/get-built-in":249,"../internals/object-define-property":278,"../internals/well-known-symbol":314}],298:[function(e,x,_){var u=e("../internals/object-define-property").f,m=e("../internals/has"),g=e("../internals/well-known-symbol"),b=g("toStringTag");x.exports=function(w,f,y){w&&!m(w=y?w:w.prototype,b)&&u(w,b,{configurable:!0,value:f})}},{"../internals/has":252,"../internals/object-define-property":278,"../internals/well-known-symbol":314}],299:[function(e,x,_){var u=e("../internals/shared"),m=e("../internals/uid"),g=u("keys");x.exports=function(b){return g[b]||(g[b]=m(b))}},{"../internals/shared":301,"../internals/uid":311}],300:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/set-global"),g="__core-js_shared__",b=u[g]||m(g,{});x.exports=b},{"../internals/global":251,"../internals/set-global":296}],301:[function(e,x,_){var u=e("../internals/is-pure"),m=e("../internals/shared-store");(x.exports=function(g,b){return m[g]||(m[g]=b!==void 0?b:{})})("versions",[]).push({version:"3.6.5",mode:u?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":264,"../internals/shared-store":300}],302:[function(e,x,_){var u=e("../internals/an-object"),m=e("../internals/a-function"),g=e("../internals/well-known-symbol"),b=g("species");x.exports=function(w,f){var y=u(w).constructor,h;return y===void 0||(h=u(y)[b])==null?f:m(h)}},{"../internals/a-function":219,"../internals/an-object":223,"../internals/well-known-symbol":314}],303:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/fails"),g=e("../internals/classof-raw"),b=e("../internals/function-bind-context"),w=e("../internals/html"),f=e("../internals/document-create-element"),y=e("../internals/engine-is-ios"),h=u.location,l=u.setImmediate,d=u.clearImmediate,s=u.process,v=u.MessageChannel,c=u.Dispatch,a=0,r={},t="onreadystatechange",i,n,o,p=function(L){if(r.hasOwnProperty(L)){var F=r[L];delete r[L],F()}},O=function(L){return function(){p(L)}},C=function(L){p(L.data)},N=function(L){u.postMessage(L+"",h.protocol+"//"+h.host)};(!l||!d)&&(l=function(F){for(var M=[],D=1;arguments.length>D;)M.push(arguments[D++]);return r[++a]=function(){(typeof F=="function"?F:Function(F)).apply(void 0,M)},i(a),a},d=function(F){delete r[F]},g(s)=="process"?i=function(L){s.nextTick(O(L))}:c&&c.now?i=function(L){c.now(O(L))}:v&&!y?(n=new v,o=n.port2,n.port1.onmessage=C,i=b(o.postMessage,o,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts&&!m(N)&&h.protocol!=="file:"?(i=N,u.addEventListener("message",C,!1)):t in f("script")?i=function(L){w.appendChild(f("script"))[t]=function(){w.removeChild(this),p(L)}}:i=function(L){setTimeout(O(L),0)}),x.exports={set:l,clear:d}},{"../internals/classof-raw":230,"../internals/document-create-element":241,"../internals/engine-is-ios":242,"../internals/fails":247,"../internals/function-bind-context":248,"../internals/global":251,"../internals/html":255}],304:[function(e,x,_){var u=e("../internals/to-integer"),m=Math.max,g=Math.min;x.exports=function(b,w){var f=u(b);return f<0?m(f+w,0):g(f,w)}},{"../internals/to-integer":306}],305:[function(e,x,_){var u=e("../internals/indexed-object"),m=e("../internals/require-object-coercible");x.exports=function(g){return u(m(g))}},{"../internals/indexed-object":257,"../internals/require-object-coercible":295}],306:[function(e,x,_){var u=Math.ceil,m=Math.floor;x.exports=function(g){return isNaN(g=+g)?0:(g>0?m:u)(g)}},{}],307:[function(e,x,_){var u=e("../internals/to-integer"),m=Math.min;x.exports=function(g){return g>0?m(u(g),9007199254740991):0}},{"../internals/to-integer":306}],308:[function(e,x,_){var u=e("../internals/require-object-coercible");x.exports=function(m){return Object(u(m))}},{"../internals/require-object-coercible":295}],309:[function(e,x,_){var u=e("../internals/is-object");x.exports=function(m,g){if(!u(m))return m;var b,w;if(g&&typeof(b=m.toString)=="function"&&!u(w=b.call(m))||typeof(b=m.valueOf)=="function"&&!u(w=b.call(m))||!g&&typeof(b=m.toString)=="function"&&!u(w=b.call(m)))return w;throw TypeError("Can't convert object to primitive value")}},{"../internals/is-object":263}],310:[function(e,x,_){var u=e("../internals/well-known-symbol"),m=u("toStringTag"),g={};g[m]="z",x.exports=String(g)==="[object z]"},{"../internals/well-known-symbol":314}],311:[function(e,x,_){var u=0,m=Math.random();x.exports=function(g){return"Symbol("+String(g===void 0?"":g)+")_"+(++u+m).toString(36)}},{}],312:[function(e,x,_){var u=e("../internals/native-symbol");x.exports=u&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":271}],313:[function(e,x,_){var u=e("../internals/well-known-symbol");_.f=u},{"../internals/well-known-symbol":314}],314:[function(e,x,_){var u=e("../internals/global"),m=e("../internals/shared"),g=e("../internals/has"),b=e("../internals/uid"),w=e("../internals/native-symbol"),f=e("../internals/use-symbol-as-uid"),y=m("wks"),h=u.Symbol,l=f?h:h&&h.withoutSetter||b;x.exports=function(d){return g(y,d)||(w&&g(h,d)?y[d]=h[d]:y[d]=l("Symbol."+d)),y[d]}},{"../internals/global":251,"../internals/has":252,"../internals/native-symbol":271,"../internals/shared":301,"../internals/uid":311,"../internals/use-symbol-as-uid":312}],315:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/array-iteration").findIndex,g=e("../internals/add-to-unscopables"),b=e("../internals/array-method-uses-to-length"),w="findIndex",f=!0,y=b(w);w in[]&&Array(1)[w](function(){f=!1}),u({target:"Array",proto:!0,forced:f||!y},{findIndex:function(l){return m(this,l,arguments.length>1?arguments[1]:void 0)}}),g(w)},{"../internals/add-to-unscopables":221,"../internals/array-iteration":225,"../internals/array-method-uses-to-length":226,"../internals/export":246}],316:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/array-iteration").find,g=e("../internals/add-to-unscopables"),b=e("../internals/array-method-uses-to-length"),w="find",f=!0,y=b(w);w in[]&&Array(1)[w](function(){f=!1}),u({target:"Array",proto:!0,forced:f||!y},{find:function(l){return m(this,l,arguments.length>1?arguments[1]:void 0)}}),g(w)},{"../internals/add-to-unscopables":221,"../internals/array-iteration":225,"../internals/array-method-uses-to-length":226,"../internals/export":246}],317:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/array-includes").includes,g=e("../internals/add-to-unscopables"),b=e("../internals/array-method-uses-to-length"),w=b("indexOf",{ACCESSORS:!0,1:0});u({target:"Array",proto:!0,forced:!w},{includes:function(y){return m(this,y,arguments.length>1?arguments[1]:void 0)}}),g("includes")},{"../internals/add-to-unscopables":221,"../internals/array-includes":224,"../internals/array-method-uses-to-length":226,"../internals/export":246}],318:[function(e,x,_){var u=e("../internals/to-indexed-object"),m=e("../internals/add-to-unscopables"),g=e("../internals/iterators"),b=e("../internals/internal-state"),w=e("../internals/define-iterator"),f="Array Iterator",y=b.set,h=b.getterFor(f);x.exports=w(Array,"Array",function(l,d){y(this,{type:f,target:u(l),index:0,kind:d})},function(){var l=h(this),d=l.target,s=l.kind,v=l.index++;return!d||v>=d.length?(l.target=void 0,{value:void 0,done:!0}):s=="keys"?{value:v,done:!1}:s=="values"?{value:d[v],done:!1}:{value:[v,d[v]],done:!1}},"values"),g.Arguments=g.Array,m("keys"),m("values"),m("entries")},{"../internals/add-to-unscopables":221,"../internals/define-iterator":238,"../internals/internal-state":259,"../internals/iterators":268,"../internals/to-indexed-object":305}],319:[function(e,x,_){var u=e("../internals/export");u({target:"Number",stat:!0},{isNaN:function(g){return g!=g}})},{"../internals/export":246}],320:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/object-assign");u({target:"Object",stat:!0,forced:Object.assign!==m},{assign:m})},{"../internals/export":246,"../internals/object-assign":275}],321:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/to-object"),g=e("../internals/object-keys"),b=e("../internals/fails"),w=b(function(){g(1)});u({target:"Object",stat:!0,forced:w},{keys:function(y){return g(m(y))}})},{"../internals/export":246,"../internals/fails":247,"../internals/object-keys":285,"../internals/to-object":308}],322:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/object-to-array").values;u({target:"Object",stat:!0},{values:function(b){return m(b)}})},{"../internals/export":246,"../internals/object-to-array":288}],323:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/is-pure"),g=e("../internals/global"),b=e("../internals/get-built-in"),w=e("../internals/native-promise-constructor"),f=e("../internals/redefine"),y=e("../internals/redefine-all"),h=e("../internals/set-to-string-tag"),l=e("../internals/set-species"),d=e("../internals/is-object"),s=e("../internals/a-function"),v=e("../internals/an-instance"),c=e("../internals/classof-raw"),a=e("../internals/inspect-source"),r=e("../internals/iterate"),t=e("../internals/check-correctness-of-iteration"),i=e("../internals/species-constructor"),n=e("../internals/task").set,o=e("../internals/microtask"),p=e("../internals/promise-resolve"),O=e("../internals/host-report-errors"),C=e("../internals/new-promise-capability"),N=e("../internals/perform"),L=e("../internals/internal-state"),F=e("../internals/is-forced"),M=e("../internals/well-known-symbol"),D=e("../internals/engine-v8-version"),R=M("species"),P="Promise",E=L.get,A=L.set,z=L.getterFor(P),W=w,$=g.TypeError,U=g.document,I=g.process,j=b("fetch"),B=C.f,V=B,te=c(I)=="process",ie=!!(U&&U.createEvent&&g.dispatchEvent),ce="unhandledrejection",be="rejectionhandled",_e=0,oe=1,J=2,Q=1,he=2,ke,re,se,Ce,q=F(P,function(){var Ue=a(W)!==String(W);if(!Ue&&(D===66||!te&&typeof PromiseRejectionEvent!="function")||m&&!W.prototype.finally)return!0;if(D>=51&&/native code/.test(W))return!1;var Ve=W.resolve(1),Qe=function(ae){ae(function(){},function(){})},tt=Ve.constructor={};return tt[R]=Qe,!(Ve.then(function(){})instanceof Qe)}),G=q||!t(function(Ue){W.all(Ue).catch(function(){})}),Z=function(Ue){var Ve;return d(Ue)&&typeof(Ve=Ue.then)=="function"?Ve:!1},fe=function(Ue,Ve,Qe){if(!Ve.notified){Ve.notified=!0;var tt=Ve.reactions;o(function(){for(var ae=Ve.value,Re=Ve.state==oe,me=0;tt.length>me;){var Ee=tt[me++],pe=Re?Ee.ok:Ee.fail,Pe=Ee.resolve,ee=Ee.reject,Xe=Ee.domain,it,K,Me;try{pe?(Re||(Ve.rejection===he&&Ze(Ue,Ve),Ve.rejection=Q),pe===!0?it=ae:(Xe&&Xe.enter(),it=pe(ae),Xe&&(Xe.exit(),Me=!0)),it===Ee.promise?ee($("Promise-chain cycle")):(K=Z(it))?K.call(it,Pe,ee):Pe(it)):ee(ae)}catch(Le){Xe&&!Me&&Xe.exit(),ee(Le)}}Ve.reactions=[],Ve.notified=!1,Qe&&!Ve.rejection&&ge(Ue,Ve)})}},we=function(Ue,Ve,Qe){var tt,ae;ie?(tt=U.createEvent("Event"),tt.promise=Ve,tt.reason=Qe,tt.initEvent(Ue,!1,!0),g.dispatchEvent(tt)):tt={promise:Ve,reason:Qe},(ae=g["on"+Ue])?ae(tt):Ue===ce&&O("Unhandled promise rejection",Qe)},ge=function(Ue,Ve){n.call(g,function(){var Qe=Ve.value,tt=je(Ve),ae;if(tt&&(ae=N(function(){te?I.emit("unhandledRejection",Qe,Ue):we(ce,Ue,Qe)}),Ve.rejection=te||je(Ve)?he:Q,ae.error))throw ae.value})},je=function(Ue){return Ue.rejection!==Q&&!Ue.parent},Ze=function(Ue,Ve){n.call(g,function(){te?I.emit("rejectionHandled",Ue):we(be,Ue,Ve.value)})},nt=function(Ue,Ve,Qe,tt){return function(ae){Ue(Ve,Qe,ae,tt)}},ut=function(Ue,Ve,Qe,tt){Ve.done||(Ve.done=!0,tt&&(Ve=tt),Ve.value=Qe,Ve.state=J,fe(Ue,Ve,!0))},ot=function(Ue,Ve,Qe,tt){if(!Ve.done){Ve.done=!0,tt&&(Ve=tt);try{if(Ue===Qe)throw $("Promise can't be resolved itself");var ae=Z(Qe);ae?o(function(){var Re={done:!1};try{ae.call(Qe,nt(ot,Ue,Re,Ve),nt(ut,Ue,Re,Ve))}catch(me){ut(Ue,Re,me,Ve)}}):(Ve.value=Qe,Ve.state=oe,fe(Ue,Ve,!1))}catch(Re){ut(Ue,{done:!1},Re,Ve)}}};q&&(W=function(Ve){v(this,W,P),s(Ve),ke.call(this);var Qe=E(this);try{Ve(nt(ot,this,Qe),nt(ut,this,Qe))}catch(tt){ut(this,Qe,tt)}},ke=function(Ve){A(this,{type:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:_e,value:void 0})},ke.prototype=y(W.prototype,{then:function(Ve,Qe){var tt=z(this),ae=B(i(this,W));return ae.ok=typeof Ve=="function"?Ve:!0,ae.fail=typeof Qe=="function"&&Qe,ae.domain=te?I.domain:void 0,tt.parent=!0,tt.reactions.push(ae),tt.state!=_e&&fe(this,tt,!1),ae.promise},catch:function(Ue){return this.then(void 0,Ue)}}),re=function(){var Ue=new ke,Ve=E(Ue);this.promise=Ue,this.resolve=nt(ot,Ue,Ve),this.reject=nt(ut,Ue,Ve)},C.f=B=function(Ue){return Ue===W||Ue===se?new re(Ue):V(Ue)},!m&&typeof w=="function"&&(Ce=w.prototype.then,f(w.prototype,"then",function(Ve,Qe){var tt=this;return new W(function(ae,Re){Ce.call(tt,ae,Re)}).then(Ve,Qe)},{unsafe:!0}),typeof j=="function"&&u({global:!0,enumerable:!0,forced:!0},{fetch:function(Ve){return p(W,j.apply(g,arguments))}}))),u({global:!0,wrap:!0,forced:q},{Promise:W}),h(W,P,!1,!0),l(P),se=b(P),u({target:P,stat:!0,forced:q},{reject:function(Ve){var Qe=B(this);return Qe.reject.call(void 0,Ve),Qe.promise}}),u({target:P,stat:!0,forced:m||q},{resolve:function(Ve){return p(m&&this===se?W:this,Ve)}}),u({target:P,stat:!0,forced:G},{all:function(Ve){var Qe=this,tt=B(Qe),ae=tt.resolve,Re=tt.reject,me=N(function(){var Ee=s(Qe.resolve),pe=[],Pe=0,ee=1;r(Ve,function(Xe){var it=Pe++,K=!1;pe.push(void 0),ee++,Ee.call(Qe,Xe).then(function(Me){K||(K=!0,pe[it]=Me,--ee||ae(pe))},Re)}),--ee||ae(pe)});return me.error&&Re(me.value),tt.promise},race:function(Ve){var Qe=this,tt=B(Qe),ae=tt.reject,Re=N(function(){var me=s(Qe.resolve);r(Ve,function(Ee){me.call(Qe,Ee).then(tt.resolve,ae)})});return Re.error&&ae(Re.value),tt.promise}})},{"../internals/a-function":219,"../internals/an-instance":222,"../internals/check-correctness-of-iteration":229,"../internals/classof-raw":230,"../internals/engine-v8-version":244,"../internals/export":246,"../internals/get-built-in":249,"../internals/global":251,"../internals/host-report-errors":254,"../internals/inspect-source":258,"../internals/internal-state":259,"../internals/is-forced":262,"../internals/is-object":263,"../internals/is-pure":264,"../internals/iterate":266,"../internals/microtask":269,"../internals/native-promise-constructor":270,"../internals/new-promise-capability":273,"../internals/perform":291,"../internals/promise-resolve":292,"../internals/redefine":294,"../internals/redefine-all":293,"../internals/set-species":297,"../internals/set-to-string-tag":298,"../internals/species-constructor":302,"../internals/task":303,"../internals/well-known-symbol":314}],324:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/to-absolute-index"),g=String.fromCharCode,b=String.fromCodePoint,w=!!b&&b.length!=1;u({target:"String",stat:!0,forced:w},{fromCodePoint:function(y){for(var h=[],l=arguments.length,d=0,s;l>d;){if(s=+arguments[d++],m(s,1114111)!==s)throw RangeError(s+" is not a valid code point");h.push(s<65536?g(s):g(((s-=65536)>>10)+55296,s%1024+56320))}return h.join("")}})},{"../internals/export":246,"../internals/to-absolute-index":304}],325:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/not-a-regexp"),g=e("../internals/require-object-coercible"),b=e("../internals/correct-is-regexp-logic");u({target:"String",proto:!0,forced:!b("includes")},{includes:function(f){return!!~String(g(this)).indexOf(m(f),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":233,"../internals/export":246,"../internals/not-a-regexp":274,"../internals/require-object-coercible":295}],326:[function(e,x,_){var u=e("../internals/define-well-known-symbol");u("asyncIterator")},{"../internals/define-well-known-symbol":239}],327:[function(e,x,_){var u=e("../internals/export"),m=e("../internals/global"),g=e("../internals/get-built-in"),b=e("../internals/is-pure"),w=e("../internals/descriptors"),f=e("../internals/native-symbol"),y=e("../internals/use-symbol-as-uid"),h=e("../internals/fails"),l=e("../internals/has"),d=e("../internals/is-array"),s=e("../internals/is-object"),v=e("../internals/an-object"),c=e("../internals/to-object"),a=e("../internals/to-indexed-object"),r=e("../internals/to-primitive"),t=e("../internals/create-property-descriptor"),i=e("../internals/object-create"),n=e("../internals/object-keys"),o=e("../internals/object-get-own-property-names"),p=e("../internals/object-get-own-property-names-external"),O=e("../internals/object-get-own-property-symbols"),C=e("../internals/object-get-own-property-descriptor"),N=e("../internals/object-define-property"),L=e("../internals/object-property-is-enumerable"),F=e("../internals/create-non-enumerable-property"),M=e("../internals/redefine"),D=e("../internals/shared"),R=e("../internals/shared-key"),P=e("../internals/hidden-keys"),E=e("../internals/uid"),A=e("../internals/well-known-symbol"),z=e("../internals/well-known-symbol-wrapped"),W=e("../internals/define-well-known-symbol"),$=e("../internals/set-to-string-tag"),U=e("../internals/internal-state"),I=e("../internals/array-iteration").forEach,j=R("hidden"),B="Symbol",V="prototype",te=A("toPrimitive"),ie=U.set,ce=U.getterFor(B),be=Object[V],_e=m.Symbol,oe=g("JSON","stringify"),J=C.f,Q=N.f,he=p.f,ke=L.f,re=D("symbols"),se=D("op-symbols"),Ce=D("string-to-symbol-registry"),q=D("symbol-to-string-registry"),G=D("wks"),Z=m.QObject,fe=!Z||!Z[V]||!Z[V].findChild,we=w&&h(function(){return i(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a!=7})?function(ae,Re,me){var Ee=J(be,Re);Ee&&delete be[Re],Q(ae,Re,me),Ee&&ae!==be&&Q(be,Re,Ee)}:Q,ge=function(ae,Re){var me=re[ae]=i(_e[V]);return ie(me,{type:B,tag:ae,description:Re}),w||(me.description=Re),me},je=y?function(ae){return typeof ae=="symbol"}:function(ae){return Object(ae)instanceof _e},Ze=function(Re,me,Ee){Re===be&&Ze(se,me,Ee),v(Re);var pe=r(me,!0);return v(Ee),l(re,pe)?(Ee.enumerable?(l(Re,j)&&Re[j][pe]&&(Re[j][pe]=!1),Ee=i(Ee,{enumerable:t(0,!1)})):(l(Re,j)||Q(Re,j,t(1,{})),Re[j][pe]=!0),we(Re,pe,Ee)):Q(Re,pe,Ee)},nt=function(Re,me){v(Re);var Ee=a(me),pe=n(Ee).concat(Qe(Ee));return I(pe,function(Pe){(!w||ot.call(Ee,Pe))&&Ze(Re,Pe,Ee[Pe])}),Re},ut=function(Re,me){return me===void 0?i(Re):nt(i(Re),me)},ot=function(Re){var me=r(Re,!0),Ee=ke.call(this,me);return this===be&&l(re,me)&&!l(se,me)?!1:Ee||!l(this,me)||!l(re,me)||l(this,j)&&this[j][me]?Ee:!0},Ue=function(Re,me){var Ee=a(Re),pe=r(me,!0);if(!(Ee===be&&l(re,pe)&&!l(se,pe))){var Pe=J(Ee,pe);return Pe&&l(re,pe)&&!(l(Ee,j)&&Ee[j][pe])&&(Pe.enumerable=!0),Pe}},Ve=function(Re){var me=he(a(Re)),Ee=[];return I(me,function(pe){!l(re,pe)&&!l(P,pe)&&Ee.push(pe)}),Ee},Qe=function(Re){var me=Re===be,Ee=he(me?se:a(Re)),pe=[];return I(Ee,function(Pe){l(re,Pe)&&(!me||l(be,Pe))&&pe.push(re[Pe])}),pe};if(f||(_e=function(){if(this instanceof _e)throw TypeError("Symbol is not a constructor");var Re=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),me=E(Re),Ee=function(pe){this===be&&Ee.call(se,pe),l(this,j)&&l(this[j],me)&&(this[j][me]=!1),we(this,me,t(1,pe))};return w&&fe&&we(be,me,{configurable:!0,set:Ee}),ge(me,Re)},M(_e[V],"toString",function(){return ce(this).tag}),M(_e,"withoutSetter",function(ae){return ge(E(ae),ae)}),L.f=ot,N.f=Ze,C.f=Ue,o.f=p.f=Ve,O.f=Qe,z.f=function(ae){return ge(A(ae),ae)},w&&(Q(_e[V],"description",{configurable:!0,get:function(){return ce(this).description}}),b||M(be,"propertyIsEnumerable",ot,{unsafe:!0}))),u({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:_e}),I(n(G),function(ae){W(ae)}),u({target:B,stat:!0,forced:!f},{for:function(ae){var Re=String(ae);if(l(Ce,Re))return Ce[Re];var me=_e(Re);return Ce[Re]=me,q[me]=Re,me},keyFor:function(Re){if(!je(Re))throw TypeError(Re+" is not a symbol");if(l(q,Re))return q[Re]},useSetter:function(){fe=!0},useSimple:function(){fe=!1}}),u({target:"Object",stat:!0,forced:!f,sham:!w},{create:ut,defineProperty:Ze,defineProperties:nt,getOwnPropertyDescriptor:Ue}),u({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:Ve,getOwnPropertySymbols:Qe}),u({target:"Object",stat:!0,forced:h(function(){O.f(1)})},{getOwnPropertySymbols:function(Re){return O.f(c(Re))}}),oe){var tt=!f||h(function(){var ae=_e();return oe([ae])!="[null]"||oe({a:ae})!="{}"||oe(Object(ae))!="{}"});u({target:"JSON",stat:!0,forced:tt},{stringify:function(Re,me,Ee){for(var pe=[Re],Pe=1,ee;arguments.length>Pe;)pe.push(arguments[Pe++]);if(ee=me,!(!s(me)&&Re===void 0||je(Re)))return d(me)||(me=function(Xe,it){if(typeof ee=="function"&&(it=ee.call(this,Xe,it)),!je(it))return it}),pe[1]=me,oe.apply(null,pe)}})}_e[V][te]||F(_e[V],te,_e[V].valueOf),$(_e,B),P[j]=!0},{"../internals/an-object":223,"../internals/array-iteration":225,"../internals/create-non-enumerable-property":236,"../internals/create-property-descriptor":237,"../internals/define-well-known-symbol":239,"../internals/descriptors":240,"../internals/export":246,"../internals/fails":247,"../internals/get-built-in":249,"../internals/global":251,"../internals/has":252,"../internals/hidden-keys":253,"../internals/internal-state":259,"../internals/is-array":261,"../internals/is-object":263,"../internals/is-pure":264,"../internals/native-symbol":271,"../internals/object-create":276,"../internals/object-define-property":278,"../internals/object-get-own-property-descriptor":279,"../internals/object-get-own-property-names":281,"../internals/object-get-own-property-names-external":280,"../internals/object-get-own-property-symbols":282,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/redefine":294,"../internals/set-to-string-tag":298,"../internals/shared":301,"../internals/shared-key":299,"../internals/to-indexed-object":305,"../internals/to-object":308,"../internals/to-primitive":309,"../internals/uid":311,"../internals/use-symbol-as-uid":312,"../internals/well-known-symbol":314,"../internals/well-known-symbol-wrapped":313}],328:[function(e,x,_){(function(u){function m(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(p){return typeof p}:m=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},m(n)}function g(n){return Array.isArray?Array.isArray(n):i(n)==="[object Array]"}_.isArray=g;function b(n){return typeof n=="boolean"}_.isBoolean=b;function w(n){return n===null}_.isNull=w;function f(n){return n==null}_.isNullOrUndefined=f;function y(n){return typeof n=="number"}_.isNumber=y;function h(n){return typeof n=="string"}_.isString=h;function l(n){return m(n)==="symbol"}_.isSymbol=l;function d(n){return n===void 0}_.isUndefined=d;function s(n){return i(n)==="[object RegExp]"}_.isRegExp=s;function v(n){return m(n)==="object"&&n!==null}_.isObject=v;function c(n){return i(n)==="[object Date]"}_.isDate=c;function a(n){return i(n)==="[object Error]"||n instanceof Error}_.isError=a;function r(n){return typeof n=="function"}_.isFunction=r;function t(n){return n===null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||m(n)==="symbol"||typeof n>"u"}_.isPrimitive=t,_.isBuffer=u.isBuffer;function i(n){return Object.prototype.toString.call(n)}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":388}],329:[function(e,x,_){(function(u){var m=e("elliptic"),g=e("bn.js");x.exports=function(h){return new w(h)};var b={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};b.p224=b.secp224r1,b.p256=b.secp256r1=b.prime256v1,b.p192=b.secp192r1=b.prime192v1,b.p384=b.secp384r1,b.p521=b.secp521r1;function w(y){this.curveType=b[y],this.curveType||(this.curveType={name:y}),this.curve=new m.ec(this.curveType.name),this.keys=void 0}w.prototype.generateKeys=function(y,h){return this.keys=this.curve.genKeyPair(),this.getPublicKey(y,h)},w.prototype.computeSecret=function(y,h,l){h=h||"utf8",u.isBuffer(y)||(y=new u(y,h));var d=this.curve.keyFromPublic(y).getPublic(),s=d.mul(this.keys.getPrivate()).getX();return f(s,l,this.curveType.byteLength)},w.prototype.getPublicKey=function(y,h){var l=this.keys.getPublic(h==="compressed",!0);return h==="hybrid"&&(l[l.length-1]%2?l[0]=7:l[0]=6),f(l,y)},w.prototype.getPrivateKey=function(y){return f(this.keys.getPrivate(),y)},w.prototype.setPublicKey=function(y,h){return h=h||"utf8",u.isBuffer(y)||(y=new u(y,h)),this.keys._importPublic(y),this},w.prototype.setPrivateKey=function(y,h){h=h||"utf8",u.isBuffer(y)||(y=new u(y,h));var l=new g(y);return l=l.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(l),this};function f(y,h,l){Array.isArray(y)||(y=y.toArray());var d=new u(y);if(l&&d.lengthv){var c=d==="rmd160"?new f:y(d);s=c.update(s).digest()}else s.lengthw?h=y(h):h.length"u"?"undefined":u(_))=="object"&&typeof x<"u"?x.exports=g():m.dayjs=g()})(void 0,function(){var m="millisecond",g="second",b="minute",w="hour",f="day",y="week",h="month",l="quarter",d="year",s="date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d+)?$/,c=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=function(M,D,R){var P=String(M);return!P||P.length>=D?M:""+Array(D+1-P.length).join(R)+M},r={s:a,z:function(M){var D=-M.utcOffset(),R=Math.abs(D),P=Math.floor(R/60),E=R%60;return(D<=0?"+":"-")+a(P,2,"0")+":"+a(E,2,"0")},m:function F(M,D){if(M.date()"u"?"undefined":u(_))=="object"&&typeof x<"u"?x.exports=g():m.dayjs_plugin_customParseFormat=g()})(void 0,function(){var m,g=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,b=/\d\d/,w=/\d\d?/,f=/\d*[^\s\d-:/()]+/,y=function(c){return function(a){this[c]=+a}},h=[/[+-]\d\d:?\d\d/,function(v){var c,a;(this.zone||(this.zone={})).offset=(c=v.match(/([+-]|\d\d)/g),(a=60*c[1]+ +c[2])===0?0:c[0]==="+"?-a:a)}],l=function(c){var a=m[c];return a&&(a.indexOf?a:a.s.concat(a.f))},d={A:[/[AP]M/,function(v){this.afternoon=v==="PM"}],a:[/[ap]m/,function(v){this.afternoon=v==="pm"}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[b,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[w,y("seconds")],ss:[w,y("seconds")],m:[w,y("minutes")],mm:[w,y("minutes")],H:[w,y("hours")],h:[w,y("hours")],HH:[w,y("hours")],hh:[w,y("hours")],D:[w,y("day")],DD:[b,y("day")],Do:[f,function(v){var c=m.ordinal,a=v.match(/\d+/);if(this.day=a[0],c)for(var r=1;r<=31;r+=1)c(r).replace(/\[|\]/g,"")===v&&(this.day=r)}],M:[w,y("month")],MM:[b,y("month")],MMM:[f,function(v){var c=l("months"),a=(l("monthsShort")||c.map(function(r){return r.substr(0,3)})).indexOf(v)+1;if(a<1)throw new Error;this.month=a%12||a}],MMMM:[f,function(v){var c=l("months").indexOf(v)+1;if(c<1)throw new Error;this.month=c%12||c}],Y:[/[+-]?\d+/,y("year")],YY:[b,function(v){v=+v,this.year=v+(v>68?1900:2e3)}],YYYY:[/\d{4}/,y("year")],Z:h,ZZ:h},s=function(c,a,r){try{var t=function(W){for(var $=W.match(g),U=$.length,I=0;I0?n-1:F.getMonth());var P=p||0,E=O||0,A=C||0,z=N||0;return L?new Date(Date.UTC(D,R,M,P,E,A,z+60*L.offset*1e3)):r?new Date(Date.UTC(D,R,M,P,E,A,z)):new Date(D,R,M,P,E,A,z)}catch{return new Date("")}};return function(v,c,a){var r=c.prototype,t=r.parse;r.parse=function(i){var n=i.date,o=i.utc,p=i.args;this.$u=o;var O=p[1];if(typeof O=="string"){var C=p[2]===!0,N=p[3]===!0,L=C||N,F=p[2];N&&(F=p[2]),C||(m=F?a.Ls[F]:this.$locale()),this.$d=s(n,O,o),this.init(),F&&F!==!0&&(this.$L=this.locale(F).$L),L&&n!==this.format(O)&&(this.$d=new Date(""))}else if(O instanceof Array)for(var M=O.length,D=1;D<=M;D+=1){p[1]=O[D-1];var R=a.apply(this,p);if(R.isValid()){this.$d=R.$d,this.$L=R.$L,this.init();break}D===M&&(this.$d=new Date(""))}else t.call(this,i)}}})},{}],338:[function(e,x,_){function u(m){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(b){return typeof b}:u=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},u(m)}(function(m,g){(typeof _>"u"?"undefined":u(_))=="object"&&typeof x<"u"?x.exports=g():m.dayjs_plugin_utc=g()})(void 0,function(){return function(m,g,b){var w=new Date().getTimezoneOffset(),f=g.prototype;b.utc=function(c){return new g({date:c,utc:!0,args:arguments})},f.utc=function(){return b(this.toDate(),{locale:this.$L,utc:!0})},f.local=function(){return b(this.toDate(),{locale:this.$L,utc:!1})};var y=f.parse;f.parse=function(c){c.utc&&(this.$u=!0),this.$utils().u(c.$offset)||(this.$offset=c.$offset),y.call(this,c)};var h=f.init;f.init=function(){if(this.$u){var c=this.$d;this.$y=c.getUTCFullYear(),this.$M=c.getUTCMonth(),this.$D=c.getUTCDate(),this.$W=c.getUTCDay(),this.$H=c.getUTCHours(),this.$m=c.getUTCMinutes(),this.$s=c.getUTCSeconds(),this.$ms=c.getUTCMilliseconds()}else h.call(this)};var l=f.utcOffset;f.utcOffset=function(c,a){var r=this.$utils().u;if(r(c))return this.$u?0:r(this.$offset)?l.call(this):this.$offset;var t=Math.abs(c)<=16?60*c:c,i=this;return a?(i.$offset=t,i.$u=c===0,i):(c!==0?(i=this.local().add(t+w,"minute")).$offset=t:i=this.utc(),i)};var d=f.format;f.format=function(c){var a=c||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,a)},f.valueOf=function(){var c=this.$utils().u(this.$offset)?0:this.$offset+w;return this.$d.valueOf()-6e4*c},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var s=f.toDate;f.toDate=function(c){return c==="s"&&this.$offset?b(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():s.call(this)};var v=f.diff;f.diff=function(c,a,r){var t=this.local(),i=b(c).local();return v.call(t,i,a,r)}}})},{}],339:[function(e,x,_){_.utils=e("./des/utils"),_.Cipher=e("./des/cipher"),_.DES=e("./des/des"),_.CBC=e("./des/cbc"),_.EDE=e("./des/ede")},{"./des/cbc":340,"./des/cipher":341,"./des/des":342,"./des/ede":343,"./des/utils":344}],340:[function(e,x,_){var u=e("minimalistic-assert"),m=e("inherits"),g={};function b(f){u.equal(f.length,8,"Invalid IV length"),this.iv=new Array(8);for(var y=0;y0;y--)w+=this._buffer(b,w),f+=this._flushBuffer(h,f);return w+=this._buffer(b,w),h},m.prototype.final=function(b){var w;b&&(w=this.update(b));var f;return this.type==="encrypt"?f=this._finalEncrypt():f=this._finalDecrypt(),w?w.concat(f):f},m.prototype._pad=function(b,w){if(w===0)return!1;for(;w>>1];s=g.r28shl(s,a),v=g.r28shl(v,a),g.pc2(s,v,l.keys,c)}},f.prototype._update=function(l,d,s,v){var c=this._desState,a=g.readUInt32BE(l,d),r=g.readUInt32BE(l,d+4);g.ip(a,r,c.tmp,0),a=c.tmp[0],r=c.tmp[1],this.type==="encrypt"?this._encrypt(c,a,r,c.tmp,0):this._decrypt(c,a,r,c.tmp,0),a=c.tmp[0],r=c.tmp[1],g.writeUInt32BE(s,a,v),g.writeUInt32BE(s,r,v+4)},f.prototype._pad=function(l,d){for(var s=l.length-d,v=d;v>>0,a=O}g.rip(r,a,v,c)},f.prototype._decrypt=function(l,d,s,v,c){for(var a=s,r=d,t=l.keys.length-2;t>=0;t-=2){var i=l.keys[t],n=l.keys[t+1];g.expand(a,l.tmp,0),i^=l.tmp[0],n^=l.tmp[1];var o=g.substitute(i,n),p=g.permute(o),O=a;a=(r^p)>>>0,r=O}g.rip(a,r,v,c)}},{"./cipher":341,"./utils":344,inherits:387,"minimalistic-assert":437}],343:[function(e,x,_){var u=e("minimalistic-assert"),m=e("inherits"),g=e("./cipher"),b=e("./des");function w(y,h){u.equal(h.length,24,"Invalid key length");var l=h.slice(0,8),d=h.slice(8,16),s=h.slice(16,24);y==="encrypt"?this.ciphers=[b.create({type:"encrypt",key:l}),b.create({type:"decrypt",key:d}),b.create({type:"encrypt",key:s})]:this.ciphers=[b.create({type:"decrypt",key:s}),b.create({type:"encrypt",key:d}),b.create({type:"decrypt",key:l})]}function f(y){g.call(this,y);var h=new w(this.type,this.options.key);this._edeState=h}m(f,g),x.exports=f,f.create=function(h){return new f(h)},f.prototype._update=function(h,l,d,s){var v=this._edeState;v.ciphers[0]._update(h,l,d,s),v.ciphers[1]._update(d,s,d,s),v.ciphers[2]._update(d,s,d,s)},f.prototype._pad=b.prototype._pad,f.prototype._unpad=b.prototype._unpad},{"./cipher":341,"./des":342,inherits:387,"minimalistic-assert":437}],344:[function(e,x,_){_.readUInt32BE=function(w,f){var y=w[0+f]<<24|w[1+f]<<16|w[2+f]<<8|w[3+f];return y>>>0},_.writeUInt32BE=function(w,f,y){w[0+y]=f>>>24,w[1+y]=f>>>16&255,w[2+y]=f>>>8&255,w[3+y]=f&255},_.ip=function(w,f,y,h){for(var l=0,d=0,s=6;s>=0;s-=2){for(var v=0;v<=24;v+=8)l<<=1,l|=f>>>v+s&1;for(var v=0;v<=24;v+=8)l<<=1,l|=w>>>v+s&1}for(var s=6;s>=0;s-=2){for(var v=1;v<=25;v+=8)d<<=1,d|=f>>>v+s&1;for(var v=1;v<=25;v+=8)d<<=1,d|=w>>>v+s&1}y[h+0]=l>>>0,y[h+1]=d>>>0},_.rip=function(w,f,y,h){for(var l=0,d=0,s=0;s<4;s++)for(var v=24;v>=0;v-=8)l<<=1,l|=f>>>v+s&1,l<<=1,l|=w>>>v+s&1;for(var s=4;s<8;s++)for(var v=24;v>=0;v-=8)d<<=1,d|=f>>>v+s&1,d<<=1,d|=w>>>v+s&1;y[h+0]=l>>>0,y[h+1]=d>>>0},_.pc1=function(w,f,y,h){for(var l=0,d=0,s=7;s>=5;s--){for(var v=0;v<=24;v+=8)l<<=1,l|=f>>v+s&1;for(var v=0;v<=24;v+=8)l<<=1,l|=w>>v+s&1}for(var v=0;v<=24;v+=8)l<<=1,l|=f>>v+s&1;for(var s=1;s<=3;s++){for(var v=0;v<=24;v+=8)d<<=1,d|=f>>v+s&1;for(var v=0;v<=24;v+=8)d<<=1,d|=w>>v+s&1}for(var v=0;v<=24;v+=8)d<<=1,d|=w>>v+s&1;y[h+0]=l>>>0,y[h+1]=d>>>0},_.r28shl=function(w,f){return w<>>28-f};var u=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];_.pc2=function(w,f,y,h){for(var l=0,d=0,s=u.length>>>1,v=0;v>>u[v]&1;for(var v=s;v>>u[v]&1;y[h+0]=l>>>0,y[h+1]=d>>>0},_.expand=function(w,f,y){var h=0,l=0;h=(w&1)<<5|w>>>27;for(var d=23;d>=15;d-=4)h<<=6,h|=w>>>d&63;for(var d=11;d>=3;d-=4)l|=w>>>d&63,l<<=6;l|=(w&31)<<1|w>>>31,f[y+0]=h>>>0,f[y+1]=l>>>0};var m=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];_.substitute=function(w,f){for(var y=0,h=0;h<4;h++){var l=w>>>18-h*6&63,d=m[h*64+l];y<<=4,y|=d}for(var h=0;h<4;h++){var l=f>>>18-h*6&63,d=m[4*64+h*64+l];y<<=4,y|=d}return y>>>0};var g=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];_.permute=function(w){for(var f=0,y=0;y>>g[y]&1;return f>>>0},_.padSplit=function(w,f,y){for(var h=w.toString(2);h.lengthn;)p.ishrn(1);if(p.isEven()&&p.iadd(f),p.testn(1)||p.iadd(y),o.cmp(y)){if(!o.cmp(h))for(;p.mod(l).cmp(d);)p.iadd(v)}else for(;p.mod(g).cmp(s);)p.iadd(v);if(O=p.shrn(1),r(O)&&r(p)&&t(O)&&t(p)&&w.test(O)&&w.test(p))return p}}},{"bn.js":349,"miller-rabin":435,randombytes:475}],348:[function(e,x,_){x.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],349:[function(e,x,_){arguments[4][181][0].apply(_,arguments)},{buffer:185,dup:181}],350:[function(e,x,_){var u=_;u.version=e("../package.json").version,u.utils=e("./elliptic/utils"),u.rand=e("brorand"),u.curve=e("./elliptic/curve"),u.curves=e("./elliptic/curves"),u.ec=e("./elliptic/ec"),u.eddsa=e("./elliptic/eddsa")},{"../package.json":366,"./elliptic/curve":353,"./elliptic/curves":356,"./elliptic/ec":357,"./elliptic/eddsa":360,"./elliptic/utils":364,brorand:184}],351:[function(e,x,_){var u=e("bn.js"),m=e("../utils"),g=m.getNAF,b=m.getJSF,w=m.assert;function f(h,l){this.type=h,this.p=new u(l.p,16),this.red=l.prime?u.red(l.prime):u.mont(this.p),this.zero=new u(0).toRed(this.red),this.one=new u(1).toRed(this.red),this.two=new u(2).toRed(this.red),this.n=l.n&&new u(l.n,16),this.g=l.g&&this.pointFromJSON(l.g,l.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var d=this.n&&this.p.div(this.n);!d||d.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}x.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(l,d){w(l.precomputed);var s=l._getDoubles(),v=g(d,1,this._bitLength),c=(1<=r;d--)t=(t<<1)+v[d];a.push(t)}for(var i=this.jpoint(null,null,null),n=this.jpoint(null,null,null),o=c;o>0;o--){for(var r=0;r=0;t--){for(var d=0;t>=0&&a[t]===0;t--)d++;if(t>=0&&d++,r=r.dblp(d),t<0)break;var i=a[t];w(i!==0),l.type==="affine"?i>0?r=r.mixedAdd(c[i-1>>1]):r=r.mixedAdd(c[-i-1>>1].neg()):i>0?r=r.add(c[i-1>>1]):r=r.add(c[-i-1>>1].neg())}return l.type==="affine"?r.toP():r},f.prototype._wnafMulAdd=function(l,d,s,v,c){for(var a=this._wnafT1,r=this._wnafT2,t=this._wnafT3,i=0,n=0;n=1;n-=2){var O=n-1,C=n;if(a[O]!==1||a[C]!==1){t[O]=g(s[O],a[O],this._bitLength),t[C]=g(s[C],a[C],this._bitLength),i=Math.max(t[O].length,i),i=Math.max(t[C].length,i);continue}var N=[d[O],null,null,d[C]];d[O].y.cmp(d[C].y)===0?(N[1]=d[O].add(d[C]),N[2]=d[O].toJ().mixedAdd(d[C].neg())):d[O].y.cmp(d[C].y.redNeg())===0?(N[1]=d[O].toJ().mixedAdd(d[C]),N[2]=d[O].add(d[C].neg())):(N[1]=d[O].toJ().mixedAdd(d[C]),N[2]=d[O].toJ().mixedAdd(d[C].neg()));var L=[-3,-1,-5,-7,0,7,5,1,3],F=b(s[O],s[C]);i=Math.max(F[0].length,i),t[O]=new Array(i),t[C]=new Array(i);for(var M=0;M=0;n--){for(var A=0;n>=0;){for(var z=!0,M=0;M=0&&A++,P=P.dblp(A),n<0)break;for(var M=0;M0?o=r[M][W-1>>1]:W<0&&(o=r[M][-W-1>>1].neg()),o.type==="affine"?P=P.mixedAdd(o):P=P.add(o))}}for(var n=0;n=Math.ceil((l.bitLength()+1)/d.step):!1},y.prototype._getDoubles=function(l,d){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var s=[this],v=this,c=0;c":""},y.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},y.prototype._extDbl=function(){var l=this.x.redSqr(),d=this.y.redSqr(),s=this.z.redSqr();s=s.redIAdd(s);var v=this.curve._mulA(l),c=this.x.redAdd(this.y).redSqr().redISub(l).redISub(d),a=v.redAdd(d),r=a.redSub(s),t=v.redSub(d),i=c.redMul(r),n=a.redMul(t),o=c.redMul(t),p=r.redMul(a);return this.curve.point(i,n,p,o)},y.prototype._projDbl=function(){var l=this.x.redAdd(this.y).redSqr(),d=this.x.redSqr(),s=this.y.redSqr(),v,c,a;if(this.curve.twisted){var r=this.curve._mulA(d),t=r.redAdd(s);if(this.zOne)v=l.redSub(d).redSub(s).redMul(t.redSub(this.curve.two)),c=t.redMul(r.redSub(s)),a=t.redSqr().redSub(t).redSub(t);else{var i=this.z.redSqr(),n=t.redSub(i).redISub(i);v=l.redSub(d).redISub(s).redMul(n),c=t.redMul(r.redSub(s)),a=t.redMul(n)}}else{var r=d.redAdd(s),i=this.curve._mulC(this.z).redSqr(),n=r.redSub(i).redSub(i);v=this.curve._mulC(l.redISub(r)).redMul(n),c=this.curve._mulC(r).redMul(d.redISub(s)),a=r.redMul(n)}return this.curve.point(v,c,a)},y.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},y.prototype._extAdd=function(l){var d=this.y.redSub(this.x).redMul(l.y.redSub(l.x)),s=this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)),v=this.t.redMul(this.curve.dd).redMul(l.t),c=this.z.redMul(l.z.redAdd(l.z)),a=s.redSub(d),r=c.redSub(v),t=c.redAdd(v),i=s.redAdd(d),n=a.redMul(r),o=t.redMul(i),p=a.redMul(i),O=r.redMul(t);return this.curve.point(n,o,O,p)},y.prototype._projAdd=function(l){var d=this.z.redMul(l.z),s=d.redSqr(),v=this.x.redMul(l.x),c=this.y.redMul(l.y),a=this.curve.d.redMul(v).redMul(c),r=s.redSub(a),t=s.redAdd(a),i=this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(v).redISub(c),n=d.redMul(r).redMul(i),o,p;return this.curve.twisted?(o=d.redMul(t).redMul(c.redSub(this.curve._mulA(v))),p=r.redMul(t)):(o=d.redMul(t).redMul(c.redSub(v)),p=this.curve._mulC(r).redMul(t)),this.curve.point(n,o,p)},y.prototype.add=function(l){return this.isInfinity()?l:l.isInfinity()?this:this.curve.extended?this._extAdd(l):this._projAdd(l)},y.prototype.mul=function(l){return this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve._wnafMul(this,l)},y.prototype.mulAdd=function(l,d,s){return this.curve._wnafMulAdd(1,[this,d],[l,s],2,!1)},y.prototype.jmulAdd=function(l,d,s){return this.curve._wnafMulAdd(1,[this,d],[l,s],2,!0)},y.prototype.normalize=function(){if(this.zOne)return this;var l=this.z.redInvm();return this.x=this.x.redMul(l),this.y=this.y.redMul(l),this.t&&(this.t=this.t.redMul(l)),this.z=this.curve.one,this.zOne=!0,this},y.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},y.prototype.getX=function(){return this.normalize(),this.x.fromRed()},y.prototype.getY=function(){return this.normalize(),this.y.fromRed()},y.prototype.eq=function(l){return this===l||this.getX().cmp(l.getX())===0&&this.getY().cmp(l.getY())===0},y.prototype.eqXToP=function(l){var d=l.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(d)===0)return!0;for(var s=l.clone(),v=this.curve.redN.redMul(this.z);;){if(s.iadd(this.curve.n),s.cmp(this.curve.p)>=0)return!1;if(d.redIAdd(v),this.x.cmp(d)===0)return!0}},y.prototype.toP=y.prototype.normalize,y.prototype.mixedAdd=y.prototype.add},{"../utils":364,"./base":351,"bn.js":365,inherits:387}],353:[function(e,x,_){var u=_;u.base=e("./base"),u.short=e("./short"),u.mont=e("./mont"),u.edwards=e("./edwards")},{"./base":351,"./edwards":352,"./mont":354,"./short":355}],354:[function(e,x,_){var u=e("bn.js"),m=e("inherits"),g=e("./base"),b=e("../utils");function w(y){g.call(this,"mont",y),this.a=new u(y.a,16).toRed(this.red),this.b=new u(y.b,16).toRed(this.red),this.i4=new u(4).toRed(this.red).redInvm(),this.two=new u(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}m(w,g),x.exports=w,w.prototype.validate=function(h){var l=h.normalize().x,d=l.redSqr(),s=d.redMul(l).redAdd(d.redMul(this.a)).redAdd(l),v=s.redSqrt();return v.redSqr().cmp(s)===0};function f(y,h,l){g.BasePoint.call(this,y,"projective"),h===null&&l===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new u(h,16),this.z=new u(l,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}m(f,g.BasePoint),w.prototype.decodePoint=function(h,l){return this.point(b.toArray(h,l),1)},w.prototype.point=function(h,l){return new f(this,h,l)},w.prototype.pointFromJSON=function(h){return f.fromJSON(this,h)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(h,l){return new f(h,l[0],l[1]||h.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return this.z.cmpn(0)===0},f.prototype.dbl=function(){var h=this.x.redAdd(this.z),l=h.redSqr(),d=this.x.redSub(this.z),s=d.redSqr(),v=l.redSub(s),c=l.redMul(s),a=v.redMul(s.redAdd(this.curve.a24.redMul(v)));return this.curve.point(c,a)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(h,l){var d=this.x.redAdd(this.z),s=this.x.redSub(this.z),v=h.x.redAdd(h.z),c=h.x.redSub(h.z),a=c.redMul(d),r=v.redMul(s),t=l.z.redMul(a.redAdd(r).redSqr()),i=l.x.redMul(a.redISub(r).redSqr());return this.curve.point(t,i)},f.prototype.mul=function(h){for(var l=h.clone(),d=this,s=this.curve.point(null,null),v=this,c=[];l.cmpn(0)!==0;l.iushrn(1))c.push(l.andln(1));for(var a=c.length-1;a>=0;a--)c[a]===0?(d=d.diffAdd(s,v),s=s.dbl()):(s=d.diffAdd(s,v),d=d.dbl());return s},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(h){return this.getX().cmp(h.getX())===0},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":364,"./base":351,"bn.js":365,inherits:387}],355:[function(e,x,_){var u=e("../utils"),m=e("bn.js"),g=e("inherits"),b=e("./base"),w=u.assert;function f(l){b.call(this,"short",l),this.a=new m(l.a,16).toRed(this.red),this.b=new m(l.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(l),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}g(f,b),x.exports=f,f.prototype._getEndomorphism=function(d){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var s,v;if(d.beta)s=new m(d.beta,16).toRed(this.red);else{var c=this._getEndoRoots(this.p);s=c[0].cmp(c[1])<0?c[0]:c[1],s=s.toRed(this.red)}if(d.lambda)v=new m(d.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(s))===0?v=a[0]:(v=a[1],w(this.g.mul(v).x.cmp(this.g.x.redMul(s))===0))}var r;return d.basis?r=d.basis.map(function(t){return{a:new m(t.a,16),b:new m(t.b,16)}}):r=this._getEndoBasis(v),{beta:s,lambda:v,basis:r}}},f.prototype._getEndoRoots=function(d){var s=d===this.p?this.red:m.mont(d),v=new m(2).toRed(s).redInvm(),c=v.redNeg(),a=new m(3).toRed(s).redNeg().redSqrt().redMul(v),r=c.redAdd(a).fromRed(),t=c.redSub(a).fromRed();return[r,t]},f.prototype._getEndoBasis=function(d){for(var s=this.n.ushrn(Math.floor(this.n.bitLength()/2)),v=d,c=this.n.clone(),a=new m(1),r=new m(0),t=new m(0),i=new m(1),n,o,p,O,C,N,L,F=0,M,D;v.cmpn(0)!==0;){var R=c.div(v);M=c.sub(R.mul(v)),D=t.sub(R.mul(a));var P=i.sub(R.mul(r));if(!p&&M.cmp(s)<0)n=L.neg(),o=a,p=M.neg(),O=D;else if(p&&++F===2)break;L=M,c=v,v=M,t=a,a=D,i=r,r=P}C=M.neg(),N=D;var E=p.sqr().add(O.sqr()),A=C.sqr().add(N.sqr());return A.cmp(E)>=0&&(C=n,N=o),p.negative&&(p=p.neg(),O=O.neg()),C.negative&&(C=C.neg(),N=N.neg()),[{a:p,b:O},{a:C,b:N}]},f.prototype._endoSplit=function(d){var s=this.endo.basis,v=s[0],c=s[1],a=c.b.mul(d).divRound(this.n),r=v.b.neg().mul(d).divRound(this.n),t=a.mul(v.a),i=r.mul(c.a),n=a.mul(v.b),o=r.mul(c.b),p=d.sub(t).sub(i),O=n.add(o).neg();return{k1:p,k2:O}},f.prototype.pointFromX=function(d,s){d=new m(d,16),d.red||(d=d.toRed(this.red));var v=d.redSqr().redMul(d).redIAdd(d.redMul(this.a)).redIAdd(this.b),c=v.redSqrt();if(c.redSqr().redSub(v).cmp(this.zero)!==0)throw new Error("invalid point");var a=c.fromRed().isOdd();return(s&&!a||!s&&a)&&(c=c.redNeg()),this.point(d,c)},f.prototype.validate=function(d){if(d.inf)return!0;var s=d.x,v=d.y,c=this.a.redMul(s),a=s.redSqr().redMul(s).redIAdd(c).redIAdd(this.b);return v.redSqr().redISub(a).cmpn(0)===0},f.prototype._endoWnafMulAdd=function(d,s,v){for(var c=this._endoWnafT1,a=this._endoWnafT2,r=0;r":""},y.prototype.isInfinity=function(){return this.inf},y.prototype.add=function(d){if(this.inf)return d;if(d.inf)return this;if(this.eq(d))return this.dbl();if(this.neg().eq(d))return this.curve.point(null,null);if(this.x.cmp(d.x)===0)return this.curve.point(null,null);var s=this.y.redSub(d.y);s.cmpn(0)!==0&&(s=s.redMul(this.x.redSub(d.x).redInvm()));var v=s.redSqr().redISub(this.x).redISub(d.x),c=s.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,c)},y.prototype.dbl=function(){if(this.inf)return this;var d=this.y.redAdd(this.y);if(d.cmpn(0)===0)return this.curve.point(null,null);var s=this.curve.a,v=this.x.redSqr(),c=d.redInvm(),a=v.redAdd(v).redIAdd(v).redIAdd(s).redMul(c),r=a.redSqr().redISub(this.x.redAdd(this.x)),t=a.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,t)},y.prototype.getX=function(){return this.x.fromRed()},y.prototype.getY=function(){return this.y.fromRed()},y.prototype.mul=function(d){return d=new m(d,16),this.isInfinity()?this:this._hasDoubles(d)?this.curve._fixedNafMul(this,d):this.curve.endo?this.curve._endoWnafMulAdd([this],[d]):this.curve._wnafMul(this,d)},y.prototype.mulAdd=function(d,s,v){var c=[this,s],a=[d,v];return this.curve.endo?this.curve._endoWnafMulAdd(c,a):this.curve._wnafMulAdd(1,c,a,2)},y.prototype.jmulAdd=function(d,s,v){var c=[this,s],a=[d,v];return this.curve.endo?this.curve._endoWnafMulAdd(c,a,!0):this.curve._wnafMulAdd(1,c,a,2,!0)},y.prototype.eq=function(d){return this===d||this.inf===d.inf&&(this.inf||this.x.cmp(d.x)===0&&this.y.cmp(d.y)===0)},y.prototype.neg=function(d){if(this.inf)return this;var s=this.curve.point(this.x,this.y.redNeg());if(d&&this.precomputed){var v=this.precomputed,c=function(r){return r.neg()};s.precomputed={naf:v.naf&&{wnd:v.naf.wnd,points:v.naf.points.map(c)},doubles:v.doubles&&{step:v.doubles.step,points:v.doubles.points.map(c)}}}return s},y.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var d=this.curve.jpoint(this.x,this.y,this.curve.one);return d};function h(l,d,s,v){b.BasePoint.call(this,l,"jacobian"),d===null&&s===null&&v===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new m(0)):(this.x=new m(d,16),this.y=new m(s,16),this.z=new m(v,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}g(h,b.BasePoint),f.prototype.jpoint=function(d,s,v){return new h(this,d,s,v)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var d=this.z.redInvm(),s=d.redSqr(),v=this.x.redMul(s),c=this.y.redMul(s).redMul(d);return this.curve.point(v,c)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(d){if(this.isInfinity())return d;if(d.isInfinity())return this;var s=d.z.redSqr(),v=this.z.redSqr(),c=this.x.redMul(s),a=d.x.redMul(v),r=this.y.redMul(s.redMul(d.z)),t=d.y.redMul(v.redMul(this.z)),i=c.redSub(a),n=r.redSub(t);if(i.cmpn(0)===0)return n.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var o=i.redSqr(),p=o.redMul(i),O=c.redMul(o),C=n.redSqr().redIAdd(p).redISub(O).redISub(O),N=n.redMul(O.redISub(C)).redISub(r.redMul(p)),L=this.z.redMul(d.z).redMul(i);return this.curve.jpoint(C,N,L)},h.prototype.mixedAdd=function(d){if(this.isInfinity())return d.toJ();if(d.isInfinity())return this;var s=this.z.redSqr(),v=this.x,c=d.x.redMul(s),a=this.y,r=d.y.redMul(s).redMul(this.z),t=v.redSub(c),i=a.redSub(r);if(t.cmpn(0)===0)return i.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var n=t.redSqr(),o=n.redMul(t),p=v.redMul(n),O=i.redSqr().redIAdd(o).redISub(p).redISub(p),C=i.redMul(p.redISub(O)).redISub(a.redMul(o)),N=this.z.redMul(t);return this.curve.jpoint(O,C,N)},h.prototype.dblp=function(d){if(d===0)return this;if(this.isInfinity())return this;if(!d)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var s=this,v=0;v=0)return!1;if(v.redIAdd(a),this.x.cmp(v)===0)return!0}},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../utils":364,"./base":351,"bn.js":365,inherits:387}],356:[function(e,x,_){var u=_,m=e("hash.js"),g=e("./curve"),b=e("./utils"),w=b.assert;function f(l){l.type==="short"?this.curve=new g.short(l):l.type==="edwards"?this.curve=new g.edwards(l):this.curve=new g.mont(l),this.g=this.curve.g,this.n=this.curve.n,this.hash=l.hash,w(this.g.validate(),"Invalid curve"),w(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}u.PresetCurve=f;function y(l,d){Object.defineProperty(u,l,{configurable:!0,enumerable:!0,get:function(){var v=new f(d);return Object.defineProperty(u,l,{configurable:!0,enumerable:!0,value:v}),v}})}y("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:m.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),y("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:m.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),y("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:m.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),y("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:m.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),y("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:m.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),y("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:m.sha256,gRed:!1,g:["9"]}),y("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:m.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var h;try{h=e("./precomputed/secp256k1")}catch{h=void 0}y("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:m.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",h]})},{"./curve":353,"./precomputed/secp256k1":363,"./utils":364,"hash.js":372}],357:[function(e,x,_){function u(s){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(c){return typeof c}:u=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},u(s)}var m=e("bn.js"),g=e("hmac-drbg"),b=e("../utils"),w=e("../curves"),f=e("brorand"),y=b.assert,h=e("./key"),l=e("./signature");function d(s){if(!(this instanceof d))return new d(s);typeof s=="string"&&(y(w.hasOwnProperty(s),"Unknown curve "+s),s=w[s]),s instanceof w.PresetCurve&&(s={curve:s}),this.curve=s.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=s.curve.g,this.g.precompute(s.curve.n.bitLength()+1),this.hash=s.hash||s.curve.hash}x.exports=d,d.prototype.keyPair=function(v){return new h(this,v)},d.prototype.keyFromPrivate=function(v,c){return h.fromPrivate(this,v,c)},d.prototype.keyFromPublic=function(v,c){return h.fromPublic(this,v,c)},d.prototype.genKeyPair=function(v){v||(v={});var c=new g({hash:this.hash,pers:v.pers,persEnc:v.persEnc||"utf8",entropy:v.entropy||f(this.hash.hmacStrength),entropyEnc:v.entropy&&v.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),r=this.n.sub(new m(2));do{var t=new m(c.generate(a));if(!(t.cmp(r)>0))return t.iaddn(1),this.keyFromPrivate(t)}while(!0)},d.prototype._truncateToN=function(v,c){var a=v.byteLength()*8-this.n.bitLength();return a>0&&(v=v.ushrn(a)),!c&&v.cmp(this.n)>=0?v.sub(this.n):v},d.prototype.sign=function(v,c,a,r){u(a)==="object"&&(r=a,a=null),r||(r={}),c=this.keyFromPrivate(c,a),v=this._truncateToN(new m(v,16));for(var t=this.n.byteLength(),i=c.getPrivate().toArray("be",t),n=v.toArray("be",t),o=new g({hash:this.hash,entropy:i,nonce:n,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new m(1)),O=0;;O++){var C=r.k?r.k(O):new m(o.generate(this.n.byteLength()));if(C=this._truncateToN(C,!0),!(C.cmpn(1)<=0||C.cmp(p)>=0)){var N=this.g.mul(C);if(!N.isInfinity()){var L=N.getX(),F=L.umod(this.n);if(F.cmpn(0)!==0){var M=C.invm(this.n).mul(F.mul(c.getPrivate()).iadd(v));if(M=M.umod(this.n),M.cmpn(0)!==0){var D=(N.getY().isOdd()?1:0)|(L.cmp(F)!==0?2:0);return r.canonical&&M.cmp(this.nh)>0&&(M=this.n.sub(M),D^=1),new l({r:F,s:M,recoveryParam:D})}}}}}},d.prototype.verify=function(v,c,a,r){v=this._truncateToN(new m(v,16)),a=this.keyFromPublic(a,r),c=new l(c,"hex");var t=c.r,i=c.s;if(t.cmpn(1)<0||t.cmp(this.n)>=0||i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var n=i.invm(this.n),o=n.mul(v).umod(this.n),p=n.mul(t).umod(this.n);if(!this.curve._maxwellTrick){var O=this.g.mulAdd(o,a.getPublic(),p);return O.isInfinity()?!1:O.getX().umod(this.n).cmp(t)===0}var O=this.g.jmulAdd(o,a.getPublic(),p);return O.isInfinity()?!1:O.eqXToP(t)},d.prototype.recoverPubKey=function(s,v,c,a){y((3&c)===c,"The recovery param is more than two bits"),v=new l(v,a);var r=this.n,t=new m(s),i=v.r,n=v.s,o=c&1,p=c>>1;if(i.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");p?i=this.curve.pointFromX(i.add(this.curve.n),o):i=this.curve.pointFromX(i,o);var O=v.r.invm(r),C=r.sub(t).mul(O).umod(r),N=n.mul(O).umod(r);return this.g.mulAdd(C,i,N)},d.prototype.getKeyRecoveryParam=function(s,v,c,a){if(v=new l(v,a),v.recoveryParam!==null)return v.recoveryParam;for(var r=0;r<4;r++){var t;try{t=this.recoverPubKey(s,v,r)}catch{continue}if(t.eq(c))return r}throw new Error("Unable to find valid recovery factor")}},{"../curves":356,"../utils":364,"./key":358,"./signature":359,"bn.js":365,brorand:184,"hmac-drbg":384}],358:[function(e,x,_){var u=e("bn.js"),m=e("../utils"),g=m.assert;function b(w,f){this.ec=w,this.priv=null,this.pub=null,f.priv&&this._importPrivate(f.priv,f.privEnc),f.pub&&this._importPublic(f.pub,f.pubEnc)}x.exports=b,b.fromPublic=function(f,y,h){return y instanceof b?y:new b(f,{pub:y,pubEnc:h})},b.fromPrivate=function(f,y,h){return y instanceof b?y:new b(f,{priv:y,privEnc:h})},b.prototype.validate=function(){var f=this.getPublic();return f.isInfinity()?{result:!1,reason:"Invalid public key"}:f.validate()?f.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},b.prototype.getPublic=function(f,y){return typeof f=="string"&&(y=f,f=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),y?this.pub.encode(y,f):this.pub},b.prototype.getPrivate=function(f){return f==="hex"?this.priv.toString(16,2):this.priv},b.prototype._importPrivate=function(f,y){this.priv=new u(f,y||16),this.priv=this.priv.umod(this.ec.curve.n)},b.prototype._importPublic=function(f,y){if(f.x||f.y){this.ec.curve.type==="mont"?g(f.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&g(f.x&&f.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(f.x,f.y);return}this.pub=this.ec.curve.decodePoint(f,y)},b.prototype.derive=function(f){return f.mul(this.priv).getX()},b.prototype.sign=function(f,y,h){return this.ec.sign(f,this,y,h)},b.prototype.verify=function(f,y){return this.ec.verify(f,y,this)},b.prototype.inspect=function(){return""}},{"../utils":364,"bn.js":365}],359:[function(e,x,_){var u=e("bn.js"),m=e("../utils"),g=m.assert;function b(l,d){if(l instanceof b)return l;this._importDER(l,d)||(g(l.r&&l.s,"Signature without r or s"),this.r=new u(l.r,16),this.s=new u(l.s,16),l.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=l.recoveryParam)}x.exports=b;function w(){this.place=0}function f(l,d){var s=l[d.place++];if(!(s&128))return s;var v=s&15;if(v===0||v>4)return!1;for(var c=0,a=0,r=d.place;a>>=0;return c<=127?!1:(d.place=r,c)}function y(l){for(var d=0,s=l.length-1;!l[d]&&!(l[d+1]&128)&&d>>3);for(l.push(s|128);--s;)l.push(d>>>(s<<3)&255);l.push(d)}b.prototype.toDER=function(d){var s=this.r.toArray(),v=this.s.toArray();for(s[0]&128&&(s=[0].concat(s)),v[0]&128&&(v=[0].concat(v)),s=y(s),v=y(v);!v[0]&&!(v[1]&128);)v=v.slice(1);var c=[2];h(c,s.length),c=c.concat(s),c.push(2),h(c,v.length);var a=c.concat(v),r=[48];return h(r,a.length),r=r.concat(a),m.encode(r,d)}},{"../utils":364,"bn.js":365}],360:[function(e,x,_){var u=e("hash.js"),m=e("../curves"),g=e("../utils"),b=g.assert,w=g.parseBytes,f=e("./key"),y=e("./signature");function h(d){if(b(d==="ed25519","only tested with ed25519 so far"),!(this instanceof h))return new h(d);var d=m[d].curve;this.curve=d,this.g=d.g,this.g.precompute(d.n.bitLength()+1),this.pointClass=d.point().constructor,this.encodingLength=Math.ceil(d.n.bitLength()/8),this.hash=u.sha512}x.exports=h,h.prototype.sign=function(d,s){d=w(d);var v=this.keyFromSecret(s),c=this.hashInt(v.messagePrefix(),d),a=this.g.mul(c),r=this.encodePoint(a),t=this.hashInt(r,v.pubBytes(),d).mul(v.priv()),i=c.add(t).umod(this.curve.n);return this.makeSignature({R:a,S:i,Rencoded:r})},h.prototype.verify=function(d,s,v){d=w(d),s=this.makeSignature(s);var c=this.keyFromPublic(v),a=this.hashInt(s.Rencoded(),c.pubBytes(),d),r=this.g.mul(s.S()),t=s.R().add(c.pub().mul(a));return t.eq(r)},h.prototype.hashInt=function(){for(var d=this.hash(),s=0;s(a>>1)-1?i=(a>>1)-n:i=n,r.isubn(i)):i=0,c[t]=i,r.iushrn(1)}return c}u.getNAF=w;function f(d,s){var v=[[],[]];d=d.clone(),s=s.clone();for(var c=0,a=0;d.cmpn(-c)>0||s.cmpn(-a)>0;){var r=d.andln(3)+c&3,t=s.andln(3)+a&3;r===3&&(r=-1),t===3&&(t=-1);var i;if(!(r&1))i=0;else{var n=d.andln(7)+c&7;(n===3||n===5)&&t===2?i=-r:i=r}v[0].push(i);var o;if(!(t&1))o=0;else{var n=s.andln(7)+a&7;(n===3||n===5)&&r===2?o=-t:o=t}v[1].push(o),2*c===i+1&&(c=1-c),2*a===o+1&&(a=1-a),d.iushrn(1),s.iushrn(1)}return v}u.getJSF=f;function y(d,s,v){var c="_"+s;d.prototype[s]=function(){return this[c]!==void 0?this[c]:this[c]=v.call(this)}}u.cachedProperty=y;function h(d){return typeof d=="string"?u.toArray(d,"hex"):d}u.parseBytes=h;function l(d){return new m(d,"hex","le")}u.intFromLE=l},{"bn.js":365,"minimalistic-assert":437,"minimalistic-crypto-utils":438}],365:[function(e,x,_){arguments[4][181][0].apply(_,arguments)},{buffer:185,dup:181}],366:[function(e,x,_){x.exports={_from:"elliptic@^6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.5.3",saveSpec:null,fetchSpec:"^6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_shasum:"cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6",_spec:"elliptic@^6.5.3",_where:"/mnt/d/dev/git/exceljs/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.5.3"}},{}],367:[function(e,x,_){function u(M){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(R){return typeof R}:u=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},u(M)}var m=Object.create||N,g=Object.keys||L,b=Function.prototype.bind||F;function w(){(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events"))&&(this._events=m(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}x.exports=w,w.EventEmitter=w,w.prototype._events=void 0,w.prototype._maxListeners=void 0;var f=10,y;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),y=h.x===0}catch{y=!1}y?Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(D){if(typeof D!="number"||D<0||D!==D)throw new TypeError('"defaultMaxListeners" must be a positive number');f=D}}):w.defaultMaxListeners=f,w.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||isNaN(D))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=D,this};function l(M){return M._maxListeners===void 0?w.defaultMaxListeners:M._maxListeners}w.prototype.getMaxListeners=function(){return l(this)};function d(M,D,R){if(D)M.call(R);else for(var P=M.length,E=O(M,P),A=0;A1&&(R=arguments[1]),R instanceof Error)throw R;var U=new Error('Unhandled "error" event. ('+R+")");throw U.context=R,U}if(P=W[D],!P)return!1;var I=typeof P=="function";switch(E=arguments.length,E){case 1:d(P,I,this);break;case 2:s(P,I,this,arguments[1]);break;case 3:v(P,I,this,arguments[1],arguments[2]);break;case 4:c(P,I,this,arguments[1],arguments[2],arguments[3]);break;default:for(A=new Array(E-1),z=1;z0&&z.length>E)){z.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+z.length+' "'+String(D)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');W.name="MaxListenersExceededWarning",W.emitter=M,W.type=D,W.count=z.length,(typeof console>"u"?"undefined":u(console))==="object"&&console.warn&&console.warn("%s: %s",W.name,W.message)}return M}w.prototype.addListener=function(D,R){return r(this,D,R,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(D,R){return r(this,D,R,!0)};function t(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var M=new Array(arguments.length),D=0;D=0;z--)if(P[z]===R||P[z].listener===R){W=P[z].listener,A=z;break}if(A<0)return this;A===0?P.shift():p(P,A),P.length===1&&(E[D]=P[0]),E.removeListener&&this.emit("removeListener",D,W||R)}return this},w.prototype.removeAllListeners=function(D){var R,P,E;if(P=this._events,!P)return this;if(!P.removeListener)return arguments.length===0?(this._events=m(null),this._eventsCount=0):P[D]&&(--this._eventsCount===0?this._events=m(null):delete P[D]),this;if(arguments.length===0){var A=g(P),z;for(E=0;E=0;E--)this.removeListener(D,R[E]);return this};function n(M,D,R){var P=M._events;if(!P)return[];var E=P[D];return E?typeof E=="function"?R?[E.listener||E]:[E]:R?C(E):O(E,E.length):[]}w.prototype.listeners=function(D){return n(this,D,!0)},w.prototype.rawListeners=function(D){return n(this,D,!1)},w.listenerCount=function(M,D){return typeof M.listenerCount=="function"?M.listenerCount(D):o.call(M,D)},w.prototype.listenerCount=o;function o(M){var D=this._events;if(D){var R=D[M];if(typeof R=="function")return 1;if(R)return R.length}return 0}w.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function p(M,D){for(var R=D,P=R+1,E=M.length;P0||y>0;){var v=new m;v.update(s),v.update(b),w&&v.update(w),s=v.digest();var c=0;if(h>0){var a=l.length-h;c=Math.min(h,s.length),s.copy(l,a,0,c),h-=c}if(c0){var r=d.length-y,t=Math.min(y,s.length-c);s.copy(d,r,c,c+t),y-=t}}return s.fill(0),{key:l,iv:d}}x.exports=g},{"md5.js":434,"safe-buffer":494}],369:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0});var u=e("@fast-csv/format");Object.defineProperty(_,"format",{enumerable:!0,get:function(){return u.format}}),Object.defineProperty(_,"write",{enumerable:!0,get:function(){return u.write}}),Object.defineProperty(_,"writeToStream",{enumerable:!0,get:function(){return u.writeToStream}}),Object.defineProperty(_,"writeToBuffer",{enumerable:!0,get:function(){return u.writeToBuffer}}),Object.defineProperty(_,"writeToString",{enumerable:!0,get:function(){return u.writeToString}}),Object.defineProperty(_,"writeToPath",{enumerable:!0,get:function(){return u.writeToPath}}),Object.defineProperty(_,"CsvFormatterStream",{enumerable:!0,get:function(){return u.CsvFormatterStream}}),Object.defineProperty(_,"FormatterOptions",{enumerable:!0,get:function(){return u.FormatterOptions}});var m=e("@fast-csv/parse");Object.defineProperty(_,"parse",{enumerable:!0,get:function(){return m.parse}}),Object.defineProperty(_,"parseString",{enumerable:!0,get:function(){return m.parseString}}),Object.defineProperty(_,"parseStream",{enumerable:!0,get:function(){return m.parseStream}}),Object.defineProperty(_,"parseFile",{enumerable:!0,get:function(){return m.parseFile}}),Object.defineProperty(_,"ParserOptions",{enumerable:!0,get:function(){return m.ParserOptions}}),Object.defineProperty(_,"CsvParserStream",{enumerable:!0,get:function(){return m.CsvParserStream}})},{"@fast-csv/format":148,"@fast-csv/parse":152}],370:[function(e,x,_){var u=e("safe-buffer").Buffer,m=e("readable-stream").Transform,g=e("inherits");function b(f,y){if(!u.isBuffer(f)&&typeof f!="string")throw new TypeError(y+" must be a string or a buffer")}function w(f){m.call(this),this._block=u.allocUnsafe(f),this._blockSize=f,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}g(w,m),w.prototype._transform=function(f,y,h){var l=null;try{this.update(f,y)}catch(d){l=d}h(l)},w.prototype._flush=function(f){var y=null;try{this.push(this.digest())}catch(h){y=h}f(y)},w.prototype.update=function(f,y){if(b(f,"Data"),this._finalized)throw new Error("Digest already called");u.isBuffer(f)||(f=u.from(f,y));for(var h=this._block,l=0;this._blockOffset+f.length-l>=this._blockSize;){for(var d=this._blockOffset;d0;++s)this._length[s]+=v,v=this._length[s]/4294967296|0,v>0&&(this._length[s]-=4294967296*v);return this},w.prototype._update=function(){throw new Error("_update is not implemented")},w.prototype.digest=function(f){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var y=this._digest();f!==void 0&&(y=y.toString(f)),this._block.fill(0),this._blockOffset=0;for(var h=0;h<4;++h)this._length[h]=0;return y},w.prototype._digest=function(){throw new Error("_digest is not implemented")},x.exports=w},{inherits:387,"readable-stream":491,"safe-buffer":371}],371:[function(e,x,_){arguments[4][214][0].apply(_,arguments)},{buffer:216,dup:214}],372:[function(e,x,_){var u=_;u.utils=e("./hash/utils"),u.common=e("./hash/common"),u.sha=e("./hash/sha"),u.ripemd=e("./hash/ripemd"),u.hmac=e("./hash/hmac"),u.sha1=u.sha.sha1,u.sha256=u.sha.sha256,u.sha224=u.sha.sha224,u.sha384=u.sha.sha384,u.sha512=u.sha.sha512,u.ripemd160=u.ripemd.ripemd160},{"./hash/common":373,"./hash/hmac":374,"./hash/ripemd":375,"./hash/sha":376,"./hash/utils":383}],373:[function(e,x,_){var u=e("./utils"),m=e("minimalistic-assert");function g(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}_.BlockHash=g,g.prototype.update=function(w,f){if(w=u.toArray(w,f),this.pending?this.pending=this.pending.concat(w):this.pending=w,this.pendingTotal+=w.length,this.pending.length>=this._delta8){w=this.pending;var y=w.length%this._delta8;this.pending=w.slice(w.length-y,w.length),this.pending.length===0&&(this.pending=null),w=u.join32(w,0,w.length-y,this.endian);for(var h=0;h>>24&255,h[l++]=w>>>16&255,h[l++]=w>>>8&255,h[l++]=w&255}else for(h[l++]=w&255,h[l++]=w>>>8&255,h[l++]=w>>>16&255,h[l++]=w>>>24&255,h[l++]=0,h[l++]=0,h[l++]=0,h[l++]=0,d=8;dthis.blockSize&&(w=new this.Hash().update(w).digest()),m(w.length<=this.blockSize);for(var f=w.length;f>>3}_.g0_256=l;function d(s){return m(s,17)^m(s,19)^s>>>10}_.g1_256=d},{"../utils":383}],383:[function(e,x,_){var u=e("minimalistic-assert"),m=e("inherits");_.inherits=m;function g(P,E){return(P.charCodeAt(E)&64512)!==55296||E<0||E+1>=P.length?!1:(P.charCodeAt(E+1)&64512)===56320}function b(P,E){if(Array.isArray(P))return P.slice();if(!P)return[];var A=[];if(typeof P=="string")if(E){if(E==="hex")for(P=P.replace(/[^a-z0-9]+/ig,""),P.length%2!==0&&(P="0"+P),W=0;W>6|192,A[z++]=$&63|128):g(P,W)?($=65536+(($&1023)<<10)+(P.charCodeAt(++W)&1023),A[z++]=$>>18|240,A[z++]=$>>12&63|128,A[z++]=$>>6&63|128,A[z++]=$&63|128):(A[z++]=$>>12|224,A[z++]=$>>6&63|128,A[z++]=$&63|128)}else for(W=0;W>>24|P>>>8&65280|P<<8&16711680|(P&255)<<24;return E>>>0}_.htonl=f;function y(P,E){for(var A="",z=0;z>>0}return $}_.join32=d;function s(P,E){for(var A=new Array(P.length*4),z=0,W=0;z>>24,A[W+1]=$>>>16&255,A[W+2]=$>>>8&255,A[W+3]=$&255):(A[W+3]=$>>>24,A[W+2]=$>>>16&255,A[W+1]=$>>>8&255,A[W]=$&255)}return A}_.split32=s;function v(P,E){return P>>>E|P<<32-E}_.rotr32=v;function c(P,E){return P<>>32-E}_.rotl32=c;function a(P,E){return P+E>>>0}_.sum32=a;function r(P,E,A){return P+E+A>>>0}_.sum32_3=r;function t(P,E,A,z){return P+E+A+z>>>0}_.sum32_4=t;function i(P,E,A,z,W){return P+E+A+z+W>>>0}_.sum32_5=i;function n(P,E,A,z){var W=P[E],$=P[E+1],U=z+$>>>0,I=(U>>0,P[E+1]=U}_.sum64=n;function o(P,E,A,z){var W=E+z>>>0,$=(W>>0}_.sum64_hi=o;function p(P,E,A,z){var W=E+z;return W>>>0}_.sum64_lo=p;function O(P,E,A,z,W,$,U,I){var j=0,B=E;B=B+z>>>0,j+=B>>0,j+=B<$?1:0,B=B+I>>>0,j+=B>>0}_.sum64_4_hi=O;function C(P,E,A,z,W,$,U,I){var j=E+z+$+I;return j>>>0}_.sum64_4_lo=C;function N(P,E,A,z,W,$,U,I,j,B){var V=0,te=E;te=te+z>>>0,V+=te>>0,V+=te<$?1:0,te=te+I>>>0,V+=te>>0,V+=te>>0}_.sum64_5_hi=N;function L(P,E,A,z,W,$,U,I,j,B){var V=E+z+$+I+B;return V>>>0}_.sum64_5_lo=L;function F(P,E,A){var z=E<<32-A|P>>>A;return z>>>0}_.rotr64_hi=F;function M(P,E,A){var z=P<<32-A|E>>>A;return z>>>0}_.rotr64_lo=M;function D(P,E,A){return P>>>A}_.shr64_hi=D;function R(P,E,A){var z=P<<32-A|E>>>A;return z>>>0}_.shr64_lo=R},{inherits:387,"minimalistic-assert":437}],384:[function(e,x,_){var u=e("hash.js"),m=e("minimalistic-crypto-utils"),g=e("minimalistic-assert");function b(w){if(!(this instanceof b))return new b(w);this.hash=w.hash,this.predResist=!!w.predResist,this.outLen=this.hash.outSize,this.minEntropy=w.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var f=m.toArray(w.entropy,w.entropyEnc||"hex"),y=m.toArray(w.nonce,w.nonceEnc||"hex"),h=m.toArray(w.pers,w.persEnc||"hex");g(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,y,h)}x.exports=b,b.prototype._init=function(f,y,h){var l=f.concat(y).concat(h);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var d=0;d=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(f.concat(h||[])),this._reseed=1},b.prototype.generate=function(f,y,h,l){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof y!="string"&&(l=h,h=y,y=null),h&&(h=m.toArray(h,l||"hex"),this._update(h));for(var d=[];d.length>1,s=-7,v=g?w-1:0,c=g?-1:1,a=u[m+v];for(v+=c,f=a&(1<<-s)-1,a>>=-s,s+=h;s>0;f=f*256+u[m+v],v+=c,s-=8);for(y=f&(1<<-s)-1,f>>=-s,s+=b;s>0;y=y*256+u[m+v],v+=c,s-=8);if(f===0)f=1-d;else{if(f===l)return y?NaN:(a?-1:1)*(1/0);y=y+Math.pow(2,b),f=f-d}return(a?-1:1)*y*Math.pow(2,f-b)},_.write=function(u,m,g,b,w,f){var y,h,l,d=f*8-w-1,s=(1<>1,c=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=b?0:f-1,r=b?1:-1,t=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(h=isNaN(m)?1:0,y=s):(y=Math.floor(Math.log(m)/Math.LN2),m*(l=Math.pow(2,-y))<1&&(y--,l*=2),y+v>=1?m+=c/l:m+=c*Math.pow(2,1-v),m*l>=2&&(y++,l/=2),y+v>=s?(h=0,y=s):y+v>=1?(h=(m*l-1)*Math.pow(2,w),y=y+v):(h=m*Math.pow(2,v-1)*Math.pow(2,w),y=0));w>=8;u[g+a]=h&255,a+=r,h/=256,w-=8);for(y=y<0;u[g+a]=y&255,a+=r,y/=256,d-=8);u[g+a-r]|=t*128}},{}],386:[function(e,x,_){(function(u){var m=u.MutationObserver||u.WebKitMutationObserver,g;if(m){var b=0,w=new m(d),f=u.document.createTextNode("");w.observe(f,{characterData:!0}),g=function(){f.data=b=++b%2}}else if(!u.setImmediate&&typeof u.MessageChannel<"u"){var y=new u.MessageChannel;y.port1.onmessage=d,g=function(){y.port2.postMessage(0)}}else"document"in u&&"onreadystatechange"in u.document.createElement("script")?g=function(){var c=u.document.createElement("script");c.onreadystatechange=function(){d(),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},u.document.documentElement.appendChild(c)}:g=function(){setTimeout(d,0)};var h,l=[];function d(){h=!0;for(var v,c,a=l.length;a;){for(c=l,l=[],v=-1;++v * @license MIT */x.exports=function(g){return g!=null&&(u(g)||m(g)||!!g._isBuffer)};function u(g){return!!g.constructor&&typeof g.constructor.isBuffer=="function"&&g.constructor.isBuffer(g)}function m(g){return typeof g.readFloatLE=="function"&&typeof g.slice=="function"&&u(g.slice(0,0))}},{}],389:[function(e,x,_){var u={}.toString;x.exports=Array.isArray||function(m){return u.call(m)=="[object Array]"}},{}],390:[function(e,x,_){var u=e("./utils"),m=e("./support"),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";_.encode=function(b){for(var w=[],f,y,h,l,d,s,v,c=0,a=b.length,r=a,t=u.getTypeOf(b)!=="string";c>2,d=(f&3)<<4|y>>4,s=r>1?(y&15)<<2|h>>6:64,v=r>2?h&63:64,w.push(g.charAt(l)+g.charAt(d)+g.charAt(s)+g.charAt(v));return w.join("")},_.decode=function(b){var w,f,y,h,l,d,s,v=0,c=0,a="data:";if(b.substr(0,a.length)===a)throw new Error("Invalid base64 input, it looks like a data url.");b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");var r=b.length*3/4;if(b.charAt(b.length-1)===g.charAt(64)&&r--,b.charAt(b.length-2)===g.charAt(64)&&r--,r%1!==0)throw new Error("Invalid base64 input, bad content length.");var t;for(m.uint8array?t=new Uint8Array(r|0):t=new Array(r|0);v>4,f=(l&15)<<4|d>>2,y=(d&3)<<6|s,t[c++]=w,d!==64&&(t[c++]=f),s!==64&&(t[c++]=y);return t}},{"./support":419,"./utils":421}],391:[function(e,x,_){var u=e("./external"),m=e("./stream/DataWorker"),b=e("./stream/DataLengthProbe"),g=e("./stream/Crc32Probe"),b=e("./stream/DataLengthProbe");function w(f,y,h,l,d){this.compressedSize=f,this.uncompressedSize=y,this.crc32=h,this.compression=l,this.compressedContent=d}w.prototype={getContentWorker:function(){var y=new m(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new b("data_length")),h=this;return y.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new m(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},w.createWorkerFrom=function(f,y,h){return f.pipe(new g).pipe(new b("uncompressedSize")).pipe(y.compressWorker(h)).pipe(new b("compressedSize")).withStreamInfo("compression",y)},x.exports=w},{"./external":395,"./stream/Crc32Probe":414,"./stream/DataLengthProbe":415,"./stream/DataWorker":416}],392:[function(e,x,_){var u=e("./stream/GenericWorker");_.STORE={magic:"\0\0",compressWorker:function(g){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},_.DEFLATE=e("./flate")},{"./flate":396,"./stream/GenericWorker":417}],393:[function(e,x,_){var u=e("./utils");function m(){for(var f,y=[],h=0;h<256;h++){f=h;for(var l=0;l<8;l++)f=f&1?3988292384^f>>>1:f>>>1;y[h]=f}return y}var g=m();function b(f,y,h,l){var d=g,s=l+h;f=f^-1;for(var v=l;v>>8^d[(f^y[v])&255];return f^-1}function w(f,y,h,l){var d=g,s=l+h;f=f^-1;for(var v=l;v>>8^d[(f^y.charCodeAt(v))&255];return f^-1}x.exports=function(y,h){if(typeof y>"u"||!y.length)return 0;var l=u.getTypeOf(y)!=="string";return l?b(h|0,y,y.length,0):w(h|0,y,y.length,0)}},{"./utils":421}],394:[function(e,x,_){_.base64=!1,_.binary=!1,_.dir=!1,_.createFolders=!0,_.date=null,_.compression=null,_.compressionOptions=null,_.comment=null,_.unixPermissions=null,_.dosPermissions=null},{}],395:[function(e,x,_){var u=null;typeof Promise<"u"?u=Promise:u=e("lie"),x.exports={Promise:u}},{lie:425}],396:[function(e,x,_){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",m=e("pako"),g=e("./utils"),b=e("./stream/GenericWorker"),w=u?"uint8array":"array";_.magic="\b\0";function f(y,h){b.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=h,this.meta={}}g.inherits(f,b),f.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(g.transformTo(w,y.data),!1)},f.prototype.flush=function(){b.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new m[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(h){y.push({data:h,meta:y.meta})}},_.compressWorker=function(y){return new f("Deflate",y)},_.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":417,"./utils":421,pako:439}],397:[function(e,x,_){var u=e("../utils"),m=e("../stream/GenericWorker"),g=e("../utf8"),b=e("../crc32"),w=e("../signature"),f=function(a,r){var t="",i;for(i=0;i>>8;return t},y=function(a,r){var t=a;return a||(t=r?16893:33204),(t&65535)<<16},h=function(a,r){return(a||0)&63},l=function(a,r,t,i,n,o){var p=a.file,O=a.compression,C=o!==g.utf8encode,N=u.transformTo("string",o(p.name)),L=u.transformTo("string",g.utf8encode(p.name)),F=p.comment,M=u.transformTo("string",o(F)),D=u.transformTo("string",g.utf8encode(F)),R=L.length!==p.name.length,P=D.length!==F.length,E,A,z="",W="",$="",U=p.dir,I=p.date,j={crc32:0,compressedSize:0,uncompressedSize:0};(!r||t)&&(j.crc32=a.crc32,j.compressedSize=a.compressedSize,j.uncompressedSize=a.uncompressedSize);var B=0;r&&(B|=8),!C&&(R||P)&&(B|=2048);var V=0,te=0;U&&(V|=16),n==="UNIX"?(te=798,V|=y(p.unixPermissions,U)):(te=20,V|=h(p.dosPermissions)),E=I.getUTCHours(),E=E<<6,E=E|I.getUTCMinutes(),E=E<<5,E=E|I.getUTCSeconds()/2,A=I.getUTCFullYear()-1980,A=A<<4,A=A|I.getUTCMonth()+1,A=A<<5,A=A|I.getUTCDate(),R&&(W=f(1,1)+f(b(N),4)+L,z+="up"+f(W.length,2)+W),P&&($=f(1,1)+f(b(M),4)+D,z+="uc"+f($.length,2)+$);var ie="";ie+=` \0`,ie+=f(B,2),ie+=O.magic,ie+=f(E,2),ie+=f(A,2),ie+=f(j.crc32,4),ie+=f(j.compressedSize,4),ie+=f(j.uncompressedSize,4),ie+=f(N.length,2),ie+=f(z.length,2);var ce=w.LOCAL_FILE_HEADER+ie+N+z,be=w.CENTRAL_FILE_HEADER+f(te,2)+ie+f(M.length,2)+"\0\0\0\0"+f(V,4)+f(i,4)+N+z+M;return{fileRecord:ce,dirRecord:be}},d=function(a,r,t,i,n){var o="",p=u.transformTo("string",n(i));return o=w.CENTRAL_DIRECTORY_END+"\0\0\0\0"+f(a,2)+f(a,2)+f(r,4)+f(t,4)+f(p.length,2)+p,o},s=function(a){var r="";return r=w.DATA_DESCRIPTOR+f(a.crc32,4)+f(a.compressedSize,4)+f(a.uncompressedSize,4),r};function v(c,a,r,t){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=a,this.zipPlatform=r,this.encodeFileName=t,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}u.inherits(v,m),v.prototype.push=function(c){var a=c.meta.percent||0,r=this.entriesCount,t=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,m.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:r?(a+100*(r-t-1))/r:100}}))},v.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var a=this.streamFiles&&!c.file.dir;if(a){var r=l(c,a,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(c){this.accumulate=!1;var a=this.streamFiles&&!c.file.dir,r=l(c,a,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),a)this.push({data:s(c),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var c=this.bytesWritten,a=0;a"u")&&(N.binary=!L);var F=o instanceof f&&o.uncompressedSize===0;(F||N.dir||!o||o.length===0)&&(N.base64=!1,N.binary=!0,o="",N.compression="STORE",O="string");var M=null;o instanceof f||o instanceof g?M=o:l.isNode&&l.isStream(o)?M=new d(n,o):M=m.prepareContent(n,o,N.binary,N.optimizedBinaryString,N.base64);var D=new y(n,M,N);this.files[n]=D},v=function(n){n.slice(-1)==="/"&&(n=n.substring(0,n.length-1));var o=n.lastIndexOf("/");return o>0?n.substring(0,o):""},c=function(n){return n.slice(-1)!=="/"&&(n+="/"),n},a=function(n,o){return o=typeof o<"u"?o:w.createFolders,n=c(n),this.files[n]||s.call(this,n,null,{dir:!0,createFolders:o}),this.files[n]};function r(i){return Object.prototype.toString.call(i)==="[object RegExp]"}var t={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(n){var o,p,O;for(o in this.files)this.files.hasOwnProperty(o)&&(O=this.files[o],p=o.slice(this.root.length,o.length),p&&o.slice(0,this.root.length)===this.root&&n(p,O))},filter:function(n){var o=[];return this.forEach(function(p,O){n(p,O)&&o.push(O)}),o},file:function(n,o,p){if(arguments.length===1)if(r(n)){var O=n;return this.filter(function(N,L){return!L.dir&&O.test(N)})}else{var C=this.files[this.root+n];return C&&!C.dir?C:null}else n=this.root+n,s.call(this,n,o,p);return this},folder:function(n){if(!n)return this;if(r(n))return this.filter(function(C,N){return N.dir&&n.test(C)});var o=this.root+n,p=a.call(this,o),O=this.clone();return O.root=p.name,O},remove:function(n){n=this.root+n;var o=this.files[n];if(o||(n.slice(-1)!=="/"&&(n+="/"),o=this.files[n]),o&&!o.dir)delete this.files[n];else for(var p=this.filter(function(C,N){return N.name.slice(0,n.length)===n}),O=0;O=0;--l)if(this.data[l]===w&&this.data[l+1]===f&&this.data[l+2]===y&&this.data[l+3]===h)return l-this.zero;return-1},g.prototype.readAndCheckSignature=function(b){var w=b.charCodeAt(0),f=b.charCodeAt(1),y=b.charCodeAt(2),h=b.charCodeAt(3),l=this.readData(4);return w===l[0]&&f===l[1]&&y===l[2]&&h===l[3]},g.prototype.readData=function(b){if(this.checkOffset(b),b===0)return[];var w=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,w},x.exports=g},{"../utils":421,"./DataReader":407}],407:[function(e,x,_){var u=e("../utils");function m(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}m.prototype={checkOffset:function(b){this.checkIndex(this.index+b)},checkIndex:function(b){if(this.length=this.index;f--)w=(w<<8)+this.byteAt(f);return this.index+=b,w},readString:function(b){return u.transformTo("string",this.readData(b))},readData:function(b){},lastIndexOfSignature:function(b){},readAndCheckSignature:function(b){},readDate:function(){var b=this.readInt(4);return new Date(Date.UTC((b>>25&127)+1980,(b>>21&15)-1,b>>16&31,b>>11&31,b>>5&63,(b&31)<<1))}},x.exports=m},{"../utils":421}],408:[function(e,x,_){var u=e("./Uint8ArrayReader"),m=e("../utils");function g(b){u.call(this,b)}m.inherits(g,u),g.prototype.readData=function(b){this.checkOffset(b);var w=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,w},x.exports=g},{"../utils":421,"./Uint8ArrayReader":410}],409:[function(e,x,_){var u=e("./DataReader"),m=e("../utils");function g(b){u.call(this,b)}m.inherits(g,u),g.prototype.byteAt=function(b){return this.data.charCodeAt(this.zero+b)},g.prototype.lastIndexOfSignature=function(b){return this.data.lastIndexOf(b)-this.zero},g.prototype.readAndCheckSignature=function(b){var w=this.readData(4);return b===w},g.prototype.readData=function(b){this.checkOffset(b);var w=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,w},x.exports=g},{"../utils":421,"./DataReader":407}],410:[function(e,x,_){var u=e("./ArrayReader"),m=e("../utils");function g(b){u.call(this,b)}m.inherits(g,u),g.prototype.readData=function(b){if(this.checkOffset(b),b===0)return new Uint8Array(0);var w=this.data.subarray(this.zero+this.index,this.zero+this.index+b);return this.index+=b,w},x.exports=g},{"../utils":421,"./ArrayReader":406}],411:[function(e,x,_){var u=e("../utils"),m=e("../support"),g=e("./ArrayReader"),b=e("./StringReader"),w=e("./NodeBufferReader"),f=e("./Uint8ArrayReader");x.exports=function(y){var h=u.getTypeOf(y);return u.checkSupport(h),h==="string"&&!m.uint8array?new b(y):h==="nodebuffer"?new w(y):m.uint8array?new f(u.transformTo("uint8array",y)):new g(u.transformTo("array",y))}},{"../support":419,"../utils":421,"./ArrayReader":406,"./NodeBufferReader":408,"./StringReader":409,"./Uint8ArrayReader":410}],412:[function(e,x,_){_.LOCAL_FILE_HEADER="PK",_.CENTRAL_FILE_HEADER="PK",_.CENTRAL_DIRECTORY_END="PK",_.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",_.ZIP64_CENTRAL_DIRECTORY_END="PK",_.DATA_DESCRIPTOR="PK\x07\b"},{}],413:[function(e,x,_){var u=e("./GenericWorker"),m=e("../utils");function g(b){u.call(this,"ConvertWorker to "+b),this.destType=b}m.inherits(g,u),g.prototype.processChunk=function(b){this.push({data:m.transformTo(this.destType,b.data),meta:b.meta})},x.exports=g},{"../utils":421,"./GenericWorker":417}],414:[function(e,x,_){var u=e("./GenericWorker"),m=e("../crc32"),g=e("../utils");function b(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}g.inherits(b,u),b.prototype.processChunk=function(w){this.streamInfo.crc32=m(w.data,this.streamInfo.crc32||0),this.push(w)},x.exports=b},{"../crc32":393,"../utils":421,"./GenericWorker":417}],415:[function(e,x,_){var u=e("../utils"),m=e("./GenericWorker");function g(b){m.call(this,"DataLengthProbe for "+b),this.propName=b,this.withStreamInfo(b,0)}u.inherits(g,m),g.prototype.processChunk=function(b){if(b){var w=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=w+b.data.length}m.prototype.processChunk.call(this,b)},x.exports=g},{"../utils":421,"./GenericWorker":417}],416:[function(e,x,_){var u=e("../utils"),m=e("./GenericWorker"),g=16*1024;function b(w){m.call(this,"DataWorker");var f=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,w.then(function(y){f.dataIsReady=!0,f.data=y,f.max=y&&y.length||0,f.type=u.getTypeOf(y),f.isPaused||f._tickAndRepeat()},function(y){f.error(y)})}u.inherits(b,m),b.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null},b.prototype.resume=function(){return m.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0):!1},b.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},b.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var w=g,f=null,y=Math.min(this.max,this.index+w);if(this.index>=this.max)return this.end();switch(this.type){case"string":f=this.data.substring(this.index,y);break;case"uint8array":f=this.data.subarray(this.index,y);break;case"array":case"nodebuffer":f=this.data.slice(this.index,y);break}return this.index=y,this.push({data:f,meta:{percent:this.max?this.index/this.max*100:0}})},x.exports=b},{"../utils":421,"./GenericWorker":417}],417:[function(e,x,_){function u(m){this.name=m||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(g){this.emit("data",g)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(g){this.emit("error",g)}return!0},error:function(g){return this.isFinished?!1:(this.isPaused?this.generatedError=g:(this.isFinished=!0,this.emit("error",g),this.previous&&this.previous.error(g),this.cleanUp()),!0)},on:function(g,b){return this._listeners[g].push(b),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(g,b){if(this._listeners[g])for(var w=0;w "+g:g}},x.exports=u},{}],418:[function(e,x,_){(function(u){var m=e("../utils"),g=e("./ConvertWorker"),b=e("./GenericWorker"),w=e("../base64"),f=e("../support"),y=e("../external"),h=null;if(f.nodestream)try{h=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function l(c,a,r){switch(c){case"blob":return m.newBlob(m.transformTo("arraybuffer",a),r);case"base64":return w.encode(a);default:return m.transformTo(c,a)}}function d(c,a){var r,t=0,i=null,n=0;for(r=0;r"u")_.blob=!1;else{var m=new ArrayBuffer(0);try{_.blob=new Blob([m],{type:"application/zip"}).size===0}catch{try{var g=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,b=new g;b.append(m),_.blob=b.getBlob("application/zip").size===0}catch{_.blob=!1}}}try{_.nodestream=!!e("readable-stream").Readable}catch{_.nodestream=!1}}).call(this,e("buffer").Buffer)},{buffer:216,"readable-stream":405}],420:[function(e,x,_){for(var u=e("./utils"),m=e("./support"),g=e("./nodejsUtils"),b=e("./stream/GenericWorker"),w=new Array(256),f=0;f<256;f++)w[f]=f>=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;w[254]=w[254]=1;var y=function(c){var a,r,t,i,n,o=c.length,p=0;for(i=0;i>>6,a[n++]=128|r&63):r<65536?(a[n++]=224|r>>>12,a[n++]=128|r>>>6&63,a[n++]=128|r&63):(a[n++]=240|r>>>18,a[n++]=128|r>>>12&63,a[n++]=128|r>>>6&63,a[n++]=128|r&63);return a},h=function(c,a){var r;for(a=a||c.length,a>c.length&&(a=c.length),r=a-1;r>=0&&(c[r]&192)===128;)r--;return r<0||r===0?a:r+w[c[r]]>a?r:a},l=function(c){var a,r,t,i,n=c.length,o=new Array(n*2);for(r=0,a=0;a4){o[r++]=65533,a+=i-1;continue}for(t&=i===2?31:i===3?15:7;i>1&&a1){o[r++]=65533;continue}t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|t&1023)}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),u.applyFromCharCode(o)};_.utf8encode=function(c){return m.nodebuffer?g.newBufferFrom(c,"utf-8"):y(c)},_.utf8decode=function(c){return m.nodebuffer?u.transformTo("nodebuffer",c).toString("utf-8"):(c=u.transformTo(m.uint8array?"uint8array":"array",c),l(c))};function d(){b.call(this,"utf-8 decode"),this.leftOver=null}u.inherits(d,b),d.prototype.processChunk=function(v){var c=u.transformTo(m.uint8array?"uint8array":"array",v.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var a=c;c=new Uint8Array(a.length+this.leftOver.length),c.set(this.leftOver,0),c.set(a,this.leftOver.length)}else c=this.leftOver.concat(c);this.leftOver=null}var r=h(c),t=c;r!==c.length&&(m.uint8array?(t=c.subarray(0,r),this.leftOver=c.subarray(r,c.length)):(t=c.slice(0,r),this.leftOver=c.slice(r,c.length))),this.push({data:_.utf8decode(t),meta:v.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:_.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},_.Utf8DecodeWorker=d;function s(){b.call(this,"utf-8 encode")}u.inherits(s,b),s.prototype.processChunk=function(v){this.push({data:_.utf8encode(v.data),meta:v.meta})},_.Utf8EncodeWorker=s},{"./nodejsUtils":403,"./stream/GenericWorker":417,"./support":419,"./utils":421}],421:[function(e,x,_){var u=e("./support"),m=e("./base64"),g=e("./nodejsUtils"),b=e("set-immediate-shim"),w=e("./external");function f(c){var a=null;return u.uint8array?a=new Uint8Array(c.length):a=new Array(c.length),h(c,a)}_.newBlob=function(c,a){_.checkSupport("blob");try{return new Blob([c],{type:a})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,t=new r;return t.append(c),t.getBlob(a)}catch{throw new Error("Bug : can't construct the Blob.")}}};function y(c){return c}function h(c,a){for(var r=0;r1;)try{return l.stringifyByChunk(c,r,a)}catch{a=Math.floor(a/2)}return l.stringifyByChar(c)}_.applyFromCharCode=d;function s(c,a){for(var r=0;r"u"&&(c[r]=arguments[a][r]);return c},_.prepareContent=function(c,a,r,t,i){var n=w.Promise.resolve(a).then(function(o){var p=u.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return p&&typeof FileReader<"u"?new w.Promise(function(O,C){var N=new FileReader;N.onload=function(L){O(L.target.result)},N.onerror=function(L){C(L.target.error)},N.readAsArrayBuffer(o)}):o});return n.then(function(o){var p=_.getTypeOf(o);return p?(p==="arraybuffer"?o=_.transformTo("uint8array",o):p==="string"&&(i?o=m.decode(o):r&&t!==!0&&(o=f(o))),o):w.Promise.reject(new Error("Can't read the data of '"+c+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":390,"./external":395,"./nodejsUtils":403,"./support":419,"set-immediate-shim":497}],422:[function(e,x,_){var u=e("./reader/readerFor"),m=e("./utils"),g=e("./signature"),b=e("./zipEntry");e("./utf8");var w=e("./support");function f(y){this.files=[],this.loadOptions=y}f.prototype={checkSignature:function(h){if(!this.reader.readAndCheckSignature(h)){this.reader.index-=4;var l=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(l)+", expected "+m.pretty(h)+")")}},isSignature:function(h,l){var d=this.reader.index;this.reader.setIndex(h);var s=this.reader.readString(4),v=s===l;return this.reader.setIndex(d),v},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var h=this.reader.readData(this.zipCommentLength),l=w.uint8array?"uint8array":"array",d=m.transformTo(l,h);this.zipComment=this.loadOptions.decodeFileName(d)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var h=this.zip64EndOfCentralSize-44,l=0,d,s,v;l1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var h,l;for(h=0;h0)this.isSignature(d,g.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(h){this.reader=u(h)},load:function(h){this.prepareReader(h),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},x.exports=f},{"./reader/readerFor":411,"./signature":412,"./support":419,"./utf8":420,"./utils":421,"./zipEntry":423}],423:[function(e,x,_){var u=e("./reader/readerFor"),m=e("./utils"),g=e("./compressedObject"),b=e("./crc32"),w=e("./utf8"),f=e("./compressions"),y=e("./support"),h=0,l=3,d=function(c){for(var a in f)if(f.hasOwnProperty(a)&&f[a].magic===c)return f[a];return null};function s(v,c){this.options=v,this.loadOptions=c}s.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(c){var a,r;if(c.skip(22),this.fileNameLength=c.readInt(2),r=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(a=d(this.compressionMethod),a===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,a,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var a=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(a),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),c===h&&(this.dosPermissions=this.externalFileAttributes&63),c===l&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(c){if(this.extraFields[1]){var a=u(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(c){var a=c.index+this.extraFieldsLength,r,t,i;for(this.extraFields||(this.extraFields={});c.index+4"u"?"undefined":m(u))=="object"&&u&&u.Object===Object&&u,h=(typeof self>"u"?"undefined":m(self))=="object"&&self&&self.Object===Object&&self,l=y||h||Function("return this")(),d=Object.prototype,s=d.toString,v=l.Symbol,c=v?v.prototype:void 0,a=c?c.toString:void 0;function r(p){if(typeof p=="string")return p;if(i(p))return a?a.call(p):"";var O=p+"";return O=="0"&&1/p==-g?"-0":O}function t(p){return!!p&&m(p)=="object"}function i(p){return m(p)=="symbol"||t(p)&&s.call(p)==b}function n(p){return p==null?"":r(p)}function o(p){return p=n(p),p&&f.test(p)?p.replace(w,"\\$&"):p}x.exports=o}).call(this,typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],427:[function(e,x,_){(function(u){function m(le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(He){return typeof He}:m=function(He){return He&&typeof Symbol=="function"&&He.constructor===Symbol&&He!==Symbol.prototype?"symbol":typeof He},m(le)}var g=200,b="Expected a function",w="__lodash_hash_undefined__",f=1,y=2,h=1/0,l=9007199254740991,d="[object Arguments]",s="[object Array]",v="[object Boolean]",c="[object Date]",a="[object Error]",r="[object Function]",t="[object GeneratorFunction]",i="[object Map]",n="[object Number]",o="[object Object]",p="[object Promise]",O="[object RegExp]",C="[object Set]",N="[object String]",L="[object Symbol]",F="[object WeakMap]",M="[object ArrayBuffer]",D="[object DataView]",R="[object Float32Array]",P="[object Float64Array]",E="[object Int8Array]",A="[object Int16Array]",z="[object Int32Array]",W="[object Uint8Array]",$="[object Uint8ClampedArray]",U="[object Uint16Array]",I="[object Uint32Array]",j=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B=/^\w*$/,V=/^\./,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ce=/\\(\\)?/g,be=/^\[object .+?Constructor\]$/,_e=/^(?:0|[1-9]\d*)$/,oe={};oe[R]=oe[P]=oe[E]=oe[A]=oe[z]=oe[W]=oe[$]=oe[U]=oe[I]=!0,oe[d]=oe[s]=oe[M]=oe[v]=oe[D]=oe[c]=oe[a]=oe[r]=oe[i]=oe[n]=oe[o]=oe[O]=oe[C]=oe[N]=oe[F]=!1;var J=(typeof u>"u"?"undefined":m(u))=="object"&&u&&u.Object===Object&&u,Q=(typeof self>"u"?"undefined":m(self))=="object"&&self&&self.Object===Object&&self,he=J||Q||Function("return this")(),ke=(typeof _>"u"?"undefined":m(_))=="object"&&_&&!_.nodeType&&_,re=ke&&(typeof x>"u"?"undefined":m(x))=="object"&&x&&!x.nodeType&&x,se=re&&re.exports===ke,Ce=se&&J.process,q=function(){try{return Ce&&Ce.binding("util")}catch{}}(),G=q&&q.isTypedArray;function Z(le,Oe,He,ft){for(var Tt=-1,mt=le?le.length:0;++Tt-1}function Zr(le,Oe){var He=this.__data__,ft=zr(He,le);return ft<0?He.push([le,Oe]):He[ft][1]=Oe,this}Et.prototype.clear=Dr,Et.prototype.delete=Or,Et.prototype.get=Gr,Et.prototype.has=Nr,Et.prototype.set=Zr;function Qt(le){var Oe=-1,He=le?le.length:0;for(this.clear();++Oeir))return!1;var _r=mt.get(le);if(_r&&mt.get(Oe))return _r==Oe;var Tr=-1,wr=!0,Rr=Tt&f?new Ke:void 0;for(mt.set(le,Oe),mt.set(Oe,le);++Tr-1&&le%1==0&&le-1&&le%1==0&&le<=l}function dr(le){var Oe=m(le);return!!le&&(Oe=="object"||Oe=="function")}function Er(le){return!!le&&m(le)=="object"}function Ar(le){return m(le)=="symbol"||Er(le)&&pe.call(le)==L}var pr=G?je(G):Wi;function pn(le){return le==null?"":wa(le)}function mr(le,Oe,He){var ft=le==null?void 0:yi(le,Oe);return ft===void 0?He:ft}function ea(le,Oe){return le!=null&&Yi(le,Oe,dn)}function En(le){return tr(le)?rn(le):Bn(le)}function Yr(le){return le}function ta(le){return er(le)?we(De(le)):xn(le)}x.exports=ht}).call(this,typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],428:[function(e,x,_){function u(y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(l){return typeof l}:u=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},u(y)}var m="[object Boolean]",g=Object.prototype,b=g.toString;function w(y){return y===!0||y===!1||f(y)&&b.call(y)==m}function f(y){return!!y&&u(y)=="object"}x.exports=w},{}],429:[function(e,x,_){(function(u){function m(xe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(Je){return typeof Je}:m=function(Je){return Je&&typeof Symbol=="function"&&Je.constructor===Symbol&&Je!==Symbol.prototype?"symbol":typeof Je},m(xe)}var g=200,b="__lodash_hash_undefined__",w=1,f=2,y=9007199254740991,h="[object Arguments]",l="[object Array]",d="[object AsyncFunction]",s="[object Boolean]",v="[object Date]",c="[object Error]",a="[object Function]",r="[object GeneratorFunction]",t="[object Map]",i="[object Number]",n="[object Null]",o="[object Object]",p="[object Promise]",O="[object Proxy]",C="[object RegExp]",N="[object Set]",L="[object String]",F="[object Symbol]",M="[object Undefined]",D="[object WeakMap]",R="[object ArrayBuffer]",P="[object DataView]",E="[object Float32Array]",A="[object Float64Array]",z="[object Int8Array]",W="[object Int16Array]",$="[object Int32Array]",U="[object Uint8Array]",I="[object Uint8ClampedArray]",j="[object Uint16Array]",B="[object Uint32Array]",V=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,ie=/^(?:0|[1-9]\d*)$/,ce={};ce[E]=ce[A]=ce[z]=ce[W]=ce[$]=ce[U]=ce[I]=ce[j]=ce[B]=!0,ce[h]=ce[l]=ce[R]=ce[s]=ce[P]=ce[v]=ce[c]=ce[a]=ce[t]=ce[i]=ce[o]=ce[C]=ce[N]=ce[L]=ce[D]=!1;var be=(typeof u>"u"?"undefined":m(u))=="object"&&u&&u.Object===Object&&u,_e=(typeof self>"u"?"undefined":m(self))=="object"&&self&&self.Object===Object&&self,oe=be||_e||Function("return this")(),J=(typeof _>"u"?"undefined":m(_))=="object"&&_&&!_.nodeType&&_,Q=J&&(typeof x>"u"?"undefined":m(x))=="object"&&x&&!x.nodeType&&x,he=Q&&Q.exports===J,ke=he&&be.process,re=function(){try{return ke&&ke.binding&&ke.binding("util")}catch{}}(),se=re&&re.isTypedArray;function Ce(xe,De){for(var Je=-1,ht=xe==null?0:xe.length,Zt=0,Mt=[];++Je-1}function Zr(xe,De){var Je=this.__data__,ht=zr(Je,xe);return ht<0?(++this.size,Je.push([xe,De])):Je[ht][1]=De,this}Et.prototype.clear=Dr,Et.prototype.delete=Or,Et.prototype.get=Gr,Et.prototype.has=Nr,Et.prototype.set=Zr;function Qt(xe){var De=-1,Je=xe==null?0:xe.length;for(this.clear();++Denr))return!1;var ur=Mt.get(xe);if(ur&&Mt.get(De))return ur==De;var Pr=-1,Br=!0,dr=Je&f?new Ke:void 0;for(Mt.set(xe,De),Mt.set(De,xe);++Pr-1&&xe%1==0&&xe-1&&xe%1==0&&xe<=y}function er(xe){var De=m(xe);return xe!=null&&(De=="object"||De=="function")}function ti(xe){return xe!=null&&m(xe)=="object"}var Ji=se?fe(se):dn;function Oa(xe){return ka(xe)?rn(xe):Nn(xe)}function Qi(){return[]}function qi(){return!1}x.exports=On}).call(this,typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],430:[function(e,x,_){(function(u){function m(C){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(L){return typeof L}:m=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},m(C)}var g="[object AsyncFunction]",b="[object Function]",w="[object GeneratorFunction]",f="[object Null]",y="[object Proxy]",h="[object Undefined]",l=(typeof u>"u"?"undefined":m(u))=="object"&&u&&u.Object===Object&&u,d=(typeof self>"u"?"undefined":m(self))=="object"&&self&&self.Object===Object&&self,s=l||d||Function("return this")(),v=Object.prototype,c=v.hasOwnProperty,a=v.toString,r=s.Symbol,t=r?r.toStringTag:void 0;function i(C){return C==null?C===void 0?h:f:t&&t in Object(C)?n(C):o(C)}function n(C){var N=c.call(C,t),L=C[t];try{C[t]=void 0;var F=!0}catch{}var M=a.call(C);return F&&(N?C[t]=L:delete C[t]),M}function o(C){return a.call(C)}function p(C){if(!O(C))return!1;var N=i(C);return N==b||N==w||N==g||N==y}function O(C){var N=m(C);return C!=null&&(N=="object"||N=="function")}x.exports=p}).call(this,typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],431:[function(e,x,_){function u(m){return m==null}x.exports=u},{}],432:[function(e,x,_){function u(m){return m===void 0}x.exports=u},{}],433:[function(e,x,_){(function(u){function m(me){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(pe){return typeof pe}:m=function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe},m(me)}var g=200,b="__lodash_hash_undefined__",w=1/0,f="[object Function]",y="[object GeneratorFunction]",h=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,d=(typeof u>"u"?"undefined":m(u))=="object"&&u&&u.Object===Object&&u,s=(typeof self>"u"?"undefined":m(self))=="object"&&self&&self.Object===Object&&self,v=d||s||Function("return this")();function c(me,Ee){var pe=me?me.length:0;return!!pe&&t(me,Ee,0)>-1}function a(me,Ee,pe){for(var Pe=-1,ee=me?me.length:0;++Pe-1}function J(me,Ee){var pe=this.__data__,Pe=fe(pe,me);return Pe<0?pe.push([me,Ee]):pe[Pe][1]=Ee,this}ie.prototype.clear=ce,ie.prototype.delete=be,ie.prototype.get=_e,ie.prototype.has=oe,ie.prototype.set=J;function Q(me){var Ee=-1,pe=me?me.length:0;for(this.clear();++Ee=g){var Le=Ee?null:je(me);if(Le)return O(Le);it=!1,ee=n,Me=new q}else Me=Ee?[]:K;e:for(;++Pe56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var s=g.allocUnsafe(16);return s.writeInt32LE(this._a,0),s.writeInt32LE(this._b,4),s.writeInt32LE(this._c,8),s.writeInt32LE(this._d,12),s};function f(s,v){return s<>>32-v}function y(s,v,c,a,r,t,i){return f(s+(v&c|~v&a)+r+t|0,i)+v|0}function h(s,v,c,a,r,t,i){return f(s+(v&a|c&~a)+r+t|0,i)+v|0}function l(s,v,c,a,r,t,i){return f(s+(v^c^a)+r+t|0,i)+v|0}function d(s,v,c,a,r,t,i){return f(s+(c^(v|~a))+r+t|0,i)+v|0}x.exports=w},{"hash-base":370,inherits:387,"safe-buffer":494}],435:[function(e,x,_){var u=e("bn.js"),m=e("brorand");function g(b){this.rand=b||new m.Rand}x.exports=g,g.create=function(w){return new g(w)},g.prototype._randbelow=function(w){var f=w.bitLength(),y=Math.ceil(f/8);do var h=new u(this.rand.generate(y));while(h.cmp(w)>=0);return h},g.prototype._randrange=function(w,f){var y=f.sub(w);return w.add(this._randbelow(y))},g.prototype.test=function(w,f,y){var h=w.bitLength(),l=u.mont(w),d=new u(1).toRed(l);f||(f=Math.max(1,h/48|0));for(var s=w.subn(1),v=0;!s.testn(v);v++);for(var c=w.shrn(v),a=s.toRed(l),r=!0;f>0;f--){var t=this._randrange(new u(2),s);y&&y(t);var i=t.toRed(l).redPow(c);if(!(i.cmp(d)===0||i.cmp(a)===0)){for(var n=1;n0;f--){var a=this._randrange(new u(2),d),r=w.gcd(a);if(r.cmpn(1)!==0)return r;var t=a.toRed(h).redPow(v);if(!(t.cmp(l)===0||t.cmp(c)===0)){for(var i=1;i>8,s=l&255;d?y.push(d,s):y.push(s)}return y}u.toArray=m;function g(w){return w.length===1?"0"+w:w}u.zero2=g;function b(w){for(var f="",y=0;y0?p.windowBits=-p.windowBits:p.gzip&&p.windowBits>0&&p.windowBits<16&&(p.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var O=u.deflateInit2(this.strm,p.level,p.method,p.windowBits,p.memLevel,p.strategy);if(O!==l)throw new Error(b[O]);if(p.header&&u.deflateSetHeader(this.strm,p.header),p.dictionary){var C;if(typeof p.dictionary=="string"?C=g.string2buf(p.dictionary):f.call(p.dictionary)==="[object ArrayBuffer]"?C=new Uint8Array(p.dictionary):C=p.dictionary,O=u.deflateSetDictionary(this.strm,C),O!==l)throw new Error(b[O]);this._dict_set=!0}}r.prototype.push=function(o,p){var O=this.strm,C=this.options.chunkSize,N,L;if(this.ended)return!1;L=p===~~p?p:p===!0?h:y,typeof o=="string"?O.input=g.string2buf(o):f.call(o)==="[object ArrayBuffer]"?O.input=new Uint8Array(o):O.input=o,O.next_in=0,O.avail_in=O.input.length;do{if(O.avail_out===0&&(O.output=new m.Buf8(C),O.next_out=0,O.avail_out=C),N=u.deflate(O,L),N!==d&&N!==l)return this.onEnd(N),this.ended=!0,!1;(O.avail_out===0||O.avail_in===0&&(L===h||L===s))&&(this.options.to==="string"?this.onData(g.buf2binstring(m.shrinkBuf(O.output,O.next_out))):this.onData(m.shrinkBuf(O.output,O.next_out)))}while((O.avail_in>0||O.avail_out===0)&&N!==d);return L===h?(N=u.deflateEnd(this.strm),this.onEnd(N),this.ended=!0,N===l):(L===s&&(this.onEnd(l),O.avail_out=0),!0)},r.prototype.onData=function(o){this.chunks.push(o)},r.prototype.onEnd=function(o){o===l&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=o,this.msg=this.strm.msg};function t(o,p){var O=new r(p);if(O.push(o,!0),O.err)throw O.msg||b[O.err];return O.result}function i(o,p){return p=p||{},p.raw=!0,t(o,p)}function n(o,p){return p=p||{},p.gzip=!0,t(o,p)}_.Deflate=r,_.deflate=t,_.deflateRaw=i,_.gzip=n},{"./utils/common":442,"./utils/strings":443,"./zlib/deflate":447,"./zlib/messages":452,"./zlib/zstream":454}],441:[function(e,x,_){var u=e("./zlib/inflate"),m=e("./utils/common"),g=e("./utils/strings"),b=e("./zlib/constants"),w=e("./zlib/messages"),f=e("./zlib/zstream"),y=e("./zlib/gzheader"),h=Object.prototype.toString;function l(v){if(!(this instanceof l))return new l(v);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},v||{});var c=this.options;c.raw&&c.windowBits>=0&&c.windowBits<16&&(c.windowBits=-c.windowBits,c.windowBits===0&&(c.windowBits=-15)),c.windowBits>=0&&c.windowBits<16&&!(v&&v.windowBits)&&(c.windowBits+=32),c.windowBits>15&&c.windowBits<48&&(c.windowBits&15||(c.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var a=u.inflateInit2(this.strm,c.windowBits);if(a!==b.Z_OK)throw new Error(w[a]);if(this.header=new y,u.inflateGetHeader(this.strm,this.header),c.dictionary&&(typeof c.dictionary=="string"?c.dictionary=g.string2buf(c.dictionary):h.call(c.dictionary)==="[object ArrayBuffer]"&&(c.dictionary=new Uint8Array(c.dictionary)),c.raw&&(a=u.inflateSetDictionary(this.strm,c.dictionary),a!==b.Z_OK)))throw new Error(w[a])}l.prototype.push=function(v,c){var a=this.strm,r=this.options.chunkSize,t=this.options.dictionary,i,n,o,p,O,C=!1;if(this.ended)return!1;n=c===~~c?c:c===!0?b.Z_FINISH:b.Z_NO_FLUSH,typeof v=="string"?a.input=g.binstring2buf(v):h.call(v)==="[object ArrayBuffer]"?a.input=new Uint8Array(v):a.input=v,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new m.Buf8(r),a.next_out=0,a.avail_out=r),i=u.inflate(a,b.Z_NO_FLUSH),i===b.Z_NEED_DICT&&t&&(i=u.inflateSetDictionary(this.strm,t)),i===b.Z_BUF_ERROR&&C===!0&&(i=b.Z_OK,C=!1),i!==b.Z_STREAM_END&&i!==b.Z_OK)return this.onEnd(i),this.ended=!0,!1;a.next_out&&(a.avail_out===0||i===b.Z_STREAM_END||a.avail_in===0&&(n===b.Z_FINISH||n===b.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=g.utf8border(a.output,a.next_out),p=a.next_out-o,O=g.buf2string(a.output,o),a.next_out=p,a.avail_out=r-p,p&&m.arraySet(a.output,a.output,o,p,0),this.onData(O)):this.onData(m.shrinkBuf(a.output,a.next_out))),a.avail_in===0&&a.avail_out===0&&(C=!0)}while((a.avail_in>0||a.avail_out===0)&&i!==b.Z_STREAM_END);return i===b.Z_STREAM_END&&(n=b.Z_FINISH),n===b.Z_FINISH?(i=u.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===b.Z_OK):(n===b.Z_SYNC_FLUSH&&(this.onEnd(b.Z_OK),a.avail_out=0),!0)},l.prototype.onData=function(v){this.chunks.push(v)},l.prototype.onEnd=function(v){v===b.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg};function d(v,c){var a=new l(c);if(a.push(v,!0),a.err)throw a.msg||w[a.err];return a.result}function s(v,c){return c=c||{},c.raw=!0,d(v,c)}_.Inflate=l,_.inflate=d,_.inflateRaw=s,_.ungzip=d},{"./utils/common":442,"./utils/strings":443,"./zlib/constants":445,"./zlib/gzheader":448,"./zlib/inflate":450,"./zlib/messages":452,"./zlib/zstream":454}],442:[function(e,x,_){function u(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(h){return typeof h}:u=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},u(f)}var m=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function g(f,y){return Object.prototype.hasOwnProperty.call(f,y)}_.assign=function(f){for(var y=Array.prototype.slice.call(arguments,1);y.length;){var h=y.shift();if(h){if(u(h)!=="object")throw new TypeError(h+"must be non-object");for(var l in h)g(h,l)&&(f[l]=h[l])}}return f},_.shrinkBuf=function(f,y){return f.length===y?f:f.subarray?f.subarray(0,y):(f.length=y,f)};var b={arraySet:function(y,h,l,d,s){if(h.subarray&&y.subarray){y.set(h.subarray(l,l+d),s);return}for(var v=0;v=252?6:w>=248?5:w>=240?4:w>=224?3:w>=192?2:1;b[254]=b[254]=1,_.string2buf=function(y){var h,l,d,s,v,c=y.length,a=0;for(s=0;s>>6,h[v++]=128|l&63):l<65536?(h[v++]=224|l>>>12,h[v++]=128|l>>>6&63,h[v++]=128|l&63):(h[v++]=240|l>>>18,h[v++]=128|l>>>12&63,h[v++]=128|l>>>6&63,h[v++]=128|l&63);return h};function f(y,h){if(h<65534&&(y.subarray&&g||!y.subarray&&m))return String.fromCharCode.apply(null,u.shrinkBuf(y,h));for(var l="",d=0;d4){a[d++]=65533,l+=v-1;continue}for(s&=v===2?31:v===3?15:7;v>1&&l1){a[d++]=65533;continue}s<65536?a[d++]=s:(s-=65536,a[d++]=55296|s>>10&1023,a[d++]=56320|s&1023)}return f(a,d)},_.utf8border=function(y,h){var l;for(h=h||y.length,h>y.length&&(h=y.length),l=h-1;l>=0&&(y[l]&192)===128;)l--;return l<0||l===0?h:l+b[y[l]]>h?l:h}},{"./common":442}],444:[function(e,x,_){function u(m,g,b,w){for(var f=m&65535|0,y=m>>>16&65535|0,h=0;b!==0;){h=b>2e3?2e3:b,b-=h;do f=f+g[w++]|0,y=y+f|0;while(--h);f%=65521,y%=65521}return f|y<<16|0}x.exports=u},{}],445:[function(e,x,_){x.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],446:[function(e,x,_){function u(){for(var b,w=[],f=0;f<256;f++){b=f;for(var y=0;y<8;y++)b=b&1?3988292384^b>>>1:b>>>1;w[f]=b}return w}var m=u();function g(b,w,f,y){var h=m,l=y+f;b^=-1;for(var d=y;d>>8^h[(b^w[d])&255];return b^-1}x.exports=g},{}],447:[function(e,x,_){var u=e("../utils/common"),m=e("./trees"),g=e("./adler32"),b=e("./crc32"),w=e("./messages"),f=0,y=1,h=3,l=4,d=5,s=0,v=1,c=-2,a=-3,r=-5,t=-1,i=1,n=2,o=3,p=4,O=0,C=2,N=8,L=9,F=15,M=8,D=29,R=256,P=R+1+D,E=30,A=19,z=2*P+1,W=15,$=3,U=258,I=U+$+1,j=32,B=42,V=69,te=73,ie=91,ce=103,be=113,_e=666,oe=1,J=2,Q=3,he=4,ke=3;function re(K,Me){return K.msg=w[Me],Me}function se(K){return(K<<1)-(K>4?9:0)}function Ce(K){for(var Me=K.length;--Me>=0;)K[Me]=0}function q(K){var Me=K.state,Le=Me.pending;Le>K.avail_out&&(Le=K.avail_out),Le!==0&&(u.arraySet(K.output,Me.pending_buf,Me.pending_out,Le,K.next_out),K.next_out+=Le,Me.pending_out+=Le,K.total_out+=Le,K.avail_out-=Le,Me.pending-=Le,Me.pending===0&&(Me.pending_out=0))}function G(K,Me){m._tr_flush_block(K,K.block_start>=0?K.block_start:-1,K.strstart-K.block_start,Me),K.block_start=K.strstart,q(K.strm)}function Z(K,Me){K.pending_buf[K.pending++]=Me}function fe(K,Me){K.pending_buf[K.pending++]=Me>>>8&255,K.pending_buf[K.pending++]=Me&255}function we(K,Me,Le,ue){var Se=K.avail_in;return Se>ue&&(Se=ue),Se===0?0:(K.avail_in-=Se,u.arraySet(Me,K.input,K.next_in,Se,Le),K.state.wrap===1?K.adler=g(K.adler,Me,Se,Le):K.state.wrap===2&&(K.adler=b(K.adler,Me,Se,Le)),K.next_in+=Se,K.total_in+=Se,Se)}function ge(K,Me){var Le=K.max_chain_length,ue=K.strstart,Se,Ie,st=K.prev_length,Ge=K.nice_match,rt=K.strstart>K.w_size-I?K.strstart-(K.w_size-I):0,_t=K.window,wt=K.w_mask,Ot=K.prev,pt=K.strstart+U,ct=_t[ue+st-1],At=_t[ue+st];K.prev_length>=K.good_match&&(Le>>=2),Ge>K.lookahead&&(Ge=K.lookahead);do if(Se=Me,!(_t[Se+st]!==At||_t[Se+st-1]!==ct||_t[Se]!==_t[ue]||_t[++Se]!==_t[ue+1])){ue+=2,Se++;do;while(_t[++ue]===_t[++Se]&&_t[++ue]===_t[++Se]&&_t[++ue]===_t[++Se]&&_t[++ue]===_t[++Se]&&_t[++ue]===_t[++Se]&&_t[++ue]===_t[++Se]&&_t[++ue]===_t[++Se]&&_t[++ue]===_t[++Se]&&uest){if(K.match_start=Me,st=Ie,Ie>=Ge)break;ct=_t[ue+st-1],At=_t[ue+st]}}while((Me=Ot[Me&wt])>rt&&--Le!==0);return st<=K.lookahead?st:K.lookahead}function je(K){var Me=K.w_size,Le,ue,Se,Ie,st;do{if(Ie=K.window_size-K.lookahead-K.strstart,K.strstart>=Me+(Me-I)){u.arraySet(K.window,K.window,Me,Me,0),K.match_start-=Me,K.strstart-=Me,K.block_start-=Me,ue=K.hash_size,Le=ue;do Se=K.head[--Le],K.head[Le]=Se>=Me?Se-Me:0;while(--ue);ue=Me,Le=ue;do Se=K.prev[--Le],K.prev[Le]=Se>=Me?Se-Me:0;while(--ue);Ie+=Me}if(K.strm.avail_in===0)break;if(ue=we(K.strm,K.window,K.strstart+K.lookahead,Ie),K.lookahead+=ue,K.lookahead+K.insert>=$)for(st=K.strstart-K.insert,K.ins_h=K.window[st],K.ins_h=(K.ins_h<K.pending_buf_size-5&&(Le=K.pending_buf_size-5);;){if(K.lookahead<=1){if(je(K),K.lookahead===0&&Me===f)return oe;if(K.lookahead===0)break}K.strstart+=K.lookahead,K.lookahead=0;var ue=K.block_start+Le;if((K.strstart===0||K.strstart>=ue)&&(K.lookahead=K.strstart-ue,K.strstart=ue,G(K,!1),K.strm.avail_out===0)||K.strstart-K.block_start>=K.w_size-I&&(G(K,!1),K.strm.avail_out===0))return oe}return K.insert=0,Me===l?(G(K,!0),K.strm.avail_out===0?Q:he):(K.strstart>K.block_start&&(G(K,!1),K.strm.avail_out===0),oe)}function nt(K,Me){for(var Le,ue;;){if(K.lookahead=$&&(K.ins_h=(K.ins_h<=$)if(ue=m._tr_tally(K,K.strstart-K.match_start,K.match_length-$),K.lookahead-=K.match_length,K.match_length<=K.max_lazy_match&&K.lookahead>=$){K.match_length--;do K.strstart++,K.ins_h=(K.ins_h<=$&&(K.ins_h=(K.ins_h<4096)&&(K.match_length=$-1)),K.prev_length>=$&&K.match_length<=K.prev_length){Se=K.strstart+K.lookahead-$,ue=m._tr_tally(K,K.strstart-1-K.prev_match,K.prev_length-$),K.lookahead-=K.prev_length-1,K.prev_length-=2;do++K.strstart<=Se&&(K.ins_h=(K.ins_h<=$&&K.strstart>0&&(Se=K.strstart-1,ue=st[Se],ue===st[++Se]&&ue===st[++Se]&&ue===st[++Se])){Ie=K.strstart+U;do;while(ue===st[++Se]&&ue===st[++Se]&&ue===st[++Se]&&ue===st[++Se]&&ue===st[++Se]&&ue===st[++Se]&&ue===st[++Se]&&ue===st[++Se]&&SeK.lookahead&&(K.match_length=K.lookahead)}if(K.match_length>=$?(Le=m._tr_tally(K,1,K.match_length-$),K.lookahead-=K.match_length,K.strstart+=K.match_length,K.match_length=0):(Le=m._tr_tally(K,0,K.window[K.strstart]),K.lookahead--,K.strstart++),Le&&(G(K,!1),K.strm.avail_out===0))return oe}return K.insert=0,Me===l?(G(K,!0),K.strm.avail_out===0?Q:he):K.last_lit&&(G(K,!1),K.strm.avail_out===0)?oe:J}function Ue(K,Me){for(var Le;;){if(K.lookahead===0&&(je(K),K.lookahead===0)){if(Me===f)return oe;break}if(K.match_length=0,Le=m._tr_tally(K,0,K.window[K.strstart]),K.lookahead--,K.strstart++,Le&&(G(K,!1),K.strm.avail_out===0))return oe}return K.insert=0,Me===l?(G(K,!0),K.strm.avail_out===0?Q:he):K.last_lit&&(G(K,!1),K.strm.avail_out===0)?oe:J}function Ve(K,Me,Le,ue,Se){this.good_length=K,this.max_lazy=Me,this.nice_length=Le,this.max_chain=ue,this.func=Se}var Qe;Qe=[new Ve(0,0,0,0,Ze),new Ve(4,4,8,4,nt),new Ve(4,5,16,8,nt),new Ve(4,6,32,32,nt),new Ve(4,4,16,16,ut),new Ve(8,16,32,32,ut),new Ve(8,16,128,128,ut),new Ve(8,32,128,256,ut),new Ve(32,128,258,1024,ut),new Ve(32,258,258,4096,ut)];function tt(K){K.window_size=2*K.w_size,Ce(K.head),K.max_lazy_match=Qe[K.level].max_lazy,K.good_match=Qe[K.level].good_length,K.nice_match=Qe[K.level].nice_length,K.max_chain_length=Qe[K.level].max_chain,K.strstart=0,K.block_start=0,K.lookahead=0,K.insert=0,K.match_length=K.prev_length=$-1,K.match_available=0,K.ins_h=0}function ae(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=N,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new u.Buf16(z*2),this.dyn_dtree=new u.Buf16((2*E+1)*2),this.bl_tree=new u.Buf16((2*A+1)*2),Ce(this.dyn_ltree),Ce(this.dyn_dtree),Ce(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new u.Buf16(W+1),this.heap=new u.Buf16(2*P+1),Ce(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new u.Buf16(2*P+1),Ce(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Re(K){var Me;return!K||!K.state?re(K,c):(K.total_in=K.total_out=0,K.data_type=C,Me=K.state,Me.pending=0,Me.pending_out=0,Me.wrap<0&&(Me.wrap=-Me.wrap),Me.status=Me.wrap?B:be,K.adler=Me.wrap===2?0:1,Me.last_flush=f,m._tr_init(Me),s)}function me(K){var Me=Re(K);return Me===s&&tt(K.state),Me}function Ee(K,Me){return!K||!K.state||K.state.wrap!==2?c:(K.state.gzhead=Me,s)}function pe(K,Me,Le,ue,Se,Ie){if(!K)return c;var st=1;if(Me===t&&(Me=6),ue<0?(st=0,ue=-ue):ue>15&&(st=2,ue-=16),Se<1||Se>L||Le!==N||ue<8||ue>15||Me<0||Me>9||Ie<0||Ie>p)return re(K,c);ue===8&&(ue=9);var Ge=new ae;return K.state=Ge,Ge.strm=K,Ge.wrap=st,Ge.gzhead=null,Ge.w_bits=ue,Ge.w_size=1<d||Me<0)return K?re(K,c):c;if(ue=K.state,!K.output||!K.input&&K.avail_in!==0||ue.status===_e&&Me!==l)return re(K,K.avail_out===0?r:c);if(ue.strm=K,Le=ue.last_flush,ue.last_flush=Me,ue.status===B)if(ue.wrap===2)K.adler=0,Z(ue,31),Z(ue,139),Z(ue,8),ue.gzhead?(Z(ue,(ue.gzhead.text?1:0)+(ue.gzhead.hcrc?2:0)+(ue.gzhead.extra?4:0)+(ue.gzhead.name?8:0)+(ue.gzhead.comment?16:0)),Z(ue,ue.gzhead.time&255),Z(ue,ue.gzhead.time>>8&255),Z(ue,ue.gzhead.time>>16&255),Z(ue,ue.gzhead.time>>24&255),Z(ue,ue.level===9?2:ue.strategy>=n||ue.level<2?4:0),Z(ue,ue.gzhead.os&255),ue.gzhead.extra&&ue.gzhead.extra.length&&(Z(ue,ue.gzhead.extra.length&255),Z(ue,ue.gzhead.extra.length>>8&255)),ue.gzhead.hcrc&&(K.adler=b(K.adler,ue.pending_buf,ue.pending,0)),ue.gzindex=0,ue.status=V):(Z(ue,0),Z(ue,0),Z(ue,0),Z(ue,0),Z(ue,0),Z(ue,ue.level===9?2:ue.strategy>=n||ue.level<2?4:0),Z(ue,ke),ue.status=be);else{var st=N+(ue.w_bits-8<<4)<<8,Ge=-1;ue.strategy>=n||ue.level<2?Ge=0:ue.level<6?Ge=1:ue.level===6?Ge=2:Ge=3,st|=Ge<<6,ue.strstart!==0&&(st|=j),st+=31-st%31,ue.status=be,fe(ue,st),ue.strstart!==0&&(fe(ue,K.adler>>>16),fe(ue,K.adler&65535)),K.adler=1}if(ue.status===V)if(ue.gzhead.extra){for(Se=ue.pending;ue.gzindex<(ue.gzhead.extra.length&65535)&&!(ue.pending===ue.pending_buf_size&&(ue.gzhead.hcrc&&ue.pending>Se&&(K.adler=b(K.adler,ue.pending_buf,ue.pending-Se,Se)),q(K),Se=ue.pending,ue.pending===ue.pending_buf_size));)Z(ue,ue.gzhead.extra[ue.gzindex]&255),ue.gzindex++;ue.gzhead.hcrc&&ue.pending>Se&&(K.adler=b(K.adler,ue.pending_buf,ue.pending-Se,Se)),ue.gzindex===ue.gzhead.extra.length&&(ue.gzindex=0,ue.status=te)}else ue.status=te;if(ue.status===te)if(ue.gzhead.name){Se=ue.pending;do{if(ue.pending===ue.pending_buf_size&&(ue.gzhead.hcrc&&ue.pending>Se&&(K.adler=b(K.adler,ue.pending_buf,ue.pending-Se,Se)),q(K),Se=ue.pending,ue.pending===ue.pending_buf_size)){Ie=1;break}ue.gzindexSe&&(K.adler=b(K.adler,ue.pending_buf,ue.pending-Se,Se)),Ie===0&&(ue.gzindex=0,ue.status=ie)}else ue.status=ie;if(ue.status===ie)if(ue.gzhead.comment){Se=ue.pending;do{if(ue.pending===ue.pending_buf_size&&(ue.gzhead.hcrc&&ue.pending>Se&&(K.adler=b(K.adler,ue.pending_buf,ue.pending-Se,Se)),q(K),Se=ue.pending,ue.pending===ue.pending_buf_size)){Ie=1;break}ue.gzindexSe&&(K.adler=b(K.adler,ue.pending_buf,ue.pending-Se,Se)),Ie===0&&(ue.status=ce)}else ue.status=ce;if(ue.status===ce&&(ue.gzhead.hcrc?(ue.pending+2>ue.pending_buf_size&&q(K),ue.pending+2<=ue.pending_buf_size&&(Z(ue,K.adler&255),Z(ue,K.adler>>8&255),K.adler=0,ue.status=be)):ue.status=be),ue.pending!==0){if(q(K),K.avail_out===0)return ue.last_flush=-1,s}else if(K.avail_in===0&&se(Me)<=se(Le)&&Me!==l)return re(K,r);if(ue.status===_e&&K.avail_in!==0)return re(K,r);if(K.avail_in!==0||ue.lookahead!==0||Me!==f&&ue.status!==_e){var rt=ue.strategy===n?Ue(ue,Me):ue.strategy===o?ot(ue,Me):Qe[ue.level].func(ue,Me);if((rt===Q||rt===he)&&(ue.status=_e),rt===oe||rt===Q)return K.avail_out===0&&(ue.last_flush=-1),s;if(rt===J&&(Me===y?m._tr_align(ue):Me!==d&&(m._tr_stored_block(ue,0,0,!1),Me===h&&(Ce(ue.head),ue.lookahead===0&&(ue.strstart=0,ue.block_start=0,ue.insert=0))),q(K),K.avail_out===0))return ue.last_flush=-1,s}return Me!==l?s:ue.wrap<=0?v:(ue.wrap===2?(Z(ue,K.adler&255),Z(ue,K.adler>>8&255),Z(ue,K.adler>>16&255),Z(ue,K.adler>>24&255),Z(ue,K.total_in&255),Z(ue,K.total_in>>8&255),Z(ue,K.total_in>>16&255),Z(ue,K.total_in>>24&255)):(fe(ue,K.adler>>>16),fe(ue,K.adler&65535)),q(K),ue.wrap>0&&(ue.wrap=-ue.wrap),ue.pending!==0?s:v)}function Xe(K){var Me;return!K||!K.state?c:(Me=K.state.status,Me!==B&&Me!==V&&Me!==te&&Me!==ie&&Me!==ce&&Me!==be&&Me!==_e?re(K,c):(K.state=null,Me===be?re(K,a):s))}function it(K,Me){var Le=Me.length,ue,Se,Ie,st,Ge,rt,_t,wt;if(!K||!K.state||(ue=K.state,st=ue.wrap,st===2||st===1&&ue.status!==B||ue.lookahead))return c;for(st===1&&(K.adler=g(K.adler,Me,Le,0)),ue.wrap=0,Le>=ue.w_size&&(st===0&&(Ce(ue.head),ue.strstart=0,ue.block_start=0,ue.insert=0),wt=new u.Buf8(ue.w_size),u.arraySet(wt,Me,Le-ue.w_size,ue.w_size,0),Me=wt,Le=ue.w_size),Ge=K.avail_in,rt=K.next_in,_t=K.input,K.avail_in=Le,K.next_in=0,K.input=Me,je(ue);ue.lookahead>=$;){Se=ue.strstart,Ie=ue.lookahead-($-1);do ue.ins_h=(ue.ins_h<>>24,i>>>=L,n-=L,L=N>>>16&255,L===0)E[l++]=N&65535;else if(L&16){F=N&65535,L&=15,L&&(n>>=L,n-=L),n<15&&(i+=P[y++]<>>24,i>>>=L,n-=L,L=N>>>16&255,L&16){if(M=N&65535,L&=15,nv){b.msg="invalid distance too far back",f.mode=u;break e}if(i>>>=L,n-=L,L=l-d,M>L){if(L=M-L,L>a&&f.sane){b.msg="invalid distance too far back",f.mode=u;break e}if(D=0,R=t,r===0){if(D+=c-L,L2;)E[l++]=R[D++],E[l++]=R[D++],E[l++]=R[D++],F-=3;F&&(E[l++]=R[D++],F>1&&(E[l++]=R[D++]))}else{D=l-M;do E[l++]=E[D++],E[l++]=E[D++],E[l++]=E[D++],F-=3;while(F>2);F&&(E[l++]=E[D++],F>1&&(E[l++]=E[D++]))}}else if(L&64){b.msg="invalid distance code",f.mode=u;break e}else{N=p[(N&65535)+(i&(1<>3,y-=F,n-=F<<3,i&=(1<>>24&255)+(pe>>>8&65280)+((pe&65280)<<8)+((pe&255)<<24)}function we(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ge(pe){var Pe;return!pe||!pe.state?r:(Pe=pe.state,pe.total_in=pe.total_out=Pe.total=0,pe.msg="",Pe.wrap&&(pe.adler=Pe.wrap&1),Pe.mode=p,Pe.last=0,Pe.havedict=0,Pe.dmax=32768,Pe.head=null,Pe.hold=0,Pe.bits=0,Pe.lencode=Pe.lendyn=new u.Buf32(Ce),Pe.distcode=Pe.distdyn=new u.Buf32(q),Pe.sane=1,Pe.back=-1,v)}function je(pe){var Pe;return!pe||!pe.state?r:(Pe=pe.state,Pe.wsize=0,Pe.whave=0,Pe.wnext=0,ge(pe))}function Ze(pe,Pe){var ee,Xe;return!pe||!pe.state||(Xe=pe.state,Pe<0?(ee=0,Pe=-Pe):(ee=(Pe>>4)+1,Pe<48&&(Pe&=15)),Pe&&(Pe<8||Pe>15))?r:(Xe.window!==null&&Xe.wbits!==Pe&&(Xe.window=null),Xe.wrap=ee,Xe.wbits=Pe,je(pe))}function nt(pe,Pe){var ee,Xe;return pe?(Xe=new we,pe.state=Xe,Xe.window=null,ee=Ze(pe,Pe),ee!==v&&(pe.state=null),ee):r}function ut(pe){return nt(pe,Z)}var ot=!0,Ue,Ve;function Qe(pe){if(ot){var Pe;for(Ue=new u.Buf32(512),Ve=new u.Buf32(32),Pe=0;Pe<144;)pe.lens[Pe++]=8;for(;Pe<256;)pe.lens[Pe++]=9;for(;Pe<280;)pe.lens[Pe++]=7;for(;Pe<288;)pe.lens[Pe++]=8;for(w(y,pe.lens,0,288,Ue,0,pe.work,{bits:9}),Pe=0;Pe<32;)pe.lens[Pe++]=5;w(h,pe.lens,0,32,Ve,0,pe.work,{bits:5}),ot=!1}pe.lencode=Ue,pe.lenbits=9,pe.distcode=Ve,pe.distbits=5}function tt(pe,Pe,ee,Xe){var it,K=pe.state;return K.window===null&&(K.wsize=1<=K.wsize?(u.arraySet(K.window,Pe,ee-K.wsize,K.wsize,0),K.wnext=0,K.whave=K.wsize):(it=K.wsize-K.wnext,it>Xe&&(it=Xe),u.arraySet(K.window,Pe,ee-Xe,it,K.wnext),Xe-=it,Xe?(u.arraySet(K.window,Pe,ee-Xe,Xe,0),K.wnext=Xe,K.whave=K.wsize):(K.wnext+=it,K.wnext===K.wsize&&(K.wnext=0),K.whave>>8&255,ee.check=g(ee.check,Ft,2,0),Se=0,Ie=0,ee.mode=O;break}if(ee.flags=0,ee.head&&(ee.head.done=!1),!(ee.wrap&1)||(((Se&255)<<8)+(Se>>8))%31){pe.msg="incorrect header check",ee.mode=ke;break}if((Se&15)!==o){pe.msg="unknown compression method",ee.mode=ke;break}if(Se>>>=4,Ie-=4,Ct=(Se&15)+8,ee.wbits===0)ee.wbits=Ct;else if(Ct>ee.wbits){pe.msg="invalid window size",ee.mode=ke;break}ee.dmax=1<>8&1),ee.flags&512&&(Ft[0]=Se&255,Ft[1]=Se>>>8&255,ee.check=g(ee.check,Ft,2,0)),Se=0,Ie=0,ee.mode=C;case C:for(;Ie<32;){if(Le===0)break e;Le--,Se+=Xe[K++]<>>8&255,Ft[2]=Se>>>16&255,Ft[3]=Se>>>24&255,ee.check=g(ee.check,Ft,4,0)),Se=0,Ie=0,ee.mode=N;case N:for(;Ie<16;){if(Le===0)break e;Le--,Se+=Xe[K++]<>8),ee.flags&512&&(Ft[0]=Se&255,Ft[1]=Se>>>8&255,ee.check=g(ee.check,Ft,2,0)),Se=0,Ie=0,ee.mode=L;case L:if(ee.flags&1024){for(;Ie<16;){if(Le===0)break e;Le--,Se+=Xe[K++]<>>8&255,ee.check=g(ee.check,Ft,2,0)),Se=0,Ie=0}else ee.head&&(ee.head.extra=null);ee.mode=F;case F:if(ee.flags&1024&&(rt=ee.length,rt>Le&&(rt=Le),rt&&(ee.head&&(Ct=ee.head.extra_len-ee.length,ee.head.extra||(ee.head.extra=new Array(ee.head.extra_len)),u.arraySet(ee.head.extra,Xe,K,rt,Ct)),ee.flags&512&&(ee.check=g(ee.check,Xe,rt,K)),Le-=rt,K+=rt,ee.length-=rt),ee.length))break e;ee.length=0,ee.mode=M;case M:if(ee.flags&2048){if(Le===0)break e;rt=0;do Ct=Xe[K+rt++],ee.head&&Ct&&ee.length<65536&&(ee.head.name+=String.fromCharCode(Ct));while(Ct&&rt>9&1,ee.head.done=!0),pe.adler=ee.check=0,ee.mode=A;break;case P:for(;Ie<32;){if(Le===0)break e;Le--,Se+=Xe[K++]<>>=Ie&7,Ie-=Ie&7,ee.mode=J;break}for(;Ie<3;){if(Le===0)break e;Le--,Se+=Xe[K++]<>>=1,Ie-=1,Se&3){case 0:ee.mode=W;break;case 1:if(Qe(ee),ee.mode=V,Pe===s){Se>>>=2,Ie-=2;break e}break;case 2:ee.mode=I;break;case 3:pe.msg="invalid block type",ee.mode=ke}Se>>>=2,Ie-=2;break;case W:for(Se>>>=Ie&7,Ie-=Ie&7;Ie<32;){if(Le===0)break e;Le--,Se+=Xe[K++]<>>16^65535)){pe.msg="invalid stored block lengths",ee.mode=ke;break}if(ee.length=Se&65535,Se=0,Ie=0,ee.mode=$,Pe===s)break e;case $:ee.mode=U;case U:if(rt=ee.length,rt){if(rt>Le&&(rt=Le),rt>ue&&(rt=ue),rt===0)break e;u.arraySet(it,Xe,K,rt,Me),Le-=rt,K+=rt,ue-=rt,Me+=rt,ee.length-=rt;break}ee.mode=A;break;case I:for(;Ie<14;){if(Le===0)break e;Le--,Se+=Xe[K++]<>>=5,Ie-=5,ee.ndist=(Se&31)+1,Se>>>=5,Ie-=5,ee.ncode=(Se&15)+4,Se>>>=4,Ie-=4,ee.nlen>286||ee.ndist>30){pe.msg="too many length or distance symbols",ee.mode=ke;break}ee.have=0,ee.mode=j;case j:for(;ee.have>>=3,Ie-=3}for(;ee.have<19;)ee.lens[Dr[ee.have++]]=0;if(ee.lencode=ee.lendyn,ee.lenbits=7,Lt={bits:ee.lenbits},xt=w(f,ee.lens,0,19,ee.lencode,0,ee.work,Lt),ee.lenbits=Lt.bits,xt){pe.msg="invalid code lengths set",ee.mode=ke;break}ee.have=0,ee.mode=B;case B:for(;ee.have>>24,ct=Ot>>>16&255,At=Ot&65535,!(pt<=Ie);){if(Le===0)break e;Le--,Se+=Xe[K++]<>>=pt,Ie-=pt,ee.lens[ee.have++]=At;else{if(At===16){for(Et=pt+2;Ie>>=pt,Ie-=pt,ee.have===0){pe.msg="invalid bit length repeat",ee.mode=ke;break}Ct=ee.lens[ee.have-1],rt=3+(Se&3),Se>>>=2,Ie-=2}else if(At===17){for(Et=pt+3;Ie>>=pt,Ie-=pt,Ct=0,rt=3+(Se&7),Se>>>=3,Ie-=3}else{for(Et=pt+7;Ie>>=pt,Ie-=pt,Ct=0,rt=11+(Se&127),Se>>>=7,Ie-=7}if(ee.have+rt>ee.nlen+ee.ndist){pe.msg="invalid bit length repeat",ee.mode=ke;break}for(;rt--;)ee.lens[ee.have++]=Ct}}if(ee.mode===ke)break;if(ee.lens[256]===0){pe.msg="invalid code -- missing end-of-block",ee.mode=ke;break}if(ee.lenbits=9,Lt={bits:ee.lenbits},xt=w(y,ee.lens,0,ee.nlen,ee.lencode,0,ee.work,Lt),ee.lenbits=Lt.bits,xt){pe.msg="invalid literal/lengths set",ee.mode=ke;break}if(ee.distbits=6,ee.distcode=ee.distdyn,Lt={bits:ee.distbits},xt=w(h,ee.lens,ee.nlen,ee.ndist,ee.distcode,0,ee.work,Lt),ee.distbits=Lt.bits,xt){pe.msg="invalid distances set",ee.mode=ke;break}if(ee.mode=V,Pe===s)break e;case V:ee.mode=te;case te:if(Le>=6&&ue>=258){pe.next_out=Me,pe.avail_out=ue,pe.next_in=K,pe.avail_in=Le,ee.hold=Se,ee.bits=Ie,b(pe,Ge),Me=pe.next_out,it=pe.output,ue=pe.avail_out,K=pe.next_in,Xe=pe.input,Le=pe.avail_in,Se=ee.hold,Ie=ee.bits,ee.mode===A&&(ee.back=-1);break}for(ee.back=0;Ot=ee.lencode[Se&(1<>>24,ct=Ot>>>16&255,At=Ot&65535,!(pt<=Ie);){if(Le===0)break e;Le--,Se+=Xe[K++]<>Pt)],pt=Ot>>>24,ct=Ot>>>16&255,At=Ot&65535,!(Pt+pt<=Ie);){if(Le===0)break e;Le--,Se+=Xe[K++]<>>=Pt,Ie-=Pt,ee.back+=Pt}if(Se>>>=pt,Ie-=pt,ee.back+=pt,ee.length=At,ct===0){ee.mode=oe;break}if(ct&32){ee.back=-1,ee.mode=A;break}if(ct&64){pe.msg="invalid literal/length code",ee.mode=ke;break}ee.extra=ct&15,ee.mode=ie;case ie:if(ee.extra){for(Et=ee.extra;Ie>>=ee.extra,Ie-=ee.extra,ee.back+=ee.extra}ee.was=ee.length,ee.mode=ce;case ce:for(;Ot=ee.distcode[Se&(1<>>24,ct=Ot>>>16&255,At=Ot&65535,!(pt<=Ie);){if(Le===0)break e;Le--,Se+=Xe[K++]<>Pt)],pt=Ot>>>24,ct=Ot>>>16&255,At=Ot&65535,!(Pt+pt<=Ie);){if(Le===0)break e;Le--,Se+=Xe[K++]<>>=Pt,Ie-=Pt,ee.back+=Pt}if(Se>>>=pt,Ie-=pt,ee.back+=pt,ct&64){pe.msg="invalid distance code",ee.mode=ke;break}ee.offset=At,ee.extra=ct&15,ee.mode=be;case be:if(ee.extra){for(Et=ee.extra;Ie>>=ee.extra,Ie-=ee.extra,ee.back+=ee.extra}if(ee.offset>ee.dmax){pe.msg="invalid distance too far back",ee.mode=ke;break}ee.mode=_e;case _e:if(ue===0)break e;if(rt=Ge-ue,ee.offset>rt){if(rt=ee.offset-rt,rt>ee.whave&&ee.sane){pe.msg="invalid distance too far back",ee.mode=ke;break}rt>ee.wnext?(rt-=ee.wnext,_t=ee.wsize-rt):_t=ee.wnext-rt,rt>ee.length&&(rt=ee.length),wt=ee.window}else wt=it,_t=Me-ee.offset,rt=ee.length;rt>ue&&(rt=ue),ue-=rt,ee.length-=rt;do it[Me++]=wt[_t++];while(--rt);ee.length===0&&(ee.mode=te);break;case oe:if(ue===0)break e;it[Me++]=ee.length,ue--,ee.mode=te;break;case J:if(ee.wrap){for(;Ie<32;){if(Le===0)break e;Le--,Se|=Xe[K++]<=1&&te[F]===0;F--);if(M>F&&(M=F),F===0)return i[n++]=1<<24|64<<16|0,i[n++]=1<<24|64<<16|0,p.bits=1,0;for(L=1;L0&&(c===w||F!==1))return-1;for(ie[1]=0,C=1;Cg||c===y&&E>b)return 1;for(;;){_e=C-R,o[N]V?(oe=ce[be+o[N]],J=j[B+o[N]]):(oe=32+64,J=0),z=1<>R)+W]=_e<<24|oe<<16|J|0;while(W!==0);for(z=1<>=1;if(z!==0?(A&=z-1,A+=z):A=0,N++,--te[C]===0){if(C===F)break;C=a[r+o[N]]}if(C>M&&(A&U)!==$){for(R===0&&(R=M),I+=L,D=C-R,P=1<g||c===y&&E>b)return 1;$=A&U,i[$]=M<<24|D<<16|I-n|0}}return A!==0&&(i[I+A]=C-R<<24|64<<16|0),p.bits=M,0}},{"../utils/common":442}],452:[function(e,x,_){x.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],453:[function(e,x,_){var u=e("../utils/common"),m=4,g=0,b=1,w=2;function f(ae){for(var Re=ae.length;--Re>=0;)ae[Re]=0}var y=0,h=1,l=2,d=3,s=258,v=29,c=256,a=c+1+v,r=30,t=19,i=2*a+1,n=15,o=16,p=7,O=256,C=16,N=17,L=18,F=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],P=512,E=new Array((a+2)*2);f(E);var A=new Array(r*2);f(A);var z=new Array(P);f(z);var W=new Array(s-d+1);f(W);var $=new Array(v);f($);var U=new Array(r);f(U);function I(ae,Re,me,Ee,pe){this.static_tree=ae,this.extra_bits=Re,this.extra_base=me,this.elems=Ee,this.max_length=pe,this.has_stree=ae&&ae.length}var j,B,V;function te(ae,Re){this.dyn_tree=ae,this.max_code=0,this.stat_desc=Re}function ie(ae){return ae<256?z[ae]:z[256+(ae>>>7)]}function ce(ae,Re){ae.pending_buf[ae.pending++]=Re&255,ae.pending_buf[ae.pending++]=Re>>>8&255}function be(ae,Re,me){ae.bi_valid>o-me?(ae.bi_buf|=Re<>o-ae.bi_valid,ae.bi_valid+=me-o):(ae.bi_buf|=Re<>>=1,me<<=1;while(--Re>0);return me>>>1}function J(ae){ae.bi_valid===16?(ce(ae,ae.bi_buf),ae.bi_buf=0,ae.bi_valid=0):ae.bi_valid>=8&&(ae.pending_buf[ae.pending++]=ae.bi_buf&255,ae.bi_buf>>=8,ae.bi_valid-=8)}function Q(ae,Re){var me=Re.dyn_tree,Ee=Re.max_code,pe=Re.stat_desc.static_tree,Pe=Re.stat_desc.has_stree,ee=Re.stat_desc.extra_bits,Xe=Re.stat_desc.extra_base,it=Re.stat_desc.max_length,K,Me,Le,ue,Se,Ie,st=0;for(ue=0;ue<=n;ue++)ae.bl_count[ue]=0;for(me[ae.heap[ae.heap_max]*2+1]=0,K=ae.heap_max+1;Kit&&(ue=it,st++),me[Me*2+1]=ue,!(Me>Ee)&&(ae.bl_count[ue]++,Se=0,Me>=Xe&&(Se=ee[Me-Xe]),Ie=me[Me*2],ae.opt_len+=Ie*(ue+Se),Pe&&(ae.static_len+=Ie*(pe[Me*2+1]+Se)));if(st!==0){do{for(ue=it-1;ae.bl_count[ue]===0;)ue--;ae.bl_count[ue]--,ae.bl_count[ue+1]+=2,ae.bl_count[it]--,st-=2}while(st>0);for(ue=it;ue!==0;ue--)for(Me=ae.bl_count[ue];Me!==0;)Le=ae.heap[--K],!(Le>Ee)&&(me[Le*2+1]!==ue&&(ae.opt_len+=(ue-me[Le*2+1])*me[Le*2],me[Le*2+1]=ue),Me--)}}function he(ae,Re,me){var Ee=new Array(n+1),pe=0,Pe,ee;for(Pe=1;Pe<=n;Pe++)Ee[Pe]=pe=pe+me[Pe-1]<<1;for(ee=0;ee<=Re;ee++){var Xe=ae[ee*2+1];Xe!==0&&(ae[ee*2]=oe(Ee[Xe]++,Xe))}}function ke(){var ae,Re,me,Ee,pe,Pe=new Array(n+1);for(me=0,Ee=0;Ee>=7;Ee8?ce(ae,ae.bi_buf):ae.bi_valid>0&&(ae.pending_buf[ae.pending++]=ae.bi_buf),ae.bi_buf=0,ae.bi_valid=0}function Ce(ae,Re,me,Ee){se(ae),Ee&&(ce(ae,me),ce(ae,~me)),u.arraySet(ae.pending_buf,ae.window,Re,me,ae.pending),ae.pending+=me}function q(ae,Re,me,Ee){var pe=Re*2,Pe=me*2;return ae[pe]>1;ee>=1;ee--)G(ae,me,ee);K=Pe;do ee=ae.heap[1],ae.heap[1]=ae.heap[ae.heap_len--],G(ae,me,1),Xe=ae.heap[1],ae.heap[--ae.heap_max]=ee,ae.heap[--ae.heap_max]=Xe,me[K*2]=me[ee*2]+me[Xe*2],ae.depth[K]=(ae.depth[ee]>=ae.depth[Xe]?ae.depth[ee]:ae.depth[Xe])+1,me[ee*2+1]=me[Xe*2+1]=K,ae.heap[1]=K++,G(ae,me,1);while(ae.heap_len>=2);ae.heap[--ae.heap_max]=ae.heap[1],Q(ae,Re),he(me,it,ae.bl_count)}function we(ae,Re,me){var Ee,pe=-1,Pe,ee=Re[0*2+1],Xe=0,it=7,K=4;for(ee===0&&(it=138,K=3),Re[(me+1)*2+1]=65535,Ee=0;Ee<=me;Ee++)Pe=ee,ee=Re[(Ee+1)*2+1],!(++Xe=3&&ae.bl_tree[R[Re]*2+1]===0;Re--);return ae.opt_len+=3*(Re+1)+5+5+4,Re}function Ze(ae,Re,me,Ee){var pe;for(be(ae,Re-257,5),be(ae,me-1,5),be(ae,Ee-4,4),pe=0;pe>>=1)if(Re&1&&ae.dyn_ltree[me*2]!==0)return g;if(ae.dyn_ltree[9*2]!==0||ae.dyn_ltree[10*2]!==0||ae.dyn_ltree[13*2]!==0)return b;for(me=32;me0?(ae.strm.data_type===w&&(ae.strm.data_type=nt(ae)),fe(ae,ae.l_desc),fe(ae,ae.d_desc),ee=je(ae),pe=ae.opt_len+3+7>>>3,Pe=ae.static_len+3+7>>>3,Pe<=pe&&(pe=Pe)):pe=Pe=me+5,me+4<=pe&&Re!==-1?Ue(ae,Re,me,Ee):ae.strategy===m||Pe===pe?(be(ae,(h<<1)+(Ee?1:0),3),Z(ae,E,A)):(be(ae,(l<<1)+(Ee?1:0),3),Ze(ae,ae.l_desc.max_code+1,ae.d_desc.max_code+1,ee+1),Z(ae,ae.dyn_ltree,ae.dyn_dtree)),re(ae),Ee&&se(ae)}function tt(ae,Re,me){return ae.pending_buf[ae.d_buf+ae.last_lit*2]=Re>>>8&255,ae.pending_buf[ae.d_buf+ae.last_lit*2+1]=Re&255,ae.pending_buf[ae.l_buf+ae.last_lit]=me&255,ae.last_lit++,Re===0?ae.dyn_ltree[me*2]++:(ae.matches++,Re--,ae.dyn_ltree[(W[me]+c+1)*2]++,ae.dyn_dtree[ie(Re)*2]++),ae.last_lit===ae.lit_bufsize-1}_._tr_init=ot,_._tr_stored_block=Ue,_._tr_flush_block=Qe,_._tr_tally=tt,_._tr_align=Ve},{"../utils/common":442}],454:[function(e,x,_){function u(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}x.exports=u},{}],455:[function(e,x,_){x.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(e,x,_){var u=e("asn1.js");_.certificate=e("./certificate");var m=u.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});_.RSAPrivateKey=m;var g=u.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});_.RSAPublicKey=g;var b=u.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(w),this.key("subjectPublicKey").bitstr())});_.PublicKey=b;var w=u.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),f=u.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(w),this.key("subjectPrivateKey").octstr())});_.PrivateKey=f;var y=u.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});_.EncryptedPrivateKey=y;var h=u.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});_.DSAPrivateKey=h,_.DSAparam=u.define("DSAparam",function(){this.int()});var l=u.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});_.ECPrivateKey=l;var d=u.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});_.signature=u.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":457,"asn1.js":167}],457:[function(e,x,_){var u=e("asn1.js"),m=u.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),g=u.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),b=u.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),w=u.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(b),this.key("subjectPublicKey").bitstr())}),f=u.define("RelativeDistinguishedName",function(){this.setof(g)}),y=u.define("RDNSequence",function(){this.seqof(f)}),h=u.define("Name",function(){this.choice({rdnSequence:this.use(y)})}),l=u.define("Validity",function(){this.seq().obj(this.key("notBefore").use(m),this.key("notAfter").use(m))}),d=u.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),s=u.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(b),this.key("issuer").use(h),this.key("validity").use(l),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(w),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),v=u.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(s),this.key("signatureAlgorithm").use(b),this.key("signatureValue").bitstr())});x.exports=v},{"asn1.js":167}],458:[function(e,x,_){var u=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,m=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,g=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,b=e("evp_bytestokey"),w=e("browserify-aes"),f=e("safe-buffer").Buffer;x.exports=function(y,h){var l=y.toString(),d=l.match(u),s;if(d){var c="aes"+d[1],a=f.from(d[2],"hex"),r=f.from(d[3].replace(/[\r\n]/g,""),"base64"),t=b(h,a.slice(0,8),parseInt(d[1],10)).key,i=[],n=w.createDecipheriv(c,t,a);i.push(n.update(r)),i.push(n.final()),s=f.concat(i)}else{var v=l.match(g);s=f.from(v[2].replace(/[\r\n]/g,""),"base64")}var o=l.match(m)[1];return{tag:o,data:s}}},{"browserify-aes":188,evp_bytestokey:368,"safe-buffer":494}],459:[function(e,x,_){function u(d){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(v){return typeof v}:u=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},u(d)}var m=e("./asn1"),g=e("./aesid.json"),b=e("./fixProc"),w=e("browserify-aes"),f=e("pbkdf2"),y=e("safe-buffer").Buffer;x.exports=h;function h(d){var s;u(d)==="object"&&!y.isBuffer(d)&&(s=d.passphrase,d=d.key),typeof d=="string"&&(d=y.from(d));var v=b(d,s),c=v.tag,a=v.data,r,t;switch(c){case"CERTIFICATE":t=m.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(t||(t=m.PublicKey.decode(a,"der")),r=t.algorithm.algorithm.join("."),r){case"1.2.840.113549.1.1.1":return m.RSAPublicKey.decode(t.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return t.subjectPrivateKey=t.subjectPublicKey,{type:"ec",data:t};case"1.2.840.10040.4.1":return t.algorithm.params.pub_key=m.DSAparam.decode(t.subjectPublicKey.data,"der"),{type:"dsa",data:t.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":a=m.EncryptedPrivateKey.decode(a,"der"),a=l(a,s);case"PRIVATE KEY":switch(t=m.PrivateKey.decode(a,"der"),r=t.algorithm.algorithm.join("."),r){case"1.2.840.113549.1.1.1":return m.RSAPrivateKey.decode(t.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:t.algorithm.curve,privateKey:m.ECPrivateKey.decode(t.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return t.algorithm.params.priv_key=m.DSAparam.decode(t.subjectPrivateKey,"der"),{type:"dsa",params:t.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return m.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return m.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:m.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return a=m.ECPrivateKey.decode(a,"der"),{curve:a.parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+c)}}h.signature=m.signature;function l(d,s){var v=d.algorithm.decrypt.kde.kdeparams.salt,c=parseInt(d.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=g[d.algorithm.decrypt.cipher.algo.join(".")],r=d.algorithm.decrypt.cipher.iv,t=d.subjectPrivateKey,i=parseInt(a.split("-")[1],10)/8,n=f.pbkdf2Sync(s,v,c,i,"sha1"),o=w.createDecipheriv(a,n,r),p=[];return p.push(o.update(t)),p.push(o.final()),y.concat(p)}},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":188,pbkdf2:460,"safe-buffer":494}],460:[function(e,x,_){_.pbkdf2=e("./lib/async"),_.pbkdf2Sync=e("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(e,x,_){(function(u,m){var g=e("safe-buffer").Buffer,b=e("./precondition"),w=e("./default-encoding"),f=e("./sync"),y=e("./to-buffer"),h,l=m.crypto&&m.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},s=[];function v(r){if(m.process&&!m.process.browser||!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(s[r]!==void 0)return s[r];h=h||g.alloc(8);var t=c(h,h,10,128,r).then(function(){return!0}).catch(function(){return!1});return s[r]=t,t}function c(r,t,i,n,o){return l.importKey("raw",r,{name:"PBKDF2"},!1,["deriveBits"]).then(function(p){return l.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:o}},p,n<<3)}).then(function(p){return g.from(p)})}function a(r,t){r.then(function(i){u.nextTick(function(){t(null,i)})},function(i){u.nextTick(function(){t(i)})})}x.exports=function(r,t,i,n,o,p){typeof o=="function"&&(p=o,o=void 0),o=o||"sha1";var O=d[o.toLowerCase()];if(!O||typeof m.Promise!="function")return u.nextTick(function(){var C;try{C=f(r,t,i,n,o)}catch(N){return p(N)}p(null,C)});if(b(i,n),r=y(r,w,"Password"),t=y(t,w,"Salt"),typeof p!="function")throw new Error("No callback provided to pbkdf2");a(v(O).then(function(C){return C?c(r,t,i,n,O):f(r,t,i,n,o)}),p)}}).call(this,e("_process"),typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,_process:467,"safe-buffer":494}],462:[function(e,x,_){(function(u){var m;if(u.browser)m="utf-8";else if(u.version){var g=parseInt(u.version.split(".")[0].slice(1),10);m=g>=6?"utf-8":"binary"}else m="utf-8";x.exports=m}).call(this,e("_process"))},{_process:467}],463:[function(e,x,_){var u=Math.pow(2,30)-1;x.exports=function(m,g){if(typeof m!="number")throw new TypeError("Iterations not a number");if(m<0)throw new TypeError("Bad iterations");if(typeof g!="number")throw new TypeError("Key length not a number");if(g<0||g>u||g!==g)throw new TypeError("Bad key length")}},{}],464:[function(e,x,_){var u=e("create-hash/md5"),m=e("ripemd160"),g=e("sha.js"),b=e("safe-buffer").Buffer,w=e("./precondition"),f=e("./default-encoding"),y=e("./to-buffer"),h=b.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(c,a,r){var t=s(c),i=c==="sha512"||c==="sha384"?128:64;a.length>i?a=t(a):a.length"u"||!u.version||u.version.indexOf("v0.")===0||u.version.indexOf("v1.")===0&&u.version.indexOf("v1.8.")!==0?x.exports={nextTick:m}:x.exports=u;function m(g,b,w,f){if(typeof g!="function")throw new TypeError('"callback" argument must be a function');var y=arguments.length,h,l;switch(y){case 0:case 1:return u.nextTick(g);case 2:return u.nextTick(function(){g.call(null,b)});case 3:return u.nextTick(function(){g.call(null,b,w)});case 4:return u.nextTick(function(){g.call(null,b,w,f)});default:for(h=new Array(y-1),l=0;l1)for(var n=1;nn||new b(a).cmp(i.modulus)>=0)throw new Error("decryption error");var o;r?o=y(new b(a),i):o=w(a,i);var p=h.alloc(n-o.length);if(o=h.concat([p,o],n),t===4)return l(i,o);if(t===1)return d(i,o,r);if(t===3)return o;throw new Error("unknown padding")};function l(v,c){var a=v.modulus.byteLength(),r=f("sha1").update(h.alloc(0)).digest(),t=r.length;if(c[0]!==0)throw new Error("decryption error");var i=c.slice(1,t+1),n=c.slice(t+1),o=g(i,m(n,t)),p=g(n,m(o,a-t-1));if(s(r,p.slice(0,t)))throw new Error("decryption error");for(var O=t;p[O]===0;)O++;if(p[O++]!==1)throw new Error("decryption error");return p.slice(O)}function d(v,c,a){for(var r=c.slice(0,2),t=2,i=0;c[t++]!==0;)if(t>=c.length){i++;break}var n=c.slice(2,t-1);if((r.toString("hex")!=="0002"&&!a||r.toString("hex")!=="0001"&&a)&&i++,n.length<8&&i++,i)throw new Error("decryption error");return c.slice(t)}function s(v,c){v=h.from(v),c=h.from(c);var a=0,r=v.length;v.length!==c.length&&(a++,r=Math.min(v.length,c.length));for(var t=-1;++t=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return t?h(o,n):y(o,n)};function d(c,a){var r=c.modulus.byteLength(),t=a.length,i=g("sha1").update(l.alloc(0)).digest(),n=i.length,o=2*n;if(t>r-o-2)throw new Error("message too long");var p=l.alloc(r-t-o-2),O=r-n-1,C=m(n),N=w(l.concat([i,p,l.alloc(1,1),a],O),b(C,O)),L=w(C,b(N,n));return new f(l.concat([l.alloc(1),L,N],r))}function s(c,a,r){var t=a.length,i=c.modulus.byteLength();if(t>i-11)throw new Error("message too long");var n;return r?n=l.alloc(i-t-3,255):n=v(i-t-3),new f(l.concat([l.from([0,r?1:2]),n,l.alloc(1),a],i))}function v(c){for(var a=l.allocUnsafe(c),r=0,t=m(c*2),i=0,n;rb)throw new RangeError("requested too many random bytes");var s=f.allocUnsafe(l);if(l>0)if(l>g)for(var v=0;vl||r<0)throw new TypeError("offset must be a uint32");if(r>y||r>t)throw new RangeError("offset out of range")}function s(r,t,i){if(typeof r!="number"||r!==r)throw new TypeError("size must be a number");if(r>l||r<0)throw new TypeError("size must be a uint32");if(r+t>i||r>y)throw new RangeError("buffer too small")}h&&h.getRandomValues||!u.browser?(_.randomFill=v,_.randomFillSync=a):(_.randomFill=g,_.randomFillSync=g);function v(r,t,i,n){if(!f.isBuffer(r)&&!(r instanceof m.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof t=="function")n=t,t=0,i=r.length;else if(typeof i=="function")n=i,i=r.length-t;else if(typeof n!="function")throw new TypeError('"cb" argument must be a function');return d(t,r.length),s(i,t,r.length),c(r,t,i,n)}function c(r,t,i,n){if(u.browser){var o=r.buffer,p=new Uint8Array(o,t,i);if(h.getRandomValues(p),n){u.nextTick(function(){n(null,r)});return}return r}if(n){w(i,function(C,N){if(C)return n(C);N.copy(r,t),n(null,r)});return}var O=w(i);return O.copy(r,t),r}function a(r,t,i){if(typeof t>"u"&&(t=0),!f.isBuffer(r)&&!(r instanceof m.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return d(t,r.length),i===void 0&&(i=r.length-t),s(i,t,r.length),c(r,t,i)}}).call(this,e("_process"),typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(e,x,_){function u(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(s){return typeof s}:u=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},u(l)}function m(l,d){l.prototype=Object.create(d.prototype),l.prototype.constructor=l,l.__proto__=d}var g={};function b(l,d,s){s||(s=Error);function v(a,r,t){return typeof d=="string"?d:d(a,r,t)}var c=function(a){m(r,a);function r(t,i,n){return a.call(this,v(t,i,n))||this}return r}(s);c.prototype.name=s.name,c.prototype.code=l,g[l]=c}function w(l,d){if(Array.isArray(l)){var s=l.length;return l=l.map(function(v){return String(v)}),s>2?"one of ".concat(d," ").concat(l.slice(0,s-1).join(", "),", or ")+l[s-1]:s===2?"one of ".concat(d," ").concat(l[0]," or ").concat(l[1]):"of ".concat(d," ").concat(l[0])}else return"of ".concat(d," ").concat(String(l))}function f(l,d,s){return l.substr(!s||s<0?0:+s,d.length)===d}function y(l,d,s){return(s===void 0||s>l.length)&&(s=l.length),l.substring(s-d.length,s)===d}function h(l,d,s){return typeof s!="number"&&(s=0),s+d.length>l.length?!1:l.indexOf(d,s)!==-1}b("ERR_INVALID_OPT_VALUE",function(l,d){return'The value "'+d+'" is invalid for option "'+l+'"'},TypeError),b("ERR_INVALID_ARG_TYPE",function(l,d,s){var v;typeof d=="string"&&f(d,"not ")?(v="must not be",d=d.replace(/^not /,"")):v="must be";var c;if(y(l," argument"))c="The ".concat(l," ").concat(v," ").concat(w(d,"type"));else{var a=h(l,".")?"property":"argument";c='The "'.concat(l,'" ').concat(a," ").concat(v," ").concat(w(d,"type"))}return c+=". Received type ".concat(u(s)),c},TypeError),b("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),b("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),b("ERR_STREAM_PREMATURE_CLOSE","Premature close"),b("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),b("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),b("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),b("ERR_STREAM_WRITE_AFTER_END","write after end"),b("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),b("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),b("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),x.exports.codes=g},{}],478:[function(e,x,_){(function(u){var m=Object.keys||function(s){var v=[];for(var c in s)v.push(c);return v};x.exports=h;var g=e("./_stream_readable"),b=e("./_stream_writable");e("inherits")(h,g);for(var w=m(b.prototype),f=0;f0)if(typeof se!="string"&&!Z.objectMode&&Object.getPrototypeOf(se)!==f.prototype&&(se=h(se)),q)Z.endEmitted?L(re,new p):E(re,Z,se,!0);else if(Z.ended)L(re,new n);else{if(Z.destroyed)return!1;Z.reading=!1,Z.decoder&&!Ce?(se=Z.decoder.write(se),Z.objectMode||se.length!==0?E(re,Z,se,!1):B(re,Z)):E(re,Z,se,!1)}else q||(Z.reading=!1,B(re,Z))}return!Z.ended&&(Z.length=z?re=z:(re--,re|=re>>>1,re|=re>>>2,re|=re>>>4,re|=re>>>8,re|=re>>>16,re++),re}function $(re,se){return re<=0||se.length===0&&se.ended?0:se.objectMode?1:re!==re?se.flowing&&se.length?se.buffer.head.data.length:se.length:(re>se.highWaterMark&&(se.highWaterMark=W(re)),re<=se.length?re:se.ended?se.length:(se.needReadable=!0,0))}R.prototype.read=function(re){s("read",re),re=parseInt(re,10);var se=this._readableState,Ce=re;if(re!==0&&(se.emittedReadable=!1),re===0&&se.needReadable&&((se.highWaterMark!==0?se.length>=se.highWaterMark:se.length>0)||se.ended))return s("read: emitReadable",se.length,se.ended),se.length===0&&se.ended?Q(this):I(this),null;if(re=$(re,se),re===0&&se.ended)return se.length===0&&Q(this),null;var q=se.needReadable;s("need readable",q),(se.length===0||se.length-re0?G=J(re,se):G=null,G===null?(se.needReadable=se.length<=se.highWaterMark,re=0):(se.length-=re,se.awaitDrain=0),se.length===0&&(se.ended||(se.needReadable=!0),Ce!==re&&se.ended&&Q(this)),G!==null&&this.emit("data",G),G};function U(re,se){if(s("onEofChunk"),!se.ended){if(se.decoder){var Ce=se.decoder.end();Ce&&Ce.length&&(se.buffer.push(Ce),se.length+=se.objectMode?1:Ce.length)}se.ended=!0,se.sync?I(re):(se.needReadable=!1,se.emittedReadable||(se.emittedReadable=!0,j(re)))}}function I(re){var se=re._readableState;s("emitReadable",se.needReadable,se.emittedReadable),se.needReadable=!1,se.emittedReadable||(s("emitReadable",se.flowing),se.emittedReadable=!0,u.nextTick(j,re))}function j(re){var se=re._readableState;s("emitReadable_",se.destroyed,se.length,se.ended),!se.destroyed&&(se.length||se.ended)&&(re.emit("readable"),se.emittedReadable=!1),se.needReadable=!se.flowing&&!se.ended&&se.length<=se.highWaterMark,oe(re)}function B(re,se){se.readingMore||(se.readingMore=!0,u.nextTick(V,re,se))}function V(re,se){for(;!se.reading&&!se.ended&&(se.length1&&ke(q.pipes,re)!==-1)&&!je&&(s("false write response, pause",q.awaitDrain),q.awaitDrain++),Ce.pause())}function ut(Qe){s("onerror",Qe),Ve(),re.removeListener("error",ut),b(re,"error")===0&&L(re,Qe)}M(re,"error",ut);function ot(){re.removeListener("finish",Ue),Ve()}re.once("close",ot);function Ue(){s("onfinish"),re.removeListener("close",ot),Ve()}re.once("finish",Ue);function Ve(){s("unpipe"),Ce.unpipe(re)}return re.emit("pipe",Ce),q.flowing||(s("pipe resume"),Ce.resume()),re};function te(re){return function(){var Ce=re._readableState;s("pipeOnDrain",Ce.awaitDrain),Ce.awaitDrain&&Ce.awaitDrain--,Ce.awaitDrain===0&&b(re,"data")&&(Ce.flowing=!0,oe(re))}}R.prototype.unpipe=function(re){var se=this._readableState,Ce={hasUnpiped:!1};if(se.pipesCount===0)return this;if(se.pipesCount===1)return re&&re!==se.pipes?this:(re||(re=se.pipes),se.pipes=null,se.pipesCount=0,se.flowing=!1,re&&re.emit("unpipe",this,Ce),this);if(!re){var q=se.pipes,G=se.pipesCount;se.pipes=null,se.pipesCount=0,se.flowing=!1;for(var Z=0;Z0,q.flowing!==!1&&this.resume()):re==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,s("on readable",q.length,q.reading),q.length?I(this):q.reading||u.nextTick(ce,this)),Ce},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(re,se){var Ce=w.prototype.removeListener.call(this,re,se);return re==="readable"&&u.nextTick(ie,this),Ce},R.prototype.removeAllListeners=function(re){var se=w.prototype.removeAllListeners.apply(this,arguments);return(re==="readable"||re===void 0)&&u.nextTick(ie,this),se};function ie(re){var se=re._readableState;se.readableListening=re.listenerCount("readable")>0,se.resumeScheduled&&!se.paused?se.flowing=!0:re.listenerCount("data")>0&&re.resume()}function ce(re){s("readable nexttick read 0"),re.read(0)}R.prototype.resume=function(){var re=this._readableState;return re.flowing||(s("resume"),re.flowing=!re.readableListening,be(this,re)),re.paused=!1,this};function be(re,se){se.resumeScheduled||(se.resumeScheduled=!0,u.nextTick(_e,re,se))}function _e(re,se){s("resume",se.reading),se.reading||re.read(0),se.resumeScheduled=!1,re.emit("resume"),oe(re),se.flowing&&!se.reading&&re.read(0)}R.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function oe(re){var se=re._readableState;for(s("flow",se.flowing);se.flowing&&re.read()!==null;);}R.prototype.wrap=function(re){var se=this,Ce=this._readableState,q=!1;re.on("end",function(){if(s("wrapped end"),Ce.decoder&&!Ce.ended){var fe=Ce.decoder.end();fe&&fe.length&&se.push(fe)}se.push(null)}),re.on("data",function(fe){if(s("wrapped data"),Ce.decoder&&(fe=Ce.decoder.write(fe)),!(Ce.objectMode&&fe==null)&&!(!Ce.objectMode&&(!fe||!fe.length))){var we=se.push(fe);we||(q=!0,re.pause())}});for(var G in re)this[G]===void 0&&typeof re[G]=="function"&&(this[G]=function(we){return function(){return re[we].apply(re,arguments)}}(G));for(var Z=0;Z=se.length?(se.decoder?Ce=se.buffer.join(""):se.buffer.length===1?Ce=se.buffer.first():Ce=se.buffer.concat(se.length),se.buffer.clear()):Ce=se.buffer.consume(re,se.decoder),Ce}function Q(re){var se=re._readableState;s("endReadable",se.endEmitted),se.endEmitted||(se.ended=!0,u.nextTick(he,se,re))}function he(re,se){if(s("endReadableNT",re.endEmitted,re.length),!re.endEmitted&&re.length===0&&(re.endEmitted=!0,se.readable=!1,se.emit("end"),re.autoDestroy)){var Ce=se._writableState;(!Ce||Ce.autoDestroy&&Ce.finished)&&se.destroy()}}typeof Symbol=="function"&&(R.from=function(re,se){return N===void 0&&(N=e("./internal/streams/from")),N(R,re,se)});function ke(re,se){for(var Ce=0,q=re.length;Ce-1))throw new C(J);return this._writableState.defaultEncoding=J,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function E(oe,J,Q){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof J=="string"&&(J=y.from(J,Q)),J}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function A(oe,J,Q,he,ke,re){if(!Q){var se=E(J,he,ke);he!==se&&(Q=!0,ke="buffer",he=se)}var Ce=J.objectMode?1:he.length;J.length+=Ce;var q=J.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(r){var t={data:r,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=r+t.data;return i}},{key:"concat",value:function(r){if(this.length===0)return h.alloc(0);for(var t=h.allocUnsafe(r>>>0),i=this.head,n=0;i;)v(i.data,t,n),n+=i.data.length,i=i.next;return t}},{key:"consume",value:function(r,t){var i;return ro.length?o.length:r;if(p===o.length?n+=o:n+=o.slice(0,r),r-=p,r===0){p===o.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(p));break}++i}return this.length-=i,n}},{key:"_getBuffer",value:function(r){var t=h.allocUnsafe(r),i=this.head,n=1;for(i.data.copy(t),r-=i.data.length;i=i.next;){var o=i.data,p=r>o.length?o.length:r;if(o.copy(t,t.length-r,0,p),r-=p,r===0){p===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(p));break}++n}return this.length-=n,t}},{key:s,value:function(r,t){return d(this,m({},t,{depth:0,customInspect:!1}))}}]),c}()},{buffer:216,util:185}],485:[function(e,x,_){(function(u){function m(h,l){var d=this,s=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return s||v?(l?l(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,u.nextTick(f,this,h)):u.nextTick(f,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(c){!l&&c?d._writableState?d._writableState.errorEmitted?u.nextTick(b,d):(d._writableState.errorEmitted=!0,u.nextTick(g,d,c)):u.nextTick(g,d,c):l?(u.nextTick(b,d),l(c)):u.nextTick(b,d)}),this)}function g(h,l){f(h,l),b(h)}function b(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function w(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function f(h,l){h.emit("error",l)}function y(h,l){var d=h._readableState,s=h._writableState;d&&d.autoDestroy||s&&s.autoDestroy?h.destroy(l):h.emit("error",l)}x.exports={destroy:m,undestroy:w,errorOrDestroy:y}}).call(this,e("_process"))},{_process:467}],486:[function(e,x,_){var u=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function m(f){var y=!1;return function(){if(!y){y=!0;for(var h=arguments.length,l=new Array(h),d=0;d0;return h(o,O,C,function(N){i||(i=N),N&&n.forEach(l),!O&&(n.forEach(l),t(i))})});return a.reduce(d)}x.exports=v},{"../../../errors":477,"./end-of-stream":486}],489:[function(e,x,_){var u=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;function m(b,w,f){return b.highWaterMark!=null?b.highWaterMark:w?b[f]:null}function g(b,w,f,y){var h=m(w,y,f);if(h!=null){if(!(isFinite(h)&&Math.floor(h)===h)||h<0){var l=y?f:"highWaterMark";throw new u(l,h)}return Math.floor(h)}return b.objectMode?16:16*1024}x.exports={getHighWaterMark:g}},{"../../../errors":477}],490:[function(e,x,_){x.exports=e("events").EventEmitter},{events:367}],491:[function(e,x,_){_=x.exports=e("./lib/_stream_readable.js"),_.Stream=_,_.Readable=_,_.Writable=e("./lib/_stream_writable.js"),_.Duplex=e("./lib/_stream_duplex.js"),_.Transform=e("./lib/_stream_transform.js"),_.PassThrough=e("./lib/_stream_passthrough.js"),_.finished=e("./lib/internal/streams/end-of-stream.js"),_.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(e,x,_){function u(g){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(w){return typeof w}:u=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},u(g)}var m=function(g){var b=Object.prototype,w=b.hasOwnProperty,f,y=typeof Symbol=="function"?Symbol:{},h=y.iterator||"@@iterator",l=y.asyncIterator||"@@asyncIterator",d=y.toStringTag||"@@toStringTag";function s(U,I,j){return Object.defineProperty(U,I,{value:j,enumerable:!0,configurable:!0,writable:!0}),U[I]}try{s({},"")}catch{s=function(j,B,V){return j[B]=V}}function v(U,I,j,B){var V=I&&I.prototype instanceof o?I:o,te=Object.create(V.prototype),ie=new z(B||[]);return te._invoke=R(U,j,ie),te}g.wrap=v;function c(U,I,j){try{return{type:"normal",arg:U.call(I,j)}}catch(B){return{type:"throw",arg:B}}}var a="suspendedStart",r="suspendedYield",t="executing",i="completed",n={};function o(){}function p(){}function O(){}var C={};C[h]=function(){return this};var N=Object.getPrototypeOf,L=N&&N(N(W([])));L&&L!==b&&w.call(L,h)&&(C=L);var F=O.prototype=o.prototype=Object.create(C);p.prototype=F.constructor=O,O.constructor=p,p.displayName=s(O,d,"GeneratorFunction");function M(U){["next","throw","return"].forEach(function(I){s(U,I,function(j){return this._invoke(I,j)})})}g.isGeneratorFunction=function(U){var I=typeof U=="function"&&U.constructor;return I?I===p||(I.displayName||I.name)==="GeneratorFunction":!1},g.mark=function(U){return Object.setPrototypeOf?Object.setPrototypeOf(U,O):(U.__proto__=O,s(U,d,"GeneratorFunction")),U.prototype=Object.create(F),U},g.awrap=function(U){return{__await:U}};function D(U,I){function j(te,ie,ce,be){var _e=c(U[te],U,ie);if(_e.type==="throw")be(_e.arg);else{var oe=_e.arg,J=oe.value;return J&&u(J)==="object"&&w.call(J,"__await")?I.resolve(J.__await).then(function(Q){j("next",Q,ce,be)},function(Q){j("throw",Q,ce,be)}):I.resolve(J).then(function(Q){oe.value=Q,ce(oe)},function(Q){return j("throw",Q,ce,be)})}}var B;function V(te,ie){function ce(){return new I(function(be,_e){j(te,ie,be,_e)})}return B=B?B.then(ce,ce):ce()}this._invoke=V}M(D.prototype),D.prototype[l]=function(){return this},g.AsyncIterator=D,g.async=function(U,I,j,B,V){V===void 0&&(V=Promise);var te=new D(v(U,I,j,B),V);return g.isGeneratorFunction(I)?te:te.next().then(function(ie){return ie.done?ie.value:te.next()})};function R(U,I,j){var B=a;return function(te,ie){if(B===t)throw new Error("Generator is already running");if(B===i){if(te==="throw")throw ie;return $()}for(j.method=te,j.arg=ie;;){var ce=j.delegate;if(ce){var be=P(ce,j);if(be){if(be===n)continue;return be}}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(B===a)throw B=i,j.arg;j.dispatchException(j.arg)}else j.method==="return"&&j.abrupt("return",j.arg);B=t;var _e=c(U,I,j);if(_e.type==="normal"){if(B=j.done?i:r,_e.arg===n)continue;return{value:_e.arg,done:j.done}}else _e.type==="throw"&&(B=i,j.method="throw",j.arg=_e.arg)}}}function P(U,I){var j=U.iterator[I.method];if(j===f){if(I.delegate=null,I.method==="throw"){if(U.iterator.return&&(I.method="return",I.arg=f,P(U,I),I.method==="throw"))return n;I.method="throw",I.arg=new TypeError("The iterator does not provide a 'throw' method")}return n}var B=c(j,U.iterator,I.arg);if(B.type==="throw")return I.method="throw",I.arg=B.arg,I.delegate=null,n;var V=B.arg;if(!V)return I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,n;if(V.done)I[U.resultName]=V.value,I.next=U.nextLoc,I.method!=="return"&&(I.method="next",I.arg=f);else return V;return I.delegate=null,n}M(F),s(F,d,"Generator"),F[h]=function(){return this},F.toString=function(){return"[object Generator]"};function E(U){var I={tryLoc:U[0]};1 in U&&(I.catchLoc=U[1]),2 in U&&(I.finallyLoc=U[2],I.afterLoc=U[3]),this.tryEntries.push(I)}function A(U){var I=U.completion||{};I.type="normal",delete I.arg,U.completion=I}function z(U){this.tryEntries=[{tryLoc:"root"}],U.forEach(E,this),this.reset(!0)}g.keys=function(U){var I=[];for(var j in U)I.push(j);return I.reverse(),function B(){for(;I.length;){var V=I.pop();if(V in U)return B.value=V,B.done=!1,B}return B.done=!0,B}};function W(U){if(U){var I=U[h];if(I)return I.call(U);if(typeof U.next=="function")return U;if(!isNaN(U.length)){var j=-1,B=function V(){for(;++j=0;--V){var te=this.tryEntries[V],ie=te.completion;if(te.tryLoc==="root")return B("end");if(te.tryLoc<=this.prev){var ce=w.call(te,"catchLoc"),be=w.call(te,"finallyLoc");if(ce&&be){if(this.prev=0;--B){var V=this.tryEntries[B];if(V.tryLoc<=this.prev&&w.call(V,"finallyLoc")&&this.prev=0;--j){var B=this.tryEntries[j];if(B.finallyLoc===I)return this.complete(B.completion,B.afterLoc),A(B),n}},catch:function(I){for(var j=this.tryEntries.length-1;j>=0;--j){var B=this.tryEntries[j];if(B.tryLoc===I){var V=B.completion;if(V.type==="throw"){var te=V.arg;A(B)}return te}}throw new Error("illegal catch attempt")},delegateYield:function(I,j,B){return this.delegate={iterator:W(I),resultName:j,nextLoc:B},this.method==="next"&&(this.arg=f),n}},g}((typeof x>"u"?"undefined":u(x))==="object"?x.exports:{});try{regeneratorRuntime=m}catch{Function("r","regeneratorRuntime = r")(m)}},{}],493:[function(e,x,_){var u=e("buffer").Buffer,m=e("inherits"),g=e("hash-base"),b=new Array(16),w=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function s(){g.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}m(s,g),s.prototype._update=function(){for(var n=b,o=0;o<16;++o)n[o]=this._block.readInt32LE(o*4);for(var p=this._a|0,O=this._b|0,C=this._c|0,N=this._d|0,L=this._e|0,F=this._a|0,M=this._b|0,D=this._c|0,R=this._d|0,P=this._e|0,E=0;E<80;E+=1){var A,z;E<16?(A=c(p,O,C,N,L,n[w[E]],l[0],y[E]),z=i(F,M,D,R,P,n[f[E]],d[0],h[E])):E<32?(A=a(p,O,C,N,L,n[w[E]],l[1],y[E]),z=t(F,M,D,R,P,n[f[E]],d[1],h[E])):E<48?(A=r(p,O,C,N,L,n[w[E]],l[2],y[E]),z=r(F,M,D,R,P,n[f[E]],d[2],h[E])):E<64?(A=t(p,O,C,N,L,n[w[E]],l[3],y[E]),z=a(F,M,D,R,P,n[f[E]],d[3],h[E])):(A=i(p,O,C,N,L,n[w[E]],l[4],y[E]),z=c(F,M,D,R,P,n[f[E]],d[4],h[E])),p=L,L=N,N=v(C,10),C=O,O=A,F=P,P=R,R=v(D,10),D=M,M=z}var W=this._b+C+R|0;this._b=this._c+N+P|0,this._c=this._d+L+F|0,this._d=this._e+p+M|0,this._e=this._a+O+D|0,this._a=W},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var n=u.alloc?u.alloc(20):new u(20);return n.writeInt32LE(this._a,0),n.writeInt32LE(this._b,4),n.writeInt32LE(this._c,8),n.writeInt32LE(this._d,12),n.writeInt32LE(this._e,16),n};function v(n,o){return n<>>32-o}function c(n,o,p,O,C,N,L,F){return v(n+(o^p^O)+N+L|0,F)+C|0}function a(n,o,p,O,C,N,L,F){return v(n+(o&p|~o&O)+N+L|0,F)+C|0}function r(n,o,p,O,C,N,L,F){return v(n+((o|~p)^O)+N+L|0,F)+C|0}function t(n,o,p,O,C,N,L,F){return v(n+(o&O|p&~O)+N+L|0,F)+C|0}function i(n,o,p,O,C,N,L,F){return v(n+(o^(p|~O))+N+L|0,F)+C|0}x.exports=s},{buffer:216,"hash-base":370,inherits:387}],494:[function(e,x,_){var u=e("buffer"),m=u.Buffer;function g(w,f){for(var y in w)f[y]=w[y]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?x.exports=u:(g(u,_),_.Buffer=b);function b(w,f,y){return m(w,f,y)}g(m,b),b.from=function(w,f,y){if(typeof w=="number")throw new TypeError("Argument must not be a number");return m(w,f,y)},b.alloc=function(w,f,y){if(typeof w!="number")throw new TypeError("Argument must be a number");var h=m(w);return f!==void 0?typeof y=="string"?h.fill(f,y):h.fill(f):h.fill(0),h},b.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return m(w)},b.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(w)}},{buffer:216}],495:[function(e,x,_){(function(u){function m(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(d){return typeof d}:m=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},m(h)}var g=e("buffer"),b=g.Buffer,w={},f;for(f in g)g.hasOwnProperty(f)&&(f==="SlowBuffer"||f==="Buffer"||(w[f]=g[f]));var y=w.Buffer={};for(f in b)b.hasOwnProperty(f)&&(f==="allocUnsafe"||f==="allocUnsafeSlow"||(y[f]=b[f]));if(w.Buffer.prototype=b.prototype,(!y.from||y.from===Uint8Array.from)&&(y.from=function(h,l,d){if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+m(h));if(h&&typeof h.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+m(h));return b(h,l,d)}),y.alloc||(y.alloc=function(h,l,d){if(typeof h!="number")throw new TypeError('The "size" argument must be of type number. Received type '+m(h));if(h<0||h>=2*(1<<30))throw new RangeError('The value "'+h+'" is invalid for option "size"');var s=b(h);return!l||l.length===0?s.fill(0):typeof d=="string"?s.fill(l,d):s.fill(l),s}),!w.kStringMaxLength)try{w.kStringMaxLength=u.binding("buffer").kStringMaxLength}catch{}w.constants||(w.constants={MAX_LENGTH:w.kMaxLength},w.kStringMaxLength&&(w.constants.MAX_STRING_LENGTH=w.kStringMaxLength)),x.exports=w}).call(this,e("_process"))},{_process:467,buffer:216}],496:[function(e,x,_){function u(vt,Ke){var ve;if(typeof Symbol>"u"||vt[Symbol.iterator]==null){if(Array.isArray(vt)||(ve=h(vt))||Ke&&vt&&typeof vt.length=="number"){ve&&(vt=ve);var Fe=0,Be=function(){};return{s:Be,n:function(){return Fe>=vt.length?{done:!0}:{done:!1,value:vt[Fe++]}},e:function(gr){throw gr},f:Be}}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 dt=!0,St=!1,Xt;return{s:function(){ve=vt[Symbol.iterator]()},n:function(){var gr=ve.next();return dt=gr.done,gr},e:function(gr){St=!0,Xt=gr},f:function(){try{!dt&&ve.return!=null&&ve.return()}finally{if(St)throw Xt}}}}function m(vt){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(ve){return typeof ve}:m=function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},m(vt)}function g(vt,Ke){if(!(vt instanceof Ke))throw new TypeError("Cannot call a class as a function")}function b(vt,Ke){for(var ve=0;vevt.length)&&(Ke=vt.length);for(var ve=0,Fe=new Array(Ke);ve",lt:"<",quot:'"',apos:"'"},P=-1,E=-2,A=0,z=1,W=2,$=3,U=4,I=5,j=6,B=7,V=8,te=9,ie=10,ce=11,be=12,_e=13,oe=14,J=15,Q=16,he=17,ke=18,re=19,se=20,Ce=21,q=22,G=23,Z=24,fe=25,we=26,ge=27,je=28,Ze=29,nt=30,ut=31,ot=32,Ue=33,Ve=34,Qe=35,tt=36,ae=37,Re=38,me=39,Ee=40,pe=41,Pe=42,ee=43,Xe=44,it=9,K=10,Me=13,Le=32,ue=33,Se=34,Ie=38,st=39,Ge=45,rt=47,_t=59,wt=60,Ot=61,pt=62,ct=63,At=91,Pt=93,bt=133,Kt=8232,Ct=function(Ke){return Ke===Se||Ke===st},xt=[Se,st],Ft=[].concat(xt,[At,pt]),Lt=[].concat(xt,[wt,Pt]),Et=[Ot,ct].concat(f(o)),Dr=[].concat(f(o),[pt,Ie,wt]);function Or(vt,Ke,ve){switch(Ke){case"xml":ve!==F&&vt.fail("xml prefix must be bound to ".concat(F,"."));break;case"xmlns":ve!==M&&vt.fail("xmlns prefix must be bound to ".concat(M,"."));break}switch(ve){case M:vt.fail(Ke===""?"the default namespace may not be set to ".concat(ve,"."):'may not assign a prefix (even "xmlns") to the URI '.concat(M,"."));break;case F:switch(Ke){case"xml":break;case"":vt.fail("the default namespace may not be set to ".concat(ve,"."));break;default:vt.fail("may not assign the xml namespace to another prefix.")}break}}function Gr(vt,Ke){for(var ve=0,Fe=Object.keys(Ke);ve0&&(Be+=":"),Be+="".concat(this.line,":").concat(this.column)),Be.length>0&&(Be+=": "),new Error(Be+ve)}},{key:"fail",value:function(ve){var Fe=this.makeError(ve),Be=this.errorHandler;if(Be===void 0)throw Fe;return Be(Fe),this}},{key:"write",value:function(ve){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");var Fe=!1;ve===null?(Fe=!0,ve=""):m(ve)==="object"&&(ve=ve.toString()),this.carriedFromPrevious!==void 0&&(ve="".concat(this.carriedFromPrevious).concat(ve),this.carriedFromPrevious=void 0);var Be=ve.length,dt=ve.charCodeAt(Be-1);!Fe&&(dt===Me||dt>=55296&&dt<=56319)&&(this.carriedFromPrevious=ve[Be-1],Be--,ve=ve.slice(0,Be));var St=this.stateTable;for(this.chunk=ve,this.i=0;this.i=ve.length)return P;var Be=ve.charCodeAt(Fe);if(this.column++,Be<55296){if(Be>=Le||Be===it)return Be;switch(Be){case K:return this.line++,this.column=0,this.positionAtNewLine=this.position,K;case Me:return ve.charCodeAt(Fe+1)===K&&(this.i=Fe+2),this.line++,this.column=0,this.positionAtNewLine=this.position,E;default:return this.fail("disallowed character."),Be}}if(Be>56319)return Be>=57344&&Be<=65533||this.fail("disallowed character."),Be;var dt=65536+(Be-55296)*1024+(ve.charCodeAt(Fe+1)-56320);return this.i=Fe+2,dt>1114111&&this.fail("disallowed character."),dt}},{key:"getCode11",value:function(){var ve=this.chunk,Fe=this.i;if(this.prevI=Fe,this.i=Fe+1,Fe>=ve.length)return P;var Be=ve.charCodeAt(Fe);if(this.column++,Be<55296){if(Be>31&&Be<127||Be>159&&Be!==Kt||Be===it)return Be;switch(Be){case K:return this.line++,this.column=0,this.positionAtNewLine=this.position,K;case Me:{var dt=ve.charCodeAt(Fe+1);(dt===K||dt===bt)&&(this.i=Fe+2)}case bt:case Kt:return this.line++,this.column=0,this.positionAtNewLine=this.position,E;default:return this.fail("disallowed character."),Be}}if(Be>56319)return Be>=57344&&Be<=65533||this.fail("disallowed character."),Be;var St=65536+(Be-55296)*1024+(ve.charCodeAt(Fe+1)-56320);return this.i=Fe+2,St>1114111&&this.fail("disallowed character."),St}},{key:"getCodeNorm",value:function(){var ve=this.getCode();return ve===E?K:ve}},{key:"unget",value:function(){this.i=this.prevI,this.column--}},{key:"captureTo",value:function(ve){for(var Fe=this.i,Be=this.chunk;;){var dt=this.getCode(),St=dt===E,Xt=St?K:dt;if(Xt===P||ve.includes(Xt))return this.text+=Be.slice(Fe,this.prevI),Xt;St&&(this.text+="".concat(Be.slice(Fe,this.prevI),` `),Fe=this.i)}}},{key:"captureToChar",value:function(ve){for(var Fe=this.i,Be=this.chunk;;){var dt=this.getCode();switch(dt){case E:this.text+="".concat(Be.slice(Fe,this.prevI),` `),Fe=this.i,dt=K;break;case P:return this.text+=Be.slice(Fe),!1}if(dt===ve)return this.text+=Be.slice(Fe,this.prevI),!0}}},{key:"captureNameChars",value:function(){for(var ve=this.chunk,Fe=this.i;;){var Be=this.getCode();if(Be===P)return this.name+=ve.slice(Fe),P;if(!n(Be))return this.name+=ve.slice(Fe,this.prevI),Be===E?K:Be}}},{key:"skipSpaces",value:function(){for(;;){var ve=this.getCodeNorm();if(ve===P||!r(ve))return ve}}},{key:"setXMLVersion",value:function(ve){this.currentXMLVersion=ve,ve==="1.0"?(this.isChar=t,this.getCode=this.getCode10):(this.isChar=O,this.getCode=this.getCode11)}},{key:"sBegin",value:function(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=z}},{key:"sBeginWhitespace",value:function(){var ve=this.i,Fe=this.skipSpaces();switch(this.prevI!==ve&&(this.xmlDeclPossible=!1),Fe){case wt:if(this.state=J,this.text.length!==0)throw new Error("no-empty text at start");break;case P:break;default:this.unget(),this.state=_e,this.xmlDeclPossible=!1}}},{key:"sDoctype",value:function(){var ve,Fe=this.captureTo(Ft);switch(Fe){case pt:{(ve=this.doctypeHandler)===null||ve===void 0||ve.call(this,this.text),this.text="",this.state=_e,this.doctype=!0;break}case P:break;default:this.text+=String.fromCodePoint(Fe),Fe===At?this.state=U:Ct(Fe)&&(this.state=$,this.q=Fe)}}},{key:"sDoctypeQuote",value:function(){var ve=this.q;this.captureToChar(ve)&&(this.text+=String.fromCodePoint(ve),this.q=null,this.state=W)}},{key:"sDTD",value:function(){var ve=this.captureTo(Lt);ve!==P&&(this.text+=String.fromCodePoint(ve),ve===Pt?this.state=W:ve===wt?this.state=j:Ct(ve)&&(this.state=I,this.q=ve))}},{key:"sDTDQuoted",value:function(){var ve=this.q;this.captureToChar(ve)&&(this.text+=String.fromCodePoint(ve),this.state=U,this.q=null)}},{key:"sDTDOpenWaka",value:function(){var ve=this.getCodeNorm();switch(this.text+=String.fromCodePoint(ve),ve){case ue:this.state=B,this.openWakaBang="";break;case ct:this.state=ce;break;default:this.state=U}}},{key:"sDTDOpenWakaBang",value:function(){var ve=String.fromCodePoint(this.getCodeNorm()),Fe=this.openWakaBang+=ve;this.text+=ve,Fe!=="-"&&(this.state=Fe==="--"?V:U,this.openWakaBang="")}},{key:"sDTDComment",value:function(){this.captureToChar(Ge)&&(this.text+="-",this.state=te)}},{key:"sDTDCommentEnding",value:function(){var ve=this.getCodeNorm();this.text+=String.fromCodePoint(ve),this.state=ve===Ge?ie:V}},{key:"sDTDCommentEnded",value:function(){var ve=this.getCodeNorm();this.text+=String.fromCodePoint(ve),ve===pt?this.state=U:(this.fail("malformed comment."),this.state=V)}},{key:"sDTDPI",value:function(){this.captureToChar(ct)&&(this.text+="?",this.state=be)}},{key:"sDTDPIEnding",value:function(){var ve=this.getCodeNorm();this.text+=String.fromCodePoint(ve),ve===pt&&(this.state=U)}},{key:"sText",value:function(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}},{key:"sEntity",value:function(){var ve=this.i,Fe=this.chunk;e:for(;;)switch(this.getCode()){case E:this.entity+="".concat(Fe.slice(ve,this.prevI),` `),ve=this.i;break;case _t:{var Be=this.entityReturnState,dt=this.entity+Fe.slice(ve,this.prevI);this.state=Be;var St=void 0;dt===""?(this.fail("empty entity name."),St="&;"):(St=this.parseEntity(dt),this.entity=""),(Be!==_e||this.textHandler!==void 0)&&(this.text+=St);break e}case P:this.entity+=Fe.slice(ve);break e}}},{key:"sOpenWaka",value:function(){var ve=this.getCode();if(i(ve))this.state=Ve,this.unget(),this.xmlDeclPossible=!1;else switch(ve){case rt:this.state=ee,this.xmlDeclPossible=!1;break;case ue:this.state=Q,this.openWakaBang="",this.xmlDeclPossible=!1;break;case ct:this.state=G;break;default:this.fail("disallowed character in tag name"),this.state=_e,this.xmlDeclPossible=!1}}},{key:"sOpenWakaBang",value:function(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=se,this.openWakaBang="";break;case"--":this.state=he,this.openWakaBang="";break;case"DOCTYPE":this.state=W,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}},{key:"sComment",value:function(){this.captureToChar(Ge)&&(this.state=ke)}},{key:"sCommentEnding",value:function(){var ve,Fe=this.getCodeNorm();Fe===Ge?(this.state=re,(ve=this.commentHandler)===null||ve===void 0||ve.call(this,this.text),this.text=""):(this.text+="-".concat(String.fromCodePoint(Fe)),this.state=he)}},{key:"sCommentEnded",value:function(){var ve=this.getCodeNorm();ve!==pt?(this.fail("malformed comment."),this.text+="--".concat(String.fromCodePoint(ve)),this.state=he):this.state=_e}},{key:"sCData",value:function(){this.captureToChar(Pt)&&(this.state=Ce)}},{key:"sCDataEnding",value:function(){var ve=this.getCodeNorm();ve===Pt?this.state=q:(this.text+="]".concat(String.fromCodePoint(ve)),this.state=se)}},{key:"sCDataEnding2",value:function(){var ve,Fe=this.getCodeNorm();switch(Fe){case pt:{(ve=this.cdataHandler)===null||ve===void 0||ve.call(this,this.text),this.text="",this.state=_e;break}case Pt:this.text+="]";break;default:this.text+="]]".concat(String.fromCodePoint(Fe)),this.state=se}}},{key:"sPIFirstChar",value:function(){var ve=this.getCodeNorm();this.nameStartCheck(ve)?(this.piTarget+=String.fromCodePoint(ve),this.state=Z):ve===ct||r(ve)?(this.fail("processing instruction without a target."),this.state=ve===ct?we:fe):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(ve),this.state=Z)}},{key:"sPIRest",value:function(){for(var ve=this.chunk,Fe=this.i;;){var Be=this.getCodeNorm();if(Be===P){this.piTarget+=ve.slice(Fe);return}if(!this.nameCheck(Be)){this.piTarget+=ve.slice(Fe,this.prevI);var dt=Be===ct;dt||r(Be)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=dt?Ue:ge):this.state=dt?we:fe:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(Be));break}}}},{key:"sPIBody",value:function(){if(this.text.length===0){var ve=this.getCodeNorm();ve===ct?this.state=we:r(ve)||(this.text=String.fromCodePoint(ve))}else this.captureToChar(ct)&&(this.state=we)}},{key:"sPIEnding",value:function(){var ve,Fe=this.getCodeNorm();if(Fe===pt){var Be=this.piTarget;Be.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(ve=this.piHandler)===null||ve===void 0||ve.call(this,{target:Be,body:this.text}),this.piTarget=this.text="",this.state=_e}else Fe===ct?this.text+="?":(this.text+="?".concat(String.fromCodePoint(Fe)),this.state=fe);this.xmlDeclPossible=!1}},{key:"sXMLDeclNameStart",value:function(){var ve=this.skipSpaces();if(ve===ct){this.state=Ue;return}ve!==P&&(this.state=je,this.name=String.fromCodePoint(ve))}},{key:"sXMLDeclName",value:function(){var ve=this.captureTo(Et);if(ve===ct){this.state=Ue,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(r(ve)||ve===Ot){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail("expected the name ".concat(this.xmlDeclExpects[0],"."));break;default:this.fail("expected one of ".concat(this.xmlDeclExpects.join(", ")))}this.state=ve===Ot?nt:Ze}}},{key:"sXMLDeclEq",value:function(){var ve=this.getCodeNorm();if(ve===ct){this.state=Ue,this.fail("XML declaration is incomplete.");return}r(ve)||(ve!==Ot&&this.fail("value required."),this.state=nt)}},{key:"sXMLDeclValueStart",value:function(){var ve=this.getCodeNorm();if(ve===ct){this.state=Ue,this.fail("XML declaration is incomplete.");return}r(ve)||(Ct(ve)?this.q=ve:(this.fail("value must be quoted."),this.q=Le),this.state=ut)}},{key:"sXMLDeclValue",value:function(){var ve=this.captureTo([this.q,ct]);if(ve===ct){this.state=Ue,this.text="",this.fail("XML declaration is incomplete.");return}if(ve!==P){var Fe=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];var Be=Fe;this.xmlDecl.version=Be,/^1\.[0-9]+$/.test(Be)?this.opt.forceXMLVersion||this.setXMLVersion(Be):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(Fe)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=Fe;break;case"standalone":Fe!=="yes"&&Fe!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=Fe;break}this.name="",this.state=ot}}},{key:"sXMLDeclSeparator",value:function(){var ve=this.getCodeNorm();if(ve===ct){this.state=Ue;return}r(ve)||(this.fail("whitespace required."),this.unget()),this.state=ge}},{key:"sXMLDeclEnding",value:function(){var ve,Fe=this.getCodeNorm();Fe===pt?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(ve=this.xmldeclHandler)===null||ve===void 0||ve.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=_e):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}},{key:"sOpenTag",value:function(){var ve,Fe=this.captureNameChars();if(Fe!==P){var Be=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=Be.ns=Object.create(null)),(ve=this.openTagStartHandler)===null||ve===void 0||ve.call(this,Be),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),Fe){case pt:this.openTag();break;case rt:this.state=Qe;break;default:r(Fe)||this.fail("disallowed character in tag name."),this.state=tt}}}},{key:"sOpenTagSlash",value:function(){this.getCode()===pt?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=tt)}},{key:"sAttrib",value:function(){var ve=this.skipSpaces();ve!==P&&(i(ve)?(this.unget(),this.state=ae):ve===pt?this.openTag():ve===rt?this.state=Qe:this.fail("disallowed character in attribute name."))}},{key:"sAttribName",value:function(){var ve=this.captureNameChars();ve===Ot?this.state=me:r(ve)?this.state=Re:ve===pt?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):ve!==P&&this.fail("disallowed character in attribute name.")}},{key:"sAttribNameSawWhite",value:function(){var ve=this.skipSpaces();switch(ve){case P:return;case Ot:this.state=me;break;default:this.fail("attribute without value."),this.text="",this.name="",ve===pt?this.openTag():i(ve)?(this.unget(),this.state=ae):(this.fail("disallowed character in attribute name."),this.state=tt)}}},{key:"sAttribValue",value:function(){var ve=this.getCodeNorm();Ct(ve)?(this.q=ve,this.state=Ee):r(ve)||(this.fail("unquoted attribute value."),this.state=Pe,this.unget())}},{key:"sAttribValueQuoted",value:function(){for(var ve=this.q,Fe=this.chunk,Be=this.i;;)switch(this.getCode()){case ve:this.pushAttrib(this.name,this.text+Fe.slice(Be,this.prevI)),this.name=this.text="",this.q=null,this.state=pe;return;case Ie:this.text+=Fe.slice(Be,this.prevI),this.state=oe,this.entityReturnState=Ee;return;case K:case E:case it:this.text+="".concat(Fe.slice(Be,this.prevI)," "),Be=this.i;break;case wt:this.text+=Fe.slice(Be,this.prevI),this.fail("disallowed character.");return;case P:this.text+=Fe.slice(Be);return}}},{key:"sAttribValueClosed",value:function(){var ve=this.getCodeNorm();r(ve)?this.state=tt:ve===pt?this.openTag():ve===rt?this.state=Qe:i(ve)?(this.fail("no whitespace between attributes."),this.unget(),this.state=ae):this.fail("disallowed character in attribute name.")}},{key:"sAttribValueUnquoted",value:function(){var ve=this.captureTo(Dr);switch(ve){case Ie:this.state=oe,this.entityReturnState=Pe;break;case wt:this.fail("disallowed character.");break;case P:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",ve===pt?this.openTag():this.state=tt}}},{key:"sCloseTag",value:function(){var ve=this.captureNameChars();ve===pt?this.closeTag():r(ve)?this.state=Xe:ve!==P&&this.fail("disallowed character in closing tag.")}},{key:"sCloseTagSawWhite",value:function(){switch(this.skipSpaces()){case pt:this.closeTag();break;case P:break;default:this.fail("disallowed character in closing tag.")}}},{key:"handleTextInRoot",value:function(){var ve=this.i,Fe=this.forbiddenState,Be=this.chunk,dt=this.textHandler;e:for(;;)switch(this.getCode()){case wt:{if(this.state=J,dt!==void 0){var St=this.text,Xt=Be.slice(ve,this.prevI);St.length!==0?(dt(St+Xt),this.text=""):Xt.length!==0&&dt(Xt)}Fe=Qt;break e}case Ie:this.state=oe,this.entityReturnState=_e,dt!==void 0&&(this.text+=Be.slice(ve,this.prevI)),Fe=Qt;break e;case Pt:switch(Fe){case Qt:Fe=Hr;break;case Hr:Fe=Fr;break;case Fr:break;default:throw new Error("impossible state")}break;case pt:Fe===Fr&&this.fail('the string "]]>" is disallowed in char data.'),Fe=Qt;break;case E:dt!==void 0&&(this.text+="".concat(Be.slice(ve,this.prevI),` `)),ve=this.i,Fe=Qt;break;case P:dt!==void 0&&(this.text+=Be.slice(ve));break e;default:Fe=Qt}this.forbiddenState=Fe}},{key:"handleTextOutsideRoot",value:function(){var ve=this.i,Fe=this.chunk,Be=this.textHandler,dt=!1;e:for(;;){var St=this.getCode();switch(St){case wt:{if(this.state=J,Be!==void 0){var Xt=this.text,lr=Fe.slice(ve,this.prevI);Xt.length!==0?(Be(Xt+lr),this.text=""):lr.length!==0&&Be(lr)}break e}case Ie:this.state=oe,this.entityReturnState=_e,Be!==void 0&&(this.text+=Fe.slice(ve,this.prevI)),dt=!0;break e;case E:Be!==void 0&&(this.text+="".concat(Fe.slice(ve,this.prevI),` `)),ve=this.i;break;case P:Be!==void 0&&(this.text+=Fe.slice(ve));break e;default:r(St)||(dt=!0)}}dt&&(!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}},{key:"pushAttribNS",value:function(ve,Fe){var Be,dt=this.qname(ve),St=dt.prefix,Xt=dt.local,lr={name:ve,prefix:St,local:Xt,value:Fe};if(this.attribList.push(lr),(Be=this.attributeHandler)===null||Be===void 0||Be.call(this,lr),St==="xmlns"){var gr=Fe.trim();this.currentXMLVersion==="1.0"&&gr===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[Xt]=gr,Or(this,Xt,gr)}else if(ve==="xmlns"){var rn=Fe.trim();this.topNS[""]=rn,Or(this,"",rn)}}},{key:"pushAttribPlain",value:function(ve,Fe){var Be,dt={name:ve,value:Fe};this.attribList.push(dt),(Be=this.attributeHandler)===null||Be===void 0||Be.call(this,dt)}},{key:"end",value:function(){var ve,Fe;this.sawRoot||this.fail("document must contain a root element.");for(var Be=this.tags;Be.length>0;){var dt=Be.pop();this.fail("unclosed tag: ".concat(dt.name))}this.state!==A&&this.state!==_e&&this.fail("unexpected end.");var St=this.text;return St.length!==0&&((ve=this.textHandler)===null||ve===void 0||ve.call(this,St),this.text=""),this._closed=!0,(Fe=this.endHandler)===null||Fe===void 0||Fe.call(this),this._init(),this}},{key:"resolve",value:function(ve){var Fe,Be,dt=this.topNS[ve];if(dt!==void 0)return dt;for(var St=this.tags,Xt=St.length-1;Xt>=0;Xt--)if(dt=St[Xt].ns[ve],dt!==void 0)return dt;return dt=this.ns[ve],dt!==void 0?dt:(Be=(Fe=this.opt).resolvePrefix)===null||Be===void 0?void 0:Be.call(Fe,ve)}},{key:"qname",value:function(ve){var Fe=ve.indexOf(":");if(Fe===-1)return{prefix:"",local:ve};var Be=ve.slice(Fe+1),dt=ve.slice(0,Fe);return(dt===""||Be===""||Be.includes(":"))&&this.fail("malformed name: ".concat(ve,".")),{prefix:dt,local:Be}}},{key:"processAttribsNS",value:function(){var ve,Fe=this.attribList,Be=this.tag;{var dt=this.qname(Be.name),St=dt.prefix,Xt=dt.local;Be.prefix=St,Be.local=Xt;var lr=Be.uri=(ve=this.resolve(St))!==null&&ve!==void 0?ve:"";St!==""&&(St==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),lr===""&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify(St),".")),Be.uri=St))}if(Fe.length!==0){var gr=Be.attributes,rn=new Set,zr=u(Fe),pi;try{for(zr.s();!(pi=zr.n()).done;){var Wr=pi.value,Dn=Wr.name,cn=Wr.prefix,yi=Wr.local,hn=void 0,dn=void 0;cn===""?(hn=Dn==="xmlns"?M:"",dn=Dn):(hn=this.resolve(cn),hn===void 0&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify(cn),".")),hn=cn),dn="{".concat(hn,"}").concat(yi)),rn.has(dn)&&this.fail("duplicate attribute: ".concat(dn,".")),rn.add(dn),Wr.uri=hn,gr[Dn]=Wr}}catch(Nn){zr.e(Nn)}finally{zr.f()}this.attribList=[]}}},{key:"processAttribsPlain",value:function(){var ve=this.attribList,Fe=this.tag.attributes,Be=u(ve),dt;try{for(Be.s();!(dt=Be.n()).done;){var St=dt.value,Xt=St.name,lr=St.value;Fe[Xt]!==void 0&&this.fail("duplicate attribute: ".concat(Xt,".")),Fe[Xt]=lr}}catch(gr){Be.e(gr)}finally{Be.f()}this.attribList=[]}},{key:"openTag",value:function(){var ve;this.processAttribs();var Fe=this.tags,Be=this.tag;Be.isSelfClosing=!1,(ve=this.openTagHandler)===null||ve===void 0||ve.call(this,Be),Fe.push(Be),this.state=_e,this.name=""}},{key:"openSelfClosingTag",value:function(){var ve,Fe,Be;this.processAttribs();var dt=this.tags,St=this.tag;St.isSelfClosing=!0,(ve=this.openTagHandler)===null||ve===void 0||ve.call(this,St),(Fe=this.closeTagHandler)===null||Fe===void 0||Fe.call(this,St);var Xt=this.tag=(Be=dt[dt.length-1])!==null&&Be!==void 0?Be:null;Xt===null&&(this.closedRoot=!0),this.state=_e,this.name=""}},{key:"closeTag",value:function(){var ve=this.tags,Fe=this.name;if(this.state=_e,this.name="",Fe===""){this.fail("weird empty close tag."),this.text+="";return}for(var Be=this.closeTagHandler,dt=ve.length;dt-- >0;){var St=this.tag=ve.pop();if(this.topNS=St.ns,Be==null||Be(St),St.name===Fe)break;this.fail("unexpected close tag.")}dt===0?this.closedRoot=!0:dt<0&&(this.fail("unmatched closing tag: ".concat(Fe,".")),this.text+=""))}},{key:"parseEntity",value:function(ve){if(ve[0]!=="#"){var Fe=this.ENTITIES[ve];return Fe!==void 0?Fe:(this.fail(this.isName(ve)?"undefined entity.":"disallowed character in entity name."),"&".concat(ve,";"))}var Be=NaN;return ve[1]==="x"&&/^#x[0-9a-f]+$/i.test(ve)?Be=parseInt(ve.slice(2),16):/^#[0-9]+$/.test(ve)&&(Be=parseInt(ve.slice(1),10)),this.isChar(Be)?String.fromCodePoint(Be):(this.fail("malformed character entity."),"&".concat(ve,";"))}},{key:"closed",get:function(){return this._closed}},{key:"position",get:function(){return this.chunkPosition+this.i}},{key:"columnIndex",get:function(){return this.position-this.positionAtNewLine}}]),vt}();_.SaxesParser=Ur},{"xmlchars/xml/1.0/ed5":541,"xmlchars/xml/1.1/ed2":542,"xmlchars/xmlns/1.0/ed3":543}],497:[function(e,x,_){(function(u){x.exports=typeof u=="function"?u:function(){var g=[].slice.apply(arguments);g.splice(1,0,0),setTimeout.apply(null,g)}}).call(this,e("timers").setImmediate)},{timers:521}],498:[function(e,x,_){var u=e("safe-buffer").Buffer;function m(g,b){this._block=u.alloc(g),this._finalSize=b,this._blockSize=g,this._len=0}m.prototype.update=function(g,b){typeof g=="string"&&(b=b||"utf8",g=u.from(g,b));for(var w=this._block,f=this._blockSize,y=g.length,h=this._len,l=0;l=this._finalSize&&(this._update(this._block),this._block.fill(0));var w=this._len*8;if(w<=4294967295)this._block.writeUInt32BE(w,this._blockSize-4);else{var f=(w&4294967295)>>>0,y=(w-f)/4294967296;this._block.writeUInt32BE(y,this._blockSize-8),this._block.writeUInt32BE(f,this._blockSize-4)}this._update(this._block);var h=this._hash();return g?h.toString(g):h},m.prototype._update=function(){throw new Error("_update must be implemented by subclass")},x.exports=m},{"safe-buffer":494}],499:[function(e,x,_){var u=x.exports=function(g){g=g.toLowerCase();var b=u[g];if(!b)throw new Error(g+" is not supported (we accept pull requests)");return new b};u.sha=e("./sha"),u.sha1=e("./sha1"),u.sha224=e("./sha224"),u.sha256=e("./sha256"),u.sha384=e("./sha384"),u.sha512=e("./sha512")},{"./sha":500,"./sha1":501,"./sha224":502,"./sha256":503,"./sha384":504,"./sha512":505}],500:[function(e,x,_){var u=e("inherits"),m=e("./hash"),g=e("safe-buffer").Buffer,b=[1518500249,1859775393,-1894007588,-899497514],w=new Array(80);function f(){this.init(),this._w=w,m.call(this,64,56)}u(f,m),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function y(d){return d<<5|d>>>27}function h(d){return d<<30|d>>>2}function l(d,s,v,c){return d===0?s&v|~s&c:d===2?s&v|s&c|v&c:s^v^c}f.prototype._update=function(d){for(var s=this._w,v=this._a|0,c=this._b|0,a=this._c|0,r=this._d|0,t=this._e|0,i=0;i<16;++i)s[i]=d.readInt32BE(i*4);for(;i<80;++i)s[i]=s[i-3]^s[i-8]^s[i-14]^s[i-16];for(var n=0;n<80;++n){var o=~~(n/20),p=y(v)+l(o,c,a,r)+t+s[n]+b[o]|0;t=r,r=a,a=h(c),c=v,v=p}this._a=v+this._a|0,this._b=c+this._b|0,this._c=a+this._c|0,this._d=r+this._d|0,this._e=t+this._e|0},f.prototype._hash=function(){var d=g.allocUnsafe(20);return d.writeInt32BE(this._a|0,0),d.writeInt32BE(this._b|0,4),d.writeInt32BE(this._c|0,8),d.writeInt32BE(this._d|0,12),d.writeInt32BE(this._e|0,16),d},x.exports=f},{"./hash":498,inherits:387,"safe-buffer":494}],501:[function(e,x,_){var u=e("inherits"),m=e("./hash"),g=e("safe-buffer").Buffer,b=[1518500249,1859775393,-1894007588,-899497514],w=new Array(80);function f(){this.init(),this._w=w,m.call(this,64,56)}u(f,m),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function y(s){return s<<1|s>>>31}function h(s){return s<<5|s>>>27}function l(s){return s<<30|s>>>2}function d(s,v,c,a){return s===0?v&c|~v&a:s===2?v&c|v&a|c&a:v^c^a}f.prototype._update=function(s){for(var v=this._w,c=this._a|0,a=this._b|0,r=this._c|0,t=this._d|0,i=this._e|0,n=0;n<16;++n)v[n]=s.readInt32BE(n*4);for(;n<80;++n)v[n]=y(v[n-3]^v[n-8]^v[n-14]^v[n-16]);for(var o=0;o<80;++o){var p=~~(o/20),O=h(c)+d(p,a,r,t)+i+v[o]+b[p]|0;i=t,t=r,r=l(a),a=c,c=O}this._a=c+this._a|0,this._b=a+this._b|0,this._c=r+this._c|0,this._d=t+this._d|0,this._e=i+this._e|0},f.prototype._hash=function(){var s=g.allocUnsafe(20);return s.writeInt32BE(this._a|0,0),s.writeInt32BE(this._b|0,4),s.writeInt32BE(this._c|0,8),s.writeInt32BE(this._d|0,12),s.writeInt32BE(this._e|0,16),s},x.exports=f},{"./hash":498,inherits:387,"safe-buffer":494}],502:[function(e,x,_){var u=e("inherits"),m=e("./sha256"),g=e("./hash"),b=e("safe-buffer").Buffer,w=new Array(64);function f(){this.init(),this._w=w,g.call(this,64,56)}u(f,m),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var y=b.allocUnsafe(28);return y.writeInt32BE(this._a,0),y.writeInt32BE(this._b,4),y.writeInt32BE(this._c,8),y.writeInt32BE(this._d,12),y.writeInt32BE(this._e,16),y.writeInt32BE(this._f,20),y.writeInt32BE(this._g,24),y},x.exports=f},{"./hash":498,"./sha256":503,inherits:387,"safe-buffer":494}],503:[function(e,x,_){var u=e("inherits"),m=e("./hash"),g=e("safe-buffer").Buffer,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],w=new Array(64);function f(){this.init(),this._w=w,m.call(this,64,56)}u(f,m),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function y(c,a,r){return r^c&(a^r)}function h(c,a,r){return c&a|r&(c|a)}function l(c){return(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10)}function d(c){return(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7)}function s(c){return(c>>>7|c<<25)^(c>>>18|c<<14)^c>>>3}function v(c){return(c>>>17|c<<15)^(c>>>19|c<<13)^c>>>10}f.prototype._update=function(c){for(var a=this._w,r=this._a|0,t=this._b|0,i=this._c|0,n=this._d|0,o=this._e|0,p=this._f|0,O=this._g|0,C=this._h|0,N=0;N<16;++N)a[N]=c.readInt32BE(N*4);for(;N<64;++N)a[N]=v(a[N-2])+a[N-7]+s(a[N-15])+a[N-16]|0;for(var L=0;L<64;++L){var F=C+d(o)+y(o,p,O)+b[L]+a[L]|0,M=l(r)+h(r,t,i)|0;C=O,O=p,p=o,o=n+F|0,n=i,i=t,t=r,r=F+M|0}this._a=r+this._a|0,this._b=t+this._b|0,this._c=i+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0,this._f=p+this._f|0,this._g=O+this._g|0,this._h=C+this._h|0},f.prototype._hash=function(){var c=g.allocUnsafe(32);return c.writeInt32BE(this._a,0),c.writeInt32BE(this._b,4),c.writeInt32BE(this._c,8),c.writeInt32BE(this._d,12),c.writeInt32BE(this._e,16),c.writeInt32BE(this._f,20),c.writeInt32BE(this._g,24),c.writeInt32BE(this._h,28),c},x.exports=f},{"./hash":498,inherits:387,"safe-buffer":494}],504:[function(e,x,_){var u=e("inherits"),m=e("./sha512"),g=e("./hash"),b=e("safe-buffer").Buffer,w=new Array(160);function f(){this.init(),this._w=w,g.call(this,128,112)}u(f,m),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var y=b.allocUnsafe(48);function h(l,d,s){y.writeInt32BE(l,s),y.writeInt32BE(d,s+4)}return h(this._ah,this._al,0),h(this._bh,this._bl,8),h(this._ch,this._cl,16),h(this._dh,this._dl,24),h(this._eh,this._el,32),h(this._fh,this._fl,40),y},x.exports=f},{"./hash":498,"./sha512":505,inherits:387,"safe-buffer":494}],505:[function(e,x,_){var u=e("inherits"),m=e("./hash"),g=e("safe-buffer").Buffer,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],w=new Array(160);function f(){this.init(),this._w=w,m.call(this,128,112)}u(f,m),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function y(t,i,n){return n^t&(i^n)}function h(t,i,n){return t&i|n&(t|i)}function l(t,i){return(t>>>28|i<<4)^(i>>>2|t<<30)^(i>>>7|t<<25)}function d(t,i){return(t>>>14|i<<18)^(t>>>18|i<<14)^(i>>>9|t<<23)}function s(t,i){return(t>>>1|i<<31)^(t>>>8|i<<24)^t>>>7}function v(t,i){return(t>>>1|i<<31)^(t>>>8|i<<24)^(t>>>7|i<<25)}function c(t,i){return(t>>>19|i<<13)^(i>>>29|t<<3)^t>>>6}function a(t,i){return(t>>>19|i<<13)^(i>>>29|t<<3)^(t>>>6|i<<26)}function r(t,i){return t>>>0>>0?1:0}f.prototype._update=function(t){for(var i=this._w,n=this._ah|0,o=this._bh|0,p=this._ch|0,O=this._dh|0,C=this._eh|0,N=this._fh|0,L=this._gh|0,F=this._hh|0,M=this._al|0,D=this._bl|0,R=this._cl|0,P=this._dl|0,E=this._el|0,A=this._fl|0,z=this._gl|0,W=this._hl|0,$=0;$<32;$+=2)i[$]=t.readInt32BE($*4),i[$+1]=t.readInt32BE($*4+4);for(;$<160;$+=2){var U=i[$-30],I=i[$-15*2+1],j=s(U,I),B=v(I,U);U=i[$-2*2],I=i[$-2*2+1];var V=c(U,I),te=a(I,U),ie=i[$-7*2],ce=i[$-7*2+1],be=i[$-16*2],_e=i[$-16*2+1],oe=B+ce|0,J=j+ie+r(oe,B)|0;oe=oe+te|0,J=J+V+r(oe,te)|0,oe=oe+_e|0,J=J+be+r(oe,_e)|0,i[$]=J,i[$+1]=oe}for(var Q=0;Q<160;Q+=2){J=i[Q],oe=i[Q+1];var he=h(n,o,p),ke=h(M,D,R),re=l(n,M),se=l(M,n),Ce=d(C,E),q=d(E,C),G=b[Q],Z=b[Q+1],fe=y(C,N,L),we=y(E,A,z),ge=W+q|0,je=F+Ce+r(ge,W)|0;ge=ge+we|0,je=je+fe+r(ge,we)|0,ge=ge+Z|0,je=je+G+r(ge,Z)|0,ge=ge+oe|0,je=je+J+r(ge,oe)|0;var Ze=se+ke|0,nt=re+he+r(Ze,se)|0;F=L,W=z,L=N,z=A,N=C,A=E,E=P+ge|0,C=O+je+r(E,P)|0,O=p,P=R,p=o,R=D,o=n,D=M,M=ge+Ze|0,n=je+nt+r(M,ge)|0}this._al=this._al+M|0,this._bl=this._bl+D|0,this._cl=this._cl+R|0,this._dl=this._dl+P|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._gl+z|0,this._hl=this._hl+W|0,this._ah=this._ah+n+r(this._al,M)|0,this._bh=this._bh+o+r(this._bl,D)|0,this._ch=this._ch+p+r(this._cl,R)|0,this._dh=this._dh+O+r(this._dl,P)|0,this._eh=this._eh+C+r(this._el,E)|0,this._fh=this._fh+N+r(this._fl,A)|0,this._gh=this._gh+L+r(this._gl,z)|0,this._hh=this._hh+F+r(this._hl,W)|0},f.prototype._hash=function(){var t=g.allocUnsafe(64);function i(n,o,p){t.writeInt32BE(n,p),t.writeInt32BE(o,p+4)}return i(this._ah,this._al,0),i(this._bh,this._bl,8),i(this._ch,this._cl,16),i(this._dh,this._dl,24),i(this._eh,this._el,32),i(this._fh,this._fl,40),i(this._gh,this._gl,48),i(this._hh,this._hl,56),t},x.exports=f},{"./hash":498,inherits:387,"safe-buffer":494}],506:[function(e,x,_){x.exports=g;var u=e("events").EventEmitter,m=e("inherits");m(g,u),g.Readable=e("readable-stream/readable.js"),g.Writable=e("readable-stream/writable.js"),g.Duplex=e("readable-stream/duplex.js"),g.Transform=e("readable-stream/transform.js"),g.PassThrough=e("readable-stream/passthrough.js"),g.Stream=g;function g(){u.call(this)}g.prototype.pipe=function(b,w){var f=this;function y(a){b.writable&&b.write(a)===!1&&f.pause&&f.pause()}f.on("data",y);function h(){f.readable&&f.resume&&f.resume()}b.on("drain",h),!b._isStdio&&(!w||w.end!==!1)&&(f.on("end",d),f.on("close",s));var l=!1;function d(){l||(l=!0,b.end())}function s(){l||(l=!0,typeof b.destroy=="function"&&b.destroy())}function v(a){if(c(),u.listenerCount(this,"error")===0)throw a}f.on("error",v),b.on("error",v);function c(){f.removeListener("data",y),b.removeListener("drain",h),f.removeListener("end",d),f.removeListener("close",s),f.removeListener("error",v),b.removeListener("error",v),f.removeListener("end",c),f.removeListener("close",c),b.removeListener("close",c)}return f.on("end",c),f.on("close",c),b.on("close",c),b.emit("pipe",f),b}},{events:367,inherits:387,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],507:[function(e,x,_){x.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(e,x,_){var u=e("process-nextick-args"),m=Object.keys||function(v){var c=[];for(var a in v)c.push(a);return c};x.exports=l;var g=Object.create(e("core-util-is"));g.inherits=e("inherits");var b=e("./_stream_readable"),w=e("./_stream_writable");g.inherits(l,b);for(var f=m(w.prototype),y=0;y0?(typeof Q!="string"&&!se.objectMode&&Object.getPrototypeOf(Q)!==h.prototype&&(Q=d(Q)),ke?se.endEmitted?J.emit("error",new Error("stream.unshift() after end event")):N(J,se,Q,!0):se.ended?J.emit("error",new Error("stream.push() after EOF")):(se.reading=!1,se.decoder&&!he?(Q=se.decoder.write(Q),se.objectMode||Q.length!==0?N(J,se,Q,!1):z(J,se)):N(J,se,Q,!1))):ke||(se.reading=!1)}return F(se)}function N(J,Q,he,ke){Q.flowing&&Q.length===0&&!Q.sync?(J.emit("data",he),J.read(0)):(Q.length+=Q.objectMode?1:he.length,ke?Q.buffer.unshift(he):Q.buffer.push(he),Q.needReadable&&E(J)),z(J,Q)}function L(J,Q){var he;return!s(Q)&&typeof Q!="string"&&Q!==void 0&&!J.objectMode&&(he=new TypeError("Invalid non-string/buffer chunk")),he}function F(J){return!J.ended&&(J.needReadable||J.length=M?J=M:(J--,J|=J>>>1,J|=J>>>2,J|=J>>>4,J|=J>>>8,J|=J>>>16,J++),J}function R(J,Q){return J<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:J!==J?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(J>Q.highWaterMark&&(Q.highWaterMark=D(J)),J<=Q.length?J:Q.ended?Q.length:(Q.needReadable=!0,0))}O.prototype.read=function(J){a("read",J),J=parseInt(J,10);var Q=this._readableState,he=J;if(J!==0&&(Q.emittedReadable=!1),J===0&&Q.needReadable&&(Q.length>=Q.highWaterMark||Q.ended))return a("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?be(this):E(this),null;if(J=R(J,Q),J===0&&Q.ended)return Q.length===0&&be(this),null;var ke=Q.needReadable;a("need readable",ke),(Q.length===0||Q.length-J0?re=V(J,Q):re=null,re===null?(Q.needReadable=!0,J=0):Q.length-=J,Q.length===0&&(Q.ended||(Q.needReadable=!0),he!==J&&Q.ended&&be(this)),re!==null&&this.emit("data",re),re};function P(J,Q){if(!Q.ended){if(Q.decoder){var he=Q.decoder.end();he&&he.length&&(Q.buffer.push(he),Q.length+=Q.objectMode?1:he.length)}Q.ended=!0,E(J)}}function E(J){var Q=J._readableState;Q.needReadable=!1,Q.emittedReadable||(a("emitReadable",Q.flowing),Q.emittedReadable=!0,Q.sync?g.nextTick(A,J):A(J))}function A(J){a("emit readable"),J.emit("readable"),B(J)}function z(J,Q){Q.readingMore||(Q.readingMore=!0,g.nextTick(W,J,Q))}function W(J,Q){for(var he=Q.length;!Q.reading&&!Q.flowing&&!Q.ended&&Q.length1&&oe(ke.pipes,J)!==-1)&&!Z&&(a("false write response, pause",he._readableState.awaitDrain),he._readableState.awaitDrain++,we=!0),he.pause())}function je(ot){a("onerror",ot),ut(),J.removeListener("error",je),f(J,"error")===0&&J.emit("error",ot)}o(J,"error",je);function Ze(){J.removeListener("finish",nt),ut()}J.once("close",Ze);function nt(){a("onfinish"),J.removeListener("close",Ze),ut()}J.once("finish",nt);function ut(){a("unpipe"),he.unpipe(J)}return J.emit("pipe",he),ke.flowing||(a("pipe resume"),he.resume()),J};function $(J){return function(){var Q=J._readableState;a("pipeOnDrain",Q.awaitDrain),Q.awaitDrain&&Q.awaitDrain--,Q.awaitDrain===0&&f(J,"data")&&(Q.flowing=!0,B(J))}}O.prototype.unpipe=function(J){var Q=this._readableState,he={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return J&&J!==Q.pipes?this:(J||(J=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,J&&J.emit("unpipe",this,he),this);if(!J){var ke=Q.pipes,re=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var se=0;se=Q.length?(Q.decoder?he=Q.buffer.join(""):Q.buffer.length===1?he=Q.buffer.head.data:he=Q.buffer.concat(Q.length),Q.buffer.clear()):he=te(J,Q.buffer,Q.decoder),he}function te(J,Q,he){var ke;return Jse.length?se.length:J;if(Ce===se.length?re+=se:re+=se.slice(0,J),J-=Ce,J===0){Ce===se.length?(++ke,he.next?Q.head=he.next:Q.head=Q.tail=null):(Q.head=he,he.data=se.slice(Ce));break}++ke}return Q.length-=ke,re}function ce(J,Q){var he=h.allocUnsafe(J),ke=Q.head,re=1;for(ke.data.copy(he),J-=ke.data.length;ke=ke.next;){var se=ke.data,Ce=J>se.length?se.length:J;if(se.copy(he,he.length-J,0,Ce),J-=Ce,J===0){Ce===se.length?(++re,ke.next?Q.head=ke.next:Q.head=Q.tail=null):(Q.head=ke,ke.data=se.slice(Ce));break}++re}return Q.length-=re,he}function be(J){var Q=J._readableState;if(Q.length>0)throw new Error('"endReadable()" called on non-empty stream');Q.endEmitted||(Q.ended=!0,g.nextTick(_e,Q,J))}function _e(J,Q){!J.endEmitted&&J.length===0&&(J.endEmitted=!0,Q.readable=!1,Q.emit("end"))}function oe(J,Q){for(var he=0,ke=J.length;he-1?g:b.nextTick,y;o.WritableState=i;var h=Object.create(e("core-util-is"));h.inherits=e("inherits");var l={deprecate:e("util-deprecate")},d=e("./internal/streams/stream"),s=e("safe-buffer").Buffer,v=m.Uint8Array||function(){};function c(j){return s.from(j)}function a(j){return s.isBuffer(j)||j instanceof v}var r=e("./internal/streams/destroy");h.inherits(o,d);function t(){}function i(j,B){y=y||e("./_stream_duplex"),j=j||{};var V=B instanceof y;this.objectMode=!!j.objectMode,V&&(this.objectMode=this.objectMode||!!j.writableObjectMode);var te=j.highWaterMark,ie=j.writableHighWaterMark,ce=this.objectMode?16:16*1024;te||te===0?this.highWaterMark=te:V&&(ie||ie===0)?this.highWaterMark=ie:this.highWaterMark=ce,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=j.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=j.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(_e){D(B,_e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}i.prototype.getBuffer=function(){for(var B=this.bufferedRequest,V=[];B;)V.push(B),B=B.next;return V},function(){try{Object.defineProperty(i.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var n;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(o,Symbol.hasInstance,{value:function(B){return n.call(this,B)?!0:this!==o?!1:B&&B._writableState instanceof i}})):n=function(B){return B instanceof this};function o(j){if(y=y||e("./_stream_duplex"),!n.call(o,this)&&!(this instanceof y))return new o(j);this._writableState=new i(j,this),this.writable=!0,j&&(typeof j.write=="function"&&(this._write=j.write),typeof j.writev=="function"&&(this._writev=j.writev),typeof j.destroy=="function"&&(this._destroy=j.destroy),typeof j.final=="function"&&(this._final=j.final)),d.call(this)}o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function p(j,B){var V=new Error("write after end");j.emit("error",V),b.nextTick(B,V)}function O(j,B,V,te){var ie=!0,ce=!1;return V===null?ce=new TypeError("May not write null values to stream"):typeof V!="string"&&V!==void 0&&!B.objectMode&&(ce=new TypeError("Invalid non-string/buffer chunk")),ce&&(j.emit("error",ce),b.nextTick(te,ce),ie=!1),ie}o.prototype.write=function(j,B,V){var te=this._writableState,ie=!1,ce=!te.objectMode&&a(j);return ce&&!s.isBuffer(j)&&(j=c(j)),typeof B=="function"&&(V=B,B=null),ce?B="buffer":B||(B=te.defaultEncoding),typeof V!="function"&&(V=t),te.ended?p(this,V):(ce||O(this,te,j,V))&&(te.pendingcb++,ie=N(this,te,ce,j,B,V)),ie},o.prototype.cork=function(){var j=this._writableState;j.corked++},o.prototype.uncork=function(){var j=this._writableState;j.corked&&(j.corked--,!j.writing&&!j.corked&&!j.finished&&!j.bufferProcessing&&j.bufferedRequest&&E(this,j))},o.prototype.setDefaultEncoding=function(B){if(typeof B=="string"&&(B=B.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((B+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+B);return this._writableState.defaultEncoding=B,this};function C(j,B,V){return!j.objectMode&&j.decodeStrings!==!1&&typeof B=="string"&&(B=s.from(B,V)),B}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(j,B,V,te,ie,ce){if(!V){var be=C(B,te,ie);te!==be&&(V=!0,ie="buffer",te=be)}var _e=B.objectMode?1:te.length;B.length+=_e;var oe=B.length0?this.tail.next=h:this.head=h,this.tail=h,++this.length},w.prototype.unshift=function(y){var h={data:y,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length},w.prototype.shift=function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}},w.prototype.clear=function(){this.head=this.tail=null,this.length=0},w.prototype.join=function(y){if(this.length===0)return"";for(var h=this.head,l=""+h.data;h=h.next;)l+=y+h.data;return l},w.prototype.concat=function(y){if(this.length===0)return m.alloc(0);if(this.length===1)return this.head.data;for(var h=m.allocUnsafe(y>>>0),l=this.head,d=0;l;)b(l.data,h,d),d+=l.data.length,l=l.next;return h},w}(),g&&g.inspect&&g.inspect.custom&&(x.exports.prototype[g.inspect.custom]=function(){var w=g.inspect({length:this.length});return this.constructor.name+" "+w})},{"safe-buffer":494,util:185}],514:[function(e,x,_){var u=e("process-nextick-args");function m(w,f){var y=this,h=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return h||l?(f?f(w):w&&(!this._writableState||!this._writableState.errorEmitted)&&u.nextTick(b,this,w),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(w||null,function(d){!f&&d?(u.nextTick(b,y,d),y._writableState&&(y._writableState.errorEmitted=!0)):f&&f(d)}),this)}function g(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function b(w,f){w.emit("error",f)}x.exports={destroy:m,undestroy:g}},{"process-nextick-args":466}],515:[function(e,x,_){arguments[4][490][0].apply(_,arguments)},{dup:490,events:367}],516:[function(e,x,_){x.exports=e("./readable").PassThrough},{"./readable":517}],517:[function(e,x,_){_=x.exports=e("./lib/_stream_readable.js"),_.Stream=_,_.Readable=_,_.Writable=e("./lib/_stream_writable.js"),_.Duplex=e("./lib/_stream_duplex.js"),_.Transform=e("./lib/_stream_transform.js"),_.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":508,"./lib/_stream_passthrough.js":509,"./lib/_stream_readable.js":510,"./lib/_stream_transform.js":511,"./lib/_stream_writable.js":512}],518:[function(e,x,_){x.exports=e("./readable").Transform},{"./readable":517}],519:[function(e,x,_){x.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(e,x,_){var u=e("safe-buffer").Buffer,m=u.isEncoding||function(n){switch(n=""+n,n&&n.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(n){if(!n)return"utf8";for(var o;;)switch(n){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return n;default:if(o)return;n=(""+n).toLowerCase(),o=!0}}function b(n){var o=g(n);if(typeof o!="string"&&(u.isEncoding===m||!m(n)))throw new Error("Unknown encoding: "+n);return o||n}_.StringDecoder=w;function w(n){this.encoding=b(n);var o;switch(this.encoding){case"utf16le":this.text=v,this.end=c,o=4;break;case"utf8":this.fillLast=l,o=4;break;case"base64":this.text=a,this.end=r,o=3;break;default:this.write=t,this.end=i;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=u.allocUnsafe(o)}w.prototype.write=function(n){if(n.length===0)return"";var o,p;if(this.lastNeed){if(o=this.fillLast(n),o===void 0)return"";p=this.lastNeed,this.lastNeed=0}else p=0;return p>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function y(n,o,p){var O=o.length-1;if(O=0?(C>0&&(n.lastNeed=C-1),C):--O=0?(C>0&&(n.lastNeed=C-2),C):--O=0?(C>0&&(C===2?C=0:n.lastNeed=C-3),C):0))}function h(n,o,p){if((o[0]&192)!==128)return n.lastNeed=0,"�";if(n.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return n.lastNeed=1,"�";if(n.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return n.lastNeed=2,"�"}}function l(n){var o=this.lastTotal-this.lastNeed,p=h(this,n);if(p!==void 0)return p;if(this.lastNeed<=n.length)return n.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,o,0,n.length),this.lastNeed-=n.length}function d(n,o){var p=y(this,n,o);if(!this.lastNeed)return n.toString("utf8",o);this.lastTotal=p;var O=n.length-(p-this.lastNeed);return n.copy(this.lastChar,0,O),n.toString("utf8",o,O)}function s(n){var o=n&&n.length?this.write(n):"";return this.lastNeed?o+"�":o}function v(n,o){if((n.length-o)%2===0){var p=n.toString("utf16le",o);if(p){var O=p.charCodeAt(p.length-1);if(O>=55296&&O<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],p.slice(0,-1)}return p}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",o,n.length-1)}function c(n){var o=n&&n.length?this.write(n):"";if(this.lastNeed){var p=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,p)}return o}function a(n,o){var p=(n.length-o)%3;return p===0?n.toString("base64",o):(this.lastNeed=3-p,this.lastTotal=3,p===1?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",o,n.length-p))}function r(n){var o=n&&n.length?this.write(n):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function t(n){return n.toString(this.encoding)}function i(n){return n&&n.length?this.write(n):""}},{"safe-buffer":494}],521:[function(e,x,_){(function(u,m){var g=e("process/browser.js").nextTick,b=Function.prototype.apply,w=Array.prototype.slice,f={},y=0;_.setTimeout=function(){return new h(b.call(setTimeout,window,arguments),clearTimeout)},_.setInterval=function(){return new h(b.call(setInterval,window,arguments),clearInterval)},_.clearTimeout=_.clearInterval=function(l){l.close()};function h(l,d){this._id=l,this._clearFn=d}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},_.enroll=function(l,d){clearTimeout(l._idleTimeoutId),l._idleTimeout=d},_.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},_._unrefActive=_.active=function(l){clearTimeout(l._idleTimeoutId);var d=l._idleTimeout;d>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},d))},_.setImmediate=typeof u=="function"?u:function(l){var d=y++,s=arguments.length<2?!1:w.call(arguments,1);return f[d]=!0,g(function(){f[d]&&(s?l.apply(null,s):l.call(null),_.clearImmediate(d))}),d},_.clearImmediate=typeof m=="function"?m:function(l){delete f[l]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":467,timers:521}],522:[function(e,x,_){(function(u){x.exports=m;function m(b,w){if(g("noDeprecation"))return b;var f=!1;function y(){if(!f){if(g("throwDeprecation"))throw new Error(w);g("traceDeprecation")?console.trace(w):console.warn(w),f=!0}return b.apply(this,arguments)}return y}function g(b){try{if(!u.localStorage)return!1}catch{return!1}var w=u.localStorage[b];return w==null?!1:String(w).toLowerCase()==="true"}}).call(this,typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],523:[function(e,x,_){typeof Object.create=="function"?x.exports=function(m,g){m.super_=g,m.prototype=Object.create(g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})}:x.exports=function(m,g){m.super_=g;var b=function(){};b.prototype=g.prototype,m.prototype=new b,m.prototype.constructor=m}},{}],524:[function(e,x,_){function u(m){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(b){return typeof b}:u=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},u(m)}x.exports=function(g){return g&&u(g)==="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],525:[function(e,x,_){(function(u,m){function g(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(B){return typeof B}:g=function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},g(I)}var b=/%[sdj%]/g;_.format=function(I){if(!C(I)){for(var j=[],B=0;B=te)return be;switch(be){case"%s":return String(V[B++]);case"%d":return Number(V[B++]);case"%j":try{return JSON.stringify(V[B++])}catch{return"[Circular]"}default:return be}}),ce=V[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),n(j)?B.showHidden=j:j&&_._extend(B,j),L(B.showHidden)&&(B.showHidden=!1),L(B.depth)&&(B.depth=2),L(B.colors)&&(B.colors=!1),L(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=h),s(B,I,B.depth)}_.inspect=y,y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(I,j){var B=y.styles[j];return B?"\x1B["+y.colors[B][0]+"m"+I+"\x1B["+y.colors[B][1]+"m":I}function l(I,j){return I}function d(I){var j={};return I.forEach(function(B,V){j[B]=!0}),j}function s(I,j,B){if(I.customInspect&&j&&P(j.inspect)&&j.inspect!==_.inspect&&!(j.constructor&&j.constructor.prototype===j)){var V=j.inspect(B,I);return C(V)||(V=s(I,V,B)),V}var te=v(I,j);if(te)return te;var ie=Object.keys(j),ce=d(ie);if(I.showHidden&&(ie=Object.getOwnPropertyNames(j)),R(j)&&(ie.indexOf("message")>=0||ie.indexOf("description")>=0))return c(j);if(ie.length===0){if(P(j)){var be=j.name?": "+j.name:"";return I.stylize("[Function"+be+"]","special")}if(F(j))return I.stylize(RegExp.prototype.toString.call(j),"regexp");if(D(j))return I.stylize(Date.prototype.toString.call(j),"date");if(R(j))return c(j)}var _e="",oe=!1,J=["{","}"];if(i(j)&&(oe=!0,J=["[","]"]),P(j)){var Q=j.name?": "+j.name:"";_e=" [Function"+Q+"]"}if(F(j)&&(_e=" "+RegExp.prototype.toString.call(j)),D(j)&&(_e=" "+Date.prototype.toUTCString.call(j)),R(j)&&(_e=" "+c(j)),ie.length===0&&(!oe||j.length==0))return J[0]+_e+J[1];if(B<0)return F(j)?I.stylize(RegExp.prototype.toString.call(j),"regexp"):I.stylize("[Object]","special");I.seen.push(j);var he;return oe?he=a(I,j,B,ce,ie):he=ie.map(function(ke){return r(I,j,B,ce,ke,oe)}),I.seen.pop(),t(he,_e,J)}function v(I,j){if(L(j))return I.stylize("undefined","undefined");if(C(j)){var B="'"+JSON.stringify(j).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return I.stylize(B,"string")}if(O(j))return I.stylize(""+j,"number");if(n(j))return I.stylize(""+j,"boolean");if(o(j))return I.stylize("null","null")}function c(I){return"["+Error.prototype.toString.call(I)+"]"}function a(I,j,B,V,te){for(var ie=[],ce=0,be=j.length;ce-1&&(ie?be=be.split(` `).map(function(oe){return" "+oe}).join(` `).substr(2):be=` `+be.split(` `).map(function(oe){return" "+oe}).join(` `))):be=I.stylize("[Circular]","special")),L(ce)){if(ie&&te.match(/^\d+$/))return be;ce=JSON.stringify(""+te),ce.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ce=ce.substr(1,ce.length-2),ce=I.stylize(ce,"name")):(ce=ce.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ce=I.stylize(ce,"string"))}return ce+": "+be}function t(I,j,B){var V=I.reduce(function(te,ie){return ie.indexOf(` `)>=0,te+ie.replace(/\u001b\[\d\d?m/g,"").length+1},0);return V>60?B[0]+(j===""?"":j+` `)+" "+I.join(`, `)+" "+B[1]:B[0]+j+" "+I.join(", ")+" "+B[1]}function i(I){return Array.isArray(I)}_.isArray=i;function n(I){return typeof I=="boolean"}_.isBoolean=n;function o(I){return I===null}_.isNull=o;function p(I){return I==null}_.isNullOrUndefined=p;function O(I){return typeof I=="number"}_.isNumber=O;function C(I){return typeof I=="string"}_.isString=C;function N(I){return g(I)==="symbol"}_.isSymbol=N;function L(I){return I===void 0}_.isUndefined=L;function F(I){return M(I)&&A(I)==="[object RegExp]"}_.isRegExp=F;function M(I){return g(I)==="object"&&I!==null}_.isObject=M;function D(I){return M(I)&&A(I)==="[object Date]"}_.isDate=D;function R(I){return M(I)&&(A(I)==="[object Error]"||I instanceof Error)}_.isError=R;function P(I){return typeof I=="function"}_.isFunction=P;function E(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||g(I)==="symbol"||typeof I>"u"}_.isPrimitive=E,_.isBuffer=e("./support/isBuffer");function A(I){return Object.prototype.toString.call(I)}function z(I){return I<10?"0"+I.toString(10):I.toString(10)}var W=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $(){var I=new Date,j=[z(I.getHours()),z(I.getMinutes()),z(I.getSeconds())].join(":");return[I.getDate(),W[I.getMonth()],j].join(" ")}_.log=function(){console.log("%s - %s",$(),_.format.apply(_,arguments))},_.inherits=e("inherits"),_._extend=function(I,j){if(!j||!M(j))return I;for(var B=Object.keys(j),V=B.length;V--;)I[B[V]]=j[B[V]];return I};function U(I,j){return Object.prototype.hasOwnProperty.call(I,j)}}).call(this,e("_process"),typeof Vt<"u"?Vt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":524,_process:467,inherits:523}],526:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),Object.defineProperty(_,"v1",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(_,"v3",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(_,"v4",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(_,"v5",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(_,"NIL",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(_,"version",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(_,"validate",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(_,"stringify",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(_,"parse",{enumerable:!0,get:function(){return l.default}});var u=d(e("./v1.js")),m=d(e("./v3.js")),g=d(e("./v4.js")),b=d(e("./v5.js")),w=d(e("./nil.js")),f=d(e("./version.js")),y=d(e("./validate.js")),h=d(e("./stringify.js")),l=d(e("./parse.js"));function d(s){return s&&s.__esModule?s:{default:s}}},{"./nil.js":528,"./parse.js":529,"./stringify.js":533,"./v1.js":534,"./v3.js":535,"./v4.js":537,"./v5.js":538,"./validate.js":539,"./version.js":540}],527:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;function u(a){if(typeof a=="string"){var r=unescape(encodeURIComponent(a));a=new Uint8Array(r.length);for(var t=0;t>5]>>>n%32&255,p=parseInt(i.charAt(o>>>4&15)+i.charAt(o&15),16);r.push(p)}return r}function g(a){return(a+64>>>9<<4)+14+1}function b(a,r){a[r>>5]|=128<>5]|=(a[i/8]&255)<>16)+(r>>16)+(t>>16);return i<<16|t&65535}function y(a,r){return a<>>32-r}function h(a,r,t,i,n,o){return f(y(f(f(r,a),f(i,o)),n),t)}function l(a,r,t,i,n,o,p){return h(r&t|~r&i,a,r,n,o,p)}function d(a,r,t,i,n,o,p){return h(r&i|t&~i,a,r,n,o,p)}function s(a,r,t,i,n,o,p){return h(r^t^i,a,r,n,o,p)}function v(a,r,t,i,n,o,p){return h(t^(r|~i),a,r,n,o,p)}var c=u;_.default=c},{}],528:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var u="00000000-0000-0000-0000-000000000000";_.default=u},{}],529:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var u=m(e("./validate.js"));function m(w){return w&&w.__esModule?w:{default:w}}function g(w){if(!(0,u.default)(w))throw TypeError("Invalid UUID");var f,y=new Uint8Array(16);return y[0]=(f=parseInt(w.slice(0,8),16))>>>24,y[1]=f>>>16&255,y[2]=f>>>8&255,y[3]=f&255,y[4]=(f=parseInt(w.slice(9,13),16))>>>8,y[5]=f&255,y[6]=(f=parseInt(w.slice(14,18),16))>>>8,y[7]=f&255,y[8]=(f=parseInt(w.slice(19,23),16))>>>8,y[9]=f&255,y[10]=(f=parseInt(w.slice(24,36),16))/1099511627776&255,y[11]=f/4294967296&255,y[12]=f>>>24&255,y[13]=f>>>16&255,y[14]=f>>>8&255,y[15]=f&255,y}var b=g;_.default=b},{"./validate.js":539}],530:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var u=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;_.default=u},{}],531:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=g;var u=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),m=new Uint8Array(16);function g(){if(!u)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(m)}},{}],532:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;function u(w,f,y,h){switch(w){case 0:return f&y^~f&h;case 1:return f^y^h;case 2:return f&y^f&h^y&h;case 3:return f^y^h}}function m(w,f){return w<>>32-f}function g(w){var f=[1518500249,1859775393,2400959708,3395469782],y=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof w=="string"){var h=unescape(encodeURIComponent(w));w=[];for(var l=0;l>>0;L=N,N=C,C=m(O,30)>>>0,O=p,p=D}y[0]=y[0]+p>>>0,y[1]=y[1]+O>>>0,y[2]=y[2]+C>>>0,y[3]=y[3]+N>>>0,y[4]=y[4]+L>>>0}return[y[0]>>24&255,y[0]>>16&255,y[0]>>8&255,y[0]&255,y[1]>>24&255,y[1]>>16&255,y[1]>>8&255,y[1]&255,y[2]>>24&255,y[2]>>16&255,y[2]>>8&255,y[2]&255,y[3]>>24&255,y[3]>>16&255,y[3]>>8&255,y[3]&255,y[4]>>24&255,y[4]>>16&255,y[4]>>8&255,y[4]&255]}var b=g;_.default=b},{}],533:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var u=m(e("./validate.js"));function m(y){return y&&y.__esModule?y:{default:y}}for(var g=[],b=0;b<256;++b)g.push((b+256).toString(16).substr(1));function w(y){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=(g[y[h+0]]+g[y[h+1]]+g[y[h+2]]+g[y[h+3]]+"-"+g[y[h+4]]+g[y[h+5]]+"-"+g[y[h+6]]+g[y[h+7]]+"-"+g[y[h+8]]+g[y[h+9]]+"-"+g[y[h+10]]+g[y[h+11]]+g[y[h+12]]+g[y[h+13]]+g[y[h+14]]+g[y[h+15]]).toLowerCase();if(!(0,u.default)(l))throw TypeError("Stringified UUID is invalid");return l}var f=w;_.default=f},{"./validate.js":539}],534:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var u=g(e("./rng.js")),m=g(e("./stringify.js"));function g(d){return d&&d.__esModule?d:{default:d}}var b,w,f=0,y=0;function h(d,s,v){var c=s&&v||0,a=s||new Array(16);d=d||{};var r=d.node||b,t=d.clockseq!==void 0?d.clockseq:w;if(r==null||t==null){var i=d.random||(d.rng||u.default)();r==null&&(r=b=[i[0]|1,i[1],i[2],i[3],i[4],i[5]]),t==null&&(t=w=(i[6]<<8|i[7])&16383)}var n=d.msecs!==void 0?d.msecs:Date.now(),o=d.nsecs!==void 0?d.nsecs:y+1,p=n-f+(o-y)/1e4;if(p<0&&d.clockseq===void 0&&(t=t+1&16383),(p<0||n>f)&&d.nsecs===void 0&&(o=0),o>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=n,y=o,w=t,n+=122192928e5;var O=((n&268435455)*1e4+o)%4294967296;a[c++]=O>>>24&255,a[c++]=O>>>16&255,a[c++]=O>>>8&255,a[c++]=O&255;var C=n/4294967296*1e4&268435455;a[c++]=C>>>8&255,a[c++]=C&255,a[c++]=C>>>24&15|16,a[c++]=C>>>16&255,a[c++]=t>>>8|128,a[c++]=t&255;for(var N=0;N<6;++N)a[c+N]=r[N];return s||(0,m.default)(a)}var l=h;_.default=l},{"./rng.js":531,"./stringify.js":533}],535:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var u=g(e("./v35.js")),m=g(e("./md5.js"));function g(f){return f&&f.__esModule?f:{default:f}}var b=(0,u.default)("v3",48,m.default),w=b;_.default=w},{"./md5.js":527,"./v35.js":536}],536:[function(e,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=y,_.URL=_.DNS=void 0;var u=g(e("./stringify.js")),m=g(e("./parse.js"));function g(h){return h&&h.__esModule?h:{default:h}}function b(h){h=unescape(encodeURIComponent(h));for(var l=[],d=0;d=b&&l<=55295||l===m||l===g||l===u||l>=57344&&l<=65533||l>=65536&&l<=1114111}_.isChar=w;function f(l){return l===b||l===m||l===g||l===u}_.isS=f;function y(l){return l>=65&&l<=90||l>=97&&l<=122||l===58||l===95||l===8204||l===8205||l>=192&&l<=214||l>=216&&l<=246||l>=248&&l<=767||l>=880&&l<=893||l>=895&&l<=8191||l>=8304&&l<=8591||l>=11264&&l<=12271||l>=12289&&l<=55295||l>=63744&&l<=64975||l>=65008&&l<=65533||l>=65536&&l<=983039}_.isNameStartChar=y;function h(l){return y(l)||l>=48&&l<=57||l===45||l===46||l===183||l>=768&&l<=879||l>=8255&&l<=8256}_.isNameChar=h},{}],542:[function(e,x,_){/** * Character classes and associated utilities for the 2nd edition of XML 1.1. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */Object.defineProperty(_,"__esModule",{value:!0}),_.CHAR="-퟿-�𐀀-􏿿",_.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",_.S=` \r `,_.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",_.NAME_CHAR="-"+_.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",_.CHAR_RE=new RegExp("^["+_.CHAR+"]$","u"),_.RESTRICTED_CHAR_RE=new RegExp("^["+_.RESTRICTED_CHAR+"]$","u"),_.S_RE=new RegExp("^["+_.S+"]+$","u"),_.NAME_START_CHAR_RE=new RegExp("^["+_.NAME_START_CHAR+"]$","u"),_.NAME_CHAR_RE=new RegExp("^["+_.NAME_CHAR+"]$","u"),_.NAME_RE=new RegExp("^["+_.NAME_START_CHAR+"]["+_.NAME_CHAR+"]*$","u"),_.NMTOKEN_RE=new RegExp("^["+_.NAME_CHAR+"]+$","u");var u=9,m=10,g=13,b=32;_.S_LIST=[b,m,g,u];function w(s){return s>=1&&s<=55295||s>=57344&&s<=65533||s>=65536&&s<=1114111}_.isChar=w;function f(s){return s>=1&&s<=8||s===11||s===12||s>=14&&s<=31||s>=127&&s<=132||s>=134&&s<=159}_.isRestrictedChar=f;function y(s){return s===9||s===10||s===13||s>31&&s<127||s===133||s>159&&s<=55295||s>=57344&&s<=65533||s>=65536&&s<=1114111}_.isCharAndNotRestricted=y;function h(s){return s===b||s===m||s===g||s===u}_.isS=h;function l(s){return s>=65&&s<=90||s>=97&&s<=122||s===58||s===95||s===8204||s===8205||s>=192&&s<=214||s>=216&&s<=246||s>=248&&s<=767||s>=880&&s<=893||s>=895&&s<=8191||s>=8304&&s<=8591||s>=11264&&s<=12271||s>=12289&&s<=55295||s>=63744&&s<=64975||s>=65008&&s<=65533||s>=65536&&s<=983039}_.isNameStartChar=l;function d(s){return l(s)||s>=48&&s<=57||s===45||s===46||s===183||s>=768&&s<=879||s>=8255&&s<=8256}_.isNameChar=d},{}],543:[function(e,x,_){/** * Character class utilities for XML NS 1.0 edition 3. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */Object.defineProperty(_,"__esModule",{value:!0}),_.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",_.NC_NAME_CHAR="-"+_.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",_.NC_NAME_START_CHAR_RE=new RegExp("^["+_.NC_NAME_START_CHAR+"]$","u"),_.NC_NAME_CHAR_RE=new RegExp("^["+_.NC_NAME_CHAR+"]$","u"),_.NC_NAME_RE=new RegExp("^["+_.NC_NAME_START_CHAR+"]["+_.NC_NAME_CHAR+"]*$","u");function u(g){return g>=65&&g<=90||g===95||g>=97&&g<=122||g>=192&&g<=214||g>=216&&g<=246||g>=248&&g<=767||g>=880&&g<=893||g>=895&&g<=8191||g>=8204&&g<=8205||g>=8304&&g<=8591||g>=11264&&g<=12271||g>=12289&&g<=55295||g>=63744&&g<=64975||g>=65008&&g<=65533||g>=65536&&g<=983039}_.isNCNameStartChar=u;function m(g){return u(g)||g===45||g===46||g>=48&&g<=57||g===183||g>=768&&g<=879||g>=8255&&g<=8256}_.isNCNameChar=m},{}]},{},[15])(15)})})(kg);function Qo(X){return Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},Qo(X)}var Og=/^\s+/,Eg=/\s+$/;function Rt(X,k){if(X=X||"",k=k||{},X instanceof Rt)return X;if(!(this instanceof Rt))return new Rt(X,k);var e=Tg(X);this._originalInput=X,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=k.format||e.format,this._gradientType=k.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=e.ok}Rt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var k=this.toRgb();return(k.r*299+k.g*587+k.b*114)/1e3},getLuminance:function(){var k=this.toRgb(),e,x,_,u,m,g;return e=k.r/255,x=k.g/255,_=k.b/255,e<=.03928?u=e/12.92:u=Math.pow((e+.055)/1.055,2.4),x<=.03928?m=x/12.92:m=Math.pow((x+.055)/1.055,2.4),_<=.03928?g=_/12.92:g=Math.pow((_+.055)/1.055,2.4),.2126*u+.7152*m+.0722*g},setAlpha:function(k){return this._a=xc(k),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var k=Jl(this._r,this._g,this._b);return{h:k.h*360,s:k.s,v:k.v,a:this._a}},toHsvString:function(){var k=Jl(this._r,this._g,this._b),e=Math.round(k.h*360),x=Math.round(k.s*100),_=Math.round(k.v*100);return this._a==1?"hsv("+e+", "+x+"%, "+_+"%)":"hsva("+e+", "+x+"%, "+_+"%, "+this._roundA+")"},toHsl:function(){var k=Yl(this._r,this._g,this._b);return{h:k.h*360,s:k.s,l:k.l,a:this._a}},toHslString:function(){var k=Yl(this._r,this._g,this._b),e=Math.round(k.h*360),x=Math.round(k.s*100),_=Math.round(k.l*100);return this._a==1?"hsl("+e+", "+x+"%, "+_+"%)":"hsla("+e+", "+x+"%, "+_+"%, "+this._roundA+")"},toHex:function(k){return Ql(this._r,this._g,this._b,k)},toHexString:function(k){return"#"+this.toHex(k)},toHex8:function(k){return Ag(this._r,this._g,this._b,this._a,k)},toHex8String:function(k){return"#"+this.toHex8(k)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(yr(this._r,255)*100)+"%",g:Math.round(yr(this._g,255)*100)+"%",b:Math.round(yr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(yr(this._r,255)*100)+"%, "+Math.round(yr(this._g,255)*100)+"%, "+Math.round(yr(this._b,255)*100)+"%)":"rgba("+Math.round(yr(this._r,255)*100)+"%, "+Math.round(yr(this._g,255)*100)+"%, "+Math.round(yr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Ug[Ql(this._r,this._g,this._b,!0)]||!1},toFilter:function(k){var e="#"+ql(this._r,this._g,this._b,this._a),x=e,_=this._gradientType?"GradientType = 1, ":"";if(k){var u=Rt(k);x="#"+ql(u._r,u._g,u._b,u._a)}return"progid:DXImageTransform.Microsoft.gradient("+_+"startColorstr="+e+",endColorstr="+x+")"},toString:function(k){var e=!!k;k=k||this._format;var x=!1,_=this._a<1&&this._a>=0,u=!e&&_&&(k==="hex"||k==="hex6"||k==="hex3"||k==="hex4"||k==="hex8"||k==="name");return u?k==="name"&&this._a===0?this.toName():this.toRgbString():(k==="rgb"&&(x=this.toRgbString()),k==="prgb"&&(x=this.toPercentageRgbString()),(k==="hex"||k==="hex6")&&(x=this.toHexString()),k==="hex3"&&(x=this.toHexString(!0)),k==="hex4"&&(x=this.toHex8String(!0)),k==="hex8"&&(x=this.toHex8String()),k==="name"&&(x=this.toName()),k==="hsl"&&(x=this.toHslString()),k==="hsv"&&(x=this.toHsvString()),x||this.toHexString())},clone:function(){return Rt(this.toString())},_applyModification:function(k,e){var x=k.apply(null,[this].concat([].slice.call(e)));return this._r=x._r,this._g=x._g,this._b=x._b,this.setAlpha(x._a),this},lighten:function(){return this._applyModification(Ng,arguments)},brighten:function(){return this._applyModification(Fg,arguments)},darken:function(){return this._applyModification(Bg,arguments)},desaturate:function(){return this._applyModification(Mg,arguments)},saturate:function(){return this._applyModification(Ig,arguments)},greyscale:function(){return this._applyModification(Dg,arguments)},spin:function(){return this._applyModification(jg,arguments)},_applyCombination:function(k,e){return k.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(Xg,arguments)},complement:function(){return this._applyCombination(Lg,arguments)},monochromatic:function(){return this._applyCombination(Hg,arguments)},splitcomplement:function(){return this._applyCombination(zg,arguments)},triad:function(){return this._applyCombination(ec,[3])},tetrad:function(){return this._applyCombination(ec,[4])}};Rt.fromRatio=function(X,k){if(Qo(X)=="object"){var e={};for(var x in X)X.hasOwnProperty(x)&&(x==="a"?e[x]=X[x]:e[x]=$a(X[x]));X=e}return Rt(X,k)};function Tg(X){var k={r:0,g:0,b:0},e=1,x=null,_=null,u=null,m=!1,g=!1;return typeof X=="string"&&(X=Kg(X)),Qo(X)=="object"&&(ci(X.r)&&ci(X.g)&&ci(X.b)?(k=Rg(X.r,X.g,X.b),m=!0,g=String(X.r).substr(-1)==="%"?"prgb":"rgb"):ci(X.h)&&ci(X.s)&&ci(X.v)?(x=$a(X.s),_=$a(X.v),k=Pg(X.h,x,_),m=!0,g="hsv"):ci(X.h)&&ci(X.s)&&ci(X.l)&&(x=$a(X.s),u=$a(X.l),k=Cg(X.h,x,u),m=!0,g="hsl"),X.hasOwnProperty("a")&&(e=X.a)),e=xc(e),{ok:m,format:X.format||g,r:Math.min(255,Math.max(k.r,0)),g:Math.min(255,Math.max(k.g,0)),b:Math.min(255,Math.max(k.b,0)),a:e}}function Rg(X,k,e){return{r:yr(X,255)*255,g:yr(k,255)*255,b:yr(e,255)*255}}function Yl(X,k,e){X=yr(X,255),k=yr(k,255),e=yr(e,255);var x=Math.max(X,k,e),_=Math.min(X,k,e),u,m,g=(x+_)/2;if(x==_)u=m=0;else{var b=x-_;switch(m=g>.5?b/(2-x-_):b/(x+_),x){case X:u=(k-e)/b+(k1&&(y-=1),y<1/6?w+(f-w)*6*y:y<1/2?f:y<2/3?w+(f-w)*(2/3-y)*6:w}if(k===0)x=_=u=e;else{var g=e<.5?e*(1+k):e+k-e*k,b=2*e-g;x=m(b,g,X+1/3),_=m(b,g,X),u=m(b,g,X-1/3)}return{r:x*255,g:_*255,b:u*255}}function Jl(X,k,e){X=yr(X,255),k=yr(k,255),e=yr(e,255);var x=Math.max(X,k,e),_=Math.min(X,k,e),u,m,g=x,b=x-_;if(m=x===0?0:b/x,x==_)u=0;else{switch(x){case X:u=(k-e)/b+(k>1)+720)%360;--k;)x.h=(x.h+_)%360,u.push(Rt(x));return u}function Hg(X,k){k=k||6;for(var e=Rt(X).toHsv(),x=e.h,_=e.s,u=e.v,m=[],g=1/k;k--;)m.push(Rt({h:x,s:_,v:u})),u=(u+g)%1;return m}Rt.mix=function(X,k,e){e=e===0?0:e||50;var x=Rt(X).toRgb(),_=Rt(k).toRgb(),u=e/100,m={r:(_.r-x.r)*u+x.r,g:(_.g-x.g)*u+x.g,b:(_.b-x.b)*u+x.b,a:(_.a-x.a)*u+x.a};return Rt(m)};Rt.readability=function(X,k){var e=Rt(X),x=Rt(k);return(Math.max(e.getLuminance(),x.getLuminance())+.05)/(Math.min(e.getLuminance(),x.getLuminance())+.05)};Rt.isReadable=function(X,k,e){var x=Rt.readability(X,k),_,u;switch(u=!1,_=Gg(e),_.level+_.size){case"AAsmall":case"AAAlarge":u=x>=4.5;break;case"AAlarge":u=x>=3;break;case"AAAsmall":u=x>=7;break}return u};Rt.mostReadable=function(X,k,e){var x=null,_=0,u,m,g,b;e=e||{},m=e.includeFallbackColors,g=e.level,b=e.size;for(var w=0;w_&&(_=u,x=Rt(k[w]));return Rt.isReadable(X,x,{level:g,size:b})||!m?x:(e.includeFallbackColors=!1,Rt.mostReadable(X,["#fff","#000"],e))};var bf=Rt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ug=Rt.hexNames=Wg(bf);function Wg(X){var k={};for(var e in X)X.hasOwnProperty(e)&&(k[X[e]]=e);return k}function xc(X){return X=parseFloat(X),(isNaN(X)||X<0||X>1)&&(X=1),X}function yr(X,k){$g(X)&&(X="100%");var e=Vg(X);return X=Math.min(k,Math.max(0,parseFloat(X))),e&&(X=parseInt(X*k,10)/100),Math.abs(X-k)<1e-6?1:X%k/parseFloat(k)}function es(X){return Math.min(1,Math.max(0,X))}function wn(X){return parseInt(X,16)}function $g(X){return typeof X=="string"&&X.indexOf(".")!=-1&&parseFloat(X)===1}function Vg(X){return typeof X=="string"&&X.indexOf("%")!=-1}function $n(X){return X.length==1?"0"+X:""+X}function $a(X){return X<=1&&(X=X*100+"%"),X}function Sc(X){return Math.round(parseFloat(X)*255).toString(16)}function tc(X){return wn(X)/255}var Wn=function(){var X="[-\\+]?\\d+%?",k="[-\\+]?\\d*\\.\\d+%?",e="(?:"+k+")|(?:"+X+")",x="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",_="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+x),rgba:new RegExp("rgba"+_),hsl:new RegExp("hsl"+x),hsla:new RegExp("hsla"+_),hsv:new RegExp("hsv"+x),hsva:new RegExp("hsva"+_),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ci(X){return!!Wn.CSS_UNIT.exec(X)}function Kg(X){X=X.replace(Og,"").replace(Eg,"").toLowerCase();var k=!1;if(bf[X])X=bf[X],k=!0;else if(X=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e;return(e=Wn.rgb.exec(X))?{r:e[1],g:e[2],b:e[3]}:(e=Wn.rgba.exec(X))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=Wn.hsl.exec(X))?{h:e[1],s:e[2],l:e[3]}:(e=Wn.hsla.exec(X))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=Wn.hsv.exec(X))?{h:e[1],s:e[2],v:e[3]}:(e=Wn.hsva.exec(X))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=Wn.hex8.exec(X))?{r:wn(e[1]),g:wn(e[2]),b:wn(e[3]),a:tc(e[4]),format:k?"name":"hex8"}:(e=Wn.hex6.exec(X))?{r:wn(e[1]),g:wn(e[2]),b:wn(e[3]),format:k?"name":"hex"}:(e=Wn.hex4.exec(X))?{r:wn(e[1]+""+e[1]),g:wn(e[2]+""+e[2]),b:wn(e[3]+""+e[3]),a:tc(e[4]+""+e[4]),format:k?"name":"hex8"}:(e=Wn.hex3.exec(X))?{r:wn(e[1]+""+e[1]),g:wn(e[2]+""+e[2]),b:wn(e[3]+""+e[3]),format:k?"name":"hex"}:!1}function Gg(X){var k,e;return X=X||{level:"AA",size:"small"},k=(X.level||"AA").toUpperCase(),e=(X.size||"small").toLowerCase(),k!=="AA"&&k!=="AAA"&&(k="AA"),e!=="small"&&e!=="large"&&(e="small"),{level:k,size:e}}var ga={},Zg={get exports(){return ga},set exports(X){ga=X}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(X,k){(function(){var e,x="4.17.21",_=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",g="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",w=500,f="__lodash_placeholder__",y=1,h=2,l=4,d=1,s=2,v=1,c=2,a=4,r=8,t=16,i=32,n=64,o=128,p=256,O=512,C=30,N="...",L=800,F=16,M=1,D=2,R=3,P=1/0,E=9007199254740991,A=17976931348623157e292,z=0/0,W=4294967295,$=W-1,U=W>>>1,I=[["ary",o],["bind",v],["bindKey",c],["curry",r],["curryRight",t],["flip",O],["partial",i],["partialRight",n],["rearg",p]],j="[object Arguments]",B="[object Array]",V="[object AsyncFunction]",te="[object Boolean]",ie="[object Date]",ce="[object DOMException]",be="[object Error]",_e="[object Function]",oe="[object GeneratorFunction]",J="[object Map]",Q="[object Number]",he="[object Null]",ke="[object Object]",re="[object Promise]",se="[object Proxy]",Ce="[object RegExp]",q="[object Set]",G="[object String]",Z="[object Symbol]",fe="[object Undefined]",we="[object WeakMap]",ge="[object WeakSet]",je="[object ArrayBuffer]",Ze="[object DataView]",nt="[object Float32Array]",ut="[object Float64Array]",ot="[object Int8Array]",Ue="[object Int16Array]",Ve="[object Int32Array]",Qe="[object Uint8Array]",tt="[object Uint8ClampedArray]",ae="[object Uint16Array]",Re="[object Uint32Array]",me=/\b__p \+= '';/g,Ee=/\b(__p \+=) '' \+/g,pe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Pe=/&(?:amp|lt|gt|quot|#39);/g,ee=/[&<>"']/g,Xe=RegExp(Pe.source),it=RegExp(ee.source),K=/<%-([\s\S]+?)%>/g,Me=/<%([\s\S]+?)%>/g,Le=/<%=([\s\S]+?)%>/g,ue=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Se=/^\w*$/,Ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,st=/[\\^$.*+?()[\]{}|]/g,Ge=RegExp(st.source),rt=/^\s+/,_t=/\s/,wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ot=/\{\n\/\* \[wrapped with (.+)\] \*/,pt=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,At=/[()=,{}\[\]\/\s]/,Pt=/\\(\\)?/g,bt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Kt=/\w*$/,Ct=/^[-+]0x[0-9a-f]+$/i,xt=/^0b[01]+$/i,Ft=/^\[object .+?Constructor\]$/,Lt=/^0o[0-7]+$/i,Et=/^(?:0|[1-9]\d*)$/,Dr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Or=/($^)/,Gr=/['\n\r\u2028\u2029\\]/g,Nr="\\ud800-\\udfff",Zr="\\u0300-\\u036f",Qt="\\ufe20-\\ufe2f",Hr="\\u20d0-\\u20ff",Fr=Zr+Qt+Hr,Lr="\\u2700-\\u27bf",Ur="a-z\\xdf-\\xf6\\xf8-\\xff",vt="\\xac\\xb1\\xd7\\xf7",Ke="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ve="\\u2000-\\u206f",Fe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Be="A-Z\\xc0-\\xd6\\xd8-\\xde",dt="\\ufe0e\\ufe0f",St=vt+Ke+ve+Fe,Xt="['’]",lr="["+Nr+"]",gr="["+St+"]",rn="["+Fr+"]",zr="\\d+",pi="["+Lr+"]",Wr="["+Ur+"]",Dn="[^"+Nr+St+zr+Lr+Ur+Be+"]",cn="\\ud83c[\\udffb-\\udfff]",yi="(?:"+rn+"|"+cn+")",hn="[^"+Nr+"]",dn="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",Fn="["+Be+"]",Hi="\\u200d",Ui="(?:"+Wr+"|"+Dn+")",Wi="(?:"+Fn+"|"+Dn+")",ei="(?:"+Xt+"(?:d|ll|m|re|s|t|ve))?",Bn="(?:"+Xt+"(?:D|LL|M|RE|S|T|VE))?",$i=yi+"?",Vi="["+dt+"]?",xn="(?:"+Hi+"(?:"+[hn,dn,Nn].join("|")+")"+Vi+$i+")*",wa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ki="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Gi=Vi+$i+xn,xa="(?:"+[pi,dn,Nn].join("|")+")"+Gi,Sa="(?:"+[hn+rn+"?",rn,dn,Nn,lr].join("|")+")",Sn=RegExp(Xt,"g"),Zi=RegExp(rn,"g"),Ri=RegExp(cn+"(?="+cn+")|"+Sa+Gi,"g"),jn=RegExp([Fn+"?"+Wr+"+"+ei+"(?="+[gr,Fn,"$"].join("|")+")",Wi+"+"+Bn+"(?="+[gr,Fn+Ui,"$"].join("|")+")",Fn+"?"+Ui+"+"+ei,Fn+"+"+Bn,Ki,wa,zr,xa].join("|"),"g"),ka=RegExp("["+Hi+Nr+Fr+dt+"]"),kn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,On=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Yi=-1,rr={};rr[nt]=rr[ut]=rr[ot]=rr[Ue]=rr[Ve]=rr[Qe]=rr[tt]=rr[ae]=rr[Re]=!0,rr[j]=rr[B]=rr[je]=rr[te]=rr[Ze]=rr[ie]=rr[be]=rr[_e]=rr[J]=rr[Q]=rr[ke]=rr[Ce]=rr[q]=rr[G]=rr[we]=!1;var er={};er[j]=er[B]=er[je]=er[Ze]=er[te]=er[ie]=er[nt]=er[ut]=er[ot]=er[Ue]=er[Ve]=er[J]=er[Q]=er[ke]=er[Ce]=er[q]=er[G]=er[Z]=er[Qe]=er[tt]=er[ae]=er[Re]=!0,er[be]=er[_e]=er[we]=!1;var ti={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ji={"&":"&","<":"<",">":">",'"':""","'":"'"},Oa={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qi={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qi=parseFloat,xe=parseInt,De=typeof Vt=="object"&&Vt&&Vt.Object===Object&&Vt,Je=typeof self=="object"&&self&&self.Object===Object&&self,ht=De||Je||Function("return this")(),Zt=k&&!k.nodeType&&k,Mt=Zt&&!0&&X&&!X.nodeType&&X,fr=Mt&&Mt.exports===Zt,nr=fr&&De.process,tr=function(){try{var Ne=Mt&&Mt.require&&Mt.require("util").types;return Ne||nr&&nr.binding&&nr.binding("util")}catch{}}(),ur=tr&&tr.isArrayBuffer,Pr=tr&&tr.isDate,Br=tr&&tr.isMap,dr=tr&&tr.isRegExp,Er=tr&&tr.isSet,Ar=tr&&tr.isTypedArray;function pr(Ne,Ye,$e){switch($e.length){case 0:return Ne.call(Ye);case 1:return Ne.call(Ye,$e[0]);case 2:return Ne.call(Ye,$e[0],$e[1]);case 3:return Ne.call(Ye,$e[0],$e[1],$e[2])}return Ne.apply(Ye,$e)}function pn(Ne,Ye,$e,gt){for(var Bt=-1,ar=Ne==null?0:Ne.length;++Bt-1}function le(Ne,Ye,$e){for(var gt=-1,Bt=Ne==null?0:Ne.length;++gt-1;);return $e}function Af(Ne,Ye){for(var $e=Ne.length;$e--&&wr(Ye,Ne[$e],0)>-1;);return $e}function Tc(Ne,Ye){for(var $e=Ne.length,gt=0;$e--;)Ne[$e]===Ye&&++gt;return gt}var Rc=yn(ti),Cc=yn(Ji);function Pc(Ne){return"\\"+Qi[Ne]}function Ac(Ne,Ye){return Ne==null?e:Ne[Ye]}function ra(Ne){return ka.test(Ne)}function Mc(Ne){return kn.test(Ne)}function Ic(Ne){for(var Ye,$e=[];!(Ye=Ne.next()).done;)$e.push(Ye.value);return $e}function rs(Ne){var Ye=-1,$e=Array(Ne.size);return Ne.forEach(function(gt,Bt){$e[++Ye]=[Bt,gt]}),$e}function Mf(Ne,Ye){return function($e){return Ne(Ye($e))}}function bi(Ne,Ye){for(var $e=-1,gt=Ne.length,Bt=0,ar=[];++$e-1}function _h(S,T){var H=this.__data__,Y=co(H,S);return Y<0?(++this.size,H.push([S,T])):H[Y][1]=T,this}ri.prototype.clear=vh,ri.prototype.delete=mh,ri.prototype.get=bh,ri.prototype.has=gh,ri.prototype.set=_h;function ni(S){var T=-1,H=S==null?0:S.length;for(this.clear();++T=T?S:T)),S}function Pn(S,T,H,Y,ne,ye){var Te,Ae=T&y,ze=T&h,qe=T&l;if(H&&(Te=ne?H(S,Y,ne,ye):H(S)),Te!==e)return Te;if(!vr(S))return S;var et=jt(S);if(et){if(Te=kd(S),!Ae)return nn(S,Te)}else{var at=Vr(S),yt=at==_e||at==oe;if(ki(S))return pu(S,Ae);if(at==ke||at==j||yt&&!ne){if(Te=ze||yt?{}:Iu(S),!Ae)return ze?dd(S,Fh(Te,S)):hd(S,Wf(Te,S))}else{if(!er[at])return ne?S:{};Te=Od(S,at,Ae)}}ye||(ye=new zn);var kt=ye.get(S);if(kt)return kt;ye.set(S,Te),fl(S)?S.forEach(function(Nt){Te.add(Pn(Nt,T,H,Nt,S,ye))}):ol(S)&&S.forEach(function(Nt,Gt){Te.set(Gt,Pn(Nt,T,H,Gt,S,ye))});var Dt=qe?ze?Rs:Ts:ze?on:jr,Wt=et?e:Dt(S);return mr(Wt||S,function(Nt,Gt){Wt&&(Gt=Nt,Nt=S[Gt]),Ma(Te,Gt,Pn(Nt,T,H,Gt,S,ye))}),Te}function Bh(S){var T=jr(S);return function(H){return $f(H,S,T)}}function $f(S,T,H){var Y=H.length;if(S==null)return!Y;for(S=cr(S);Y--;){var ne=H[Y],ye=T[ne],Te=S[ne];if(Te===e&&!(ne in S)||!ye(Te))return!1}return!0}function Vf(S,T,H){if(typeof S!="function")throw new Rn(m);return La(function(){S.apply(e,H)},T)}function Ia(S,T,H,Y){var ne=-1,ye=ta,Te=!0,Ae=S.length,ze=[],qe=T.length;if(!Ae)return ze;H&&(T=Oe(T,vn(H))),Y?(ye=le,Te=!1):T.length>=_&&(ye=Ea,Te=!1,T=new Ai(T));e:for(;++nene?0:ne+H),Y=Y===e||Y>ne?ne:Ut(Y),Y<0&&(Y+=ne),Y=H>Y?0:ll(Y);H0&&H(Ae)?T>1?Xr(Ae,T-1,H,Y,ne):He(ne,Ae):Y||(ne[ne.length]=Ae)}return ne}var us=_u(),Zf=_u(!0);function Kn(S,T){return S&&us(S,T,jr)}function ls(S,T){return S&&Zf(S,T,jr)}function po(S,T){return Yr(T,function(H){return fi(S[H])})}function Ii(S,T){T=xi(T,S);for(var H=0,Y=T.length;S!=null&&HT}function zh(S,T){return S!=null&&sr.call(S,T)}function Xh(S,T){return S!=null&&T in cr(S)}function Hh(S,T,H){return S>=$r(T,H)&&S=120&&et.length>=120)?new Ai(Te&&et):e}et=S[0];var at=-1,yt=Ae[0];e:for(;++at-1;)Ae!==S&&io.call(Ae,ze,1),io.call(S,ze,1);return S}function ou(S,T){for(var H=S?T.length:0,Y=H-1;H--;){var ne=T[H];if(H==Y||ne!==ye){var ye=ne;si(ne)?io.call(S,ne,1):_s(S,ne)}}return S}function ms(S,T){return S+so(zf()*(T-S+1))}function td(S,T,H,Y){for(var ne=-1,ye=Ir(oo((T-S)/(H||1)),0),Te=$e(ye);ye--;)Te[Y?ye:++ne]=S,S+=H;return Te}function bs(S,T){var H="";if(!S||T<1||T>E)return H;do T%2&&(H+=S),T=so(T/2),T&&(S+=S);while(T);return H}function $t(S,T){return Ns(Fu(S,T,sn),S+"")}function rd(S){return Uf(da(S))}function nd(S,T){var H=da(S);return Oo(H,Mi(T,0,H.length))}function Fa(S,T,H,Y){if(!vr(S))return S;T=xi(T,S);for(var ne=-1,ye=T.length,Te=ye-1,Ae=S;Ae!=null&&++nene?0:ne+T),H=H>ne?ne:H,H<0&&(H+=ne),ne=T>H?0:H-T>>>0,T>>>=0;for(var ye=$e(ne);++Y>>1,Te=S[ye];Te!==null&&!bn(Te)&&(H?Te<=T:Te=_){var qe=T?null:md(S);if(qe)return Ya(qe);Te=!1,ne=Ea,ze=new Ai}else ze=T?[]:Ae;e:for(;++Y=Y?S:An(S,T,H)}var du=Gc||function(S){return ht.clearTimeout(S)};function pu(S,T){if(T)return S.slice();var H=S.length,Y=Nf?Nf(H):new S.constructor(H);return S.copy(Y),Y}function ks(S){var T=new S.constructor(S.byteLength);return new ro(T).set(new ro(S)),T}function fd(S,T){var H=T?ks(S.buffer):S.buffer;return new S.constructor(H,S.byteOffset,S.byteLength)}function ud(S){var T=new S.constructor(S.source,Kt.exec(S));return T.lastIndex=S.lastIndex,T}function ld(S){return Aa?cr(Aa.call(S)):{}}function yu(S,T){var H=T?ks(S.buffer):S.buffer;return new S.constructor(H,S.byteOffset,S.length)}function vu(S,T){if(S!==T){var H=S!==e,Y=S===null,ne=S===S,ye=bn(S),Te=T!==e,Ae=T===null,ze=T===T,qe=bn(T);if(!Ae&&!qe&&!ye&&S>T||ye&&Te&&ze&&!Ae&&!qe||Y&&Te&&ze||!H&&ze||!ne)return 1;if(!Y&&!ye&&!qe&&S=Ae)return ze;var qe=H[Y];return ze*(qe=="desc"?-1:1)}}return S.index-T.index}function mu(S,T,H,Y){for(var ne=-1,ye=S.length,Te=H.length,Ae=-1,ze=T.length,qe=Ir(ye-Te,0),et=$e(ze+qe),at=!Y;++Ae1?H[ne-1]:e,Te=ne>2?H[2]:e;for(ye=S.length>3&&typeof ye=="function"?(ne--,ye):e,Te&&en(H[0],H[1],Te)&&(ye=ne<3?e:ye,ne=1),T=cr(T);++Y-1?ne[ye?T[Te]:Te]:e}}function Su(S){return oi(function(T){var H=T.length,Y=H,ne=Cn.prototype.thru;for(S&&T.reverse();Y--;){var ye=T[Y];if(typeof ye!="function")throw new Rn(m);if(ne&&!Te&&So(ye)=="wrapper")var Te=new Cn([],!0)}for(Y=Te?Y:H;++Y1&&qt.reverse(),et&&zeAe))return!1;var qe=ye.get(S),et=ye.get(T);if(qe&&et)return qe==T&&et==S;var at=-1,yt=!0,kt=H&s?new Ai:e;for(ye.set(S,T),ye.set(T,S);++at1?"& ":"")+T[Y],T=T.join(H>2?", ":" "),S.replace(wt,`{ /* [wrapped with `+T+`] */ `)}function Td(S){return jt(S)||Fi(S)||!!(jf&&S&&S[jf])}function si(S,T){var H=typeof S;return T=T??E,!!T&&(H=="number"||H!="symbol"&&Et.test(S))&&S>-1&&S%1==0&&S0){if(++T>=L)return arguments[0]}else T=0;return S.apply(e,arguments)}}function Oo(S,T){var H=-1,Y=S.length,ne=Y-1;for(T=T===e?Y:T;++H1?S[T-1]:e;return H=typeof H=="function"?(S.pop(),H):e,Gu(S,H)});function Zu(S){var T=de(S);return T.__chain__=!0,T}function jp(S,T){return T(S),S}function Eo(S,T){return T(S)}var Lp=oi(function(S){var T=S.length,H=T?S[0]:0,Y=this.__wrapped__,ne=function(ye){return fs(ye,S)};return T>1||this.__actions__.length||!(Y instanceof Yt)||!si(H)?this.thru(ne):(Y=Y.slice(H,+H+(T?1:0)),Y.__actions__.push({func:Eo,args:[ne],thisArg:e}),new Cn(Y,this.__chain__).thru(function(ye){return T&&!ye.length&&ye.push(e),ye}))});function zp(){return Zu(this)}function Xp(){return new Cn(this.value(),this.__chain__)}function Hp(){this.__values__===e&&(this.__values__=ul(this.value()));var S=this.__index__>=this.__values__.length,T=S?e:this.__values__[this.__index__++];return{done:S,value:T}}function Up(){return this}function Wp(S){for(var T,H=this;H instanceof lo;){var Y=Hu(H);Y.__index__=0,Y.__values__=e,T?ne.__wrapped__=Y:T=Y;var ne=Y;H=H.__wrapped__}return ne.__wrapped__=S,T}function $p(){var S=this.__wrapped__;if(S instanceof Yt){var T=S;return this.__actions__.length&&(T=new Yt(this)),T=T.reverse(),T.__actions__.push({func:Eo,args:[Fs],thisArg:e}),new Cn(T,this.__chain__)}return this.thru(Fs)}function Vp(){return cu(this.__wrapped__,this.__actions__)}var Kp=bo(function(S,T,H){sr.call(S,H)?++S[H]:ii(S,H,1)});function Gp(S,T,H){var Y=jt(S)?En:jh;return H&&en(S,T,H)&&(T=e),Y(S,It(T,3))}function Zp(S,T){var H=jt(S)?Yr:Gf;return H(S,It(T,3))}var Yp=xu(Uu),Jp=xu(Wu);function Qp(S,T){return Xr(To(S,T),1)}function qp(S,T){return Xr(To(S,T),P)}function e0(S,T,H){return H=H===e?1:Ut(H),Xr(To(S,T),H)}function Yu(S,T){var H=jt(S)?mr:_i;return H(S,It(T,3))}function Ju(S,T){var H=jt(S)?ea:Kf;return H(S,It(T,3))}var t0=bo(function(S,T,H){sr.call(S,H)?S[H].push(T):ii(S,H,[T])});function r0(S,T,H,Y){S=an(S)?S:da(S),H=H&&!Y?Ut(H):0;var ne=S.length;return H<0&&(H=Ir(ne+H,0)),Mo(S)?H<=ne&&S.indexOf(T,H)>-1:!!ne&&wr(S,T,H)>-1}var n0=$t(function(S,T,H){var Y=-1,ne=typeof T=="function",ye=an(S)?$e(S.length):[];return _i(S,function(Te){ye[++Y]=ne?pr(T,Te,H):Da(Te,T,H)}),ye}),i0=bo(function(S,T,H){ii(S,H,T)});function To(S,T){var H=jt(S)?Oe:eu;return H(S,It(T,3))}function a0(S,T,H,Y){return S==null?[]:(jt(T)||(T=T==null?[]:[T]),H=Y?e:H,jt(H)||(H=H==null?[]:[H]),iu(S,T,H))}var o0=bo(function(S,T,H){S[H?0:1].push(T)},function(){return[[],[]]});function s0(S,T,H){var Y=jt(S)?ft:Vn,ne=arguments.length<3;return Y(S,It(T,4),H,ne,_i)}function f0(S,T,H){var Y=jt(S)?Tt:Vn,ne=arguments.length<3;return Y(S,It(T,4),H,ne,Kf)}function u0(S,T){var H=jt(S)?Yr:Gf;return H(S,Po(It(T,3)))}function l0(S){var T=jt(S)?Uf:rd;return T(S)}function c0(S,T,H){(H?en(S,T,H):T===e)?T=1:T=Ut(T);var Y=jt(S)?Ih:nd;return Y(S,T)}function h0(S){var T=jt(S)?Dh:ad;return T(S)}function d0(S){if(S==null)return 0;if(an(S))return Mo(S)?na(S):S.length;var T=Vr(S);return T==J||T==q?S.size:ps(S).length}function p0(S,T,H){var Y=jt(S)?mt:od;return H&&en(S,T,H)&&(T=e),Y(S,It(T,3))}var y0=$t(function(S,T){if(S==null)return[];var H=T.length;return H>1&&en(S,T[0],T[1])?T=[]:H>2&&en(T[0],T[1],T[2])&&(T=[T[0]]),iu(S,Xr(T,1),[])}),Ro=Zc||function(){return ht.Date.now()};function v0(S,T){if(typeof T!="function")throw new Rn(m);return S=Ut(S),function(){if(--S<1)return T.apply(this,arguments)}}function Qu(S,T,H){return T=H?e:T,T=S&&T==null?S.length:T,ai(S,o,e,e,e,e,T)}function qu(S,T){var H;if(typeof T!="function")throw new Rn(m);return S=Ut(S),function(){return--S>0&&(H=T.apply(this,arguments)),S<=1&&(T=e),H}}var js=$t(function(S,T,H){var Y=v;if(H.length){var ne=bi(H,ca(js));Y|=i}return ai(S,Y,T,H,ne)}),el=$t(function(S,T,H){var Y=v|c;if(H.length){var ne=bi(H,ca(el));Y|=i}return ai(T,Y,S,H,ne)});function tl(S,T,H){T=H?e:T;var Y=ai(S,r,e,e,e,e,e,T);return Y.placeholder=tl.placeholder,Y}function rl(S,T,H){T=H?e:T;var Y=ai(S,t,e,e,e,e,e,T);return Y.placeholder=rl.placeholder,Y}function nl(S,T,H){var Y,ne,ye,Te,Ae,ze,qe=0,et=!1,at=!1,yt=!0;if(typeof S!="function")throw new Rn(m);T=In(T)||0,vr(H)&&(et=!!H.leading,at="maxWait"in H,ye=at?Ir(In(H.maxWait)||0,T):ye,yt="trailing"in H?!!H.trailing:yt);function kt(Sr){var Hn=Y,li=ne;return Y=ne=e,qe=Sr,Te=S.apply(li,Hn),Te}function Dt(Sr){return qe=Sr,Ae=La(Gt,T),et?kt(Sr):Te}function Wt(Sr){var Hn=Sr-ze,li=Sr-qe,xl=T-Hn;return at?$r(xl,ye-li):xl}function Nt(Sr){var Hn=Sr-ze,li=Sr-qe;return ze===e||Hn>=T||Hn<0||at&&li>=ye}function Gt(){var Sr=Ro();if(Nt(Sr))return qt(Sr);Ae=La(Gt,Wt(Sr))}function qt(Sr){return Ae=e,yt&&Y?kt(Sr):(Y=ne=e,Te)}function gn(){Ae!==e&&du(Ae),qe=0,Y=ze=ne=Ae=e}function tn(){return Ae===e?Te:qt(Ro())}function _n(){var Sr=Ro(),Hn=Nt(Sr);if(Y=arguments,ne=this,ze=Sr,Hn){if(Ae===e)return Dt(ze);if(at)return du(Ae),Ae=La(Gt,T),kt(ze)}return Ae===e&&(Ae=La(Gt,T)),Te}return _n.cancel=gn,_n.flush=tn,_n}var m0=$t(function(S,T){return Vf(S,1,T)}),b0=$t(function(S,T,H){return Vf(S,In(T)||0,H)});function g0(S){return ai(S,O)}function Co(S,T){if(typeof S!="function"||T!=null&&typeof T!="function")throw new Rn(m);var H=function(){var Y=arguments,ne=T?T.apply(this,Y):Y[0],ye=H.cache;if(ye.has(ne))return ye.get(ne);var Te=S.apply(this,Y);return H.cache=ye.set(ne,Te)||ye,Te};return H.cache=new(Co.Cache||ni),H}Co.Cache=ni;function Po(S){if(typeof S!="function")throw new Rn(m);return function(){var T=arguments;switch(T.length){case 0:return!S.call(this);case 1:return!S.call(this,T[0]);case 2:return!S.call(this,T[0],T[1]);case 3:return!S.call(this,T[0],T[1],T[2])}return!S.apply(this,T)}}function _0(S){return qu(2,S)}var w0=sd(function(S,T){T=T.length==1&&jt(T[0])?Oe(T[0],vn(It())):Oe(Xr(T,1),vn(It()));var H=T.length;return $t(function(Y){for(var ne=-1,ye=$r(Y.length,H);++ne=T}),Fi=Jf(function(){return arguments}())?Jf:function(S){return br(S)&&sr.call(S,"callee")&&!Bf.call(S,"callee")},jt=$e.isArray,F0=ur?vn(ur):Wh;function an(S){return S!=null&&Ao(S.length)&&!fi(S)}function xr(S){return br(S)&&an(S)}function B0(S){return S===!0||S===!1||br(S)&&qr(S)==te}var ki=Jc||Ys,j0=Pr?vn(Pr):$h;function L0(S){return br(S)&&S.nodeType===1&&!za(S)}function z0(S){if(S==null)return!0;if(an(S)&&(jt(S)||typeof S=="string"||typeof S.splice=="function"||ki(S)||ha(S)||Fi(S)))return!S.length;var T=Vr(S);if(T==J||T==q)return!S.size;if(ja(S))return!ps(S).length;for(var H in S)if(sr.call(S,H))return!1;return!0}function X0(S,T){return Na(S,T)}function H0(S,T,H){H=typeof H=="function"?H:e;var Y=H?H(S,T):e;return Y===e?Na(S,T,e,H):!!Y}function zs(S){if(!br(S))return!1;var T=qr(S);return T==be||T==ce||typeof S.message=="string"&&typeof S.name=="string"&&!za(S)}function U0(S){return typeof S=="number"&&Lf(S)}function fi(S){if(!vr(S))return!1;var T=qr(S);return T==_e||T==oe||T==V||T==se}function al(S){return typeof S=="number"&&S==Ut(S)}function Ao(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=E}function vr(S){var T=typeof S;return S!=null&&(T=="object"||T=="function")}function br(S){return S!=null&&typeof S=="object"}var ol=Br?vn(Br):Kh;function W0(S,T){return S===T||ds(S,T,Ps(T))}function $0(S,T,H){return H=typeof H=="function"?H:e,ds(S,T,Ps(T),H)}function V0(S){return sl(S)&&S!=+S}function K0(S){if(Pd(S))throw new Bt(u);return Qf(S)}function G0(S){return S===null}function Z0(S){return S==null}function sl(S){return typeof S=="number"||br(S)&&qr(S)==Q}function za(S){if(!br(S)||qr(S)!=ke)return!1;var T=no(S);if(T===null)return!0;var H=sr.call(T,"constructor")&&T.constructor;return typeof H=="function"&&H instanceof H&&qa.call(H)==$c}var Xs=dr?vn(dr):Gh;function Y0(S){return al(S)&&S>=-E&&S<=E}var fl=Er?vn(Er):Zh;function Mo(S){return typeof S=="string"||!jt(S)&&br(S)&&qr(S)==G}function bn(S){return typeof S=="symbol"||br(S)&&qr(S)==Z}var ha=Ar?vn(Ar):Yh;function J0(S){return S===e}function Q0(S){return br(S)&&Vr(S)==we}function q0(S){return br(S)&&qr(S)==ge}var ey=xo(ys),ty=xo(function(S,T){return S<=T});function ul(S){if(!S)return[];if(an(S))return Mo(S)?Ln(S):nn(S);if(Ta&&S[Ta])return Ic(S[Ta]());var T=Vr(S),H=T==J?rs:T==q?Ya:da;return H(S)}function ui(S){if(!S)return S===0?S:0;if(S=In(S),S===P||S===-P){var T=S<0?-1:1;return T*A}return S===S?S:0}function Ut(S){var T=ui(S),H=T%1;return T===T?H?T-H:T:0}function ll(S){return S?Mi(Ut(S),0,W):0}function In(S){if(typeof S=="number")return S;if(bn(S))return z;if(vr(S)){var T=typeof S.valueOf=="function"?S.valueOf():S;S=vr(T)?T+"":T}if(typeof S!="string")return S===0?S:+S;S=Cf(S);var H=xt.test(S);return H||Lt.test(S)?xe(S.slice(2),H?2:8):Ct.test(S)?z:+S}function cl(S){return Gn(S,on(S))}function ry(S){return S?Mi(Ut(S),-E,E):S===0?S:0}function or(S){return S==null?"":mn(S)}var ny=ua(function(S,T){if(ja(T)||an(T)){Gn(T,jr(T),S);return}for(var H in T)sr.call(T,H)&&Ma(S,H,T[H])}),hl=ua(function(S,T){Gn(T,on(T),S)}),Io=ua(function(S,T,H,Y){Gn(T,on(T),S,Y)}),iy=ua(function(S,T,H,Y){Gn(T,jr(T),S,Y)}),ay=oi(fs);function oy(S,T){var H=fa(S);return T==null?H:Wf(H,T)}var sy=$t(function(S,T){S=cr(S);var H=-1,Y=T.length,ne=Y>2?T[2]:e;for(ne&&en(T[0],T[1],ne)&&(Y=1);++H1),ye}),Gn(S,Rs(S),H),Y&&(H=Pn(H,y|h|l,bd));for(var ne=T.length;ne--;)_s(H,T[ne]);return H});function Oy(S,T){return pl(S,Po(It(T)))}var Ey=oi(function(S,T){return S==null?{}:qh(S,T)});function pl(S,T){if(S==null)return{};var H=Oe(Rs(S),function(Y){return[Y]});return T=It(T),au(S,H,function(Y,ne){return T(Y,ne[0])})}function Ty(S,T,H){T=xi(T,S);var Y=-1,ne=T.length;for(ne||(ne=1,S=e);++YT){var Y=S;S=T,T=Y}if(H||S%1||T%1){var ne=zf();return $r(S+ne*(T-S+qi("1e-"+((ne+"").length-1))),T)}return ms(S,T)}var jy=la(function(S,T,H){return T=T.toLowerCase(),S+(H?ml(T):T)});function ml(S){return Ws(or(S).toLowerCase())}function bl(S){return S=or(S),S&&S.replace(Dr,Rc).replace(Zi,"")}function Ly(S,T,H){S=or(S),T=mn(T);var Y=S.length;H=H===e?Y:Mi(Ut(H),0,Y);var ne=H;return H-=T.length,H>=0&&S.slice(H,ne)==T}function zy(S){return S=or(S),S&&it.test(S)?S.replace(ee,Cc):S}function Xy(S){return S=or(S),S&&Ge.test(S)?S.replace(st,"\\$&"):S}var Hy=la(function(S,T,H){return S+(H?"-":"")+T.toLowerCase()}),Uy=la(function(S,T,H){return S+(H?" ":"")+T.toLowerCase()}),Wy=wu("toLowerCase");function $y(S,T,H){S=or(S),T=Ut(T);var Y=T?na(S):0;if(!T||Y>=T)return S;var ne=(T-Y)/2;return wo(so(ne),H)+S+wo(oo(ne),H)}function Vy(S,T,H){S=or(S),T=Ut(T);var Y=T?na(S):0;return T&&Y>>0,H?(S=or(S),S&&(typeof T=="string"||T!=null&&!Xs(T))&&(T=mn(T),!T&&ra(S))?Si(Ln(S),0,H):S.split(T,H)):[]}var qy=la(function(S,T,H){return S+(H?" ":"")+Ws(T)});function ev(S,T,H){return S=or(S),H=H==null?0:Mi(Ut(H),0,S.length),T=mn(T),S.slice(H,H+T.length)==T}function tv(S,T,H){var Y=de.templateSettings;H&&en(S,T,H)&&(T=e),S=or(S),T=Io({},T,Y,Ru);var ne=Io({},T.imports,Y.imports,Ru),ye=jr(ne),Te=ts(ne,ye),Ae,ze,qe=0,et=T.interpolate||Or,at="__p += '",yt=ns((T.escape||Or).source+"|"+et.source+"|"+(et===Le?bt:Or).source+"|"+(T.evaluate||Or).source+"|$","g"),kt="//# sourceURL="+(sr.call(T,"sourceURL")?(T.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yi+"]")+` `;S.replace(yt,function(Nt,Gt,qt,gn,tn,_n){return qt||(qt=gn),at+=S.slice(qe,_n).replace(Gr,Pc),Gt&&(Ae=!0,at+=`' + __e(`+Gt+`) + '`),tn&&(ze=!0,at+=`'; `+tn+`; __p += '`),qt&&(at+=`' + ((__t = (`+qt+`)) == null ? '' : __t) + '`),qe=_n+Nt.length,Nt}),at+=`'; `;var Dt=sr.call(T,"variable")&&T.variable;if(!Dt)at=`with (obj) { `+at+` } `;else if(At.test(Dt))throw new Bt(g);at=(ze?at.replace(me,""):at).replace(Ee,"$1").replace(pe,"$1;"),at="function("+(Dt||"obj")+`) { `+(Dt?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Ae?", __e = _.escape":"")+(ze?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+at+`return __p }`;var Wt=_l(function(){return ar(ye,kt+"return "+at).apply(e,Te)});if(Wt.source=at,zs(Wt))throw Wt;return Wt}function rv(S){return or(S).toLowerCase()}function nv(S){return or(S).toUpperCase()}function iv(S,T,H){if(S=or(S),S&&(H||T===e))return Cf(S);if(!S||!(T=mn(T)))return S;var Y=Ln(S),ne=Ln(T),ye=Pf(Y,ne),Te=Af(Y,ne)+1;return Si(Y,ye,Te).join("")}function av(S,T,H){if(S=or(S),S&&(H||T===e))return S.slice(0,If(S)+1);if(!S||!(T=mn(T)))return S;var Y=Ln(S),ne=Af(Y,Ln(T))+1;return Si(Y,0,ne).join("")}function ov(S,T,H){if(S=or(S),S&&(H||T===e))return S.replace(rt,"");if(!S||!(T=mn(T)))return S;var Y=Ln(S),ne=Pf(Y,Ln(T));return Si(Y,ne).join("")}function sv(S,T){var H=C,Y=N;if(vr(T)){var ne="separator"in T?T.separator:ne;H="length"in T?Ut(T.length):H,Y="omission"in T?mn(T.omission):Y}S=or(S);var ye=S.length;if(ra(S)){var Te=Ln(S);ye=Te.length}if(H>=ye)return S;var Ae=H-na(Y);if(Ae<1)return Y;var ze=Te?Si(Te,0,Ae).join(""):S.slice(0,Ae);if(ne===e)return ze+Y;if(Te&&(Ae+=ze.length-Ae),Xs(ne)){if(S.slice(Ae).search(ne)){var qe,et=ze;for(ne.global||(ne=ns(ne.source,or(Kt.exec(ne))+"g")),ne.lastIndex=0;qe=ne.exec(et);)var at=qe.index;ze=ze.slice(0,at===e?Ae:at)}}else if(S.indexOf(mn(ne),Ae)!=Ae){var yt=ze.lastIndexOf(ne);yt>-1&&(ze=ze.slice(0,yt))}return ze+Y}function fv(S){return S=or(S),S&&Xe.test(S)?S.replace(Pe,Bc):S}var uv=la(function(S,T,H){return S+(H?" ":"")+T.toUpperCase()}),Ws=wu("toUpperCase");function gl(S,T,H){return S=or(S),T=H?e:T,T===e?Mc(S)?zc(S):hr(S):S.match(T)||[]}var _l=$t(function(S,T){try{return pr(S,e,T)}catch(H){return zs(H)?H:new Bt(H)}}),lv=oi(function(S,T){return mr(T,function(H){H=Zn(H),ii(S,H,js(S[H],S))}),S});function cv(S){var T=S==null?0:S.length,H=It();return S=T?Oe(S,function(Y){if(typeof Y[1]!="function")throw new Rn(m);return[H(Y[0]),Y[1]]}):[],$t(function(Y){for(var ne=-1;++neE)return[];var H=W,Y=$r(S,W);T=It(T),S-=W;for(var ne=mi(Y,T);++H0||T<0)?new Yt(H):(S<0?H=H.takeRight(-S):S&&(H=H.drop(S)),T!==e&&(T=Ut(T),H=T<0?H.dropRight(-T):H.take(T-S)),H)},Yt.prototype.takeRightWhile=function(S){return this.reverse().takeWhile(S).reverse()},Yt.prototype.toArray=function(){return this.take(W)},Kn(Yt.prototype,function(S,T){var H=/^(?:filter|find|map|reject)|While$/.test(T),Y=/^(?:head|last)$/.test(T),ne=de[Y?"take"+(T=="last"?"Right":""):T],ye=Y||/^find/.test(T);ne&&(de.prototype[T]=function(){var Te=this.__wrapped__,Ae=Y?[1]:arguments,ze=Te instanceof Yt,qe=Ae[0],et=ze||jt(Te),at=function(Gt){var qt=ne.apply(de,He([Gt],Ae));return Y&&yt?qt[0]:qt};et&&H&&typeof qe=="function"&&qe.length!=1&&(ze=et=!1);var yt=this.__chain__,kt=!!this.__actions__.length,Dt=ye&&!yt,Wt=ze&&!kt;if(!ye&&et){Te=Wt?Te:new Yt(this);var Nt=S.apply(Te,Ae);return Nt.__actions__.push({func:Eo,args:[at],thisArg:e}),new Cn(Nt,yt)}return Dt&&Wt?S.apply(this,Ae):(Nt=this.thru(at),Dt?Y?Nt.value()[0]:Nt.value():Nt)})}),mr(["pop","push","shift","sort","splice","unshift"],function(S){var T=Ja[S],H=/^(?:push|sort|unshift)$/.test(S)?"tap":"thru",Y=/^(?:pop|shift)$/.test(S);de.prototype[S]=function(){var ne=arguments;if(Y&&!this.__chain__){var ye=this.value();return T.apply(jt(ye)?ye:[],ne)}return this[H](function(Te){return T.apply(jt(Te)?Te:[],ne)})}}),Kn(Yt.prototype,function(S,T){var H=de[T];if(H){var Y=H.name+"";sr.call(sa,Y)||(sa[Y]=[]),sa[Y].push({name:T,func:H})}}),sa[go(e,c).name]=[{name:"wrapper",func:e}],Yt.prototype.clone=fh,Yt.prototype.reverse=uh,Yt.prototype.value=lh,de.prototype.at=Lp,de.prototype.chain=zp,de.prototype.commit=Xp,de.prototype.next=Hp,de.prototype.plant=Wp,de.prototype.reverse=$p,de.prototype.toJSON=de.prototype.valueOf=de.prototype.value=Vp,de.prototype.first=de.prototype.head,Ta&&(de.prototype[Ta]=Up),de},ia=Xc();Mt?((Mt.exports=ia)._=ia,Zt._=ia):ht._=ia}).call(Vt)})(Zg,ga);function kc(X){X=X.replace("#","");for(var k=X.match(/../g),e=0;e<3;e++)k[e]=parseInt(k[e],16);return k}function Oc(X,k,e){for(var x=[X.toString(16),k.toString(16),e.toString(16)],_=0;_<3;_++)x[_].length==1&&(x[_]="0"+x[_]);return"#"+x.join("")}function Yg(X,k){for(var e=kc(X),x=0;x<3;x++)e[x]=Math.floor(e[x]*(1-k));return Oc(e[0],e[1],e[2])}function Jg(X,k){for(var e=kc(X),x=0;x<3;x++)e[x]=Math.floor((255-e[x])*k+e[x]);return Oc(e[0],e[1],e[2])}const rf=["#FFFFFF","#000000","#BFBFBF","#323232","#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#71AD47"],nf=["#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#800000","#008000","#000080","#808000","#800080","#008080","#C0C0C0","#808080","#9999FF","#993366","#FFFFCC","#CCFFFF","#660066","#FF8080","#0066CC","#CCCCFF","#000080","#FF00FF","#FFFF00","#00FFFF","#800080","#800000","#008080","#0000FF","#00CCFF","#CCFFFF","#CCFFCC","#FFFF99","#99CCFF","#FF99CC","#CC99FF","#FFCC99","#3366FF","#33CCCC","#99CC00","#FFCC00","#FF9900","#FF6600","#666699","#969696","#003366","#339966","#003300","#333300","#993300","#993366","#333399","#333333","#FFFFFF"];let Qg=80,qg=24;function v1(X,k={}){return e1(Zv(X),k)}function e1(X,k){return new Promise(function(e,x){const _=new XMLHttpRequest;_.open(k.method||"GET",X,!0),_.responseType=k.responseType||"arraybuffer",_.onload=function(){_.status===200?e(_.response):x(_.status)},_.onerror=function(){x(_.status)},_.withCredentials=k.withCredentials||!1,k.headers&&Object.keys(k.headers).forEach(function(u){_.setRequestHeader(u,k.headers[u])}),_.send(k.body)})}function m1(X){try{return new mf.Workbook().xlsx.load(X)}catch(k){return console.warn(k),Promise.reject(k)}}function t1(X,k,e){for(let x=0;x<(X.columns||[]).length;x++)k.cols[x.toString()]={},X.columns[x].width?k.cols[x.toString()].width=X.columns[x].width*6+(e.widthOffset||0):k.cols[x.toString()].width=Qg+(e.widthOffset||0);k.cols.len=Math.max(Object.keys(k.cols).length,e.minColLength||0)}function r1(X){const{numFmt:k,value:e,type:x}=X;switch(x){case 2:return e+"";case 3:return e;case 4:switch(k){case"yyyy-mm-dd;@":return Bi(e).format("YYYY-MM-DD");case"mm-dd-yy":return Bi(e).format("YYYY/MM/DD");case"[$-F800]dddd, mmmm dd, yyyy":return Bi(e).format("YYYY年M月D日 ddd");case'm"月"d"日";@':return Bi(e).format("M月D日");case"yyyy/m/d h:mm;@":case'm/d/yy "h":mm':return Bi(e).subtract(8,"hour").format("YYYY/M/DD HH:mm");case"h:mm;@":return Bi(e).format("HH:mm");default:return Bi(e).format("YYYY-MM-DD")}case 5:return e.text;case 6:return ga.get(e,"result.error")||e.result;case 8:return X.text;default:return e}}function af(X){if(typeof X=="object")return"#000000";if(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.test(X))return X.startsWith("#")?X:"#"+X;X=X.trim().toLowerCase();let k={};try{let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(X);return k.r=parseInt(e[2],16),k.g=parseInt(e[3],16),k.b=parseInt(e[4],16),k.a=parseInt(e[1],16)/255,Rt(`rgba(${k.r}, ${k.g}, ${k.b}, ${k.a})`).toHexString()}catch(e){console.warn(e)}}function of(X,k){return X>9?"#C7C9CC":typeof k>"u"?rf[X]:k>0?Jg(rf[X],k):Yg(rf[X],Math.abs(k))}function n1(X){X.style=ga.cloneDeep(X.style);let k=null;X.style.fill&&X.style.fill.fgColor&&(X.style.fill.fgColor.argb?k=af(X.style.fill.fgColor.argb):X.style.fill.fgColor.hasOwnProperty("theme")?k=of(X.style.fill.fgColor.theme,X.style.fill.fgColor.tint):X.style.fill.fgColor.indexed?k=nf[X.style.fill.fgColor.indexed]||"#C7C9CC":k="#C7C9CC"),k&&(X.style.bgcolor=k);let e=null;if(X.style.font&&X.style.font.color&&(X.style.font.color.argb?e=af(X.style.font.color.argb):X.style.font.color.hasOwnProperty("theme")?e=of(X.style.font.color.theme,X.style.font.color.tint):X.style.font.color.indexed?e=nf[X.style.font.color.indexed]||"#000000":e="#000000"),e&&(X.style.color=e),X.style.alignment&&(X.style.alignment.horizontal&&(X.style.align=X.style.alignment.horizontal),X.style.alignment.vertical&&(X.style.valign=X.style.alignment.vertical)),X.style.alignment&&X.style.alignment.wrapText&&(X.style.textwrap=!0),X.style.border){let x={};Object.keys(X.style.border).forEach(_=>{let u=X.style.border[_],m="#000000";typeof u.color=="string"?m=u.color:u.color&&(u.color.argb?m=af(u.color.argb):u.color.hasOwnProperty("theme")?m=of(u.color.theme,u.color.tint):u.color.indexed&&(m=nf[u.color.indexed])),x[_]=[u.style||"thin",m]}),X.style.border2={...X.style.border},X.style.border=x}return X.style}function b1(X,k){let e=[];return X.eachSheet(x=>{let _={name:x.name,styles:[],rows:{},cols:{},merges:[],media:[]},u=[];for(let m in x._merges){_.merges.push(x._merges[m].shortRange);let g={};g.startAddress=x._merges[m].tl,g.endAddress=x._merges[m].br,g.YRange=x._merges[m].model.bottom-x._merges[m].model.top,g.XRange=x._merges[m].model.right-x._merges[m].model.left,u.push(g)}t1(x,_,k),(x._rows||[]).forEach((m,g)=>{_.rows[g]={cells:{}},m.height?_.rows[g].height=m.height+(k.heightOffset||0):_.rows[g].height=qg+(k.heightOffset||0),(m._cells||[]).forEach((b,w)=>{_.rows[g].cells[w]={};let f=ga.find(u,function(y){return y.startAddress==b._address});f&&b.master.address!=f.startAddress||(f&&(_.rows[g].cells[w].merge=[f.YRange,f.XRange]),_.rows[g].cells[w].text=r1(b),_.styles.push(n1(b)),_.rows[g].cells[w].style=_.styles.length-1)})}),_._media&&(_.media=_._media),_.rows.len=Math.max(Object.keys(_.rows).length,100),e.push(_)}),{workbookData:e,workbookSource:X,medias:X.media||[]}}let Uo=[];function g1(X,k,e,x){e&&e._media.length&&e._media.forEach(_=>{let{imageId:u,range:m,type:g}=_;if(g==="image"){let b=i1(e,m,x);a1(X,u,k[u],b)}})}let Wo=60,$o=25,sf=80,ff=24,Jn=window.devicePixelRatio;function i1(X,k,e){var r,t,i,n,o,p,O,C,N,L,F,M,D,R;let{tl:x={},br:_={}}=k,{nativeCol:u,nativeColOff:m,nativeRow:g,nativeRowOff:b}=x,w=Wo,f=$o;for(let P=0;P{let u=0,m=0,g=_.width,b=_.height,w=x.x,f=x.y,y=x.width,h=x.height,l=y/g,d=h/b;if(w{})}function o1(X,k){return new Promise((e,x)=>{if(Uo[X])return e(Uo[X]);const{buffer:_,extension:u}=k.buffer;let m=new Blob([_],{type:"image/"+u}),g=URL.createObjectURL(m),b=new Image;b.src=g,b.onload=function(){e(b),Uo[X]=b},b.onerror=function(w){x(w)}})}function w1(X){if(X){let k=X.querySelectorAll("input");for(let e of k)e&&!e.readOnly&&(e.readOnly=!0);document.activeElement&&document.activeElement.blur()}}export{xg as S,g1 as a,m1 as b,_1 as c,v1 as g,ga as l,w1 as r,b1 as t};