for(vara=0;a!==t.length;++a){if(r[e[t[a]]]==null)r[e[t[a]]]=[];r[e[t[a]]].push(t[a])}returnr}varcr=Date.UTC(1899,11,30,0,0,0);varfr=Date.UTC(1899,11,31,0,0,0);varur=Date.UTC(1904,0,1,0,0,0);functionhr(e,r){vart=e.getTime();vara=(t-cr)/(24*60*60*1e3);if(r){a-=1462;returna<-1402?a-1:a}returna<60?a-1:a}functiondr(e){if(e>=60&&e<61)returne;varr=newDate;r.setTime((e>60?e:e+1)*24*60*60*1e3+cr);returnr}functionpr(e){varr=0,t=0,a=false;varn=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!n)thrownewError("|"+e+"| is not an ISO8601 Duration");for(vari=1;i!=n.length;++i){if(!n[i])continue;t=1;if(i>3)a=true;switch(n[i].slice(n[i].length-1)){case"Y":thrownewError("Unsupported ISO Duration Field: "+n[i].slice(n[i].length-1));case"D":t*=24;case"H":t*=60;case"M":if(!a)thrownewError("Unsupported ISO Duration Field: M");elset*=60;case"S":break;}r+=t*parseInt(n[i],10)}returnr}varmr=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/;varvr=/^(\d+)-(\d+)-(\d+)$/;vargr=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;functionbr(e,r){if(einstanceofDate)returne;vart=e.match(mr);if(t)returnnewDate((r?ur:fr)+((parseInt(t[1],10)*60+parseInt(t[2],10))*60+(t[3]?parseInt(t[3].slice(1),10):0))*1e3+(t[4]?parseInt((t[4]+"000").slice(1,4),10):0));t=e.match(vr);if(t)returnnewDate(Date.UTC(+t[1],+t[2]-1,+t[3],0,0,0,0));t=e.match(gr);if(t)returnnewDate(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4],+t[5],t[6]&&parseInt(t[6].slice(1),10)||0,t[7]&&parseInt(t[7].slice(1),10)||0));vara=newDate(e);returna}functionwr(e,r){if(_&&Buffer.isBuffer(e)){if(r&&T){if(e[0]==255&&e[1]==254)returnkt(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)returnkt(d(e.slice(2).toString("binary")))}returne.toString("binary")}if(typeofTextDecoder!=="undefined")try{if(r){if(e[0]==255&&e[1]==254)returnkt(newTextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)returnkt(newTextDecoder("utf-16be").decode(e.slice(2)))}vart={"€":"","‚":"","ƒ":"","„":"","…":"","†":"","‡":"","ˆ":"","‰":"","Š":"","‹":"","Œ":"","Ž":"","‘":"","’":"","“":"","”":"","•":"","–":"","—":"","˜":"","™":"","š":"","›":"","œ":"","ž":"","Ÿ":""};if(Array.isArray(e))e=newUint8Array(e);returnnewTextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(e){returnt[e]||e})}catch(a){}varn=[],i=0;try{for(i=0;i<e.length-65536;i+=65536)n.push(String.fromCharCode.apply(0,e.slice(i,i+65536)));n.push(String.fromCharCode.apply(0,e.slice(i)))}catch(a){try{for(;i<e.length-16384;i+=16384)n.push(String.fromCharCode.apply(0,e.slice(i,i+16384)));n.push(String.fromCharCode.apply(0,e.slice(i)))}catch(a){for(;i!=e.length;++i)n.push(String.fromCharCode(e[i]))}}returnn.join("")}functionkr(e){if(typeofJSON!="undefined"&&!Array.isArray(e))returnJSON.parse(JSON.stringify(e));if(typeofe!="object"||e==null)returne;if(einstanceofDate)returnnewDate(e.getTime());varr={};for(vartine)if(Object.prototype.hasOwnProperty.call(e,t))r[t]=kr(e[t]);returnr}functionyr(e,r){vart="";while(t.length<r)t+=e;returnt}functionxr(e){varr=Number(e);if(!isNaN(r))returnisFinite(r)?r:NaN;if(!/\d/.test(e))returnr;vart=1;vara=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){t*=100;return""});if(!isNaN(r=Number(a)))returnr/t;a=a.replace(/[(](.*)[)]/,function(e,r){t=-t;returnr});if(!isNaN(r=Number(a)))returnr/t;returnr}varSr=/^(0?\d|1[0-2])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))\s+([ap])m?$/;varCr=/^([01]?\d|2[0-3])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))$/;var_r=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)(\.\d+)?[Z]?$/;varAr=newDate("6/9/69 00:00 UTC").valueOf()==-177984e5;functionTr(e){if(!e[2])returnnewDate(Date.UTC(1899,11,31,+e[1]%12+(e[7]=="p"?12:0),0,0,0));if(e[3]){if(e[4])returnnewDate(Date.UTC(1899,11,31,+e[1]%12+(e[7]=="p"?12:0),+e[2],+e[4],parseFloat(e[3])*1e3));elsereturnnewDate(Date.UTC(1899,11,31,e
P="n";if(p!==null&&Pe(p)&&i.cellDates){_=dr(y.Workbook.WBProps.date1904?_+1462:_);P=typeof_=="number"?"n":"d"}}if(typeofa!=="undefined"&&typeof_=="string"&&(i||{}).type!="string"&&(i||{}).codepage)_=a.utils.decode(i.codepage,_);E=true;break;case"E":O=true;I=Fs(S[u].slice(1),{r:l,c:c});break;case"S":D=true;break;case"G":break;case"R":M=parseInt(S[u].slice(1),10)-1;break;case"C":N=parseInt(S[u].slice(1),10)-1;break;default:if(i&&i.WTF)thrownewError("SYLK bad record "+x);}if(E){if(!h[l][c])h[l][c]={t:P,v:_};else{h[l][c].t=P;h[l][c].v=_}if(p)h[l][c].z=p;if(i.cellText!==false&&p)h[l][c].w=ze(h[l][c].z,h[l][c].v,{date1904:y.Workbook.WBProps.date1904});p=null}if(D){if(O)thrownewError("SYLK shared formula cannot have own formula");varL=M>-1&&h[M][N];if(!L||!L[1])thrownewError("SYLK shared formula cannot find base");I=Ms(L[1],{r:l-M,c:c-N})}if(I){if(!h[l][c])h[l][c]={t:"n",f:I};elseh[l][c].f=I}if(R){if(!h[l][c])h[l][c]={t:"z"};h[l][c].c=[{a:"SheetJSYLK",t:R}]}break;case"F":varB=0;for(u=1;u<S.length;++u)switch(S[u].charAt(0)){case"X":c=parseInt(S[u].slice(1),10)-1;++B;break;case"Y":l=parseInt(S[u].slice(1),10)-1;for(k=h.length;k<=l;++k)h[k]=[];break;case"M":w=parseInt(S[u].slice(1),10)/20;break;case"F":break;case"G":break;case"P":p=d[parseInt(S[u].slice(1),10)];break;case"S":break;case"D":break;case"N":break;case"W":b=S[u].slice(1).split(" ");for(k=parseInt(b[0],10);k<=parseInt(b[1],10);++k){w=parseInt(b[2],10);g[k-1]=w===0?{hidden:true}:{wch:w}}break;case"C":c=parseInt(S[u].slice(1),10)-1;if(!g[c])g[c]={};break;case"R":l=parseInt(S[u].slice(1),10)-1;if(!v[l])v[l]={};if(w>0){v[l].hpt=w;v[l].hpx=Pi(w)}elseif(w===0)v[l].hidden=true;break;default:if(i&&i.WTF)thrownewError("SYLK bad record "+x);}if(B<1)p=null;break;default:if(i&&i.WTF)thrownewError("SYLK bad record "+x);}}if(v.length>0)m["!rows"]=v;if(g.length>0)m["!cols"]=g;g.forEach(function(e){Oi(e)});if(i&&i.sheetRows)h=h.slice(0,i.sheetRows);return[h,m,y]}functionc(e,r){vart=s(e,r);vara=t[0],n=t[1],i=t[2];varl=kr(r);l.date1904=(((i||{}).Workbook||{}).WBProps||{}).date1904;varo=Ka(a,l);nr(n).forEach(function(e){o[e]=n[e]});varc=Ya(o,r);nr(i).forEach(function(e){c[e]=i[e]});c.bookType="sylk";returnc}functionf(e,r,t,a,n,i){vars="C;Y"+(t+1)+";X"+(a+1)+";K";switch(e.t){case"n":s+=e.v||0;if(e.f&&!e.F)s+=";E"+Os(e.f,{r:t,c:a});break;case"b":s+=e.v?"TRUE":"FALSE";break;case"e":s+=e.w||e.v;break;case"d":s+=hr(br(e.v,i),i);break;case"s":s+='"'+(e.v==null?"":String(e.v)).replace(/"/g,"").replace(/;/g,";;")+'"';break;}returns}functionu(e,r,t){vara="C;Y"+(r+1)+";X"+(t+1)+";A";a+=i(e.map(function(e){returne.t}).join(""));returna}functionh(e,r){r.forEach(function(r,t){vara="F;W"+(t+1)+" "+(t+1)+" ";if(r.hidden)a+="0";else{if(typeofr.width=="number"&&!r.wpx)r.wpx=Ai(r.width);if(typeofr.wpx=="number"&&!r.wch)r.wch=Ti(r.wpx);if(typeofr.wch=="number")a+=Math.round(r.wch)}if(a.charAt(a.length-1)!=" ")e.push(a)})}functiond(e,r){r.forEach(function(r,t){vara="F;";if(r.hidden)a+="M0;";elseif(r.hpt)a+="M"+20*r.hpt+";";elseif(r.hpx)a+="M"+20*Ii(r.hpx)+";";if(a.length>2)e.push(a+"R"+(t+1))})}functionp(e,r,t){if(!r)r={};r._formats=["General"];vara=["ID;PSheetJS;N;E"],n=[];vari=Va(e["!ref"]),s;varl=e["!data"]!=null;varo="\r\n";varc=(((t||{}).Workbook||{}).WBProps||{}).date1904;varp="General";a.push("P;PGeneral");varm=i.s.r,v=i.s.c,g=[];for(m=i.s.r;m<=i.e.r;++m){if(l&&!e["!data"][m])continue;g=[];for(v=i.s.c;v<=i.e.c;++v){s=l?e["!data"][m][v]:e[Pa(v)+Oa(m)];if(!s||!s.c)continue;g.push(u(s.c,m,v))}if(g.length)n.push(g.join(o))}for(m=i.s.r;m<=i.e.r;++m){if(l&&!e["!data"][m])continue;g=[];for(v=i.s.c;v<=i.e.c;++v){s=l?e["!data"][m][v]:e[Pa(v)+Oa(m)];if(!s||s.v==null&&(!s.f||s.F))continue;if((s.z||(s.t=="d"?q[14]:"General"))!=p){varb=r._formats.indexOf(s.z);if(b==-1){r._formats.push(s.z);b=r._formats.length-1;a.push("P;P"+s.z.replace(/;/g,";;"))}g.push("F;P"+b+";Y"+(m+1)+";X"+(v+1))}g.push(f(s,e,m,v,r,c))}n.push(g.join(o))}a.push("F;P0;DG0G8;M255");if(e["!cols"])h(a,e["!cols"]);if(e["!rows"])d(a,e["!rows"]);a.push("B;Y"+(i.e.r-i.s.r+1)+";X"+(i.e.c-i.s.c+1)+";D"+[i
}v="xl/comments"+l+"."+t;jr(i,v,vs(p,r));n.comments.push(v);Dn(u,-1,"../comments"+l+"."+t,An.CMNT);m=true}if(h["!legacy"]){if(m)jr(i,"xl/drawings/vmlDrawing"+l+".vml",hs(l,h["!comments"]))}deleteh["!comments"];deleteh["!legacy"]}if(u["!id"].rId1)jr(i,Tn(s),Fn(u))}if(r.Strings!=null&&r.Strings.length>0){s="xl/sharedStrings."+t;jr(i,s,vi(r.Strings,r));n.strs.push(s);Dn(r.wbrels,-1,"sharedStrings."+t,An.SST)}s="xl/workbook."+t;jr(i,s,Vl(e,r));n.workbooks.push(s);Dn(r.rels,1,s,An.WB);s="xl/theme/theme1.xml";jr(i,s,ns(e.Themes,r));n.themes.push(s);Dn(r.wbrels,-1,"theme/theme1.xml",An.THEME);s="xl/styles."+t;jr(i,s,Gi(e,r));n.styles.push(s);Dn(r.wbrels,-1,"styles."+t,An.STY);if(e.vbaraw&&a){s="xl/vbaProject.bin";jr(i,s,e.vbaraw);n.vba.push(s);Dn(r.wbrels,-1,"vbaProject.bin",An.VBA)}s="xl/metadata."+t;jr(i,s,ss());n.metadata.push(s);Dn(r.wbrels,-1,"metadata."+t,An.XLMETA);if(f.length>1){s="xl/persons/person.xml";jr(i,s,ks(f,r));n.people.push(s);Dn(r.wbrels,-1,"persons/person.xml",An.PEOPLE)}jr(i,"[Content_Types].xml",_n(n,r));jr(i,"_rels/.rels",Fn(r.rels));jr(i,"xl/_rels/workbook."+t+".rels",Fn(r.wbrels));deleter.revssf;deleter.ssf;returni}functionBo(e,r){vart="";switch((r||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":t=C(e.slice(0,12));break;case"binary":t=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:thrownewError("Unrecognized type "+(r&&r.type||"undefined"));}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t.charCodeAt(5),t.charCodeAt(6),t.charCodeAt(7)]}functionUo(e,r){if(qe.find(e,"EncryptedPackage"))returnPo(e,r);returnparse_xlscfb(e,r)}functionzo(e,r){vart,a=e;varn=r||{};if(!n.type)n.type=_&&Buffer.isBuffer(e)?"buffer":"base64";t=Vr(a,n);returnIo(t,n)}function$o(e,r){vart=0;e:while(t<e.length)switch(e.charCodeAt(t)){case10:;case13:;case32:++t;break;case60:returnparse_xlml(e.slice(t),r);default:breake;}returnti.to_workbook(e,r)}functionWo(e,r){vart="",a=Bo(e,r);switch(r.type){case"base64":t=C(e);break;case"binary":t=e;break;case"buffer":t=e.toString("binary");break;case"array":t=wr(e);break;default:thrownewError("Unrecognized type "+r.type);}if(a[0]==239&&a[1]==187&&a[2]==191)t=wt(t);r.type="binary";return$o(t,r)}functionjo(e,r){vart=e;if(r.type=="base64")t=C(t);if(typeofArrayBuffer!=="undefined"&&einstanceofArrayBuffer)t=newUint8Array(e);t=typeofa!=="undefined"?a.utils.decode(1200,t.slice(2),"str"):_&&Buffer.isBuffer(e)?e.slice(2).toString("utf16le"):typeofUint8Array!=="undefined"&&tinstanceofUint8Array?typeofTextDecoder!=="undefined"?newTextDecoder("utf-16le").decode(t.slice(2)):h(t.slice(2)):u(t.slice(2));r.type="binary";return$o(t,r)}functionHo(e){return!e.match(/[^\x00-\x7F]/)?e:kt(e)}functionVo(e,r,t,a){if(a){t.type="string";returnti.to_workbook(e,t)}returnti.to_workbook(r,t)}functionXo(e,r){c();vart=r||{};if(t.codepage&&typeofa==="undefined")console.error("Codepage tables are not loaded. Non-ASCII characters may not give expected results");if(typeofArrayBuffer!=="undefined"&&einstanceofArrayBuffer)returnXo(newUint8Array(e),(t=kr(t),t.type="array",t));if(typeofUint8Array!=="undefined"&&einstanceofUint8Array&&!t.type)t.type=typeofDeno!=="undefined"?"buffer":"array";varn=e,i=[0,0,0,0],s=false;if(t.cellStyles){t.cellNF=true;t.sheetStubs=true}$s={};if(t.dateNF)$s.dateNF=t.dateNF;if(!t.type)t.type=_&&Buffer.isBuffer(e)?"buffer":"base64";if(t.type=="file"){t.type=_?"buffer":"binary";n=ar(e);if(typeofUint8Array!=="undefined"&&!_)t.type="array"}if(t.type=="string"){s=true;t.type="binary";t.codepage=65001;n=Ho(e)}if(t.type=="array"&&typeofUint8Array!=="undefined"&&einstanceofUint8Array&&typeofArrayBuffer!=="undefined"){varl=newArrayBuffer(3),o=newUint8Array(l);o.foo="bar";if(!o.foo){t=kr(t);t.type="array";returnXo(I(n),t)}}switch((i=Bo(n,t))[0]){case208:if(i[1]===207&&i[2]===17&&i[3]===224&&i[4]===161&&i[5]===177&&i[6]===26&&i[7]===225)returnUo(qe.read(n,t),t);break;case9:if(i[1]<=8)returnparse_xlscfb(n,t);break;case60:returnparse_x