xsheetjs/dist/xlsx.mini.min.js

10 lines
219 KiB
JavaScript
Raw Normal View History

/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
var DO_NOT_EXPORT_CODEPAGE=true;var DO_NOT_EXPORT_JSZIP=true;var XLSX={};function make_xlsx_lib(e){e.version="0.17.1";var r=1200,t=1252;var a=[874,932,936,949,950];for(var n=0;n<=8;++n)a.push(1250+n);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(a.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.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return r.join("")}var d=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 h(e.slice(2));if(r==65279)return e.slice(1);return e};var p=function $l(e){return String.fromCharCode(e)};var m=function Ul(e){return String.fromCharCode(e)};var v=null;var g=true;var b=function jl(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(r){var t="";var a=0,n=0,i=0,s=0,l=0,o=0,c=0;for(var f=0;f<r.length;){a=r.charCodeAt(f++);s=a>>2;n=r.charCodeAt(f++);l=(a&3)<<4|n>>4;i=r.charCodeAt(f++);o=(n&15)<<2|i>>6;c=i&63;if(isNaN(n)){o=c=64}else if(isNaN(i)){c=64}t+=e.charAt(s)+e.charAt(l)+e.charAt(o)+e.charAt(c)}return t},decode:function r(t){var a="";var n=0,i=0,s=0,l=0,o=0,c=0,f=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<t.length;){l=e.indexOf(t.charAt(u++));o=e.indexOf(t.charAt(u++));n=l<<2|o>>4;a+=String.fromCharCode(n);c=e.indexOf(t.charAt(u++));i=(o&15)<<4|c>>2;if(c!==64){a+=String.fromCharCode(i)}f=e.indexOf(t.charAt(u++));s=(c&3)<<6|f;if(f!==64){a+=String.fromCharCode(s)}}return a}}}();var w=typeof Buffer!=="undefined"&&typeof process!=="undefined"&&typeof process.versions!=="undefined"&&!!process.versions.node;var k=function(){};if(typeof Buffer!=="undefined"){var y=!Buffer.from;if(!y)try{Buffer.from("foo","utf8")}catch(x){y=true}k=y?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer);if(!Buffer.alloc)Buffer.alloc=function(e){return new Buffer(e)};if(!Buffer.allocUnsafe)Buffer.allocUnsafe=function(e){return new Buffer(e)}}function S(e){return w?Buffer.alloc(e):new Array(e)}function _(e){return w?Buffer.allocUnsafe(e):new Array(e)}var C=function Hl(e){if(w)return k(e,"binary");return e.split("").map(function(e){return e.charCodeAt(0)&255})};function A(e){if(typeof ArrayBuffer==="undefined")return C(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 E(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join("");var r=[];for(var t=0;t<e.length;++t)r[t]=String.fromCharCode(e[t]);return r.join("")}function F(e){if(typeof Uint8Array==="undefined")throw new Error("Unsupported");return new Uint8Array(e)}function T(e){if(typeof ArrayBuffer=="undefined")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return T(new Uint8Array(e));var r=new Array(e.length);for(var t=0;t<e.length;++t)r[t]=e[t];return r}var O=function(e){return[].concat.apply([],e)};var D=/\u0000/g,M=/[\u0001-\u0006]/g;var N={};var R=function Vl(e){e.version="0.11.2";function r(e){var r="",t=e.length-1;while(t>=0)r+=e.charAt(t--);return r}function t(e,r){var t="";while(t.length<r)t+=e;return t}function a(e,r){var a=""+e;return a.length>=r?a:t("0",r-a.length)+a}function n(e,r){var a=""+e;return a.length>=r?a:t(" ",r-a.length)+a}function i(e,r){var a=""+e;return a.length>=r?a:a+t(" ",r-a.length)}function s(e,r){var a=""+Math.round(e);return a.length>=r?a:t("0",r-a.length)+a}function l(e,r){var a=""+e;return a.length>=r?a:t("0",r-a.length)+a}var o=Math.pow(2,32);function c(e,r){if(e>o||e<-o)return s(e,r);var t=Math.round(e);return l(t,r)}function f(e,r){r=r||0;return e.length>=7+r&&(e.charCodeAt(r)|3
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){Yr(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;}e.l=i;r[a]=s}return r}var l;function o(){return l||(l=require("fs"))}function c(e,r){if(e[0]==80&&e[1]==75)return Ae(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);Yr(p,0);var v=f(p);t=v[0];switch(t){case 3:a=512;break;case 4:a=4096;break;case 0:if(v[1]==0)return Ae(e,r);default:throw new Error("Major Version: Expected 3 or 4 saw "+t);}if(a!==512){p=e.slice(0,a);Yr(p,28)}var b=e.slice(0,a);u(p,t);var w=p._R(4,"i");if(t===3&&w!==0)throw new Error("# Directory Sectors: Expected 0 saw "+w);p.l+=4;s=p._R(4,"i");p.l+=4;p.chk("00100000","Mini Stream Cutoff Size: ");l=p._R(4,"i");n=p._R(4,"i");o=p._R(4,"i");i=p._R(4,"i");for(var y=-1,x=0;x<109;++x){y=p._R(4,"i");if(y<0)break;c[x]=y}var S=h(e,a);m(o,i,S,a,c);var _=g(S,s,c,a);_[s].name="!Directory";if(n>0&&l!==I)_[l].name="!MiniFAT";_[c[0]].name="!FAT";_.fat_addrs=c;_.ssz=a;var C={},A=[],E=[],F=[];k(s,_,S,A,n,C,E,l);d(E,F,A);A.shift();var T={FileIndex:E,FullPaths:F};if(r&&r.raw)T.raw={header:b,sectors:S};return T}function f(e){if(e[e.l]==80&&e[e.l+1]==75)return[0,0];e.chk(L,"Header Signature: ");e.l+=16;var r=e._R(2,"u");return[e._R(2,"u"),r]}function u(e,r){var t=9;e.l+=2;switch(t=e._R(2)){case 9:if(r!=3)throw new Error("Sector Shift: Expected 9 saw "+t);break;case 12:if(r!=4)throw new Error("Sector Shift: Expected 12 saw "+t);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+t);}e.chk("0600","Mini Sector Shift: ");e.chk("000000000000","Reserved: ")}function h(e,r){var t=Math.ceil(e.length/r)-1;var a=[];for(var n=1;n<t;++n)a[n-1]=e.slice(n*r,(n+1)*r);a[t-1]=e.slice(t*r);return a}function d(e,r,t){var a=0,n=0,i=0,s=0,l=0,o=t.length;var c=[],f=[];for(;a<o;++a){c[a]=f[a]=a;r[a]=t[a]}for(;l<f.length;++l){a=f[l];n=e[a].L;i=e[a].R;s=e[a].C;if(c[a]===a){if(n!==-1&&c[n]!==n)c[a]=c[n];if(i!==-1&&c[i]!==i)c[a]=c[i]}if(s!==-1)c[s]=a;if(n!==-1&&a!=c[a]){c[n]=c[a];if(f.lastIndexOf(n)<l)f.push(n)}if(i!==-1&&a!=c[a]){c[i]=c[a];if(f.lastIndexOf(i)<l)f.push(i)}}for(a=1;a<o;++a)if(c[a]===a){if(i!==-1&&c[i]!==i)c[a]=c[i];else if(n!==-1&&c[n]!==n)c[a]=c[n]}for(a=1;a<o;++a){if(e[a].type===0)continue;l=a;if(l!=c[l])do{l=c[l];r[a]=r[l]+"/"+r[a]}while(l!==0&&-1!==c[l]&&l!=c[l]);c[a]=-1}r[0]+="/";for(a=1;a<o;++a){if(e[a].type!==2)r[a]+="/"}}function p(e,r,t){var a=e.start,n=e.size;var i=[];var s=a;while(t&&n>0&&s>=0){i.push(r.slice(s*P,s*P+P));n-=P;s=Wr(t,s*4)}if(i.length===0)return Kr(0);return O(i).slice(0,e.size)}function m(e,r,t,a,n){var i=I;if(e===I){if(r!==0)throw new Error("DIFAT chain shorter than expected")}else if(e!==-1){var s=t[e],l=(a>>>2)-1;if(!s)return;for(var o=0;o<l;++o){if((i=Wr(s,o*4))===I)break;n.push(i)}m(Wr(s,a-4),r-1,t,a,n)}}function v(e,r,t,a,n){var i=[],s=[];if(!n)n=[];var l=a-1,o=0,c=0;for(o=r;o>=0;){n[o]=true;i[i.length]=o;s.push(e[o]);var f=t[Math.floor(o*4/a)];c=o*4&l;if(a<4+c)throw new Error("FAT boundary crossed: "+o+" 4 "+a);if(!e[f])break;o=Wr(e[f],c)}return{nodes:i,data:mr([s])}}function g(e,r,t,a){var n=e.length,i=[];var s=[],l=[],o=[];var c=a-1,f=0,u=0,h=0,d=0;for(f=0;f<n;++f){l=[];h=f+r;if(h>=n)h-=n;if(s[h])continue;o=[];var p=[];for(u=h;u>=0;){p[u]=true;s[u]=tr
return r.join("")};if(w){var Ke=function Yl(e){var r=Buffer.alloc(2*e.length),t,a,n=1,i=0,s=0,l;for(a=0;a<e.length;a+=n){n=1;if((l=e.charCodeAt(a))<128)t=l;else if(l<224){t=(l&31)*64+(e.charCodeAt(a+1)&63);n=2}else if(l<240){t=(l&15)*4096+(e.charCodeAt(a+1)&63)*64+(e.charCodeAt(a+2)&63);n=3}else{n=4;t=(l&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}return r.slice(0,i).toString("ucs2")};var qe="foo bar baz☃🍣";if(Ye(qe)==Ke(qe))Ye=Ke;var Ze=function Jl(e){return k(e,"binary").toString("utf8")};if(Ye(qe)==Ze(qe))Ye=Ze;Je=function(e){return k(e,"utf8").toString("binary")}}var Qe=function(){var e={};return function r(t,a){var n=t+"|"+(a||"");if(e[n])return e[n];return e[n]=new RegExp("<(?:\\w+:)?"+t+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+t+">",a||"")}}();var er=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(e){return[new RegExp("&"+e[0]+";","ig"),e[1]]});return function r(t){var a=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(var n=0;n<e.length;++n)a=a.replace(e[n][0],e[n][1]);return a}}();var rr=function(){var e={};return function r(t){if(e[t]!==undefined)return e[t];return e[t]=new RegExp("<(?:vt:)?"+t+">([\\s\\S]*?)</(?:vt:)?"+t+">","g")}}();var tr=/<\/?(?:vt:)?variant>/g,ar=/<(?:vt:)([^>]*)>([\s\S]*)</;function nr(e,r){var t=Ne(e);var a=e.match(rr(t.baseType))||[];var n=[];if(a.length!=t.size){if(r.WTF)throw new Error("unexpected vector length "+a.length+" != "+t.size);return n}a.forEach(function(e){var r=e.replace(tr,"").match(ar);if(r)n.push({v:Ye(r[2]),t:r[1]})});return n}var ir=/(^\s|\s$|\n)/;function sr(e,r){return"<"+e+(r.match(ir)?' xml:space="preserve"':"")+">"+r+"</"+e+">"}function lr(e){return Y(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}function or(e,r,t){return"<"+e+(t!=null?lr(t):"")+(r!=null?(r.match(ir)?' xml:space="preserve"':"")+">"+r+"</"+e:"/")+">"}function cr(e,r){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throw t}return""}function fr(e,r){switch(typeof e){case"string":var t=or("vt:lpwstr",We(e));if(r)t=t.replace(/&quot;/g,"_x0022_");return t;case"number":return or((e|0)==e?"vt:i4":"vt:r8",We(String(e)));case"boolean":return or("vt:bool",e?"true":"false");}if(e instanceof Date)return or("vt:filetime",cr(e));throw new Error("Unable to serialize "+e)}var ur={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"};ur.main=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];var hr={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function dr(e,r){var t=1-2*(e[r+7]>>>7);var a=((e[r+7]&127)<<4)+(e[r+6]>>>4&15);var n=e[r+6]&15;for(var i=5;i>=0;--i)n=n*256+e[r+i];if(a==2047)return n==0?t*Infinity:NaN;if(a==0)a=-1022;else{a-=1023;n+=Math.pow(2,52)}return t*Math.pow(2,a-52)*n}function pr(e,r,t){var a=(r<0||1/r==-Infinity?1:0)<<7,n=0,i=0;var s=a?-r:r;if(!isFinite(s)){n=2047;i=isNaN(r)?26985:0}else if(s==0)n=i=0;else{n=Math.floor(Math.log(s)/Math.LN2);i=s*Math.pow(2,52-
ur.EXT_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties";ta.EXT_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties";var va=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function ga(e,r,t,a){var n=[];if(typeof e=="string")n=nr(e,a);else for(var i=0;i<e.length;++i)n=n.concat(e[i].map(function(e){return{v:e}}));var s=typeof r=="string"?nr(r,a).map(function(e){return e.v}):r;var l=0,o=0;if(s.length>0)for(var c=0;c!==n.length;c+=2){o=+n[c+1].v;switch(n[c].v){case"Worksheets":;case"工作表":;case"Листы":;case"أوراق العمل":;case"ワークシート":;case"גליונות עבודה":;case"Arbeitsblätter":;case"Çalışma Sayfaları":;case"Feuilles de calcul":;case"Fogli di lavoro":;case"Folhas de cálculo":;case"Planilhas":;case"Regneark":;case"Hojas de cálculo":;case"Werkbladen":t.Worksheets=o;t.SheetNames=s.slice(l,l+o);break;case"Named Ranges":;case"Rangos con nombre":;case"名前付き一覧":;case"Benannte Bereiche":;case"Navngivne områder":t.NamedRanges=o;t.DefinedNames=s.slice(l,l+o);break;case"Charts":;case"Diagramme":t.Chartsheets=o;t.ChartNames=s.slice(l,l+o);break;}l+=o}}function ba(e,r,t){var a={};if(!r)r={};e=Ye(e);ma.forEach(function(t){var n=(e.match(Qe(t[0]))||[])[1];switch(t[2]){case"string":if(n)r[t[1]]=Le(n);break;case"bool":r[t[1]]=n==="true";break;case"raw":var i=e.match(new RegExp("<"+t[0]+"[^>]*>([\\s\\S]*?)</"+t[0]+">"));if(i&&i.length>0)a[t[1]]=i[1];break;}});if(a.HeadingPairs&&a.TitlesOfParts)ga(a.HeadingPairs,a.TitlesOfParts,r,t);return r}var wa=or("Properties",null,{xmlns:ur.EXT_PROPS,"xmlns:vt":ur.vt});function ka(e){var r=[],t=or;if(!e)e={};e.Application="SheetJS";r[r.length]=Fe;r[r.length]=wa;ma.forEach(function(a){if(e[a[1]]===undefined)return;var n;switch(a[2]){case"string":n=We(String(e[a[1]]));break;case"bool":n=e[a[1]]?"true":"false";break;}if(n!==undefined)r[r.length]=t(a[0],n)});r[r.length]=t("HeadingPairs",t("vt:vector",t("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+t("vt:variant",t("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"}));r[r.length]=t("TitlesOfParts",t("vt:vector",e.SheetNames.map(function(e){return"<vt:lpstr>"+We(e)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"}));if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}return r.join("")}ur.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";ta.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";var ya=/<[^>]+>[^<]*/g;function xa(e,r){var t={},a="";var n=e.match(ya);if(n)for(var i=0;i!=n.length;++i){var s=n[i],l=Ne(s);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":a=Le(l.name);break;case"</property>":a=null;break;default:if(s.indexOf("<vt:")===0){var o=s.split(">");var c=o[0].slice(4),f=o[1];switch(c){case"lpstr":;case"bstr":;case"lpwstr":t[a]=Le(f);break;case"bool":t[a]=Ge(f);break;case"i1":;case"i2":;case"i4":;case"i8":;case"int":;case"uint":t[a]=parseInt(f,10);break;case"r4":;case"r8":;case"decimal":t[a]=parseFloat(f);break;case"filetime":;case"date":t[a]=oe(f);break;case"cy":;case"error":t[a]=Le(f);break;default:if(c.slice(-1)=="/")break;if(r.WTF&&typeof console!=="undefined")console.warn("Unexpected",s,c,o);}}else if(s.slice(0,2)==="</"){}else if(r.WTF)throw new Error(s);}}return t}var Sa=or("Properties",null,{xmlns:ur.CUST_PROPS,"xmlns:vt":ur.vt});function _a(e){var r=[Fe,Sa];if(!e)return r.join("");var t=1;Y(e).forEach(function a(n){++t;r[r.length]=or("property",fr(e[n],true),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:We(n)})});if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}return r.join("")}var Ca=function(){var e={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,
i=true;break;case"</ext>":i=false;break;default:if(a&&a.WTF){if(!i)throw new Error("unrecognized "+t[0]+" in fills")};}})}function dn(e,r,t,a){r.Fonts=[];var n={};var s=false;(e[0].match(Oe)||[]).forEach(function(e){var l=Ne(e);switch(Re(l[0])){case"<fonts":;case"<fonts>":;case"</fonts>":break;case"<font":;case"<font>":break;case"</font>":;case"<font/>":r.Fonts.push(n);n={};break;case"<name":if(l.val)n.name=Ye(l.val);break;case"<name/>":;case"</name>":break;case"<b":n.bold=l.val?Ge(l.val):1;break;case"<b/>":n.bold=1;break;case"<i":n.italic=l.val?Ge(l.val):1;break;case"<i/>":n.italic=1;break;case"<u":switch(l.val){case"none":n.underline=0;break;case"single":n.underline=1;break;case"double":n.underline=2;break;case"singleAccounting":n.underline=33;break;case"doubleAccounting":n.underline=34;break;}break;case"<u/>":n.underline=1;break;case"<strike":n.strike=l.val?Ge(l.val):1;break;case"<strike/>":n.strike=1;break;case"<outline":n.outline=l.val?Ge(l.val):1;break;case"<outline/>":n.outline=1;break;case"<shadow":n.shadow=l.val?Ge(l.val):1;break;case"<shadow/>":n.shadow=1;break;case"<condense":n.condense=l.val?Ge(l.val):1;break;case"<condense/>":n.condense=1;break;case"<extend":n.extend=l.val?Ge(l.val):1;break;case"<extend/>":n.extend=1;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=Ge(l.auto);if(l.rgb)n.color.rgb=l.rgb.slice(-6);else if(l.indexed){n.color.index=parseInt(l.indexed,10);var o=Vt[n.color.index];if(n.color.index==81)o=Vt[1];if(!o)throw new Error(e);n.color.rgb=o[0].toString(16)+o[1].toString(16)+o[2].toString(16)}else if(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=Ya(t.themeElements.clrScheme[n.color.theme].rgb,n.color.tint||0)}}break;case"<color/>":;case"</color>":break;case"<AlternateContent":s=true;break;case"</AlternateContent>":s=false;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)throw new Error("unrecognized "+l[0]+" in fonts")};}})}function pn(e,r,t){r.NumberFmt=[];var a=Y(N._table);for(var n=0;n<a.length;++n)r.NumberFmt[a[n]]=N._table[a[n]];var i=e[0].match(Oe);if(!i)return;for(n=0;n<i.length;++n){var s=Ne(i[n]);switch(Re(s[0])){case"<numFmts":;case"</numFmts>":;case"<numFmts/>":;case"<numFmts>":break;case"<numFmt":{var l=Le(Ye(s.formatCode)),o=parseInt(s.numFmtId,10);r.NumberFmt[o]=l;if(o>0){if(o>392){for(o=392;o>60;--o)if(r.NumberFmt[o]==null)break;r.NumberFmt[o]=l}N.load(l,o)}}break;case"</numFmt>":break;default:if(t.WTF)throw new Error("unrecognized "+s[0]+" in numFmts");}}}function mn(e){var r=["<numFmts>"];[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var a=t[0];a<=t[1];++a)if(e[a]!=null)r[r.length]=or("numFmt",null,{numFmtId:a,formatCode:We(e[a])})});if(r.length===1)return"";r[r.length]="</numFmts>";r[0]=or("numFmts",null,{count:r.length-2}).replace("/>",">");return r.join("")}var vn=["numFmtId","fillId","fontId","borderId","xfId"];var gn=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function bn(e,r,t){r.CellXf=[];var a;var n=false;(e[0].match(Oe)||[]).forEach(function(e){var i=Ne(e),s=0;switch(Re(i[0])){case"<cellXfs":;case"<cellXfs>":;case"<cellXfs/>":;case"</cellXfs>":break;case"<xf":;case"<xf/>":a=i;delete a[0];for(s=0;s<vn.length;++s)if(a[vn[s]])a[vn[s]]=parseInt(a[vn[s]],10);for(s=0;s<gn.length;++s)if(a[gn[s]])a[gn[s]]=Ge(a[gn[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"<align
if(o.Sheet!=a)continue;o.Ref="'"+t.SheetNames[a]+"'!"+n;break}if(l==i.length)i.push({Name:"_xlnm._FilterDatabase",Sheet:a,Ref:"'"+t.SheetNames[a]+"'!"+n});return or("autoFilter",null,{ref:n})}var Li=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function zi(e,r){if(!r.Views)r.Views=[{}];(e.match(Li)||[]).forEach(function(e,t){var a=Ne(e);if(!r.Views[t])r.Views[t]={};if(+a.zoomScale)r.Views[t].zoom=+a.zoomScale;if(Ge(a.rightToLeft))r.Views[t].RTL=true})}function Bi(e,r,t,a){var n={workbookViewId:"0"};if((((a||{}).Workbook||{}).Views||[])[0])n.rightToLeft=a.Workbook.Views[0].RTL?"1":"0";return or("sheetViews",or("sheetView",null,n),{})}function Wi(e,r,t,a){if(e.v===undefined&&typeof e.f!=="string"||e.t==="z")return"";var n="";var i=e.t,s=e.v;if(e.t!=="z")switch(e.t){case"b":n=e.v?"1":"0";break;case"n":n=""+e.v;break;case"e":n=Xt[e.v];break;case"d":if(a&&a.cellDates)n=oe(e.v,-1).toISOString();else{e=fe(e);e.t="n";n=""+(e.v=ee(oe(e.v)))}if(typeof e.z==="undefined")e.z=N._table[14];break;default:n=e.v;break;}var l=sr("v",We(n)),o={r:r};var c=fi(a.cellXfs,e,a);if(c!==0)o.s=c;switch(e.t){case"n":break;case"d":o.t="d";break;case"b":o.t="b";break;case"e":o.t="e";break;case"z":break;default:if(e.v==null){delete e.t;break}if(a&&a.bookSST){l=sr("v",""+li(a.Strings,e.v,a.revStrings));o.t="s";break}o.t="str";break;}if(e.t!=i){e.t=i;e.v=s}if(typeof e.f=="string"&&e.f){var f=e.F&&e.F.slice(0,r.length)==r?{t:"array",ref:e.F}:null;l=or("f",We(e.f),f)+(e.v!=null?l:"")}if(e.l)t["!links"].push([r,e.l]);if(e.c)t["!comments"].push([r,e.c]);return or("c",l,o)}var $i=function(){var e=/<(?:\w+:)?c[ \/>]/,r=/<\/(?:\w+:)?row>/;var t=/r=["']([^"']*)["']/,a=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;var n=/ref=["']([^"']*)["']/;var i=Qe("v"),s=Qe("f");return function l(o,c,f,u,h,d){var p=0,m="",v=[],g=[],b=0,w=0,k=0,y="",x;var S,_=0,C=0;var A,E;var F=0,T=0;var O=Array.isArray(d.CellXf),D;var M=[];var R=[];var P=Array.isArray(c);var I=[],L={},z=false;var B=!!f.sheetStubs;for(var W=o.split(r),$=0,U=W.length;$!=U;++$){m=W[$].trim();var j=m.length;if(j===0)continue;for(p=0;p<j;++p)if(m.charCodeAt(p)===62)break;++p;S=Ne(m.slice(0,p),true);_=S.r!=null?parseInt(S.r,10):_+1;C=-1;if(f.sheetRows&&f.sheetRows<_)continue;if(u.s.r>_-1)u.s.r=_-1;if(u.e.r<_-1)u.e.r=_-1;if(f&&f.cellStyles){L={};z=false;if(S.ht){z=true;L.hpt=parseFloat(S.ht);L.hpx=cn(L.hpt)}if(S.hidden=="1"){z=true;L.hidden=true}if(S.outlineLevel!=null){z=true;L.level=+S.outlineLevel}if(z)I[_-1]=L}v=m.slice(p).split(e);for(var H=0;H!=v.length;++H)if(v[H].trim().charAt(0)!="<")break;v=v.slice(H);for(p=0;p!=v.length;++p){m=v[p].trim();if(m.length===0)continue;g=m.match(t);b=p;w=0;k=0;m="<c "+(m.slice(0,1)=="<"?">":"")+m;if(g!=null&&g.length===2){b=0;y=g[1];for(w=0;w!=y.length;++w){if((k=y.charCodeAt(w)-64)<1||k>26)break;b=26*b+k}--b;C=b}else++C;for(w=0;w!=m.length;++w)if(m.charCodeAt(w)===62)break;++w;S=Ne(m.slice(0,w),true);if(!S.r)S.r=pt({r:_-1,c:C});y=m.slice(w);x={t:""};if((g=y.match(i))!=null&&g[1]!=="")x.v=Le(g[1]);if(f.cellFormula){if((g=y.match(s))!=null&&g[1]!==""){x.f=Le(Ye(g[1])).replace(/\r\n/g,"\n");if(!f.xlfn)x.f=ai(x.f);if(g[0].indexOf('t="array"')>-1){x.F=(y.match(n)||[])[1];if(x.F.indexOf(":")>-1)M.push([gt(x.F),x.F])}else if(g[0].indexOf('t="shared"')>-1){E=Ne(g[0]);var V=Le(Ye(g[1]));if(!f.xlfn)V=ai(V);R[parseInt(E.si,10)]=[E,V,S.r]}}else if(g=y.match(/<f[^>]*\/>/)){E=Ne(g[0]);if(R[E.si])x.f=ri(R[E.si][1],R[E.si][2],S.r)}var X=dt(S.r);for(w=0;w<M.length;++w)if(X.r>=M[w][0].s.r&&X.r<=M[w][0].e.r)if(X.c>=M[w][0].s.c&&X.c<=M[w][0].e.c)x.F=M[w][1]}if(S.t==null&&x.v===undefined){if(x.f||x.F){x.v=0;x.t="n"}else if(!B)continue;else x.t="z"}else x.t=S.t||"n";if(u.s.c>C)u.s.c=C;if(u.e.c<C)u.e.c=C;switch(x.t){case"n":if(x.v==""||x.v==null){if(!B)continue;x.t="z"}else x.v=parseFloat(x.v);break;case"s":if(typeof x.v=="undefined"){if(!B)continue;x.t="z"}else{A=ni[parseInt(x.v,10)];x.v=A.t;x.r=A.r;if(f.cellHTML)x.h=A.h}break;case"str":x.t="s";x.v=x.v!=null?Ye(x.v):"";if(f.cellHTML)x.h=je(x.v);break;case"inlineStr":g=y.match(a);x.t="s";if(g!=null&&(A=La(g[1]))){x.v=A.t;if(f.cellHTML)x.h=A.h}else x.v="";b
break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":;case"sender-lastname":;case"sender-initials":;case"sender-title":;case"sender-position":;case"sender-email":;case"sender-phone-private":;case"sender-fax":;case"sender-company":;case"sender-phone-work":;case"sender-street":;case"sender-city":;case"sender-postal-code":;case"sender-country":;case"sender-state-or-province":;case"author-name":;case"author-initials":;case"chapter":;case"file-name":;case"template-name":;case"sheet-name":break;case"event-listener":break;case"initial-creator":;case"creation-date":;case"print-date":;case"generator":;case"document-statistic":;case"user-defined":;case"editing-duration":;case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":;case"source-cell-range":;case"source-service":;case"data-pilot-field":;case"data-pilot-level":;case"data-pilot-subtotals":;case"data-pilot-subtotal":;case"data-pilot-members":;case"data-pilot-member":;case"data-pilot-display-info":;case"data-pilot-sort-info":;case"data-pilot-layout-info":;case"data-pilot-field-reference":;case"data-pilot-groups":;case"data-pilot-group":;case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":;case"dde-connection-decl":;case"dde-link":;case"dde-source":break;case"properties":break;case"property":break;case"a":if(w[1]!=="/"){W=Ne(w[0],false);if(!W.href)break;W.Target=W.href;delete W.href;if(W.Target.charAt(0)=="#"&&W.Target.indexOf(".")>-1){$=ods_to_csf_3D(W.Target.slice(1));W.Target="#"+$[0]+"!"+$[1]}}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(w[2]){case"dc:":;case"calcext:":;case"loext:":;case"ooo:":;case"chartooo:":;case"draw:":;case"style:":;case"chart:":;case"form:":;case"uof:":;case"表:":;case"字:":break;default:if(i.WTF)throw new Error(w);};}var re={Sheets:m,SheetNames:g,Workbook:B};if(i.bookSheets)delete re.Sheets;return re}}();function Bs(e,r){r=r||{};var t=!!we(e,"objectdata");if(t)parse_manifest(ye(e,"META-INF/manifest.xml"),r);var a=xe(e,"content.xml");if(!a)throw new Error("Missing content.xml in "+(t?"ODS":"UOF")+" file");var n=zs(t?a:Ye(a),r);if(we(e,"meta.xml"))n.Props=ua(ye(e,"meta.xml"));return n}function Ws(e,r){return zs(e,r)}var $s=function(){var e="<office:document-styles "+lr({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+"></office:document-styles>";return function r(){return Fe+e}}();var Us=function(){var e=function(e){return We(e).replace(/ +/g,function(e){return'<text:s text:c="'+e.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"<text:line-break/>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")};var r=" <table:table-cell />\n";var t=" <table:covered-table-cell/>\n";var a=function(a,n,i){var s=[];s.push(' <table:table table:name="'+We(n.SheetNames[i])+'" table:style-name="ta1">\n');var l=0,o=0,c=mt(a["!ref"]);var f=a["!merges"]||[],u=0;var h=Array.isArray(a);for(l=0;l<c.s.r;++l)s.push(" <table:table-row></table:table-row>\n");for(;l<=c.e.r;++l){s.push(" <table:table-row>\n");for(o=0;o<c.s.c;++o)s.push(r);for(;o<=c.e.c;++o){var d=false,p={},m="";for(u=0;u!=f.length;++u){if(f[u].
switch(a){case 0:;case 1:;case 2:break;default:throw new Error("Bad sheet visibility setting "+a);}e.Workbook.Sheets[i].Hidden=a};r([["SHEET_VISIBLE",0],["SHEET_HIDDEN",1],["SHEET_VERY_HIDDEN",2]]);e.cell_set_number_format=function(e,r){e.z=r;return e};e.cell_set_hyperlink=function(e,r,t){if(!r){delete e.l}else{e.l={Target:r};if(t)e.l.Tooltip=t}return e};e.cell_set_internal_link=function(r,t,a){return e.cell_set_hyperlink(r,"#"+t,a)};e.cell_add_comment=function(e,r,t){if(!e.c)e.c=[];e.c.push({t:r,a:t||"SheetJS"})};e.sheet_set_array_formula=function(e,r,t){var n=typeof r!="string"?r:gt(r);var i=typeof r=="string"?r:vt(r);for(var s=n.s.r;s<=n.e.r;++s)for(var l=n.s.c;l<=n.e.c;++l){var o=a(e,s,l);o.t="n";o.F=i;delete o.v;if(s==n.s.r&&l==n.s.c)o.f=t}return e};return e})(Wl);if(typeof parse_xlscfb!=="undefined")e.parse_xlscfb=parse_xlscfb;e.parse_zip=ol;e.read=wl;e.readFile=kl;e.readFileSync=kl;e.write=El;e.writeFile=Tl;e.writeFileSync=Tl;e.writeFileAsync=Ol;e.utils=Wl;e.SSF=N;if(typeof j!=="undefined")e.CFB=j}if(typeof exports!=="undefined")make_xlsx_lib(exports);else if(typeof module!=="undefined"&&module.exports)make_xlsx_lib(module.exports);else if(typeof define==="function"&&define.amd)define(function(){if(!XLSX.version)make_xlsx_lib(XLSX);return XLSX});else make_xlsx_lib(XLSX);var XLS=XLSX,ODS=XLSX;