varr=Buffer.alloc(2*e.length),t,a,n=1,i=0,s=0,l;for(a=0;a<e.length;a+=n){n=1;if((l=e.charCodeAt(a))<128)t=l;elseif(l<224){t=(l&31)*64+(e.charCodeAt(a+1)&63);n=2}elseif(l<240){t=(l&15)*4096+(e.charCodeAt(a+1)&63)*64+(e.charCodeAt(a+2)&63);n=3}else{n=4;t=(l&7)*262144+(e.charCodeAt(a+1)&63)*4096+(e.charCodeAt(a+2)&63)*64+(e.charCodeAt(a+3)&63);t-=65536;s=55296+(t>>>10&1023);t=56320+(t&1023)}if(s!==0){r[i++]=s&255;r[i++]=s>>>8;s=0}r[i++]=t%256;r[i++]=t>>>8}returnr.slice(0,i).toString("ucs2")};varqe="foo bar bazâð£";if(Ye(qe)==Ke(qe))Ye=Ke;varZe=functionWl(e){returnk(e,"binary").toString("utf8")};if(Ye(qe)==Ze(qe))Ye=Ze;Je=function(e){returnk(e,"utf8").toString("binary")}}varQe=function(){vare={};returnfunctionr(t,a){varn=t+"|"+(a||"");if(e[n])returne[n];returne[n]=newRegExp("<(?:\\w+:)?"+t+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+t+">",a||"")}}();varer=function(){vare=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(e){return[newRegExp("&"+e[0]+";","ig"),e[1]]});returnfunctionr(t){vara=t.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,"\n").replace(/<[^>]*>/g,"");for(varn=0;n<e.length;++n)a=a.replace(e[n][0],e[n][1]);returna}}();varrr=function(){vare={};returnfunctionr(t){if(e[t]!==undefined)returne[t];returne[t]=newRegExp("<(?:vt:)?"+t+">([\\s\\S]*?)</(?:vt:)?"+t+">","g")}}();vartr=/<\/?(?:vt:)?variant>/g,ar=/<(?:vt:)([^>]*)>([\s\S]*)</;functionnr(e,r){vart=Ne(e);vara=e.match(rr(t.baseType))||[];varn=[];if(a.length!=t.size){if(r.WTF)thrownewError("unexpected vector length "+a.length+" != "+t.size);returnn}a.forEach(function(e){varr=e.replace(tr,"").match(ar);if(r)n.push({v:Ye(r[2]),t:r[1]})});returnn}varir=/(^\s|\s$|\n)/;functionsr(e,r){return"<"+e+(r.match(ir)?' xml:space="preserve"':"")+">"+r+"</"+e+">"}functionlr(e){returnY(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}functionor(e,r,t){return"<"+e+(t!=null?lr(t):"")+(r!=null?(r.match(ir)?' xml:space="preserve"':"")+">"+r+"</"+e:"/")+">"}functionfr(e,r){try{returne.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throwt}return""}functioncr(e,r){switch(typeofe){case"string":vart=or("vt:lpwstr",We(e));if(r)t=t.replace(/"/g,"_x0022_");returnt;case"number":returnor((e|0)==e?"vt:i4":"vt:r8",We(String(e)));case"boolean":returnor("vt:bool",e?"true":"false");}if(einstanceofDate)returnor("vt:filetime",fr(e));thrownewError("Unable to serialize "+e)}varhr={dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"};hr.main=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];varur={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};functiondr(e,r){vart=1-2*(e[r+7]>>>7);vara=((e[r+7]&127)<<4)+(e[r+6]>>>4&15);varn=e[r+6]&15;for(vari=5;i>=0;--i)n=n*256+e[r+i];if(a==2047)returnn==0?t*Infinity:NaN;if(a==0)a=-1022;else{a-=1023;n+=Math.pow(2,52)}returnt*Math.pow(2,a-52)*n}functionpr(e,r,t){vara=(r<0||1/r==-Infinity?1:0)<<7,n=0,i=0;vars=a?-r:r;if(!isFinite(s)){n=2047;i=isNaN(r)?26985:0}elseif(s==0)n=i=0;else{n=Math.floor(Math.log(s)/Math.LN2);i=s*Math.pow(2,52-n);if(n<=-1023&&(!isFinite(i)||i<Math.pow(2,52)
functionva(e,r,t,a){varn=[];if(typeofe=="string")n=nr(e,a);elsefor(vari=0;i<e.length;++i)n=n.concat(e[i].map(function(e){return{v:e}}));vars=typeofr=="string"?nr(r,a).map(function(e){returne.v}):r;varl=0,o=0;if(s.length>0)for(varf=0;f!==n.length;f+=2){o=+n[f+1].v;switch(n[f].v){case"Worksheets":;case"工作表":;case"Листы":;case"أوراق العمل":;case"ワークシート":;case"גליונות עבודה":;case"Arbeitsblätter":;case"Çalışma Sayfaları":;case"Feuilles de calcul":;case"Fogli di lavoro":;case"Folhas de cálculo":;case"Planilhas":;case"Regneark":;case"Hojas de cálculo":;case"Werkbladen":t.Worksheets=o;t.SheetNames=s.slice(l,l+o);break;case"Named Ranges":;case"Rangos con nombre":;case"名前付き一覧":;case"Benannte Bereiche":;case"Navngivne områder":t.NamedRanges=o;t.DefinedNames=s.slice(l,l+o);break;case"Charts":;case"Diagramme":t.Chartsheets=o;t.ChartNames=s.slice(l,l+o);break;}l+=o}}functionma(e,r,t){vara={};if(!r)r={};e=Ye(e);da.forEach(function(t){varn=(e.match(Qe(t[0]))||[])[1];switch(t[2]){case"string":if(n)r[t[1]]=Le(n);break;case"bool":r[t[1]]=n==="true";break;case"raw":vari=e.match(newRegExp("<"+t[0]+"[^>]*>([\\s\\S]*?)</"+t[0]+">"));if(i&&i.length>0)a[t[1]]=i[1];break;}});if(a.HeadingPairs&&a.TitlesOfParts)va(a.HeadingPairs,a.TitlesOfParts,r,t);returnr}varga=or("Properties",null,{xmlns:hr.EXT_PROPS,"xmlns:vt":hr.vt});functionba(e){varr=[],t=or;if(!e)e={};e.Application="SheetJS";r[r.length]=Fe;r[r.length]=ga;da.forEach(function(a){if(e[a[1]]===undefined)return;varn;switch(a[2]){case"string":n=We(String(e[a[1]]));break;case"bool":n=e[a[1]]?"true":"false";break;}if(n!==undefined)r[r.length]=t(a[0],n)});r[r.length]=t("HeadingPairs",t("vt:vector",t("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+t("vt:variant",t("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"}));r[r.length]=t("TitlesOfParts",t("vt:vector",e.SheetNames.map(function(e){return"<vt:lpstr>"+We(e)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"}));if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}returnr.join("")}hr.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";ea.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";varwa=/<[^>]+>[^<]*/g;functionka(e,r){vart={},a="";varn=e.match(wa);if(n)for(vari=0;i!=n.length;++i){vars=n[i],l=Ne(s);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":a=Le(l.name);break;case"</property>":a=null;break;default:if(s.indexOf("<vt:")===0){varo=s.split(">");varf=o[0].slice(4),c=o[1];switch(f){case"lpstr":;case"bstr":;case"lpwstr":t[a]=Le(c);break;case"bool":t[a]=Ge(c);break;case"i1":;case"i2":;case"i4":;case"i8":;case"int":;case"uint":t[a]=parseInt(c,10);break;case"r4":;case"r8":;case"decimal":t[a]=parseFloat(c);break;case"filetime":;case"date":t[a]=oe(c);break;case"cy":;case"error":t[a]=Le(c);break;default:if(f.slice(-1)=="/")break;if(r.WTF&&typeofconsole!=="undefined")console.warn("Unexpected",s,f,o);}}elseif(s.slice(0,2)==="</"){}elseif(r.WTF)thrownewError(s);}}returnt}varya=or("Properties",null,{xmlns:hr.CUST_PROPS,"xmlns:vt":hr.vt});functionxa(e){varr=[Fe,ya];if(!e)returnr.join("");vart=1;Y(e).forEach(functiona(n){++t;r[r.length]=or("property",cr(e[n],true),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:We(n)})});if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}returnr.join("")}var_a=function(){vare={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,255:16969};varr=K({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:
break;}break;case"<u/>":n.underline=1;break;case"<strike":n.strike=l.val?Ge(l.val):1;break;case"<strike/>":n.strike=1;break;case"<outline":n.outline=l.val?Ge(l.val):1;break;case"<outline/>":n.outline=1;break;case"<shadow":n.shadow=l.val?Ge(l.val):1;break;case"<shadow/>":n.shadow=1;break;case"<condense":n.condense=l.val?Ge(l.val):1;break;case"<condense/>":n.condense=1;break;case"<extend":n.extend=l.val?Ge(l.val):1;break;case"<extend/>":n.extend=1;break;case"<sz":if(l.val)n.sz=+l.val;break;case"<sz/>":;case"</sz>":break;case"<vertAlign":if(l.val)n.vertAlign=l.val;break;case"<vertAlign/>":;case"</vertAlign>":break;case"<family":if(l.val)n.family=parseInt(l.val,10);break;case"<family/>":;case"</family>":break;case"<scheme":if(l.val)n.scheme=l.val;break;case"<scheme/>":;case"</scheme>":break;case"<charset":if(l.val=="1")break;l.codepage=i[parseInt(l.val,10)];break;case"<color":if(!n.color)n.color={};if(l.auto)n.color.auto=Ge(l.auto);if(l.rgb)n.color.rgb=l.rgb.slice(-6);elseif(l.indexed){n.color.index=parseInt(l.indexed,10);varo=Vt[n.color.index];if(n.color.index==81)o=Vt[1];if(!o)thrownewError(e);n.color.rgb=o[0].toString(16)+o[1].toString(16)+o[2].toString(16)}elseif(l.theme){n.color.theme=parseInt(l.theme,10);if(l.tint)n.color.tint=parseFloat(l.tint);if(l.theme&&t.themeElements&&t.themeElements.clrScheme){n.color.rgb=Xa(t.themeElements.clrScheme[n.color.theme].rgb,n.color.tint||0)}}break;case"<color/>":;case"</color>":break;case"<AlternateContent":s=true;break;case"</AlternateContent>":s=false;break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":s=true;break;case"</ext>":s=false;break;default:if(a&&a.WTF){if(!s)thrownewError("unrecognized "+l[0]+" in fonts")};}})}functionun(e,r,t){r.NumberFmt=[];vara=Y(N._table);for(varn=0;n<a.length;++n)r.NumberFmt[a[n]]=N._table[a[n]];vari=e[0].match(Oe);if(!i)return;for(n=0;n<i.length;++n){vars=Ne(i[n]);switch(Pe(s[0])){case"<numFmts":;case"</numFmts>":;case"<numFmts/>":;case"<numFmts>":break;case"<numFmt":{varl=Le(Ye(s.formatCode)),o=parseInt(s.numFmtId,10);r.NumberFmt[o]=l;if(o>0){if(o>392){for(o=392;o>60;--o)if(r.NumberFmt[o]==null)break;r.NumberFmt[o]=l}N.load(l,o)}}break;case"</numFmt>":break;default:if(t.WTF)thrownewError("unrecognized "+s[0]+" in numFmts");}}}functiondn(e){varr=["<numFmts>"];[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(vara=t[0];a<=t[1];++a)if(e[a]!=null)r[r.length]=or("numFmt",null,{numFmtId:a,formatCode:We(e[a])})});if(r.length===1)return"";r[r.length]="</numFmts>";r[0]=or("numFmts",null,{count:r.length-2}).replace("/>",">");returnr.join("")}varpn=["numFmtId","fillId","fontId","borderId","xfId"];varvn=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];functionmn(e,r,t){r.CellXf=[];vara;varn=false;(e[0].match(Oe)||[]).forEach(function(e){vari=Ne(e),s=0;switch(Pe(i[0])){case"<cellXfs":;case"<cellXfs>":;case"<cellXfs/>":;case"</cellXfs>":break;case"<xf":;case"<xf/>":a=i;deletea[0];for(s=0;s<pn.length;++s)if(a[pn[s]])a[pn[s]]=parseInt(a[pn[s]],10);for(s=0;s<vn.length;++s)if(a[vn[s]])a[vn[s]]=Ge(a[vn[s]]);if(a.numFmtId>392){for(s=392;s>60;--s)if(r.NumberFmt[a.numFmtId]==r.NumberFmt[s]){a.numFmtId=s;break}}r.CellXf.push(a);break;case"</xf>":break;case"<alignment":;case"<alignment/>":varl={};if(i.vertical)l.vertical=i.vertical;if(i.horizontal)l.horizontal=i.horizontal;if(i.textRotation!=null)l.textRotation=i.textRotation;if(i.indent)l.indent=i.indent;if(i.wrapText)l.wrapText=Ge(i.wrapText);a.alignment=l;break;case"</alignment>":break;case"<protection":break;case"</protection>":;case"<protection/>":break;case"<AlternateContent":n=true;break;case"</AlternateContent>":n=false;break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":n=true;break;case"</ext>":n=false;break;default:if(t&&t.WTF){if(!n)thrownewError("unrecognized "+i[0]+" in cellXfs")};}})}functiongn(e){varr=[];r[r.length]=or("cellXfs",null);e.forEach(function(e){r[r.length]=or("xf",null,e)});r[r.length]="</cellXfs>";if(r.length===2)return"";r[0]=or("cellXfs",null,{c
}functionsl(e,r){vart="",a=tl(e,r);switch(r.type){case"base64":t=b.decode(e);break;case"binary":t=e;break;case"buffer":t=e.toString("binary");break;case"array":t=fe(e);break;default:thrownewError("Unrecognized type "+r.type);}if(a[0]==239&&a[1]==187&&a[2]==191)t=Ye(t);returnil(t,r)}functionll(e,r){vart=e;if(r.type=="base64")t=b.decode(t);t=cptable.utils.decode(1200,t.slice(2),"str");r.type="binary";returnil(t,r)}functionol(e){return!e.match(/[^\x00-\x7F]/)?e:Je(e)}functionfl(e,r,t,a){if(a){t.type="string";returnEa.to_workbook(e,t)}returnEa.to_workbook(r,t)}functioncl(e,r){f();if(typeofArrayBuffer!=="undefined"&&einstanceofArrayBuffer)returncl(newUint8Array(e),r);vart=e,a=[0,0,0,0],n=false;vari=r||{};if(i.cellStyles){i.cellNF=true;i.sheetStubs=true}ai={};if(i.dateNF)ai.dateNF=i.dateNF;if(!i.type)i.type=w&&Buffer.isBuffer(e)?"buffer":"base64";if(i.type=="file"){i.type=w?"buffer":"binary";t=G(e)}if(i.type=="string"){n=true;i.type="binary";i.codepage=65001;t=ol(e)}if(i.type=="array"&&typeofUint8Array!=="undefined"&&einstanceofUint8Array&&typeofArrayBuffer!=="undefined"){vars=newArrayBuffer(3),l=newUint8Array(s);l.foo="bar";if(!l.foo){i=ce(i);i.type="array";returncl(T(t),i)}}switch((a=tl(t,i))[0]){case208:if(a[1]===207&&a[2]===17&&a[3]===224&&a[4]===161&&a[5]===177&&a[6]===26&&a[7]===225)returnal(j.read(t,i),i);break;case9:if(a[1]<=4)returnparse_xlscfb(t,i);break;case60:returnparse_xlml(t,i);case73:if(a[1]===68)returnFa(t,i);break;case84:if(a[1]===65&&a[2]===66&&a[3]===76)returnSa.to_workbook(t,i);break;case80:returna[1]===75&&a[2]<9&&a[3]<9?nl(t,i):fl(e,t,i,n);case239:returna[3]===60?parse_xlml(t,i):fl(e,t,i,n);case255:if(a[1]===254){returnll(t,i)}break;case0:if(a[1]===0&&a[2]>=2&&a[3]===0)returnWK_.to_workbook(t,i);break;case3:;case131:;case139:;case140:return_a.to_workbook(t,i);case123:if(a[1]===92&&a[2]===114&&a[3]===116)returnRTF.to_workbook(t,i);break;case10:;case13:;case32:returnsl(t,i);}if(_a.versions.indexOf(a[0])>-1&&a[2]<=12&&a[3]<=31)return_a.to_workbook(t,i);returnfl(e,t,i,n)}functionhl(e,r){vart=r||{};t.type="file";returncl(e,t)}functionul(e,r){switch(r.type){case"base64":;case"binary":break;case"buffer":;case"array":r.type="";break;case"file":returnX(r.file,j.write(e,{type:w?"buffer":""}));case"string":thrownewError("'string' output type invalid for '"+r.bookType+"' files");default:thrownewError("Unrecognized type "+r.type);}returnj.write(e,r)}functiondl(e,r){vart=r||{};vara=rl(e,t);varn={};if(t.compression)n.compression="DEFLATE";if(t.password)n.type=w?"nodebuffer":"string";elseswitch(t.type){case"base64":n.type="base64";break;case"binary":n.type="string";break;case"string":thrownewError("'string' output type invalid for '"+t.bookType+"' files");case"buffer":;case"file":n.type=w?"nodebuffer":"string";break;default:thrownewError("Unrecognized type "+t.type);}vari=a.FullPaths?j.write(a,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[n.type]||n.type}):a.generate(n);if(t.password&&typeofencrypt_agile!=="undefined")returnul(encrypt_agile(i,t.password),t);if(t.type==="file")returnX(t.file,i);returnt.type=="string"?Ye(i):i}functionpl(e,r){vart=r||{};vara=write_xlscfb(e,t);returnul(a,t)}functionvl(e,r,t){if(!t)t="";vara=t+e;switch(r.type){case"base64":returnb.encode(Je(a));case"binary":returnJe(a);case"string":returne;case"file":returnX(r.file,a,"utf8");case"buffer":{if(w)returnk(a,"utf8");elsereturnvl(a,{type:"binary"}).split("").map(function(e){returne.charCodeAt(0)})};}thrownewError("Unrecognized type "+r.type)}functionml(e,r){switch(r.type){case"base64":returnb.encode(e);case"binary":returne;case"string":returne;case"file":returnX(r.file,e,"binary");case"buffer":{if(w)returnk(e,"binary");elsereturne.split("").map(function(e){returne.charCodeAt(0)})};}thrownewError("Unrecognized type "+r.type)}functiongl(e,r){switch(r.type){case"string":;case"base64":;case"binary":vart="";for(vara=0;a<e.length;++a)t+=String.fromCharCode(e[a]);returnr.type=="base64"?b.encode(t):r.type=="string"?Ye(t):t;case"f