sheetjs/dist/xlsx.mini.min.js

11 lines
270 KiB
JavaScript
Raw Normal View History

/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
var XLSX={};function make_xlsx_lib(e){e.version="0.20.2";var r=1200,t=1252;var a;var n=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4];var i={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var s=function(e){if(n.indexOf(e)==-1)return;t=i[0]=e};function l(){s(1252)}var o=function(e){r=e;s(e)};function c(){o(1200);l()}function f(e){var r=[];for(var t=0,a=e.length;t<a;++t)r[t]=e.charCodeAt(t);return r}function u(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return r.join("")}function h(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e[2*t]+(e[2*t+1]<<8));return r.join("")}function d(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return r.join("")}var p=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1);if(r==255&&t==254)return u(e.slice(2));if(r==254&&t==255)return d(e.slice(2));if(r==65279)return e.slice(1);return e};var m=function Fc(e){return String.fromCharCode(e)};var v=function Dc(e){return String.fromCharCode(e)};function g(e){a=e;o=function(e){r=e;s(e)};p=function(e){if(e.charCodeAt(0)===255&&e.charCodeAt(1)===254){return a.utils.decode(1200,f(e.slice(2)))}return e};m=function n(e){if(r===1200)return String.fromCharCode(e);return a.utils.decode(r,[e&255,e>>8])[0]};v=function i(e){return a.utils.decode(t,[e])[0]};ma()}var b=null;var w=true;var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function y(e){var r="";var t=0,a=0,n=0,i=0,s=0,l=0,o=0;for(var c=0;c<e.length;){t=e.charCodeAt(c++);i=t>>2;a=e.charCodeAt(c++);s=(t&3)<<4|a>>4;n=e.charCodeAt(c++);l=(a&15)<<2|n>>6;o=n&63;if(isNaN(a)){l=o=64}else if(isNaN(n)){o=64}r+=k.charAt(i)+k.charAt(s)+k.charAt(l)+k.charAt(o)}return r}function x(e){var r="";var t=0,a=0,n=0,i=0,s=0,l=0,o=0;for(var c=0;c<e.length;){t=e.charCodeAt(c++);if(t>255)t=95;i=t>>2;a=e.charCodeAt(c++);if(a>255)a=95;s=(t&3)<<4|a>>4;n=e.charCodeAt(c++);if(n>255)n=95;l=(a&15)<<2|n>>6;o=n&63;if(isNaN(a)){l=o=64}else if(isNaN(n)){o=64}r+=k.charAt(i)+k.charAt(s)+k.charAt(l)+k.charAt(o)}return r}function S(e){var r="";var t=0,a=0,n=0,i=0,s=0,l=0,o=0;for(var c=0;c<e.length;){t=e[c++];i=t>>2;a=e[c++];s=(t&3)<<4|a>>4;n=e[c++];l=(a&15)<<2|n>>6;o=n&63;if(isNaN(a)){l=o=64}else if(isNaN(n)){o=64}r+=k.charAt(i)+k.charAt(s)+k.charAt(l)+k.charAt(o)}return r}function C(e){var r="";var t=0,a=0,n=0,i=0,s=0,l=0,o=0;if(e.slice(0,5)=="data:"){var c=e.slice(0,1024).indexOf(";base64,");if(c>-1)e=e.slice(c+8)}e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;){i=k.indexOf(e.charAt(c++));s=k.indexOf(e.charAt(c++));t=i<<2|s>>4;r+=String.fromCharCode(t);l=k.indexOf(e.charAt(c++));a=(s&15)<<4|l>>2;if(l!==64){r+=String.fromCharCode(a)}o=k.indexOf(e.charAt(c++));n=(l&3)<<6|o;if(o!==64){r+=String.fromCharCode(n)}}return r}var _=function(){return typeof Buffer!=="undefined"&&typeof undefined!=="undefined"&&typeof{}!=="undefined"&&!!{}.node}();var A=function(){if(typeof Buffer!=="undefined"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch(r){e=true}return e?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();var T=function(){if(typeof Buffer==="undefined")return false;var e=A([65,0]);if(!e)return false;var r=e.toString("utf16le");return r.length==1}();function E(e){if(_)return Buffer.alloc?Buffer.alloc(e):new Buffer(e);return typeof Uint8Array!="undefined"?new Uint8Array(e):new Array(e)}function F(e){if(_)return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e);return typeof Uint8Array!="undefined"?new Uint8Array(e):new Array(e)}var D=function Oc(e){if(_)return A(e,"binary");return e.split("").map(function(e){return e.charCodeAt(0)&255})};function O(e){if(typeof ArrayBuffer==="undefined")return D(e);var r=new ArrayBuffer(e.length),t=new Uint8Array(r);for(var a=0;a!=e.length;++a)t[a]=e.charCodeAt(a)&255;return r}function M(e){if(Array.isArray(e))return e.map(
s=c;break;case"s":o=c;break;case"m":if(s>=0)l=c;else n=c;break;}});Ge.lastIndex=0;if(o>=0&&l==-1&&n>=0){l=n;n=-1}var c=(""+(a>=0?a:(new Date).getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);if(c.length==7)c="0"+c;if(c.length==8)c="20"+c;var f=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2);if(s==-1&&l==-1&&o==-1)return c;if(a==-1&&n==-1&&i==-1)return f;return c+"T"+f}var Ze={"d.m":"d\\.m"};function Ke(e,r){return We(Ze[e]||e,r)}var qe=function(){var e={};e.version="1.2.0";function r(){var e=0,r=new Array(256);for(var t=0;t!=256;++t){e=t;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;e=e&1?-306674912^e>>>1:e>>>1;r[t]=e}return typeof Int32Array!=="undefined"?new Int32Array(r):r}var t=r();function a(e){var r=0,t=0,a=0,n=typeof Int32Array!=="undefined"?new Int32Array(4096):new Array(4096);for(a=0;a!=256;++a)n[a]=e[a];for(a=0;a!=256;++a){t=e[a];for(r=256+a;r<4096;r+=256)t=n[r]=t>>>8^e[t&255]}var i=[];for(a=1;a!=16;++a)i[a-1]=typeof Int32Array!=="undefined"&&typeof n.subarray=="function"?n.subarray(a*256,a*256+256):n.slice(a*256,a*256+256);return i}var n=a(t);var i=n[0],s=n[1],l=n[2],o=n[3],c=n[4];var f=n[5],u=n[6],h=n[7],d=n[8],p=n[9];var m=n[10],v=n[11],g=n[12],b=n[13],w=n[14];function k(e,r){var a=r^-1;for(var n=0,i=e.length;n<i;)a=a>>>8^t[(a^e.charCodeAt(n++))&255];return~a}function y(e,r){var a=r^-1,n=e.length-15,k=0;for(;k<n;)a=w[e[k++]^a&255]^b[e[k++]^a>>8&255]^g[e[k++]^a>>16&255]^v[e[k++]^a>>>24]^m[e[k++]]^p[e[k++]]^d[e[k++]]^h[e[k++]]^u[e[k++]]^f[e[k++]]^c[e[k++]]^o[e[k++]]^l[e[k++]]^s[e[k++]]^i[e[k++]]^t[e[k++]];n+=15;while(k<n)a=a>>>8^t[(a^e[k++])&255];return~a}function x(e,r){var a=r^-1;for(var n=0,i=e.length,s=0,l=0;n<i;){s=e.charCodeAt(n++);if(s<128){a=a>>>8^t[(a^s)&255]}else if(s<2048){a=a>>>8^t[(a^(192|s>>6&31))&255];a=a>>>8^t[(a^(128|s&63))&255]}else if(s>=55296&&s<57344){s=(s&1023)+64;l=e.charCodeAt(n++)&1023;a=a>>>8^t[(a^(240|s>>8&7))&255];a=a>>>8^t[(a^(128|s>>2&63))&255];a=a>>>8^t[(a^(128|l>>6&15|(s&3)<<4))&255];a=a>>>8^t[(a^(128|l&63))&255]}else{a=a>>>8^t[(a^(224|s>>12&15))&255];a=a>>>8^t[(a^(128|s>>6&63))&255];a=a>>>8^t[(a^(128|s&63))&255]}}return~a}e.table=t;e.bstr=k;e.buf=y;e.str=x;return e}();var Qe=function Nc(){var e={};e.version="1.2.2";function r(e,r){var t=e.split("/"),a=r.split("/");for(var n=0,i=0,s=Math.min(t.length,a.length);n<s;++n){if(i=t[n].length-a[n].length)return i;if(t[n]!=a[n])return t[n]<a[n]?-1:1}return t.length-a.length}function t(e){if(e.charAt(e.length-1)=="/")return e.slice(0,-1).indexOf("/")===-1?e:t(e.slice(0,-1));var r=e.lastIndexOf("/");return r===-1?e:e.slice(0,r+1)}function a(e){if(e.charAt(e.length-1)=="/")return a(e.slice(0,-1));var r=e.lastIndexOf("/");return r===-1?e:e.slice(r+1)}function n(e,r){if(typeof r==="string")r=new Date(r);var t=r.getHours();t=t<<6|r.getMinutes();t=t<<5|r.getSeconds()>>>1;e._W(2,t);var a=r.getFullYear()-1980;a=a<<4|r.getMonth()+1;a=a<<5|r.getDate();e._W(2,a)}function i(e){var r=e._R(2)&65535;var t=e._R(2)&65535;var a=new Date;var n=t&31;t>>>=5;var i=t&15;t>>>=4;a.setMilliseconds(0);a.setFullYear(t+1980);a.setMonth(i-1);a.setDate(n);var s=r&31;r>>>=5;var l=r&63;r>>>=6;a.setHours(r);a.setMinutes(l);a.setSeconds(s<<1);return a}function s(e){Ea(e,0);var r={};var t=0;while(e.l<=e.length-4){var a=e._R(2);var n=e._R(2),i=e.l+n;var s={};switch(a){case 21589:{t=e._R(1);if(t&1)s.mtime=e._R(4);if(n>5){if(t&2)s.atime=e._R(4);if(t&4)s.ctime=e._R(4)}if(s.mtime)s.mt=new Date(s.mtime*1e3)}break;case 1:{var l=e._R(4),o=e._R(4);s.usz=o*Math.pow(2,32)+l;l=e._R(4);o=e._R(4);s.csz=o*Math.pow(2,32)+l}break;}e.l=i;r[a]=s}return r}var l;function o(){return l||(l=er)}function c(e,r){if(e[0]==80&&e[1]==75)return Oe(e,r);if((e[0]|32)==109&&(e[1]|32)==105)return ze(e,r);if(e.length<512)throw new Error("CFB file size "+e.length+" < 512");var t=3;var a=512;var n=0;var i=0;var s=0;var l=0;var o=0;var c=[];var p=e.slice(0,512);Ea(p,0);va
if(typeof $!=="undefined"&&typeof File!=="undefined"&&typeof Folder!=="undefined")try{var r=File(e);r.open("r");r.encoding="binary";var t=r.read();r.close();return t}catch(a){if(!a.message||a.message.indexOf("onstruct")==-1)throw a}throw new Error("Cannot access file "+e)}function ir(e){var r=Object.keys(e),t=[];for(var a=0;a<r.length;++a)if(Object.prototype.hasOwnProperty.call(e,r[a]))t.push(r[a]);return t}function sr(e,r){var t=[],a=ir(e);for(var n=0;n!==a.length;++n)if(t[e[a[n]][r]]==null)t[e[a[n]][r]]=a[n];return t}function lr(e){var r=[],t=ir(e);for(var a=0;a!==t.length;++a)r[e[t[a]]]=t[a];return r}function or(e){var r=[],t=ir(e);for(var a=0;a!==t.length;++a)r[e[t[a]]]=parseInt(t[a],10);return r}function cr(e){var r=[],t=ir(e);for(var a=0;a!==t.length;++a){if(r[e[t[a]]]==null)r[e[t[a]]]=[];r[e[t[a]]].push(t[a])}return r}var fr=Date.UTC(1899,11,30,0,0,0);var ur=Date.UTC(1899,11,31,0,0,0);var hr=Date.UTC(1904,0,1,0,0,0);function dr(e,r){var t=e.getTime();var a=(t-fr)/(24*60*60*1e3);if(r){a-=1462;return a<-1402?a-1:a}return a<60?a-1:a}function pr(e){if(e>=60&&e<61)return e;var r=new Date;r.setTime((e>60?e:e+1)*24*60*60*1e3+fr);return r}function mr(e){var r=0,t=0,a=false;var n=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!n)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var i=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":throw new Error("Unsupported ISO Duration Field: "+n[i].slice(n[i].length-1));case"D":t*=24;case"H":t*=60;case"M":if(!a)throw new Error("Unsupported ISO Duration Field: M");else t*=60;case"S":break;}r+=t*parseInt(n[i],10)}return r}var vr=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/;var gr=/^(\d+)-(\d+)-(\d+)$/;var br=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;function wr(e,r){if(e instanceof Date)return e;var t=e.match(vr);if(t)return new Date((r?hr:ur)+((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(gr);if(t)return new Date(Date.UTC(+t[1],+t[2]-1,+t[3],0,0,0,0));t=e.match(br);if(t)return new Date(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]+"0000").slice(1,4),10)||0));var a=new Date(e);return a}function kr(e,r){if(_&&Buffer.isBuffer(e)){if(r&&T){if(e[0]==255&&e[1]==254)return Dt(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return Dt(d(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder!=="undefined")try{if(r){if(e[0]==255&&e[1]==254)return Dt(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return Dt(new TextDecoder("utf-16be").decode(e.slice(2)))}var t={"€":"€","":"‚","ƒ":"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰","Š":"Š","":"‹","Œ":"Œ","Ž":"Ž","":"‘","":"’","“":"“","”":"”","•":"•","":"–","—":"—","˜":"˜","™":"™","š":"š","":"›","œ":"œ","ž":"ž","Ÿ":"Ÿ"};if(Array.isArray(e))e=new Uint8Array(e);return new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(e){return t[e]||e})}catch(a){}var n=[],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]))}}return n.join("")}function yr(e){if(typeof JSON!="undefined"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var r={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))r[t]=yr(e[t]);return r}function xr(e,r){var t="";while(t.length<r)t+=e;return t}function Sr(e){var r=Number(e);if(!isNaN(r))return isFinite(r)?r:NaN;if(!/\d/.test(e))return r;var t=1;var a=e.replace(/([\d]),([\d])/g,"$1$2").rep
if(s==-1)c.e.r=s=i["!ref"]?f.e.r+1:0}else{c.s.c=c.e.c=c.s.r=c.e.r=0}var u=[],h=false;for(var d=0;d!=r.length;++d){if(!r[d])continue;if(!Array.isArray(r[d]))throw new Error("aoa_to_sheet expects an array of arrays");var p=s+d,m=""+(p+1);if(n){if(!i["!data"][p])i["!data"][p]=[];u=i["!data"][p]}for(var v=0;v!=r[d].length;++v){if(typeof r[d][v]==="undefined")continue;var g={v:r[d][v]};var w=l+v;if(c.s.r>p)c.s.r=p;if(c.s.c>w)c.s.c=w;if(c.e.r<p)c.e.r=p;if(c.e.c<w)c.e.c=w;h=true;if(r[d][v]&&typeof r[d][v]==="object"&&!Array.isArray(r[d][v])&&!(r[d][v]instanceof Date))g=r[d][v];else{if(Array.isArray(g.v)){g.f=r[d][v][1];g.v=g.v[0]}if(g.v===null){if(g.f)g.t="n";else if(a.nullError){g.t="e";g.v=0}else if(!a.sheetStubs)continue;else g.t="z"}else if(typeof g.v==="number")g.t="n";else if(typeof g.v==="boolean")g.t="b";else if(g.v instanceof Date){g.z=a.dateNF||q[14];if(!a.UTC)g.v=Ir(g.v);if(a.cellDates){g.t="d";g.w=$e(g.z,dr(g.v,a.date1904))}else{g.t="n";g.v=dr(g.v,a.date1904);g.w=$e(g.z,g.v)}}else g.t="s"}if(n){if(u[w]&&u[w].z)g.z=u[w].z;u[w]=g}else{var k=ja(w)+m;if(i[k]&&i[k].z)g.z=i[k].z;i[k]=g}}}if(h&&c.s.c<104e5)i["!ref"]=Za(c);return i}function sn(e,r){return nn(null,e,r)}var ln=2;var on=3;var cn=11;var fn=12;var un=19;var hn=64;var dn=65;var pn=71;var mn=4108;var vn=4126;var gn=80;var bn=81;var wn=[gn,bn];var kn={1:{n:"CodePage",t:ln},2:{n:"Category",t:gn},3:{n:"PresentationFormat",t:gn},4:{n:"ByteCount",t:on},5:{n:"LineCount",t:on},6:{n:"ParagraphCount",t:on},7:{n:"SlideCount",t:on},8:{n:"NoteCount",t:on},9:{n:"HiddenCount",t:on},10:{n:"MultimediaClipCount",t:on},11:{n:"ScaleCrop",t:cn},12:{n:"HeadingPairs",t:mn},13:{n:"TitlesOfParts",t:vn},14:{n:"Manager",t:gn},15:{n:"Company",t:gn},16:{n:"LinksUpToDate",t:cn},17:{n:"CharacterCount",t:on},19:{n:"SharedDoc",t:cn},22:{n:"HyperlinksChanged",t:cn},23:{n:"AppVersion",t:on,p:"version"},24:{n:"DigSig",t:dn},26:{n:"ContentType",t:gn},27:{n:"ContentStatus",t:gn},28:{n:"Language",t:gn},29:{n:"Version",t:gn},255:{},2147483648:{n:"Locale",t:un},2147483651:{n:"Behavior",t:un},1919054434:{}};var yn={1:{n:"CodePage",t:ln},2:{n:"Title",t:gn},3:{n:"Subject",t:gn},4:{n:"Author",t:gn},5:{n:"Keywords",t:gn},6:{n:"Comments",t:gn},7:{n:"Template",t:gn},8:{n:"LastAuthor",t:gn},9:{n:"RevNumber",t:gn},10:{n:"EditTime",t:hn},11:{n:"LastPrinted",t:hn},12:{n:"CreatedDate",t:hn},13:{n:"ModifiedDate",t:hn},14:{n:"PageCount",t:on},15:{n:"WordCount",t:on},16:{n:"CharCount",t:on},17:{n:"Thumbnail",t:pn},18:{n:"Application",t:gn},19:{n:"DocSecurity",t:on},255:{},2147483648:{n:"Locale",t:un},2147483651:{n:"Behavior",t:un},1919054434:{}};var xn={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"};var Sn=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function Cn(e){return e.map(function(e){return[e>>16&255,e>>8&255,e&255]})}var _n=Cn([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);var An=yr(_n);var Tn={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"};var En={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":
N._W(4,("0000"+p[v][g].getFullYear()).slice(-4),"sbcs");N._W(2,("00"+(p[v][g].getMonth()+1)).slice(-2),"sbcs");N._W(2,("00"+p[v][g].getDate()).slice(-2),"sbcs")}break;case"C":var P=N.l;var R=String(p[v][g]!=null?p[v][g]:"").slice(0,x[g]);N._W(1,R,"cpstr");P+=x[g]-N.l;for(b=0;b<P;++b)N._W(1,32);break;}}}r=f;u.next(1)._W(1,26);return u.end()}return{to_workbook:l,to_sheet:s,from_sheet:f}}();var li=function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223};var r=new RegExp("N("+ir(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1").replace("{","\\{")+"|\\|)","gm");try{r=new RegExp("N("+ir(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm")}catch(t){}var n=function(r,t){var a=e[t];return typeof a=="number"?v(a):a};var i=function(e,r,t){var a=r.charCodeAt(0)-32<<4|t.charCodeAt(0)-48;return a==59?e:v(a)};e["|"]=254;var s=function(e){return e.replace(/\n/g," :").replace(/\r/g," =")};function l(e,r){switch(r.type){case"base64":return c(C(e),r);case"binary":return c(e,r);case"buffer":return c(_&&Buffer.isBuffer(e)?e.toString("binary"):M(e),r);case"array":return c(kr(e),r);}throw new Error("Unrecognized type "+r.type)}function c(e,t){var s=e.split(/[\n\r]+/),l=-1,c=-1,f=0,u=0,h=[];var d=[];var p=null;var m={},v=[],g=[],b=[];var w=0,k;var y={Workbook:{WBProps:{},Names:[]}};if(+t.codepage>=0)o(+t.codepage);for(;f!==s.length;++f){w=0;var x=s[f].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,i).replace(r,n);var S=x.replace(/;;/g,"\0").split(";").map(function(e){return e.replace(/\u0000/g,";")});var C=S[0],_;if(x.length>0)switch(C){case"ID":break;case"E":break;case"B":break;case"O":for(u=1;u<S.length;++u)switch(S[u].charAt(0)){case"V":{var A=parseInt(S[u].slice(1),10);if(A>=1&&A<=4)y.Workbook.WBProps.date1904=true}break;}break;case"W":break;case"P":switch(S[1].charAt(0)){case"P":d.push(x.slice(3).replace(/;;/g,";"));break;}break;case"NN":{var T={Sheet:0};for(u=1;u<S.length;++u)switch(S[u].charAt(0)){case"N":T.Name=S[u].slice(1);break;case"E":T.Ref=(t&&t.sheet||"Sheet1")+"!"+Ds(S[u].slice(1));break;}y.Workbook.Names.push(T)}break;case"C":var E=false,F=false,D=false,O=false,M=-1,N=-1,I="",P="z";var R="";for(u=1;u<S.length;++u)switch(S[u].charAt(0)){case"A":R=S[u].slice(1);break;case"X":c=parseInt(S[u].slice(1),10)-1;F=true;break;case"Y":l=parseInt(S[u].slice(1),10)-1;if(!F)c=0;for(k=h.length;k<=l;++k)h[k]=[];break;case"K":_=S[u].slice(1);if(_.charAt(0)==='"'){_=_.slice(1,_.length-1);P="s"}else if(_==="TRUE"||_==="FALSE"){_=_==="TRUE";P="b"}else if(_.charAt(0)=="#"&&En[_]!=null){P="e";_=En[_]}else if(!isNaN(Sr(_))){_=Sr(_);P="n";if(p!==null&&Re(p)&&t.cellDates){_=pr(y.Workbook.WBProps.date1904?_+1462:_);P=typeof _=="number"?"n":"d"}}if(typeof a!=="undefined"&&typeof _=="string"&&(t||{}).type!="string"&&(t||{}).codepage)_=a.utils.decode(t.codepage,_);E=true;break;case"E":O=true;I=Ds(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(t&&t.WTF)throw new Error("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(t.cellText!==false&&p)h[l][c].w=$e(h[l][c].z,h[l][c].v,{date1904:y.Workbook.WBProps.date1904});p=null}if(D){if(O)throw new Error("SYLK shared formula cannot have own formula");var L=M>-1&&h[M][N];if(!L||!L[1])throw new Error("SYLK shared formula cannot find base");I=Is(L[1],{r:l-M,c:c-N})}if(I){if(!h[l][c])h[l][c]={t:"
if(n[0].charAt(1)==="/"){r.themeElements.clrScheme[es.indexOf(n[0])]=a;a={}}else{a.name=n[0].slice(3,n[0].length-1)}break;default:if(t&&t.WTF)throw new Error("Unrecognized "+n[0]+" in clrScheme");}})}function ts(){}function as(){}function ns(e,r,t){r.themeElements={};var a;if(!(a=Ur(e,"a:clrScheme")))throw new Error("clrScheme not found in themeElements");rs(a,r,t);if(!(a=Ur(e,"a:fontScheme")))throw new Error("fontScheme not found in themeElements");ts(a,r,t);if(!(a=Ur(e,"a:fmtScheme")))throw new Error("fmtScheme not found in themeElements");as(a,r,t)}function is(e,r){if(!e||e.length===0)e=ss();var t;var a={};if(!(t=Ur(e,"a:themeElements")))throw new Error("themeElements not found in theme");ns(t[0],a,r);a.raw=e;return a}function ss(e,r){if(r&&r.themeXLSX)return r.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var t=[at];t[t.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">';t[t.length]="<a:themeElements>";t[t.length]='<a:clrScheme name="Office">';t[t.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>';t[t.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>';t[t.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>';t[t.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>';t[t.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>';t[t.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>';t[t.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>';t[t.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>';t[t.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>';t[t.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>';t[t.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>';t[t.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>';t[t.length]="</a:clrScheme>";t[t.length]='<a:fontScheme name="Office">';t[t.length]="<a:majorFont>";t[t.length]='<a:latin typeface="Cambria"/>';t[t.length]='<a:ea typeface=""/>';t[t.length]='<a:cs typeface=""/>';t[t.length]='<a:font script="Jpan" typeface=" Pゴシック"/>';t[t.length]='<a:font script="Hang" typeface="맑은 고딕"/>';t[t.length]='<a:font script="Hans" typeface="宋体"/>';t[t.length]='<a:font script="Hant" typeface="新細明體"/>';t[t.length]='<a:font script="Arab" typeface="Times New Roman"/>';t[t.length]='<a:font script="Hebr" typeface="Times New Roman"/>';t[t.length]='<a:font script="Thai" typeface="Tahoma"/>';t[t.length]='<a:font script="Ethi" typeface="Nyala"/>';t[t.length]='<a:font script="Beng" typeface="Vrinda"/>';t[t.length]='<a:font script="Gujr" typeface="Shruti"/>';t[t.length]='<a:font script="Khmr" typeface="MoolBoran"/>';t[t.length]='<a:font script="Knda" typeface="Tunga"/>';t[t.length]='<a:font script="Guru" typeface="Raavi"/>';t[t.length]='<a:font script="Cans" typeface="Euphemia"/>';t[t.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>';t[t.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>';t[t.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>';t[t.length]='<a:font script="Thaa" typeface="MV Boli"/>';t[t.length]='<a:font script="Deva" typeface="Mangal"/>';t[t.length]='<a:font script="Telu" typeface="Gautami"/>';t[t.length]='<a:font script="Taml" typeface="Latha"/>';t[t.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>';t[t.length]='<a:font script="Orya" typeface="Kalinga"/>';t[t.length]='<a:font script="Mlym" typeface="Kartika"/>';t[t.length]='<a:font script="Laoo" typeface="DokChampa"/>';t[t.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>';t[t.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>';t[t.length]='<a:font script="Viet" typeface="Times New Roman"/>';t[t.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>';t[t.length]='<a:font script="Geor" typeface="Sylfaen"/>';t[t.length]="</a:majorFont>";t[t.length]="<a:minorFont>";t[t.length]='<a:latin typeface="Calibri"/>';t[t.length]='<a:ea typeface=""/>';t[t.length]='<a:cs typeface=""/>';t[t.length]='<a:font script="Jpan" typeface=" Pゴシック"/>';t[t.length]='<a:font script="Hang" typeface="
l=e.v;break;}var u=e.t=="z"||e.v==null?"":Rt("v",gt(l)),h={r:r};var d=Ys(a.cellXfs,e,a);if(d!==0)h.s=d;switch(e.t){case"n":break;case"d":h.t="d";break;case"b":h.t="b";break;case"e":h.t="e";break;case"z":break;default:if(e.v==null){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(a&&a.bookSST){u=Rt("v",""+Vs(a.Strings,e.v,a.revStrings));h.t="s";break}else h.t="str";break;}if(e.t!=o){e.t=o;e.v=c}if(typeof e.f=="string"&&e.f){var p=e.F&&e.F.slice(0,r.length)==r?{t:"array",ref:e.F}:null;u=Bt("f",gt(e.f),p)+(e.v!=null?u:"")}if(e.l){e.l.display=gt(l);t["!links"].push([r,e.l])}if(e.D)h.cm=1;return Bt("c",u,h)}var Cl=function(){var e=/<(?:\w+:)?c[ \/>]/,r=/<\/(?:\w+:)?row>/;var t=/r=["']([^"']*)["']/;var a=/ref=["']([^"']*)["']/;return function n(i,s,l,o,c,f,u){var h=0,d="",p=[],m=[],v=0,g=0,b=0,w="",k;var y,x=0,S=0;var C,_;var A=0,T=0;var E=Array.isArray(f.CellXf),F;var D=[];var O=[];var M=s["!data"]!=null;var N=[],I={},P=false;var R=!!l.sheetStubs;var L=!!((u||{}).WBProps||{}).date1904;for(var B=i.split(r),U=0,z=B.length;U!=z;++U){d=B[U].trim();var $=d.length;if($===0)continue;var W=0;e:for(h=0;h<$;++h)switch(d[h]){case">":if(d[h-1]!="/"){++h;break e}if(l&&l.cellStyles){y=ft(d.slice(W,h),true);x=y.r!=null?parseInt(y.r,10):x+1;S=-1;if(l.sheetRows&&l.sheetRows<x)continue;I={};P=false;if(y.ht){P=true;I.hpt=parseFloat(y.ht);I.hpx=$i(I.hpt)}if(y.hidden&&Ct(y.hidden)){P=true;I.hidden=true}if(y.outlineLevel!=null){P=true;I.level=+y.outlineLevel}if(P)N[x-1]=I}break;case"<":W=h;break;}if(W>=h)break;y=ft(d.slice(W,h),true);x=y.r!=null?parseInt(y.r,10):x+1;S=-1;if(l.sheetRows&&l.sheetRows<x)continue;if(!l.nodim){if(o.s.r>x-1)o.s.r=x-1;if(o.e.r<x-1)o.e.r=x-1}if(l&&l.cellStyles){I={};P=false;if(y.ht){P=true;I.hpt=parseFloat(y.ht);I.hpx=$i(I.hpt)}if(y.hidden&&Ct(y.hidden)){P=true;I.hidden=true}if(y.outlineLevel!=null){P=true;I.level=+y.outlineLevel}if(P)N[x-1]=I}p=d.slice(h).split(e);for(var j=0;j!=p.length;++j)if(p[j].trim().charAt(0)!="<")break;p=p.slice(j);for(h=0;h!=p.length;++h){d=p[h].trim();if(d.length===0)continue;m=d.match(t);v=h;g=0;b=0;d="<c "+(d.slice(0,1)=="<"?">":"")+d;if(m!=null&&m.length===2){v=0;w=m[1];for(g=0;g!=w.length;++g){if((b=w.charCodeAt(g)-64)<1||b>26)break;v=26*v+b}--v;S=v}else++S;for(g=0;g!=d.length;++g)if(d.charCodeAt(g)===62)break;++g;y=ft(d.slice(0,g),true);if(!y.r)y.r=Ya({r:x-1,c:S});w=d.slice(g);k={t:""};if((m=zr(w,"v"))!=null&&m[1]!=="")k.v=pt(m[1]);if(l.cellFormula){if((m=zr(w,"f"))!=null){if(m[1]==""){if(m[0].indexOf('t="shared"')>-1){_=ft(m[0]);if(O[_.si])k.f=Ps(O[_.si][1],O[_.si][2],y.r)}}else{k.f=pt(Ft(m[1]),true);if(!l.xlfn)k.f=Ls(k.f);if(m[0].indexOf('t="array"')>-1){k.F=(w.match(a)||[])[1];if(k.F.indexOf(":")>-1)D.push([Qa(k.F),k.F])}else if(m[0].indexOf('t="shared"')>-1){_=ft(m[0]);var H=pt(Ft(m[1]));if(!l.xlfn)H=Ls(H);O[parseInt(_.si,10)]=[_,H,y.r]}}}else if(m=w.match(/<f[^<>]*\/>/)){_=ft(m[0]);if(O[_.si])k.f=Ps(O[_.si][1],O[_.si][2],y.r)}var V=Ga(y.r);for(g=0;g<D.length;++g)if(V.r>=D[g][0].s.r&&V.r<=D[g][0].e.r)if(V.c>=D[g][0].s.c&&V.c<=D[g][0].e.c)k.F=D[g][1]}if(y.t==null&&k.v===undefined){if(k.f||k.F){k.v=0;k.t="n"}else if(!R)continue;else k.t="z"}else k.t=y.t||"n";if(o.s.c>S)o.s.c=S;if(o.e.c<S)o.e.c=S;switch(k.t){case"n":if(k.v==""||k.v==null){if(!R)continue;k.t="z"}else k.v=parseFloat(k.v);break;case"s":if(typeof k.v=="undefined"){if(!R)continue;k.t="z"}else{C=Ws[parseInt(k.v,10)];k.v=C.t;k.r=C.r;if(l.cellHTML)k.h=C.h}break;case"str":k.t="s";k.v=k.v!=null?pt(Ft(k.v),true):"";if(l.cellHTML)k.h=kt(k.v);break;case"inlineStr":m=zr(w,"is");k.t="s";if(m!=null&&(C=gi(m[1]))){k.v=C.t;if(l.cellHTML)k.h=C.h}else k.v="";break;case"b":k.v=Ct(k.v);break;case"d":if(l.cellDates)k.v=wr(k.v,L);else{k.v=dr(wr(k.v,L),L);k.t="n"}break;case"e":if(!l||l.cellText!==false)k.w=k.v;k.v=En[k.v];break;}A=T=0;F=null;if(E&&y.s!==undefined){F=f.CellXf[y.s];if(F!=null){if(F.numFmtId!=null)A=F.numFmtId;if(l.cellStyles){if(F.fillId!=null)T=F.fillId}}}Js(k,A,T,l,c,f,L);if(l.cellDates&&E&&k.t=="n"&&Re(q[A])){k.v=pr(k.v+(L?1462:0));k.t=typeof k.v=="number"?"n":"d"}if(y.cm&&
r:T+q,c:E+U})]=yr(g)}if(F.e.c<=E)F.e.c=E}}}U=parseInt(w["number-columns-repeated"]||"1",10);E+=U-1;U=0;g={};k="";_=[]}W={};break;case"document":;case"document-content":;case"电子表格文档":;case"spreadsheet":;case"主体":;case"scripts":;case"styles":;case"font-face-decls":;case"master-styles":if(v[1]==="/"){if((s=i.pop())[0]!==v[3])throw"Bad state: "+s}else if(v[0].charAt(v[0].length-2)!=="/")i.push([v[3],true]);break;case"annotation":if(v[1]==="/"){if((s=i.pop())[0]!==v[3])throw"Bad state: "+s;V.t=k;if(_.length)V.R=_;V.a=X;H.push(V);k=S;y=C;_=A}else if(v[0].charAt(v[0].length-2)!=="/"){i.push([v[3],false]);var Q=ft(v[0],true);if(!(Q["display"]&&Ct(Q["display"])))H.hidden=true;S=k;C=y;A=_;k="";y=0;_=[]}X="";G=0;break;case"creator":if(v[1]==="/"){X=n.slice(G,v.index)}else G=v.index+v[0].length;break;case"meta":;case"元数据":;case"settings":;case"config-item-set":;case"config-item-map-indexed":;case"config-item-map-entry":;case"config-item-map-named":;case"shapes":;case"frame":;case"text-box":;case"image":;case"data-pilot-tables":;case"list-style":;case"form":;case"dde-links":;case"event-listeners":;case"chart":if(v[1]==="/"){if((s=i.pop())[0]!==v[3])throw"Bad state: "+s}else if(v[0].charAt(v[0].length-2)!=="/")i.push([v[3],false]);k="";y=0;_=[];break;case"scientific-number":;case"currency-symbol":;case"fill-character":break;case"text-style":;case"boolean-style":;case"number-style":;case"currency-style":;case"percentage-style":;case"date-style":;case"time-style":if(v[1]==="/"){var ee=Wt.lastIndex;vo(n.slice(o,Wt.lastIndex),r,O);Wt.lastIndex=ee}else if(v[0].charAt(v[0].length-2)!=="/"){o=Wt.lastIndex-v[0].length}break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":;case"page-layout":break;case"style":{var re=ft(v[0],false);if(re["family"]=="table-cell"&&O[re["data-style-name"]])M[re["name"]]=O[re["data-style-name"]]}break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":break;case"fraction":break;case"day":;case"month":;case"year":;case"era":;case"day-of-week":;case"week-of-year":;case"quarter":;case"hours":;case"minutes":;case"seconds":;case"am-pm":break;case"boolean":break;case"text":if(v[0].slice(-2)==="/>")break;else if(v[1]==="/")switch(i[i.length-1][0]){case"number-style":;case"date-style":;case"time-style":c+=n.slice(f,v.index);break;}else f=v.index+v[0].length;break;case"named-range":l=ft(v[0],false);j=zs(l["cell-range-address"]);var te={Name:l.name,Ref:j[0]+"!"+j[1]};if(J)te.Sheet=p.length;$.Names.push(te);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":;case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":l=ft(v[0],false);switch(l["date-value"]){case"1904-01-01":$.WBProps.date1904=true;break;}break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":;case"文本串":if(["master-styles"].indexOf(i[i.length-1][0])>-1)break;if(v[1]==="/"&&(!w||!w["string-value"])){var ae=mo(n.slice(y,v.index),x);k=(k.length>0?k+"\n":"")+ae[0]}else if(v[0].slice(-2)=="/>"){k+="\n"}else{x=ft(v[0],false);y=v.index+v[0].length}break;case"s":break;case"database-range":if(v[1]==="/")break;try{j=zs(ft(v[0])["target-range-address"]);d[j[0]]["!autofilter"]={ref:j[1]}}catch(ne){}break;case"date":break;case"object":break;case"title":;case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break
n.strs.push(s);Un(r.wbrels,-1,"sharedStrings."+t,Pn.SST)}s="xl/workbook."+t;Qr(i,s,write_wb_bin(e,r));n.workbooks.push(s);Un(r.rels,1,s,Pn.WB);s="xl/theme/theme1.xml";var b=ss(e.Themes,r);Qr(i,s,b);n.themes.push(s);Un(r.wbrels,-1,"theme/theme1.xml",Pn.THEME);s="xl/styles."+t;Qr(i,s,write_sty_bin(e,r));n.styles.push(s);Un(r.wbrels,-1,"styles."+t,Pn.STY);if(e.vbaraw&&a){s="xl/vbaProject.bin";Qr(i,s,e.vbaraw);n.vba.push(s);Un(r.wbrels,-1,"vbaProject.bin",Pn.VBA)}s="xl/metadata."+t;Qr(i,s,write_xlmeta_bin());n.metadata.push(s);Un(r.wbrels,-1,"metadata."+t,Pn.XLMETA);if(f.length>1){s="xl/persons/person.xml";Qr(i,s,ys(f,r));n.people.push(s);Un(r.wbrels,-1,"persons/person.xml",Pn.PEOPLE)}Qr(i,"[Content_Types].xml",In(n,r));Qr(i,"_rels/.rels",Bn(r.rels));Qr(i,"xl/_rels/workbook."+t+".rels",Bn(r.wbrels));delete r.revssf;delete r.ssf;return i}function Ro(e,r){if(e&&!e.SSF){e.SSF=yr(q)}if(e&&e.SSF){He();je(e.SSF);r.revssf=or(e.SSF);r.revssf[e.SSF[65535]]=0;r.ssf=e.SSF}r.rels={};r.wbrels={};r.Strings=[];r.Strings.Count=0;r.Strings.Unique=0;if(Hs)r.revStrings=new Map;else{r.revStrings={};r.revStrings.foo=[];delete r.revStrings.foo}var t="xml";var a=_s.indexOf(r.bookType)>-1;var n=Mn();To(r=r||{});var i=et();var s="",l=0;r.cellXfs=[];Ys(r.cellXfs,{},{revssf:{General:0}});if(!e.Props)e.Props={};s="docProps/core.xml";Qr(i,s,Zn(e.Props,r));n.coreprops.push(s);Un(r.rels,2,s,Pn.CORE_PROPS);s="docProps/app.xml";if(e.Props&&e.Props.SheetNames){}else if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{var o=[];for(var c=0;c<e.SheetNames.length;++c)if((e.Workbook.Sheets[c]||{}).Hidden!=2)o.push(e.SheetNames[c]);e.Props.SheetNames=o}e.Props.Worksheets=e.Props.SheetNames.length;Qr(i,s,ri(e.Props,r));n.extprops.push(s);Un(r.rels,3,s,Pn.EXT_PROPS);if(e.Custprops!==e.Props&&ir(e.Custprops||{}).length>0){s="docProps/custom.xml";Qr(i,s,ni(e.Custprops,r));n.custprops.push(s);Un(r.rels,4,s,Pn.CUST_PROPS)}var f=["SheetJ5"];r.tcid=0;for(l=1;l<=e.SheetNames.length;++l){var u={"!id":{}};var h=e.Sheets[e.SheetNames[l-1]];var d=(h||{})["!type"]||"sheet";switch(d){case"chart":;default:s="xl/worksheets/sheet"+l+"."+t;Qr(i,s,Al(l-1,r,e,u));n.sheets.push(s);Un(r.wbrels,-1,"worksheets/sheet"+l+"."+t,Pn.WS[0]);}if(h){var p=h["!comments"];var m=false;var v="";if(p&&p.length>0){var g=false;p.forEach(function(e){e[1].forEach(function(e){if(e.T==true)g=true})});if(g){v="xl/threadedComments/threadedComment"+l+".xml";Qr(i,v,ws(p,f,r));n.threadedcomments.push(v);Un(u,-1,"../threadedComments/threadedComment"+l+".xml",Pn.TCMNT)}v="xl/comments"+l+"."+t;Qr(i,v,gs(p,r));n.comments.push(v);Un(u,-1,"../comments"+l+"."+t,Pn.CMNT);m=true}if(h["!legacy"]){if(m)Qr(i,"xl/drawings/vmlDrawing"+l+".vml",ds(l,h["!comments"]))}delete h["!comments"];delete h["!legacy"]}if(u["!id"].rId1)Qr(i,Rn(s),Bn(u))}if(r.Strings!=null&&r.Strings.length>0){s="xl/sharedStrings."+t;Qr(i,s,xi(r.Strings,r));n.strs.push(s);Un(r.wbrels,-1,"sharedStrings."+t,Pn.SST)}s="xl/workbook."+t;Qr(i,s,Hl(e,r));n.workbooks.push(s);Un(r.rels,1,s,Pn.WB);s="xl/theme/theme1.xml";Qr(i,s,ss(e.Themes,r));n.themes.push(s);Un(r.wbrels,-1,"theme/theme1.xml",Pn.THEME);s="xl/styles."+t;Qr(i,s,Qi(e,r));n.styles.push(s);Un(r.wbrels,-1,"styles."+t,Pn.STY);if(e.vbaraw&&a){s="xl/vbaProject.bin";Qr(i,s,e.vbaraw);n.vba.push(s);Un(r.wbrels,-1,"vbaProject.bin",Pn.VBA)}s="xl/metadata."+t;Qr(i,s,os());n.metadata.push(s);Un(r.wbrels,-1,"metadata."+t,Pn.XLMETA);if(f.length>1){s="xl/persons/person.xml";Qr(i,s,ys(f,r));n.people.push(s);Un(r.wbrels,-1,"persons/person.xml",Pn.PEOPLE)}Qr(i,"[Content_Types].xml",In(n,r));Qr(i,"_rels/.rels",Bn(r.rels));Qr(i,"xl/_rels/workbook."+t+".rels",Bn(r.wbrels));delete r.revssf;delete r.ssf;return i}function Lo(e,r){var t="";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:throw new Error("Unrecognized type "+(r&&r.type||"undefined"));}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t