switch(r===ta?a:r){case2:n=e._R(2,"i");if(!i.raw)e.l+=2;returnn;case3:n=e._R(4,"i");returnn;case11:returne._R(4)!==0;case19:n=e._R(4);returnn;case30:returnhn(e,a,4).replace(R,"");case31:returndn(e);case64:returnon(e);case65:returnBn(e);case71:returnCn(e);case80:returnpn(e,a,!i.raw).replace(R,"");case81:returnmn(e,a).replace(R,"");case4108:returnkn(e);case4126:returngn(e);default:thrownewError("TypedPropertyValue unrecognized type "+r+" "+a);}}functionxn(e,r){vart=Xr(4),a=Xr(4);t._W(4,e==80?31:e);switch(e){case3:a._W(-4,r);break;case5:a=Xr(8);a._W(8,r,"f");break;case11:a._W(4,r?1:0);break;case64:a=un(r);break;case31:;case80:a=Xr(4+2*(r.length+1)+(r.length%2?0:2));a._W(4,r.length+1);a._W(0,r,"dbcs");while(a.l!=a.length)a._W(1,0);break;default:thrownewError("TypedPropertyValue unrecognized type "+e+" "+r);}returnA([t,a])}functionIn(e,r){vart=e.l;vara=e._R(4);varn=e._R(4);vari=[],s=0;varl=0;varc=-1,o={};for(s=0;s!=n;++s){varu=e._R(4);varh=e._R(4);i[s]=[u,h+t]}i.sort(function(e,r){returne[1]-r[1]});vard={};for(s=0;s!=n;++s){if(e.l!==i[s][1]){varv=true;if(s>0&&r)switch(r[i[s-1][0]].t){case2:if(e.l+2===i[s][1]){e.l+=2;v=false}break;case80:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;case4108:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;}if((!r||s==0)&&e.l<=i[s][1]){v=false;e.l=i[s][1]}if(v)thrownewError("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(r){varp=r[i[s][0]];d[p.n]=Tn(e,p.t,{raw:true});if(p.p==="version")d[p.n]=String(d[p.n]>>16)+"."+("0000"+String(d[p.n]&65535)).slice(-4);if(p.n=="CodePage")switch(d[p.n]){case0:d[p.n]=1252;case874:;case932:;case936:;case949:;case950:;case1250:;case1251:;case1253:;case1254:;case1255:;case1256:;case1257:;case1258:;case1e4:;case1200:;case1201:;case1252:;case65e3:;case-536:;case65001:;case-535:f(l=d[p.n]>>>0&65535);break;default:thrownewError("Unsupported CodePage: "+d[p.n]);}}else{if(i[s][0]===1){l=d.CodePage=Tn(e,qt);f(l);if(c!==-1){varm=e.l;e.l=i[c][1];o=wn(e,l);e.l=m}}elseif(i[s][0]===0){if(l===0){c=s;e.l=i[s+1][1];continue}o=wn(e,l)}else{varb=o[i[s][0]];varg;switch(e[e.l]){case65:e.l+=4;g=Bn(e);break;case30:e.l+=4;g=pn(e,e[e.l-4]).replace(/\u0000+$/,"");break;case31:e.l+=4;g=pn(e,e[e.l-4]).replace(/\u0000+$/,"");break;case3:e.l+=4;g=e._R(4,"i");break;case19:e.l+=4;g=e._R(4);break;case5:e.l+=4;g=e._R(8,"f");break;case11:e.l+=4;g=Nn(e,4);break;case64:e.l+=4;g=ae(on(e));break;default:thrownewError("unparsed value: "+e[e.l]);}d[b]=g}}}e.l=t+a;returnd}varAn=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"].concat(Ya);functionRn(e){switch(typeofe){case"boolean":return11;case"number":return(e|0)==e?3:5;case"string":return31;case"object":if(einstanceofDate)return64;break;}return-1}function_n(e,r,t){vara=Xr(8),n=[],i=[];vars=8,l=0;varf=Xr(8),c=Xr(8);f._W(4,2);f._W(4,1200);c._W(4,1);i.push(f);n.push(c);s+=8+f.length;if(!r){c=Xr(8);c._W(4,0);n.unshift(c);varo=[Xr(4)];o[0]._W(4,e.length);for(l=0;l<e.length;++l){varu=e[l][0];f=Xr(4+4+2*(u.length+1)+(u.length%2?0:2));f._W(4,l+2);f._W(4,u.length+1);f._W(0,u,"dbcs");while(f.l!=f.length)f._W(1,0);o.push(f)}f=A(o);i.unshift(f);s+=8+f.length}for(l=0;l<e.length;++l){if(r&&!r[e[l][0]])continue;if(An.indexOf(e[l][0])>-1)continue;if(e[l][1]==null)continue;varh=e[l][1],d=0;if(r){d=+r[e[l][0]];varv=t[d];if(v.p=="version"&&typeofh=="string"){varp=h.split(".");h=(+p[0]<<16)+(+p[1]||0)}f=xn(v.t,h)}else{varm=Rn(h);if(m==-1){m=31;h=String(h)}f=xn(m,h)}i.push(f);c=Xr(8);c._W(4,!r?2+l:d);n.push(c);s+=8+f.length}varb=8*(i.length+1);for(l=0;l<i.length;++l){n[l]._W(4,b);b+=i[l].length}a._W(4,s);a._W(4,i.length);returnA([a].concat(n).concat(i))}functionyn(e,r,t){vara=e.content;if(!a)return{};Vr(a,0);varn,i,s,l,f=0;a.chk("feff","Byte Order: ");a._R(2);varc=a._R(4);varo=a._R(16);if(o!==U.utils.consts.HEADER_CLSID&&o!==t)thrownewError("Bad PropertySet CLSID "+o);n=a._R(4);if(n!==1&&n!==2)thrownewError("Unrecognized #Sets: "+n);i=a._R(16);l=a._R(4);if(n===1&&l!==a.l)thrownewError("Length mismatch: "+l+"!
l[a][n]=E;c=null}break;case"F":varB=0;for(s=1;s<b.length;++s)switch(b[s].charAt(0)){case"X":n=parseInt(b[s].slice(1))-1;++B;break;case"Y":a=parseInt(b[s].slice(1))-1;for(p=l.length;p<=a;++p)l[p]=[];break;case"M":v=parseInt(b[s].slice(1))/20;break;case"F":break;case"G":break;case"P":c=f[parseInt(b[s].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":d=b[s].slice(1).split(" ");for(p=parseInt(d[0],10);p<=parseInt(d[1],10);++p){v=parseInt(d[2],10);h[p-1]=v===0?{hidden:true}:{wch:v};nf(h[p-1])}break;case"C":n=parseInt(b[s].slice(1))-1;if(!h[n])h[n]={};break;case"R":a=parseInt(b[s].slice(1))-1;if(!u[a])u[a]={};if(v>0){u[a].hpt=v;u[a].hpx=cf(v)}elseif(v===0)u[a].hidden=true;break;default:if(r&&r.WTF)thrownewError("SYLK bad record "+m);}if(B<1)c=null;break;default:if(r&&r.WTF)thrownewError("SYLK bad record "+m);}}if(u.length>0)o["!rows"]=u;if(h.length>0)o["!cols"]=h;if(r&&r.sheetRows)l=l.slice(0,r.sheetRows);return[l,o]}functiont(r,t){vara=e(r,t);varn=a[0],i=a[1];vars=bt(n,t);G(i).forEach(function(e){s[e]=i[e]});returns}functiona(e,r){returnpt(t(e,r),r)}functionn(e,r,t,a){varn="C;Y"+(t+1)+";X"+(a+1)+";K";switch(e.t){case"n":n+=e.v||0;if(e.f&&!e.F)n+=";E"+Xc(e.f,{r:t,c:a});break;case"b":n+=e.v?"TRUE":"FALSE";break;case"e":n+=e.w||e.v;break;case"d":n+='"'+(e.w||e.v)+'"';break;case"s":n+='"'+e.v.replace(/"/g,"")+'"';break;}returnn}functioni(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=ql(r.width);if(typeofr.wpx=="number")r.wch=ef(r.wpx);if(typeofr.wch=="number")a+=Math.round(r.wch)}if(a.charAt(a.length-1)!=" ")e.push(a)})}functions(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*ff(r.hpx)+";";if(a.length>2)e.push(a+"R"+(t+1))})}functionl(e,r){vart=["ID;PWXL;N;E"],a=[];varl=ht(e["!ref"]),f;varc=Array.isArray(e);varo="\r\n";t.push("P;PGeneral");t.push("F;P0;DG0G8;M255");if(e["!cols"])i(t,e["!cols"]);if(e["!rows"])s(t,e["!rows"]);t.push("B;Y"+(l.e.r-l.s.r+1)+";X"+(l.e.c-l.s.c+1)+";D"+[l.s.c,l.s.r,l.e.c,l.e.r].join(" "));for(varu=l.s.r;u<=l.e.r;++u){for(varh=l.s.c;h<=l.e.c;++h){vard=ct({r:u,c:h});f=c?(e[u]||[])[h]:e[d];if(!f||f.v==null&&(!f.f||f.F))continue;a.push(n(f,e,u,h,r))}}returnt.join(o)+o+a.join(o)+o+"E"+o}return{to_workbook:a,to_sheet:t,from_sheet:l}}();varqs=function(){functione(e,t){switch(t.type){case"base64":returnr(b.decode(e),t);case"binary":returnr(e,t);case"buffer":returnr(e.toString("binary"),t);case"array":returnr(ne(e),t);}thrownewError("Unrecognized type "+t.type)}functionr(e,r){vart=e.split("\n"),a=-1,n=-1,i=0,s=[];for(;i!==t.length;++i){if(t[i].trim()==="BOT"){s[++a]=[];n=0;continue}if(a<0)continue;varl=t[i].trim().split(",");varf=l[0],c=l[1];++i;varo=t[i].trim();switch(+f){case-1:if(o==="BOT"){s[++a]=[];n=0;continue}elseif(o!=="EOD")thrownewError("Unrecognized DIF special command "+o);break;case0:if(o==="TRUE")s[a][n]=true;elseif(o==="FALSE")s[a][n]=false;elseif(!isNaN(le(c)))s[a][n]=le(c);elseif(!isNaN(fe(c).getDate()))s[a][n]=ae(c);elses[a][n]=c;++n;break;case1:o=o.slice(1,o.length-1);s[a][n++]=o!==""?o:null;break;}if(o==="EOD")break}if(r&&r.sheetRows)s=s.slice(0,r.sheetRows);returns}functiont(r,t){returnbt(e(r,t),t)}functiona(e,r){returnpt(t(e,r),r)}varn=function(){vare=functiont(e,r,a,n,i){e.push(r);e.push(a+","+n);e.push('"'+i.replace(/"/g,'""')+'"')};varr=functiona(e,r,t,n){e.push(r+","+t);e.push(r==1?'"'+n.replace(/"/g,'""')+'"':n)};returnfunctionn(t){vara=[];varn=ht(t["!ref"]),i;vars=Array.isArray(t);e(a,"TABLE",0,1,"sheetjs");e(a,"VECTORS",0,n.e.r-n.s.r+1,"");e(a,"TUPLES",0,n.e.c-n.s.c+1,"");e(a,"DATA",0,0,"");for(varl=n.s.r;l<=n.e.r;++l){r(a,-1,0,"BOT");for(varf=n.s.c;f<=n.e.c;++f){varc=ct({r:l,c:f});i=s?(t[l]||[])[f]:t[c];if(!i){r(a,1,0,"");continue}switch(i.t){case"n":varo=m?i.w:i.v;if(!o&&i.v!=null)o=i.v;if(o==null){if(m&&i.f&&!i.F)r(a,1,0,"="+i.f);elser(a,1,0,"")}elser(a,0,o,"V");break;case"b":r(a,0,i.v?1:0,i.v?"TRUE":"FALSE");break;case"s":r(a,1,0,!m||isNaN(i.v)?i.v:
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=We(l.auto);if(l.rgb)n.color.rgb=l.rgb.slice(-6);elseif(l.indexed){n.color.index=parseInt(l.indexed,10);varf=Sa[n.color.index];if(n.color.index==81)f=Sa[1];if(!f)thrownewError(e);n.color.rgb=f[0].toString(16)+f[1].toString(16)+f[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=$l(t.themeElements.clrScheme[n.color.theme].rgb,n.color.tint||0)}}break;case"<color/>":;case"</color>":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")};}})}functionvf(e,r,t){r.NumberFmt=[];vara=G(y._table);for(varn=0;n<a.length;++n)r.NumberFmt[a[n]]=y._table[a[n]];vari=e[0].match(Be);if(!i)return;for(n=0;n<i.length;++n){vars=xe(i[n]);switch(Ie(s[0])){case"<numFmts":;case"</numFmts>":;case"<numFmts/>":;case"<numFmts>":break;case"<numFmt":{varl=_e(Ve(s.formatCode)),f=parseInt(s.numFmtId,10);r.NumberFmt[f]=l;if(f>0){if(f>392){for(f=392;f>60;--f)if(r.NumberFmt[f]==null)break;r.NumberFmt[f]=l}y.load(l,f)}}break;case"</numFmt>":break;default:if(t.WTF)thrownewError("unrecognized "+s[0]+" in numFmts");}}}functionpf(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]=rr("numFmt",null,{numFmtId:a,formatCode:De(e[a])})});if(r.length===1)return"";r[r.length]="</numFmts>";r[0]=rr("numFmts",null,{count:r.length-2}).replace("/>",">");returnr.join("")}varmf=["numFmtId","fillId","fontId","borderId","xfId"];varbf=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];functiongf(e,r,t){r.CellXf=[];vara;varn=false;e[0].match(Be).forEach(function(e){vari=xe(e),s=0;switch(Ie(i[0])){case"<cellXfs":;case"<cellXfs>":;case"<cellXfs/>":;case"</cellXfs>":break;case"<xf":;case"<xf/>":a=i;deletea[0];for(s=0;s<mf.length;++s)if(a[mf[s]])a[mf[s]]=parseInt(a[mf[s]],10);for(s=0;s<bf.length;++s)if(a[bf[s]])a[bf[s]]=We(a[bf[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=i.wrapText;a.alignment=l;break;case"</alignment>":break;case"<protection":;case"</protection>":;case"<protection/>":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")};}})}functionEf(e){varr=[];r[r.length]=rr("cellXfs",null);e.forEach(function(e){r[r.length]=rr("xf",null,e)});r[r.length]="</cellXfs>";if(r.length===2)return"";r[0]=rr("cellXfs",null,{count:r.length-2}).replace("/>",">");returnr.join("")}varSf=functionnb(){vare=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/;varr=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/;vart=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/;vara=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/;varn=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;returnfunctioni(s,l,f){varc={};if(!s)returnc;s=s.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");varo;if(o=s.match(e))vf(o,c,f);if(o=s.match(a))df(o,c,l,f);if(o=s.match(t))hf(o,c,l,f);if(o=s.match(n))uf(o,c,l
varw="",B=0,C;varT=-1,x=-1,I={s:{r:1e6,c:1e7},e:{r:0,c:0}};varA=0;varR={};var_=[],y={},F=0,D=0;varO=[],P=1,N=1;varM=[];varL={Names:[]};varU={};varW=["",""];varV=[],H={};varX="",G=0;varz=false,j=false;varK=0;Mv.lastIndex=0;s=s.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");while(E=Mv.exec(s))switch(E[3]=E[3].replace(/_.*$/,"")){case"table":;case"工作表":if(E[1]==="/"){if(I.e.c>=I.s.c&&I.e.r>=I.s.r)g["!ref"]=ut(I);if(i.sheetRows>0&&i.sheetRows<=I.e.r){g["!fullref"]=g["!ref"];I.e.r=i.sheetRows-1;g["!ref"]=ut(I)}if(_.length)g["!merges"]=_;if(O.length)g["!rows"]=O;d.name=Ve(d["名称"]||d.name);if(typeofJSON!=="undefined")JSON.stringify(d);b.push(d.name);m[d.name]=g;j=false}elseif(E[0].charAt(E[0].length-2)!=="/"){d=xe(E[0],false);T=x=-1;I.s.r=I.s.c=1e7;I.e.r=I.e.c=0;g=i.dense?[]:{};_=[];O=[];j=true}break;case"table-row-group":if(E[1]==="/")--A;else++A;break;case"table-row":;case"行":if(E[1]==="/"){T+=P;P=1;break}v=xe(E[0],false);if(v["行号"])T=v["行号"]-1;elseif(T==-1)T=0;P=+v["number-rows-repeated"]||1;if(P<10)for(K=0;K<P;++K)if(A>0)O[T+K]={level:A};x=-1;break;case"covered-table-cell":++x;if(i.sheetStubs){if(i.dense){if(!g[T])g[T]=[];g[T][x]={t:"z"}}elseg[ct({r:T,c:x})]={t:"z"}}break;case"table-cell":;case"数据":if(E[0].charAt(E[0].length-2)==="/"){++x;k=xe(E[0],false);N=parseInt(k["number-columns-repeated"]||"1",10);S={t:"z",v:null};if(k.formula&&i.cellFormula!=false)S.f=Uu(_e(k.formula));if((k["数据类型"]||k["value-type"])=="string"){S.t="s";S.v=_e(k["string-value"]||"");if(i.dense){if(!g[T])g[T]=[];g[T][x]=S}else{g[ct({r:T,c:x})]=S}}x+=N-1}elseif(E[1]!=="/"){++x;N=1;var$=P?T+P-1:T;if(x>I.e.c)I.e.c=x;if(x<I.s.c)I.s.c=x;if(T<I.s.r)I.s.r=T;if($>I.e.r)I.e.r=$;k=xe(E[0],false);V=[];H={};S={t:k["数据类型"]||k["value-type"],v:null};if(i.cellFormula){if(k.formula)k.formula=_e(k.formula);if(k["number-matrix-columns-spanned"]&&k["number-matrix-rows-spanned"]){F=parseInt(k["number-matrix-rows-spanned"],10)||0;D=parseInt(k["number-matrix-columns-spanned"],10)||0;y={s:{r:T,c:x},e:{r:T+F-1,c:x+D-1}};S.F=ut(y);M.push([y,S.F])}if(k.formula)S.f=Uu(k.formula);elsefor(K=0;K<M.length;++K)if(T>=M[K][0].s.r&&T<=M[K][0].e.r)if(x>=M[K][0].s.c&&x<=M[K][0].e.c)S.F=M[K][1]}if(k["number-columns-spanned"]||k["number-rows-spanned"]){F=parseInt(k["number-rows-spanned"],10)||0;D=parseInt(k["number-columns-spanned"],10)||0;y={s:{r:T,c:x},e:{r:T+F-1,c:x+D-1}};_.push(y)}if(k["number-columns-repeated"])N=parseInt(k["number-columns-repeated"],10);switch(S.t){case"boolean":S.t="b";S.v=We(k["boolean-value"]);break;case"float":S.t="n";S.v=parseFloat(k.value);break;case"percentage":S.t="n";S.v=parseFloat(k.value);break;case"currency":S.t="n";S.v=parseFloat(k.value);break;case"date":S.t="d";S.v=ae(k["date-value"]);if(!i.cellDates){S.t="n";S.v=Z(S.v)}S.z="m/d/yy";break;case"time":S.t="n";S.v=ee(k["time-value"])/86400;break;case"number":S.t="n";S.v=parseFloat(k["数据数值"]);break;default:if(S.t==="string"||S.t==="text"||!S.t){S.t="s";if(k["string-value"]!=null)w=_e(k["string-value"])}elsethrownewError("Unsupported value type "+S.t);}}else{z=false;if(S.t==="s"){S.v=w||"";z=B==0}if(U.Target)S.l=U;if(V.length>0){S.c=V;V=[]}if(w&&i.cellText!==false)S.w=w;if(!z||i.sheetStubs){if(!(i.sheetRows&&i.sheetRows<=T)){for(varY=0;Y<P;++Y){N=parseInt(k["number-columns-repeated"]||"1",10);if(i.dense){if(!g[T+Y])g[T+Y]=[];g[T+Y][x]=Y==0?S:ie(S);while(--N>0)g[T+Y][x+N]=ie(S)}else{g[ct({r:T+Y,c:x})]=S;while(--N>0)g[ct({r:T+Y,c:x+N})]=ie(S)}if(I.e.c<=x)I.e.c=x}}}N=parseInt(k["number-columns-repeated"]||"1",10);x+=N-1;N=0;S={};w=""}U={};break;case"document":;case"document-content":;case"电子表格文档":;case"spreadsheet":;case"主体":;case"scripts":;case"styles":;case"font-face-decls":if(E[1]==="/"){if((f=l.pop())[0]!==E[3])throw"Bad state: "+f}elseif(E[0].charAt(E[0].length-2)!=="/")l.push([E[3],true]);break;case"annotation":if(E[1]==="/"){if((f=l.pop())[0]!==E[3])throw"Bad state: "+f;H.t=w;H.a=X;V.push(H)}elseif(E[0].charAt(E[0].length-2)!=="/"){l.push([E[3],false])}X="";G=0;w="";B=0;break;case"crea