r+=String.fromCharCode(s);continue}i=e.charCodeAt(t++);if(a<240){r+=String.fromCharCode((a&15)<<12|(n&63)<<6|i&63);continue}s=e.charCodeAt(t++);f=((a&7)<<18|(n&63)<<12|(i&63)<<6|s&63)-65536;r+=String.fromCharCode(55296+(f>>>10&1023));r+=String.fromCharCode(56320+(f&1023))}returnr};varQe=function(e){varr=[],t=0,a=0,n=0;while(t<e.length){a=e.charCodeAt(t++);switch(true){casea<128:r.push(String.fromCharCode(a));break;casea<2048:r.push(String.fromCharCode(192+(a>>6)));r.push(String.fromCharCode(128+(a&63)));break;casea>=55296&&a<57344:a-=55296;n=e.charCodeAt(t++)-56320+(a<<10);r.push(String.fromCharCode(240+(n>>18&7)));r.push(String.fromCharCode(144+(n>>12&63)));r.push(String.fromCharCode(128+(n>>6&63)));r.push(String.fromCharCode(128+(n&63)));break;default:r.push(String.fromCharCode(224+(a>>12)));r.push(String.fromCharCode(128+(a>>6&63)));r.push(String.fromCharCode(128+(a&63)));}}returnr.join("")};if(E){varJe=functionLm(e){varr=Buffer.alloc(2*e.length),t,a,n=1,i=0,s=0,f;for(a=0;a<e.length;a+=n){n=1;if((f=e.charCodeAt(a))<128)t=f;elseif(f<224){t=(f&31)*64+(e.charCodeAt(a+1)&63);n=2}elseif(f<240){t=(f&15)*4096+(e.charCodeAt(a+1)&63)*64+(e.charCodeAt(a+2)&63);n=3}else{n=4;t=(f&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")};varZe="foo bar bazâð£";if(Ye(Ze)==Je(Ze))Ye=Je;varqe=functionUm(e){returnk(e,"binary").toString("utf8")};if(Ye(Ze)==qe(Ze))Ye=qe;Qe=function(e){returnk(e,"utf8").toString("binary")}}varer=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||"")}}();varrr=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}}();vartr=function(){vare={};returnfunctionr(t){if(e[t]!==undefined)returne[t];returne[t]=newRegExp("<(?:vt:)?"+t+">([\\s\\S]*?)</(?:vt:)?"+t+">","g")}}();varar=/<\/?(?:vt:)?variant>/g,nr=/<(?:vt:)([^>]*)>([\s\S]*)</;functionir(e,r){vart=Oe(e);vara=e.match(tr(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(ar,"").match(nr);if(r)n.push({v:Ye(r[2]),t:r[1]})});returnn}varsr=/(^\s|\s$|\n)/;functionfr(e,r){return"<"+e+(r.match(sr)?' xml:space="preserve"':"")+">"+r+"</"+e+">"}functionlr(e){returnK(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}functionor(e,r,t){return"<"+e+(t!=null?lr(t):"")+(r!=null?(r.match(sr)?' xml:space="preserve"':"")+">"+r+"</"+e:"/")+">"}functioncr(e,r){try{returne.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throwt}return""}functionur(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",cr(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/200
r.style=r.styles.length>0?r.styles[0]:"";r.defaults=t;deleter.calcchains;returnr}varMa=or("Types",null,{xmlns:hr.CT,"xmlns:xsd":hr.xsd,"xmlns:xsi":hr.xsi});varLa=[["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels",Oa.rels[0]]].map(function(e){returnor("Default",null,{Extension:e[0],ContentType:e[1]})});functionUa(e,r){vart=[],a;t[t.length]=ye;t[t.length]=Ma;t=t.concat(La);varn=function(n){if(e[n]&&e[n].length>0){a=e[n][0];t[t.length]=or("Override",null,{PartName:(a[0]=="/"?"":"/")+a,ContentType:Da[n][r.bookType||"xlsx"]})}};vari=function(a){(e[a]||[]).forEach(function(e){t[t.length]=or("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:Da[a][r.bookType||"xlsx"]})})};vars=function(r){(e[r]||[]).forEach(function(e){t[t.length]=or("Override",null,{PartName:(e[0]=="/"?"":"/")+e,ContentType:Oa[r][0]})})};n("workbooks");i("sheets");i("charts");s("themes");["strs","styles"].forEach(n);["coreprops","extprops","custprops"].forEach(s);s("vba");s("comments");s("drawings");if(t.length>2){t[t.length]="</Types>";t[1]=t[1].replace("/>",">")}returnt.join("")}varHa={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};functionWa(e){varr=e.lastIndexOf("/");returne.slice(0,r+1)+"_rels/"+e.slice(r+1)+".rels"}functionVa(e,r){vart={"!id":{}};if(!e)returnt;if(r.charAt(0)!=="/"){r="/"+r}vara={};(e.match(Re)||[]).forEach(function(e){varn=Oe(e);if(n[0]==="<Relationship"){vari={};i.Type=n.Type;i.Target=n.Target;i.Id=n.Id;i.TargetMode=n.TargetMode;vars=n.TargetMode==="External"?n.Target:Ae(n.Target,r);t[s]=i;a[n.Id]=i}});t["!id"]=a;returnt}hr.RELS="http://schemas.openxmlformats.org/package/2006/relationships";varXa=or("Relationships",null,{xmlns:hr.RELS});functionGa(e){varr=[ye,Xa];K(e["!id"]).forEach(function(t){r[r.length]=or("Relationship",null,e["!id"][t])});if(r.length>2){r[r.length]="</Relationships>";r[1]=r[1].replace("/>",">")}returnr.join("")}varza=[Ha.HLINK,Ha.XPATH,Ha.XMISS];functionja(e,r,t,a,n,i){if(!n)n={};if(!e["!id"])e["!id"]={};if(r<0)for(r=1;e["!id"]["rId"+r];++r){}n.Id="rId"+r;n.Type=a;n.Target=t;if(i)n.TargetMode=i;elseif(za.indexOf(n.Type)>-1)n.TargetMode="External";if(e["!id"][n.Id])thrownewError("Cannot rewrite rId "+r);e["!id"][n.Id]=n;e[("/"+n.Target).replace("//","/")]=n;returnr}var$a="application/vnd.oasis.opendocument.spreadsheet";functionKa(e,r){vart=Cp(e);vara;varn;while(a=Tp.exec(t))switch(a[3]){case"manifest":break;case"file-entry":n=Oe(a[0],false);if(n.path=="/"&&n.type!==$a)thrownewError("This OpenDocument is not a spreadsheet");break;case"encryption-data":;case"algorithm":;case"start-key-generation":;case"key-derivation":thrownewError("Unsupported ODS Encryption");default:if(r&&r.WTF)throwa;}}functionYa(e){varr=[ye];r.push('<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">\n');r.push('<manifest:file
;case1036:break;case357:;case358:;case355:;case667:if(!s[0].length)s[0]=[o,e];elses.push([o,e]);s[s.length-1].XTI=[];break;case362:if(s.length===0){s[0]=[];s[0].XTI=[]}s[s.length-1].XTI=s[s.length-1].XTI.concat(e);s.XTI=s.XTI.concat(e);break;case361:break;case2071:;case158:;case143:;case664:;case353:break;case3072:;case3073:;case534:;case677:;case157:;case610:;case2050:;case155:;case548:;case676:;case128:;case665:;case2128:;case2125:;case549:;case2053:;case596:;case2076:;case2075:;case2082:;case397:;case154:;case1117:;case553:;case2091:break;case35:a.push(l);n=true;break;case36:a.pop();n=false;break;case37:a.push(l);n=true;break;case38:a.pop();n=false;break;case16:break;default:if((l||"").indexOf("Begin")>0){}elseif((l||"").indexOf("End")>0){}elseif(!n||r.WTF&&a[a.length-1]!="BrtACBegin"&&a[a.length-1]!="BrtFRTBegin")thrownewError("Unexpected record "+o+" "+l);}},r);yv(t);t.Names=i;t.supbooks=s;returnt}functionjv(e,r){et(e,"BrtBeginBundleShs");for(vart=0;t!=r.SheetNames.length;++t){vara=r.Workbook&&r.Workbook.Sheets&&r.Workbook.Sheets[t]&&r.Workbook.Sheets[t].Hidden||0;varn={Hidden:a,iTabID:t+1,strRelID:"rId"+(t+1),name:r.SheetNames[t]};et(e,"BrtBundleSh",Hv(n))}et(e,"BrtEndBundleShs")}function$v(r,t){if(!t)t=Jr(127);for(vara=0;a!=4;++a)t._W(4,0);At("SheetJS",t);At(e.version,t);At(e.version,t);At("7262",t);returnt.length>t.l?t.slice(0,t.l):t}functionKv(e,r){if(!r)r=Jr(29);r._W(-4,0);r._W(-4,460);r._W(4,28800);r._W(4,17600);r._W(4,500);r._W(4,e);r._W(4,e);vart=120;r._W(1,t);returnr.length>r.l?r.slice(0,r.l):r}functionYv(e,r){if(!r.Workbook||!r.Workbook.Sheets)return;vart=r.Workbook.Sheets;vara=0,n=-1,i=-1;for(;a<t.length;++a){if(!t[a]||!t[a].Hidden&&n==-1)n=a;elseif(t[a].Hidden==1&&i==-1)i=a}if(i>n)return;et(e,"BrtBeginBookViews");et(e,"BrtBookView",Kv(n));et(e,"BrtEndBookViews")}functionQv(e,r){vart=qr();et(t,"BrtBeginBook");et(t,"BrtFileVersion",$v());et(t,"BrtWbProp",Vv(e.Workbook&&e.Workbook.WBProps||null));Yv(t,e,r);jv(t,e,r);et(t,"BrtEndBook");returnt.end()}functionJv(e,r,t){if(r.slice(-4)===".bin")returnzv(e,t);returnNv(e,t)}functionZv(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")returntv(e,a,t,n,i,s,f);returnIh(e,a,t,n,i,s,f)}functionqv(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")returnwv(e,a,t,n,i,s,f);returngv(e,a,t,n,i,s,f)}functionep(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")returnic(e,a,t,n,i,s,f);returnsc(e,a,t,n,i,s,f)}functionrp(e,r,t,a,n,i,s,f){if(r.slice(-4)===".bin")returnac(e,a,t,n,i,s,f);returnnc(e,a,t,n,i,s,f)}functiontp(e,r,t,a){if(r.slice(-4)===".bin")returnao(e,t,a);returnUl(e,t,a)}functionap(e,r,t){returnTo(e,t)}functionnp(e,r,t){if(r.slice(-4)===".bin")returnNf(e,t);returnFf(e,t)}functionip(e,r,t){if(r.slice(-4)===".bin")returnJo(e,t);returnGo(e,t)}functionsp(e,r,t){if(r.slice(-4)===".bin")returnMo(e,r,t);returnPo(e,r,t)}functionfp(e,r,t,a){if(t.slice(-4)===".bin")returnUo(e,r,t,a);returnLo(e,r,t,a)}functionlp(e,r,t){return(r.slice(-4)===".bin"?Qv:Lv)(e,t)}functionop(e,r,t,a,n){return(r.slice(-4)===".bin"?vv:Jh)(e,t,a,n)}functioncp(e,r,t,a,n){return(r.slice(-4)===".bin"?Sv:Ev)(e,t,a,n)}functionup(e,r,t){return(r.slice(-4)===".bin"?po:Wl)(e,t)}functionhp(e,r,t){return(r.slice(-4)===".bin"?Uf:Of)(e,t)}functiondp(e,r,t){return(r.slice(-4)===".bin"?Zo:jo)(e,t)}varvp=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g;varpp=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;functionbp(e,r){vart=e.split(/\s+/);vara=[];if(!r)a[0]=t[0];if(t.length===1)returna;varn=e.match(vp),i,s,f,l;if(n)for(l=0;l!=n.length;++l){i=n[l].match(pp);if((s=i[1].indexOf(":"))===-1)a[i[1]]=i[2].slice(1,i[2].length-1);else{if(i[1].slice(0,6)==="xmlns:")f="xmlns"+i[1].slice(6);elsef=i[1].slice(s+1);a[f]=i[2].slice(1,i[2].length-1)}}returna}functionmp(e){varr=e.split(/\s+/);vart={};if(r.length===1)returnt;vara=e.match(vp),n,i,s,f;if(a)for(f=0;f!=a.length;++f){n=a[f].match(pp);if((i=n[1].indexOf(":"))===-1)t[n[1]]=n[2].slice(1,n[2].length-1);else{if(n[1].slice(0,6)==="xmlns:")s="xmlns"+n[1].slice(6);elses=n[1].slice(i+1)
if(!re.valid)thrownewError("Password is incorrect");break;case"WriteAccess":R.lastuser=re;break;case"FileSharing":break;case"CodePage":varae=Number(re);switch(ae){case21010:ae=1200;break;case32768:ae=1e4;break;case32769:ae=1252;break;}l(R.codepage=ae);Y=true;break;case"RRTabId":R.rrtabid=re;break;case"WinProtect":R.winlocked=re;break;case"Template":break;case"BookBool":break;case"UsesELFs":break;case"MTRSettings":break;case"RefreshAll":;case"CalcCount":;case"CalcDelta":;case"CalcIter":;case"CalcMode":;case"CalcPrecision":;case"CalcSaveRecalc":t.opts[te]=re;break;case"CalcRefMode":R.CalcRefMode=re;break;case"Uncalced":break;case"ForceFullCalculation":t.opts.FullCalc=re;break;case"WsBool":if(re.fDialog)n["!type"]="dialog";break;case"XF":C.push(re);break;case"ExtSST":break;case"BookExt":break;case"RichTextStream":break;case"BkHim":break;case"SupBook":W.push([re]);W[W.length-1].XTI=[];break;case"ExternName":W[W.length-1].push(re);break;case"Index":break;case"Lbl":$={Name:re.Name,Ref:Xu(re.rgce,s,null,W,R)};if(re.itab>0)$.Sheet=re.itab-1;W.names.push($);if(!W[0]){W[0]=[];W[0].XTI=[]}W[W.length-1].push(re);if(re.Name=="_xlnm._FilterDatabase"&&re.itab>0)if(re.rgce&&re.rgce[0]&&re.rgce[0][0]&&re.rgce[0][0][0]=="PtgArea3d")j[re.itab-1]={ref:Et(re.rgce[0][0][1][2])};break;case"ExternCount":R.ExternCount=re;break;case"ExternSheet":if(W.length==0){W[0]=[];W[0].XTI=[]}W[W.length-1].XTI=W[W.length-1].XTI.concat(re);W.XTI=W.XTI.concat(re);break;case"NameCmt":if(R.biff<8)break;if($!=null)$.Comment=re[1];break;case"Protect":n["!protect"]=re;break;case"Password":if(re!==0&&R.WTF)console.error("Password verifier: "+re);break;case"Prot4Rev":;case"Prot4RevPass":break;case"BoundSheet8":{i[re.pos]=re;R.snames.push(re.name)}break;case"EOF":{if(--X)break;if(s.e){if(s.e.r>0&&s.e.c>0){s.e.r--;s.e.c--;n["!ref"]=Et(s);if(r.sheetRows&&r.sheetRows<=s.e.r){varne=s.e.r;s.e.r=r.sheetRows-1;n["!fullref"]=n["!ref"];n["!ref"]=Et(s);s.e.r=ne}s.e.r++;s.e.c++}if(O.length>0)n["!merges"]=O;if(P.length>0)n["!objects"]=P;if(N.length>0)n["!cols"]=N;if(M.length>0)n["!rows"]=M;_.Sheets.push(x)}if(c==="")u=n;elsea[c]=n;n=r.dense?[]:{}}break;case"BOF":{if(R.biff===8)R.biff={9:2,521:3,1033:4}[J]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[re.BIFFVer]||8;if(R.biff==8&&re.BIFFVer==0&&re.dt==16)R.biff=2;if(X++)break;B=true;n=r.dense?[]:{};if(R.biff<8&&!Y){Y=true;l(R.codepage=r.codepage||1252)}if(R.biff<5){if(c==="")c="Sheet1";s={s:{r:0,c:0},e:{r:0,c:0}};varie={pos:e.l-Z,name:c};i[ie.pos]=ie;R.snames.push(c)}elsec=(i[Q]||{name:""}).name;if(re.dt==32)n["!type"]="chart";if(re.dt==64)n["!type"]="macro";O=[];P=[];R.arrayf=k=[];N=[];M=[];L=U=0;H=false;x={Hidden:(i[Q]||{hs:0}).hs,name:c}}break;case"Number":;case"BIFF2NUM":;case"BIFF2INT":{if(n["!type"]=="chart")if(r.dense?(n[re.r]||[])[re.c]:n[mt({c:re.c,r:re.r})])++re.c;w={ixfe:re.ixfe,XF:C[re.ixfe]||{},v:re.val,t:"n"};if(G>0)w.z=z[w.ixfe>>8&31];Xp(w,r,t.opts.Date1904);I({c:re.c,r:re.r},w,r)}break;case"BoolErr":{w={ixfe:re.ixfe,XF:C[re.ixfe],v:re.val,t:re.t};if(G>0)w.z=z[w.ixfe>>8&31];Xp(w,r,t.opts.Date1904);I({c:re.c,r:re.r},w,r)}break;case"RK":{w={ixfe:re.ixfe,XF:C[re.ixfe],v:re.rknum,t:"n"};if(G>0)w.z=z[w.ixfe>>8&31];Xp(w,r,t.opts.Date1904);I({c:re.c,r:re.r},w,r)}break;case"MulRk":{for(varse=re.c;se<=re.C;++se){varfe=re.rkrec[se-re.c][0];w={ixfe:fe,XF:C[fe],v:re.rkrec[se-re.c][1],t:"n"};if(G>0)w.z=z[w.ixfe>>8&31];Xp(w,r,t.opts.Date1904);I({c:se,r:re.r},w,r)}}break;case"Formula":{if(re.val=="String"){f=re;break}w=Gp(re.val,re.cell.ixfe,re.tt);w.XF=C[w.ixfe];if(r.cellFormula){varle=re.formula;if(le&&le[0]&&le[0][0]&&le[0][0][0]=="PtgExp"){varoe=le[0][0][1][0],ce=le[0][0][1][1];varue=mt({r:oe,c:ce});if(E[ue])w.f=""+Xu(re.formula,s,re.cell,W,R);elsew.F=((r.dense?(n[oe]||[])[ce]:n[ue])||{}).F}elsew.f=""+Xu(re.formula,s,re.cell,W,R)}if(G>0)w.z=z[w.ixfe>>8&31];Xp(w,r,t.opts.Date1904);I(re.cell,w,r);f=re}break;case"String":{if(f){f.val=re;w=Gp(re,f.cell.ixfe,"s");w.XF=C[w.ixfe];if(r.cellFormula){w.f=""+Xu(f.formula,s,f.cell,W,R)}if(G>0)w.z=z[w.ixfe>>8&31];Xp(w,r,t.opts.Date1904);I(f.cell,w,r);f=null}elsethrownewE