r._W(2,t.r);r._W(2,t.r);r._W(2,t.c);r._W(2,t.c);vara="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" ");for(varn=0;n<16;++n)r._W(1,parseInt(a[n],16));returnT([r,Hn(e[1])])}functionhs(e,r){e._R(2);vart=Zn(e,8);vara=e._R((r-10)/2,"dbcs-cont");a=a.replace(x,"");return[t,a]}functionds(e){varr=e[1].Tooltip;vart=Ur(10+2*(r.length+1));t._W(2,2048);vara=nt(e[0]);t._W(2,a.r);t._W(2,a.r);t._W(2,a.c);t._W(2,a.c);for(varn=0;n<r.length;++n)t._W(2,r.charCodeAt(n));t._W(2,0);returnt}functionvs(e){varr=[0,0],t;t=e._R(2);r[0]=ca[t]||t;t=e._R(2);r[1]=ca[t]||t;returnr}functionps(e){if(!e)e=Ur(4);e._W(2,1);e._W(2,1);returne}functionms(e){varr=e._R(2);vart=[];while(r-->0)t.push(Vn(e,8));returnt}functionbs(e){varr=e._R(2);vart=[];while(r-->0)t.push(Vn(e,8));returnt}functiongs(e){e.l+=2;varr={cxfs:0,crc:0};r.cxfs=e._R(2);r.crc=e._R(4);returnr}functionEs(e,r,t){if(!t.cellStyles)returnMr(e,r);vara=t&&t.biff>=12?4:2;varn=e._R(a);vari=e._R(a);vars=e._R(a);varl=e._R(a);varo=e._R(2);if(a==2)e.l+=2;return{s:n,e:i,w:s,ixfe:l,flags:o}}functionks(e){varr={};e.l+=16;r.header=Mt(e,8);r.footer=Mt(e,8);e.l+=2;returnr}functionws(e,r,t){vara={area:false};if(t.biff!=5){e.l+=r;returna}varn=e._R(1);e.l+=3;if(n&16)a.area=true;returna}functionSs(e){varr=Ur(2*e);for(vart=0;t<e;++t)r._W(2,t+1);returnr}varCs=zn;var_s=Bn;varBs=Rn;functionTs(e){varr=e._R(2);vart=e._R(2);vara=e._R(4);varn={fmt:r,env:t,len:a,data:e.slice(e.l,e.l+a)};e.l+=a;returnn}functionxs(e,r,t){vara=zn(e,6);++e.l;varn=Dn(e,r-7,t);a.t="str";a.val=n;returna}functionIs(e){varr=zn(e,6);++e.l;vart=Mt(e,8);r.t="n";r.val=t;returnr}functionAs(e,r,t){vara=Ur(15);Hv(a,e,r);a._W(8,t,"f");returna}functionys(e){varr=zn(e,6);++e.l;vart=e._R(2);r.t="n";r.val=t;returnr}functionRs(e,r,t){vara=Ur(9);Hv(a,e,r);a._W(2,t);returna}functionDs(e){varr=e._R(1);if(r===0){e.l++;return""}returne._R(r,"sbcs-cont")}functionFs(e,r){e.l+=6;e.l+=2;e.l+=1;e.l+=3;e.l+=1;e.l+=r-13}functionOs(e,r,t){vara=e.l+r;varn=zn(e,6);vari=e._R(2);vars=yn(e,i,t);e.l=a;n.t="str";n.val=s;returnn}varPs=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};functionr(r,t){vara=[];varn=k(1);switch(t.type){case"base64":n=w(g.decode(r));break;case"binary":n=w(r);break;case"buffer":;case"array":n=r;break;}Lr(n,0);vari=n._R(1);vars=false;varl=false,o=false;switch(i){case2:;case3:break;case48:l=true;s=true;break;case49:l=true;break;case131:s=true;break;case139:s=true;break;case140:s=true;o=true;break;case245:s=true;break;default:thrownewError("DBF Unsupported Version: "+i.toString(16));}varf=0,c=0;if(i==2)f=n._R(2);n.l+=3;if(i!=2)f=n._R(4);if(i!=2)c=n._R(2);varu=n._R(2);varh=1252;if(i!=2){n.l+=16;n._R(1);if(n[n.l]!==0)h=e[n[n.l]];n.l+=1;n.l+=2}if(o)n.l+=36;vard=[],v={};varp=c-10-(l?264:0),m=o?32:11;while(i==2?n.l<n.length&&n[n.l]!=13:n.l<p){v={};v.name=cptable.utils.decode(h,n.slice(n.l,n.l+m)).replace(/[\u0000\r\n].*$/g,"");n.l+=m;v.type=String.fromCharCode(n._R(1));if(i!=2&&!o)v.offset=n._R(4);v.len=n._R(1);if(i==2)v.offset=n._R(2);v.dec=n._R(1);if(v.name.length)d.push(v);if(i!=2)n.l+=o?13:14;switch(v.type){case"B":if((!l||v.len!=8)&&t.WTF)console.log("Skipping "+v.name+":"+v.type);break;case"G":;case"P":if(t.WTF)console.log("Skipping "+v.name+":"+v.type);break;case"C":;case"D":;case"F":;case"I":;case"L":;case"M":;case"N":;case"O":;case"T":;case"Y":;case"0":;case"@":;case"+":break;default:thrownewError("Unknown Field Type: "+v.type);}}if(n[n.l]!==13)n.l=c-1;elseif(i==2)n.l=521;if(i!=2){if(n._R(1)!==13)thrownewError("DBF Terminator not found "+n.l+" "+n[n.l]);n.l=c}varb=0,E=0;a[0]=[];for(E=0;E!
r.Salt=e._R(16);r.EncryptedVerifier=e._R(16);r.EncryptedVerifierHash=e._R(16);returnr}functionkl(e){varr=0,t;vara=nl(e);varn=a.length+1,i,s;varl,o,f;t=k(n);t[0]=a.length;for(i=1;i!=n;++i)t[i]=a[i-1];for(i=n-1;i>=0;--i){s=t[i];l=(r&16384)===0?0:1;o=r<<1&32767;f=l|o;r=f^s}returnr^52811}varwl=function(){vare=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0];varr=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163];vart=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628];vara=function(e){return(e/2|e*128)&255};varn=function(e,r){returna(e^r)};vari=function(e){vara=r[e.length-1];varn=104;for(vari=e.length-1;i>=0;--i){vars=e[i];for(varl=0;l!=7;++l){if(s&64)a^=t[n];s*=2;--n}}returna};returnfunction(r){vart=nl(r);vara=i(t);vars=t.length;varl=k(16);for(varo=0;o!=16;++o)l[o]=0;varf,c,u;if((s&1)===1){f=a>>8;l[s]=n(e[0],f);--s;f=a&255;c=t[t.length-1];l[s]=n(c,f)}while(s>0){--s;f=a>>8;l[s]=n(t[s],f);--s;f=a&255;l[s]=n(t[s],f)}s=15;u=15-t.length;while(u>0){f=a>>8;l[s]=n(e[u],f);--s;--u;f=a&255;l[s]=n(t[s],f);--s;--u}returnl}}();varSl=function(e,r,t,a,n){if(!n)n=r;if(!a)a=wl(e);vari,s;for(i=0;i!=r.length;++i){s=r[i];s^=a[t];s=(s>>5|s<<3)&255;n[i]=s;++t}return[n,t,a]};varCl=function(e){varr=0,t=wl(e);returnfunction(e){vara=Sl("",e,r,t);r=a[1];returna[0]}};function_l(e,r,t,a){varn={key:Cn(e),verificationBytes:Cn(e)};if(t.password)n.verifier=kl(t.password);a.valid=n.verificationBytes===n.verifier;if(a.valid)a.insitu=Cl(t.password);returnn}functionBl(e,r,t){vara=t||{};a.Info=e._R(2);e.l-=2;if(a.Info===1)a.Data=El(e,r);elsea.Data=gl(e,r);returna}functionTl(e,r,t){vara={Type:t.biff>=8?e._R(2):0};if(a.Type)Bl(e,r-2,a);else_l(e,r-2,t,a);returna}varxl=function(){functione(e,t){switch(t.type){case"base64":returnr(g.decode(e),t);case"binary":returnr(e,t);case"buffer":returnr(e.toString("binary"),t);case"array":returnr(te(e),t);}thrownewError("Unrecognized type "+t.type)}functionr(e,r){vart=r||{};vara=t.dense?[]:{};varn={s:{c:0,r:0},e:{c:0,r:0}};if(!e.match(/\\trowd/))thrownewError("RTF missing table");a["!ref"]=lt(n);returna}functiont(r,t){returnut(e(r,t),t)}functiona(e){varr=["{\\rtf1\\ansi"];vart=ot(e["!ref"]),a;varn=Array.isArray(e);for(vari=t.s.r;i<=t.e.r;++i){r.push("\\trowd\\trautofit1");for(vars=t.s.c;s<=t.e.c;++s)r.push("\\cellx"+(s+1));r.push("\\pard\\intbl");for(s=t.s.c;s<=t.e.c;++s){varl=it({r:i,c:s});a=n?(e[i]||[])[s]:e[l];if(!a||a.v==null&&(!a.f||a.F))continue;r.push(" "+(a.w||(ct(a),a.w)));r.push("\\cell")}r.push("\\pard\\intbl\\row")}returnr.join("")+"}"}return{to_workbook:t,to_sheet:e,from_sheet:a}}();functionIl(e){varr=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16)]}functionAl(e){for(varr=0,t=1;r!=3;++r)t=t*256+(e[r]>255?255:e[r]<0?0:e[r]);returnt.toString(16).toUpperCase().slice(1)}functionyl(e){varr=e[0]/255,t=e[1]/255,a=e[2]/255;varn=Math.max(r,t,a),i=Math.min(r,t,a),s=n-i;if(s===0)return[0,0,r];varl=0,o=0,f=n+i;o=s/(f>1?2-f:f);switch(n){caser:l=((t-a)/s+6)%6;break;caset:l=(a-r)/s+2;break;casea:l=(r-t)/s+4;break;}return[l/6,o,f/2]}functionRl(e){varr=e[0],t=e[1],a=e[2];varn=t*2*(a<.5?a:1-a),i=a-n/2;vars=[i,i,i],l=6*r;varo;if(t!==0)switch(l|0){case0:;case6:o=n*l;s[0]+=n;s[1]+=o;break;case1:o=n*(2-l);s[0]+=o;s[1]+=n;break;case2:o=n*(l-2);s[1]+=n;s[2]+=o;break;case3:o=n*(4-l);s[1]+=o;s[2]+=n;break;case4:o=n*(l-4);s[2]+=n;s[0]+=o;break;case5:o=n*(6-l);s[2]+=o;s[0]+=n;break;}for(varf=0
deletea[0];if(a.i)t=a.i;elsea.i=t;r.push(a);break;}});returnr}functionqo(e){varr={};r.i=e._R(4);vart={};t.r=e._R(4);t.c=e._R(4);r.r=it(t);vara=e._R(1);if(a&2)r.l="1";if(a&8)r.a="1";returnr}functionef(e,r,t){vara=[];varn=false;Hr(e,functioni(e,r,s){switch(s){case63:a.push(e);break;default:if((r||"").indexOf("Begin")>0){}elseif((r||"").indexOf("End")>0){}elseif(!n||t.WTF)thrownewError("Unexpected record "+s+" "+r);}});returna}functionrf(){}functiontf(e,r,t){if(!e)returne;vara=t||{};varn=false,i=false;Hr(e,functions(e,r,t){if(i)return;switch(t){case359:;case363:;case364:;case366:;case367:;case368:;case369:;case370:;case371:;case472:;case577:;case578:;case579:;case580:;case581:;case582:;case583:;case584:;case585:;case586:;case587:break;case35:n=true;break;case36:n=false;break;default:if((r||"").indexOf("Begin")>0){}elseif((r||"").indexOf("End")>0){}elseif(!n||a.WTF)thrownewError("Unexpected record "+t.toString(16)+" "+r);}},a)}Sa.IMG="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";Sa.DRAW="http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing";functionaf(e,r){if(!e)return"??";vart=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];returnr["!id"][t].Target}varnf=1024;functionsf(e,r){vart=[21600,21600];vara=["m0,0l0",t[1],t[0],t[1],t[0],"0xe"].join(",");varn=[Je("xml",null,{"xmlns:v":tr.v,"xmlns:o":tr.o,"xmlns:x":tr.x,"xmlns:mv":tr.mv}).replace(/\/>/,">"),Je("o:shapelayout",Je("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),Je("v:shapetype",[Je("v:stroke",null,{joinstyle:"miter"}),Je("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:t.join(","),path:a})];while(nf<e*1e3)nf+=1e3;r.map(function(e){returnnt(e[0])}).forEach(function(e){n=n.concat(["<v:shape"+Qe({id:"_x0000_s"+++nf,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10;visibility:hidden",fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",Je("v:fill",Je("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}),{color2:"#BEFF82",angle:"-180",type:"gradient"}),Je("v:shadow",null,{on:"t",obscured:"t"}),Je("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Ze("x:Anchor",[e.c,0,e.r,0,e.c+3,100,e.r+5,100].join(",")),Ze("x:AutoFill","False"),Ze("x:Row",String(e.r)),Ze("x:Column",String(e.c)),"<x:Visible/>","</x:ClientData>","</v:shape>"])});n.push("</xml>");returnn.join("")}Sa.CMNT="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";functionlf(e,r,t,a,n){for(vari=0;i!=r.length;++i){vars=r[i];varl=Xd(ve(e,s.replace(/^\//,""),true),s,n);if(!l||!l.length)continue;varo=V(t);for(varf=0;f!=o.length;++f){varc=o[f];varu=a[c];if(u){varh=u[s];if(h)of(c,t[c],l)}}}}functionof(e,r,t){vara=Array.isArray(r);varn,i;t.forEach(function(e){if(a){i=nt(e.ref);if(!r[i.r])r[i.r]=[];n=r[i.r][i.c]}elsen=r[e.ref];if(!n){n={};if(a)r[i.r][i.c]=n;elser[e.ref]=n;vart=ot(r["!ref"]||"BDWGO1000001:A1");vars=nt(e.ref);if(t.s.r>s.r)t.s.r=s.r;if(t.e.r<s.r)t.e.r=s.r;if(t.s.c>s.c)t.s.c=s.c;if(t.e.c<s.c)t.e.c=s.c;varl=lt(t);if(l!==r["!ref"])r["!ref"]=l}if(!n.c)n.c=[];varo={a:e.author,t:e.t,r:e.r};if(e.h)o.h=e.h;n.c.push(o)})}functionff(e,r){if(e.match(/<(?:\w+:)?comments *\/>/))return[];vart=[];vara=[];varn=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);if(n&&n[1])n[1].split(/<\/\w*:?author>/).forEach(function(e){if(e===""||e.trim()==="")return;varr=e.match(/<(?:\w+:)?author[^>]*>(.*)/);if(r)t.push(r[1])});vari=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);if(i&&i[1])i[1].split(/<\/\w*:?comment>/).forEach(function(e){if(e===""||e.trim()==="")return;varn=e.match(/<(?:\w+:)?comment[^>]*>/);if(!n)return;vari=Ce(n[0]);vars={author:i.authorId&&t[i.authorId]||"sheetjsghost",ref:i.ref,guid:i.guid};varl=nt(i.ref);if(r.sheetRows&&r.sheetRows<=l.r)return;varo=e.match(/<(?:\w+
o["!margins"]=e;break;case147:if(!n.Sheets[t])n.Sheets[t]={};if(e.name)n.Sheets[t].CodeName=e.name;break;case137:if(!n.Views)n.Views=[{}];if(!n.Views[0])n.Views[0]={};if(e.RTL)n.Views[0].RTL=true;break;case485:break;case175:;case644:;case625:;case562:;case396:;case1112:;case1146:;case471:;case1050:;case649:;case1105:;case49:;case589:;case607:;case564:;case1055:;case168:;case174:;case1180:;case499:;case64:;case1053:;case550:;case171:;case167:;case1177:;case169:;case1181:;case551:;case552:;case661:;case639:;case478:;case151:;case537:;case477:;case536:;case1103:;case680:;case1104:;case1024:;case152:;case663:;case535:;case678:;case504:;case1043:;case428:;case170:;case50:;case2070:;case1045:break;case35:u=true;break;case36:u=false;break;case37:break;case38:break;default:if((r||"").indexOf("Begin")>0){}elseif((r||"").indexOf("End")>0){}elseif(!u||l.WTF)thrownewError("Unexpected record "+m+" "+r);}},l);deletel.supbooks;deletel["!row"];if(!o["!ref"]&&(c.s.r<2e6||f&&(f.e.r>0||f.e.c>0||f.s.r>0||f.s.c>0)))o["!ref"]=lt(f||c);if(l.sheetRows&&o["!ref"]){varO=ot(o["!ref"]);if(l.sheetRows<+O.e.r){O.e.r=l.sheetRows-1;if(O.e.r>c.e.r)O.e.r=c.e.r;if(O.e.r<O.s.r)O.s.r=O.e.r;if(O.e.c>c.e.c)O.e.c=c.e.c;if(O.e.c<O.s.c)O.s.c=O.e.c;o["!fullref"]=o["!ref"];o["!ref"]=lt(O)}}if(C.length>0)o["!merges"]=C;if(R.length>0)o["!cols"]=R;if(D.length>0)o["!rows"]=D;returno}functionzh(e,r,t,a,n,i){if(r.v===undefined)return"";vars="";switch(r.t){case"b":s=r.v?"1":"0";break;case"d":r=ae(r);r.z=r.z||A._table[14];r.v=Z(re(r.v));r.t="n";break;case"n":;case"e":s=""+r.v;break;default:s=r.v;break;}varl={r:t,c:a};l.s=Tu(n.cellXfs,r,n);if(r.l)i["!links"].push([it(l),r.l]);if(r.c)i["!comments"].push([it(l),r.c]);switch(r.t){case"s":;case"str":if(n.bookSST){s=Cu(n.Strings,r.v);l.t="s";l.v=s;Vr(e,"BrtCellIsst",bh(r,l))}else{l.t="str";Vr(e,"BrtCellSt",Ch(r,l))}return;case"n":if(r.v==(r.v|0)&&r.v>-1e3&&r.v<1e3)Vr(e,"BrtCellRk",wh(r,l));elseVr(e,"BrtCellReal",Eh(r,l));return;case"b":l.t="b";Vr(e,"BrtCellBool",vh(r,l));return;case"e":l.t="e";break;}Vr(e,"BrtCellBlank",hh(r,l))}functionXh(e,r,t,a){varn=ot(r["!ref"]||"A1"),i,s="",l=[];Vr(e,"BrtBeginSheetData");varo=Array.isArray(r);varf=n.e.r;if(r["!rows"])f=Math.max(n.e.r,r["!rows"].length-1);for(varc=n.s.r;c<=f;++c){s=Zr(c);ih(e,r,n,c);if(c<=n.e.r)for(varu=n.s.c;u<=n.e.c;++u){if(c===n.s.r)l[u]=et(u);i=l[u]+s;varh=o?(r[c]||[])[u]:r[i];if(!h)continue;zh(e,h,c,u,a,r)}}Vr(e,"BrtEndSheetData")}functionGh(e,r){if(!r||!r["!merges"])return;Vr(e,"BrtBeginMergeCells",yh(r["!merges"].length));r["!merges"].forEach(function(r){Vr(e,"BrtMergeCell",Ah(r))});Vr(e,"BrtEndMergeCells")}functionjh(e,r){if(!r||!r["!cols"])return;Vr(e,"BrtBeginColInfos");r["!cols"].forEach(function(r,t){if(r)Vr(e,"BrtColInfo",Ph(t,r))});Vr(e,"BrtEndColInfos")}functionKh(e,r,t){r["!links"].forEach(function(r){if(!r[1].Target)return;vara=xa(t,-1,r[1].Target.replace(/#.*$/,""),Sa.HLINK);Vr(e,"BrtHLink",Dh(r,a))});deleter["!links"]}functionYh(e,r,t,a){if(r["!comments"].length>0){varn=xa(a,-1,"../drawings/vmlDrawing"+(t+1)+".vml",Sa.VML);Vr(e,"BrtLegacyDrawing",Rt("rId"+n));r["!legacy"]=n}}function$h(e,r){if(!r["!autofilter"])return;Vr(e,"BrtBeginAFilter",Lt(st(r["!autofilter"].ref)));Vr(e,"BrtEndAFilter")}functionZh(e,r,t){Vr(e,"BrtBeginWsViews");{Vr(e,"BrtBeginWsView",Hh(r,t));Vr(e,"BrtEndWsView")}Vr(e,"BrtEndWsViews")}functionQh(){}functionJh(e,r){if(!r["!protect"])return;Vr(e,"BrtSheetProtection",Wh(r["!protect"]))}functionqh(e,r,t,a){varn=Wr();vari=t.SheetNames[e],s=t.Sheets[i]||{};varl=i;try{if(t&&t.Workbook)l=t.Workbook.Sheets[e].CodeName||l}catch(o){}varf=ot(s["!ref"]||"A1");s["!links"]=[];s["!comments"]=[];Vr(n,"BrtBeginSheet");Vr(n,"BrtWsProp",ch(l));Vr(n,"BrtWsDim",lh(f));Zh(n,s,t.Workbook);Qh(n,s);jh(n,s,e,r,t);Xh(n,s,e,r,t);Jh(n,s);$h(n,s);Gh(n,s);Kh(n,s,a);if(s["!margins"])Vr(n,"BrtMargins",Mh(s["!margins"]));Yh(n,s,e,a);Vr(n,"BrtEndSheet");returnn.end()}functioned(e){varr=[];(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/gm)||[]).forEach(function(e){vart=e.match
returne.charCodeAt(0)})};}thrownewError("Unrecognized type "+r.type)}functionGp(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"?g.encode(t):r.type=="string"?Me(t):t;case"file":returnH(r.file,e);case"buffer":returne;default:thrownewError("Unrecognized type "+r.type);}}functionjp(e,r){Ed(e);vart=r||{};if(t.type=="array"){t.type="binary";vara=jp(e,t);t.type="array";returnS(a)}switch(t.bookType||"xlsb"){case"xml":;case"xlml":returnzp(Tv(e,t),t);case"slk":;case"sylk":returnzp(dp(e,t),t);case"htm":;case"html":returnzp(up(e,t),t);case"txt":returnXp(bp(e,t),t);case"csv":returnzp(hp(e,t),t,"\ufeff");case"dif":returnzp(vp(e,t),t);case"dbf":returnGp(gp(e,t),t);case"prn":returnzp(pp(e,t),t);case"rtf":returnzp(mp(e,t),t);case"eth":returnzp(Ep(e,t),t);case"fods":returnzp(op(e,t),t);case"biff2":if(!t.biff)t.biff=2;case"biff3":if(!t.biff)t.biff=3;case"biff4":if(!t.biff)t.biff=4;returnGp(qv(e,t),t);case"biff5":if(!t.biff)t.biff=5;case"biff8":;case"xla":;case"xls":if(!t.biff)t.biff=8;returnVp(e,t);case"xlsx":;case"xlsm":;case"xlam":;case"xlsb":;case"ods":returnWp(e,t);default:thrownewError("Unrecognized bookType |"+t.bookType+"|");}}functionKp(e){if(e.bookType)return;varr={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"};vart=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();if(t.match(/^\.[a-z]+$/))e.bookType=t.slice(1);e.bookType=r[e.bookType]||e.bookType}functionYp(e,r,t){vara=t||{};a.type="file";a.file=r;Kp(a);returnjp(e,a)}function$p(e,r,t,a){varn=t||{};n.type="file";n.file=e;Kp(n);n.type="buffer";vari=a;if(!(iinstanceofFunction))i=t;returnL.writeFile(e,jp(r,n),i)}functionZp(e,r){if(e==null||e["!ref"]==null)return[];vart={t:"n",v:0},a=0,n=1,i=[],s=true,l=0,o="";varf={s:{r:0,c:0},e:{r:0,c:0}};varc=r||{};varu=c.raw;varh=c.defval;vard=c.range!=null?c.range:e["!ref"];if(c.header===1)a=1;elseif(c.header==="A")a=2;elseif(Array.isArray(c.header))a=3;switch(typeofd){case"string":f=ot(d);break;case"number":f=ot(e["!ref"]);f.s.r=d;break;default:f=d;}if(a>0)n=0;varv=Zr(f.s.r);varp=[];varm=[];varb=0,g=0;varE=Array.isArray(e);vark=f.s.r,w=0,S=0;if(E&&!e[k])e[k]=[];for(w=f.s.c;w<=f.e.c;++w){p[w]=et(w);t=E?e[k][w]:e[p[w]+v];switch(a){case1:i[w]=w-f.s.c;break;case2:i[w]=p[w];break;case3:i[w]=c.header[w-f.s.c];break;default:if(t==null)t={w:"__EMPTY",t:"s"};o=l=ct(t,null,c);g=0;for(S=0;S<i.length;++S)if(i[S]==o)o=l+"_"+++g;i[w]=o;}}varC=a===1?[]:{};for(k=f.s.r+n;k<=f.e.r;++k){v=Zr(k);s=true;if(a===1)C=[];else{C={};if(Object.defineProperty)try{Object.defineProperty(C,"__rowNum__",{value:k,enumerable:false})}catch(_){C.__rowNum__=k}elseC.__rowNum__=k}if(!E||e[k])for(w=f.s.c;w<=f.e.c;++w){t=E?e[k][w]:e[p[w]+v];if(t===undefined||t.t===undefined){if(h===undefined)continue;if(i[w]!=null){C[i[w]]=h;s=false}continue}l=t.v;switch(t.t){case"z":if(l==null)break;continue;case"e":continue;case"s":;case"d":;case"b":;case"n":break;default:thrownewError("unrecognized type "+t.t);}if(i[w]!=null){if(l==null){if(h!==undefined)C[i[w]]=h;elseif(u&&l===null)C[i[w]]=null;elsecontinue}else{C[i[w]]=u?l:ct(t,l,c)}s=false}}if(s===false||(a===1?c.blankrows!==false:!!c.blankrows))m[b++]=C}m.length=b;returnm}varQp=/"/g;functionJp(e,r,t,a,n,i,s,l){varo=true;varf=[],c="",u=Zr(t);for(varh=r.s.c;h<=r.e.c;++h){if(!a[h])continue;vard=l.dense?(e[t]||[])[h]:e[a[h]+u];if(d==null)c="";elseif(d.v!=null){o=false;c=""+ct(d,null,l);for(varv=0,p=0;v!==c.length;++v)if((p=c.charCodeAt(v))===n||p===i||p===34){c='"'+c.replace(Qp,'""')+'"';break}if(c=="ID")c='"ID"'}elseif(d.f!=null&&!d.F){o=false;c="="+d.f;if(c.indexOf(",")>=0)c='"'+c.replace(Qp,'""')+'"'}elsec="";f.push(c)}if(l.blankrows===false&&o)returnnull;returnf.join(s)}functionqp(e,r){vart=[];vara=r==null?{}:r;if(e==null||e["!ref"]==null)return"";varn=ot(e["!ref"]);vari=a.FS!==undefined?a.FS:",",s=i.charCodeAt(0);varl=a.RS!==undefined?a.RS:"\n",o=l.charCodeAt(0);varf=newRegExp((i=="|"?"\\|":i)+"+$");varc="",u=[];a.dense=Array.isArray(e);